summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD24
2 files changed, 16 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 50be60a170d..f4335a91096 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu Jan 21 09:57:13 UTC 2016
+# Thu Jan 21 10:07:49 UTC 2016
pkgbase = php-ncurses
pkgdesc = Terminal screen handling and optimization package
pkgver = 1.0.2
- pkgrel = 2
+ pkgrel = 3
url = http://pecl.php.net/package/ncurses
arch = x86_64
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index 7bba7408a83..e8ea30ef2c4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Samleybrize <stephen.berquet at gmail dot com>
pkgname=php-ncurses
pkgver=1.0.2
-pkgrel=2
+pkgrel=3
pkgdesc="Terminal screen handling and optimization package"
url="http://pecl.php.net/package/ncurses"
arch=('x86_64' 'i686')
@@ -20,18 +20,22 @@ sha256sums=(
)
build() {
- cd "$srcdir/ncurses-$pkgver"
- patch < ../../ncurses-php7-support.patch
+ phpver=$(php -r 'echo (int) phpversion();')
+ cd "$srcdir/ncurses-$pkgver"
- phpize
- ./configure --prefix=/usr --with-ncurses
- make
+ if [ $phpver -ge 7 ]; then
+ patch < ../../ncurses-php7-support.patch
+ fi
+
+ phpize
+ ./configure --prefix=/usr --with-ncurses
+ make
}
package() {
- cd "$srcdir/ncurses-$pkgver"
+ cd "$srcdir/ncurses-$pkgver"
- make INSTALL_ROOT="$pkgdir" install
- echo 'extension=ncurses.so' > ncurses.ini
- install -Dm644 ncurses.ini "$pkgdir/etc/php/conf.d/ncurses.ini"
+ make INSTALL_ROOT="$pkgdir" install
+ echo 'extension=ncurses.so' > ncurses.ini
+ install -Dm644 ncurses.ini "$pkgdir/etc/php/conf.d/ncurses.ini"
}