|
Lines 113-123
sapi_active_link_dir() {
Link Here
|
| 113 |
local sapi="${1}" |
113 |
local sapi="${1}" |
| 114 |
|
114 |
|
| 115 |
case "${sapi}" in |
115 |
case "${sapi}" in |
| 116 |
apache2) echo "@LIBDIR@/apache2/modules" ;; |
116 |
apache2) echo "${ROOT}@LIBDIR@/apache2/modules" ;; |
| 117 |
cli) echo "@BINDIR@" ;; |
117 |
cli) echo "${ROOT}@BINDIR@" ;; |
| 118 |
fpm) echo "@BINDIR@" ;; |
118 |
fpm) echo "${ROOT}@BINDIR@" ;; |
| 119 |
cgi) echo "@BINDIR@" ;; |
119 |
cgi) echo "${ROOT}@BINDIR@" ;; |
| 120 |
phpdbg) echo "@BINDIR@" ;; |
120 |
phpdbg) echo "${ROOT}@BINDIR@" ;; |
| 121 |
*) die "invalid SAPI name: ${sapi}" ;; |
121 |
*) die "invalid SAPI name: ${sapi}" ;; |
| 122 |
esac |
122 |
esac |
| 123 |
} |
123 |
} |
|
Lines 249-255
find_targets() {
Link Here
|
| 249 |
# TODO: when there aren't any phpX.Y directories, this returns |
249 |
# TODO: when there aren't any phpX.Y directories, this returns |
| 250 |
# "php*.*". This doesn't seem to bother our consumers, but it |
250 |
# "php*.*". This doesn't seem to bother our consumers, but it |
| 251 |
# would probably be more polite to return nothing in that case. |
251 |
# would probably be more polite to return nothing in that case. |
| 252 |
cd "@LIBDIR@" && echo php*.* |
252 |
cd "${ROOT}@LIBDIR@" && echo php*.* |
| 253 |
} |
253 |
} |
| 254 |
|
254 |
|
| 255 |
# List all valid targets for the given SAPI. The list is obtained by |
255 |
# List all valid targets for the given SAPI. The list is obtained by |
|
Lines 283-289
find_sapi_targets() {
Link Here
|
| 283 |
esac |
283 |
esac |
| 284 |
|
284 |
|
| 285 |
for target in $(find_targets); do |
285 |
for target in $(find_targets); do |
| 286 |
local pattern="@LIBDIR@/${target}/${pattern_suffix}" |
286 |
local pattern="${ROOT}@LIBDIR@/${target}/${pattern_suffix}" |
| 287 |
|
287 |
|
| 288 |
for file in $pattern; do |
288 |
for file in $pattern; do |
| 289 |
[[ -f "${file}" ]] && echo "${target}" |
289 |
[[ -f "${file}" ]] && echo "${target}" |
|
Lines 338-344
get_sapi_active_target() {
Link Here
|
| 338 |
# |
338 |
# |
| 339 |
write_mod_php_conf() { |
339 |
write_mod_php_conf() { |
| 340 |
local target="${1}" |
340 |
local target="${1}" |
| 341 |
local conf_dir="@LOCALSTATEDIR@/lib/eselect-php" |
341 |
local conf_dir="${ROOT}@LOCALSTATEDIR@/lib/eselect-php" |
| 342 |
local conf_path="${conf_dir}/mod_php.conf" |
342 |
local conf_path="${conf_dir}/mod_php.conf" |
| 343 |
|
343 |
|
| 344 |
@MKDIR_P@ "${conf_dir}" || die "failed to create ${conf_dir}" |
344 |
@MKDIR_P@ "${conf_dir}" || die "failed to create ${conf_dir}" |
| 345 |
- |
|
|