aboutsummaryrefslogtreecommitdiff
path: root/ftp/vsftpd/Makefile
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2012-09-06 14:29:59 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2012-09-06 14:29:59 +0000
commit45da3ca8be0cf1bfd0c62c7b7ec8466df2a6a247 (patch)
treeee921446010749f66b19cc42cf438c8283d8c254 /ftp/vsftpd/Makefile
parent7f16bac99e7b45456cfe2180b833277f2dacccb9 (diff)
downloadports-45da3ca8be0cf1bfd0c62c7b7ec8466df2a6a247.tar.gz
ports-45da3ca8be0cf1bfd0c62c7b7ec8466df2a6a247.zip
- respect INSTALL_PROGRAM, STRIP and custom optimisations in CFLAGS
PR: 163550
Notes
Notes: svn path=/head/; revision=303756
Diffstat (limited to 'ftp/vsftpd/Makefile')
-rw-r--r--ftp/vsftpd/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/ftp/vsftpd/Makefile b/ftp/vsftpd/Makefile
index 9fac421a724c..d63299762ce7 100644
--- a/ftp/vsftpd/Makefile
+++ b/ftp/vsftpd/Makefile
@@ -44,6 +44,11 @@ LDFLAGS+= -L${OPENSSLLIB}
EXTRA_PATCHES+= ${FILESDIR}/pidfile.patch
.endif
+VSFTPD_OPTIMIZED= ${CFLAGS:M-O}
+.if defined(CFLAGS) && !empty(VSFTPD_OPTIMIZED)
+VSFTPD_NO_OPTIMIZED= -e "s| -O2 ||"
+.endif
+
# BROKEN on FreeBSD with undefined reference to `__stack_chk_fail_local'
LDFLAGS+= -lssp_nonshared
@@ -58,16 +63,16 @@ do-configure:
"s|#undef VSF_BUILD_TCPWRAPPERS|#define VSF_BUILD_TCPWRAPPERS 1|" \
${WRKSRC}/builddefs.h
.endif
- ${REINPLACE_CMD} -e "s|^listen=|#listen=|" \
+ ${REINPLACE_CMD} -e "s|^listen=.*|listen=NO|" \
-e "s|/etc/vsftpd.conf|${PREFIX}/etc/vsftpd.conf|" \
${WRKSRC}/defs.h ${WRKSRC}/vsftpd.conf
${REINPLACE_CMD} -e "s|/etc/v|${PREFIX}/etc/v|" \
${WRKSRC}/vsftpd.8 ${WRKSRC}/vsftpd.conf.5 ${WRKSRC}/tunables.c
- ${REINPLACE_CMD} \
+ ${REINPLACE_CMD} ${VSFTPD_NO_OPTIMIZED} \
-e "s|^CC = gcc|CC = ${CC}|" \
-e "s|^CFLAGS =|CFLAGS = ${CFLAGS}|" \
- -e "s|^INSTALL =|INSTALL = ${INSTALL_PROGRAM}|" \
- -e "s| -Wl,-s| -Wl,-s ${LDFLAGS:S/-rpath=/-Wl,-rpath,/g}|" \
+ -e "s|$$(INSTALL) -m 755=|$${INSTALL_PROGRAM}|" \
+ -e "s| -Wl,-s| -Wl ${LDFLAGS:S/-rpath=/-Wl,-rpath,/g}|" \
${WRKSRC}/Makefile
${REINPLACE_CMD} -e '/-lutil/d' ${WRKSRC}/vsf_findlibs.sh
@${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \