mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 20:06:43 +02:00
testing/libguestfs: rebuild against python 3.8
This commit is contained in:
parent
d95a53813d
commit
8e03be8ae1
@ -1,13 +1,14 @@
|
||||
# Maintainer: Fathi Boudra <fathi.boudra@linaro.org>
|
||||
pkgname=libguestfs
|
||||
pkgver=1.40.2
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
pkgdesc="tools for accessing and modifying virtual machine disk images"
|
||||
url="http://libguestfs.org/"
|
||||
arch="x86_64"
|
||||
license="GPL-2.0-or-later"
|
||||
depends="cdrkit curl gptfdisk qemu-img qemu-system-x86_64"
|
||||
makedepends="
|
||||
autoconf automake libtool
|
||||
acl-dev
|
||||
augeas-dev
|
||||
bash
|
||||
@ -45,10 +46,13 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py3-$pkgname:_py"
|
||||
source="
|
||||
http://download.libguestfs.org/1.40-stable/$pkgname-$pkgver.tar.gz
|
||||
https://raw.githubusercontent.com/alpinelinux/aports/3.9-stable/main/kbd/error.h
|
||||
python-3.8.patch
|
||||
"
|
||||
options="!check charset.alias" # Test suite does not support Alpine Linux at this moment
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
autoreconf -vif
|
||||
# busybox gzip does not support --best
|
||||
sed -i 's/gzip --best/gzip -9/g' test-data/files/*
|
||||
# musl lacks error.h
|
||||
@ -104,4 +108,5 @@ _py() {
|
||||
}
|
||||
|
||||
sha512sums="d288f15d5a70b4b87a4271ea2eb7dc0ec4f48fdb136b8f62003352a069f75573de873e1063763889f410fb1b99951252e9a48dd73bf0233047f21aae43ac6de2 libguestfs-1.40.2.tar.gz
|
||||
c66f6b0d8c8b8d285c740bdbe7130dee272ac01cd5e73b35a58cedf1a77fe8d9e062631b804fb58014d8eb9861c8f28aed07bc022ef31662bcc61b5c85a21752 error.h"
|
||||
c66f6b0d8c8b8d285c740bdbe7130dee272ac01cd5e73b35a58cedf1a77fe8d9e062631b804fb58014d8eb9861c8f28aed07bc022ef31662bcc61b5c85a21752 error.h
|
||||
8c22a83043d965e8404228f224c5daa83bdf3ea9ddbe56dd8f1afd76344cdd61d664d9086160844dc0bcd02cc737c083db116010bca912a65806b52630dcc366 python-3.8.patch"
|
||||
|
||||
49
testing/libguestfs/python-3.8.patch
Normal file
49
testing/libguestfs/python-3.8.patch
Normal file
@ -0,0 +1,49 @@
|
||||
py3-$pkgname:_py
|
||||
n 3.8 no longer links C extensions to -lpython, instead relying
|
||||
on the fact that the python binary itself already contains those
|
||||
symbols. This means $PYTHON_LIBS is empty and so the Python bindings
|
||||
are not built.
|
||||
|
||||
Use a different test to see if the python module is available.
|
||||
---
|
||||
m4/guestfs-python.m4 | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/m4/guestfs-python.m4 b/m4/guestfs-python.m4
|
||||
index 7d4c991bb..befa9b102 100644
|
||||
--- a/m4/guestfs-python.m4
|
||||
+++ b/m4/guestfs-python.m4
|
||||
@@ -33,14 +33,17 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||
PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"`
|
||||
PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR"
|
||||
AC_MSG_RESULT([$PYTHON_VERSION])
|
||||
+
|
||||
# Debian: python-2.7.pc, python-3.2.pc
|
||||
PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[
|
||||
+ have_python_module=1
|
||||
AC_SUBST([PYTHON_CFLAGS])
|
||||
AC_SUBST([PYTHON_LIBS])
|
||||
AC_SUBST([PYTHON_VERSION])
|
||||
AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
|
||||
],[
|
||||
PKG_CHECK_MODULES([PYTHON], [python],[
|
||||
+ have_python_module=1
|
||||
AC_SUBST([PYTHON_CFLAGS])
|
||||
AC_SUBST([PYTHON_LIBS])
|
||||
AC_SUBST([PYTHON_VERSION])
|
||||
@@ -49,6 +52,7 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||
AC_MSG_WARN([python $PYTHON_VERSION not found])
|
||||
])
|
||||
])
|
||||
+
|
||||
AC_MSG_CHECKING([Python prefix])
|
||||
PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"`
|
||||
AC_MSG_RESULT([$PYTHON_PREFIX])
|
||||
@@ -101,4 +105,4 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||
AC_SUBST(PYTHON_EXT_SUFFIX)
|
||||
])
|
||||
AM_CONDITIONAL([HAVE_PYTHON],
|
||||
- [test "x$PYTHON" != "xno" && test "x$PYTHON_LIBS" != "x" ])
|
||||
+ [test "x$PYTHON" != "xno" && test "x$have_python_module" = "x1" ])
|
||||
--
|
||||
2.21.0
|
||||
Loading…
x
Reference in New Issue
Block a user