Skip to content

Commit

Permalink
www-apache/passenger: add 5.0.21
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.2.20.1
  • Loading branch information
graaff committed Oct 23, 2015
1 parent a7713e8 commit 7263976
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
1 change: 1 addition & 0 deletions www-apache/passenger/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ DIST passenger-4.0.53.tar.gz 4447609 SHA256 0b8d256cd930f93cfe723392aaa12fa3f9d5
DIST passenger-4.0.59.tar.gz 4521206 SHA256 8b4756564a5133dc97425883d15d1ba1c9f6566c79e92794dc3e1f5b749238ae SHA512 d29400c71cf9530b41ce8b8d4cf94007e4d77fb4ceff290786506d6b9dfbab790f18423dc5dcd71aef07147ba2610c2982f7ca733a8e491de6a0cb3704c54bfb WHIRLPOOL 4683d19813ecbb284ec3eb9681c6c1a1b84f256f0262e6c2b1941df5872031a30da1396cb22fa1cfbad2f53f8971131ed0418c2ef4c20160a3d67f151d54208a
DIST passenger-5.0.18.tar.gz 4927106 SHA256 8a92393f5413bb20686295f62a586e3af3b68e631b679413c990b5f0b58ba767 SHA512 dbe3bcdcdf1fae77b822bd157a61e28471e8139ee7165cccd819aedca7d5a0fc4204be8da9cb628fa2180807bb8c46143c98d7e9d1f84afeb6cc99695a7754af WHIRLPOOL 02686489207001383bdbad7661ce3d6303b94403e7795a16b9d7fae388d412f699342fce911d3e8038830387a76e846c213bb6cc80e9d55992ea4e511e7f6ed7
DIST passenger-5.0.20.tar.gz 5307200 SHA256 a5b35780beb7ecd39d18375acab3e4fa1a2e104b7a324f41a1f89c99e7b8b04c SHA512 72c79b8433270336cc5a1dac11afa45f9095b8a29dd764e7e640dca1f376b23c422e2a9438ff25747c5d438266d5a3870b66121ed6642033fdc3e274c8d7e32f WHIRLPOOL 7bde79e1e7efceb3dca84d8ebfa7b15d71f8cf041e69c19ab2824ce2bb5d692fe64bda07b7b55dcb6cecd746cf0548b230ef4af41299329d0a6ed07bfb661fd2
DIST passenger-5.0.21.tar.gz 5307571 SHA256 66bc55a43f08d77b7a5e42928bf19d7cab2297866996ebcaa4db01a2d78cc60c SHA512 28d4e3aeb182e5b8794642a0abbe4624b1280130c8afd021fd2c05bda170d0eb6b32afc9b0575a4e5e391f117bb3f127b969391d89d9b9b60cc337502c002446 WHIRLPOOL 96157f9422612bd81667a3f272b2964ab074449870fcfa432ab129a69eb19f753d784c45d210cc11654b94d647645293843e89e0f0f3d8b870c993c296b0bd10
118 changes: 118 additions & 0 deletions www-apache/passenger/passenger-5.0.21.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
USE_RUBY="ruby19 ruby20 ruby21 ruby22"

inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs

DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
HOMEPAGE="http://modrails.com/"
SRC_URI="http://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.5.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

# 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/cplusplus_support.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"
}

0 comments on commit 7263976

Please sign in to comment.