diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2006-08-28 19:59:17 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2006-08-28 19:59:17 +0000 |
commit | 9676ee574fb79549aa3fd0755905dcf6346b47ef (patch) | |
tree | beef122af47e1621d6f9394bb73d949e0b4069e5 /games-strategy | |
parent | Stable on ppc64; bug #145371 (diff) | |
download | gentoo-2-9676ee574fb79549aa3fd0755905dcf6346b47ef.tar.gz gentoo-2-9676ee574fb79549aa3fd0755905dcf6346b47ef.tar.bz2 gentoo-2-9676ee574fb79549aa3fd0755905dcf6346b47ef.zip |
rev bump from Tristan Heaven to fix bug #118911, bug #130011 and bug #144406
(Portage version: 2.1.1_rc1-r1)
Diffstat (limited to 'games-strategy')
-rw-r--r-- | games-strategy/glest/ChangeLog | 8 | ||||
-rw-r--r-- | games-strategy/glest/files/digest-glest-2.0.0-r1 | 18 | ||||
-rw-r--r-- | games-strategy/glest/files/glest-2.0.0-home.patch | 86 | ||||
-rw-r--r-- | games-strategy/glest/glest-2.0.0-r1.ebuild | 110 |
4 files changed, 221 insertions, 1 deletions
diff --git a/games-strategy/glest/ChangeLog b/games-strategy/glest/ChangeLog index 3e5e49c4b10f..1b7f8232a79f 100644 --- a/games-strategy/glest/ChangeLog +++ b/games-strategy/glest/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-strategy/glest # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/ChangeLog,v 1.11 2006/06/29 13:29:42 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/ChangeLog,v 1.12 2006/08/28 19:59:17 mr_bones_ Exp $ + +*glest-2.0.0-r1 (28 Aug 2006) + + 28 Aug 2006; Michael Sterrett <mr_bones_@gentoo.org> + +files/glest-2.0.0-home.patch, +glest-2.0.0-r1.ebuild: + rev bump from Tristan Heaven to fix bug #118911, bug #130011 and bug #144406 29 Jun 2006; Chris Gianelloni <wolf31o2@gentoo.org> glest-2.0.0.ebuild: Remove version information from openal dependency for bug #138392. diff --git a/games-strategy/glest/files/digest-glest-2.0.0-r1 b/games-strategy/glest/files/digest-glest-2.0.0-r1 new file mode 100644 index 000000000000..52eb4eeaeb7f --- /dev/null +++ b/games-strategy/glest/files/digest-glest-2.0.0-r1 @@ -0,0 +1,18 @@ +MD5 0cc6e7c7029c79f1bf61d3a3bdb441d0 francais_2.0.0.zip 1829 +RMD160 cadacef9e21c8d01435f1d8f28a36e819aaedcc4 francais_2.0.0.zip 1829 +SHA256 812f80b0c322a5387a607d5e73a6cf6942d2918a6308a8900496835d6bb7ec9e francais_2.0.0.zip 1829 +MD5 8b6902e82874011e768c64e20fbeead5 glest_data_2.0.0.zip 64826894 +RMD160 071f0e263b461f342c404acb3ec2548b97277d9c glest_data_2.0.0.zip 64826894 +SHA256 ed0ca1f9e6cbe05b87dee9257e2afbc2401e195a0618f025682dae116c1f59aa glest_data_2.0.0.zip 64826894 +MD5 f7716da7a044dbe108c619b0f52621bb glest_source_2.0.0.zip 503892 +RMD160 face82a3e35c788eb11629f4dcc9556836992b65 glest_source_2.0.0.zip 503892 +SHA256 4dea296c6b3ee0757551eb1a71f00674f5cf2df6095dec6922afb39b42df30d8 glest_source_2.0.0.zip 503892 +MD5 9869a946227b31141b4166c1ca627c9a italiano_2.0.0.zip 1802 +RMD160 5f5ed7b2ff0c7636e9f902fdd815c1457b118941 italiano_2.0.0.zip 1802 +SHA256 6ee6aef72013879248d9b4c2fd028ae95b71a7c65b745de6b1fcbabb704ea322 italiano_2.0.0.zip 1802 +MD5 f133c241ac021ad30d54d0ef48b0f64f portugues_2.0.0.zip 1863 +RMD160 b1886ecad5e2330d3d1a0deabb8e734d573f9951 portugues_2.0.0.zip 1863 +SHA256 0ee3fedcef6ce0725825a7fa6674ad1bde55276d1f3e704a7d74fb1950e3d8cf portugues_2.0.0.zip 1863 +MD5 a31d07ed2c24da87628590e43f6c131f slovak_2.0.0.zip 1721 +RMD160 7b6c23e2c10ccfaa84a457b65f4a3cb0d87a8103 slovak_2.0.0.zip 1721 +SHA256 34a7e7f456d3daed3788bbd2df96389c51cf4cd4dda8348f350d451cdcd0b016 slovak_2.0.0.zip 1721 diff --git a/games-strategy/glest/files/glest-2.0.0-home.patch b/games-strategy/glest/files/glest-2.0.0-home.patch new file mode 100644 index 000000000000..8690e47576e4 --- /dev/null +++ b/games-strategy/glest/files/glest-2.0.0-home.patch @@ -0,0 +1,86 @@ +--- source/glest_game/main/main.cpp ++++ source/glest_game/main/main.cpp +@@ -13,6 +13,7 @@ + + #include <string> + #include <cstdlib> ++#include <sys/stat.h> + + #include "game.h" + #include "main_menu.h" +@@ -129,6 +130,17 @@ + ExceptionHandler exceptionHandler; + exceptionHandler.install(); + ++ if (!getenv("HOME")) ++ throw runtime_error("HOME not set!"); ++ ++ char str[PATH_MAX]; ++ snprintf(str, PATH_MAX, "%s/.glest", getenv("HOME")); ++ mkdir(str, 0750); ++ chdir(str); ++ mkdir("screens", 0750); ++ ++ chdir("GENTOO_DATADIR"); ++ + try{ + Config &config = Config::getInstance(); + +--- source/glest_game/main/program.cpp ++++ source/glest_game/main/program.cpp +@@ -65,8 +65,11 @@ + updateCameraTimer.init(config.getInt("CameraFps"), maxTimes); + + //log start ++ char str[PATH_MAX]; ++ snprintf(str, PATH_MAX, "%s/.glest/glest.log", getenv("HOME")); ++ + Logger &logger= Logger::getInstance(); +- logger.setFile("glest.log"); ++ logger.setFile(str); + logger.clear(); + + srand(time(NULL)); +@@ -134,9 +137,10 @@ + //save screen + if(key=='T'){ + for(int i=0; i<100; ++i){ +- string path= "screens/screen" + intToStr(i) + ".tga"; ++ char path[PATH_MAX]; ++ snprintf(path, PATH_MAX, "%s/.glest/screens/screen%d.tga", getenv("HOME"), i); + +- FILE *f= fopen(path.c_str(), "rb"); ++ FILE *f= fopen(path, "rb"); + if(f==NULL){ + Renderer::getInstance().saveScreen(path); + break; + +--- source/shared_lib/sources/util/properties.cpp ++++ source/shared_lib/sources/util/properties.cpp +@@ -33,9 +33,13 @@ + + this->path= path; + +- fileStream.open(path.c_str(), ios_base::in); ++ char str[PATH_MAX]; ++ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str()); ++ fileStream.open(str, ios_base::in); + if(fileStream.fail()){ +- throw runtime_error("Can't open properties file: " + path); ++ fileStream.open(path.c_str(), ios_base::in); // use defaults ++ if(fileStream.fail()) ++ throw runtime_error("Can't open properties file: " + path); + } + + properties.clear(); +@@ -70,7 +74,9 @@ + void Properties::save(const string &path){ + ofstream fileStream; + +- fileStream.open(path.c_str(), ios_base::out | ios_base::trunc); ++ char str[PATH_MAX]; ++ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str()); ++ fileStream.open(str, ios_base::out | ios_base::trunc); + + fileStream << "; === Properties File === \n"; + fileStream << '\n'; diff --git a/games-strategy/glest/glest-2.0.0-r1.ebuild b/games-strategy/glest/glest-2.0.0-r1.ebuild new file mode 100644 index 000000000000..9804a2ebf8b2 --- /dev/null +++ b/games-strategy/glest/glest-2.0.0-r1.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/glest-2.0.0-r1.ebuild,v 1.1 2006/08/28 19:59:17 mr_bones_ Exp $ + +inherit eutils games + +DV="${PV}" +LV="${PV}" +L_URI="http://www.glest.org/files/contrib/translations" + +DESCRIPTION="Cross-platform 3D realtime strategy game" +HOMEPAGE="http://www.glest.org/" +SRC_URI="mirror://sourceforge/${PN}/${PN}_source_${PV}.zip + mirror://sourceforge/${PN}/${PN}_data_${DV}.zip + linguas_fr? ( ${L_URI}/francais_${LV}.zip ) + linguas_it? ( ${L_URI}/italiano_${LV}.zip ) + linguas_pt_BR? ( ${L_URI}/portugues_${LV}.zip ) + linguas_sk? ( ${L_URI}/slovak_${LV}.zip )" + +LICENSE="GPL-2 glest-data" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="linguas_fr linguas_it linguas_pt_BR linguas_sk" + +RDEPEND=">=media-libs/libsdl-1.2.5 + media-libs/libogg + media-libs/libvorbis + media-libs/openal + dev-libs/xerces-c + virtual/opengl + virtual/glu + || ( x11-libs/libX11 virtual/x11 )" +DEPEND="${RDEPEND} + app-arch/unzip + || ( x11-libs/libXt virtual/x11 ) + >=dev-util/jam-2.5" + +S=${WORKDIR}/${PN}_source_${PV}/mk/linux + +src_unpack() { + unpack ${A} + + local file + for file in $(find ${PN}_source_${PV} -type f); do + edos2unix "${file}" + done + + epatch "${FILESDIR}/${P}"-gcc41.patch + + cd ${PN}_source_${PV} + epatch "${FILESDIR}/${P}"-home.patch + + sed -i \ + -e "s:GENTOO_DATADIR:${GAMES_DATADIR}/${PN}:" \ + source/glest_game/main/main.cpp \ + || die "sed failed" + + cd "${S}" + chmod a+x *.sh + # sometimes they package configure, sometimes they dont + if [[ ! -e configure ]] ; then + ./autogen.sh || die "autogen failed" + fi + + sed -i \ + -e "/COMPILER_CFLAGS_optimize/s:-O3 -g3::" \ + -e "/COMPILER_C++FLAGS_optimize/s:-O3 -g3::" \ + Jamrules || die "sed flags failed" +} + +src_compile() { + # Fails with wx enabled, bug #130011 + egamesconf \ + --with-vorbis=/usr \ + --with-ogg=/usr \ + --with-wx-config=disabled_wx \ + || die + jam -q ${MAKEOPTS} || die "jam failed" +} + +src_install() { + dogamesbin glest || die "dogamesbin failed" + + insinto "${GAMES_DATADIR}"/${PN} + doins glest.ini || die "config copy failed" + + cd "${WORKDIR}"/glest_game + insinto "${GAMES_DATADIR}"/${PN} + doins -r data maps techs tilesets || die "data copy failed" + dodoc docs/readme.txt + + cd .. + insinto "${GAMES_DATADIR}"/${PN}/data/lang + if use linguas_fr ; then + doins francais.lng || die "doins failed" + fi + if use linguas_it ; then + doins italiano2_0_0.lng || die "doins failed" + fi + if use linguas_pt_BR ; then + doins tradu_pt-br.lng || die "doins failed" + fi + if use linguas_sk ; then + doins slovak.lng || die "doins failed" + fi + + make_desktop_entry glest Glest + + prepgamesdirs +} |