Gentoo Archives: gentoo-commits

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