Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/nginx-unit/
Date: Mon, 28 Oct 2019 06:52:39
Message-Id: 1572244776.424ed4537c26ea62a23bb040e691477ac1bc0e1b.juippis@gentoo
1 commit: 424ed4537c26ea62a23bb040e691477ac1bc0e1b
2 Author: Ralph Seichter <github <AT> seichter <DOT> de>
3 AuthorDate: Thu Oct 24 18:34:17 2019 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 28 06:39:36 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=424ed453
7
8 www-servers/nginx-unit: Build related bug fixes
9
10 This ebuild addresses CFLAGS/LDFLAGS issues and introduces a USE
11 flag for OpenSSL support.
12
13 Closes: https://bugs.gentoo.org/696964
14 Closes: https://bugs.gentoo.org/696966
15 Closes: https://bugs.gentoo.org/696972
16 Package-Manager: Portage-2.3.76, Repoman-2.3.16
17 Signed-off-by: Ralph Seichter <gentoo <AT> seichter.de>
18 Closes: https://github.com/gentoo/gentoo/pull/13417
19 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
20
21 www-servers/nginx-unit/nginx-unit-1.12.0-r1.ebuild | 72 ++++++++++++++++++++++
22 1 file changed, 72 insertions(+)
23
24 diff --git a/www-servers/nginx-unit/nginx-unit-1.12.0-r1.ebuild b/www-servers/nginx-unit/nginx-unit-1.12.0-r1.ebuild
25 new file mode 100644
26 index 00000000000..9554af89ad6
27 --- /dev/null
28 +++ b/www-servers/nginx-unit/nginx-unit-1.12.0-r1.ebuild
29 @@ -0,0 +1,72 @@
30 +# Copyright 1999-2019 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +PYTHON_COMPAT=(python2_7 python3_{5,6,7})
36 +
37 +inherit python-single-r1
38 +
39 +MY_P="unit-${PV}"
40 +DESCRIPTION="Dynamic web and application server"
41 +HOMEPAGE="https://unit.nginx.org"
42 +SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz"
43 +
44 +LICENSE="Apache-2.0"
45 +SLOT="0"
46 +KEYWORDS="~amd64"
47 +MY_USE="perl python ruby"
48 +MY_USE_PHP="php5-6 php7-1 php7-2 php7-3"
49 +IUSE="${MY_USE} ${MY_USE_PHP} ssl"
50 +REQUIRED_USE="|| ( ${IUSE} )
51 + python? ( ${PYTHON_REQUIRED_USE} )"
52 +
53 +DEPEND="perl? ( dev-lang/perl:= )
54 + php5-6? ( dev-lang/php:5.6[embed] )
55 + php7-1? ( dev-lang/php:7.1[embed] )
56 + php7-2? ( dev-lang/php:7.2[embed] )
57 + php7-3? ( dev-lang/php:7.3[embed] )
58 + python? ( ${PYTHON_DEPS} )
59 + ruby? ( dev-lang/ruby:= )
60 + ssl? ( dev-libs/openssl:= )"
61 +RDEPEND="${DEPEND}"
62 +S="${WORKDIR}/${MY_P}"
63 +
64 +pkg_setup() {
65 + use python && python-single-r1_pkg_setup
66 +}
67 +
68 +src_configure() {
69 + local opt=(
70 + --control=unix:/run/${PN}.sock
71 + --log=/var/log/${PN}
72 + --modules=$(get_libdir)/${PN}
73 + --pid=/run/${PN}.pid
74 + --prefix=/usr
75 + --state=/var/lib/${PN}
76 + )
77 + use ssl && opt+=( --openssl )
78 +
79 + ./configure ${opt[@]} --cc-opt="${CFLAGS}" --ld-opt="${LDFLAGS}" || die "Core configuration failed"
80 + for flag in ${MY_USE} ; do
81 + if use ${flag} ; then
82 + ./configure ${flag} || die "Module configuration failed: ${flag}"
83 + fi
84 + done
85 + for flag in ${MY_USE_PHP} ; do
86 + if use ${flag} ; then
87 + local php_slot="/usr/$(get_libdir)/${flag/-/.}"
88 + ./configure php \
89 + --module=${flag} \
90 + --config=${php_slot}/bin/php-config \
91 + --lib-path=${php_slot}/$(get_libdir) || die "Module configuration failed: ${flag}"
92 + fi
93 + done
94 +}
95 +
96 +src_install() {
97 + default
98 + diropts -m 0770
99 + keepdir /var/lib/${PN}
100 + newinitd "${FILESDIR}/${PN}.initd" ${PN}
101 +}