From 47b67868da00eac56f2ab5d4a4d739d06b40832a Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Sun, 4 Nov 2012 18:30:21 +0000 Subject: Build with boost-1.50 Bug #425606 (Portage version: 2.1.11.31/cvs/Linux i686, signed Manifest commit with key 0145142D) --- games-strategy/galaxyhack/ChangeLog | 8 ++- .../files/galaxyhack-1.74-boost-1.50.patch | 77 ++++++++++++++++++++++ games-strategy/galaxyhack/galaxyhack-1.74.ebuild | 12 ++-- 3 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 games-strategy/galaxyhack/files/galaxyhack-1.74-boost-1.50.patch (limited to 'games-strategy') diff --git a/games-strategy/galaxyhack/ChangeLog b/games-strategy/galaxyhack/ChangeLog index 8ae44cb1806d..691635422ea6 100644 --- a/games-strategy/galaxyhack/ChangeLog +++ b/games-strategy/galaxyhack/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-strategy/galaxyhack -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/galaxyhack/ChangeLog,v 1.9 2011/06/17 12:35:23 tupone Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/galaxyhack/ChangeLog,v 1.10 2012/11/04 18:30:21 tupone Exp $ + + 04 Nov 2012; Tupone Alfredo galaxyhack-1.74.ebuild, + +files/galaxyhack-1.74-boost-1.50.patch: + Build with boost-1.50 Bug #425606 by Diego 17 Jun 2011; Tupone Alfredo files/galaxyhack-1.74-gentoo.patch: Fix underlink. Bug #369041 by Diego Elio Pettenò diff --git a/games-strategy/galaxyhack/files/galaxyhack-1.74-boost-1.50.patch b/games-strategy/galaxyhack/files/galaxyhack-1.74-boost-1.50.patch new file mode 100644 index 000000000000..1b630c66fb20 --- /dev/null +++ b/games-strategy/galaxyhack/files/galaxyhack-1.74-boost-1.50.patch @@ -0,0 +1,77 @@ +--- ForceSelectWin.cpp.orig 2012-08-20 17:35:01.000000000 +0200 ++++ ForceSelectWin.cpp 2012-08-20 17:47:19.000000000 +0200 +@@ -1596,15 +1596,15 @@ + fs::directory_iterator directoryEnd; // default construction yields past-the-end + for (fs::directory_iterator iter(sourcePath); iter != directoryEnd; ++iter) { + if (is_directory(*iter)) { +- fs::create_directory(destPath.string() + "/" + iter->leaf()); +- DoCopy(sourcePath.string() + "/" + iter->leaf(), destPath.string() + "/" + iter->leaf()); ++ fs::create_directory(destPath.string() + "/" + iter->path().filename().string()); ++ DoCopy(sourcePath.string() + "/" + iter->path().filename().string(), destPath.string() + "/" + iter->path().filename().string()); + continue; + } + string destFile; +- if (iter->leaf() == sideName + ".dat") ++ if (iter->path().filename() == sideName + ".dat") + destFile = theInput + ".dat"; + else +- destFile = iter->leaf(); ++ destFile = iter->path().filename().string(); + + fs::copy_file(*iter, destPath.string() + "/" + destFile); + } +--- Main.cpp.orig 2012-08-20 17:48:13.000000000 +0200 ++++ Main.cpp 2012-08-20 17:50:51.000000000 +0200 +@@ -339,12 +339,6 @@ + + void GameInit(char* argv[]) { + namespace fs = boost::filesystem; +- //boost is really quite stupid +- #ifndef WIN32 +- fs::path::default_name_check(fs::windows_name); +- #else +- fs::path::default_name_check(fs::native); +- #endif + + FindHomePath(); + LoadSettings(argv); +--- Menu_Base.cpp.orig 2012-08-20 17:51:05.000000000 +0200 ++++ Menu_Base.cpp 2012-08-20 17:52:15.000000000 +0200 +@@ -206,7 +206,7 @@ + + fs::directory_iterator directoryEnd; // default construction yields past-the-end + for (fs::directory_iterator iter(directory); iter != directoryEnd; ++iter) { +- string filename = iter->leaf(); ++ string filename = iter->path().filename().string(); + + if (filename.find('.') == filename.npos) + continue; +@@ -237,7 +237,7 @@ + fs::directory_iterator directoryEnd; // default construction yields past-the-end + for (fs::directory_iterator iter(globalSettings.bdp + "fleets/"); iter != directoryEnd; ++iter) { + if (fs::is_directory(*iter)) { +- string fleetName = iter->leaf(); ++ string fleetName = iter->path().filename().string(); + + if (CheckFleetExists(fleetName)) { + tempItem.desc = fleetName; +@@ -261,7 +261,7 @@ + fs::path iterPath(GetFleetDir(whichSide)); + fs::directory_iterator directoryEnd; // default construction yields past-the-end + for (fs::directory_iterator iter(iterPath); iter != directoryEnd; ++iter) { +- string filename = iter->leaf(); ++ string filename = iter->path().filename().string(); + + if (filename.find('.') == filename.npos) + continue; +--- Stuff.cpp.orig 2012-08-20 17:52:36.000000000 +0200 ++++ Stuff.cpp 2012-08-20 17:53:11.000000000 +0200 +@@ -657,7 +657,7 @@ + fs::directory_iterator directoryEnd; // default construction yields past-the-end + for (fs::directory_iterator iter(tempPath); iter != directoryEnd; ++iter) { + if (fs::is_directory(*iter) && !fs::is_empty(*iter)) +- RemoveDirectory(iter->string()); ++ RemoveDirectory(iter->path().string()); + else + fs::remove(*iter); + } diff --git a/games-strategy/galaxyhack/galaxyhack-1.74.ebuild b/games-strategy/galaxyhack/galaxyhack-1.74.ebuild index 16548345d1df..e6bacce41806 100644 --- a/games-strategy/galaxyhack/galaxyhack-1.74.ebuild +++ b/games-strategy/galaxyhack/galaxyhack-1.74.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/galaxyhack/galaxyhack-1.74.ebuild,v 1.4 2011/04/27 03:06:29 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/galaxyhack/galaxyhack-1.74.ebuild,v 1.5 2012/11/04 18:30:21 tupone Exp $ -EAPI=2 +EAPI=4 inherit eutils flag-o-matic games DESCRIPTION="Multiplayer AI script based strategy game." @@ -28,6 +28,7 @@ src_prepare() { "${FILESDIR}"/${P}-destdirs.patch \ "${FILESDIR}"/${P}-boost.patch \ "${FILESDIR}"/${P}-gcc43.patch \ + "${FILESDIR}"/${P}-boost-1.50.patch \ "${FILESDIR}"/${P}-gentoo.patch sed -i "s:@GAMES_DATADIR@:${GAMES_DATADIR}:" \ Main.cpp \ @@ -35,15 +36,14 @@ src_prepare() { sed -i "/Base data path/s:pwd:${GAMES_DATADIR}/${PN}:" \ ../settings.dat \ || die "sed settings.dat failed" - append-flags -DBOOST_FILESYSTEM_VERSION=2 } src_install() { - dogamesbin "${PN}" || die "dogamesbin failed" + dogamesbin "${PN}" cd .. insinto "${GAMES_DATADIR}"/${PN} doins -r fleets gamedata graphics music standardpictures \ - settings.dat || die "doins failed" + settings.dat dodoc readme.txt doicon "${DISTDIR}"/${PN}.png make_desktop_entry ${PN} GalaxyHack -- cgit v1.2.3-65-gdbad