classes: Sync with OE - mainly quoting fixes or other minor updates

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@885 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2006-11-20 15:19:39 +00:00
parent 4015d48fcf
commit e09dab0614
15 changed files with 59 additions and 27 deletions

View File

@ -1,5 +1,4 @@
BB_DEFAULT_TASK = "build"
PATCHES_DIR = "${S}"
def base_dep_prepend(d):
import bb;

View File

@ -1,17 +1,32 @@
#
# This is for perl modules that use the old Makefile.PL build system
#
FILES_${PN} += '${libdir}/perl5'
EXTRA_CPANFLAGS = ""
DEPENDS += "perl-native"
RDEPENDS += "perl"
cpan_do_configure () {
perl Makefile.PL ${EXTRA_CPANFLAGS}
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
. ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh
sed -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:; s:\(SITEARCHEXP = \).*:\1${sitearchexp}:; s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5:; s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" < Makefile > Makefile.new
mv Makefile.new Makefile
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
}
cpan_do_compile () {
oe_runmake PASTHRU_INC="${CFLAGS}"
# 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
oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS
}
cpan_do_install () {

View File

@ -101,5 +101,5 @@ python debian_package_name_hook () {
EXPORT_FUNCTIONS package_name_hook
DEBIAN_NAMES = 1
DEBIAN_NAMES = "1"

View File

@ -1,8 +1,8 @@
EXTRA_OEMAKE[export] = 1
EXTRA_OEMAKE[export] = "1"
do_devshell[dirs] = "${S}"
do_devshell[nostamp] = 1
do_devshell[interactive] = 1
do_devshell[nostamp] = "1"
do_devshell[interactive] = "1"
devshell_do_devshell() {
bash -i
}

View File

@ -10,5 +10,5 @@ def python_dir(d):
raise "No Python in STAGING_INCDIR. Forgot to build python-native ?"
PYTHON_DIR = "${@python_dir(d)}"
FILES_${PN} = "${bindir} ${libdir} ${libdir}/${PYTHON_DIR}"
FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}"

View File

@ -10,7 +10,7 @@ def icc_determine_gcc_version(gcc):
'i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363)'
"""
return os.popen("%s --version" % gcc ).readline()[2]
return os.popen("%s --version" % gcc ).readline().split()[2]
def create_env(bb,d):
"""

View File

@ -5,7 +5,11 @@ do_strip_modules () {
if test -e ${WORKDIR}/install/$p/lib/modules; then
modules="`find ${WORKDIR}/install/$p/lib/modules -name \*${KERNEL_OBJECT_SUFFIX}`"
if [ -n "$modules" ]; then
${STRIP} -v -g $modules
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
fi

View File

@ -4,7 +4,7 @@ DEPENDS += "gnu-config-native virtual/libintl xt libxi \
LICENSE = "MPL NPL"
SRC_URI += "file://mozconfig"
inherit gettext
inherit gettext pkgconfig
EXTRA_OECONF = "--target=${TARGET_SYS} --host=${BUILD_SYS} \
--build=${BUILD_SYS} --prefix=${prefix}"

View File

@ -1,10 +1,11 @@
STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}-${TARGET_OS}/${PF}"
WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}-${TARGET_OS}/${PF}"
STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}-${TARGET_OS}/kernel"
STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}"
WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}"
STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
# Find any machine specific sub packages and if present, mark the
# whole package as machine specific for multimachine purposes.
def multi_machine_after_parse(d):
import bb
packages = bb.data.getVar('PACKAGES', d, 1).split()
@ -22,6 +23,7 @@ def multi_machine_after_parse(d):
bb.data.setVar('MULTIMACH_ARCH', multiarch, d)
python __anonymous () {
multi_machine_after_parse(d)
}

View File

@ -1,5 +1,5 @@
addtask lint before do_fetch
do_lint[nostamp] = 1
do_lint[nostamp] = "1"
python do_lint() {
def testVar(var, explain=None):
try:
@ -67,7 +67,7 @@ python do_lint() {
# Test for valid MAINTAINER
#
s = testVar("MAINTAINER")
if s=="OpenEmbedded Team <oe@handhelds.org>":
if s=="OpenEmbedded Team <openembedded-devel@openembedded.org>":
bb.error("explicit MAINTAINER is missing, using default")
elif s and s.find("@") == -1:
bb.error("You forgot to put an e-mail address into MAINTAINER")

View File

@ -19,4 +19,4 @@ do_rm_work () {
}
addtask rm_work before do_build
addtask rm_work after do_package
addtask rm_work after do_populate_staging

View File

@ -10,9 +10,9 @@ DEPENDS_append=" ${EXTRA_IMAGEDEPENDS}"
PACKAGES = ""
do_rootfs[nostamp] = 1
do_rootfs[dirs] = ${TOPDIR}
do_build[nostamp] = 1
do_rootfs[nostamp] = "1"
do_rootfs[dirs] = "${TOPDIR}"
do_build[nostamp] = "1"
IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS}"

View File

@ -10,7 +10,7 @@ SREC_CMD = "${TARGET_PREFIX}objcopy -O srec -I binary --adjust-vma ${SREC_VMAADD
# Do not build srec files for these types of images:
SREC_SKIP = "tar"
do_srec[nostamp] = 1
do_srec[nostamp] = "1"
do_srec () {
if [ ${SREC_VMAADDR} = "" ] ; then

View File

@ -60,7 +60,18 @@ def tinder_format_http_post(d,status,log):
"os" : os.uname()[0],
"os_version" : os.uname()[2],
"compiler" : "gcc",
"clobber" : data.getVar('TINDER_CLOBBER', d, True)
"clobber" : data.getVar('TINDER_CLOBBER', d, True),
"srcdate" : data.getVar('SRCDATE', d, True),
"PN" : data.getVar('PN', d, True),
"PV" : data.getVar('PV', d, True),
"PR" : data.getVar('PR', d, True),
"FILE" : data.getVar('FILE', d, True) or "N/A",
"TARGETARCH" : data.getVar('TARGET_ARCH', d, True),
"TARGETFPU" : data.getVar('TARGET_FPU', d, True) or "Unknown",
"TARGETOS" : data.getVar('TARGET_OS', d, True) or "Unknown",
"MACHINE" : data.getVar('MACHINE', d, True) or "Unknown",
"DISTRO" : data.getVar('DISTRO', d, True) or "Unknown",
"zecke-rocks" : "sure",
}
# optionally add the status

View File

@ -26,6 +26,7 @@ updatercd_postrm() {
update-rc.d $D ${INITSCRIPT_NAME} remove
}
def update_rc_after_parse(d):
import bb
if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None:
@ -56,10 +57,10 @@ python populate_packages_prepend () {
prerm = '#!/bin/sh\n'
prerm += bb.data.getVar('updatercd_prerm', localdata, 1)
bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d)
postrm = bb.data.getVar('pkg_postrm', localdata, 1)
if not postrm:
postrm = '#!/bin/sh\n'
postrm += bb.data.getVar('updatercd_postrm', localdata, 1)
postrm = bb.data.getVar('pkg_postrm', localdata, 1)
if not postrm:
postrm = '#!/bin/sh\n'
postrm += bb.data.getVar('updatercd_postrm', localdata, 1)
bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
pkgs = bb.data.getVar('INITSCRIPT_PACKAGES', d, 1)