diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/opie.bbclass | 3 | ||||
-rw-r--r-- | classes/palmtop.bbclass | 17 | ||||
-rw-r--r-- | classes/qmake.bbclass | 2 | ||||
-rw-r--r-- | classes/sanity.bbclass | 2 | ||||
-rw-r--r-- | classes/sdl.bbclass | 61 |
5 files changed, 55 insertions, 30 deletions
diff --git a/classes/opie.bbclass b/classes/opie.bbclass index c00f7e19a9..47f364a644 100644 --- a/classes/opie.bbclass +++ b/classes/opie.bbclass @@ -23,7 +23,8 @@ OPIE_CVS_PV = "1.2.1+cvs-${SRCDATE}" DEPENDS_prepend = "${@["libopie2 ", ""][(bb.data.getVar('PN', d, 1) == 'libopie2')]}" # to be consistent, put all targets into workdir -EXTRA_QMAKEVARS_POST_append = " DESTDIR=${S}" +# NOTE: leave one space at the end, other files are expecting that +EXTRA_QMAKEVARS_POST += "DESTDIR=${S} " # Opie standard TAG value TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}" diff --git a/classes/palmtop.bbclass b/classes/palmtop.bbclass index 523c3d71bb..7c65271b91 100644 --- a/classes/palmtop.bbclass +++ b/classes/palmtop.bbclass @@ -1,10 +1,17 @@ -# basically a placeholder for something more fancy -# for now, just declare some things +# this build class sets up qmake variables to +# * build using the Qt Windowing System (QWS) +# * use qt +# * link against supc++ instead of stdc++ +# * use threads, if requested via PALMTOP_USE_MULTITHREADED_QT = "yes" +# inherit this class to build programs against libqpe +# inherit opie if you want to build programs against libopie2 +# don't override EXTRA_QMAKEVARS_POST, if you use inherit this class inherit qmake -EXTRA_QMAKEVARS_POST_append = " DEFINES+=QWS LIBS+=-lqpe CONFIG+=qt LIBS-=-lstdc++ LIBS+=-lsupc++" - -DEPENDS_prepend = "virtual/libqpe uicmoc-native " +EXTRA_QMAKEVARS_POST += "DEFINES+=QWS CONFIG+=qt LIBS-=-lstdc++ LIBS+=-lsupc++" +EXTRA_QMAKEVARS_POST += '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "CONFIG+=thread", "CONFIG-=thread",d)}' +EXTRA_QMAKEVARS_POST += "${@["LIBS+=-lqpe ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}" +DEPENDS_prepend = "${@["virtual/libqpe1 uicmoc-native ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}" FILES_${PN} = "${palmtopdir}" diff --git a/classes/qmake.bbclass b/classes/qmake.bbclass index 3a06b1af9f..4f2fceff35 100644 --- a/classes/qmake.bbclass +++ b/classes/qmake.bbclass @@ -49,7 +49,7 @@ qmake_do_configure() { #oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'" unset QMAKESPEC || true - ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling qmake on $PROFILES" + ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES" } EXPORT_FUNCTIONS do_configure diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index f03564c607..6af44ee191 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -78,7 +78,7 @@ def check_sanity(e): raise_sanity_error('Please install the patch utility, preferable GNU patch.') if not check_app_exists('diffstat', e.data): - raise_sanity_error('Please install the diffstat utilits') + raise_sanity_error('Please install the diffstat utility') if not check_app_exists('texi2html', e.data): raise_sanity_error('Please install the texi2html binary') diff --git a/classes/sdl.bbclass b/classes/sdl.bbclass index 541812ed93..c0b21427a4 100644 --- a/classes/sdl.bbclass +++ b/classes/sdl.bbclass @@ -1,27 +1,44 @@ -FILES_${PN} += '${libdir}/perl5' +# +# (C) Michael 'Mickey' Lauer <mickey@Vanille.de> +# -sdl_do_configure () { - if [ -x ${S}/configure ] ; then - cfgcmd="${S}/configure \ - -GL -GLU" - oenote "Running $cfgcmd..." - $cfgcmd || oefatal "oe_runconf failed" - if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then - . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh - 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 - mv Makefile.new Makefile - fi - else - oefatal "no configure script found" - fi -} +DEPENDS += "virtual/libsdl libsdl-mixer libsdl-image" -sdl_do_compile () { - oe_runmake PASTHRU_INC="${CFLAGS}" -} +APPDESKTOP ?= "${PN}.desktop" +APPNAME ?= "${PN}" +APPIMAGE ?= "${PN}.png" + +sdl_do_sdl_install() { + install -d ${D}${palmtopdir}/bin + install -d ${D}${palmtopdir}/pics + install -d ${D}${palmtopdir}/apps/Games + ln -sf ${bindir}/${APPNAME} ${D}${palmtopdir}/bin/${APPNAME} + install -m 0644 ${APPIMAGE} ${D}${palmtopdir}/pics/${PN}.png -sdl_do_install () { - oe_runmake install_vendor + if [ -e "${APPDESKTOP}" ] + then + echo ${APPDESKTOP} present, installing to palmtopdir... + install -m 0644 ${APPDESKTOP} ${D}${palmtopdir}/apps/Games/${PN}.desktop + else + echo ${APPDESKTOP} not present, creating one on-the-fly... + cat >${D}${palmtopdir}/apps/Games/${PN}.desktop <<EOF +[Desktop Entry] +Note=Auto Generated... this may be not what you want +Comment=${DESCRIPTION} +Exec=${APPNAME} +Icon=${APPIMAGE} +Type=Application +Name=${PN} +EOF + fi } -EXPORT_FUNCTIONS do_configure do_compile do_install +EXPORT_FUNCTIONS do_sdl_install +addtask sdl_install after do_compile before do_populate_staging + +SECTION = "x11/games" +SECTION_${PN}-opie = "opie/games" + +PACKAGES += "${PN}-opie" +RDEPENDS_${PN}-opie += "${PN}" +FILES_${PN}-opie = "${palmtopdir}" |