1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00
freebsd-ports/ftp/fastdfs/files/patch-client-Makefile.in
John Marino cc875c39f3 ftp/fastdfs: Add explicit -L flag to link libfastcommon
Supports non-default LOCALBASE and compilers that don't look in
/usr/local/lib by default.  It adjusts already existing patches.

Approved by:	just-fix-it
2017-01-28 14:33:43 +00:00

40 lines
1.7 KiB
Plaintext

--- client/Makefile.in.orig 2016-08-08 07:17:50 UTC
+++ client/Makefile.in
@@ -3,10 +3,10 @@
COMPILE = $(CC) $(CFLAGS)
ENABLE_STATIC_LIB = $(ENABLE_STATIC_LIB)
ENABLE_SHARED_LIB = $(ENABLE_SHARED_LIB)
-INC_PATH = -I../common -I../tracker -I/usr/include/fastcommon
-LIB_PATH = $(LIBS) -lfastcommon
+INC_PATH = -I../common -I../tracker -I$(LOCALBASE)/include/fastcommon
+LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon
TARGET_PATH = $(TARGET_PREFIX)/bin
-TARGET_LIB = $(TARGET_PREFIX)/lib64
+TARGET_LIB = $(TARGET_PREFIX)/lib
TARGET_INC = $(TARGET_PREFIX)/include
CONFIG_PATH = $(TARGET_CONF_PATH)
@@ -50,7 +50,8 @@ ALL_LIBS = $(STATIC_LIBS) $(SHARED_LIBS)
all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
libfdfsclient.so:
- $(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH)
+ $(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH) \
+ -Wl,-soname,libfdfsclient.so
libfdfsclient.a:
ar cru $@ $< $(FDFS_STATIC_OBJS)
.o:
@@ -66,9 +67,9 @@ install:
mkdir -p $(CONFIG_PATH)
mkdir -p $(TARGET_LIB)
mkdir -p $(TARGET_PREFIX)/lib
- cp -f $(ALL_PRGS) $(TARGET_PATH)
- if [ $(ENABLE_STATIC_LIB) -eq 1 ]; then cp -f $(STATIC_LIBS) $(TARGET_LIB); cp -f $(STATIC_LIBS) $(TARGET_PREFIX)/lib/;fi
- if [ $(ENABLE_SHARED_LIB) -eq 1 ]; then cp -f $(CLIENT_SHARED_LIBS) $(TARGET_LIB); cp -f $(CLIENT_SHARED_LIBS) $(TARGET_PREFIX)/lib/;fi
+ install -s $(ALL_PRGS) $(TARGET_PATH)
+ if [ $(ENABLE_STATIC_LIB) -eq 1 ]; then install -s $(STATIC_LIBS) $(TARGET_LIB); install -s $(STATIC_LIBS) $(TARGET_PREFIX)/lib/;fi
+ if [ $(ENABLE_SHARED_LIB) -eq 1 ]; then install -s $(CLIENT_SHARED_LIBS) $(TARGET_LIB); install -s $(CLIENT_SHARED_LIBS) $(TARGET_PREFIX)/lib/;fi
mkdir -p $(TARGET_INC)/fastdfs
cp -f $(FDFS_HEADER_FILES) $(TARGET_INC)/fastdfs