Patchwork [xorg,2/2] libx11: fix cross-compile issues with running makekeys

login
register
mail settings
Submitter kim.hansen@prevas.dk
Date Jan. 14, 2014, 1:34 p.m.
Message ID <1389706481-8738-2-git-send-email-kim.hansen@prevas.dk>
Download mbox | patch
Permalink /patch/310731/
State New
Delegated to: Jacob Kjaergaard
Headers show

Comments

kim.hansen@prevas.dk - Jan. 14, 2014, 1:34 p.m.
From: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk>

---
 recipes/xorg-lib/libx11/use_native_makekeys.patch | 15 +++++++++++++++
 recipes/xorg-lib/libx11_1.5.0.oe                  | 19 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 recipes/xorg-lib/libx11/use_native_makekeys.patch

Patch

diff --git a/recipes/xorg-lib/libx11/use_native_makekeys.patch b/recipes/xorg-lib/libx11/use_native_makekeys.patch
new file mode 100644
index 0000000..182cdf7
--- /dev/null
+++ b/recipes/xorg-lib/libx11/use_native_makekeys.patch
@@ -0,0 +1,15 @@ 
+--- libX11-1.5.0.orig/src/Makefile.am~	2012-06-02 08:37:19.000000000 +0200
++++ libX11-1.5.0/src/Makefile.am	2014-01-14 12:41:55.922629462 +0100
+@@ -415,8 +415,8 @@
+ 
+ KEYSYMDEFS=@KEYSYMDEFS@
+ 
+-ks_tables.h: $(KEYSYMDEFS) $(top_builddir)/src/util/makekeys$(EXEEXT)
+-	$(top_builddir)/src/util/makekeys $(KEYSYMDEFS) > ks_tables_h
++ks_tables.h: $(KEYSYMDEFS)
++	$(MAKEKEYS) $(KEYSYMDEFS) > ks_tables_h
+ 	mv ks_tables_h $@
+ 
+ $(top_builddir)/src/util/makekeys$(EXEEXT): force
+
+Diff finished.  Tue Jan 14 12:42:05 2014
diff --git a/recipes/xorg-lib/libx11_1.5.0.oe b/recipes/xorg-lib/libx11_1.5.0.oe
index 3f46493..244d022 100644
--- a/recipes/xorg-lib/libx11_1.5.0.oe
+++ b/recipes/xorg-lib/libx11_1.5.0.oe
@@ -19,4 +19,23 @@  SRC_URI += " file://keysymdef_include.patch \
 	     file://fix-cross-compile-include-path.patch \
            "
 
+# handle makekeys ro be run on build host
+PACKAGES =+ "${PN}-makekeys"
 
+DO_INSTALL_NATIVE = ""
+DO_INSTALL_NATIVE:native = "do_install_native"
+
+do_install[postfuncs] = "${DO_INSTALL_NATIVE}"
+
+do_install_native(){
+  mkdir -p ${D}${bindir}
+  install -m 775 ${S}/src/util/makekeys ${D}${bindir}/makekeys
+}
+
+FILES_${PN}-makekeys = "${bindir}/makekeys"
+
+DEPENDS:>machine = " native:libx11-makekeys"
+
+inherit autotools-autoreconf
+SRC_URI:>machine = " file://use_native_makekeys.patch"
+export MAKEKEYS="${BUILD_SYSROOT}/bin/makekeys"