1 |
commit: faa43f444ebc363689ea5d0e3c8068540548f541 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 23 16:31:48 2015 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 23 16:32:27 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faa43f44 |
7 |
|
8 |
dev-lang/php: revision the 5.6.x and 7.x series to use upstream php-fpm.conf. |
9 |
|
10 |
There are a few changes batched together here. |
11 |
|
12 |
The main purpose of the new revisions is to stop using our bundled |
13 |
php-fpm.conf (from php-5.3) and switch to the one provided by |
14 |
upstream. This is bug 559116. In the 5.6.x series, this is trivial: we |
15 |
just install the php-fpm.conf from the tarball. But in 7.x, upstream |
16 |
has split the FPM config into pieces. Their default "include" path |
17 |
needed to be changed for our slotting, so that has been done with a |
18 |
`sed` in src_prepare(). We then install the split "www.conf" config |
19 |
file in the location that was enshrined with `sed`. |
20 |
|
21 |
Next, the autotools-utils eclass was dropped. The functionality from |
22 |
src_configure() was inlined. This is due to the deprecation of that |
23 |
eclass; see, |
24 |
|
25 |
https://blogs.gentoo.org/mgorny/2015/11/13/the-ultimate-guide-to-eapi-6/ |
26 |
|
27 |
Finally, the db-use eclass was dropped. It was no longer used. |
28 |
|
29 |
Gentoo-Bug: 559116 |
30 |
|
31 |
Package-Manager: portage-2.2.20.1 |
32 |
|
33 |
.../{php-5.6.15-r3.ebuild => php-5.6.15-r4.ebuild} | 29 +++++++-------- |
34 |
...hp-7.0.0_rc7.ebuild => php-7.0.0_rc7-r1.ebuild} | 41 +++++++++++++--------- |
35 |
2 files changed, 36 insertions(+), 34 deletions(-) |
36 |
|
37 |
diff --git a/dev-lang/php/php-5.6.15-r3.ebuild b/dev-lang/php/php-5.6.15-r4.ebuild |
38 |
similarity index 96% |
39 |
rename from dev-lang/php/php-5.6.15-r3.ebuild |
40 |
rename to dev-lang/php/php-5.6.15-r4.ebuild |
41 |
index 85c79f1..0925fd3 100644 |
42 |
--- a/dev-lang/php/php-5.6.15-r3.ebuild |
43 |
+++ b/dev-lang/php/php-5.6.15-r4.ebuild |
44 |
@@ -4,7 +4,7 @@ |
45 |
|
46 |
EAPI=5 |
47 |
|
48 |
-inherit eutils autotools autotools-utils flag-o-matic versionator depend.apache apache-module db-use libtool systemd |
49 |
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module libtool systemd |
50 |
|
51 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
52 |
|
53 |
@@ -262,22 +262,14 @@ php_install_ini() { |
54 |
fi |
55 |
|
56 |
# SAPI-specific handling |
57 |
- |
58 |
if [[ "${sapi}" == "fpm" ]] ; then |
59 |
- [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0 |
60 |
- einfo "Installing FPM CGI config file php-fpm.conf" |
61 |
+ einfo "Installing FPM config file php-fpm.conf" |
62 |
insinto "${PHP_INI_DIR#${EPREFIX}}" |
63 |
- newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf |
64 |
- |
65 |
- # Remove bogus /etc/php-fpm.conf.default (bug 359906) |
66 |
- rm -f "${ED}/etc/php-fpm.conf.default" || die |
67 |
+ doins sapi/fpm/php-fpm.conf |
68 |
fi |
69 |
|
70 |
- # Install PHP ini files into /usr/share/php |
71 |
- |
72 |
dodoc php.ini-development |
73 |
dodoc php.ini-production |
74 |
- |
75 |
} |
76 |
|
77 |
php_set_ini_dir() { |
78 |
@@ -530,8 +522,9 @@ src_configure() { |
79 |
use "${one_sapi}" || continue |
80 |
php_set_ini_dir "${one_sapi}" |
81 |
|
82 |
- # The BUILD_DIR variable is used by autotools-utils to determine |
83 |
- # where to output the files that autotools creates. |
84 |
+ # The BUILD_DIR variable is used to determine where to output |
85 |
+ # the files that autotools creates. This was all originally |
86 |
+ # based on the autotools-utils eclass. |
87 |
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
88 |
cp -r "${S}" "${BUILD_DIR}" || die |
89 |
cd "${BUILD_DIR}" || die |
90 |
@@ -561,12 +554,14 @@ src_configure() { |
91 |
esac |
92 |
done |
93 |
|
94 |
- # Construct the autotools-utils $myeconfargs array by |
95 |
- # concatenating $our_conf (the common args) and $sapi_conf (the |
96 |
- # SAPI-specific args). |
97 |
+ # Construct the $myeconfargs array by concatenating $our_conf |
98 |
+ # (the common args) and $sapi_conf (the SAPI-specific args). |
99 |
local myeconfargs=( "${our_conf[@]}" ) |
100 |
myeconfargs+=( "${sapi_conf[@]}" ) |
101 |
- autotools-utils_src_configure |
102 |
+ |
103 |
+ pushd "${BUILD_DIR}" > /dev/null || die |
104 |
+ econf "${myeconfargs[@]}" |
105 |
+ popd > /dev/null || die |
106 |
done |
107 |
} |
108 |
|
109 |
|
110 |
diff --git a/dev-lang/php/php-7.0.0_rc7.ebuild b/dev-lang/php/php-7.0.0_rc7-r1.ebuild |
111 |
similarity index 94% |
112 |
rename from dev-lang/php/php-7.0.0_rc7.ebuild |
113 |
rename to dev-lang/php/php-7.0.0_rc7-r1.ebuild |
114 |
index 63e9778..ca638a4 100644 |
115 |
--- a/dev-lang/php/php-7.0.0_rc7.ebuild |
116 |
+++ b/dev-lang/php/php-7.0.0_rc7-r1.ebuild |
117 |
@@ -4,7 +4,7 @@ |
118 |
|
119 |
EAPI=5 |
120 |
|
121 |
-inherit eutils autotools autotools-utils flag-o-matic versionator depend.apache apache-module db-use libtool systemd |
122 |
+inherit eutils autotools flag-o-matic versionator depend.apache apache-module libtool systemd |
123 |
|
124 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
125 |
|
126 |
@@ -252,22 +252,16 @@ php_install_ini() { |
127 |
fi |
128 |
|
129 |
# SAPI-specific handling |
130 |
- |
131 |
if [[ "${sapi}" == "fpm" ]] ; then |
132 |
- [[ -z ${PHP_FPM_CONF_VER} ]] && PHP_FPM_CONF_VER=0 |
133 |
- einfo "Installing FPM CGI config file php-fpm.conf" |
134 |
+ einfo "Installing FPM config files php-fpm.conf and www.conf" |
135 |
insinto "${PHP_INI_DIR#${EPREFIX}}" |
136 |
- newins "${FILESDIR}/php-fpm-r${PHP_FPM_CONF_VER}.conf" php-fpm.conf |
137 |
- |
138 |
- # Remove bogus /etc/php-fpm.conf.default (bug 359906) |
139 |
- rm -f "${ED}/etc/php-fpm.conf.default" || die |
140 |
+ doins sapi/fpm/php-fpm.conf |
141 |
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
142 |
+ doins sapi/fpm/www.conf |
143 |
fi |
144 |
|
145 |
- # Install PHP ini files into /usr/share/php |
146 |
- |
147 |
dodoc php.ini-development |
148 |
dodoc php.ini-production |
149 |
- |
150 |
} |
151 |
|
152 |
php_set_ini_dir() { |
153 |
@@ -305,6 +299,16 @@ src_prepare() { |
154 |
# http://bugs.php.net/bug.php?id=48795, bug #343481 |
155 |
sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die |
156 |
fi |
157 |
+ |
158 |
+ # In php-7.x, the FPM pool configuration files have been split off |
159 |
+ # of the main config. By default the pool config files go in |
160 |
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
161 |
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
162 |
+ # we'll install the pool configuration file "www.conf" there. |
163 |
+ php_set_ini_dir fpm |
164 |
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
165 |
+ sapi/fpm/php-fpm.conf.in \ |
166 |
+ || die 'failed to move the include directory in php-fpm.conf' |
167 |
} |
168 |
|
169 |
src_configure() { |
170 |
@@ -501,8 +505,9 @@ src_configure() { |
171 |
use "${one_sapi}" || continue |
172 |
php_set_ini_dir "${one_sapi}" |
173 |
|
174 |
- # The BUILD_DIR variable is used by autotools-utils to determine |
175 |
- # where to output the files that autotools creates. |
176 |
+ # The BUILD_DIR variable is used to determine where to output |
177 |
+ # the files that autotools creates. This was all originally |
178 |
+ # based on the autotools-utils eclass. |
179 |
BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
180 |
cp -r "${S}" "${BUILD_DIR}" || die |
181 |
cd "${BUILD_DIR}" || die |
182 |
@@ -532,12 +537,14 @@ src_configure() { |
183 |
esac |
184 |
done |
185 |
|
186 |
- # Construct the autotools-utils $myeconfargs array by |
187 |
- # concatenating $our_conf (the common args) and $sapi_conf (the |
188 |
- # SAPI-specific args). |
189 |
+ # Construct the $myeconfargs array by concatenating $our_conf |
190 |
+ # (the common args) and $sapi_conf (the SAPI-specific args). |
191 |
local myeconfargs=( "${our_conf[@]}" ) |
192 |
myeconfargs+=( "${sapi_conf[@]}" ) |
193 |
- autotools-utils_src_configure |
194 |
+ |
195 |
+ pushd "${BUILD_DIR}" > /dev/null || die |
196 |
+ econf "${myeconfargs[@]}" |
197 |
+ popd > /dev/null || die |
198 |
done |
199 |
} |