aboutsummaryrefslogtreecommitdiffstats
path: root/classes/java-library.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/java-library.bbclass')
-rw-r--r--classes/java-library.bbclass23
1 files changed, 14 insertions, 9 deletions
diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass
index ce1cd28..67541d2 100644
--- a/classes/java-library.bbclass
+++ b/classes/java-library.bbclass
@@ -10,9 +10,14 @@
#
# package archs are set to all, if the recipe builds also packages which
# can not be used for all archs, then set the PACKAGE_ARCH of that package
-# manually, see rxtx_xx.bb for an example.
+# manually *before* inheriting the class, see rxtx_xx.bb for an example.
-inherit java allarch
+inherit java
+PACKAGE_ARCH ?= "all"
+# Fully expanded - so it applies the overrides as well
+PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
+inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED') == 'all', 'allarch', '')}
+inherit python3native
# use java_stage for native packages
JAVA_NATIVE_STAGE_INSTALL = "1"
@@ -23,8 +28,8 @@ def java_package_name(d):
pre=""
post=""
- bpn = d.getVar('BPN', True)
- ml = d.getVar('MLPREFIX', True)
+ bpn = d.getVar('BPN')
+ ml = d.getVar('MLPREFIX')
if not bpn.startswith("lib"):
pre='lib'
@@ -35,11 +40,11 @@ def java_package_name(d):
JPN ?= "${@java_package_name(d)}"
-DEPENDS_prepend = "virtual/javac-native fastjar-native "
+DEPENDS:prepend = "virtual/javac-native fastjar-native "
PACKAGES += "${JPN}"
-FILES_${JPN} = "${datadir_java}"
+FILES:${JPN} = "${datadir_java}"
# File name of the libraries' main Jar file
JARFILENAME = "${BP}.jar"
@@ -49,15 +54,15 @@ ALTJARFILENAMES = "${BPN}.jar"
# Java "source" distributions often contain precompiled things
# we want to delete first.
-do_removebinaries() {
+do_deletebinaries() {
find ${WORKDIR} ! -path "${RECIPE_SYSROOT}/*" ! -path "${RECIPE_SYSROOT_NATIVE}/*" \
-name "*.jar" -exec rm {} \;
find ${WORKDIR} ! -path "${RECIPE_SYSROOT}/*" ! -path "${RECIPE_SYSROOT_NATIVE}/*" \
-name "*.class" -exec rm {} \;
}
-addtask removebinaries after do_unpack before do_patch
+addtask deletebinaries after do_unpack before do_patch
-do_install_append() {
+do_install:append() {
oe_jarinstall ${JARFILENAME} ${ALTJARFILENAMES}
}