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
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user