Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

www-servers/nginx-1.3.5

  • Loading branch information...
commit 2643f759a3a5a50fb18a5892b54794d0622ef520 1 parent 0d6533e
@wmark authored
Showing with 450 additions and 0 deletions.
  1. +3 −0  www-servers/nginx/Manifest
  2. +447 −0 www-servers/nginx/nginx-1.3.5.ebuild
View
3  www-servers/nginx/Manifest
@@ -25,6 +25,7 @@ DIST nginx-1.3.1.tar.gz 721002 SHA256 9b30a6f67f0a9eda7db026e12d4f09656f9254cddb
DIST nginx-1.3.2.tar.gz 722119 SHA256 aaa513b74088a41d1ca174626f1119facd20fc86e4ad60d8611157b4bc8e77f8 SHA512 16ff69bc04812956738620daf17e43ed8728b2e6f382f9fa97e9398e0139a50522020bcf097beef2de85422dc9fd85842756779f09f5348b36592c3775b7b756 WHIRLPOOL 65b74a1888c989f5d7db858214cd304b986dfb0014a5c81c579a81a9c33ba39f93cec2578d7b853afbe9260795cf4b507c8d53d7c4ae70e98eb65282f3d2ea25
DIST nginx-1.3.3.tar.gz 723241 SHA256 93f4697d9db96d2d15d7d9371a7cd4569997a197a3c0c4f6c45a11bf0eaf3b92 SHA512 97ff27b5542edceda5431b86f1cc31296fc946a5ba510c38a1ebd3eb51a763f0af574af9976a57f73f04dc23a5849b5eb18dfa1604031abe2c7c30e616cd38d2 WHIRLPOOL 783bd284c9a1c813a9acc56a9e8b5d24d7bb423d83dda234fa63955cb1a7d32808e7f07d9af5d2e21192261608b6ed2ca14180034d0de5263f9cac3ba409f46b
DIST nginx-1.3.4.tar.gz 719954 SHA256 41a0cc9043f23250b7fd362da8e877d8e83507148ecfbf27d9b71749a6162540 SHA512 81e9eed8a91e1049b802e818647301e9e595466e49145c85bf25b27b529a4a8f8a60d48939f022fdf44e90e91bc573dd527232144a47d644d46e01a0c1f2b32a WHIRLPOOL c87c829c7f3439c00505492def910865c9c498d30dd557c7882702f213122da5260793c2fc662d56ecb563e80bceb178a24bcb18abb98dda7cfd4767186dfdb3
+DIST nginx-1.3.5.tar.gz 725169 SHA256 9b0cd90b76dba86cccc8f3442b6adddbde8441fa3f9b6ffb339f0c85c2f8ab44 SHA512 802a28e93e2bce169dcff7b88b574e9a9d58cc5f4dcebb391d81699c21b4a2daca69f9f411fd6839b51f215845313144d981dbbe130aa47993138952e04e86f0 WHIRLPOOL 349d1a25e9f33768dadf624715409e927feb6d8c2c3fee918ecdb570e4dc239f33ba709bb2295ad1ab0ffe0dc2ef3dd1c08f0b254842b6727c868bcf8629da0a
DIST nginx-http-concat-1.2.2.tbz2 6155 SHA256 efbe188d3f705491fe4b1d990d79769ec03398ba8816fb81d784b3efee735a56 SHA512 5f7003b72f8f320a417245cb903b77f81e4ba0e3aa955302afa125a9b2f6028893f882ae0a4ca3ec04eb55566e14b318ed2f8b5eb640b30e86e9d4c2ce236aed WHIRLPOOL 9ff827ab2221a9be267e2abb6a6d8a505263dd6752f510837208f4fa80627e143fc7912ec700330378c853c031e81c221833017331f100633643262a1b50889d
DIST nginx_accept_language_module-20081217.tbz2 3297 SHA256 95c431a08bdac717db9c386b2ae1d5d8c48eb9c681c7303bb25fcdcbeeb01ad4 SHA512 4ce6daa9bd6bce3948140cc073b664b321bee2cbc1ec0820f02bff1a3f7acaa8415b128328d5b1c942ce4d33c18811eff6b9f86e35207026c71e42c366ba9141 WHIRLPOOL 375d3dfe8a81f640acaac53ad482981bd0df16daa3e54184ec7f2f6ffe78312fe0179991faf25acb55bad0e2e74c7800b8781b377f2d7e53824de85b759f6588
DIST nginx_http_push_module-0.692.tar.gz 29119 SHA256 64868708071aa21dbc4c7a07d149dd6ec9108fb7eaf2aad5ad069406151f17fe
@@ -46,6 +47,7 @@ DIST passenger-3.0.13.tar.gz 2654448 SHA256 87d5299dd41cb9592bf459d8e4526090a9b3
DIST passenger-3.0.9.tar.gz 2365647 SHA256 40a15c46bd0be13a8d55931cc526c5dae740f7c02d2bfc40a82075967131d7f6 SHA512 9dff4c928d1646ce4a07a8da145dd8ed5e21b2a1a372ff0620a871f4b0010b0c9eb054002ecfbc9128f4ffd7d68cd54561b81921c068af594f6e1840b4d8d490 WHIRLPOOL dce02ad1c2e2eb5475edd85cbe607e7255b41e3c3ae1f2de4f983a80e7a3ee8e4c0f3e130cf1a466145693bcc8582c9afce31fe759b9f4d2d14086ade88fbb3d
DIST patch.spdy-46.txt 156027 SHA256 d5b7c4cfa97fb19f9d50d19c62f4df2b07c8ce8cb7c4bec8209a33ed4b9902d6 SHA512 2f824a7a2716a7ceb841716d09b6439bff9f882bd17086aee4655a7b5a71e2a137b7884c7fde9da381c42dfdece89915da4cf9dbd6d22a7d7f3a89617fdbde31 WHIRLPOOL 841b579b303e4a8a8e96ed055634ae670bdad30b8472a2faa6d6f05b134ee27f349fa24c469d4f5f02d251f31f48c2e15f781224353d84629d495164b45cbf84
DIST patch.spdy-49.txt 156639 SHA256 8202e15471505a34bdde43eb3fefff79d086aaad9afef6d0d731982ae761d0e6 SHA512 19b9d8dba44f312813b76c6f29b786c2852d3e994c0e0ccc7cde0366aa12aeea6191d3228ce79949334b4002f5fef28ecdaed406977fb2e6047a7b17713397e2 WHIRLPOOL 9a7b86bda109fb447729241e8d7afaf210d511e55057f49df2794b901246fc9d2737cccae5645618fa5cd407322e120441662ae1e949cd871c9b7343dcb4edf1
+DIST patch.spdy-52.txt 149646 SHA256 64715a608bbb7ad8d99359ebdc57d4bc7d6103778e8e8bf171b7b283c858ec08 SHA512 acb896dea732ac5763b471e9b6d7fc4e40d6c5ed0a82e53f0907369d1f6c7c71289e2c2001c850522853798cdbee40e1e4a74b904f2b1d96fba85a27484706cd WHIRLPOOL 88fc4e912944c4e615453a6155104e7fb17893a42a65ea752fef9d4347328693da9b250fd6f1deaa66eb61d3b63dc2162bed45408a6ed36d443293a2a81a1e68
EBUILD nginx-0.8.30.ebuild 3762 SHA256 2581f77823cd3dc686e2c8c4d221069353f9203c05f3e14af899b0d0192cffba SHA512 86156906beb7a622f15bf58810196b0ca87ab4670d29a65611f2cd17d7b0c37016fbad0428f03b7873a39fa82364deeb0db53000043d6d7275e2cd436677ead5 WHIRLPOOL c4172b971a7358cbae0168bf3c7ed67ff76f3548a01d46a1c98ad21a32cdfff310bcdb85dfd4847c028417ec7882c09a152338242f6376b50d4852b63a242d01
EBUILD nginx-0.8.42.ebuild 323 SHA256 a8337dd00e44aa4fe05e6035ad7cc3a8d9952ae66d4a493a9ff11fd7a1f1c8af SHA512 b596fb65916be22d127d351e484887480c1e8e8c557a5a6b157ce318771053b1e6b623aaddd25f2c05a7bdf20a2976c95e3263812ddf0de4c6a2fb62a88b6d7f WHIRLPOOL e0794a02c7dd4db61988f31ddf3924d73e7e23da67e16d28f5407fca8b105834b666b2dce579e76a99f8f3b8cec408c117334e3ad3905126e688c13ea8d07786
EBUILD nginx-0.8.55.ebuild 10898 SHA256 2d4b75e2b45543bcac94dd0842c7fa1c7817ab62aa04da0b953ff92b9cc1aac0 SHA512 f769f3c64fbb17bcfa7a45b7616bab6656f4e90dd2a5a8afa38d0edcf8535abac7c67eb5903f0146dfd33f12a734ce726ba27cbe6ad53988cd2b2ead768f04ee WHIRLPOOL d1feef441730822d0246528df1bca105882f7b7f4e5440a34c79e11ed363b08f772d63553f0bdb42da17b3ce2181ea9e59557e4674e1d01c32bed05eb7a1db77
@@ -58,3 +60,4 @@ EBUILD nginx-1.3.1.ebuild 14054 SHA256 6fe32ebda4e45406bbc740bb391484b1dfa2663a7
EBUILD nginx-1.3.2.ebuild 14054 SHA256 6fe32ebda4e45406bbc740bb391484b1dfa2663a755914e685c1fa8f1f6316c9 SHA512 106c93b2a8f62db295d63706bc4c407c6017e37e4bc5b325caa8083122943c4e032e08e767ef94f5240da9d8e734647478f29b56ef1fe76aea5d4041b6068374 WHIRLPOOL d89d8b932725a080984d1fbfad5adb91ea18b07c3bb2c22af2eea7bc73bb978bfe2f256372402ccea1de7b5fe1a787715e3d19c917c5f8ee547f8ca5dfd1e83e
EBUILD nginx-1.3.3.ebuild 14461 SHA256 3a38d7b23e6fbab5ef4e7cbc1f11ed644fec720568efcb97024469c20d90b1c9 SHA512 b89a7949d127ef07b22727667e6b9866020854a6b796ee3c41a224be9f1eea3e12896787a3159ac1c39bd2eee2f595658ec0fa79ced93b5ca9001761a678f5b5 WHIRLPOOL 82c2a030934cb08b2ecc4a1742af1b065834996b67764c3b43295fe5f3f24815aa743888ef3df476583e0695c97972dc2bf8213b7ebc9037fe00c7406086c685
EBUILD nginx-1.3.4.ebuild 14519 SHA256 5890ff81381f3fb3c16befc1f3dcdeabc8cc928cf20e027f7f2449dd52e2cb67 SHA512 b71f5bae958789d45d76b4eba5265538b953c4871ac3a864e0d99b889f694e1ffa761e2ee37bf590e3d889627aac4870348898d82b79257867a9fac1357acbc1 WHIRLPOOL 9b43c8cf932bf9bb83d3f4a669fc83c9e5ce4de5c5b7a472540e76be01381dc62ba63d55bf8d2988da4766f1dc5fc69ebc42bbb9fec198c3d1522008f7de043c
+EBUILD nginx-1.3.5.ebuild 14519 SHA256 b533164a8d41f56e8f48d78cc1978e15fc9ceb53cefc75bd533c89b85cf7543a SHA512 256fb9372ec215a53bb74e490b3fed91987f1a297930e5d3b57233c9b9f90d159dd0aa41bddb156a89854a5852f16d5aeb77eeb718f91c4de9040636990ce4c3 WHIRLPOOL 37ec403182e483d8bd2cbf3ddc8addca701343d622f78fa729f11cd5d1720d245d38659ddfbb3f1e0c97bf13a88cc08d50ac9ab97f3ec2a0c1a88939c31c1b28
View
447 www-servers/nginx/nginx-1.3.5.ebuild
@@ -0,0 +1,447 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Copyright 2011-2012 W-Mark Kubacki
+# Distributed under the terms of the OSI Reciprocal Public License
+
+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
+# - 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.9.0"
+HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
+HTTP_UPLOAD_PROGRESS_MODULE_SHA1="a788dea"
+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.17"
+HTTP_HEADERS_MORE_MODULE_P="ngx-http-headers-more-${HTTP_HEADERS_MORE_MODULE_PV}"
+HTTP_HEADERS_MORE_MODULE_SHA1="b7c8cfc"
+HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}"
+
+# http_passenger (http://www.modrails.com/, MIT license)
+# TODO: currently builds some stuff in src_configure
+# Please report runtime and compilation errors to Mark <wmark@hurrikane.de>
+PASSENGER_PV="3.0.13"
+USE_RUBY="ruby18 ree18 ruby19 jruby"
+RUBY_OPTIONAL="yes"
+
+# http_redis (http://wiki.nginx.org/HttpRedis)
+HTTP_REDIS_MODULE_P="ngx_http_redis-0.3.6"
+
+# 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.5"
+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.9"
+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"
+
+# http_concat (https://github.com/taobao/nginx-http-concat)
+HTTP_CONCAT_MODULE_PV="1.2.2"
+HTTP_CONCAT_MODULE_P="nginx-http-concat-${HTTP_CONCAT_MODULE_PV}"
+HTTP_CONCAT_MODULE_URI="http://binhost.ossdl.de/distfiles/${HTTP_CONCAT_MODULE_P}.tbz2"
+
+# http_gunzip (http://mdounin.ru/hg/ngx_http_gunzip_filter_module/)
+HTTP_GUNZIP_MODULE_PV="0.4"
+HTTP_GUNZIP_MODULE_P="ngx_http_gunzip_filter_module-${HTTP_GUNZIP_MODULE_PV}"
+HTTP_GUNZIP_MODULE_HASH="93115aab4c92"
+HTTP_GUNZIP_MODULE_S="ngx_http_gunzip_filter_module-${HTTP_GUNZIP_MODULE_HASH}"
+HTTP_GUNZIP_MODULE_URI="http://mdounin.ru/hg/ngx_http_gunzip_filter_module/archive/${HTTP_GUNZIP_MODULE_HASH}.tar.gz"
+
+# experimental SPDY support
+SPDY_PATCH_VER="52"
+
+inherit eutils ssl-cert toolchain-funcs perl-module ruby-ng 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_passenger? ( mirror://rubyforge/passenger/passenger-${PASSENGER_PV}.tar.gz )
+ nginx_modules_http_redis? ( http://people.freebsd.org/~osa/${HTTP_REDIS_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} )
+ nginx_modules_http_concat? ( ${HTTP_CONCAT_MODULE_URI} )
+ nginx_modules_http_gunzip? ( ${HTTP_GUNZIP_MODULE_URI} -> ${HTTP_GUNZIP_MODULE_P}.tar.gz )
+ nginx_modules_http_spdy? ( http://nginx.org/patches/spdy/patch.spdy-${SPDY_PATCH_VER}.txt )
+ "
+RESTRICT="primaryuri"
+
+LICENSE="as-is BSD BSD-2 GPL-2 MIT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86 arm ~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
+mp4 perl random_index realip secure_link stub_status sub xslt"
+NGINX_MODULES_MAIL="imap pop3 smtp"
+NGINX_MODULES_3RD="
+ http_concat
+ http_gunzip
+ http_upload_progress
+ http_headers_more
+ http_passenger
+ http_redis
+ http_push
+ http_cache_purge
+ http_upload
+ http_slowfs_cache
+ http_spdy
+ "
+
+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 )
+ nginx_modules_http_passenger? (
+ $(ruby_implementation_depend ruby18)
+ >=dev-ruby/rubygems-0.9.0
+ >=dev-ruby/rake-0.8.1
+ >=dev-ruby/fastthread-1.0.1
+ >=dev-ruby/rack-1.0.0
+ dev-libs/libev
+ )
+ nginx_modules_http_spdy? ( >=dev-libs/openssl-1.0.1 )"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}
+ arm? ( dev-libs/libatomic_ops )
+ ppc? ( dev-libs/libatomic_ops )
+ libatomic? ( dev-libs/libatomic_ops )"
+PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
+S="${WORKDIR}/${P}"
+
+REQUIRED_USE="nginx_modules_http_spdy? ( ssl http )"
+
+pkg_setup() {
+ ebegin "Creating nginx user and group"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+ eend ${?}
+
+ 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
+
+ if use nginx_modules_http_passenger; then
+ ruby-ng_pkg_setup
+ use debug && append-flags -DPASSENGER_DEBUG
+ fi
+}
+
+src_unpack() {
+ # prevent ruby-ng.eclass from messing with src_unpack
+ default
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/nginx-1.3.4-if_modified_since.patch"
+ epatch "${FILESDIR}/nginx-1.1.5-zero_filesize_check.patch"
+ if use nginx_modules_http_spdy; then
+ epatch "${DISTDIR}/patch.spdy-${SPDY_PATCH_VER}.txt"
+ ewarn "SPDY support is not mature, yet. Use with caution."
+ fi
+
+ sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make
+ sed -i 's/1001011/1001012/' "${S}"/src/core/nginx.h
+
+ if use nginx_modules_http_passenger; then
+ cd "${WORKDIR}"/passenger-${PASSENGER_PV}
+ epatch \
+ "${FILESDIR}/passenger-3.0.1-missing-include.patch"
+
+ sed -i \
+ -e 's|/usr/lib/phusion-passenger/agents|/usr/libexec/passenger/agents|' \
+ -e 's|/usr/share/phusion-passenger/helper-scripts|/usr/libexec/passenger/bin|' \
+ -e "s|/usr/share/doc/phusion-passenger|/usr/share/doc/${PF}|" \
+ lib/phusion_passenger.rb ext/common/ResourceLocator.h || die "sed failed"
+ fi
+}
+
+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 --with-pcre-jit"
+
+ # 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_passenger; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/passenger-${PASSENGER_PV}/ext/nginx"
+ fi
+
+ if use nginx_modules_http_redis; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_REDIS_MODULE_P}"
+ 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 nginx_modules_http_concat; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_CONCAT_MODULE_P}"
+ fi
+
+ if use nginx_modules_http_gunzip; then
+ http_enabled=1
+ myconf+=" --add-module=${WORKDIR}/${HTTP_GUNZIP_MODULE_S}"
+ 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
+
+ if use nginx_modules_http_passenger; then
+ # passengers Rakefile is so horribly broken that we have to do it
+ # manually
+ cd "${WORKDIR}"/passenger-${PASSENGER_PV}
+
+ export RUBY="ruby18"
+
+ insinto $(${RUBY} -rrbconfig -e 'print Config::CONFIG["archdir"]')
+ insopts -m 0755
+ doins ext/ruby/*/passenger_native_support.so
+ doruby -r lib/phusion_passenger lib/phusion_passenger.rb
+
+ exeinto /usr/bin
+ doexe bin/passenger-memory-stats bin/passenger-status
+
+ exeinto /usr/libexec/passenger/bin
+ doexe helper-scripts/passenger-spawn-server
+
+ exeinto /usr/libexec/passenger/agents
+ doexe agents/Passenger{LoggingAgent,Watchdog}
+
+ exeinto /usr/libexec/passenger/agents/nginx
+ doexe agents/nginx/PassengerHelperAgent
+ 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
+}
Please sign in to comment.
Something went wrong with that request. Please try again.