aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/php7-libvirt-php/APKBUILD41
-rw-r--r--testing/php7-libvirt-php/musl-fixes.patch16
2 files changed, 57 insertions, 0 deletions
diff --git a/testing/php7-libvirt-php/APKBUILD b/testing/php7-libvirt-php/APKBUILD
new file mode 100644
index 0000000000..bbfefd7a75
--- /dev/null
+++ b/testing/php7-libvirt-php/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Fernando Casas Schossow <casasfernando@outlook.com>
+# Maintainer: Fernando Casas Schossow <casasfernando@outlook.com>
+pkgname=php7-libvirt-php
+pkgver=0.5.4
+pkgrel=0
+pkgdesc="PHP language bindings for Libvirt API. For more details see: http://www.libvirt.org/php/"
+url="https://libvirt.org/php/"
+arch="all"
+license="LGPL-2.1"
+makedepends="autoconf libvirt-dev libxml2-dev libxml2-utils libxslt php7-dev php7-pecl-imagick libtool linux-headers"
+subpackages="$pkgname-doc"
+source="http://libvirt.org/sources/php/libvirt-php-$pkgver.tar.gz
+ musl-fixes.patch"
+builddir="$srcdir/libvirt-php-$pkgver"
+
+prepare() {
+ cd "$builddir"
+ default_prepare
+ autoconf
+}
+
+build() {
+ cd "$builddir"
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd "$builddir"
+ php7 --no-php-ini --define extension=src/.libs/libvirt-php.so --modules | grep libvirt
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+ rm "$pkgdir/usr/lib/php7/modules/libvirt-php.la"
+}
+
+sha512sums="b5b204549e6810668203d1df8404a5cb71f646ae7e01ea223c6e9b9eec9b1f6500cc5bb4559859959d821a213ff992f22a97e4b683da2c683be3732710943487 libvirt-php-0.5.4.tar.gz
+732f22ca206187b7a0ea41fe2d63808c8afc0994f941fbbb933dbde219f597d108aa3ed10b67e074fe90ac6ab571ee0dc70ef725ce8ed746d8f6e4689e972291 musl-fixes.patch"
diff --git a/testing/php7-libvirt-php/musl-fixes.patch b/testing/php7-libvirt-php/musl-fixes.patch
new file mode 100644
index 0000000000..92388095b4
--- /dev/null
+++ b/testing/php7-libvirt-php/musl-fixes.patch
@@ -0,0 +1,16 @@
+diff --git a/tools/generate-api-docs.c b/tools/generate-api-docs.c
+index 3b88f16..12c0283 100644
+--- a/tools/generate-api-docs.c
++++ b/tools/generate-api-docs.c
+@@ -129,7 +129,9 @@ void free_functions(int function_number)
+ free(functions[i].args[j]);
+ free(functions[i].name);
+ free(functions[i].desc);
+- free(functions[i].returns);
++ //Commenting the line below as when compiled with musl libc it is creating a SIGSEGV
++ //Moreover this program is only used to create libvirt-php html documentation at compile time
++ //free(functions[i].returns);
+ }
+ free(functions);
+ }
+