aboutsummaryrefslogtreecommitdiffstats
path: root/community/php8-pecl-oauth
diff options
context:
space:
mode:
Diffstat (limited to 'community/php8-pecl-oauth')
-rw-r--r--community/php8-pecl-oauth/APKBUILD42
-rw-r--r--community/php8-pecl-oauth/pcre.patch13
2 files changed, 55 insertions, 0 deletions
diff --git a/community/php8-pecl-oauth/APKBUILD b/community/php8-pecl-oauth/APKBUILD
new file mode 100644
index 0000000000..c52f6263ae
--- /dev/null
+++ b/community/php8-pecl-oauth/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
+# Maintainer: Andy Postnikov <apostnikov@gmail.com>
+pkgname=php8-pecl-oauth
+_extname=oauth
+pkgver=2.0.7
+pkgrel=0
+pkgdesc="PHP 8 extension, OAuth is an authorization protocol built on top of HTTP - PECL"
+url="https://pecl.php.net/package/oauth"
+arch="all"
+license="BSD-3-Clause"
+depends="php8-common"
+makedepends="php8-dev curl-dev"
+checkdepends="php8-openssl php8-pcntl php8-posix"
+source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz
+ pcre.patch"
+builddir="$srcdir/$_extname-$pkgver"
+
+build() {
+ phpize8
+ ./configure --prefix=/usr --with-php-config=php-config8
+ make
+}
+
+check() {
+ local _modules="/usr/lib/php8/modules"
+ make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test \
+ PHP_TEST_SHARED_EXTENSIONS=" \
+ -d extension=$_modules/openssl.so \
+ -d extension=$_modules/pcntl.so \
+ -d extension=$_modules/posix.so \
+ -d extension=modules/$_extname.so" TESTS=--show-diff
+}
+
+package() {
+ make INSTALL_ROOT="$pkgdir" install
+ local _confdir="$pkgdir"/etc/php8/conf.d
+ install -d $_confdir
+ echo "extension=$_extname" > $_confdir/60_$_extname.ini
+}
+
+sha512sums="261bbe6d1c4299f44ce40030b3959e26f2535c70d01b7a4e870d14c84b0a01e68484e61907554d720667fa08a2ec00b7d43cf2f523800c832f02b093e7b6534a php-pecl-oauth-2.0.7.tgz
+68d636032d2f3cb2822ea3121a80256b87a04cc5998c4775174366c6a3392dfe3abc00c84cc50aca5745a32ddd2246af129fe5aa17cc415652c52214a84feef9 pcre.patch"
diff --git a/community/php8-pecl-oauth/pcre.patch b/community/php8-pecl-oauth/pcre.patch
new file mode 100644
index 0000000000..7a47b989d3
--- /dev/null
+++ b/community/php8-pecl-oauth/pcre.patch
@@ -0,0 +1,13 @@
+diff --git a/config.m4 b/config.m4
+index e05ed68..48e2608 100644
+--- a/config.m4
++++ b/config.m4
+@@ -14,8 +14,6 @@ if test "$PHP_OAUTH" != "no"; then
+ PHP_NEW_EXTENSION(oauth, oauth.c provider.c, $ext_shared)
+ CFLAGS="$CFLAGS -Wall -g"
+
+- AC_CHECK_HEADER(pcre.h, , [AC_MSG_ERROR([Couldn't find pcre.h, try installing the libpcre development/headers package])])
+-
+ AS_IF([test "x$with_curl" != "xno"],
+ [
+ AC_MSG_CHECKING(for cURL in default path)