libx11: makekeys can be cross-compiled now, so don't hack around
authorRoss Burton <ross.burton@intel.com>
Tue, 11 Sep 2012 19:18:06 +0000 (20:18 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 12 Sep 2012 14:13:49 +0000 (15:13 +0100)
(From OE-Core rev: 04c776956b98cc96c2c1a139bec0422feae1497d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/xorg-lib/libx11-diet_1.5.0.bb
meta/recipes-graphics/xorg-lib/libx11.inc
meta/recipes-graphics/xorg-lib/libx11/x11_disable_makekeys.patch [deleted file]
meta/recipes-graphics/xorg-lib/libx11_1.5.0.bb

index cb9a5ef..0a90f46 100644 (file)
@@ -3,10 +3,9 @@ require libx11.inc
 DESCRIPTION += " Support for XCMS and XLOCALE is disabled in \
 this version."
 
-PR = "${INC_PR}.3"
+PR = "${INC_PR}.4"
 
-SRC_URI += "file://x11_disable_makekeys.patch \
-            file://X18NCMSstubs.diff \
+SRC_URI += "file://X18NCMSstubs.diff \
             file://keysymdef_include.patch \
             file://fix-disable-xlocale.diff \
             file://fix-utf8-wrong-define.patch \
index d56aa23..3ecd9e5 100644 (file)
@@ -11,7 +11,7 @@ inherit siteinfo
 FILESPATH = "${FILE_DIRNAME}/libx11"
 
 PE = "1"
-INC_PR = "r7"
+INC_PR = "r8"
 
 PROVIDES = "virtual/libx11"
 
@@ -22,12 +22,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7"
 DEPENDS += "xproto xextproto xtrans libxcb kbproto inputproto"
 DEPENDS += "xproto-native"
 
-PACKAGES =+ "${PN}-xcb"
-
-FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${libdir}/X11/Xcms.txt"
-FILES_${PN}-xcb += "${libdir}/libX11-xcb.so.*"
-FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"
-
 EXTRA_OECONF += "--with-keysymdefdir=${STAGING_INCDIR}/X11/"
 
 # Let people with incredibly archaic requirements enable Xcms and BigFont, but
@@ -36,29 +30,18 @@ PACKAGECONFIG ??= ""
 PACKAGECONFIG[xcms] = "--enable-xcms,--disable-xcms"
 PACKAGECONFIG[bigfont] = "--enable-xf86bigfont,--disable-xf86bigfont,xf86bigfontproto"
 
-do_compile_prepend() {
-       cd ${S}/src/util
-       mv makekeys.c.orig makekeys.c || true
-       touch makekeys-makekeys.o
-       (
-               unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS
-               # MIN_REHASH 10 is only in 1.0.1
-               sed -i -e 's:MIN_REHASH 10:MIN_REHASH 16:g' makekeys.c
-               sed -i -e 's:MIN_REHASH 15:MIN_REHASH 16:g' makekeys.c
-               touch makekeys-makekeys.o;
-               if [ "${SITEINFO_BITS}" == "64" ]; then
-                       ${BUILD_CC} ${BUILD_CFLAGS} -I${STAGING_INCDIR_NATIVE} makekeys.c -I${S}/include -o makekeys
-               else
-                       ${BUILD_CC} ${BUILD_CFLAGS} -I${STAGING_INCDIR_NATIVE} -DUSE32 makekeys.c -I${S}/include -o makekeys
-               fi
-       )
-       if [ "$?" != "0" ]; then
-               exit 1
-       fi
-       # mv to stop it getting rebuilt
-       mv makekeys.c makekeys.c.orig
-       cd ../../
-}
+# src/util/makekeys needs to be compiled natively, so tell it what compiler to
+# use.
+export CC_FOR_BUILD = "${BUILD_CC}"
+export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
+export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
+export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}"
+
+PACKAGES =+ "${PN}-xcb"
+
+FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${libdir}/X11/Xcms.txt"
+FILES_${PN}-xcb += "${libdir}/libX11-xcb.so.*"
+FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"
 
 # Multiple libx11 derivatives from from this file and are selected by virtual/libx11
 # A world build should only build the correct version, not all of them.
diff --git a/meta/recipes-graphics/xorg-lib/libx11/x11_disable_makekeys.patch b/meta/recipes-graphics/xorg-lib/libx11/x11_disable_makekeys.patch
deleted file mode 100644 (file)
index 69f9e6c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Pending
-
-Index: libX11-1.5.0/src/util/Makefile.am
-===================================================================
---- libX11-1.5.0.orig/src/util/Makefile.am
-+++ libX11-1.5.0/src/util/Makefile.am
-@@ -1,27 +1,2 @@
--
--noinst_PROGRAMS=makekeys
--
--makekeys_CFLAGS = \
--      $(X11_CFLAGS) \
--      $(CWARNFLAGS)
--
--makekeys_CPPFLAGS = \
--      -I$(top_srcdir)/include
--
--CC = @CC_FOR_BUILD@
--CPPFLAGS = @CPPFLAGS_FOR_BUILD@
--CFLAGS = @CFLAGS_FOR_BUILD@
--LDFLAGS = @LDFLAGS_FOR_BUILD@
--
- EXTRA_DIST = mkks.sh
--if LINT
--# Check source code with tools like lint & sparse
--
--ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
--              $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
--
--lint:
--      $(LINT) $(ALL_LINT_FLAGS) makekeys.c
--
--endif LINT
index 5a66eb5..793496c 100644 (file)
@@ -5,9 +5,7 @@ PR = "${INC_PR}.1"
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI += " file://keysymdef_include.patch \
-             file://x11_disable_makekeys.patch \
-             "
+SRC_URI += "file://keysymdef_include.patch"
 
 SRC_URI[md5sum] = "78b4b3bab4acbdf0abcfca30a8c70cc6"
 SRC_URI[sha256sum] = "c382efd7e92bfc3cef39a4b7f1ecf2744ba4414a705e3bc1e697f75502bd4d86"