diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2008-04-25 10:56:34 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2008-04-25 10:56:34 +0000 |
commit | b429bdd869ac3f0dc9b5bfc516ad453dfe95d3f3 (patch) | |
tree | 2acfe6d9c8a8cc2bd95956ba65e10ced5d76c650 /www-apache/passenger | |
parent | initial import (diff) | |
download | gentoo-2-b429bdd869ac3f0dc9b5bfc516ad453dfe95d3f3.tar.gz gentoo-2-b429bdd869ac3f0dc9b5bfc516ad453dfe95d3f3.tar.bz2 gentoo-2-b429bdd869ac3f0dc9b5bfc516ad453dfe95d3f3.zip |
initial version wrt #218170
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'www-apache/passenger')
-rw-r--r-- | www-apache/passenger/ChangeLog | 10 | ||||
-rw-r--r-- | www-apache/passenger/Manifest | 6 | ||||
-rw-r--r-- | www-apache/passenger/files/1.0.1-gentoo.patch | 89 | ||||
-rw-r--r-- | www-apache/passenger/files/30_mod_passenger.conf | 39 | ||||
-rw-r--r-- | www-apache/passenger/metadata.xml | 6 | ||||
-rw-r--r-- | www-apache/passenger/passenger-1.0.1.ebuild | 67 |
6 files changed, 217 insertions, 0 deletions
diff --git a/www-apache/passenger/ChangeLog b/www-apache/passenger/ChangeLog new file mode 100644 index 000000000000..cd436b1b093e --- /dev/null +++ b/www-apache/passenger/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for www-apache/passenger +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-apache/passenger/ChangeLog,v 1.1 2008/04/25 10:56:33 hollow Exp $ + +*passenger-1.0.1 (25 Apr 2008) + + 25 Apr 2008; Benedikt Böhm <hollow@gentoo.org> +files/1.0.1-gentoo.patch, + +files/30_mod_passenger.conf, +metadata.xml, +passenger-1.0.1.ebuild: + initial version wrt #218170 + diff --git a/www-apache/passenger/Manifest b/www-apache/passenger/Manifest new file mode 100644 index 000000000000..ce8d6342d1bb --- /dev/null +++ b/www-apache/passenger/Manifest @@ -0,0 +1,6 @@ +AUX 1.0.1-gentoo.patch 3258 RMD160 da519d9959dcd132008db8b25d3c81673b461f8a SHA1 fa6568451ea78166856a2cebd2bc56c845bd8519 SHA256 6b3a8f36312367b4b1c77be4ab7b595458f1a439ef9745c303e32c383c25fc82 +AUX 30_mod_passenger.conf 1602 RMD160 0b50a86b3e79884ab18cd85f398c1fe9bac5d6ff SHA1 3343f8f65edb48e084ff847f8ed7d571fb5e14f4 SHA256 12ba5a6090dd3e660bef69c5c69bac6255d2237fc04f6ec6ecac53dc5dacca26 +DIST passenger-1.0.1.tar.gz 1668684 RMD160 61495ce6eae6c8aa8d2261ec7527598c99c6369f SHA1 68500f5ae5b520cfb482082c90c5863f6e30b2c1 SHA256 0be68fbf99f3c0da5eec812fd14b45263e2719196c1e2588dca8fbe926479c58 +EBUILD passenger-1.0.1.ebuild 1564 RMD160 fe6d83085b3bcc643968eb02596a9eaf9f4462b8 SHA1 987293c9c4b0ed80e9836e90c19fd79aab5ec8ac SHA256 f1ae0d37fb617d515338bb263aaf33da403c4e86ef145791806a99923e49e249 +MISC ChangeLog 333 RMD160 db7cd3bdd5b1a29dda759077f367cab1b3fbfd14 SHA1 4e0ca6af52ab29b44c25d1d875f187cc1f715d24 SHA256 162da5c77445748ad82f74940e11519f6479cb8eebf91f4cc99972cc272a5a20 +MISC metadata.xml 179 RMD160 046a67d39c9a5784800b120b3da44d67caa1f0af SHA1 31e15b20d55994a9989fff90a20847c1e76db2cb SHA256 d07e5a69f0aaee3b23884e0e414fad4aba70b9f4a115d2649714b8f1bd99d9fe diff --git a/www-apache/passenger/files/1.0.1-gentoo.patch b/www-apache/passenger/files/1.0.1-gentoo.patch new file mode 100644 index 000000000000..776b6458c0cc --- /dev/null +++ b/www-apache/passenger/files/1.0.1-gentoo.patch @@ -0,0 +1,89 @@ +Index: passenger-1.0.1/Rakefile +=================================================================== +--- passenger-1.0.1.orig/Rakefile ++++ passenger-1.0.1/Rakefile +@@ -37,7 +37,7 @@ APR1_FLAGS.nil? and raise "Could not fin + + CXX = "g++" + THREADING_FLAGS = "-D_REENTRANT" +-CXXFLAGS = "#{THREADING_FLAGS} -Wall -g -I/usr/local/include " << MULTI_ARCH_FLAGS ++CXXFLAGS = "#{ENV['CXXFLAGS']} #{THREADING_FLAGS} -Wall" << MULTI_ARCH_FLAGS + LDFLAGS = "" + + +@@ -87,8 +87,7 @@ subdir 'ext/boost/src' do + # processes, sometimes pthread errors will occur. These errors are harmless + # and should be ignored. Defining NDEBUG guarantees that boost::thread() will + # not abort if such an error occured. +- flags = "-O2 -fPIC -I../.. #{THREADING_FLAGS} -DNDEBUG #{MULTI_ARCH_FLAGS}" +- compile_cxx "*.cpp", flags ++ compile_cxx "*.cpp", "#{CXXFLAGS} -fPIC -I../.. -DNDEBUG" + create_static_library "libboost_thread.a", "*.o" + end + +@@ -101,7 +100,7 @@ end + ##### Apache module + + class APACHE2 +- CXXFLAGS = CXXFLAGS + " -fPIC -g -DPASSENGER_DEBUG #{APR1_FLAGS} #{APXS2_FLAGS} -I.." ++ CXXFLAGS = CXXFLAGS + " -fPIC #{APR1_FLAGS} #{APXS2_FLAGS} -I.." + OBJECTS = { + 'Configuration.o' => %w(Configuration.cpp Configuration.h), + 'Hooks.o' => %w(Hooks.cpp Hooks.h +Index: passenger-1.0.1/lib/passenger/platform_info.rb +=================================================================== +--- passenger-1.0.1.orig/lib/passenger/platform_info.rb ++++ passenger-1.0.1/lib/passenger/platform_info.rb +@@ -115,7 +115,6 @@ private + else + flags = `#{APXS2} -q CFLAGS`.strip << " -I" << `#{APXS2} -q INCLUDEDIR` + flags.strip! +- flags.gsub!(/-O\d? /, '') + return flags + end + end +@@ -139,7 +138,6 @@ private + libs = `#{apr_config} --link-ld`.strip + end + end +- flags.gsub!(/-O\d? /, '') + return [flags, libs] + end + +Index: passenger-1.0.1/bin/passenger-spawn-server +=================================================================== +--- passenger-1.0.1.orig/bin/passenger-spawn-server ++++ passenger-1.0.1/bin/passenger-spawn-server +@@ -16,7 +16,6 @@ + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + require 'pathname' +-$LOAD_PATH.unshift(File.expand_path("#{File.dirname(__FILE__)}/../lib")) + require 'passenger/spawn_manager' + require 'passenger/utils' + +Index: passenger-1.0.1/lib/passenger/request_handler.rb +=================================================================== +--- passenger-1.0.1.orig/lib/passenger/request_handler.rb ++++ passenger-1.0.1/lib/passenger/request_handler.rb +@@ -101,7 +101,6 @@ class RequestHandler + NINJA_PATCHING_LOCK = Mutex.new + @@ninja_patched_action_controller = false + +- File.read("#{File.dirname(__FILE__)}/../../Rakefile") =~ /^PACKAGE_VERSION = "(.*)"$/ + PASSENGER_VERSION = $1 + + # The name of the socket on which the request handler accepts +Index: passenger-1.0.1/lib/passenger/utils.rb +=================================================================== +--- passenger-1.0.1.orig/lib/passenger/utils.rb ++++ passenger-1.0.1/lib/passenger/utils.rb +@@ -20,7 +20,7 @@ require 'etc' + require 'thread' + require 'fastthread' + require 'timeout' +-require File.expand_path("#{File.dirname(__FILE__)}/../../ext/passenger/native_support.so") ++require 'native_support' + + module Passenger + diff --git a/www-apache/passenger/files/30_mod_passenger.conf b/www-apache/passenger/files/30_mod_passenger.conf new file mode 100644 index 000000000000..4cf0a29f75c6 --- /dev/null +++ b/www-apache/passenger/files/30_mod_passenger.conf @@ -0,0 +1,39 @@ +<IfDefine PASSENGER> +LoadModule passenger_module modules/mod_passenger.so + +# The location to the Passenger spawn server. This configuration option is +# essential to Passenger. The correct value is given by the ebuild, and should +# usually not be changed manually. +RailsSpawnServer /usr/bin/passenger-spawn-server + +# This option allows one to specify the Ruby interpreter to use. +RailsRuby /usr/bin/ruby18 + +# Whether Passenger should automatically detect whether a virtual host's +# document root is a Ruby on Rails application. +RailsAutoDetect On + +# 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. +RailsMaxPoolSize 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. +RailsPoolIdleTime 120 + +# When the RailsUserSwitching 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. +RailsUserSwitching 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 RailsDefaultUser. +RailsDefaultUser apache +</IfDefine> + +# vim: ts=4 filetype=apache diff --git a/www-apache/passenger/metadata.xml b/www-apache/passenger/metadata.xml new file mode 100644 index 000000000000..7dcdaa3f775a --- /dev/null +++ b/www-apache/passenger/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>apache</herd> + <herd>ruby</herd> +</pkgmetadata> diff --git a/www-apache/passenger/passenger-1.0.1.ebuild b/www-apache/passenger/passenger-1.0.1.ebuild new file mode 100644 index 000000000000..ae15864faf5f --- /dev/null +++ b/www-apache/passenger/passenger-1.0.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apache/passenger/passenger-1.0.1.ebuild,v 1.1 2008/04/25 10:56:33 hollow Exp $ + +inherit apache-module flag-o-matic ruby + +DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze" +HOMEPAGE="http://modrails.com/" +SRC_URI="mirror://rubyforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" + +DEPEND=">=dev-lang/ruby-1.8.5 + >=dev-ruby/rubygems-0.9.0 + >=dev-ruby/rake-0.8.1 + >=dev-ruby/fastthread-1.0.1 + >=dev-ruby/rspec-1.1.2 + >=dev-ruby/rails-1.2.0" +RDEPEND="${DEPEND}" + +APACHE2_MOD_FILE="${S}/ext/apache2/mod_${PN}.so" +APACHE2_MOD_CONF="30_mod_${PN}" +APACHE2_MOD_DEFINE="PASSENGER" + +need_apache2_2 + +pkg_setup() { + use debug && append-flags -DPASSENGER_DEBUG +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PV}-gentoo.patch + + # set version here to prevent Rakefile parsing + sed -i -e "s/\(PASSENGER_VERSION\) = .*/\1 = '${PV}'/" \ + lib/passenger/request_handler.rb +} + +src_compile() { + cd "${S}"/ext/passenger + ruby_src_compile + + cd "${S}" + APXS2="${APXS}" \ + HTTPD="${APACHE_BIN}" \ + rake apache2 || die "rake apache2 failed" +} + +src_install() { + ( # dont want to pollute calling env + insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') + doins -r lib/passenger + ) || die "failed to install passenger lib" + + dobin bin/passenger-spawn-server + + cd "${S}"/ext/passenger + ruby_einstall + + apache-module_src_install +} |