[oe-commits] Tom Rini : perl-native: Switch to userelocatableinc and not shared libperl

git version control git at git.openembedded.org
Tue Feb 1 17:53:07 UTC 2011


Module: openembedded.git
Branch: master
Commit: 49362da57224282f2dff462afa2e7ba9519ad7b5
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=49362da57224282f2dff462afa2e7ba9519ad7b5

Author: Tom Rini <tom_rini at mentor.com>
Date:   Thu Jan 27 10:24:52 2011 -0700

perl-native: Switch to userelocatableinc and not shared libperl

While in here, we didn't use db nor gdbm so remove those as deps.
This recipe is safe with no other deps so add INHIBIT_DEFAULT_DEPS
and switch to patch as PATCHTOOL.  Being relocatable means we don't need
the config.sh mangling we had been doing and we want to be more clear
about our mangling of scripts to use /usr/bin/env perl

Acked-by: Koen Kooi <koen at openembedded.org>
Acked-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Tom Rini <tom_rini at mentor.com>

---

 recipes/perl/perl-native_5.10.1.bb |   32 +++++++++++++++-----------------
 1 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/recipes/perl/perl-native_5.10.1.bb b/recipes/perl/perl-native_5.10.1.bb
index c1743b7..35cd3c0 100644
--- a/recipes/perl/perl-native_5.10.1.bb
+++ b/recipes/perl/perl-native_5.10.1.bb
@@ -2,9 +2,10 @@ DESCRIPTION = "Perl is a popular scripting language."
 HOMEPAGE = "http://www.perl.org/"
 SECTION = "libs"
 LICENSE = "Artistic|GPLv1+"
-DEPENDS = "virtual/db-native gdbm-native"
-PR = "r8"
+PR = "r9"
 NATIVE_INSTALL_WORKS = "1"
+INHIBIT_DEFAULT_DEPS = "1"
+PATCHTOOL = "patch"
 
 # 5.10.1 has this module built-in
 PROVIDES += "libmodule-build-perl-native"
@@ -34,19 +35,21 @@ do_configure () {
         -Dcflags="${CFLAGS}" \
         -Dldflags="${LDFLAGS}" \
         -Dcf_by="Open Embedded" \
+        \
         -Dprefix=${prefix} \
         -Dvendorprefix=${prefix} \
         -Dvendorprefix=${prefix} \
         -Dsiteprefix=${prefix} \
+         \
+        -Dprivlib=.../../lib/perl/${PV} \
+        -Darchlib=.../../lib/perl/${PV} \
+        -Dvendorlib=.../../lib/perl/${PV} \
+        -Dvendorarch=.../../lib/perl/${PV} \
+        -Dsitelib=.../../lib/perl/${PV} \
+        -Dsitearch=.../../lib/perl/${PV} \
+        -Duserelocatableinc="y" \
         \
-        -Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
-        -Darchlib=${STAGING_LIBDIR}/perl/${PV} \
-        -Dvendorlib=${STAGING_LIBDIR}/perl/${PV} \
-        -Dvendorarch=${STAGING_LIBDIR}/perl/${PV} \
-        -Dsitelib=${STAGING_LIBDIR}/perl/${PV} \
-        -Dsitearch=${STAGING_LIBDIR}/perl/${PV} \
-        \
-        -Duseshrplib \
+        -Uuseshrplib \
         -Dusethreads \
         -Duseithreads \
         -Duselargefiles \
@@ -63,11 +66,6 @@ do_configure () {
         -Ud_csh \
         -Uusesfio \
         -Uusenm -des
-    sed "s!${STAGING_DIR}/bin!${STAGING_BINDIR}!;
-         s!${STAGING_DIR}/lib!${STAGING_LIBDIR}!;
-	 s!^installbin=.*!installbin=\'${STAGING_BINDIR}\'!;
-	 s!^installsitebin=.*!installsitebin=\'${STAGING_BINDIR}\'!" < config.sh > config.sh.new
-    mv config.sh.new config.sh
 }
 
 do_install() {
@@ -103,8 +101,8 @@ do_install() {
 	sed -i -r "s,^\tdie\ (\"Errno\ architecture.+)$,\twarn\ \1," ${D}${libdir}/perl/${PV}/Errno.pm
 
 	# Make sure we use /usr/bin/env perl
-	for PERLSCRIPT in `grep -rIl ${bindir}/perl ${D}${bindir}`; do
-		sed -i -e 's|^#!${bindir}/perl|#!/usr/bin/env perl|' $PERLSCRIPT
+	for PERLSCRIPT in `grep -rIEl '#!.*/perl' ${D}${bindir}`; do
+		sed -i -e '1s|^#!.*|#!/usr/bin/env perl|' $PERLSCRIPT
 	done
 }
 





More information about the Openembedded-commits mailing list