1 |
commit: 44156ce363d103b192bae659becf772e7100d4cb |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 1 19:57:39 2023 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 1 19:57:39 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44156ce3 |
7 |
|
8 |
www-servers/nginx-unit: add 1.29.1 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
www-servers/nginx-unit/Manifest | 1 + |
13 |
www-servers/nginx-unit/nginx-unit-1.29.1.ebuild | 99 +++++++++++++++++++++++++ |
14 |
2 files changed, 100 insertions(+) |
15 |
|
16 |
diff --git a/www-servers/nginx-unit/Manifest b/www-servers/nginx-unit/Manifest |
17 |
index af881738fd54..fa2f4f5bf36f 100644 |
18 |
--- a/www-servers/nginx-unit/Manifest |
19 |
+++ b/www-servers/nginx-unit/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST nginx-unit-1.29.0.tar.gz 903909 BLAKE2B d9e2544ce7ffb4f9a510afaef2ddbf54a4482558d0cd3dd526c1371413e32fc72e848c95d3866928c1accc19bc2aecdb4c26b6907bfa57c382db53cc2f9fad3e SHA512 6b0a6718be5c3312f5e17fc39ae35ca849049c97d29c63a7effda7f994274af29eed88970389bb3010a2103c431e69920c951de5004853004d1aa604d868bd9f |
22 |
+DIST nginx-unit-1.29.1.tar.gz 906654 BLAKE2B 1068a1002b05f6f9f28b19745e3c1c0f1d1def89fad8489174fd7b38ddd8c9678f27a3b105f98a17d537621cdd2cbedf9f39b4c284a7918d290287f3c324fa49 SHA512 c99cea78804ead999e62777132fe204e0f87e1b58e55b0b4a074ab8d203149c14c8faef64872a44404f8fca5bfd98d2f9e4aae2db89bebeee15f27cabbc9f247 |
23 |
|
24 |
diff --git a/www-servers/nginx-unit/nginx-unit-1.29.1.ebuild b/www-servers/nginx-unit/nginx-unit-1.29.1.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..944eabe1322d |
27 |
--- /dev/null |
28 |
+++ b/www-servers/nginx-unit/nginx-unit-1.29.1.ebuild |
29 |
@@ -0,0 +1,99 @@ |
30 |
+# Copyright 1999-2023 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+PYTHON_COMPAT=( python3_{9..11} ) |
36 |
+ |
37 |
+inherit flag-o-matic python-single-r1 systemd toolchain-funcs |
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 |
+S="${WORKDIR}/${MY_P}" |
44 |
+ |
45 |
+LICENSE="Apache-2.0" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64" |
48 |
+MY_USE="perl python ruby" |
49 |
+MY_USE_PHP="php7-4 php8-0 php8-1 " |
50 |
+IUSE="${MY_USE} ${MY_USE_PHP} ssl" |
51 |
+REQUIRED_USE="|| ( ${IUSE} ) |
52 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
53 |
+ |
54 |
+DEPEND="perl? ( dev-lang/perl:= ) |
55 |
+ php7-4? ( dev-lang/php:7.4[embed] ) |
56 |
+ php8-0? ( dev-lang/php:8.0[embed] ) |
57 |
+ php8-1? ( dev-lang/php:8.1[embed] ) |
58 |
+ python? ( ${PYTHON_DEPS} ) |
59 |
+ ruby? ( |
60 |
+ dev-lang/ruby:= |
61 |
+ dev-ruby/rubygems:= |
62 |
+ ) |
63 |
+ ssl? ( dev-libs/openssl:0= ) |
64 |
+ virtual/libcrypt:0=" |
65 |
+RDEPEND="${DEPEND} |
66 |
+ acct-user/nginx-unit |
67 |
+ acct-group/nginx-unit" |
68 |
+ |
69 |
+pkg_setup() { |
70 |
+ use python && python-single-r1_pkg_setup |
71 |
+} |
72 |
+ |
73 |
+src_prepare() { |
74 |
+ eapply_user |
75 |
+ sed -i '/^CFLAGS/d' auto/make || die |
76 |
+ default |
77 |
+} |
78 |
+ |
79 |
+src_configure() { |
80 |
+ local opt=( |
81 |
+ --control=unix:/run/${PN}.sock |
82 |
+ --log=/var/log/${PN} |
83 |
+ --modules=$(get_libdir)/${PN} |
84 |
+ --pid=/run/${PN}.pid |
85 |
+ --prefix=/usr |
86 |
+ --state=/var/lib/${PN} |
87 |
+ --user=${PN} |
88 |
+ --group=${PN} |
89 |
+ ) |
90 |
+ |
91 |
+ use ssl && opt+=( --openssl ) |
92 |
+ export AR="$(tc-getAR)" |
93 |
+ export CC="$(tc-getCC)" |
94 |
+ ./configure ${opt[@]} --ld-opt="${LDFLAGS}" || die "Core configuration failed" |
95 |
+ |
96 |
+ # Modules require position-independent code |
97 |
+ append-cflags $(test-flags-CC -fPIC) |
98 |
+ |
99 |
+ for flag in ${MY_USE} ; do |
100 |
+ if use ${flag} ; then |
101 |
+ ./configure ${flag} || die "Module configuration failed: ${flag}" |
102 |
+ fi |
103 |
+ done |
104 |
+ |
105 |
+ for flag in ${MY_USE_PHP} ; do |
106 |
+ if use ${flag} ; then |
107 |
+ local php_slot="/usr/$(get_libdir)/${flag/-/.}" |
108 |
+ ./configure php \ |
109 |
+ --module=${flag} \ |
110 |
+ --config=${php_slot}/bin/php-config \ |
111 |
+ --lib-path=${php_slot}/$(get_libdir) || die "Module configuration failed: ${flag}" |
112 |
+ fi |
113 |
+ done |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ default |
118 |
+ |
119 |
+ diropts -m 0770 |
120 |
+ keepdir /var/lib/${PN} |
121 |
+ newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} |
122 |
+ newconfd "${FILESDIR}"/nginx-unit.confd nginx-unit |
123 |
+ systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service |
124 |
+} |
125 |
+ |
126 |
+pkg_postinst() { |
127 |
+ chown ${PN}:${PN} "${EROOT}"/var/lib/nginx-unit |
128 |
+} |