summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2011-09-07 08:34:34 +0000
committerBenedikt Boehm <hollow@gentoo.org>2011-09-07 08:34:34 +0000
commite9f1508c3a2e2bc5df418be109880d5c4bc2d632 (patch)
treedeca45d0885c19282bd65831aa011f9bd93252ce /www-servers
parentVersion bump, bug #381101 reported by Anton Kochkov. (diff)
downloadhistorical-e9f1508c3a2e2bc5df418be109880d5c4bc2d632.tar.gz
historical-e9f1508c3a2e2bc5df418be109880d5c4bc2d632.tar.bz2
historical-e9f1508c3a2e2bc5df418be109880d5c4bc2d632.zip
version bump wrt #381153. also fixes bugs #379477, #377713 and #373677.
Package-Manager: portage-2.2.0_alpha51/cvs/Linux x86_64
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/nginx/ChangeLog9
-rw-r--r--www-servers/nginx/Manifest12
-rw-r--r--www-servers/nginx/files/nginx.init-r223
-rw-r--r--www-servers/nginx/metadata.xml2
-rw-r--r--www-servers/nginx/nginx-1.0.6.ebuild347
-rw-r--r--www-servers/nginx/nginx-1.1.2.ebuild347
6 files changed, 730 insertions, 10 deletions
diff --git a/www-servers/nginx/ChangeLog b/www-servers/nginx/ChangeLog
index 8c7548e4c862..5e891d2694b6 100644
--- a/www-servers/nginx/ChangeLog
+++ b/www-servers/nginx/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-servers/nginx
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.287 2011/07/25 09:26:54 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.288 2011/09/07 08:34:33 hollow Exp $
+
+*nginx-1.1.2 (07 Sep 2011)
+*nginx-1.0.6 (07 Sep 2011)
+
+ 07 Sep 2011; Benedikt Böhm <hollow@gentoo.org> +nginx-1.0.6.ebuild,
+ +nginx-1.1.2.ebuild, files/nginx.init-r2, metadata.xml:
+ version bump wrt #381153. also fixes bugs #379477, #377713 and #373677.
*nginx-1.0.5 (25 Jul 2011)
diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest
index 2dbb8b1e511d..f87c574f4b2b 100644
--- a/www-servers/nginx/Manifest
+++ b/www-servers/nginx/Manifest
@@ -1,16 +1,22 @@
AUX nginx-0.8.32-ey-balancer.patch 1977 RMD160 fff19fd36b4f29c74b92bb55e6b1366163703b5f SHA1 844b771f567d4f0318977de904ed1559e88cc5c4 SHA256 2f254cdf0e95357226aed112d0798f2dac14b8a4f1392119aac95f75c00a3fac
AUX nginx.conf-r4 1358 RMD160 a948df249a16be86c114d587cfa5ee570d84a356 SHA1 e9db0447a1beb326a0858cf8189328229d1d3edf SHA256 6ff6c9301ea2a4d74a335b9119d7f9dba87d4e83793cf22d837d49f061763096
-AUX nginx.init-r2 1657 RMD160 a42538ae12cccfad1108fe2fca387ec666f4fd85 SHA1 7a0706894bed322d8b5814de98bca56d48c458d0 SHA256 9fceee69794de55b6da24ff2d11c72f6bc86339e7088c644b165dc35a9d5afa1
+AUX nginx.init-r2 1827 RMD160 2ece9278fd4a3ca948106e024c2607fca02e2599 SHA1 76af70e8fcad8b298851382d18160d11dc3e2cca SHA256 89801c2e0ea3480380dedfbc84b0cc993ab6b93768886246a22e650ba0a61798
AUX nginx.logrotate 364 RMD160 9fdfd2ea2f49b8dba20a030d893e34779bb32364 SHA1 4ab07992fa5c64f753e3643e1b51fcab4dec6ccf SHA256 9e3e090dfd10861d5f9b279e19113ce8d05caf9f33d488f6aabf9f19ac0cf925
DIST nginx-1.0.4.tar.gz 661444 RMD160 378b303ed91dc76cda12f2984b26c3aae9337599 SHA1 0496b7377e583116497f18453003cba3269417e9 SHA256 ff54f7deea3dc69da467f3b4c2c8167d5967a096451148ed362e20fb0203f043
DIST nginx-1.0.5.tar.gz 662122 RMD160 0dffd97fc59b706e11312f25f7937b7a74acb56c SHA1 34418bb8caade9a1204c6ddafc389edece052617 SHA256 b8c6df4e55a41425b57ba0de5ed8a84722dceb0eb7fbb4123f7f8f314763c8df
+DIST nginx-1.0.6.tar.gz 670835 RMD160 c0f81d1f15bccea44321c31e3f08e299e5e2e564 SHA1 e8b61da1aa5e53e0d298ec0159c4fca785dccd70 SHA256 2580c2d4cb56a70802702b81c0aea2e6b359a131c049a993b806f32791086cbe
+DIST nginx-1.1.2.tar.gz 674101 RMD160 54a1554a894cdd7e041da2a5cbf0876ee6092e88 SHA1 a8214bff7452c39c44f91853c104879b67849809 SHA256 cc64476ae800c45d2ba810274387139e5d8cbb8c1e45e8701416eea2a377151b
DIST nginx-ey-balancer-0.0.6.tar.gz 13192 RMD160 0e1dee4034023fd83639f1cc8333e05736b40a5c SHA1 2a4a97f7e6253b406775f29cff7b0b6b450563e2 SHA256 0b4728cfba04a452a5b9ebc3e304a6724ea914122d56edf0ff7c3b783205a905
DIST nginx_http_push_module-0.692.tar.gz 29119 RMD160 9d2be16074cf28115af0f1d8f3646937cda649ad SHA1 72103084cad8f4d3d9a49a6b04cf780e4541605d SHA256 64868708071aa21dbc4c7a07d149dd6ec9108fb7eaf2aad5ad069406151f17fe
DIST nginx_upload_module-2.2.0.tar.gz 25796 RMD160 5734af837be3fe8ec444a7e5e7f6707118594098 SHA1 93d6e83e613a0ce2ed057a434b344fa1b6609b47 SHA256 b1c26abe0427180602e257627b4ed21848c93cc20cefc33af084983767d65805
DIST ngx-http-headers-more-0.13.tar.gz 76271 RMD160 b11fbdf8e6fba5327fedd22e517da36340ec2473 SHA1 29def6aa44faf906d3c400b6379d6dd65d959590 SHA256 52e2cb3b81327e9225cfa87291b93dd96b798702f8e3b0f20f06d38850fc2629
DIST ngx_cache_purge-1.3.tar.gz 6434 RMD160 d9f5d225b99f3164e80a85b7c7b4bee8bb16ea0e SHA1 ec52989ed545ef2be58414e747e592004794eba6 SHA256 256eec780f0f8f09ed10d5b0e4c3c32883a55d96e814fa0390b880d20745fcdb
+DIST ngx_http_headers_more-0.15.tar.gz 22738 RMD160 2200ab529a086dd6bcf11a9a0470a4d05de7c824 SHA1 12bab1bbcecf57c410a812f5a7eebac49ff317f8 SHA256 d5ada29c15ff112c39599e3b245450ef785bb096c6724ecd8eaf1699b06e10e2
DIST ngx_slowfs_cache-1.6.tar.gz 10972 RMD160 e1d10851db4a55fc465665caa3f6989d142af2d3 SHA1 072d06b7547629b244bebeef7df7425567f264c9 SHA256 cc0505dbba30153691ff7b3a7353804d5ceb9a519a407b938cae49e9913a7bcc
+DIST ngx_upload_progress-0.8.2.tar.gz 16559 RMD160 3aadb9bf9b15b3810d1acb466d331ea5bdae6062 SHA1 cbff2734cccc3ac93b3422a9a01547af29f9c11d SHA256 cab70d2e300cfa0d9d7d3b34bf27810533ecbf11dddcd5078a4754cfab337c95
EBUILD nginx-1.0.4.ebuild 11221 RMD160 6fccf36d7f4462723f1e235c5db52e1aaa714908 SHA1 fc9b16d7805871a35e938ee8cb74f3f7f22e5d9a SHA256 96ead1975358ff9b4ab1c2c5ce0634bf85877098411061eac03d7728f340780e
EBUILD nginx-1.0.5.ebuild 11223 RMD160 96a6ad32102cb6cddd2d8b0275685db5284c3db6 SHA1 46fab79c05dff3f6114b6ff747ba5edd17fc1932 SHA256 b2f2368a29f31ba07d5168b39b8c331cc9e64c200f3a538af2319e46a6fa0a55
-MISC ChangeLog 47081 RMD160 feaccba6cae6bd6d26e1a7520ba668126aa7dc75 SHA1 b96721b4bba822a0bd3ca46982c57434301a8101 SHA256 cfb89115f0924e8337953e4e9924d0e57d280cb96a9ddf365e15eba4d8ee6fac
-MISC metadata.xml 2292 RMD160 7f4fcccb4e9a6b603f0459d43a45ca3be0fa4f53 SHA1 0a59c780ca02dd1db34dbb2aecb6220d3b4567a7 SHA256 0f31896a536f46c66c248a89ce24fdf662989ec6bef15ad053b652dff4b4e369
+EBUILD nginx-1.0.6.ebuild 11257 RMD160 f5e71833d82a550d2c1dd7b2a31decca246ea09a SHA1 8433543b56cab27c5e493cc2975f3eacf57ff501 SHA256 10ec1abcf97fdbb6abeeed89af6be48045625ba22c54d65da5d8b81e9dafed1f
+EBUILD nginx-1.1.2.ebuild 11257 RMD160 d1ce2335635da40ec6b16ad7d65642bc2d90b7c5 SHA1 b3fdfbcb5f00942de2de5ffa0fc1d68aecf33d91 SHA256 d78b595539f3e12d67552e9828914c18213bb66f1a352d68db106493b1673254
+MISC ChangeLog 47340 RMD160 013e9bd0f2490df1f000b15da9cdd971ca381197 SHA1 ca2fbd7c7ae64a0d6aac0281cb0ce5aea032d849 SHA256 9c3e968c71f6f8ed38dba5910b2edd02075af132978c51a101ffb7241ecfe697
+MISC metadata.xml 2424 RMD160 b642ed14bdf742790b3de95b131b65c59db2e584 SHA1 dc95f2d5a7ee5778d8e9c8f2c5f999a027b0b5a9 SHA256 715314fe824a3f09d88cce378496b4321acbf196a4ee07c2b0f7d8213a498ab4
diff --git a/www-servers/nginx/files/nginx.init-r2 b/www-servers/nginx/files/nginx.init-r2
index f4e0317d0e0b..466dfb3c2745 100644
--- a/www-servers/nginx/files/nginx.init-r2
+++ b/www-servers/nginx/files/nginx.init-r2
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx.init-r2,v 1.1 2010/01/03 19:51:41 djc Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx.init-r2,v 1.2 2011/09/07 08:34:34 hollow Exp $
opts="${opts} upgrade reload configtest"
@@ -11,7 +11,10 @@ depend() {
}
start() {
- configtest || return 1
+ if [ "${RC_CMD}" != "restart" ]; then
+ configtest || return 1
+ fi
+
ebegin "Starting nginx"
start-stop-daemon --start --pidfile /var/run/nginx.pid \
--exec /usr/sbin/nginx -- -c /etc/nginx/nginx.conf
@@ -19,10 +22,14 @@ start() {
}
stop() {
- configtest || return 1
+ if [ "${RC_CMD}" = "restart" ]; then
+ configtest || return 1
+ fi
+
ebegin "Stopping nginx"
start-stop-daemon --stop --pidfile /var/run/nginx.pid
eend $? "Failed to stop nginx"
+
rm -f /var/run/nginx.pid
}
@@ -60,12 +67,16 @@ upgrade() {
kill -QUIT `cat /var/run/nginx.pid.oldbin`
einfo "Upgrade completed"
-
eend $? "Upgrade failed"
}
configtest() {
ebegin "Checking nginx' configuration"
- /usr/sbin/nginx -c /etc/nginx/nginx.conf -t
+ /usr/sbin/nginx -c /etc/nginx/nginx.conf -t -q
+
+ if [ $? -ne 0 ]; then
+ /usr/sbin/nginx -c /etc/nginx/nginx.conf -t
+ fi
+
eend $? "failed, please correct errors above"
}
diff --git a/www-servers/nginx/metadata.xml b/www-servers/nginx/metadata.xml
index e3a9dcab716d..fba2a4f6c3b3 100644
--- a/www-servers/nginx/metadata.xml
+++ b/www-servers/nginx/metadata.xml
@@ -39,6 +39,8 @@
connection queue to nginx</flag>
<flag name='nginx_modules_http_slowfs_cache'>This module adds the
ability to cache static files</flag>
+ <flag name='nginx_modules_http_upload_progress'>This module adds the
+ ability to track POST upload progress via JSON API</flag>
<flag name='nginx_modules_mail_imap'>Enables IMAP proxy support</flag>
<flag name='nginx_modules_mail_pop3'>Enables POP3 proxy support</flag>
<flag name='nginx_modules_mail_smtp'>Enables SMTP proxy support</flag>
diff --git a/www-servers/nginx/nginx-1.0.6.ebuild b/www-servers/nginx/nginx-1.0.6.ebuild
new file mode 100644
index 000000000000..e316e6fe3bc6
--- /dev/null
+++ b/www-servers/nginx/nginx-1.0.6.ebuild
@@ -0,0 +1,347 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.6.ebuild,v 1.1 2011/09/07 08:34:34 hollow Exp $
+
+EAPI="4"
+
+# Maintainer notes:
+# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
+# - any http-module activates the main http-functionality and overrides USE=-http
+# - keep the following requirements in mind before adding external modules:
+# * alive upstream
+# * sane packaging
+# * builds cleanly
+# * does not need a patch for nginx core
+# - TODO: test the google-perftools module (included in vanilla tarball)
+
+# prevent perl-module from adding automagic perl DEPENDs
+GENTOO_DEPEND_ON_PERL="no"
+
+# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
+HTTP_UPLOAD_PROGRESS_MODULE_PV="0.8.2"
+HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
+HTTP_UPLOAD_PROGRESS_MODULE_SHA1="8b55a34"
+HTTP_UPLOAD_PROGRESS_MODULE_URI="http://github.com/masterzen/nginx-upload-progress-module/tarball/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
+
+# http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license)
+HTTP_HEADERS_MORE_MODULE_PV="0.15"
+HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}"
+HTTP_HEADERS_MORE_MODULE_SHA1="137855d"
+HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}"
+
+# http_push (http://pushmodule.slact.net/, MIT license)
+HTTP_PUSH_MODULE_PV="0.692"
+HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}"
+HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz"
+
+# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license)
+HTTP_CACHE_PURGE_MODULE_PV="1.3"
+HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
+HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz"
+
+# HTTP Upload module from Valery Kholodkov
+# (http://www.grid.net.ru/nginx/upload.en.html, BSD license)
+HTTP_UPLOAD_MODULE_PV="2.2.0"
+HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}"
+HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz"
+
+# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
+HTTP_SLOWFS_CACHE_MODULE_PV="1.6"
+HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
+HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz"
+
+inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic
+
+DESCRIPTION="Robust, small and high performance http and reverse proxy server"
+HOMEPAGE="http://nginx.org"
+SRC_URI="http://nginx.org/download/${P}.tar.gz
+ nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
+ nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
+ nginx_modules_http_push? ( ${HTTP_PUSH_MODULE_URI} )
+ nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} )
+ nginx_modules_http_upload? ( ${HTTP_UPLOAD_MODULE_URI} )
+ nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} )"
+
+LICENSE="as-is BSD BSD-2 GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
+
+NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi
+geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi
+split_clients upstream_ip_hash userid uwsgi"
+NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter
+perl random_index realip secure_link stub_status sub xslt"
+NGINX_MODULES_MAIL="imap pop3 smtp"
+NGINX_MODULES_3RD="
+ http_upload_progress
+ http_headers_more
+ http_passenger
+ http_push
+ http_cache_purge
+ http_upload
+ http_slowfs_cache"
+
+IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax"
+
+for mod in $NGINX_MODULES_STD; do
+ IUSE="${IUSE} +nginx_modules_http_${mod}"
+done
+
+for mod in $NGINX_MODULES_OPT; do
+ IUSE="${IUSE} nginx_modules_http_${mod}"
+done
+
+for mod in $NGINX_MODULES_MAIL; do
+ IUSE="${IUSE} nginx_modules_mail_${mod}"
+done
+
+for mod in $NGINX_MODULES_3RD; do
+ IUSE="${IUSE} nginx_modules_${mod}"
+done
+
+CDEPEND="
+ pcre? ( >=dev-libs/libpcre-4.2 )
+ ssl? ( dev-libs/openssl )
+ http-cache? ( userland_GNU? ( dev-libs/openssl ) )
+ nginx_modules_http_geo? ( dev-libs/geoip )
+ nginx_modules_http_gzip? ( sys-libs/zlib )
+ nginx_modules_http_gzip_static? ( sys-libs/zlib )
+ nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] )
+ nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
+ nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
+ nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) )
+ nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}
+ arm? ( dev-libs/libatomic_ops )
+ libatomic? ( dev-libs/libatomic_ops )"
+PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
+
+pkg_setup() {
+ if use nginx_modules_http_passenger; then
+ einfo
+ einfo "Passenger support has been removed from the nginx ebuild to"
+ einfo "get rid of file collisions, its broken build system and"
+ einfo "incompatibilities between passenger 2 and 3."
+ einfo
+ einfo "Please switch to passenger-3 standalone or use the"
+ einfo "unicorn gem which provides a sane nginx-like architecture"
+ einfo "out of the box."
+ einfo
+ einfo "For more information on sane ruby deployments with"
+ einfo "passenger-3/unicorn go to:"
+ einfo
+ einfo "https://rvm.beginrescueend.com"
+ einfo
+ die "nginx_modules_http_passenger still in IUSE"
+ fi
+
+ ebegin "Creating nginx user and group"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+ eend $?
+
+ if use ipv6; then
+ ewarn "Note that ipv6 support in nginx is still experimental."
+ ewarn "Be sure to read comments on gentoo bug #274614"
+ ewarn "http://bugs.gentoo.org/show_bug.cgi?id=274614"
+ fi
+
+ if use libatomic; then
+ ewarn "GCC 4.1+ features built-in atomic operations."
+ ewarn "Using libatomic_ops is only needed if using"
+ ewarn "a different compiler or a GCC prior to 4.1"
+ fi
+
+ if [[ -n $NGINX_ADD_MODULES ]]; then
+ ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
+ ewarn "This nginx installation is not supported!"
+ ewarn "Make sure you can reproduce the bug without those modules"
+ ewarn "_before_ reporting bugs."
+ fi
+
+ if use !http; then
+ ewarn "To actually disable all http-functionality you also have to disable"
+ ewarn "all nginx http modules."
+ fi
+}
+
+src_prepare() {
+ sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make
+}
+
+src_configure() {
+ local myconf= http_enabled= mail_enabled=
+
+ use aio && myconf+=" --with-file-aio --with-aio_module"
+ use debug && myconf+=" --with-debug"
+ use ipv6 && myconf+=" --with-ipv6"
+ use libatomic && myconf+=" --with-libatomic"
+ use pcre && myconf+=" --with-pcre"
+
+ # HTTP modules
+ for mod in $NGINX_MODULES_STD; do
+ if use nginx_modules_http_${mod}; then
+ http_enabled=1
+ else
+ myconf+=" --without-http_${mod}_module"
+ fi
+ done
+
+ for mod in $NGINX_MODULES_OPT; do
+ if use nginx_modules_http_${mod}; then
+ http_enabled=1
+ myconf+=" --with-http_${mod}_module"
+ fi
+ done
+
+ if use nginx_modules_http_fastcgi; then
+ myconf+=" --with-http_realip_module"
+ fi
+
+ # third-party modules
+ if use nginx_modules_http_upload_progress; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/masterzen-nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_SHA1}"
+ fi
+
+ if use nginx_modules_http_headers_more; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}"
+ fi
+
+ if use nginx_modules_http_push; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}"
+ fi
+
+ if use nginx_modules_http_cache_purge; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}"
+ fi
+
+ if use nginx_modules_http_upload; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}"
+ fi
+
+ if use nginx_modules_http_slowfs_cache; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_SLOWFS_CACHE_MODULE_P}"
+ fi
+
+ if use http || use http-cache; then
+ http_enabled=1
+ fi
+
+ if [ $http_enabled ]; then
+ use http-cache || myconf+=" --without-http-cache"
+ use ssl && myconf+=" --with-http_ssl_module"
+ else
+ myconf+=" --without-http --without-http-cache"
+ fi
+
+ # MAIL modules
+ for mod in $NGINX_MODULES_MAIL; do
+ if use nginx_modules_mail_${mod}; then
+ mail_enabled=1
+ else
+ myconf+=" --without-mail_${mod}_module"
+ fi
+ done
+
+ if [ $mail_enabled ]; then
+ myconf+=" --with-mail"
+ use ssl && myconf+=" --with-mail_ssl_module"
+ fi
+
+ # custom modules
+ for mod in $NGINX_ADD_MODULES; do
+ myconf+=" --add-module=${mod}"
+ done
+
+ # https://bugs.gentoo.org/286772
+ export LANG=C LC_ALL=C
+ tc-export CC
+
+ ./configure \
+ --prefix=/usr \
+ --sbin-path=/usr/sbin/nginx \
+ --conf-path=/etc/${PN}/${PN}.conf \
+ --error-log-path=/var/log/${PN}/error_log \
+ --pid-path=/var/run/${PN}.pid \
+ --lock-path=/var/lock/nginx.lock \
+ --user=${PN} --group=${PN} \
+ --with-cc-opt="-I${ROOT}usr/include" \
+ --with-ld-opt="-L${ROOT}usr/lib" \
+ --http-log-path=/var/log/${PN}/access_log \
+ --http-client-body-temp-path=/var/tmp/${PN}/client \
+ --http-proxy-temp-path=/var/tmp/${PN}/proxy \
+ --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \
+ --http-scgi-temp-path=/var/tmp/${PN}/scgi \
+ --http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \
+ ${myconf} || die "configure failed"
+}
+
+src_compile() {
+ # https://bugs.gentoo.org/286772
+ export LANG=C LC_ALL=C
+ emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi}
+ keepdir /var/www/localhost/htdocs
+
+ dosbin objs/nginx
+ newinitd "${FILESDIR}"/nginx.init-r2 nginx
+
+ cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf
+ rm conf/win-utf conf/koi-win conf/koi-utf
+
+ dodir /etc/${PN}
+ insinto /etc/${PN}
+ doins conf/*
+
+ doman man/nginx.8
+ dodoc CHANGES* README
+
+ # logrotate
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/nginx.logrotate nginx
+
+ if use nginx_modules_http_perl; then
+ cd "${S}"/objs/src/http/modules/perl/
+ einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff"
+ fixlocalpod
+ fi
+
+ if use nginx_modules_http_push; then
+ docinto ${HTTP_PUSH_MODULE_P}
+ dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README}
+ fi
+
+ if use nginx_modules_http_cache_purge; then
+ docinto ${HTTP_CACHE_PURGE_MODULE_P}
+ dodoc "${WORKDIR}"/${HTTP_CACHE_PURGE_MODULE_P}/{CHANGES,README}
+ fi
+
+ if use nginx_modules_http_upload; then
+ docinto ${HTTP_UPLOAD_MODULE_P}
+ dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{Changelog,README}
+ fi
+
+ if use nginx_modules_http_slowfs_cache; then
+ docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
+ dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README}
+ fi
+}
+
+pkg_postinst() {
+ if use ssl; then
+ if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then
+ install_cert /etc/ssl/${PN}/${PN}
+ chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
+ fi
+ fi
+}
diff --git a/www-servers/nginx/nginx-1.1.2.ebuild b/www-servers/nginx/nginx-1.1.2.ebuild
new file mode 100644
index 000000000000..6db3a3fd370e
--- /dev/null
+++ b/www-servers/nginx/nginx-1.1.2.ebuild
@@ -0,0 +1,347 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.1.2.ebuild,v 1.1 2011/09/07 08:34:34 hollow Exp $
+
+EAPI="4"
+
+# Maintainer notes:
+# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
+# - any http-module activates the main http-functionality and overrides USE=-http
+# - keep the following requirements in mind before adding external modules:
+# * alive upstream
+# * sane packaging
+# * builds cleanly
+# * does not need a patch for nginx core
+# - TODO: test the google-perftools module (included in vanilla tarball)
+
+# prevent perl-module from adding automagic perl DEPENDs
+GENTOO_DEPEND_ON_PERL="no"
+
+# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
+HTTP_UPLOAD_PROGRESS_MODULE_PV="0.8.2"
+HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
+HTTP_UPLOAD_PROGRESS_MODULE_SHA1="8b55a34"
+HTTP_UPLOAD_PROGRESS_MODULE_URI="http://github.com/masterzen/nginx-upload-progress-module/tarball/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
+
+# http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license)
+HTTP_HEADERS_MORE_MODULE_PV="0.15"
+HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}"
+HTTP_HEADERS_MORE_MODULE_SHA1="137855d"
+HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}"
+
+# http_push (http://pushmodule.slact.net/, MIT license)
+HTTP_PUSH_MODULE_PV="0.692"
+HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}"
+HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz"
+
+# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license)
+HTTP_CACHE_PURGE_MODULE_PV="1.3"
+HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
+HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz"
+
+# HTTP Upload module from Valery Kholodkov
+# (http://www.grid.net.ru/nginx/upload.en.html, BSD license)
+HTTP_UPLOAD_MODULE_PV="2.2.0"
+HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}"
+HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz"
+
+# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
+HTTP_SLOWFS_CACHE_MODULE_PV="1.6"
+HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
+HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz"
+
+inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic
+
+DESCRIPTION="Robust, small and high performance http and reverse proxy server"
+HOMEPAGE="http://nginx.org"
+SRC_URI="http://nginx.org/download/${P}.tar.gz
+ nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz )
+ nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
+ nginx_modules_http_push? ( ${HTTP_PUSH_MODULE_URI} )
+ nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} )
+ nginx_modules_http_upload? ( ${HTTP_UPLOAD_MODULE_URI} )
+ nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} )"
+
+LICENSE="as-is BSD BSD-2 GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
+
+NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi
+geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi
+split_clients upstream_ip_hash userid uwsgi"
+NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter
+perl random_index realip secure_link stub_status sub xslt"
+NGINX_MODULES_MAIL="imap pop3 smtp"
+NGINX_MODULES_3RD="
+ http_upload_progress
+ http_headers_more
+ http_passenger
+ http_push
+ http_cache_purge
+ http_upload
+ http_slowfs_cache"
+
+IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax"
+
+for mod in $NGINX_MODULES_STD; do
+ IUSE="${IUSE} +nginx_modules_http_${mod}"
+done
+
+for mod in $NGINX_MODULES_OPT; do
+ IUSE="${IUSE} nginx_modules_http_${mod}"
+done
+
+for mod in $NGINX_MODULES_MAIL; do
+ IUSE="${IUSE} nginx_modules_mail_${mod}"
+done
+
+for mod in $NGINX_MODULES_3RD; do
+ IUSE="${IUSE} nginx_modules_${mod}"
+done
+
+CDEPEND="
+ pcre? ( >=dev-libs/libpcre-4.2 )
+ ssl? ( dev-libs/openssl )
+ http-cache? ( userland_GNU? ( dev-libs/openssl ) )
+ nginx_modules_http_geo? ( dev-libs/geoip )
+ nginx_modules_http_gzip? ( sys-libs/zlib )
+ nginx_modules_http_gzip_static? ( sys-libs/zlib )
+ nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] )
+ nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
+ nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
+ nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) )
+ nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}
+ arm? ( dev-libs/libatomic_ops )
+ libatomic? ( dev-libs/libatomic_ops )"
+PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
+
+pkg_setup() {
+ if use nginx_modules_http_passenger; then
+ einfo
+ einfo "Passenger support has been removed from the nginx ebuild to"
+ einfo "get rid of file collisions, its broken build system and"
+ einfo "incompatibilities between passenger 2 and 3."
+ einfo
+ einfo "Please switch to passenger-3 standalone or use the"
+ einfo "unicorn gem which provides a sane nginx-like architecture"
+ einfo "out of the box."
+ einfo
+ einfo "For more information on sane ruby deployments with"
+ einfo "passenger-3/unicorn go to:"
+ einfo
+ einfo "https://rvm.beginrescueend.com"
+ einfo
+ die "nginx_modules_http_passenger still in IUSE"
+ fi
+
+ ebegin "Creating nginx user and group"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+ eend $?
+
+ if use ipv6; then
+ ewarn "Note that ipv6 support in nginx is still experimental."
+ ewarn "Be sure to read comments on gentoo bug #274614"
+ ewarn "http://bugs.gentoo.org/show_bug.cgi?id=274614"
+ fi
+
+ if use libatomic; then
+ ewarn "GCC 4.1+ features built-in atomic operations."
+ ewarn "Using libatomic_ops is only needed if using"
+ ewarn "a different compiler or a GCC prior to 4.1"
+ fi
+
+ if [[ -n $NGINX_ADD_MODULES ]]; then
+ ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
+ ewarn "This nginx installation is not supported!"
+ ewarn "Make sure you can reproduce the bug without those modules"
+ ewarn "_before_ reporting bugs."
+ fi
+
+ if use !http; then
+ ewarn "To actually disable all http-functionality you also have to disable"
+ ewarn "all nginx http modules."
+ fi
+}
+
+src_prepare() {
+ sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make
+}
+
+src_configure() {
+ local myconf= http_enabled= mail_enabled=
+
+ use aio && myconf+=" --with-file-aio --with-aio_module"
+ use debug && myconf+=" --with-debug"
+ use ipv6 && myconf+=" --with-ipv6"
+ use libatomic && myconf+=" --with-libatomic"
+ use pcre && myconf+=" --with-pcre"
+
+ # HTTP modules
+ for mod in $NGINX_MODULES_STD; do
+ if use nginx_modules_http_${mod}; then
+ http_enabled=1
+ else
+ myconf+=" --without-http_${mod}_module"
+ fi
+ done
+
+ for mod in $NGINX_MODULES_OPT; do
+ if use nginx_modules_http_${mod}; then
+ http_enabled=1
+ myconf+=" --with-http_${mod}_module"
+ fi
+ done
+
+ if use nginx_modules_http_fastcgi; then
+ myconf+=" --with-http_realip_module"
+ fi
+
+ # third-party modules
+ if use nginx_modules_http_upload_progress; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/masterzen-nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_SHA1}"
+ fi
+
+ if use nginx_modules_http_headers_more; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}"
+ fi
+
+ if use nginx_modules_http_push; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}"
+ fi
+
+ if use nginx_modules_http_cache_purge; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}"
+ fi
+
+ if use nginx_modules_http_upload; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}"
+ fi
+
+ if use nginx_modules_http_slowfs_cache; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_SLOWFS_CACHE_MODULE_P}"
+ fi
+
+ if use http || use http-cache; then
+ http_enabled=1
+ fi
+
+ if [ $http_enabled ]; then
+ use http-cache || myconf+=" --without-http-cache"
+ use ssl && myconf+=" --with-http_ssl_module"
+ else
+ myconf+=" --without-http --without-http-cache"
+ fi
+
+ # MAIL modules
+ for mod in $NGINX_MODULES_MAIL; do
+ if use nginx_modules_mail_${mod}; then
+ mail_enabled=1
+ else
+ myconf+=" --without-mail_${mod}_module"
+ fi
+ done
+
+ if [ $mail_enabled ]; then
+ myconf+=" --with-mail"
+ use ssl && myconf+=" --with-mail_ssl_module"
+ fi
+
+ # custom modules
+ for mod in $NGINX_ADD_MODULES; do
+ myconf+=" --add-module=${mod}"
+ done
+
+ # https://bugs.gentoo.org/286772
+ export LANG=C LC_ALL=C
+ tc-export CC
+
+ ./configure \
+ --prefix=/usr \
+ --sbin-path=/usr/sbin/nginx \
+ --conf-path=/etc/${PN}/${PN}.conf \
+ --error-log-path=/var/log/${PN}/error_log \
+ --pid-path=/var/run/${PN}.pid \
+ --lock-path=/var/lock/nginx.lock \
+ --user=${PN} --group=${PN} \
+ --with-cc-opt="-I${ROOT}usr/include" \
+ --with-ld-opt="-L${ROOT}usr/lib" \
+ --http-log-path=/var/log/${PN}/access_log \
+ --http-client-body-temp-path=/var/tmp/${PN}/client \
+ --http-proxy-temp-path=/var/tmp/${PN}/proxy \
+ --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \
+ --http-scgi-temp-path=/var/tmp/${PN}/scgi \
+ --http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \
+ ${myconf} || die "configure failed"
+}
+
+src_compile() {
+ # https://bugs.gentoo.org/286772
+ export LANG=C LC_ALL=C
+ emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi}
+ keepdir /var/www/localhost/htdocs
+
+ dosbin objs/nginx
+ newinitd "${FILESDIR}"/nginx.init-r2 nginx
+
+ cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf
+ rm conf/win-utf conf/koi-win conf/koi-utf
+
+ dodir /etc/${PN}
+ insinto /etc/${PN}
+ doins conf/*
+
+ doman man/nginx.8
+ dodoc CHANGES* README
+
+ # logrotate
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/nginx.logrotate nginx
+
+ if use nginx_modules_http_perl; then
+ cd "${S}"/objs/src/http/modules/perl/
+ einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff"
+ fixlocalpod
+ fi
+
+ if use nginx_modules_http_push; then
+ docinto ${HTTP_PUSH_MODULE_P}
+ dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README}
+ fi
+
+ if use nginx_modules_http_cache_purge; then
+ docinto ${HTTP_CACHE_PURGE_MODULE_P}
+ dodoc "${WORKDIR}"/${HTTP_CACHE_PURGE_MODULE_P}/{CHANGES,README}
+ fi
+
+ if use nginx_modules_http_upload; then
+ docinto ${HTTP_UPLOAD_MODULE_P}
+ dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{Changelog,README}
+ fi
+
+ if use nginx_modules_http_slowfs_cache; then
+ docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
+ dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README}
+ fi
+}
+
+pkg_postinst() {
+ if use ssl; then
+ if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then
+ install_cert /etc/ssl/${PN}/${PN}
+ chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
+ fi
+ fi
+}