summaryrefslogtreecommitdiff
path: root/staging
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-04-03 00:01:35 +0000
committerroot <root@rshg054.dnsready.net>2012-04-03 00:01:35 +0000
commitc7cb603f86b4d4fb6567e3faa15b916a306f7004 (patch)
treebfdbca0002d6aeecc13f29a1c14d3991e6e93d4c /staging
parent321f44e3a5da426309c4b6664af035c97f907565 (diff)
Tue Apr 3 00:01:35 UTC 2012
Diffstat (limited to 'staging')
-rw-r--r--staging/libreoffice/PKGBUILD15
-rw-r--r--staging/libreoffice/buildfix_icu49.diff42
-rw-r--r--staging/php/PKGBUILD368
-rw-r--r--staging/php/apache.conf13
-rw-r--r--staging/php/logrotate.d.php-fpm6
-rw-r--r--staging/php/pcre_info.patch43
-rw-r--r--staging/php/php-fpm.conf.in.patch52
-rw-r--r--staging/php/php.ini.patch126
-rw-r--r--staging/php/rc.d.php-fpm158
9 files changed, 815 insertions, 8 deletions
diff --git a/staging/libreoffice/PKGBUILD b/staging/libreoffice/PKGBUILD
index 7b50bdb65..07f3c14e5 100644
--- a/staging/libreoffice/PKGBUILD
+++ b/staging/libreoffice/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 154787 2012-03-30 17:12:40Z andyrtr $
+# $Id: PKGBUILD 154994 2012-04-01 08:55:21Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
pkgbase="libreoffice"
@@ -21,7 +21,7 @@ pkgname=('libreoffice-common'
'libreoffice-extension-report-builder')
_LOver=3.5.1.2
pkgver=3.5.1
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
license=('LGPL3')
url="http://www.libreoffice.org/"
@@ -33,7 +33,7 @@ makedepends=( # makedepends
#'saxon' - currently broken
# the runtime dependencies
"curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.2' 'libwps' 'libxaw' "neon>=0.28.6"
- 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' 'libxslt' 'librsvg' #"icu>=49.1"
+ 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' 'libxslt' 'librsvg' "icu>=49.1"
'redland' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'libtextcat' 'graphite'
'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'gtk2' 'orbit2' 'translate-toolkit' 'xdg-utils'
'ttf-dejavu') # to satisfy regression tests
@@ -46,7 +46,6 @@ _mirror="http://download.documentfoundation.org/libreoffice/src/${pkgver}"
_additional_source_url="http://dev-www.libreoffice.org/src"
source=(${_mirror}/${pkgbase}-{core,help,translations}-${_LOver}.tar.xz
${_additional_source_url}/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
- ${_additional_source_url}/314e582264c36b3735466c522899aa07-icu4c-4_4_2-src.tgz
${_additional_source_url}/d28864eb2b59bb57b034c0d4662a3cee-libvisio-0.0.15.tar.bz2
${_additional_source_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
${_additional_source_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
@@ -77,10 +76,10 @@ source=(${_mirror}/${pkgbase}-{core,help,translations}-${_LOver}.tar.xz
gmake_install.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=1048d8fa4abd3e55a45dfb6884db808da1d72c9e
smp_buildfix.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=cf23f57ae6bb7af689a45e0a850c3c2f67a8f810
buildfix_kde4fpicker.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=ee67c55260ec7723c39606955ccdbd3e2934935a
+ buildfix_icu49.diff
libreoffice-common.sh libreoffice-common.csh)
noextract=(d28864eb2b59bb57b034c0d4662a3cee-libvisio-0.0.15.tar.bz2
18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
- 314e582264c36b3735466c522899aa07-icu4c-4_4_2-src.tgz
185d60944ea767075d27247c3162b3bc-unowinreg.dll
0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2
ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
@@ -111,7 +110,6 @@ md5sums=('1edf0d39a7a921f6415f6a6ec7b314b3'
'607b544cd7b38f9e6db6fe7da25007a7'
'a3fa7818bfab14a6cccec645193e9982'
'18f577b374d60b3c760a3a3350407632'
- '314e582264c36b3735466c522899aa07'
'd28864eb2b59bb57b034c0d4662a3cee'
'1f24ab1d39f4a51faf22244c94a6203f'
'35c94d2df8893241173de1d16b6034c0'
@@ -142,6 +140,7 @@ md5sums=('1edf0d39a7a921f6415f6a6ec7b314b3'
'60ce5dc9bd098f95c2e621a930c98dd9'
'661a52a02a31b3afbe4b3b3146061afd'
'15fe8b5d79fbdc0b6bc2b454086671e7'
+ '9734ea20c9f67e1b6e1c5a1247fbd3ff'
'32fcd844935434807e68d7bd06b94f09'
'06a45184aefe078c4314e002ba666b52')
@@ -168,6 +167,7 @@ build() {
patch -Np1 -i ${srcdir}/gmake_install.diff
patch -Np1 -i ${srcdir}/smp_buildfix.diff
patch -Np1 -i ${srcdir}/buildfix_kde4fpicker.diff
+ patch -Np0 -i ${srcdir}/buildfix_icu49.diff
# unset C(XX)FLAGS
# http://www.openoffice.org/issues/show_bug.cgi?id=103205
@@ -220,7 +220,6 @@ build() {
--without-afms\
--without-ppds\
--without-system-libwps\
- --without-system-icu \
--without-system-mdds\
--without-myspell-dicts \
--without-system-libvisio \
@@ -287,7 +286,7 @@ package_libreoffice-common() {
pkgdesc="common files for LibreOffice - a productivity suite that is compatible with other major office suites"
install=${pkgbase}.install
depends=('libreoffice-langpack' "hunspell>=1.2.8" "python2>=2.7" "neon>=0.28.6"
- 'nspr' 'libsm' 'redland' 'hyphen' 'graphite' #"icu>=4.6"
+ 'nspr' 'libsm' 'redland' 'hyphen' 'graphite' "icu>=49.1"
'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'xdg-utils' 'orbit2')
#'saxon'
optdepends=('libreoffice-langpack: additional language support'
diff --git a/staging/libreoffice/buildfix_icu49.diff b/staging/libreoffice/buildfix_icu49.diff
new file mode 100644
index 000000000..7a774dee0
--- /dev/null
+++ b/staging/libreoffice/buildfix_icu49.diff
@@ -0,0 +1,42 @@
+https://bugs.gentoo.org/show_bug.cgi?id=410307
+
+--- i18npool/source/breakiterator/data/char_in.txt
++++ i18npool/source/breakiterator/data/char_in.txt
+@@ -15,7 +15,7 @@
+ $CR = [\p{Grapheme_Cluster_Break = CR}];
+ $LF = [\p{Grapheme_Cluster_Break = LF}];
+ $Control = [\p{Grapheme_Cluster_Break = Control}];
+-$Prepend = [\p{Grapheme_Cluster_Break = Prepend}];
++# $Prepend = [\p{Grapheme_Cluster_Break = Prepend}];
+ $Extend = [\p{Grapheme_Cluster_Break = Extend}];
+ $SpacingMark = [\p{Grapheme_Cluster_Break = SpacingMark}];
+ $BengaliLetter = [\u0985-\u09B9 \u09CE \u09DC-\u09E1 \u09F0-\u09F1];
+@@ -72,7 +72,7 @@
+ [^$Control $CR $LF] $Extend;
+
+ [^$Control $CR $LF] $SpacingMark;
+-$Prepend [^$Control $CR $LF];
++# $Prepend [^$Control $CR $LF];
+
+
+ ## -------------------------------------------------
+@@ -94,7 +94,7 @@
+
+ $Extend [^$Control $CR $LF];
+ $SpacingMark [^$Control $CR $LF];
+-[^$Control $CR $LF] $Prepend;
++# [^$Control $CR $LF] $Prepend;
+
+
+ ## -------------------------------------------------
+--- i18npool/source/breakiterator/data/char.txt
++++ i18npool/source/breakiterator/data/char.txt
+@@ -16,7 +16,7 @@
+ $CR = [\p{Grapheme_Cluster_Break = CR}];
+ $LF = [\p{Grapheme_Cluster_Break = LF}];
+ $Control = [\p{Grapheme_Cluster_Break = Control}];
+-$Prepend = [\p{Grapheme_Cluster_Break = Prepend}];
++# $Prepend = [\p{Grapheme_Cluster_Break = Prepend}];
+ $Extend = [\p{Grapheme_Cluster_Break = Extend}];
+ $SpacingMark = [\p{Grapheme_Cluster_Break = SpacingMark}];
+ # True Indic wants to move by syllables. Break up SpacingMark. This based on Unicode 6.0 data
diff --git a/staging/php/PKGBUILD b/staging/php/PKGBUILD
new file mode 100644
index 000000000..caa432a55
--- /dev/null
+++ b/staging/php/PKGBUILD
@@ -0,0 +1,368 @@
+# $Id: PKGBUILD 155298 2012-04-01 12:45:44Z pierre $
+# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=php
+pkgname=('php'
+ 'php-cgi'
+ 'php-apache'
+ 'php-fpm'
+ 'php-embed'
+ 'php-pear'
+ 'php-enchant'
+ 'php-gd'
+ 'php-intl'
+ 'php-ldap'
+ 'php-mcrypt'
+ 'php-mssql'
+ 'php-odbc'
+ 'php-pgsql'
+ 'php-pspell'
+ 'php-snmp'
+ 'php-sqlite'
+ 'php-tidy'
+ 'php-xsl')
+pkgver=5.3.10
+_suhosinver=5.3.9-0.9.10
+pkgrel=5
+arch=('i686' 'x86_64')
+license=('PHP')
+url='http://www.php.net'
+makedepends=('apache' 'imap' 'postgresql-libs' 'libldap' 'postfix'
+ 'sqlite3' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file' 'freetds'
+ 'libmcrypt' 'tidyhtml' 'aspell' 'libltdl' 'libpng' 'libjpeg' 'icu'
+ 'curl' 'libxslt' 'openssl' 'bzip2' 'db' 'gmp' 'freetype2')
+source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2"
+ "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz"
+ "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz.sig"
+ 'php.ini.patch' 'apache.conf' 'rc.d.php-fpm' 'php-fpm.conf.in.patch'
+ 'logrotate.d.php-fpm' 'pcre_info.patch')
+md5sums=('816259e5ca7d0a7e943e56a3bb32b17f'
+ 'c099b3d7eac95018ababd41ded7f3066'
+ 'c15d18f846be1d69144a5d0056ee6506'
+ 'ffc338e8ce2a990f6f2a486355bbab65'
+ 'dec2cbaad64e3abf4f0ec70e1de4e8e9'
+ 'b01be5f816988fcee7e78225836e5e27'
+ '740ec5fe2ecfd9d7febd4081c90ec65b'
+ '07c4e412909ac65a44ec90e7a2c4bade'
+ '8d3806bbb19e390f9b32ccf21611d937')
+
+build() {
+ phpconfig="--srcdir=../${pkgbase}-${pkgver} \
+ --prefix=/usr \
+ --sysconfdir=/etc/php \
+ --localstatedir=/var \
+ --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 \
+ "
+
+ 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 \
+ --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=/usr \
+ --with-enchant=shared,/usr \
+ --with-freetype-dir=shared,/usr \
+ --with-gd=shared \
+ --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-ldap-sasl \
+ --with-mcrypt=shared \
+ --with-mhash \
+ --with-mssql=shared \
+ --with-mysql-sock=/var/run/mysqld/mysqld.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 \
+ "
+
+ EXTENSION_DIR=/usr/lib/php/modules
+ export EXTENSION_DIR
+ PEAR_INSTALLDIR=/usr/share/pear
+ export PEAR_INSTALLDIR
+
+ cd ${srcdir}/${pkgbase}-${pkgver}
+
+ patch -p1 -i ${srcdir}/pcre_info.patch
+
+ # apply suhosin patch
+ patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch
+
+ # adjust paths
+ patch -p0 -i ${srcdir}/php.ini.patch
+ patch -p0 -i ${srcdir}/php-fpm.conf.in.patch
+
+ # php
+ mkdir ${srcdir}/build-php
+ cd ${srcdir}/build-php
+ ln -s ../${pkgbase}-${pkgver}/configure
+ ./configure ${phpconfig} \
+ --disable-cgi \
+ --with-readline \
+ --enable-pcntl \
+ ${phpextensions}
+ make
+
+ # 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 ${phpconfig} \
+ --disable-cli \
+ --enable-cgi \
+ ${phpextensions}
+ make
+
+ # apache
+ cp -a ${srcdir}/build-php ${srcdir}/build-apache
+ cd ${srcdir}/build-apache
+ ./configure ${phpconfig} \
+ --disable-cli \
+ --with-apxs2 \
+ ${phpextensions}
+ make
+
+ # fpm
+ cp -a ${srcdir}/build-php ${srcdir}/build-fpm
+ cd ${srcdir}/build-fpm
+ ./configure ${phpconfig} \
+ --disable-cli \
+ --enable-fpm \
+ --with-fpm-user=http \
+ --with-fpm-group=http \
+ ${phpextensions}
+ make
+
+ # embed
+ cp -a ${srcdir}/build-php ${srcdir}/build-embed
+ cd ${srcdir}/build-embed
+ ./configure ${phpconfig} \
+ --disable-cli \
+ --enable-embed=shared \
+ ${phpextensions}
+ make
+
+ # pear
+ cp -a ${srcdir}/build-php ${srcdir}/build-pear
+ cd ${srcdir}/build-pear
+ ./configure ${phpconfig} \
+ --disable-cgi \
+ --with-readline \
+ --enable-pcntl \
+ --with-pear \
+ ${phpextensions}
+ make
+}
+
+# check() {
+# cd ${srcdir}/build-php
+# make test
+# }
+
+package_php() {
+ pkgdesc='An HTML-embedded scripting language'
+ depends=('pcre' 'libxml2' 'bzip2' 'curl')
+ replaces=('php-fileinfo' 'php-gmp' 'php-curl')
+ provides=('php-fileinfo' 'php-gmp' 'php-curl')
+ conflicts=('php-fileinfo' 'php-gmp' 'php-curl')
+ backup=('etc/php/php.ini')
+
+ cd ${srcdir}/build-php
+ make -j1 INSTALL_ROOT=${pkgdir} install
+ install -d -m755 ${pkgdir}/usr/share/pear
+ # install php.ini
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/php.ini-production ${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/{enchant,gd,intl,ldap,mcrypt,mssql,odbc,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
+ # remove empty directory
+ rmdir ${pkgdir}/usr/include/php/include
+}
+
+package_php-cgi() {
+ pkgdesc='CGI and FCGI SAPI for PHP'
+ depends=('php')
+
+ 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')
+ backup=('etc/httpd/conf/extra/php5_module.conf')
+
+ install -D -m755 ${srcdir}/build-apache/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-fpm() {
+ pkgdesc='FastCGI Process Manager for PHP'
+ depends=('php')
+ backup=('etc/php/php-fpm.conf')
+
+ install -D -m755 ${srcdir}/build-fpm/sapi/fpm/php-fpm ${pkgdir}/usr/sbin/php-fpm
+ install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.8 ${pkgdir}/usr/share/man/man8/php-fpm.8
+ install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.conf ${pkgdir}/etc/php/php-fpm.conf
+ install -D -m755 ${srcdir}/rc.d.php-fpm ${pkgdir}/etc/rc.d/php-fpm
+ install -D -m644 ${srcdir}/logrotate.d.php-fpm ${pkgdir}/etc/logrotate.d/php-fpm
+ install -d -m755 ${pkgdir}/etc/php/fpm.d
+}
+
+package_php-embed() {
+ pkgdesc='Embed SAPI for PHP'
+ depends=('php')
+
+ install -D -m755 ${srcdir}/build-embed/libs/libphp5.so ${pkgdir}/usr/lib/libphp5.so
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/sapi/embed/php_embed.h ${pkgdir}/usr/include/php/sapi/embed/php_embed.h
+}
+
+package_php-pear() {
+ pkgdesc='PHP Extension and Application Repository'
+ depends=('php')
+ backup=('etc/php/pear.conf')
+
+ cd ${srcdir}/build-pear
+ make -j1 install-pear INSTALL_ROOT=${pkgdir}
+ local i
+ while read i; do
+ [ ! -e "$i" ] || rm -rf "$i"
+ done < <(find ${pkgdir} -name '.*')
+}
+
+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' 'libpng' 'libjpeg' 'freetype2')
+ pkgdesc='gd module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.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' 'libltdl')
+ pkgdesc='mcrypt module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/mcrypt.so ${pkgdir}/usr/lib/php/modules/mcrypt.so
+}
+
+package_php-mssql() {
+ depends=('php' 'freetds')
+ pkgdesc='mssql module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/mssql.so ${pkgdir}/usr/lib/php/modules/mssql.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
+}
diff --git a/staging/php/apache.conf b/staging/php/apache.conf
new file mode 100644
index 000000000..c3ca0aad5
--- /dev/null
+++ b/staging/php/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php5_module
+
+<IfModule dir_module>
+ <IfModule php5_module>
+ DirectoryIndex index.php index.html
+ <FilesMatch "\.php$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+ </IfModule>
+</IfModule>
diff --git a/staging/php/logrotate.d.php-fpm b/staging/php/logrotate.d.php-fpm
new file mode 100644
index 000000000..7a1ba2597
--- /dev/null
+++ b/staging/php/logrotate.d.php-fpm
@@ -0,0 +1,6 @@
+/var/log/php-fpm.log {
+ missingok
+ postrotate
+ /etc/rc.d/php-fpm logrotate >/dev/null || true
+ endscript
+}
diff --git a/staging/php/pcre_info.patch b/staging/php/pcre_info.patch
new file mode 100644
index 000000000..e6d10df06
--- /dev/null
+++ b/staging/php/pcre_info.patch
@@ -0,0 +1,43 @@
+--- php-5.3.10/ext/pcre/php_pcre.c 2012-01-01 14:15:04.000000000 +0100
++++ php-5.3.10/ext/pcre/php_pcre.c 2012-02-06 13:31:36.198935107 +0100
+@@ -241,6 +241,7 @@
+ char *pattern;
+ int do_study = 0;
+ int poptions = 0;
++ int count = 0;
+ unsigned const char *tables = NULL;
+ #if HAVE_SETLOCALE
+ char *locale = setlocale(LC_CTYPE, NULL);
+@@ -252,10 +252,10 @@
+ back the compiled pattern, otherwise go on and compile it. */
+ if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) {
+ /*
+- * We use a quick pcre_info() check to see whether cache is corrupted, and if it
++ * We use a quick pcre_fullinfo() check to see whether cache is corrupted, and if it
+ * is, we flush it and compile the pattern from scratch.
+ */
+- if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
++ if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
+ zend_hash_clean(&PCRE_G(pcre_cache));
+ } else {
+ #if HAVE_SETLOCALE
+--- php-5.3.10/ext/pcre/php_pcre.def 2009-01-11 14:59:00.000000000 +0100
++++ php-5.3.10/ext/pcre/php_pcre.def 2012-02-06 13:31:47.775299315 +0100
+@@ -4,7 +4,6 @@
+ php_pcre_exec
+ php_pcre_get_substring
+ php_pcre_get_substring_list
+-php_pcre_info
+ php_pcre_maketables
+ php_pcre_study
+ php_pcre_version
+--- php-5.3.10/main/php_compat.h 2012-01-01 14:15:04.000000000 +0100
++++ php-5.3.10/main/php_compat.h 2012-02-06 13:26:59.272834580 +0100
+@@ -34,7 +34,6 @@
+ #define pcre_exec php_pcre_exec
+ #define pcre_get_substring php_pcre_get_substring
+ #define pcre_get_substring_list php_pcre_get_substring_list
+-#define pcre_info php_pcre_info
+ #define pcre_maketables php_pcre_maketables
+ #define pcre_study php_pcre_study
+ #define pcre_version php_pcre_version
diff --git a/staging/php/php-fpm.conf.in.patch b/staging/php/php-fpm.conf.in.patch
new file mode 100644
index 000000000..b923edb38
--- /dev/null
+++ b/staging/php/php-fpm.conf.in.patch
@@ -0,0 +1,52 @@
+--- sapi/fpm/php-fpm.conf.in 2011-10-08 23:04:10.000000000 +0200
++++ sapi/fpm/php-fpm.conf.in 2012-01-11 10:50:14.905161442 +0100
+@@ -12,7 +12,7 @@
+ ; Relative path can also be used. They will be prefixed by:
+ ; - the global prefix if it's been set (-p arguement)
+ ; - @prefix@ otherwise
+-;include=etc/fpm.d/*.conf
++;include=/etc/php/fpm.d/*.conf
+
+ ;;;;;;;;;;;;;;;;;;
+ ; Global Options ;
+@@ -22,7 +22,7 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++pid = run/php-fpm/php-fpm.pid
+
+ ; Error log file
+ ; If it's set to "syslog", log is sent to syslogd instead of being written
+@@ -140,7 +140,8 @@
+ ; specific port;
+ ; '/path/to/unix/socket' - to listen on a unix socket.
+ ; Note: This value is mandatory.
+-listen = 127.0.0.1:9000
++;listen = 127.0.0.1:9000
++listen = /var/run/php-fpm/php-fpm.sock
+
+ ; Set listen(2) backlog. A value of '-1' means unlimited.
+ ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
+@@ -151,9 +152,9 @@
+ ; BSD-derived systems allow connections regardless of permissions.
+ ; Default Values: user and group are set as the running user
+ ; mode is set to 0666
+-;listen.owner = @php_fpm_user@
+-;listen.group = @php_fpm_group@
+-;listen.mode = 0666
++listen.owner = @php_fpm_user@
++listen.group = @php_fpm_group@
++listen.mode = 0660
+
+ ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+ ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+@@ -442,7 +443,7 @@
+ ; Chdir to this directory at the start.
+ ; Note: relative path can be used.
+ ; Default Value: current directory or / when chroot
+-;chdir = /var/www
++;chdir = /srv/http
+
+ ; Redirect worker stdout and stderr into main error log. If not set, stdout and
+ ; stderr will be redirected to /dev/null according to FastCGI specs.
diff --git a/staging/php/php.ini.patch b/staging/php/php.ini.patch
new file mode 100644
index 000000000..3dc5b6560
--- /dev/null
+++ b/staging/php/php.ini.patch
@@ -0,0 +1,126 @@
+--- php.ini-production 2011-12-15 11:31:02.000000000 +0100
++++ php.ini-production 2012-01-11 10:43:02.069936043 +0100
+@@ -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
+@@ -793,7 +793,7 @@
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:/usr/share/pear"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -816,7 +816,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"
+
+@@ -950,53 +950,49 @@
+ ; If you only provide the name of the extension, PHP will look for it in its
+ ; default extension directory.
+ ;
+-; Windows Extensions
+-; Note that ODBC support is built in, so no dll is needed for it.
+-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
+-; 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_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_exif.dll ; Must be after mbstring as it depends on it
+-;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 11gR2 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_pspell.dll
+-;extension=php_shmop.dll
+-
+-; The MIBS data available in the PHP distribution must be installed.
+-; See http://www.php.net/manual/en/snmp.installation.php
+-;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=mssql.so
++;extension=mysqli.so
++;extension=mysql.so
++;extension=odbc.so
++;extension=openssl.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=sqlite3.so
++;extension=sqlite.so
++;extension=sysvmsg.so
++;extension=sysvsem.so
++;extension=sysvshm.so
++;extension=tidy.so
++;extension=xmlrpc.so
++;extension=xsl.so
++;extension=zip.so
+
+ ;;;;;;;;;;;;;;;;;;;
+ ; Module Settings ;
diff --git a/staging/php/rc.d.php-fpm b/staging/php/rc.d.php-fpm
new file mode 100644
index 000000000..54bcf4d5b
--- /dev/null
+++ b/staging/php/rc.d.php-fpm
@@ -0,0 +1,158 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+
+wait_for_pid () {
+ try=0
+ while test $try -lt 35 ; do
+ case "$1" in
+ 'created')
+ if [ -f "$2" ] ; then
+ try=''
+ break
+ fi
+ ;;
+ 'removed')
+ if [ ! -f "$2" ] ; then
+ try=''
+ break
+ fi
+ ;;
+ esac
+
+ stat_append '.'
+ try=`expr $try + 1`
+ sleep 1
+ done
+}
+
+test_config() {
+ stat_busy 'Checking configuration'
+ if [ $(id -u) -ne 0 ]; then
+ stat_append '(This script must be run as root)'
+ stat_die
+ fi
+
+ if [ ! -r /etc/php/php-fpm.conf ]; then
+ stat_append '(/etc/php/php-fpm.conf not found)'
+ stat_die
+ fi
+
+ local test=$(/usr/sbin/php-fpm -t 2>&1)
+ if [ $? -gt 0 ]; then
+ stat_append '(error in /etc/php/php-fpm.conf)'
+ stat_die
+ elif echo $test | grep -qi 'error'; then
+ stat_append '(error in /etc/php/php.ini)'
+ stat_die
+ fi
+
+ [ -d /var/run/php-fpm ] || install -d -m755 /var/run/php-fpm
+
+ stat_done
+}
+
+case "$1" in
+ start)
+ test_config
+ stat_busy 'Starting php-fpm'
+
+ /usr/sbin/php-fpm
+
+ if [ "$?" != 0 ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ wait_for_pid created /var/run/php-fpm/php-fpm.pid
+
+ if [ -n "$try" ] ; then
+ stat_fail
+ exit 1
+ else
+ add_daemon php-fpm
+ stat_done
+ fi
+ ;;
+
+ stop)
+ test_config
+ stat_busy 'Gracefully shutting down php-fpm'
+
+ if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ kill -QUIT `cat /var/run/php-fpm/php-fpm.pid`
+
+ wait_for_pid removed /var/run/php-fpm.pid
+
+ if [ -n "$try" ] ; then
+ stat_fail
+ exit 1
+ else
+ rm_daemon php-fpm
+ stat_done
+ fi
+ ;;
+
+ force-quit)
+ stat_busy 'Terminating php-fpm'
+
+ if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ kill -TERM `cat /var/run/php-fpm/php-fpm.pid`
+
+ wait_for_pid removed /var/run/php-fpm/php-fpm.pid
+
+ if [ -n "$try" ] ; then
+ stat_fail
+ exit 1
+ else
+ rm_daemon php-fpm
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ reload)
+ test_config
+ stat_busy 'Reload service php-fpm'
+
+ if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ kill -USR2 `cat /var/run/php-fpm/php-fpm.pid`
+ stat_done
+ ;;
+
+ logrotate)
+ stat_busy 'Reopen php-fpm log'
+
+ if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ kill -USR1 `cat /var/run/php-fpm/php-fpm.pid`
+ stat_done
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|force-quit|restart|reload|logrotate}"
+ exit 1
+ ;;
+
+esac