Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2016 15:14:17 +0000 (UTC)
From:      Dmitry Sivachenko <demon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r416156 - in head/www/uwsgi: . files
Message-ID:  <201605301514.u4UFEHsv032576@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: demon
Date: Mon May 30 15:14:17 2016
New Revision: 416156
URL: https://svnweb.freebsd.org/changeset/ports/416156

Log:
  Add OPTIONal support for json, xml and pcre plugins.

Modified:
  head/www/uwsgi/Makefile
  head/www/uwsgi/files/patch-buildconf-base.ini

Modified: head/www/uwsgi/Makefile
==============================================================================
--- head/www/uwsgi/Makefile	Mon May 30 14:58:21 2016	(r416155)
+++ head/www/uwsgi/Makefile	Mon May 30 15:14:17 2016	(r416156)
@@ -3,6 +3,7 @@
 
 PORTNAME=	uwsgi
 PORTVERSION=	2.0.13
+PORTREVISION=	1
 CATEGORIES=	www python
 MASTER_SITES=	http://projects.unbit.it/downloads/
 
@@ -16,11 +17,34 @@ USES=		python
 USE_PYTHON=	distutils
 USE_RC_SUBR=	uwsgi
 
-OPTIONS_DEFINE=	DEBUG
+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=	libexpat.so:textproc/expat2
+
+.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=		expat
+CFLAGS+=	"-I${LOCALBASE}/include"
+.else
+O_XML=		false
+.endif
 
-LDFLAGS+=	"-L${LOCALBASE}/lib"
 MAKE_ENV+=	CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_EMBED_PLUGINS=cgi
 
 PYSETUP=			uwsgiconfig.py
@@ -30,6 +54,9 @@ PYDISTUTILS_BUILDARGS=		--verbose
 PLIST_FILES=	bin/uwsgi \
 		%%PYTHON_SITELIBDIR%%/uwsgidecorators.py
 
+post-patch:
+	${REINPLACE_CMD} -e s#@JSON@#${O_JSON}# -e s#@XML@#${O_XML}# -e s#@PCRE@#${O_PCRE}# ${WRKSRC}/buildconf/base.ini
+
 do-configure:
 	@${DO_NADA}
 

Modified: head/www/uwsgi/files/patch-buildconf-base.ini
==============================================================================
--- head/www/uwsgi/files/patch-buildconf-base.ini	Mon May 30 14:58:21 2016	(r416155)
+++ head/www/uwsgi/files/patch-buildconf-base.ini	Mon May 30 15:14:17 2016	(r416156)
@@ -3,14 +3,13 @@
 @@ -1,9 +1,9 @@
  [uwsgi]
 -xml = auto
-+xml = false
++xml = @XML@
  yaml = true
 -json = auto
--ssl = auto
++json = @JSON@
+ ssl = auto
 -pcre = auto
-+json = false
-+ssl = false
-+pcre = false
++pcre = @PCRE@
  routing = auto
  debug = false
  unbit = false



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605301514.u4UFEHsv032576>