--- /dev/null
+include crimsonfields_${PV}.bb
+inherit native
+
+DEPENDS = "libsdl-native libsdl-ttf-native"
+export SDL_CONFIG = "${STAGING_BINDIR}/sdl-config-native"
+
+do_configure() {
+ gnu-configize
+ oe_runconf
+}
+
+do_compile() {
+ cd tools && oe_runmake
+}
+
+do_stage() {
+ for binary in ${HOST_TOOLS}
+ do
+ install -m 0755 tools/$binary ${STAGING_BINDIR}
+ done
+ install -m 0644 tools/default.* ${STAGING_DATADIR}
+}
+
+do_install() {
+ :
+}
+
--- /dev/null
+DESCRIPTION = "Crimson Fields is a tactical war game in the tradition of Battle Isle."
+SECTION = "games"
+DEPENDS = "crimsonfields-native virtual/libsdl libsdl-mixer libsdl-ttf"
+MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
+LICENSE = "GPL"
+PR = "r0"
+
+SRC_URI = "http://crimson.seul.org/files/crimson-${PV}.tar.bz2 \
+ file://native-tools.patch;patch=1"
+S = "${WORKDIR}/crimson-${PV}"
+
+inherit autotools
+
+HOST_TOOLS = "cfed mkdatafile mklocale mktileset mkunitset"
+
+do_configure() {
+ gnu-configize
+ oe_runconf
+ for binary in ${HOST_TOOLS}
+ do
+ install -m 0755 ${STAGING_DIR}/${BUILD_SYS}/bin/$binary tools/
+ done
+ install -m 0644 ${STAGING_DIR}/${BUILD_SYS}/share/default.* tools/
+}
+
+do_install_append() {
+ install -d ${D}${palmtopdir}/apps/Games/
+ install -d ${D}${palmtopdir}/pics/
+ install -m 0644 ${D}${datadir}/applications/crimson.desktop ${D}${palmtopdir}/apps/Games/
+ install -m 0644 ${D}${datadir}/pixmaps/*.png ${D}${palmtopdir}/pics/
+}
+
+FILES_${PN} = "${bindir} ${datadir} ${palmtopdir}"
--- /dev/null
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- crimson-0.4.8/Makefile.in~native-tools
++++ crimson-0.4.8/Makefile.in
+@@ -170,7 +170,7 @@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ EXTRA_DIST = crimson.desktop crimson.spec.in README.bi2cf README.CoMET
+-SUBDIRS = doc src tools gfx levels locale music sfx
++SUBDIRS = doc src gfx levels locale music sfx
+ DISTCHECK_CONFIGURE_FLAGS = --enable-bi2cf --enable-cf2bmp --enable-cfed --enable-comet
+ desktopdir = $(datadir)/applications
+ desktop_DATA = crimson.desktop
--- /dev/null
+DESCRIPTION = "Simple DirectMedia Layer - native Edition"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+PR = "r0"
+
+SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
+ file://extra-keys.patch;patch=1 \
+ file://acinclude.m4"
+S = "${WORKDIR}/SDL-${PV}"
+
+inherit autotools native
+
+EXTRA_OECONF = "--disable-debug --disable-cdrom --enable-threads --enable-timers --enable-endian \
+ --enable-file --disable-oss --disable-alsa --disable-esd --disable-arts \
+ --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
+ --disable-mintaudio --disable-nasm --disable-video-x11 --disable-video-dga \
+ --disable-video-fbcon --disable-video-directfb --disable-video-ps2gs \
+ --disable-video-xbios --disable-video-gem --disable-video-dummy \
+ --disable-video-opengl --enable-input-events --enable-pthreads \
+ --disable-video-picogui --disable-video-qtopia --enable-dlopen"
+
+do_configure_prepend() {
+ rm -f ${S}/acinclude.m4
+ cp ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+do_configure_append () {
+ cd ${S}
+
+ # prevent libtool from linking libs against libstdc++, libgcc, ...
+ cat ${TARGET_PREFIX}libtool | sed -e 's/postdeps=".*"/postdeps=""/' > ${TARGET_PREFIX}libtool.tmp
+ mv ${TARGET_PREFIX}libtool.tmp ${TARGET_PREFIX}libtool
+}
+
+do_stage() {
+ oe_libinstall -so -C src libSDL ${STAGING_LIBDIR}
+ ln -sf libSDL.so ${STAGING_LIBDIR}/libSDL-1.2.so
+ #oe_libinstall -a -C src/main libSDLmain ${STAGING_LIBDIR}
+ install -m 0644 src/main/libSDLmain.a ${STAGING_LIBDIR}
+
+ install -d ${STAGING_INCDIR}/SDL
+ for f in include/*.h
+ do
+ install -m 0644 $f ${STAGING_INCDIR}/SDL/
+ done
+
+ cat >${STAGING_BINDIR}/sdl-config-native <<EOF
+#!/bin/sh
+echo ""
+EOF
+ chmod a+rx ${STAGING_BINDIR}/sdl-config-native
+}
--- /dev/null
+include libsdl-ttf_${PV}.bb
+inherit native
+
+DEPENDS = "libsdl-native"
+FILESPATH = "${FILE_DIRNAME}/libsdl-ttf-${PV}:${FILE_DIRNAME}/libsdl-ttf:${FILE_DIRNAME}/files"
+
+EXTRA_OECONF = "--disable-sdltest --with-sdl-prefix=${STAGING_LIBDIR}/.."
+
+export SDL_CONFIG = "${STAGING_BINDIR}/sdl-config-native"
+
+++ /dev/null
-DESCRIPTION = "Crimson Fields is a tactical war game in the tradition of Battle Isle."
-SECTION = "games"
-PRIORITY = "optional"
-DEPENDS = "virtual/libsdl libsdl-mixer libsdl-ttf"
-MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
-LICENSE = "GPL"
-
-SRC_URI = "http://crimson.seul.org/files/crimson-${PV}.tar.bz2"
-S = "${WORKDIR}/crimson-${PV}"
-
-inherit autotools
-
-do_configure() {
- gnu-configize
- oe_runconf
-}
-
-do_compile() {
- cd tools && oe_runmake \
- CC="${BUILD_CC}" CXX="${BUILD_CXX}" LD="${BUILD_CCLD}" \
- CFLAGS="${BUILD_CFLAGS}" CXXFLAGS="${BUILD_CXXFLAGS}" LDFLAGS="${BUILD_LDFLAGS}"
- cd ${S} && oe_runmake
-}
-
-# FIXME: Add .desktop file for Opie/Qtopia