summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-04-16 07:48:49 +0000
committerMichał Górny <mgorny@gentoo.org>2015-04-16 07:48:49 +0000
commit93e0ec6cdd9a0cc0d309e58bc9c53d258be8e0f9 (patch)
treefefa623eeb1c817b974b81e8687980dd764d6e0a /www-servers
parentStable for x86, wrt bug #546706 (diff)
downloadhistorical-93e0ec6cdd9a0cc0d309e58bc9c53d258be8e0f9.tar.gz
historical-93e0ec6cdd9a0cc0d309e58bc9c53d258be8e0f9.tar.bz2
historical-93e0ec6cdd9a0cc0d309e58bc9c53d258be8e0f9.zip
Version bump along with http_headers_more module update. https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/97 by jbergstroem.
Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0xEFB4464E!
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/nginx/ChangeLog8
-rw-r--r--www-servers/nginx/Manifest39
-rw-r--r--www-servers/nginx/nginx-1.7.12.ebuild683
3 files changed, 711 insertions, 19 deletions
diff --git a/www-servers/nginx/ChangeLog b/www-servers/nginx/ChangeLog
index 020aca82e6e4..690f282739ea 100644
--- a/www-servers/nginx/ChangeLog
+++ b/www-servers/nginx/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for www-servers/nginx
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.405 2015/04/07 14:47:37 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.406 2015/04/16 07:48:37 mgorny Exp $
+
+*nginx-1.7.12 (16 Apr 2015)
+
+ 16 Apr 2015; Michał Górny <mgorny@gentoo.org> +nginx-1.7.12.ebuild:
+ Version bump along with http_headers_more module update.
+ https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/97 by jbergstroem.
*nginx-1.7.11 (28 Mar 2015)
diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest
index 24ab7dd5d551..3df1f5fc9b2a 100644
--- a/www-servers/nginx/Manifest
+++ b/www-servers/nginx/Manifest
@@ -1,5 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA256
AUX AJP-nginx-1.7.9+.patch 5674 SHA256 b4e01204056ed43d03c06e7955564ecd7f9b581cc238e93a14a64fc898cc3a66 SHA512 8b7cae860c6637b4cffa9c60cc624d8d22702030183d261efef77fc3ec964fb4c23360f4c9868a41a3de4584aed3e2e288c3dd173e0a4a727bba3da00e3979a5 WHIRLPOOL 4da8d0865319d2673ee032fec3ef9e8f0c6161bbc77a2cab959af50bf5aea35812ac80d66f19202b2deac56d4d47d84ce06b356495a1de60c8343eef5c9d252c
AUX check_1.7.2+.patch 6822 SHA256 e90d8d25d35c2315e3008c60954c4e57aed48d1eb9cab91466356d4967bc46ae SHA512 2857b3e2ae058601e7a1af9b6e7f41e01d4c47ec442df89c3dc407cf9fb6867ab126081547cf9336ccdc40a2a15ea8ab3ed024376d9fbb628432fa3057064440 WHIRLPOOL a96e88f5ff0e3a22745b662c79ed6c15e42ebe121e74f294f17f767e18f77dbecc6c6c105ea13c47d2a298a504115bbd1c9bed4189de2677485fd0eda5108ec8
@@ -14,6 +14,7 @@ DIST modsecurity-2.9.0.tar.gz 4246467 SHA256 e2bbf789966c1f80094d88d9085a81bde08
DIST modsecurity-apache_2.8.0.tar.gz 3940435 SHA256 95de6ec30982e5bde7981929ba89be89488e9f237ee8c4236e064b074bbb6f28 SHA512 2620d9ee0c7e40e02b908af5be916d1588f2ba55b8718495b6a3654e868973c45e8f8e794bf28b4677eb8a2d96ba427ead6ae4b26e48014bcd2b2f02013ceeef WHIRLPOOL cd90488ca5a85292bae32685ce44bcb82f46d98194636ba68f47a860c648c6933766bd56a38143f7656725fb3bd359de17f1b5513447c6ee40dbad945559fe4d
DIST nginx-1.7.10.tar.gz 828607 SHA256 df73c1b468cebaf3530a5de910bed45ff2cfccf2cf4b9215d0aa0f4e39cf4460 SHA512 b35f8761ca458ce7197d1474eee59ef0871e044198b18a426dc0a8e0aa834e4578a7080133126a15432c9e1d437778c4759059a870d0b184ea7bb4a4ab517902 WHIRLPOOL ba889799acfad5b2224a71f0e52637240427146edd2f6a5e125d6cbd75244f8615f91fb871a3099087683d5d45f895c21b89bf4341208a182211c678407650a2
DIST nginx-1.7.11.tar.gz 831490 SHA256 dad9d740210e638bfd480536910083ed13f04c04775eedf877984e1c61a69695 SHA512 549b132ac5249afbd968e9b50ba21a7b1513835b368b01c9d06566086439b3f2dde2775183e91ceb548d765d9a21e5cfc71c57866f4c2cc80cbf82f4658c2f24 WHIRLPOOL 5c82db945a5129829294ba05e17bc4082228d61156355e47856a03bbc693d8a2c44168b4e869ff8da90064c747480c0000c7b11bd5d14ce63883da06b1c0d7c8
+DIST nginx-1.7.12.tar.gz 831957 SHA256 22d1f0b6d064e125b01aeb2c6171682559d2488e1b102fc48ec564aa36e66897 SHA512 54dabbf56bdc7ffde69b0a010ab5dbee7237431f35ce81c78598b2205f8af88027521920d52f95f44dffbf872c409f10f0b8dbc9328e94e9e6c5e7d8a84b14d5 WHIRLPOOL baea92734046a997d3b0282e9bb7232c9d99ca0064685930113b1cc2d152c44698726747462a9c0b9afe776393efe9f609df8064a39028995632ef046db44b4f
DIST nginx-1.7.6.tar.gz 817265 SHA256 08e2efc169c9f9d511ce53ea16f17d8478ab9b0f7a653f212c03c61c52101599 SHA512 ac551020608e0c5ced17519509419e25513ab7a134f5e705cc8dd3866f3164c63ab7e3da9485ba5431d976978f4a9c68c5348bd102f9cb989c16f2e0ba65892a WHIRLPOOL bb247b8215fe10c6ad12df1da5e6fd7dfcd9ff441ef0bc1ecb9047ba132735a79ba4c5f0487bf8d2aee44ed940573b70ddaf0b77499d29fd4de8d9700b0ec038
DIST nginx-1.7.7.tar.gz 819949 SHA256 7e015a0a7a82cea5580f3507ae92cd8bb7cdeb6de0ab78f1e61044edcdc0bfd2 SHA512 3e8bf250e5f682a9a89cecd0b866b830735ebd5eb72ce760724d14b60296e9caa97abde7c79b46a6013ca013b9270a19aca55e0e43c8b8af123039f8341637d1 WHIRLPOOL eaa451b7dfd9ecf7872fe1ee48e64a35a14e824354687ab41fd1942785311b4e202858bfb40a0bf489467285c8496e7573335284df4c359729940c1febb9f334
DIST nginx-1.7.8.tar.gz 823122 SHA256 12f75ec302d3d3b841408e59bbf5116d38527b8c679abfcba7ceb866be60e8e5 SHA512 54833ad6d0ed6bda15d805d171abe980177c0a6d0651dd995d4bbb3d76b6ac77f7fe83d036716cab25c71d61477790967e6e5dcd8bbfdaa98c7e3baa5512323d WHIRLPOOL 2fec99391b394941ae1ffad34acefda3a94047ab509668b4eee99c62be3e1179a382206d90a714c107280e9f600493c1aad8bba73d868d136bee55d569316630
@@ -31,6 +32,7 @@ DIST ngx_http_echo-0.57.tar.gz 65073 SHA256 8467237ca0fae74ca7a32fbd34fc6044df30
DIST ngx_http_fancyindex-0.3.4.tar.gz 14275 SHA256 d7a84e66b3b3571e6a7e2531d00767f4354f85ce2f281d532ace2bcc35035f8b SHA512 a8a78f83f34c910e0959b04f45ba897f0c84f2a3f36d1c36cd32a8e2a5d9e53f2d0f30cf6a99ffd76edc6179cb70561984745943ec05cca10bdda7ed29c8bfe4 WHIRLPOOL eaafe4a95eed6f43efed354978040c0856ca5819ed0b141637aee0b1c0aafcf2cc205b130f0ca4de39b224dbfb7083c158a4388768fa2515890e227a43245474
DIST ngx_http_fancyindex-0.3.5.tar.gz 14837 SHA256 e0998e83be58bc5787fa9243a76a9d21de3cd01088d3cf63177ba88a562634a1 SHA512 ddb4ab3e8e47e1c49680db3e9f648f7cd582c07f963204105118e61432fa1e80c3f1bce69ed689db383011a9c155184bcc7e931eeae20bbd7cbdb5d4eb35a0a8 WHIRLPOOL a45db854d75f05a59c6f5e67c652850b5410162e7852abda20bb6720d29cc716f25ce7ea93ef52f9ff3f11d6d3a744c1fa4c7a6270fc1bd6d42f6743accb8e73
DIST ngx_http_headers_more-0.25-r1.tar.gz 27973 SHA256 1473f96f59dcec9d83ce65d691559993c1f80da8c0a4c0c0a30dae9f969eeabf SHA512 1a03e72ac5847b0eeada0ba1e5d5872399dd636db6aa54d10c9e53d96f4b5be4c785bf9117991d27ed558532fe9ce95d6f6c63f94f5b83350f5ea14a60c03aaf WHIRLPOOL 03a7e21814a05644bd1a459bc7b0b26dee0d4ec6ae81f4677f631fa1e4c52c679b651341d673319c6469adcf0ad8e29db58065f542e5907729a609edb6e633f4
+DIST ngx_http_headers_more-0.26.tar.gz 28028 SHA256 d6bdc51f9e778a3b23e41a51cae542c1467a1e5e55c1329a7ffc454be084fb6f SHA512 842927de67d28f3cff596607f209d1004b6d49f1d45b861758405ed6fe6f7aab76ad63530ccdfff1c1947db1190dd65dee0a29f50026bfa7a39a9a051561cf88 WHIRLPOOL 0dc37c36717be40a07112388d913d20bc99d76f90604da618d5547f24d93c636c14c2cca18191ff5916b40ec0113da648cfc07e1c00b1853f2b15ce056d5f3d7
DIST ngx_http_lua-0.9.12.tar.gz 512403 SHA256 e85c1924ca4670d5708b58efcd6e77793c43f243317a9850a112964067f63150 SHA512 c08546c074570408f646fc7ee60e60d732763a91f10b652858d95de070bd0dd4f0d4117114fc4b46d0f32cff88b21db5f394c3fbb2d2e5f1494fc01eedb782e4 WHIRLPOOL 2223bacff56b4ef942372e4eac3b1a02f21952804b0df6c626456ac2b6894ea068b704606f8a25c47de7887e97577a771fca6ce31d7288992f6f28eb0be27022
DIST ngx_http_lua-0.9.13.tar.gz 516077 SHA256 fb327bc4af649b70e588bef34478f18f5907be51c9fff4a233ac4100c5a70177 SHA512 1340a50e1b23845e1bcbb997c0e60e70a73552856151d16f97ae56683eff4870468ae9a3c8f3ddc475fd074e640fb5f2e2f4ce7f5711960ffdd6a8fc1a1829d5 WHIRLPOOL 4c02ffcd6f56426f34f152cbf1354b0e668cdde77c1136be95e28454ee316d73f856723c132dfc2cb95d715daee9b887dfe97fe1564f7f20a191349f5df00777
DIST ngx_http_lua-0.9.15.tar.gz 520190 SHA256 659fe4c201f4a4ae1007fa029cef472aaa837bf0904babb6158f83b86536c5b7 SHA512 1d809f873ced8e50422298bb4b730b8e7aaf442c11570cbe892fd73a414ff4f6d6eca7be8b2d2dbf57a136136b17d80596ee2f2f195dcb59776e78df5a94ae92 WHIRLPOOL caf128254f99d674eb370779c6e41c0b459be1c5a2baac7df1ff3498a38349bd2c140594eea3eb29c468a366e265421f90363886be73db0b3484cc6f386cb563
@@ -47,27 +49,28 @@ DIST ngx_rtmp-1.1.6.tar.gz 519666 SHA256 4039d1e7febd93188f729b594772d04d8a1137b
DIST ngx_rtmp-1.1.7.tar.gz 519735 SHA256 7922b0e3d5f3d9c4b275e4908cfb8f5fb1bfb3ac2df77f4c262cda56df21aab3 SHA512 9883462a04683f1e7af175da04b86d259ff6d677864667588fb073143f7130969eb2a5a5a48ddceda7a555b908580f179bdcacb7f0111413d51db5bfe43b396e WHIRLPOOL e9c1fc9c3c965ae7047657f76e0997d5da107aff7dd9e5cf3ddb5a2d8f388efd8439b82923e199dc36def449567b8529e06c80f69c36f42128236ac0be5719d5
EBUILD nginx-1.7.10.ebuild 25500 SHA256 b77ce06571722339617eefdce652abbc4c465ed851b53e7794d4763d716352ac SHA512 56423cc13625a572c1b1089750f25bc124eec44160b35557fc5fc28ee22ed29078e3cfe74f8862726208aaee7fd8525dab90f35df004e18195f2f92850420171 WHIRLPOOL 987b73cbc78402af5315800673468cd5ce110787d2ee89aae8e037946721804ef9efaf472cc713af9c6a84eaf6369118695f0cbea2eb7270682b672620f7bce9
EBUILD nginx-1.7.11.ebuild 25501 SHA256 96bf13cfa6288ab2c2380b287248c8932e894c2794a2493cf8273239ebf774ca SHA512 cbbfef4d04248973f996dfb3a6ff90502675ecb3c7d0067130ecd332f85b682a80ca5d783ae897ef8c2ded9d209668c613320e0015091d85342202534f414737 WHIRLPOOL 84c30491d2b9b5a120686c03c867a931596f86e8a9acdbee7dac2b51baddec82e11bfda03364f16f6a6885a68119cfb33a8a95812f348aff0b8a3d970171c8df
+EBUILD nginx-1.7.12.ebuild 25499 SHA256 fe021a4a80eb4ca2315d555a3001f14380de12af71368df6d36f24baaa0adf0e SHA512 a5fdadbcad6750d77065f0ba1acde306a9b93b0594870418a861dd0ad3ca6fa14aa4b1ee4b4215a2fabff57a1d8af58be129efb78ee703b9be8c7448445ad556 WHIRLPOOL d67cd5ae0afe8b26384af329ac532e462b9c038b92f1692a074513d45644e3c0d7a08ba3a3c660142c4e7c7827842503ec7d425bb044e42416d9e58a5c265ea5
EBUILD nginx-1.7.6.ebuild 25418 SHA256 d1a41371b2418bf252247c1fe48400d06919f3f546c454fb9883a2dd0723f01a SHA512 a856de131d390a25a4407805ba2c5f54dd2f636d35d7ce830c18dc82c4a1eaaba9d458f6f41840964129f33da57221f4c90fd5a2525971a08e65433f5c5782f4 WHIRLPOOL 275c77adefb2975ed6d5cced0633058e81bd183d8432faa979fccbf7a32327b99172b263a15d83f5aef5dc260b1c69a40cdebca118ab1b6bb17b0db4139e1d60
EBUILD nginx-1.7.7.ebuild 25427 SHA256 72624b67ff9445fdb0f73f73d49ce5428d1937a2efd3947900454c55c0e6bdfb SHA512 14bb2f9cfee4a1ddf32ee5566df039c19d25859afc7cfc963a6c3e4f628a7b8238e95b55193dec6da4cefa0aaa6d39cb932558305b8fe896d325a72d24545b10 WHIRLPOOL 24f3d89537a143016d1966140cc556b8fd0e3acaeba03ac9eee288e21ebedd9313af4f01ad4044025d1d878ed8ed977dd7d59508bec6b5a4383db8510a9bc972
EBUILD nginx-1.7.8.ebuild 25352 SHA256 a9facd2935f4dd11c53e3fab1608d3c7d9eac726c1103ea382d8dafed3a20f94 SHA512 9c91a27b6e0b4348736b8fb385aff33b1aa6c547bd8716740c93dfbc3ece0e695dd7d7400d4bb2e6cd9d5fcd4643a0a628b6eaea9c66252c41d3d0292432c285 WHIRLPOOL 889b35203114e6ecb18dc4bc2cf8aac92cc0602474ec1ab2d6c09ce34e858f0b83904056477a67ef3ff9b25343b5d84ab90c678a5d411b5d2467cd278dd6c16a
-MISC ChangeLog 68445 SHA256 a96f13d50313eefedc60424cc1d4d26b433760bfea0df0777e35c98b1de64a57 SHA512 f854b6edd71440448efbb55e61edbe2179d47834993c0b0525c3ce5962a1ed7a33c0a10304a6f56395e9d5e6e662d65c0e700a033fe2ea5a1e8f5eff362aea00 WHIRLPOOL 884a7247c3833930c5a5251e268db1e9fb4a4a84677dcc99863c9ac894f5562d7dd28673d07f3c0dd836cece526b62e3f4690181f10c012a730105c5307dd3a1
+MISC ChangeLog 68688 SHA256 40b1c8bde60386e92e7932858bb1283db8b80bde41841057d590bf43de377bde SHA512 733ea530eb905182391c2d4b9bbe5b7dac22b5136a0da3291d2e4b30733df27c0f1c9a5ee06d35552497f388249675776d4ed5f903c6ea186ec79a074f02d38f WHIRLPOOL c20adecf201efcbd06bb38761535ea9192a0dad8e8b669567a7253a1762158a500dafeb9e3a124a938d38d5a42a998199d636f50ab1f544331379e7db30bda36
MISC metadata.xml 1163 SHA256 fc62172e93d4857665e5e450d6304b613e4f41fb8a31bc3989219c6118064408 SHA512 e38044c19c5edd0580d5c93f1312b780dd2a253e1d811a8c04e24de1f29d1155c706d564fd5c0a7467ae2410edc2178cd7036e030906afa1d5974071ec46598e WHIRLPOOL 7244c3ec582db576a50a3ebee170e359c6b9f159294bc6ac276500cc5908ee044e326793a409e8e22ffa56a220341d144dc3852cdabd38fca1e30f60856c01fa
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0
+Version: GnuPG v2
-iQJ8BAEBCgBmBQJVI+4KXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
-ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyQ0JDQjFGMzBDQ0UxMjFGNENDNDgxMDdC
-OUQ0RjIzMUJEMTU1OEFCAAoJELnU8jG9FVir+ZAQAKMLwCfm5XcasATXwhfmo4lD
-7LSL2P2Qnr7olTSpEHR0y+sgUNi4IQzpFa4qI7E9I60mlHwtFFJpj74iPJl7NM64
-xRDmD1BX0lWj1yChbmLljY1A+yueYGKIHJ/4yGozfDzLVQ7/d9eXn1hgVmagaYyd
-fljGBMmQ6R/yzUso4JB9Bw5iIefF7lZffpWcPHIsaV6Fvh99g018pgkPu24aptCO
-foGc+1JjQEQLXJpOZz79sufo2XgNYAp3qouU1Ozd5qVWjEVLtj0EHGkzvnmLj/dt
-aIiDTTCJR4oILd+Imt57mNaroqUJ0pSjKJrBzlckjEDlHXGpXw4loEw0iy2Jbub6
-opktBdzUg5Z36DsP0fb2j4DEYrwcXk/qTxYlLz2AaDvNZ6jkkY7LSqHgqbGioWvc
-B5/guBC2qOGpKmJixxXsNmc48Y9pfiRfA8Ize9UPLU3g4M18CpKoIpBT9fMkfMJ3
-92gDlsGQuLYxUU1t/iPYH+1vZVtIVkFJaeVeKhRkrANdoFpWCLMQ3wRBbzG7n+S7
-hz/tgt+lfwJ92a8yxgyeZH9iBgJhUbs2/Tg4QqnNBo4Z4iPufQ2i/yACs1cWhH5q
-o6gMvWu51MlcGokMMJKkJ1GM+tIJgGi3IWR/MdZ92JeLpzS2Rgm1NBkBn45kxrbI
-4OOQrsNMJeVcRBcyHdAK
-=V0Ck
+iQJ8BAEBCABmBQJVL2lXXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC
+MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZObgwP/jpwf5NUm3qLJGbP3iH/LWbf
+RBz2CfYdT5gNFNA2QjHKS5fgdfnMyTuxW8eE6B/VrUI6U6LeDATuGpKCzc2GFOR6
+VigwpDAt5S3QEqtPMP4LUL1sqhfkm7PEM7zoS4QDiHg7CS6p6KbrpoflxyKCkpXC
+9/L8wgzz+yGEiyKoFzRAsTtrV1ap6r8SEZUMb7hd2O0/2xFWWy6+TcvS1Yq5IkxK
+/7jK4DLu8etNEr55tfyX/qbdfF9D8vuTURiv6ovb03BZsnI/a4nXINS6QTBKQNZC
+xP83Vz59PA9bWryievZEpdS8TiuULgS3yuFrT2qHac/04RiL7pj4XfrQkiulGljH
+wDhiXZQ+p0R9hkL4FiAErILe0K5TwfZfyB6Efu4UrmhWtkPSAxJgQLZvWioPaiF0
+EhR5DFYbb59xhKUkietjV3MhnF4Cv5XeKSsEOT+5mdmUb2nlYXvjttvYUnfV565D
+hDnvKwayGqOAbtG2DPIORJ45q+edFJIwa3h2+2TcXyLVNOIeQ9BWvX2XPR9e5dTb
+SfiLmuvT963YBM2XIbX451zCHKgYeKoyimL/U5sSC6VZl/2oNsCErcwRLfnmH8kH
+QA/NjTOWvd+NheFkR5po3z4UnJ5l6f2p6UmNa/pW/i5qSFMuGBwvxnF6+G8oigb5
+6PhfSVTj0hL7PlABMO6h
+=URW8
-----END PGP SIGNATURE-----
diff --git a/www-servers/nginx/nginx-1.7.12.ebuild b/www-servers/nginx/nginx-1.7.12.ebuild
new file mode 100644
index 000000000000..b2a24111e137
--- /dev/null
+++ b/www-servers/nginx/nginx-1.7.12.ebuild
@@ -0,0 +1,683 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.7.12.ebuild,v 1.1 2015/04/16 07:48:37 mgorny Exp $
+
+EAPI="5"
+
+# 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"
+
+# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license)
+DEVEL_KIT_MODULE_PV="0.2.19"
+DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1"
+DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz"
+DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}"
+
+# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license)
+HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.1"
+HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1"
+HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz"
+HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}"
+
+# http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license)
+HTTP_HEADERS_MORE_MODULE_PV="0.26"
+HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}"
+HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz"
+HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}"
+
+# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license)
+HTTP_CACHE_PURGE_MODULE_PV="2.3"
+HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
+HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz"
+HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
+
+# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
+HTTP_SLOWFS_CACHE_MODULE_PV="1.10"
+HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
+HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz"
+HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
+
+# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license)
+HTTP_FANCYINDEX_MODULE_PV="0.3.5"
+HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
+HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz"
+HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}"
+
+# http_lua (https://github.com/openresty/lua-nginx-module, BSD license)
+HTTP_LUA_MODULE_PV="0.9.15"
+HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}"
+HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz"
+HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}"
+
+# http_auth_pam (http://web.iti.upv.es/~sto/nginx/, BSD-2 license)
+HTTP_AUTH_PAM_MODULE_PV="1.4"
+HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}"
+HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz"
+HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}"
+
+# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license)
+HTTP_UPSTREAM_CHECK_MODULE_PV="0.3.0"
+HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
+HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/v${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz"
+HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}"
+
+# http_metrics (https://github.com/zenops/ngx_metrics, BSD license)
+HTTP_METRICS_MODULE_PV="0.1.1"
+HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}"
+HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz"
+HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}"
+
+# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+)
+HTTP_NAXSI_MODULE_PV="0.53-2"
+HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}"
+HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz"
+HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src"
+
+# nginx-rtmp-module (http://github.com/arut/nginx-rtmp-module, BSD license)
+RTMP_MODULE_PV="1.1.7"
+RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}"
+RTMP_MODULE_URI="http://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz"
+RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}"
+
+# nginx-dav-ext-module (http://github.com/arut/nginx-dav-ext-module, BSD license)
+HTTP_DAV_EXT_MODULE_PV="0.0.3"
+HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}"
+HTTP_DAV_EXT_MODULE_URI="http://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz"
+HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}"
+
+# echo-nginx-module (https://github.com/agentzh/echo-nginx-module, BSD license)
+HTTP_ECHO_MODULE_PV="0.57"
+HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}"
+HTTP_ECHO_MODULE_URI="https://github.com/agentzh/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz"
+HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}"
+
+# mod_security for nginx (https://modsecurity.org/, Apache-2.0)
+# keep the MODULE_P here consistent with upstream to avoid tarball duplication
+HTTP_SECURITY_MODULE_PV="2.9.0"
+HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}"
+HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz"
+HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}"
+
+# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3)
+HTTP_PUSH_STREAM_MODULE_PV="0.4.1"
+HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}"
+HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz"
+HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}"
+
+# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2)
+HTTP_STICKY_MODULE_PV="1.2.5"
+HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}"
+HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2"
+HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-bd312d586752"
+
+# ajp-module (https://github.com/yaoweibin/nginx_ajp_module, BSD-2)
+HTTP_AJP_MODULE_PV="0.3.0"
+HTTP_AJP_MODULE_P="ngx_http_ajp_module-${HTTP_AJP_MODULE_PV}"
+HTTP_AJP_MODULE_URI="https://github.com/yaoweibin/nginx_ajp_module/archive/v${HTTP_AJP_MODULE_PV}.tar.gz"
+HTTP_AJP_MODULE_WD="${WORKDIR}/nginx_ajp_module-${HTTP_AJP_MODULE_PV}"
+
+# mogilefs-module (http://www.grid.net.ru/nginx/mogilefs.en.html, BSD-2)
+HTTP_MOGILEFS_MODULE_PV="1.0.4"
+HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
+HTTP_MOGILEFS_MODULE_URI="http://www.grid.net.ru/nginx/download/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}.tar.gz"
+HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}"
+
+inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib
+
+DESCRIPTION="Robust, small and high performance http and reverse proxy server"
+HOMEPAGE="http://nginx.org"
+SRC_URI="http://nginx.org/download/${P}.tar.gz
+ ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_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_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
+ nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )
+ nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz )
+ nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz )
+ nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz )
+ nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz )
+ nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz )
+ nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz )
+ rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz )
+ nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz )
+ nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz )
+ nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz )
+ nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz )
+ nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 )
+ nginx_modules_http_ajp? ( ${HTTP_AJP_MODULE_URI} -> ${HTTP_AJP_MODULE_P}.tar.gz )
+ nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz )"
+
+LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+
+ nginx_modules_http_security? ( Apache-2.0 )
+ nginx_modules_http_push_stream? ( GPL-3 )"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi
+geo gzip limit_req limit_conn map memcached proxy referer rewrite scgi ssi
+split_clients upstream_ip_hash userid uwsgi"
+NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip gzip_static
+image_filter mp4 perl random_index realip secure_link spdy stub_status sub xslt"
+NGINX_MODULES_MAIL="imap pop3 smtp"
+NGINX_MODULES_3RD="
+ http_upload_progress
+ http_headers_more
+ http_cache_purge
+ http_slowfs_cache
+ http_fancyindex
+ http_lua
+ http_auth_pam
+ http_upstream_check
+ http_metrics
+ http_naxsi
+ http_dav_ext
+ http_echo
+ http_security
+ http_push_stream
+ http_sticky
+ http_ajp
+ http_mogilefs"
+
+IUSE="aio debug +http +http-cache ipv6 libatomic luajit +pcre pcre-jit rtmp
+selinux ssl userland_GNU 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 )
+ pcre-jit? ( >=dev-libs/libpcre-8.20[jit] )
+ ssl? ( dev-libs/openssl:0= )
+ http-cache? ( userland_GNU? ( dev-libs/openssl:0= ) )
+ nginx_modules_http_geoip? ( dev-libs/geoip )
+ nginx_modules_http_gunzip? ( sys-libs/zlib )
+ 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:0= ) )
+ nginx_modules_http_spdy? ( >=dev-libs/openssl-1.0.1c:0= )
+ nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )
+ nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) )
+ nginx_modules_http_auth_pam? ( virtual/pam )
+ nginx_modules_http_metrics? ( dev-libs/yajl )
+ nginx_modules_http_dav_ext? ( dev-libs/expat )
+ nginx_modules_http_security? ( >=dev-libs/libxml2-2.7.8 dev-libs/apr-util www-servers/apache )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-nginx )
+"
+DEPEND="${CDEPEND}
+ arm? ( dev-libs/libatomic_ops )
+ libatomic? ( dev-libs/libatomic_ops )"
+PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
+
+REQUIRED_USE="pcre-jit? ( pcre )
+ nginx_modules_http_lua? ( nginx_modules_http_rewrite )
+ nginx_modules_http_naxsi? ( pcre )
+ nginx_modules_http_dav_ext? ( nginx_modules_http_dav )
+ nginx_modules_http_metrics? ( nginx_modules_http_stub_status )
+ nginx_modules_http_security? ( pcre )
+ nginx_modules_http_push_stream? ( ssl )"
+
+pkg_setup() {
+ NGINX_HOME="/var/lib/nginx"
+ NGINX_HOME_TMP="${NGINX_HOME}/tmp"
+
+ ebegin "Creating nginx user and group"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 "${NGINX_HOME}" ${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
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch"
+
+ if use nginx_modules_http_upstream_check; then
+ epatch "${FILESDIR}"/check_1.7.2+.patch
+ fi
+
+ if use nginx_modules_http_lua; then
+ sed -i -e 's/-llua5.1/-llua/' "${HTTP_LUA_MODULE_WD}/config" || die
+ fi
+
+ if use nginx_modules_http_ajp; then
+ pushd "${HTTP_AJP_MODULE_WD}" > /dev/null
+ epatch "${FILESDIR}"/AJP-nginx-1.7.9+.patch
+ popd > /dev/null
+ fi
+
+ find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die
+ # We have config protection, don't rename etc files
+ sed -i 's:.default::' auto/install || die
+ # remove useless files
+ sed -i -e '/koi-/d' -e '/win-/d' auto/install || die
+
+ # don't install to /etc/nginx/ if not in use
+ local module
+ for module in fastcgi scgi uwsgi ; do
+ if ! use nginx_modules_http_${module}; then
+ sed -i -e "/${module}/d" auto/install || die
+ fi
+ done
+
+ epatch_user
+}
+
+src_configure() {
+ # mod_security needs to generate nginx/modsecurity/config before including it
+ if use nginx_modules_http_security; then
+ cd "${HTTP_SECURITY_MODULE_WD}"
+ if use luajit ; then
+ sed -i \
+ -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \
+ configure || die
+ fi
+ ./configure \
+ --enable-standalone-module \
+ $(use_enable pcre-jit) \
+ $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security"
+ fi
+
+ cd "${S}"
+
+ 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"
+ use pcre-jit && myconf+=" --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=${HTTP_UPLOAD_PROGRESS_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_headers_more; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_HEADERS_MORE_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_cache_purge; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_CACHE_PURGE_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_slowfs_cache; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_fancyindex; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_FANCYINDEX_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_lua; then
+ http_enabled=1
+ if use luajit; then
+ export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
+ export LUAJIT_INC=$(pkg-config --variable includedir luajit)
+ else
+ export LUA_LIB=$(pkg-config --variable libdir lua)
+ export LUA_INC=$(pkg-config --variable includedir lua)
+ fi
+ myconf+=" --add-module=${DEVEL_KIT_MODULE_WD}"
+ myconf+=" --add-module=${HTTP_LUA_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_auth_pam; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_AUTH_PAM_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_upstream_check; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_metrics; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_METRICS_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_naxsi ; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_NAXSI_MODULE_WD}"
+ fi
+
+ if use rtmp ; then
+ http_enabled=1
+ myconf+=" --add-module=${RTMP_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_dav_ext ; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_DAV_EXT_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_echo ; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_ECHO_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_security ; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity"
+ fi
+
+ if use nginx_modules_http_push_stream ; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_PUSH_STREAM_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_sticky ; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_STICKY_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_ajp ; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_AJP_MODULE_WD}"
+ fi
+
+ if use nginx_modules_http_mogilefs ; then
+ http_enabled=1
+ myconf+=" --add-module=${HTTP_MOGILEFS_MODULE_WD}"
+ 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
+
+ if ! use prefix; then
+ myconf+=" --user=${PN} --group=${PN}"
+ fi
+
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \
+ --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \
+ --pid-path="${EPREFIX}"/run/${PN}.pid \
+ --lock-path="${EPREFIX}"/run/lock/${PN}.lock \
+ --with-cc-opt="-I${EROOT}usr/include" \
+ --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \
+ --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \
+ --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \
+ --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \
+ --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \
+ --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \
+ --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \
+ ${myconf} || die "configure failed"
+
+ # A purely cosmetic change that makes nginx -V more readable. This can be
+ # good if people outside the gentoo community would troubleshoot and
+ # question the users setup.
+ sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die
+}
+
+src_compile() {
+ use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}"
+
+ # https://bugs.gentoo.org/286772
+ export LANG=C LC_ALL=C
+ emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D%/}" install
+
+ cp "${FILESDIR}"/nginx.conf "${ED}"etc/nginx/nginx.conf || die
+
+ newinitd "${FILESDIR}"/nginx.initd-r2 nginx
+
+ systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service
+
+ doman man/nginx.8
+ dodoc CHANGES* README
+
+ # just keepdir. do not copy the default htdocs files (bug #449136)
+ keepdir /var/www/localhost
+ rm -rf "${D}"usr/html || die
+
+ # set up a list of directories to keep
+ local keepdir_list="${NGINX_HOME_TMP}"/client
+ local module
+ for module in proxy fastcgi scgi uwsgi; do
+ use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}"
+ done
+
+ keepdir /var/log/nginx ${keepdir_list}
+
+ # this solves a problem with SELinux where nginx doesn't see the directories
+ # as root and tries to create them as nginx
+ fperms 0750 "${NGINX_HOME_TMP}"
+ fowners ${PN}:0 "${NGINX_HOME_TMP}"
+
+ fperms 0700 /var/log/nginx ${keepdir_list}
+ fowners ${PN}:${PN} /var/log/nginx ${keepdir_list}
+
+ # logrotate
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/nginx.logrotate-r1 nginx
+
+ if use nginx_modules_http_perl; then
+ cd "${S}"/objs/src/http/modules/perl/
+ emake DESTDIR="${D}" INSTALLDIRS=vendor
+ perl_delete_localpod
+ fi
+
+ if use nginx_modules_http_cache_purge; then
+ docinto ${HTTP_CACHE_PURGE_MODULE_P}
+ dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md}
+ fi
+
+ if use nginx_modules_http_slowfs_cache; then
+ docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
+ dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md}
+ fi
+
+ if use nginx_modules_http_fancyindex; then
+ docinto ${HTTP_FANCYINDEX_MODULE_P}
+ dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst
+ fi
+
+ if use nginx_modules_http_lua; then
+ docinto ${HTTP_LUA_MODULE_P}
+ dodoc "${HTTP_LUA_MODULE_WD}"/{Changes,README.markdown}
+ fi
+
+ if use nginx_modules_http_auth_pam; then
+ docinto ${HTTP_AUTH_PAM_MODULE_P}
+ dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog}
+ fi
+
+ if use nginx_modules_http_upstream_check; then
+ docinto ${HTTP_UPSTREAM_CHECK_MODULE_P}
+ dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES}
+ fi
+
+# README.md is still empty
+# if use nginx_modules_http_metrics; then
+# docinto ${HTTP_METRICS_MODULE_P}
+# dodoc "${HTTP_METRICS_MODULE_WD}"/README.md
+# fi
+
+ if use nginx_modules_http_naxsi; then
+ insinto /etc/nginx
+ doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules
+ fi
+
+ if use rtmp; then
+ docinto ${RTMP_MODULE_P}
+ dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl}
+ fi
+
+ if use nginx_modules_http_dav_ext; then
+ docinto ${HTTP_DAV_EXT_MODULE_P}
+ dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README
+ fi
+
+ if use nginx_modules_http_echo; then
+ docinto ${HTTP_ECHO_MODULE_P}
+ dodoc "${HTTP_ECHO_MODULE_WD}"/{README.markdown,doc/HttpEchoModule.wiki}
+ fi
+
+ if use nginx_modules_http_security; then
+ docinto ${HTTP_SECURITY_MODULE_P}
+ dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.TXT,authors.txt}
+ fi
+
+ if use nginx_modules_http_push_stream; then
+ docinto ${HTTP_PUSH_STREAM_MODULE_P}
+ dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile}
+ fi
+
+ if use nginx_modules_http_sticky; then
+ docinto ${HTTP_STICKY_MODULE_P}
+ dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf}
+ fi
+
+ if use nginx_modules_http_ajp; then
+ docinto ${HTTP_AJP_MODULE_P}
+ dodoc "${HTTP_AJP_MODULE_WD}"/README
+ fi
+}
+
+pkg_postinst() {
+ if use ssl; then
+ if [ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]; then
+ install_cert /etc/ssl/${PN}/${PN}
+ use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
+ fi
+ fi
+
+ if use nginx_modules_http_lua && use nginx_modules_http_spdy; then
+ ewarn "Lua 3rd party module author warns against using ${P} with"
+ ewarn "NGINX_MODULES_HTTP=\"lua spdy\". For more info, see http://git.io/OldLsg"
+ fi
+
+ # This is the proper fix for bug #458726/#469094, resp. CVE-2013-0337 for
+ # existing installations
+ local fix_perms=0
+
+ for rv in ${REPLACING_VERSIONS} ; do
+ version_compare ${rv} 1.4.1-r2
+ [[ $? -eq 1 ]] && fix_perms=1
+ done
+
+ if [[ $fix_perms -eq 1 ]] ; then
+ ewarn "To fix a security bug (CVE-2013-0337, bug #458726) had the following"
+ ewarn "directories the world-readable bit removed (if set):"
+ ewarn " ${EPREFIX}/var/log/nginx"
+ ewarn " ${EPREFIX}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}"
+ ewarn "Check if this is correct for your setup before restarting nginx!"
+ ewarn "This is a one-time change and will not happen on subsequent updates."
+ ewarn "Furthermore nginx' temp directories got moved to ${NGINX_HOME_TMP}"
+ chmod -f o-rwx "${EPREFIX}"/var/log/nginx "${EPREFIX}${NGINX_HOME_TMP}"/{,client,proxy,fastcgi,scgi,uwsgi}
+ fi
+
+ # If the nginx user can't change into or read the dir, display a warning.
+ # If su is not available we display the warning nevertheless since we can't check properly
+ su -s /bin/sh -c 'cd /var/log/nginx/ && ls' nginx >&/dev/null
+ if [ $? -ne 0 ] ; then
+ ewarn "Please make sure that the nginx user or group has at least"
+ ewarn "'rx' permissions on /var/log/nginx (default on a fresh install)"
+ ewarn "Otherwise you end up with empty log files after a logrotate."
+ fi
+}