wesnoth: only compile tiny GUI when screen is smaller than 800x480(smallgui)
authorDenis 'Gnutoo' Carikli <GNUtoo@no-log.org>
Fri, 12 Feb 2010 17:32:31 +0000 (18:32 +0100)
committerDenis 'Gnutoo' Carikli <GNUtoo@no-log.org>
Sat, 13 Feb 2010 01:04:52 +0000 (02:04 +0100)
Wesnoth has a compile time option for making it work on smaller screen
  The minimum is 400x300,else you would have to modify
  /usr/share/wesnoth/data/themes/default.cfg to support your resolution.
  Basically it uses imagemagick-native to shrink the graphics,which leads
  to some problems like for instance:
   *Only a flag can be seen instead of a full village
   *The forest look like grass

recipes/wesnoth/wesnoth_1.6.5.bb

index cd1a50d..3c8a451 100644 (file)
@@ -3,7 +3,8 @@ HOMEPAGE = "http://www.wesnoth.org/"
 SECTION = "games"
 LICENSE = "GPL"
 
-DEPENDS = "freetype libsdl-image libsdl-mixer libsdl-net libsdl-ttf zlib boost imagemagick-native pango libpng"
+DEPENDS = "freetype libsdl-image libsdl-mixer libsdl-net libsdl-ttf zlib boost pango libpng \
+${@base_ifelse(( int(bb.data.getVar('MACHINE_DISPLAY_WIDTH_PIXELS', d, 1) ) < 800 ) or ( int(bb.data.getVar('MACHINE_DISPLAY_HEIGHT_PIXELS',d,1) )< 480 ),"imagemagick-native","")}"
 PR = "r0"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/wesnoth/${PN}-${PV}.tar.bz2;name=tarball"
@@ -15,7 +16,7 @@ ARM_INSTRUCTION_SET = "arm"
 inherit cmake
 
 EXTRA_OECMAKE = "\
-       -DGUI=tiny \
+       ${@base_ifelse( ( ( int(bb.data.getVar('MACHINE_DISPLAY_WIDTH_PIXELS', d, 1) ) < 800 ) or (  int(bb.data.getVar('MACHINE_DISPLAY_HEIGHT_PIXELS',d,1) ) < 480 ) ),"-DGUI=tiny","")} \
        -DENABLE_EDITOR=ON \
        -DENABLE_LOW_MEM=ON \
        -DENABLE_FRIBIDI=OFF \