Enable third-party passenger module as dynamic.

Patch obtained from:	https://github.com/phusion/passenger/pull/1764
This commit is contained in:
Sergey A. Osokin 2016-03-04 22:37:57 +00:00
parent e2018f9f28
commit a92d4a8040
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=410152
2 changed files with 16 additions and 2 deletions

View file

@ -740,8 +740,9 @@ CONFIGURE_ARGS+=--without-http_rewrite_module \
PASSENGER_VERSION= 5.0.26
MASTER_SITES+= http://s3.amazonaws.com/phusion-passenger/releases/:passenger
DISTFILES+= passenger-${PASSENGER_VERSION}.tar.gz:passenger
CONFIGURE_ARGS+=--add-module=${WRKDIR}/passenger-${PASSENGER_VERSION}/src/nginx_module
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-passenger-build-nginx.rb
CONFIGURE_ARGS+=--add-dynamic-module=${WRKDIR}/passenger-${PASSENGER_VERSION}/src/nginx_module
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-passenger-build-nginx.rb \
${PATCHDIR}/extra-patch-passenger-src-nginx_module-config
.if empty(PORT_OPTIONS:MDEBUG)
CONFIGURE_ENV+= OPTIMIZE="yes"
CFLAGS+= -DNDEBUG

View file

@ -0,0 +1,13 @@
--- ../passenger-5.0.26/src/nginx_module/config.orig 2016-03-04 17:28:49.527086000 -0500
+++ ../passenger-5.0.26/src/nginx_module/config 2016-03-04 17:29:16.364138000 -0500
@@ -20,6 +20,10 @@
if ! cd $ngx_addon_dir; then
exit 1
fi
+ if [ "$ngx_module_link" = DYNAMIC ]; then
+ EXTRA_CXXFLAGS="-fPIC"
+ export EXTRA_CXXFLAGS
+ fi
if test "x$TRACE" = 1; then
if ! rake --trace nginx CACHING=false; then
exit 1