Gentoo Archives: gentoo-commits

From: "Tiziano Mueller (dev-zero)" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-servers/nginx: ChangeLog nginx-0.8.42.ebuild
Date: Fri, 02 Jul 2010 05:29:25
Message-Id: 20100702052923.0F5682C621@corvid.gentoo.org
1 dev-zero 10/07/02 05:29:23
2
3 Modified: ChangeLog
4 Added: nginx-0.8.42.ebuild
5 Log:
6 Version bump (bug #323151, thanks to Johan Bergström).
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.263 www-servers/nginx/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.263&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.263&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?r1=1.262&r2=1.263
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v
19 retrieving revision 1.262
20 retrieving revision 1.263
21 diff -u -r1.262 -r1.263
22 --- ChangeLog 4 Jun 2010 13:25:50 -0000 1.262
23 +++ ChangeLog 2 Jul 2010 05:29:22 -0000 1.263
24 @@ -1,6 +1,11 @@
25 # ChangeLog for www-servers/nginx
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.262 2010/06/04 13:25:50 dev-zero Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.263 2010/07/02 05:29:22 dev-zero Exp $
29 +
30 +*nginx-0.8.42 (02 Jul 2010)
31 +
32 + 02 Jul 2010; Tiziano Müller <dev-zero@g.o> +nginx-0.8.42.ebuild:
33 + Version bump (bug #323151, thanks to Johan Bergström).
34
35 *nginx-0.8.38-r1 (04 Jun 2010)
36
37
38
39
40 1.1 www-servers/nginx/nginx-0.8.42.ebuild
41
42 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-0.8.42.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-0.8.42.ebuild?rev=1.1&content-type=text/plain
44
45 Index: nginx-0.8.42.ebuild
46 ===================================================================
47 # Copyright 1999-2010 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-0.8.42.ebuild,v 1.1 2010/07/02 05:29:22 dev-zero Exp $
50
51 EAPI="2"
52
53 # Maintainer notes:
54 # - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
55 # - any http-module activates the main http-functionality and overrides USE=-http
56 # - keep the following 3 requirements in mind before adding external modules:
57 # * alive upstream
58 # * sane packaging
59 # * builds cleanly
60 # - TODO: test the google-perftools module (included in vanilla tarball)
61
62 # prevent perl-module from adding automagic perl DEPENDs
63 GENTOO_DEPEND_ON_PERL="no"
64
65 # http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license)
66 HTTP_HEADERS_MORE_MODULE_PV="0.08"
67 HTTP_HEADERS_MORE_MODULE_P="ngx-http-headers-more-${HTTP_HEADERS_MORE_MODULE_PV}"
68 HTTP_HEADERS_MORE_MODULE_SHA1="5cd9a38"
69
70 # http_passenger (http://www.modrails.com/, MIT license)
71 # TODO: currently builds some stuff in src_configure
72 PASSENGER_PV="2.2.12"
73 USE_RUBY="ruby18"
74 RUBY_OPTIONAL="yes"
75
76 # http_push (http://pushmodule.slact.net/, MIT license)
77 HTTP_PUSH_MODULE_P="nginx_http_push_module-0.692"
78
79 inherit eutils ssl-cert toolchain-funcs perl-module ruby-ng flag-o-matic
80
81 DESCRIPTION="Robust, small and high performance http and reverse proxy server"
82 HOMEPAGE="http://nginx.net/
83 http://www.modrails.com/
84 http://pushmodule.slact.net/"
85 SRC_URI="http://sysoev.ru/nginx/${P}.tar.gz
86 nginx_modules_http_headers_more? ( http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
87 nginx_modules_http_passenger? ( mirror://rubyforge/passenger/passenger-${PASSENGER_PV}.tar.gz )
88 nginx_modules_http_push? ( http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz )"
89
90 LICENSE="BSD BSD-2 GPL-2 MIT"
91 SLOT="0"
92 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
93
94 NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi
95 geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi
96 split_clients upstream_ip_hash userid uwsgi"
97 NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter
98 perl random_index realip secure_link stub_status sub xslt"
99 NGINX_MODULES_MAIL="imap pop3 smtp"
100 NGINX_MODULES_3RD="http_headers_more http_passenger http_push"
101
102 IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax"
103
104 for mod in $NGINX_MODULES_STD; do
105 IUSE="${IUSE} +nginx_modules_http_${mod}"
106 done
107
108 for mod in $NGINX_MODULES_OPT; do
109 IUSE="${IUSE} nginx_modules_http_${mod}"
110 done
111
112 for mod in $NGINX_MODULES_MAIL; do
113 IUSE="${IUSE} nginx_modules_mail_${mod}"
114 done
115
116 for mod in $NGINX_MODULES_3RD; do
117 IUSE="${IUSE} nginx_modules_${mod}"
118 done
119
120 CDEPEND="
121 pcre? ( >=dev-libs/libpcre-4.2 )
122 ssl? ( dev-libs/openssl )
123 http-cache? ( userland_GNU? ( dev-libs/openssl ) )
124 nginx_modules_http_geo? ( dev-libs/geoip )
125 nginx_modules_http_gzip? ( sys-libs/zlib )
126 nginx_modules_http_gzip_static? ( sys-libs/zlib )
127 nginx_modules_http_image_filter? ( media-libs/gd )
128 nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
129 nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
130 nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) )
131 nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )
132 nginx_modules_http_passenger? (
133 $(ruby_implementation_depend ruby18)
134 >=dev-ruby/rubygems-0.9.0
135 >=dev-ruby/rake-0.8.1
136 >=dev-ruby/fastthread-1.0.1
137 >=dev-ruby/rack-1.0.0
138 )"
139 RDEPEND="${CDEPEND}"
140 DEPEND="${CDEPEND}
141 arm? ( dev-libs/libatomic_ops )
142 libatomic? ( dev-libs/libatomic_ops )"
143 PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
144
145 pkg_setup() {
146 ebegin "Creating nginx user and group"
147 enewgroup ${PN}
148 enewuser ${PN} -1 -1 -1 ${PN}
149 eend ${?}
150
151 if use ipv6; then
152 ewarn "Note that ipv6 support in nginx is still experimental."
153 ewarn "Be sure to read comments on gentoo bug #274614"
154 ewarn "http://bugs.gentoo.org/show_bug.cgi?id=274614"
155 fi
156
157 if use libatomic; then
158 ewarn "GCC 4.1+ features built-in atomic operations."
159 ewarn "Using libatomic_ops is only needed if using"
160 ewarn "a different compiler or a GCC prior to 4.1"
161 fi
162
163 if [[ -n $NGINX_ADD_MODULES ]]; then
164 ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
165 ewarn "This nginx installation is not supported!"
166 ewarn "Make sure you can reproduce the bug without those modules"
167 ewarn "_before_ reporting bugs."
168 fi
169
170 if use nginx_modules_http_passenger; then
171 ruby-ng_pkg_setup
172 use debug && append-flags -DPASSENGER_DEBUG
173 fi
174
175 if use !http; then
176 ewarn "To actually disable all http-functionality you also have to disable"
177 ewarn "all nginx http modules."
178 fi
179 }
180
181 src_unpack() {
182 # prevent ruby-ng.eclass from messing with src_unpack
183 default
184 }
185
186 src_prepare() {
187 sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make
188
189 if use nginx_modules_http_passenger; then
190 cd "${WORKDIR}"/passenger-${PASSENGER_PV}
191 epatch "${FILESDIR}"/passenger-CFLAGS.patch
192 fi
193 }
194
195 src_configure() {
196 local myconf= http_enabled= mail_enabled=
197
198 use aio && myconf="${myconf} --with-file-aio --with-aio_module"
199 use debug && myconf="${myconf} --with-debug"
200 use ipv6 && myconf="${myconf} --with-ipv6"
201 use libatomic && myconf="${myconf} --with-libatomic"
202 use pcre && myconf="${myconf} --with-pcre"
203
204 # HTTP modules
205 for mod in $NGINX_MODULES_STD; do
206 if use nginx_modules_http_${mod}; then
207 http_enabled=1
208 else
209 myconf="${myconf} --without-http_${mod}_module"
210 fi
211 done
212
213 for mod in $NGINX_MODULES_OPT; do
214 if use nginx_modules_http_${mod}; then
215 http_enabled=1
216 myconf="${myconf} --with-http_${mod}_module"
217 fi
218 done
219
220 if use nginx_modules_http_fastcgi; then
221 myconf="${myconf} --with-http_realip_module"
222 fi
223
224 # third-party modules
225 if use nginx_modules_http_headers_more; then
226 http_enabled=1
227 myconf="${myconf} --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}"
228 fi
229
230 if use nginx_modules_http_passenger; then
231 http_enabled=1
232 myconf="${myconf} --add-module=${WORKDIR}/passenger-${PASSENGER_PV}/ext/nginx"
233 fi
234
235 if use nginx_modules_http_push; then
236 http_enabled=1
237 myconf="${myconf} --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}"
238 fi
239
240 if use http || use http-cache; then
241 http_enabled=1
242 fi
243
244 if [ $http_enabled ]; then
245 use http-cache || myconf="${myconf} --without-http-cache"
246 use ssl && myconf="${myconf} --with-http_ssl_module"
247 else
248 myconf="${myconf} --without-http --without-http-cache"
249 fi
250
251 # MAIL modules
252 for mod in $NGINX_MODULES_MAIL; do
253 if use nginx_modules_mail_${mod}; then
254 mail_enabled=1
255 else
256 myconf="${myconf} --without-mail_${mod}_module"
257 fi
258 done
259
260 if [ $mail_enabled ]; then
261 myconf="${myconf} --with-mail"
262 use ssl && myconf="${myconf} --with-mail_ssl_module"
263 fi
264
265 # custom modules
266 for mod in $NGINX_ADD_MODULES; do
267 myconf="${myconf} --add-module=${mod}"
268 done
269
270 # http://bugs.gentoo.org/show_bug.cgi?id=286772
271 export LANG=C LC_ALL=C
272 tc-export CC
273
274 ./configure \
275 --prefix=/usr \
276 --sbin-path=/usr/sbin/nginx \
277 --conf-path=/etc/${PN}/${PN}.conf \
278 --error-log-path=/var/log/${PN}/error_log \
279 --pid-path=/var/run/${PN}.pid \
280 --lock-path=/var/lock/nginx.lock \
281 --user=${PN} --group=${PN} \
282 --with-cc-opt="-I${ROOT}usr/include" \
283 --with-ld-opt="-L${ROOT}usr/lib" \
284 --http-log-path=/var/log/${PN}/access_log \
285 --http-client-body-temp-path=/var/tmp/${PN}/client \
286 --http-proxy-temp-path=/var/tmp/${PN}/proxy \
287 --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \
288 --http-scgi-temp-path=/var/tmp/${PN}/scgi \
289 --http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \
290 ${myconf} || die "configure failed"
291 }
292
293 src_compile() {
294 # http://bugs.gentoo.org/show_bug.cgi?id=286772
295 export LANG=C LC_ALL=C
296 emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed"
297 }
298
299 src_install() {
300 keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi}
301
302 dosbin objs/nginx
303 newinitd "${FILESDIR}"/nginx.init-r2 nginx
304
305 cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf
306 rm conf/win-utf conf/koi-win conf/koi-utf
307
308 dodir /etc/${PN}
309 insinto /etc/${PN}
310 doins conf/*
311
312 dodoc CHANGES* README
313
314 # logrotate
315 insinto /etc/logrotate.d
316 newins "${FILESDIR}"/nginx.logrotate nginx
317
318 if use nginx_modules_http_perl; then
319 cd "${S}"/objs/src/http/modules/perl/
320 einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff"
321 fixlocalpod
322 fi
323
324 if use nginx_modules_http_push; then
325 docinto ${HTTP_PUSH_MODULE_P}
326 dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README}
327 fi
328
329 if use nginx_modules_http_passenger; then
330 # passengers Rakefile is so horribly broken that we have to do it
331 # manually
332 cd "${WORKDIR}"/passenger-${PASSENGER_PV}
333
334 export RUBY="ruby18"
335
336 insinto $(${RUBY} -rrbconfig -e 'print Config::CONFIG["archdir"]')/phusion_passenger
337 insopts -m 0755
338 doins ext/phusion_passenger/*.so
339 doruby -r lib/phusion_passenger
340
341 exeinto /usr/bin
342 doexe bin/passenger-memory-stats bin/passenger-status
343
344 exeinto /usr/libexec/passenger/bin
345 doexe bin/passenger-spawn-server
346
347 exeinto /usr/libexec/passenger/ext/nginx
348 doexe ext/nginx/HelperServer
349 fi
350 }
351
352 pkg_postinst() {
353 if use ssl; then
354 if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then
355 install_cert /etc/ssl/${PN}/${PN}
356 chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
357 fi
358 fi
359 }