From ed8a6dd0ff4503b51e1eb2bf94cec518f2ba0fe2 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Tue, 24 Apr 2007 20:15:45 +0000 Subject: base.bbclass: fix depency problem, closes #2137 (and some others) --- classes/base.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 1dd3a488b3..36ccbd6438 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -804,6 +804,8 @@ def base_after_parse(d): if this_machine and not re.match(need_machine, this_machine): raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine) + + pn = bb.data.getVar('PN', d, 1) use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1) @@ -874,7 +876,7 @@ def base_oldbitbake_workarounds(d): if bb.data.inherits_class('package_deb', d): depends = "dpkg-native " + depends if bb.data.inherits_class('package', d): - depends = "${PACKAGE_DEPENDS} fakeroot-native" + depends + depends = "${PACKAGE_DEPENDS} fakeroot-native " + depends bb.data.setVar('DEPENDS', depends, d) -- cgit v1.2.3 From d913f5b4b1e54abf761348e9a444c63818d04de7 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Wed, 25 Apr 2007 01:16:14 +0000 Subject: cpan.bbclass: Update to enable the building cpan modules for perl 5.8.8. This uses the installed perl configuration to determine if we are building for the old or the new perl layout. Currently this just changes the installation paths and always uses gcc to link, but more changes will be added later to make the perl module building process a lot more reliable. --- classes/cpan.bbclass | 74 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 19 deletions(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index a566f0fa42..9915bf6f67 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -1,38 +1,74 @@ # # This is for perl modules that use the old Makefile.PL build system # -FILES_${PN} += '${libdir}/perl5' -EXTRA_CPANFLAGS = "" +FILES_${PN} += '${libdir}/perl5 ${datadir}/perl5' +EXTRA_CPANFLAGS ?= "" DEPENDS += "perl-native" RDEPENDS += "perl" +# Determine the staged version of perl from the perl configuration file +def get_perl_version(d): + import os, bb, re + cfg = bb.data.expand('${STAGING_DIR}/${HOST_SYS}/perl/config.sh', d) + try: + f = open(cfg, 'r') + except IOError: + return None + l = f.readlines(); + f.close(); + r = re.compile("version='(\d\.\d\.\d)'") + for s in l: + m = r.match(s) + if m: + return m.group(1) + return None + +# Only 5.8.7 and 5.8.4 existed at the time we moved to the new layout +def is_new_perl(d): + ver = get_perl_version(d) + if ver == "5.8.4" or ver == "5.8.7": + return "no" + return "yes" + +IS_NEW_PERL = "${@is_new_perl(d)}" + cpan_do_configure () { perl Makefile.PL ${EXTRA_CPANFLAGS} if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh - sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ - -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ - -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ - -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ - -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \ - Makefile + if [ "${IS_NEW_PERL}" = "yes" ]; then + sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ + -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ + -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${datadir}/perl5:" \ + -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" \ + -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \ + Makefile + else + sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ + -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ + -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ + -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ + -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \ + Makefile + fi fi } cpan_do_compile () { - # You must use gcc to link on sh - OPTIONS="" - if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then - OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" + if [ "${IS_NEW_PERL}" = "yes" ]; then + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD=${TARGET_SYS}-gcc + else + # You must use gcc to link on sh + OPTIONS="" + if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then + OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" + fi + if test ${TARGET_ARCH} = "powerpc" ; then + OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" + fi + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS fi - - if test ${TARGET_ARCH} = "powerpc" ; then - OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" - fi - - - oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS } cpan_do_install () { -- cgit v1.2.3 From e085d81e48df8bdeec11ff552245a40dfa008889 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Apr 2007 10:57:45 +0000 Subject: base.bbclass: add back a snipped of obsolete code to fix SRCDATES problems, seems to fix #2133 --- classes/base.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 36ccbd6438..9752a1116c 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -807,6 +807,10 @@ def base_after_parse(d): pn = bb.data.getVar('PN', d, 1) + # OBSOLETE in bitbake 1.7.4 + srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) + if srcdate != None: + bb.data.setVar('SRCDATE', srcdate, d) use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1) if use_nls != None: -- cgit v1.2.3 From 04bcbc425723c1ba332e2aa8efa31533f278a32b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Apr 2007 16:12:58 +0000 Subject: gconf.bbclass: depend on gconf-native --- classes/gconf.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/gconf.bbclass b/classes/gconf.bbclass index 686f8e6596..99f33e433a 100644 --- a/classes/gconf.bbclass +++ b/classes/gconf.bbclass @@ -1,4 +1,4 @@ -DEPENDS += "gconf" +DEPENDS += "gconf gconf-native" gconf_postinst() { if [ "$1" = configure ]; then -- cgit v1.2.3 From 908abeae497d81c0afd6381c08311aa45555157b Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 16:42:07 +0000 Subject: insane.bbclass: Fix check for bad RPATHs. This is gonna break builds. Needs fixes in the shared library handling. --- classes/insane.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 8ef4858aa4..15e2061239 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -210,11 +210,11 @@ def package_qa_check_rpath(file,name,d): output = os.popen("%s -Byr %s" % (scanelf,file)) txt = output.readline().split() - if bad_dir in txt: - package_qa_write_error( 1, name, file, d) - bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, txt, file)) - return False - + for line in txt: + if bad_dir in line: + package_qa_write_error( 1, name, file, d) + bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) + return False return True def package_qa_check_devdbg(path, name,d): -- cgit v1.2.3 From 7b5dda2b674bff1ec9bf0f58bbbf402b8a66d481 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 16:54:09 +0000 Subject: insane.bbclass: Broaden check for RPATHs by removing work/ path component. --- classes/insane.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 15e2061239..9f1ec3b000 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -203,6 +203,7 @@ def package_qa_check_rpath(file,name,d): import bb, os scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf') bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work" + bad_dir_test = bb.data.getVar('TMPDIR', d, True) if not os.path.exists(scanelf): bb.fatal("Can not check RPATH scanelf not found") if not bad_dir in bb.data.getVar('WORKDIR', d, True): @@ -211,7 +212,7 @@ def package_qa_check_rpath(file,name,d): output = os.popen("%s -Byr %s" % (scanelf,file)) txt = output.readline().split() for line in txt: - if bad_dir in line: + if bad_dir_test in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) return False @@ -405,7 +406,7 @@ python do_package_qa () { rdepends_sane = False if not walk_sane or not rdepends_sane: - bb.fatal("QA ran found fatal errors. Please consider fixing them") + bb.fatal("QA run found fatal errors. Please consider fixing them.") bb.note("DONE with PACKAGE QA") } -- cgit v1.2.3 From e67b351f7ebef166cc11e1c231d0b577a49888b9 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Apr 2007 19:00:47 +0000 Subject: insane.bbclass: depend on chrpath-native --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 9f1ec3b000..c424a573d3 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -21,7 +21,7 @@ # We play a special package function inherit package -PACKAGE_DEPENDS += "pax-utils-native" +PACKAGE_DEPENDS += "pax-utils-native chrpath-native" PACKAGEFUNCS += " do_package_qa " -- cgit v1.2.3 From 84470181159bb115156f64726d4342148d091998 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 22:19:39 +0000 Subject: insane.bbclass: RPATH check was always true due to scanelf output including the file path. --- classes/insane.bbclass | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index c424a573d3..d07b181dbd 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -21,7 +21,8 @@ # We play a special package function inherit package -PACKAGE_DEPENDS += "pax-utils-native chrpath-native" +PACKAGE_DEPENDS += "pax-utils-native" +#PACKAGE_DEPENDS += chrpath-native" PACKAGEFUNCS += " do_package_qa " @@ -202,19 +203,25 @@ def package_qa_check_rpath(file,name,d): """ import bb, os scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf') + #chrpath = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'chrpath') bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work" bad_dir_test = bb.data.getVar('TMPDIR', d, True) if not os.path.exists(scanelf): - bb.fatal("Can not check RPATH scanelf not found") + bb.fatal("Can not check RPATH, scanelf (part of pax-utils-native) not found") + #if not os.path.exists(chrpath): + # bb.fatal("Can not fix RPATH, chrpath (part of chrpath-native) not found") if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - output = os.popen("%s -Byr %s" % (scanelf,file)) + bb.note("%s -F%%r#F %s" % (scanelf,file)) + output = os.popen("%s -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() for line in txt: if bad_dir_test in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) + #bb.note("Fixing RPATH for you in %s" % file) + #os.popen("%s -r /lib %s" % (chrpath,file)) return False return True -- cgit v1.2.3 From 5da8ac500c38c2a0f7c2d7f104061be482c7b7d2 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 23:24:09 +0000 Subject: insane.bbclass: Commented out scanelf format debugging. --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index d07b181dbd..7454957e5b 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -213,7 +213,7 @@ def package_qa_check_rpath(file,name,d): if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - bb.note("%s -F%%r#F %s" % (scanelf,file)) + #bb.note("%s -F%%r#F %s" % (scanelf,file)) output = os.popen("%s -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() for line in txt: -- cgit v1.2.3 From 7e8aca6f9c3cedf040cd58e4f565361bfcded9f9 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Fri, 27 Apr 2007 00:12:23 +0000 Subject: insane.bbclass: Re-add -B to scanelf to make it correctly check single RPATH occurences. --- classes/insane.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 7454957e5b..30b164b734 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -213,10 +213,12 @@ def package_qa_check_rpath(file,name,d): if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - #bb.note("%s -F%%r#F %s" % (scanelf,file)) - output = os.popen("%s -F%%r#F %s" % (scanelf,file)) + #bb.note("%s -B -F%%r#F %s" % (scanelf,file)) + output = os.popen("%s -B -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() + #bb.note("???%s???" % bad_dir_test) for line in txt: + #bb.note("===%s===" % line) if bad_dir_test in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) -- cgit v1.2.3 From bf3453c3ea3858a857d44c5cbc4f4a48069652da Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 27 Apr 2007 02:06:22 +0000 Subject: perl 5.8.8/cpan: Fix the installation paths for cpan modules. The installed files for perl modules built using cpan will end up in different places depending on which version of perl they are being built with. Modules that explicitly set various FILES_ values were using the paths that are only valid for the older versions of perl. Calculate and set the correct path in cpan.bbclass and use that in the FILES_ variables so that it'll be correct for all versions of perl. --- classes/cpan.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 9915bf6f67..52430560ea 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -31,7 +31,18 @@ def is_new_perl(d): return "no" return "yes" +# Determine where the library directories are +def perl_get_libdirs(d): + import bb + libdir = bb.data.getVar('libdir', d, 1) + if is_new_perl(d) == "yes": + libdirs = libdir + '/perl5' + else: + libdirs = libdir + '/*/*/perl5' + return libdirs + IS_NEW_PERL = "${@is_new_perl(d)}" +PERLLIBDIRS = "${@perl_get_libdirs(d)}" cpan_do_configure () { perl Makefile.PL ${EXTRA_CPANFLAGS} -- cgit v1.2.3 From 3cc9d5463dac0412d5591b506e308f3e9cde0494 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 27 Apr 2007 02:22:26 +0000 Subject: cpan: Use CCLD for the linking instead of ${TARGET_SYS}-gcc. Without this native packages break because -gcc doesn't exist, just gcc. CCLD gets us the correct CC to be used for linking in both cases, so we use that. --- classes/cpan.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 52430560ea..00709f7e18 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -68,7 +68,7 @@ cpan_do_configure () { cpan_do_compile () { if [ "${IS_NEW_PERL}" = "yes" ]; then - oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD=${TARGET_SYS}-gcc + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}" else # You must use gcc to link on sh OPTIONS="" -- cgit v1.2.3 From c935e9da83222ba31a5323f0a05c334ad6911d68 Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Sun, 29 Apr 2007 09:41:48 +0000 Subject: site/powerpc-common: Add a common site fike for powerpc arch Still needs work, especially uclibc part --- classes/siteinfo.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index 80e6e32af7..6868750d2d 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -40,9 +40,9 @@ def get_siteinfo_list(d): "mipsel-linux": "endian-little bit-32 common-glibc",\ "mipsel-linux-uclibc": "endian-little bit-32 common-uclibc",\ "powerpc-darwin": "endian-big bit-32 common-darwin",\ - "ppc-linux": "endian-big bit-32 common-glibc",\ - "powerpc-linux": "endian-big bit-32 common-glibc",\ - "powerpc-linux-uclibc": "endian-big bit-32 common-uclibc",\ + "ppc-linux": "endian-big bit-32 common-glibc powerpc-common",\ + "powerpc-linux": "endian-big bit-32 common-glibc powerpc-common",\ + "powerpc-linux-uclibc": "endian-big bit-32 common-uclibc powerpc-common",\ "sh3-linux": "endian-little bit-32 common-glibc sh-common",\ "sh4-linux": "endian-little bit-32 common-glibc sh-common",\ "sh4-linux-uclibc": "endian-little bit-32 common-uclibc sh-common",\ -- cgit v1.2.3 From bca1af865658a00eb25d22c0fb22b8fecc745813 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Mon, 30 Apr 2007 04:06:31 +0000 Subject: perl 5.8.8: Improvements for cpan modules: * Modify perl to install a copy of it's configuration during staging. This will allow us to get at the perl settings for the target when building cpan modules. * Modify perl-native to allow selection of the host or target configuration based on an environment variable. This will allow the cpan class to select the appropriate configuration based on if we are building the native package or not. * Modify cpan.bbclass to set the environment variable to an appropriate value to tell perl native to select the appropriate settings based on if we are building native or target modules. This change fixes some modules that were compiled for the host instead of the target (libversion-perl for example) and fixes up some of cpan modules that include additional subdirectories with their own makefiles. --- classes/cpan.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 00709f7e18..687dbcd1cb 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -41,9 +41,18 @@ def perl_get_libdirs(d): libdirs = libdir + '/*/*/perl5' return libdirs +def is_target(d): + import bb + if not bb.data.inherits_class('native', d): + return "yes" + return "no" + IS_NEW_PERL = "${@is_new_perl(d)}" PERLLIBDIRS = "${@perl_get_libdirs(d)}" +# Env var which tells perl if it should use host (no) or target (yes) settings +export PERLCONFIGTARGET = "${@is_target(d)}" + cpan_do_configure () { perl Makefile.PL ${EXTRA_CPANFLAGS} if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then -- cgit v1.2.3