summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch')
-rw-r--r--recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
new file mode 100644
index 00000000..35cd9a81
--- /dev/null
+++ b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
@@ -0,0 +1,73 @@
1From 6db88791d923167f160afbcadeffad84a4cbdbc5 Mon Sep 17 00:00:00 2001
2Message-Id: <6db88791d923167f160afbcadeffad84a4cbdbc5.1612262706.git.bertrand.marquis@arm.com>
3From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
4Date: Fri, 19 Oct 2018 11:01:37 +0200
5Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args
6
7Upstream-Status: Xen: Inappropriate [oe specific, python install issues]
8
9Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR)
10as well as other parameters set by the OpenEmbedded build system.
11This is especially useful when the target libdir is not the default one
12(/usr/lib), but for example /usr/lib64.
13
14Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
15
16Forward-ported to Xen 4.12.0
17Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
18
19Modified to support pygrub installation with python 3
20Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
21
22Forward-ported to Xen 4.14.0
23Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
24
25Forward-ported to Xen 4.15.0
26Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
27
28---
29 tools/pygrub/Makefile | 7 +++++--
30 tools/python/Makefile | 2 +-
31 2 files changed, 6 insertions(+), 3 deletions(-)
32
33diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
34index 37b2146214..ffb9270065 100644
35--- a/tools/pygrub/Makefile
36+++ b/tools/pygrub/Makefile
37@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt
38 all: build
39 .PHONY: build
40 build:
41- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build
42+ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS)
43
44 .PHONY: install
45 install: all
46@@ -18,7 +18,10 @@ install: all
47 CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \
48 LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \
49 --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
50- --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force
51+ --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \
52+ $(DISTUTILS_INSTALL_ARGS)
53+ rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
54+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
55 set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
56 "`readlink -f $(DESTDIR)/$(bindir)`" != \
57 "`readlink -f $(LIBEXEC_BIN)`" ]; then \
58diff --git a/tools/python/Makefile b/tools/python/Makefile
59index cc76423647..5cb11ae453 100644
60--- a/tools/python/Makefile
61+++ b/tools/python/Makefile
62@@ -12,7 +12,7 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA
63 SHLIB_libxenctrl="$(SHLIB_libxenctrl)" \
64 SHLIB_libxenguest="$(SHLIB_libxenguest)" \
65 SHLIB_libxenstore="$(SHLIB_libxenstore)" \
66- $(PYTHON) setup.py
67+ $(PYTHON) setup.py $(DISTUTILS_BUILD_ARGS)
68
69 .PHONY: build
70 build:
71--
722.17.1
73