summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-05-09 16:10:46 +0000
committerRichard Purdie <richard@openedhand.com>2006-05-09 16:10:46 +0000
commit189b9a916b845c90db5e51f62496a13f60936d36 (patch)
treee9227d9f63eea070317afffd41cbcdfed018753f
parent8d41bd1c8f4c36ed9c1c73e0586031af8a0f292c (diff)
downloadpoky-189b9a916b845c90db5e51f62496a13f60936d36.tar.gz
Sync bbclass files with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@374 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--openembedded/classes/base.bbclass13
-rw-r--r--openembedded/classes/cross.bbclass1
-rw-r--r--openembedded/classes/e.bbclass37
-rw-r--r--openembedded/classes/efl.bbclass40
-rw-r--r--openembedded/classes/kernel.bbclass6
-rw-r--r--openembedded/classes/native.bbclass1
-rw-r--r--openembedded/classes/opie.bbclass3
-rw-r--r--openembedded/classes/package.bbclass8
-rw-r--r--openembedded/classes/palmtop.bbclass20
-rw-r--r--openembedded/classes/qmake-base.bbclass2
-rw-r--r--openembedded/classes/qmake.bbclass6
-rw-r--r--openembedded/classes/qt4x11.bbclass7
-rw-r--r--openembedded/classes/sanity.bbclass68
-rw-r--r--openembedded/classes/sdl.bbclass61
-rw-r--r--openembedded/classes/sip.bbclass9
-rw-r--r--openembedded/classes/srec.bbclass2
16 files changed, 190 insertions, 94 deletions
diff --git a/openembedded/classes/base.bbclass b/openembedded/classes/base.bbclass
index 21feaab6e6..1728b65709 100644
--- a/openembedded/classes/base.bbclass
+++ b/openembedded/classes/base.bbclass
@@ -27,7 +27,7 @@ def base_read_file(filename):
27 try: 27 try:
28 f = file( filename, "r" ) 28 f = file( filename, "r" )
29 except IOError, reason: 29 except IOError, reason:
30 raise bb.build.FuncFailed("can't read from file '%s' (%s)", (filename,reason)) 30 return "" # WARNING: can't raise an error now because of the new RDEPENDS handling. This is a bit ugly. :M:
31 else: 31 else:
32 return f.read().strip() 32 return f.read().strip()
33 return None 33 return None
@@ -196,7 +196,7 @@ oe_libinstall() {
196 # stop libtool using the final directory name for libraries 196 # stop libtool using the final directory name for libraries
197 # in staging: 197 # in staging:
198 __runcmd rm -f $destpath/$libname.la 198 __runcmd rm -f $destpath/$libname.la
199 __runcmd sed -e 's/^installed=yes$/installed=no/' $dotlai >$destpath/$libname.la 199 __runcmd sed -e 's/^installed=yes$/installed=no/' -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,' $dotlai >$destpath/$libname.la
200 else 200 else
201 __runcmd install -m 0644 $dotlai $destpath/$libname.la 201 __runcmd install -m 0644 $dotlai $destpath/$libname.la
202 fi 202 fi
@@ -723,7 +723,14 @@ python __anonymous () {
723 this_host = bb.data.getVar('HOST_SYS', d, 1) 723 this_host = bb.data.getVar('HOST_SYS', d, 1)
724 if not re.match(need_host, this_host): 724 if not re.match(need_host, this_host):
725 raise bb.parse.SkipPackage("incompatible with host %s" % this_host) 725 raise bb.parse.SkipPackage("incompatible with host %s" % this_host)
726 726
727 need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1)
728 if need_machine:
729 import re
730 this_machine = bb.data.getVar('MACHINE', d, 1)
731 if not re.match(need_machine, this_machine):
732 raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
733
727 pn = bb.data.getVar('PN', d, 1) 734 pn = bb.data.getVar('PN', d, 1)
728 735
729 srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) 736 srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1)
diff --git a/openembedded/classes/cross.bbclass b/openembedded/classes/cross.bbclass
index 5d670ccadc..09357acbe8 100644
--- a/openembedded/classes/cross.bbclass
+++ b/openembedded/classes/cross.bbclass
@@ -14,6 +14,7 @@ CPPFLAGS = "${BUILD_CPPFLAGS}"
14CFLAGS = "${BUILD_CFLAGS}" 14CFLAGS = "${BUILD_CFLAGS}"
15CXXFLAGS = "${BUILD_CFLAGS}" 15CXXFLAGS = "${BUILD_CFLAGS}"
16LDFLAGS = "${BUILD_LDFLAGS}" 16LDFLAGS = "${BUILD_LDFLAGS}"
17LDFLAGS_build-darwin = "-L${STAGING_DIR}/${BUILD_SYS}/lib "
17 18
18# Overrides for paths 19# Overrides for paths
19 20
diff --git a/openembedded/classes/e.bbclass b/openembedded/classes/e.bbclass
new file mode 100644
index 0000000000..afd9b6d2b3
--- /dev/null
+++ b/openembedded/classes/e.bbclass
@@ -0,0 +1,37 @@
1MAINTAINER = "Justin Patrin <papercrane@reversefold.com>"
2HOMEPAGE = "http://www.enlightenment.org"
3SECTION = "e/apps"
4
5inherit autotools pkgconfig binconfig
6
7do_prepsources () {
8 make clean distclean || true
9}
10addtask prepsources after do_fetch before do_unpack
11
12def binconfig_suffix(d):
13 import bb
14 return ["","-native"][bb.data.inherits_class('native', d)]
15
16export CURL_CONFIG = "${STAGING_BINDIR}/curl-config${@binconfig_suffix(d)}"
17export EDB_CONFIG = "${STAGING_BINDIR}/edb-config${@binconfig_suffix(d)}"
18export EET_CONFIG = "${STAGING_BINDIR}/eet-config${@binconfig_suffix(d)}"
19export EVAS_CONFIG = "${STAGING_BINDIR}/evas-config${@binconfig_suffix(d)}"
20export ECORE_CONFIG = "${STAGING_BINDIR}/ecore-config${@binconfig_suffix(d)}"
21export EMBRYO_CONFIG = "${STAGING_BINDIR}/embryo-config${@binconfig_suffix(d)}"
22export ENGRAVE_CONFIG = "${STAGING_BINDIR}/engrave-config${@binconfig_suffix(d)}"
23export ENLIGHTENMENT_CONFIG = "${STAGING_BINDIR}/enlightenment-config${@binconfig_suffix(d)}"
24export EPSILON_CONFIG = "${STAGING_BINDIR}/epsilon-config${@binconfig_suffix(d)}"
25export EPEG_CONFIG = "${STAGING_BINDIR}/epeg-config${@binconfig_suffix(d)}"
26export ESMART_CONFIG = "${STAGING_BINDIR}/esmart-config${@binconfig_suffix(d)}"
27export FREETYPE_CONFIG = "${STAGING_BINDIR}/freetype-config${@binconfig_suffix(d)}"
28export IMLIB2_CONFIG = "${STAGING_BINDIR}/imlib2-config${@binconfig_suffix(d)}"
29
30do_compile_prepend() {
31 find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
32 find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:'
33}
34
35PACKAGES = "${PN} ${PN}-themes"
36FILES_${PN} = "${libdir}/lib*.so*"
37FILES_${PN}-themes = "${datadir}/${PN}/themes ${datadir}/${PN}/data ${datadir}/${PN}/fonts ${datadir}/${PN}/pointers ${datadir}/${PN}/images ${datadir}/${PN}/users ${datadir}/${PN}/images ${datadir}/${PN}/styles"
diff --git a/openembedded/classes/efl.bbclass b/openembedded/classes/efl.bbclass
index e5968b9aec..9c490284c2 100644
--- a/openembedded/classes/efl.bbclass
+++ b/openembedded/classes/efl.bbclass
@@ -1,18 +1,11 @@
1MAINTAINER = "Justin Patrin <papercrane@reversefold.com>" 1inherit e
2HOMEPAGE = "http://www.enlightenment.org" 2
3SECTION = "e/libs" 3SECTION = "e/libs"
4 4
5SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}" 5SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}"
6SRC_URI = "http://enlightenment.freedesktop.org/files/${SRCNAME}-${PV}.tar.gz" 6SRC_URI = "${E_URI}/${SRCNAME}-${PV}.tar.gz"
7S = "${WORKDIR}/${SRCNAME}-${PV}" 7S = "${WORKDIR}/${SRCNAME}-${PV}"
8 8
9inherit autotools pkgconfig binconfig
10
11do_prepsources () {
12 make clean distclean || true
13}
14addtask prepsources after do_fetch before do_unpack
15
16INHIBIT_AUTO_STAGE_INCLUDES = "1" 9INHIBIT_AUTO_STAGE_INCLUDES = "1"
17INHIBIT_NATIVE_STAGE_INSTALL = "1" 10INHIBIT_NATIVE_STAGE_INSTALL = "1"
18 11
@@ -20,29 +13,6 @@ libdirectory = "src/lib"
20libraries = "lib${SRCNAME}" 13libraries = "lib${SRCNAME}"
21headers = "${@bb.data.getVar('SRCNAME',d,1).capitalize()}.h" 14headers = "${@bb.data.getVar('SRCNAME',d,1).capitalize()}.h"
22 15
23def binconfig_suffix(d):
24 import bb
25 return ["","-native"][bb.data.inherits_class('native', d)]
26
27export CURL_CONFIG = "${STAGING_BINDIR}/curl-config${@binconfig_suffix(d)}"
28export EDB_CONFIG = "${STAGING_BINDIR}/edb-config${@binconfig_suffix(d)}"
29export EET_CONFIG = "${STAGING_BINDIR}/eet-config${@binconfig_suffix(d)}"
30export EVAS_CONFIG = "${STAGING_BINDIR}/evas-config${@binconfig_suffix(d)}"
31export ECORE_CONFIG = "${STAGING_BINDIR}/ecore-config${@binconfig_suffix(d)}"
32export EMBRYO_CONFIG = "${STAGING_BINDIR}/embryo-config${@binconfig_suffix(d)}"
33export ENGRAVE_CONFIG = "${STAGING_BINDIR}/engrave-config${@binconfig_suffix(d)}"
34export ENLIGHTENMENT_CONFIG = "${STAGING_BINDIR}/enlightenment-config${@binconfig_suffix(d)}"
35export EPSILON_CONFIG = "${STAGING_BINDIR}/epsilon-config${@binconfig_suffix(d)}"
36export EPEG_CONFIG = "${STAGING_BINDIR}/epeg-config${@binconfig_suffix(d)}"
37export ESMART_CONFIG = "${STAGING_BINDIR}/esmart-config${@binconfig_suffix(d)}"
38export FREETYPE_CONFIG = "${STAGING_BINDIR}/freetype-config${@binconfig_suffix(d)}"
39export IMLIB2_CONFIG = "${STAGING_BINDIR}/imlib2-config${@binconfig_suffix(d)}"
40
41do_compile_prepend() {
42 find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
43 find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:'
44}
45
46do_stage_append () { 16do_stage_append () {
47 for i in ${libraries} 17 for i in ${libraries}
48 do 18 do
@@ -73,9 +43,7 @@ do_stage_append () {
73 fi 43 fi
74} 44}
75 45
76PACKAGES = "${PN} ${PN}-themes ${PN}-dev ${PN}-examples " 46PACKAGES = "${PN} ${PN}-themes ${PN}-dev ${PN}-examples"
77FILES_${PN} = "${libdir}/lib*.so*"
78FILES_${PN}-themes = "${datadir}/${PN}/themes ${datadir}/${PN}/data ${datadir}/${PN}/fonts ${datadir}/${PN}/pointers ${datadir}/${PN}/images ${datadir}/${PN}/users ${datadir}/${PN}/images ${datadir}/${PN}/styles"
79FILES_${PN}-dev = "${bindir}/${PN}-config ${libdir}/pkgconfig ${libdir}/lib*.?a ${libdir}/lib*.a" 47FILES_${PN}-dev = "${bindir}/${PN}-config ${libdir}/pkgconfig ${libdir}/lib*.?a ${libdir}/lib*.a"
80FILES_${PN}-examples = "${bindir} ${datadir}" 48FILES_${PN}-examples = "${bindir} ${datadir}"
81 49
diff --git a/openembedded/classes/kernel.bbclass b/openembedded/classes/kernel.bbclass
index 471acd4a61..ab8c03014f 100644
--- a/openembedded/classes/kernel.bbclass
+++ b/openembedded/classes/kernel.bbclass
@@ -163,6 +163,7 @@ kernel_do_install() {
163 oe_runmake SUBDIRS="scripts/genksyms" 163 oe_runmake SUBDIRS="scripts/genksyms"
164 fi 164 fi
165 165
166 install -d ${STAGING_KERNEL_DIR}
166 cp -fR scripts ${STAGING_KERNEL_DIR}/ 167 cp -fR scripts ${STAGING_KERNEL_DIR}/
167} 168}
168 169
@@ -193,7 +194,7 @@ ALLOW_EMPTY_kernel-image = "1"
193 194
194pkg_postinst_modules () { 195pkg_postinst_modules () {
195if [ -n "$D" ]; then 196if [ -n "$D" ]; then
196 ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION} 197 ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION}
197else 198else
198 depmod -A 199 depmod -A
199 update-modules || true 200 update-modules || true
@@ -261,8 +262,9 @@ python populate_packages_prepend () {
261 kernelver_stripped = m.group(1) 262 kernelver_stripped = m.group(1)
262 path = bb.data.getVar("PATH", d, 1) 263 path = bb.data.getVar("PATH", d, 1)
263 host_prefix = bb.data.getVar("HOST_PREFIX", d, 1) or "" 264 host_prefix = bb.data.getVar("HOST_PREFIX", d, 1) or ""
265 major_version = bb.data.getVar('KERNEL_MAJOR_VERSION', d, 1)
264 266
265 cmd = "PATH=\"%s\" %sdepmod -n -a -r -b %s -F %s/boot/System.map-%s %s" % (path, host_prefix, dvar, dvar, kernelver, kernelver_stripped) 267 cmd = "PATH=\"%s\" %sdepmod-%s -n -a -r -b %s -F %s/boot/System.map-%s %s" % (path, host_prefix, major_version, dvar, dvar, kernelver, kernelver_stripped)
266 f = os.popen(cmd, 'r') 268 f = os.popen(cmd, 'r')
267 269
268 deps = {} 270 deps = {}
diff --git a/openembedded/classes/native.bbclass b/openembedded/classes/native.bbclass
index fea8048fe5..011e48cf62 100644
--- a/openembedded/classes/native.bbclass
+++ b/openembedded/classes/native.bbclass
@@ -34,6 +34,7 @@ CPPFLAGS = "${BUILD_CPPFLAGS}"
34CFLAGS = "${BUILD_CFLAGS}" 34CFLAGS = "${BUILD_CFLAGS}"
35CXXFLAGS = "${BUILD_CFLAGS}" 35CXXFLAGS = "${BUILD_CFLAGS}"
36LDFLAGS = "${BUILD_LDFLAGS}" 36LDFLAGS = "${BUILD_LDFLAGS}"
37LDFLAGS_build-darwin = "-L${STAGING_DIR}/${BUILD_SYS}/lib "
37 38
38# Path prefixes 39# Path prefixes
39base_prefix = "${exec_prefix}" 40base_prefix = "${exec_prefix}"
diff --git a/openembedded/classes/opie.bbclass b/openembedded/classes/opie.bbclass
index c00f7e19a9..47f364a644 100644
--- a/openembedded/classes/opie.bbclass
+++ b/openembedded/classes/opie.bbclass
@@ -23,7 +23,8 @@ OPIE_CVS_PV = "1.2.1+cvs-${SRCDATE}"
23DEPENDS_prepend = "${@["libopie2 ", ""][(bb.data.getVar('PN', d, 1) == 'libopie2')]}" 23DEPENDS_prepend = "${@["libopie2 ", ""][(bb.data.getVar('PN', d, 1) == 'libopie2')]}"
24 24
25# to be consistent, put all targets into workdir 25# to be consistent, put all targets into workdir
26EXTRA_QMAKEVARS_POST_append = " DESTDIR=${S}" 26# NOTE: leave one space at the end, other files are expecting that
27EXTRA_QMAKEVARS_POST += "DESTDIR=${S} "
27 28
28# Opie standard TAG value 29# Opie standard TAG value
29TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}" 30TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}"
diff --git a/openembedded/classes/package.bbclass b/openembedded/classes/package.bbclass
index fbeabb64b3..9edcc1e5ed 100644
--- a/openembedded/classes/package.bbclass
+++ b/openembedded/classes/package.bbclass
@@ -241,6 +241,14 @@ python populate_packages () {
241 return 0 241 return 0
242 return (s[stat.ST_MODE] & stat.S_IEXEC) 242 return (s[stat.ST_MODE] & stat.S_IEXEC)
243 243
244 # Sanity check PACKAGES for duplicates - should be moved to
245 # sanity.bbclass once we have he infrastucture
246 pkgs = []
247 for pkg in packages.split():
248 if pkg in pkgs:
249 bb.error("%s is listed in PACKAGES mutliple times. Undefined behaviour will result." % pkg)
250 pkgs += pkg
251
244 for pkg in packages.split(): 252 for pkg in packages.split():
245 localdata = bb.data.createCopy(d) 253 localdata = bb.data.createCopy(d)
246 root = os.path.join(workdir, "install", pkg) 254 root = os.path.join(workdir, "install", pkg)
diff --git a/openembedded/classes/palmtop.bbclass b/openembedded/classes/palmtop.bbclass
index 523c3d71bb..9d54de8748 100644
--- a/openembedded/classes/palmtop.bbclass
+++ b/openembedded/classes/palmtop.bbclass
@@ -1,10 +1,20 @@
1# basically a placeholder for something more fancy 1# this build class sets up qmake variables to
2# for now, just declare some things 2# * build using the Qt Windowing System (QWS)
3# * use qt
4# * link against supc++ instead of stdc++
5# * use threads, if requested via PALMTOP_USE_MULTITHREADED_QT = "yes"
6# inherit this class to build programs against libqpe
7# inherit opie if you want to build programs against libopie2
8# don't override EXTRA_QMAKEVARS_POST, if you use inherit this class
3 9
4inherit qmake 10inherit qmake
5 11
6EXTRA_QMAKEVARS_POST_append = " DEFINES+=QWS LIBS+=-lqpe CONFIG+=qt LIBS-=-lstdc++ LIBS+=-lsupc++" 12# special case for DISTRO = sharprom
7 13CPP_SUPPORT_LIB = "LIBS-=-lstdc++ LIBS+=-lsupc++"
8DEPENDS_prepend = "virtual/libqpe uicmoc-native " 14CPP_SUPPORT_LIB_sharprom = "LIBS-=-lstdc++"
15EXTRA_QMAKEVARS_POST += "DEFINES+=QWS CONFIG+=qt ${CPP_SUPPORT_LIB}"
16EXTRA_QMAKEVARS_POST += '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "CONFIG+=thread", "CONFIG-=thread",d)}'
17EXTRA_QMAKEVARS_POST += "${@["LIBS+=-lqpe ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}"
18DEPENDS_prepend = "${@["virtual/libqpe1 uicmoc-native ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}"
9 19
10FILES_${PN} = "${palmtopdir}" 20FILES_${PN} = "${palmtopdir}"
diff --git a/openembedded/classes/qmake-base.bbclass b/openembedded/classes/qmake-base.bbclass
index 4a360dae43..36ecfb622f 100644
--- a/openembedded/classes/qmake-base.bbclass
+++ b/openembedded/classes/qmake-base.bbclass
@@ -16,6 +16,8 @@ export OE_QMAKE_AR="${AR}"
16export OE_QMAKE_STRIP="${STRIP}" 16export OE_QMAKE_STRIP="${STRIP}"
17export OE_QMAKE_UIC="${STAGING_BINDIR}/uic" 17export OE_QMAKE_UIC="${STAGING_BINDIR}/uic"
18export OE_QMAKE_MOC="${STAGING_BINDIR}/moc" 18export OE_QMAKE_MOC="${STAGING_BINDIR}/moc"
19export OE_QMAKE_RCC="non-existant"
20export OE_QMAKE_QMAKE="${STAGING_BINDIR}/qmake"
19export OE_QMAKE_RPATH="-Wl,-rpath-link," 21export OE_QMAKE_RPATH="-Wl,-rpath-link,"
20 22
21# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11 23# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11
diff --git a/openembedded/classes/qmake.bbclass b/openembedded/classes/qmake.bbclass
index 10aa8c9f7d..4f2fceff35 100644
--- a/openembedded/classes/qmake.bbclass
+++ b/openembedded/classes/qmake.bbclass
@@ -2,7 +2,7 @@ inherit qmake-base
2 2
3qmake_do_configure() { 3qmake_do_configure() {
4 case ${QMAKESPEC} in 4 case ${QMAKESPEC} in
5 *linux-oe-g++|*linux-uclibc-oe-g++) 5 *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++)
6 ;; 6 ;;
7 *-oe-g++) 7 *-oe-g++)
8 die Unsupported target ${TARGET_OS} for oe-g++ qmake spec 8 die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
@@ -47,9 +47,9 @@ qmake_do_configure() {
47 oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}" 47 oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
48 fi 48 fi
49 49
50#oenote "Calling 'qmake -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'" 50#oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
51 unset QMAKESPEC || true 51 unset QMAKESPEC || true
52 qmake -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling qmake on $PROFILES" 52 ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
53} 53}
54 54
55EXPORT_FUNCTIONS do_configure 55EXPORT_FUNCTIONS do_configure
diff --git a/openembedded/classes/qt4x11.bbclass b/openembedded/classes/qt4x11.bbclass
index d4ca0073df..04aff565be 100644
--- a/openembedded/classes/qt4x11.bbclass
+++ b/openembedded/classes/qt4x11.bbclass
@@ -1,9 +1,14 @@
1DEPENDS_prepend = "qmake2-native "
1# 2#
2# override variables set by qmake-base to compile Qt/X11 apps 3# override variables set by qmake-base to compile Qt4/X11 apps
3# 4#
4export QTDIR="${STAGING_DIR}/${HOST_SYS}/qt4" 5export QTDIR="${STAGING_DIR}/${HOST_SYS}/qt4"
6export QMAKESPEC="${QTDIR}/mkspecs/${TARGET_OS}-oe-g++"
5export OE_QMAKE_UIC="${STAGING_BINDIR}/uic4" 7export OE_QMAKE_UIC="${STAGING_BINDIR}/uic4"
6export OE_QMAKE_MOC="${STAGING_BINDIR}/moc4" 8export OE_QMAKE_MOC="${STAGING_BINDIR}/moc4"
9export OE_QMAKE_RCC="${STAGING_BINDIR}/rcc4"
10export OE_QMAKE_QMAKE="${STAGING_BINDIR}/qmake2"
11export OE_QMAKE_LINK="${CXX}"
7export OE_QMAKE_CXXFLAGS="${CXXFLAGS}" 12export OE_QMAKE_CXXFLAGS="${CXXFLAGS}"
8export OE_QMAKE_INCDIR_QT="${QTDIR}/include" 13export OE_QMAKE_INCDIR_QT="${QTDIR}/include"
9export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib" 14export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib"
diff --git a/openembedded/classes/sanity.bbclass b/openembedded/classes/sanity.bbclass
index f82af18d74..8253b27930 100644
--- a/openembedded/classes/sanity.bbclass
+++ b/openembedded/classes/sanity.bbclass
@@ -2,11 +2,9 @@
2# Sanity check the users setup for common misconfigurations 2# Sanity check the users setup for common misconfigurations
3# 3#
4 4
5BB_MIN_VERSION = "1.3.3"
6
7def raise_sanity_error(msg): 5def raise_sanity_error(msg):
8 import bb 6 import bb
9 bb.fatal("Openembedded's config sanity checker detected a potential misconfiguration.\nEither fix cause of this error or at your own risk disable the checker (see sanity.conf).\n%s" % msg) 7 bb.fatal("Openembedded's config sanity checker detected a potential misconfiguration.\nEither fix the cause of this error or at your own risk disable the checker (see sanity.conf).\n%s" % msg)
10 8
11def check_conf_exists(fn, data): 9def check_conf_exists(fn, data):
12 import bb, os 10 import bb, os
@@ -22,37 +20,41 @@ def check_conf_exists(fn, data):
22 return True 20 return True
23 return False 21 return False
24 22
25addhandler check_sanity_eventhandler 23def check_app_exists(app, d):
26python check_sanity_eventhandler() { 24 from bb import which, data
25
26 app = data.expand(app, d)
27 path = data.getVar('PATH', d)
28 return len(which(path, app)) != 0
29
30
31def check_sanity(e):
27 from bb import note, error, data, __version__ 32 from bb import note, error, data, __version__
28 from bb.event import Handled, NotHandled, getName 33 from bb.event import Handled, NotHandled, getName
29 from distutils.version import LooseVersion 34 from distutils.version import LooseVersion
30 import os 35 import os
31 36
32 sanity_checked = bb.data.getVar('SANITY_CHECKED', e.data)
33 if sanity_checked == "1":
34 return
35
36 # Check the bitbake version meets minimum requirements 37 # Check the bitbake version meets minimum requirements
37 minversion = bb.data.getVar('BB_MIN_VERSION', e.data , True) 38 minversion = data.getVar('BB_MIN_VERSION', e.data , True)
38 if not minversion: 39 if not minversion:
39 # Hack: BB_MIN_VERSION hasn't been parsed yet so return 40 # Hack: BB_MIN_VERSION hasn't been parsed yet so return
40 # and wait for the next call 41 # and wait for the next call
42 print "Foo %s" % minversion
41 return 43 return
42 44
43 if (LooseVersion(bb.__version__) < LooseVersion(minversion)): 45 if (LooseVersion(__version__) < LooseVersion(minversion)):
44 raise_sanity_error('Bitbake version %s is required and version %s was found' % (minversion, bb.__version__)) 46 raise_sanity_error('Bitbake version %s is required and version %s was found' % (minversion, __version__))
45 47
46 # Check TARGET_ARCH is set 48 # Check TARGET_ARCH is set
47 if bb.data.getVar('TARGET_ARCH', e.data, True) == 'INVALID': 49 if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID':
48 raise_sanity_error('Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.') 50 raise_sanity_error('Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.')
49 51
50 # Check TARGET_OS is set 52 # Check TARGET_OS is set
51 if bb.data.getVar('TARGET_OS', e.data, True) == 'INVALID': 53 if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
52 raise_sanity_error('Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.') 54 raise_sanity_error('Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.')
53 55
54 # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf 56 # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
55 if "diffstat-native" not in bb.data.getVar('ASSUME_PROVIDED', e.data, True).split(): 57 if "diffstat-native" not in data.getVar('ASSUME_PROVIDED', e.data, True).split():
56 raise_sanity_error('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf') 58 raise_sanity_error('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf')
57 59
58 # Check the MACHINE is valid 60 # Check the MACHINE is valid
@@ -62,8 +64,36 @@ python check_sanity_eventhandler() {
62 # Check the distro is valid 64 # Check the distro is valid
63 if not check_conf_exists("conf/distro/${DISTRO}.conf", e.data): 65 if not check_conf_exists("conf/distro/${DISTRO}.conf", e.data):
64 raise_sanity_error('Please set a valid DISTRO in your local.conf') 66 raise_sanity_error('Please set a valid DISTRO in your local.conf')
65
66 bb.data.setVar('SANITY_CHECKED', "1", e.data)
67 return
68}
69 67
68 if not check_app_exists("${MAKE}", e.data):
69 raise_sanity_error('GNU make missing. Please install GNU make')
70
71 if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
72 raise_sanity_error('C Host-Compiler is missing, please install one' )
73
74 if not check_app_exists('${BUILD_PREFIX}g++', e.data):
75 raise_sanity_error('C++ Host-Compiler is missing, please install one' )
76
77 if not check_app_exists('patch', e.data):
78 raise_sanity_error('Please install the patch utility, preferable GNU patch.')
79
80 if not check_app_exists('diffstat', e.data):
81 raise_sanity_error('Please install the diffstat utility')
82
83 if not check_app_exists('texi2html', e.data):
84 raise_sanity_error('Please install the texi2html binary')
85
86 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
87 if not oes_bb_conf:
88 raise_sanity_error('You do not include OpenEmbeddeds version of conf/bitbake.conf')
89
90addhandler check_sanity_eventhandler
91python check_sanity_eventhandler() {
92 from bb import note, error, data, __version__
93 from bb.event import getName
94
95 if getName(e) == "BuildStarted":
96 check_sanity(e)
97
98 return NotHandled
99}
diff --git a/openembedded/classes/sdl.bbclass b/openembedded/classes/sdl.bbclass
index 541812ed93..c0b21427a4 100644
--- a/openembedded/classes/sdl.bbclass
+++ b/openembedded/classes/sdl.bbclass
@@ -1,27 +1,44 @@
1FILES_${PN} += '${libdir}/perl5' 1#
2# (C) Michael 'Mickey' Lauer <mickey@Vanille.de>
3#
2 4
3sdl_do_configure () { 5DEPENDS += "virtual/libsdl libsdl-mixer libsdl-image"
4 if [ -x ${S}/configure ] ; then
5 cfgcmd="${S}/configure \
6 -GL -GLU"
7 oenote "Running $cfgcmd..."
8 $cfgcmd || oefatal "oe_runconf failed"
9 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
10 . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh
11 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
12 mv Makefile.new Makefile
13 fi
14 else
15 oefatal "no configure script found"
16 fi
17}
18 6
19sdl_do_compile () { 7APPDESKTOP ?= "${PN}.desktop"
20 oe_runmake PASTHRU_INC="${CFLAGS}" 8APPNAME ?= "${PN}"
21} 9APPIMAGE ?= "${PN}.png"
10
11sdl_do_sdl_install() {
12 install -d ${D}${palmtopdir}/bin
13 install -d ${D}${palmtopdir}/pics
14 install -d ${D}${palmtopdir}/apps/Games
15 ln -sf ${bindir}/${APPNAME} ${D}${palmtopdir}/bin/${APPNAME}
16 install -m 0644 ${APPIMAGE} ${D}${palmtopdir}/pics/${PN}.png
22 17
23sdl_do_install () { 18 if [ -e "${APPDESKTOP}" ]
24 oe_runmake install_vendor 19 then
20 echo ${APPDESKTOP} present, installing to palmtopdir...
21 install -m 0644 ${APPDESKTOP} ${D}${palmtopdir}/apps/Games/${PN}.desktop
22 else
23 echo ${APPDESKTOP} not present, creating one on-the-fly...
24 cat >${D}${palmtopdir}/apps/Games/${PN}.desktop <<EOF
25[Desktop Entry]
26Note=Auto Generated... this may be not what you want
27Comment=${DESCRIPTION}
28Exec=${APPNAME}
29Icon=${APPIMAGE}
30Type=Application
31Name=${PN}
32EOF
33 fi
25} 34}
26 35
27EXPORT_FUNCTIONS do_configure do_compile do_install 36EXPORT_FUNCTIONS do_sdl_install
37addtask sdl_install after do_compile before do_populate_staging
38
39SECTION = "x11/games"
40SECTION_${PN}-opie = "opie/games"
41
42PACKAGES += "${PN}-opie"
43RDEPENDS_${PN}-opie += "${PN}"
44FILES_${PN}-opie = "${palmtopdir}"
diff --git a/openembedded/classes/sip.bbclass b/openembedded/classes/sip.bbclass
index 7e049bc65a..adf179b130 100644
--- a/openembedded/classes/sip.bbclass
+++ b/openembedded/classes/sip.bbclass
@@ -1,6 +1,11 @@
1DEPENDS_prepend = "sip-native python-sip " 1# Build Class for Sip based Python Bindings
2# (C) Michael 'Mickey' Lauer <mickey@Vanille.de>
3#
2 4
3#EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1" 5DEPENDS =+ "sip-native python-sip"
6
7# default stuff, do not uncomment
8# EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1"
4 9
5sip_do_generate() { 10sip_do_generate() {
6 if [ -z "${SIP_MODULES}" ]; then 11 if [ -z "${SIP_MODULES}" ]; then
diff --git a/openembedded/classes/srec.bbclass b/openembedded/classes/srec.bbclass
index ae46a407fe..e7bdc6c75d 100644
--- a/openembedded/classes/srec.bbclass
+++ b/openembedded/classes/srec.bbclass
@@ -10,6 +10,8 @@ SREC_CMD = "${TARGET_PREFIX}objcopy -O srec -I binary --adjust-vma ${SREC_VMAADD
10# Do not build srec files for these types of images: 10# Do not build srec files for these types of images:
11SREC_SKIP = "tar" 11SREC_SKIP = "tar"
12 12
13do_srec[nostamp] = 1
14
13do_srec () { 15do_srec () {
14 if [ ${SREC_VMAADDR} = "" ] ; then 16 if [ ${SREC_VMAADDR} = "" ] ; then
15 oefatal Cannot do_srec without SREC_VMAADDR defined. 17 oefatal Cannot do_srec without SREC_VMAADDR defined.