diff options
author | ehaupt <ehaupt@FreeBSD.org> | 2014-04-12 05:54:45 +0800 |
---|---|---|
committer | ehaupt <ehaupt@FreeBSD.org> | 2014-04-12 05:54:45 +0800 |
commit | 2203636926ab7d903e30c81885a6e701c9cfb054 (patch) | |
tree | d2b9a5c2303c443870be3f63be564ca2f3c61de3 | |
parent | 15a31ef26abcc63f9465718c9434c88f437fc55e (diff) | |
download | freebsd-ports-gnome-2203636926ab7d903e30c81885a6e701c9cfb054.tar.gz freebsd-ports-gnome-2203636926ab7d903e30c81885a6e701c9cfb054.tar.zst freebsd-ports-gnome-2203636926ab7d903e30c81885a6e701c9cfb054.zip |
- Support staging
- Use proper INSTALL_* macros instead of CP
- Respect CC and therefore fix build with clang
- Respect CFLAGS
-rw-r--r-- | net/csocks/Makefile | 23 | ||||
-rw-r--r-- | net/csocks/files/patch-Makefile | 15 |
2 files changed, 24 insertions, 14 deletions
diff --git a/net/csocks/Makefile b/net/csocks/Makefile index 70d8ac1c4fbf..a1f608a84f64 100644 --- a/net/csocks/Makefile +++ b/net/csocks/Makefile @@ -11,24 +11,19 @@ DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= raffaele.delorenzo@libero.it COMMENT= SOCKS Client v4/v5 RFC Compliant with many features -PLIST_FILES= etc/csocks.conf.sample lib/libcsocks.so lib/libcsocks.so.1 bin/csocks +PLIST_FILES= etc/csocks.conf.sample lib/libcsocks.so lib/libcsocks.so.1 \ + bin/csocks man/man1/csocks.1.gz man/man5/csocks.conf.5.gz -WRKSRC= ${WRKDIR}/src USE_LDCONFIG= yes -MAN1= csocks.1 -MAN5= csocks.conf.5 -MANCOMPRESSED= yes -NO_STAGE= yes -post-patch: - ${REINPLACE_CMD} "s#/usr/local#${PREFIX}#" ${WRKDIR}/src/Makefile +WRKSRC= ${WRKDIR}/src do-install: - ${CP} -p ${WRKDIR}/src/libcsocks.so.1 ${PREFIX}/lib/ - ${LN} -fs ${PREFIX}/lib/libcsocks.so.1 ${PREFIX}/lib/libcsocks.so - ${CP} -p ${WRKDIR}/freebsd/csocks ${PREFIX}/bin - ${CP} -p ${WRKDIR}/csocks.conf ${PREFIX}/etc/csocks.conf.sample - ${CP} -p ${WRKDIR}/man/csocks.1.gz ${MANPREFIX}/man/man1 - ${CP} -p ${WRKDIR}/man/csocks.conf.5.gz ${MANPREFIX}/man/man5 + ${INSTALL_SCRIPT} ${WRKDIR}/freebsd/csocks ${STAGEDIR}${PREFIX}/bin + ${INSTALL_LIB} ${WRKDIR}/src/libcsocks.so.1 ${STAGEDIR}${PREFIX}/lib + ${LN} -s libcsocks.so.1 ${STAGEDIR}${PREFIX}/lib/libcsocks.so + ${INSTALL_DATA} ${WRKDIR}/csocks.conf ${STAGEDIR}${PREFIX}/etc/csocks.conf.sample + ${INSTALL_MAN} ${WRKDIR}/man/csocks.1.gz ${STAGEDIR}${MANPREFIX}/man/man1 + ${INSTALL_MAN} ${WRKDIR}/man/csocks.conf.5.gz ${STAGEDIR}${MANPREFIX}/man/man5 .include <bsd.port.mk> diff --git a/net/csocks/files/patch-Makefile b/net/csocks/files/patch-Makefile new file mode 100644 index 000000000000..eb2f6dd09008 --- /dev/null +++ b/net/csocks/files/patch-Makefile @@ -0,0 +1,15 @@ +--- Makefile.orig 2014-04-11 23:48:26.646982600 +0200 ++++ Makefile 2014-04-11 23:49:46.629977600 +0200 +@@ -1,9 +1,9 @@ + # Compiler/Linker/dynamic linker +-CC = gcc +-LD = gcc ++CC ?= gcc ++LD = $(CC) + + # flags to compile object files that can be used in a dynamic library +-CFLAGS = -fPIC -Wall -g -c -O2 -fno-strict-aliasing -pipe -Wall -std=c99 -D'CSOCKS_CONF="/usr/local/etc/csocks.conf"' ++CFLAGS += -fPIC -c -std=c99 -D'CSOCKS_CONF="$(PREFIX)/etc/csocks.conf"' + # on some platforms, use '-fpic' instead. + + # Flags to create a dynamic library. |