openttd: Various changes.
authorRobert Schuster <thebohemian@gmx.net>
Wed, 20 Feb 2008 22:38:07 +0000 (22:38 +0000)
committerRobert Schuster <thebohemian@gmx.net>
Wed, 20 Feb 2008 22:38:07 +0000 (22:38 +0000)
  - added include recipe
  - added recipe for new version 0.6.0-beta4
  - fixed dependencies

packages/openttd/files/.mtn2git_empty [new file with mode: 0644]
packages/openttd/files/openttd_0.6.0-buildfix.patch [new file with mode: 0644]
packages/openttd/openttd.inc [new file with mode: 0644]
packages/openttd/openttd_0.4.0.1.bb
packages/openttd/openttd_0.6.0-beta4.bb [new file with mode: 0644]

diff --git a/packages/openttd/files/.mtn2git_empty b/packages/openttd/files/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/openttd/files/openttd_0.6.0-buildfix.patch b/packages/openttd/files/openttd_0.6.0-buildfix.patch
new file mode 100644 (file)
index 0000000..d815cfc
--- /dev/null
@@ -0,0 +1,25 @@
+Index: openttd-0.6.0-beta4/config.lib
+===================================================================
+--- openttd-0.6.0-beta4.orig/config.lib        2008-02-20 20:24:58.000000000 +0100
++++ openttd-0.6.0-beta4/config.lib     2008-02-20 20:26:55.000000000 +0100
+@@ -1255,7 +1255,7 @@
+               if [ -z "$6" ]; then
+                       compiler="$3"
+               else
+-                      compiler="$3-$6"
++                      compiler="$4"
+               fi
+               machine=`eval $compiler $9 2>/dev/null`
+               ret=$?
+@@ -1271,11 +1271,6 @@
+                       exit 1
+               fi
+-              if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then
+-                      log 1 "checking $1... expected $3, found $machine"
+-                      log 1 "the compiler suggests it doesn't build code for the machine you specified"
+-                      exit 1
+-              fi
+       elif [ -n "$4" ]; then
+               # Check for manual compiler
+               machine=`$4 $9 2>/dev/null`
diff --git a/packages/openttd/openttd.inc b/packages/openttd/openttd.inc
new file mode 100644 (file)
index 0000000..4c4c009
--- /dev/null
@@ -0,0 +1,46 @@
+# Note: OpenTTD's build system changed considerably in 0.6.x
+# This include file is written towards the newer versions.
+
+DESCRIPTION = "Open source clone of the Microprose game 'Transport Tycoon Deluxe' - SDL edition."
+HOMEPAGE = "http://openttd.sf.net"
+LICENSE = "GPLv2"
+
+DEPENDS = "libsdl-net libpng zlib freetype fontconfig"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/openttd/openttd-${PV}-source.tar.bz2"
+
+APPIMAGE = "media/openttd.48.png"
+
+inherit siteinfo sdl
+
+do_configure() {
+       # The way the OTTD configure system handles the application's directories
+  # isn't the way autotools does it. Mainly prefix is always prepended even if
+  # absolute binary-dir and data-dir is given. Sigh ...
+
+       # Disabling MIDI feature for now.
+  ./configure \
+    --build=${BUILD_SYS} \
+    --host=${TARGET_SYS} \
+    --windres=${MACHINE_DISPLAY_WIDTH_PIXELS}x${MACHINE_DISPLAY_HEIGHT_PIXELS} \
+    --os=UNIX \
+    --endian=${SITEINFO_ENDIANESS} \
+    --prefix-dir=${prefix} \
+    --binary-dir=bin \
+    --with-midi=/bin/true \
+    --with-zlib \
+    --with-png \
+    --with-freetype \
+    --cc-build=gcc \
+    --cc-host=${TARGET_SYS}-gcc \
+    --cxx-build=g++ \
+    --cxx-host=${TARGET_SYS}-g++ \
+    --strip=${TARGET_SYS}-strip \
+    --install-dir=${D}
+}
+
+do_install() {
+    oe_runmake install
+}
+
+FILES_${PN} += "${datadir}/*"
index eb5f2e2..9dab970 100644 (file)
@@ -1,11 +1,6 @@
-DESCRIPTION = "Open source clone of the Microprose game 'Transport Tycoon Deluxe' - SDL edition."
-HOMEPAGE = "http://openttd.sf.net"
-LICENSE = "GPLv2"
-PR = "r1"
+require openttd.inc
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/openttd/openttd-${PV}-source.tar.gz"
-
-APPIMAGE = "media/openttd.48.png"
+PR = "r2"
 
 EXTRA_OEMAKE = "WITH_ZLIB=1 \
                WITH_PNG=1 \
@@ -22,7 +17,9 @@ EXTRA_OEMAKE = "WITH_ZLIB=1 \
                CC_HOST=gcc \
                CC_TARGET=${TARGET_SYS}-gcc"
 
-inherit sdl
+do_configure() {
+       :
+}
 
 do_install() {
     oe_runmake install DESTDIR="${D}"
@@ -34,4 +31,3 @@ do_install() {
     install -m 0644 ${S}/data/*.grf ${D}${datadir}/games/openttd/data/
 }
 
-FILES_${PN} += "${datadir}/*"
diff --git a/packages/openttd/openttd_0.6.0-beta4.bb b/packages/openttd/openttd_0.6.0-beta4.bb
new file mode 100644 (file)
index 0000000..b984d45
--- /dev/null
@@ -0,0 +1,8 @@
+require openttd.inc 
+
+PR = "r0"
+
+SRC_URI += "file://openttd_0.6.0-buildfix.patch;patch=1"
+
+
+