summaryrefslogtreecommitdiffstats
path: root/main/py-libvirt
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-12-18 15:43:00 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-12-18 15:43:15 +0000
commit371e29c29e5f4f0002d0d692886a73be7a4d7dfa (patch)
tree031e1dc9abb7c8fa596657a2977c8957605c8222 /main/py-libvirt
parentd13909666badb65577087723a4ee3481adbace05 (diff)
downloadaports-371e29c29e5f4f0002d0d692886a73be7a4d7dfa.tar.bz2
aports-371e29c29e5f4f0002d0d692886a73be7a4d7dfa.tar.xz
main/py-libvirt: fix musl build
Diffstat (limited to 'main/py-libvirt')
-rw-r--r--main/py-libvirt/APKBUILD15
-rw-r--r--main/py-libvirt/musl-gnuc-prereq.patch18
2 files changed, 28 insertions, 5 deletions
diff --git a/main/py-libvirt/APKBUILD b/main/py-libvirt/APKBUILD
index 10e6a0725..c34693c4d 100644
--- a/main/py-libvirt/APKBUILD
+++ b/main/py-libvirt/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-libvirt
pkgver=1.2.0
-pkgrel=0
+pkgrel=1
pkgdesc="The libvirt virtualization API python binding"
url="http://libvirt.org"
arch="all"
@@ -11,7 +11,9 @@ depends_dev=""
makedepends="$depends_dev python-dev libvirt-dev"
install=""
subpackages=""
-source="http://libvirt.org/sources/python/libvirt-python-$pkgver.tar.gz"
+source="http://libvirt.org/sources/python/libvirt-python-$pkgver.tar.gz
+ musl-gnuc-prereq.patch
+ "
_builddir="$srcdir"/libvirt-python-$pkgver
prepare() {
@@ -34,6 +36,9 @@ package() {
python setup.py install --prefix=/usr --root="$pkgdir" || return 1
}
-md5sums="38158e5740be65f17eef9f99ffa5dadf libvirt-python-1.2.0.tar.gz"
-sha256sums="2fe7e341cb1b35cff130b7a04d0d58f3607094e63cbca689bc16c7b47da0f52b libvirt-python-1.2.0.tar.gz"
-sha512sums="8aa1cd366897fd7657f0cecd189df56551c2a524c1f7d7c609d314c44046b0367d84af617a7591d4d7bb7708dfe66323f2156ed8a0144901bbf563b4f5133d80 libvirt-python-1.2.0.tar.gz"
+md5sums="38158e5740be65f17eef9f99ffa5dadf libvirt-python-1.2.0.tar.gz
+51a120926a0c664e972f207215e4a7a0 musl-gnuc-prereq.patch"
+sha256sums="2fe7e341cb1b35cff130b7a04d0d58f3607094e63cbca689bc16c7b47da0f52b libvirt-python-1.2.0.tar.gz
+a3be754db64e05679d72587f60e7455a946c87102d591119c991765016a8b458 musl-gnuc-prereq.patch"
+sha512sums="8aa1cd366897fd7657f0cecd189df56551c2a524c1f7d7c609d314c44046b0367d84af617a7591d4d7bb7708dfe66323f2156ed8a0144901bbf563b4f5133d80 libvirt-python-1.2.0.tar.gz
+8aa1d814f8388ebff0736ee138c780323381cd4cf39b4a4faed2e2a1fe5911facc34505a85b0977d8b4240b8ce2f4a6d0414790693c4f45ff7d9592e9d6a3ff8 musl-gnuc-prereq.patch"
diff --git a/main/py-libvirt/musl-gnuc-prereq.patch b/main/py-libvirt/musl-gnuc-prereq.patch
new file mode 100644
index 000000000..2e3c95e3f
--- /dev/null
+++ b/main/py-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