Lines 1-10
Link Here
|
1 |
# Copyright 1999-2009 Gentoo Foundation |
1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.8-r2.ebuild,v 1.1 2009/01/11 21:16:32 hoffie Exp $ |
3 |
# $Header: $ |
4 |
|
4 |
|
5 |
CGI_SAPI_USE="discard-path force-cgi-redirect" |
5 |
CGI_SAPI_USE="discard-path force-cgi-redirect" |
6 |
APACHE2_SAPI_USE="concurrentmodphp threads" |
6 |
APACHE2_SAPI_USE="concurrentmodphp threads" |
7 |
IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild" |
7 |
IUSE="cli cgi embed ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild" |
8 |
|
8 |
|
9 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
9 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
10 |
|
10 |
|
Lines 35-47
Link Here
|
35 |
# Suhosin patch support |
35 |
# Suhosin patch support |
36 |
[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://gentoo.longitekk.com/${SUHOSIN_PATCH} )" |
36 |
[[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://gentoo.longitekk.com/${SUHOSIN_PATCH} )" |
37 |
|
37 |
|
38 |
DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs." |
38 |
DESCRIPTION="The PHP language runtime engine: CLI, CGI, Apache2 and Embed SAPIs." |
39 |
|
39 |
|
40 |
DEPEND="app-admin/php-toolkit |
40 |
DEPEND="app-admin/php-toolkit |
41 |
imap? ( >=virtual/imap-c-client-2006k ) |
41 |
imap? ( >=virtual/imap-c-client-2006k ) |
42 |
pcre? ( >=dev-libs/libpcre-7.8 ) |
42 |
pcre? ( >=dev-libs/libpcre-7.8 ) |
43 |
xml? ( >=dev-libs/libxml2-2.7.2-r2 ) |
43 |
xml? ( >=dev-libs/libxml2-2.7.2-r2 ) |
44 |
xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )" |
44 |
xmlrpc? ( >=dev-libs/libxml2-2.7.1-r2 virtual/libiconv )" |
45 |
|
45 |
|
46 |
RDEPEND="${DEPEND}" |
46 |
RDEPEND="${DEPEND}" |
47 |
if [[ -n "${KOLAB_PATCH}" ]] ; then |
47 |
if [[ -n "${KOLAB_PATCH}" ]] ; then |
Lines 57-63
Link Here
|
57 |
|
57 |
|
58 |
# Make sure the user has specified at least one SAPI |
58 |
# Make sure the user has specified at least one SAPI |
59 |
einfo "Determining SAPI(s) to build" |
59 |
einfo "Determining SAPI(s) to build" |
60 |
phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache2 |
60 |
phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi embed apache2 |
61 |
|
61 |
|
62 |
# Threaded Apache2 support |
62 |
# Threaded Apache2 support |
63 |
if use apache2 ; then |
63 |
if use apache2 ; then |
Lines 120-125
Link Here
|
120 |
PHPSAPIS="${PHPSAPIS} cgi" |
120 |
PHPSAPIS="${PHPSAPIS} cgi" |
121 |
fi |
121 |
fi |
122 |
|
122 |
|
|
|
123 |
if use embed ; then |
124 |
PHPSAPIS="${PHPSAPIS} embed" |
125 |
fi |
126 |
|
123 |
# note - apache SAPI comes after the simpler cli/cgi sapis |
127 |
# note - apache SAPI comes after the simpler cli/cgi sapis |
124 |
if use apache2 ; then |
128 |
if use apache2 ; then |
125 |
PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" |
129 |
PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" |
Lines 232-237
Link Here
|
232 |
build_cli=0 |
236 |
build_cli=0 |
233 |
build_cgi=0 |
237 |
build_cgi=0 |
234 |
build_apache2=0 |
238 |
build_apache2=0 |
|
|
239 |
build_embed=0 |
235 |
my_conf="" |
240 |
my_conf="" |
236 |
|
241 |
|
237 |
for x in ${PHPSAPIS} ; do |
242 |
for x in ${PHPSAPIS} ; do |
Lines 242-247
Link Here
|
242 |
cgi) |
247 |
cgi) |
243 |
build_cgi=1 |
248 |
build_cgi=1 |
244 |
;; |
249 |
;; |
|
|
250 |
embed) |
251 |
build_embed=1 |
252 |
;; |
245 |
apache2) |
253 |
apache2) |
246 |
build_apache2=1 |
254 |
build_apache2=1 |
247 |
;; |
255 |
;; |
Lines 262-267
Link Here
|
262 |
my_conf="${my_conf} --disable-cgi" |
270 |
my_conf="${my_conf} --disable-cgi" |
263 |
fi |
271 |
fi |
264 |
|
272 |
|
|
|
273 |
if [[ ${build_embed} = 1 ]] ; then |
274 |
my_conf="${my_conf} --enable-embed" |
275 |
else |
276 |
my_conf="${my_conf} --disable-embed" |
277 |
fi |
278 |
|
265 |
if [[ ${build_apache2} = 1 ]] ; then |
279 |
if [[ ${build_apache2} = 1 ]] ; then |
266 |
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2" |
280 |
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2" |
267 |
|
281 |
|
Lines 316-321
Link Here
|
316 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
330 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
317 |
fi |
331 |
fi |
318 |
|
332 |
|
|
|
333 |
if [[ ${build_embed} = 1 ]] ; then |
334 |
einfo |
335 |
einfo "Building Embed SAPI" |
336 |
einfo |
337 |
|
338 |
sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/embed-php5"|g;' -i main/build-defs.h |
339 |
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/embed-php5/ext-active"|g;' -i main/build-defs.h |
340 |
for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do |
341 |
[[ -f ${x} ]] && rm -f ${x} |
342 |
done |
343 |
make sapi/embed/php || die "Unable to make Embed SAPI" |
344 |
fi |
345 |
|
319 |
if [[ ${build_apache2} = 1 ]] ; then |
346 |
if [[ ${build_apache2} = 1 ]] ; then |
320 |
einfo |
347 |
einfo |
321 |
einfo "Building apache${APACHE_VERSION} SAPI" |
348 |
einfo "Building apache${APACHE_VERSION} SAPI" |
Lines 380-385
Link Here
|
380 |
php5_2-sapi_src_compile |
407 |
php5_2-sapi_src_compile |
381 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
408 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
382 |
;; |
409 |
;; |
|
|
410 |
embed) |
411 |
my_conf="${my_conf} --disable-cli --disable-cgi --enable-embed" |
412 |
php5_2-sapi_src_compile |
413 |
;; |
383 |
apache2) |
414 |
apache2) |
384 |
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2" |
415 |
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2" |
385 |
php5_2-sapi_src_compile |
416 |
php5_2-sapi_src_compile |
Lines 420-425
Link Here
|
420 |
dobin php-cgi || die "Unable to install ${x} sapi" |
451 |
dobin php-cgi || die "Unable to install ${x} sapi" |
421 |
php5_2-sapi_install_ini |
452 |
php5_2-sapi_install_ini |
422 |
;; |
453 |
;; |
|
|
454 |
embed) |
455 |
einfo "Installing Embed SAPI" |
456 |
into ${destdir} |
457 |
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" |
458 |
php5_2-sapi_install_ini |
459 |
;; |
423 |
apache2) |
460 |
apache2) |
424 |
einfo "Installing Apache${APACHE_VERSION} SAPI" |
461 |
einfo "Installing Apache${APACHE_VERSION} SAPI" |
425 |
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" |
462 |
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" |