public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gamerlay:master commit in: games-strategy/widelands/, games-strategy/widelands/files/
Date: Wed,  6 Jul 2011 20:07:39 +0000 (UTC)	[thread overview]
Message-ID: <44b2d5ca8223ee60f1488283a76c042a46359dd3.mgorny@gentoo> (raw)

commit:     44b2d5ca8223ee60f1488283a76c042a46359dd3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  6 20:07:06 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jul  6 20:07:12 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gamerlay.git;a=commit;h=44b2d5ca

games-strategy/widelands: Once again, add a bumped version of widelands.

(Portage version: 2.2.0_alpha43_p2/git/Linux x86_64, signed Manifest commit with key 42B9401D)

---
 .../files/widelands-0.16-barbarian_mine.patch      |   28 ++++++++
 .../files/widelands-0.16-correct_install.patch     |   60 ++++++++++++++++
 .../files/widelands-0.16-mine_workers.patch        |   73 ++++++++++++++++++++
 games-strategy/widelands/metadata.xml              |    9 +++
 games-strategy/widelands/widelands-0.16.ebuild     |   64 +++++++++++++++++
 5 files changed, 234 insertions(+), 0 deletions(-)

diff --git a/games-strategy/widelands/files/widelands-0.16-barbarian_mine.patch b/games-strategy/widelands/files/widelands-0.16-barbarian_mine.patch
new file mode 100644
index 0000000..24b53a6
--- /dev/null
+++ b/games-strategy/widelands/files/widelands-0.16-barbarian_mine.patch
@@ -0,0 +1,28 @@
+=== modified file 'tribes/barbarians/deep_goldmine/conf'
+--- tribes/barbarians/deep_goldmine/conf	2011-02-06 18:37:27 +0000
++++ tribes/barbarians/deep_goldmine/conf	2011-04-12 18:25:12 +0000
+@@ -1,7 +1,7 @@
+ size=mine
+ buildable=no
+ enhanced_building=yes
+-output=gold
++output=goldstone
+ enhancement=deeper_goldmine
+ 
+ [buildcost]
+@@ -26,11 +26,11 @@
+ sleep=42000
+ consume=snack
+ animate=working 18000
+-mine=coal 2 66 5
+-produce=gold:2
++mine=gold 2 66 5
++produce=goldstone:2
+ animate=working 18000
+ mine=gold 2 66 5
+-produce=gold:2
++produce=goldstone:2
+ 
+ [idle]
+ pics=deep_goldmine_i_??.png
+

