1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

security/acme-client: Add STATIC option

- Allow static linking
  - Forego SSL runtime dependency
  - Add warning about deinstall libressl after build
  - Add extra patch for static option

PR:		212980
Submitted by:	Christian Schwarz <me@cschwarz.com>
This commit is contained in:
Bernard Spil 2016-10-08 15:15:31 +00:00
parent 9137b52fda
commit 7f39696c97
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=423513
2 changed files with 22 additions and 2 deletions
security/acme-client

View File

@ -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 <bsd.port.pre.mk>
.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 <bsd.port.post.mk>

View File

@ -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: