From: Robert Schuster Date: Sat, 12 Mar 2011 17:07:00 +0000 (+0100) Subject: openttd.inc: Modifications in anticipation of supporting 1.0.5 release X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=766be95d7b74afeadefebaf85c8c15385384e1eb;p=openembedded.git 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 --- diff --git a/recipes/openttd/openttd.inc b/recipes/openttd/openttd.inc index faf702ddd6..bd88a70ff2 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 d59eb6fa9c..e6ca532a74 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"