Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Sep 2012 14:29:59 +0000 (UTC)
From:      Dirk Meyer <dinoex@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r303756 - head/ftp/vsftpd
Message-ID:  <201209061429.q86ETxwZ034822@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dinoex
Date: Thu Sep  6 14:29:59 2012
New Revision: 303756
URL: http://svn.freebsd.org/changeset/ports/303756

Log:
  - respect INSTALL_PROGRAM, STRIP and custom optimisations in CFLAGS
  PR:		163550

Modified:
  head/ftp/vsftpd/Makefile

Modified: head/ftp/vsftpd/Makefile
==============================================================================
--- head/ftp/vsftpd/Makefile	Thu Sep  6 14:11:07 2012	(r303755)
+++ head/ftp/vsftpd/Makefile	Thu Sep  6 14:29:59 2012	(r303756)
@@ -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" >> \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209061429.q86ETxwZ034822>