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

Collapse All | Expand All

(-)file_not_specified_in_diff (-9 / +9 lines)
Line  Link Here
0
-- eselect-php-0.6.2
0
++ eselect-php-0.6.2
Lines 10-19 Link Here
10
get_libdir() {
10
get_libdir() {
11
	local dir
11
	local dir
12
	if has lib64 $(list_libdirs); then
12
	if has lib64 $(list_libdirs); then
13
		echo /usr/lib64
13
		echo @GENTOO_PORTAGE_EPREFIX@/usr/lib64
14
		return
14
		return
15
	fi
15
	fi
16
	echo /usr/lib
16
	echo @GENTOO_PORTAGE_EPREFIX@/usr/lib
17
}
17
}
18
18
19
find_targets() {
19
find_targets() {
Lines 49-63 Link Here
49
}
49
}
50
50
51
get_active_cli() {
51
get_active_cli() {
52
	readlink -e /usr/bin/php | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-9][0-9]*\)/bin/php:\1:p"
52
	readlink -e @GENTOO_PORTAGE_EPREFIX@/usr/bin/php | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-9][0-9]*\)/bin/php:\1:p"
53
}
53
}
54
54
55
get_active_cgi() {
55
get_active_cgi() {
56
	readlink -e /usr/bin/php-cgi | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-9]\)/bin/php-cgi:\1:p"
56
	readlink -e @GENTOO_PORTAGE_EPREFIX@/usr/bin/php-cgi | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-9]\)/bin/php-cgi:\1:p"
57
}
57
}
58
58
59
get_active_fpm() {
59
get_active_fpm() {
60
	readlink -e /usr/bin/php-fpm | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-9]\)/bin/php-fpm:\1:p"
60
	readlink -e @GENTOO_PORTAGE_EPREFIX@/usr/bin/php-fpm | sed -ne "s:$(get_libdir)/\(php[0-9]\.[0-9]\)/bin/php-fpm:\1:p"
61
}
61
}
62
62
63
get_active_apache2() {
63
get_active_apache2() {
Lines 137-143 Link Here
137
	[[ -z $t ]] && die -q "Bad target"
137
	[[ -z $t ]] && die -q "Bad target"
138
	local file
138
	local file
139
	for file in php phpize php-config; do
139
	for file in php phpize php-config; do
140
		ln -sf $(get_libdir)/$t/bin/$file /usr/bin/$file || \
140
		ln -sf $(get_libdir)/$t/bin/$file @GENTOO_PORTAGE_EPREFIX@/usr/bin/$file || \
141
		  die -q "Failed to create symlink for ${file}"
141
		  die -q "Failed to create symlink for ${file}"
142
	done
142
	done
143
}
143
}
Lines 146-159 Link Here
146
	t=$(resolv_target cgi $1)
146
	t=$(resolv_target cgi $1)
147
	[[ -z $t ]] && die -q "Bad target"
147
	[[ -z $t ]] && die -q "Bad target"
148
	local file
148
	local file
149
	ln -sf $(get_libdir)/$t/bin/php-cgi /usr/bin/php-cgi || \
149
	ln -sf $(get_libdir)/$t/bin/php-cgi @GENTOO_PORTAGE_EPREFIX@/usr/bin/php-cgi || \
150
	  die -q "Failed to create symlink for php-cgi"
150
	  die -q "Failed to create symlink for php-cgi"
151
}
151
}
152
152
153
set_fpm() {
153
set_fpm() {
154
	local t=$(resolv_target fpm $1)
154
	local t=$(resolv_target fpm $1)
155
	[[ -z $t ]] && die -q "Bad target"
155
	[[ -z $t ]] && die -q "Bad target"
156
	ln -sf $(get_libdir)/$t/bin/php-fpm /usr/bin/php-fpm || \
156
	ln -sf $(get_libdir)/$t/bin/php-fpm @GENTOO_PORTAGE_EPREFIX@/usr/bin/php-fpm || \
157
	  die -q "Failed to create symlink for the php-fpm binary"
157
	  die -q "Failed to create symlink for the php-fpm binary"
158
	echo "You have to run \`/etc/init.d/php-fpm restart' for the changes to take effect"
158
	echo "You have to run \`/etc/init.d/php-fpm restart' for the changes to take effect"
159
}
159
}

Return to bug 356467