aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoneum <joneum@FreeBSD.org>2018-12-15 20:45:51 +0800
committerjoneum <joneum@FreeBSD.org>2018-12-15 20:45:51 +0800
commitb4354229353aaa2d7dd9c0c9cc6a73473e5fafa8 (patch)
tree176368ea27618e56fca4669800b26c7cc83e0be7
parent9ac04f3e6f405f4701383ef8b4daa3dd19e3e1c4 (diff)
downloadfreebsd-ports-gnome-b4354229353aaa2d7dd9c0c9cc6a73473e5fafa8.tar.gz
freebsd-ports-gnome-b4354229353aaa2d7dd9c0c9cc6a73473e5fafa8.tar.zst
freebsd-ports-gnome-b4354229353aaa2d7dd9c0c9cc6a73473e5fafa8.zip
www/nginx: Add 3rd Party Module VOD
VOD is a NGINX-based MP4 Repackager Module Sponsored by: Netzkommune GmbH
-rw-r--r--www/nginx/Makefile7
-rw-r--r--www/nginx/Makefile.extmod6
-rw-r--r--www/nginx/Makefile.options.desc1
-rw-r--r--www/nginx/distinfo4
-rw-r--r--www/nginx/files/extra-patch-nginx-vod-module-config17
-rw-r--r--www/nginx/files/extra-patch-vod-filters-audio_encoder.c20
-rw-r--r--www/nginx/pkg-plist1
7 files changed, 54 insertions, 2 deletions
diff --git a/www/nginx/Makefile b/www/nginx/Makefile
index 96d9e4a1cc28..48037ee2ecb3 100644
--- a/www/nginx/Makefile
+++ b/www/nginx/Makefile
@@ -85,7 +85,7 @@ OPTIONS_GROUP_HTTPGRP+= AJP AWS_AUTH BROTLI CACHE_PURGE CLOJURE CT DEVEL_KIT \
HTTP_UPSTREAM_CHECK HTTP_UPSTREAM_FAIR HTTP_UPSTREAM_STICKY \
HTTP_VIDEO_THUMBEXTRACTOR HTTP_ZIP ICONV LET LUA MEMC MODSECURITY \
MODSECURITY3 NAXSI NJS PASSENGER POSTGRES RDS_CSV RDS_JSON REDIS2 RTMP \
- SET_MISC SFLOW SHIBBOLETH SLOWFS_CACHE SMALL_LIGHT SRCACHE VTS XSS
+ SET_MISC SFLOW SHIBBOLETH SLOWFS_CACHE SMALL_LIGHT SRCACHE VOD VTS XSS
OPTIONS_GROUP_MAILGRP= MAIL MAIL_IMAP MAIL_POP3 MAIL_SMTP MAIL_SSL
OPTIONS_DEFINE= DEBUG DEBUGLOG DSO FILE_AIO IPV6 THREADS WWW
OPTIONS_DEFAULT?= DSO FILE_AIO HTTP HTTP_ADDITION HTTP_AUTH_REQ HTTP_CACHE \
@@ -305,6 +305,11 @@ post-patch-SFLOW-on:
's!%%PREFIX%%!${LOCALBASE}!g' \
${WRKSRC_sflow}/ngx_http_sflow_config.h
+post-patch-VOD-on:
+ @${REINPLACE_CMD} \
+ 's!%%PREFIX%%!${LOCALBASE}!g' \
+ ${WRKSRC_vod}/config
+
pre-configure-MODSECURITY-on:
( cd ${WRKSRC_MODSECURITY} && \
CC="${CC}" ${CONFIGURE_CMD} --enable-standalone-module \
diff --git a/www/nginx/Makefile.extmod b/www/nginx/Makefile.extmod
index d511ec9f9391..f39378c49fbf 100644
--- a/www/nginx/Makefile.extmod
+++ b/www/nginx/Makefile.extmod
@@ -280,6 +280,12 @@ SRCACHE_GH_TUPLE= openresty:srcache-nginx-module:v0.31:srcache
#SRCACHE_CONFIGURE_ON= --add-module=${WRKSRC_srcache}
SRCACHE_VARS= DSO_EXTMODS+=srcache
+VOD_GH_TUPLE= kaltura:nginx-vod-module:1.23:vod
+VOD_USE= GNOME=libxml2
+VOD_VARS= DSO_EXTMODS+=vod
+VOD_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-nginx-vod-module-config \
+ ${PATCHDIR}/extra-patch-vod-filters-audio_encoder.c
+
VTS_GH_TUPLE= vozlt:nginx-module-vts:v0.1.18:vts
VTS_CONFIGURE_ON= --add-module=${WRKSRC_vts}
diff --git a/www/nginx/Makefile.options.desc b/www/nginx/Makefile.options.desc
index f8853657f2d5..53e859275361 100644
--- a/www/nginx/Makefile.options.desc
+++ b/www/nginx/Makefile.options.desc
@@ -104,6 +104,7 @@ STREAM_DESC= Enable stream module
STREAM_SSL_DESC= Enable stream_ssl module (SSL req.)
STREAM_SSL_PREREAD_DESC= Enable stream_ssl_preread module (SSL req.)
THREADS_DESC= Enable threads support
+VOD_DESC= 3rd party vod module
VTS_DESC= 3rd party vts module
WWW_DESC= Enable html sample files
XSS_DESC= 3rd party xss module
diff --git a/www/nginx/distinfo b/www/nginx/distinfo
index 42f24fd0bc82..eb29f42374cf 100644
--- a/www/nginx/distinfo
+++ b/www/nginx/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1544778790
+TIMESTAMP = 1544876911
SHA256 (nginx-1.14.2.tar.gz) = 002d9f6154e331886a2dd4e6065863c9c1cf8291ae97a1255308572c02be9797
SIZE (nginx-1.14.2.tar.gz) = 1015384
SHA256 (ngx_cache_purge-2.3.tar.gz) = 279e0d8a46d3b1521fd43b3f78bc1c08b263899142a7cc5058c1c0361a92c89c
@@ -129,6 +129,8 @@ SHA256 (cubicdaiya-ngx_small_light-v0.9.2_GH0.tar.gz) = 4cf660651d11330a13aab29e
SIZE (cubicdaiya-ngx_small_light-v0.9.2_GH0.tar.gz) = 56502
SHA256 (openresty-srcache-nginx-module-v0.31_GH0.tar.gz) = 3f9729e73a8340926fa9d9fc15707c2f287cd27b6a9fe42e83f660ca48a5972d
SIZE (openresty-srcache-nginx-module-v0.31_GH0.tar.gz) = 48310
+SHA256 (kaltura-nginx-vod-module-1.23_GH0.tar.gz) = 800cf3de639567e27f4cb75527392f23842b349fb680abefd12d4db9a5be951f
+SIZE (kaltura-nginx-vod-module-1.23_GH0.tar.gz) = 442053
SHA256 (vozlt-nginx-module-vts-v0.1.18_GH0.tar.gz) = 17ea41d4083f6d1ab1ab83dad9160eeca66867abe16c5a0421f85a39d7c84b65
SIZE (vozlt-nginx-module-vts-v0.1.18_GH0.tar.gz) = 380327
SHA256 (openresty-xss-nginx-module-v0.05_GH0.tar.gz) = 958bd8de773601d8d3138501cc4be0420f1c818a3987a70cc9c0023371e432cf
diff --git a/www/nginx/files/extra-patch-nginx-vod-module-config b/www/nginx/files/extra-patch-nginx-vod-module-config
new file mode 100644
index 000000000000..de3a85fccc57
--- /dev/null
+++ b/www/nginx/files/extra-patch-nginx-vod-module-config
@@ -0,0 +1,17 @@
+--- ../nginx-vod-module-1.23/config.orig 2018-04-24 17:51:34.654430000 -0400
++++ ../nginx-vod-module-1.23/config 2018-04-24 18:10:13.517041000 -0400
+@@ -154,8 +154,12 @@
+ ngx_feature_run=no
+ ngx_feature_incs="#include <libxml/parser.h>
+ #include <libxml/tree.h>"
+-ngx_feature_path="/usr/include/libxml2"
+-ngx_feature_libs="-lxml2"
++ngx_feature_path="%%PREFIX%%/include/libxml2 %%PREFIX%%/include"
++if [ $NGX_RPATH = YES ]; then
++ ngx_feature_libs="-R%%PREFIX%%/lib -L%%PREFIX%%/lib -lxml2 -lxslt"
++else
++ ngx_feature_libs="-L%%PREFIX%%/lib -lxml2 -lxslt"
++fi
+ ngx_feature_test="xmlReadMemory(NULL, 0, NULL, NULL, 0);"
+ . auto/feature
+
diff --git a/www/nginx/files/extra-patch-vod-filters-audio_encoder.c b/www/nginx/files/extra-patch-vod-filters-audio_encoder.c
new file mode 100644
index 000000000000..0bbe7e427ed5
--- /dev/null
+++ b/www/nginx/files/extra-patch-vod-filters-audio_encoder.c
@@ -0,0 +1,20 @@
+--- ../nginx-vod-module-1.23/vod/filters/audio_encoder.c.orig 2018-05-13 10:05:51.704192000 -0400
++++ ../nginx-vod-module-1.23/vod/filters/audio_encoder.c 2018-05-13 10:08:30.590029000 -0400
+@@ -100,7 +100,7 @@
+ encoder->channel_layout = params->channel_layout;
+ encoder->channels = params->channels;
+ encoder->bit_rate = params->bitrate;
+- encoder->flags |= CODEC_FLAG_GLOBAL_HEADER; // make the codec generate the extra data
++ encoder->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; // make the codec generate the extra data
+
+ avrc = avcodec_open2(encoder, encoder_codec, NULL);
+ if (avrc < 0)
+@@ -139,7 +139,7 @@
+ {
+ audio_encoder_state_t* state = context;
+
+- if ((state->encoder->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) != 0)
++ if ((state->encoder->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) != 0)
+ {
+ return 0;
+ }
diff --git a/www/nginx/pkg-plist b/www/nginx/pkg-plist
index 102dd3d2f0a3..41a47f93a13d 100644
--- a/www/nginx/pkg-plist
+++ b/www/nginx/pkg-plist
@@ -55,6 +55,7 @@
%%DSO%%%%SMALL_LIGHT%%libexec/nginx/ngx_http_small_light_module.so
%%DSO%%%%SRCACHE%%libexec/nginx/ngx_http_srcache_filter_module.so
%%DSO%%%%STREAM%%libexec/nginx/ngx_stream_module.so
+%%DSO%%%%VOD%%libexec/nginx/ngx_http_vod_module.so
%%WWW%%@postexec mkdir -p -m 755 %D/www/nginx-dist
%%WWW%%@postexec if [ ! -d %D/www/nginx/ ] ; then ln -fs %D/www/nginx-dist %D/www/nginx; fi
%%WWW%%www/nginx-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING