Lines 182-189
Link Here
|
182 |
php_init_slot_env ${slot} |
182 |
php_init_slot_env ${slot} |
183 |
|
183 |
|
184 |
# Let's put the default module away |
184 |
# Let's put the default module away |
185 |
insinto "${EXT_DIR}" |
185 |
insinto "${EXT_DIR#${EPREFIX}}" |
186 |
newins "modules/${PHP_EXT_NAME}.so" "${PHP_EXT_NAME}.so" || die "Unable to install extension" |
186 |
newins "modules/${PHP_EXT_NAME}$(get_modname)" "${PHP_EXT_NAME}$(get_modname)" || die "Unable to install extension" |
187 |
|
187 |
|
188 |
local doc |
188 |
local doc |
189 |
for doc in ${DOCS} ; do |
189 |
for doc in ${DOCS} ; do |
Lines 206-217
Link Here
|
206 |
php_init_slot_env() { |
206 |
php_init_slot_env() { |
207 |
libdir=$(get_libdir) |
207 |
libdir=$(get_libdir) |
208 |
|
208 |
|
209 |
PHPIZE="/usr/${libdir}/${1}/bin/phpize" |
209 |
PHPIZE="${EPREFIX}/usr/${libdir}/${1}/bin/phpize" |
210 |
PHPCONFIG="/usr/${libdir}/${1}/bin/php-config" |
210 |
PHPCONFIG="${EPREFIX}/usr/${libdir}/${1}/bin/php-config" |
211 |
PHPCLI="/usr/${libdir}/${1}/bin/php" |
211 |
PHPCLI="${EPREFIX}/usr/${libdir}/${1}/bin/php" |
212 |
PHPCGI="/usr/${libdir}/${1}/bin/php-cgi" |
212 |
PHPCGI="${EPREFIX}/usr/${libdir}/${1}/bin/php-cgi" |
213 |
PHP_PKG="$(best_version =dev-lang/php-${1:3}*)" |
213 |
PHP_PKG="$(best_version =dev-lang/php-${1:3}*)" |
214 |
PHPPREFIX="/usr/${libdir}/${slot}" |
214 |
PHPPREFIX="${EPREFIX}/usr/${libdir}/${slot}" |
215 |
EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)" |
215 |
EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)" |
216 |
PHP_CURRENTSLOT=${1:3} |
216 |
PHP_CURRENTSLOT=${1:3} |
217 |
|
217 |
|
Lines 228-234
Link Here
|
228 |
PHPINIFILELIST="" |
228 |
PHPINIFILELIST="" |
229 |
local x |
229 |
local x |
230 |
for x in ${PHPSAPILIST} ; do |
230 |
for x in ${PHPSAPILIST} ; do |
231 |
if [[ -f "/etc/php/${x}-${1}/php.ini" ]] ; then |
231 |
if [[ -f "${EPREFIX}/etc/php/${x}-${1}/php.ini" ]] ; then |
232 |
PHPINIFILELIST="${PHPINIFILELIST} etc/php/${x}-${1}/ext/${PHP_EXT_NAME}.ini" |
232 |
PHPINIFILELIST="${PHPINIFILELIST} etc/php/${x}-${1}/ext/${PHP_EXT_NAME}.ini" |
233 |
fi |
233 |
fi |
234 |
done |
234 |
done |
Lines 248-254
Link Here
|
248 |
|
248 |
|
249 |
# Add the needed lines to the <ext>.ini files |
249 |
# Add the needed lines to the <ext>.ini files |
250 |
if [[ "${PHP_EXT_INI}" = "yes" ]] ; then |
250 |
if [[ "${PHP_EXT_INI}" = "yes" ]] ; then |
251 |
php-ext-source-r2_addextension "${PHP_EXT_NAME}.so" |
251 |
php-ext-source-r2_addextension "${PHP_EXT_NAME}$(get_modname)" |
252 |
fi |
252 |
fi |
253 |
|
253 |
|
254 |
# Symlink the <ext>.ini files from ext/ to ext-active/ |
254 |
# Symlink the <ext>.ini files from ext/ to ext-active/ |
Lines 260-266
Link Here
|
260 |
done |
260 |
done |
261 |
|
261 |
|
262 |
# Add support for installing PHP files into a version dependant directory |
262 |
# Add support for installing PHP files into a version dependant directory |
263 |
PHP_EXT_SHARED_DIR="/usr/share/php/${PHP_EXT_NAME}" |
263 |
PHP_EXT_SHARED_DIR="${EPREFIX}/usr/share/php/${PHP_EXT_NAME}" |
264 |
done |
264 |
done |
265 |
} |
265 |
} |
266 |
|
266 |
|
Lines 319-327
Link Here
|
319 |
fi |
319 |
fi |
320 |
|
320 |
|
321 |
if [[ -z "${4}" ]] ; then |
321 |
if [[ -z "${4}" ]] ; then |
322 |
einfo "Added '${my_added}' to /${3}" |
322 |
einfo "Added '${my_added}' to ${EROOT}${3}" |
323 |
else |
323 |
else |
324 |
einfo "${4} to /${3}" |
324 |
einfo "${4} to ${EROOT}${3}" |
325 |
fi |
325 |
fi |
326 |
|
326 |
|
327 |
insinto /$(dirname ${3}) |
327 |
insinto /$(dirname ${3}) |