commit 906c8fef0efcd54bfcbdde83e03ce7e37778b9a6 Author: Christian Schwarz Date: Sat Sep 24 23:53:55 2016 +0200 security/acme-client: Optional static linking of LibreSSL diff --git a/security/acme-client/Makefile b/security/acme-client/Makefile index db308e1..7ae5790 100644 --- a/security/acme-client/Makefile +++ b/security/acme-client/Makefile @@ -13,7 +13,18 @@ COMMENT= Native C client for Let's Encrypt, designed for security LICENSE= ISCL -USES= gmake ssl tar:tgz + +USES= gmake tar:tgz + +OPTIONS_DEFINE= STATIC_SSL + +STATIC_SSL_DESC= Link statically with security/libressl +STATIC_SSL_USES_OFF= ssl + +STATIC_SSL_BUILD_DEPENDS= ${LOCALBASE}/lib/libtls.a:security/libressl \ + ${LOCALBASE}/lib/libssl.a:security/libressl \ + ${LOCALBASE}/lib/libcrypto.a:security/libressl +STATIC_SSL_EXTRA_PATCHES= ${PATCHDIR}/extra-GNUmakefile MAKEFILE= GNUmakefile MAKE_ENV= PREFIX=${STAGEDIR}/${PREFIX} @@ -47,6 +58,10 @@ post-install: .include .if empty(SSL_DEFAULT:M*libressl*) +OPTIONS_DEFAULT+= STATIC_SSL +.endif + +.if !${PORT_OPTIONS:MSTATIC_SSL} && empty(SSL_DEFAULT:M*libressl*) IGNORE= needs LibreSSL to build. set DEFAULT_VERSIONS+=ssl=libressl \ and rebuild all ports that depend on openssl .endif diff --git a/security/acme-client/files/extra-GNUmakefile b/security/acme-client/files/extra-GNUmakefile new file mode 100644 index 0000000..da3ac19 --- /dev/null +++ b/security/acme-client/files/extra-GNUmakefile @@ -0,0 +1,11 @@ +--- GNUmakefile.orig 2016-09-24 21:09:24 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) /usr/local/lib/libtls.a /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a $(LIBBSD) + + # This is for synchronising from -portable to the master. + rmerge: