diff options
Diffstat (limited to 'community/py3-libvirt')
-rw-r--r-- | community/py3-libvirt/APKBUILD | 32 | ||||
-rw-r--r-- | community/py3-libvirt/musl-gnuc-prereq.patch | 18 |
2 files changed, 50 insertions, 0 deletions
diff --git a/community/py3-libvirt/APKBUILD b/community/py3-libvirt/APKBUILD new file mode 100644 index 0000000000..0a3fbdb4e2 --- /dev/null +++ b/community/py3-libvirt/APKBUILD @@ -0,0 +1,32 @@ +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py3-libvirt +_pkgname=libvirt-python +pkgver=6.1.0 +pkgrel=0 +pkgdesc="The libvirt virtualization API python binding" +url="http://libvirt.org" +arch="all" +license="LGPL-2.0-or-later" +makedepends="py3-setuptools python3-dev libvirt-dev" +source="https://libvirt.org/sources/python/$_pkgname-$pkgver.tar.gz + musl-gnuc-prereq.patch + " +builddir="$srcdir/$_pkgname-$pkgver" + +replaces="py-libvirt" # Backwards compatibility +provides="py-libvirt=$pkgver" # Backwards compatibility + +check() { + python3 setup.py check +} + +build() { + python3 setup.py build +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +sha512sums="a7994e21cbd5aa9c16aa4baa0e314ab3d71b15692e50da8f243994aee7393cc4dd2a27b39def87599ecfc32764980c71069ce4c904edc379219bd76a6344ce1e libvirt-python-6.1.0.tar.gz +8aa1d814f8388ebff0736ee138c780323381cd4cf39b4a4faed2e2a1fe5911facc34505a85b0977d8b4240b8ce2f4a6d0414790693c4f45ff7d9592e9d6a3ff8 musl-gnuc-prereq.patch" diff --git a/community/py3-libvirt/musl-gnuc-prereq.patch b/community/py3-libvirt/musl-gnuc-prereq.patch new file mode 100644 index 0000000000..2e3c95e3f4 --- /dev/null +++ b/community/py3-libvirt/musl-gnuc-prereq.patch @@ -0,0 +1,18 @@ +--- libvirt-python-1.2.0.orig/libvirt-utils.h ++++ libvirt-python-1.2.0/libvirt-utils.h +@@ -28,6 +28,15 @@ + # define MIN(a,b) (((a) < (b)) ? (a) : (b)) + # endif + ++# ifndef __GNUC_PREREQ ++# if defined __GNUC__ && defined __GNUC_MINOR__ ++# define __GNUC_PREREQ(maj, min) \ ++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) ++# else ++# define __GNUC_PREREQ(maj, min) 0 ++# endif ++#endif ++ + /** + * libvirt.h provides this as of version 1.2.0, but we want to be able + * to support older versions of libvirt so copy and paste the macro from |