[oe-commits] Denis 'GNUtoo' Carikli : wesnoth: add inc factorized 1.8.4 version, with normal and wvga versions

git version control git at git.openembedded.org
Sun Sep 19 19:40:12 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 058f70b656af85cf43ee4d001df83267257a46c1
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=058f70b656af85cf43ee4d001df83267257a46c1

Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date:   Sat Sep 18 16:29:45 2010 +0200

wesnoth: add inc factorized 1.8.4 version, with normal and wvga versions

Wesnoth is a strategy game and features more than one type of GUI,
each GUI type(normal,smallGUI,tinyGUI) has some minimum resolution constraint.
If the minimum resolution is not met, the game abort due to some asertions
in the code.

Unlike the choice between normal and smallGUI that can be made at runtime,
choosing,or not the --smallgui comand line option, the tinyGUI choice must
be defined at compile time(configure option),because it scales the graphics.

On devices like the nokia900, which have a 800x480 resolution,
the tinyGUI is not necessary anymore, and it's better to disable it because
the tinyGUI has some scalling issues among other GUI related issues.
(vilagges can only be distinguished as a flag)

The wvga version is like the Desktop version of wesnoth,if someone wants
to play it on a wvga screen he has to run wesnoth --smallgui.

Note that wesnothd was renamed to wesnoth-server(conversation from #oe on freenode):
  <GNUtoo|laptop> I've locally made wesnoth into an inc and made wesnoth-wvga and wesnoth
  <GNUtoo|laptop> the issue is wesnothd
  <GNUtoo|laptop> I rename it to ${PN}-server
  <GNUtoo|laptop> ?
  <GNUtoo|laptop> what about the upgrade path
  * dth_ntb (~dth at a89-183-26-221.net-htp.de) has joined #oe
  <woglinde> sure why not
  <woglinde> you are the only active user so far
  <woglinde> so go on

---

 recipes/wesnoth/wesnoth-wvga_1.8.4.bb |    8 ++
 recipes/wesnoth/wesnoth.inc           |  175 +++++++++++++++++++++++++++++++++
 recipes/wesnoth/wesnoth_1.8.4.bb      |    9 ++
 3 files changed, 192 insertions(+), 0 deletions(-)

diff --git a/recipes/wesnoth/wesnoth-wvga_1.8.4.bb b/recipes/wesnoth/wesnoth-wvga_1.8.4.bb
new file mode 100644
index 0000000..6c80cd3
--- /dev/null
+++ b/recipes/wesnoth/wesnoth-wvga_1.8.4.bb
@@ -0,0 +1,8 @@
+require wesnoth.inc
+
+RCONFLICTS = "wesnoth"
+
+PR = "${INC_PR}.0"
+
+SRC_URI[md5sum] = "2dce83f835ecce1d505ea60e46b7356f"
+SRC_URI[sha256sum] = "af29ddf40f83ee016972d6edb8761d7323f8ed5d6bf15005659bff4fd7190eb9"
diff --git a/recipes/wesnoth/wesnoth.inc b/recipes/wesnoth/wesnoth.inc
new file mode 100644
index 0000000..8d20f65
--- /dev/null
+++ b/recipes/wesnoth/wesnoth.inc
@@ -0,0 +1,175 @@
+DESCRIPTION = "The Battle for Wesnoth is a turn-based strategy game with a fantasy theme."
+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"
+INC_PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/wesnoth/wesnoth-${PV}.tar.bz2"
+S = "${WORKDIR}/wesnoth-${PV}"
+
+ARM_INSTRUCTION_SET = "arm"
+
+inherit cmake
+
+EXTRA_OECMAKE = "\
+	-DENABLE_EDITOR=ON \
+	-DENABLE_LOW_MEM=ON \
+	-DENABLE_FRIBIDI=OFF \
+	\
+	-DCMAKE_BUILD_TYPE=Debug \
+	"
+	
+PACKAGES = "${PN}-editor ${PN}-doc ${PN}-music ${PN}-sounds \
+	${PN}-aoi ${PN}-did ${PN}-ei ${PN}-httt ${PN}-l \
+	${PN}-nr ${PN}-sof ${PN}-sotbe ${PN}-thot ${PN}-trow \
+	${PN}-tsg ${PN}-tb ${PN}-utbs ${PN}-low\
+	${PN}-data \
+	${PN}-all-campaigns \
+	${PN}-all \
+	${PN} ${PN}-dbg \
+	${PN}-server \
+	"
+
+DESCRIPTION_${PN}-editor = "Map Editor for The Battle for ${PN}"
+DESCRIPTION_${PN}-all = "The Battle for ${PN} with all campaigns, music and sounds"
+DESCRIPTION_${PN}-all-campaigns = "The Battle for ${PN} with all campaigns."
+DESCRIPTION_${PN}-sounds = "Optional sound package for The Battle for ${PN}"
+DESCRIPTION_${PN}-music = "Optional music package for The Battle for ${PN}"
+DESCRIPTION_${PN}-data = "Mandatory data package for The Battle for ${PN}"
+DESCRIPTION_${PN}-server = "Optional Battle for Wesnoth server"
+
+do_configure_prepend(){
+	export HOST_SYS="${HOST_SYS}"
+	export BUILD_SYS="${BUILD_SYS}"
+	export STAGING_LIBDIR="${STAGING_LIBDIR}"
+	export STAGING_INCDIR="${STAGING_INCDIR}"
+	rm -f ${S}/cmake/FindBoost.cmake
+}
+
+do_install_append() {
+	#ugly hack but otherwise it would have required to
+	#have MANDIR:STRING=share/man that would require a 
+	#second python function
+	if [ -d ${D}${prefix}/man ];then
+		mv ${D}${prefix}/man ${D}${mandir}
+	fi
+}
+
+RDEPENDS_${PN} = "${PN}-data libpng"
+
+RDEPENDS_${PN}-editor = "${PN}-data"
+
+RDEPENDS_${PN}-all-campaigns = "${PN} \
+	${PN}-aoi ${PN}-did ${PN}-ei ${PN}-httt ${PN}-l \
+	${PN}-nr ${PN}-sof ${PN}-sotbe ${PN}-thot ${PN}-trow \
+	${PN}-tsg ${PN}-tb ${PN}-utbs ${PN}-low"
+
+# Installing wesnoth-all should pull everything in (like in Debian).
+RDEPENDS_${PN}-all = "${PN} ${PN}-sounds ${PN}-music"
+
+FILES_${PN}-music = "\
+	${datadir}/wesnoth/data/core/music \
+"
+
+FILES_${PN}-sounds = "\
+	${datadir}/wesnoth/data/core/sounds \
+"
+
+# Picks up remaining translations and data. Must be packaged after
+# wesnoth-music, wesnoth-sounds and all campaigns.
+FILES_${PN}-data = "\
+  ${datadir}/wesnoth/sounds \
+  ${datadir}/wesnoth/images \
+  ${datadir}/wesnoth/data \
+  ${datadir}/wesnoth/fonts \
+  ${datadir}/wesnoth/translations \
+"
+
+FILES_${PN} = "\
+  	${bindir}/wesnoth \
+	${datadir}/icons \
+	${datadir}/applications/wesnoth.desktop \
+	${datadir}/pixmaps/wesnoth-icon.png \
+"
+
+FILES_${PN}-server = "\
+	${bindir}/wesnothd \
+"
+
+FILES_${PN}-low ="\
+       ${datadir}/wesnoth/data/campaigns/Legend_of_Wesmere \
+       ${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-aoi.mo \
+"
+
+FILES_${PN}-editor = "\
+	${bindir}/wesnoth_editor \
+	${datadir}/applications/wesnoth_editor.desktop \
+	${datadir}/pixmaps/wesnoth_editor-icon.png \
+"
+
+FILES_${PN}-aoi = "\
+	${datadir}/wesnoth/data/campaigns/An_Orcish_Incursion \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-aoi.mo \
+"
+
+FILES_${PN}-did = "\
+	${datadir}/wesnoth/data/campaigns/Descent_Into_Darkness \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-did.mo \
+"
+
+FILES_${PN}-ei = "\
+	${datadir}/wesnoth/data/campaigns/Eastern_Invasion \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-ei.mo \
+"
+
+FILES_${PN}-httt = "\
+	${datadir}/wesnoth/data/campaigns/Heir_To_The_Throne \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-httt.mo \
+"
+
+FILES_${PN}-l = "\
+	${datadir}/wesnoth/data/campaigns/Liberty \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-l.mo \
+"
+
+FILES_${PN}-nr = "\
+	${datadir}/wesnoth/data/campaigns/Northern_Rebirth \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-nr.mo \
+"
+
+FILES_${PN}-sof = "\
+	${datadir}/wesnoth/data/campaigns/Sceptre_Of_Fire \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-sof.mo \
+"
+
+FILES_${PN}-sotbe = "\
+	${datadir}/wesnoth/data/campaigns/Son_Of_The_Black_Eye \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-sotbe.mo \
+"
+
+FILES_${PN}-thot = "\
+	${datadir}/wesnoth/data/campaigns/The_Hammer_Of_Thursagan \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-thot.mo \
+"
+
+FILES_${PN}-trow = "\
+	${datadir}/wesnoth/data/campaigns/The_Rise_Of_Wesnoth \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-trow.mo \
+"
+
+FILES_${PN}-tsg = "\
+	${datadir}/wesnoth/data/campaigns/The_South_Guard \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-tsg.mo \
+"
+
+FILES_${PN}-tb = "\
+	${datadir}/wesnoth/data/campaigns/Two_Brothers \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-tb.mo \
+"
+
+FILES_${PN}-utbs = "\
+	${datadir}/wesnoth/data/campaigns/Under_the_Burning_Suns \
+	${datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-utbs.mo \
+"
diff --git a/recipes/wesnoth/wesnoth_1.8.4.bb b/recipes/wesnoth/wesnoth_1.8.4.bb
new file mode 100644
index 0000000..81cb65c
--- /dev/null
+++ b/recipes/wesnoth/wesnoth_1.8.4.bb
@@ -0,0 +1,9 @@
+require wesnoth.inc
+
+PR = "${INC_PR}.0"
+
+RCONFLICTS = "wesnoth-wvga"
+EXTRA_OECMAKE += " -DGUI=tiny "
+
+SRC_URI[md5sum] = "2dce83f835ecce1d505ea60e46b7356f"
+SRC_URI[sha256sum] = "af29ddf40f83ee016972d6edb8761d7323f8ed5d6bf15005659bff4fd7190eb9"





More information about the Openembedded-commits mailing list