Patchwork [1/3] glib-2.0: fix builds on fedora 17

login
register
mail settings
Submitter Robert Yang
Date April 16, 2012, 1:38 p.m.
Message ID <6d586b1ec34616f2eb4d485c58cf67ad9524d9c7.1334583221.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/25941/
State Accepted
Commit 13e6e316d751d0ea3107d5547f6bdd2b74919cad
Headers show

Comments

Robert Yang - April 16, 2012, 1:38 p.m.
Generally distros keep perl at /sur/bin/perl
Fedora 17 also has /bin/perl

this causes glib-2.0 build on such distros to put perl interpreter path in
the perl scripts as /bin/perl

But we set perl location for target as /usr/bin/perl

This mismatch of perl path causes failure of rootfs image creation
like this:

| error: Failed dependencies:
|       /bin/perl is needed by libglib-2.0-utils-2.30.3-r0.ppc603e
NOTE: package meta-toolchain-gmae-1.0-r7: task do_populate_sdk: Failed

[YOCTO #2304]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
Koen Kooi - April 16, 2012, 1:53 p.m.
Op 16 apr. 2012, om 15:38 heeft Robert Yang het volgende geschreven:

> Generally distros keep perl at /sur/bin/perl

/usr
Robert Yang - April 16, 2012, 2:08 p.m.
On 04/16/2012 09:53 PM, Koen Kooi wrote:
>
> Op 16 apr. 2012, om 15:38 heeft Robert Yang het volgende geschreven:
>
>> Generally distros keep perl at /sur/bin/perl
>
> /usr

Good catch, thanks, I've pushed all the 3 new commits to:(based on oe-core)

   git://git.pokylinux.org/poky-contrib robert/fc17_sdk
   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/fc17_sdk

// Robert

>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb
index 3b9da89..f1f9217 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb
@@ -1,6 +1,6 @@ 
 require glib.inc
 
-PR = "r0"
+PR = "r1"
 PE = "1"
 
 DEPENDS += "libffi python-argparse-native zlib"
@@ -25,6 +25,10 @@  SRC_URI_append_libc-uclibc = " ${@['', 'file://no-iconv.patch']['${PN}' == '${BP
 SRC_URI_append_virtclass-native = " file://glib-gettextize-dir.patch"
 BBCLASSEXTEND = "native nativesdk"
 
+PERLPATH = "${bindir}/env perl"
+PERLPATH_virtclass-native = "/usr/bin/env perl"
+PERLPATH_virtclass-nativesdk = "/usr/bin/env perl"
+
 do_configure_prepend() {
   # missing ${topdir}/gtk-doc.make and --disable-gtk-doc* is not enough, because it calls gtkdocize (not provided by gtk-doc-native)
   sed -i '/^docs/d' ${S}/configure.ac
@@ -39,6 +43,12 @@  do_install_append() {
   # and empty dirs
   rmdir ${D}${libdir}/gio/modules/
   rmdir ${D}${libdir}/gio/
+
+  # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
+  # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
+  if [ -f ${D}${bindir}/glib-mkenums ]; then
+    sed -i -e '1s,#!.*perl,#! ${PERLPATH},' ${D}${bindir}/glib-mkenums
+  fi
 }
 
 PACKAGES += "${PN}-codegen"