Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 709422 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/php.eselect.in.in (-9 / +18 lines)
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}"
Lines 538-543 describe_list_options() { Link Here
538
}
538
}
539
539
540
do_list() {
540
do_list() {
541
	if [ "${ROOT%/}" != "" ] ; then
542
		local msg
543
		write_warning_msg "ROOT only supported in setting the configuration"
544
		echo
545
	fi
541
	local sapi="${1}"
546
	local sapi="${1}"
542
	check_module "${sapi}"
547
	check_module "${sapi}"
543
	list_sapi "${sapi}"
548
	list_sapi "${sapi}"
Lines 558-563 describe_show_options() { Link Here
558
}
563
}
559
564
560
do_show() {
565
do_show() {
566
	if [ "${ROOT%/}" != "" ] ; then
567
		local msg
568
		write_warning_msg "ROOT only supported in setting the configuration"
569
		echo
570
	fi
561
	local sapi="${1}"
571
	local sapi="${1}"
562
	check_module "${sapi}"
572
	check_module "${sapi}"
563
	get_sapi_active_target "${sapi}"
573
	get_sapi_active_target "${sapi}"
564
- 

Return to bug 709422