Skip to contentSkip to conversation

perl_5.8.8.bb: Fix compilation when bindir is not /usr/bin

PATCH In review Khem Raj 2 participants 5 messages Sep 4, 2009 – Sep 5, 2009

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 perl_5.8.8.bb: Fix compilation when bindir is not /usr/bin

* Right now default perl installation happens in /usr prefix This patch tries to depend upong layout_prefix to decide on where to install. This is required for distros like micro who flatten the install tree and do not use /usr prefix

---
 recipes/perl/perl_5.8.8.bb |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
recipes/perl/perl_5.8.8.bb +4 -4
index 8d97199..8f6b72b 100644
@@ -5,7 +5,7 @@ LICENSE = "Artistic|GPL"
 PRIORITY = "optional"
 # We need gnugrep (for -I)
 DEPENDS = "virtual/db perl-native grep-native"
-PR = "r27"
+PR = "r28"
 
 # Major part of version
 PVM = "5.8"
@@ -81,6 +81,7 @@ do_configure() {
         sed -i -e 's,@DESTDIR@,${D},g' \
                -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
                -e "s%/usr/include/%${STAGING_INCDIR}/%g" \
+	       -e 's,/usr/,${layout_exec_prefix}/,g' \
             config.sh-${TARGET_ARCH}-${TARGET_OS}
 
         if test "${MACHINE}" != "native"; then
@@ -103,10 +104,9 @@ do_compile() {
         oe_runmake perl LD="${TARGET_SYS}-gcc"
 }
 do_install() {
-        oe_runmake install
-
+	oe_runmake install
         # Add perl pointing at current version
-        ln -sf perl${PV} ${D}/usr/bin/perl
+        ln -sf perl${PV} ${D}${bindir}/perl
 
         # Fix up versioned directories
         mv ${D}/${libdir}/perl/${PVM} ${D}/${libdir}/perl/${PV}
Signature · 1 line
1.6.3.3
#1 lore raw

recipes/perl/perl_5.8.8.bb do_configure() { · line 84

Quoted 1 line · Khem Raj
recipes/perl/perl_5.8.8.bb +1 -0
+	       -e 's,/usr/,${layout_exec_prefix}/,g' \

Why not ${prefix}?

p.

#3 lore raw
Quoted 8 lines · Khem Raj
Quoted 4 lines · Phil Blundell
Quoted 1 line · Khem Raj

+ -e 's,/usr/,${layout_exec_prefix}/,g' \

Why not ${prefix}?

Nothing against it. I just used whatever distro conf override said. prefix and layout_exec_prefix are same as bitbake tells me.

It's generally a bit unwholesome for recipes to be using the layout_xxx variables. Semantically, it sounds like ${prefix}, or maybe ${exec_prefix}, is probably what you want.

p.

author
#4 lore raw
Quoted 5 lines · Phil Blundell
Quoted 4 lines · Khem Raj
Quoted 3 lines · Phil Blundell
Quoted 1 line · Khem Raj

+            -e 's,/usr/,${layout_exec_prefix}/,g' \

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Why not ${prefix}?

Nothing against it. I just used whatever distro conf override said. prefix and layout_exec_prefix are same as bitbake tells me.

It's generally a bit unwholesome for recipes to be using the layout_xxx variables.  Semantically, it sounds like ${prefix}, or maybe ${exec_prefix}, is probably what you want.

OK I will use exec_prefix

Quoted 10 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel