diff options
author | tobik <tobik@FreeBSD.org> | 2018-08-02 13:33:16 +0800 |
---|---|---|
committer | tobik <tobik@FreeBSD.org> | 2018-08-02 13:33:16 +0800 |
commit | 8dc5d96db0f4fc2a9c58ad6c8cf60b8abbe3ef03 (patch) | |
tree | e5303da18723fd12c9a3ed05bca5959234a42ff0 /security | |
parent | 0e51ffa756940be3a079f63127341aff9505a53a (diff) | |
download | freebsd-ports-gnome-8dc5d96db0f4fc2a9c58ad6c8cf60b8abbe3ef03.tar.gz freebsd-ports-gnome-8dc5d96db0f4fc2a9c58ad6c8cf60b8abbe3ef03.tar.zst freebsd-ports-gnome-8dc5d96db0f4fc2a9c58ad6c8cf60b8abbe3ef03.zip |
security/acme-client: Fix runtime when SSL_DEFAULT != libressl
- Make sure we link with libthr as well to prevent runtime errors
like "tls_init: No error: 0" [1].
- Adopt the nicer approach for linking with libtls taken by
net/openntpd; it doesn't require patching of build files [2].
- Remove unused patch
PR: 228438
Submitted by: madpilot, tobik [1], leres [2]
Reported by: dch
Approved by: brnrd (maintainer timeout, 2 weeks)
Diffstat (limited to 'security')
-rw-r--r-- | security/acme-client/Makefile | 27 | ||||
-rw-r--r-- | security/acme-client/files/extra-patch-GNUmakefile | 11 |
2 files changed, 15 insertions, 23 deletions
diff --git a/security/acme-client/Makefile b/security/acme-client/Makefile index 3f85a44bac30..8cca3aad0c45 100644 --- a/security/acme-client/Makefile +++ b/security/acme-client/Makefile @@ -3,7 +3,7 @@ PORTNAME= acme-client PORTVERSION= 0.1.16 -PORTREVISION= 3 +PORTREVISION= 4 DISTVERSIONPREFIX= portable- CATEGORIES= security MASTER_SITES= https://kristaps.bsd.lv/${PORTNAME}/snapshots/ \ @@ -56,17 +56,20 @@ post-install: .include <bsd.port.pre.mk> -.if ! ${SSL_DEFAULT:Mlibressl*} -. ifnmake describe -STAGEDIR_libressl!= ${MAKE} -V STAGEDIR -C ${PORTSDIR}/security/libressl -. endif -BUILD_DEPENDS+= ${NONEXISTENT}:security/libressl:stage -CPPFLAGS+= -I${STAGEDIR_libressl}${LOCALBASE}/include -LDFLAGS+= ${STAGEDIR_libressl}${LOCALBASE}/lib/libtls.a \ - ${STAGEDIR_libressl}${LOCALBASE}/lib/libssl.a \ - ${STAGEDIR_libressl}${LOCALBASE}/lib/libcrypto.a -post-configure: - ${REINPLACE_CMD} 's/-l[a-z]*//g' ${WRKSRC}/GNUmakefile +# Requires libtls from LibreSSL +.if ${SSL_DEFAULT:Mlibressl*} +CPPFLAGS+= -I${OPENSSLINC} +LDFLAGS+= -L${OPENSSLLIB} +.else # SSL_DEFAULT +BUILD_DEPENDS+= ${NONEXISTENT}:security/libressl:stage +CPPFLAGS+= -I${WRKDIR}/libressl/include +LDFLAGS+= -lpthread -L${WRKDIR}/libressl/lib + +# Don't use COPYTREE_SHARE here as it hard links files, and the original files +# are owned by root, which creates problems of its own. +pre-configure: + @cd `${MAKE} -V STAGEDIR -C ${PORTSDIR}/security/libressl`${PREFIX} \ + && ${FIND} -E . ! -name *.so\* | ${CPIO} -dump ${WRKDIR}/libressl >/dev/null 2>&1 .endif # SSL_DEFAULT .include <bsd.port.post.mk> diff --git a/security/acme-client/files/extra-patch-GNUmakefile b/security/acme-client/files/extra-patch-GNUmakefile deleted file mode 100644 index f1e3113c0ea0..000000000000 --- a/security/acme-client/files/extra-patch-GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ ---- GNUmakefile.orig 2016-09-01 05:48:04 UTC -+++ GNUmakefile -@@ -71,7 +71,7 @@ endif - all: acme-client - - acme-client: $(OBJS) -- $(CC) -o $@ $(OBJS) $(LDFLAGS) -ltls -lssl -lcrypto $(LIBBSD) -+ $(CC) -o $@ $(OBJS) $(LDFLAGS) ${PREFIX}/lib/libtls.a ${PREFIX}/lib/libssl.a ${PREFIX}/lib/libcrypto.a $(LIBBSD) - - # This is for synchronising from -portable to the master. - rmerge: |