Patchwork [7/7] pango: Fix bug 1674

login
register
mail settings
Submitter Xiaofeng Yan
Date Nov. 8, 2011, 11:16 a.m.
Message ID <7fe88fd604911f096a522deafaaeda3a93f5f966.1320750179.git.xiaofeng.yan@windriver.com>
Download mbox | patch
Permalink /patch/14499/
State New
Headers show

Comments

Xiaofeng Yan - Nov. 8, 2011, 11:16 a.m.
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

[YOCTO #1674]
Support to compile pango based on directfb besides x11.
Add pango-modules because it is needed by gtk+-directfb.
If no pango-modules,  then missing codes will appear on screen when running gtk-demo.

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-graphics/pango/pango.inc |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
Phil Blundell - Nov. 8, 2011, 11:56 a.m.
On Tue, 2011-11-08 at 19:16 +0800, Xiaofeng Yan wrote:
> -		${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
> +		${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)} \
> +                ${@base_contains('DISTRO_FEATURES', 'directfb', '--with-x=no', '--with-x=yes', d)}"

That last line looks fairly wrong.  If I am understanding this right
then someone with neither x11 nor directfb set would get "--without-x
--with-x=yes", and someone with directfb but not X would get
"--without-x --with-x=no" which surely can't be what's wanted.  Did you
test this patchset?

>+    [ ! -d "/etc/pango" ] && mkdir -p /etc/pango/

Why can't you just ship this folder in the package rather than creating
it in the postinst?  Also, this should probably be ${sysconfdir} rather
than hardcoded.

p.

Patch

diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index a8e99e2..9237626 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -18,6 +18,11 @@  RRECOMMENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'x11', 'pango-module-ba
 
 inherit gnome
 
+# Create a pango-modules package
+ALLOW_EMPTY_${BPN}-modules = "1"
+PACKAGES += "${BPN}-modules"
+RRECOMMENDS_${BPN}-modules =  "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("pango-module") != -1])}"
+
 EXTRA_AUTORECONF = ""
 
 # seems to go wrong with default cflags
@@ -26,16 +31,17 @@  FULL_OPTIMIZATION_arm = "-O2"
 EXTRA_OECONF = "--disable-glibtest \
 		--enable-explicit-deps=no \
 	        --disable-debug \
-		${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+		${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)} \
+                ${@base_contains('DISTRO_FEATURES', 'directfb', '--with-x=no', '--with-x=yes', d)}"
 
 LEAD_SONAME = "libpango-1.0*"
 LIBV = "1.6.0"
 
 postinst_prologue() {
-if [ "x$D" != "x" ]; then
-  exit 1
-fi
-
+    if [ "x$D" != "x" ]; then
+	exit 1
+    fi
+    [ ! -d "/etc/pango" ] && mkdir -p /etc/pango/
 }
 
 python populate_packages_prepend () {