aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2023-06-20 13:35:24 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2023-06-20 13:35:24 +0000
commitcb186b7240bf1781ee7fb72052c8fc5c95d85a99 (patch)
treef46760fd3822123f4772d7422bc299bc418bb9f4
parent07214be4a906e4a0f3e15a907b9ec24b2ec4fe62 (diff)
downloadports-cb186b7240bf1781ee7fb72052c8fc5c95d85a99.tar.gz
ports-cb186b7240bf1781ee7fb72052c8fc5c95d85a99.zip
net/glib-networking: make GnuTLS and libproxy support optional
- The OpenSSL backend is provided for systems where licensing considerations prohibit use of certain GnuTLS' dependencies - The environment variable proxy backend is intended for use when building without libproxy support - Drop long unused dependency on `security/p11-kit' which was there for `gnutls-pkcs11' backend added in version 2.31.2, disabled (deprecated) in version 2.57.2, and finally removed in 2.59.1 (November 11, 2018) due to lack of any feedback whatsoever regarding its disablement
-rw-r--r--net/glib-networking/Makefile17
-rw-r--r--net/glib-networking/pkg-plist10
2 files changed, 20 insertions, 7 deletions
diff --git a/net/glib-networking/Makefile b/net/glib-networking/Makefile
index 4ca1e5e629b0..6134796e7c2d 100644
--- a/net/glib-networking/Makefile
+++ b/net/glib-networking/Makefile
@@ -11,9 +11,6 @@ LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas
-LIB_DEPENDS= libgnutls.so:security/gnutls \
- libp11-kit.so:security/p11-kit \
- libproxy.so:net/libproxy
RUN_DEPENDS= gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas
PORTSCOUT= limitw:1,even
@@ -24,8 +21,22 @@ USE_GNOME= glib20
BINARY_ALIAS= python3=${PYTHON_VERSION}
+OPTIONS_DEFINE= GNUTLS PROXY
+PROXY_DESC= Proxy configuration support via libproxy
+OPTIONS_SUB= yes
+OPTIONS_DEFAULT= GNUTLS PROXY
+
+GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
+GNUTLS_USES_OFF= ssl
+GNUTLS_CONFIGURE_OFF= -Dgnutls=disabled -Dopenssl=enabled
+
+PROXY_LIB_DEPENDS= libproxy.so:net/libproxy
+PROXY_CONFIGURE_OFF= -Dlibproxy=disabled -Denvironment_proxy=enabled
+
post-install:
${RM} -r ${STAGEDIR}${PREFIX}/lib/systemd
${RM} -r ${STAGEDIR}${PREFIX}/share/installed-tests
.include <bsd.port.mk>
+
+GNUTLS_DESC+= (OpenSSL if off)
diff --git a/net/glib-networking/pkg-plist b/net/glib-networking/pkg-plist
index e723505062a2..59b62cb43cd5 100644
--- a/net/glib-networking/pkg-plist
+++ b/net/glib-networking/pkg-plist
@@ -1,8 +1,10 @@
+%%NO_PROXY%%lib/gio/modules/libgioenvironmentproxy.so
lib/gio/modules/libgiognomeproxy.so
-lib/gio/modules/libgiognutls.so
-lib/gio/modules/libgiolibproxy.so
-libexec/glib-pacrunner
-share/dbus-1/services/org.gtk.GLib.PACRunner.service
+%%GNUTLS%%lib/gio/modules/libgiognutls.so
+%%PROXY%%lib/gio/modules/libgiolibproxy.so
+%%NO_GNUTLS%%lib/gio/modules/libgioopenssl.so
+%%PROXY%%libexec/glib-pacrunner
+%%PROXY%%share/dbus-1/services/org.gtk.GLib.PACRunner.service
share/locale/ab/LC_MESSAGES/glib-networking.mo
share/locale/an/LC_MESSAGES/glib-networking.mo
share/locale/ar/LC_MESSAGES/glib-networking.mo