aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/php8-pecl-datadog_trace/APKBUILD45
-rw-r--r--testing/php8-pecl-datadog_trace/fix-cgi-test.patch11
2 files changed, 56 insertions, 0 deletions
diff --git a/testing/php8-pecl-datadog_trace/APKBUILD b/testing/php8-pecl-datadog_trace/APKBUILD
new file mode 100644
index 0000000000..d0cd055acd
--- /dev/null
+++ b/testing/php8-pecl-datadog_trace/APKBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Andy Postnikov <apostnikov@gmail.com>
+pkgname=php8-pecl-datadog_trace
+_extname=datadog_trace
+_realname=ddtrace
+pkgver=0.62.1
+pkgrel=0
+pkgdesc="APM and distributed tracing for PHP 8 - PECL"
+url="https://pecl.php.net/package/datadog_trace"
+arch="all !x86 !armv7 !armhf" # 64 bits only
+license="BSD-3-Clause"
+depends="php8-common"
+makedepends="php8-dev curl-dev"
+checkdepends="php8-cgi php8-curl php8-session"
+source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz
+ fix-cgi-test.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/curl.so \
+ -d extension=$_modules/session.so \
+ -d extension=modules/$_realname.so" \
+ TEST_PHP_CGI_EXECUTABLE=/usr/bin/php-cgi8 \
+ TESTS='--show-diff'
+}
+
+package() {
+ make INSTALL_ROOT="$pkgdir" install
+ local _confdir="$pkgdir"/etc/php8/conf.d
+ install -d $_confdir
+ echo "extension=$_realname" > $_confdir/$_extname.ini
+}
+
+sha512sums="
+f1cbf97c390781682b95779c0fc08791ad1f0e6019fa3faee27a79db834e6a3838a88b9508082f7481419996e574b3fc947cb1fb9d944e28cbf77515a91bee3c php-pecl-datadog_trace-0.62.1.tgz
+4a17d92ae1c495b0acc1f16d1732e33dd82f7b182adae83f7278b710c2c5f1c8e56471b2d2b4545992c01cc57e3eae19bbfd09dae3d389fb9d7efcdd9b3ab8cc fix-cgi-test.patch
+"
diff --git a/testing/php8-pecl-datadog_trace/fix-cgi-test.patch b/testing/php8-pecl-datadog_trace/fix-cgi-test.patch
new file mode 100644
index 0000000000..a2a125da8a
--- /dev/null
+++ b/testing/php8-pecl-datadog_trace/fix-cgi-test.patch
@@ -0,0 +1,11 @@
+--- a/tests/ext/startup_logging_disabled.phpt
++++ b/tests/ext/startup_logging_disabled.phpt
+@@ -13,7 +13,7 @@
+ var_dump($logs);
+ ?>
+ --EXPECTF--
+-%s/php-cgi %s
++%s/php-cgi8 %s
+ No JSON found: (%s)
+ array(0) {
+ }