summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2019-04-27 08:41:58 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2019-04-27 08:41:58 +0000
commitbdd980e301a07201e782b2ddd73f12bf6fb5482c (patch)
tree787e45f84e45097f0c58e4d95c817c5545f0589c
parentprint/py-reportlab: Update version 3.5.19=>3.5.20 (diff)
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
Notes
Notes: svn path=/head/; revision=500197
-rw-r--r--security/git-crypt/Makefile13
1 files changed, 9 insertions, 4 deletions
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 <bsd.port.pre.mk>
+
+.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 <bsd.port.mk>
+.include <bsd.port.post.mk>