Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/nginx-unit/
Date: Sat, 27 Oct 2018 12:13:09
Message-Id: 1540642128.42c9b26103a61776489ae756f4d4bd20308c1717.mgorny@gentoo
1 commit: 42c9b26103a61776489ae756f4d4bd20308c1717
2 Author: Ralph Seichter <github <AT> seichter <DOT> de>
3 AuthorDate: Tue Sep 18 13:59:54 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 27 12:08:48 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42c9b261
7
8 www-servers/nginx-unit: Upstream release 1.5
9
10 This ebuild version supports NGINX Unit release 1.5 and allows
11 building PHP runtime modules.
12
13 Closes: https://bugs.gentoo.org/665362
14 Package-Manager: Portage-2.3.49, Repoman-2.3.10
15 Signed-off-by: Ralph Seichter <gentoo <AT> seichter.de>
16 Closes: https://github.com/gentoo/gentoo/pull/9905
17 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
18
19 www-servers/nginx-unit/Manifest | 1 +
20 www-servers/nginx-unit/metadata.xml | 6 +++
21 www-servers/nginx-unit/nginx-unit-1.5.ebuild | 67 ++++++++++++++++++++++++++++
22 3 files changed, 74 insertions(+)
23
24 diff --git a/www-servers/nginx-unit/Manifest b/www-servers/nginx-unit/Manifest
25 index 9faa8c2bda7..9bfd8b4574b 100644
26 --- a/www-servers/nginx-unit/Manifest
27 +++ b/www-servers/nginx-unit/Manifest
28 @@ -1 +1,2 @@
29 DIST nginx-unit-1.3.tar.gz 401670 BLAKE2B 34a0ed9631c7061d1c71f8335103b0e266ef6f949afeb8cef283a7b5dd6c9f0a4835f20fdedd091af6950cd0897cb1ab48dea9f475e1b75a2872da7ac0090d10 SHA512 63a47b920bfdae7a7e034d616f520b27b46151a299cf5854373f7f8472043de0ffc98f9d62317c46e637857e0ef24668ded99be6e058315acf25b4e1c7f1ed09
30 +DIST nginx-unit-1.5.tar.gz 437636 BLAKE2B 9f7b89a800c933cc6d55a444c5a6c6326cf1694062026419af5e8a13e68b35c47b631d961611342e20c3d9338ca727ed7cc38c27b43443ec3f9abafd18f6684a SHA512 bde6bc7720cff03bf3967fde265c6763fc84f597a7c785eae0174726cb8ad7676f0adade892c2944abad831a667fff250a75aeacdca2d1bffb8c0f8fcd291ebd
31
32 diff --git a/www-servers/nginx-unit/metadata.xml b/www-servers/nginx-unit/metadata.xml
33 index 7660440b3f5..73c93269432 100644
34 --- a/www-servers/nginx-unit/metadata.xml
35 +++ b/www-servers/nginx-unit/metadata.xml
36 @@ -16,6 +16,12 @@
37 reconfiguration of specific application parameters as needed by the
38 engineering or operations.
39 </longdescription>
40 + <use>
41 + <flag name="php5-6">Support for PHP 5.6</flag>
42 + <flag name="php7-0">Support for PHP 7.0</flag>
43 + <flag name="php7-1">Support for PHP 7.1</flag>
44 + <flag name="php7-2">Support for PHP 7.2</flag>
45 + </use>
46 <upstream>
47 <remote-id type="github">nginx/unit</remote-id>
48 </upstream>
49
50 diff --git a/www-servers/nginx-unit/nginx-unit-1.5.ebuild b/www-servers/nginx-unit/nginx-unit-1.5.ebuild
51 new file mode 100644
52 index 00000000000..e1eb3635fb1
53 --- /dev/null
54 +++ b/www-servers/nginx-unit/nginx-unit-1.5.ebuild
55 @@ -0,0 +1,67 @@
56 +# Copyright 1999-2018 Gentoo Foundation
57 +# Distributed under the terms of the GNU General Public License v2
58 +
59 +EAPI=7
60 +
61 +PYTHON_COMPAT=(python2_7 python3_{3,4,5,6,7})
62 +
63 +inherit python-single-r1
64 +
65 +MY_P="unit-${PV}"
66 +DESCRIPTION="A dynamic web and application server"
67 +HOMEPAGE="https://unit.nginx.org"
68 +SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz"
69 +
70 +LICENSE="Apache-2.0"
71 +SLOT="0"
72 +KEYWORDS="~amd64"
73 +MY_USE="perl python ruby"
74 +MY_USE_PHP="php5-6 php7-0 php7-1 php7-2"
75 +IUSE="${MY_USE} ${MY_USE_PHP}"
76 +REQUIRED_USE="|| ( ${IUSE} ) python? ( ${PYTHON_REQUIRED_USE} )"
77 +
78 +DEPEND="perl? ( dev-lang/perl:= )
79 + php5-6? ( dev-lang/php:5.6[embed] )
80 + php7-0? ( dev-lang/php:7.0[embed] )
81 + php7-1? ( dev-lang/php:7.1[embed] )
82 + php7-2? ( dev-lang/php:7.2[embed] )
83 + python? ( ${PYTHON_DEPS} )
84 + ruby? ( dev-lang/ruby:= )"
85 +RDEPEND="${DEPEND}"
86 +S="${WORKDIR}/${MY_P}"
87 +
88 +pkg_setup() {
89 + use python && python-single-r1_pkg_setup
90 +}
91 +
92 +src_configure() {
93 + ./configure \
94 + --control=unix:/run/${PN}.sock \
95 + --ld-opt="${LDFLAGS}" \
96 + --log=/var/log/${PN} \
97 + --modules=$(get_libdir)/${PN} \
98 + --pid=/run/${PN}.pid \
99 + --prefix=/usr \
100 + --state=/var/lib/${PN} || die "Core configuration failed"
101 + for flag in ${MY_USE} ; do
102 + if use ${flag} ; then
103 + ./configure ${flag} || die "Module configuration failed: ${flag}"
104 + fi
105 + done
106 + for flag in ${MY_USE_PHP} ; do
107 + if use ${flag} ; then
108 + local php_slot="/usr/$(get_libdir)/${flag/-/.}"
109 + ./configure php \
110 + --module=${flag} \
111 + --config=${php_slot}/bin/php-config \
112 + --lib-path=${php_slot}/$(get_libdir) || die "Module configuration failed: ${flag}"
113 + fi
114 + done
115 +}
116 +
117 +src_install() {
118 + default
119 + diropts -m 0770
120 + keepdir /var/lib/${PN}
121 + newinitd "${FILESDIR}/${PN}.initd" ${PN}
122 +}