/[gentoo-alt]/trunk/prefix/eclass/php5-sapi-r2.eclass
Gentoo

Contents of /trunk/prefix/eclass/php5-sapi-r2.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 982 - (show annotations) (download)
Thu Feb 2 04:20:17 2006 UTC (13 years, 2 months ago) by kito
File size: 20150 byte(s)
Initial eclass import from gentoo-x86
1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/php5-sapi-r2.eclass,v 1.39 2006/01/26 06:06:40 robbat2 Exp $
4 #
5 # eclass/php5-sapi-r2.eclass
6 # Eclass for building different php5 SAPI instances
7 #
8 # Based on robbat2's work on the php4 sapi eclass
9 #
10 # Author(s) Stuart Herbert
11 # <stuart@gentoo.org>
12 #
13 # ========================================================================
14
15 # a list of the USE flags which PHP supports, but which we don't have
16 # required packages in the tree
17
18 CONFUTILS_MISSING_DEPS="adabas birdstep db2 dbmaker empress empress-bcs esoob frontbase hyperwave-api informix ingres mnogosearch msession msql oci8 oracle7 ovrimos pfpro sapdb solid sybase sybase-ct"
19
20 inherit flag-o-matic eutils confutils libtool
21
22
23 # set MY_PHP_P in the ebuild
24
25 # we only set these variables if we're building a copy of php which can be
26 # installed as a package in its own right
27 #
28 # copies of php which are compiled into other packages (e.g. php support
29 # for the thttpd web server) don't need these variables
30
31 if [ "${PHP_PACKAGE}" = 1 ]; then
32 HOMEPAGE="http://www.php.net/"
33 LICENSE="PHP-3"
34 SRC_URI="http://www.php.net/distributions/${MY_PHP_P}.tar.bz2"
35 S="${WORKDIR}/${MY_PHP_P}"
36 fi
37
38 IUSE="adabas bcmath berkdb birdstep bzip2 calendar cdb pdf crypt
39 ctype curl curlwrappers db2 dba dbase dbm dbmaker dbx debug dio empress
40 empress-bcs esoob exif fam firebird frontbase fdftk flatfile filepro ftp gd gd-external gdbm gmp hardenedphp hyperwave-api imap inifile iconv informix ingres interbase iodbc jpeg kerberos ldap libedit mcve memlimit mhash mime ming mkconfig mnogosearch msession msql mssql mysql mysqli ncurses nls nis oci8 odbc oracle7 ovrimos pcntl pcre pfpro png postgres posix qdbm readline recode sapdb sasl session sharedext sharedmem simplexml snmp soap sockets solid spell spl sqlite ssl sybase sybase-ct sysvipc threads tidy tiff tokenizer truetype wddx xsl xml2 xmlrpc xpm zlib"
41
42 # these USE flags should have the correct dependencies
43 DEPEND="$DEPEND
44 !<=dev-php/php-4.99.99
45 berkdb? ( =sys-libs/db-4* )
46 bzip2? ( app-arch/bzip2 )
47 pdf? ( >=media-libs/clibpdf-2 )
48 crypt? ( >=dev-libs/libmcrypt-2.4 )
49 curl? ( >=net-misc/curl-7.10.5 )
50 fam? ( virtual/fam )
51 fdftk? ( app-text/fdftk )
52 firebird? ( dev-db/firebird )
53 gd-external? ( media-libs/gd )
54 gdbm? ( >=sys-libs/gdbm-1.8.0 )
55 gmp? ( dev-libs/gmp )
56 imap? ( virtual/imap-c-client )
57 iodbc? ( dev-db/libiodbc )
58 jpeg? ( >=media-libs/jpeg-6b )
59 kerberos? ( virtual/krb5 )
60 ldap? ( >=net-nds/openldap-1.2.11 )
61 libedit? ( dev-libs/libedit )
62 mcve? ( net-libs/libmonetra )
63 mhash? ( app-crypt/mhash )
64 mime? ( sys-apps/file )
65 ming? ( media-libs/ming )
66 mssql? ( dev-db/freetds )
67 mysql? ( dev-db/mysql )
68 ncurses? ( sys-libs/ncurses )
69 nls? ( sys-devel/gettext )
70 odbc? ( >=dev-db/unixODBC-1.8.13 )
71 postgres? ( >=dev-db/postgresql-7.1 )
72 png? ( media-libs/libpng )
73 qdbm? ( dev-db/qdbm )
74 readline? ( sys-libs/readline )
75 recode? ( app-text/recode )
76 sharedmem? ( dev-libs/mm )
77 simplexml? ( dev-libs/libxml2 )
78 snmp? ( >=net-analyzer/net-snmp-5.2 )
79 soap? ( dev-libs/libxml2 )
80 spell? ( app-text/aspell )
81 sqlite? ( =dev-db/sqlite-2* )
82 ssl? ( >=dev-libs/openssl-0.9.7 )
83 sybase? ( dev-db/freetds )
84 tidy? ( app-text/htmltidy )
85 tiff? ( media-libs/tiff )
86 truetype? ( =media-libs/freetype-2* >=media-libs/t1lib-5.0.0 )
87 wddx? ( dev-libs/expat )
88 xpm? ( || ( x11-libs/libXpm virtual/x11 ) )
89 xsl? ( dev-libs/libxslt )
90 zlib? ( sys-libs/zlib ) "
91
92 # this would be xml2?, but PEAR requires XML support
93 # this can become a USE flag when Gentoo bug #2272 has been resolved
94 DEPEND="$DEPEND
95 dev-libs/libxml2"
96
97 # ========================================================================
98
99 PHP_BUILDTARGETS="${PHP_BUILDTARGETS} build-modules"
100 PHP_INSTALLTARGETS="${PHP_INSTALLTARGETS} install"
101
102 # ========================================================================
103
104 PHP_INI_DIR="/etc/php/${PHPSAPI}-php5"
105 PHP_INI_FILE="php.ini"
106
107 # ========================================================================
108 # Hardened-PHP Support
109 # ========================================================================
110 #
111 # I've done it like this so that we can support different versions of
112 # the patch for different versions of PHP
113
114 case "$PV" in
115 5.0.4) HARDENEDPHP_PATCH="hardening-patch-$PV-0.3.2.patch.gz" ;;
116 esac
117
118 [ -n "$HARDENEDPHP_PATCH" ] && SRC_URI="${SRC_URI} hardenedphp? ( http://www.hardened-php.net/$HARDENEDPHP_PATCH )"
119
120 # ========================================================================
121
122 EXPORT_FUNCTIONS pkg_setup src_compile src_install src_unpack pkg_postinst
123
124 # ========================================================================
125 # INTERNAL FUNCTIONS
126 # ========================================================================
127
128 php5-sapi-r2_check_awkward_uses() {
129
130 # disabled hardenedphp after many reports of problems w/ apache
131 # need to look into this at some point
132
133 if useq hardenedphp ; then
134 eerror
135 eerror "hardenedphp is reported to break php for some users."
136 eerror "We've disabled this feature for now until it has been"
137 eerror "thoroughly investigated."
138 eerror
139 eerror "Please disable the hardenedphp USE flag"
140 die "hardenedphp support disabled"
141 fi
142
143 # snmp support seems broken, haven't looked into a fix for it yet
144
145 if useq snmp && [ "$PHP_PV" = "5.0.3" ] ; then
146 eerror
147 eerror "The snmp support in PHP 5 is currently broken."
148 eerror "Please disable the snmp USE flag"
149 eerror
150 die "snmp support doesn't compile"
151 fi
152
153 # mysqli support is disabled; see bug #53886
154
155 if useq mysqli ; then
156 eerror
157 eerror "We currently do not support the mysqli extension"
158 eerror "Support will be added once MySQL 4.1 is no longer package-masked"
159 eerror
160 die "mysqli not supported yet"
161 fi
162
163 # recode not available in 5.0.0; upstream bug
164 if useq recode && [ "$PHP_PV" == "5.0.0" ]; then
165 eerror
166 eerror "Support for the 'recode' extension is currently broken UPSTREAM"
167 eerror "See http://bugs.php.net/bug.php?id=28700 for details"
168 eerror
169 die "recode broken, upstream bug"
170 fi
171
172 # Sanity check for Oracle
173 if useq oci8 && [ -z "${ORACLE_HOME}" ]; then
174 eerror
175 eerror "You must have the ORACLE_HOME variable in your environment!"
176 eerror
177 die "Oracle configuration incorrect; user error"
178 fi
179
180 if useq oci8 || useq oracle7; then
181 if has_version 'dev-db/oracle-instantclient-basic'; then
182 ewarn "Please ensure you have a full install of the Oracle client."
183 ewarn "dev-db/oracle-instantclient* is NOT sufficent."
184 fi
185 fi
186
187 if useq dba ; then
188 # extension USE flag shared support?
189 enable_extension_with "cdb" "cdb" 1
190 enable_extension_with "db4" "berkdb" 1
191 enable_extension_with "dbm" "dbm" 1
192 enable_extension_with "flatfile" "flatfile" 1
193 enable_extension_with "gdbm" "gdbm" 1
194 enable_extension_with "inifile" "inifile" 1
195 enable_extension_with "qdbm" "qdbm" 1
196 fi
197
198 if useq dbx ; then
199 confutils_use_depend_any "dbx" "frontbase" "mssql" "odbc" "postgres" "sybase-ct" "oci8" "sqlite"
200 enable_extension_enable "dbx" "dbx" 1
201 fi
202
203 enable_extension_with "jpeg-dir" "jpeg" 0 "/usr"
204 if useq gd-external ; then
205 enable_extension_with "freetype-dir" "truetype" 0 "/usr"
206 enable_extension_with "t1lib" "truetype" 0 "/usr"
207 enable_extension_enable "gd-native-ttf" "truetype" 0
208 enable_extension_enable "gd-jis-conf" "nls" 0
209 enable_extension_enable "gd-native-ttf" "truetype" 0
210 enable_extension_with "gd" "gd-external" 1 "/usr"
211 else
212 enable_extension_with "freetype-dir" "truetype" 0 "/usr"
213 enable_extension_with "t1lib" "truetype" 0 "/usr"
214 enable_extension_enable "gd-jis-conf" "nls" 0
215 enable_extension_enable "gd-native-ttf" "truetype" 0
216 enable_extension_with "png-dir" "png" 0 "/usr"
217 enable_extension_with "tiff-dir" "tiff" 0 "/usr"
218 enable_extension_with "xpm-dir" "xpm" 0 "/usr/X11R6"
219 # enable gd last, so configure can pick up the previous settings
220 enable_extension_with "gd" "gd" 0
221 fi
222
223 confutils_use_depend_any "jpeg" "gd" "gd-external" "pdf"
224 confutils_use_depend_any "png" "gd" "gd-external"
225 confutils_use_depend_any "tiff" "gd" "gd-external"
226 confutils_use_depend_any "xpm" "gd" "gd-external"
227 confutils_use_depend_all "png" "zlib"
228
229 if useq imap ; then
230 enable_extension_with "imap" "imap" 1
231 # this is a PITA to deal with
232 if useq ssl ; then
233 #if [ -n "`strings ${ROOT}/usr/$(get_libdir)/c-client.* 2>/dev/null | grep ssl_onceonlyinit`" ]; then
234 if built_with_use virtual/imap-c-client ssl ; then
235 # the IMAP-SSL arg doesn't parse 'shared,/usr/lib' right
236 enable_extension_with "imap-ssl" "ssl" 0
237 else
238 msg="IMAP+SSL requested, but your IMAP libraries are built without SSL!"
239 eerror "${msg}"
240 die "${msg}"
241 fi
242 fi
243 fi
244
245 if useq ldap ; then
246 enable_extension_with "ldap" "ldap" 1
247 enable_extension_with "ldap-sasl" "sasl" 0
248 fi
249
250 if useq odbc ; then
251 enable_extension_with "unixODBC" "odbc" 1 "/usr"
252
253 enable_extension_with "adabas" "adabas" 1
254 enable_extension_with "birdstep" "birdstep" 1
255 enable_extension_with "dbmaker" "dbmaker" 1
256 enable_extension_with "empress" "empress" 1
257 if useq empress ; then
258 enable_extension_with "empress-bcs" "empress-bcs" 0
259 fi
260 enable_extension_with "esoob" "esoob" 1
261 enable_extension_with "ibm-db2" "db2" 1
262 enable_extension_with "iodbc" "iodbc" 1 "/usr"
263 enable_extension_with "sapdb" "sapdb" 1
264 enable_extension_with "solid" "solid" 1
265 fi
266
267 if useq mysql; then
268 enable_extension_with "mysql" "mysql" 1 "/usr/lib/mysql"
269 enable_extension_with "mysql-sock" "mysql" 0 "/var/run/mysqld/mysqld.sock"
270 fi
271 if useq mysqli; then
272 enable_extension_with "mysqli" "mysqli" 1 "/usr/bin/mysql_config"
273 fi
274
275 # QDBM doesn't play nicely with GDBM _or_ DBM
276 confutils_use_conflict "qdbm" "gdbm" "dbm"
277 # both provide the same functionality
278 confutils_use_conflict "readline" "libedit"
279 # Recode is not liked.
280 confutils_use_conflict "recode" "mysql" "imap" "nis" #"yaz"
281
282 if ! useq session ; then
283 enable_extension_disable "session" "session" 1
284 else
285 enable_extension_with "mm" "sharedmem" 0
286 enable_extension_with "msession" "msession" 1
287 fi
288
289 if ! useq sqlite ; then
290 enable_extension_without "sqlite" "sqlite" 0
291 else
292 enable_extension_enable "sqlite-utf8" "nls" 0
293 fi
294
295 # MCVE needs openSSL
296 confutils_use_depend_all "mcve" "ssl"
297 # A variety of extensions need DBA
298 confutils_use_depend_all "cdb" "dba"
299 confutils_use_depend_all "berkdb" "dba"
300 confutils_use_depend_all "flatfile" "dba"
301 confutils_use_depend_all "gdbm" "dba"
302 confutils_use_depend_all "inifile" "dba"
303 confutils_use_depend_all "qdbm" "dba"
304
305 # build EXIF support if we support a file format that uses it
306 confutils_use_depend_any "exif" "jpeg" "tiff"
307
308 # GD library support
309 confutils_use_depend_any "truetype" "gd" "gd-external"
310
311 # ldap support
312 confutils_use_depend_all "sasl" "ldap"
313
314 # mysql support
315 # This shouldn't conflict actually
316 #confutils_use_conflict "mysqli" "mysql"
317
318 # odbc support
319 confutils_use_depend_all "adabas" "odbc"
320 confutils_use_depend_all "birdstep" "odbc"
321 confutils_use_depend_all "dbmaker" "odbc"
322 confutils_use_depend_all "empress" "odbc"
323 confutils_use_depend_all "empress-bcs" "odbc" "empress"
324 confutils_use_depend_all "esoob" "odbc"
325 confutils_use_depend_all "db2" "odbc"
326 confutils_use_depend_all "sapdb" "odbc"
327 confutils_use_depend_all "solid" "odbc"
328
329 # session support
330 confutils_use_depend_all "msession" "session"
331
332 confutils_warn_about_missing_deps
333 }
334
335 # ========================================================================
336 # EXPORTED FUNCTIONS
337 # ========================================================================
338
339 php5-sapi-r2_pkg_setup() {
340 # let's do all the USE flag testing before we do anything else
341 # this way saves a lot of time
342
343 php5-sapi-r2_check_awkward_uses
344 }
345
346 php5-sapi-r2_src_unpack() {
347 if [ "${PHP_PACKAGE}" == 1 ]; then
348 unpack ${A}
349 fi
350
351 cd ${PHP_S}
352
353 # Patch PHP to show Gentoo as the server platform
354 sed -i "s/PHP_UNAME=\`uname -a\`/PHP_UNAME=\`uname -s -n -r -v\`/g" configure
355 # Patch for PostgreSQL support
356 sed -e 's|include/postgresql|include/postgresql include/postgresql/pgsql|g' -i configure
357
358 # Patch for session persistence bug
359 epatch ${FILESDIR}/php5_soap_persistence_session.diff
360
361 # stop php from activating the apache config, as we will do that ourselves
362 for i in configure sapi/apache/config.m4 sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 ; do
363 sed -i.orig -e 's,-i -a -n php5,-i -n php5,g' $i
364 done
365
366 # hardenedphp support
367
368 use hardenedphp && [ -n "$HARDENEDPHP_PATCH" ] && epatch ${DISTDIR}/${HARDENEDPHP_PATCH}
369
370 # iodbc support
371 use iodbc && epatch ${FILESDIR}/with-iodbc.diff
372
373 # fix configure scripts to recognize uClibc
374 uclibctoolize
375
376 # Just in case ;-)
377 chmod 755 configure
378
379 # [ "${ARCH}" == "sparc" ] && epatch ${FILESDIR}/php-5.0-stdint.diff
380 # epatch ${FILESDIR}/${MY_PHP_P}-missing-arches.patch
381 }
382
383 php5-sapi-r2_src_compile() {
384 cd ${PHP_S}
385 confutils_init
386
387 my_conf="${my_conf} --with-config-file-path=${PHP_INI_DIR}"
388 if [ "$PHPSAPI" == "cli" ]; then
389 my_conf="${my_conf} --with-pear=/usr/share/php"
390 else
391 my_conf="${my_conf} --disable-cli --without-pear"
392 fi
393
394 # extension USE flag shared support?
395 enable_extension_enable "bcmath" "bcmath" 1
396 enable_extension_with "bz2" "bzip2" 1
397 enable_extension_enable "calendar" "calendar" 1
398 enable_extension_with "cpdflib" "pdf" 1 # depends on jpeg
399 enable_extension_disable "ctype" "ctype" 0
400 enable_extension_with "curl" "curl" 1
401 enable_extension_with "curlwrappers" "curlwrappers" 1
402 enable_extension_enable "dbase" "dbase" 1
403 enable_extension_enable "dio" "dio" 1
404 enable_extension_disable "dom" "xml2" 0
405 enable_extension_enable "exif" "exif" 1
406 enable_extension_with "fam" "fam" 1
407 enable_extension_with "fbsql" "frontbase" 1
408 enable_extension_with "fdftk" "fdftk" 1 "/opt/fdftk-6.0"
409 enable_extension_enable "filepro" "filepro" 1
410 enable_extension_enable "ftp" "ftp" 1
411 enable_extension_with "gettext" "nls" 1
412 enable_extension_with "gmp" "gmp" 1
413 enable_extension_with "hwapi" "hyperwave-api" 1
414 enable_extension_with "iconv" "iconv" 1
415 enable_extension_with "informix" "informix" 1
416 enable_extension_with "ingres" "ingres" 1
417 enable_extension_with "interbase" "firebird" 1
418 # iodbc support added by Tim Haynes <gentoo@stirfried.vegetable.org.uk>
419 enable_extension_with "iodbc" "iodbc" 0 "/usr"
420 # ircg extension not supported on Gentoo at this time
421 enable_extension_with "kerberos" "kerberos" 0
422 enable_extension_disable "libxml" "xml2" 0
423 enable_extension_enable "mbstring" "nls" 1
424 enable_extension_with "mcrypt" "crypt" 1
425 enable_extension_with "mcve" "mcve" 1
426 enable_extension_enable "memory-limit" "memlimit" 0
427 enable_extension_with "mhash" "mhash" 1
428 enable_extension_with "mime-magic" "mime" 0 "/usr/share/misc/file/magic.mime"
429 enable_extension_with "ming" "ming" 1
430 enable_extension_with "mnogosearch" "mnogosearch" 1
431 enable_extension_with "msql" "msql" 1
432 enable_extension_with "mssql" "mssql" 1
433 enable_extension_with "ncurses" "ncurses" 1
434 enable_extension_with "oci8" "oci8" 1
435 enable_extension_with "oracle" "oracle7" 1
436 enable_extension_with "openssl" "ssl" 1
437 enable_extension_with "openssl-dir" "ssl" 0 "/usr"
438 enable_extension_with "ovrimos" "ovrimos" 1
439 enable_extension_enable "pcntl" "pcntl" 1
440 enable_extension_without "pcre-regx" "pcre" 1
441 enable_extension_with "pfpro" "pfpro" 1
442 enable_extension_with "pgsql" "postgres" 1
443 enable_extension_disable "posix" "posix" 1
444 enable_extension_with "pspell" "spell" 1
445 enable_extension_with "recode" "recode" 1
446 enable_extension_disable "simplexml" "simplexml" 1
447 enable_extension_enable "shmop" "sharedmem" 0
448 enable_extension_with "snmp" "snmp" 1
449 enable_extension_enable "soap" "soap" 1
450 enable_extension_enable "sockets" "sockets" 1
451 enable_extension_disable "spl" "spl" 1
452 enable_extension_with "sybase" "sybase" 1
453 enable_extension_with "sybase-ct" "sybase-ct" 1
454 enable_extension_enable "sysvmsg" "sysvipc" 1
455 enable_extension_enable "sysvsem" "sysvipc" 1
456 enable_extension_enable "sysvshm" "sysvipc" 1
457 enable_extension_with "tidy" "tidy" 1
458 enable_extension_disable "tokenizer" "tokenizer" 1
459 enable_extension_enable "wddx" "wddx" 1
460 enable_extension_with "xsl" "xsl" 1
461 #enable_extension_disable "xml" "xml2" 1 # PEAR needs --enable-xml
462 enable_extension_with "xmlrpc" "xmlrpc" 1
463 enable_extension_enable "yp" "nis" 1
464 enable_extension_with "zlib" "zlib" 1
465 enable_extension_enable "debug" "debug" 0
466
467 php5-sapi-r2_check_awkward_uses
468
469 # DBA support
470 enable_extension_enable "dba" "dba" 1
471
472 # readline support
473 #
474 # you can use readline or libedit, but you can't use both
475 enable_extension_with "readline" "readline" 0
476 enable_extension_with "libedit" "libedit" 1
477
478 # fix ELF-related problems
479 if has_pic ; then
480 einfo "Enabling PIC support"
481 my_conf="${my_conf} --with-pic"
482 fi
483
484 # Bug 98694
485 addpredict /etc/krb5.conf
486
487 # all done
488
489 econf ${my_conf} || die "configure failed"
490 emake || die "make failed"
491 }
492
493 php5-sapi-r2_src_install() {
494 cd ${PHP_S}
495 addpredict /usr/share/snmp/mibs/.index
496
497 useq sharedext && PHP_INSTALLTARGETS="${PHP_INSTALLTARGETS} install-modules"
498 make INSTALL_ROOT=${D} $PHP_INSTALLTARGETS || die "install failed"
499
500 # get the extension dir
501 PHPEXTDIR="`${D}/usr/bin/php-config --extension-dir`"
502
503 # don't forget the php.ini file
504 local phpinisrc=php.ini-dist
505 einfo "Setting extension_dir in php.ini"
506 sed -e "s|^extension_dir .*$|extension_dir = ${PHPEXTDIR}|g" -i ${phpinisrc}
507
508 # A patch for PHP for security. PHP-CLI interface is exempt, as it cannot be
509 # fed bad data from outside.
510 if [ "${PHPSAPI}" != "cli" ]; then
511 einfo "Securing fopen wrappers"
512 sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i ${phpinisrc}
513 fi
514
515 einfo "Setting correct include_path"
516 sed -e 's|^;include_path .*|include_path = ".:/usr/share/php"|' -i ${phpinisrc}
517
518 if useq sharedext; then
519 for x in `ls ${D}${PHPEXTDIR}/*.so | sort`; do
520 echo "extension=`basename ${x}`" >> ${phpinisrc}
521 done;
522 fi
523
524 dodir ${PHP_INI_DIR}
525 insinto ${PHP_INI_DIR}
526 newins ${phpinisrc} ${PHP_INI_FILE}
527
528 # php-config install the following, so we don't have to
529 #
530 # if 'mkconfig' USE flag is set, we create the phpconfig
531 # source tarball ... this makes it easy for us to bump the
532 # phpconfig package whenever we bump php
533
534 if useq mkconfig ; then
535 CONFIG_NAME=phpconfig-$PV
536 CONFIG_DESTDIR=${T}/${CONFIG_NAME}
537
538 einfo "Building source tarball for ${CONFIG_NAME}"
539
540 mkdir -p ${CONFIG_DESTDIR}/usr/bin
541 cp ${D}/usr/bin/{phpextdist,phpize,php-config} ${CONFIG_DESTDIR}/usr/bin/
542
543 mkdir -p ${CONFIG_DESTDIR}/usr/lib/php
544 cp -r ${D}/usr/lib/php/build ${CONFIG_DESTDIR}/usr/lib/php
545
546 mkdir -p ${CONFIG_DESTDIR}/usr/include
547 cp -r ${D}/usr/include/php ${CONFIG_DESTDIR}/usr/include
548
549 cd ${T}
550 tar -cf - ${CONFIG_NAME} | bzip2 -9 > ${CONFIG_NAME}.tar.bz2
551 cd -
552
553 einfo "Done; tarball is ${T}/${CONFIG_NAME}.tar.bz2"
554 fi
555
556 # move all the PEAR stuff from /usr/lib/php to /usr/share/php
557
558 rm -rf ${D}/usr/lib/php/build
559 dodir /usr/share/php
560
561 for x in ${D}/usr/lib/php/* ; do
562 if [ "`basename $x`" != 'extensions' ]; then
563 mv $x ${D}/usr/share/php
564 fi
565 done
566
567 # only the cli SAPI is allowed to install PEAR
568
569 if [ "$PHPSAPI" != "cli" ]; then
570 rm -f ${D}/usr/bin/pear
571 rm -f ${D}/usr/share/php
572 fi
573
574 rm -rf ${D}/usr/bin/{phpextdist,phpize,php-config}
575 rm -rf ${D}/usr/include/php
576
577 # we let each SAPI install the man page
578 # this does mean that the packages are in conflict for now
579 }
580
581 php5-sapi-r2_pkg_postinst() {
582 ewarn "If you have additional third party PHP extensions (such as"
583 ewarn "dev-php/eaccelerator) you may need to recompile them now."
584
585 if useq curl; then
586 ewarn "Please be aware that CURL can allow the bypass of open_basedir restrictions."
587 fi
588 }
589

  ViewVC Help
Powered by ViewVC 1.1.20