diff options
author | Ralph Seichter <github@seichter.de> | 2019-10-31 17:25:48 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2019-11-04 07:34:08 +0200 |
commit | 0264d76cab957b25e3561c40bb45a738f38bc702 (patch) | |
tree | 86521a9151c54b0dbafb3ff73413af908057ad8c /www-servers | |
parent | package.mask: remove some WIP EAPI-0 masks (diff) | |
download | gentoo-0264d76cab957b25e3561c40bb45a738f38bc702.tar.gz gentoo-0264d76cab957b25e3561c40bb45a738f38bc702.tar.bz2 gentoo-0264d76cab957b25e3561c40bb45a738f38bc702.zip |
www-servers/nginx-unit: Support AR build variable
The upstream build currently does not support $AR. This ebuild
patches autoconf files to remedy the issue.
Closes: https://bugs.gentoo.org/696964
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Ralph Seichter <gentoo@seichter.de>
Closes: https://github.com/gentoo/gentoo/pull/13508
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/nginx-unit/files/auto-make.patch | 14 | ||||
-rw-r--r-- | www-servers/nginx-unit/files/auto-os-conf.patch | 109 | ||||
-rw-r--r-- | www-servers/nginx-unit/nginx-unit-1.12.0-r3.ebuild | 79 |
3 files changed, 202 insertions, 0 deletions
diff --git a/www-servers/nginx-unit/files/auto-make.patch b/www-servers/nginx-unit/files/auto-make.patch new file mode 100644 index 000000000000..9a157ed6a86d --- /dev/null +++ b/www-servers/nginx-unit/files/auto-make.patch @@ -0,0 +1,14 @@ +--- a/auto/make 2019-10-03 16:08:32.000000000 +0200 ++++ b/auto/make 2019-10-31 16:57:43.354566956 +0100 +@@ -13,10 +13,9 @@ + + cat << END > $NXT_MAKEFILE + ++AR = $AR + CC = $CC + +-CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS +- + NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT + NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT + NXT_MODULE_LINK = $NXT_MODULE_LINK diff --git a/www-servers/nginx-unit/files/auto-os-conf.patch b/www-servers/nginx-unit/files/auto-os-conf.patch new file mode 100644 index 000000000000..e1d6775f9350 --- /dev/null +++ b/www-servers/nginx-unit/files/auto-os-conf.patch @@ -0,0 +1,109 @@ +--- a/auto/os/conf 2019-10-31 17:17:33.194445276 +0100 ++++ b/auto/os/conf 2019-10-31 17:19:51.780033224 +0100 +@@ -21,7 +21,7 @@ + Linux) + nxt_have=NXT_LINUX . auto/have + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared \ + -Wl,-soname,\\\$\$ORIGIN/libnxt.so" +@@ -44,7 +44,7 @@ + FreeBSD) + nxt_have=NXT_FREEBSD . auto/have + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared \ + -Wl,-soname,\\\$\$ORIGIN/libnxt.so" +@@ -71,14 +71,14 @@ + case "$NXT_CC_NAME" in + + SunC): +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -G -h libnxt.so" + NXT_SHARED_LOCAL_LINK="\$(CC) -G -h \\\$\$ORIGIN/libnxt.so" + NXT_MODULE_LINK="\$(CC) -G" + ;; + + *) +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared \ + -Wl,-soname,\\\$\$ORIGIN/libnxt.so" +@@ -106,7 +106,7 @@ + # HFS+ volumes are caseless by default. + nxt_have=NXT_HAVE_CASELESS_FILESYSTEM . auto/have + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -dynamiclib" + NXT_SHARED_LOCAL_LINK="\$(CC) -dynamiclib \ + -install_name @executable_path/libnxt.dylib" +@@ -130,7 +130,7 @@ + NetBSD) + nxt_have=NXT_NETBSD . auto/have + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared" + NXT_MODULE_LINK="\$(CC) -shared" +@@ -152,7 +152,7 @@ + OpenBSD) + nxt_have=NXT_OPENBSD . auto/have + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared" + NXT_MODULE_LINK="\$(CC) -shared" +@@ -174,7 +174,7 @@ + DragonFly) + nxt_have=NXT_DRAGONFLY . auto/have + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared" + NXT_MODULE_LINK="\$(CC) -shared" +@@ -196,7 +196,7 @@ + AIX) + nxt_have=NXT_AIX . auto/have + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -G" + NXT_SHARED_LOCAL_LINK="\$(CC) -G" + NXT_MODULE_LINK="\$(CC) -G" +@@ -220,7 +220,7 @@ + NXT_EXEC_LINK="\$(CC)" + NXT_SHARED_LOCAL_EXEC_LINK= + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared" + NXT_MODULE_LINK="\$(CC) -shared" +@@ -238,7 +238,7 @@ + QNX) + nxt_have=NXT_QNX . auto/have + +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared" + NXT_MODULE_LINK="\$(CC) -shared" +@@ -257,7 +257,7 @@ + ;; + + *) +- NXT_STATIC_LINK="ar -r -c" ++ NXT_STATIC_LINK="\$(AR) -r -c" + NXT_SHARED_LINK="\$(CC) -shared" + NXT_SHARED_LOCAL_LINK="\$(CC) -shared" + NXT_MODULE_LINK="\$(CC) -shared" diff --git a/www-servers/nginx-unit/nginx-unit-1.12.0-r3.ebuild b/www-servers/nginx-unit/nginx-unit-1.12.0-r3.ebuild new file mode 100644 index 000000000000..ff15caf86a11 --- /dev/null +++ b/www-servers/nginx-unit/nginx-unit-1.12.0-r3.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=(python2_7 python3_{5,6,7}) + +inherit flag-o-matic python-single-r1 + +MY_P="unit-${PV}" +DESCRIPTION="Dynamic web and application server" +HOMEPAGE="https://unit.nginx.org" +SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +MY_USE="perl python ruby" +MY_USE_PHP="php5-6 php7-1 php7-2 php7-3" +IUSE="${MY_USE} ${MY_USE_PHP} ssl" +REQUIRED_USE="|| ( ${IUSE} ) + python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="perl? ( dev-lang/perl:= ) + php5-6? ( dev-lang/php:5.6[embed] ) + php7-1? ( dev-lang/php:7.1[embed] ) + php7-2? ( dev-lang/php:7.2[embed] ) + php7-3? ( dev-lang/php:7.3[embed] ) + python? ( ${PYTHON_DEPS} ) + ruby? ( dev-lang/ruby:* ) + ssl? ( dev-libs/openssl:0 )" +RDEPEND="${DEPEND}" +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/auto-make.patch" + "${FILESDIR}/auto-os-conf.patch" +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + local opt=( + --control=unix:/run/${PN}.sock + --log=/var/log/${PN} + --modules=$(get_libdir)/${PN} + --pid=/run/${PN}.pid + --prefix=/usr + --state=/var/lib/${PN} + ) + use ssl && opt+=( --openssl ) + export AR="$(tc-getAR)" + ./configure ${opt[@]} --ld-opt="${LDFLAGS}" || die "Core configuration failed" + # Modules require position-independent code + append-cflags $(test-flags-CC -fPIC) + for flag in ${MY_USE} ; do + if use ${flag} ; then + ./configure ${flag} || die "Module configuration failed: ${flag}" + fi + done + for flag in ${MY_USE_PHP} ; do + if use ${flag} ; then + local php_slot="/usr/$(get_libdir)/${flag/-/.}" + ./configure php \ + --module=${flag} \ + --config=${php_slot}/bin/php-config \ + --lib-path=${php_slot}/$(get_libdir) || die "Module configuration failed: ${flag}" + fi + done +} + +src_install() { + default + diropts -m 0770 + keepdir /var/lib/${PN} + newinitd "${FILESDIR}/${PN}.initd" ${PN} +} |