From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect-php:master commit in: src/
Date: Fri, 11 Dec 2015 00:40:29 +0000 (UTC) [thread overview]
Message-ID: <1449755125.f835773f9365d1f5fe46079df7cb7477f200f2ed.mjo@gentoo> (raw)
commit: f835773f9365d1f5fe46079df7cb7477f200f2ed
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 10 13:45:25 2015 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Dec 10 13:45:25 2015 +0000
URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=f835773f
Use fixed ".so" suffix for libphp instead of computing it.
The only supported way to run PHP/Apache these days is as a dynamic
shared object (DSO). The DSO will have an ".so" suffix, so we don't
need to probe to see if libphp*.a exists.
This also avoids a hidden dependency on libz, for whose static library
we were probing.
src/php.eselect.in | 30 +++++++-----------------------
1 file changed, 7 insertions(+), 23 deletions(-)
diff --git a/src/php.eselect.in b/src/php.eselect.in
index 363dc1d..5bbb491 100644
--- a/src/php.eselect.in
+++ b/src/php.eselect.in
@@ -65,22 +65,6 @@ get_active_libdir() {
echo /usr/lib
}
-get_libname() {
- # probe on a well-known library
- local lib ret=.so
- for lib in "${EROOT}"$(get_active_libdir)/libz.* ; do
- case "${lib##*/}" in
- libz.a) ret=.a ;; # some platforms use .a as ext
- libz.*.*) continue ;;
- libz.*)
- ret=${lib##*libz}
- break
- ;;
- esac
- done
- echo ${ret}
-}
-
cleanup() {
local target=$(find_targets_$1 | tail -n 1)
[[ -z $target ]] &&
@@ -102,7 +86,7 @@ find_targets_apache2() {
local libs target libdir
for target in $(find_targets); do
for libdir in $(get_libdirs); do
- libs="${EROOT}${libdir}/$target/apache2/libphp[57]$(get_libname)"
+ libs="${EROOT}${libdir}/$target/apache2/libphp[57].so"
for lib in $libs; do
[[ -f "${lib}" ]] && echo $target
done
@@ -161,12 +145,12 @@ get_active_fpm() {
get_active_apache2() {
local libs target ver
- libs="${EROOT}$(get_active_libdir)/apache2/modules/libphp[57]$(get_libname)"
+ libs="${EROOT}$(get_active_libdir)/apache2/modules/libphp[57].so"
# This sed expression finds the "display name" of the PHP version
# corresponding to a copy of libphp. For example, it parses the
# string "php5.6" out of "/usr/lib64/php5.6/apache2/libphp5.so".
- ver="s:.*/usr/.*/\(php[0-9]\.[0-9]\)/apache2/libphp[57]$(get_libname):\1:p"
+ ver="s:.*/usr/.*/\(php[0-9]\.[0-9]\)/apache2/libphp[57].so:\1:p"
for lib in $libs; do
if [[ -L "${lib}" ]] ; then
target=$(canonicalise "${lib}")
@@ -254,10 +238,10 @@ set_apache2() {
local libdir t=$(resolv_target apache2 $1)
[[ -z $t ]] && die -q "Bad target"
for libdir in $(get_libdirs); do
- rm -f "${EROOT}${libdir}"/apache2/modules/libphp{5,7}$(get_libname)
- @LN_S@ --force ../../$t/apache2/libphp${t:3:1}$(get_libname) \
- "${EROOT}"${libdir}/apache2/modules/ || \
- die -q "Failed to set symlink for ${EPREFIX}${libdir}/apache2/modules/libphp${t:3:1}$(get_libname)"
+ rm -f "${EROOT}${libdir}/apache2/modules/libphp[57].so"
+ @LN_S@ --force "../../$t/apache2/libphp${t:3:1}.so" \
+ "${EROOT}${libdir}/apache2/modules/" || \
+ die -q "Failed to set symlink for ${EPREFIX}${libdir}/apache2/modules/libphp${t:3:1}.so"
done
echo "You have to run \`${EPREFIX}/etc/init.d/apache2 restart' for the changes to take effect"
}
next reply other threads:[~2015-12-11 0:40 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 0:40 Michael Orlitzky [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-12-08 2:24 [gentoo-commits] proj/eselect-php:master commit in: src/ Brian Evans
2020-03-01 12:59 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-12 22:30 Michael Orlitzky
2018-04-12 2:24 Michael Orlitzky
2016-01-22 20:53 Michael Orlitzky
2016-01-22 19:42 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 3:15 Michael Orlitzky
2016-01-22 3:15 Michael Orlitzky
2016-01-22 3:15 Michael Orlitzky
2016-01-22 3:15 Michael Orlitzky
2016-01-20 14:42 Michael Orlitzky
2016-01-09 17:20 Michael Orlitzky
2016-01-09 17:20 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-18 2:27 Brian Evans
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449755125.f835773f9365d1f5fe46079df7cb7477f200f2ed.mjo@gentoo \
--to=mjo@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox