diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 60 | ||||
-rw-r--r-- | classes/cmake.bbclass | 3 | ||||
-rw-r--r-- | classes/cross.bbclass | 4 | ||||
-rw-r--r-- | classes/image.bbclass | 1 | ||||
-rw-r--r-- | classes/insane.bbclass | 3 | ||||
-rw-r--r-- | classes/java.bbclass | 7 | ||||
-rw-r--r-- | classes/multimachine.bbclass | 30 | ||||
-rw-r--r-- | classes/packaged-staging.bbclass | 6 | ||||
-rw-r--r-- | classes/qtopia4core.bbclass | 1 | ||||
-rw-r--r-- | classes/singlemachine.bbclass | 12 |
10 files changed, 67 insertions, 60 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 3c6f5a15a1..540b891669 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -999,10 +999,12 @@ def base_after_parse(d): depends = depends + " git-native:do_populate_staging" bb.data.setVarFlag('do_fetch', 'depends', depends, d) + # 'multimachine' handling mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1) - old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1) - if (old_arch == mach_arch): - # Nothing to do + pkg_arch = bb.data.getVar('PACKAGE_ARCH', d, 1) + + if (pkg_arch == mach_arch): + # Already machine specific - nothing further to do return # @@ -1010,26 +1012,38 @@ def base_after_parse(d): # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0 # override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) - if override == '0': - return - - paths = [] - for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: - path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d) - if os.path.isdir(path): - paths.append(path) - if len(paths) == 0: - return - - for s in srcuri.split(): - if not s.startswith("file://"): - continue - local = bb.data.expand(bb.fetch.localpath(s, d), d) - for mp in paths: - if local.startswith(mp): - #bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch)) - bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d) - return + if override != '0': + paths = [] + for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: + path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d) + if os.path.isdir(path): + paths.append(path) + if len(paths) != 0: + for s in srcuri.split(): + if not s.startswith("file://"): + continue + local = bb.data.expand(bb.fetch.localpath(s, d), d) + for mp in paths: + if local.startswith(mp): + #bb.note("overriding PACKAGE_ARCH from %s to %s" % (pkg_arch, mach_arch)) + bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d) + bb.data.setVar('MULTIMACH_ARCH', mach_arch, d) + return + + multiarch = pkg_arch + + packages = bb.data.getVar('PACKAGES', d, 1).split() + for pkg in packages: + pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1) + + # We could look for != PACKAGE_ARCH here but how to choose + # if multiple differences are present? + # Look through PACKAGE_ARCHS for the priority order? + if pkgarch and pkgarch == mach_arch: + multiarch = mach_arch + break + + bb.data.setVar('MULTIMACH_ARCH', multiarch, d) python () { import bb diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass index 823635c24d..a9130f2a05 100644 --- a/classes/cmake.bbclass +++ b/classes/cmake.bbclass @@ -4,7 +4,8 @@ DEPENDS += " cmake-native " inherit autotools cmake_do_configure() { - cmake . -DCMAKE_INSTALL_PREFIX:PATH=${prefix} + cmake . -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -Wno-dev \ + -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} } EXPORT_FUNCTIONS do_configure diff --git a/classes/cross.bbclass b/classes/cross.bbclass index 89cb3e9569..a35f4dfb79 100644 --- a/classes/cross.bbclass +++ b/classes/cross.bbclass @@ -49,8 +49,8 @@ bindir = "${exec_prefix}/bin" sbindir = "${exec_prefix}/bin" libexecdir = "${exec_prefix}/libexec" libdir = "${exec_prefix}/lib" -includedir = "${exec_prefix}/include" -oldincludedir = "${exec_prefix}/include" +includedir = "${STAGING_DIR_TARGET}/${layout_includedir}" +oldincludedir = "${STAGING_DIR_TARGET}/${layout_includedir}" do_stage () { oe_runmake install diff --git a/classes/image.bbclass b/classes/image.bbclass index 6350a733e8..e9c0ecd947 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -93,6 +93,7 @@ fakeroot do_rootfs () { set -x rm -rf ${IMAGE_ROOTFS} mkdir -p ${IMAGE_ROOTFS} + mkdir -p ${DEPLOY_DIR_IMAGE} if [ "${USE_DEVFS}" != "1" ]; then for devtable in ${@get_devtable_list(d)}; do diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 1f7c761b47..a599689e8c 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -72,6 +72,9 @@ def package_qa_get_machine_dict(): "arm" : (40, 0, 0, True, True), "armeb" : (40, 0, 0, False, True), }, + "linux-gnuspe" : { + "powerpc": (20, 0, 0, False, True), + }, } diff --git a/classes/java.bbclass b/classes/java.bbclass index e51b0d71da..17f833ce3d 100644 --- a/classes/java.bbclass +++ b/classes/java.bbclass @@ -1,5 +1,8 @@ # Defines the commonly used target directories and provides a convenience # function to install jar files. +# +# All the default directory locations herein resemble locations chosen in +# the Debian distribution. # Jar location on target datadir_java ?= ${datadir}/java @@ -7,8 +10,12 @@ datadir_java ?= ${datadir}/java # JNI library location on target libdir_jni ?= ${libdir}/jni +# JVM bundle location on target +libdir_jvm ?= ${libdir}/jvm + STAGING_DATADIR_JAVA ?= ${STAGING_DATADIR}/java STAGING_LIBDIR_JNI ?= ${STAGING_LIBDIR}/jni +STAGING_LIBDIR_JVM ?= ${STAGING_LIBDIR}/jvm oe_jarinstall() { # Purpose: Install a jar file and create all the given symlinks to it. diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass deleted file mode 100644 index 945d22bfe0..0000000000 --- a/classes/multimachine.bbclass +++ /dev/null @@ -1,30 +0,0 @@ -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" -PKGDATA_DIR = "${STAGING_DIR}/pkgdata/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}" - -# 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() - macharch = bb.data.getVar('MACHINE_ARCH', d, 1) - multiarch = bb.data.getVar('PACKAGE_ARCH', d, 1) - - for pkg in packages: - pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1) - - # We could look for != PACKAGE_ARCH here but how to choose - # if multiple differences are present? - # Look through PACKAGE_ARCHS for the priority order? - if pkgarch and pkgarch == macharch: - multiarch = macharch - - bb.data.setVar('MULTIMACH_ARCH', multiarch, d) - - -python __anonymous () { - multi_machine_after_parse(d) -} diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index 0dd6900d77..77fd8a92c3 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -19,9 +19,6 @@ PSTAGE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_ PSTAGE_PKGNAME = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk" PSTAGE_PKG = "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}" -# multimachine.bbclass will override this but add a default in case we're not using it -MULTIMACH_ARCH ?= "${PACKAGE_ARCH}" - PSTAGE_NATIVEDEPENDS = "\ shasum-native \ stagemanager-native \ @@ -190,7 +187,8 @@ python packagestage_scenefunc () { # # Install the staging package somewhere temporarily so we can extract the stamp files # - cmd = bb.data.expand("${PSTAGE_PKGMANAGER} -force-depends -f ${PSTAGE_MACHCONFIG} -o ${WORKDIR}/tstage install", d) + bb.mkdirhier(bb.data.expand("${WORKDIR}/tstage/${layout_libdir}/opkg/info/ ", d)) + cmd = bb.data.expand("${PSTAGE_PKGMANAGER} -f ${PSTAGE_MACHCONFIG} -force-depends -o ${WORKDIR}/tstage install", d) ret = os.system("PATH=\"%s\" %s %s" % (path, cmd, stagepkg)) if ret != 0: bb.fatal("Couldn't install the staging package to a temp directory") diff --git a/classes/qtopia4core.bbclass b/classes/qtopia4core.bbclass index c6a05488ef..b5f10fa486 100644 --- a/classes/qtopia4core.bbclass +++ b/classes/qtopia4core.bbclass @@ -1,6 +1,7 @@ DEPENDS_prepend = "${@["qtopia-core ", ""][(bb.data.getVar('PN', d, 1) == 'qtopia-core')]}" inherit qmake2 +QT_DIR_NAME = "qtopia" # # override variables set by qmake-base to compile QtopiaCore apps # diff --git a/classes/singlemachine.bbclass b/classes/singlemachine.bbclass new file mode 100644 index 0000000000..e4b2b6f7b3 --- /dev/null +++ b/classes/singlemachine.bbclass @@ -0,0 +1,12 @@ +# +# Emulates the old mode of OE operation where only one machine can be targetted. +# + +MULTIMACH_TARGET_SYS = "${TARGET_SYS}" +MULTIMACH_HOST_SYS = "${HOST_SYS}" + +STAMP = "${TMPDIR}/stamps/${PF}" +WORKDIR = "${TMPDIR}/work/${PF}" +PKGDATA_DIR = "${STAGING_DIR}/pkgdata" +STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/kernel" + |