aboutsummaryrefslogtreecommitdiffstats
path: root/www/nginx
diff options
context:
space:
mode:
authorosa <osa@FreeBSD.org>2011-07-12 23:46:56 +0800
committerosa <osa@FreeBSD.org>2011-07-12 23:46:56 +0800
commit4fa82f8229b0a60a2926a7c8fd52592c4603be2e (patch)
treeff41b3e58a956b0e4b82e362f5f0549500447e19 /www/nginx
parent2a323d6d8dfd58516999e347cbba436085e8c05a (diff)
downloadfreebsd-ports-gnome-4fa82f8229b0a60a2926a7c8fd52592c4603be2e.tar.gz
freebsd-ports-gnome-4fa82f8229b0a60a2926a7c8fd52592c4603be2e.tar.zst
freebsd-ports-gnome-4fa82f8229b0a60a2926a7c8fd52592c4603be2e.zip
Add one more third-party module:
o) ngx_postgres-0.8 - upstream module that allows nginx to communicate directly with PostgreSQL database. Bump PORTREVISION is unnecessary, because these modules are disabled by default.
Diffstat (limited to 'www/nginx')
-rw-r--r--www/nginx/Makefile15
-rw-r--r--www/nginx/distinfo2
-rw-r--r--www/nginx/files/extra-patch-ngx_postgres::config19
3 files changed, 36 insertions, 0 deletions
diff --git a/www/nginx/Makefile b/www/nginx/Makefile
index c788f71fc7e4..3f291827d562 100644
--- a/www/nginx/Makefile
+++ b/www/nginx/Makefile
@@ -73,6 +73,7 @@ OPTIONS= DEBUG "Enable nginx debugging" off \
LUA_MODULE "3rd party lua module" off \
MEMC_MODULE "3rd party memc (memcached) module" off \
PASSENGER_MODULE "3rd party passenger module" off \
+ POSTGRES_MODULE "3rd party postgresql module" off \
REDIS2_MODULE "3rd party redis2 module" off \
SLOWFS_CACHE_MODULE "3rd party slowfs_cache module" off \
SRCACHE_MODULE "3rd party srcache module" off \
@@ -445,6 +446,15 @@ CFLAGS+= -DNDEBUG
.endif
.endif
+.if defined(WITH_POSTGRES_MODULE)
+USE_PGSQL= yes
+NGINX_POSTGRES_MODULE_VERSION= 0.8
+MASTER_SITES+= http://labs.frickle.com/files/:postgres
+DISTFILES+= ngx_postgres-${NGINX_POSTGRES_MODULE_VERSION}.tar.gz:postgres
+CONFIGURE_ARGS+=--add-module=${WRKDIR}/ngx_postgres-${NGINX_POSTGRES_MODULE_VERSION}
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_postgres::config
+.endif
+
.if defined(WITH_REDIS2_MODULE)
NGINX_REDIS2_MODULE_VERSION= 0.07rc5
GIT_REDIS2_MODULE_VERSION= 0-g1e01aca
@@ -566,6 +576,11 @@ post-patch:
@${REINPLACE_CMD} 's!-lpthread!${PTHREAD_LIBS}!g' \
${WRKDIR}/passenger-${PASSENGER_VERSION}/lib/phusion_passenger/platform_info/compiler.rb
.endif
+.if defined(WITH_POSTGRES_MODULE)
+ @${REINPLACE_CMD} \
+ 's!%%PREFIX%%!${PREFIX}!' \
+ ${WRKDIR}/ngx_postgres-${NGINX_POSTGRES_MODULE_VERSION}/config
+.endif
.if defined(WITH_SUPERVISORD_MODULE)
( cd ${WRKDIR}/nginx_upstream_fair-${NGINX_UPSTREAM_FAIR_VERSION} && \
${PATCH} -p0 < \
diff --git a/www/nginx/distinfo b/www/nginx/distinfo
index 614aad2d74e1..345c5dc9df42 100644
--- a/www/nginx/distinfo
+++ b/www/nginx/distinfo
@@ -54,6 +54,8 @@ SHA256 (agentzh-memc-nginx-module-v0.12-0-g4f1952c.tar.gz) = e0f604e20312bbd30ac
SIZE (agentzh-memc-nginx-module-v0.12-0-g4f1952c.tar.gz) = 36414
SHA256 (passenger-3.0.7.tar.gz) = 021972c7f4fecd80042e7fc1d8f19ee3008a5491a3b1d34958b2b7ed42bddc85
SIZE (passenger-3.0.7.tar.gz) = 2830376
+SHA256 (ngx_postgres-0.8.tar.gz) = 321de5ddfe95da45550a2b1d29cfcd425ed7d7d63edb0e086406486675d04283
+SIZE (ngx_postgres-0.8.tar.gz) = 40108
SHA256 (agentzh-redis2-nginx-module-v0.07rc5-0-g1e01aca.tar.gz) = bfd620e32a155ea2178b7c1ce8b9c969476cf1bae119bca5a9d20d3775007335
SIZE (agentzh-redis2-nginx-module-v0.07rc5-0-g1e01aca.tar.gz) = 22317
SHA256 (ngx_slowfs_cache-1.6.tar.gz) = cc0505dbba30153691ff7b3a7353804d5ceb9a519a407b938cae49e9913a7bcc
diff --git a/www/nginx/files/extra-patch-ngx_postgres::config b/www/nginx/files/extra-patch-ngx_postgres::config
new file mode 100644
index 000000000000..1b00e802dcce
--- /dev/null
+++ b/www/nginx/files/extra-patch-ngx_postgres::config
@@ -0,0 +1,19 @@
+--- ../ngx_postgres-0.8/config.orig 2011-07-12 19:06:52.000000000 +0400
++++ ../ngx_postgres-0.8/config 2011-07-12 19:07:42.000000000 +0400
+@@ -29,12 +29,12 @@
+
+ if [ $ngx_found = no ]; then
+ # FreeBSD
+- ngx_feature="libpq library in /usr/local/"
+- ngx_feature_path="/usr/local/include"
++ ngx_feature="libpq library in %%PREFIX%%/"
++ ngx_feature_path="%%PREFIX%%/include"
+ if [ $NGX_RPATH = YES ]; then
+- ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lpq"
++ ngx_feature_libs="-R%%PREFIX%%/lib -L%%PREFIX%%/lib -lpq"
+ else
+- ngx_feature_libs="-L/usr/local/lib -lpq"
++ ngx_feature_libs="-L%%PREFIX%%/lib -lpq"
+ fi
+ . auto/feature
+ fi