commit:     5d4129aba42824c0587957c470959ec9bda1866e
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 15 15:12:42 2016 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 15:12:55 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d4129ab

sys-process/criu: inject SYSROOT into the makefiles for libnl3 cflags so that 
target include dir is used instead of host.

Package-Manager: portage-2.2.28
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 sys-process/criu/criu-2.0.ebuild                  |  1 +
 sys-process/criu/files/2.0/criu-2.0-sysroot.patch | 15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/sys-process/criu/criu-2.0.ebuild b/sys-process/criu/criu-2.0.ebuild
index c1c17f8..b8c2198 100644
--- a/sys-process/criu/criu-2.0.ebuild
+++ b/sys-process/criu/criu-2.0.ebuild
@@ -39,6 +39,7 @@ src_prepare() {
        epatch "${FILESDIR}"/${PV}/${P}-flags.patch
        epatch "${FILESDIR}"/${PV}/${P}-makefile.patch
        epatch "${FILESDIR}"/${PV}/${P}-automagic-libbsd.patch
+       epatch "${FILESDIR}"/${PV}/${P}-sysroot.patch
 }
 
 criu_arch() {

diff --git a/sys-process/criu/files/2.0/criu-2.0-sysroot.patch 
b/sys-process/criu/files/2.0/criu-2.0-sysroot.patch
new file mode 100644
index 0000000..333c564
--- /dev/null
+++ b/sys-process/criu/files/2.0/criu-2.0-sysroot.patch
@@ -0,0 +1,15 @@
+Using host headers when cross compiling is not a great idea.
+
+Index: criu-2.0/criu/Makefile
+===================================================================
+--- criu-2.0.orig/criu/Makefile
++++ criu-2.0/criu/Makefile
+@@ -51,7 +51,7 @@ ccflags-y            += -iquote $(SRC_DIR)/criu/pi
+ ccflags-y             += -iquote $(SRC_DIR)/criu/$(ARCH_DIR)
+ ccflags-y             += -iquote $(SRC_DIR)/criu/$(ARCH_DIR)/include
+ ccflags-y             += -iquote $(SRC_DIR)/
+-ccflags-y             += -I/usr/include/libnl3
++ccflags-y             += -I${SYSROOT}/usr/include/libnl3
+ 
+ export ccflags-y
+ 

Reply via email to