commit:     212dcbe044570e3b13d7986f3d209862abe80e6f
Author:     Jonas Licht <jonas.licht <AT> fem <DOT> tu-ilmenau <DOT> de>
AuthorDate: Fri Feb 28 22:48:46 2020 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Mar  2 09:45:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=212dcbe0

app-emulation/xen-tools: add xenstat python-bindings

Closes: https://bugs.gentoo.org/711066
Closes: https://github.com/gentoo/gentoo/pull/14799
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Jonas Licht <jonas.licht <AT> fem.tu-ilmenau.de>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                              |  2 +-
 app-emulation/xen-tools/files/gentoo-patches.conf             |  7 +++++--
 .../{xen-tools-4.12.2.ebuild => xen-tools-4.12.2-r1.ebuild}   | 11 +++++++++--
 ...{xen-tools-4.13.0-r1.ebuild => xen-tools-4.13.0-r2.ebuild} | 11 +++++++++--
 4 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index e3ddaed5155..4036c50a647 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -13,5 +13,5 @@ DIST xen-4.12.2-upstream-patches-0.tar.xz 3976 BLAKE2B 
4527b5699b13e1b5bed9b82b6
 DIST xen-4.12.2.tar.gz 26985135 BLAKE2B 
530821011a6dd0ac0a99fb135ff5311eb8e975c3791818093b5e250eed7854d153de6d4340197f9b949c0ad2c3d7b2b7180deb42bc71748ff70ff6fad195269d
 SHA512 
7d9e7921271830c9eadf1bb8eca1aec20d343ad7475b0dc3165ef6d681759e7cb70739f8d9f85622a23aef960988820e822267fb198b12ee3dd657ad6164069f
 DIST xen-4.13.0-upstream-patches-0.tar.xz 11156 BLAKE2B 
e704a3fc1a9213a79208cf60b9972f5480214c0f050fce15245e225b67a34f90ca46e77a74c286d7aef90718295ec6968c2671b72f1994a4372bc191681d38f8
 SHA512 
594194021d0786016e8e214d477892c1ea721e1964729a15ab6928c3cb14b986cbc628d1522ccbf9d53fe568f680acb056d2ff2a37e64261d183589accea4983
 DIST xen-4.13.0.tar.gz 39005191 BLAKE2B 
cd85bfe549e20447afb8ec6b2ab33ea1893f45392c08737730d7898706748ebb96b2e842b2ff3e4af8c5d8a705e6d25a2bfb8acf0d7cc771805d0cc97757a949
 SHA512 
5b2ded9a2fe3f7ddf40eed1fa9858baead06233a01eb6099cc45b3c78b6c3823acfe7b731910733e87125dfa49d08c53f74c215fb1b320a92b44b87a0a105225
-DIST xen-gentoo-patches-18.tar.xz 16840 BLAKE2B 
7243b363c78250ae1928d75813cfd6035a87ca03f1605cbe02233e009a19105a0712711d622eef8606f3e7e1a5db5203342e56a1b00496d5ce37ddc4ffb9e4ea
 SHA512 
328d7b1a57ab6bf9c7200b934aeb241f6d4fecccc600130d1c80460540212eb658cb74ae0502c008e040fdb2d95db20c2a3d71a8e73fd1361070d70adeab6e30
 DIST xen-gentoo-patches-19.tar.xz 17460 BLAKE2B 
6f25c4c9bb438ba0ceded75d04ba6c05ca74e6319d14cf744ea23ecbed2e8283c3c00275a4609b583402d352216520a10197fd4ab9e056eac1c841b0f79bc6b8
 SHA512 
586e88eea0f2dcc5bae0eb4691cc1d722a8b1a7ca849fd8992d72c0990b2832b3e78738c936e8e46bc9623aa1c8e8afa341a22608479629ea012474d5ff6b69a
+DIST xen-gentoo-patches-20.tar.xz 17376 BLAKE2B 
909795f611a089ab1eee86db5f034cec963c831873b3088f0682cdb7ec5284e75a4d49a5a1c93ee7a7e7ba3a899648b38928a1c7b726e019c2a90b66e31fee4a
 SHA512 
d06b846ccb8c488f7155437cdf220533fc2d23ad13b0a2bd4d69d68938c4858fdb961c9e59f57c5228368b4e60dbbdf81ec15b77ecb0639bbf475333f8bf4b97

diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf 
b/app-emulation/xen-tools/files/gentoo-patches.conf
index 7ae98f2d0ed..2134aa56ba2 100644
--- a/app-emulation/xen-tools/files/gentoo-patches.conf
+++ b/app-emulation/xen-tools/files/gentoo-patches.conf
@@ -43,6 +43,9 @@ _gx055=" xen-tools-4.11.2-gcc9.patch"
 # Fix pdf document generation, bug #650396
 _gx049=" xen-tools-4.10.1-pdfdoc.patch"
 
+# Add xenstat python-binding, Gento Bug #711066
+_gx056=" xen-tools-4.12.2-libxenstat-makefile.patch"
+
 # xen-tools-4.11.3 patches set
 _gpv_xen_tools_4113_0="
 ${_gx038} ${_gx017} ${_gx043}
@@ -60,7 +63,7 @@ ${_gx027}
 ${_gx028} ${_gx029}
 ${_gx037} ${_gx042}
 ${_gx053} ${_gx050} ${_gx051}
-${_gx054}
+${_gx054} ${_gx056}
 "
 
 # xen-tools-4.13.0 patches set
@@ -70,5 +73,5 @@ ${_gx027}
 ${_gx028} ${_gx029}
 ${_gx037}
 ${_gx053} ${_gx050} ${_gx051}
-${_gx054}
+${_gx054} ${_gx056}
 "

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
similarity index 97%
rename from app-emulation/xen-tools/xen-tools-4.12.2.ebuild
rename to app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild
index 78250373827..065ff3b6173 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild
@@ -20,7 +20,7 @@ else
        UPSTREAM_VER=0
        SECURITY_VER=
        # xen-tools's gentoo patches tarball
-       GENTOO_VER=18
+       GENTOO_VER=20
        # xen-tools's gentoo patches version which apply to this specific ebuild
        GENTOO_GPV=0
        # xen-tools ovmf's patches
@@ -127,7 +127,8 @@ DEPEND="${COMMON_DEPEND}
        )
        system-qemu? ( app-emulation/qemu[xen] )
        ocaml? ( dev-ml/findlib
-               >=dev-lang/ocaml-4 )"
+               >=dev-lang/ocaml-4 )
+       python? ( dev-lang/swig )"
 
 RDEPEND="${COMMON_DEPEND}
        sys-apps/iproute2[-minimal]
@@ -381,6 +382,7 @@ src_configure() {
 src_compile() {
        local myopt
        use debug && myopt="${myopt} debug=y"
+       use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
 
        if test-flag-CC -fno-strict-overflow; then
                append-flags -fno-strict-overflow
@@ -458,6 +460,11 @@ src_install() {
        keepdir /var/lib/xen/xenpaging
        keepdir /var/lib/xenstored
        keepdir /var/log/xen
+
+       if use python; then
+               python_domodule 
"${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+               python_domodule 
"${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+       fi
 }
 
 pkg_postinst() {

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
similarity index 97%
rename from app-emulation/xen-tools/xen-tools-4.13.0-r1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild
index 2d8777128e7..2da36941e35 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild
@@ -20,7 +20,7 @@ else
        UPSTREAM_VER=0
        SECURITY_VER=
        # xen-tools's gentoo patches tarball
-       GENTOO_VER=18
+       GENTOO_VER=20
        # xen-tools's gentoo patches version which apply to this specific ebuild
        GENTOO_GPV=0
        # xen-tools ovmf's patches
@@ -132,7 +132,8 @@ DEPEND="${COMMON_DEPEND}
        )
        system-qemu? ( app-emulation/qemu[xen] )
        ocaml? ( dev-ml/findlib
-               >=dev-lang/ocaml-4 )"
+               >=dev-lang/ocaml-4 )
+       python? ( >=dev-lang/swig-4.0.0 )"
 
 RDEPEND="${COMMON_DEPEND}
        sys-apps/iproute2[-minimal]
@@ -389,6 +390,7 @@ src_configure() {
 src_compile() {
        local myopt
        use debug && myopt="${myopt} debug=y"
+       use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
 
        if test-flag-CC -fno-strict-overflow; then
                append-flags -fno-strict-overflow
@@ -467,6 +469,11 @@ src_install() {
        keepdir /var/lib/xenstored
        keepdir /var/log/xen
 
+       if use python; then
+               python_domodule 
"${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+               python_domodule 
"${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+       fi
+
        python_optimize
 }
 

Reply via email to