From bdd980e301a07201e782b2ddd73f12bf6fb5482c Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Sat, 27 Apr 2019 08:41:58 +0000 Subject: security/git-crypt: fix build with GCC-based architectures Add USES=compiler:c++11-lang. Don't add -L${OPENSSLLIB} unconditionally, do it only when SSL library from ports is used. The reason is that adding -L/usr/lib makes ports GCC want to link to libstdc++ from /usr/lib, not from /usr/local/lib/gcc8. This causes linking errors PR: 237525 Approved by: ashish (maintainer), tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D20053 --- security/git-crypt/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'security/git-crypt') diff --git a/security/git-crypt/Makefile b/security/git-crypt/Makefile index 92dce8d009cb..65eb79911f1b 100644 --- a/security/git-crypt/Makefile +++ b/security/git-crypt/Makefile @@ -18,8 +18,6 @@ RUN_DEPENDS= git:devel/git \ OPTIONS_DEFINE= MANPAGES -CXXFLAGS+= -I${OPENSSLINC} -LDFLAGS+= -L${OPENSSLLIB} MAKE_ENV+= PREFIX=${PREFIX} "CXXFLAGS=${CXXFLAGS}" \ "LDFLAGS=${LDFLAGS}" @@ -30,10 +28,17 @@ MANPAGES_MAKE_ARGS= ENABLE_MAN=yes \ DOCBOOK_XSL=${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl MANPAGES_PLIST_FILES= man/man1/${PORTNAME}.1.gz -USES= gmake ssl +USES= compiler:c++11-lang gmake ssl PLIST_FILES= bin/${PORTNAME} +.include + +.if ${SSL_DEFAULT} != base +CXXFLAGS+= -I${OPENSSLINC} +LDFLAGS+= -L${OPENSSLLIB} +.endif + post-extract: @${GREP} -Rl '"gpg"' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} -e 's,"gpg","${LOCALBASE}/bin/gpg",' @${GREP} -Rl '"git"' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} -e 's,"git","${LOCALBASE}/bin/git",' @@ -41,4 +46,4 @@ post-extract: post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/git-crypt -.include +.include -- cgit v1.3