722b2e83d19afa7e32eb3e481ed18fa520c325a7
Hanno Böck php 5.3 slotted ebuild base...

Hanno Böck authored 14 years ago

1) # Copyright 1999-2009 Gentoo Foundation
2) # Distributed under the terms of the GNU General Public License v2
3) # $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.10.ebuild,v 1.7 2009/06/30 13:33:13 armin76 Exp $
4) 
5) CGI_SAPI_USE="discard-path force-cgi-redirect"
6) APACHE2_SAPI_USE="concurrentmodphp threads"
7) IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild"
8) 
Hanno Böck php 5.3 ebuild unstable mar...

Hanno Böck authored 14 years ago

9) KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
Hanno Böck php 5.3 slotted ebuild base...

Hanno Böck authored 14 years ago

10) 
11) # NOTE: Portage doesn't support setting PROVIDE based on the USE flags
12) #		that have been enabled, so we have to PROVIDE everything for now
13) #		and hope for the best
14) PROVIDE="virtual/php virtual/httpd-php"
15) 
16) # php package settings
17) SLOT="5.3"
18) MY_PHP_PV="${PV}"
19) MY_PHP_P="php-${MY_PHP_PV}"
20) PHP_PACKAGE="1"
21) 
22) # php patch settings, general
23) PHP_PATCHSET_REV="${PR/r/}"
24) SUHOSIN_PATCH="suhosin-patch-5.3.1RC1-0.9.8.patch.gz"
25) MULTILIB_PATCH="${MY_PHP_PV}/opt/multilib-search-path.patch"
26) # php patch settings, ebuild specific
27) FASTBUILD_PATCH="${MY_PHP_PV}/opt/fastbuild.patch"
28) CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/concurrent_apache_modules.patch"
29) # kolab patch - http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/patches/php/
30) # bugs about this go to wrobel@gentoo.org
31) KOLAB_PATCH="${MY_PHP_PV}/opt/kolab-imap-annotations.patch"
32) 
33) inherit versionator php5_3-sapi apache-module
34) 
35) # Suhosin patch support
36) [[ -n "${SUHOSIN_PATCH}" ]] && SRC_URI="${SRC_URI} suhosin? ( http://download.suhosin.org/${SUHOSIN_PATCH} )"
37) 
38) DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs."
39) 
40) DEPEND="app-admin/php-toolkit
41) 	imap? ( >=virtual/imap-c-client-2006k )
42) 	pcre? ( >=dev-libs/libpcre-7.8 )
43) 	xml? ( >=dev-libs/libxml2-2.7.2-r2 )
44) 	xmlrpc? ( >=dev-libs/libxml2-2.7.2-r2 virtual/libiconv )"
45) 
46) RDEPEND="${DEPEND}"
47) if [[ -n "${KOLAB_PATCH}" ]] ; then
48) 	IUSE="${IUSE} kolab"
49) 	DEPEND="${DEPEND}
50) 		kolab? ( >=net-libs/c-client-2004g-r1 )"
51) fi
52) 
53) want_apache
54) 
55) pkg_setup() {
56) 	PHPCONFUTILS_AUTO_USE=""
57) 
58) 	# Make sure the user has specified at least one SAPI
59) 	einfo "Determining SAPI(s) to build"
60) 	phpconfutils_require_any "  Enabled  SAPI:" "  Disabled SAPI:" cli cgi apache2
61) 
62) 	# Threaded Apache2 support
63) 	if use apache2 ; then
64) 		has_apache_threads
65) 	fi
66) 
67) 	# Concurrent PHP Apache2 modules support
68) 	if use apache2 ; then
69) 		if use concurrentmodphp ; then
70) 			ewarn
71) 			ewarn "'concurrentmodphp' makes it possible to load multiple, differently"
72) 			ewarn "versioned mod_php's into the same Apache instance. This is done with"
73) 			ewarn "a few linker tricks and workarounds, and is not guaranteed to always"
74) 			ewarn "work correctly, so use it at your own risk. Especially, do not use"
75) 			ewarn "this in conjunction with PHP modules (PECL, ...) other than the ones"
76) 			ewarn "you may find in the Portage tree or the PHP Overlay!"
77) 			ewarn "This is an experimental feature, so please rebuild PHP"
78) 			ewarn "without the 'concurrentmodphp' USE flag if you experience"
79) 			ewarn "any problems, and then reproduce any bugs before filing"
80) 			ewarn "them in Gentoo's Bugzilla or bugs.php.net."
81) 			ewarn "If you have conclusive evidence that a bug directly"
82) 			ewarn "derives from 'concurrentmodphp', please file a bug in"
83) 			ewarn "Gentoo's Bugzilla only."
84) 			ewarn
85) 			ebeep 5
86) 		fi
87) 	fi
88) 
89) 	# fastbuild support
90) 	if use fastbuild ; then
91) 		ewarn
92) 		ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
93) 		ewarn "This is an experimental feature, so please rebuild PHP"
94) 		ewarn "without the 'fastbuild' USE flag if you experience"
95) 		ewarn "any problems, and then reproduce any bugs before filing"
96) 		ewarn "them in Gentoo's Bugzilla or bugs.php.net."
97) 		ewarn "If you have conclusive evidence that a bug directly"
98) 		ewarn "derives from 'fastbuild', please file a bug in"
99) 		ewarn "Gentoo's Bugzilla only."
100) 		ewarn
101) 	fi
102) 
103) 	if use pcre ; then
104) 		built_with_use dev-libs/libpcre unicode || \
105) 			die "Please rebuild dev-libs/libpcre with USE=unicode"
106) 	fi
107) 
108) 	depend.apache_pkg_setup
109) 	php5_3-sapi_pkg_setup
110) }
111) 
112) php_determine_sapis() {
113) 	# holds the list of sapis that we want to build
114) 	PHPSAPIS=
115) 
116) 	if use cli || phpconfutils_usecheck cli ; then
117) 		PHPSAPIS="${PHPSAPIS} cli"
118) 	fi
119) 
120) 	if use cgi ; then
121) 		PHPSAPIS="${PHPSAPIS} cgi"
122) 	fi
123) 
124) 	# note - apache SAPI comes after the simpler cli/cgi sapis
125) 	if use apache2 ; then
126) 		PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
127) 	fi
128) }
129) 
130) src_unpack() {
131) 	if [[ "${PHP_PACKAGE}" == 1 ]] ; then
132) 		unpack ${A}
133) 	fi
134) 
135) 	cd "${S}"
136) 
Hanno Böck sha512-fix für crypt

Hanno Böck authored 14 years ago

137) 	epatch "${FILESDIR}/${P}-sha512.diff"
138)