aboutsummaryrefslogtreecommitdiff
path: root/security/libtasn1
diff options
context:
space:
mode:
authorRoman Bogorodskiy <novel@FreeBSD.org>2021-01-11 15:19:09 +0000
committerRoman Bogorodskiy <novel@FreeBSD.org>2021-01-11 15:19:09 +0000
commitc964ac1a0a0681a0efe7866fa843435e7d51adda (patch)
tree41f1224fb6fa0f3edfe5da2b12b854e2baac7035 /security/libtasn1
parent10b49c0e245b235ce8a881a569fab85c3c6a3a23 (diff)
downloadports-c964ac1a0a0681a0efe7866fa843435e7d51adda.tar.gz
ports-c964ac1a0a0681a0efe7866fa843435e7d51adda.zip
security/libtasn1: add a workaround for clang 10+
When compiled with clang 10+ and -O[2-9], the resulting package fails to parse certificates. As a workaround, downgrade optimization to -O1. Upstream issue: https://gitlab.com/gnutls/libtasn1/-/issues/30 PR: 252548 Reported by: rozhuk.im@gmail.com
Notes
Notes: svn path=/head/; revision=561219
Diffstat (limited to 'security/libtasn1')
-rw-r--r--security/libtasn1/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/security/libtasn1/Makefile b/security/libtasn1/Makefile
index 15843162d7ba..be8bd0306cf8 100644
--- a/security/libtasn1/Makefile
+++ b/security/libtasn1/Makefile
@@ -3,6 +3,7 @@
PORTNAME= libtasn1
PORTVERSION= 4.16.0
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= GNU \
GNUPG/gnutls/${PORTNAME}
@@ -14,7 +15,7 @@ LICENSE= LGPL21+ GPLv3
LICENSE_COMB= multi
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= cpe libtool pathfix pkgconfig
+USES= cpe libtool pathfix pkgconfig compiler
USE_CSTD= c99
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
@@ -29,8 +30,15 @@ DOCS= AUTHORS NEWS README.md THANKS doc/TODO \
doc/libtasn1.html doc/libtasn1.pdf doc/libtasn1.ps
INFO= libtasn1
+.include <bsd.port.pre.mk>
+
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252548
+.if ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 100
+CFLAGS:= ${CFLAGS:C/-O[2-9]/-O1/g}
+.endif
+
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>