1 |
commit: bbd39788128eeb5fe16a41f55c7da8ce5c0808e2 |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 10 21:05:33 2017 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 10 22:02:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbd39788 |
7 |
|
8 |
app-eselect/eselect-php: do not use get_libdir in php-fpm-launcher |
9 |
|
10 |
Closes: https://bugs.gentoo.org/640460 |
11 |
Package-Manager: Portage-2.3.17, Repoman-2.3.6 |
12 |
|
13 |
...eselect-php-9999.ebuild => eselect-php-0.9.4-r3.ebuild} | 14 +++++--------- |
14 |
app-eselect/eselect-php/eselect-php-9999.ebuild | 3 ++- |
15 |
app-eselect/eselect-php/files/php-fpm-launcher-r3 | 11 +++++++++++ |
16 |
3 files changed, 18 insertions(+), 10 deletions(-) |
17 |
|
18 |
diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild |
19 |
similarity index 82% |
20 |
copy from app-eselect/eselect-php/eselect-php-9999.ebuild |
21 |
copy to app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild |
22 |
index f695558d423..9d383514ec4 100644 |
23 |
--- a/app-eselect/eselect-php/eselect-php-9999.ebuild |
24 |
+++ b/app-eselect/eselect-php/eselect-php-0.9.4-r3.ebuild |
25 |
@@ -3,15 +3,15 @@ |
26 |
|
27 |
EAPI=6 |
28 |
|
29 |
-inherit systemd git-r3 autotools |
30 |
+inherit systemd |
31 |
|
32 |
DESCRIPTION="PHP eselect module" |
33 |
HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-php.git/" |
34 |
-EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/eselect-php.git" |
35 |
+SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz" |
36 |
|
37 |
LICENSE="GPL-2" |
38 |
SLOT="0" |
39 |
-KEYWORDS="" |
40 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
41 |
IUSE="fpm apache2" |
42 |
|
43 |
# The "DirectoryIndex" line in 70_mod_php.conf requires mod_dir. |
44 |
@@ -19,11 +19,6 @@ RDEPEND="app-admin/eselect |
45 |
apache2? ( www-servers/apache[apache2_modules_dir] ) |
46 |
fpm? ( sys-apps/gentoo-functions )" |
47 |
|
48 |
-src_prepare() { |
49 |
- eapply_user |
50 |
- eautoreconf |
51 |
-} |
52 |
- |
53 |
src_configure(){ |
54 |
# We expect localstatedir to be "var"ish, not "var/lib"ish, because |
55 |
# that's what PHP upstream expects. See for example the FPM |
56 |
@@ -49,8 +44,9 @@ src_install() { |
57 |
|
58 |
if use fpm ; then |
59 |
systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf" |
60 |
+ sed -e "s,@libdir@,$(get_libdir),g" "${FILESDIR}/php-fpm-launcher-r3" > "${T}"/php-fpm-launcher || die |
61 |
exeinto /usr/libexec |
62 |
- newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher |
63 |
+ doexe "${T}"/php-fpm-launcher |
64 |
fi |
65 |
} |
66 |
|
67 |
|
68 |
diff --git a/app-eselect/eselect-php/eselect-php-9999.ebuild b/app-eselect/eselect-php/eselect-php-9999.ebuild |
69 |
index f695558d423..a8aa5bb8f4a 100644 |
70 |
--- a/app-eselect/eselect-php/eselect-php-9999.ebuild |
71 |
+++ b/app-eselect/eselect-php/eselect-php-9999.ebuild |
72 |
@@ -49,8 +49,9 @@ src_install() { |
73 |
|
74 |
if use fpm ; then |
75 |
systemd_dotmpfilesd "${FILESDIR}/php-fpm.conf" |
76 |
+ sed -e "s,@libdir@,$(get_libdir),g" "${FILESDIR}/php-fpm-launcher-r3" > "${T}"/php-fpm-launcher || die |
77 |
exeinto /usr/libexec |
78 |
- newexe "${FILESDIR}/php-fpm-launcher-r2" php-fpm-launcher |
79 |
+ doexe "${T}"/php-fpm-launcher |
80 |
fi |
81 |
} |
82 |
|
83 |
|
84 |
diff --git a/app-eselect/eselect-php/files/php-fpm-launcher-r3 b/app-eselect/eselect-php/files/php-fpm-launcher-r3 |
85 |
new file mode 100644 |
86 |
index 00000000000..a2b6eabc4da |
87 |
--- /dev/null |
88 |
+++ b/app-eselect/eselect-php/files/php-fpm-launcher-r3 |
89 |
@@ -0,0 +1,11 @@ |
90 |
+#!/bin/sh |
91 |
+ |
92 |
+# If there are no arguments, then "shift" will fail (bug 626496). |
93 |
+if [ $# -eq 0 ]; then |
94 |
+ PHP_SLOT=$(eselect php show fpm) |
95 |
+else |
96 |
+ PHP_SLOT=$1 |
97 |
+ shift |
98 |
+fi |
99 |
+ |
100 |
+exec "/usr/@libdir@/${PHP_SLOT}/bin/php-fpm" "${@}" |