diff --git a/games-strategy/widelands/files/widelands-0.16-correct_install.patch b/games-strategy/widelands/files/widelands-0.16-correct_install.patch
new file mode 100644
index 0000000..7934ba8
--- /dev/null
+++ b/games-strategy/widelands/files/widelands-0.16-correct_install.patch
@@ -0,0 +1,60 @@
+--- CMakeLists.txt	2011-04-04 12:03:24.000000000 +0200
++++ CMakeLists.txt	2011-04-04 23:25:12.000000000 +0200
+@@ -337,7 +337,7 @@
+ install (
+   FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION
+   DESTINATION ${WL_INSTALL_DATADIR}
+-  CONFIGURATIONS Debug;Release
++  CONFIGURATIONS Debug;Release;Gentoo
+   COMPONENT CoreVersionFile
+ )
+ 
+@@ -403,7 +403,7 @@
+     pics
+     scripting
+   DESTINATION ${WL_INSTALL_DATADIR}
+-  CONFIGURATIONS Debug;Release
++  CONFIGURATIONS Debug;Release;Gentoo
+   COMPONENT CoreDataFiles
+ )
+ 
+@@ -413,7 +413,7 @@
+     CREDITS
+     ChangeLog
+   DESTINATION ${WL_INSTALL_DATADIR}
+-  CONFIGURATIONS Debug;Release
++  CONFIGURATIONS Debug;Release;Gentoo
+   COMPONENT CoreLicenseFiles
+ )
+ 
+@@ -434,7 +434,7 @@
+   DIRECTORY
+     ${CMAKE_CURRENT_BINARY_DIR}/locale/
+   DESTINATION ${WL_INSTALL_DATADIR}/locale
+-  CONFIGURATIONS Debug;Release
++  CONFIGURATIONS Debug;Release;Gentoo
+   COMPONENT CoreLanguageFiles
+ )
+ 
+--- po/CMakeLists.txt	2011-04-04 12:03:24.000000000 +0200
++++ po/CMakeLists.txt	2011-04-04 23:28:46.000000000 +0200
+@@ -1,8 +1,8 @@
+-if (${CMAKE_BUILD_TYPE} STREQUAL Release)
++if (${CMAKE_BUILD_TYPE} STREQUAL Gentoo)
+   add_custom_target (
+     lang ALL
+   )
+-else (${CMAKE_BUILD_TYPE} STREQUAL Release)
++else (${CMAKE_BUILD_TYPE} STREQUAL Gentoo)
+   add_custom_target (
+     lang_dummy ALL
+     COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/locale
+@@ -11,7 +11,7 @@
+   add_custom_target (
+     lang
+   )
+-endif (${CMAKE_BUILD_TYPE} STREQUAL Release)
++endif (${CMAKE_BUILD_TYPE} STREQUAL Gentoo)
+ 
+ macro(CreateLocale locale_name)
+   set (commands "")

diff --git a/games-strategy/widelands/files/widelands-0.16-mine_workers.patch b/games-strategy/widelands/files/widelands-0.16-mine_workers.patch
new file mode 100644
index 0000000..52bccca
--- /dev/null
+++ b/games-strategy/widelands/files/widelands-0.16-mine_workers.patch
@@ -0,0 +1,73 @@
+=== modified file 'src/logic/productionsite.cc'
+--- src/logic/productionsite.cc	2011-02-06 12:11:23 +0000
++++ src/logic/productionsite.cc	2011-05-08 13:39:23 +0000
+@@ -521,7 +521,7 @@
+ 	// needs a worker like the one just arrived. That way it is of course still possible, that the worker is
+ 	// placed on the slot that originally requested the arrived worker.
+ 	bool worker_placed = false;
+-	Ware_Index     idx = widx;
++	Ware_Index     idx = w->worker_index();
+ 	for (Working_Position * wp = psite.m_working_positions;; ++wp) {
+ 		if (wp->worker_request == &rq) {
+ 			if (wp->worker_request->get_index() == idx) {
+@@ -532,36 +532,45 @@
+ 			} else {
+ 				// Set new request for this slot
+ 				Ware_Index workerid = wp->worker_request->get_index();
+-				delete &rq;
++				delete wp->worker_request;
+ 				wp->worker_request = &psite.request_worker(workerid);
+ 			}
+ 			break;
+ 		}
+ 	}
+ 	while (!worker_placed) {
++		uint8_t nwp = psite.descr().nr_working_positions();
+ 		uint8_t pos = 0;
+-		for (Working_Position * wp = psite.m_working_positions;; ++wp) {
++		for (Working_Position * wp = psite.m_working_positions; pos < nwp; ++wp) {
+ 			// Find a fitting slot
+-			if ((wp->worker_request) && !worker_placed)
++			if (!wp->worker && !worker_placed)
+ 				if (wp->worker_request->get_index() == idx) {
+ 					delete wp->worker_request;
+ 					*wp = Working_Position(0, w);
+ 					worker_placed = true;
++					break;
+ 				}
+-			pos++;
++			++pos;
+ 		}
+-		// Find the next smaller version of this worker
+-		Ware_Index nuwo    = psite.tribe().get_nrworkers();
+-		Ware_Index current = Ware_Index(static_cast<size_t>(0));
+-		for (; current < nuwo; ++nuwo) {
+-			Worker_Descr const * worker = psite.tribe().get_worker_descr(current);
+-			if (worker->becomes() == idx) {
+-				idx = current;
+-				break;
++		if (!worker_placed) {
++			// Find the next smaller version of this worker
++			Ware_Index nuwo    = psite.tribe().get_nrworkers();
++			Ware_Index current = Ware_Index(static_cast<size_t>(0));
++			for (; current < nuwo; ++current) {
++				Worker_Descr const * worker = psite.tribe().get_worker_descr(current);
++				if (worker->becomes() == idx) {
++					idx = current;
++					break;
++				}
+ 			}
++			if (current == nuwo)
++				throw
++					wexception
++						("Something went wrong! No fitting place for worker %s in %s at (%u, %u) found!",
++						 w->descr().descname().c_str(), psite.descr().descname().c_str(),
++						 psite.get_position().x, psite.get_position().y);
++			pos = 0;
+ 		}
+-		if (current == nuwo)
+-			throw wexception("Something went wrong! No fitting place for worker found!");
+ 	}
+ 
+ 	// It's always the first worker doing building work,
+

diff --git a/games-strategy/widelands/metadata.xml b/games-strategy/widelands/metadata.xml
new file mode 100644
index 0000000..af81389
--- /dev/null
+++ b/games-strategy/widelands/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>no-herd</herd>
+	<maintainer>
+		<email>mgorny@gentoo.org</email>
+		<name>Michał Górny</name>
+	</maintainer>
+</pkgmetadata>

diff --git a/games-strategy/widelands/widelands-0.16.ebuild b/games-strategy/widelands/widelands-0.16.ebuild
new file mode 100644
index 0000000..9a9b263
--- /dev/null
+++ b/games-strategy/widelands/widelands-0.16.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+inherit eutils versionator cmake-utils games
+
+MY_PV=build$(get_version_component_range 2)
+MY_P=${PN}-${MY_PV}-src
+DESCRIPTION="A game similar to Settlers 2"
+HOMEPAGE="http://www.widelands.org/"
+SRC_URI="http://launchpad.net/widelands/${MY_PV}/${MY_PV}/+download/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="dev-games/ggz-client-libs
+	dev-lang/lua
+	virtual/jpeg
+	media-libs/glew
+	media-libs/libpng:0
+	media-libs/libsdl[video]
+	media-libs/sdl-image[jpeg,png]
+	media-libs/sdl-mixer[vorbis]
+	media-libs/sdl-gfx
+	media-libs/sdl-net
+	media-libs/sdl-ttf
+	media-libs/tiff"
+DEPEND="${RDEPEND}
+	dev-libs/boost"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+	epatch "${FILESDIR}"/widelands-0.16-barbarian_mine.patch
+	epatch "${FILESDIR}"/widelands-0.16-correct_install.patch
+	epatch "${FILESDIR}"/widelands-0.16-mine_workers.patch
+}
+
+src_configure() {
+	mycmakeargs+=(
+		'-DWL_VERSION_STANDARD=true'
+		"-DCMAKE_INSTALL_PREFIX=${GAMES_DATADIR}/${PN}"
+		"-DWL_INSTALL_PREFIX=${GAMES_PREFIX}"
+		"-DWL_INSTALL_DATADIR=${GAMES_DATADIR}/${PN}"
+		"-DWL_INSTALL_LOCALEDIR=locale"
+		"-DWL_INSTALL_BINDIR=${GAMES_BINDIR}"
+	)
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile -j1
+}
+
+src_install() {
+	cmake-utils_src_install
+	newicon pics/wl-ico-128.png ${PN}.png || die
+	make_desktop_entry ${PN} Widelands
+	dodoc ChangeLog CREDITS
+	prepgamesdirs
+}



             reply	other threads:[~2011-07-06 20:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 20:07 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-15 17:52 [gentoo-commits] proj/gamerlay:master commit in: games-strategy/widelands/, games-strategy/widelands/files/ Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44b2d5ca8223ee60f1488283a76c042a46359dd3.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox