Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apache/passenger/
Date: Mon, 28 Sep 2015 17:36:27
Message-Id: 1443461778.086f0d221ea5a28dd7f1fe0ae5b333dde9235cff.graaff@gentoo
1 commit: 086f0d221ea5a28dd7f1fe0ae5b333dde9235cff
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 28 17:36:00 2015 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 28 17:36:18 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=086f0d22
7
8 www-apache/passenger: fix multilib-strict
9
10 This fixes bug 561754.
11
12 Package-Manager: portage-2.2.20.1
13
14 www-apache/passenger/passenger-4.0.59-r1.ebuild | 115 +++++++++++++++++++++++
15 www-apache/passenger/passenger-5.0.20-r1.ebuild | 119 ++++++++++++++++++++++++
16 2 files changed, 234 insertions(+)
17
18 diff --git a/www-apache/passenger/passenger-4.0.59-r1.ebuild b/www-apache/passenger/passenger-4.0.59-r1.ebuild
19 new file mode 100644
20 index 0000000..0267fed
21 --- /dev/null
22 +++ b/www-apache/passenger/passenger-4.0.59-r1.ebuild
23 @@ -0,0 +1,115 @@
24 +# Copyright 1999-2015 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Id$
27 +
28 +EAPI=5
29 +USE_RUBY="ruby19 ruby20 ruby21 ruby22"
30 +
31 +inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
32 +
33 +DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
34 +HOMEPAGE="http://modrails.com/"
35 +SRC_URI="http://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
36 +
37 +LICENSE="GPL-2"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86"
40 +IUSE="debug"
41 +
42 +ruby_add_bdepend "dev-ruby/rake"
43 +
44 +ruby_add_rdepend "
45 + >=dev-ruby/daemon_controller-1.2.0
46 + >=dev-ruby/rack-1.0.0:*
47 + >=dev-ruby/rake-0.8.1"
48 +
49 +CDEPEND=">=dev-libs/libev-4.15 net-misc/curl[ssl]
50 + www-servers/apache[apache2_modules_unixd(+)]"
51 +
52 +RDEPEND="${RDEPEND} ${CDEPEND}"
53 +DEPEND="${DEPEND} ${CDEPEND}"
54 +
55 +APACHE2_MOD_CONF="30_mod_${PN}-4.0.0 30_mod_${PN}"
56 +APACHE2_MOD_DEFINE="PASSENGER"
57 +
58 +need_apache2
59 +
60 +pkg_setup() {
61 + use debug && append-flags -DPASSENGER_DEBUG
62 +}
63 +
64 +all_ruby_prepare() {
65 + epatch "${FILESDIR}"/${PN}-4.0.49-gentoo.patch
66 +
67 + # Change these with sed instead of a patch so that we can easily use
68 + # the toolchain-funcs methods.
69 + sed -i -e "s/gcc/$(tc-getCC)/" \
70 + -e "s/g++/$(tc-getCXX)/" \
71 + -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
72 +
73 + # Avoid fixed debugging CFLAGs.
74 + sed -e '/debugging_cflags/areturn ""' -i lib/phusion_passenger/platform_info/compiler.rb || die
75 +
76 + # Use sed here so that we can dynamically set the documentation directory.
77 + sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
78 + -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
79 + -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
80 + lib/phusion_passenger.rb || die
81 + sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" ext/common/ResourceLocator.h || die
82 +
83 + # Don't install a tool that won't work in our setup.
84 + sed -i -e '/passenger-install-apache2-module/d' lib/phusion_passenger/packaging.rb || die
85 + rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
86 +
87 + # Make sure we use the system-provided version.
88 + rm -rf ext/libev || die "Unable to remove vendored libev."
89 +
90 + # Avoid building documentation to avoid a dependency on mizuho.
91 + #sed -i -e 's/, :doc//' build/packaging.rb || die
92 + touch doc/*.html || die
93 +
94 + # Fix hard-coded use of AR
95 + sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/cplusplus_support.rb || die
96 +}
97 +
98 +all_ruby_compile() {
99 + V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
100 + APXS2="${APXS}" \
101 + HTTPD="${APACHE_BIN}" \
102 + FS_LIBDIR='/usr/'$(get_libdir) \
103 + USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
104 + ruby -S rake apache2 || die "rake failed"
105 +}
106 +
107 +each_ruby_compile() {
108 + append-flags -fno-strict-aliasing
109 +
110 + V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
111 + APXS2="${APXS}" \
112 + HTTPD="${APACHE_BIN}" \
113 + FS_LIBDIR='/usr/'$(get_libdir) \
114 + USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
115 + ${RUBY} -S rake native_support || die "rake failed"
116 +}
117 +
118 +all_ruby_install() {
119 + APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
120 + apache-module_src_install
121 +
122 + # Patch in the correct libdir
123 + sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
124 +
125 + dodoc CHANGELOG README.md
126 +}
127 +
128 +each_ruby_install() {
129 + DISTDIR="${D}" \
130 + RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
131 + RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
132 + APXS2="${APXS}" \
133 + HTTPD="${APACHE_BIN}" \
134 + FS_LIBDIR='/usr/'$(get_libdir) \
135 + EXTRA_LDFLAGS="${LDFLAGS}" \
136 + USE_VENDORED_LIBEV="no" LIBEV_LIBS="-lev" \
137 + ${RUBY} -S rake fakeroot || die "rake failed"
138 +}
139
140 diff --git a/www-apache/passenger/passenger-5.0.20-r1.ebuild b/www-apache/passenger/passenger-5.0.20-r1.ebuild
141 new file mode 100644
142 index 0000000..140bd12
143 --- /dev/null
144 +++ b/www-apache/passenger/passenger-5.0.20-r1.ebuild
145 @@ -0,0 +1,119 @@
146 +
147 +# Copyright 1999-2015 Gentoo Foundation
148 +# Distributed under the terms of the GNU General Public License v2
149 +# $Id$
150 +
151 +EAPI=5
152 +USE_RUBY="ruby19 ruby20 ruby21 ruby22"
153 +
154 +inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
155 +
156 +DESCRIPTION="Passenger (a.k.a. mod_rails) makes deployment of Ruby on Rails applications a breeze"
157 +HOMEPAGE="http://modrails.com/"
158 +SRC_URI="http://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
159 +
160 +LICENSE="GPL-2"
161 +SLOT="0"
162 +KEYWORDS="~amd64 ~x86"
163 +IUSE="debug"
164 +
165 +ruby_add_bdepend "dev-ruby/rake"
166 +
167 +ruby_add_rdepend "
168 + >=dev-ruby/rack-1.0.0:*
169 + >=dev-ruby/rake-0.8.1"
170 +
171 +# libev is bundled but with adapations that do not seem to be accepted
172 +# upstream, so we must use the bundled version :-(
173 +CDEPEND="
174 + >=dev-libs/libuv-1.5.0
175 + net-misc/curl[ssl]
176 + www-servers/apache[apache2_modules_unixd(+)]"
177 +
178 +RDEPEND="${RDEPEND} ${CDEPEND}"
179 +DEPEND="${DEPEND} ${CDEPEND}"
180 +
181 +APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
182 +APACHE2_MOD_DEFINE="PASSENGER"
183 +
184 +need_apache2
185 +
186 +pkg_setup() {
187 + use debug && append-flags -DPASSENGER_DEBUG
188 +}
189 +
190 +all_ruby_prepare() {
191 + epatch "${FILESDIR}"/${PN}-5.0.20-gentoo.patch
192 +
193 + # Change these with sed instead of a patch so that we can easily use
194 + # the toolchain-funcs methods.
195 + sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
196 + -e "/^CXX\s/ s/=.*$/= '$(tc-getCXX)'/" \
197 + -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
198 +
199 + # Avoid fixed debugging CFLAGs.
200 + sed -e '/debugging_cflags/areturn ""' -i src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb || die
201 +
202 + # Use sed here so that we can dynamically set the documentation directory.
203 + sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
204 + -e "s:/usr/lib/apache2/modules/mod_passenger.so:${APACHE_MODULESDIR}/mod_passenger.so:" \
205 + -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
206 + src/ruby_supportlib/phusion_passenger.rb || die
207 + sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" src/cxx_supportlib/ResourceLocator.h || die
208 +
209 + # Don't install a tool that won't work in our setup.
210 + sed -i -e '/passenger-install-apache2-module/d' src/ruby_supportlib/phusion_passenger/packaging.rb || die
211 + rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
212 +
213 + # Make sure we use the system-provided version where possible
214 + rm -rf src/cxx_supportlib/vendor-copy/libuv || die "Unable to remove vendored code."
215 +
216 + # Avoid building documentation to avoid a dependency on mizuho.
217 + #sed -i -e 's/, :doc//' build/packaging.rb || die
218 + touch doc/*.html || die
219 +
220 + # Fix hard-coded use of AR
221 + sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/cplusplus_support.rb || die
222 +}
223 +
224 +all_ruby_compile() {
225 + V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
226 + APXS2="${APXS}" \
227 + HTTPD="${APACHE_BIN}" \
228 + FS_LIBDIR='/usr/'$(get_libdir) \
229 + USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
230 + ruby -S rake apache2 || die "rake failed"
231 +}
232 +
233 +each_ruby_compile() {
234 + append-flags -fno-strict-aliasing
235 +
236 + V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
237 + APXS2="${APXS}" \
238 + HTTPD="${APACHE_BIN}" \
239 + FS_LIBDIR='/usr/'$(get_libdir) \
240 + USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
241 + ${RUBY} -S rake native_support || die "rake failed"
242 +}
243 +
244 +all_ruby_install() {
245 + APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
246 + apache-module_src_install
247 +
248 + # Patch in the correct libdir
249 + sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
250 +
251 + dodoc CHANGELOG README.md
252 +}
253 +
254 +each_ruby_install() {
255 + DISTDIR="${D}" \
256 + RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
257 + RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
258 + APXS2="${APXS}" \
259 + HTTPD="${APACHE_BIN}" \
260 + FS_LIBDIR='/usr/'$(get_libdir) \
261 + EXTRA_LDFLAGS="${LDFLAGS}" \
262 + USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
263 + ${RUBY} -S rake fakeroot || die "rake failed"
264 +}