1 |
patrick 11/12/28 05:49:12 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: nginx-1.1.12-r1.ebuild |
5 |
Log: |
6 |
Add pcre-jit support |
7 |
|
8 |
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.21 www-servers/nginx/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/metadata.xml?rev=1.21&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/metadata.xml?rev=1.21&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/metadata.xml?r1=1.20&r2=1.21 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/nginx/metadata.xml,v |
20 |
retrieving revision 1.20 |
21 |
retrieving revision 1.21 |
22 |
diff -u -r1.20 -r1.21 |
23 |
--- metadata.xml 28 Oct 2011 06:52:53 -0000 1.20 |
24 |
+++ metadata.xml 28 Dec 2011 05:49:12 -0000 1.21 |
25 |
@@ -14,6 +14,7 @@ |
26 |
<flag name='http'>Enable HTTP core support</flag> |
27 |
<flag name='http-cache'>Enable HTTP cache support</flag> |
28 |
<flag name='libatomic'>Use libatomic instead of builtin atomic operations</flag> |
29 |
+ <flag name='pcre-jit'>Enable JIT for pcre</flag> |
30 |
<flag name='nginx_modules_http_addition'>This module adds contents of |
31 |
other locations before and after the current location's |
32 |
content.</flag> |
33 |
|
34 |
|
35 |
|
36 |
1.303 www-servers/nginx/ChangeLog |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.303&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.303&content-type=text/plain |
40 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?r1=1.302&r2=1.303 |
41 |
|
42 |
Index: ChangeLog |
43 |
=================================================================== |
44 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v |
45 |
retrieving revision 1.302 |
46 |
retrieving revision 1.303 |
47 |
diff -u -r1.302 -r1.303 |
48 |
--- ChangeLog 27 Dec 2011 07:40:00 -0000 1.302 |
49 |
+++ ChangeLog 28 Dec 2011 05:49:12 -0000 1.303 |
50 |
@@ -1,6 +1,12 @@ |
51 |
# ChangeLog for www-servers/nginx |
52 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
53 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.302 2011/12/27 07:40:00 patrick Exp $ |
54 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.303 2011/12/28 05:49:12 patrick Exp $ |
55 |
+ |
56 |
+*nginx-1.1.12-r1 (28 Dec 2011) |
57 |
+ |
58 |
+ 28 Dec 2011; Patrick Lauer <patrick@g.o> +nginx-1.1.12-r1.ebuild, |
59 |
+ metadata.xml, nginx-1.1.12.ebuild: |
60 |
+ Add pcre-jit support |
61 |
|
62 |
*nginx-1.1.12 (27 Dec 2011) |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
1.1 www-servers/nginx/nginx-1.1.12-r1.ebuild |
68 |
|
69 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.1.12-r1.ebuild?rev=1.1&view=markup |
70 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.1.12-r1.ebuild?rev=1.1&content-type=text/plain |
71 |
|
72 |
Index: nginx-1.1.12-r1.ebuild |
73 |
=================================================================== |
74 |
# Copyright 1999-2011 Gentoo Foundation |
75 |
# Distributed under the terms of the GNU General Public License v2 |
76 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.1.12-r1.ebuild,v 1.1 2011/12/28 05:49:12 patrick Exp $ |
77 |
|
78 |
EAPI="4" |
79 |
|
80 |
# Maintainer notes: |
81 |
# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite |
82 |
# - any http-module activates the main http-functionality and overrides USE=-http |
83 |
# - keep the following requirements in mind before adding external modules: |
84 |
# * alive upstream |
85 |
# * sane packaging |
86 |
# * builds cleanly |
87 |
# * does not need a patch for nginx core |
88 |
# - TODO: test the google-perftools module (included in vanilla tarball) |
89 |
|
90 |
# prevent perl-module from adding automagic perl DEPENDs |
91 |
GENTOO_DEPEND_ON_PERL="no" |
92 |
|
93 |
# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) |
94 |
HTTP_UPLOAD_PROGRESS_MODULE_PV="0.8.3" |
95 |
HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" |
96 |
HTTP_UPLOAD_PROGRESS_MODULE_SHA1="c7c663f" |
97 |
HTTP_UPLOAD_PROGRESS_MODULE_URI="http://github.com/masterzen/nginx-upload-progress-module/tarball/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}" |
98 |
|
99 |
# http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license) |
100 |
HTTP_HEADERS_MORE_MODULE_PV="0.15" |
101 |
HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" |
102 |
HTTP_HEADERS_MORE_MODULE_SHA1="137855d" |
103 |
HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}" |
104 |
|
105 |
# http_push (http://pushmodule.slact.net/, MIT license) |
106 |
HTTP_PUSH_MODULE_PV="0.692" |
107 |
HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}" |
108 |
HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz" |
109 |
|
110 |
# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) |
111 |
HTTP_CACHE_PURGE_MODULE_PV="1.5" |
112 |
HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" |
113 |
HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz" |
114 |
|
115 |
# HTTP Upload module from Valery Kholodkov |
116 |
# (http://www.grid.net.ru/nginx/upload.en.html, BSD license) |
117 |
HTTP_UPLOAD_MODULE_PV="2.2.0" |
118 |
HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}" |
119 |
HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz" |
120 |
|
121 |
# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) |
122 |
HTTP_SLOWFS_CACHE_MODULE_PV="1.6" |
123 |
HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" |
124 |
HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz" |
125 |
|
126 |
inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic |
127 |
|
128 |
DESCRIPTION="Robust, small and high performance http and reverse proxy server" |
129 |
HOMEPAGE="http://nginx.org" |
130 |
SRC_URI="http://nginx.org/download/${P}.tar.gz |
131 |
nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) |
132 |
nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) |
133 |
nginx_modules_http_push? ( ${HTTP_PUSH_MODULE_URI} ) |
134 |
nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} ) |
135 |
nginx_modules_http_upload? ( ${HTTP_UPLOAD_MODULE_URI} ) |
136 |
nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} )" |
137 |
|
138 |
LICENSE="as-is BSD BSD-2 GPL-2 MIT" |
139 |
SLOT="0" |
140 |
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" |
141 |
|
142 |
NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi |
143 |
geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi |
144 |
split_clients upstream_ip_hash userid uwsgi" |
145 |
NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter |
146 |
mp4 perl random_index realip secure_link stub_status sub xslt" |
147 |
NGINX_MODULES_MAIL="imap pop3 smtp" |
148 |
NGINX_MODULES_3RD=" |
149 |
http_upload_progress |
150 |
http_headers_more |
151 |
http_passenger |
152 |
http_push |
153 |
http_cache_purge |
154 |
http_upload |
155 |
http_slowfs_cache" |
156 |
|
157 |
IUSE="aio debug +http +http-cache ipv6 libatomic +pcre pcre-jit ssl vim-syntax" |
158 |
|
159 |
for mod in $NGINX_MODULES_STD; do |
160 |
IUSE="${IUSE} +nginx_modules_http_${mod}" |
161 |
done |
162 |
|
163 |
for mod in $NGINX_MODULES_OPT; do |
164 |
IUSE="${IUSE} nginx_modules_http_${mod}" |
165 |
done |
166 |
|
167 |
for mod in $NGINX_MODULES_MAIL; do |
168 |
IUSE="${IUSE} nginx_modules_mail_${mod}" |
169 |
done |
170 |
|
171 |
for mod in $NGINX_MODULES_3RD; do |
172 |
IUSE="${IUSE} nginx_modules_${mod}" |
173 |
done |
174 |
|
175 |
CDEPEND=" |
176 |
pcre? ( >=dev-libs/libpcre-4.2 ) |
177 |
ssl? ( dev-libs/openssl ) |
178 |
http-cache? ( userland_GNU? ( dev-libs/openssl ) ) |
179 |
nginx_modules_http_geo? ( dev-libs/geoip ) |
180 |
nginx_modules_http_gzip? ( sys-libs/zlib ) |
181 |
nginx_modules_http_gzip_static? ( sys-libs/zlib ) |
182 |
nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] ) |
183 |
nginx_modules_http_perl? ( >=dev-lang/perl-5.8 ) |
184 |
nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 ) |
185 |
nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) ) |
186 |
nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )" |
187 |
RDEPEND="${CDEPEND}" |
188 |
DEPEND="${CDEPEND} |
189 |
arm? ( dev-libs/libatomic_ops ) |
190 |
libatomic? ( dev-libs/libatomic_ops )" |
191 |
PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" |
192 |
REQUIRED_USE="pcre-jit? ( pcre )" |
193 |
|
194 |
pkg_setup() { |
195 |
if use nginx_modules_http_passenger; then |
196 |
einfo |
197 |
einfo "Passenger support has been removed from the nginx ebuild to" |
198 |
einfo "get rid of file collisions, its broken build system and" |
199 |
einfo "incompatibilities between passenger 2 and 3." |
200 |
einfo |
201 |
einfo "Please switch to passenger-3 standalone or use the" |
202 |
einfo "unicorn gem which provides a sane nginx-like architecture" |
203 |
einfo "out of the box." |
204 |
einfo |
205 |
einfo "For more information on sane ruby deployments with" |
206 |
einfo "passenger-3/unicorn go to:" |
207 |
einfo |
208 |
einfo "https://rvm.beginrescueend.com" |
209 |
einfo |
210 |
die "nginx_modules_http_passenger still in IUSE" |
211 |
fi |
212 |
|
213 |
ebegin "Creating nginx user and group" |
214 |
enewgroup ${PN} |
215 |
enewuser ${PN} -1 -1 -1 ${PN} |
216 |
eend $? |
217 |
|
218 |
if use libatomic; then |
219 |
ewarn "GCC 4.1+ features built-in atomic operations." |
220 |
ewarn "Using libatomic_ops is only needed if using" |
221 |
ewarn "a different compiler or a GCC prior to 4.1" |
222 |
fi |
223 |
|
224 |
if [[ -n $NGINX_ADD_MODULES ]]; then |
225 |
ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" |
226 |
ewarn "This nginx installation is not supported!" |
227 |
ewarn "Make sure you can reproduce the bug without those modules" |
228 |
ewarn "_before_ reporting bugs." |
229 |
fi |
230 |
|
231 |
if use !http; then |
232 |
ewarn "To actually disable all http-functionality you also have to disable" |
233 |
ewarn "all nginx http modules." |
234 |
fi |
235 |
} |
236 |
|
237 |
src_prepare() { |
238 |
sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make |
239 |
} |
240 |
|
241 |
src_configure() { |
242 |
local myconf= http_enabled= mail_enabled= |
243 |
|
244 |
use aio && myconf+=" --with-file-aio --with-aio_module" |
245 |
use debug && myconf+=" --with-debug" |
246 |
use ipv6 && myconf+=" --with-ipv6" |
247 |
use libatomic && myconf+=" --with-libatomic" |
248 |
use pcre && myconf+=" --with-pcre" |
249 |
use pcre-jit && myconf+=" --with-pcre-jit" |
250 |
|
251 |
# HTTP modules |
252 |
for mod in $NGINX_MODULES_STD; do |
253 |
if use nginx_modules_http_${mod}; then |
254 |
http_enabled=1 |
255 |
else |
256 |
myconf+=" --without-http_${mod}_module" |
257 |
fi |
258 |
done |
259 |
|
260 |
for mod in $NGINX_MODULES_OPT; do |
261 |
if use nginx_modules_http_${mod}; then |
262 |
http_enabled=1 |
263 |
myconf+=" --with-http_${mod}_module" |
264 |
fi |
265 |
done |
266 |
|
267 |
if use nginx_modules_http_fastcgi; then |
268 |
myconf+=" --with-http_realip_module" |
269 |
fi |
270 |
|
271 |
# third-party modules |
272 |
if use nginx_modules_http_upload_progress; then |
273 |
http_enabled=1 |
274 |
myconf+=" --add-module=${WORKDIR}/masterzen-nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_SHA1}" |
275 |
fi |
276 |
|
277 |
if use nginx_modules_http_headers_more; then |
278 |
http_enabled=1 |
279 |
myconf+=" --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}" |
280 |
fi |
281 |
|
282 |
if use nginx_modules_http_push; then |
283 |
http_enabled=1 |
284 |
myconf+=" --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}" |
285 |
fi |
286 |
|
287 |
if use nginx_modules_http_cache_purge; then |
288 |
http_enabled=1 |
289 |
myconf+=" --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}" |
290 |
fi |
291 |
|
292 |
if use nginx_modules_http_upload; then |
293 |
http_enabled=1 |
294 |
myconf+=" --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}" |
295 |
fi |
296 |
|
297 |
if use nginx_modules_http_slowfs_cache; then |
298 |
http_enabled=1 |
299 |
myconf+=" --add-module=${WORKDIR}/${HTTP_SLOWFS_CACHE_MODULE_P}" |
300 |
fi |
301 |
|
302 |
if use http || use http-cache; then |
303 |
http_enabled=1 |
304 |
fi |
305 |
|
306 |
if [ $http_enabled ]; then |
307 |
use http-cache || myconf+=" --without-http-cache" |
308 |
use ssl && myconf+=" --with-http_ssl_module" |
309 |
else |
310 |
myconf+=" --without-http --without-http-cache" |
311 |
fi |
312 |
|
313 |
# MAIL modules |
314 |
for mod in $NGINX_MODULES_MAIL; do |
315 |
if use nginx_modules_mail_${mod}; then |
316 |
mail_enabled=1 |
317 |
else |
318 |
myconf+=" --without-mail_${mod}_module" |
319 |
fi |
320 |
done |
321 |
|
322 |
if [ $mail_enabled ]; then |
323 |
myconf+=" --with-mail" |
324 |
use ssl && myconf+=" --with-mail_ssl_module" |
325 |
fi |
326 |
|
327 |
# custom modules |
328 |
for mod in $NGINX_ADD_MODULES; do |
329 |
myconf+=" --add-module=${mod}" |
330 |
done |
331 |
|
332 |
# https://bugs.gentoo.org/286772 |
333 |
export LANG=C LC_ALL=C |
334 |
tc-export CC |
335 |
|
336 |
./configure \ |
337 |
--prefix=/usr \ |
338 |
--sbin-path=/usr/sbin/nginx \ |
339 |
--conf-path=/etc/${PN}/${PN}.conf \ |
340 |
--error-log-path=/var/log/${PN}/error_log \ |
341 |
--pid-path=/var/run/${PN}.pid \ |
342 |
--lock-path=/var/lock/nginx.lock \ |
343 |
--user=${PN} --group=${PN} \ |
344 |
--with-cc-opt="-I${ROOT}usr/include" \ |
345 |
--with-ld-opt="-L${ROOT}usr/lib" \ |
346 |
--http-log-path=/var/log/${PN}/access_log \ |
347 |
--http-client-body-temp-path=/var/tmp/${PN}/client \ |
348 |
--http-proxy-temp-path=/var/tmp/${PN}/proxy \ |
349 |
--http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \ |
350 |
--http-scgi-temp-path=/var/tmp/${PN}/scgi \ |
351 |
--http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \ |
352 |
${myconf} || die "configure failed" |
353 |
} |
354 |
|
355 |
src_compile() { |
356 |
# https://bugs.gentoo.org/286772 |
357 |
export LANG=C LC_ALL=C |
358 |
emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed" |
359 |
} |
360 |
|
361 |
src_install() { |
362 |
keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi} |
363 |
keepdir /var/www/localhost/htdocs |
364 |
|
365 |
dosbin objs/nginx |
366 |
newinitd "${FILESDIR}"/nginx.init-r2 nginx |
367 |
|
368 |
cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf |
369 |
rm conf/win-utf conf/koi-win conf/koi-utf |
370 |
|
371 |
dodir /etc/${PN} |
372 |
insinto /etc/${PN} |
373 |
doins conf/* |
374 |
|
375 |
doman man/nginx.8 |
376 |
dodoc CHANGES* README |
377 |
|
378 |
# logrotate |
379 |
insinto /etc/logrotate.d |
380 |
newins "${FILESDIR}"/nginx.logrotate nginx |
381 |
|
382 |
if use nginx_modules_http_perl; then |
383 |
cd "${S}"/objs/src/http/modules/perl/ |
384 |
einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff" |
385 |
fixlocalpod |
386 |
fi |
387 |
|
388 |
if use nginx_modules_http_push; then |
389 |
docinto ${HTTP_PUSH_MODULE_P} |
390 |
dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README} |
391 |
fi |
392 |
|
393 |
if use nginx_modules_http_cache_purge; then |
394 |
docinto ${HTTP_CACHE_PURGE_MODULE_P} |
395 |
dodoc "${WORKDIR}"/${HTTP_CACHE_PURGE_MODULE_P}/{CHANGES,README.md,TODO.md} |
396 |
fi |
397 |
|
398 |
if use nginx_modules_http_upload; then |
399 |
docinto ${HTTP_UPLOAD_MODULE_P} |
400 |
dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{Changelog,README} |
401 |
fi |
402 |
|
403 |
if use nginx_modules_http_slowfs_cache; then |
404 |
docinto ${HTTP_SLOWFS_CACHE_MODULE_P} |
405 |
dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README} |
406 |
fi |
407 |
} |
408 |
|
409 |
pkg_postinst() { |
410 |
if use ssl; then |
411 |
if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then |
412 |
install_cert /etc/ssl/${PN}/${PN} |
413 |
chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} |
414 |
fi |
415 |
fi |
416 |
} |