svn commit: r500197 - head/security/git-crypt
Piotr Kubaj
pkubaj at FreeBSD.org
Sat Apr 27 08:42:00 UTC 2019
Author: pkubaj
Date: Sat Apr 27 08:41:58 2019
New Revision: 500197
URL: https://svnweb.freebsd.org/changeset/ports/500197
Log:
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
Modified:
head/security/git-crypt/Makefile
Modified: head/security/git-crypt/Makefile
==============================================================================
--- head/security/git-crypt/Makefile Sat Apr 27 07:54:59 2019 (r500196)
+++ head/security/git-crypt/Makefile Sat Apr 27 08:41:58 2019 (r500197)
@@ -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>
More information about the svn-ports-all
mailing list