]> code.ossystems Code Review - openembedded-core.git/commitdiff
libmatchbox: Fix the matchbox environment start failure on x86-64 target.
authorZhai Edwin <edwin.zhai@intel.com>
Thu, 2 Sep 2010 00:22:10 +0000 (08:22 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 2 Sep 2010 08:53:49 +0000 (09:53 +0100)
x86 target works well. Root cause is libmatchbox use "0"(int) as termination
indicator when calling XftFontOpen, which in turn called FcPatternVapBuild(in
fontconfig). It try to get the "0" as char* and fetch wrong value, as int and
char* has different size on x86-64. This patch forces a NULL pointer as
terminator to fix it.

[BUGID #234] is fixed by this

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
meta/recipes-graphics/libmatchbox/files/matchbox-start-fix.patch [new file with mode: 0644]
meta/recipes-graphics/libmatchbox/libmatchbox_1.9.bb
meta/recipes-graphics/libmatchbox/libmatchbox_svn.bb

diff --git a/meta/recipes-graphics/libmatchbox/files/matchbox-start-fix.patch b/meta/recipes-graphics/libmatchbox/files/matchbox-start-fix.patch
new file mode 100644 (file)
index 0000000..04460a3
--- /dev/null
@@ -0,0 +1,21 @@
+matchbox environment start fail on x86-64 target, while ok on x86 target. Root
+cause is libmatchbox use "0"(int) as termination indicator when calling
+XftFontOpen, which in turn called FcPatternVapBuild(in fontconfig). It try to
+get the "0" as char* and fetch wrong value, as int and char* has different size
+on x86-64. This patch forces a NULL pointer as terminator to fix it.
+
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Index: libmatchbox-1.9/libmb/mbexp.c
+===================================================================
+--- libmatchbox-1.9.orig/libmb/mbexp.c 2010-08-28 06:33:25.000000000 +0800
++++ libmatchbox-1.9/libmb/mbexp.c      2010-08-28 06:30:05.000000000 +0800
+@@ -348,7 +348,7 @@
+                           XFT_SIZE, XftTypeDouble   , (double)font->pt_size,
+                           XFT_WEIGHT, XftTypeInteger, weight,
+                           XFT_SLANT, XftTypeInteger , slant,
+-                          0);
++                          NULL);
+   if (font->font != NULL ) result = 2;
index 1d7d9c8f44c6804c54b011fd9f2d64e79eba690d..fb554b85f38bde4428fea386780a21892f53898d 100644 (file)
@@ -1,11 +1,12 @@
 require libmatchbox.inc
 
-PR = "r7"
+PR = "r8"
 
 SRC_URI = "http://projects.o-hand.com/matchbox/sources/${PN}/${PV}/${PN}-${PV}.tar.gz \
            file://16bppfixes.patch;patch=1 \
            file://configure_fixes.patch;patch=1 \
-           file://check.m4"
+           file://check.m4 \
+           file://matchbox-start-fix.patch;patch=1"
 
 do_configure_prepend () {
        cp ${WORKDIR}/check.m4 ${S}/
index 3cdcd324f4cceeac3ed0b0937b2d6006d7661b03..98c901f678b12281a2b425152c215d1d3b8161d1 100644 (file)
@@ -1,13 +1,14 @@
 require libmatchbox.inc
 
 PV = "1.7+svnr${SRCREV}"
-PR = "r4"
+PR = "r5"
 DEFAULT_PREFERENCE = "-1"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN};proto=http \
            file://configure_fixes.patch;patch=1 \
           file://check.m4 \
-          file://16bppfixes.patch;patch=1"
+          file://16bppfixes.patch;patch=1 \
+          file://matchbox-start-fix.patch;patch=1"
 
 S = "${WORKDIR}/libmatchbox"