aboutsummaryrefslogtreecommitdiffstats
path: root/main/php/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/php/APKBUILD')
-rw-r--r--main/php/APKBUILD35
1 files changed, 27 insertions, 8 deletions
diff --git a/main/php/APKBUILD b/main/php/APKBUILD
index 303e75be97..0162ca2292 100644
--- a/main/php/APKBUILD
+++ b/main/php/APKBUILD
@@ -3,7 +3,7 @@
pkgname=php
pkgver=5.3.8
_suhosinver=5.3.7-0.9.10
-pkgrel=0
+pkgrel=1
pkgdesc="The PHP language runtime engine"
url="http://www.php.net/"
arch="all"
@@ -19,6 +19,7 @@ makedepends="pcre-dev libxml2-dev libiconv-dev openssl-dev zlib-dev bzip2-dev
readline-dev enchant-dev gdbm-dev freetds-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-common $pkgname-cgi
$pkgname-cli $pkgname-fpm $pkgname-apache2 $pkgname-embed
+ $pkgname-pear
$pkgname-bcmath
$pkgname-bz2
$pkgname-calendar
@@ -72,6 +73,7 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-common $pkgname-cgi
# http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz
source="http://www.php.net/distributions/${pkgname}-${pkgver}.tar.bz2
+ php-install-pear-xml.patch
suhosin-patch-${_suhosinver}.patch
php-fpm.initd
php5-module.conf
@@ -88,6 +90,7 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
+
# safty check for api changes
local vapi=$(sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h)
if [ "$vapi" != "$_apiver" ]; then
@@ -108,10 +111,6 @@ _do_build() {
}
build() {
- # Set PEAR_INSTALLDIR to ensure that the hard-coded include_path
- # is properly set even if we install php-pear separately
- export PEAR_INSTALLDIR=/usr/share/pear
-
_phpconfig="--build=${CHOST:-i486-alpine-linux-uclibc} \
--prefix=/usr \
--sysconfdir=/etc/php \
@@ -202,12 +201,13 @@ build() {
--enable-mailparse \
"
- # cgi, fcgi, cli and extensions
+ # cgi, fcgi, cli, pear and extensions
_do_build cgi \
${_phpconfig} \
--disable-cli \
--enable-cgi \
--enable-cli \
+ --with-pear \
${_phpextensions} \
|| return 1
@@ -242,8 +242,11 @@ build() {
package() {
cd "$srcdir"/build-cgi
- # install php-cgi, cli and modules
- make -j1 install INSTALL_ROOT="$pkgdir" || return 1
+ # install php-cgi, cli, pear and modules
+ make -j1 install install-pear INSTALL_ROOT="$pkgdir" || return 1
+
+ # cleanup after pear
+ find "$pkgdir" -name '.*' | xargs rm -rf || return 1
# install fpm
install -D -m755 "$srcdir"/build-fpm/sapi/fpm/php-fpm \
@@ -354,6 +357,21 @@ embed() {
mv "$pkgdir"/usr/lib/libphp5.so "$subpkgdir"/usr/lib/
}
+pear() {
+ pkgdesc="PHP Extension and Application Repository (PEAR)"
+ depends="php-cli php-xml"
+ mkdir -p "$subpkgdir"/usr/share "$subpkgdir"/etc/php \
+ "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/pecl \
+ "$pkgdir"/usr/bin/pear \
+ "$pkgdir"/usr/bin/peardev \
+ "$subpkgdir"/usr/bin/ || return 1
+ mv "$pkgdir"/etc/php/pear.conf \
+ "$subpkgdir"/etc/php/ || return 1
+ mv "$pkgdir"/usr/share/pear \
+ "$subpkgdir"/usr/share/ || return 1
+}
+
_mv_ext() {
local ext=$1
pkgdesc="${ext} extension for PHP"
@@ -425,6 +443,7 @@ mssql() { _mv_ext mssql; }
pdo_dblib() { _mv_ext pdo_dblib "php-pdo freetds"; }
md5sums="704cd414a0565d905e1074ffdc1fadfb php-5.3.8.tar.bz2
+5111e3be06d391f8772587c675240fab php-install-pear-xml.patch
8bd8840465d6bcd8e1e5d2cec80a1bfc suhosin-patch-5.3.7-0.9.10.patch
8f2bb2b744a2de50025842cb51fb6a3a php-fpm.initd
67719f428f44ec004da18705cbabe2ee php5-module.conf"