[oe] [PATCH][v2] perl: honour DISTRO_FEATURE largefile
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Wed Aug 4 16:54:48 UTC 2010
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
recipes/perl/perl-native_5.8.8.bb | 3 +--
recipes/perl/perl_5.8.8.bb | 18 ++++++++++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/recipes/perl/perl-native_5.8.8.bb b/recipes/perl/perl-native_5.8.8.bb
index fe1bc84..74103de 100644
--- a/recipes/perl/perl-native_5.8.8.bb
+++ b/recipes/perl/perl-native_5.8.8.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.perl.org/"
SECTION = "libs"
LICENSE = "Artistic|GPL"
DEPENDS = "virtual/db-native gdbm-native"
-PR = "r20"
+PR = "r21"
NATIVE_INSTALL_WORKS = "1"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/perl-${PV}"
@@ -44,7 +44,6 @@ do_configure () {
-Duseshrplib \
-Dusethreads \
-Duseithreads \
- -Duselargefiles \
-Dnoextensions=ODBM_File \
-Ud_dosuid \
-Ui_db \
diff --git a/recipes/perl/perl_5.8.8.bb b/recipes/perl/perl_5.8.8.bb
index c8ad895..3321b9b 100644
--- a/recipes/perl/perl_5.8.8.bb
+++ b/recipes/perl/perl_5.8.8.bb
@@ -5,7 +5,7 @@ LICENSE = "Artistic|GPL"
PRIORITY = "optional"
# We need gnugrep (for -I)
DEPENDS = "virtual/db perl-native grep-native"
-PR = "r35"
+PR = "r36"
# Major part of version
PVM = "5.8"
@@ -60,12 +60,22 @@ do_configure() {
cd Cross
# Generate configuration
- rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
for i in ${WORKDIR}/config.sh \
${WORKDIR}/config.sh-${SITEINFO_BITS} \
${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do
- cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
- done
+ cat $i
+ done > config.sh-${TARGET_ARCH}-${TARGET_OS}
+ uselargefiles="${@base_contains('DISTRO_FEATURES', 'largefile', 'define', 'undef', d)}"
+ flaglfs="${@base_contains('DISTRO_FEATURES', 'largefile', '-D', '-U', d)}"
+ sed -i -e "s,^\(optimize=\).*,\1'',g" \
+ -e "s,^\(uselargefiles=\).*,\1'$uselargefiles',g" \
+ -e "s,^\(d_readdir64_r=\).*,\1'$uselargefiles',g" \
+ -e "s,-[DU]\(uselargefiles\),$flaglfs\1,g" \
+ config.sh-${TARGET_ARCH}-${TARGET_OS}
+ if [ "$uselargefiles" = "undef" ]; then
+ sed -i -e 's/\([[:space:]]\|__USE\|-D\|-U\)\(_LARGEFILE_SOURCE\|_LARGEFILE64_SOURCE\|_\(FILE_OFFSET_BITS\|FILE_OFFSET64\|LARGEFILE\|LARGEFILE64\)=[[:digit:]]*\)//g' \
+ config.sh-${TARGET_ARCH}-${TARGET_OS}
+ fi
# Fixups for uclibc
if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
--
1.7.1
More information about the Openembedded-devel
mailing list