mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
www-servers/nginx: Patch for rtmp module. Fixes bug 585804.
Proposed patch for upstream bug 820 added to fix building of nginx's 3rd party module "rtmp" against nginx-1.11.0+. Bug: https://github.com/arut/nginx-rtmp-module/issues/820 Gentoo-Bug: https://bugs.gentoo.org/585804 Package-Manager: portage-2.3.0_rc1 Closes: https://github.com/gentoo/gentoo/pull/1669 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
This commit is contained in:
committed by
Patrice Clement
parent
b73d0a35d4
commit
6241ba18ca
39
www-servers/nginx/files/rtmp-nginx-1.11.0.patch
Normal file
39
www-servers/nginx/files/rtmp-nginx-1.11.0.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From 965523f3970e449e3abbaa6c9b0db1ce251f2b68 Mon Sep 17 00:00:00 2001
|
||||
From: RocFang <fangpeng1986@gmail.com>
|
||||
Date: Mon, 30 May 2016 22:56:16 +0800
|
||||
Subject: [PATCH] compile with nginx-1.11.0
|
||||
|
||||
From https://github.com/arut/nginx-rtmp-module/issues/820
|
||||
|
||||
---
|
||||
ngx_rtmp_core_module.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/ngx_rtmp_core_module.c b/ngx_rtmp_core_module.c
|
||||
index 643702f..567f011 100644
|
||||
--- a/ngx_rtmp_core_module.c
|
||||
+++ b/ngx_rtmp_core_module.c
|
||||
@@ -557,7 +557,11 @@ ngx_rtmp_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
break;
|
||||
}
|
||||
|
||||
+#if (nginx_version >= 1011000)
|
||||
+ if (ngx_memcmp(ls[i].sockaddr + off, &u.sockaddr + off, len) != 0) {
|
||||
+#else
|
||||
if (ngx_memcmp(ls[i].sockaddr + off, u.sockaddr + off, len) != 0) {
|
||||
+#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -577,7 +581,11 @@ ngx_rtmp_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
|
||||
ngx_memzero(ls, sizeof(ngx_rtmp_listen_t));
|
||||
|
||||
+#if (nginx_version >= 1011000)
|
||||
+ ngx_memcpy(ls->sockaddr, &u.sockaddr, u.socklen);
|
||||
+#else
|
||||
ngx_memcpy(ls->sockaddr, u.sockaddr, u.socklen);
|
||||
+#endif
|
||||
|
||||
ls->socklen = u.socklen;
|
||||
ls->wildcard = u.wildcard;
|
||||
@@ -348,7 +348,7 @@ src_prepare() {
|
||||
src_configure() {
|
||||
# mod_security needs to generate nginx/modsecurity/config before including it
|
||||
if use nginx_modules_http_security; then
|
||||
cd "${HTTP_SECURITY_MODULE_WD}"
|
||||
cd "${HTTP_SECURITY_MODULE_WD}" || die
|
||||
if use luajit ; then
|
||||
sed -i \
|
||||
-e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
|
||||
@@ -360,7 +360,7 @@ src_configure() {
|
||||
$(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
cd "${S}" || die
|
||||
|
||||
local myconf=() http_enabled= mail_enabled= stream_enabled=
|
||||
|
||||
@@ -624,9 +624,10 @@ src_install() {
|
||||
newins "${FILESDIR}"/nginx.logrotate-r1 nginx
|
||||
|
||||
if use nginx_modules_http_perl; then
|
||||
cd "${S}"/objs/src/http/modules/perl/
|
||||
cd "${S}"/objs/src/http/modules/perl/ || die
|
||||
emake DESTDIR="${D}" INSTALLDIRS=vendor
|
||||
perl_delete_localpod
|
||||
cd "${S}" || die
|
||||
fi
|
||||
|
||||
if use nginx_modules_http_cache_purge; then
|
||||
|
||||
@@ -320,6 +320,12 @@ pkg_setup() {
|
||||
src_prepare() {
|
||||
eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
|
||||
|
||||
if use rtmp; then
|
||||
cd "${RTMP_MODULE_WD}" || die
|
||||
eapply "${FILESDIR}"/rtmp-nginx-1.11.0.patch
|
||||
cd "${S}" || die
|
||||
fi
|
||||
|
||||
if use nginx_modules_http_upstream_check; then
|
||||
eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}/check_1.9.2+".patch
|
||||
fi
|
||||
@@ -348,7 +354,7 @@ src_prepare() {
|
||||
src_configure() {
|
||||
# mod_security needs to generate nginx/modsecurity/config before including it
|
||||
if use nginx_modules_http_security; then
|
||||
cd "${HTTP_SECURITY_MODULE_WD}"
|
||||
cd "${HTTP_SECURITY_MODULE_WD}" || die
|
||||
if use luajit ; then
|
||||
sed -i \
|
||||
-e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
|
||||
@@ -360,7 +366,7 @@ src_configure() {
|
||||
$(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
cd "${S}" || die
|
||||
|
||||
local myconf=() http_enabled= mail_enabled= stream_enabled=
|
||||
|
||||
@@ -624,9 +630,10 @@ src_install() {
|
||||
newins "${FILESDIR}"/nginx.logrotate-r1 nginx
|
||||
|
||||
if use nginx_modules_http_perl; then
|
||||
cd "${S}"/objs/src/http/modules/perl/
|
||||
cd "${S}"/objs/src/http/modules/perl/ || die
|
||||
emake DESTDIR="${D}" INSTALLDIRS=vendor
|
||||
perl_delete_localpod
|
||||
cd "${S}" || die
|
||||
fi
|
||||
|
||||
if use nginx_modules_http_cache_purge; then
|
||||
|
||||
Reference in New Issue
Block a user