Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/
Date: Wed, 14 Jul 2021 15:01:28
Message-Id: 1626274858.fd00b25bba34b49090a9af7c77fb582144527ead.juippis@gentoo
1 commit: fd00b25bba34b49090a9af7c77fb582144527ead
2 Author: Jonas Licht <jonas.licht <AT> fem <DOT> tu-ilmenau <DOT> de>
3 AuthorDate: Sun Jul 4 10:37:18 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 14 15:00:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd00b25b
7
8 app-emulation/xen-tools: fix xenstat python bindings in 4.15
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.2
11 Signed-off-by: Jonas Licht <jonas.licht <AT> fem.tu-ilmenau.de>
12 Closes: https://github.com/gentoo/gentoo/pull/21527
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14
15 .../xen-tools-4.15.0-fix-xenstat-python-bindings.patch | 18 ++++++++++++++++++
16 ...ols-4.15.0-r1.ebuild => xen-tools-4.15.0-r2.ebuild} | 14 +++++++-------
17 2 files changed, 25 insertions(+), 7 deletions(-)
18
19 diff --git a/app-emulation/xen-tools/files/xen-tools-4.15.0-fix-xenstat-python-bindings.patch b/app-emulation/xen-tools/files/xen-tools-4.15.0-fix-xenstat-python-bindings.patch
20 new file mode 100644
21 index 00000000000..3547b7346ee
22 --- /dev/null
23 +++ b/app-emulation/xen-tools/files/xen-tools-4.15.0-fix-xenstat-python-bindings.patch
24 @@ -0,0 +1,18 @@
25 +--- a/tools/libs/stat/Makefile 2021-07-01 19:32:50.696318503 +0200
26 ++++ b/tools/libs/stat/Makefile 2021-07-01 00:16:15.102473301 +0200
27 +@@ -51,12 +51,13 @@
28 + .PHONY: uninstall-bindings
29 + uninstall-bindings: uninstall-perl-bindings uninstall-python-bindings
30 +
31 +-$(BINDINGS): $(SHLIB) $(SHLIB_LINKS) include/xenstat.h
32 ++$(BINDINGS): $(SHLIB) $(SHLIB_LINKS) ../../include/xenstat.h
33 +
34 +-SWIG_FLAGS=-module xenstat -Iinclude -I.
35 ++SWIG_FLAGS=-module xenstat -Iinclude -I. -I../../include/
36 +
37 + # Python bindings
38 + PYTHON_FLAGS=`$(PYTHON) -c 'import distutils.sysconfig; print("-I" + distutils.sysconfig.get_python_inc(True) + " " + distutils.sysconfig.get_config_var("BLDLIBRARY"))'`
39 ++PYTHON_FLAGS+=-Wno-error=missing-prototypes -fPIC -lxenstat
40 + $(PYMOD): $(PYSRC)
41 + $(PYSRC): bindings/swig/xenstat.i
42 + swig -python $(SWIG_FLAGS) -outdir $(@D) -o $(PYSRC) $<
43
44 diff --git a/app-emulation/xen-tools/xen-tools-4.15.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.0-r2.ebuild
45 similarity index 98%
46 rename from app-emulation/xen-tools/xen-tools-4.15.0-r1.ebuild
47 rename to app-emulation/xen-tools/xen-tools-4.15.0-r2.ebuild
48 index c062f81eb41..af982d2bd20 100644
49 --- a/app-emulation/xen-tools/xen-tools-4.15.0-r1.ebuild
50 +++ b/app-emulation/xen-tools/xen-tools-4.15.0-r2.ebuild
51 @@ -181,6 +181,8 @@ QA_PREBUILT="
52
53 RESTRICT="test"
54
55 +PATCHES=( "${FILESDIR}/${P}-fix-xenstat-python-bindings.patch" )
56 +
57 pkg_setup() {
58 python_setup
59 export "CONFIG_LOMOUNT=y"
60 @@ -419,8 +421,7 @@ src_configure() {
61 src_compile() {
62 local myopt
63 use debug && myopt="${myopt} debug=y"
64 - # Currently broken
65 - #use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
66 + use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
67
68 if test-flag-CC -fno-strict-overflow; then
69 append-flags -fno-strict-overflow
70 @@ -499,11 +500,10 @@ src_install() {
71 keepdir /var/lib/xenstored
72 keepdir /var/log/xen
73
74 - # Currently broken
75 - #if use python; then
76 - #python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
77 - #python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
78 - #fi
79 + if use python; then
80 + python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
81 + python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
82 + fi
83
84 python_optimize
85 }