games-strategy/galaxyhack: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Wed, 2 May 2018 17:15:54 +0000 (19:15 +0200)
committerPacho Ramos <pacho@gentoo.org>
Wed, 2 May 2018 19:27:35 +0000 (21:27 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-strategy/galaxyhack/files/galaxyhack-1.74-boost-1.50.patch
games-strategy/galaxyhack/files/galaxyhack-1.74-destdirs.patch
games-strategy/galaxyhack/files/galaxyhack-1.74-format.patch
games-strategy/galaxyhack/files/galaxyhack-1.74-gentoo.patch
games-strategy/galaxyhack/galaxyhack-1.74-r1.ebuild [new file with mode: 0644]

index 1b630c66fb20d1b40d5b2f4488cc7815280380fe..ed8ff748aa986574a7c1f52910991a3c864072fb 100644 (file)
@@ -1,5 +1,5 @@
---- ForceSelectWin.cpp.orig    2012-08-20 17:35:01.000000000 +0200
-+++ ForceSelectWin.cpp 2012-08-20 17:47:19.000000000 +0200
+--- a/ForceSelectWin.cpp.orig  2012-08-20 17:35:01.000000000 +0200
++++ b/ForceSelectWin.cpp       2012-08-20 17:47:19.000000000 +0200
 @@ -1596,15 +1596,15 @@
        fs::directory_iterator directoryEnd; // default construction yields past-the-end\r
        for (fs::directory_iterator iter(sourcePath); iter != directoryEnd; ++iter) {\r
@@ -20,8 +20,8 @@
                \r
                fs::copy_file(*iter, destPath.string() + "/" + destFile);\r
        }\r
---- Main.cpp.orig      2012-08-20 17:48:13.000000000 +0200
-+++ Main.cpp   2012-08-20 17:50:51.000000000 +0200
+--- a/Main.cpp.orig    2012-08-20 17:48:13.000000000 +0200
++++ b/Main.cpp 2012-08-20 17:50:51.000000000 +0200
 @@ -339,12 +339,6 @@
  \r
  void GameInit(char* argv[]) {\r
@@ -35,8 +35,8 @@
        \r
        FindHomePath();\r
        LoadSettings(argv);\r
---- Menu_Base.cpp.orig 2012-08-20 17:51:05.000000000 +0200
-+++ Menu_Base.cpp      2012-08-20 17:52:15.000000000 +0200
+--- a/Menu_Base.cpp.orig       2012-08-20 17:51:05.000000000 +0200
++++ b/Menu_Base.cpp    2012-08-20 17:52:15.000000000 +0200
 @@ -206,7 +206,7 @@
  \r
        fs::directory_iterator directoryEnd; // default construction yields past-the-end\r
@@ -64,8 +64,8 @@
  \r
                if (filename.find('.') == filename.npos)\r
                        continue;\r
---- Stuff.cpp.orig     2012-08-20 17:52:36.000000000 +0200
-+++ Stuff.cpp  2012-08-20 17:53:11.000000000 +0200
+--- a/Stuff.cpp.orig   2012-08-20 17:52:36.000000000 +0200
++++ b/Stuff.cpp        2012-08-20 17:53:11.000000000 +0200
 @@ -657,7 +657,7 @@
        fs::directory_iterator directoryEnd; // default construction yields past-the-end\r
        for (fs::directory_iterator iter(tempPath); iter != directoryEnd; ++iter) {\r
index 4b5beef56ac7a8f52f5c2440d667be1ef077f3f5..7c60c4efa624161ab27bb668f0a407876e7b85ef 100644 (file)
@@ -1,5 +1,5 @@
---- Main.cpp.old       2006-07-28 00:04:46.000000000 +0200
-+++ Main.cpp   2006-07-28 00:08:28.000000000 +0200
+--- a/Main.cpp.old     2006-07-28 00:04:46.000000000 +0200
++++ b/Main.cpp 2006-07-28 00:08:28.000000000 +0200
 @@ -184,7 +184,7 @@
  #ifndef WIN32\r
        string settingsPath = userHomePath + "settings.dat";\r
index 4bd9e8fc6f837b9ff260d5dd1b0acc0a4ab71b58..478e58001c7376080cf1e16769152035761c3459 100644 (file)
@@ -1,5 +1,5 @@
---- JSDL.cpp.old       2016-01-04 10:42:56.404316856 +0100
-+++ JSDL.cpp   2016-01-04 10:51:16.744255312 +0100
+--- a/JSDL.cpp.old     2016-01-04 10:42:56.404316856 +0100
++++ b/JSDL.cpp 2016-01-04 10:51:16.744255312 +0100
 @@ -47,14 +47,14 @@
        if (!globalSettings.batch) {\r
                if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO) == -1) {\r
index a609a473fe7f52108557376a0a687952e9986317..9e55c941bfeb8bc37528db92031e2c9e2b2d60b7 100644 (file)
@@ -1,5 +1,5 @@
---- Makefile.old       2009-02-11 22:21:26.000000000 +0100
-+++ Makefile   2009-02-11 22:20:58.000000000 +0100
+--- a/Makefile.old     2009-02-11 22:21:26.000000000 +0100
++++ b/Makefile 2009-02-11 22:20:58.000000000 +0100
 @@ -6,12 +6,11 @@
  # James Gregory and Everton da Silva Marques <evertonsm@yahoo.com.br>
  #
diff --git a/games-strategy/galaxyhack/galaxyhack-1.74-r1.ebuild b/games-strategy/galaxyhack/galaxyhack-1.74-r1.ebuild
new file mode 100644 (file)
index 0000000..aead3e7
--- /dev/null
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic readme.gentoo-r1
+
+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=""
+
+RDEPEND="
+       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"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Settings will default to those found in
+/usr/share/galaxyhack/settings.dat
+Per user settings can be specified by creating
+~/.galaxyhack/settings.dat
+
+Additional user submitted fleets can be downloaded from
+http://galaxyhack.sourceforge.net/viewfleets.php
+"
+
+src_prepare() {
+       default
+       edos2unix Makefile
+       eapply \
+               "${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@:/usr/share:" \
+               Main.cpp || die
+       sed -i "/Base data path/s:pwd:/usr/share/${PN}:" \
+               ../settings.dat || die
+}
+
+src_install() {
+       dobin "${PN}"
+       cd ..
+       insinto /usr/share/${PN}
+       doins -r fleets gamedata graphics music standardpictures \
+               settings.dat
+       dodoc readme.txt
+       readme.gentoo_create_doc
+       doicon "${DISTDIR}"/${PN}.png
+       make_desktop_entry ${PN} GalaxyHack
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+}