summaryrefslogtreecommitdiff
path: root/games-strategy/galaxyhack
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-strategy/galaxyhack
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-strategy/galaxyhack')
-rw-r--r--games-strategy/galaxyhack/Manifest2
-rw-r--r--games-strategy/galaxyhack/files/galaxyhack-1.74-boost-1.50.patch77
-rw-r--r--games-strategy/galaxyhack/files/galaxyhack-1.74-boost.patch11
-rw-r--r--games-strategy/galaxyhack/files/galaxyhack-1.74-destdirs.patch11
-rw-r--r--games-strategy/galaxyhack/files/galaxyhack-1.74-gcc43.patch12
-rw-r--r--games-strategy/galaxyhack/files/galaxyhack-1.74-gentoo.patch28
-rw-r--r--games-strategy/galaxyhack/galaxyhack-1.74.ebuild60
-rw-r--r--games-strategy/galaxyhack/metadata.xml26
8 files changed, 227 insertions, 0 deletions
diff --git a/games-strategy/galaxyhack/Manifest b/games-strategy/galaxyhack/Manifest
new file mode 100644
index 00000000000..165760b0803
--- /dev/null
+++ b/games-strategy/galaxyhack/Manifest
@@ -0,0 +1,2 @@
+DIST galaxyhack-1.74.tar.bz2 9948336 SHA256 ae6529008fe5be76607ce78833ef3b5d55e10f60a998b5747255b0854037880a SHA512 d708494b1ad572c0243da9e7168b4707112ec3c99a09498b87f8e0cb2e4e5bc9df8dc4631e3fb4d3cd7517ec4b17e937798dec3fcf770de9d0fc1b5e29a0bd58 WHIRLPOOL 59f08b96a2eae620e46d0880dc5ad894c94347c682669dff4e6128dba3071082ac374e34d85bfdbf68627f2670bb5addabfe9f7cabd7e9827afa2a291cbcaf0b
+DIST galaxyhack.png 819 SHA256 248d32aeaa03e4183cf0333bd4da1d32ea11883fcb77efe6ebc6e2be201e9903 SHA512 b8ab4dd1c18c079ec3f60b3d04843fbb7a892feb8f872d498c20eb3142e7de26bff90c93b308656e1afe5ee77074fcb3f78542dfd175c27a9b865a512e0b0200 WHIRLPOOL 6be53f8e5d5eed0e0514c37d1f08163ce59569479751569652821c0021520b9ffb47c23a99ea3ba03dd637838d68a5d4dc8d8d6b34656afaa2d942b2e93ed284
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 00000000000..1b630c66fb2
--- /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/files/galaxyhack-1.74-boost.patch b/games-strategy/galaxyhack/files/galaxyhack-1.74-boost.patch
new file mode 100644
index 00000000000..c7fd49135de
--- /dev/null
+++ b/games-strategy/galaxyhack/files/galaxyhack-1.74-boost.patch
@@ -0,0 +1,11 @@
+--- src/SetupBattle.cpp
++++ src/SetupBattle.cpp
+@@ -18,7 +18,7 @@
+ #include "PreBattle.h"
+
+ #include <sstream>
+-#include <boost/filesystem/exception.hpp>
++#include <boost/filesystem.hpp>
+
+ using std::stringstream;
+ using std::getline;
diff --git a/games-strategy/galaxyhack/files/galaxyhack-1.74-destdirs.patch b/games-strategy/galaxyhack/files/galaxyhack-1.74-destdirs.patch
new file mode 100644
index 00000000000..4b5beef56ac
--- /dev/null
+++ b/games-strategy/galaxyhack/files/galaxyhack-1.74-destdirs.patch
@@ -0,0 +1,11 @@
+--- Main.cpp.old 2006-07-28 00:04:46.000000000 +0200
++++ Main.cpp 2006-07-28 00:08:28.000000000 +0200
+@@ -184,7 +184,7 @@
+ #ifndef WIN32
+ string settingsPath = userHomePath + "settings.dat";
+ if (!DoesFileExist(settingsPath))
+- settingsPath = "settings.dat";
++ settingsPath = "@GAMES_DATADIR@/galaxyhack/settings.dat";
+ #else
+ string settingsPath = "settings.dat";
+ #endif
diff --git a/games-strategy/galaxyhack/files/galaxyhack-1.74-gcc43.patch b/games-strategy/galaxyhack/files/galaxyhack-1.74-gcc43.patch
new file mode 100644
index 00000000000..eeb64d12e58
--- /dev/null
+++ b/games-strategy/galaxyhack/files/galaxyhack-1.74-gcc43.patch
@@ -0,0 +1,12 @@
+diff -aur src.old/JSDL.cpp src/JSDL.cpp
+--- src.old/JSDL.cpp 2008-07-17 18:31:38.000000000 +0200
++++ src/JSDL.cpp 2008-07-17 19:19:39.000000000 +0200
+@@ -20,7 +20,7 @@
+ #include <cstdlib>
+ #include <fstream>
+ #include <stdexcept>
+-
++#include <cstring>
+ using std::runtime_error;
+ using std::memcpy;
+
diff --git a/games-strategy/galaxyhack/files/galaxyhack-1.74-gentoo.patch b/games-strategy/galaxyhack/files/galaxyhack-1.74-gentoo.patch
new file mode 100644
index 00000000000..a609a473fe7
--- /dev/null
+++ b/games-strategy/galaxyhack/files/galaxyhack-1.74-gentoo.patch
@@ -0,0 +1,28 @@
+--- Makefile.old 2009-02-11 22:21:26.000000000 +0100
++++ Makefile 2009-02-11 22:20:58.000000000 +0100
+@@ -6,12 +6,11 @@
+ # James Gregory and Everton da Silva Marques <evertonsm@yahoo.com.br>
+ #
+
+-INSTALL_DIR=/usr/local/share
+-INSTALL_BIN_DIR=/usr/local/bin
++INSTALL_DIR="${GAMES_DATADIR}"
++INSTALL_BIN_DIR="${GAMES_BINDIR}"
+
+-CXX = g++
+-CXXFLAGS = $(shell sdl-config --cflags) -O3
+-LDFLAGS = $(shell sdl-config --libs) -lSDL_image -lSDL_mixer -lboost_filesystem
++CXXFLAGS += $(shell sdl-config --cflags)
++LDLIBS = $(shell sdl-config --libs) -lSDL_image -lSDL_mixer -lboost_filesystem -lboost_system -lm
+
+ OBJS = AIInterpreter.o AutoFireUnit.o BCCompiler.o DerivedGroups.o DragWindow.o \
+ ForceSelect.o ForceSelectWin.o GenWindow.o GenWindow_Base.o GFX.o Globals.o \
+@@ -40,7 +39,7 @@
+ install $(TARGET) $(INSTALL_BIN_DIR)
+
+ $(TARGET): $(OBJS)
+- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+
+ %.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c $< -o $@
diff --git a/games-strategy/galaxyhack/galaxyhack-1.74.ebuild b/games-strategy/galaxyhack/galaxyhack-1.74.ebuild
new file mode 100644
index 00000000000..ff8186a9c48
--- /dev/null
+++ b/games-strategy/galaxyhack/galaxyhack-1.74.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic games
+
+DESCRIPTION="Multiplayer AI script based strategy game"
+HOMEPAGE="http://galaxyhack.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+ mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-2 galaxyhack"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[video]
+ media-libs/sdl-image
+ media-libs/sdl-mixer
+ >=dev-libs/boost-1.34"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${PN}/src
+
+src_prepare() {
+ edos2unix Makefile
+ epatch \
+ "${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 || die
+ sed -i "/Base data path/s:pwd:${GAMES_DATADIR}/${PN}:" \
+ ../settings.dat || die
+}
+
+src_install() {
+ dogamesbin "${PN}"
+ cd ..
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r fleets gamedata graphics music standardpictures \
+ settings.dat
+ dodoc readme.txt
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN} GalaxyHack
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "Settings will default to those found in"
+ elog "${GAMES_DATADIR}/galaxyhack/settings.dat"
+ elog "Per user settings can be specified by creating"
+ elog "~/.galaxyhack/settings.dat"
+ elog "Additional user submitted fleets can be downloaded from"
+ elog "http://galaxyhack.sourceforge.net/viewfleets.php"
+}
diff --git a/games-strategy/galaxyhack/metadata.xml b/games-strategy/galaxyhack/metadata.xml
new file mode 100644
index 00000000000..5ac28aa1234
--- /dev/null
+++ b/games-strategy/galaxyhack/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription lang="en">
+GalaxyHack allows you to design a fleet of spaceships which can then be tested
+in AI script based battles against fleets designed by other players. Though
+battles take place in real time, the strategy comes before hand, both in
+writing short AI scripts in a simple scripting language, and also in the set up
+and selection of your fleet. You don't actually have any control over your
+units at all mid-battle, but rather use the time to see where the set up of
+your fleets is working, where your fleets' weaknesses lie and changes are
+needed, and perhaps also to learn from the strategy of your opponent.
+
+The game revolves around very large capital ships, from which smaller ships are
+launched, but which are not designed for attacking themselves, and which cannot
+be moved mid-battle. To win a battle you must destroy of all of your opponent's
+capital ships before they destroy yours.
+
+There can be hundreds of units in any one battle, but there is no harvesting,
+resource management or base building.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">galaxyhack</remote-id>
+ </upstream>
+</pkgmetadata>