Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/php7-libvirt-php: new aport

From: Fernando Casas Schössow <casasfernando_at_outlook.com>
Date: Wed, 6 Feb 2019 16:35:01 +0000

https://libvirt.org/php/
PHP language bindings for Libvirt API. For more details see: http://www.libvirt.org/php/
---
 testing/php7-libvirt-php/APKBUILD         | 36 +++++++++++++++++++++++
 testing/php7-libvirt-php/musl-fixes.patch | 16 ++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 testing/php7-libvirt-php/APKBUILD
 create mode 100644 testing/php7-libvirt-php/musl-fixes.patch
diff --git a/testing/php7-libvirt-php/APKBUILD b/testing/php7-libvirt-php/APKBUILD
new file mode 100644
index 0000000000..d9858a395b
--- /dev/null
+++ b/testing/php7-libvirt-php/APKBUILD
_at_@ -0,0 +1,36 @@
+# Contributor: Fernando Casas Schossow <casasfernando_at_outlook.com>
+# Maintainer: Fernando Casas Schossow <casasfernando_at_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"
+
+build() {
+	cd "$builddir"
+	autoconf
+	./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
_at_@ -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
+_at_@ -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);
+ }
+
-- 
2.20.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Feb 06 2019 - 16:35:01 UTC