diff options
-rw-r--r-- | classes/base.bbclass | 17 | ||||
-rw-r--r-- | classes/java-library.bbclass | 21 | ||||
-rw-r--r-- | conf/bitbake.conf | 13 |
3 files changed, 27 insertions, 24 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index b50bc8667c..071acfa015 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -157,6 +157,23 @@ def base_both_contain(variable1, variable2, checkvalue, d): DEPENDS_prepend="${@base_dep_prepend(d)} " +# Returns PN with various suffixes removed +# or PN if no matching suffix was found. +def base_package_name(d): + import bb; + + pn = bb.data.getVar('PN', d, 1) + if pn.endswith("-native"): + pn = pn[0:-7] + elif pn.endswith("-cross"): + pn = pn[0:-6] + elif pn.endswith("-initial"): + pn = pn[0:-8] + elif pn.endswith("-intermediate"): + pn = pn[0:-13] + + return pn + def base_set_filespath(path, d): import os, bb filespath = [] diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass index 1e5534cbfe..06c3170544 100644 --- a/classes/java-library.bbclass +++ b/classes/java-library.bbclass @@ -10,6 +10,9 @@ inherit java +# use java_stage for native packages +JAVA_NATIVE_STAGE_INSTALL = "1" + def java_package_name(d): import bb; @@ -25,18 +28,6 @@ def java_package_name(d): return pre + pn + post -def java_base_package_name(d): - import bb; - - pre="" - post="" - - pn = bb.data.getVar('PN', d, 1) - if pn.endswith("-native"): - pn = pn[0:-7] - - return pn - JPN ?= "${@java_package_name(d)}" DEPENDS_prepend = "virtual/javac-native fastjar-native " @@ -47,12 +38,6 @@ PACKAGE_ARCH_${JPN} = "all" FILES_${JPN} = "${datadir_java}" -# Base package name -# Automatically derives "foo" from "foo-native" -BPN ?= "${@java_base_package_name(d)}" - -BP ?= "${BPN}-${PV}" - # File name of the libraries' main Jar file JARFILENAME = "${BP}.jar" diff --git a/conf/bitbake.conf b/conf/bitbake.conf index 071c1efdc9..93064b0a30 100644 --- a/conf/bitbake.conf +++ b/conf/bitbake.conf @@ -143,10 +143,11 @@ EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}" DEBPV = "${EXTENDPEVER}${PV}-${PR}" P = "${PN}-${PV}" -################################################################## -# Distro default -################################################################## -DISTRO_PR ?= "" +# Base package name +# Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial" +# otherwise it is the same as PN and P +BPN = "${@base_package_name(d)}" +BP = "${BPN}-${PV}" # Package info. @@ -217,7 +218,7 @@ FILES_${PN}-locale = "${datadir}/locale" export MANIFEST = "${FILESDIR}/manifest" FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}" -FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" +FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}" ################################################################## @@ -237,7 +238,7 @@ STAMP = "${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}" WORKDIR = "${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}" T = "${WORKDIR}/temp" D = "${WORKDIR}/image" -S = "${WORKDIR}/${P}" +S = "${WORKDIR}/${BP}" B = "${S}" STAGING_DIR = "${TMPDIR}/staging" |