1 |
commit: f3b3d8e3ea5e5c5bce0d87def9f731fd4ca37787 |
2 |
Author: Florian Schmaus <flow <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 6 18:36:15 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 6 18:36:15 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/commit/?id=f3b3d8e3 |
7 |
|
8 |
Gentoo specific patches for 4.15.3 (or later) |
9 |
|
10 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
11 |
|
12 |
xen-tools-4.16.0-xenstat.patch | 51 ++++++++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 51 insertions(+) |
14 |
|
15 |
diff --git a/xen-tools-4.16.0-xenstat.patch b/xen-tools-4.16.0-xenstat.patch |
16 |
new file mode 100644 |
17 |
index 0000000..c47b3dc |
18 |
--- /dev/null |
19 |
+++ b/xen-tools-4.16.0-xenstat.patch |
20 |
@@ -0,0 +1,51 @@ |
21 |
+diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile |
22 |
+index c99508ae..b54b700c 100644 |
23 |
+--- a/tools/libs/stat/Makefile |
24 |
++++ b/tools/libs/stat/Makefile |
25 |
+@@ -51,23 +51,23 @@ install-bindings: install-perl-bindings install-python-bindings |
26 |
+ .PHONY: uninstall-bindings |
27 |
+ uninstall-bindings: uninstall-perl-bindings uninstall-python-bindings |
28 |
+ |
29 |
+-$(BINDINGS): $(SHLIB) $(SHLIB_LINKS) include/xenstat.h |
30 |
++$(BINDINGS): $(SHLIB) $(SHLIB_LINKS) ../../include/xenstat.h |
31 |
+ |
32 |
+-SWIG_FLAGS=-module xenstat -Iinclude -I. |
33 |
++SWIG_FLAGS=-module xenstat -Iinclude -I. -I../../include/ |
34 |
+ |
35 |
+ # Python bindings |
36 |
+-PYTHON_VERSION=$(PYTHON:python%=%) |
37 |
+-PYTHON_FLAGS=-I/usr/include/python$(PYTHON_VERSION) -lpython$(PYTHON_VERSION) |
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 |
+ $(PYLIB): $(PYSRC) |
45 |
+- $(CC) $(CFLAGS) $(LDFLAGS) $(PYTHON_FLAGS) $(SHLIB_LDFLAGS) -lxenstat -o $@ $< $(APPEND_LDFLAGS) |
46 |
++ $(CC) $(CFLAGS) $(LDFLAGS) $(PYTHON_FLAGS) $(SHLIB_LDFLAGS) -o $@ $< $(SHLIB) $(LDLIBS-y) $(APPEND_LDFLAGS) |
47 |
+ |
48 |
+ python-bindings: $(PYLIB) $(PYMOD) |
49 |
+ |
50 |
+-pythonlibdir=$(prefix)/lib/python$(PYTHON_VERSION)/site-packages |
51 |
++pythonlibdir=`$(PYTHON) -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())'` |
52 |
+ install-python-bindings: $(PYLIB) $(PYMOD) |
53 |
+ $(INSTALL_PROG) $(PYLIB) $(DESTDIR)$(pythonlibdir)/_xenstat.so |
54 |
+ $(INSTALL_PROG) $(PYMOD) $(DESTDIR)$(pythonlibdir)/xenstat.py |
55 |
+@@ -91,13 +91,14 @@ $(PERLSRC): bindings/swig/xenstat.i |
56 |
+ swig -perl $(SWIG_FLAGS) -outdir $(@D) -o $(PERLSRC) $< |
57 |
+ |
58 |
+ $(PERLLIB): $(PERLSRC) |
59 |
+- $(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) $(SHLIB_LDFLAGS) -lxenstat -o $@ $< $(APPEND_LDFLAGS) |
60 |
++ $(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) $(SHLIB_LDFLAGS) -o $@ $< $(SHLIB) $(LDLIBS-y) $(APPEND_LDFLAGS) |
61 |
++ |
62 |
+ |
63 |
+ .PHONY: perl-bindings |
64 |
+ perl-bindings: $(PERLLIB) $(PERLMOD) |
65 |
+ |
66 |
+ .PHONY: install-perl-bindings |
67 |
+-perllibdir=$(prefix)/lib/perl5 |
68 |
++perllibdir=$(prefix)/$(libdir)/perl5 |
69 |
+ perlmoddir=$(prefix)/share/perl5 |
70 |
+ install-perl-bindings: $(PERLLIB) $(PERLMOD) |
71 |
+ $(INSTALL_PROG) $(PERLLIB) $(DESTDIR)$(perllibdir)/xenstat.so |