summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-02-18 17:04:41 +0100
committerThomas Deutschmann <whissi@gentoo.org>2018-02-18 17:05:12 +0100
commitda7d02ca95226161605c105a07d3d341fcb6477e (patch)
treee21a2a8e00ced14ce253f661fcd2fe4715f1a281 /www-servers
parentvirtual/imagemagick-tools: Sync KEYWORDS to media-gfx/imagemagick (diff)
downloadgentoo-da7d02ca95226161605c105a07d3d341fcb6477e.tar.gz
gentoo-da7d02ca95226161605c105a07d3d341fcb6477e.tar.bz2
gentoo-da7d02ca95226161605c105a07d3d341fcb6477e.zip
www-servers/nginx: Fix building of nginScript with -O3
Closes: https://bugs.gentoo.org/647958 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/nginx/files/njs-0.1.15-fix-o3-building.patch24
-rw-r--r--www-servers/nginx/nginx-1.13.8-r1.ebuild10
2 files changed, 32 insertions, 2 deletions
diff --git a/www-servers/nginx/files/njs-0.1.15-fix-o3-building.patch b/www-servers/nginx/files/njs-0.1.15-fix-o3-building.patch
new file mode 100644
index 000000000000..55b71368bc30
--- /dev/null
+++ b/www-servers/nginx/files/njs-0.1.15-fix-o3-building.patch
@@ -0,0 +1,24 @@
+Origin: https://hg.nginx.org/njs/rev/22cc52416e84
+
+Bug: https://bugs.gentoo.org/647958
+
+--- a/njs/njs_fs.c
++++ b/njs/njs_fs.c
+@@ -566,6 +566,8 @@
+ }
+
+ mode = NULL;
++ /* GCC complains about uninitialized flag.length. */
++ flag.length = 0;
+ flag.start = NULL;
+ encoding.length = 0;
+ encoding.start = NULL;
+@@ -753,6 +755,8 @@
+ }
+
+ mode = NULL;
++ /* GCC complains about uninitialized flag.length. */
++ flag.length = 0;
+ flag.start = NULL;
+ encoding.length = 0;
+ encoding.start = NULL;
diff --git a/www-servers/nginx/nginx-1.13.8-r1.ebuild b/www-servers/nginx/nginx-1.13.8-r1.ebuild
index 252999d3fe6f..82920e6b89df 100644
--- a/www-servers/nginx/nginx-1.13.8-r1.ebuild
+++ b/www-servers/nginx/nginx-1.13.8-r1.ebuild
@@ -153,7 +153,7 @@ HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}"
NJS_MODULE_PV="0.1.15"
NJS_MODULE_P="njs-${NJS_MODULE_PV}"
NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz"
-NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}/nginx"
+NJS_MODULE_WD="${WORKDIR}/njs-${NJS_MODULE_PV}"
# We handle deps below ourselves
SSL_DEPS_SKIP=1
@@ -373,6 +373,12 @@ src_prepare() {
cd "${S}" || die
fi
+ if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then
+ cd "${NJS_MODULE_WD}" || die
+ eapply "${FILESDIR}"/njs-0.1.15-fix-o3-building.patch
+ cd "${S}" || die
+ fi
+
if use nginx_modules_http_upstream_check; then
#eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.11.1+.patch
eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch
@@ -576,7 +582,7 @@ src_configure() {
fi
if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then
- myconf+=( --add-module=${NJS_MODULE_WD} )
+ myconf+=( --add-module="${NJS_MODULE_WD}/nginx" )
fi
if use nginx_modules_http_brotli; then