[oe-commits] Robert Schuster : openttd.inc: Modifications in anticipation of supporting 1.0.5 release

git version control git at git.openembedded.org
Sat Mar 12 17:52:16 UTC 2011


Module: openembedded.git
Branch: master
Commit: 766be95d7b74afeadefebaf85c8c15385384e1eb
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=766be95d7b74afeadefebaf85c8c15385384e1eb

Author: Robert Schuster <r.schuster at tarent.de>
Date:   Sat Mar 12 18:07:00 2011 +0100

openttd.inc: Modifications in anticipation of supporting 1.0.5 release
 * use tar.gz URL because tar.bz2 are not always available
 * added liblzo2 dependency and support
openttd 0.7.4: Accomodate to changes that are not compatible with this version.
 * use tar.bz2 link instead
 * use older configure invocation
 * specify deps without liblzo2

  Signed-off-by: Robert Schuster <r.schuster at tarent.de>

---

 recipes/openttd/openttd.inc      |    6 +++-
 recipes/openttd/openttd_0.7.4.bb |   46 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 49 insertions(+), 3 deletions(-)

diff --git a/recipes/openttd/openttd.inc b/recipes/openttd/openttd.inc
index faf702d..bd88a70 100644
--- a/recipes/openttd/openttd.inc
+++ b/recipes/openttd/openttd.inc
@@ -1,10 +1,11 @@
 DESCRIPTION = "Open source clone of the Microprose game 'Transport Tycoon Deluxe' - SDL edition."
 HOMEPAGE = "http://www.openttd.org"
 LICENSE = "GPLv2"
-DEPENDS = "libsdl-net libpng zlib freetype fontconfig"
+DEPENDS = "libsdl-net libpng zlib lzo2 freetype fontconfig"
+
 RRECOMMENDS_${PN} = "openttd-gfx openttd-sfx"
 
-SRC_URI ="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.bz2"
+SRC_URI ="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz"
 
 APPIMAGE = "media/openttd.128.png"
 
@@ -26,6 +27,7 @@ do_configure() {
 	--with-zlib=${STAGING_LIBDIR} \
 	--with-png \
 	--with-freetype \
+	--with-liblzo2=${STAGING_LIBDIR} \
 	--without-icu \
 	--without-allegro \
 	--cc-build='${BUILD_CC}' \
diff --git a/recipes/openttd/openttd_0.7.4.bb b/recipes/openttd/openttd_0.7.4.bb
index d59eb6f..e6ca532 100644
--- a/recipes/openttd/openttd_0.7.4.bb
+++ b/recipes/openttd/openttd_0.7.4.bb
@@ -1,6 +1,50 @@
 require openttd.inc
 
-PR = "r2"
+# lzo2 not neccessary yet in 0.7.4
+DEPENDS = "libsdl-net libpng zlib freetype fontconfig"
+
+# Using the tar.bz2 for this release (they are missing for later releases).
+SRC_URI ="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.bz2"
+
+# Version 0.7.4 can only handle opengfx
+RRECOMMENDS_${PN} = "openttd-gfx"
+
+PR = "r3"
+
+# Override this function from openttd.inc because this 0.7.4's configure does not understand the 'lzo2' specific
+# options and stops on seeing unknown options (Unlike what the real autotools would do. Hooray to people writing their
+# own build systems!).
+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. 
+
+  ${S}/configure \
+	--host=${TARGET_SYS} \
+	--windres=${MACHINE_DISPLAY_WIDTH_PIXELS}x${MACHINE_DISPLAY_HEIGHT_PIXELS} \
+	--os=UNIX \
+	--endian=${SITEINFO_ENDIANNESS} \
+	--prefix-dir=${prefix} \
+	--binary-dir=bin \
+	--with-midi=/bin/true \
+	--with-zlib=${STAGING_LIBDIR} \
+	--with-png \
+	--with-freetype \
+	--without-icu \
+	--without-allegro \
+	--cc-build='${BUILD_CC}' \
+	--cc-host='${CC}' \
+	--cxx-build='${BUILD_CXX}' \
+	--cxx-host='${CXX}' \
+	--strip='${STRIP}' \
+	--install-dir=${D}
+}
+
+do_install_append() {
+	# Provide a placeholder sample.cat to allow the game being started.
+	install -d ${D}${datadir}/games/openttd/data/
+	touch ${D}${datadir}/games/openttd/data/sample.cat
+}
 
 SRC_URI_append_shr = " file://openttd.cfg"
 





More information about the Openembedded-commits mailing list