Added working php

This commit is contained in:
root 2010-02-17 00:24:38 -08:00
parent 35a8dd8a60
commit f5f579799d
8 changed files with 1478 additions and 442 deletions

View file

@ -1,4 +1,5 @@
# Author: Julien MISCHKOWITZ <wain@archlinux.fr>
pkgname=yaourt
pkgver=0.9.2.6
pkgrel=1

View file

@ -1,324 +1,180 @@
# $Id: PKGBUILD 53281 2009-09-27 20:04:03Z pierre $
# $Id: PKGBUILD 46215 2009-07-14 09:38:03Z pierre $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
pkgbase=php
pkgname=('php'
'php-cgi'
'php-apache'
'php-pear'
'php-curl'
'php-enchant'
'php-gd'
'php-gmp'
'php-intl'
'php-ldap'
'php-mcrypt'
'php-odbc'
'php-pgsql'
'php-pspell'
'php-snmp'
'php-sqlite'
'php-tidy'
'php-xsl')
pkgver=5.3.0
pkgrel=5
_suhosinver=${pkgver}-0.9.8
pkgname=php
pkgver=5.2.10
pkgrel=3
_suhosinver=${pkgver}-0.9.7
pkgdesc='A high-level scripting language'
arch=('i686' 'x86_64')
license=('PHP')
url='http://www.php.net'
makedepends=('apache' 'imap' 'postgresql-libs' 'mysql' 'libldap' 'postfix'
'sqlite3' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file'
'libmcrypt' 'tidyhtml' 'aspell' 'libtool' 'gd' 'icu'
'curl' 'libxslt' 'openssl' 'bzip2' 'db' 'gmp')
options=('!makeflags')
source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2"
backup=('etc/php/php.ini')
depends=('glibc' 'readline' 'ncurses' 'libxml2' 'pcre')
makedepends=('apache' 'imap' 'postgresql-libs' 'mysql' 'libldap' 'smtp-server'
'libpng' 'libjpeg' 'sqlite3' 'unixodbc' 'net-snmp' 'mhash' 'gmp'
'libmcrypt' 'tidyhtml' 'aspell' 'libtool' 'freetype2' 'libjpeg'
'curl' 'libxslt' 'pam' 'openssl' 'bzip2' 'gdbm' 'db')
optdepends=('bzip2: bz2'
'curl: curl'
'gdbm: dba'
'libpng: gd'
'libjpeg: gd'
'freetype2: gd'
'pam: imap'
'libldap: ldap'
'libmcrypt: mcrypt'
'libtool: mcrypt'
'libmysqlclient: mysql/mysqli/pdo_mysql'
'unixodbc: odbc/pdo_odbc'
'openssl: openssl'
'postgresql-libs: pgsql/pdo_pgsql'
'aspell: pspell'
'net-snmp: snmp'
'sqlite3: pdo_sqlite'
'tidyhtml: tidy'
'libxslt: xsl'
'mhash: mhash'
'gmp: gmp'
)
source=("http://www.php.net/distributions/${pkgname}-${pkgver}.tar.bz2"
"http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz"
'php.ini.patch' 'apache.conf' 'db-configure.patch' 'gd-info-segfault.patch')
md5sums=('846760cd655c98dfd86d6d97c3d964b0'
'a23a3d54e177ac0ad30f78d928ba8177'
'67c63d2c8a976a333bbd2216cdd60413'
'php.ini' 'apache.conf' 'db-configure.patch' 'curl-flush.patch')
md5sums=('15c7b5a87f57332d6fc683528e28247b'
'41b475a469eef0eb0e7aa10a820f12b2'
'50b6a4ce330b016e19cb922d202ab170'
'96ca078be6729b665be8a865535a97bf'
'45ecb6fb0aadfd3462097e3bab951aa5'
'1c1a50aae7207b12d27bdecd8967e7ce')
'74e5ce5a02488ec91b1c59f539e42936'
'648c83c991a187cd0f2be435cb022947')
build() {
phpconfig="--prefix=/usr \
--sysconfdir=/etc/php \
--with-layout=GNU \
--with-config-file-path=/etc/php \
--with-config-file-scan-dir=/etc/php/conf.d \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--disable-static \
--enable-shared \
--mandir=/usr/share/man \
--without-pear \
"
--sysconfdir=/etc/php \
--with-layout=GNU \
--with-config-file-path=/etc/php \
--with-config-file-scan-dir=/etc/php/conf.d \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--disable-static \
--enable-shared \
--mandir=/usr/share/man \
"
phpextensions="--enable-bcmath=shared \
--enable-calendar=shared \
--enable-dba=shared \
--enable-exif=shared \
--enable-ftp=shared \
--enable-gd-native-ttf \
--enable-intl=shared \
--enable-json=shared \
--enable-mbregex \
--enable-mbstring \
--enable-pdo=shared \
--enable-phar=shared \
--enable-posix=shared \
--enable-session \
--enable-shmop=shared \
--enable-soap=shared \
--enable-sockets=shared \
--enable-sqlite-utf8 \
--enable-sysvmsg=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--enable-xml \
--enable-zip=shared \
--with-bz2=shared \
--with-curl=shared \
--with-db4=shared \
--with-enchant=shared,/usr \
--with-freetype-dir=shared,/usr \
--with-gd=shared,/usr \
--with-gdbm=shared \
--with-gettext=shared \
--with-gmp=shared \
--with-iconv=shared \
--with-icu-dir=/usr \
--with-imap-ssl=shared \
--with-imap=shared \
--with-jpeg-dir=shared,/usr \
--with-ldap=shared \
--with-mcrypt=shared \
--with-mysql-sock=/tmp/mysql.sock \
--with-mysql=shared,mysqlnd \
--with-mysqli=shared,mysqlnd \
--with-openssl=shared \
--with-pcre-regex=/usr \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-odbc=shared,unixODBC,/usr \
--with-pdo-pgsql=shared \
--with-pdo-sqlite=shared,/usr \
--with-pgsql=shared \
--with-png-dir=shared,/usr \
--with-pspell=shared \
--with-regex=php \
--with-snmp=shared \
--with-sqlite3=shared,/usr \
--with-sqlite=shared \
--with-tidy=shared \
--with-unixODBC=shared,/usr \
--with-xmlrpc=shared \
--with-xsl=shared \
--with-zlib \
--without-db2 \
--without-db3 \
"
phpextensions="--with-openssl=shared \
--with-zlib=shared \
--enable-bcmath=shared \
--with-bz2=shared \
--enable-calendar=shared \
--with-curl=shared \
--enable-dba=shared \
--without-db2 \
--without-db3 \
--with-db4=shared \
--with-gdbm=shared \
--enable-dbase=shared \
--enable-exif=shared \
--enable-ftp=shared \
--with-gd=shared \
--enable-gd-native-ttf \
--with-jpeg-dir=shared,/usr \
--with-png-dir=shared,/usr \
--with-gettext=shared \
--with-imap=shared \
--with-imap-ssl=shared \
--with-ldap=shared \
--enable-mbstring=shared \
--with-mcrypt=shared \
--with-mysql=shared \
--with-mysql-sock=/tmp/mysql.sock \
--with-mysql=shared \
--with-mysqli=shared \
--with-ncurses=shared \
--with-unixODBC=shared,/usr \
--enable-pdo=shared \
--with-pdo-mysql=shared \
--with-pdo-sqlite=shared,/usr \
--with-pdo-odbc=shared,unixODBC,/usr \
--with-pdo-pgsql=shared \
--with-sqlite=shared \
--enable-sqlite-utf8 \
--with-pgsql=shared \
--enable-shmop=shared \
--with-snmp=shared \
--enable-soap=shared \
--enable-sysvmsg=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--with-tidy=shared \
--with-xsl=shared \
--enable-zip=shared \
--enable-posix=shared \
--enable-sockets=shared \
--enable-xml \
--with-ttf=shared \
--enable-session=shared \
--with-regex=php \
--with-pcre-regex=/usr \
--enable-mbstring=all \
--enable-mbregex \
--enable-json=shared \
--with-iconv=shared \
--with-xmlrpc=shared \
--with-pspell=shared \
--with-freetype-dir=shared,/usr \
--with-mime-magic=shared \
--with-gmp=shared \
--with-mhash=shared \
"
EXTENSION_DIR=/usr/lib/php/modules
export EXTENSION_DIR
PEAR_INSTALLDIR=/usr/share/pear
export PEAR_INSTALLDIR
cd ${srcdir}/${pkgbase}-${pkgver}
cd ${srcdir}/${pkgname}-${pkgver}
# avoid linking against old db version
patch -p0 -i ${srcdir}/db-configure.patch || return 1
patch -p0 -i ${srcdir}/db-configure.patch
# apply suhosin patch
patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch || return 1
patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch
# adjust paths
patch -p0 -i ${srcdir}/php.ini.patch || return 1
# fix curl regression; should be fixed upstream with PHP >= 5.2.11
patch -p3 -i ${srcdir}/curl-flush.patch
# fix gd segfault; http://bugs.php.net/bug.php?id=49193
patch -p0 -i ${srcdir}/gd-info-segfault.patch || return 1
# php
mkdir ${srcdir}/build-php
cd ${srcdir}/build-php
ln -s ../${pkgbase}-${pkgver}/configure
./configure --srcdir=../${pkgbase}-${pkgver} \
${phpconfig} \
# cli
./configure ${phpconfig} \
--disable-cgi \
--with-readline \
--enable-pcntl \
${phpextensions} || return 1
make || return 1
--with-pear=/usr/share/pear \
${phpextensions}
make
# make test
make INSTALL_ROOT=${pkgdir} install
# cgi and fcgi
# reuse the previous run; this will save us a lot of time
cp -a ${srcdir}/build-php ${srcdir}/build-cgi
cd ${srcdir}/build-cgi
./configure --srcdir=../${pkgbase}-${pkgver} \
${phpconfig} \
--enable-cgi \
--disable-cli \
${phpextensions} || return 1
make || return 1
# apache
cp -a ${srcdir}/build-php ${srcdir}/build-apache
cd ${srcdir}/build-apache
./configure --srcdir=../${pkgbase}-${pkgver} \
${phpconfig} \
--with-apxs2 \
--disable-cli \
${phpextensions} || return 1
make || return 1
# pear
cp -a ${srcdir}/build-php ${srcdir}/build-pear
cd ${srcdir}/build-pear
./configure --srcdir=../${pkgbase}-${pkgver} \
${phpconfig} \
--disable-cgi \
--with-readline \
--enable-pcntl \
--with-pear \
${phpextensions} || return 1
make || return 1
}
package_php() {
pkgdesc='An HTML-embedded scripting language'
depends=('pcre' 'libxml2' 'bzip2' 'openssl')
replaces=('php-fileinfo')
provides=('php-fileinfo')
conflicts=('php-fileinfo')
backup=('etc/php/php.ini')
cd ${srcdir}/build-php
make INSTALL_ROOT=${pkgdir} install || return 1
install -d -m755 ${pkgdir}/usr/share/pear
# fix broken link
ln -sf phar.phar $pkgdir/usr/bin/phar
# cleanup
rm -f ${pkgdir}`${pkgdir}/usr/bin/php-config --extension-dir`/*.a
# install php.ini
install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/php/php.ini
install -D -m644 ${srcdir}/php.ini ${pkgdir}/etc/php/php.ini
install -d -m755 ${pkgdir}/etc/php/conf.d/
# remove static modules
rm -f ${pkgdir}/usr/lib/php/modules/*.a
# remove modules provided by sub packages
rm -f ${pkgdir}/usr/lib/php/modules/{curl,enchant,gd,gmp,intl,ldap,mcrypt,odbc,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
}
# cgi and fcgi
./configure ${phpconfig} \
--enable-fastcgi \
--enable-cgi \
--enable-discard-path \
--enable-force-cgi-redirect \
--disable-cli \
${phpextensions}
make
install -D -m755 sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi
package_php-cgi() {
pkgdesc='CGI and FCGI SAPI for PHP'
depends=('php' 'pcre' 'libxml2')
install -D -m755 ${srcdir}/build-cgi/sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi
}
package_php-apache() {
pkgdesc='Apache SAPI for PHP'
depends=('php' 'apache' 'pcre' 'libxml2')
backup=('etc/httpd/conf/extra/php5_module.conf')
install -D -m755 ${srcdir}/build-apache/libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so
# mod_php
./configure ${phpconfig} \
--with-apxs2 \
--disable-cli \
${phpextensions}
make
install -D -m644 libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so
install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf
}
package_php-pear() {
pkgdesc='PHP Extension and Application Repository'
depends=('php' 'bash')
backup=("etc/php/pear.conf")
cd ${srcdir}/build-pear
make install-pear INSTALL_ROOT=${pkgdir}
for i in $(find ${pkgdir}/ -name '.*'); do
[ -e $i ] && rm -rf $i
done
}
package_php-curl() {
depends=('php' 'curl')
pkgdesc="curl module for PHP"
install -D -m755 ${srcdir}/build-php/modules/curl.so ${pkgdir}/usr/lib/php/modules/curl.so
}
package_php-enchant() {
depends=('php' 'enchant')
pkgdesc="enchant module for PHP"
install -D -m755 ${srcdir}/build-php/modules/enchant.so ${pkgdir}/usr/lib/php/modules/enchant.so
}
package_php-gd() {
depends=('php' 'gd')
pkgdesc="gd module for PHP"
install -D -m755 ${srcdir}/build-php/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.so
}
package_php-gmp() {
depends=('php' 'gmp')
pkgdesc="gmp module for PHP"
install -D -m755 ${srcdir}/build-php/modules/gmp.so ${pkgdir}/usr/lib/php/modules/gmp.so
}
package_php-intl() {
depends=('php' 'icu')
pkgdesc="intl module for PHP"
install -D -m755 ${srcdir}/build-php/modules/intl.so ${pkgdir}/usr/lib/php/modules/intl.so
}
package_php-ldap() {
depends=('php' 'libldap')
pkgdesc="ldap module for PHP"
install -D -m755 ${srcdir}/build-php/modules/ldap.so ${pkgdir}/usr/lib/php/modules/ldap.so
}
package_php-mcrypt() {
depends=('php' 'libmcrypt' 'libtool')
pkgdesc="mcrypt module for PHP"
install -D -m755 ${srcdir}/build-php/modules/mcrypt.so ${pkgdir}/usr/lib/php/modules/mcrypt.so
}
package_php-odbc() {
depends=('php' 'unixodbc')
pkgdesc="ODBC modules for PHP"
install -D -m755 ${srcdir}/build-php/modules/odbc.so ${pkgdir}/usr/lib/php/modules/odbc.so
install -D -m755 ${srcdir}/build-php/modules/pdo_odbc.so ${pkgdir}/usr/lib/php/modules/pdo_odbc.so
}
package_php-pgsql() {
depends=('php' 'postgresql-libs')
pkgdesc="PostgreSQL modules for PHP"
install -D -m755 ${srcdir}/build-php/modules/pgsql.so ${pkgdir}/usr/lib/php/modules/pgsql.so
install -D -m755 ${srcdir}/build-php/modules/pdo_pgsql.so ${pkgdir}/usr/lib/php/modules/pdo_pgsql.so
}
package_php-pspell() {
depends=('php' 'aspell')
pkgdesc="pspell module for PHP"
install -D -m755 ${srcdir}/build-php/modules/pspell.so ${pkgdir}/usr/lib/php/modules/pspell.so
}
package_php-snmp() {
depends=('php' 'net-snmp')
pkgdesc="snmp module for PHP"
install -D -m755 ${srcdir}/build-php/modules/snmp.so ${pkgdir}/usr/lib/php/modules/snmp.so
}
package_php-sqlite() {
depends=('php' 'sqlite3')
pkgdesc="sqlite3 module for PHP"
install -D -m755 ${srcdir}/build-php/modules/sqlite3.so ${pkgdir}/usr/lib/php/modules/sqlite3.so
install -D -m755 ${srcdir}/build-php/modules/pdo_sqlite.so ${pkgdir}/usr/lib/php/modules/pdo_sqlite.so
}
package_php-tidy() {
depends=('php' 'tidyhtml')
pkgdesc="tidy module for PHP"
install -D -m755 ${srcdir}/build-php/modules/tidy.so ${pkgdir}/usr/lib/php/modules/tidy.so
}
package_php-xsl() {
depends=('php' 'libxslt')
pkgdesc="xsl module for PHP"
install -D -m755 ${srcdir}/build-php/modules/xsl.so ${pkgdir}/usr/lib/php/modules/xsl.so
}

View file

@ -0,0 +1,17 @@
--- /repository/php-src/ext/curl/interface.c 2009/06/15 12:38:11 1.62.2.14.2.57
+++ /repository/php-src/ext/curl/interface.c 2009/06/28 10:00:28 1.62.2.14.2.58
@@ -1827,6 +1827,14 @@
if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.len > 0) {
smart_str_0(&ch->handlers->write->buf);
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
+ }
+
+ /* flush the file handle, so any remaining data is synched to disk */
+ if (ch->handlers->write->method == PHP_CURL_FILE && ch->handlers->write->fp) {
+ fflush(ch->handlers->write->fp);
+ }
+ if (ch->handlers->write_header->method == PHP_CURL_FILE && ch->handlers->write_header->fp) {
+ fflush(ch->handlers->write_header->fp);
}
if (ch->handlers->write->method == PHP_CURL_RETURN) {

View file

@ -1,6 +1,6 @@
--- configure.orig 2009-06-29 17:46:18.000000000 +0200
+++ configure 2009-08-14 08:34:52.000000000 +0200
@@ -29088,43 +29088,15 @@
--- configure.orig 2008-07-03 10:27:06.000000000 +0000
+++ configure 2008-07-03 10:30:56.000000000 +0000
@@ -28399,43 +28399,15 @@
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT

View file

@ -1,26 +0,0 @@
Index: ext/gd/libgd/gd_compat.c
===================================================================
--- ext/gd/libgd/gd_compat.c (Revision 286947)
+++ ext/gd/libgd/gd_compat.c (Revision 286948)
@@ -14,7 +14,7 @@
return JPEG_LIB_VERSION;
}
-int gdJpegGetVersionString()
+const char * gdJpegGetVersionString()
{
switch(JPEG_LIB_VERSION) {
case 62:
Index: ext/gd/libgd/gd_compat.h
===================================================================
--- ext/gd/libgd/gd_compat.h (Revision 286947)
+++ ext/gd/libgd/gd_compat.h (Revision 286948)
@@ -8,7 +8,7 @@
#endif
const char * gdPngGetVersionString();
-int gdJpegGetVersionString();
+const char * gdJpegGetVersionString();
int gdJpegGetVersionInt();
int overflow2(int a, int b);

1308
extra/php/php.ini Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,120 +0,0 @@
--- php.ini-production 2009-06-30 01:05:38.000000000 +0200
+++ php.ini 2009-06-30 01:02:15.000000000 +0200
@@ -376,7 +376,7 @@
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/open-basedir
-;open_basedir =
+open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
@@ -785,7 +785,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
-;include_path = ".:/php/includes"
+include_path = ".:/usr/share/pear"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
@@ -808,7 +808,7 @@
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
-; extension_dir = "./"
+extension_dir = "/usr/lib/php/modules/"
; On windows:
; extension_dir = "ext"
@@ -945,47 +945,49 @@
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
;
-;extension=php_bz2.dll
-;extension=php_curl.dll
-;extension=php_dba.dll
-;extension=php_exif.dll
-;extension=php_fileinfo.dll
-;extension=php_gd2.dll
-;extension=php_gettext.dll
-;extension=php_gmp.dll
-;extension=php_intl.dll
-;extension=php_imap.dll
-;extension=php_interbase.dll
-;extension=php_ldap.dll
-;extension=php_mbstring.dll
-;extension=php_ming.dll
-;extension=php_mssql.dll
-;extension=php_mysql.dll
-;extension=php_mysqli.dll
-;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
-;extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client
-;extension=php_openssl.dll
-;extension=php_pdo_firebird.dll
-;extension=php_pdo_mssql.dll
-;extension=php_pdo_mysql.dll
-;extension=php_pdo_oci.dll
-;extension=php_pdo_odbc.dll
-;extension=php_pdo_pgsql.dll
-;extension=php_pdo_sqlite.dll
-;extension=php_pgsql.dll
-;extension=php_phar.dll
-;extension=php_pspell.dll
-;extension=php_shmop.dll
-;extension=php_snmp.dll
-;extension=php_soap.dll
-;extension=php_sockets.dll
-;extension=php_sqlite.dll
-;extension=php_sqlite3.dll
-;extension=php_sybase_ct.dll
-;extension=php_tidy.dll
-;extension=php_xmlrpc.dll
-;extension=php_xsl.dll
-;extension=php_zip.dll
+;extension=bcmath.so
+;extension=bz2.so
+;extension=calendar.so
+;extension=curl.so
+;extension=dba.so
+;extension=enchant.so
+;extension=exif.so
+;extension=ftp.so
+;extension=gd.so
+extension=gettext.so
+;extension=gmp.so
+;extension=iconv.so
+;extension=imap.so
+;extension=intl.so
+;extension=json.so
+;extension=ldap.so
+;extension=mcrypt.so
+;extension=mysql.so
+;extension=mysqli.so
+;extension=odbc.so
+;extension=openssl.so
+;extension=pdo.so
+;extension=pdo_mysql.so
+;extension=pdo_odbc.so
+;extension=pdo_pgsql.so
+;extension=pdo_sqlite.so
+;extension=pgsql.so
+;extension=phar.so
+;extension=posix.so
+;extension=pspell.so
+;extension=shmop.so
+;extension=snmp.so
+;extension=soap.so
+;extension=sockets.so
+;extension=sqlite.so
+;extension=sqlite3.so
+;extension=sysvmsg.so
+;extension=sysvsem.so
+;extension=sysvshm.so
+;extension=tidy.so
+;extension=xmlrpc.so
+;extension=xsl.so
+;extension=zip.so
;;;;;;;;;;;;;;;;;;;
; Module Settings ;

Binary file not shown.