1 |
commit: 212dcbe044570e3b13d7986f3d209862abe80e6f |
2 |
Author: Jonas Licht <jonas.licht <AT> fem <DOT> tu-ilmenau <DOT> de> |
3 |
AuthorDate: Fri Feb 28 22:48:46 2020 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 2 09:45:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=212dcbe0 |
7 |
|
8 |
app-emulation/xen-tools: add xenstat python-bindings |
9 |
|
10 |
Closes: https://bugs.gentoo.org/711066 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/14799 |
12 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
13 |
Signed-off-by: Jonas Licht <jonas.licht <AT> fem.tu-ilmenau.de> |
14 |
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> |
15 |
|
16 |
app-emulation/xen-tools/Manifest | 2 +- |
17 |
app-emulation/xen-tools/files/gentoo-patches.conf | 7 +++++-- |
18 |
.../{xen-tools-4.12.2.ebuild => xen-tools-4.12.2-r1.ebuild} | 11 +++++++++-- |
19 |
...{xen-tools-4.13.0-r1.ebuild => xen-tools-4.13.0-r2.ebuild} | 11 +++++++++-- |
20 |
4 files changed, 24 insertions(+), 7 deletions(-) |
21 |
|
22 |
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest |
23 |
index e3ddaed5155..4036c50a647 100644 |
24 |
--- a/app-emulation/xen-tools/Manifest |
25 |
+++ b/app-emulation/xen-tools/Manifest |
26 |
@@ -13,5 +13,5 @@ DIST xen-4.12.2-upstream-patches-0.tar.xz 3976 BLAKE2B 4527b5699b13e1b5bed9b82b6 |
27 |
DIST xen-4.12.2.tar.gz 26985135 BLAKE2B 530821011a6dd0ac0a99fb135ff5311eb8e975c3791818093b5e250eed7854d153de6d4340197f9b949c0ad2c3d7b2b7180deb42bc71748ff70ff6fad195269d SHA512 7d9e7921271830c9eadf1bb8eca1aec20d343ad7475b0dc3165ef6d681759e7cb70739f8d9f85622a23aef960988820e822267fb198b12ee3dd657ad6164069f |
28 |
DIST xen-4.13.0-upstream-patches-0.tar.xz 11156 BLAKE2B e704a3fc1a9213a79208cf60b9972f5480214c0f050fce15245e225b67a34f90ca46e77a74c286d7aef90718295ec6968c2671b72f1994a4372bc191681d38f8 SHA512 594194021d0786016e8e214d477892c1ea721e1964729a15ab6928c3cb14b986cbc628d1522ccbf9d53fe568f680acb056d2ff2a37e64261d183589accea4983 |
29 |
DIST xen-4.13.0.tar.gz 39005191 BLAKE2B cd85bfe549e20447afb8ec6b2ab33ea1893f45392c08737730d7898706748ebb96b2e842b2ff3e4af8c5d8a705e6d25a2bfb8acf0d7cc771805d0cc97757a949 SHA512 5b2ded9a2fe3f7ddf40eed1fa9858baead06233a01eb6099cc45b3c78b6c3823acfe7b731910733e87125dfa49d08c53f74c215fb1b320a92b44b87a0a105225 |
30 |
-DIST xen-gentoo-patches-18.tar.xz 16840 BLAKE2B 7243b363c78250ae1928d75813cfd6035a87ca03f1605cbe02233e009a19105a0712711d622eef8606f3e7e1a5db5203342e56a1b00496d5ce37ddc4ffb9e4ea SHA512 328d7b1a57ab6bf9c7200b934aeb241f6d4fecccc600130d1c80460540212eb658cb74ae0502c008e040fdb2d95db20c2a3d71a8e73fd1361070d70adeab6e30 |
31 |
DIST xen-gentoo-patches-19.tar.xz 17460 BLAKE2B 6f25c4c9bb438ba0ceded75d04ba6c05ca74e6319d14cf744ea23ecbed2e8283c3c00275a4609b583402d352216520a10197fd4ab9e056eac1c841b0f79bc6b8 SHA512 586e88eea0f2dcc5bae0eb4691cc1d722a8b1a7ca849fd8992d72c0990b2832b3e78738c936e8e46bc9623aa1c8e8afa341a22608479629ea012474d5ff6b69a |
32 |
+DIST xen-gentoo-patches-20.tar.xz 17376 BLAKE2B 909795f611a089ab1eee86db5f034cec963c831873b3088f0682cdb7ec5284e75a4d49a5a1c93ee7a7e7ba3a899648b38928a1c7b726e019c2a90b66e31fee4a SHA512 d06b846ccb8c488f7155437cdf220533fc2d23ad13b0a2bd4d69d68938c4858fdb961c9e59f57c5228368b4e60dbbdf81ec15b77ecb0639bbf475333f8bf4b97 |
33 |
|
34 |
diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf b/app-emulation/xen-tools/files/gentoo-patches.conf |
35 |
index 7ae98f2d0ed..2134aa56ba2 100644 |
36 |
--- a/app-emulation/xen-tools/files/gentoo-patches.conf |
37 |
+++ b/app-emulation/xen-tools/files/gentoo-patches.conf |
38 |
@@ -43,6 +43,9 @@ _gx055=" xen-tools-4.11.2-gcc9.patch" |
39 |
# Fix pdf document generation, bug #650396 |
40 |
_gx049=" xen-tools-4.10.1-pdfdoc.patch" |
41 |
|
42 |
+# Add xenstat python-binding, Gento Bug #711066 |
43 |
+_gx056=" xen-tools-4.12.2-libxenstat-makefile.patch" |
44 |
+ |
45 |
# xen-tools-4.11.3 patches set |
46 |
_gpv_xen_tools_4113_0=" |
47 |
${_gx038} ${_gx017} ${_gx043} |
48 |
@@ -60,7 +63,7 @@ ${_gx027} |
49 |
${_gx028} ${_gx029} |
50 |
${_gx037} ${_gx042} |
51 |
${_gx053} ${_gx050} ${_gx051} |
52 |
-${_gx054} |
53 |
+${_gx054} ${_gx056} |
54 |
" |
55 |
|
56 |
# xen-tools-4.13.0 patches set |
57 |
@@ -70,5 +73,5 @@ ${_gx027} |
58 |
${_gx028} ${_gx029} |
59 |
${_gx037} |
60 |
${_gx053} ${_gx050} ${_gx051} |
61 |
-${_gx054} |
62 |
+${_gx054} ${_gx056} |
63 |
" |
64 |
|
65 |
diff --git a/app-emulation/xen-tools/xen-tools-4.12.2.ebuild b/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild |
66 |
similarity index 97% |
67 |
rename from app-emulation/xen-tools/xen-tools-4.12.2.ebuild |
68 |
rename to app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild |
69 |
index 78250373827..065ff3b6173 100644 |
70 |
--- a/app-emulation/xen-tools/xen-tools-4.12.2.ebuild |
71 |
+++ b/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild |
72 |
@@ -20,7 +20,7 @@ else |
73 |
UPSTREAM_VER=0 |
74 |
SECURITY_VER= |
75 |
# xen-tools's gentoo patches tarball |
76 |
- GENTOO_VER=18 |
77 |
+ GENTOO_VER=20 |
78 |
# xen-tools's gentoo patches version which apply to this specific ebuild |
79 |
GENTOO_GPV=0 |
80 |
# xen-tools ovmf's patches |
81 |
@@ -127,7 +127,8 @@ DEPEND="${COMMON_DEPEND} |
82 |
) |
83 |
system-qemu? ( app-emulation/qemu[xen] ) |
84 |
ocaml? ( dev-ml/findlib |
85 |
- >=dev-lang/ocaml-4 )" |
86 |
+ >=dev-lang/ocaml-4 ) |
87 |
+ python? ( dev-lang/swig )" |
88 |
|
89 |
RDEPEND="${COMMON_DEPEND} |
90 |
sys-apps/iproute2[-minimal] |
91 |
@@ -381,6 +382,7 @@ src_configure() { |
92 |
src_compile() { |
93 |
local myopt |
94 |
use debug && myopt="${myopt} debug=y" |
95 |
+ use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y" |
96 |
|
97 |
if test-flag-CC -fno-strict-overflow; then |
98 |
append-flags -fno-strict-overflow |
99 |
@@ -458,6 +460,11 @@ src_install() { |
100 |
keepdir /var/lib/xen/xenpaging |
101 |
keepdir /var/lib/xenstored |
102 |
keepdir /var/log/xen |
103 |
+ |
104 |
+ if use python; then |
105 |
+ python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py" |
106 |
+ python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so" |
107 |
+ fi |
108 |
} |
109 |
|
110 |
pkg_postinst() { |
111 |
|
112 |
diff --git a/app-emulation/xen-tools/xen-tools-4.13.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild |
113 |
similarity index 97% |
114 |
rename from app-emulation/xen-tools/xen-tools-4.13.0-r1.ebuild |
115 |
rename to app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild |
116 |
index 2d8777128e7..2da36941e35 100644 |
117 |
--- a/app-emulation/xen-tools/xen-tools-4.13.0-r1.ebuild |
118 |
+++ b/app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild |
119 |
@@ -20,7 +20,7 @@ else |
120 |
UPSTREAM_VER=0 |
121 |
SECURITY_VER= |
122 |
# xen-tools's gentoo patches tarball |
123 |
- GENTOO_VER=18 |
124 |
+ GENTOO_VER=20 |
125 |
# xen-tools's gentoo patches version which apply to this specific ebuild |
126 |
GENTOO_GPV=0 |
127 |
# xen-tools ovmf's patches |
128 |
@@ -132,7 +132,8 @@ DEPEND="${COMMON_DEPEND} |
129 |
) |
130 |
system-qemu? ( app-emulation/qemu[xen] ) |
131 |
ocaml? ( dev-ml/findlib |
132 |
- >=dev-lang/ocaml-4 )" |
133 |
+ >=dev-lang/ocaml-4 ) |
134 |
+ python? ( >=dev-lang/swig-4.0.0 )" |
135 |
|
136 |
RDEPEND="${COMMON_DEPEND} |
137 |
sys-apps/iproute2[-minimal] |
138 |
@@ -389,6 +390,7 @@ src_configure() { |
139 |
src_compile() { |
140 |
local myopt |
141 |
use debug && myopt="${myopt} debug=y" |
142 |
+ use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y" |
143 |
|
144 |
if test-flag-CC -fno-strict-overflow; then |
145 |
append-flags -fno-strict-overflow |
146 |
@@ -467,6 +469,11 @@ src_install() { |
147 |
keepdir /var/lib/xenstored |
148 |
keepdir /var/log/xen |
149 |
|
150 |
+ if use python; then |
151 |
+ python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py" |
152 |
+ python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so" |
153 |
+ fi |
154 |
+ |
155 |
python_optimize |
156 |
} |