1
0
Fork 0

patched for pagespeed build error

This commit is contained in:
Sangbum Kim 2016-07-07 03:06:05 +09:00
parent f2ad4d3c58
commit 0c89c1faee
2 changed files with 37 additions and 4 deletions

View File

@ -0,0 +1,28 @@
From e885e02a3c8ae2cb39ebfc796163fee7414ffd6c Mon Sep 17 00:00:00 2001
From: Maks Orlovich <morlovich@google.com>
Date: Tue, 26 Apr 2016 15:37:26 -0400
Subject: [PATCH] Fix build with recent nginx which lacks NGX_CONF_MULTI
(#1185)
---
src/ngx_pagespeed.cc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/ngx_pagespeed.cc b/src/ngx_pagespeed.cc
index ed5a43d..60a0d2e 100644
--- a/src/ngx_pagespeed.cc
+++ b/src/ngx_pagespeed.cc
@@ -708,6 +708,13 @@ char* ps_main_configure(ngx_conf_t* cf, ngx_command_t* cmd, void* conf);
char* ps_srv_configure(ngx_conf_t* cf, ngx_command_t* cmd, void* conf);
char* ps_loc_configure(ngx_conf_t* cf, ngx_command_t* cmd, void* conf);
+// We want NGX_CONF_MULTI for some very old versions:
+// https://github.com/pagespeed/ngx_pagespeed/commit/66f1b9aa
+// but it's gone in recent revisions, so provide a compat #define if needed
+#ifndef NGX_CONF_MULTI
+#define NGX_CONF_MULTI 0
+#endif
+
// TODO(jud): Verify that all the offsets should be NGX_HTTP_SRV_CONF_OFFSET and
// not NGX_HTTP_LOC_CONF_OFFSET or NGX_HTTP_MAIN_CONF_OFFSET.
ngx_command_t ps_commands[] = {

View File

@ -104,6 +104,7 @@ source=("nginx.sh"
"${_upsync_stream_dirname}-${_upsync_stream_ver}.tar.gz::https://github.com/xiaokai-wang/nginx-stream-upsync-module/archive/v${_upsync_stream_ver}.tar.gz"
"${_vts_dirname}-${_vts_ver}.tar.gz::https://github.com/vozlt/nginx-module-vts/archive/v${_vts_ver}.tar.gz"
"${_upstream_jdomain_dirname}.source::https://github.com/wdaike/ngx_upstream_jdomain/tarball/${_upstream_jdomain_hash}"
"01_Fix_build_with_recent_nginx_which_lacks_NGX_CONF_MULTI.patch"
)
sha512sums=('a396d52457d22fb68cf5abe3faa09cca97d31b9b354b2e44ce6af02d695e2eb790093cf28c68db0c017b1194d46212a98042d297a1d5929fd5c5b8a1ed5f4bd3'
@ -129,7 +130,8 @@ sha512sums=('a396d52457d22fb68cf5abe3faa09cca97d31b9b354b2e44ce6af02d695e2eb7900
'e7b1bd0f8f658a7705b1da0a48c40531f00e8eddc4bbf6930638e5d98f144cbb2dfa244c9a23a1a553c8a5001a0cbe74d7f7853edbd394d495678efc2c9ecb82'
'719a2f95b0b283e0f5cd73eb6c14da1d50e1926d7f5f137cf04895cf065e139cfdb39216bcc1848b52f4107707865427e8a80c0888eaa4ad1aa1528335615292'
'6a76808f93294d5108c28566787755f6b7a7ab4b45134727127c335ffa3b3bf8d6761a13a010a101c50d2c2533df78e761f1fdfccc5d25ac469d093d687e8c9c'
'5782c151508adf286d1993824273b49e8e4b6d6177b3a676a887c7a7232bdb3b89e3792efbb157dbf708c35ed019bb355777aeb9a17d5ec57be0ee7228f299e8')
'5782c151508adf286d1993824273b49e8e4b6d6177b3a676a887c7a7232bdb3b89e3792efbb157dbf708c35ed019bb355777aeb9a17d5ec57be0ee7228f299e8'
'11c0ac0c83613fe68fe9716e217670d4677454ce594c973a2ba2d279698935d3c69db481d464a1eeb253cc1a952fd3af19d27de5515a72d4301f2868fa422a08')
build() {
local _src_dir="${srcdir}/${_pkgname}-${pkgver}"
@ -144,8 +146,8 @@ build() {
mv gnosek-nginx-upstream-fair-* ${_upstreamfair_dirname}
# mv ngx_http_auth_pam_module-${_authpam_ver} ${_authpam_dirname}
mv ngx_http_auth_pam_module-1.4 ${_authpam_dirname}
# mv ngx_pagespeed-* ${_pagespeed_dirname}
# mv psol ${_pagespeed_dirname}/
mv ngx_pagespeed-* ${_pagespeed_dirname}
mv psol ${_pagespeed_dirname}/
# mv nginx-rtmp-module* ${_rtmp_dirname}
# mv nginx-dav-ext-module* ${_davext_dirname}
mv naxsi* ${_naxsi_dirname}
@ -155,6 +157,9 @@ build() {
mv nginx-module-vts* ${_vts_dirname}
mv wdaike-ngx_upstream_jdomain* ${_upstream_jdomain_dirname}
cd "${_pagespeed_dirname}"
cat "${srcdir}/01_Fix_build_with_recent_nginx_which_lacks_NGX_CONF_MULTI.patch" |patch -p1
cd $_src_dir
./configure \
@ -212,11 +217,11 @@ build() {
--add-module=../${_upsync_dirname} \
--add-module=../${_vts_dirname} \
--add-module=../${_upstream_jdomain_dirname} \
--add-module=../${_pagespeed_dirname} \
# --add-module=../${_accesskey_dirname} \
# --with-http_dav_module \
# --add-module=../${_uploadprogress_dirname} \
# --add-module=../${_pagespeed_dirname} \
# --add-module=../${_rtmp_dirname} \
# --add-module=../${_davext_dirname} \
# --add-module=../${_echo_dirname} \