aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorjoneum <joneum@FreeBSD.org>2017-12-02 06:52:27 +0800
committerjoneum <joneum@FreeBSD.org>2017-12-02 06:52:27 +0800
commitb72e2113549eed2d9c2857339bee05b9467732b5 (patch)
tree0a2abd27c3f3cabcd59fbec296f9eae8d48892d6 /www
parent61bf553d148ea420b1b4ecaeeaff97720728ddff (diff)
downloadfreebsd-ports-gnome-b72e2113549eed2d9c2857339bee05b9467732b5.tar.gz
freebsd-ports-gnome-b72e2113549eed2d9c2857339bee05b9467732b5.tar.zst
freebsd-ports-gnome-b72e2113549eed2d9c2857339bee05b9467732b5.zip
www/nginx: Update brotli module
- Switch to fork that uses new brotli ABI The upstream brotli module hasn't been updated for over a year even though it's been broken for over a year with later brotli releases. There's a fork that does update which uses the new brotli abi. This patch is based on the fork. Requires some patching to the config file as it depends on an old upstream brotli snapshot to be in the src dir. PR: 224000 Reported by: brnrd Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D13319
Diffstat (limited to 'www')
-rw-r--r--www/nginx/Makefile12
-rw-r--r--www/nginx/distinfo6
-rw-r--r--www/nginx/files/extra-patch-brotli_config120
3 files changed, 132 insertions, 6 deletions
diff --git a/www/nginx/Makefile b/www/nginx/Makefile
index 8d6555e88a92..d0298fddd436 100644
--- a/www/nginx/Makefile
+++ b/www/nginx/Makefile
@@ -3,7 +3,7 @@
PORTNAME= nginx
PORTVERSION= 1.12.2
-PORTREVISION?= 1
+PORTREVISION?= 2
PORTEPOCH= 2
CATEGORIES= www
MASTER_SITES= http://nginx.org/download/
@@ -1141,11 +1141,12 @@ CONFIGURE_ARGS+=--add-module=${WRKSRC_arrayvar}
.endif
.if ${PORT_OPTIONS:MBROTLI}
-NGINX_BROTLI_VERSION= 12529813
+NGINX_BROTLI_VERSION= 990d925
LIB_DEPENDS+= libbrotlicommon.so:archivers/brotli
-GH_ACCOUNT+= google:brotli
+GH_ACCOUNT+= eustas:brotli
GH_PROJECT+= ngx_brotli:brotli
GH_TAGNAME+= ${NGINX_BROTLI_VERSION}:brotli
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-brotli_config
.if ${PORT_OPTIONS:MDSO}
CONFIGURE_ARGS+=--add-dynamic-module=${WRKSRC_brotli}
.else
@@ -1269,6 +1270,11 @@ post-patch:
's!%%PREFIX%%!${LOCALBASE}!g' \
${WRKSRC_nginx_tarantool}/config
.endif
+.if ${PORT_OPTIONS:MBROTLI}
+ @${REINPLACE_CMD} -E \
+ 's!^brotli=.*!brotli="${LOCALBASE}"!' \
+ ${WRKSRC_brotli}/config
+.endif
pre-configure:
.if ${PORT_OPTIONS:MMODSECURITY}
diff --git a/www/nginx/distinfo b/www/nginx/distinfo
index 9434248ba362..e0cf6c4de5bb 100644
--- a/www/nginx/distinfo
+++ b/www/nginx/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1511734956
+TIMESTAMP = 1512144757
SHA256 (nginx-1.12.2.tar.gz) = 305f379da1d5fb5aefa79e45c829852ca6983c7cd2a79328f8e084a324cf0416
SIZE (nginx-1.12.2.tar.gz) = 981687
SHA256 (ngx_cache_purge-2.3.tar.gz) = 279e0d8a46d3b1521fd43b3f78bc1c08b263899142a7cc5058c1c0361a92c89c
@@ -123,8 +123,8 @@ SHA256 (nginx-njs-753ebe6_GH0.tar.gz) = 43fc7a307ee98b9c55283374b36f1f4576cbf529
SIZE (nginx-njs-753ebe6_GH0.tar.gz) = 191124
SHA256 (openresty-array-var-nginx-module-v0.05_GH0.tar.gz) = c949d4be6f3442c8e2937046448dc8d8def25c0e0fa6f4e805144cea45eabe80
SIZE (openresty-array-var-nginx-module-v0.05_GH0.tar.gz) = 11280
-SHA256 (google-ngx_brotli-12529813_GH0.tar.gz) = 788b25c4a3285b34d06e48a469fd0d0cb52d43b43edccd2935e22802dcfd2d69
-SIZE (google-ngx_brotli-12529813_GH0.tar.gz) = 10448
+SHA256 (eustas-ngx_brotli-990d925_GH0.tar.gz) = 16f1e1f01e689f82529e6effec3436e42878f390cfe735bd364b1e16eef669ef
+SIZE (eustas-ngx_brotli-990d925_GH0.tar.gz) = 10558
SHA256 (calio-form-input-nginx-module-v0.12_GH0.tar.gz) = 5c1869d55897075adb3fdf840b21060dc54669a1f840a36d1539acc7e59dd106
SIZE (calio-form-input-nginx-module-v0.12_GH0.tar.gz) = 11090
SHA256 (calio-iconv-nginx-module-v0.14_GH0.tar.gz) = b8b9f355c05c0790226512f6732348a2404d48531688a1fc04ce6768163bf462
diff --git a/www/nginx/files/extra-patch-brotli_config b/www/nginx/files/extra-patch-brotli_config
new file mode 100644
index 000000000000..97aed59a5b3a
--- /dev/null
+++ b/www/nginx/files/extra-patch-brotli_config
@@ -0,0 +1,120 @@
+From ad89164d7405b39fd947c998c80fc64fc866a440 Mon Sep 17 00:00:00 2001
+From: Bernard Spil <Sp1l@users.noreply.github.com>
+Date: Thu, 30 Nov 2017 21:39:32 +0100
+Subject: [PATCH] Allow building with an already installed libbrotli
+
+Currently the module requires a bundled brotli source. This patch allows building with an external libbrotli (if detected)
+
+See also the [this bug report in FreeBSD](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224000)
+---
+ config | 22 ++++++++++++++++++++--
+ 1 file changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/config b/config
+index 9d069f8..5e712d2 100644
+--- ../ngx_brotli-9891a98/config.orig 2017-11-28 11:00:45.000000000 +0100
++++ ../ngx_brotli-9891a98/config 2017-11-30 21:05:56.300023000 +0100
+@@ -55,6 +55,14 @@ have=NGX_HTTP_BROTLI_STATIC_MODULE . auto/have # deprecated
+ # HTTP filter module with Brotli library
+ #
+
++
++ngx_module_type=HTTP_FILTER
++ngx_module_name=ngx_http_brotli_filter_module
++
++brotli="/usr/local"
++
++if [ ! -f "$brotli/include/brotli/encode.h" ]; then
++
+ brotli="$ngx_addon_dir/deps/brotli"
+
+ if [ ! -f "$brotli/include/brotli/encode.h" ]; then
+@@ -71,8 +79,6 @@ END
+ exit 1
+ fi
+
+-ngx_module_type=HTTP_FILTER
+-ngx_module_name=ngx_http_brotli_filter_module
+ ngx_module_incs="$brotli/include"
+ ngx_module_deps="$brotli/common/constants.h \
+ $brotli/common/dictionary.h \
+@@ -132,6 +138,18 @@ ngx_module_srcs="$brotli/common/dictionary.c \
+ $brotli/enc/utf8_util.c \
+ $ngx_addon_dir/src/ngx_http_brotli_filter_module.c"
+ ngx_module_libs="-lm"
++
++else # encode.h in /usr/local
++
++ngx_module_incs="$brotli/include"
++ngx_module_deps="$brotli/include/brotli/encode.h \
++ $brotli/include/brotli/port.h \
++ $brotli/include/brotli/types.h"
++ngx_module_srcs="$ngx_addon_dir/src/ngx_http_brotli_filter_module.c"
++ngx_module_libs="-lbrotlienc -lm"
++
++fi # encode.h in /usr/local
++
+ ngx_module_order="$ngx_module_name \
+ ngx_pagespeed \
+ ngx_http_postpone_filter_module \
+
+From ad89164d7405b39fd947c998c80fc64fc866a440 Mon Sep 17 00:00:00 2001
+From: Bernard Spil <Sp1l@users.noreply.github.com>
+Date: Thu, 30 Nov 2017 21:39:32 +0100
+Subject: [PATCH] Allow building with an already installed libbrotli
+
+Currently the module requires a bundled brotli source. This patch allows building with an external libbrotli (if detected)
+
+See also the [this bug report in FreeBSD](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224000)
+---
+ config | 22 ++++++++++++++++++++--
+ 1 file changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/config b/config
+index 9d069f8..5e712d2 100644
+--- ../ngx_brotli-9891a98/config.orig 2017-11-28 11:00:45.000000000 +0100
++++ ../ngx_brotli-9891a98/config 2017-11-30 21:05:56.300023000 +0100
+@@ -55,6 +55,14 @@ have=NGX_HTTP_BROTLI_STATIC_MODULE . auto/have # deprecated
+ # HTTP filter module with Brotli library
+ #
+
++
++ngx_module_type=HTTP_FILTER
++ngx_module_name=ngx_http_brotli_filter_module
++
++brotli="/usr/local"
++
++if [ ! -f "$brotli/include/brotli/encode.h" ]; then
++
+ brotli="$ngx_addon_dir/deps/brotli"
+
+ if [ ! -f "$brotli/include/brotli/encode.h" ]; then
+@@ -71,8 +79,6 @@ END
+ exit 1
+ fi
+
+-ngx_module_type=HTTP_FILTER
+-ngx_module_name=ngx_http_brotli_filter_module
+ ngx_module_incs="$brotli/include"
+ ngx_module_deps="$brotli/common/constants.h \
+ $brotli/common/dictionary.h \
+@@ -132,6 +138,18 @@ ngx_module_srcs="$brotli/common/dictionary.c \
+ $brotli/enc/utf8_util.c \
+ $ngx_addon_dir/src/ngx_http_brotli_filter_module.c"
+ ngx_module_libs="-lm"
++
++else # encode.h in /usr/local
++
++ngx_module_incs="$brotli/include"
++ngx_module_deps="$brotli/include/brotli/encode.h \
++ $brotli/include/brotli/port.h \
++ $brotli/include/brotli/types.h"
++ngx_module_srcs="$ngx_addon_dir/src/ngx_http_brotli_filter_module.c"
++ngx_module_libs="-lbrotlienc -lm"
++
++fi # encode.h in /usr/local
++
+ ngx_module_order="$ngx_module_name \
+ ngx_pagespeed \
+ ngx_http_postpone_filter_module \
+