Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2016 04:09:50 +0000 (UTC)
From:      "Sergey A. Osokin" <osa@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r408844 - in head: . www/nginx-devel
Message-ID:  <201602140409.u1E49or5086302@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: osa
Date: Sun Feb 14 04:09:50 2016
New Revision: 408844
URL: https://svnweb.freebsd.org/changeset/ports/408844

Log:
  Enable dynamic modules support.
  Bump PORTREVISION.
  
  In case of usage following modules please update nginx configuration file
  for load these modules:
  
   load_module "modules/ngx_http_geoip_module.so";
   load_module "modules/ngx_http_image_filter_module.so";
   load_module "modules/ngx_http_xslt_filter_module.so";
   load_module "modules/ngx_mail_module.so";
   load_module "modules/ngx_stream_module.so";
  
  See https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ for details.

Modified:
  head/UPDATING
  head/www/nginx-devel/Makefile

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Sun Feb 14 03:38:45 2016	(r408843)
+++ head/UPDATING	Sun Feb 14 04:09:50 2016	(r408844)
@@ -5,6 +5,21 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20160213:
+  AFFECTS: users of www/nginx-devel
+  AUTHOR: osa@FreeBSD.org
+
+  Dynamic modules support has been enabled.  In case of usage following
+  modules please update nginx configuration file for load these modules:
+
+  load_module "modules/ngx_http_geoip_module.so";
+  load_module "modules/ngx_http_image_filter_module.so";
+  load_module "modules/ngx_http_xslt_filter_module.so";
+  load_module "modules/ngx_mail_module.so";
+  load_module "modules/ngx_stream_module.so";
+
+  See https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ for details.
+
 20160127:
   AFFECTS: users of net-im/uTox
   AUTHOR: amdmi3@FreeBSD.org

Modified: head/www/nginx-devel/Makefile
==============================================================================
--- head/www/nginx-devel/Makefile	Sun Feb 14 03:38:45 2016	(r408843)
+++ head/www/nginx-devel/Makefile	Sun Feb 14 04:09:50 2016	(r408844)
@@ -3,6 +3,7 @@
 
 PORTNAME=	nginx
 PORTVERSION=	1.9.11
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	http://nginx.org/download/
 MASTER_SITES+=	LOCAL/osa
@@ -245,10 +246,12 @@ SUB_LIST+=	WWWOWN=${WWWOWN} \
 		NGINX_TMPDIR=${NGINX_TMPDIR}
 
 HAS_CONFIGURE=	yes
+MODULESDIR=	${ETCDIR}/modules
 CONFIGURE_ARGS+=--prefix=${ETCDIR} \
 		--with-cc-opt="-I ${LOCALBASE}/include" \
 		--with-ld-opt="-L ${LOCALBASE}/lib" \
 		--conf-path=${ETCDIR}/nginx.conf \
+		--modules-path=${MODULESDIR} \
 		--sbin-path=${PREFIX}/sbin/nginx \
 		--pid-path=${NGINX_RUNDIR}/nginx.pid \
 		--error-log-path=${NGINX_ERRORLOG} \
@@ -454,7 +457,7 @@ CONFIGURE_ARGS+=--with-http_flv_module
 .endif
 
 .if ${PORT_OPTIONS:MHTTP_GEOIP}
-CONFIGURE_ARGS+=--with-http_geoip_module
+CONFIGURE_ARGS+=--with-http_geoip_module=dynamic
 LIB_DEPENDS+=	libGeoIP.so:${PORTSDIR}/net/GeoIP
 .endif
 
@@ -468,7 +471,7 @@ CONFIGURE_ARGS+=--with-http_gunzip_modul
 
 .if ${PORT_OPTIONS:MHTTP_IMAGE_FILTER}
 LIB_DEPENDS+=	libgd.so:${PORTSDIR}/graphics/gd
-CONFIGURE_ARGS+=--with-http_image_filter_module
+CONFIGURE_ARGS+=--with-http_image_filter_module=dynamic
 .endif
 
 .if ${PORT_OPTIONS:MHTTP_MP4}
@@ -612,7 +615,7 @@ CONFIGURE_ARGS+=--add-module=${WRKDIR}/n
 
 .if ${PORT_OPTIONS:MHTTP_XSLT}
 USE_GNOME+=	libxml2 libxslt
-CONFIGURE_ARGS+=--with-http_xslt_module
+CONFIGURE_ARGS+=--with-http_xslt_module=dynamic
 .endif
 
 .if ${PORT_OPTIONS:MHTTP_ZIP}
@@ -878,7 +881,7 @@ CONFIGURE_ARGS+=--add-module=${WRKSRC_nj
 .endif
 
 .if ${PORT_OPTIONS:MSTREAM}
-CONFIGURE_ARGS+=--with-stream
+CONFIGURE_ARGS+=--with-stream=dynamic
 .if ${PORT_OPTIONS:MSTREAM_SSL}
 NGINX_OPENSSL=	yes
 USE_HTTP_SSL=	yes
@@ -902,7 +905,7 @@ PLIST_SUB+=	WWWDATA="@comment "
 .endif		# WITH_HTTP
 
 .if ${PORT_OPTIONS:MMAIL}
-CONFIGURE_ARGS+=--with-mail
+CONFIGURE_ARGS+=--with-mail=dynamic
 .if empty(PORT_OPTIONS:MMAIL_IMAP)
 CONFIGURE_ARGS+=--without-mail_imap_module
 .endif
@@ -1096,6 +1099,7 @@ do-build:
 
 do-install:
 	${MKDIR} ${STAGEDIR}${ETCDIR}
+	${MKDIR} ${STAGEDIR}${MODULESDIR}
 	${MKDIR} ${STAGEDIR}${NGINX_TMPDIR}
 	${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${STAGEDIR}${PREFIX}/sbin
 .for i in koi-utf koi-win win-utf
@@ -1120,6 +1124,10 @@ do-install:
 		${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/
 .endif
 
+# Install dynamic modules
+	(cd ${WRKSRC}/objs/ && ${FIND} . -name '*.so' -maxdepth 1 -type f \
+		-exec ${INSTALL_PROGRAM} "{}" ${STAGEDIR}${MODULESDIR} \;)
+
 .if ${PORT_OPTIONS:MNAXSI}
 	${INSTALL_DATA} \
 	${WRKDIR}/naxsi-${NGINX_NAXSI_VERSION}/naxsi_config/naxsi_core.rules \
@@ -1137,4 +1145,8 @@ post-install:
 	${ECHO_CMD} etc/nginx/naxsi_core.rules >> ${TMPPLIST}
 .endif
 
+# Add dynamic modules to the plist
+	(cd ${STAGEDIR}${PREFIX} && ${FIND} ${MODULESDIR:S|${PREFIX}/||} \
+		! -type d >> ${TMPPLIST})
+
 .include <bsd.port.mk>



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