aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2017-04-14 00:53:16 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2017-04-14 00:53:16 +0800
commit28a2a660037802fb22ba13e553656ed11644b38e (patch)
treeb0331a043aeafc5218d2970d1d3033f13787a808
parent21288ddf901e33a87dcd37e24a9872a79d1fb534 (diff)
downloadfreebsd-ports-gnome-28a2a660037802fb22ba13e553656ed11644b38e.tar.gz
freebsd-ports-gnome-28a2a660037802fb22ba13e553656ed11644b38e.tar.zst
freebsd-ports-gnome-28a2a660037802fb22ba13e553656ed11644b38e.zip
- Simplify substitution of options in build config
- Switch to options helpers - Add missing pkgconfig dependency, fix build with JSON - Cosmetic fixes
-rw-r--r--www/uwsgi/Makefile58
-rw-r--r--www/uwsgi/files/patch-buildconf-base.ini15
2 files changed, 25 insertions, 48 deletions
diff --git a/www/uwsgi/Makefile b/www/uwsgi/Makefile
index 377c2373b21d..bb1aedeb4e5d 100644
--- a/www/uwsgi/Makefile
+++ b/www/uwsgi/Makefile
@@ -13,40 +13,10 @@ COMMENT= Developer-friendly WSGI server which uses uwsgi protocol
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= python ssl
+USES= pkgconfig python ssl
USE_PYTHON= distutils
USE_RC_SUBR= uwsgi
-USERS= uwsgi
-GROUPS= uwsgi
-
-OPTIONS_DEFINE= DEBUG JSON PCRE XML
-
-DEBUG_VARS= PYDISTUTILS_BUILDARGS+=--debug
-JSON_LIB_DEPENDS= libjansson.so:devel/jansson
-PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
-XML_LIB_DEPENDS= libxml2.so:textproc/libxml2
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MJSON}
-O_JSON= jansson
-.else
-O_JSON= false
-.endif
-
-.if ${PORT_OPTIONS:MPCRE}
-O_PCRE= true
-.else
-O_PCRE= false
-.endif
-
-.if ${PORT_OPTIONS:MXML}
-O_XML= libxml2
-.else
-O_XML= false
-.endif
-
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= ${OPENSSL_LDFLAGS}
MAKE_ENV+= CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_EMBED_PLUGINS=cgi
@@ -55,18 +25,40 @@ PYSETUP= uwsgiconfig.py
PYDISTUTILS_BUILD_TARGET= --build
PYDISTUTILS_BUILDARGS= --verbose
+USERS= uwsgi
+GROUPS= uwsgi
+
PLIST_FILES= bin/uwsgi \
%%PYTHON_SITELIBDIR%%/uwsgidecorators.py
+OPTIONS_DEFINE= DEBUG JSON PCRE XML
+
+DEBUG_VARS= PYDISTUTILS_BUILDARGS+=--debug
+
+JSON_VARS= BUILDCONF_JSON=jansson
+JSON_LIB_DEPENDS= libjansson.so:devel/jansson
+
+PCRE_VARS= BUILDCONF_PCRE=true
+PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
+
+XML_VARS= BUILDCONF_XML=libxml2
+XML_LIB_DEPENDS= libxml2.so:textproc/libxml2
+
+LIB_DEPENDS+= libjansson.so:devel/jansson libpcre.so:devel/pcre libxml2.so:textproc/libxml2
+
+.include <bsd.port.options.mk>
+
post-patch:
- ${REINPLACE_CMD} -e s#@JSON@#${O_JSON}# -e s#@XML@#${O_XML}# -e s#@PCRE@#${O_PCRE}# ${WRKSRC}/buildconf/base.ini
+.for var in JSON PCRE XML
+ @${REINPLACE_CMD} -e '/^${var:tl} =/ s|= .*|= ${BUILDCONF_${var}:Ufalse}|' ${WRKSRC}/buildconf/base.ini
+.endfor
do-configure:
@${DO_NADA}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
- ${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+ @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
${INSTALL_DATA} ${WRKSRC}/uwsgidecorators.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
.include <bsd.port.mk>
diff --git a/www/uwsgi/files/patch-buildconf-base.ini b/www/uwsgi/files/patch-buildconf-base.ini
deleted file mode 100644
index 758da76411ce..000000000000
--- a/www/uwsgi/files/patch-buildconf-base.ini
+++ /dev/null
@@ -1,15 +0,0 @@
---- buildconf/base.ini.orig 2015-10-07 04:34:01 UTC
-+++ buildconf/base.ini
-@@ -1,9 +1,9 @@
- [uwsgi]
--xml = auto
-+xml = @XML@
- yaml = true
--json = auto
-+json = @JSON@
- ssl = auto
--pcre = auto
-+pcre = @PCRE@
- routing = auto
- debug = false
- unbit = false