summaryrefslogtreecommitdiff
path: root/games-strategy/galaxyhack
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-strategy/galaxyhack
reinit the tree, so we can have metadata
Diffstat (limited to 'games-strategy/galaxyhack')
-rw-r--r--games-strategy/galaxyhack/Manifest12
-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-format.patch64
-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.xml29
9 files changed, 304 insertions, 0 deletions
diff --git a/games-strategy/galaxyhack/Manifest b/games-strategy/galaxyhack/Manifest
new file mode 100644
index 000000000000..67cdf43828c3
--- /dev/null
+++ b/games-strategy/galaxyhack/Manifest
@@ -0,0 +1,12 @@
+AUX galaxyhack-1.74-boost-1.50.patch 3190 SHA256 6995819045078d8df619452995fa3a39b6ce23ff7d1245ad9b195fdba082074e SHA512 72a715cbfcfd8faa7cbe3aa6def2f66f80194cacb50411c3b1a1995f04cdcb5d4d42d3dc8295a50d7969c20ae6e1ca31ad44ff0447f0b2782df27726e8a77de8 WHIRLPOOL 66ac5f07e93c6160767cb47bdc314827a5371efee1e6b02cef985cc4c1220ee9fe33facdb286af46862420d7fda8fc51d861a4e7ee990f0752fd4246276c1cde
+AUX galaxyhack-1.74-boost.patch 245 SHA256 1aeb8d201d8d76fe9953afa34e93e82cd31c62234a5fd33bb6b776f3e7980722 SHA512 19a6ef4ee430edab619d60d4410d318e07ba3dd75b48036331029ff0de11ad5ccc73970825708764a7da9870d9ae8a7708a22176aa6698fdd4c2837bf3a91885 WHIRLPOOL ebc1153424359706c4bda172fd25277856fa9987429e3e8b61542b485325f120b72e52ef60d26325c5f02cc159128baf65b9a27b0db74ebfdc99e667a78bd0b7
+AUX galaxyhack-1.74-destdirs.patch 386 SHA256 c9a6ce4657120c0d50f8b606db1b5b54131821397a18187a5f8a4dff12f04927 SHA512 d48bbc0b55baccbf290e81fce500436e9b13958d8028171608c220da05ecc676c4e3d3e78141d097569715fa7c4e8d4ea7a380fbd485bee1ea85178a6b3235b7 WHIRLPOOL 96f92fc178a11f9306fe199cfe1c8100f17c72ba44f6f8768b58bf1d28df2b1c9b2e6a4018c7ac41b7c6b1b44595e030dd796044092ef0d32b3a471232e685a3
+AUX galaxyhack-1.74-format.patch 1764 SHA256 8686884dac77ddc674579b15fe74a3a1219dde524251d3bc6e16e7459ee946f1 SHA512 2a2eadc378761c2827e7519f41805d202867c6df60d66bc3ff6dc2ae26ea7a4acc5b804c04d4c5d91bc9f3d6d8ee4b785f715e60c26197f649c78dad63c8bd4c WHIRLPOOL 977f96445bfc1d858166e0747cef53813096c71bc509cbf7b9c10847d55ca8884da0546c53bb831f5b2bfa8e48e28f73e825fe77b0b95a934ae89657ed4ad737
+AUX galaxyhack-1.74-gcc43.patch 309 SHA256 7808ab6f84a6467b09699762fba3225275936647f34408c423499bed5faa1ca3 SHA512 21169edbaf8f4c0d8f4fcd44a494e0121fb332b42cf14ba09818cf871cfdb792e4bbe00c7ae1b9ddc9094c96edda785f2763c76a70dcf92ec7ea163e3248aaa0 WHIRLPOOL a4514dd99a8d4e7e27600c27040c62b8a409d7853f440bfc99cacc6162d24ea228a1a503de363121321fd0709be3cd60b0c367c5366e708ac197c4e86732b1c3
+AUX galaxyhack-1.74-gentoo.patch 988 SHA256 d6a1da167e0e53b46f7f4a06cb3cee4757a6e4af88350f73cdf669e556be6420 SHA512 5cff46c4443d402e835eb6bebb6f037bd9c443b6522c6d05cc1abc101d0ad52d625fe2039bf2bc508b08bff9403dbfd6afa8e3dcefc0201d07596b5ac431a70e WHIRLPOOL 722f1823b1e1ae4774f9febe5d968d66338bf04b6474bec5b56409241202e9c8cc20fd9c91bc6c6abbd7769fc23909e6f71536a335a845d56126f1b9a5f4dba9
+DIST galaxyhack-1.74.tar.bz2 9948336 SHA256 ae6529008fe5be76607ce78833ef3b5d55e10f60a998b5747255b0854037880a SHA512 d708494b1ad572c0243da9e7168b4707112ec3c99a09498b87f8e0cb2e4e5bc9df8dc4631e3fb4d3cd7517ec4b17e937798dec3fcf770de9d0fc1b5e29a0bd58 WHIRLPOOL 59f08b96a2eae620e46d0880dc5ad894c94347c682669dff4e6128dba3071082ac374e34d85bfdbf68627f2670bb5addabfe9f7cabd7e9827afa2a291cbcaf0b
+DIST galaxyhack.png 819 SHA256 248d32aeaa03e4183cf0333bd4da1d32ea11883fcb77efe6ebc6e2be201e9903 SHA512 b8ab4dd1c18c079ec3f60b3d04843fbb7a892feb8f872d498c20eb3142e7de26bff90c93b308656e1afe5ee77074fcb3f78542dfd175c27a9b865a512e0b0200 WHIRLPOOL 6be53f8e5d5eed0e0514c37d1f08163ce59569479751569652821c0021520b9ffb47c23a99ea3ba03dd637838d68a5d4dc8d8d6b34656afaa2d942b2e93ed284
+EBUILD galaxyhack-1.74.ebuild 1576 SHA256 fd532333679e3b4ac1f14743e8c44a400bc15f11dfdc9bf295d3b08477666526 SHA512 ae709d1ce1d8349c5b6dd3a304f0f998f790745807110d565f06c87685d5405c8bf843c8a8f13eace1d98995c0f4466d1d6e1ac5e721c5625478c17e6fbee8f0 WHIRLPOOL ec2a80a3ca74071459c3a4cb47e3bfc41e04b73319dd97895203c21bd31b037e3a34e3a5d46bc7f15f292b6e7f7a56d8b20b5bc1fc33d555dc64f4f51c5f9568
+MISC ChangeLog 3205 SHA256 3a6c6826abcdfe64e5853cdee8ccc70dd31352c3b6e61b2c642f96738e234115 SHA512 368f15ed32f46d789f7b23ae82853b6e1385198bd5b178f9d8529665094497ef3b3cdd447aca32399e03f43c88a8b6b12e6e0e14105ab532e7eea6e28ae057a6 WHIRLPOOL aae3ad60259567156c9be04eb88339ce0b7e423ad06ab9be9361ee75cb32e05c89785302160687cadd536c13366599c63faa7ad574625144cf746ad7b051949b
+MISC ChangeLog-2015 2176 SHA256 c5919eb95932338eb4588284f51c482556e68773f710ee3ba9e84d10b6e99b38 SHA512 b88939bbe1d7b93bed81c8eed1a81aee42920e670a07e01daf4ba8ecb88fa8b1365ca8edbf51f4a2ed05b72a987070e5e8b37c5df4b6132b222966a07ed4cdc0 WHIRLPOOL 38d8daea0836ffac37a04a62f845096faed4bf882783671a2e7de0507745c510639e8efc2f34479b6da8f5ad74efaa22e98de6622655cfd7caa64ef31b7a4890
+MISC metadata.xml 1383 SHA256 44b15a56e6717fba834fc78f3b240ea14b0bfb42f6696d9a0586ece8f59fdbde SHA512 1857f21b7f01d16e5eaa7fd6f3b653c820837d5b47022bf47c02af44c5bb00f0010c36c722aa1225d0cf0cdec8d85c4f6f14e5c7c0785da8706ea9886a72b285 WHIRLPOOL aa1dc68e0d6e4449f19ff7b1244e68ef05285c08f6e0d48044712c83685b023cfcced6ebd01d48b993e6a72fe8244b02bde1de2c7b12cfd62ad8474e0d40fed2
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/files/galaxyhack-1.74-boost.patch b/games-strategy/galaxyhack/files/galaxyhack-1.74-boost.patch
new file mode 100644
index 000000000000..c7fd49135dee
--- /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 000000000000..4b5beef56ac7
--- /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-format.patch b/games-strategy/galaxyhack/files/galaxyhack-1.74-format.patch
new file mode 100644
index 000000000000..4bd9e8fc6f83
--- /dev/null
+++ b/games-strategy/galaxyhack/files/galaxyhack-1.74-format.patch
@@ -0,0 +1,64 @@
+--- JSDL.cpp.old 2016-01-04 10:42:56.404316856 +0100
++++ JSDL.cpp 2016-01-04 10:51:16.744255312 +0100
+@@ -47,14 +47,14 @@
+ if (!globalSettings.batch) {
+ if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO) == -1) {
+ char output[120];
+- sprintf(output, SDL_GetError());
++ strcpy(output, SDL_GetError());
+ throw runtime_error(output);
+ }
+
+ if (!globalSettings.disableSound) {
+ if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) {
+ char error[120];
+- sprintf(error, SDL_GetError());
++ strcpy(error, SDL_GetError());
+ string errorStr = error;
+ errorStr += ", continuing without initialising sound.";
+ WriteLog(errorStr);
+@@ -81,7 +81,7 @@
+ //4096 is rather a large chunksize, should be smaller if I add sound effects
+ if (Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 4096) == -1) {
+ char output[100];
+- sprintf(output, Mix_GetError());
++ strcpy(output, Mix_GetError());
+ throw runtime_error(output);
+ }
+ }
+@@ -101,7 +101,7 @@
+ if (screen == NULL) {
+ SDL_Quit();
+ char output[120];
+- sprintf(output, SDL_GetError());
++ strcpy(output, SDL_GetError());
+ throw runtime_error(output);
+ }
+ }
+@@ -114,7 +114,7 @@
+
+ if (loadingSurface == NULL) {
+ char output[100];
+- sprintf(output, IMG_GetError());
++ strcpy(output, IMG_GetError());
+ throw runtime_error(output);
+ }
+
+@@ -308,7 +308,7 @@
+
+ if (!theMusic) {
+ char output[100];
+- sprintf(output, Mix_GetError());
++ strcpy(output, Mix_GetError());
+ throw runtime_error(output);
+ }
+ }
+@@ -319,7 +319,7 @@
+
+ if (Mix_PlayMusic(theMusic, -1) == -1) {
+ char output[100];
+- sprintf(output, Mix_GetError());
++ strcpy(output, Mix_GetError());
+ throw runtime_error(output);
+ }
+ }
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 000000000000..eeb64d12e587
--- /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 000000000000..a609a473fe7f
--- /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 000000000000..f36cf0ed70b2
--- /dev/null
+++ b/games-strategy/galaxyhack/galaxyhack-1.74.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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[png]
+ media-libs/sdl-mixer[mod,vorbis]
+ >=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}-format.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 000000000000..9dbded1c3212
--- /dev/null
+++ b/games-strategy/galaxyhack/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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>