diff options
| author | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-11-27 22:38:46 +0100 |
|---|---|---|
| committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-11-27 22:38:46 +0100 |
| commit | 7b52c2df97ca766b03d0e0ecb346007d9d335105 (patch) | |
| tree | 94fb6a245633c872898a185546fe351dbed59be4 /classes | |
| parent | 7fcaef86af3dc262b4c315da1b5bb5a8e012b402 (diff) | |
| parent | 0e0de60f4443c143fa92068932722f5d75b0999b (diff) | |
Merge branch 'org.openembedded.dev' of git.openembedded.org:openembedded into org.openembedded.dev
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/chicken.bbclass | 11 | ||||
| -rw-r--r-- | classes/efl.bbclass | 11 | ||||
| -rw-r--r-- | classes/kernel.bbclass | 6 | ||||
| -rw-r--r-- | classes/module_strip.bbclass | 36 | ||||
| -rw-r--r-- | classes/package.bbclass | 38 | ||||
| -rw-r--r-- | classes/package_tar.bbclass | 3 | ||||
| -rw-r--r-- | classes/pkgconfig.bbclass | 2 |
7 files changed, 64 insertions, 43 deletions
diff --git a/classes/chicken.bbclass b/classes/chicken.bbclass new file mode 100644 index 0000000000..5ebe1ff462 --- /dev/null +++ b/classes/chicken.bbclass @@ -0,0 +1,11 @@ +def chicken_arch(bb, d): + import re + arch_pattern = re.compile('^i.*86$') + target_arch = d.getVar("TARGET_ARCH", 1) + if arch_pattern.match(target_arch): + return 'x86' + else: + return target_arch + +CHICKEN_ARCH = "${@chicken_arch(bb, d)}" + diff --git a/classes/efl.bbclass b/classes/efl.bbclass index d4c3baa9cf..900d9c7f0d 100644 --- a/classes/efl.bbclass +++ b/classes/efl.bbclass @@ -11,16 +11,19 @@ PE = "2" ARM_INSTRUCTION_SET = "arm" -AUTOTOOLS_STAGE_PKGCONFIG = "1" -# do NOT inherit pkgconfig here, see note in autotools_stage_all inherit autotools +# evas-native looks at this var, so keep it +AUTOTOOLS_STAGE_PKGCONFIG = "1" + do_configure_prepend() { touch config.rpath } -do_stage() { - autotools_stage_all +do_install_prepend () { + for i in `find ${S}/ -name "*.pc" -type f` ; do \ + sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i + done } # This construction is stupid, someone with more E knowledge should change it to =+ or something diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 637805e6e3..edeaa660bb 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -527,8 +527,8 @@ do_deploy() { install -m 0644 ${KERNEL_OUTPUT} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin - if [ -d "${D}/lib" ]; then - fakeroot tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}.tgz -C ${D} lib + if [ -d "${PKGD}/lib" ]; then + fakeroot tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}.tgz -C ${PKGD} lib fi cd ${DEPLOY_DIR_IMAGE} @@ -540,4 +540,4 @@ do_deploy() { do_deploy[dirs] = "${S}" do_deploy[depends] += "fakeroot-native:do_populate_staging" -addtask deploy before do_package after do_install +addtask deploy before do_build after do_package diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass index 17409190ed..2650f71d50 100644 --- a/classes/module_strip.bbclass +++ b/classes/module_strip.bbclass @@ -1,26 +1,20 @@ -#DEPENDS_append = " module-strip" +PACKAGESTRIPFUNCS += "do_strip_modules" do_strip_modules () { - for p in ${PACKAGES}; do - if test -e ${PKGDEST}/$p/lib/modules; then - if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then - modules="`find ${PKGDEST}/${p}/lib/modules -name \*.ko`" - else - modules="`find ${PKGDEST}/${p}/lib/modules -name \*.o`" - fi - if [ -n "$modules" ]; then - for module in $modules ; do - if ! [ -d "$module" ] ; then - ${STRIP} -v -g $module - fi - done -# NM="${CROSS_DIR}/bin/${HOST_PREFIX}nm" OBJCOPY="${CROSS_DIR}/bin/${HOST_PREFIX}objcopy" strip_module $modules - fi + if test -e ${PKGD}/lib/modules; then + if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then + modules="`find ${PKGD}/lib/modules -name \*.ko`" + else + modules="`find ${PKGD}/lib/modules -name \*.o`" fi - done + if [ -n "$modules" ]; then + for module in $modules ; do + if ! [ -d "$module" ] ; then + ${STRIP} -v -g $module + fi + done + fi + fi } -python do_package_append () { - if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'): - bb.build.exec_func('do_strip_modules', d) -} + diff --git a/classes/package.bbclass b/classes/package.bbclass index bb81f33b29..4196135710 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -201,6 +201,26 @@ def runstrip(file, d): return 1 +PACKAGESTRIPFUNCS += "do_runstrip" +python do_runstrip() { + import stat + + dvar = bb.data.getVar('PKGD', d, True) + def isexec(path): + try: + s = os.stat(path) + except (os.error, AttributeError): + return 0 + return (s[stat.ST_MODE] & stat.S_IEXEC) + + for root, dirs, files in os.walk(dvar): + for f in files: + file = os.path.join(root, f) + if not os.path.islink(file) and not os.path.isdir(file) and isexec(file): + runstrip(file, d) +} + + def write_package_md5sums (root, outfile, ignorepaths): # For each regular file under root, writes an md5sum to outfile. # With thanks to patch.bbclass. @@ -334,11 +354,12 @@ python perform_packagecopy () { # Start by package population by taking a copy of the installed # files to operate on + os.system('rm -rf %s/*' % (dvar)) os.system('cp -pPR %s/* %s/' % (dest, dvar)) } python populate_packages () { - import glob, stat, errno, re,os + import glob, errno, re,os workdir = bb.data.getVar('WORKDIR', d, True) outdir = bb.data.getVar('DEPLOY_DIR', d, True) @@ -349,13 +370,6 @@ python populate_packages () { bb.mkdirhier(outdir) os.chdir(dvar) - def isexec(path): - try: - s = os.stat(path) - except (os.error, AttributeError): - return 0 - return (s[stat.ST_MODE] & stat.S_IEXEC) - # Sanity check PACKAGES for duplicates - should be moved to # sanity.bbclass once we have the infrastucture package_list = [] @@ -368,12 +382,10 @@ python populate_packages () { else: package_list.append(pkg) + if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'): - for root, dirs, files in os.walk(dvar): - for f in files: - file = os.path.join(root, f) - if not os.path.islink(file) and not os.path.isdir(file) and isexec(file): - runstrip(file, d) + for f in (bb.data.getVar('PACKAGESTRIPFUNCS', d, True) or '').split(): + bb.build.exec_func(f, d) pkgdest = bb.data.getVar('PKGDEST', d, True) os.system('rm -rf %s' % pkgdest) diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass index 9c9ae4ff0a..b905e170f4 100644 --- a/classes/package_tar.bbclass +++ b/classes/package_tar.bbclass @@ -56,7 +56,8 @@ python do_package_tar () { for pkg in packages.split(): localdata = bb.data.createCopy(d) - root = "%s/install/%s" % (workdir, pkg) + pkgdest = bb.data.getVar('PKGDEST', d, 1) + root = "%s/%s" % (pkgdest, pkg) bb.data.setVar('ROOT', '', localdata) bb.data.setVar('ROOT_%s' % pkg, root, localdata) diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass index 5844461fb4..f3d93716d7 100644 --- a/classes/pkgconfig.bbclass +++ b/classes/pkgconfig.bbclass @@ -3,7 +3,7 @@ DEPENDS_prepend = "pkgconfig-native " do_install_prepend () { for i in `find ${S}/ -name "*.pc" -type f` ; do \ - sed -i -e 's:-L${STAGING_LIBDIR}::g' $i + sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i done } |
