changeset 58:b6d585d04d10

Allow selection of YAML support modes: none, built-in minimal or external with libyaml. Implemented by defining a new radio option group YAML: either one or none can be selected.
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 10 Mar 2019 10:58:41 +0100
parents 2cf7dd2ef8fb
children 6425c78ad98e
files uwsginl/Makefile
diffstat 1 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/uwsginl/Makefile	Sun Mar 10 05:12:12 2019 +0100
+++ b/uwsginl/Makefile	Sun Mar 10 10:58:41 2019 +0100
@@ -28,15 +28,18 @@
 PLIST_SUB=	PORTNAME=${PORTNAME} PLUGIN_DIR=${PLUGIN_DIR}
 
 OPTIONS_DEFINE=		DEBUGSYM UWSGIDEBUG JSON PCRE XML SSL
-OPTIONS_DEFAULT=	SSL
+OPTIONS_DEFAULT=	SSL BUILTINYAML
+
+OPTIONS_RADIO=		YAML
+OPTIONS_RADIO_YAML=	BUILTINYAML LIBYAML
 
 DEBUGSYM_DESC=		Build with debug symbols
-UWSGIDEBUG_DESC=	Enable uwsgi debugging (def UWSGI_DEBUG, implies DEBUG)
-
 DEBUGSYM_VARS=		EXTRA_BUILDARGS+=--debug
 
+UWSGIDEBUG_DESC=	Enable uwsgi debugging (def UWSGI_DEBUG, implies DEBUG)
 UWSGIDEBUG_VARS=	BUILDCONF_DEBUG=true
 
+JSON_DESC=		JSON file/format/parser support (with libjansson)
 JSON_VARS=		BUILDCONF_JSON=jansson
 JSON_LIB_DEPENDS=	libjansson.so:devel/jansson
 
@@ -51,11 +54,22 @@
 SSL_CFLAGS=		-I${OPENSSLINC}
 SSL_LDFLAGS=		${OPENSSL_LDFLAGS}
 
+YAML_DESC=		Select YAML support (or none)
+
+BUILTINYAML_DESC=	Enable built-in basic YAML support
+BUILTINYAML_VARS=	BUILDCONF_YAML=true
+
+LIBYAML_DESC=		Use external libyaml for proper YAML support
+LIBYAML_VARS=		BUILDCONF_YAML=libyaml
+LIBYAML_CFLAGS=		-I${LOCALBASE}/include
+LIBYAML_LDFLAGS=	-L${LOCALBASE}/lib
+LIBYAML_LIB_DEPENDS=	libyaml.so:textproc/libyaml
+
 .include <bsd.port.options.mk>
 
 PLUGIN_DIR=	lib/${PORTNAME}/plugins
 
-.for bcvar in DEBUG JSON PCRE XML SSL
+.for bcvar in DEBUG YAML JSON PCRE XML SSL
 EXTRA_PROFILE_OVERRIDE+=	${bcvar:tl}=${BUILDCONF_${bcvar}:Ufalse}
 .endfor