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: Sun, 18 Jul 2021 04:48:31
Message-Id: 1626583701.56517e632a09a377c74e1490d9cf845840dca8b5.graaff@gentoo
1 commit: 56517e632a09a377c74e1490d9cf845840dca8b5
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 17 08:11:50 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 18 04:48:21 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56517e63
7
8 www-apache/passenger: fix doc install
9
10 There no longer seems to be a built step for the documentation so just
11 install the markdown files. Also fix install location.
12
13 Closes: https://bugs.gentoo.org/802438
14 Package-Manager: Portage-3.0.20, Repoman-3.0.2
15 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
16
17 www-apache/passenger/passenger-6.0.10-r1.ebuild | 126 ++++++++++++++++++++++++
18 1 file changed, 126 insertions(+)
19
20 diff --git a/www-apache/passenger/passenger-6.0.10-r1.ebuild b/www-apache/passenger/passenger-6.0.10-r1.ebuild
21 new file mode 100644
22 index 00000000000..ace4e92b8d8
23 --- /dev/null
24 +++ b/www-apache/passenger/passenger-6.0.10-r1.ebuild
25 @@ -0,0 +1,126 @@
26 +# Copyright 1999-2021 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=7
30 +USE_RUBY="ruby26 ruby27 ruby30"
31 +
32 +inherit apache-module flag-o-matic multilib ruby-ng toolchain-funcs
33 +
34 +DESCRIPTION="Passenger makes deployment of Ruby on Rails applications a breeze"
35 +HOMEPAGE="https://www.phusionpassenger.com/"
36 +SRC_URI="https://s3.amazonaws.com/phusion-passenger/releases/${P}.tar.gz"
37 +
38 +LICENSE="GPL-2"
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
41 +IUSE="apache2 debug"
42 +
43 +ruby_add_bdepend "dev-ruby/rake"
44 +
45 +ruby_add_rdepend "
46 + >=dev-ruby/rack-1.0.0:*
47 + >=dev-ruby/rake-0.8.1"
48 +
49 +# libev is bundled but with adapations that do not seem to be accepted
50 +# upstream, so we must use the bundled version :-(
51 +CDEPEND="
52 + >=dev-libs/libuv-1.8.0
53 + net-misc/curl[ssl]
54 + apache2? ( www-servers/apache[apache2_modules_unixd(+)] )"
55 +
56 +RDEPEND="${RDEPEND} ${CDEPEND}"
57 +DEPEND="${DEPEND} ${CDEPEND}"
58 +
59 +APACHE2_MOD_CONF="30_mod_${PN}-5.0.0 30_mod_${PN}"
60 +APACHE2_MOD_DEFINE="PASSENGER"
61 +
62 +want_apache2
63 +
64 +pkg_setup() {
65 + use debug && append-flags -DPASSENGER_DEBUG
66 + depend.apache_pkg_setup
67 +}
68 +
69 +all_ruby_prepare() {
70 + eapply "${FILESDIR}"/${PN}-5.1.11-gentoo.patch
71 +
72 + # Change these with sed instead of a patch so that we can easily use
73 + # the toolchain-funcs methods.
74 + sed -i -e "/^CC/ s/=.*$/= '$(tc-getCC)'/" \
75 + -e "/^CXX\s/ s/=.*$/= '$(tc-getCXX)'/" \
76 + -e 's/PlatformInfo.debugging_cflags//' build/basics.rb || die
77 +
78 + # Avoid fixed debugging CFLAGs.
79 + sed -e '/debugging_cflags/areturn ""' -i src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb || die
80 +
81 + # Use sed here so that we can dynamically set the documentation directory.
82 + sed -i -e "s:/usr/share/doc/passenger:/usr/share/doc/${P}:" \
83 + -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" \
84 + src/ruby_supportlib/phusion_passenger.rb || die
85 + sed -i -e "s:/usr/lib/phusion-passenger/agents:/usr/libexec/phusion-passenger/agents:" src/cxx_supportlib/ResourceLocator.h || die
86 +
87 + # Don't install a tool that won't work in our setup.
88 + sed -i -e '/passenger-install-apache2-module/d' src/ruby_supportlib/phusion_passenger/packaging.rb || die
89 + rm -f bin/passenger-install-apache2-module || die "Unable to remove unneeded install script."
90 +
91 + # Make sure we use the system-provided version where possible
92 + rm -rf src/cxx_supportlib/vendor-copy/libuv || die "Unable to remove vendored code."
93 +
94 + # Fix hard-coded use of AR
95 + sed -i -e "s/ar cru/"$(tc-getAR)" cru/" build/support/cplusplus.rb || die
96 +
97 + # Make sure apache support is not attempted with -apache2
98 + if ! use apache2 ; then
99 + sed -i -e '/fakeroot/ s/:apache2, //' build/packaging.rb || die
100 + fi
101 +}
102 +
103 +all_ruby_compile() {
104 + if use apache2 ; then
105 + V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
106 + APXS2="${APXS}" \
107 + HTTPD="${APACHE_BIN}" \
108 + FS_LIBDIR='/usr/'$(get_libdir) \
109 + USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
110 + RANLIB=$(tc-getRANLIB) \
111 + ruby -S rake apache2 || die "rake failed"
112 + fi
113 +}
114 +
115 +each_ruby_compile() {
116 + append-flags -fno-strict-aliasing
117 +
118 + V=1 EXTRA_LDFLAGS="${LDFLAGS}" \
119 + APXS2="${APXS}" \
120 + HTTPD="${APACHE_BIN}" \
121 + FS_LIBDIR='/usr/'$(get_libdir) \
122 + USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
123 + RANLIB=$(tc-getRANLIB) \
124 + ${RUBY} -S rake native_support || die "rake failed"
125 +}
126 +
127 +all_ruby_install() {
128 + if use apache2 ; then
129 + APACHE2_MOD_FILE="${S}/buildout/apache2/mod_${PN}.so"
130 + apache-module_src_install
131 +
132 + # Patch in the correct libdir
133 + sed -i -e 's:/usr/lib/:/usr/'$(get_libdir)'/:' "${D}${APACHE_MODULES_CONFDIR}/30_mod_${PN}.conf" || die
134 + fi
135 +
136 + dodoc CHANGELOG README.md doc/*.md
137 +}
138 +
139 +each_ruby_install() {
140 + DISTDIR="${D}" \
141 + RUBYLIBDIR="$(ruby_rbconfig_value vendordir)" \
142 + RUBYARCHDIR="$(ruby_rbconfig_value archdir)" \
143 + APXS2="${APXS}" \
144 + HTTPD="${APACHE_BIN}" \
145 + FS_DOCDIR="/usr/share/doc/${P}" \
146 + FS_LIBDIR='/usr/'$(get_libdir) \
147 + EXTRA_LDFLAGS="${LDFLAGS}" \
148 + USE_VENDORED_LIBUV="no" LIBUV_LIBS="-luv" \
149 + RANLIB=$(tc-getRANLIB) \
150 + ${RUBY} -S rake fakeroot || die "rake failed"
151 +}