Date: Fri, 1 Dec 2017 22:52:27 +0000 (UTC) From: Jochen Neumeister <joneum@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r455319 - in head/www/nginx: . files Message-ID: <201712012252.vB1MqRbX004196@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: joneum Date: Fri Dec 1 22:52:27 2017 New Revision: 455319 URL: https://svnweb.freebsd.org/changeset/ports/455319 Log: 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 Added: head/www/nginx/files/extra-patch-brotli_config (contents, props changed) Modified: head/www/nginx/Makefile head/www/nginx/distinfo Modified: head/www/nginx/Makefile ============================================================================== --- head/www/nginx/Makefile Fri Dec 1 22:42:08 2017 (r455318) +++ head/www/nginx/Makefile Fri Dec 1 22:52:27 2017 (r455319) @@ -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 @@ -1268,6 +1269,11 @@ post-patch: @${REINPLACE_CMD} \ '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: Modified: head/www/nginx/distinfo ============================================================================== --- head/www/nginx/distinfo Fri Dec 1 22:42:08 2017 (r455318) +++ head/www/nginx/distinfo Fri Dec 1 22:52:27 2017 (r455319) @@ -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) = 43fc7a307ee98b 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 Added: head/www/nginx/files/extra-patch-brotli_config ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/nginx/files/extra-patch-brotli_config Fri Dec 1 22:52:27 2017 (r455319) @@ -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 \ +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712012252.vB1MqRbX004196>