summaryrefslogtreecommitdiff
path: root/www-apache/passenger
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /www-apache/passenger
reinit the tree, so we can have metadata
Diffstat (limited to 'www-apache/passenger')
-rw-r--r--www-apache/passenger/Manifest14
-rw-r--r--www-apache/passenger/files/30_mod_passenger-5.0.0.conf63
-rw-r--r--www-apache/passenger/files/passenger-5.0.20-gentoo.patch30
-rw-r--r--www-apache/passenger/files/passenger-5.1.1-isnan.patch14
-rw-r--r--www-apache/passenger/metadata.xml11
-rw-r--r--www-apache/passenger/passenger-5.1.2.ebuild118
-rw-r--r--www-apache/passenger/passenger-5.1.6.ebuild122
-rw-r--r--www-apache/passenger/passenger-5.1.7.ebuild122
-rw-r--r--www-apache/passenger/passenger-5.1.8.ebuild122
9 files changed, 616 insertions, 0 deletions
diff --git a/www-apache/passenger/Manifest b/www-apache/passenger/Manifest
new file mode 100644
index 000000000000..3c849c81fa4f
--- /dev/null
+++ b/www-apache/passenger/Manifest
@@ -0,0 +1,14 @@
+AUX 30_mod_passenger-5.0.0.conf 2737 SHA256 c5cd9c6b0a6616c9934a1c1fc9952036a6b4adcd9049e11f5614157f786c736d SHA512 847aa6d0ebb2e4ceaa744fdddf72f22613aeb76df38a36fb3c8b16803222cec116e6d5c23d2173beffd5889ebb8ba0247ffd3b9e900a70d78c2236f00c1a5d4d WHIRLPOOL b7ad6e2cfd1677469c67d8c47e2b53f3087a84477beb4a29d10f71196c7f73590964add0316c97e791ed4e9bf03020d586a118da5c0ba499bb9b5547bf30b6d9
+AUX passenger-5.0.20-gentoo.patch 1057 SHA256 89b0070eeeb91ac79705694903a6145a97e87a60dbaaf35945c60da3645878db SHA512 c5022f3305b413954c75a280fea8b6a59c20a366746d17cdfa100dd7a0b3e4ea051af4c291eca0e71611dedd597903b25e893e7a382a9ee2415657bd55e91779 WHIRLPOOL 38b97ff42d558b9c43581f562dfe2d18b18cc55f5b6bd55912127569f2510462bf1b8f785d90f685f953e848a5b44838487b3f09e57fc24cad436ae331b2eb89
+AUX passenger-5.1.1-isnan.patch 1155 SHA256 52e8c304c841d31b673b1993bfc5a56d6c75db34d84cba6f87a622fe7f0e41c5 SHA512 a80a9a229f1eeb34780236d0b2418fe5d2f57b9ae8c3c4ccdec729806f4afad8979de4ab3ea0834cdb76218192825ee4bfaf02b48f3bda240c2db441bcc870d9 WHIRLPOOL 31cf3615ee67ee60639dbc0e8c4f51faf4c621b816c0bcb2b85b6c61f896ae087640a8dfce175a7a6e6cefafbac9c9345610f737e31c23e7bf1b0f1b1d03c431
+DIST passenger-5.1.2.tar.gz 5646103 SHA256 7fb03a54650ef5e508895c9e45bc2d8151f6c4811ea6797e81f017fedddfdbab SHA512 88a77c749857a8538ea268f793d2708fa29b8891d2c3197577155f81cb66aa04919c25e713d4f00692051ad385eebaa94729cd30baa68edcf3d17c23bae0acdd WHIRLPOOL 8f115162e2a7c43af20cef1d689290c8a523cce10f617500eeb50ab6a226c203a404fc7ce53fd0e21e63276aa359c5d64b685318be36f79ce165ff598bac8766
+DIST passenger-5.1.6.tar.gz 5215694 SHA256 e897cc5f0ec6446bfdc226404dca4bd29f7418ae92010c389661b9f024a3cf24 SHA512 71d301d2501863951157f55df30ac89f6f9d98e79b554a5ca05ca9a306041ecd8cdc92056220cf6dc9ad02972a102bfc990e3b06f887d27496a8ecbd58e109fa WHIRLPOOL fe6872d0c11803fd0d8875002f37425edc54327709daaa56518ace0ef9f5046836592298ca80ce4929a29e6c0a0adcb237b57a19cd0d73ac096992e742e2a8b5
+DIST passenger-5.1.7.tar.gz 5218093 SHA256 2b40a00a3fdc90a6acf784319f60fd53549f036ffc99fcbb23a0658cb7e2b215 SHA512 f1f67f7912dd3d58ee46c32d1d0584eeb90e95fd5a36bddff62c28674560f1495926a867b20d12a3867d1e81f13c480ed596ba81f78f6241c511b12fcac1de4c WHIRLPOOL 12c1acee83255b19964f505c6238432971d7a80d7937fcfac75cd0645b8626d993365472ca7e622b21fc8144f37f1286e1b58fdfa71836bcd791467416013349
+DIST passenger-5.1.8.tar.gz 5234529 SHA256 fef10e4a34c3faa48306c21c0789ee4d4d56fc0e30205cc470a91b486b7a4a7d SHA512 5baf287e1f2a751409bba99671de2c41656033dc29132b2d964457405284105343fde4c2233c921d7e35794a47eedbf33e3840119a908741b1ed9e6fdc99ec2c WHIRLPOOL 6513b71aadddc9ec5ff4b4c617256a62f1c977b7d0f098982808851afc7703bd4ceed843cf309d07b239dbae97ed4beacaa2130a5dd325b17714df59f3b1f9ee
+EBUILD passenger-5.1.2.ebuild 3802 SHA256 4e68673b6e194126a37eb8acbb207a91e60219c4a2edfd635dd4508e652c9e9e SHA512 8f8ccf842182cff920f7956e3934e35154bd6235991e50e90bd1629b4f33caa4d480072eddbbc2ad335706bed0f5258ad4de0755beb0c2c89fbf11afcecebc47 WHIRLPOOL 5014b02757779a5cfdc5061ba8d8d5b588ed1e7048ea4b604c3c1a94bd572ab3b8f7c5c775c20dafd87400c305998a7c412bd8c6190e01ea003491058b9eaeb8
+EBUILD passenger-5.1.6.ebuild 3833 SHA256 228c9dbb2b64272213095f96ae7e20b33d643b0a0cde8b6996915f1faf3da95f SHA512 8f384e47cc1efa7c4dabe6dcc42fddd66a2498df22933d4e65fbed124540edb2210f8c0113ae4c2acd3f4d1066fb5eb8bb710f4a23065ef1db6003b48a80ecb6 WHIRLPOOL 1a45c0119c33f5d42c65083adb771d8bfae44daf300269d0734fcfc073e0dd1e665d69708e7f8757e3edb5ad9d500ee6b0d41d6ecdea8114ada29ff7ab1744e4
+EBUILD passenger-5.1.7.ebuild 3834 SHA256 fedb34c679d0f9d9fa450d24c4e8e946b3bf4a9f587e972b4c804bf726f03753 SHA512 e851aae9ff80c75e303dffe7b3ad91a7eecc8a1f2fa706033e5dd919e18f717cf3176c8486aaa783c2b6f6d8fe1aeb94398f4c7ce21e2ce65fddaac0bed86400 WHIRLPOOL a0796aea70300ceb196033367e895e33ea3f60aee258b3d0ef7d710b7d8e1f8cbc1e8f2bb97261d4869dd436567ebb555b622adf0a5dfd3fdbf8cc56bf8c67d8
+EBUILD passenger-5.1.8.ebuild 3827 SHA256 d178ed339b1f895be1457753801d0dd838345ea485f8ab2e1b2227d59b34f542 SHA512 9a6153f12d67e13280b6539dc7f9bc6614a8c793f9484e2df3ed3c4793c37fe6dc7e48f7aca5cad85e2e9abd74455cc2d58010e22ff8a44e3c277e7872d58206 WHIRLPOOL 3cef97673ba0a6d95375368aecc7d7a577d26e2dcadaf781bb421d617fabd8ac5c99a9facc1656afe919f9804401d43db0d253101486c9bfd5d9b15805c1db9d
+MISC ChangeLog 8584 SHA256 923aa06ccf1db42d903c7fd6922f2f1c42d10cd7c4080da6e207fa0af2c69f74 SHA512 efd75c05d7bc141a2ab9634c6b5008071aeb30c7a82dfe4d3ab88d0553852961339be038744c43cc853d5274551c5bb177372bd0b4cab0ed851553da9a04e8bd WHIRLPOOL 6223af82e55988e8b8e666abb1abb3027cb901f86010f5b2e47a6c215cf79d33b540660bb731638f6896ca00feb5c8e5438c9307621f22e06251bca34fa03504
+MISC ChangeLog-2015 17351 SHA256 25abdadae21e308556904475d3a8f0c70274497eb69d917deb0aeb9c0aeed02f SHA512 185db00f89b00e3a6dcd01979266068e3632250b1cd68de5468c759a33bc0f10ddfca36cce4326e693354471b6a485445905abafedc89c8aca6aac18276acd5c WHIRLPOOL f7acd8802839c1d473820c1fde1025e86be2090db5da7ae0392545d298d97d33205b0a7d1ea1e71a7c2eea6026a908bb0fcd281f3c5a53985c03c3bdc325d8ef
+MISC metadata.xml 330 SHA256 14373e1dec97edf9d5ce98d31c443c436c7d62832007d1227a0687b217bd03f7 SHA512 5ea7e5026084dedcd363bb79076763cca7d66bb08411d5e2dc56ade23bfdbd522a8db13db9c0b8f50163f130f28c784b622d9639cb3dd33aa810dda3d2577db8 WHIRLPOOL 66281cf13b062809a9a3b3015b7ac2c33c7760d74cdc9c4b6f29fa3a7be240112f062cc8ec708ad74e9637793ba940200600e1517b3b2dc71e11e61ae3cd0b2b
diff --git a/www-apache/passenger/files/30_mod_passenger-5.0.0.conf b/www-apache/passenger/files/30_mod_passenger-5.0.0.conf
new file mode 100644
index 000000000000..f218b59ca412
--- /dev/null
+++ b/www-apache/passenger/files/30_mod_passenger-5.0.0.conf
@@ -0,0 +1,63 @@
+<IfDefine PASSENGER>
+LoadModule passenger_module modules/mod_passenger.so
+
+# The location to the Phusion Passenger root directory. This configuration
+# option is essential to Phusion Passenger. The correct value is given by the
+# installer, and should usually not be changed manually.
+PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
+
+# This option allows one to specify how much information Phusion Passenger
+# should write to the Apache error log file. A higher log level value means
+# that more information will be logged.
+#
+# Possible values are:
+#
+# 0: Show only errors and warnings.
+# 1: Show the most important debugging information. This might be useful for
+# system administrators who are trying to figure out the cause of a
+# problem.
+# 2: Show more debugging information. This is typically only useful for
+# developers.
+# 3: Show even more debugging information.
+PassengerLogLevel 0
+
+# This option specifies the default global version of Ruby to use.
+PassengerDefaultRuby /usr/bin/ruby
+
+# This option allows one to specify the Ruby interpreter to use for
+# specific instances.
+# PassengerRuby /usr/bin/ruby
+
+# The maximum number of Ruby on Rails application instances that may be
+# simultaneously active. A larger number results in higher memory usage, but
+# improved ability to handle concurrent HTTP clients.
+PassengerMaxPoolSize 20
+
+# The maximum number of seconds that a Ruby on Rails application instance may
+# be idle. That is, if an application instance hasn't done anything after the
+# given number of seconds, then it will be shutdown in order to conserve
+# memory.
+PassengerPoolIdleTime 120
+
+# The maximum number of application instances that may be simultaneously active
+# for a single application. This helps to make sure that a single application
+# will not occupy all available slots in the application pool.
+#
+# This value must be less than PassengerMaxPoolSize. A value of 0 means that
+# there is no limit placed on the number of instances a single application may
+# use, i.e. only the global limit of PassengerMaxPoolSize will be enforced.
+PassengerMaxInstancesPerApp 0
+
+# When the PassengerUserSwitching option is enabled a Rails application is started
+# as the owner of the file config/environment.rb. So if
+# /home/webapps/foo/config/environment.rb is owned by joe, then Passenger will
+# launch the corresponding Rails application as joe as well.
+PassengerUserSwitching On
+
+# Under no circumstances will Rails applications be run as root. If
+# environment.rb is owned by root or by an unknown user, then the Rails
+# application will run as the user specified by PassengerDefaultUser.
+PassengerDefaultUser apache
+</IfDefine>
+
+# vim: ts=4 filetype=apache
diff --git a/www-apache/passenger/files/passenger-5.0.20-gentoo.patch b/www-apache/passenger/files/passenger-5.0.20-gentoo.patch
new file mode 100644
index 000000000000..a9fe95f6b25b
--- /dev/null
+++ b/www-apache/passenger/files/passenger-5.0.20-gentoo.patch
@@ -0,0 +1,30 @@
+--- build/packaging.rb.~1~ 2013-10-27 00:00:00.000000000 +0200
++++ build/packaging.rb 2015-09-28 07:44:04.584236386 +0200
+@@ -575,7 +575,7 @@
+ psg_ruby = ENV['RUBY'] || "#{fs_bindir}/ruby"
+ psg_free_ruby = ENV['FREE_RUBY'] || "/usr/bin/env ruby"
+
+- fakeroot = "pkg/fakeroot"
++ fakeroot = ENV['DISTDIR']
+ fake_rubylibdir = "#{fakeroot}#{psg_rubylibdir}"
+ fake_nodelibdir = "#{fakeroot}#{psg_nodelibdir}"
+ fake_libdir = "#{fakeroot}#{psg_libdir}"
+@@ -593,7 +593,6 @@
+
+ packaging_method = ENV['NATIVE_PACKAGING_METHOD'] || ENV['PACKAGING_METHOD'] || "deb"
+
+- sh "rm -rf #{fakeroot}"
+ sh "mkdir -p #{fakeroot}"
+
+ # Ruby sources
+@@ -690,10 +689,6 @@
+ change_shebang("#{fake_sbindir}/#{exe}", shebang)
+ end
+
+- # Apache 2 module
+- sh "mkdir -p #{File.dirname(fake_apache2_module_path)}"
+- sh "cp #{APACHE2_TARGET} #{fake_apache2_module_path}"
+-
+ # Ruby extension sources
+ sh "mkdir -p #{fake_ruby_extension_source_dir}"
+ sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
diff --git a/www-apache/passenger/files/passenger-5.1.1-isnan.patch b/www-apache/passenger/files/passenger-5.1.1-isnan.patch
new file mode 100644
index 000000000000..02f7fe76df06
--- /dev/null
+++ b/www-apache/passenger/files/passenger-5.1.1-isnan.patch
@@ -0,0 +1,14 @@
+diff -uNr passenger-5.1.1.orig/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp passenger-5.1.1/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp
+--- passenger-5.1.1.orig/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp 2013-10-26 15:00:00.000000000 -0700
++++ passenger-5.1.1/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp 2017-01-12 19:21:39.696285758 -0800
+@@ -134,8 +134,8 @@
+ inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnanq(f); }
+ inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnanq(f); }
+ #else
+-inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnan(static_cast<double>(f)); }
+-inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnan(static_cast<double>(f)); }
++inline bool is_nan_helper(__float128 f, const boost::true_type&) { return std::isnan(static_cast<double>(f)); }
++inline bool is_nan_helper(__float128 f, const boost::false_type&) { return std::isnan(static_cast<double>(f)); }
+ #endif
+ #endif
+ }
diff --git a/www-apache/passenger/metadata.xml b/www-apache/passenger/metadata.xml
new file mode 100644
index 000000000000..9a8bc537e0e5
--- /dev/null
+++ b/www-apache/passenger/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>graaff@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ </pkgmetadata>
diff --git a/www-apache/passenger/passenger-5.1.2.ebuild b/www-apache/passenger/passenger-5.1.2.ebuild
new file mode 100644
index 000000000000..6ea838a5241f
--- /dev/null
+++ b/www-apache/passenger/passenger-5.1.2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+USE_RUBY="ruby21 ruby22 ruby23"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="https://www.phusionpassenger.com/"
+SRC_URI="https://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/rack-1.0.0:*
+ >=dev-ruby/rake-0.8.1"
+
+# libev is bundled but with adapations that do not seem to be accepted
+# upstream, so we must use the bundled version :-(
+CDEPEND="
+ >=dev-libs/libuv-1.8.0
+ net-misc/curl[ssl]
+ www-servers/apache[apache2_modules_unixd(+)]"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+need_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.20-gentoo.patch
+ epatch "${FILESDIR}"/${PN}-5.1.1-isnan.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
+ -e "/^CXX\s/ s/=.*$/= '$(tc-getCXX)'/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ src/ruby_supportlib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" src/cxx_supportlib/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' src/ruby_supportlib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version where possible
+ rm -rf src/cxx_supportlib/vendor-copy/libuv || die "Unable to remove vendored code."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/support/cplusplus.rb || die
+}
+
+all_ruby_compile() {
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ruby -S rake apache2 || die "rake failed"
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+
+ dodoc CHANGELOG README.md
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
diff --git a/www-apache/passenger/passenger-5.1.6.ebuild b/www-apache/passenger/passenger-5.1.6.ebuild
new file mode 100644
index 000000000000..9d65e0a1e95f
--- /dev/null
+++ b/www-apache/passenger/passenger-5.1.6.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby21 ruby22 ruby23 ruby24"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="https://www.phusionpassenger.com/"
+SRC_URI="https://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="apache2 debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/rack-1.0.0:*
+ >=dev-ruby/rake-0.8.1"
+
+# libev is bundled but with adapations that do not seem to be accepted
+# upstream, so we must use the bundled version :-(
+CDEPEND="
+ >=dev-libs/libuv-1.8.0
+ net-misc/curl[ssl]
+ apache2? ( www-servers/apache[apache2_modules_unixd(+)] )"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+want_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+ depend.apache_pkg_setup
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.20-gentoo.patch
+ epatch "${FILESDIR}"/${PN}-5.1.1-isnan.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
+ -e "/^CXX\s/ s/=.*$/= '$(tc-getCXX)'/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ src/ruby_supportlib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" src/cxx_supportlib/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' src/ruby_supportlib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version where possible
+ rm -rf src/cxx_supportlib/vendor-copy/libuv || die "Unable to remove vendored code."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/support/cplusplus.rb || die
+}
+
+all_ruby_compile() {
+ if use apache2 ; then
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ruby -S rake apache2 || die "rake failed"
+ fi
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ if use apache2 ; then
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+ fi
+
+ dodoc CHANGELOG README.md
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
diff --git a/www-apache/passenger/passenger-5.1.7.ebuild b/www-apache/passenger/passenger-5.1.7.ebuild
new file mode 100644
index 000000000000..3dc6b74b68bd
--- /dev/null
+++ b/www-apache/passenger/passenger-5.1.7.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby21 ruby22 ruby23 ruby24"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="https://www.phusionpassenger.com/"
+SRC_URI="https://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="apache2 debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/rack-1.0.0:*
+ >=dev-ruby/rake-0.8.1"
+
+# libev is bundled but with adapations that do not seem to be accepted
+# upstream, so we must use the bundled version :-(
+CDEPEND="
+ >=dev-libs/libuv-1.8.0
+ net-misc/curl[ssl]
+ apache2? ( www-servers/apache[apache2_modules_unixd(+)] )"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+want_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+ depend.apache_pkg_setup
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.20-gentoo.patch
+ epatch "${FILESDIR}"/${PN}-5.1.1-isnan.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
+ -e "/^CXX\s/ s/=.*$/= '$(tc-getCXX)'/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ src/ruby_supportlib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" src/cxx_supportlib/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' src/ruby_supportlib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version where possible
+ rm -rf src/cxx_supportlib/vendor-copy/libuv || die "Unable to remove vendored code."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/support/cplusplus.rb || die
+}
+
+all_ruby_compile() {
+ if use apache2 ; then
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ruby -S rake apache2 || die "rake failed"
+ fi
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ if use apache2 ; then
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+ fi
+
+ dodoc CHANGELOG README.md
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}
diff --git a/www-apache/passenger/passenger-5.1.8.ebuild b/www-apache/passenger/passenger-5.1.8.ebuild
new file mode 100644
index 000000000000..2649ae2a9bab
--- /dev/null
+++ b/www-apache/passenger/passenger-5.1.8.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby22 ruby23 ruby24"
+
+inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
+
+DESCRIPTION="Passenger makes deployment of Ruby on Rails applications a breeze"
+HOMEPAGE="https://www.phusionpassenger.com/"
+SRC_URI="https://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="apache2 debug"
+
+ruby_add_bdepend "dev-ruby/rake"
+
+ruby_add_rdepend "
+ >=dev-ruby/rack-1.0.0:*
+ >=dev-ruby/rake-0.8.1"
+
+# libev is bundled but with adapations that do not seem to be accepted
+# upstream, so we must use the bundled version :-(
+CDEPEND="
+ >=dev-libs/libuv-1.8.0
+ net-misc/curl[ssl]
+ apache2? ( www-servers/apache[apache2_modules_unixd(+)] )"
+
+RDEPEND="${RDEPEND} ${CDEPEND}"
+DEPEND="${DEPEND} ${CDEPEND}"
+
+APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
+APACHE2_MOD_DEFINE="PASSENGER"
+
+want_apache2
+
+pkg_setup() {
+ use debug && append-flags -DPASSENGER_DEBUG
+ depend.apache_pkg_setup
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.0.20-gentoo.patch
+ epatch "${FILESDIR}"/${PN}-5.1.1-isnan.patch
+
+ # Change these with sed instead of a patch so that we can easily use
+ # the toolchain-funcs methods.
+ sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
+ -e "/^CXX\s/ s/=.*$/= '$(tc-getCXX)'/" \
+ -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
+
+ # Avoid fixed debugging CFLAGs.
+ sed -e '/debugging_cflags/areturn ""' -i src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb || die
+
+ # Use sed here so that we can dynamically set the documentation directory.
+ sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
+ -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
+ src/ruby_supportlib/phusion_passenger.rb || die
+ sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" src/cxx_supportlib/ResourceLocator.h || die
+
+ # Don't install a tool that won't work in our setup.
+ sed -i -e '/passenger-install-apache2-module/d' src/ruby_supportlib/phusion_passenger/packaging.rb || die
+ rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
+
+ # Make sure we use the system-provided version where possible
+ rm -rf src/cxx_supportlib/vendor-copy/libuv || die "Unable to remove vendored code."
+
+ # Avoid building documentation to avoid a dependency on mizuho.
+ #sed -i -e 's/, :doc//' build/packaging.rb || die
+ touch doc/*.html || die
+
+ # Fix hard-coded use of AR
+ sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/support/cplusplus.rb || die
+}
+
+all_ruby_compile() {
+ if use apache2 ; then
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ruby -S rake apache2 || die "rake failed"
+ fi
+}
+
+each_ruby_compile() {
+ append-flags -fno-strict-aliasing
+
+ V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake native_support || die "rake failed"
+}
+
+all_ruby_install() {
+ if use apache2 ; then
+ APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
+ apache-module_src_install
+
+ # Patch in the correct libdir
+ sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
+ fi
+
+ dodoc CHANGELOG README.md
+}
+
+each_ruby_install() {
+ DISTDIR="${D}" \
+ RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
+ RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
+ APXS2="${APXS}" \
+ HTTPD="${APACHE_BIN}" \
+ FS_LIBDIR='/usr/'$(get_libdir) \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
+ ${RUBY} -S rake fakeroot || die "rake failed"
+}