From 94760031fd32486d95b2699bbb9656dcf0b74653 Mon Sep 17 00:00:00 2001 From: Robert Schuster Date: Thu, 17 Jan 2008 15:51:03 +0000 Subject: java.bbclass: New bbclass for java recipes. java-library.bbclass: New bbclass for java library (jar) recipes. swt3.3-gtk: New recipe. swt3.4-gtk: New recipe. swt3.4-gtk-hildon: New recipe. --- classes/java-library.bbclass | 37 ++++++++++++++++++++++++++ classes/java.bbclass | 62 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 classes/java-library.bbclass create mode 100644 classes/java.bbclass (limited to 'classes') diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass new file mode 100644 index 0000000000..8aecfef1b9 --- /dev/null +++ b/classes/java-library.bbclass @@ -0,0 +1,37 @@ +# Inherit this bbclass for each java recipe that builds a Java library (jar file[s]). +# +# It automatically adds important build dependencies, defines JPN (Java Package Name) +# a package named ${JPN} whose contents are those of ${datadir}/java (the jar location). +# +# The JPN is basically lib${PN}-java but takes care of the fact that ${PN} already +# starts with "lib" and/or ends with "-java". In case the "lib" prefix is part of +# your package's normal name (e.g. liberator) the guessing is wrong and you have +# to set JPN manually! + +inherit java + +def java_package_name(d): + import bb; + + pre="" + post="" + + pn = bb.data.getVar('PN', d, 1) + if not pn.startswith("lib"): + pre='lib' + + if not pn.endswith("-java"): + post='-java' + + return pre + pn + post + +JPN ?= "${@java_package_name(d)}" + +DEPENDS_prepend = "virtual/javac-native fastjar-native " + +PACKAGES = "${JPN}" + +PACKAGE_ARCH_${JPN} = "all" + +FILES_${JPN} = "${datadir_java}" + diff --git a/classes/java.bbclass b/classes/java.bbclass new file mode 100644 index 0000000000..7fa6dc1786 --- /dev/null +++ b/classes/java.bbclass @@ -0,0 +1,62 @@ +# Defines the commonly used target directories and provides a convenience +# function to install jar files. + +# Jar location on target +datadir_java ?= ${datadir}/java + +# JNI library location on target +libdir_jni ?= ${libdir}/jni + +STAGING_DATADIR_JAVA ?= ${STAGING_DATADIR}/java +STAGING_LIBDIR_JNI ?= ${STAGING_LIBDIR}/jni + +oe_jarinstall() { + # Purpose: Install a jar file and create all the given symlinks to it. + # Example: + # oe_jarinstall foo-1.3.jar foo.jar + # Installs foo-1.3.jar and creates symlink foo.jar. + # + # oe_jarinstall -s foo-1.3.jar foo.jar + # Installs foo-1.3.jar to staging and creates symlink foo.jar. + # + # oe_jarinstall -r foo-1.3.jar foo_1_3.jar foo.jar + # Installs foo_1_3.jar as foo-1.3.jar and creates a symlink to this. + # + dir=${D}${datadir_java} + destname="" + while [ "$#" -gt 0 ]; do + case "$1" in + -s) + dir=${STAGING_DATADIR_JAVA} + ;; + -r) + shift + destname=$1 + ;; + -*) + oefatal "oe_jarinstall: unknown option: $1" + ;; + *) + break; + ;; + esac + shift + done + + jarname=$1 + destname=${destname:-`basename $jarname`} + shift + + install -d $dir + install -m 0644 $jarname $dir/$destname + + # Creates symlinks out of the remaining arguments. + while [ "$#" -gt 0 ]; do + if [ -e $dir/$1 ]; then + oewarn "file was in the way. removing:" $dir/$1 + rm $dir/$1 + fi + ln -s $destname $dir/$1 + shift + done +} -- cgit v1.2.3 From 1aa5072883ddc636969ab0772686de6cd21a8a62 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 18 Jan 2008 11:50:24 +0000 Subject: kernel.bbclass: stage also include/video directory (from Poky) --- classes/kernel.bbclass | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index c00d0f3f58..d83ec88d44 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -80,25 +80,12 @@ kernel_do_stage() { mkdir -p ${STAGING_KERNEL_DIR}/include/pcmcia cp -fR include/pcmcia/* ${STAGING_KERNEL_DIR}/include/pcmcia/ - if [ -d drivers/crypto ]; then - mkdir -p ${STAGING_KERNEL_DIR}/drivers/crypto - cp -fR drivers/crypto/* ${STAGING_KERNEL_DIR}/drivers/crypto/ - fi - - if [ -d include/media ]; then - mkdir -p ${STAGING_KERNEL_DIR}/include/media - cp -fR include/media/* ${STAGING_KERNEL_DIR}/include/media/ - fi - - if [ -d include/acpi ]; then - mkdir -p ${STAGING_KERNEL_DIR}/include/acpi - cp -fR include/acpi/* ${STAGING_KERNEL_DIR}/include/acpi/ - fi - - if [ -d include/sound ]; then - mkdir -p ${STAGING_KERNEL_DIR}/include/sound - cp -fR include/sound/* ${STAGING_KERNEL_DIR}/include/sound/ - fi + for entry in drivers/crypto include/media include/acpi include/sound include/video; do + if [ -d $entry ]; then + mkdir -p ${STAGING_KERNEL_DIR}/$entry + cp -fR $entry/* ${STAGING_KERNEL_DIR}/$entry/ + fi + done if [ -d drivers/sound ]; then # 2.4 alsa needs some headers from this directory -- cgit v1.2.3 From cb387977eadbbb2cfac43a144e04ffcecae0f008 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 18 Jan 2008 11:51:29 +0000 Subject: kernel.bbclass: added sizecheck task from linux recipe (merge from Poky) --- classes/kernel.bbclass | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index d83ec88d44..f896492364 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -405,3 +405,17 @@ python populate_packages_prepend () { packages.append(metapkg) bb.data.setVar('PACKAGES', ' '.join(packages), d) } + +# Support checking the kernel size since some kernels need to reside in partitions +# with a fixed length or there is a limit in transferring the kernel to memory +do_sizecheck() { + if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then + size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'` + if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then + rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE} + die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular." + fi + fi +} + +addtask sizecheck before do_install after do_compile -- cgit v1.2.3 From a7226f145f0c6fe538ede094d74a629c38720e13 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 21 Jan 2008 08:17:35 +0000 Subject: classes/cmake.bbclass: Spaces are cool, use them --- classes/cmake.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass index cec74349dc..b3ae3f70d1 100644 --- a/classes/cmake.bbclass +++ b/classes/cmake.bbclass @@ -1,7 +1,7 @@ inherit autotools cmake_do_configure() { - cmake . -DCMAKE_INSTALL_PREFIX:PATH=${prefix} + cmake . -DCMAKE_INSTALL_PREFIX:PATH=${prefix} } EXPORT_FUNCTIONS do_configure -- cgit v1.2.3 From eb1025e4dd2522a35ea2988254bca9a6b5a6e02b Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 21 Jan 2008 08:22:42 +0000 Subject: classes/cmake.bbclass: A small explanation why it says inherit autotools CMake's Makefiles know about the DESTDIR. This allows us to use the staging and install functions of the autotools bbclass. Reusing them makes perfect sense and we should consider moving these functions to another base class. --- classes/cmake.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass index b3ae3f70d1..3ae2b1eb31 100644 --- a/classes/cmake.bbclass +++ b/classes/cmake.bbclass @@ -1,3 +1,4 @@ +# We want the staging and installing functions from autotools inherit autotools cmake_do_configure() { -- cgit v1.2.3 From a82c44432c811f1b76cf9073e4df96f2ab5ecb2f Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Mon, 21 Jan 2008 10:15:15 +0000 Subject: nslu2-mirrors: Fix https handling --- classes/nslu2-mirrors.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/nslu2-mirrors.bbclass b/classes/nslu2-mirrors.bbclass index 1181edc716..b5ad01adea 100644 --- a/classes/nslu2-mirrors.bbclass +++ b/classes/nslu2-mirrors.bbclass @@ -1,4 +1,4 @@ MIRRORS_append () { -ftp://.*/.*/ http://sources.nslu2-linux.org/sources/ -http://.*/.*/ http://sources.nslu2-linux.org/sources/ +ftp://.*/.* http://sources.nslu2-linux.org/sources/ +https?://.*/.* http://sources.nslu2-linux.org/sources/ } -- cgit v1.2.3 From 3074e69fa414fe2745798492fd7a6e76ff37fe84 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Mon, 21 Jan 2008 10:21:39 +0000 Subject: *-mirrors.bbclass: Applied the https handling fix to all other mirrors classes --- classes/nylon-mirrors.bbclass | 4 ++-- classes/oplinux-mirrors.bbclass | 8 ++++---- classes/own-mirrors.bbclass | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'classes') diff --git a/classes/nylon-mirrors.bbclass b/classes/nylon-mirrors.bbclass index 2986bd8f80..25a8b87d9b 100644 --- a/classes/nylon-mirrors.bbclass +++ b/classes/nylon-mirrors.bbclass @@ -1,6 +1,6 @@ MIRRORS_append () { ftp://.*/.*/ http://meshcube.org/nylon/stable/sources/ -http://.*/.*/ http://meshcube.org/nylon/stable/sources/ +https?://.*/.*/ http://meshcube.org/nylon/stable/sources/ ftp://.*/.*/ http://meshcube.org/nylon/unstable/sources/ -http://.*/.*/ http://meshcube.org/nylon/unstable/sources/ +https?://.*/.*/ http://meshcube.org/nylon/unstable/sources/ } \ No newline at end of file diff --git a/classes/oplinux-mirrors.bbclass b/classes/oplinux-mirrors.bbclass index 076cd6f1fe..c76e822ce3 100644 --- a/classes/oplinux-mirrors.bbclass +++ b/classes/oplinux-mirrors.bbclass @@ -3,12 +3,12 @@ MIRRORS_append () { ftp://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/ -http://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/ +https?://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/ ftp://.*/.*/ http://digital-opsis.com/oplinux/unstable/sources/ -http://.*/.*/ http://digital-opsis.com/oplinux/unstable/sources/ +https?://.*/.*/ http://digital-opsis.com/oplinux/unstable/sources/ ftp://.*/.*/ http://digital-opsis.com/oplinux-uclibc/stable/sources/ -http://.*/.*/ http://digital-opsis.com/oplinux-uclibc/stable/sources/ +https?://.*/.*/ http://digital-opsis.com/oplinux-uclibc/stable/sources/ ftp://.*/.*/ http://digital-opsis.com/oplinux-uclibc/unstable/sources/ -http://.*/.*/ http://digital-opsis.com/oplinux-uclibc/unstable/sources/ +https?://.*/.*/ http://digital-opsis.com/oplinux-uclibc/unstable/sources/ } diff --git a/classes/own-mirrors.bbclass b/classes/own-mirrors.bbclass index 32763ed24f..e8a0f481d7 100644 --- a/classes/own-mirrors.bbclass +++ b/classes/own-mirrors.bbclass @@ -1,4 +1,4 @@ PREMIRRORS() { -http://.*/.* ${SOURCE_MIRROR_URL} +https?://.*/.* ${SOURCE_MIRROR_URL} ftp://.*/.* ${SOURCE_MIRROR_URL} } -- cgit v1.2.3 From 9b741f1a8431a64f7784af8b3f11641023ce2327 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 21 Jan 2008 11:06:06 +0000 Subject: classes/cmake: To invoke cmake it has to be present, add cmake-native to the DEPENDS --- classes/cmake.bbclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'classes') diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass index 3ae2b1eb31..823635c24d 100644 --- a/classes/cmake.bbclass +++ b/classes/cmake.bbclass @@ -1,3 +1,5 @@ +DEPENDS += " cmake-native " + # We want the staging and installing functions from autotools inherit autotools -- cgit v1.2.3