aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-event
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2018-10-20 21:26:18 +0300
committerAndy Postnikov <apostnikov@gmail.com>2018-10-20 23:17:30 +0300
commit32ff6fdffe40025b287cef87adcb1e2be78b4955 (patch)
tree6bcf33cb47359a13a5c7687e909c3c0ebce63c8c /community/php7-pecl-event
parentbd0243a0cf64380e80aaa5ce3b1814aed156c69a (diff)
downloadaports-32ff6fdffe40025b287cef87adcb1e2be78b4955.tar.bz2
aports-32ff6fdffe40025b287cef87adcb1e2be78b4955.tar.xz
community/php7-pecl-event: renamed from php7-event, modernize
Diffstat (limited to 'community/php7-pecl-event')
-rw-r--r--community/php7-pecl-event/APKBUILD42
1 files changed, 42 insertions, 0 deletions
diff --git a/community/php7-pecl-event/APKBUILD b/community/php7-pecl-event/APKBUILD
new file mode 100644
index 0000000000..d2d7d6f603
--- /dev/null
+++ b/community/php7-pecl-event/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Andy Postnikov <apostnikov@gmail.com>
+# Maintainer: Andy Postnikov <apostnikov@gmail.com>
+pkgname=php7-pecl-event
+_pkgname=event
+pkgver=2.4.1
+pkgrel=1
+pkgdesc="PHP extension that provides interface to libevent library - PECL"
+url="https://pecl.php.net/package/event"
+arch="all"
+license="PHP-3.01"
+depends="php7 php7-sockets"
+makedepends="php7-dev autoconf libevent-dev libressl-dev pkgconf re2c"
+source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgname-$pkgver.tgz"
+builddir="$srcdir/$_pkgname-$pkgver"
+provides="php7-event=$pkgver-r$pkgrel" # for backward compatibility
+replaces="php7-event" # for backward compatibility
+
+build() {
+ cd "$builddir"
+
+ phpize7
+ ./configure --prefix=/usr --with-php-config=php-config7
+ make
+}
+
+check() {
+ cd "$builddir"
+ # Tests require sockets extension which is not bundled
+ sed -i 's#PHP_TEST_SHARED_EXTENSIONS = `#PHP_TEST_SHARED_EXTENSIONS = -d extension=/usr/lib/php7/modules/sockets.so `#' Makefile
+ make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test
+}
+
+package() {
+ cd "$builddir"
+
+ make INSTALL_ROOT="$pkgdir" install
+
+ install -d "$pkgdir"/etc/php7/conf.d
+ echo "extension=$_pkgname.so" > "$pkgdir"/etc/php7/conf.d/$_pkgname.ini
+}
+
+sha512sums="d115fa12dfefe164532b39b6a79f01c2c00e2718967c3d675584a0dd193b155cdc74a632f6327239e201720fbabd440b9434bde5de4a9e30373595636dafad94 php7-pecl-event-2.4.1.tgz"