Patchwork [1/1] pango: Fix modules load failure in multilib environment

login
register
mail settings
Submitter Zhai, Edwin
Date May 8, 2012, 2:43 p.m.
Message ID <53bfc4a4c70630c2d546e49fcb93eb2ad7315d27.1336487657.git.edwin.zhai@intel.com>
Download mbox | patch
Permalink /patch/27287/
State New
Headers show

Comments

Zhai, Edwin - May 8, 2012, 2:43 p.m.
From: Zhai Edwin <edwin.zhai@intel.com>

Multi-libs of Pango need different modules, thus different config files and
utils. This patch separate config file and utils with different MLPREFIX to
avoid conflict.

[YOCTO #2356] got fixed.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
---
 .../pango/pango-1.28.4/multilib-fix-clean.patch    |   40 ++++++++++++++++++++
 meta/recipes-graphics/pango/pango.inc              |   13 +++++-
 meta/recipes-graphics/pango/pango_1.28.4.bb        |    7 ++-
 3 files changed, 55 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-graphics/pango/pango-1.28.4/multilib-fix-clean.patch
Richard Purdie - May 8, 2012, 3:18 p.m.
On Tue, 2012-05-08 at 22:43 +0800, edwin.zhai@intel.com wrote:
> From: Zhai Edwin <edwin.zhai@intel.com>
> 
> Multi-libs of Pango need different modules, thus different config files and
> utils. This patch separate config file and utils with different MLPREFIX to
> avoid conflict.
> 
> [YOCTO #2356] got fixed.
> 
> Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
> ---
>  .../pango/pango-1.28.4/multilib-fix-clean.patch    |   40 ++++++++++++++++++++
>  meta/recipes-graphics/pango/pango.inc              |   13 +++++-
>  meta/recipes-graphics/pango/pango_1.28.4.bb        |    7 ++-
>  3 files changed, 55 insertions(+), 5 deletions(-)
>  create mode 100644 meta/recipes-graphics/pango/pango-1.28.4/multilib-fix-clean.patch

Merged to master, thanks.

Richard

Patch

diff --git a/meta/recipes-graphics/pango/pango-1.28.4/multilib-fix-clean.patch b/meta/recipes-graphics/pango/pango-1.28.4/multilib-fix-clean.patch
new file mode 100644
index 0000000..addda5f
--- /dev/null
+++ b/meta/recipes-graphics/pango/pango-1.28.4/multilib-fix-clean.patch
@@ -0,0 +1,40 @@ 
+Index: pango-1.28.4/configure.in
+===================================================================
+--- pango-1.28.4.orig/configure.in	2011-04-05 04:29:16.000000000 +0800
++++ pango-1.28.4/configure.in	2012-05-08 21:32:17.000000000 +0800
+@@ -205,6 +205,11 @@
+ 
+ AC_SUBST(PANGO_DEBUG_FLAGS)
+ 
++AC_ARG_WITH(mlprefix,
++            AC_HELP_STRING([--with-mlprefix=<ARG>], [multilib prefix]),
++            mlprefix_str=$withval, mlprefix_str="")
++AC_DEFINE_UNQUOTED([MLPREFIX], ["$mlprefix_str"], [multilib prefix.])
++
+ AC_ARG_ENABLE(rebuilds,
+               [AC_HELP_STRING([--disable-rebuilds],
+                               [disable all source autogeneration rules])],,
+Index: pango-1.28.4/pango/modules.c
+===================================================================
+--- pango-1.28.4.orig/pango/modules.c	2010-09-22 03:37:01.000000000 +0800
++++ pango-1.28.4/pango/modules.c	2012-05-08 21:21:02.000000000 +0800
+@@ -529,7 +529,8 @@
+ 
+   if (!file_str)
+     file_str = g_build_filename (pango_get_sysconf_subdirectory (),
+-				 "pango.modules",
++/* For multilib case, keep multiple config file for different libs */
++				 MLPREFIX "pango.modules",
+ 				 NULL);
+ 
+   files = pango_split_file_list (file_str);
+@@ -640,7 +641,8 @@
+       if (!no_module_warning)
+ 	{
+ 	  gchar *filename = g_build_filename (pango_get_sysconf_subdirectory (),
+-					      "pango.modules",
++/* For multilib case, keep multiple config file for different libs */
++					      MLPREFIX "pango.modules",
+ 					      NULL);
+ 	  g_critical ("No modules found:\n"
+ 		      "No builtin or dynamically loaded modules were found.\n"
diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index a2d5dc3..d59a4d1 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -32,9 +32,11 @@  EXTRA_AUTORECONF = ""
 # seems to go wrong with default cflags
 FULL_OPTIMIZATION_arm = "-O2"
 
+# keep multiple util/config with MLPREFIX in multilib environment
 EXTRA_OECONF = "--disable-glibtest \
 		--enable-explicit-deps=no \
-	        --disable-debug"
+	        --disable-debug \
+	        --with-mlprefix=${MLPREFIX}"
 
 LEAD_SONAME = "libpango-1.0*"
 LIBV = "1.6.0"
@@ -49,12 +51,19 @@  if ! [ -e $D${sysconfdir}/pango ] ; then
 fi
 }
 
+do_install_append () {
+	if [ "${MLPREFIX}" != "" ]; then
+		mv ${D}/${bindir}/pango-querymodules ${D}/${bindir}/${MLPREFIX}pango-querymodules 
+	fi
+}
+
+
 python populate_packages_prepend () {
 	prologue = d.getVar("postinst_prologue", True)
 
 	modules_root = d.expand('${libdir}/pango/${LIBV}/modules')
 
-	do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + 'pango-querymodules > /etc/pango/pango.modules')
+	do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules')
 }
 
 FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"
diff --git a/meta/recipes-graphics/pango/pango_1.28.4.bb b/meta/recipes-graphics/pango/pango_1.28.4.bb
index 8d71de0..7055158 100644
--- a/meta/recipes-graphics/pango/pango_1.28.4.bb
+++ b/meta/recipes-graphics/pango/pango_1.28.4.bb
@@ -2,10 +2,11 @@  require pango.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
 
-PR = "r7"
+PR = "r8"
 
-SRC_URI += "file://no-tests.patch"
-SRC_URI += "file://noconst.patch"
+SRC_URI += "file://no-tests.patch \
+            file://noconst.patch \
+            file://multilib-fix-clean.patch"
 
 SRC_URI[archive.md5sum] = "3f3989700f04e9117d30544a9078b3a0"
 SRC_URI[archive.sha256sum] = "7eb035bcc10dd01569a214d5e2bc3437de95d9ac1cfa9f50035a687c45f05a9f"