summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorStephen Berquet2016-01-21 11:09:18 +0100
committerStephen Berquet2016-01-21 11:09:18 +0100
commite082e6b5987bbb784f31265ea830711778ebb2a4 (patch)
tree63bb558a2c2047a4888fb9d14d90711ffd608ecd /PKGBUILD
parent8e802c73dbd531dc26830a80829900f405b93086 (diff)
downloadaur-php-ncurses.tar.gz
added php7 support
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD24
1 files changed, 14 insertions, 10 deletions
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"
}