diff --git a/security/acme-client/Makefile b/security/acme-client/Makefile index db308e1880aa..d95104f40a75 100644 --- a/security/acme-client/Makefile +++ b/security/acme-client/Makefile @@ -13,7 +13,14 @@ 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_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 MAKEFILE= GNUmakefile MAKE_ENV= PREFIX=${STAGEDIR}/${PREFIX} @@ -46,9 +53,11 @@ post-install: .include -.if empty(SSL_DEFAULT:M*libressl*) +.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 .include diff --git a/security/acme-client/files/extra-patch-GNUmakefile b/security/acme-client/files/extra-patch-GNUmakefile new file mode 100644 index 000000000000..f1e3113c0ea0 --- /dev/null +++ b/security/acme-client/files/extra-patch-GNUmakefile @@ -0,0 +1,11 @@ +--- 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: