summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/acme-client/Makefile36
-rw-r--r--security/acme-client/files/extra-patch-GNUmakefile11
2 files changed, 21 insertions, 26 deletions
diff --git a/security/acme-client/Makefile b/security/acme-client/Makefile
index 555c496dc43a..d67bb6307466 100644
--- a/security/acme-client/Makefile
+++ b/security/acme-client/Makefile
@@ -3,7 +3,7 @@
PORTNAME= acme-client
PORTVERSION= 0.1.11
-PORTREVISION= 1
+PORTREVISION= 2
DISTVERSIONPREFIX= portable-
CATEGORIES= security
MASTER_SITES= https://kristaps.bsd.lv/${PORTNAME}/snapshots/ \
@@ -14,14 +14,7 @@ COMMENT= Native C client for Let's Encrypt, designed for security
LICENSE= ISCL
-USES= gmake tar:tgz
-
-OPTIONS_DEFINE= STATIC_ACMECLIENT
-STATIC_ACMECLIENT_DESC= Link statically with security/libressl
-
-STATIC_ACMECLIENT_USES_OFF= ssl
-STATIC_ACMECLIENT_BUILD_DEPENDS= ${LOCALBASE}/lib/libtls.a:security/libressl
-STATIC_ACMECLIENT_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-GNUmakefile
+USES= gmake ssl tar:tgz
MAKEFILE= GNUmakefile
MAKE_ENV= PREFIX=${STAGEDIR}/${PREFIX}
@@ -54,11 +47,24 @@ post-install:
.include <bsd.port.pre.mk>
-.if ${PORT_OPTIONS:MSTATIC_ACMECLIENT} == "" && empty(SSL_DEFAULT:M*libressl*)
-IGNORE= needs LibreSSL to build. set DEFAULT_VERSIONS+=ssl=libressl \
- and rebuild all ports that depend on openssl
-.else
-WARNING= "Remember to deinstall libressl after building acme-client"
-.endif
+.if ! ${SSL_DEFAULT:Mlibressl*}
+BUILD_DEPENDS+= ${NONEXISTENT}:security/libressl:stage
+CPPFLAGS+= -I${WRKDIR}/libressl/include
+LDFLAGS+= -L${WRKDIR}/libressl/lib
+. ifnmake describe
+STAGEDIR_libressl!= ${MAKE} -V STAGEDIR -C ${PORTSDIR}/security/libressl
+. endif
+# security/libressl ignores implicit SSP_UNSAFE, see Mk/bsd.ssp.mk
+. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000036 && ${ARCH} == i386
+SSP_CFLAGS?= -fstack-protector
+CFLAGS+= ${SSP_CFLAGS}
+LDFLAGS+= -fstack-protector
+LIBS+= -lssp_nonshared
+. endif
+
+pre-configure:
+ @(cd ${STAGEDIR_libressl}${LOCALBASE} && ${COPYTREE_SHARE} \
+ . ${WRKDIR}/libressl "! -name *.so*")
+.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: