1 |
commit: 8075ead5b2ce8dd6fa31381667643d91755a2311 |
2 |
Author: Ralph Seichter <github <AT> seichter <DOT> de> |
3 |
AuthorDate: Mon Oct 28 23:39:04 2019 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 30 15:56:52 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8075ead5 |
7 |
|
8 |
www-servers/nginx-unit: Address CFLAGS issues |
9 |
|
10 |
The upstream build adds compiler flags like '-pipe' and '-g'. |
11 |
This updated ebuild prevents that from happening. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/696966 |
14 |
Package-Manager: Portage-2.3.76, Repoman-2.3.16 |
15 |
Signed-off-by: Ralph Seichter <gentoo <AT> seichter.de> |
16 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
17 |
|
18 |
www-servers/nginx-unit/nginx-unit-1.12.0-r2.ebuild | 78 ++++++++++++++++++++++ |
19 |
1 file changed, 78 insertions(+) |
20 |
|
21 |
diff --git a/www-servers/nginx-unit/nginx-unit-1.12.0-r2.ebuild b/www-servers/nginx-unit/nginx-unit-1.12.0-r2.ebuild |
22 |
new file mode 100644 |
23 |
index 00000000000..3627ea90fa4 |
24 |
--- /dev/null |
25 |
+++ b/www-servers/nginx-unit/nginx-unit-1.12.0-r2.ebuild |
26 |
@@ -0,0 +1,78 @@ |
27 |
+# Copyright 1999-2019 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=7 |
31 |
+ |
32 |
+PYTHON_COMPAT=(python2_7 python3_{5,6,7}) |
33 |
+ |
34 |
+inherit flag-o-matic python-single-r1 |
35 |
+ |
36 |
+MY_P="unit-${PV}" |
37 |
+DESCRIPTION="Dynamic web and application server" |
38 |
+HOMEPAGE="https://unit.nginx.org" |
39 |
+SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="Apache-2.0" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64" |
44 |
+MY_USE="perl python ruby" |
45 |
+MY_USE_PHP="php5-6 php7-1 php7-2 php7-3" |
46 |
+IUSE="${MY_USE} ${MY_USE_PHP} ssl" |
47 |
+REQUIRED_USE="|| ( ${IUSE} ) |
48 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
49 |
+ |
50 |
+DEPEND="perl? ( dev-lang/perl:= ) |
51 |
+ php5-6? ( dev-lang/php:5.6[embed] ) |
52 |
+ php7-1? ( dev-lang/php:7.1[embed] ) |
53 |
+ php7-2? ( dev-lang/php:7.2[embed] ) |
54 |
+ php7-3? ( dev-lang/php:7.3[embed] ) |
55 |
+ python? ( ${PYTHON_DEPS} ) |
56 |
+ ruby? ( dev-lang/ruby:* ) |
57 |
+ ssl? ( dev-libs/openssl:0 )" |
58 |
+RDEPEND="${DEPEND}" |
59 |
+S="${WORKDIR}/${MY_P}" |
60 |
+ |
61 |
+pkg_setup() { |
62 |
+ use python && python-single-r1_pkg_setup |
63 |
+} |
64 |
+ |
65 |
+src_prepare() { |
66 |
+ eapply_user |
67 |
+ sed -i '/^CFLAGS/d' auto/make || die |
68 |
+} |
69 |
+ |
70 |
+src_configure() { |
71 |
+ local opt=( |
72 |
+ --control=unix:/run/${PN}.sock |
73 |
+ --log=/var/log/${PN} |
74 |
+ --modules=$(get_libdir)/${PN} |
75 |
+ --pid=/run/${PN}.pid |
76 |
+ --prefix=/usr |
77 |
+ --state=/var/lib/${PN} |
78 |
+ ) |
79 |
+ use ssl && opt+=( --openssl ) |
80 |
+ ./configure ${opt[@]} --ld-opt="${LDFLAGS}" || die "Core configuration failed" |
81 |
+ # Modules require position-independent code |
82 |
+ append-cflags $(test-flags-CC -fPIC) |
83 |
+ for flag in ${MY_USE} ; do |
84 |
+ if use ${flag} ; then |
85 |
+ ./configure ${flag} || die "Module configuration failed: ${flag}" |
86 |
+ fi |
87 |
+ done |
88 |
+ for flag in ${MY_USE_PHP} ; do |
89 |
+ if use ${flag} ; then |
90 |
+ local php_slot="/usr/$(get_libdir)/${flag/-/.}" |
91 |
+ ./configure php \ |
92 |
+ --module=${flag} \ |
93 |
+ --config=${php_slot}/bin/php-config \ |
94 |
+ --lib-path=${php_slot}/$(get_libdir) || die "Module configuration failed: ${flag}" |
95 |
+ fi |
96 |
+ done |
97 |
+} |
98 |
+ |
99 |
+src_install() { |
100 |
+ default |
101 |
+ diropts -m 0770 |
102 |
+ keepdir /var/lib/${PN} |
103 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} |
104 |
+} |