aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-09-08 22:13:01 +0800
committermat <mat@FreeBSD.org>2016-09-08 22:13:01 +0800
commit494be048e90cf9e310b5d342d1c60eb0ebc30211 (patch)
treec60b4c927f9b8046b70541431e7c026103a9c561 /Mk
parent1c4f9b4ac496cf89456d465f0d4af48813c40dbb (diff)
downloadfreebsd-ports-gnome-494be048e90cf9e310b5d342d1c60eb0ebc30211.tar.gz
freebsd-ports-gnome-494be048e90cf9e310b5d342d1c60eb0ebc30211.tar.zst
freebsd-ports-gnome-494be048e90cf9e310b5d342d1c60eb0ebc30211.zip
Allow adding only a build or run-time dependency on USES=ssl.
PR: 202175 Reported by: barnerd Sponsored by: Absolight
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/ssl.mk19
1 files changed, 16 insertions, 3 deletions
diff --git a/Mk/Uses/ssl.mk b/Mk/Uses/ssl.mk
index cad798ec409c..24005d0086e2 100644
--- a/Mk/Uses/ssl.mk
+++ b/Mk/Uses/ssl.mk
@@ -4,7 +4,7 @@
#
# Feature: SSL_DEFAULT
# Usage: USES=ssl
-# Valid ARGS: none
+# Valid ARGS: none (build and run), build, run
#
# The user can choose which ssl library he wants with:
#
@@ -28,8 +28,17 @@
.if !defined(_INCLUDE_USES_SSL_MK)
_INCLUDE_USES_SSL_MK= yes
-.if !empty(ssl_ARGS)
-IGNORE= "USES=ssl does not take any argument."
+.if !empty(ssl_ARGS:Nbuild:Nrun)
+IGNORE= "USES=ssl invalid arguments ${ssl_ARGS}."
+.endif
+
+.if empty(ssl_ARGS) || (!empty(ssl_ARGS:Mbuild) && !empty(ssl_ARGS:Mrun))
+_SSL_BUILD_DEP= 1
+_SSL_RUN_DEP= 1
+.elif !empty(ssl_ARGS:Mbuild)
+_SSL_BUILD_DEP= 1
+.elif !empty(ssl_ARGS:Mrun)
+_SSL_RUN_DEP= 1
.endif
.if ${SSL_DEFAULT} == base
@@ -87,8 +96,12 @@ OPENSSL_PORT= security/${SSL_DEFAULT}
. endif
OPENSSLDIR?= ${OPENSSLBASE}/openssl
+.if defined(_SSL_BUILD_DEP)
BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${OPENSSL_PORT}
+.endif
+.if defined(_SSL_RUN_DEP)
RUN_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${OPENSSL_PORT}
+.endif
OPENSSLRPATH= ${LOCALBASE}/lib
.endif