From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QeYcL-0005wq-Uq for garchives@archives.gentoo.org; Wed, 06 Jul 2011 20:22:42 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BAF0B21C266; Wed, 6 Jul 2011 20:15:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id DD0C021C212 for ; Wed, 6 Jul 2011 20:07:40 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 63D222AC013 for ; Wed, 6 Jul 2011 20:07:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BA2238003D for ; Wed, 6 Jul 2011 20:07:39 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <44b2d5ca8223ee60f1488283a76c042a46359dd3.mgorny@gentoo> Subject: [gentoo-commits] proj/gamerlay:master commit in: games-strategy/widelands/, games-strategy/widelands/files/ X-VCS-Repository: proj/gamerlay X-VCS-Files: games-strategy/widelands/files/widelands-0.16-barbarian_mine.patch games-strategy/widelands/files/widelands-0.16-correct_install.patch games-strategy/widelands/files/widelands-0.16-mine_workers.patch games-strategy/widelands/metadata.xml games-strategy/widelands/widelands-0.16.ebuild X-VCS-Directories: games-strategy/widelands/ games-strategy/widelands/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 44b2d5ca8223ee60f1488283a76c042a46359dd3 Date: Wed, 6 Jul 2011 20:07:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: a2509f025fc263c6dcf54018c5786bb9 commit: 44b2d5ca8223ee60f1488283a76c042a46359dd3 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Wed Jul 6 20:07:06 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Wed Jul 6 20:07:12 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gamerlay.git;= a=3Dcommit;h=3D44b2d5ca games-strategy/widelands: Once again, add a bumped version of widelands. (Portage version: 2.2.0_alpha43_p2/git/Linux x86_64, signed Manifest comm= it 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.pat= ch new file mode 100644 index 0000000..24b53a6 --- /dev/null +++ b/games-strategy/widelands/files/widelands-0.16-barbarian_mine.patch @@ -0,0 +1,28 @@ +=3D=3D=3D 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=3Dmine + buildable=3Dno + enhanced_building=3Dyes +-output=3Dgold ++output=3Dgoldstone + enhancement=3Ddeeper_goldmine +=20 + [buildcost] +@@ -26,11 +26,11 @@ + sleep=3D42000 + consume=3Dsnack + animate=3Dworking 18000 +-mine=3Dcoal 2 66 5 +-produce=3Dgold:2 ++mine=3Dgold 2 66 5 ++produce=3Dgoldstone:2 + animate=3Dworking 18000 + mine=3Dgold 2 66 5 +-produce=3Dgold:2 ++produce=3Dgoldstone:2 +=20 + [idle] + pics=3Ddeep_goldmine_i_??.png + diff --git a/games-strategy/widelands/files/widelands-0.16-correct_instal= l.patch b/games-strategy/widelands/files/widelands-0.16-correct_install.p= atch 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 + ) +=20 +@@ -403,7 +403,7 @@ + pics + scripting + DESTINATION ${WL_INSTALL_DATADIR} +- CONFIGURATIONS Debug;Release ++ CONFIGURATIONS Debug;Release;Gentoo + COMPONENT CoreDataFiles + ) +=20 +@@ -413,7 +413,7 @@ + CREDITS + ChangeLog + DESTINATION ${WL_INSTALL_DATADIR} +- CONFIGURATIONS Debug;Release ++ CONFIGURATIONS Debug;Release;Gentoo + COMPONENT CoreLicenseFiles + ) +=20 +@@ -434,7 +434,7 @@ + DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR}/locale/ + DESTINATION ${WL_INSTALL_DATADIR}/locale +- CONFIGURATIONS Debug;Release ++ CONFIGURATIONS Debug;Release;Gentoo + COMPONENT CoreLanguageFiles + ) +=20 +--- 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) +=20 + macro(CreateLocale locale_name) + set (commands "") diff --git a/games-strategy/widelands/files/widelands-0.16-mine_workers.p= atch 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 @@ +=3D=3D=3D 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 =3D false; +- Ware_Index idx =3D widx; ++ Ware_Index idx =3D w->worker_index(); + for (Working_Position * wp =3D psite.m_working_positions;; ++wp) { + if (wp->worker_request =3D=3D &rq) { + if (wp->worker_request->get_index() =3D=3D idx) { +@@ -532,36 +532,45 @@ + } else { + // Set new request for this slot + Ware_Index workerid =3D wp->worker_request->get_index(); +- delete &rq; ++ delete wp->worker_request; + wp->worker_request =3D &psite.request_worker(workerid); + } + break; + } + } + while (!worker_placed) { ++ uint8_t nwp =3D psite.descr().nr_working_positions(); + uint8_t pos =3D 0; +- for (Working_Position * wp =3D psite.m_working_positions;; ++wp) { ++ for (Working_Position * wp =3D 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() =3D=3D idx) { + delete wp->worker_request; + *wp =3D Working_Position(0, w); + worker_placed =3D true; ++ break; + } +- pos++; ++ ++pos; + } +- // Find the next smaller version of this worker +- Ware_Index nuwo =3D psite.tribe().get_nrworkers(); +- Ware_Index current =3D Ware_Index(static_cast(0)); +- for (; current < nuwo; ++nuwo) { +- Worker_Descr const * worker =3D psite.tribe().get_worker_descr(curre= nt); +- if (worker->becomes() =3D=3D idx) { +- idx =3D current; +- break; ++ if (!worker_placed) { ++ // Find the next smaller version of this worker ++ Ware_Index nuwo =3D psite.tribe().get_nrworkers(); ++ Ware_Index current =3D Ware_Index(static_cast(0)); ++ for (; current < nuwo; ++current) { ++ Worker_Descr const * worker =3D psite.tribe().get_worker_descr(curr= ent); ++ if (worker->becomes() =3D=3D idx) { ++ idx =3D current; ++ break; ++ } + } ++ if (current =3D=3D 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 =3D 0; + } +- if (current =3D=3D nuwo) +- throw wexception("Something went wrong! No fitting place for worker = found!"); + } +=20 + // It's always the first worker doing building work, + diff --git a/games-strategy/widelands/metadata.xml b/games-strategy/widel= ands/metadata.xml new file mode 100644 index 0000000..af81389 --- /dev/null +++ b/games-strategy/widelands/metadata.xml @@ -0,0 +1,9 @@ + + + + no-herd + + mgorny@gentoo.org + Micha=C5=82 G=C3=B3rny + + diff --git a/games-strategy/widelands/widelands-0.16.ebuild b/games-strat= egy/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=3D2 +inherit eutils versionator cmake-utils games + +MY_PV=3Dbuild$(get_version_component_range 2) +MY_P=3D${PN}-${MY_PV}-src +DESCRIPTION=3D"A game similar to Settlers 2" +HOMEPAGE=3D"http://www.widelands.org/" +SRC_URI=3D"http://launchpad.net/widelands/${MY_PV}/${MY_PV}/+download/${= MY_P}.tar.bz2" + +LICENSE=3D"GPL-2" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~ppc ~x86" +IUSE=3D"" + +RDEPEND=3D"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=3D"${RDEPEND} + dev-libs/boost" + +S=3D${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+=3D( + '-DWL_VERSION_STANDARD=3Dtrue' + "-DCMAKE_INSTALL_PREFIX=3D${GAMES_DATADIR}/${PN}" + "-DWL_INSTALL_PREFIX=3D${GAMES_PREFIX}" + "-DWL_INSTALL_DATADIR=3D${GAMES_DATADIR}/${PN}" + "-DWL_INSTALL_LOCALEDIR=3Dlocale" + "-DWL_INSTALL_BINDIR=3D${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 +}