summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy')
-rw-r--r--games-strategy/0ad-data/0ad-data-0.0.16_alpha.ebuild29
-rw-r--r--games-strategy/0ad-data/0ad-data-0.0.17_alpha.ebuild29
-rw-r--r--games-strategy/0ad-data/Manifest2
-rw-r--r--games-strategy/0ad-data/metadata.xml12
-rw-r--r--games-strategy/0ad/0ad-0.0.16_alpha-r2.ebuild141
-rw-r--r--games-strategy/0ad/0ad-0.0.17_alpha.ebuild144
-rw-r--r--games-strategy/0ad/Manifest2
-rw-r--r--games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch42
-rw-r--r--games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch93
-rw-r--r--games-strategy/0ad/files/0ad-0.0.17_alpha-gentoo.patch100
-rw-r--r--games-strategy/0ad/metadata.xml20
-rw-r--r--games-strategy/asc/Manifest4
-rw-r--r--games-strategy/asc/asc-2.6.0.0.ebuild72
-rw-r--r--games-strategy/asc/metadata.xml8
-rw-r--r--games-strategy/attal/Manifest2
-rw-r--r--games-strategy/attal/attal-0.10.1.ebuild62
-rw-r--r--games-strategy/attal/files/attal-0.10.1-gcc41.patch33
-rw-r--r--games-strategy/attal/files/attal-0.10.1-gentoo.patch33
-rw-r--r--games-strategy/attal/metadata.xml8
-rw-r--r--games-strategy/boswars/Manifest3
-rw-r--r--games-strategy/boswars/boswars-2.7-r1.ebuild67
-rw-r--r--games-strategy/boswars/files/boswars-2.7-gentoo.patch12
-rw-r--r--games-strategy/boswars/files/boswars-2.7-scons-blows.patch27
-rw-r--r--games-strategy/boswars/metadata.xml10
-rw-r--r--games-strategy/coldwar-demo/Manifest1
-rw-r--r--games-strategy/coldwar-demo/coldwar-demo-1-r2.ebuild69
-rw-r--r--games-strategy/coldwar-demo/metadata.xml5
-rw-r--r--games-strategy/coldwar/Manifest1
-rw-r--r--games-strategy/coldwar/coldwar-1.0.1-r1.ebuild73
-rw-r--r--games-strategy/coldwar/metadata.xml5
-rw-r--r--games-strategy/crimson/Manifest1
-rw-r--r--games-strategy/crimson/crimson-0.5.3.ebuild59
-rw-r--r--games-strategy/crimson/metadata.xml5
-rw-r--r--games-strategy/darwinia-demo/Manifest1
-rw-r--r--games-strategy/darwinia-demo/darwinia-demo-1.3.0.ebuild50
-rw-r--r--games-strategy/darwinia-demo/metadata.xml5
-rw-r--r--games-strategy/darwinia/Manifest2
-rw-r--r--games-strategy/darwinia/darwinia-1.3.0.ebuild63
-rw-r--r--games-strategy/darwinia/darwinia-1.4.0_beta9.ebuild65
-rw-r--r--games-strategy/darwinia/metadata.xml5
-rw-r--r--games-strategy/defcon-demo/Manifest2
-rw-r--r--games-strategy/defcon-demo/defcon-demo-1.60.ebuild101
-rwxr-xr-xgames-strategy/defcon-demo/files/defcon15
-rw-r--r--games-strategy/defcon-demo/metadata.xml8
-rw-r--r--games-strategy/dominions2/Manifest5
-rw-r--r--games-strategy/dominions2/dominions2-2.16.ebuild103
-rw-r--r--games-strategy/dominions2/metadata.xml5
-rw-r--r--games-strategy/dopewars/Manifest1
-rw-r--r--games-strategy/dopewars/dopewars-1.5.12-r2.ebuild70
-rw-r--r--games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch20
-rw-r--r--games-strategy/dopewars/metadata.xml8
-rw-r--r--games-strategy/dunelegacy/Manifest2
-rw-r--r--games-strategy/dunelegacy/dunelegacy-0.96.3.ebuild58
-rw-r--r--games-strategy/dunelegacy/files/dunelegacy-0.96.3-build.patch60
-rw-r--r--games-strategy/dunelegacy/metadata.xml22
-rw-r--r--games-strategy/freeciv/Manifest2
-rw-r--r--games-strategy/freeciv/freeciv-2.4.4.ebuild173
-rw-r--r--games-strategy/freeciv/freeciv-2.5.0.ebuild178
-rw-r--r--games-strategy/freeciv/metadata.xml24
-rw-r--r--games-strategy/freecol/Manifest1
-rw-r--r--games-strategy/freecol/files/freecol-0.10.7-gentoo.patch29
-rw-r--r--games-strategy/freecol/freecol-0.10.7.ebuild92
-rw-r--r--games-strategy/freecol/metadata.xml8
-rw-r--r--games-strategy/freeorion/Manifest1
-rw-r--r--games-strategy/freeorion/files/freeorion-0.4.5_pre-boost-1.57.patch32
-rw-r--r--games-strategy/freeorion/files/freeorion-0.4.5_pre-boost-1.58.patch57
-rw-r--r--games-strategy/freeorion/freeorion-0.4.5_pre.ebuild97
-rw-r--r--games-strategy/freeorion/metadata.xml18
-rw-r--r--games-strategy/freesynd/Manifest1
-rw-r--r--games-strategy/freesynd/files/freesynd-0.7.1-cmake.patch28
-rw-r--r--games-strategy/freesynd/freesynd-0.7.1.ebuild79
-rw-r--r--games-strategy/freesynd/metadata.xml11
-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
-rw-r--r--games-strategy/glob2/Manifest1
-rw-r--r--games-strategy/glob2/files/glob2-0.9.4.4-gcc44.patch12
-rw-r--r--games-strategy/glob2/files/glob2-0.9.4.4-gcc49.patch35
-rw-r--r--games-strategy/glob2/files/glob2-0.9.4.4-scons-blows.patch26
-rw-r--r--games-strategy/glob2/files/glob2-0.9.4.4-underlinking.patch19
-rw-r--r--games-strategy/glob2/glob2-0.9.4.4-r1.ebuild69
-rw-r--r--games-strategy/glob2/metadata.xml12
-rw-r--r--games-strategy/gorky17-demo/Manifest2
-rw-r--r--games-strategy/gorky17-demo/gorky17-demo-1.0.1.0.1-r1.ebuild76
-rw-r--r--games-strategy/gorky17-demo/metadata.xml5
-rw-r--r--games-strategy/gwp/Manifest1
-rw-r--r--games-strategy/gwp/files/gwp-0.4.0-exec-stack.patch89
-rw-r--r--games-strategy/gwp/files/gwp-0.4.0-gcc41.patch107
-rw-r--r--games-strategy/gwp/gwp-0.4.0-r3.ebuild61
-rw-r--r--games-strategy/gwp/metadata.xml5
-rw-r--r--games-strategy/hedgewars/Manifest1
-rw-r--r--games-strategy/hedgewars/hedgewars-0.9.21.1.ebuild74
-rw-r--r--games-strategy/hedgewars/metadata.xml5
-rw-r--r--games-strategy/heroes3-demo/Manifest1
-rw-r--r--games-strategy/heroes3-demo/heroes3-demo-1.3.1a.ebuild66
-rw-r--r--games-strategy/heroes3-demo/metadata.xml5
-rw-r--r--games-strategy/heroes3/Manifest2
-rw-r--r--games-strategy/heroes3/files/heroes3-wrapper.sh13
-rw-r--r--games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild209
-rw-r--r--games-strategy/heroes3/metadata.xml10
-rw-r--r--games-strategy/ja2-stracciatella-data/ja2-stracciatella-data-1.ebuild60
-rw-r--r--games-strategy/ja2-stracciatella-data/metadata.xml6
-rw-r--r--games-strategy/ja2-stracciatella/Manifest2
-rw-r--r--games-strategy/ja2-stracciatella/files/ja2-convert.sh16
-rw-r--r--games-strategy/ja2-stracciatella/files/ja2-stracciatella-0.12.1_p7072-makefile.patch179
-rw-r--r--games-strategy/ja2-stracciatella/ja2-stracciatella-0.12.1_p7072.ebuild88
-rw-r--r--games-strategy/ja2-stracciatella/metadata.xml10
-rw-r--r--games-strategy/knights-demo/Manifest1
-rw-r--r--games-strategy/knights-demo/knights-demo-1.32-r1.ebuild50
-rw-r--r--games-strategy/knights-demo/metadata.xml5
-rw-r--r--games-strategy/lgeneral/Manifest2
-rw-r--r--games-strategy/lgeneral/lgeneral-1.2.4.ebuild100
-rw-r--r--games-strategy/lgeneral/metadata.xml8
-rw-r--r--games-strategy/lightyears/Manifest1
-rw-r--r--games-strategy/lightyears/files/lightyears-1.4-gentoo.patch45
-rw-r--r--games-strategy/lightyears/lightyears-1.4-r1.ebuild53
-rw-r--r--games-strategy/lightyears/metadata.xml10
-rw-r--r--games-strategy/liquidwar/Manifest1
-rw-r--r--games-strategy/liquidwar/files/liquidwar-5.6.4-exec-stack.patch27
-rw-r--r--games-strategy/liquidwar/files/liquidwar-5.6.4-ovflfix.patch18
-rw-r--r--games-strategy/liquidwar/files/liquidwar-5.6.4-underlink.patch11
-rw-r--r--games-strategy/liquidwar/liquidwar-5.6.4-r1.ebuild61
-rw-r--r--games-strategy/liquidwar/metadata.xml5
-rw-r--r--games-strategy/liquidwar6/Manifest2
-rw-r--r--games-strategy/liquidwar6/files/liquidwar6-0.4.3681-check-headers.patch70
-rw-r--r--games-strategy/liquidwar6/files/liquidwar6-0.4.3681-ldconfig.patch16
-rw-r--r--games-strategy/liquidwar6/files/liquidwar6-0.4.3681-paths.patch27
-rw-r--r--games-strategy/liquidwar6/liquidwar6-0.4.3681.ebuild114
-rw-r--r--games-strategy/liquidwar6/metadata.xml32
-rw-r--r--games-strategy/majesty-demo/Manifest1
-rw-r--r--games-strategy/majesty-demo/majesty-demo-1.0.0.ebuild44
-rw-r--r--games-strategy/majesty-demo/metadata.xml5
-rw-r--r--games-strategy/maxr/Manifest1
-rw-r--r--games-strategy/maxr/maxr-0.2.8.ebuild30
-rw-r--r--games-strategy/maxr/metadata.xml5
-rw-r--r--games-strategy/megaglest-data/Manifest2
-rw-r--r--games-strategy/megaglest-data/files/megaglest-data-3.7.1-dutch.patch166
-rw-r--r--games-strategy/megaglest-data/megaglest-data-3.11.1.ebuild39
-rw-r--r--games-strategy/megaglest-data/megaglest-data-3.9.1.ebuild44
-rw-r--r--games-strategy/megaglest-data/metadata.xml8
-rw-r--r--games-strategy/megaglest/Manifest2
-rw-r--r--games-strategy/megaglest/files/megaglest-3.11.1-cmake.patch28
-rw-r--r--games-strategy/megaglest/files/megaglest-3.11.1-static-build.patch63
-rw-r--r--games-strategy/megaglest/files/megaglest-3.9.1-cmake.patch46
-rw-r--r--games-strategy/megaglest/files/megaglest-3.9.1-static-build.patch63
-rw-r--r--games-strategy/megaglest/megaglest-3.11.1.ebuild162
-rw-r--r--games-strategy/megaglest/megaglest-3.9.1-r1.ebuild165
-rw-r--r--games-strategy/megaglest/metadata.xml31
-rw-r--r--games-strategy/metadata.xml32
-rw-r--r--games-strategy/mindrover-demo/Manifest1
-rw-r--r--games-strategy/mindrover-demo/metadata.xml5
-rw-r--r--games-strategy/mindrover-demo/mindrover-demo-1.07b.ebuild44
-rw-r--r--games-strategy/naev/Manifest2
-rw-r--r--games-strategy/naev/metadata.xml14
-rw-r--r--games-strategy/naev/naev-0.6.0.ebuild81
-rw-r--r--games-strategy/netherearth/Manifest2
-rw-r--r--games-strategy/netherearth/files/Makefile20
-rw-r--r--games-strategy/netherearth/files/netherearth-0.52-freeglut.patch18
-rw-r--r--games-strategy/netherearth/files/netherearth-0.52-gentoo-paths.patch139
-rw-r--r--games-strategy/netherearth/files/netherearth-0.52-glibc-212.patch23
-rw-r--r--games-strategy/netherearth/files/netherearth-0.52-ldflags.patch8
-rw-r--r--games-strategy/netherearth/files/netherearth-0.52-linux.patch47
-rw-r--r--games-strategy/netherearth/metadata.xml11
-rw-r--r--games-strategy/netherearth/netherearth-0.52.ebuild81
-rw-r--r--games-strategy/netpanzer/Manifest2
-rw-r--r--games-strategy/netpanzer/files/netpanzer-0.8.2-gcc43.patch62
-rw-r--r--games-strategy/netpanzer/files/netpanzer-0.8.2-gcc47.patch11
-rw-r--r--games-strategy/netpanzer/files/netpanzer-ded15
-rw-r--r--games-strategy/netpanzer/files/netpanzer-ded.ini80
-rw-r--r--games-strategy/netpanzer/files/netpanzer.rc34
-rw-r--r--games-strategy/netpanzer/metadata.xml8
-rw-r--r--games-strategy/netpanzer/netpanzer-0.8.2.ebuild71
-rw-r--r--games-strategy/openra/Manifest6
-rw-r--r--games-strategy/openra/files/README.gentoo111
-rw-r--r--games-strategy/openra/files/openra-20120630-sound.patch18
-rw-r--r--games-strategy/openra/files/openra-20130514-makefile.patch382
-rw-r--r--games-strategy/openra/files/openra-20131223-sdl2.patch15
-rw-r--r--games-strategy/openra/metadata.xml21
-rw-r--r--games-strategy/openra/openra-20120630.ebuild90
-rw-r--r--games-strategy/openra/openra-20130514-r1.ebuild97
-rw-r--r--games-strategy/openra/openra-20131223-r1.ebuild93
-rw-r--r--games-strategy/openra/openra-20140608.ebuild96
-rw-r--r--games-strategy/openra/openra-20140722.ebuild96
-rw-r--r--games-strategy/openra/openra-20141029.ebuild96
-rw-r--r--games-strategy/outerspace/Manifest2
-rw-r--r--games-strategy/outerspace/files/outerspace9
-rw-r--r--games-strategy/outerspace/files/outerspace-0.5.68-setup.patch83
-rw-r--r--games-strategy/outerspace/metadata.xml17
-rw-r--r--games-strategy/outerspace/outerspace-0.5.68.ebuild81
-rw-r--r--games-strategy/revenge-of-the-titans/Manifest2
-rw-r--r--games-strategy/revenge-of-the-titans/metadata.xml5
-rw-r--r--games-strategy/revenge-of-the-titans/revenge-of-the-titans-1.80.12.ebuild54
-rw-r--r--games-strategy/s25rttr/Manifest1
-rw-r--r--games-strategy/s25rttr/files/s25rttr-0.8.1-cmake.patch160
-rw-r--r--games-strategy/s25rttr/files/s25rttr-0.8.1-soundconverter.patch17
-rw-r--r--games-strategy/s25rttr/metadata.xml13
-rw-r--r--games-strategy/s25rttr/s25rttr-0.8.1.ebuild108
-rw-r--r--games-strategy/scorched3d/Manifest1
-rw-r--r--games-strategy/scorched3d/files/scorched3d-44-fixups.patch25
-rw-r--r--games-strategy/scorched3d/files/scorched3d-44-freetype.patch45
-rw-r--r--games-strategy/scorched3d/files/scorched3d-44-gcc43.patch22
-rw-r--r--games-strategy/scorched3d/files/scorched3d-44-jpeg9.patch20
-rw-r--r--games-strategy/scorched3d/files/scorched3d-44-odbc.patch16
-rw-r--r--games-strategy/scorched3d/files/scorched3d-44-win32.patch18
-rw-r--r--games-strategy/scorched3d/metadata.xml8
-rw-r--r--games-strategy/scorched3d/scorched3d-44.ebuild78
-rw-r--r--games-strategy/seven-kingdoms/Manifest3
-rw-r--r--games-strategy/seven-kingdoms/metadata.xml14
-rw-r--r--games-strategy/seven-kingdoms/seven-kingdoms-2.14.4.ebuild60
-rw-r--r--games-strategy/seven-kingdoms/seven-kingdoms-2.14.5.ebuild56
-rw-r--r--games-strategy/smac/Manifest2
-rw-r--r--games-strategy/smac/metadata.xml5
-rw-r--r--games-strategy/smac/smac-6.0a.ebuild103
-rw-r--r--games-strategy/spaz/Manifest1
-rw-r--r--games-strategy/spaz/metadata.xml8
-rw-r--r--games-strategy/spaz/spaz-1.605.ebuild45
-rw-r--r--games-strategy/tornado/Manifest1
-rw-r--r--games-strategy/tornado/files/tornado-1.4-gentoo.patch26
-rw-r--r--games-strategy/tornado/metadata.xml5
-rw-r--r--games-strategy/tornado/tornado-1.4.ebuild38
-rw-r--r--games-strategy/triplea/Manifest2
-rw-r--r--games-strategy/triplea/metadata.xml8
-rw-r--r--games-strategy/triplea/triplea-1.7.0.3.ebuild100
-rw-r--r--games-strategy/triplea/triplea-1.8.0.5.ebuild92
-rw-r--r--games-strategy/ufo-ai/Manifest3
-rw-r--r--games-strategy/ufo-ai/files/ufo-ai-2.4-anon.patch17
-rw-r--r--games-strategy/ufo-ai/files/ufo-ai-2.4-locale.patch15
-rw-r--r--games-strategy/ufo-ai/files/ufo-ai-2.4-mathlib.patch29
-rw-r--r--games-strategy/ufo-ai/metadata.xml11
-rw-r--r--games-strategy/ufo-ai/ufo-ai-2.4.ebuild119
-rw-r--r--games-strategy/uqm/Manifest7
-rw-r--r--games-strategy/uqm/metadata.xml13
-rw-r--r--games-strategy/uqm/uqm-0.7.0-r2.ebuild107
-rw-r--r--games-strategy/wargus-data/metadata.xml5
-rw-r--r--games-strategy/wargus-data/wargus-data-0.ebuild45
-rw-r--r--games-strategy/wargus/Manifest1
-rw-r--r--games-strategy/wargus/metadata.xml8
-rw-r--r--games-strategy/wargus/wargus-2.2.7.ebuild62
-rw-r--r--games-strategy/warmux/Manifest1
-rw-r--r--games-strategy/warmux/files/warmux-11.04.1-action.patch12
-rw-r--r--games-strategy/warmux/files/warmux-11.04.1-gcc47.patch11
-rw-r--r--games-strategy/warmux/files/warmux-11.04.1-gentoo.patch40
-rw-r--r--games-strategy/warmux/files/warmux-11.04.1-stat.patch61
-rw-r--r--games-strategy/warmux/files/warmux-11.04.1-zlib.patch11
-rw-r--r--games-strategy/warmux/metadata.xml5
-rw-r--r--games-strategy/warmux/warmux-11.04.1.ebuild61
-rw-r--r--games-strategy/warzone2100/Manifest2
-rw-r--r--games-strategy/warzone2100/files/warzone2100-3.1.2-openGL.patch11
-rw-r--r--games-strategy/warzone2100/files/warzone2100-3.1.2-pkgconf.patch14
-rw-r--r--games-strategy/warzone2100/metadata.xml17
-rw-r--r--games-strategy/warzone2100/warzone2100-3.1.2.ebuild108
-rw-r--r--games-strategy/wesnoth/Manifest2
-rw-r--r--games-strategy/wesnoth/files/wesnothd.rc23
-rw-r--r--games-strategy/wesnoth/metadata.xml12
-rw-r--r--games-strategy/wesnoth/wesnoth-1.12.2.ebuild118
-rw-r--r--games-strategy/wesnoth/wesnoth-1.12.4.ebuild118
-rw-r--r--games-strategy/widelands/Manifest1
-rw-r--r--games-strategy/widelands/files/widelands-0.17-cxxflags.patch33
-rw-r--r--games-strategy/widelands/files/widelands-0.17-gcc47.patch12
-rw-r--r--games-strategy/widelands/metadata.xml8
-rw-r--r--games-strategy/widelands/widelands-0.17.ebuild84
-rw-r--r--games-strategy/xbattle/Manifest1
-rw-r--r--games-strategy/xbattle/metadata.xml27
-rw-r--r--games-strategy/xbattle/xbattle-5.4.1.ebuild56
-rw-r--r--games-strategy/xbattleai/Manifest1
-rw-r--r--games-strategy/xbattleai/files/xbattleai-1.2.2-sandbox.patch114
-rw-r--r--games-strategy/xbattleai/metadata.xml27
-rw-r--r--games-strategy/xbattleai/xbattleai-1.2.2-r1.ebuild40
273 files changed, 10493 insertions, 0 deletions
diff --git a/games-strategy/0ad-data/0ad-data-0.0.16_alpha.ebuild b/games-strategy/0ad-data/0ad-data-0.0.16_alpha.ebuild
new file mode 100644
index 00000000000..ab5fe9e073b
--- /dev/null
+++ b/games-strategy/0ad-data/0ad-data-0.0.16_alpha.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit games
+
+MY_P=0ad-${PV/_/-}
+DESCRIPTION="Data files for 0ad"
+HOMEPAGE="http://wildfiregames.com/0ad/"
+SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-data.tar.xz"
+
+LICENSE="GPL-2 CC-BY-SA-3.0 LPPL-1.3c BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ rm binaries/data/tools/fontbuilder/fonts/*.txt
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/0ad
+ doins -r binaries/data/*
+ prepgamesdirs
+}
diff --git a/games-strategy/0ad-data/0ad-data-0.0.17_alpha.ebuild b/games-strategy/0ad-data/0ad-data-0.0.17_alpha.ebuild
new file mode 100644
index 00000000000..448745f7199
--- /dev/null
+++ b/games-strategy/0ad-data/0ad-data-0.0.17_alpha.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit games
+
+MY_P=0ad-${PV/_/-}
+DESCRIPTION="Data files for 0ad"
+HOMEPAGE="http://wildfiregames.com/0ad/"
+SRC_URI="mirror://sourceforge/zero-ad/${MY_P}-unix-data.tar.xz"
+
+LICENSE="GPL-2 CC-BY-SA-3.0 LPPL-1.3c BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ rm binaries/data/tools/fontbuilder/fonts/*.txt
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/0ad
+ doins -r binaries/data/*
+ prepgamesdirs
+}
diff --git a/games-strategy/0ad-data/Manifest b/games-strategy/0ad-data/Manifest
new file mode 100644
index 00000000000..56c69aa61b2
--- /dev/null
+++ b/games-strategy/0ad-data/Manifest
@@ -0,0 +1,2 @@
+DIST 0ad-0.0.16-alpha-unix-data.tar.xz 526615868 SHA256 0f16d41e81d7349fb16490f3abbfd38bcb3f2b89648355b2b281c5045ddafadc SHA512 a34ae77c6fdc1781bf6f7f7d20ab31f91ab2d1227c2528f40075af8056b41b9c3d4c03debd92e7836a17b64bc0437ed5970338dfc7b171eb4df3f8c5558593d0 WHIRLPOOL 21f837df31fea98b597e78754b2d10b42ea8a6eb15cc2db3bf6f9664d28914e5122e8d80e5f0f61ffa9eeb9f95021525cf236109d311d208d29ed5deecb82379
+DIST 0ad-0.0.17-alpha-unix-data.tar.xz 561617008 SHA256 6bf2234ef5043b14a3bbeda013fefed73ce2e564262f5e03b0801bfe671331d0 SHA512 84d722b3bb5ba466b5db340fc5fea13bc4020379226214f393bb22559147acacfca71a283a2ea358832a2e1b43cb1596b5362c12cee70f22b2d7ada063089e2a WHIRLPOOL 1359567d112adaaf48d91a3c30e36cdc78c77648deaae8c0542021c7f67f841397400a438890d378133de52a407a33ccffdcc363ae1e318d6d6470ae67187571
diff --git a/games-strategy/0ad-data/metadata.xml b/games-strategy/0ad-data/metadata.xml
new file mode 100644
index 00000000000..c78b81370e7
--- /dev/null
+++ b/games-strategy/0ad-data/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">zero-ad</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/0ad/0ad-0.0.16_alpha-r2.ebuild b/games-strategy/0ad/0ad-0.0.16_alpha-r2.ebuild
new file mode 100644
index 00000000000..2c1be9796bc
--- /dev/null
+++ b/games-strategy/0ad/0ad-0.0.16_alpha-r2.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+
+inherit eutils wxwidgets toolchain-funcs gnome2-utils games
+
+MY_P=0ad-${PV/_/-}
+DESCRIPTION="A free, real-time strategy game"
+HOMEPAGE="http://play0ad.com/"
+SRC_URI="http://releases.wildfiregames.com/${MY_P}-unix-build.tar.xz"
+
+LICENSE="GPL-2 LGPL-2.1 MIT CC-BY-SA-3.0 ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="editor +lobby pch sound test"
+RESTRICT="test"
+
+RDEPEND="
+ dev-lang/spidermonkey:24
+ dev-libs/boost
+ dev-libs/icu:=
+ dev-libs/libxml2
+ ~games-strategy/0ad-data-${PV}
+ media-gfx/nvidia-texture-tools
+ media-libs/libpng:0
+ media-libs/libsdl[X,opengl,video]
+ net-libs/enet:1.3
+ net-libs/miniupnpc
+ net-misc/curl
+ sys-libs/zlib
+ virtual/jpeg
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXcursor
+ editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+ lobby? ( net-libs/gloox )
+ sound? ( media-libs/libogg
+ media-libs/libvorbis
+ media-libs/openal )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-lang/perl )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-gcc-4.9.patch
+}
+
+src_configure() {
+ local myconf=(
+ --with-system-nvtt
+ --with-system-enet
+ --with-system-miniupnpc
+ --with-system-mozjs24
+ --minimal-flags
+ $(usex pch "" "--without-pch")
+ $(usex test "" "--without-tests")
+ $(usex sound "" "--without-audio")
+ $(usex editor "--atlas" "")
+ $(usex lobby "" "--without-lobby")
+ --collada
+ --bindir="${GAMES_BINDIR}"
+ --libdir="$(games_get_libdir)"/${PN}
+ --datadir="${GAMES_DATADIR}"/${PN}
+ )
+
+ # stock premake4 does not work, use the shipped one
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix
+
+ # regenerate scripts.c so our patch applies
+ cd "${S}"/build/premake/premake4 || die
+ "${S}"/build/premake/premake4/bin/release/premake4 embed || die
+
+ # rebuild premake again... this is the most stupid build system
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix clean
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix
+
+ # run premake to create build scripts
+ cd "${S}"/build/premake || die
+ "${S}"/build/premake/premake4/bin/release/premake4 \
+ --file="premake4.lua" \
+ --outpath="../workspaces/gcc/" \
+ --platform=$(usex amd64 "x64" "x32") \
+ --os=linux \
+ "${myconf[@]}" \
+ gmake || die "Premake failed"
+}
+
+src_compile() {
+ # build 3rd party fcollada
+ emake -C libraries/source/fcollada/src
+
+ # build 0ad
+ emake -C build/workspaces/gcc verbose=1
+}
+
+src_test() {
+ cd binaries/system || die
+ ./test -libdir "${S}/binaries/system" || die "test phase failed"
+}
+
+src_install() {
+ dogamesbin binaries/system/pyrogenesis
+ use editor && dogamesbin binaries/system/ActorEditor
+
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r binaries/data/l10n
+
+ exeinto "$(games_get_libdir)"/${PN}
+ doexe binaries/system/libCollada.so
+ use editor && doexe binaries/system/libAtlasUI.so
+
+ dodoc binaries/system/readme.txt
+ doicon -s 128 build/resources/${PN}.png
+ games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
+ use editor &&
+ games_make_wrapper ${PN}-ActorEditor "${GAMES_BINDIR}/ActorEditor"
+ make_desktop_entry ${PN}
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/0ad/0ad-0.0.17_alpha.ebuild b/games-strategy/0ad/0ad-0.0.17_alpha.ebuild
new file mode 100644
index 00000000000..c50a5329833
--- /dev/null
+++ b/games-strategy/0ad/0ad-0.0.17_alpha.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+
+inherit eutils wxwidgets toolchain-funcs gnome2-utils games
+
+MY_P=0ad-${PV/_/-}
+DESCRIPTION="A free, real-time strategy game"
+HOMEPAGE="http://play0ad.com/"
+SRC_URI="mirror://sourceforge/zero-ad/${MY_P}-unix-build.tar.xz"
+
+LICENSE="GPL-2 LGPL-2.1 MIT CC-BY-SA-3.0 ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="editor +lobby nvtt pch sound test"
+RESTRICT="test"
+
+RDEPEND="
+ dev-lang/spidermonkey:24[-icu]
+ dev-libs/boost
+ dev-libs/icu:=
+ dev-libs/libxml2
+ ~games-strategy/0ad-data-${PV}
+ media-libs/libpng:0
+ media-libs/libsdl2[X,opengl,video]
+ net-libs/enet:1.3
+ net-libs/miniupnpc
+ net-misc/curl
+ sys-libs/zlib
+ virtual/jpeg
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXcursor
+ editor? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] )
+ lobby? ( net-libs/gloox )
+ nvtt? ( media-gfx/nvidia-texture-tools )
+ sound? ( media-libs/libvorbis
+ media-libs/openal )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-lang/perl )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_configure() {
+ local myconf=(
+ --with-system-nvtt
+ --with-system-miniupnpc
+ --with-system-mozjs24
+ --minimal-flags
+ --sdl2
+ $(usex nvtt "" "--without-nvtt")
+ $(usex pch "" "--without-pch")
+ $(usex test "" "--without-tests")
+ $(usex sound "" "--without-audio")
+ $(usex editor "--atlas" "")
+ $(usex lobby "" "--without-lobby")
+ --collada
+ --bindir="${GAMES_BINDIR}"
+ --libdir="$(games_get_libdir)"/${PN}
+ --datadir="${GAMES_DATADIR}"/${PN}
+ )
+
+ # stock premake4 does not work, use the shipped one
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix
+
+ # regenerate scripts.c so our patch applies
+ cd "${S}"/build/premake/premake4 || die
+ "${S}"/build/premake/premake4/bin/release/premake4 embed || die
+
+ # rebuild premake again... this is the most stupid build system
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix clean
+ emake -C "${S}"/build/premake/premake4/build/gmake.unix
+
+ # run premake to create build scripts
+ cd "${S}"/build/premake || die
+ "${S}"/build/premake/premake4/bin/release/premake4 \
+ --file="premake4.lua" \
+ --outpath="../workspaces/gcc/" \
+ --platform=$(usex amd64 "x64" "x32") \
+ --os=linux \
+ "${myconf[@]}" \
+ gmake || die "Premake failed"
+}
+
+src_compile() {
+ # build 3rd party fcollada
+ emake -C libraries/source/fcollada/src
+
+ # build 0ad
+ emake -C build/workspaces/gcc verbose=1
+}
+
+src_test() {
+ cd binaries/system || die
+ ./test -libdir "${S}/binaries/system" || die "test phase failed"
+}
+
+src_install() {
+ dogamesbin binaries/system/pyrogenesis
+ use editor && dogamesbin binaries/system/ActorEditor
+
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r binaries/data/l10n
+
+ exeinto "$(games_get_libdir)"/${PN}
+ doexe binaries/system/libCollada.so
+ use editor && doexe binaries/system/libAtlasUI.so
+
+ dodoc binaries/system/readme.txt
+ doicon -s 128 build/resources/${PN}.png
+ games_make_wrapper ${PN} "${GAMES_BINDIR}/pyrogenesis"
+ use editor &&
+ games_make_wrapper ${PN}-ActorEditor "${GAMES_BINDIR}/ActorEditor"
+ make_desktop_entry ${PN}
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ einfo
+ elog "It is advised to compile dev-lang/spidermonkey with the"
+ elog "jit USE flag enabled! Otherwise you might experience slowdowns."
+ einfo
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/0ad/Manifest b/games-strategy/0ad/Manifest
new file mode 100644
index 00000000000..6ff61256669
--- /dev/null
+++ b/games-strategy/0ad/Manifest
@@ -0,0 +1,2 @@
+DIST 0ad-0.0.16-alpha-unix-build.tar.xz 20019680 SHA256 cb965ef7e292bc3a2f1f598a9695e16ff4d786398f384a1ec7d5f9bfe2626de5 SHA512 9fe3440233d9827895b91ade1873afe977d62386a5dd6042d8169b153d576b462381bfc97e637f0b183aff034236380ca6d552ea2755cf08398143ad67121031 WHIRLPOOL 0e2f1ac9799a4b4d4588c2370a78195f2cc415fb2043be815ed2a2f9f179ccd856c405e7c0323f2033d3a6a4d63c08d8d5c8a05b50769ae3b9219717218edef6
+DIST 0ad-0.0.17-alpha-unix-build.tar.xz 19327284 SHA256 ef144d44fe8a8abd29a4642999a58a596b8f0d0e1f310065f5ce1dfbe29c3aeb SHA512 21133b7f255df73909e0ba72d455ed8d687cdca4a6d28fb04fb2a786ee941d7f4e207b5c245f9bfff1f3e5e10e2ccc932f49587e227982885eef64b4114d02c6 WHIRLPOOL 662e177293ca7add73ca160b67a526aeda6a7a32e26a68fb577376d25db00df9844fe763a2dfcef70f66fc0edd6d2297158251a517deeaa7d7e8292850a8b444
diff --git a/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch b/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch
new file mode 100644
index 00000000000..5b17120b4f7
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.16_alpha-gcc-4.9.patch
@@ -0,0 +1,42 @@
+Index: /ps/trunk/source/lib/allocators/headerless.cpp
+===================================================================
+--- /ps/trunk/source/lib/allocators/headerless.cpp (revision 15333)
++++ /ps/trunk/source/lib/allocators/headerless.cpp (revision 15334)
+@@ -55,10 +55,12 @@
+ }
+
+- FreedBlock(uintptr_t id, size_t size)
+- : m_magic(s_magic), m_size(size), m_id(id)
+- {
+- }
+-
+- ~FreedBlock()
++ void Setup(uintptr_t id, size_t size)
++ {
++ m_magic = s_magic;
++ m_size = size;
++ m_id = id;
++ }
++
++ void Reset()
+ {
+ // clear all fields to prevent accidental reuse
+@@ -411,6 +413,7 @@
+ FreedBlock* WriteTags(u8* p, size_t size)
+ {
+- FreedBlock* freedBlock = new(p) FreedBlock(s_headerId, size);
+- (void)new(Footer(freedBlock)) FreedBlock(s_footerId, size);
++ FreedBlock* freedBlock = (FreedBlock*)p;
++ freedBlock->Setup(s_headerId, size);
++ Footer(freedBlock)->Setup(s_footerId, size);
+
+ m_freeBlocks++;
+@@ -431,6 +434,6 @@
+
+ FreedBlock* footer = Footer(freedBlock);
+- freedBlock->~FreedBlock();
+- footer->~FreedBlock();
++ freedBlock->Reset();
++ footer->Reset();
+ }
+
diff --git a/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch b/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch
new file mode 100644
index 00000000000..30192fbccd5
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.16_alpha-gentoo.patch
@@ -0,0 +1,93 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sun Jun 24 18:32:38 UTC 2012
+Subject: build system
+
+respect flags
+let stripping be handled by the system
+
+fix minimal-flags option:
+ leave -fvisibility=hidden active
+ leave conditional -fpc-preprocess active
+
+--- build/premake/premake4.lua
++++ build/premake/premake4.lua
+@@ -145,7 +145,7 @@
+
+ function project_set_build_flags()
+
+- flags { "Symbols", "NoEditAndContinue" }
++ flags { "NoEditAndContinue" }
+ if not _OPTIONS["icc"] and (os.is("windows") or not _OPTIONS["minimal-flags"]) then
+ -- adds the -Wall compiler flag
+ flags { "ExtraWarnings" } -- this causes far too many warnings/remarks on ICC
+@@ -337,13 +337,11 @@
+ end
+ end
+
+- if not _OPTIONS["minimal-flags"] then
+ buildoptions {
+ -- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
+ -- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
+ "-fvisibility=hidden"
+ }
+- end
+
+ if _OPTIONS["bindir"] then
+ defines { "INSTALLED_BINDIR=" .. _OPTIONS["bindir"] }
+--- libraries/source/fcollada/src/Makefile
++++ libraries/source/fcollada/src/Makefile
+@@ -9,8 +9,8 @@
+
+ CXX ?= g++
+ CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
+-CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
+-CXXFLAGS_RELEASE := -O1 -DNDEBUG -DRETAIL
++CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
++CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
+ # (-O2 with gcc 4.3 causes linker errors when using this library, for unknown reasons, so stick with -O1 until gcc >4.3 is typical.)
+ CXXFLAGS_TEST := -O0 -g -D_DEBUG
+ LIBS += `pkg-config libxml-2.0 --libs`
+--- build/premake/premake4/src/tools/gcc.lua
++++ build/premake/premake4/src/tools/gcc.lua
+@@ -136,8 +136,6 @@
+ if not cfg.flags.Symbols then
+ if cfg.system == "macosx" then
+ table.insert(result, "-Wl,-x")
+- else
+- table.insert(result, "-s")
+ end
+ end
+
+--- build/premake/premake4/build/gmake.unix/Premake4.make
++++ build/premake/premake4/build/gmake.unix/Premake4.make
+@@ -26,9 +26,9 @@
+ DEFINES += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+ INCLUDES += -I../../src/host/lua-5.1.4/src
+ CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
+- CFLAGS += $(CPPFLAGS) -Wall -Os
+- CXXFLAGS += $(CPPFLAGS) -Wall -Os
+- LDFLAGS += -s -rdynamic
++ CFLAGS += $(CPPFLAGS) -Wall
++ CXXFLAGS += $(CPPFLAGS) -Wall
++ LDFLAGS += -rdynamic
+ LIBS += -lm -ldl
+ RESFLAGS += $(DEFINES) $(INCLUDES)
+ LDDEPS +=
+@@ -48,8 +48,8 @@
+ DEFINES += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+ INCLUDES += -I../../src/host/lua-5.1.4/src
+ CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
+- CFLAGS += $(CPPFLAGS) -Wall -g
+- CXXFLAGS += $(CPPFLAGS) -Wall -g
++ CFLAGS += $(CPPFLAGS) -Wall
++ CXXFLAGS += $(CPPFLAGS) -Wall
+ LDFLAGS += -rdynamic
+ LIBS += -lm -ldl
+ RESFLAGS += $(DEFINES) $(INCLUDES)
+@@ -302,4 +302,4 @@
+ $(SILENT) $(CC) $(PCHINCLUDES) $(CFLAGS) -MF $(OBJDIR)/lauxlib.d -MT "$@" -o "$@" -c "$<"
+
+ -include $(OBJECTS:%.o=%.d)
+--include $(GCH:%.h.gch=%.h.d)
+\ No newline at end of file
++-include $(GCH:%.h.gch=%.h.d)
diff --git a/games-strategy/0ad/files/0ad-0.0.17_alpha-gentoo.patch b/games-strategy/0ad/files/0ad-0.0.17_alpha-gentoo.patch
new file mode 100644
index 00000000000..45233ab1606
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.17_alpha-gentoo.patch
@@ -0,0 +1,100 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sun Jun 24 18:32:38 UTC 2012
+Subject: build system
+
+respect flags
+let stripping be handled by the system
+
+fix minimal-flags option:
+ leave -fvisibility=hidden active
+ leave conditional -fpc-preprocess active
+
+--- build/premake/premake4.lua
++++ build/premake/premake4.lua
+@@ -177,7 +177,7 @@
+
+ function project_set_build_flags()
+
+- flags { "Symbols", "NoEditAndContinue" }
++ flags { "NoEditAndContinue" }
+ if cc ~= "icc" and (os.is("windows") or not _OPTIONS["minimal-flags"]) then
+ -- adds the -Wall compiler flag
+ flags { "ExtraWarnings" } -- this causes far too many warnings/remarks on ICC
+@@ -366,13 +366,11 @@
+ end
+ end
+
+- if not _OPTIONS["minimal-flags"] then
+- buildoptions {
+- -- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
+- -- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
+- "-fvisibility=hidden"
+- }
+- end
++ buildoptions {
++ -- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with
++ -- Windows - they should be exported explicitly with __attribute__ ((visibility ("default")))
++ "-fvisibility=hidden"
++ }
+
+ if _OPTIONS["bindir"] then
+ defines { "INSTALLED_BINDIR=" .. _OPTIONS["bindir"] }
+--- libraries/source/fcollada/src/Makefile
++++ libraries/source/fcollada/src/Makefile
+@@ -9,9 +9,9 @@
+
+ CXX ?= g++
+ CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
+-CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
+-CXXFLAGS_RELEASE := -O2 -DNDEBUG -DRETAIL
+-CXXFLAGS_TEST := -O0 -g -D_DEBUG
++CXXFLAGS_DEBUG := -D_DEBUG -DRETAIL
++CXXFLAGS_RELEASE := -DNDEBUG -DRETAIL
++CXXFLAGS_TEST := -D_DEBUG
+ LIBS += `pkg-config libxml-2.0 --libs`
+ INCLUDES += -IFCollada `pkg-config libxml-2.0 --cflags`
+ INCLUDES_TEST := -IFCollada/FColladaTest $(INCLUDES)
+--- build/premake/premake4/src/tools/gcc.lua
++++ build/premake/premake4/src/tools/gcc.lua
+@@ -136,8 +136,6 @@
+ if not cfg.flags.Symbols then
+ if cfg.system == "macosx" then
+ table.insert(result, "-Wl,-x")
+- else
+- table.insert(result, "-s")
+ end
+ end
+
+--- build/premake/premake4/build/gmake.unix/Premake4.make
++++ build/premake/premake4/build/gmake.unix/Premake4.make
+@@ -26,9 +26,9 @@
+ DEFINES += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+ INCLUDES += -I../../src/host/lua-5.1.4/src
+ CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
+- CFLAGS += $(CPPFLAGS) -Wall -Os
+- CXXFLAGS += $(CPPFLAGS) -Wall -Os
+- LDFLAGS += -s -rdynamic
++ CFLAGS += $(CPPFLAGS) -Wall
++ CXXFLAGS += $(CPPFLAGS) -Wall
++ LDFLAGS += -rdynamic
+ LIBS += -lm -ldl
+ RESFLAGS += $(DEFINES) $(INCLUDES)
+ LDDEPS +=
+@@ -48,8 +48,8 @@
+ DEFINES += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN
+ INCLUDES += -I../../src/host/lua-5.1.4/src
+ CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
+- CFLAGS += $(CPPFLAGS) -Wall -g
+- CXXFLAGS += $(CPPFLAGS) -Wall -g
++ CFLAGS += $(CPPFLAGS) -Wall
++ CXXFLAGS += $(CPPFLAGS) -Wall
+ LDFLAGS += -rdynamic
+ LIBS += -lm -ldl
+ RESFLAGS += $(DEFINES) $(INCLUDES)
+@@ -302,4 +302,4 @@
+ $(SILENT) $(CC) $(PCHINCLUDES) $(CFLAGS) -MF $(OBJDIR)/lauxlib.d -MT "$@" -o "$@" -c "$<"
+
+ -include $(OBJECTS:%.o=%.d)
+--include $(GCH:%.h.gch=%.h.d)
+\ No newline at end of file
++-include $(GCH:%.h.gch=%.h.d)
diff --git a/games-strategy/0ad/metadata.xml b/games-strategy/0ad/metadata.xml
new file mode 100644
index 00000000000..b0120ff5c7d
--- /dev/null
+++ b/games-strategy/0ad/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+ <use>
+ <flag name="editor">Include Atlas scenario editor projects</flag>
+ <flag name="lobby">Enable the use of <pkg>net-libs/gloox</pkg>
+ and the multiplayer lobby</flag>
+ <flag name="nvtt">Support for some uncompressed data formats
+ via <pkg>media-gfx/nvidia-texture-tools</pkg>
+ (might be needed for some mods)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">zero-ad</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/asc/Manifest b/games-strategy/asc/Manifest
new file mode 100644
index 00000000000..5d12045024a
--- /dev/null
+++ b/games-strategy/asc/Manifest
@@ -0,0 +1,4 @@
+DIST asc-2.6.0.0.tar.bz2 42280527 SHA256 e59caa549dc8d8a321211f60652cc809cbbf37d000ee85af790e676d9656cbbb SHA512 e1dea48bf87424fd65772e6d9bad96cf63e4062df5717bbc925562683782afc2d9788ea28e7147d905c3c0f6db3ef7c102a59022988c9fcf8aa6adba91dc5540 WHIRLPOOL 1662259bb1ab1c6f31b8ba227a7ac757f2a89ba4caacd9f2f5f3f737f60c31096f247cbc72eca61e572edce9ba4baeae6d5320e748a1415acc4ee0663f9db3b5
+DIST frontiers.ogg 4691844 SHA256 eabc9b07d1db07626fa817a30dad23b11aada059e32c08914d2d0cf1d58c7fff SHA512 8c2ce497519b3842fba2d39b5c6de6194584d64c0375d404535628898cb2e7a82433fc6008781381a80a6cbb24ff49162de3634ebcf28b17b0631c30668fd8af WHIRLPOOL a48a6596421a7a5b2d663af14e12c04db2a47c3bde8f1cc54dfe72c69b095613e6479eb408483679979f264d848911b34ee7edb56757734229d1990046bcdd5b
+DIST machine_wars.ogg 3138308 SHA256 bd7f330c06090d98e5ba0dac5a691af1804ba383b783b7b2f960bc2e53400a77 SHA512 2c1bab89b9397f52dcf7eedfc0dbc88d49a586ac0474c76a09a87a880712bf0fa408c03a65a5f5d322dee86e3b12cbc66d53cd6728e8fa34fa8f2ee2bbc06cd8 WHIRLPOOL 7a83910d48414ffe3687374efb661dd169801f244857a4f154d400b76477917bfa2db63dfddfc57544be95e413cf23e810b346f3a39d4f140454237b235a2eee
+DIST time_to_strike.ogg 3830679 SHA256 0334a027b8a45a5df88e1e3e7db9cace2def02396fbcc794d157289e41c9ad05 SHA512 2ed946116cac2ea63d401eb7415d5b3e4e548bc5a5b00b01a6f1c4db6a242895810dfefdf1ace9652f01dc934a70b756aa74d01630cfac97b19ce84a93b772ee WHIRLPOOL d7a280bc4041e449a96e4f79483110c4f86d099be4550fe70edd1882df81d8242fe6bf687079b6b2f608f879462c1a5ca84dae7e11e68ea97d93d0651d48ef4f
diff --git a/games-strategy/asc/asc-2.6.0.0.ebuild b/games-strategy/asc/asc-2.6.0.0.ebuild
new file mode 100644
index 00000000000..b00320b8b69
--- /dev/null
+++ b/games-strategy/asc/asc-2.6.0.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER=2.8
+inherit eutils toolchain-funcs flag-o-matic wxwidgets games
+
+DESCRIPTION="turn based strategy game designed in the tradition of the Battle Isle series"
+HOMEPAGE="http://www.asc-hq.org/"
+SRC_URI="mirror://sourceforge/asc-hq/${P}.tar.bz2
+ http://www.asc-hq.org/music/frontiers.ogg
+ http://www.asc-hq.org/music/time_to_strike.ogg
+ http://www.asc-hq.org/music/machine_wars.ogg"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="app-arch/bzip2
+ media-libs/libsdl[video]
+ media-libs/libpng
+ media-libs/sdl-image[gif,jpeg,png]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-sound
+ dev-libs/boost
+ dev-games/physfs
+ media-libs/xvid
+ dev-libs/expat
+ media-libs/freetype
+ dev-lang/lua:0
+ x11-libs/wxGTK:2.8[X]
+ dev-libs/libsigc++:1.2"
+
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ virtual/pkgconfig
+ app-arch/zip"
+
+src_unpack() {
+ local f
+
+ unpack ${P}.tar.bz2
+ for f in ${A}
+ do
+ case ${f} in
+ *ogg)
+ cp "${DISTDIR}/${f}" "${S}/data/music" || die
+ ;;
+ esac
+ done
+}
+
+src_configure() {
+ # Added --disable-paraguitest for bugs 26402 and 4488
+ # Added --disable-paragui for bug 61154 since it's not really used much
+ # and the case is well documented at http://www.asc-hq.org/
+ if [[ $(gcc-major-version) -eq 4 ]] ; then
+ replace-flags -O3 -O2
+ fi
+ egamesconf \
+ --disable-paraguitest \
+ --disable-paragui \
+ --datadir="${GAMES_DATADIR_BASE}"
+}
+
+src_install() {
+ default
+ dohtml -r doc/*
+ prepgamesdirs
+}
diff --git a/games-strategy/asc/metadata.xml b/games-strategy/asc/metadata.xml
new file mode 100644
index 00000000000..7e61522f75c
--- /dev/null
+++ b/games-strategy/asc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">asc-hq</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/attal/Manifest b/games-strategy/attal/Manifest
new file mode 100644
index 00000000000..b277c9e898e
--- /dev/null
+++ b/games-strategy/attal/Manifest
@@ -0,0 +1,2 @@
+DIST attal-src-0.10.1.tar.bz2 283704 SHA256 9dd692daa99dbf3ec14c178b5b3334a6a4085f790749aa58cf45ddf8c5e8649b
+DIST themes-0.10.1.tar.bz2 30744206 SHA256 1f0e9c8b70ac8fd50cf7af492177b88383b230fe400f6ffa4b5641badac5a002
diff --git a/games-strategy/attal/attal-0.10.1.ebuild b/games-strategy/attal/attal-0.10.1.ebuild
new file mode 100644
index 00000000000..f3c320648fa
--- /dev/null
+++ b/games-strategy/attal/attal-0.10.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils qt4-r2 games
+
+MY_P="${PN}-src-${PV}"
+DESCRIPTION="turn-based strategy game project"
+HOMEPAGE="http://www.attal-thegame.org/"
+SRC_URI="mirror://sourceforge/attal/${MY_P}.tar.bz2
+ mirror://sourceforge/attal/themes-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ dev-qt/qt3support:4
+ media-libs/libsdl
+ media-libs/sdl-mixer[vorbis]"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ mv ../themes .
+ ecvs_clean
+ epatch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-gentoo.patch
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ libCommon/displayHelp.cpp \
+ libCommon/attalCommon.cpp \
+ server/duel.cpp \
+ || die "sed failed"
+}
+
+src_configure() {
+ eqmake4 Makefile.pro
+}
+
+src_compile() {
+ local d
+
+ for d in Common Client Fight Server
+ do
+ emake sub-lib$d || die "emake failed"
+ done
+ emake || die "emake failed"
+}
+
+src_install() {
+ dogamesbin attal-* || die "dogamesbin failed"
+ dogameslib.so lib*.so* || die "dogameslib.so failed"
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r themes HOWTOPLAY.html || die "doins failed"
+ dodoc AUTHORS NEWS README TODO
+ prepgamesdirs
+}
diff --git a/games-strategy/attal/files/attal-0.10.1-gcc41.patch b/games-strategy/attal/files/attal-0.10.1-gcc41.patch
new file mode 100644
index 00000000000..161aa3251d2
--- /dev/null
+++ b/games-strategy/attal/files/attal-0.10.1-gcc41.patch
@@ -0,0 +1,33 @@
+--- libClient/ressourceWin.h.old 2006-09-11 20:57:10.000000000 +0200
++++ libClient/ressourceWin.h 2006-09-11 20:57:24.000000000 +0200
+@@ -54,7 +54,7 @@
+
+ public:
+ /** Construtcor */
+- RessourceWin( QWidget * parent = 0, const char * name = 0, WinResType type );
++ RessourceWin( QWidget * parent, const char * name, WinResType type );
+
+ /** Initialize player */
+ void setPlayer( GenericPlayer * );
+--- libCommon/creature.h.old 2006-05-25 00:50:11.000000000 -0400
++++ libCommon/creature.h 2006-05-25 00:51:51.000000000 -0400
+@@ -38,6 +38,7 @@
+
+ class CreatureHandler;
+ class GenericFightUnit;
++int computeSequence( GenericFightUnit * unit );
+
+ /** Manage a creature */
+ enum CreatureAnimationType {
+
+--- server/serverInterface.h.old 2006-09-11 21:33:00.000000000 +0200
++++ server/serverInterface.h 2006-09-11 21:33:16.000000000 +0200
+@@ -135,7 +135,7 @@
+ void initStatusBar();
+
+ /** Add new action */
+- QAction * ServerInterface::addAction( const QString & label, MENU_ACTIONS id, QSignalMapper * sigmap );
++ QAction *addAction( const QString & label, MENU_ACTIONS id, QSignalMapper * sigmap );
+
+ void addAI(bool hide);
+
diff --git a/games-strategy/attal/files/attal-0.10.1-gentoo.patch b/games-strategy/attal/files/attal-0.10.1-gentoo.patch
new file mode 100644
index 00000000000..ab8d0c60510
--- /dev/null
+++ b/games-strategy/attal/files/attal-0.10.1-gentoo.patch
@@ -0,0 +1,33 @@
+--- libCommon/displayHelp.cpp.old 2006-09-11 22:41:38.000000000 +0200
++++ libCommon/displayHelp.cpp 2006-09-11 22:42:20.000000000 +0200
+@@ -44,7 +44,7 @@
+ _text->mimeSourceFactory()->setFilePath( QString(".") );
+ _text->mimeSourceFactory()->setExtensionType( "html", "text/html;charset=iso8859-1" );
+ _text->setTextFormat( Qt::RichText );
+- _text->setSource( "./HOWTOPLAY.html" );
++ _text->setSource( "@GENTOO_DATADIR@/HOWTOPLAY.html" );
+
+ QPushButton * pbOk = new QPushButton( this );
+ pbOk->setText( QObject::tr( "Ok" ) );
+--- libCommon/attalCommon.cpp.old 2006-09-11 22:45:23.000000000 +0200
++++ libCommon/attalCommon.cpp 2006-09-11 22:47:28.000000000 +0200
+@@ -52,7 +52,7 @@
+ {
+ QDir folder;
+
+- folder.setPath( "./themes/" + THEME );
++ folder.setPath( "@GENTOO_DATADIR@/themes/" + THEME );
+
+ #ifndef WIN32
+ if( ! folder.exists() ) {
+--- server/duel.cpp.old 2006-09-11 22:48:30.000000000 +0200
++++ server/duel.cpp 2006-09-11 22:48:57.000000000 +0200
+@@ -44,7 +44,7 @@
+ {
+ QDir folder;
+
+- folder.setPath( "./themes/" + THEME );
++ folder.setPath( "@GENTOO_DATADIR@/themes/" + THEME );
+ if( ! folder.exists() ) {
+ folder.setPath( "/usr/local/share/games/attal/themes/" + THEME );
+ if( ! folder.exists() ) {
diff --git a/games-strategy/attal/metadata.xml b/games-strategy/attal/metadata.xml
new file mode 100644
index 00000000000..cfb26d87feb
--- /dev/null
+++ b/games-strategy/attal/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">attal</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/boswars/Manifest b/games-strategy/boswars/Manifest
new file mode 100644
index 00000000000..14a34621a4f
--- /dev/null
+++ b/games-strategy/boswars/Manifest
@@ -0,0 +1,3 @@
+DIST bos.png 620 SHA256 fe1d24bc722093bd3882ecab15c15f61b6b0edee263bfd58af662825e76d8b0a SHA512 6a15a5c82f9cff3462d498620a1dd1c7a2a460119689078157e61b27e7e5243a8ac2da7f01c1848d614167a3a748ca1f3e03c1f218479ede3a1c2c0ae85b3cc3 WHIRLPOOL 4688e15b35a4c6e6888b867f16e646e520bf00cbb04d586b08567b2177fe9e82d0a2e1c31060c18ac2149df727f8a781f4394936c77a0d0b6ef846051ff760e7
+DIST boswars-2.7-fixed-images-for-libpng-1.6.tar.xz 552956 SHA256 87f3ee7f4045c3acfacd884348a2b376e710b42aa0f40acbc212732d0bee9a24 SHA512 794addf06cfd5c5bb0ad0988a90337a3a6332789de7bc942807602c84c4fafe4c4b12da63ae210ca220a1be6dcd9677fa9ddb1ae62a7d26a7748af35b07303dc WHIRLPOOL d6bc11f8db099cd91976590a25e63eed51c2cd724eb64d2e859556dcf3ef22a66451b114542a0e0bcc819c517b4c5fdb3e294680a9e11dbe990650815ac37507
+DIST boswars-2.7-src.tar.gz 77280735 SHA256 dc3718f531e9ea413cf37e1333b62a4c5e69f1405502d9c59b9e424635135e3e SHA512 2573c61684e83f356a80292adcf780cc001a4be2a31abba20e6f93ed6deaa38b8eca87f29935a4fe0edc9b4e0fdc3f78ddd709b8132aaaa048ffbcd6c498ec80 WHIRLPOOL f8e0156fbf2d868eb4066bab0592a9fc5c1fce055aba81c056da1d10da4112913f50312fc1526a0ff62159a84b9463907c92b8ae54445fab20dc5879bf961322
diff --git a/games-strategy/boswars/boswars-2.7-r1.ebuild b/games-strategy/boswars/boswars-2.7-r1.ebuild
new file mode 100644
index 00000000000..2938aaec01b
--- /dev/null
+++ b/games-strategy/boswars/boswars-2.7-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils scons-utils games
+
+DESCRIPTION="Futuristic real-time strategy game"
+HOMEPAGE="http://www.boswars.org/"
+SRC_URI="http://www.boswars.org/dist/releases/${P}-src.tar.gz
+ http://dev.gentoo.org/~hasufell/distfiles/${P}-fixed-images-for-libpng-1.6.tar.xz
+ mirror://gentoo/bos.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="dev-lang/lua
+ media-libs/libsdl[opengl,sound,video]
+ media-libs/libpng:0
+ media-libs/libvorbis
+ media-libs/libtheora
+ media-libs/libogg
+ virtual/opengl
+ x11-libs/libX11"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P}-src
+
+src_unpack() {
+ default
+ # bug 475764
+ cp -dRp ${P}-fixed-images-for-libpng-1.6/* ${P}-src/ \
+ || die "copying fixed images failed!"
+}
+
+src_prepare() {
+ rm -f doc/{README-SDL.txt,guichan-copyright.txt}
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-scons-blows.patch
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ engine/include/stratagus.h \
+ || die
+ sed -i \
+ -e "/-O2/s:-O2.*math:${CXXFLAGS} -Wall:" \
+ SConstruct \
+ || die
+}
+
+src_compile() {
+ escons || die
+}
+
+src_install() {
+ newgamesbin build/${PN}-release ${PN}
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r campaigns graphics intro languages maps patches scripts sounds units
+ newicon "${DISTDIR}"/bos.png ${PN}.png
+ make_desktop_entry ${PN} "Bos Wars"
+ # COPYRIGHT.txt is referenced by the html
+ dodoc CHANGELOG COPYRIGHT.txt README.txt
+ dohtml -r doc/*
+ prepgamesdirs
+}
diff --git a/games-strategy/boswars/files/boswars-2.7-gentoo.patch b/games-strategy/boswars/files/boswars-2.7-gentoo.patch
new file mode 100644
index 00000000000..9459c77d89b
--- /dev/null
+++ b/games-strategy/boswars/files/boswars-2.7-gentoo.patch
@@ -0,0 +1,12 @@
+diff -ru boswars-2.6.1-src.orig/engine/include/stratagus.h boswars-2.6.1-src/engine/include/stratagus.h
+--- boswars-2.6.1-src.orig/engine/include/stratagus.h 2010-04-11 08:12:18.000000000 -0400
++++ boswars-2.6.1-src/engine/include/stratagus.h 2010-05-22 02:33:50.021377764 -0400
+@@ -133,7 +133,7 @@
+ -- General
+ ----------------------------------------------------------------------------*/
+ #ifndef STRATAGUS_LIB_PATH
+-#define STRATAGUS_LIB_PATH "." /// Where to find the data files
++#define STRATAGUS_LIB_PATH "@GENTOO_DATADIR@" /// Where to find the data files
+ #endif
+
+ #ifndef STRATAGUS_HOME_PATH
diff --git a/games-strategy/boswars/files/boswars-2.7-scons-blows.patch b/games-strategy/boswars/files/boswars-2.7-scons-blows.patch
new file mode 100644
index 00000000000..0a7029df497
--- /dev/null
+++ b/games-strategy/boswars/files/boswars-2.7-scons-blows.patch
@@ -0,0 +1,27 @@
+--- SConstruct.orig 2010-11-19 21:09:45.724976603 -0500
++++ SConstruct 2010-11-19 21:11:05.723197985 -0500
+@@ -22,6 +22,7 @@
+ ##
+
+ import os
++import SCons.Util
+ import sys
+ import glob
+ from stat import *
+@@ -50,6 +51,16 @@
+
+ opts = DefineOptions("build_options.py", ARGUMENTS)
+ env = Environment(ENV = {'PATH':os.environ['PATH']}) # for an unknown reason Environment(options=opts) doesnt work well
++if os.environ.has_key('CC'):
++ env['CC'] = os.environ['CC']
++if os.environ.has_key('CFLAGS'):
++ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
++if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
++if os.environ.has_key('CXXFLAGS'):
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++if os.environ.has_key('LDFLAGS'):
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+ opts.Update(env) # Needed as Environment(options=opts) doesnt seem to work
+ Help(opts.GenerateHelpText(env))
+ mingw = env.Clone()
diff --git a/games-strategy/boswars/metadata.xml b/games-strategy/boswars/metadata.xml
new file mode 100644
index 00000000000..84108ff3546
--- /dev/null
+++ b/games-strategy/boswars/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription lang="en">
+Bos Wars is a futuristic real-time strategy game. It is possible to play against
+human opponents over LAN, internet, or against the computer.
+Bos Wars aims to create a completely original and fun open source RTS game.
+</longdescription>
+</pkgmetadata>
diff --git a/games-strategy/coldwar-demo/Manifest b/games-strategy/coldwar-demo/Manifest
new file mode 100644
index 00000000000..f0a92cdf7b7
--- /dev/null
+++ b/games-strategy/coldwar-demo/Manifest
@@ -0,0 +1 @@
+DIST coldwar-demo.run 354684447 SHA256 769ca25da2f095e85e594ee09343ea20bf353e75f3bce362b937c2fae04c52aa SHA512 12fb0b482d7914c0f04256e5daefd287f1b172106de756c486e92341beb1d85332ba29941be0ba9711dabd2f2e7332c05034103c5a2a979743901b4eeb13b4a3 WHIRLPOOL 7df09173069969d2e7f7b50896058ae1553ef58eaa528db83c294adfad41c2b27ba4c7d1ff335a3901c66f1ea4bbb70f126f4f0cbcc369dab656d4ad93eacc9b
diff --git a/games-strategy/coldwar-demo/coldwar-demo-1-r2.ebuild b/games-strategy/coldwar-demo/coldwar-demo-1-r2.ebuild
new file mode 100644
index 00000000000..8c9d6545165
--- /dev/null
+++ b/games-strategy/coldwar-demo/coldwar-demo-1-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_PN=${PN%-demo}
+
+DESCRIPTION="Third-person sneaker like Splinter Cell"
+HOMEPAGE="http://linuxgamepublishing.com/info.php?id=coldwar"
+SRC_URI="http://demofiles.linuxgamepublishing.com/coldwar/coldwar-demo.run"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror bindist strip"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3[abi_x86_32(-)]
+ >=media-libs/libogg-1.3.0[abi_x86_32(-)]
+ >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)]
+ >=media-libs/openal-1.15.1[abi_x86_32(-)]
+ >=media-libs/smpeg-0.4.4-r10[abi_x86_32(-)]
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]"
+
+S=${WORKDIR}
+dir=${GAMES_PREFIX_OPT}/${PN}
+
+QA_PREBUILT="${dir:1}/lib/*
+ ${dir:1}/bin/meng"
+
+src_unpack() {
+ unpack_makeself
+ unpack ./data/data.tar.gz
+
+ mv bin/Linux/x86/${MY_PN}_demo .
+ mv bin/Linux/x86/bin/meng bin
+
+ rm -r bin/{Linux,*BSD} lgp_* setup.* data/data.tar.gz
+}
+
+src_install() {
+ insinto "${dir}"
+ doins -r *
+ rm "${D}/${dir}"/{${MY_PN}_demo,bin/{launcher,meng}}
+
+ exeinto "${dir}"
+ doexe ${MY_PN}_demo
+ exeinto "${dir}/bin"
+ doexe bin/{launcher,meng}
+
+ games_make_wrapper ${PN} ./${MY_PN}_demo "${dir}" "${dir}"
+ newicon icon.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "Cold War (Demo)" ${PN}
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "The instruction manual is available as:"
+ elog " http://demofiles.linuxgamepublishing.com/coldwar/manual.pdf"
+ echo
+ einfo "To play the game, run: ${PN}"
+}
diff --git a/games-strategy/coldwar-demo/metadata.xml b/games-strategy/coldwar-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/coldwar-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/coldwar/Manifest b/games-strategy/coldwar/Manifest
new file mode 100644
index 00000000000..d3b6bb2c819
--- /dev/null
+++ b/games-strategy/coldwar/Manifest
@@ -0,0 +1 @@
+DIST coldwar-1.0-1.0.1-x86.run 181769 SHA256 adffc27da6eff739a46193dd095d4b10048a251997b8c876befcae94423a1f32
diff --git a/games-strategy/coldwar/coldwar-1.0.1-r1.ebuild b/games-strategy/coldwar/coldwar-1.0.1-r1.ebuild
new file mode 100644
index 00000000000..8cf98a6aa68
--- /dev/null
+++ b/games-strategy/coldwar/coldwar-1.0.1-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker cdrom versionator games
+
+PV_MAJOR=$(get_version_component_range 1-2)
+MY_P=${PN}-${PV_MAJOR}-${PV}
+
+DESCRIPTION="Third-person sneaker like Splinter Cell"
+HOMEPAGE="http://linuxgamepublishing.com/info.php?id=coldwar"
+SRC_URI="http://updatefiles.linuxgamepublishing.com/${PN}/${MY_P}-x86.run"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="linguas_de linguas_fr linguas_ru"
+RESTRICT="mirror bindist strip"
+
+RDEPEND="
+ >=dev-libs/glib-2.34.3[abi_x86_32(-)]
+ >=media-libs/libogg-1.3.0[abi_x86_32(-)]
+ >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)]
+ >=media-libs/openal-1.15.1[abi_x86_32(-)]
+ >=media-libs/smpeg-0.4.4-r10[abi_x86_32(-)]
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cdrom_get_cds bin/Linux/x86/${PN}
+ ln -sfn "${CDROM_ROOT}"/data cd
+ unpack "./cd/data.tar.gz"
+ use linguas_de && unpack "./cd/langpack_de.tar.gz"
+ use linguas_fr && unpack "./cd/langpack_fr.tar.gz"
+ use linguas_ru && unpack "./cd/langpack_ru.tar.gz"
+ rm -f cd
+
+ cp -rf "${CDROM_ROOT}"/bin/Linux/x86/* . || die
+ cp -f "${CDROM_ROOT}"/{READ*,icon*} . || die
+
+ mkdir -p patch_dir
+ cd patch_dir
+ unpack_makeself ${MY_P}-x86.run
+ bin/Linux/x86/loki_patch patch.dat "${S}" || die
+ cd "${S}"
+ rm -rf patch_dir
+}
+
+src_install() {
+ dir=${GAMES_PREFIX_OPT}/${PN}
+
+ insinto "${dir}"
+ doins -r *
+
+ exeinto "${dir}"
+ doexe ${PN}
+
+ exeinto "${dir}"/bin
+ doexe bin/{launch*,meng}
+
+ exeinto "${dir}"/lib
+ doexe lib/lib*
+
+ games_make_wrapper ${PN} ./${PN} "${dir}"
+ newicon "${CDROM_ROOT}"/icon.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "Cold War" ${PN}
+
+ prepgamesdirs
+}
diff --git a/games-strategy/coldwar/metadata.xml b/games-strategy/coldwar/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/coldwar/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/crimson/Manifest b/games-strategy/crimson/Manifest
new file mode 100644
index 00000000000..53b52d74d75
--- /dev/null
+++ b/games-strategy/crimson/Manifest
@@ -0,0 +1 @@
+DIST crimson-0.5.3.tar.bz2 882366 SHA256 d59858c05e340367c61c8ca1dd00c36642a0c56d10d1d9a1626c5ba7d88b40d6 SHA512 9632317c4b258ed5e501ad1d058706ed654fc621b07099f65d93e29fe92e53fc8f6bbffa13c70fc2129f30695d3f10e85174234dc96cc171631b3465d2b7cffc WHIRLPOOL 89ddb776b86de245004f69af3421803a8bceb30499b416612a52f3203eaeb98013cf1fe8af027f24756d77a05d3fa23a20a2c361cded41c19279f402498022f3
diff --git a/games-strategy/crimson/crimson-0.5.3.ebuild b/games-strategy/crimson/crimson-0.5.3.ebuild
new file mode 100644
index 00000000000..f18edcbbf5e
--- /dev/null
+++ b/games-strategy/crimson/crimson-0.5.3.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Tactical war game in the tradition of Battle Isle"
+HOMEPAGE="http://crimson.seul.org/"
+SRC_URI="http://crimson.seul.org/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="test zlib"
+
+RDEPEND="media-libs/libsdl[sound,video]
+ media-libs/sdl-mixer
+ media-libs/sdl-ttf
+ media-libs/sdl-net
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ dev-libs/libxslt
+ test? (
+ =app-text/docbook-xml-dtd-4.2*
+ dev-libs/libxml2
+ )"
+
+src_configure() {
+ egamesconf \
+ --enable-sound \
+ --enable-network \
+ $(use_with zlib) \
+ --enable-cfed \
+ --enable-bi2cf \
+ --enable-comet \
+ --enable-cf2bmp
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ pixmapsdir="/usr/share/pixmaps" \
+ install
+ dodoc NEWS README* THANKS TODO
+ rm -rf "${D}/${GAMES_DATADIR}/applications"
+ make_desktop_entry crimson "Crimson Fields"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ ewarn "Crimson Fields ${PV} is not necessarily save-game compatible with previous versions."
+ echo
+ elog "If you have older save files and you wish to continue those games,"
+ elog "you'll need to remerge the version with which you started"
+ elog "those save-games."
+}
diff --git a/games-strategy/crimson/metadata.xml b/games-strategy/crimson/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/crimson/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/darwinia-demo/Manifest b/games-strategy/darwinia-demo/Manifest
new file mode 100644
index 00000000000..bf77ae1fb86
--- /dev/null
+++ b/games-strategy/darwinia-demo/Manifest
@@ -0,0 +1 @@
+DIST darwinia-demo2-1.3.0.sh 22470072 SHA256 2a51ca4e881f7aafe237fedf2e45ea84b48f02488482f55fb3af605a37833d85
diff --git a/games-strategy/darwinia-demo/darwinia-demo-1.3.0.ebuild b/games-strategy/darwinia-demo/darwinia-demo-1.3.0.ebuild
new file mode 100644
index 00000000000..7d542431b17
--- /dev/null
+++ b/games-strategy/darwinia-demo/darwinia-demo-1.3.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="Darwinia, the hyped indie game of the year. By the Uplink creators"
+HOMEPAGE="http://www.darwinia.co.uk/downloads/demo_linux.html"
+SRC_URI="http://www.introversion.co.uk/darwinia/downloads/${PN}2-${PV}.sh"
+
+LICENSE="Introversion"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+RESTRICT="mirror strip"
+
+RDEPEND="
+ ~virtual/libstdc++-3.3
+ media-libs/libsdl[abi_x86_32(-)]
+ media-libs/libvorbis[abi_x86_32(-)]
+ virtual/glu[abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+
+src_unpack() {
+ unpack_makeself
+}
+
+src_install() {
+ exeinto "${dir}/lib"
+ insinto "${dir}/lib"
+
+ doexe lib/{darwinia.bin.x86,open-www.sh}
+ doins lib/{sounds,main,language}.dat
+
+ insinto "${dir}"
+ dodoc README
+
+ exeinto "${dir}"
+ doexe bin/Linux/x86/darwinia
+
+ games_make_wrapper darwinia-demo ./darwinia "${dir}" "${dir}"
+ newicon darwinian.png ${PN}.png
+ make_desktop_entry darwinia-demo "Darwinia (Demo)"
+ prepgamesdirs
+}
diff --git a/games-strategy/darwinia-demo/metadata.xml b/games-strategy/darwinia-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/darwinia-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/darwinia/Manifest b/games-strategy/darwinia/Manifest
new file mode 100644
index 00000000000..b460b9a8c8f
--- /dev/null
+++ b/games-strategy/darwinia/Manifest
@@ -0,0 +1,2 @@
+DIST darwinia-full-1.3.0.sh 4010019 SHA256 847ecce5b5cee1a576531d0e1291f2e7838a69fd0a2ac426088d3b8944f11bbd SHA512 9790c1534a868b9561acf451cccb3356eb85ecbf8e271e344468b7982466802da5e3537c555839acfa64e1c56a25a08f8dba47a69eaf9de21a7575fba4dc2ebb WHIRLPOOL a6119243befc3b64487247373e43311da0e117aa212dea82f01dc144900e4346dc7c19fff078b0465833ccbffaf2f41a2e29386c34187b495e0314a49c434d81
+DIST darwinia-full-1.4.0b9.sh 4228121 SHA256 9355b4a3feb28c1399ee95a29fd089ed7cc34400a2ae0aaa4b34ea433887f00c SHA512 ed228943d4e70fc5799bbe7566b4fd862f2494f9d02bcd874f0d1b93d7bbc9a2c24a98fb5b8219fed20759bfe2af54d6ea33c60ddd8d8850e591a89822b41bb5 WHIRLPOOL a20dfc49be659ba4418cad4a5de7d287e5402aa56cdd6b8c801c1c2da83779acb51b7f31579d994afaf2ed3a4a956b8a6d7638224371e030917f02d941546fbb
diff --git a/games-strategy/darwinia/darwinia-1.3.0.ebuild b/games-strategy/darwinia/darwinia-1.3.0.ebuild
new file mode 100644
index 00000000000..2cfbe7a25cd
--- /dev/null
+++ b/games-strategy/darwinia/darwinia-1.3.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+CDROM_OPTIONAL="yes"
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="the hyped indie game of the year. By the Uplink creators"
+HOMEPAGE="http://www.darwinia.co.uk/support/linux.html"
+SRC_URI="http://www.introversion.co.uk/darwinia/downloads/${PN}-full-${PV}.sh"
+
+LICENSE="Introversion"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+RESTRICT="mirror strip"
+
+RDEPEND="
+ ~virtual/libstdc++-3.3
+ media-libs/libsdl[abi_x86_32(-)]
+ media-libs/libvorbis[abi_x86_32(-)]
+ virtual/glu[abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+
+src_unpack() {
+ use cdinstall && cdrom_get_cds gamefiles/main.dat
+ unpack_makeself
+}
+
+src_install() {
+ insinto "${dir}"/lib
+ exeinto "${dir}"/lib
+
+ doins lib/{language,patch}.dat
+ doexe lib/darwinia.bin.x86 lib/open-www.sh
+
+ exeinto "${dir}"
+ doexe bin/Linux/x86/darwinia
+
+ if use cdinstall ; then
+ doins "${CDROM_ROOT}"/gamefiles/{main,sounds}.dat
+ fi
+
+ dodoc README
+ newicon darwinian.png darwinia.png
+
+ games_make_wrapper darwinia ./darwinia "${dir}" "${dir}"
+ make_desktop_entry darwinia "Darwinia"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ if ! use cdinstall; then
+ ewarn "To play the game, you need to copy main.dat and sounds.dat"
+ ewarn "from gamefiles/ on the game CD to ${dir}/lib/."
+ fi
+ games_pkg_postinst
+}
diff --git a/games-strategy/darwinia/darwinia-1.4.0_beta9.ebuild b/games-strategy/darwinia/darwinia-1.4.0_beta9.ebuild
new file mode 100644
index 00000000000..f80aec69f12
--- /dev/null
+++ b/games-strategy/darwinia/darwinia-1.4.0_beta9.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+CDROM_OPTIONAL="yes"
+inherit eutils unpacker cdrom games
+
+MY_PV=${PV/_beta/b}
+DESCRIPTION="the hyped indie game of the year. By the Uplink creators"
+HOMEPAGE="http://www.darwinia.co.uk/support/linux.html"
+SRC_URI="http://www.introversion.co.uk/darwinia/downloads/${PN}-full-${MY_PV}.sh"
+
+LICENSE="Introversion"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror strip"
+
+RDEPEND="
+ ~virtual/libstdc++-3.3
+ media-libs/libsdl[abi_x86_32(-)]
+ media-libs/libvorbis[abi_x86_32(-)]
+ virtual/glu[abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+QA_PREBUILT="${dir:1}/lib/darwinia.bin.x86"
+
+src_unpack() {
+ use cdinstall && cdrom_get_cds gamefiles/main.dat
+ unpack_makeself
+}
+
+src_install() {
+ insinto "${dir}"/lib
+ exeinto "${dir}"/lib
+
+ doins lib/{language,patch}.dat
+ doexe lib/darwinia.bin.x86 lib/open-www.sh
+
+ exeinto "${dir}"
+ doexe bin/Linux/x86/darwinia
+
+ if use cdinstall ; then
+ doins "${CDROM_ROOT}"/gamefiles/{main,sounds}.dat
+ fi
+
+ dodoc README
+ newicon darwinian.png darwinia.png
+
+ games_make_wrapper darwinia ./darwinia "${dir}" "${dir}"
+ make_desktop_entry darwinia "Darwinia"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ if ! use cdinstall; then
+ ewarn "To play the game, you need to copy main.dat and sounds.dat"
+ ewarn "from gamefiles/ on the game CD to ${dir}/lib/."
+ fi
+ games_pkg_postinst
+}
diff --git a/games-strategy/darwinia/metadata.xml b/games-strategy/darwinia/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/darwinia/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/defcon-demo/Manifest b/games-strategy/defcon-demo/Manifest
new file mode 100644
index 00000000000..da6de0c4d97
--- /dev/null
+++ b/games-strategy/defcon-demo/Manifest
@@ -0,0 +1,2 @@
+DIST defcon_1.6-1_amd64.deb 62377900 SHA256 52142cf3684f054f2449bb0dae96a3b9e0a9d5bb003ea479b25f8a55daffcb26 SHA512 b71aacc3cd94eec8f1ea19ee03d8098fcdd96191c12d614f55076826ef0bb44c8ada66dfd3df7d94d042b33bdd8fa5f0f58e69fc980d6213c320ab4ce2d682a9 WHIRLPOOL 8c9813764b412f4b2d2f1d75530e60800e49b98668bce11e931d898404ec10d45bc42e3c5478154b696c41b9dff93bcb0c72817ece38aedb50cc11bbc53265f1
+DIST defcon_1.6-1_i386.deb 62311684 SHA256 e61f1ebe93eaf821b6313b37e080a76a9444c2c46afc8e2386a0f2b644b8d1d3 SHA512 0e60e8fbca2f3046228b656990e3adb471de4f64a99d435c96b1e5a8cc49b1250c48ceeb19a4bcb58354e750398de2559256d26a38b20286dec3c0ce7f97ebb8 WHIRLPOOL 0d5fed7be50abaa2dd29434aae986bb63851a208f394b950a55c89d02cc36faf571209730641842a7af1cde0f33501cd6cb0dcb33c8287ef591d5675c67d3cbe
diff --git a/games-strategy/defcon-demo/defcon-demo-1.60.ebuild b/games-strategy/defcon-demo/defcon-demo-1.60.ebuild
new file mode 100644
index 00000000000..174b6fcb05c
--- /dev/null
+++ b/games-strategy/defcon-demo/defcon-demo-1.60.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs gnome2-utils games
+
+MY_PN=defcon
+MY_PV=${PV:0:3}
+MY_PVR=1
+MY_P=defcon_${MY_PV}-${MY_PVR}
+
+DESCRIPTION="Global thermonuclear war simulation with multiplayer support"
+HOMEPAGE="http://www.introversion.co.uk/defcon/"
+SRC_URI="x86? ( http://www.introversion.co.uk/defcon/downloads/${MY_P}_i386.deb )
+ amd64? ( http://www.introversion.co.uk/defcon/downloads/${MY_P}_amd64.deb )"
+
+LICENSE="Introversion"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+system-libs"
+RESTRICT="mirror strip"
+
+# glibc discussion:
+# http://forums.introversion.co.uk/defcon/viewtopic.php?t=4016
+RDEPEND="
+ media-libs/libogg
+ media-libs/libvorbis
+ >=sys-libs/glibc-2.3
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXext
+ x11-libs/libXdmcp
+ system-libs? ( media-libs/libsdl )"
+DEPEND=""
+
+QA_PREBUILT="${GAMES_PREFIX_OPT:1}/${PN}/lib/${MY_PN}.bin.x86"
+
+S=${WORKDIR}/usr/local/games/${MY_PN}
+
+src_unpack() {
+ default
+ unpack ./data.tar.gz
+
+ cd "${S}" || die
+ # maintain compatibility with old installation/script
+ [[ -e lib64 ]] && { mv lib64 lib || die ;}
+ [[ -e ${MY_PN}.bin.x86_64 ]] && { mv ${MY_PN}.bin.x86_64 ${MY_PN}.bin.x86 || die ;}
+}
+
+src_prepare() {
+ # FindPath scripts are ugly and unnecessary
+ if use system-libs ; then
+ rm -f lib/lib*
+ fi
+ sed \
+ -e "s:GAMEDIR:${GAMES_PREFIX_OPT}/${PN}:g" \
+ "${FILESDIR}"/${MY_PN} > "${T}"/${MY_PN} \
+ || die "sed failed"
+ echo "int chdir(const char *d) { return 0; }" > chdir.c \
+ || die "echo failed"
+}
+
+src_compile() {
+ echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS} -fPIC -shared -o lib/chdir.so chdir.c"
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -fPIC -shared -o lib/chdir.so chdir.c || die
+}
+
+src_install() {
+ local dir=${GAMES_PREFIX_OPT}/${PN}
+
+ insinto "${dir}/lib"
+ doins *.dat
+
+ exeinto "${dir}"/lib
+ doexe lib/*.so
+ doexe ${MY_PN}.bin.x86
+
+ doicon -s 128 ${MY_PN}.png
+
+ # Can be upgraded to full version, so is not installed as "demo"
+ dogamesbin "${T}"/${MY_PN}
+ make_desktop_entry ${MY_PN} "Defcon"
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+ elog "Screenshots will appear in ~/.${MY_PN}/lib"
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/defcon-demo/files/defcon b/games-strategy/defcon-demo/files/defcon
new file mode 100755
index 00000000000..6e9dd3b5307
--- /dev/null
+++ b/games-strategy/defcon-demo/files/defcon
@@ -0,0 +1,15 @@
+#!/bin/sh
+if [ -n "GAMEDIR/lib" ] ; then
+ if [ "${LD_LIBRARY_PATH+set}" = "set" ] ; then
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:GAMEDIR/lib"
+ else
+ export LD_LIBRARY_PATH="GAMEDIR/lib"
+ fi
+fi
+if [[ ! -e ~/.defcon/lib ]] ; then
+ mkdir -p ~/.defcon/lib \
+ && cd ~/.defcon/lib \
+ && ln -s "GAMEDIR"/lib/* .
+fi
+cd ~/.defcon/lib
+LD_PRELOAD="GAMEDIR/lib/chdir.so" exec ./defcon.bin.x86 "$@"
diff --git a/games-strategy/defcon-demo/metadata.xml b/games-strategy/defcon-demo/metadata.xml
new file mode 100644
index 00000000000..1de86a52478
--- /dev/null
+++ b/games-strategy/defcon-demo/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+ <use>
+ <flag name="system-libs">Use system libraries instead of the ones included in the upstream distribution.</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-strategy/dominions2/Manifest b/games-strategy/dominions2/Manifest
new file mode 100644
index 00000000000..38e955be9ef
--- /dev/null
+++ b/games-strategy/dominions2/Manifest
@@ -0,0 +1,5 @@
+DIST DOM2_Walkthrough.pdf 549897 SHA256 f6a3400f3fe03b89f23ec8c4492561bd58c684790f99669de0d7f1d08ff31855 SHA512 cc73bd7e95d8ce1528196f00d91d88a018b88471edade76672feb53b6ff728c9cc5f02e333312533a72842186833669ec290abffa8f51feb15e224b455987b39 WHIRLPOOL d79588e97e9c563f6ea52ef043b4e194e6e9efacffc48d32b5c0834e08e482eeeb6bc9052bb0efef4f0f3689be3f7b63499be74fce4119e49a09001f8d4039af
+DIST dominions2.png 1135 SHA256 530479327df7f2940a28eabb09217350fcc6009d0e81a9078d09d6b6515f6dc4 SHA512 1241c64a4acdd4740cc9440ba286b595c2e00a41182c014ef06b7184c3991f2df44e4677f3408b28cd25f928337a60c1e2859486c057ee3bdd393fb99b8d347f WHIRLPOOL 31c22cfa1ad318e70e0d81140854d990cd0b9ce448dc562f38ba5f655519ced2ff527939c361b51e5f8b5fe0e65d8790b711ea180be1ab7e7d98ae01be258f66
+DIST dompatch216_linux_ppc.tgz 1982323 SHA256 224e1cd46d8078798f185ca956a137fdf3b76b339f49cc5b2f3304d553ea0ad9 SHA512 6b1ff8b5a041c42193b8f369ee0ff242048fd589ffd9b610628a7bf7a0d159fe6e590b04b914ecbf3b94ef2b94a66a062be84d595777127d8f11311fa92c3ae9 WHIRLPOOL 8f2f35576026a7e88b90c912ee60cd2e39ffbfb7db228b0c5589d58f9988b3e9dfbc96551822649a03cbabf8efd7ff9697dfceb4f5ed8818a2bc07b6c318165c
+DIST dompatch216_linux_x86.tgz 1892714 SHA256 19efb6b3db9fdfdf752ac53dd4352df990b95f84a37cfc61f729ce77ae142dc1 SHA512 9bb2a024235585181f91d8414c07ce8c490fed5ddab9d25817b7ea01618f0f2cf8714fb39a4406abe88e25b354f14ba1ef2db79c39d4c30b4e399d1b60477c2d WHIRLPOOL 8fcdcc98e43d8392dd38b6bb1300a08eeff4782dd567d47b5471d4363a492b1eb90d6f3c589a8a768100df92d820da8cd3d9d1360cfebc671268663bf232a27b
+DIST manual_addenda.pdf 192454 SHA256 ecbed702d1dae4ef2a08a33d03fb4b92aec8cd39df48ac085ed2748dcd159ab4 SHA512 ec582e9685edf7164ba8e7c6c99880b30c8a6737d2d339eec2642196abd175857bfef2e1ea3da3ccb0110d441c477c8fad64d47fbb8b1aa39b405484eb548443 WHIRLPOOL de3a675380ab67329cb94b8d0c9669c57a855bf3f36f04dcd6d3c7b596dcef0c79f5943ffd9c8aaf3b83bc729368f0d463059934d720a216962a0f6770cf2424
diff --git a/games-strategy/dominions2/dominions2-2.16.ebuild b/games-strategy/dominions2/dominions2-2.16.ebuild
new file mode 100644
index 00000000000..e8cc420cbc7
--- /dev/null
+++ b/games-strategy/dominions2/dominions2-2.16.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cdrom games
+
+DESCRIPTION="Dominions 2: The Ascension Wars is an epic turn-based fantasy strategy game"
+HOMEPAGE="http://www.illwinter.com/dom2/index.html"
+SRC_URI="x86? (
+ http://www.shrapnelgames.com/downloads/dompatch${PV/\./}_linux_x86.tgz )
+ amd64? (
+ http://www.shrapnelgames.com/downloads/dompatch${PV/\./}_linux_x86.tgz )
+ ppc? (
+ http://www.shrapnelgames.com/downloads/dompatch${PV/\./}_linux_ppc.tgz )
+ doc? ( http://www.shrapnelgames.com/downloads/DOM2_Walkthrough.pdf
+ http://www.shrapnelgames.com/downloads/manual_addenda.pdf )
+ mirror://gentoo/${PN}.png"
+
+# I am not sure what license applies to Dominions II and I couldn't find
+# further information on their homepage or on the game CD :(
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+RESTRICT="bindist strip"
+
+RDEPEND="
+ || (
+ ppc? (
+ media-libs/libsdl
+ virtual/opengl
+ virtual/glu
+ )
+ !ppc? (
+ media-libs/libsdl[abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]
+ virtual/glu[abi_x86_32(-)]
+ )
+ )"
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+src_unpack() {
+ mkdir -p "${S}"/patch || die
+ cd "${S}"/patch || die
+ if use x86 || use amd64 ; then
+ unpack dompatch${PV/\./}_linux_x86.tgz
+ elif use ppc ; then
+ unpack dompatch${PV/\./}_linux_ppc.tgz
+ fi
+}
+
+src_install() {
+ cdrom_get_cds dom2icon.ico
+ einfo "Copying files to harddisk... this may take a while..."
+
+ exeinto "${dir}"
+ if use amd64 || use x86 ; then
+ doexe "${CDROM_ROOT}"/bin_lin/x86/dom2*
+ elif use ppc ; then
+ doexe "${CDROM_ROOT}"/bin_lin/ppc/dom2*
+ fi
+ insinto "${dir}"
+ doins -r "${CDROM_ROOT}"/dominions2.app/Contents/Resources/*
+ dodoc "${CDROM_ROOT}"/doc/*
+
+ # applying the official patches just means overwriting some important
+ # files with their more recent versions:
+ einfo "Applying patch for version ${PV}..."
+ dodoc "${S}"/patch/doc/*
+ doexe "${S}"/patch/dom2
+ rm -rf "${S}"/patch/doc/ "${S}"/patch/dom2 || die
+ doins -r "${S}"/patch/*
+
+ if use doc; then
+ elog ""
+ elog "Installing extra documentation to '/usr/share/doc/${P}'"
+ elog ""
+ elog "You may want to study 'DOM2_Walkthrough.pdf' carefully if"
+ elog "you are new to Dominions II."
+ elog ""
+ dodoc "${DISTDIR}"/{DOM2_Walkthrough,manual_addenda}.pdf
+ fi
+
+ doicon "${DISTDIR}"/${PN}.png
+
+ # update times
+ find "${D}" -exec touch '{}' \;
+
+ games_make_wrapper dominions2 ./dom2 "${dir}" "${dir}"
+ make_desktop_entry dominions2 "Dominions II" dominions2
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To play the game run:"
+ elog " dominions2"
+ echo
+}
diff --git a/games-strategy/dominions2/metadata.xml b/games-strategy/dominions2/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/dominions2/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/dopewars/Manifest b/games-strategy/dopewars/Manifest
new file mode 100644
index 00000000000..f831dd524e3
--- /dev/null
+++ b/games-strategy/dopewars/Manifest
@@ -0,0 +1 @@
+DIST dopewars-1.5.12.tar.gz 1419725 SHA256 23059dcdea96c6072b148ee21d76237ef3535e5be90b3b2d8239d150feee0c19 SHA512 cfabaf9326c847aed6210a852ace64c697df5845a66b3179b8dc8dea7b99a11e1f91358d4ee54929a56c70d5f3a76f9f7bb4079fdef765601f165b4cd06cba5a WHIRLPOOL db9e64f9694fbb0b2ebfd78cf76af6c7cdf9151003f55f595f6bc36bdbf45508c4ff43d133c09a304c0cd7c436c97203ce93b6373f8e6583d7d4367764f88ddb
diff --git a/games-strategy/dopewars/dopewars-1.5.12-r2.ebuild b/games-strategy/dopewars/dopewars-1.5.12-r2.ebuild
new file mode 100644
index 00000000000..2224de6604d
--- /dev/null
+++ b/games-strategy/dopewars/dopewars-1.5.12-r2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Re-Write of the game Drug Wars"
+HOMEPAGE="http://dopewars.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dopewars/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="nls ncurses gtk gnome sdl"
+
+RDEPEND="ncurses? ( >=sys-libs/ncurses-5.2 )
+ gtk? ( x11-libs/gtk+:2 )
+ dev-libs/glib:2
+ nls? ( virtual/libintl )
+ sdl? (
+ media-libs/libsdl
+ media-libs/sdl-mixer
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-CVE-2009-3591.patch
+ sed -i \
+ -e "/priv_hiscore/ s:DPDATADIR:\"${GAMES_STATEDIR}\":" \
+ -e "/\/doc\// s:DPDATADIR:\"/usr/share\":" \
+ -e 's:index.html:html/index.html:' \
+ src/dopewars.c || die
+}
+
+src_configure() {
+ local myservconf
+
+ if ! use gtk ; then
+ myservconf="--disable-gui-client --disable-gui-server --disable-glibtest --disable-gtktest"
+ fi
+
+ egamesconf \
+ --disable-dependency-tracking \
+ $(use_enable ncurses curses-client) \
+ $(use_enable nls) \
+ $(use_with sdl) \
+ --without-esd \
+ --enable-networking \
+ --enable-plugins \
+ ${myservconf}
+}
+
+src_install() {
+ default
+
+ dodir /usr/share
+ if use gnome ; then
+ mv "${D}/${GAMES_DATADIR}"/gnome "${D}/usr/share" || die
+ else
+ rm -r "${D}/${GAMES_DATADIR}"/gnome || die
+ fi
+ mv "${D}/${GAMES_DATADIR}"/pixmaps "${D}/usr/share" || die
+ dohtml -r "${D}/${GAMES_DATADIR}"/doc/*/*
+ rm -r "${D}/${GAMES_DATADIR}"/doc || die
+
+ prepgamesdirs
+}
diff --git a/games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch b/games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch
new file mode 100644
index 00000000000..d657bf8744f
--- /dev/null
+++ b/games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch
@@ -0,0 +1,20 @@
+Patch for CVE-2009-3591 -- bug 288295.
+
+Fetched from upstream SVN:
+http://dopewars.svn.sourceforge.net/viewvc/dopewars/dopewars/trunk/src/serverside.c?r1=1033&r2=1032&pathrev=1033
+
+--- dopewars/trunk/src/serverside.c 2009/03/10 07:18:49 1032
++++ dopewars/trunk/src/serverside.c 2009/10/05 04:11:32 1033
+@@ -504,6 +504,12 @@
+ break;
+ case C_REQUESTJET:
+ i = atoi(Data);
++ /* Make sure value is within range */
++ if (i < 0 || i >= NumLocation) {
++ dopelog(3, LF_SERVER, _("%s: DENIED jet to invalid location %s"),
++ GetPlayerName(Play), Data);
++ break;
++ }
+ if (Play->EventNum == E_FIGHT || Play->EventNum == E_FIGHTASK) {
+ if (CanRunHere(Play)) {
+ break;
diff --git a/games-strategy/dopewars/metadata.xml b/games-strategy/dopewars/metadata.xml
new file mode 100644
index 00000000000..515905eb287
--- /dev/null
+++ b/games-strategy/dopewars/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">dopewars</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/dunelegacy/Manifest b/games-strategy/dunelegacy/Manifest
new file mode 100644
index 00000000000..7403b798e14
--- /dev/null
+++ b/games-strategy/dunelegacy/Manifest
@@ -0,0 +1,2 @@
+DIST dunelegacy-0.96.3-no-autoreconf.patch.xz 8908 SHA256 fae291f43c01bcf6af437602738b506631a1f0aea2b680912ffb5e1280507975 SHA512 fc17c771a19611057b2990b76eda0eea08e011dcac455bdf7e26bba1f2e2aa6cec120f2dcbce488a2318553f9e58b4a2b5ea24c7e1e27ada9ec5740f2b66ca4c WHIRLPOOL 707abf066efbaafd95063aca23d1cdfdd6c5b01f16b5d0952b8cb4f765d08dcd0316c8876522c7bfdd476801dd1b0eab7aa0069ae0cd5bbe78118de50810d40c
+DIST dunelegacy-0.96.3-src.tar.bz2 1652302 SHA256 677159c174d9f9e8eb20e5e5cec997decf8e5a7091dc1583dc23fe340c5f6222 SHA512 c84281b44bdac4eec360d90e2f23aa75468cf08c6edd6a5002c539e609312fd39e3284518ef5498201f2b0433d11cf2478cd13a2159af7c6bbef326e680fa241 WHIRLPOOL a90330135e74ee2875c18f8696aee9598cee07e185d6f7759f180d9934e5e063e0a5b449644e2744d8e480e9be35bb93277d71d0a021f3dccb0541540ef84439
diff --git a/games-strategy/dunelegacy/dunelegacy-0.96.3.ebuild b/games-strategy/dunelegacy/dunelegacy-0.96.3.ebuild
new file mode 100644
index 00000000000..1c2b88ebc39
--- /dev/null
+++ b/games-strategy/dunelegacy/dunelegacy-0.96.3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# do not use autotools related stuff in stable ebuilds
+# unless you like random breakage: 469796, 469798, 424041
+
+EAPI=5
+inherit eutils gnome2-utils games # STABLE ARCH
+#inherit autotools eutils gnome2-utils games # UNSTABLE ARCH
+
+DESCRIPTION="Updated clone of Westood Studios' Dune2"
+HOMEPAGE="http://dunelegacy.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+SRC_URI="${SRC_URI} http://dev.gentoo.org/~hasufell/distfiles/${P}-no-autoreconf.patch.xz" # STABLE ARCH
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="+alsa pulseaudio"
+
+RDEPEND="media-libs/libsdl[X,alsa?,sound,pulseaudio?,video]
+ media-libs/sdl-mixer[midi,mp3,vorbis]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+# exits on start without libsdl[alsa] or libsdl[pulseaudio]
+REQUIRED_USE="|| ( alsa pulseaudio )"
+
+src_prepare() {
+ epatch "${DISTDIR}"/${P}-no-autoreconf.patch.xz # STABLE ARCH
+# epatch "${FILESDIR}"/${P}-build.patch # UNSTABLE ARCH
+# eautoreconf # UNSTABLE ARCH
+}
+
+src_install() {
+ default
+
+ doicon -s scalable ${PN}.svg
+ doicon -s 48 ${PN}.png
+ make_desktop_entry ${PN} "Dune Legacy"
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/dunelegacy/files/dunelegacy-0.96.3-build.patch b/games-strategy/dunelegacy/files/dunelegacy-0.96.3-build.patch
new file mode 100644
index 00000000000..93dd907738b
--- /dev/null
+++ b/games-strategy/dunelegacy/files/dunelegacy-0.96.3-build.patch
@@ -0,0 +1,60 @@
+Author: hasufell <hasufell@gentoo.org>
+Date: Thu Aug 9 18:57:40 2012 +0200
+
+ respect flags
+ use pkg-config
+ use LDADD instead of LDFLAGS for libs
+
+--- configure.ac
++++ configure.ac
+@@ -16,14 +16,6 @@
+
+ AC_SUBST(dunelegacydatadir)
+
+-dnl Some flags for gcc
+-CXXFLAGS="-O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -DNDEBUG"
+-dnl Additional flags: -Wconversion -Wno-sign-conversion
+-
+-dnl Some flags for clang
+-dnl CXXFLAGS="-O3 -pipe -pedantic -Weverything -Wno-sign-conversion -Wno-conversion -Wno-shadow -Wno-missing-noreturn -Wno-padded -Wno-packed -Wno-weak-vtables -Wno-c++11-narrowing -Wno-cast-align -Wno-unreachable-code -Wno-missing-prototypes -Wno-float-equal -Wno-global-constructors -Wno-exit-time-destructors -Wno-format-nonliteral -Wno-unused-macros -Wextra -Wno-unused-parameter"
+-
+-
+ dnl test for -ffp-contract=off (gcc >= 4.6) and use -mno-fused-madd instead
+ oldCFLAGS="$CFLAGS"
+ CFLAGS="-ffp-contract=off"
+@@ -33,34 +25,14 @@
+ )
+ CFLAGS="$oldCFLAGS"
+
+-case "$target_cpu" in
+-i*86) CXXFLAGS="$CXXFLAGS -mfpmath=sse -msse";;
+-esac
+-
+-AC_ARG_ENABLE([debug],
+- [AS_HELP_STRING([--enable-debug],
+- [compile with debug information @<:@default=disabled@:>@])],
+- [],
+- [])
+-
+-if test "$enable_debug" = "yes" ; then
+- CXXFLAGS="$CXXFLAGS -g"
+-fi
+
+ dnl Check for SDL library
+ SDL_VERSION=1.2.0
+-AM_PATH_SDL($SDL_VERSION, : , AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))
++PKG_CHECK_MODULES([SDL], [sdl >= $SDL_VERSION SDL_mixer])
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+
+-dnl Check for SDL_mixer library.
+-AC_CHECK_LIB(SDL_mixer,
+- Mix_OpenAudio,
+- LIBS="$LIBS -lSDL_mixer",
+- AC_MSG_ERROR([*** SDL_mixer library not found!])
+-)
+-
+ dnl enet defines
+ AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)])
+ AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])
diff --git a/games-strategy/dunelegacy/metadata.xml b/games-strategy/dunelegacy/metadata.xml
new file mode 100644
index 00000000000..34c0e00fd98
--- /dev/null
+++ b/games-strategy/dunelegacy/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <bugs-to>http://sourceforge.net/apps/mediawiki/dunelegacy/index.php?title=Development/Reporting_Bugs</bugs-to>
+ <remote-id type="sourceforge">dunelegacy</remote-id>
+ </upstream>
+ <longdescription lang="en">
+ Dune Legacy is an effort by a handful of developers to revitalize
+ the first-ever real-time strategy game. The original game was the
+ basis for the hugely successful Command and Conquer series, and the
+ gameplay has been replicated an extended to a wide variety of
+ storylines and series.
+
+ Lead one of three interplanetary houses, Atreides, Harkonnen or
+ Ordos, in an attempt to harvest the largest amount of spice from
+ the sand dunes. Exchange your spice stockpiles for credits through
+ refinement and build an army capable of thwarting attempts of the
+ other houses to stop your harvesting!
+ </longdescription>
+</pkgmetadata>
diff --git a/games-strategy/freeciv/Manifest b/games-strategy/freeciv/Manifest
new file mode 100644
index 00000000000..e10ca61e156
--- /dev/null
+++ b/games-strategy/freeciv/Manifest
@@ -0,0 +1,2 @@
+DIST freeciv-2.4.4.tar.bz2 38847925 SHA256 8307fc9d69571b031ccc465e8029d8a7ea3dbef4e3651f2de07356aba931e2a3 SHA512 3f2ff619b21c36748a98bda98c923ec9ea71faf18cac77d8b247e4a79c4a8f41c9b399e648a0a51fe54738de3276081c31ded98f769104812125d304716796a7 WHIRLPOOL 0eb8374ad2d7174dab8971c39c0ce7f14e72c1c7a64dfa8461a054a53d2b659af71197bad7c65e65e3e5da4fd5552bfb10aa2fa8b9870c9b1fbd7e03c58c9c00
+DIST freeciv-2.5.0.tar.bz2 40323793 SHA256 bd9f7523ea79b8d2806d0c1844a9f48506ccd18276330580319913c43051210b SHA512 f03bafdca47da0677ad81ed945afe79bbd01ae871b95e6bdaf6249acb8420e78e3210dd60f520d960ec127e1d443f45c11fcc484b49b6bb59cab5904e51fc651 WHIRLPOOL 1a9768837b40c6c19ff6138d07074d96d75d2cecdb671180659d9380beb7c996fcb0be2fb343166fe46e92cc2c2e7495be2683f62440540cea3072f34e928391
diff --git a/games-strategy/freeciv/freeciv-2.4.4.ebuild b/games-strategy/freeciv/freeciv-2.4.4.ebuild
new file mode 100644
index 00000000000..96d07d3b325
--- /dev/null
+++ b/games-strategy/freeciv/freeciv-2.4.4.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils gnome2-utils games
+
+DESCRIPTION="multiplayer strategy game (Civilization Clone)"
+HOMEPAGE="http://www.freeciv.org/"
+SRC_URI="mirror://sourceforge/freeciv/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="auth aimodules dedicated +gtk ipv6 mapimg modpack mysql nls postgres readline sdl +server +sound sqlite"
+
+RDEPEND="app-arch/bzip2
+ app-arch/xz-utils
+ dev-lang/lua
+ net-misc/curl
+ sys-libs/zlib
+ auth? (
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( dev-db/sqlite:3 )
+ !mysql? ( !postgres? ( !sqlite? ( virtual/mysql ) ) )
+ )
+ readline? ( sys-libs/readline:0 )
+ dedicated? ( aimodules? ( dev-libs/libltdl:0 ) )
+ !dedicated? (
+ media-libs/libpng:0
+ gtk? ( x11-libs/gtk+:2 )
+ mapimg? ( media-gfx/imagemagick )
+ modpack? ( x11-libs/gtk+:2 )
+ nls? ( virtual/libintl )
+ sdl? (
+ media-libs/libsdl[video]
+ media-libs/sdl-image[png]
+ media-libs/freetype:2
+ )
+ server? ( aimodules? ( sys-devel/libtool:2 ) )
+ sound? (
+ media-libs/libsdl[sound]
+ media-libs/sdl-mixer[vorbis]
+ )
+ !sdl? ( !gtk? ( x11-libs/gtk+:2 ) )
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !dedicated? (
+ x11-proto/xextproto
+ nls? ( sys-devel/gettext )
+ )"
+
+pkg_setup() {
+ if use !dedicated && use !server ; then
+ ewarn "Disabling server USE flag will make it impossible"
+ ewarn "to start local games, but you will still be able to"
+ ewarn "join multiplayer games."
+ fi
+ games_pkg_setup
+}
+
+src_prepare() {
+
+ # install the .desktop in /usr/share/applications
+ # install the icons in /usr/share/pixmaps
+ sed -i \
+ -e 's:^.*\(desktopfiledir = \).*:\1/usr/share/applications:' \
+ -e 's:^\(icon[0-9]*dir = \)$(prefix)\(.*\):\1/usr\2:' \
+ -e 's:^\(icon[0-9]*dir = \)$(datadir)\(.*\):\1/usr/share\2:' \
+ client/Makefile.in \
+ server/Makefile.in \
+ modinst/Makefile.in \
+ data/Makefile.in \
+ data/icons/Makefile.in || die
+ sed -i -e 's/=SDL/=X-SDL/' bootstrap/freeciv-sdl.desktop.in || die
+}
+
+src_configure() {
+ local myclient myopts mydatabase
+
+ if use auth ; then
+ if use !mysql && use !postgres && use !sqlite ; then
+ einfo "No database backend chosen, defaulting"
+ einfo "to mysql!"
+ mydatabase=mysql
+ else
+ use mysql && mydatabase="${mydatabase} mysql"
+ use postgres && mydatabase="${mydatabase} postgres"
+ use sqlite && mydatabase="${mydatabase} sqlite3"
+ fi
+ else
+ mydatabase=no
+ fi
+
+ if use dedicated ; then
+ myclient="no"
+ myopts="--enable-server"
+ else
+ if use !sdl && use !gtk ; then
+ einfo "No client backend given, defaulting to"
+ einfo "gtk2 client!"
+ myclient="gtk2"
+ else
+ use sdl && myclient="${myclient} sdl"
+ use gtk && myclient="${myclient} gtk2"
+ fi
+ myopts="$(use_enable server) --without-ggz-client"
+ fi
+
+ # disabling shared libs will break aimodules USE flag
+ egamesconf \
+ --docdir="/usr/share/doc/${P}" \
+ --localedir=/usr/share/locale \
+ $(use_enable ipv6) \
+ $(use_enable mapimg) \
+ --enable-aimodules="$(usex aimodules "yes" "no")" \
+ --enable-shared \
+ --enable-fcdb="${mydatabase}" \
+ $(use_enable nls) \
+ $(use_with readline) \
+ $(use_enable sound sdl-mixer) \
+ --enable-fcmp="$(usex modpack "gtk2" "no")" \
+ --enable-sys-lua \
+ ${myopts} \
+ --enable-client="${myclient}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use dedicated ; then
+ rm -rf "${D}/usr/share/pixmaps"
+ rm -f "${D}"/usr/share/man/man6/freeciv-{client,gtk2,gtk3,modpack,sdl,xaw}*
+ else
+ if use server ; then
+ # Create and install the html manual. It can't be done for dedicated
+ # servers, because the 'freeciv-manual' tool is then not built. Also
+ # delete freeciv-manual from the GAMES_BINDIR, because it's useless.
+ # Note: to have it localized, it should be ran from _postinst, or
+ # something like that, but then it's a PITA to avoid orphan files...
+ ./manual/freeciv-manual || die
+ dohtml manual*.html
+ fi
+ if use sdl ; then
+ make_desktop_entry freeciv-sdl "Freeciv (SDL)" freeciv-client
+ else
+ rm -f "${D}"/usr/share/man/man6/freeciv-sdl*
+ fi
+ rm -f "${D}"/usr/share/man/man6/freeciv-xaw*
+ fi
+ find "${D}" -name "freeciv-manual*" -delete
+
+ rm -f "${D}$(games_get_libdir)"/*.a
+ prune_libtool_files
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/freeciv/freeciv-2.5.0.ebuild b/games-strategy/freeciv/freeciv-2.5.0.ebuild
new file mode 100644
index 00000000000..b56963717d7
--- /dev/null
+++ b/games-strategy/freeciv/freeciv-2.5.0.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils gnome2-utils games
+
+DESCRIPTION="multiplayer strategy game (Civilization Clone)"
+HOMEPAGE="http://www.freeciv.org/"
+SRC_URI="mirror://sourceforge/freeciv/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="auth aimodules dedicated +gtk ipv6 mapimg modpack mysql nls qt5 readline sdl +server +sound sqlite system-lua"
+
+# postgres isn't yet really supported by upstream
+RDEPEND="app-arch/bzip2
+ app-arch/xz-utils
+ net-misc/curl
+ sys-libs/zlib
+ auth? (
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ !mysql? ( ( !sqlite? ( virtual/mysql ) ) )
+ )
+ readline? ( sys-libs/readline:0 )
+ dedicated? ( aimodules? ( dev-libs/libltdl:0 ) )
+ !dedicated? (
+ media-libs/libpng:0
+ gtk? ( x11-libs/gtk+:2 )
+ mapimg? ( media-gfx/imagemagick )
+ modpack? ( x11-libs/gtk+:2 )
+ nls? ( virtual/libintl )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+ sdl? (
+ media-libs/libsdl[video]
+ media-libs/sdl-gfx
+ media-libs/sdl-image[png]
+ media-libs/sdl-ttf
+ )
+ server? ( aimodules? ( sys-devel/libtool:2 ) )
+ sound? (
+ media-libs/libsdl[sound]
+ media-libs/sdl-mixer[vorbis]
+ )
+ !sdl? ( !gtk? ( x11-libs/gtk+:2 ) )
+ )
+ system-lua? ( >=dev-lang/lua-5.2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !dedicated? (
+ x11-proto/xextproto
+ nls? ( sys-devel/gettext )
+ )"
+
+pkg_setup() {
+ if use !dedicated && use !server ; then
+ ewarn "Disabling server USE flag will make it impossible"
+ ewarn "to start local games, but you will still be able to"
+ ewarn "join multiplayer games."
+ fi
+ games_pkg_setup
+}
+
+src_prepare() {
+
+ # install the .desktop in /usr/share/applications
+ # install the icons in /usr/share/pixmaps
+ sed -i \
+ -e 's:^.*\(desktopfiledir = \).*:\1/usr/share/applications:' \
+ -e 's:^\(icon[0-9]*dir = \)$(prefix)\(.*\):\1/usr\2:' \
+ -e 's:^\(icon[0-9]*dir = \)$(datadir)\(.*\):\1/usr/share\2:' \
+ client/Makefile.in \
+ server/Makefile.in \
+ tools/Makefile.in \
+ data/icons/Makefile.in || die
+ sed -i -e 's/=SDL/=X-SDL/' bootstrap/freeciv-sdl.desktop.in || die
+}
+
+src_configure() {
+ local myclient myopts mydatabase
+
+ if use auth ; then
+ if use !mysql && use !sqlite ; then
+ einfo "No database backend chosen, defaulting"
+ einfo "to mysql!"
+ mydatabase=mysql
+ else
+ use mysql && mydatabase="${mydatabase} mysql"
+ use sqlite && mydatabase="${mydatabase} sqlite3"
+ fi
+ else
+ mydatabase=no
+ fi
+
+ if use dedicated ; then
+ myclient="no"
+ myopts="--enable-server"
+ else
+ if use !sdl && use !gtk && ! use qt5 ; then
+ einfo "No client backend given, defaulting to"
+ einfo "gtk2 client!"
+ myclient="gtk2"
+ else
+ use sdl && myclient+=" sdl"
+ use gtk && myclient+=" gtk2"
+ use qt5 && myclient+=" qt"
+ fi
+ myopts="$(use_enable server) --without-ggz-client"
+ fi
+
+ # disabling shared libs will break aimodules USE flag
+ egamesconf \
+ --docdir="/usr/share/doc/${P}" \
+ --localedir=/usr/share/locale \
+ $(use_enable ipv6) \
+ $(use_enable mapimg) \
+ --enable-aimodules="$(usex aimodules "yes" "no")" \
+ --enable-shared \
+ --enable-fcdb="${mydatabase}" \
+ $(use_enable nls) \
+ $(use_with readline) \
+ $(use_enable sound sdl-mixer) \
+ --enable-fcmp="$(usex modpack "gtk2" "no")" \
+ $(use_enable system-lua sys-lua) \
+ ${myopts} \
+ --enable-client="${myclient}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use dedicated ; then
+ rm -rf "${D}/usr/share/pixmaps"
+ rm -f "${D}"/usr/share/man/man6/freeciv-{client,gtk2,gtk3,modpack,qt,sdl,xaw}*
+ else
+ if use server ; then
+ # Create and install the html manual. It can't be done for dedicated
+ # servers, because the 'freeciv-manual' tool is then not built. Also
+ # delete freeciv-manual from the GAMES_BINDIR, because it's useless.
+ # Note: to have it localized, it should be ran from _postinst, or
+ # something like that, but then it's a PITA to avoid orphan files...
+ ./tools/freeciv-manual || die
+ dohtml manual*.html
+ fi
+ if use sdl ; then
+ make_desktop_entry freeciv-sdl "Freeciv (SDL)" freeciv-client
+ else
+ rm -f "${D}"/usr/share/man/man6/freeciv-sdl*
+ fi
+ rm -f "${D}"/usr/share/man/man6/freeciv-xaw*
+ fi
+ find "${D}" -name "freeciv-manual*" -delete
+
+ rm -f "${D}$(games_get_libdir)"/*.a
+ prune_libtool_files
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/freeciv/metadata.xml b/games-strategy/freeciv/metadata.xml
new file mode 100644
index 00000000000..55b33694721
--- /dev/null
+++ b/games-strategy/freeciv/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="aimodules">Support for dynamically loadable AI
+ modules (server-side)</flag>
+ <flag name="auth">Add authentication capability via
+ mysql, postgres or sqlite3</flag>
+ <flag name="mapimg">Additional mag image toolkit
+ via <pkg>media-gfx/imagemagick</pkg></flag>
+ <flag name="modpack">Build the freeciv-modpack-program
+ to download/install mods</flag>
+ <flag name="server">Enable server support. Disabling this
+ will also make it impossible to start local games.</flag>
+ <flag name="sound">Add support for sound provided by
+ <pkg>media-libs/sdl-mixer</pkg></flag>
+ <flag name="system-lua">Use <pkg>dev-lang/lua</pkg> instead of
+ the bundled liblua</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">freeciv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/freecol/Manifest b/games-strategy/freecol/Manifest
new file mode 100644
index 00000000000..4378b01ebb5
--- /dev/null
+++ b/games-strategy/freecol/Manifest
@@ -0,0 +1 @@
+DIST freecol-0.10.7-src.zip 46805547 SHA256 6909fc4e98dd765863b860d0fe16c5b75232d6fd4ef0ddea6e6de50cb06813fc SHA512 39bb8d9cc4566fb63c044552ef8bb698d06cb0a8baad85145288c5a435022efef5af822d6f779ebeb43d943916625320558dd118412e1bcaca0b2a0fa2b859d2 WHIRLPOOL 0fb908668807d3256ffb37e3c97d4ad0421c6f809e7e836f187f0d87af16c5953178165dabd799551fcf261d02f8671f4f360c4b851a6be77c47c556e86f67aa
diff --git a/games-strategy/freecol/files/freecol-0.10.7-gentoo.patch b/games-strategy/freecol/files/freecol-0.10.7-gentoo.patch
new file mode 100644
index 00000000000..20f40695c26
--- /dev/null
+++ b/games-strategy/freecol/files/freecol-0.10.7-gentoo.patch
@@ -0,0 +1,29 @@
+--- build.xml.old 2012-03-03 20:28:27.470899027 +0100
++++ build.xml 2012-03-03 20:29:27.702662193 +0100
+@@ -41,14 +41,11 @@
+ <!-- Woodstox XML processor -->
+ <pathelement location="${basedir}/${woodstox.jar}"/>
+ <!-- MigLayout manager -->
+- <pathelement location="${basedir}/${miglayout.jar}"/>
++ <pathelement location="${miglayout.jar}"/>
+ <!-- Command line processor -->
+- <pathelement location="${basedir}/${cli.jar}"/>
++ <pathelement location="${cli.jar}"/>
+ <!-- Cortado Video Applet -->
+- <pathelement location="${basedir}/${cortado.jar}"/>
+- <!-- JOgg/JOrbis libraries -->
+- <pathelement location="${basedir}/jars/jogg-0.0.7.jar"/>
+- <pathelement location="${basedir}/jars/jorbis-0.0.15.jar"/>
++ <pathelement location="${cortado.jar}"/>
+ </path>
+ <path id="junit.classpath">
+ <pathelement location="${basedir}/test/lib/junit.jar" />
+@@ -163,7 +160,7 @@
+ <manifest file="${basedir}/src/MANIFEST.MF">
+ <attribute name="Created-By" value="FreeCol Team"/>
+ <attribute name="Main-Class" value="net.sf.freecol.FreeCol"/>
+- <attribute name="Class-Path" value="${stax.jar} ${woodstox.jar} jars/jogg-0.0.7.jar jars/jorbis-0.0.15.jar jars/tritonus_share.jar jars/vorbisspi1.0.3.jar ${miglayout.jar} ${cli.jar} ${cortado.jar}"/>
++ <attribute name="Class-Path" value="${stax.jar} ${woodstox.jar} jars/tritonus_share.jar jars/vorbisspi1.0.3.jar ${miglayout.jar} ${cli.jar} ${cortado.jar}"/>
+ <attribute name="Product-Name" value="FreeCol"/>
+ <attribute name="Package-Title" value="FreeCol"/>
+ <attribute name="Package-Version" value="${svn.Revision}"/>
diff --git a/games-strategy/freecol/freecol-0.10.7.ebuild b/games-strategy/freecol/freecol-0.10.7.ebuild
new file mode 100644
index 00000000000..e9622e427cb
--- /dev/null
+++ b/games-strategy/freecol/freecol-0.10.7.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit base eutils java-pkg-2 java-ant-2 games
+
+DESCRIPTION="An open source clone of the game Colonization"
+HOMEPAGE="http://www.freecol.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+COMMON_DEP="dev-java/jsr173
+ dev-java/wstx:3.2
+ dev-java/commons-cli:1
+ dev-java/cortado
+ dev-java/miglayout"
+
+DEPEND=">=virtual/jdk-1.5
+ app-arch/unzip
+ ${COMMON_DEP}"
+RDEPEND=">=virtual/jre-1.5
+ ${COMMON_DEP}"
+
+S=${WORKDIR}/${PN}
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+java_prepare() {
+ cd jars
+ rm jsr173_1.0_api.jar
+ rm wstx-lgpl-4.0pr1.jar
+ rm commons-cli-1.1.jar
+ rm miglayout-3.7.3.1-swing.jar
+ rm cortado-0.6.0.jar
+ rm jogg-0.0.7.jar
+ rm jorbis-0.0.15.jar
+}
+
+src_prepare() {
+ base_src_prepare
+ java-pkg-2_src_prepare
+}
+
+src_configure() {
+ java-ant-2_src_configure
+}
+
+src_compile() {
+ EANT_BUILD_TARGET=package
+ EANT_EXTRA_ARGS="
+ -Dstax.jar=$(java-pkg_getjars jsr173)
+ -Dwoodstox.jar=$(java-pkg_getjars wstx-3.2)
+ -Dcli.jar=$(java-pkg_getjars commons-cli-1)
+ -Dmiglayout.jar=$(java-pkg_getjars miglayout)
+ -Dcortado.jar=$(java-pkg_getjars cortado)
+ "
+ java-pkg-2_src_compile
+}
+
+src_install() {
+ java-pkg_jarinto "${GAMES_DATADIR}"/${PN}/jars
+ java-pkg_dojar jars/vorbisspi1.0.3.jar
+ java-pkg_dojar jars/tritonus_share.jar
+ java-pkg_jarinto "${GAMES_DATADIR}"/${PN}
+ java-pkg_dojar FreeCol.jar
+ java-pkg_dolauncher ${PN} \
+ -into "${GAMES_PREFIX}" \
+ --pwd "${GAMES_DATADIR}"/${PN} \
+ --jar FreeCol.jar \
+ --java_args -Xmx512M
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r data schema splash.jpg
+ doicon ${PN}.xpm
+ make_desktop_entry ${PN} FreeCol
+ dodoc README
+ prepgamesdirs
+}
+
+pkg_setup() {
+ games_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ java-pkg-2_pkg_preinst
+}
diff --git a/games-strategy/freecol/metadata.xml b/games-strategy/freecol/metadata.xml
new file mode 100644
index 00000000000..cbcd007a87f
--- /dev/null
+++ b/games-strategy/freecol/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">freecol</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/freeorion/Manifest b/games-strategy/freeorion/Manifest
new file mode 100644
index 00000000000..4fb80bb88ea
--- /dev/null
+++ b/games-strategy/freeorion/Manifest
@@ -0,0 +1 @@
+DIST freeorion-0.4.5_pre.tar.bz2 141068240 SHA256 a3d326a1fa05327cf23b14ef08672c0199fc08df15bb3679f579575115172b4a SHA512 33dc4a89264ccf8f146021d8b9dabc51f11e7869a5323effb7a783800db77f37ed27880c60c483dd83ea62bc9ea84872f53c25b4571ccdf13dc594bcb368b903 WHIRLPOOL 1229aefdc22b95c38e71a94f493026230e750948c37544f636d1a43030b96d487307a7a1885bb32d4ae697bc64f431b97323cb647eca516d3363898120528d0d
diff --git a/games-strategy/freeorion/files/freeorion-0.4.5_pre-boost-1.57.patch b/games-strategy/freeorion/files/freeorion-0.4.5_pre-boost-1.57.patch
new file mode 100644
index 00000000000..73e9b4b568a
--- /dev/null
+++ b/games-strategy/freeorion/files/freeorion-0.4.5_pre-boost-1.57.patch
@@ -0,0 +1,32 @@
+From d963b4883c9be2911d791e7daa3ed0f495bc5181 Mon Sep 17 00:00:00 2001
+From: Dilvish-fo <dilvish.fo@gmail.com>
+Date: Sat, 11 Apr 2015 10:25:55 -0700
+Subject: [PATCH] work-around for a boost 1.57 bug (missing a shard_ptr
+ serialization include)
+
+---
+ util/Process.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/util/Process.h b/util/Process.h
+index ff72445..f9927cc 100644
+--- a/util/Process.h
++++ b/util/Process.h
+@@ -3,12 +3,16 @@
+ #define _Process_h_
+
+ // HACK: The following two includes work around a bug in boost 1.56,
+-// which uses them without including. They can be removed once the bug is gone.
++// which uses them without including.
+ #include <boost/version.hpp>
+ #if BOOST_VERSION == 105600
+ #include <boost/serialization/singleton.hpp> // This
+ #include <boost/serialization/extended_type_info.hpp> //This
+ #endif
++// HACK: For a similar boost 1.57 bug
++#if BOOST_VERSION == 105700
++#include <boost/serialization/type_info_implementation.hpp> // This
++#endif
+
+ #include <boost/serialization/shared_ptr.hpp>
+
diff --git a/games-strategy/freeorion/files/freeorion-0.4.5_pre-boost-1.58.patch b/games-strategy/freeorion/files/freeorion-0.4.5_pre-boost-1.58.patch
new file mode 100644
index 00000000000..3044c81eb28
--- /dev/null
+++ b/games-strategy/freeorion/files/freeorion-0.4.5_pre-boost-1.58.patch
@@ -0,0 +1,57 @@
+From 8cb623ceecaf00e29f273225eb37602e26e1a6d0 Mon Sep 17 00:00:00 2001
+From: Dilvish-fo <dilvish.fo@gmail.com>
+Date: Sat, 6 Jun 2015 08:04:56 -0700
+Subject: [PATCH] workarounds for missing includes with boost 1.58
+
+---
+ util/Process.h | 6 ++++++
+ util/Serialize.ipp | 9 ++++++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/util/Process.h b/util/Process.h
+index f9927cc..25cec56 100644
+--- a/util/Process.h
++++ b/util/Process.h
+@@ -14,6 +14,12 @@
+ #include <boost/serialization/type_info_implementation.hpp> // This
+ #endif
+
++#if BOOST_VERSION == 105800
++// HACK: The following two includes work around a bug in boost 1.58
++#include <boost/serialization/type_info_implementation.hpp>
++#include <boost/archive/basic_archive.hpp>
++#endif
++
+ #include <boost/serialization/shared_ptr.hpp>
+
+ #include <vector>
+diff --git a/util/Serialize.ipp b/util/Serialize.ipp
+index b4027b2..c3c87db 100644
+--- a/util/Serialize.ipp
++++ b/util/Serialize.ipp
+@@ -1,17 +1,24 @@
++// -*- C++ -*-
+ #if defined(_MSC_VER) && defined(int64_t)
+ #undef int64_t
+ #endif
+
+ #include <boost/static_assert.hpp>
+ #include <boost/detail/endian.hpp>
++#include <boost/version.hpp>
+
+ #if BOOST_VERSION == 105600
+ // HACK: The following two includes work around a bug in boost 1.56,
+-// which uses them without including. They can be removed once the bug is gone.
+ #include <boost/serialization/singleton.hpp> // This
+ #include <boost/serialization/extended_type_info.hpp> //This
+ #endif
+
++#if BOOST_VERSION == 105800
++// HACK: The following two includes work around a bug in boost 1.58
++#include <boost/serialization/type_info_implementation.hpp>
++#include <boost/archive/basic_archive.hpp>
++#endif
++
+ #include <boost/serialization/export.hpp>
+ #include <boost/serialization/deque.hpp>
+ #include <boost/serialization/list.hpp>
diff --git a/games-strategy/freeorion/freeorion-0.4.5_pre.ebuild b/games-strategy/freeorion/freeorion-0.4.5_pre.ebuild
new file mode 100644
index 00000000000..66e982968d7
--- /dev/null
+++ b/games-strategy/freeorion/freeorion-0.4.5_pre.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit cmake-utils python-any-r1 games
+
+DESCRIPTION="A free turn-based space empire and galactic conquest game"
+HOMEPAGE="http://www.freeorion.org"
+SRC_URI="http://dev.gentoo.org/~tomka/files/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cg"
+
+# Needs it's own version of GG(dev-games/gigi) which it ships.
+# The split version dev-games/gigi is not used anymore as of 0.4.3
+RDEPEND="
+ !dev-games/gigi
+ media-libs/libsdl2
+ >=dev-libs/boost-1.47[python]
+ media-libs/freealut
+ media-libs/glew
+ media-libs/libogg
+ media-libs/libsdl[X,opengl,video]
+ media-libs/libvorbis
+ media-libs/openal
+ sci-physics/bullet
+ sys-libs/zlib
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ virtual/pkgconfig"
+
+CMAKE_USE_DIR="${S}"
+CMAKE_VERBOSE="1"
+
+pkg_setup() {
+ # build system is using FindPythonLibs.cmake which needs python:2
+ python-any-r1_pkg_setup
+ games_pkg_setup
+}
+
+src_prepare() {
+
+ epatch "${FILESDIR}/${P}-boost-1.57.patch"
+ epatch "${FILESDIR}/${P}-boost-1.58.patch"
+
+ # parse subdir sets -O3
+ sed -e "s:-O3::" -i parse/CMakeLists.txt
+
+ # set revision for display in game -- update on bump!
+ sed -i -e 's/???/8051/' CMakeLists.txt
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DRELEASE_COMPILE_FLAGS=""
+ -DCMAKE_SKIP_RPATH=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ # data files
+ rm "${CMAKE_USE_DIR}"/default/COPYING || die
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r "${CMAKE_USE_DIR}"/default || die
+
+ # bin
+ dogamesbin "${CMAKE_BUILD_DIR}"/${PN}{ca,d} || die
+ newgamesbin "${CMAKE_BUILD_DIR}"/${PN} ${PN}.bin || die
+ games_make_wrapper ${PN} \
+ "${GAMES_BINDIR}/${PN}.bin --resource-dir ${GAMES_DATADIR}/${PN}/default" \
+ "${GAMES_DATADIR}/${PN}"
+
+ # lib
+ dogameslib "${CMAKE_BUILD_DIR}"/libfreeorion{common,parse}.so || die
+ dogameslib "${CMAKE_BUILD_DIR}"/libGiGi*.so || die
+
+ # other
+ dodoc "${CMAKE_USE_DIR}"/changelog.txt || die
+ newicon "${CMAKE_USE_DIR}"/default/data/art/icons/FO_Icon_32x32.png \
+ ${PN}.png || die
+ make_desktop_entry ${PN} ${PN} ${PN}
+
+ # permissions
+ prepgamesdirs
+}
diff --git a/games-strategy/freeorion/metadata.xml b/games-strategy/freeorion/metadata.xml
new file mode 100644
index 00000000000..5c66c093895
--- /dev/null
+++ b/games-strategy/freeorion/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tomka@gentoo.org</email>
+ <name>Thomas Kahle</name>
+ </maintainer>
+ <use>
+ <flag name="cg">Add support for NVIDIA toolkit plugin</flag>
+ </use>
+<longdescription lang="en">
+ FreeOrion is a free, open source, turn-based space empire and
+ galactic conquest (4X) computer game being designed and built by the
+ FreeOrion project. FreeOrion is inspired by the tradition of the
+ Master of Orion games, but is not a clone or remake of that series
+ or any other game.
+</longdescription>
+</pkgmetadata>
diff --git a/games-strategy/freesynd/Manifest b/games-strategy/freesynd/Manifest
new file mode 100644
index 00000000000..7ce2a11234c
--- /dev/null
+++ b/games-strategy/freesynd/Manifest
@@ -0,0 +1 @@
+DIST freesynd-0.7.1.tar.gz 2576695 SHA256 e55b0b3386cdace81fdcd8e33943535abf19ba0797b78c404689bcdd2c55f7de SHA512 b87e6adaf71206532b4f90cd230ca6be00438fe26f000c5a0bfebf2839fea80d78d98ddc27331a2224874338c3e14ffbfa58b8c5bdbdc53c93bba8d6a9e6b7b4 WHIRLPOOL c6b49b4971a4b6404006e3579fba23342cdb98119836f0db489d05db10ed8b45f8d4282f16b9cd726a810ec9eb6d06be95d3e0f67985e993a4010d97c715cf14
diff --git a/games-strategy/freesynd/files/freesynd-0.7.1-cmake.patch b/games-strategy/freesynd/files/freesynd-0.7.1-cmake.patch
new file mode 100644
index 00000000000..817cd39dcb4
--- /dev/null
+++ b/games-strategy/freesynd/files/freesynd-0.7.1-cmake.patch
@@ -0,0 +1,28 @@
+--- freesynd-0.7.1/CMakeLists.txt
++++ freesynd-0.7.1/CMakeLists.txt
+@@ -34,6 +34,13 @@
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}")
+
++option(BUILD_DEV_TOOLS "Build development tools")
++option(WITH_DEBUG "Enable debug definitions")
++
++if(WITH_DEBUG)
++ add_definitions (-D_DEBUG)
++endif()
++
+ # Set standard definitions for all platforms.
+ add_definitions (-DSYSTEM_SDL)
+ add_definitions (-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\")
+@@ -59,10 +66,7 @@
+ message (FATAL_ERROR "Unable to locate PNG")
+ endif ()
+
+-if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "debug")
+- set (BUILD_DEV_TOOLS TRUE)
+-else ()
+- set (BUILD_DEV_TOOLS FALSE)
++if (CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE STREQUAL "debug")
+ # We only define an install target if we're doing a release build.
+ # Furthermore, on Mac, the data folder is a part of the app bundle.
+ if (NOT APPLE)
diff --git a/games-strategy/freesynd/freesynd-0.7.1.ebuild b/games-strategy/freesynd/freesynd-0.7.1.ebuild
new file mode 100644
index 00000000000..f5b7dd830bb
--- /dev/null
+++ b/games-strategy/freesynd/freesynd-0.7.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils gnome2-utils games
+
+DESCRIPTION="A cross-platform reimplementation of engine for the classic Bullfrog game, Syndicate"
+HOMEPAGE="http://freesynd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug devtools"
+
+RDEPEND="media-libs/libogg
+ media-libs/libpng:0
+ media-libs/libsdl[X,sound,video]
+ media-libs/libvorbis
+ media-libs/sdl-mixer[mp3,vorbis]
+ media-libs/sdl-image[png]"
+DEPEND=${RDEPEND}
+
+CMAKE_IN_SOURCE_BUILD=1
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cmake.patch
+
+ sed \
+ -e "s:#freesynd_data_dir = /usr/share/freesynd/data:freesynd_data_dir = ${GAMES_DATADIR}/${PN}/data:" \
+ -i ${PN}.ini || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with debug DEBUG)
+ $(cmake-utils_use_build devtools DEV_TOOLS)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ dogamesbin src/${PN}
+ use devtools && newgamesbin src/dump ${PN}-dump
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r data
+ newicon -s 128 icon/sword.png ${PN}.png
+ make_desktop_entry ${PN}
+ dodoc NEWS README INSTALL AUTHORS
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ elog "You have to set \"data_dir = /my/path/to/synd-data\""
+ elog "in \"~/.${PN}/${PN}.ini\"."
+
+ if use debug ; then
+ ewarn "Debug build is not meant for regular playing,"
+ ewarn "game speed is higher."
+ fi
+
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/freesynd/metadata.xml b/games-strategy/freesynd/metadata.xml
new file mode 100644
index 00000000000..349725bafdf
--- /dev/null
+++ b/games-strategy/freesynd/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="devtools">Build development tools</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">freesynd</remote-id>
+ </upstream>
+</pkgmetadata>
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>
diff --git a/games-strategy/glob2/Manifest b/games-strategy/glob2/Manifest
new file mode 100644
index 00000000000..843e1901a2b
--- /dev/null
+++ b/games-strategy/glob2/Manifest
@@ -0,0 +1 @@
+DIST glob2-0.9.4.4.tar.gz 11338986 SHA256 0f4d898ec6b05ce27b4a12ef242cc26571304b90d2509932a4743c71311314b8 SHA512 c82ace807ad208bc386b730f1fe6d6162640a9468440482f3584f8ccab825967660d8bbf6b3bebf70c74d1ed95f153cd9b5a0bd72dc247a1f97176c6c737f6ca WHIRLPOOL d151bc9601eb283a366d98ae23bd5eb6b793024c5f9b9cf49ddc55910142885e5b2f89bfdce4f879190368466f2cc01e836a9178fd899d27d4342bee4c1f9a3a
diff --git a/games-strategy/glob2/files/glob2-0.9.4.4-gcc44.patch b/games-strategy/glob2/files/glob2-0.9.4.4-gcc44.patch
new file mode 100644
index 00000000000..5ce62ea6e46
--- /dev/null
+++ b/games-strategy/glob2/files/glob2-0.9.4.4-gcc44.patch
@@ -0,0 +1,12 @@
+--- libgag/include/StreamBackend.h.old
++++ libgag/include/StreamBackend.h
+@@ -28,6 +28,9 @@
+ #ifdef putc
+ #undef putc
+ #endif
++#ifdef getc
++#undef getc
++#endif
+
+ namespace GAGCore
+ {
diff --git a/games-strategy/glob2/files/glob2-0.9.4.4-gcc49.patch b/games-strategy/glob2/files/glob2-0.9.4.4-gcc49.patch
new file mode 100644
index 00000000000..fca1efb5891
--- /dev/null
+++ b/games-strategy/glob2/files/glob2-0.9.4.4-gcc49.patch
@@ -0,0 +1,35 @@
+From https://bugs.gentoo.org/show_bug.cgi?id=538580
+
+Works around this build failure:
+
+In file included from src/AICastor.cpp:26:0:
+src/Game.h: In member function 'void AICastor::computeBuildingNeighbourMap(int, int)':
+src/Game.h:152:9: error: 'struct Game::BuildProject' is private
+ struct BuildProject
+ ^
+src/AICastor.cpp:2296:23: error: within this context
+ for (std::list<Game::BuildProject>::iterator bpi=game->buildProjects.begin(); bpi!=game->buildProjects.end(); bpi++)
+ ^
+scons: *** [src/AICastor.o] Error 1
+scons: building terminated because of errors.
+
+patch submitted by zimous
+
+--- glob2-0.9.4.4.orig/src/Game.h
++++ glob2-0.9.4.4/src/Game.h
+@@ -149,6 +149,7 @@
+ BOTTOM_TO_TOP
+ };
+
++public:
+ struct BuildProject
+ {
+ int posX;
+@@ -159,6 +160,7 @@
+ int unitWorkingFuture;
+ };
+
++private:
+ ///Initiates Game
+ void init(GameGUI *gui, MapEdit* edit);
+
diff --git a/games-strategy/glob2/files/glob2-0.9.4.4-scons-blows.patch b/games-strategy/glob2/files/glob2-0.9.4.4-scons-blows.patch
new file mode 100644
index 00000000000..70619f04839
--- /dev/null
+++ b/games-strategy/glob2/files/glob2-0.9.4.4-scons-blows.patch
@@ -0,0 +1,26 @@
+--- SConstruct.orig
++++ SConstruct
+@@ -1,6 +1,7 @@
+ EnsureSConsVersion(0, 96, 92)
+ import sys
+ import os
++import SCons.Util
+ import glob
+ sys.path.append( os.path.abspath("scons") )
+ import bundle
+@@ -268,6 +269,15 @@
+ env["TARFILE"] = env.Dir("#").abspath + "/glob2-" + env["VERSION"] + ".tar.gz"
+ env["TARFLAGS"] = "-c -z"
+ env.Alias("dist", env["TARFILE"])
++ # Using suggestions for http://dev.gentoo.org/~vapier/scons-blows.txt
++ if os.environ.has_key('CC'):
++ env['CC'] = os.environ['CC']
++ if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
++ if os.environ.has_key('CXXFLAGS'):
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++ if os.environ.has_key('LDFLAGS'):
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+
+ def PackTar(target, source):
+ if "dist" in COMMAND_LINE_TARGETS:
diff --git a/games-strategy/glob2/files/glob2-0.9.4.4-underlinking.patch b/games-strategy/glob2/files/glob2-0.9.4.4-underlinking.patch
new file mode 100644
index 00000000000..65eba48717d
--- /dev/null
+++ b/games-strategy/glob2/files/glob2-0.9.4.4-underlinking.patch
@@ -0,0 +1,19 @@
+--- glob2-0.9.4.4.orig/SConstruct
++++ glob2-0.9.4.4/SConstruct
+@@ -110,6 +110,16 @@
+ print "Could not find libz or zlib1.dll"
+ missing.append("zlib")
+
++ boost_system = ''
++ if conf.CheckLib("boost_system"):
++ boost_system="boost_system"
++ elif conf.CheckLib("boost_system-mt"):
++ boost_system="boost_system-mt"
++ else:
++ print "Could not find libboost_system or libboost_system-mt"
++ missing.append("libboost_system")
++ env.Append(LIBS=[boost_system])
++
+ boost_thread = ''
+ if conf.CheckLib("boost_thread") and conf.CheckCXXHeader("boost/thread/thread.hpp"):
+ boost_thread="boost_thread"
diff --git a/games-strategy/glob2/glob2-0.9.4.4-r1.ebuild b/games-strategy/glob2/glob2-0.9.4.4-r1.ebuild
new file mode 100644
index 00000000000..06a7f2bf085
--- /dev/null
+++ b/games-strategy/glob2/glob2-0.9.4.4-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils gnome2-utils scons-utils games
+
+DESCRIPTION="Real Time Strategy (RTS) game involving a brave army of globs"
+HOMEPAGE="http://globulation2.org/"
+SRC_URI="mirror://nongnu/glob2/${PV:0:5}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/boost-1.34[threads]
+ dev-libs/fribidi
+ media-libs/libsdl[opengl]
+ media-libs/libvorbis
+ media-libs/sdl-image[png]
+ media-libs/sdl-net
+ media-libs/sdl-ttf
+ media-libs/speex
+ virtual/glu
+ virtual/opengl"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-{gcc44,scons-blows,underlinking,gcc49}.patch
+}
+
+src_configure() {
+ myesconsargs=(
+ INSTALLDIR="${GAMES_DATADIR}"/${PN}
+ DATADIR="${GAMES_DATADIR}"/${PN}
+ )
+ escons data
+}
+
+src_compile() {
+ escons
+}
+
+src_install() {
+ dogamesbin src/${PN}
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r campaigns data maps scripts
+ find "${D}/${GAMES_DATADIR}"/${PN} -name SConscript -exec rm -f '{}' +
+ newicon -s 48 data/icons/glob2-icon-48x48.png ${PN}.png
+ make_desktop_entry glob2 "Globulation 2"
+ dodoc README*
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/glob2/metadata.xml b/games-strategy/glob2/metadata.xml
new file mode 100644
index 00000000000..fc67f56d09d
--- /dev/null
+++ b/games-strategy/glob2/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription>
+Globulation2 is an innovative high quality Real-Time Strategy [RTS],
+which minimizes micro-management by automatically assigning tasks to
+the units. The player has to choose the number of units he wants for
+the different tasks, and the units will do their best to satisfy the
+requests. This allows to manage more units and to focus on strategies.
+</longdescription>
+</pkgmetadata>
diff --git a/games-strategy/gorky17-demo/Manifest b/games-strategy/gorky17-demo/Manifest
new file mode 100644
index 00000000000..dee44049db6
--- /dev/null
+++ b/games-strategy/gorky17-demo/Manifest
@@ -0,0 +1,2 @@
+DIST gorky17-demo-1.0-1.0.1-x86.run 955547 SHA256 557bd97400101da9b557a5bfc5e6b9d352a9f10f79c927f31d74581ba7acc16b SHA512 ffd054aa1b169de5cca3c85d58ce2cba127f0caca533f8d4f0046ce63e5505a0ea25c3bbea9a2dde863a8fecefb7f8d322968f90ab3f688dee70a2f0d44826ba WHIRLPOOL c133f6175cfaf5e71c183687fa78b49ab7df1816f6ec9ee8696f9be0c7d5ea2b4e0d39decbb7561db9a7e5ceacb78958e11072fbc5812f7c6627b58dde03cf4a
+DIST gorky17_demo.run 158781516 SHA256 35cf62e06747bfe3445c1d3a61ad1644922528c264ff2ec7b5b510f9bc9dd51a SHA512 7e7bf2a6a9f815381381ef5c50135232db7c6ec734300b807794107ab1b902d659f55569ea03c7d68c3e6dbf98e366de8bca4fd13dac3c688ba48d2f244e9f00 WHIRLPOOL 5e4188d85efb60f3abaa56941a1005c14de26ba4a458cfb2dd3753cde825a1f3945351a06c82b934b4f1c94c9dacf1e2d9b00d17852eb1e140166131dab66192
diff --git a/games-strategy/gorky17-demo/gorky17-demo-1.0.1.0.1-r1.ebuild b/games-strategy/gorky17-demo/gorky17-demo-1.0.1.0.1-r1.ebuild
new file mode 100644
index 00000000000..d2c38d9e0a1
--- /dev/null
+++ b/games-strategy/gorky17-demo/gorky17-demo-1.0.1.0.1-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker versionator games
+
+MY_PN="gorky17"
+MY_PV=$(replace_version_separator 2 '-')
+
+DESCRIPTION="Horror conspiracy game mixing elements of strategy and role-playing"
+HOMEPAGE="http://www.linuxgamepublishing.com/info.php?id=gorky17"
+SRC_URI="http://demofiles.linuxgamepublishing.com/${MY_PN}/${MY_PN}_demo.run
+ http://updatefiles.linuxgamepublishing.com/gorky17-demo/${PN}-${MY_PV}-x86.run"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+RESTRICT="mirror bindist strip"
+
+RDEPEND="
+ >=media-libs/alsa-lib-1.0.27.2[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r4[abi_x86_32(-)]
+ >=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXau-1.0.7-r1[abi_x86_32(-)]
+ >=x11-libs/libXdmcp-1.1.1-r1[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+QA_EXECSTACK="${dir:1}/gorky17_demo ${dir:1}/gorky17_demo.dynamic"
+
+src_unpack() {
+ unpack_makeself ${MY_PN}_demo.run
+ unpack ./data/data.tar.gz
+
+ mkdir patch_dir
+ cd patch_dir
+ unpack_makeself ${PN}-${MY_PV}-x86.run
+ cd "${S}"
+
+ # Apply patch
+ mv bin/Linux/x86/* .
+ mv patch_dir/*.sh .
+ ./patch_dir/bin/Linux/x86/loki_patch patch_dir/patch.dat . || die
+
+ rm -r update.sh *patch.sh data lgp_* patch_dir setup* bin
+}
+
+src_install() {
+ insinto "${dir}"
+ doins -r *
+ rm "${Ddir}"/${MY_PN}*
+
+ exeinto "${dir}"
+ doexe ${MY_PN}*
+
+ games_make_wrapper ${PN} ./${MY_PN}_demo "${dir}" "${dir}"
+ newicon icon.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "Gorky 17 (Demo)" ${PN}
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "The instruction manual is available as:"
+ elog " http://demofiles.linuxgamepublishing.com/gorky17/manual.pdf"
+ echo
+}
diff --git a/games-strategy/gorky17-demo/metadata.xml b/games-strategy/gorky17-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/gorky17-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/gwp/Manifest b/games-strategy/gwp/Manifest
new file mode 100644
index 00000000000..1cf46e02ec9
--- /dev/null
+++ b/games-strategy/gwp/Manifest
@@ -0,0 +1 @@
+DIST gwp-0.4.0.tar.gz 2294453 SHA256 e2734e019e2c3ef28cb0abd524c193ec5beb35d2bc8ba3e10652fac45c8bbe99 SHA512 dcb23bb49929bc01129ab5f02b56edb7f775feb0c37bd7613277af8aa0f4b47667f95413725f74a2b83b60159555a50fcabdc8736094aad0684b03cd150b4957 WHIRLPOOL 4c3cc223799132bf2021e1cb2bc10c88ecd41f3ec7191aaf2c115b91985bfd0717ce70f476234bc64f52286c19ba6a9b9e3722f4d81cf2b91ce9c0b1579b9cd9
diff --git a/games-strategy/gwp/files/gwp-0.4.0-exec-stack.patch b/games-strategy/gwp/files/gwp-0.4.0-exec-stack.patch
new file mode 100644
index 00000000000..1458b7ba1df
--- /dev/null
+++ b/games-strategy/gwp/files/gwp-0.4.0-exec-stack.patch
@@ -0,0 +1,89 @@
+--- src/starchart.c
++++ src/starchart.c
+@@ -3187,10 +3187,16 @@
+ /**
+ * Initializes starchart constellations.
+ */
++static GSList *planets;
++
++static void add_item (gpointer key, gpointer value, gpointer user_data) {
++ /* GSList *p_list = (GSList *)user_data; */
++ planets = g_slist_append (planets, value);
++}
++
+ static void
+ init_starchart_constellations (void)
+ {
+- GSList *planets = NULL;
+ GSList *ppq[TOTAL_QUADS];
+ GSList *list_nearby = NULL;
+ GwpPlanet *planet_a, *planet_b;
+@@ -3199,10 +3205,6 @@
+ gdouble wx, wy;
+ gdouble ax, ay, bx, by, zoom;
+
+- static void add_item (gpointer key, gpointer value, gpointer user_data) {
+- /* GSList *p_list = (GSList *)user_data; */
+- planets = g_slist_append (planets, value);
+- }
+
+ g_hash_table_foreach (planet_list, (GHFunc)add_item, NULL);
+
+--- src/vcr.c
++++ src/vcr.c
+@@ -2687,12 +2687,29 @@
+ return( retval );
+ }
+
++static gchar *name;
++
++static void foreach_func( gpointer key, gpointer value, gpointer user_data )
++{
++ GwpShip *ship = GWP_SHIP( value );
++ GtkComboBox *box = GTK_COMBO_BOX( lookup_widget( "vcr_comboboxentry_sel_ext_shp_a" ) );
++ gint *idlist = (gint *)g_object_get_data(G_OBJECT(lookup_widget("vcr_comboboxentry_sel_ext_shp_a")), "shipidlist");
++ gint curr = idlist[0];
++
++ if( gwp_ship_is_mine( ship ) )
++ {
++ curr++;
++ idlist[curr] = gwp_object_get_id( GWP_OBJECT(ship) );
++ idlist[0]++;
++ g_sprintf( name, "%03d: ", idlist[curr] );
++ strncat( name, gwp_object_get_name (GWP_OBJECT(ship)), 50 );
++ gtk_combo_box_append_text( box, name );
++ }
++}
+
+ void vcr_populate_ship_a_list( GtkWidget *widget, gpointer user_data )
+ {
+- gchar *name;
+ gint *idlist;
+- static void foreach_func( gpointer key, gpointer value, gpointer user_data );
+
+ /* test if list is already populated */
+ idlist = (gint *)g_object_get_data(G_OBJECT(lookup_widget("vcr_comboboxentry_sel_ext_shp_a")), "shipidlist");
+@@ -2708,23 +2725,7 @@
+ GtkWidget *combox = lookup_widget("vcr_comboboxentry_sel_ext_shp_a");
+ g_object_set_data(G_OBJECT(combox), "shipidlist", idlist );
+
+- void foreach_func( gpointer key, gpointer value, gpointer user_data )
+- {
+- GwpShip *ship = GWP_SHIP( value );
+- GtkComboBox *box = GTK_COMBO_BOX( lookup_widget( "vcr_comboboxentry_sel_ext_shp_a" ) );
+- gint *idlist = (gint *)g_object_get_data(G_OBJECT(lookup_widget("vcr_comboboxentry_sel_ext_shp_a")), "shipidlist");
+- gint curr = idlist[0];
+
+- if( gwp_ship_is_mine( ship ) )
+- {
+- curr++;
+- idlist[curr] = gwp_object_get_id( GWP_OBJECT(ship) );
+- idlist[0]++;
+- g_sprintf( name, "%03d: ", idlist[curr] );
+- strncat( name, gwp_object_get_name (GWP_OBJECT(ship)), 50 );
+- gtk_combo_box_append_text( box, name );
+- }
+- }
+
+ g_hash_table_foreach( ship_list, (GHFunc) foreach_func, user_data );
+
diff --git a/games-strategy/gwp/files/gwp-0.4.0-gcc41.patch b/games-strategy/gwp/files/gwp-0.4.0-gcc41.patch
new file mode 100644
index 00000000000..fa7ee5c5443
--- /dev/null
+++ b/games-strategy/gwp/files/gwp-0.4.0-gcc41.patch
@@ -0,0 +1,107 @@
+--- src/gwp-game-state.c.old 2006-03-05 00:56:48.000000000 +0900
++++ src/gwp-game-state.c 2006-03-05 00:57:38.000000000 +0900
+@@ -749,7 +749,7 @@
+ /* Connect to interesting signals */
+ /**********************************/
+ /* Selected planets */
+- static void planet_conn (gpointer key, gpointer value, gpointer self) {
++ void planet_conn (gpointer key, gpointer value, gpointer self) {
+ g_signal_connect (GWP_PLANET(value),
+ "selected",
+ G_CALLBACK(selected_planet_notification),
+@@ -757,7 +757,7 @@
+ }
+ g_hash_table_foreach (planet_list, (GHFunc) planet_conn, self);
+ /* Selected ships */
+- static void ship_conn (gpointer key, gpointer value, gpointer self) {
++ void ship_conn (gpointer key, gpointer value, gpointer self) {
+ g_signal_connect (GWP_SHIP(value),
+ "selected",
+ G_CALLBACK(selected_ship_notification),
+--- src/starchart.c.old 2006-03-05 01:13:39.000000000 +0900
++++ src/starchart.c 2006-03-05 01:18:04.000000000 +0900
+@@ -2111,7 +2111,7 @@
+ /*******************/
+ /* Planets signals */
+ /*******************/
+- static void planet_conn (gpointer key, gpointer value, gpointer data) {
++ void planet_conn (gpointer key, gpointer value, gpointer data) {
+ g_signal_connect (GWP_PLANET(value),
+ "property-changed",
+ G_CALLBACK(update_planet_notification),
+--- src/vp_utils.c.old 2006-03-05 01:18:14.000000000 +0900
++++ src/vp_utils.c 2006-03-05 01:18:52.000000000 +0900
+@@ -2590,7 +2590,7 @@
+ gwp_planet_set_colonists (planet, atoi(p_clans));
+
+ /* Compare func */
+- static gint compare_race (gconstpointer race, gconstpointer adj) {
++ gint compare_race (gconstpointer race, gconstpointer adj) {
+ gchar *race_str = gwp_race_get_adjective(GWP_RACE(race));
+ if (strncmp(race_str, adj, strlen(adj)) == 0)
+ return 0;
+@@ -2639,7 +2639,7 @@
+ /* Assign known planet values */
+ gwp_planet_set_is_known (planet, TRUE);
+ /* Compare func */
+- static gint compare_race (gconstpointer race, gconstpointer adj) {
++ gint compare_race (gconstpointer race, gconstpointer adj) {
+ gchar *race_str = gwp_race_get_adjective(GWP_RACE(race));
+ if (strncmp(race_str, adj, strlen(adj)) == 0)
+ return 0;
+--- src/gwp-py-mappings.c.old 2006-03-05 01:28:39.000000000 +0900
++++ src/gwp-py-mappings.c 2006-03-05 01:29:30.000000000 +0900
+@@ -8657,7 +8657,7 @@
+ {
+ PyObject *ret = PyDict_New();
+
+- static void add_ship (gpointer key, gpointer value, gpointer user_data) {
++ void add_ship (gpointer key, gpointer value, gpointer user_data) {
+ PyObject *dict = (PyObject *)user_data;
+ GwpShip *ship = GWP_SHIP(value);
+
+@@ -8679,7 +8679,7 @@
+ {
+ PyObject *ret = PyDict_New();
+
+- static void add_planet (gpointer key, gpointer value, gpointer user_data) {
++ void add_planet (gpointer key, gpointer value, gpointer user_data) {
+ PyObject *dict = (PyObject *)user_data;
+ GwpPlanet *planet = GWP_PLANET(value);
+
+@@ -8701,7 +8701,7 @@
+ {
+ PyObject *ret = PyDict_New();
+
+- static void add_hullspec (gpointer value, gpointer user_data) {
++ void add_hullspec (gpointer value, gpointer user_data) {
+ PyObject *dict = (PyObject *)user_data;
+ GwpHullSpec *hullspec = GWP_HULLSPEC(value);
+
+@@ -8723,7 +8723,7 @@
+ {
+ PyObject *ret = PyDict_New();
+
+- static void add_engspec (gpointer value, gpointer user_data) {
++ void add_engspec (gpointer value, gpointer user_data) {
+ PyObject *dict = (PyObject *)user_data;
+ GwpEngSpec *engspec = GWP_ENGSPEC(value);
+
+@@ -8745,7 +8745,7 @@
+ {
+ PyObject *ret = PyDict_New();
+
+- static void add_beamspec (gpointer value, gpointer user_data) {
++ void add_beamspec (gpointer value, gpointer user_data) {
+ PyObject *dict = (PyObject *)user_data;
+ GwpBeamSpec *beamspec = GWP_BEAMSPEC(value);
+
+@@ -8767,7 +8767,7 @@
+ {
+ PyObject *ret = PyDict_New();
+
+- static void add_torpspec (gpointer value, gpointer user_data) {
++ void add_torpspec (gpointer value, gpointer user_data) {
+ PyObject *dict = (PyObject *)user_data;
+ GwpTorpSpec *torpspec = GWP_TORPSPEC(value);
+
diff --git a/games-strategy/gwp/gwp-0.4.0-r3.ebuild b/games-strategy/gwp/gwp-0.4.0-r3.ebuild
new file mode 100644
index 00000000000..1b2c6f3fad1
--- /dev/null
+++ b/games-strategy/gwp/gwp-0.4.0-r3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="yes"
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic gnome2 python-single-r1
+
+DESCRIPTION="GNOME client for the classic PBEM strategy game VGA Planets 3"
+HOMEPAGE="http://gwp.lunix.com.ar/"
+SRC_URI="http://gwp.lunix.com.ar/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="nls opengl python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="x11-libs/gtk+:2
+ gnome-base/libgnomeui
+ gnome-base/libglade
+ app-text/rarian
+ dev-libs/libpcre
+ nls? ( virtual/libintl )
+ opengl? ( x11-libs/gtkglext )
+ python? ( ${PYTHON_DEPS}
+ dev-python/pygtk[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ append-libs -lm
+ epatch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-exec-stack.patch
+ sed -i \
+ -e '/ -O1/d' \
+ -e '/ -g$/d' \
+ src/Makefile.in || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable nls) \
+ $(use_enable opengl gtkglext) \
+ $(use_enable python)
+}
+
+src_install() {
+ DOCS="AUTHORS ChangeLog CHANGES README TODO" \
+ gnome2_src_install
+ rm -rf "${D}"/usr/share/doc/gwp
+}
diff --git a/games-strategy/gwp/metadata.xml b/games-strategy/gwp/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/gwp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/hedgewars/Manifest b/games-strategy/hedgewars/Manifest
new file mode 100644
index 00000000000..f5f120cc610
--- /dev/null
+++ b/games-strategy/hedgewars/Manifest
@@ -0,0 +1 @@
+DIST hedgewars-src-0.9.21.1.tar.bz2 160250791 SHA256 590a9458d2123c5550d5eb39edfed28d0663703d76e13c8987237c92ca41f3f8 SHA512 4b9a2ab79d9ddb064fddaa2a4dbc895a11c0cbc52ef9e5f56322a63821fdfa4a31d6e268510a9163bd57bd89dec20be30e0f5ef992b41dc473c4684bbb6a48be WHIRLPOOL 19242ff98d3994273c6b0c7e8cfbbb5f7338061c574b4bfe8a77ed085a44c618d1ce564b295e51b400ece6f51bcbc6e211c59278382fadb3f6a26e113c2dc4b4
diff --git a/games-strategy/hedgewars/hedgewars-0.9.21.1.ebuild b/games-strategy/hedgewars/hedgewars-0.9.21.1.ebuild
new file mode 100644
index 00000000000..b2210121e85
--- /dev/null
+++ b/games-strategy/hedgewars/hedgewars-0.9.21.1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO: when physfs-2.1.0 hits the tree, set
+# -DPHYSFS_SYSTEM=ON
+
+EAPI=5
+CMAKE_BUILD_TYPE=Release
+inherit cmake-utils eutils games
+
+MY_P=${PN}-src-${PV}
+DESCRIPTION="A turn-based strategy, artillery, action and comedy game"
+HOMEPAGE="http://hedgewars.org/"
+SRC_URI="http://download.gna.org/hedgewars/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2 Apache-2.0 FDL-1.3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+QA_FLAGS_IGNORED=${GAMES_BINDIR}/hwengine # pascal sucks
+QA_PRESTRIPPED=${GAMES_BINDIR}/hwengine # pascal sucks
+
+RDEPEND="
+ dev-lang/lua
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ media-libs/freeglut
+ media-libs/libpng:0
+ media-libs/libsdl[sound,opengl,video]
+ media-libs/sdl-image[png]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-net
+ media-libs/sdl-ttf
+ sys-libs/zlib
+ virtual/ffmpeg"
+DEPEND="${RDEPEND}
+ >=dev-lang/fpc-2.4"
+RDEPEND="${RDEPEND}
+ media-fonts/wqy-zenhei
+ >=media-fonts/dejavu-2.28"
+
+S=${WORKDIR}/${PN}-src-${PV%.*}
+
+src_configure() {
+ local mycmakeargs=(
+ -DMINIMAL_FLAGS=ON
+ -DCMAKE_INSTALL_PREFIX="/usr"
+ -DDATA_INSTALL_DIR="${GAMES_DATADIR}/${PN}"
+ -Dtarget_binary_install_dir="${GAMES_BINDIR}"
+ -Dtarget_library_install_dir="$(games_get_libdir)"
+ -DNOSERVER=TRUE
+ -DCMAKE_VERBOSE_MAKEFILE=TRUE
+ -DPHYSFS_SYSTEM=OFF
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ DOCS="ChangeLog.txt README" cmake-utils_src_install
+ rm -f "${D}"/usr/share/games/hedgewars/Data/Fonts/{DejaVuSans-Bold.ttf,wqy-zenhei.ttc}
+ dosym /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf \
+ "${GAMES_DATADIR}"/hedgewars/Data/Fonts/DejaVuSans-Bold.ttf
+ dosym /usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc \
+ "${GAMES_DATADIR}"/hedgewars/Data/Fonts/wqy-zenhei.ttc
+ doicon misc/hedgewars.png
+ make_desktop_entry ${PN} Hedgewars
+ doman man/${PN}.6
+ prepgamesdirs
+}
diff --git a/games-strategy/hedgewars/metadata.xml b/games-strategy/hedgewars/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/hedgewars/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/heroes3-demo/Manifest b/games-strategy/heroes3-demo/Manifest
new file mode 100644
index 00000000000..2eddd25fc44
--- /dev/null
+++ b/games-strategy/heroes3-demo/Manifest
@@ -0,0 +1 @@
+DIST heroes3-demo.run 99026773 SHA256 15de1efce09839013b5e85eddc57364167c46776b181b124299362a79e6ce735 SHA512 a3f60f12f7ce8ea0f160ec211e1f077693ff2f5e4b8b85ae0e31f1230a910b4df7c8c6a340762d4f09c9845d6141d235307f933305557a75fc63f409e077ac71 WHIRLPOOL 7afbd806f6e91dbbf2481723ae36b23c3ada9b7093bed815091ea76a8045623b4d52319b319a928537698e8cc89dce0cfedb8ad5b3cf75ce9ec6421631442a8a
diff --git a/games-strategy/heroes3-demo/heroes3-demo-1.3.1a.ebuild b/games-strategy/heroes3-demo/heroes3-demo-1.3.1a.ebuild
new file mode 100644
index 00000000000..311417d02f4
--- /dev/null
+++ b/games-strategy/heroes3-demo/heroes3-demo-1.3.1a.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_PN=${PN%-demo}
+
+DESCRIPTION="turn-based 2D medieval combat"
+HOMEPAGE="http://www.lokigames.com/products/heroes3/"
+SRC_URI="mirror://lokigames/loki_demos/${PN}.run"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+# Should also work on ppc
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror bindist strip"
+
+DEPEND="games-util/loki_patch"
+RDEPEND=">=sys-libs/lib-compat-loki-0.2
+ || (
+ ppc? (
+ x11-libs/libX11
+ )
+ !ppc? (
+ x11-libs/libX11[abi_x86_32(-)]
+ )
+ )"
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+QA_PREBUILT="${dir:1}/*"
+
+S=${WORKDIR}
+
+src_install() {
+ # Apply patch
+ loki_patch patch.dat data/ || die
+
+ local demo="data/demos/${MY_PN}_demo"
+
+ local exe_stub="${MY_PN}_demo"
+ if use ppc ; then
+ exe="${exe_stub}.ppc"
+ else
+ exe="${exe_stub}.x86"
+ fi
+
+ insinto "${dir}"
+ exeinto "${dir}"
+ doins -r "${demo}"/*
+ rm "${D}/${dir}"/{${exe_stub}*,*.sh} || die
+ doexe "${demo}/${exe}"
+
+ einfo "Linking libs provided by 'sys-libs/lib-compat-loki' to '${dir}'."
+ dosym /lib/loki_ld-linux.so.2 "${dir}"/ld-linux.so.2
+ dosym /usr/lib/loki_libc.so.6 "${dir}"/libc.so.6
+ dosym /usr/lib/loki_libnss_files.so.2 "${dir}"/libnss_files.so.2
+
+ games_make_wrapper ${PN} "./${exe}" "${dir}"
+ newicon "${demo}/icon.xpm" ${PN}.png
+ make_desktop_entry ${PN} "Heroes of Might and Magic III (Demo)" ${PN}
+
+ prepgamesdirs
+}
diff --git a/games-strategy/heroes3-demo/metadata.xml b/games-strategy/heroes3-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/heroes3-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/heroes3/Manifest b/games-strategy/heroes3/Manifest
new file mode 100644
index 00000000000..7a9fbeb30a2
--- /dev/null
+++ b/games-strategy/heroes3/Manifest
@@ -0,0 +1,2 @@
+DIST heroes3-1.3.1a-cdrom-x86.run 3012188 SHA256 f87d78e09278e2f05cb15e2f79dfeaae2cef8fb147b83185dd4f818c0ab7759e
+DIST heroes3-1.3.1a-ppc.run 2643068 SHA256 b14eeb8eef705b20dbf54eb308b2232d6110f4ec568cb82d9ea9fb7f9cca3137
diff --git a/games-strategy/heroes3/files/heroes3-wrapper.sh b/games-strategy/heroes3/files/heroes3-wrapper.sh
new file mode 100644
index 00000000000..3847c539ed7
--- /dev/null
+++ b/games-strategy/heroes3/files/heroes3-wrapper.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+DIR="${HOME}/.loki/heroes3"
+
+if [ ! -d "${DIR}" ]; then
+ echo "* Creating '${DIR}'"
+ mkdir -p ${DIR}
+fi
+
+# fixes bug #93604
+cd ${DIR}
+
+exec GAMES_PREFIX_OPT/heroes3/heroes3 ${@}
diff --git a/games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild b/games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild
new file mode 100644
index 00000000000..3344ed6aee5
--- /dev/null
+++ b/games-strategy/heroes3/heroes3-1.3.1a-r2.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# [x] Base Install Required (+4 MB)
+# [x] Scenarios (+7 MB)
+# [x] Sounds and Graphics (+118 MB)
+# [x] Music (+65 MB)
+# [x] Videos (+147 MB)
+# --------------------
+# Total 341 MB
+
+EAPI=5
+LANGS="de es pl"
+LANGPACKPREFIX="${PN}-lang"
+LANGPACKBASE="http://babelize.org/download/"
+LANGPACKPATHPREFIX="${LANGPACKBASE}/${LANGPACKPREFIX}"
+LANGPACKVERSION=1.0.4
+
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Heroes of Might and Magic III : The Restoration of Erathia - turn-based 2-D medieval combat"
+HOMEPAGE="http://www.lokigames.com/products/heroes3/"
+
+# Since I do not have a PPC machine to test with, I will leave the PPC stuff in
+# here so someone else can stabilize loki_setupdb and loki_patch for PPC and
+# then KEYWORD this appropriately.
+SRC_URI="x86? ( mirror://lokigames/${PN}/${P}-cdrom-x86.run )
+ amd64? ( mirror://lokigames/${PN}/${P}-cdrom-x86.run )
+ ppc? ( mirror://lokigames/${PN}/${P}-ppc.run )"
+# This is commented because the server is unreachable.
+# linguas_es? ( ${LANGPACKPATHPREFIX}-es.tar.gz )
+# linguas_de? ( ${LANGPACKPATHPREFIX}-de.tar.gz )
+# linguas_pl? ( ${LANGPACKPATHPREFIX}-pl.tar.gz )"
+
+# ${LANGPACKBASE}/${PN}-localize-${LANGPACKVERSION}.run
+
+LICENSE="LOKI-EULA"
+SLOT="0"
+IUSE="nocd maps music sounds videos"
+#linguas_en linguas_es linguas_pl linguas_de"
+KEYWORDS="~amd64 ~ppc x86"
+RESTRICT="strip"
+
+DEPEND="=dev-util/xdelta-1*
+ games-util/loki_patch"
+RDEPEND="!ppc? ( sys-libs/lib-compat-loki )"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+pkg_setup() {
+ games_pkg_setup
+# strip-linguas en ${LANGS}
+
+ use nocd && fullinstall=1
+ use sounds && use videos && use maps && fullinstall=1
+
+ [[ ${fullinstall} -eq 1 ]] \
+ && ewarn "The full installation takes about 341 MB of space!"
+
+# if [[ -n "${fullinstall}" ]]
+# then
+# langcount=0
+# for i in ${LINGUAS}
+# do
+# i="${i/_/-}"
+# if [[ ${i} != "en" ]]
+# then
+# let $((++langcount))
+# if [[ $langcount = 2 ]]
+# then
+# eerror "Heroes3 only supports one localization at once!"
+# die "Localization is only supported when Heroes3 is in a single language!"
+# fi
+# fi
+# done
+# else
+# for i in ${LINGUAS}
+# do
+# i="${i/_/-}"
+# if [[ ${i} != "en" ]]
+# then
+# eerror "Full installation (nocd flag or data + video + maps flags) is needed for ${i} language!"
+# die "Localization is only supported when Heroes3 is fully locally installed!"
+# fi
+# done
+# fi
+}
+
+src_unpack() {
+ cdrom_get_cds hiscore.tar.gz
+ (use x86 || use amd64) && unpack_makeself ${P}-cdrom-x86.run
+ use ppc && unpack_makeself ${P}-ppc.run
+
+# for i in ${LINGUAS}
+# do
+# i="${i/_/-}"
+# if [[ ${i} != "en" ]]
+# then
+# mkdir localize
+# cd localize
+## unpack_makeself ${PN}-localize-${LANGPACKVERSION}.run
+# unpack ${LANGPACKPREFIX}-${i}.tar.gz
+# break
+# fi
+# done
+}
+
+src_install() {
+ exeinto "${dir}"
+ insinto "${dir}"
+ einfo "Copying files... this may take a while..."
+ doexe "${CDROM_ROOT}"/bin/x86/${PN}
+ doins "${CDROM_ROOT}"/{Heroes_III_Tutorial.pdf,README,icon.{bmp,xpm}}
+
+ if use nocd
+ then
+ doins -r "${CDROM_ROOT}"/{data,maps,mp3}
+ else
+ if use maps
+ then
+ doins -r "${CDROM_ROOT}"/maps
+ fi
+ if use music
+ then
+ doins -r "${CDROM_ROOT}"/mp3
+ fi
+ if use sounds
+ then
+ insinto "${dir}"/data
+ doins "${CDROM_ROOT}"/data/{*.lod,*.snd}
+ fi
+ if use videos
+ then
+ doins -r "${CDROM_ROOT}"/data/video
+ fi
+ fi
+
+# if [[ -n "${fullinstall}" ]]
+# then
+# for i in ${LINGUAS}
+# do
+# i="${i/_/-}"
+# if [[ ${i} != "en" ]]
+# then
+# find "${S}/localize/${i}" -type f | while read xfile
+# do
+# local file=$(echo "${xfile}" | \
+# sed "s#^${S}/localize/${i}/##;s#\.xdelta\$##")
+# ebegin "Localizing ${file}"
+# xdelta patch "${xfile}" "${Ddir}/${file}" "${Ddir}/${file}.xdp"
+# local retval=$?
+# if [[ $retval = 0 ]]
+# then
+# mv -f "${Ddir}/${file}.xdp" "${Ddir}/${file}"
+# else
+# rm -f "${Ddir}/${file}.xdp"
+# fi
+# eend $retval "File $file could not be localized/patched! Original english version untouched..."
+# done
+# break
+# fi
+# done
+# fi
+
+ tar zxf "${CDROM_ROOT}"/hiscore.tar.gz -C "${Ddir}" || die
+
+ cd "${S}"
+ loki_patch --verify patch.dat
+ loki_patch patch.dat "${Ddir}" >& /dev/null || die
+
+ # now, since these files are coming off a cd, the times/sizes/md5sums wont
+ # be different ... that means portage will try to unmerge some files (!)
+ # we run touch on ${D} so as to make sure portage doesnt do any such thing
+ find "${Ddir}" -exec touch '{}' \;
+
+ newicon "${CDROM_ROOT}"/icon.xpm heroes3.xpm
+
+ prepgamesdirs
+ make_desktop_entry heroes3 "Heroes of Might and Magic III" "heroes3"
+
+ if ! use ppc
+ then
+ einfo "Linking libs provided by 'sys-libs/lib-compat-loki' to '${dir}'."
+ dosym /lib/loki_ld-linux.so.2 "${dir}"/ld-linux.so.2
+ dosym /usr/lib/loki_libc.so.6 "${dir}"/libc.so.6
+ dosym /usr/lib/loki_libnss_files.so.2 "${dir}"/libnss_files.so.2
+ fi
+
+ elog "Changing 'hiscore.dat' to be writeable for group 'games'."
+ fperms g+w "${dir}/data/hiscore.dat"
+
+ # in order to play campaign games, put this wrapper in place.
+ # it changes CWD to a user-writeable directory before executing heroes3.
+ # (fixes bug #93604)
+ einfo "Preparing wrapper."
+ cp "${FILESDIR}"/heroes3-wrapper.sh "${T}"/heroes3 || die
+ sed -i -e "s:GAMES_PREFIX_OPT:${GAMES_PREFIX_OPT}:" "${T}"/heroes3 || die
+ dogamesbin "${T}"/heroes3
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To play the game run:"
+ elog " heroes3"
+}
diff --git a/games-strategy/heroes3/metadata.xml b/games-strategy/heroes3/metadata.xml
new file mode 100644
index 00000000000..dcc07710cea
--- /dev/null
+++ b/games-strategy/heroes3/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="maps">Installs optional map data</flag>
+ <flag name="music">Installs optional music data</flag>
+ <flag name="sounds">Installs optional sound data</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-strategy/ja2-stracciatella-data/ja2-stracciatella-data-1.ebuild b/games-strategy/ja2-stracciatella-data/ja2-stracciatella-data-1.ebuild
new file mode 100644
index 00000000000..205fe028e31
--- /dev/null
+++ b/games-strategy/ja2-stracciatella-data/ja2-stracciatella-data-1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cdrom check-reqs games
+
+DESCRIPTION="A port of Jagged Alliance 2 to SDL (data files)"
+HOMEPAGE="http://tron.homeunix.org/ja2/"
+SRC_URI=""
+
+LICENSE="SIR-TECH"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="games-strategy/ja2-stracciatella"
+DEPEND="app-arch/unshield"
+
+S=${WORKDIR}
+
+CHECKREQS_DISK_BUILD="3G"
+CHECKREQS_DISK_USR="1G"
+
+src_unpack() {
+ export CDROM_NAME="INSTALL_CD"
+
+ cdrom_get_cds INSTALL/data1.cab
+
+ # this makes some serious overhead
+ unshield x "${CDROM_ROOT}"/INSTALL/data1.cab || die "unpacking failed"
+}
+
+src_prepare() {
+ cd "${S}"/Ja2_Files/Data || die
+ local lower i
+
+ # convert to lowercase
+ find . \( -iname "*.jsd" -o -iname "*.wav" -o -iname "*.sti" -o -iname "*.slf" \) \
+ -exec sh -c 'echo "${1}"
+ lower="`echo "${1}" | tr [:upper:] [:lower:]`"
+ [ -d `dirname "${lower}"` ] || mkdir `dirname ${lower}`
+ [ "${1}" = "${lower}" ] || mv "${1}" "${lower}"' - {} \;
+
+ # remove possible leftover
+ rm -r ./TILECACHE ./STSOUNDS
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/ja2/data
+ doins -r "${S}"/Ja2_Files/Data/*
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "This is just the data portion of the game. You will need to install"
+ elog "games-strategy/ja2-stracciatella to play the game."
+}
diff --git a/games-strategy/ja2-stracciatella-data/metadata.xml b/games-strategy/ja2-stracciatella-data/metadata.xml
new file mode 100644
index 00000000000..01a746edb19
--- /dev/null
+++ b/games-strategy/ja2-stracciatella-data/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+</pkgmetadata>
+
diff --git a/games-strategy/ja2-stracciatella/Manifest b/games-strategy/ja2-stracciatella/Manifest
new file mode 100644
index 00000000000..d6f3829097e
--- /dev/null
+++ b/games-strategy/ja2-stracciatella/Manifest
@@ -0,0 +1,2 @@
+DIST editor.slf.gz 134265 SHA256 a1cb444f3b3dfc509dd9498fe391b258ebfc8954689ed864f633021e9f56cde6 SHA512 243e3bf5e7298c3a71b330985f5c4d4df3e4cb43df32c823d835353d6309a64f62679c3d0634ca162f6484f7cbf366627e57b1d967188c13940db8933a5f03f2 WHIRLPOOL c542911659d06f49fb9f39baedc148237d868bd55f306fe7c02fb45e113a1001d247ea60b81178278a34d3aed585fa8e1575aedb462d4a0644c386ddb2fc31c7
+DIST ja2-stracciatella-0.12.1_p7072.tar.xz 2118832 SHA256 41729ff2d283b291af2389bbd75942373cfa6f6bd8e80eed999ad6526adf036a SHA512 9269c9e2e179d705b6d83dfac56c604eaefbe5bffe5c16e3f26c1209d3842bbac22db19362e51acf0c6602d64a283d2ec4fa19b0f37d1cddfb013f686c936411 WHIRLPOOL 8e22fdcf23977a646ed7599ba61abfea715f67ec21aebf9f8087349459275023c138648d633e8d7b8fdc6d03b60414ca460b0a6eb8bcae3646cec761dba7b56a
diff --git a/games-strategy/ja2-stracciatella/files/ja2-convert.sh b/games-strategy/ja2-stracciatella/files/ja2-convert.sh
new file mode 100644
index 00000000000..4f337ca7535
--- /dev/null
+++ b/games-strategy/ja2-stracciatella/files/ja2-convert.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Convert names of data-files to lower-case
+
+# location of the data-files
+GAMES_DATADIR=@GAMES_DATADIR@
+
+cd "${GAMES_DATADIR}" || exit 1
+
+# convert to lowercase
+find . -exec sh -c 'echo "${1}"
+lower="`echo "${1}" | tr [:upper:] [:lower:]`"
+[ -d `dirname "${lower}"` ] || mkdir `dirname ${lower}`
+[ "${1}" = "${lower}" ] || mv "${1}" "${lower}"' - {} \;
+
+# remove leftover
+rm -r ./TILECACHE ./STSOUNDS
diff --git a/games-strategy/ja2-stracciatella/files/ja2-stracciatella-0.12.1_p7072-makefile.patch b/games-strategy/ja2-stracciatella/files/ja2-stracciatella-0.12.1_p7072-makefile.patch
new file mode 100644
index 00000000000..0475773bd36
--- /dev/null
+++ b/games-strategy/ja2-stracciatella/files/ja2-stracciatella-0.12.1_p7072-makefile.patch
@@ -0,0 +1,179 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue May 8 19:16:08 UTC 2012
+Subject: build system
+
+--- Makefile
++++ Makefile
+@@ -16,106 +16,94 @@
+ MANPREFIX ?= $(PREFIX)
+
+ INSTALL ?= install
+-INSTALL_PROGRAM ?= $(INSTALL) -m 555 -s
+-INSTALL_MAN ?= $(INSTALL) -m 444
+-INSTALL_DATA ?= $(INSTALL) -m 444
++INSTALL_PROGRAM ?= $(INSTALL) -m 755
++INSTALL_MAN ?= $(INSTALL) -m 644
++INSTALL_DATA ?= $(INSTALL) -m 644
+
++# compiler CFLAGS
++CFLAGS += -std=gnu99
+
++# sdl-flags
+ SDL_CONFIG ?= sdl-config
+ ifndef CFLAGS_SDL
+ CFLAGS_SDL := $(shell $(SDL_CONFIG) --cflags)
+ endif
+ ifndef LDFLAGS_SDL
+-LDFLAGS_SDL := $(shell $(SDL_CONFIG) --libs)
++LIBS_SDL := $(shell $(SDL_CONFIG) --libs)
+ endif
+
++# LIBS
++LIBS += $(LIBS_SDL)
++LIBS += -lm
++
++ifdef WITH_ZLIB
++LIBS += -lz
++endif
+
+-CFLAGS += $(CFLAGS_SDL)
+-CFLAGS += -I Build
+-CFLAGS += -I Build/Tactical
+-CFLAGS += -I Build/Strategic
+-CFLAGS += -I Build/Editor
+-CFLAGS += -I Build/Res
+-CFLAGS += -I Build/Laptop
+-CFLAGS += -I Build/Utils
+-CFLAGS += -I Build/TileEngine
+-CFLAGS += -I Build/TacticalAI
+-CFLAGS += -I sgp
+-
+-#CFLAGS += -Wall
+-#CFLAGS += -W
+-CFLAGS += -Wpointer-arith
+-CFLAGS += -Wreturn-type
+-CFLAGS += -Wunused-label
+-CFLAGS += -Wunused-variable
+-CFLAGS += -Wwrite-strings
+
+-CFLAGS += -DJA2
++# preprocessor flags
++CPPFLAGS += $(CFLAGS_SDL)
++CPPFLAGS += -I Build
++CPPFLAGS += -I Build/Tactical
++CPPFLAGS += -I Build/Strategic
++CPPFLAGS += -I Build/Editor
++CPPFLAGS += -I Build/Res
++CPPFLAGS += -I Build/Laptop
++CPPFLAGS += -I Build/Utils
++CPPFLAGS += -I Build/TileEngine
++CPPFLAGS += -I Build/TacticalAI
++CPPFLAGS += -I sgp
+
++CPPFLAGS += -DJA2
+
+ ifdef WITH_DEMO
+- CFLAGS += -DJA2DEMO
++ CPPFLAGS += -DJA2DEMO
+ endif
+
+ ifdef WITH_DEMO_ADS
+ ifndef WITH_DEMO
+ $(error WITH_DEMO_ADS needs WITH_DEMO)
+ endif
+- CFLAGS += -DJA2DEMOADS
++ CPPFLAGS += -DJA2DEMOADS
+ endif
+
+ ifdef WITH_FIXMES
+- CFLAGS += -DWITH_FIXMES
++ CPPFLAGS += -DWITH_FIXMES
+ endif
+
+ ifdef WITH_MAEMO
+- CFLAGS += -DWITH_MAEMO
++ CPPFLAGS += -DWITH_MAEMO
+ endif
+
+ ifdef WITH_SOUND_DEBUG
+- CFLAGS += -DWITH_SOUND_DEBUG
++ CPPFLAGS += -DWITH_SOUND_DEBUG
+ endif
+
+ ifdef _DEBUG
+- CFLAGS += -D_DEBUG
++ CPPFLAGS += -D_DEBUG
+ ifndef JA2TESTVERSION
+ JA2TESTVERSION := yes
+ endif
+ endif
+
+ ifdef JA2TESTVERSION
+- CFLAGS += -DJA2TESTVERSION
++ CPPFLAGS += -DJA2TESTVERSION
+ ifndef JA2BETAVERSION
+ JA2BETAVERSION := yes
+ endif
+ endif
+
+ ifdef JA2BETAVERSION
+-CFLAGS += -DJA2BETAVERSION -DSGP_DEBUG -DFORCE_ASSERTS_ON -DSGP_VIDEO_DEBUGGING
++CPPFLAGS += -DJA2BETAVERSION -DSGP_DEBUG -DFORCE_ASSERTS_ON -DSGP_VIDEO_DEBUGGING
+ endif
+
+ ifdef JA2EDITOR
+-CFLAGS += -DJA2EDITOR
++CPPFLAGS += -DJA2EDITOR
+ endif
+
+-CFLAGS += -D$(LNG)
+-
+-CFLAGS += -DSGPDATADIR=\"$(SGPDATADIR)\"
+-
+-CCFLAGS += $(CFLAGS)
+-CCFLAGS += -std=gnu99
+-CCFLAGS += -Werror-implicit-function-declaration
+-CCFLAGS += -Wimplicit-int
+-CCFLAGS += -Wmissing-prototypes
++CPPFLAGS += -D$(LNG)
++CPPFLAGS += -DSGPDATADIR=\"$(SGPDATADIR)\"
+
+-CXXFLAGS += $(CFLAGS)
+-
+-LDFLAGS += $(LDFLAGS_SDL)
+-LDFLAGS += -lm
+-
+-ifdef WITH_ZLIB
+-LDFLAGS += -lz
+-endif
+
+ SRCS :=
+ SRCS += Build/AniViewScreen.cc
+@@ -468,7 +456,7 @@
+ .SUFFIXES:
+ .SUFFIXES: .c .cc .d .o
+
+-Q ?= @
++Q =
+
+ all: $(BINARY)
+
+@@ -476,15 +464,15 @@
+
+ $(BINARY): $(OBJS)
+ @echo '===> LD $@'
+- $(Q)$(CXX) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $@
++ $(Q)$(CXX) $(CXXFLAGS) $(OBJS) $(LDFLAGS) -o $@ $(LIBS)
+
+ .c.o:
+ @echo '===> CC $<'
+- $(Q)$(CC) $(CCFLAGS) -c -MMD -o $@ $<
++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -MMD -o $@ $<
+
+ .cc.o:
+ @echo '===> CXX $<'
+- $(Q)$(CXX) $(CXXFLAGS) -c -MMD -o $@ $<
++ $(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -MMD -o $@ $<
+
+ clean distclean:
+ @echo '===> CLEAN'
diff --git a/games-strategy/ja2-stracciatella/ja2-stracciatella-0.12.1_p7072.ebuild b/games-strategy/ja2-stracciatella/ja2-stracciatella-0.12.1_p7072.ebuild
new file mode 100644
index 00000000000..936f5b33524
--- /dev/null
+++ b/games-strategy/ja2-stracciatella/ja2-stracciatella-0.12.1_p7072.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils games
+
+DESCRIPTION="A port of Jagged Alliance 2 to SDL"
+HOMEPAGE="http://tron.homeunix.org/ja2/"
+SRC_URI="http://dev.gentoo.org/~hasufell/distfiles/${P}.tar.xz
+ http://tron.homeunix.org/ja2/editor.slf.gz"
+
+LICENSE="SFI-SCLA"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cdinstall editor zlib"
+
+RDEPEND="media-libs/libsdl[X,sound,video]
+ cdinstall? ( games-strategy/ja2-stracciatella-data )
+ zlib? ( sys-libs/zlib )"
+
+LANGS="linguas_de +linguas_en linguas_fr linguas_it linguas_nl linguas_pl linguas_ru linguas_ru_gold"
+IUSE="$IUSE $LANGS"
+REQUIRED_USE="^^ ( ${LANGS//+/} )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+
+ sed \
+ -e "s:/some/place/where/the/data/is:${GAMES_DATADIR}/ja2:" \
+ -i sgp/FileMan.cc || die
+
+ sed \
+ -e "s:@GAMES_DATADIR@:${GAMES_DATADIR}/ja2/data:" \
+ "${FILESDIR}"/ja2-convert.sh > "${T}"/ja2-convert || die
+}
+
+src_compile() {
+ local myconf
+
+ case ${LINGUAS} in
+ de) myconf="LNG=GERMAN" ;;
+ nl) myconf="LNG=DUTCH" ;;
+ fr) myconf="LNG=FRENCH" ;;
+ it) myconf="LNG=ITALIAN" ;;
+ pl) myconf="LNG=POLISH" ;;
+ ru) myconf="LNG=RUSSIAN" ;;
+ ru_gold) myconf="LNG=RUSSIAN_GOLD" ;;
+ en) myconf="LNG=ENGLISH" ;;
+ *) die "wat" ;;
+ esac
+ elog "Chosen language is ${myconf#LNG=}"
+
+ use editor && myconf+=" JA2EDITOR=yes JA2BETAVERSION=yes"
+ use zlib && myconf+=" WITH_ZLIB=yes"
+
+ emake ${myconf}
+}
+
+src_install() {
+ dogamesbin ja2 "${T}"/ja2-convert
+
+ if use editor; then
+ insinto "${GAMES_DATADIR}"/ja2/data
+ doins "${WORKDIR}"/editor.slf
+ fi
+
+ make_desktop_entry ja2 ${PN}
+ doman ja2.6
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "You need ja2 in the chosen language, otherwise set it in package.use!"
+
+ if ! use cdinstall ; then
+ elog "You need to copy all files from the Data directory of"
+ elog "Jagged Alliance 2 installation to"
+ elog "${GAMES_DATADIR}/ja2/data "
+ elog "Make sure the filenames are lowercase. You may want to run the"
+ elog "script":
+ elog "${GAMES_BINDIR}/ja2-convert"
+ fi
+}
diff --git a/games-strategy/ja2-stracciatella/metadata.xml b/games-strategy/ja2-stracciatella/metadata.xml
new file mode 100644
index 00000000000..27bf0ade792
--- /dev/null
+++ b/games-strategy/ja2-stracciatella/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="editor">Adds necessary file to run the editor</flag>
+ <flag name="linguas_ru_gold">Support for russian gold ja2 version</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/games-strategy/knights-demo/Manifest b/games-strategy/knights-demo/Manifest
new file mode 100644
index 00000000000..b618bebee5a
--- /dev/null
+++ b/games-strategy/knights-demo/Manifest
@@ -0,0 +1 @@
+DIST knights-demo-1.32.run 31667235 SHA256 bbdd7a49d710e76ef2de9bc5d9cdfbac3660f4ed2fa785ede08d7422eef995c8
diff --git a/games-strategy/knights-demo/knights-demo-1.32-r1.ebuild b/games-strategy/knights-demo/knights-demo-1.32-r1.ebuild
new file mode 100644
index 00000000000..3215b443eda
--- /dev/null
+++ b/games-strategy/knights-demo/knights-demo-1.32-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="Anglo-Saxon medieval army battles and resource management"
+HOMEPAGE="http://www.linuxgamepublishing.com/info.php?id=knights"
+# Unversioned upstream filename
+SRC_URI="mirror://gentoo/${P}.run"
+
+LICENSE="knights-demo"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+RESTRICT="strip"
+
+RDEPEND="sys-libs/glibc
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXau-1.0.7-r1[abi_x86_32(-)]
+ >=x11-libs/libXdmcp-1.1.1-r1[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libXi-1.7.2[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack_makeself ${P}.run
+ mv -f data{,-temp}
+ unpack ./data-temp/data.tar.gz
+ rm -rf data-temp lgp_* setup*
+}
+
+src_install() {
+ local dir=${GAMES_PREFIX_OPT}/${PN}
+
+ exeinto "${dir}"
+ doexe bin/Linux/x86/${PN}{,.dynamic}
+
+ insinto "${dir}"
+ doins -r data
+ doins EULA icon.xpm README{,.licenses}
+
+ # We don't support the dynamic version, even though we install it.
+ games_make_wrapper ${PN} ./${PN} "${dir}" "${dir}"
+ newicon icon.xpm ${PN}.xpm
+ make_desktop_entry ${PN} "Knights and Merchants (Demo)" ${PN}
+ prepgamesdirs
+}
diff --git a/games-strategy/knights-demo/metadata.xml b/games-strategy/knights-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/knights-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/lgeneral/Manifest b/games-strategy/lgeneral/Manifest
new file mode 100644
index 00000000000..24598d8e294
--- /dev/null
+++ b/games-strategy/lgeneral/Manifest
@@ -0,0 +1,2 @@
+DIST lgeneral-1.2.4.tar.gz 1677195 SHA256 7207cba927f518b5962a4c5b709a8aca128fd0638c47984e9da0415ad2610c00 SHA512 c85cc6454b30d0ac84a2a4e0e35b9cca8b4ab3f8816f9bac607a439dde5eb667432596c09af3e5f1382572860eab4291dcbe045af7eef59cf879a4e9db9506cd WHIRLPOOL e25e7cb0ed6fabf408773a8aedb0e79ade10390f874d7c08a3624b273166a718630587afcde88ca0a9664e8634a0656c69e7aa5f9f708125cc1f381a12add7cd
+DIST pg-data.tar.gz 410454 SHA256 f2f74022cf8c279451911dda0a57cffab26ebf11429d61a6596310340ed23f76 SHA512 b0df30dd9a9d0652acd8702d601c489e5d3a030854ceeb173d2daa656c00633a78a3f45814da9f4157b86544dec34eda02495742242653c7cdebba5ec9951516 WHIRLPOOL 69f22f28cf4639dab0e6cf90036c26178129d7f67decf8b95ca175bb224bb3b985cf80382e06e45db06ef21d9ab9819fc1821b3d633a67bbb06ba56a8b450022
diff --git a/games-strategy/lgeneral/lgeneral-1.2.4.ebuild b/games-strategy/lgeneral/lgeneral-1.2.4.ebuild
new file mode 100644
index 00000000000..16d1598c335
--- /dev/null
+++ b/games-strategy/lgeneral/lgeneral-1.2.4.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools gnome2-utils games
+
+MY_P="${P/_/}"
+MY_P="${MY_P/beta/beta-}"
+DESCRIPTION="A Panzer General clone written in SDL"
+HOMEPAGE="http://lgames.sourceforge.net/index.php?project=LGeneral"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
+ mirror://sourceforge/${PN}/pg-data.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="nls"
+
+RDEPEND="media-libs/libsdl[sound,video]
+ media-libs/sdl-mixer
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i \
+ -e '/desktop_DATA/d' \
+ -e '/icon_DATA/d' \
+ Makefile.am || die
+
+ cp /usr/share/gettext/config.rpath .
+ rm -f missing
+ mv configure.in configure.ac
+ eautoreconf
+
+ # Build a temporary lgc-pg that knows about ${WORKDIR}:
+ cp -pPR "${S}" "${WORKDIR}"/tmp-build || die
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}:" \
+ -e "s:@D@::" \
+ {lgc-pg,src}/misc.c || die
+
+ cd "${WORKDIR}"/tmp-build || die
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}:" \
+ -e "s:@D@:${D}:" \
+ {lgc-pg,src}/misc.c || die
+}
+
+src_configure() {
+ egamesconf \
+ $(use_enable nls)
+
+ # Build the temporary lgc-pg:
+ cd "${WORKDIR}"/tmp-build || die
+ egamesconf \
+ --disable-nls \
+ --datadir="${D}/${GAMES_DATADIR}"
+}
+
+src_compile() {
+ emake
+
+ # Build the temporary lgc-pg:
+ cd "${WORKDIR}"/tmp-build || die
+ emake
+}
+
+src_install() {
+ default
+ keepdir "${GAMES_DATADIR}"/${PN}/{ai_modules,music,terrain}
+
+ # Generate scenario data:
+ dodir "${GAMES_DATADIR}"/${PN}/gfx/{flags,units,terrain} #413901
+ SDL_VIDEODRIVER=dummy "${WORKDIR}"/tmp-build/lgc-pg/lgc-pg \
+ -s "${WORKDIR}"/pg-data \
+ -d "${D}/${GAMES_DATADIR}"/${PN} \
+ || die
+
+ newicon -s 48 lgeneral48.png ${PN}.png
+ make_desktop_entry ${PN} LGeneral
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/lgeneral/metadata.xml b/games-strategy/lgeneral/metadata.xml
new file mode 100644
index 00000000000..41346d96051
--- /dev/null
+++ b/games-strategy/lgeneral/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">lgeneral</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/lightyears/Manifest b/games-strategy/lightyears/Manifest
new file mode 100644
index 00000000000..9120981ef2c
--- /dev/null
+++ b/games-strategy/lightyears/Manifest
@@ -0,0 +1 @@
+DIST lightyears-1.4.tar.bz2 693877 SHA256 add4a8dea58af1e1ba69db3c0b1271312107c18e84b91a9dbb7162e92a1b078e SHA512 68f576d820d54b353adbc504f8aa3341547e2e56474717cc59aecc2368fc0eb533458e09876b3cd2a9062914a8a58d39a35ce944256372bb9e15830210924597 WHIRLPOOL d112a9b98ed5997fb2835d3b7b114ff735536a1b888d5d88911e57d55d7f35086a3e05f29e3ac1054e25b557cf52a4b07c0407989a646cc8f8be5fccc97c6788
diff --git a/games-strategy/lightyears/files/lightyears-1.4-gentoo.patch b/games-strategy/lightyears/files/lightyears-1.4-gentoo.patch
new file mode 100644
index 00000000000..063dbab3c1e
--- /dev/null
+++ b/games-strategy/lightyears/files/lightyears-1.4-gentoo.patch
@@ -0,0 +1,45 @@
+--- lightyears
++++ lightyears
+@@ -1,7 +1,6 @@
+ #!/usr/bin/python
+
+ # Set the location of the LightYears files here:
+-LIGHTYEARS_DIR = "."
+ # LIGHTYEARS_DIR = "/usr/share/games/lightyears" # (for Debian)
+
+ # Save games and configuration files are stored in the user's
+@@ -10,31 +9,6 @@
+ import sys, os
+
+ if __name__ == "__main__":
+- # Path to data/code dir can be overridden by environment variable
+- LIGHTYEARS_DIR = os.environ.get("LIGHTYEARS_DIR", LIGHTYEARS_DIR)
+-
+- # Path does not exist? Try current directory.
+- if ((LIGHTYEARS_DIR == None)
+- or (not os.path.isdir(LIGHTYEARS_DIR))
+- or (not os.path.isfile(os.path.join(LIGHTYEARS_DIR,
+- 'code', 'startup.py')))):
+- LIGHTYEARS_DIR = os.getcwd()
+-
+- # Paths obtained
+- sys.path.insert(0, os.path.join(LIGHTYEARS_DIR, 'code'))
+- data_dir = os.path.join(LIGHTYEARS_DIR, 'data')
+-
+- # Go
+- try:
+- import startup
+- assert os.path.isdir(data_dir)
+- except:
+- print "Unable to find LightYears code & data in:"
+- for p in sys.path:
+- print ' ', p
+-
+- sys.exit(1)
+-
+- startup.Main(data_dir)
+-
+-
++ sys.path.insert(0, "@GENTOO_LIBDIR@")
++ import startup
++ startup.Main("@GENTOO_DATADIR@/data")
diff --git a/games-strategy/lightyears/lightyears-1.4-r1.ebuild b/games-strategy/lightyears/lightyears-1.4-r1.ebuild
new file mode 100644
index 00000000000..d9bfe35bfdd
--- /dev/null
+++ b/games-strategy/lightyears/lightyears-1.4-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-single-r1 games
+
+DESCRIPTION="a single-player game with a science-fiction theme"
+HOMEPAGE="http://www.jwhitham.org/20kly/"
+SRC_URI="http://www.jwhitham.org/20kly/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-python/pygame[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}"
+RDEPEND=${DEPEND}
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}"-gentoo.patch
+ sed -i \
+ -e "s:@GENTOO_LIBDIR@:$(games_get_libdir)/${PN}:" \
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ ${PN} || die
+ python_fix_shebang .
+}
+
+src_install() {
+ dogamesbin ${PN}
+
+ insinto "$(games_get_libdir)/${PN}"
+ doins code/*.py
+
+ dodoc README.txt
+
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins -r audio data manual
+
+ python_optimize "${D}$(games_get_libdir)/${PN}"
+
+ newicon data/32.png ${PN}.png
+ make_desktop_entry ${PN} "Light Years Into Space"
+ prepgamesdirs
+}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ games_pkg_setup
+}
diff --git a/games-strategy/lightyears/metadata.xml b/games-strategy/lightyears/metadata.xml
new file mode 100644
index 00000000000..72ac0f76419
--- /dev/null
+++ b/games-strategy/lightyears/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<longdescription lang="en">
+"20,000 Light Years Into Space" was written for Pyweek (March 2006) by Jack
+Whitham. It is a single-player real-time strategy game with a science-fiction
+theme.
+</longdescription>
+</pkgmetadata>
diff --git a/games-strategy/liquidwar/Manifest b/games-strategy/liquidwar/Manifest
new file mode 100644
index 00000000000..c08e042c3a1
--- /dev/null
+++ b/games-strategy/liquidwar/Manifest
@@ -0,0 +1 @@
+DIST liquidwar-5.6.4.tar.gz 3268432 SHA256 32c52e4588e8e723f907ef43703b4ddf009e8ff1f29555c09bcc1f70bf5b93a3 SHA512 7145a8362c46a0f39662327edf81b341659a3ce8216f9fb3bb32e483de618c0f46169ed916fe2c4c651ebc5925ecdc534b372c381e16c3ddae9a50fb48f98ed7 WHIRLPOOL b4480b250c45adf3b93761d0a7f167cb24e6a03c404b364f2bedd8203e8711f00d3a25b5d3fc86e9b19edb056ebece4f2a51d2be488d4b002104f4f34e7bf9b6
diff --git a/games-strategy/liquidwar/files/liquidwar-5.6.4-exec-stack.patch b/games-strategy/liquidwar/files/liquidwar-5.6.4-exec-stack.patch
new file mode 100644
index 00000000000..83e733b28a0
--- /dev/null
+++ b/games-strategy/liquidwar/files/liquidwar-5.6.4-exec-stack.patch
@@ -0,0 +1,27 @@
+--- src/glouglou.s
++++ src/glouglou.s
+@@ -240,3 +240,6 @@
+
+ ret
+
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
+--- src/monster.s
++++ src/monster.s
+@@ -972,3 +972,6 @@
+ ret # retour au c
+
+
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
+--- src/spread.s
++++ src/spread.s
+@@ -957,3 +957,6 @@
+
+
+
++#ifdef __ELF__
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/games-strategy/liquidwar/files/liquidwar-5.6.4-ovflfix.patch b/games-strategy/liquidwar/files/liquidwar-5.6.4-ovflfix.patch
new file mode 100644
index 00000000000..446385624cf
--- /dev/null
+++ b/games-strategy/liquidwar/files/liquidwar-5.6.4-ovflfix.patch
@@ -0,0 +1,18 @@
+--- src/wwwsrv.c.old 2010-10-26 14:16:31.000000000 +0200
++++ src/wwwsrv.c 2010-10-26 14:17:35.000000000 +0200
+@@ -100,12 +100,12 @@
+
+ data->privacy = privacy;
+ data->log = log;
+- strncpy (data->metaserver, metaserver, URL_SIZE);
++ strncpy (data->metaserver, metaserver, sizeof(data->metaserver));
+ data->port = port;
+ data->busy_players = busy_players;
+ data->max_players = max_players;
+- strncpy (data->password, password, URL_SIZE);
+- strncpy (data->comment, comment, URL_SIZE);
++ strncpy (data->password, password, sizeof(data->password));
++ strncpy (data->comment, comment, sizeof(data->comment));
+ }
+
+ /*------------------------------------------------------------------*/
diff --git a/games-strategy/liquidwar/files/liquidwar-5.6.4-underlink.patch b/games-strategy/liquidwar/files/liquidwar-5.6.4-underlink.patch
new file mode 100644
index 00000000000..2bc53e0cacc
--- /dev/null
+++ b/games-strategy/liquidwar/files/liquidwar-5.6.4-underlink.patch
@@ -0,0 +1,11 @@
+--- src/Makefile.in.old 2011-06-22 07:45:05.756127862 +0200
++++ src/Makefile.in 2011-06-22 07:46:00.681613957 +0200
+@@ -223,7 +223,7 @@
+ EXTERN_LIBS = `allegro-config --static $(ALLEGRO_LIBRARY)` $(EFENCE_LIBRARY)
+ else
+ LINK_OPTIONS =
+- EXTERN_LIBS = `allegro-config --libs $(ALLEGRO_LIBRARY)` $(EFENCE_LIBRARY)
++ EXTERN_LIBS = `allegro-config --libs $(ALLEGRO_LIBRARY)` $(EFENCE_LIBRARY) -lm
+ endif
+
+ CONFIG_OPTIONS = \
diff --git a/games-strategy/liquidwar/liquidwar-5.6.4-r1.ebuild b/games-strategy/liquidwar/liquidwar-5.6.4-r1.ebuild
new file mode 100644
index 00000000000..f5a4bc3bb57
--- /dev/null
+++ b/games-strategy/liquidwar/liquidwar-5.6.4-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="unique multiplayer wargame"
+HOMEPAGE="http://www.ufoot.org/liquidwar/"
+SRC_URI="http://savannah.nongnu.org/download/liquidwar/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="nls"
+RESTRICT="test"
+
+RDEPEND=">=media-libs/allegro-4.2:0[X]"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-exec-stack.patch \
+ "${FILESDIR}"/${P}-ovflfix.patch
+ sed -i \
+ -e 's:/games::' \
+ -e '/^MANDIR/ s:=.*:= $(mandir)/man6:' \
+ -e '/^PIXDIR/ s:=.*:= /usr/share/pixmaps:' \
+ -e '/^DESKTOPDIR/ s:=.*:= /usr/share/applnk/Games/:' \
+ -e '/^INFODIR/ s/=.*/= $(infodir)/' \
+ -e '/^GAMEDIR/ s/exec_prefix/bindir/' \
+ -e '/install/s:-s ::' \
+ -e 's:$(DOCDIR)/txt:$(DOCDIR):g' \
+ -e 's:$(GMAKE):$(MAKE):' \
+ -e '/^DOCDIR/ s:=.*:= /usr/share/doc/$(PF):' Makefile.in \
+ || die 'sed Makefile.in failed'
+ sed -i \
+ -e '/^GAMEDIR/ s/$(exec_prefix)/@bindir@/' \
+ -e 's:/games::' src/Makefile.in \
+ || die "sed src/Makefile.in failed"
+ epatch "${FILESDIR}"/${P}-underlink.patch
+}
+
+src_configure() {
+ egamesconf \
+ --disable-doc-ps \
+ --disable-doc-pdf \
+ --disable-target-opt \
+ $(use_enable x86 asm)
+}
+
+src_compile() {
+ # skip build_doc target wrt bug 460344
+ emake build_bin build_data
+}
+
+src_install() {
+ emake DESTDIR="${D}" install_nolink
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING
+ use nls || rm -f "${D}"/usr/share/doc/${PF}/README.*
+ prepgamesdirs
+}
diff --git a/games-strategy/liquidwar/metadata.xml b/games-strategy/liquidwar/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/liquidwar/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/liquidwar6/Manifest b/games-strategy/liquidwar6/Manifest
new file mode 100644
index 00000000000..d0b5f1a76c8
--- /dev/null
+++ b/games-strategy/liquidwar6/Manifest
@@ -0,0 +1,2 @@
+DIST liquidwar6-0.4.3681.tar.gz 26531646 SHA256 942f5547199462fea521717b94517d6415d90573d948e94922f7b15271a4a8e0 SHA512 4154c8d3c2ceb128cf2d27a4682c89a30d3610f695b2e05f8d4e33c13fb54aaab3bb4a2b5c6dbcc43ff5d24991ea57a521716c94e15d8dd05dc384c22a37f52a WHIRLPOOL 4f502f572082c89469126eb97cfb181c28980783203f73b51a577c9a9e6cd28936f76c50892757320cb8dbee8b44319790a5ca7715d7cf096664043233fd5647
+DIST liquidwar6-extra-maps-0.4.3681.tar.gz 16191302 SHA256 32ffe94781aade93ca26919220b434a26dbde9260655bf6733f19d5df41abc65 SHA512 e767adc4402f803824145fd12f79eb2cbf9b34aea12065123a558dfb6704bd7ab1861b453e794f7a612d4fa75d0f6024ef410b2700eea08a279d6857b9dc2ba7 WHIRLPOOL d53b3e28b4a26aba780e35a825c1fa7f33ea00bf4884b44685a550cf6c04d0a2cf296dd29ecf5d7884ca91a8f560988dce7b4ae1c819a92bbaa5cc59900e154b
diff --git a/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-check-headers.patch b/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-check-headers.patch
new file mode 100644
index 00000000000..34dd76b48ea
--- /dev/null
+++ b/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-check-headers.patch
@@ -0,0 +1,70 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Wed Jun 4 16:01:18 UTC 2014
+Subject: fix header checks
+
+ our multilib wrapped headers are broken shit
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,7 +55,7 @@
+ AC_SUBST(LW6_VERSION_MINOR)
+
+ dnl Headers, some are optional
+-AC_CHECK_HEADERS(arpa/inet.h caca.h ctype.h CUnit/CUnit.h CUnit/Automated.h CUnit/CUCurses.h dirent.h errno.h execinfo.h expat.h fcntl.h gc/gc.h gmp.h GL/gl.h GL/glu.h GLES2/gl2.h iconv.h ifaddrs.h jpeglib.h langinfo.h libintl.h libpng12/png.h libpng13/png.h libpng14/png.h libpng15/png.h libpng16/png.h lmcons.h limits.h locale.h ltdl.h mach/vm_statistics.h mach/mach_types.h mach/mach_init.h mach/mach_host.h math.h netdb.h netinet/in.h omp.h pthread.h readline/history.h readline/readline.h SDL/SDL.h SDL/SDL_image.h SDL/SDL_mixer.h SDL/SDL_ttf.h signal.h stdarg.h stdio.h stdlib.h string.h syslog.h sys/select.h sys/signal.h sys/socket.h sys/stat.h sys/sysinfo.h sys/time.h sys/types.h sys/utsname.h time.h unistd.h winbase.h windows.h winsock2.h)
++AC_CHECK_HEADERS(arpa/inet.h caca.h ctype.h CUnit/CUnit.h CUnit/Automated.h CUnit/CUCurses.h dirent.h errno.h execinfo.h expat.h fcntl.h gc/gc.h gmp.h GL/gl.h GL/glu.h GLES2/gl2.h iconv.h ifaddrs.h jpeglib.h langinfo.h libintl.h libpng12/png.h libpng13/png.h libpng14/png.h libpng15/png.h libpng16/png.h lmcons.h limits.h locale.h ltdl.h mach/vm_statistics.h mach/mach_types.h mach/mach_init.h mach/mach_host.h math.h netdb.h netinet/in.h omp.h pthread.h readline/history.h readline/readline.h signal.h stdarg.h stdio.h stdlib.h string.h syslog.h sys/select.h sys/signal.h sys/socket.h sys/stat.h sys/sysinfo.h sys/time.h sys/types.h sys/utsname.h time.h unistd.h winbase.h windows.h winsock2.h)
+
+ dnl GNULIB stuff, http://www.gnu.org/software/gnulib/
+ gl_00GNULIB
+@@ -477,40 +477,42 @@
+ fi
+ SDL_EXTRA="${SDL_EXTRA_CFLAGS} ${SDL_EXTRA_LIBS}"
+
++CFLAGS="$CFLAGS $SDL_EXTRA_CFLAGS"
++
+ AC_CHECK_HEADER(SDL/SDL.h, HAVE_SDL_H=1, AC_MSG_WARN([
+ *** Liquid War 6 needs SDL (http://www.libsdl.org/)
+-]),[${SDL_EXTRA}])
++]),[])
+ AC_CHECK_LIB(SDL, SDL_Init, HAVE_LIBSDL=1, AC_MSG_WARN([
+ *** Liquid War 6 needs SDL (http://www.libsdl.org/)
+-]),[${SDL_EXTRA}])
++]),[])
+
+ AC_CHECK_HEADER(GL/gl.h, HAVE_GL_GL_H=1,AC_MSG_WARN([
+ *** Liquid War 6 needs Mesa (http://www.mesa3d.org/)
+-]),[${SDL_EXTRA}])
++]),[])
+ AC_CHECK_LIB(GL, glBegin, HAVE_LIBGL=1, AC_MSG_WARN([
+ *** Liquid War 6 needs Mesa (http://www.mesa3d.org/)
+-]),[${SDL_EXTRA}])
++]),[])
+
+ AC_CHECK_HEADER(GL/glu.h, HAVE_GL_GLU_H=1,AC_MSG_WARN([
+ *** Liquid War 6 needs GLU (http://www.mesa3d.org/)
+-]),[${SDL_EXTRA}])
++]),[])
+ AC_CHECK_LIB(GLU, gluBeginCurve, HAVE_LIBGLU=1, AC_MSG_WARN([
+ *** Liquid War 6 needs GLU (http://www.mesa3d.org/)
+-]),[${SDL_EXTRA}])
++]),[])
+
+ AC_CHECK_HEADER(SDL/SDL_image.h, HAVE_SDL_IMAGE_H=1, AC_MSG_WARN([
+ *** Liquid War 6 needs SDL_image (http://www.libsdl.org/projects/SDL_image/)
+-]),[${SDL_EXTRA}])
++]),[])
+ AC_CHECK_LIB(SDL_image, IMG_Load, HAVE_LIBSDL_IMAGE=1, AC_MSG_WARN([
+ *** Liquid War 6 needs SDL_image (http://www.libsdl.org/projects/SDL_image/)
+-]),[${SDL_EXTRA}])
++]),[])
+
+ AC_CHECK_HEADER(SDL/SDL_ttf.h, HAVE_SDL_TTF_H=1, AC_MSG_WARN([
+ *** Liquid War 6 needs SDL_ttf (http://www.libsdl.org/projects/SDL_ttf/)
+-]),[${SDL_EXTRA}])
++]),[])
+ AC_CHECK_LIB(SDL_ttf, TTF_Init, HAVE_LIBSDL_TTF=1, AC_MSG_WARN([
+ *** Liquid War 6 needs SDL_ttf (http://www.libsdl.org/projects/SDL_ttf/)
+-]),[${SDL_EXTRA}])
++]),[])
+
+ AC_ARG_ENABLE([mod-gl1], AS_HELP_STRING([--enable-mod-gl1],[compile mod-gl1 default=yes]), [enable_mod_gl1=$enableval], [enable_mod_gl1=yes])
+
diff --git a/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-ldconfig.patch b/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-ldconfig.patch
new file mode 100644
index 00000000000..dd5e702b614
--- /dev/null
+++ b/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-ldconfig.patch
@@ -0,0 +1,16 @@
+commit 1bd3596545912f2e47b8848df3fb5d99195d299a
+Author: hasufell <hasufell@gentoo.org>
+Date: Wed Jan 8 17:21:09 2014 +0100
+
+ don't run ldconfig
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -65,7 +65,6 @@ EXTRA_DIST = scriptpo.c indent.sh scriptpo-update.sh stamp.sh clean.sh dtou.sh u
+ SUBDIRS = lib
+
+ install-exec-local:
+- if which id && which ldconfig && test `id -u` -eq 0 && test "$(prefix)" != "/usr"; then ldconfig; fi # Run ldconfig automatically if we're root
+ if test -x $(DESTDIR)$(bindir)/liquidwar6; then mv $(DESTDIR)$(bindir)/liquidwar6 $(DESTDIR)$(bindir)/@PACKAGE_TARNAME@-@LW6_VERSION_BASE@; ln -s @PACKAGE_TARNAME@-@LW6_VERSION_BASE@ $(DESTDIR)$(bindir)/liquidwar6; fi
+
+ uninstall-local:
diff --git a/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-paths.patch b/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-paths.patch
new file mode 100644
index 00000000000..3ac69032471
--- /dev/null
+++ b/games-strategy/liquidwar6/files/liquidwar6-0.4.3681-paths.patch
@@ -0,0 +1,27 @@
+commit b121fe3d9fb7e5fc52f592482e02b6a28430435f
+Author: hasufell <hasufell@gentoo.org>
+Date: Wed Jan 8 17:23:56 2014 +0100
+
+ respect datarootdir
+
+--- a/data/icon/Makefile.am
++++ b/data/icon/Makefile.am
+@@ -19,6 +19,6 @@
+ # Contact author : ufoot@ufoot.org
+
+ pkgdata_DATA = liquidwar6.png liquidwar6.xpm
+-pkgdatadir = $(datadir)/pixmaps
++pkgdatadir = $(datarootdir)/pixmaps
+ EXTRA_DIST = $(pkgdata_DATA) liquidwar6.ico liquidwar6.icns
+
+--- a/pkg/Makefile.am
++++ b/pkg/Makefile.am
+@@ -19,7 +19,7 @@
+ # Contact author : ufoot@ufoot.org
+
+ pkgdata_DATA = liquidwar6.desktop
+-pkgdatadir = $(datadir)/applications
++pkgdatadir = $(datarootdir)/applications
+ EXTRA_DIST = $(pkgdata_DATA) liquidwar6.spec liquidwar6d 406FFCAB.gnupg.txt FD409E94.gnupg.txt
+
+ distclean-local:
diff --git a/games-strategy/liquidwar6/liquidwar6-0.4.3681.ebuild b/games-strategy/liquidwar6/liquidwar6-0.4.3681.ebuild
new file mode 100644
index 00000000000..e4b2296115e
--- /dev/null
+++ b/games-strategy/liquidwar6/liquidwar6-0.4.3681.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils toolchain-funcs games
+
+MY_PV=${PV/_beta/beta}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Unique multiplayer wargame between liquids"
+HOMEPAGE="http://www.gnu.org/software/liquidwar6/"
+SRC_URI="http://www.ufoot.org/download/liquidwar/v6/${MY_PV}/${MY_P}.tar.gz
+ maps? ( http://www.ufoot.org/download/liquidwar/v6/${MY_PV}/${PN}-extra-maps-${MY_PV}.tar.gz )"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc gles2 gtk libcaca +maps nls +ogg openmp readline test"
+
+# yes, cunit is rdep
+# Drop the libtool dep once libltdl goes stable.
+RDEPEND="dev-db/sqlite:3
+ dev-libs/expat
+ dev-scheme/guile
+ dev-util/cunit
+ media-libs/freetype:2
+ media-libs/libpng:0
+ media-libs/libsdl[X,opengl,video]
+ media-libs/sdl-image[jpeg,png]
+ media-libs/sdl-ttf
+ net-misc/curl
+ || ( dev-libs/libltdl:0 <sys-devel/libtool-2.4.3-r2:2 )
+ sys-libs/zlib
+ virtual/glu
+ virtual/jpeg
+ virtual/opengl
+ libcaca? ( media-libs/libcaca )
+ gles2? ( media-libs/mesa[gles2] )
+ gtk? ( x11-libs/gtk+:2 )
+ nls? ( virtual/libintl
+ virtual/libiconv )
+ ogg? (
+ media-libs/libsdl[X,sound,opengl,video]
+ media-libs/sdl-mixer[vorbis]
+ )
+ readline? ( sys-libs/ncurses
+ sys-libs/readline )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${MY_P}
+S_MAPS=${WORKDIR}/${PN}-extra-maps-${MY_PV}
+
+pkg_setup() {
+ if use openmp; then
+ if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp ; then
+ ewarn "OpenMP is not available in your current selected gcc"
+ die "need openmp capable gcc"
+ fi
+ fi
+ games_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-{ldconfig,paths}.patch \
+ "${FILESDIR}"/${P}-check-headers.patch
+
+ sed -i \
+ -e 's/-Werror//' \
+ configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ # configure fails with cunit disabled
+ egamesconf \
+ $(use_enable nls) \
+ --enable-cunit \
+ $(use_enable gtk) \
+ --enable-mod-gl1 \
+ $(use_enable gles2 mod-gles2) \
+ $(use_enable libcaca mod-caca) \
+ $(use_enable openmp) \
+ $(use_enable ogg mod-ogg) \
+ $(use_enable !ogg silent) \
+ $(use_enable readline console) \
+ --disable-static \
+ --datarootdir=/usr/share \
+ --mandir=/usr/share/man \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html
+
+ if use maps; then
+ cd "${S_MAPS}" || die
+ egamesconf
+ fi
+}
+
+src_compile() {
+ default
+ use doc && emake html
+ use maps && emake -C "${S_MAPS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ use maps && emake -C "${S_MAPS}" DESTDIR="${D}" install
+ prune_libtool_files --all
+ prepgamesdirs
+}
diff --git a/games-strategy/liquidwar6/metadata.xml b/games-strategy/liquidwar6/metadata.xml
new file mode 100644
index 00000000000..d31517122d3
--- /dev/null
+++ b/games-strategy/liquidwar6/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name='doc'>Convert the info pages to html</flag>
+ <flag name='gles2'>Enable OpenGL ES 2.0 support</flag>
+ <flag name='gtk'>Used to display error/critical messages</flag>
+ <flag name='maps'>Install extra maps</flag>
+ <flag name='ogg'>Enable mod-ogg via <pkg>media-libs/sdl-mixer</pkg>
+ (currently the only sound provider)</flag>
+ <flag name='readline'>Enable interactive script shell for
+ hacking</flag>
+ </use>
+ <longdescription lang="en">
+ FEATURES:
+ * Fast-paced tactical action. Control the movement of all your forces
+ at the same time
+ * Simple yet original game mechanics, discovered by Thomas Colcombet
+ * 10 different teams, each with their own charactaristics and special
+ attacks
+ * 13 levels, each one twisting the gameplay in a new direction
+ * 100+ more levels if you download the bonus pack
+ * Levels can be created using simple image files
+ * Lots of level design options: walls, edge wraparound, bridges,
+ different speed, special areas such as glue or danger and varied
+ army size and fighter behavior
+ * Internationalization support, interface translated in French,
+ Norwegian and Russian
+ * Free Software, part of the GNU project (licence: GNU GPL v3+)
+ </longdescription>
+</pkgmetadata>
diff --git a/games-strategy/majesty-demo/Manifest b/games-strategy/majesty-demo/Manifest
new file mode 100644
index 00000000000..637137ca3c9
--- /dev/null
+++ b/games-strategy/majesty-demo/Manifest
@@ -0,0 +1 @@
+DIST majesty_demo.run 36582366 SHA256 453b2bfa0a2473810945c717563cc459fc2b2cdd713155272872b1d8ef695de9 SHA512 0573b29fa2635aeb0aa6ebaaa55c924322b3805e120f49fde51409cc6f101d7ae41d72ed0d086ffeac4d591ba75ee8bc190c46a3b71adb6b36d867df16be2c79 WHIRLPOOL 952027eb333098c156dd5e314a7694d40e6f9e57d0d3e97ad6edc9e2d2bdca31518e9354e074e3e27cebd607ce1b134df567926fde68679a6af083784e1896fb
diff --git a/games-strategy/majesty-demo/majesty-demo-1.0.0.ebuild b/games-strategy/majesty-demo/majesty-demo-1.0.0.ebuild
new file mode 100644
index 00000000000..a68e4579768
--- /dev/null
+++ b/games-strategy/majesty-demo/majesty-demo-1.0.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+DESCRIPTION="Control your own kingdom in this simulation"
+HOMEPAGE="http://www.linuxgamepublishing.com/info.php?id=8&"
+SRC_URI="http://ftp2.za.freebsd.org/pub/FreeBSD/ports/distfiles/majesty_demo.run"
+
+LICENSE="MAJESTY-DEMO"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RESTRICT="bindist strip"
+
+RDEPEND="sys-libs/glibc
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ x11-libs/libXau[abi_x86_32(-)]
+ x11-libs/libXdmcp[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+QA_PREBUILT="${dir:1}/maj_demo"
+
+src_install() {
+ dodoc README*
+ insinto "${dir}"
+ exeinto "${dir}"
+ doins -r data quests
+ doins majesty.{bmp,xpm} majestysite.url
+ newicon majesty.xpm majesty-demo.xpm
+ # only installing the static version for now
+ if use x86 || use amd64; then
+ doexe bin/Linux/x86/maj_demo
+ fi
+ games_make_wrapper maj_demo ./maj_demo "${dir}" "${dir}"
+ prepgamesdirs
+ make_desktop_entry maj_demo "Majesty (Demo)"
+}
diff --git a/games-strategy/majesty-demo/metadata.xml b/games-strategy/majesty-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/majesty-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/maxr/Manifest b/games-strategy/maxr/Manifest
new file mode 100644
index 00000000000..789bf28451c
--- /dev/null
+++ b/games-strategy/maxr/Manifest
@@ -0,0 +1 @@
+DIST maxr-0.2.8.tar.gz 14738324 SHA256 d083fdc73d7ca12fa7bd21cee0ecada3612be62f4fed5c87f73e5cb654867e98 SHA512 22fec9ca773ea68f2639f3cb034ed271a926f99b9b17547bbbdf12a3b47ee445ab311b0766b0656c71b88a258165590431e189e695ef1a86e0fb3b799d1eaa80 WHIRLPOOL abe0b7ca61b625d3518437b605fccb8d3716a9d04dc75d3d98940c709f927447b7138be2ec0ebec36177bee72df9ae27b6f45db7827a37957ff9a2a19016ada1
diff --git a/games-strategy/maxr/maxr-0.2.8.ebuild b/games-strategy/maxr/maxr-0.2.8.ebuild
new file mode 100644
index 00000000000..d27da2c7c7c
--- /dev/null
+++ b/games-strategy/maxr/maxr-0.2.8.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Mechanized Assault and Exploration Reloaded"
+HOMEPAGE="http://www.maxr.org/"
+SRC_URI="http://www.maxr.org/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2 FDL-1.2+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[video]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-net"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ dogamesbin src/${PN}
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r data/*
+ dodoc ABOUT CHANGELOG
+ doicon data/maxr.png
+ make_desktop_entry maxr "Mechanized Assault and Exploration Reloaded"
+ prepgamesdirs
+}
diff --git a/games-strategy/maxr/metadata.xml b/games-strategy/maxr/metadata.xml
new file mode 100644
index 00000000000..f72870c0c28
--- /dev/null
+++ b/games-strategy/maxr/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/megaglest-data/Manifest b/games-strategy/megaglest-data/Manifest
new file mode 100644
index 00000000000..0b9b5dc6559
--- /dev/null
+++ b/games-strategy/megaglest-data/Manifest
@@ -0,0 +1,2 @@
+DIST megaglest-data-3.11.1.tar.xz 283383936 SHA256 5f1f6ad9f89a929122a26e1c1cabc887b75c09f4a84720d9ce5aa6aa0fc9cbe8 SHA512 a0ca22c2ba44992ce244c19f1bf3b19983a76520566286728ff4de4c14ef568aec3b166a2dde615b221d4cded8f2714b873a56fd58c1beebdc7120508ba0e357 WHIRLPOOL bec2417a1884d5f6ded736981714eaf3a79ebf015163958b55396373bbb0e6ae6548bf9e30b4615aa9fbca1b9a779e1f8afd6086a48204561ddb361d98588771
+DIST megaglest-data-3.9.1.tar.xz 269431988 SHA256 2ec0d6442ea2fc3bda5b412e41d97252b3f065dc09d7cda96cebbeff8eceb4d3 SHA512 e174bde6e86c7e73d81d1ab3cfb147850ee1afa33f3b65f27aa4fbff2d3fcb031b41f6d46e822a14b8065b347c6eaa0ba6d5101d461ea5dd639f4c28e2d94112 WHIRLPOOL c4aebeeb6ef36e47b9e9937de5187d4e9cae1182412456fed79aa892636c6b03a9672b76057135ffe15644215a49b3f84013ce3b1760e86b979f45f17dc0dbef
diff --git a/games-strategy/megaglest-data/files/megaglest-data-3.7.1-dutch.patch b/games-strategy/megaglest-data/files/megaglest-data-3.7.1-dutch.patch
new file mode 100644
index 00000000000..86ae5565a0c
--- /dev/null
+++ b/games-strategy/megaglest-data/files/megaglest-data-3.7.1-dutch.patch
@@ -0,0 +1,166 @@
+http://sourceforge.net/tracker/?func=detail&aid=3590533&group_id=300350&atid=1266776
+http://glest.org/glest_board/index.php?topic=8725.0
+--- data/lang/dutch.lng
++++ data/lang/dutch.lng
+@@ -15,7 +15,7 @@
+ AffectedUnitsFromAll=Betroffen Eenheden van Allen
+ AffectedUnitsFromFoe=Betroffen Eenheden van Vijand
+ AffectedUnitsFromTeam=Betroffen Eenheden van Team
+-AffectedUnitsFromYourFaction=Getroffen eenheden in je Stam
++AffectedUnitsFromYourFaction=Getroffen eenheden in je Groepering
+ AI=KI
+ AISwitchTeamAcceptPercent=KI procent
+ AlreadyUpgraded=Al opgewaardeerd
+@@ -32,7 +32,7 @@
+ AttackSpeed=Aanvalssnelheid
+ AttackStopped=Aanval afgebroken
+ AttackStrenght=Schade
+-Audio=Audio
++Audio=Geluid
+ AutoConfig=Auto-configuratie
+ AutoRefreshRate=Automatische ververssnelheid
+ AvailableServers=Beschikbare servers
+@@ -77,7 +77,7 @@
+ Cpu=CPU
+ CpuEasy=CPU (Gemakkelijk)
+ CpuMega=CPU (Moeilijk)
+-CpuUltra=CPU (Bizar moeilijk)
++CpuUltra=CPU (Extreem)
+ CreateNewTeam=Creëer Nieuw Team
+ CustomGame=Aangepast spel
+ DataNotSynchedTitle=De volgende data komt niet overeen:
+@@ -99,7 +99,7 @@
+ DataMissingTechtreeSuccessDownload=Speler %s heeft de techtree %s SUCCESSVOL gedownload.
+ DataMissingTechtreeFailDownload=Speler %s's download van techtree [%s] is GEFAALD. (cURL-versie: [%s])
+ Deaths=Doden
+-Defaults=Standaardinstellingen
++Defaults=Standaard
+ Defeat=Verslagen
+ Deleting=Verwijderen
+ Difficulty=Moeilijkheidsgraad
+@@ -142,7 +142,7 @@
+ ExitGame?=Spel verlaten?
+ ExitGameServer?=Spel verlaten?\n(dit zal het spel voor\nandere spelers stopzetten.)
+ Explored=Verkend
+-Faction=Stam
++Faction=Groepering
+ FallbackCpuMultiplier=KI veranderde vermenigvuldiger
+ Fast=snel
+ FieldAir=Lucht
+@@ -190,7 +190,7 @@
+ InvalidOrder=Commando is ongeldig
+ InvalidPosition=Positie is ongeldig
+ IRCPeopleOnline=IRC-gebruikers online:
+-Keyboardsetup=Toetsenbordinstellingen
++Keyboardsetup=Toetsenbord Instellen
+ KeyboardsetupTest=Toetsenbord-test
+ Kills=Slachtoffers gemaakt
+ JoinGame=LAN-spel
+@@ -219,21 +219,21 @@
+ LoadGameDeletingFile=Poging tot verwijderen bestand: '%s'
+ LoadGameLoadingFile=Poging tot laden bestand: '%s'
+ SavedGameBadVersion=Opgeslagen spel versie komt niet overeen met de applicatie versie: [%s] --> [%s]
+-LoadSavedGameInfo=Kaart: %s\nTileset: %s\nTech: %s\nScenario: %s\n# Spelers: %d\nStam: %s
++LoadSavedGameInfo=Kaart: %s\nTileset: %s\nTech: %s\nScenario: %s\n# Spelers: %d\nGroepering: %s
+ LoadedSpeed=Laadsnelheid
+ Loading=Laden...
+ LocalTime=Lokaal:
+ LogScreenCoreDataLoading=Elementaire gegevens
+ LogScreenGameLoading=Spel
+-LogScreenGameLoadingCreatingAIFaction=Creëer KI voor Stam %d
++LogScreenGameLoadingCreatingAIFaction=Creëer KI voor Groepering %d
+ LogScreenGameLoadingCreatingRainParticles=Maak regen deeltjes systeem
+ LogScreenGameLoadingCreatingSnowParticles=Maak sneeuw deeltjes systeem
+ LogScreenGameLoadingInitRenderer=Initialiseer weergave
+ LogScreenGameLoadingWaitForNetworkPlayers=Wacht op netwerk spelers
+-LogScreenGameLoadingStartingMusic=Starten van stam muziek
++LogScreenGameLoadingStartingMusic=Starten van Groepering muziek
+ LogScreenGameLoadingStartingAmbient=Starten van weer omgevingsmuziek
+ LogScreenGameLoadingLaunchGame=Spel aan het starten
+-LogScreenGameLoadingFactionType=Stam type: %s
++LogScreenGameLoadingFactionType=Groepering type: %s
+ LogScreenGameLoadingUnitType=Eenheid type: %s
+ LogScreenGameLoadingUnitTypeSkills=Eenheid type: %s - bekwaamheden: %d
+ LogScreenGameLoadingResourceType=Hulpbron type: %s
+@@ -249,7 +249,7 @@
+ LogScreenGameUnLoadingTileset=Tileset
+ LogScreenGameUnLoadingWorld=Wereld uit geheugen verwijderen
+ LogScreenGameLoadingStateCells=Status cells
+-LogScreenGameLoadingFactionTypes=Stammen types
++LogScreenGameLoadingFactionTypes=Groepering types
+ LogScreenGameLoadingMinimapSurface=Bereken mini kaart oppervlak
+ LogScreenGameLoadingGenerateGameElements=Activeer elementen
+ Map=Kaart
+@@ -283,7 +283,7 @@
+ MGVersion=Versie
+ Misc=Overig
+
+-MismatchedFactions=De volgende stamen komen niet overeen:
++MismatchedFactions=De volgende Groeperingen komen niet overeen:
+ MismatchedFactionsMissing=(missend)
+ MismatchedFactionsExtra=(extra)
+
+@@ -342,8 +342,8 @@
+ Network=Netwerk
+ NetworkCpuEasy=Netwerk-CPU gemakkelijk
+ NetworkCpu=Netwerk-CPU
+-NetworkCpuUltra=Netwerk-CPU moeilijk
+-NetworkCpuMega=Netwerk-CPU bizar moeilijk
++NetworkCpuUltra=Netwerk-CPU Moeilijk
++NetworkCpuMega=Netwerk-CPU Extreem
+ NetworkFramePeriod=Network Send FrameCount
+ NetworkGameClientLoadStatus=Wachten op network... al %lld seconden aan het wachten (maximum wachttijd: %d seconden)
+ NetworkGameServerLoadStatus=Wachten op network... al %lld seconden aan het wachten (maximum wachttijd: %d seconden)
+@@ -360,7 +360,7 @@
+ NotConnected=Niet verbonden
+ Notice=Mededeling
+ None=Geen
+-NonStandardPort=Non-standaard poort
++NonStandardPort=Non Standaard poort
+ Normal=normaal
+ Off=Uit
+ Ok=Ok
+@@ -395,7 +395,7 @@
+ PleaseWaitCalculatingCRC=Geduld a.u.b. CRC's worden berekend!
+ PleaseWait=Geduld a.u.b...
+ Port=Poort
+-PressEnterToChat=Druk op enter om te chattenka
++PressEnterToChat=Druk op enter om te chatten
+ PrivacyPlease=Privacymodus (land verbergen etc.)
+ Produce=Produceren
+ Producing=Produceren...
+@@ -457,7 +457,7 @@
+ Team=Team
+ TechTree=Techtree
+ TechTitle1=Techtree
+-TechTitle2=Stammen
++TechTitle2=Groeperingen
+ Textures3D=3D textures:
+ Tileset=Tileset
+ TilesetTitle1=Tilesets
+@@ -504,11 +504,11 @@
+ YouWin=Je hebt gewonnen!
+
+ ;-------------------------------- Intro Text Start
+-IntroText1=Gebaseerd op de bekroonde klassieker Glest
++IntroText1=Gebaseert op de bekroonde klassieker Glest
+ IntroStartMilliseconds1=$USE_DEFAULT_LANGUAGE_VALUE
+-IntroText2=het MegaGlest Team presenteerd
++IntroText2=het MegaGlest Team presenteert
+ IntroStartMilliseconds2=$USE_DEFAULT_LANGUAGE_VALUE
+-IntroText3=een "libre software" real-time strategisch spel
++IntroText3=een libre software real-time strategisch spel
+ IntroStartMilliseconds3=$USE_DEFAULT_LANGUAGE_VALUE
+ IntroTexture4=$APPLICATIONDATAPATH/data/core/menu/textures/logo.tga
+ IntroTextureWidth4=$USE_DEFAULT_LANGUAGE_VALUE
+@@ -531,8 +531,8 @@
+ NativeLanguageName=Nederlands, Vlaams
+ MEGAGLEST_FONT=$APPLICATIONDATAPATH/data/core/fonts/LinBiolinum_RB.ttf
+ MEGAGLEST_FONT_FAMILY=Linux Biolinum O:style=Bold
+-FONT_SCALE_SIZE=0,8
+-FONT_SCALE_CENTERH_FACTOR=4,0
++FONT_SCALE_SIZE=0.8
++FONT_SCALE_CENTERH_FACTOR=4.0
+ FONT_BASE_SIZE=3
+ FONT_CHARCOUNT=256
+ FONT_CHARSET=1
diff --git a/games-strategy/megaglest-data/megaglest-data-3.11.1.ebuild b/games-strategy/megaglest-data/megaglest-data-3.11.1.ebuild
new file mode 100644
index 00000000000..12c7bc12d96
--- /dev/null
+++ b/games-strategy/megaglest-data/megaglest-data-3.11.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils games
+
+MY_PN="megaglest"
+DESCRIPTION="Data files for the cross-platform 3D realtime strategy game MegaGlest"
+HOMEPAGE="http://www.megaglest.org/"
+SRC_URI="https://github.com/MegaGlest/megaglest-data/releases/download/${PV}/megaglest-data-${PV}.tar.xz"
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+DOCS=( docs/AUTHORS.data.txt docs/CHANGELOG.txt docs/README.txt )
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_configure() {
+ local mycmakeargs=(
+ -DMEGAGLEST_BIN_INSTALL_PATH="${GAMES_BINDIR}"
+ -DMEGAGLEST_DATA_INSTALL_PATH="${GAMES_DATADIR}/${MY_PN}"
+ -DMEGAGLEST_ICON_INSTALL_PATH="/usr/share/pixmaps"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ use doc && HTML_DOCS="docs/glest_factions/"
+ cmake-utils_src_install
+ prepgamesdirs
+}
diff --git a/games-strategy/megaglest-data/megaglest-data-3.9.1.ebuild b/games-strategy/megaglest-data/megaglest-data-3.9.1.ebuild
new file mode 100644
index 00000000000..11e5504692b
--- /dev/null
+++ b/games-strategy/megaglest-data/megaglest-data-3.9.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils games
+
+MY_PN="megaglest"
+DESCRIPTION="Data files for the cross-platform 3D realtime strategy game MegaGlest"
+HOMEPAGE="http://www.megaglest.org/"
+SRC_URI="https://github.com/MegaGlest/megaglest-data/releases/download/${PV}/megaglest-data-${PV}.tar.xz"
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+RDEPEND="~games-strategy/megaglest-${PV}"
+
+DOCS=( docs/AUTHORS.data.txt docs/CHANGELOG.txt docs/README.txt )
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_configure() {
+ local mycmakeargs=(
+ -DMEGAGLEST_BIN_INSTALL_PATH="${GAMES_BINDIR}"
+ -DMEGAGLEST_DATA_INSTALL_PATH="${GAMES_DATADIR}/${MY_PN}"
+ -DMEGAGLEST_ICON_INSTALL_PATH="/usr/share/pixmaps"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ use doc && HTML_DOCS="docs/glest_factions/"
+
+ cmake-utils_src_install
+
+ prepgamesdirs
+
+}
diff --git a/games-strategy/megaglest-data/metadata.xml b/games-strategy/megaglest-data/metadata.xml
new file mode 100644
index 00000000000..b357af11da9
--- /dev/null
+++ b/games-strategy/megaglest-data/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="github">MegaGlest/megaglest-data</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/megaglest/Manifest b/games-strategy/megaglest/Manifest
new file mode 100644
index 00000000000..b5cf59efaad
--- /dev/null
+++ b/games-strategy/megaglest/Manifest
@@ -0,0 +1,2 @@
+DIST megaglest-source-3.11.1.tar.xz 2863180 SHA256 94e28a9628f3593ce337ce663f258a125176b11128f16afb8c947f2763930841 SHA512 9e1d8eccff1889199ff0e4b0f1cc3d0193306cd9271a2c98f12a49d61a09789d0813d5f3dadfe7701d2446976992834c63287f0227d660dc9cc9d2ecef65e225 WHIRLPOOL 7a6b0908da7c6164f3baa71ea10c1f09fca86581b9da4930c3a0aa70e2c25d582349772d45ec8edee91ded2cbe1e68ee66e8756d1d23205c5d751eae135758b0
+DIST megaglest-source-3.9.1.tar.xz 2957360 SHA256 e62314b8108ba3c80706aa896f4fed5992a8ea8d82a410e09fbb242c4bf54edc SHA512 2a3d402aa68a1b1ee326bf49b6b6dee5ed561623b541ab47c1545596fa9c77f805245b66bd8457ecd82625a3f1d4868269a4a3888a54245c73d9cb6babbace70 WHIRLPOOL 59ad629c66633b2f320c7c80eef627f4326cbacb0cc48169c33b6783bfc26d1a8baef1773f0d05a1bc589ec5ae6bbedbb1f394c34616b166faa6e7f9630a22e5
diff --git a/games-strategy/megaglest/files/megaglest-3.11.1-cmake.patch b/games-strategy/megaglest/files/megaglest-3.11.1-cmake.patch
new file mode 100644
index 00000000000..527671246e9
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.11.1-cmake.patch
@@ -0,0 +1,28 @@
+From e463986ba1f40210b40eff34c4aac727c7f2e571 Mon Sep 17 00:00:00 2001
+From: Michael Palimaka <kensington@gentoo.org>
+Date: Wed, 13 May 2015 04:22:45 +1000
+Subject: [PATCH] Fix build with >=cmake-3.2.
+
+The FindOpenGL module no longer pulls in X11 libraries.
+---
+ source/shared_lib/CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/source/shared_lib/CMakeLists.txt b/source/shared_lib/CMakeLists.txt
+index 3da563e..e5a06fc 100644
+--- a/source/shared_lib/CMakeLists.txt
++++ b/source/shared_lib/CMakeLists.txt
+@@ -95,6 +95,10 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
+ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
+ ENDIF()
+
++ IF(UNIX)
++ FIND_PACKAGE(X11 REQUIRED)
++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${X11_LIBRARIES})
++ ENDIF()
+
+ IF(WANT_XERCES)
+ FIND_PACKAGE(XercesC REQUIRED)
+--
+2.3.6
+
diff --git a/games-strategy/megaglest/files/megaglest-3.11.1-static-build.patch b/games-strategy/megaglest/files/megaglest-3.11.1-static-build.patch
new file mode 100644
index 00000000000..2586a561956
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.11.1-static-build.patch
@@ -0,0 +1,63 @@
+commit 754a6eb9f81a4a40a2a0102ffe1bfdbba734b36a
+Author: hasufell <hasufell@gentoo.org>
+Date: Mon Nov 18 21:54:54 2013 +0100
+
+ fix static build
+
+diff --git a/mk/cmake/Modules/FindOGG.cmake b/mk/cmake/Modules/FindOGG.cmake
+index 2a026cc..8ca8a23 100644
+--- a/mk/cmake/Modules/FindOGG.cmake
++++ b/mk/cmake/Modules/FindOGG.cmake
+@@ -19,11 +19,11 @@
+
+ FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h)
+
+-#IF (OGG_STATIC AND NOT OGG_LIBRARY)
+-# FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a ogg)
+-#ELSE()
+- FIND_LIBRARY(OGG_LIBRARY NAMES ogg)
+-#ENDIF()
++IF (OGG_STATIC AND NOT OGG_LIBRARY)
++ FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a)
++ELSE()
++ FIND_LIBRARY(OGG_LIBRARY NAMES libogg.so)
++ENDIF()
+
+ #IF (OGG_STATIC AND NOT VORBIS_LIBRARY)
+ # FIND_LIBRARY(VORBIS_LIBRARY NAMES libvorbis.a vorbis)
+--- a/mk/cmake/Modules/FindXercesC.cmake
++++ b/mk/cmake/Modules/FindXercesC.cmake
+@@ -83,6 +83,9 @@
+ /usr/lib
+ /usr/local/lib
+ )
++
++ FIND_LIBRARY(ICUUC_LIBRARY NAMES libicuuc.a)
++ FIND_LIBRARY(ICUDATA_LIBRARY NAMES libicudata.a)
+
+ IF (XERCESC_INCLUDE AND XERCESC_LIBRARY)
+ MESSAGE(STATUS "Found static Xerces-C lib [${XERCESC_LIBRARY}]")
+@@ -90,7 +93,7 @@
+
+ IF(UNIX AND NOT APPLE)
+ #SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY} -Bdynamic -licuuc -licudata")
+- SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY}")
++ SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY} ${ICUUC_LIBRARY} ${ICUDATA_LIBRARY}")
+ ENDIF()
+ ENDIF()
+ ENDIF()
+--- a/mk/cmake/Modules/FindFriBiDi.cmake
++++ b/mk/cmake/Modules/FindFriBiDi.cmake
+@@ -28,9 +28,9 @@
+ SET(FRIBIDI_NAMES ${FRIBIDI_NAMES} fribidi libfribidi)
+
+ OPTION(WANT_STATIC_LIBS "builds as many static libs as possible" OFF)
+-IF(WANT_STATIC_LIBS)
+- SET(FRIBIDI_NAMES fribidi.a libfribidi.a ${FRIBIDI_NAMES})
+-ENDIF()
++#IF(WANT_STATIC_LIBS)
++# SET(FRIBIDI_NAMES fribidi.a libfribidi.a ${FRIBIDI_NAMES})
++#ENDIF()
+
+ MESSAGE(STATUS "** Searching for library names: [${FRIBIDI_NAMES}] ...")
+
diff --git a/games-strategy/megaglest/files/megaglest-3.9.1-cmake.patch b/games-strategy/megaglest/files/megaglest-3.9.1-cmake.patch
new file mode 100644
index 00000000000..c7801466f5c
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.9.1-cmake.patch
@@ -0,0 +1,46 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Mon Jan 27 00:46:56 UTC 2014
+Subject: fix installation
+
+--- megaglest-source-3.9.1.tar.xz/source/glest_game/CMakeLists.txt
++++ megaglest-source-3.9.1.tar.xz/source/glest_game/CMakeLists.txt
+@@ -310,9 +310,9 @@
+ "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.png"
+ "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.xpm"
+ "${PROJECT_SOURCE_DIR}/mk/linux/megaglest.bmp"
+- "${PROJECT_SOURCE_DIR}/data/glest_game/editor.ico"
++ "${PROJECT_SOURCE_DIR}/editor.ico"
+ "${PROJECT_SOURCE_DIR}/mk/linux/glest.ico"
+- "${PROJECT_SOURCE_DIR}/data/glest_game/g3dviewer.ico"
++ "${PROJECT_SOURCE_DIR}/g3dviewer.ico"
+ DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH})
+ ELSE()
+
+From e463986ba1f40210b40eff34c4aac727c7f2e571 Mon Sep 17 00:00:00 2001
+From: Michael Palimaka <kensington@gentoo.org>
+Date: Wed, 13 May 2015 04:22:45 +1000
+Subject: [PATCH] Fix build with >=cmake-3.2.
+
+The FindOpenGL module no longer pulls in X11 libraries.
+---
+ source/shared_lib/CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/source/shared_lib/CMakeLists.txt b/source/shared_lib/CMakeLists.txt
+index 3da563e..e5a06fc 100644
+--- a/source/shared_lib/CMakeLists.txt
++++ b/source/shared_lib/CMakeLists.txt
+@@ -95,6 +95,10 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
+ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
+ ENDIF()
+
++ IF(UNIX)
++ FIND_PACKAGE(X11 REQUIRED)
++ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${X11_LIBRARIES})
++ ENDIF()
+
+ IF(WANT_XERCES)
+ FIND_PACKAGE(XercesC REQUIRED)
+--
+2.3.6
+
diff --git a/games-strategy/megaglest/files/megaglest-3.9.1-static-build.patch b/games-strategy/megaglest/files/megaglest-3.9.1-static-build.patch
new file mode 100644
index 00000000000..2586a561956
--- /dev/null
+++ b/games-strategy/megaglest/files/megaglest-3.9.1-static-build.patch
@@ -0,0 +1,63 @@
+commit 754a6eb9f81a4a40a2a0102ffe1bfdbba734b36a
+Author: hasufell <hasufell@gentoo.org>
+Date: Mon Nov 18 21:54:54 2013 +0100
+
+ fix static build
+
+diff --git a/mk/cmake/Modules/FindOGG.cmake b/mk/cmake/Modules/FindOGG.cmake
+index 2a026cc..8ca8a23 100644
+--- a/mk/cmake/Modules/FindOGG.cmake
++++ b/mk/cmake/Modules/FindOGG.cmake
+@@ -19,11 +19,11 @@
+
+ FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h)
+
+-#IF (OGG_STATIC AND NOT OGG_LIBRARY)
+-# FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a ogg)
+-#ELSE()
+- FIND_LIBRARY(OGG_LIBRARY NAMES ogg)
+-#ENDIF()
++IF (OGG_STATIC AND NOT OGG_LIBRARY)
++ FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a)
++ELSE()
++ FIND_LIBRARY(OGG_LIBRARY NAMES libogg.so)
++ENDIF()
+
+ #IF (OGG_STATIC AND NOT VORBIS_LIBRARY)
+ # FIND_LIBRARY(VORBIS_LIBRARY NAMES libvorbis.a vorbis)
+--- a/mk/cmake/Modules/FindXercesC.cmake
++++ b/mk/cmake/Modules/FindXercesC.cmake
+@@ -83,6 +83,9 @@
+ /usr/lib
+ /usr/local/lib
+ )
++
++ FIND_LIBRARY(ICUUC_LIBRARY NAMES libicuuc.a)
++ FIND_LIBRARY(ICUDATA_LIBRARY NAMES libicudata.a)
+
+ IF (XERCESC_INCLUDE AND XERCESC_LIBRARY)
+ MESSAGE(STATUS "Found static Xerces-C lib [${XERCESC_LIBRARY}]")
+@@ -90,7 +93,7 @@
+
+ IF(UNIX AND NOT APPLE)
+ #SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY} -Bdynamic -licuuc -licudata")
+- SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY}")
++ SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY} ${ICUUC_LIBRARY} ${ICUDATA_LIBRARY}")
+ ENDIF()
+ ENDIF()
+ ENDIF()
+--- a/mk/cmake/Modules/FindFriBiDi.cmake
++++ b/mk/cmake/Modules/FindFriBiDi.cmake
+@@ -28,9 +28,9 @@
+ SET(FRIBIDI_NAMES ${FRIBIDI_NAMES} fribidi libfribidi)
+
+ OPTION(WANT_STATIC_LIBS "builds as many static libs as possible" OFF)
+-IF(WANT_STATIC_LIBS)
+- SET(FRIBIDI_NAMES fribidi.a libfribidi.a ${FRIBIDI_NAMES})
+-ENDIF()
++#IF(WANT_STATIC_LIBS)
++# SET(FRIBIDI_NAMES fribidi.a libfribidi.a ${FRIBIDI_NAMES})
++#ENDIF()
+
+ MESSAGE(STATUS "** Searching for library names: [${FRIBIDI_NAMES}] ...")
+
diff --git a/games-strategy/megaglest/megaglest-3.11.1.ebuild b/games-strategy/megaglest/megaglest-3.11.1.ebuild
new file mode 100644
index 00000000000..7776e566b51
--- /dev/null
+++ b/games-strategy/megaglest/megaglest-3.11.1.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# google-breakpad
+# TODO: fribidi, libvorbis static
+
+EAPI=5
+VIRTUALX_REQUIRED="manual"
+inherit eutils flag-o-matic cmake-utils virtualx wxwidgets gnome2-utils games
+
+DESCRIPTION="Cross-platform 3D realtime strategy game"
+HOMEPAGE="http://www.megaglest.org/"
+SRC_URI="https://github.com/MegaGlest/megaglest-source/releases/download/${PV}/megaglest-source-${PV}.tar.xz"
+
+LICENSE="GPL-3 BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +editor fribidi cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 static +streflop +tools +unicode wxuniversal +model-viewer videos"
+
+RDEPEND="
+ ~games-strategy/${PN}-data-${PV}
+ >=dev-lang/lua-5.1:0
+ dev-libs/libxml2
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libsdl[X,sound,joystick,opengl,video]
+ media-libs/libvorbis
+ media-libs/openal
+ net-libs/gnutls
+ sys-libs/zlib
+ virtual/opengl
+ virtual/glu
+ x11-libs/libX11
+ x11-libs/libXext
+ editor? ( x11-libs/wxGTK:2.8[X,opengl] )
+ fribidi? ( dev-libs/fribidi )
+ model-viewer? ( x11-libs/wxGTK:2.8[X] )
+ !static? (
+ dev-libs/xerces-c[icu]
+ media-libs/ftgl
+ media-libs/glew
+ media-libs/libpng:0
+ net-libs/libircclient
+ >=net-libs/miniupnpc-1.8
+ net-misc/curl
+ virtual/jpeg:0
+ )
+ videos? ( media-video/vlc )"
+DEPEND="${RDEPEND}
+ sys-apps/help2man
+ virtual/pkgconfig
+ editor? ( ${VIRTUALX_DEPEND} )
+ model-viewer? ( ${VIRTUALX_DEPEND} )
+ static? (
+ dev-libs/icu[static-libs]
+ dev-libs/xerces-c[icu,static-libs]
+ media-libs/ftgl[static-libs]
+ media-libs/glew[static-libs]
+ media-libs/libpng:0[static-libs]
+ net-libs/libircclient[static-libs]
+ net-libs/miniupnpc[static-libs]
+ net-misc/curl[static-libs]
+ virtual/jpeg:0[static-libs]
+ )"
+
+src_prepare() {
+ if use editor || use model-viewer ; then
+ WX_GTK_VER="2.8"
+ need-wxwidgets unicode
+ fi
+
+ epatch "${FILESDIR}"/${P}-static-build.patch \
+ "${FILESDIR}"/${P}-cmake.patch
+}
+
+src_configure() {
+ if use cpu_flags_x86_sse3; then
+ SSE=3
+ elif use cpu_flags_x86_sse2; then
+ SSE=2
+ elif use cpu_flags_x86_sse; then
+ SSE=1
+ else
+ SSE=0
+ fi
+
+ local mycmakeargs=(
+ $(cmake-utils_use_enable fribidi FRIBIDI)
+ $(cmake-utils_use_build editor MEGAGLEST_MAP_EDITOR)
+ $(cmake-utils_use_build tools MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS)
+ $(cmake-utils_use_build model-viewer MEGAGLEST_MODEL_VIEWER)
+ $(cmake-utils_use_with videos VLC)
+ -DMAX_SSE_LEVEL_DESIRED="${SSE}"
+ -DMEGAGLEST_BIN_INSTALL_PATH="${GAMES_BINDIR}"
+ -DMEGAGLEST_DATA_INSTALL_PATH="${GAMES_DATADIR}/${PN}"
+ # icons are used at runtime, wrong default location share/pixmaps
+ -DMEGAGLEST_ICON_INSTALL_PATH="${GAMES_DATADIR}/${PN}"
+ -DUSE_FTGL=ON
+ $(cmake-utils_use_want static STATIC_LIBS)
+ $(cmake-utils_use_want streflop STREFLOP)
+ -DWANT_SVN_STAMP=off
+ $(cmake-utils_use static wxWidgets_USE_STATIC)
+ $(cmake-utils_use unicode wxWidgets_USE_UNICODE)
+ $(cmake-utils_use wxuniversal wxWidgets_USE_UNIVERSAL)
+
+ $(usex debug "-DBUILD_MEGAGLEST_UPNP_DEBUG=ON -DwxWidgets_USE_DEBUG=ON" "")
+ )
+
+ # support CMAKE_BUILD_TYPE=Gentoo
+ append-cppflags '-DCUSTOM_DATA_INSTALL_PATH=\\\"'${GAMES_DATADIR}/${PN}/'\\\"'
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ if use editor || use model-viewer; then
+ VIRTUALX_COMMAND="cmake-utils_src_compile" virtualmake
+ else
+ cmake-utils_src_compile
+ fi
+}
+
+src_install() {
+ # rebuilds some targets randomly without fast option
+ emake -C "${CMAKE_BUILD_DIR}" DESTDIR="${D}" "$@" install/fast
+
+ dodoc docs/{AUTHORS.source_code,CHANGELOG,README}.txt
+ doicon -s 48 ${PN}.png
+
+ use editor &&
+ make_desktop_entry ${PN}_editor "MegaGlest Map Editor"
+ use model-viewer &&
+ make_desktop_entry ${PN}_g3dviewer "MegaGlest Model Viewer"
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ einfo
+ elog 'Note about Configuration:'
+ elog 'DO NOT directly edit glest.ini and glestkeys.ini but rather glestuser.ini'
+ elog 'and glestuserkeys.ini in ~/.megaglest/ and create your user over-ride'
+ elog 'values in these files.'
+ elog
+ elog 'If you have an older graphics card which only supports OpenGL 1.2, and the'
+ elog 'game crashes when you try to play, try starting with "megaglest --disable-vbo"'
+ elog 'Some graphics cards may require setting Max Lights to 1.'
+ einfo
+
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/megaglest/megaglest-3.9.1-r1.ebuild b/games-strategy/megaglest/megaglest-3.9.1-r1.ebuild
new file mode 100644
index 00000000000..dea6d1d8584
--- /dev/null
+++ b/games-strategy/megaglest/megaglest-3.9.1-r1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# google-breakpad
+# TODO: fribidi, libvorbis static
+
+EAPI=5
+VIRTUALX_REQUIRED="manual"
+inherit eutils flag-o-matic cmake-utils virtualx wxwidgets gnome2-utils games
+
+DESCRIPTION="Cross-platform 3D realtime strategy game"
+HOMEPAGE="http://www.megaglest.org/"
+SRC_URI="https://github.com/MegaGlest/megaglest-source/releases/download/${PV}/megaglest-source-${PV}.tar.xz"
+
+LICENSE="GPL-3 BitstreamVera"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug +editor fribidi cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 static +streflop +tools +unicode wxuniversal +model-viewer videos"
+
+RDEPEND="
+ >=dev-lang/lua-5.1
+ dev-libs/libxml2
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libsdl[X,sound,joystick,opengl,video]
+ media-libs/libvorbis
+ media-libs/openal
+ net-libs/gnutls
+ sys-libs/zlib
+ virtual/opengl
+ virtual/glu
+ x11-libs/libX11
+ x11-libs/libXext
+ editor? ( x11-libs/wxGTK:2.8[X,opengl] )
+ fribidi? ( dev-libs/fribidi )
+ model-viewer? ( x11-libs/wxGTK:2.8[X] )
+ !static? (
+ dev-libs/xerces-c[icu]
+ media-libs/ftgl
+ media-libs/glew
+ media-libs/libpng:0
+ net-libs/libircclient
+ >=net-libs/miniupnpc-1.8
+ net-misc/curl
+ virtual/jpeg
+ )
+ videos? ( media-video/vlc )"
+DEPEND="${RDEPEND}
+ sys-apps/help2man
+ virtual/pkgconfig
+ editor? ( ${VIRTUALX_DEPEND} )
+ model-viewer? ( ${VIRTUALX_DEPEND} )
+ static? (
+ dev-libs/icu[static-libs]
+ dev-libs/xerces-c[icu,static-libs]
+ media-libs/ftgl[static-libs]
+ media-libs/glew[static-libs]
+ media-libs/libpng:0[static-libs]
+ net-libs/libircclient[static-libs]
+ net-libs/miniupnpc[static-libs]
+ net-misc/curl[static-libs]
+ virtual/jpeg[static-libs]
+ )"
+PDEPEND="~games-strategy/${PN}-data-${PV}"
+
+src_prepare() {
+ if use editor || use model-viewer ; then
+ WX_GTK_VER="2.8"
+ need-wxwidgets unicode
+ fi
+
+ epatch "${FILESDIR}"/${P}-static-build.patch \
+ "${FILESDIR}"/${P}-cmake.patch
+}
+
+src_configure() {
+ if use cpu_flags_x86_sse3; then
+ SSE=3
+ elif use cpu_flags_x86_sse2; then
+ SSE=2
+ elif use cpu_flags_x86_sse; then
+ SSE=1
+ else
+ SSE=0
+ fi
+
+ local mycmakeargs=(
+ $(cmake-utils_use_enable fribidi FRIBIDI)
+ $(cmake-utils_use_build editor MEGAGLEST_MAP_EDITOR)
+ $(cmake-utils_use_build tools MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS)
+ $(cmake-utils_use_build model-viewer MEGAGLEST_MODEL_VIEWER)
+ $(cmake-utils_use_with videos VLC)
+ -DMAX_SSE_LEVEL_DESIRED="${SSE}"
+ -DMEGAGLEST_BIN_INSTALL_PATH="${GAMES_BINDIR}"
+ -DMEGAGLEST_DATA_INSTALL_PATH="${GAMES_DATADIR}/${PN}"
+ # icons are used at runtime, wrong default location share/pixmaps
+ -DMEGAGLEST_ICON_INSTALL_PATH="${GAMES_DATADIR}/${PN}"
+ -DUSE_FTGL=ON
+ $(cmake-utils_use_want static STATIC_LIBS)
+ $(cmake-utils_use_want streflop STREFLOP)
+ -DWANT_SVN_STAMP=off
+ $(cmake-utils_use static wxWidgets_USE_STATIC)
+ $(cmake-utils_use unicode wxWidgets_USE_UNICODE)
+ $(cmake-utils_use wxuniversal wxWidgets_USE_UNIVERSAL)
+
+ $(usex debug "-DBUILD_MEGAGLEST_UPNP_DEBUG=ON -DwxWidgets_USE_DEBUG=ON" "")
+ )
+
+ # support CMAKE_BUILD_TYPE=Gentoo
+ append-cppflags '-DCUSTOM_DATA_INSTALL_PATH=\\\"'${GAMES_DATADIR}/${PN}/'\\\"'
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ if use editor || use model-viewer; then
+ VIRTUALX_COMMAND="cmake-utils_src_compile" virtualmake
+ else
+ cmake-utils_src_compile
+ fi
+}
+
+src_install() {
+ # rebuilds some targets randomly without fast option
+ emake -C "${CMAKE_BUILD_DIR}" DESTDIR="${D}" "$@" install/fast
+
+ dodoc docs/{AUTHORS.source_code,CHANGELOG,README}.txt
+ doicon -s 48 ${PN}.png
+
+ use editor &&
+ make_desktop_entry ${PN}_editor "MegaGlest Map Editor"
+ use model-viewer &&
+ make_desktop_entry ${PN}_g3dviewer "MegaGlest Model Viewer"
+
+ # provided by megaglest-data
+ rm "${ED%/}/${GAMES_DATADIR}"/${PN}/${PN}.bmp || die
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ einfo
+ elog 'Note about Configuration:'
+ elog 'DO NOT directly edit glest.ini and glestkeys.ini but rather glestuser.ini'
+ elog 'and glestuserkeys.ini in ~/.megaglest/ and create your user over-ride'
+ elog 'values in these files.'
+ elog
+ elog 'If you have an older graphics card which only supports OpenGL 1.2, and the'
+ elog 'game crashes when you try to play, try starting with "megaglest --disable-vbo"'
+ elog 'Some graphics cards may require setting Max Lights to 1.'
+ einfo
+
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/megaglest/metadata.xml b/games-strategy/megaglest/metadata.xml
new file mode 100644
index 00000000000..ca0584f15be
--- /dev/null
+++ b/games-strategy/megaglest/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <changelog>http://megaglest.svn.sourceforge.net/viewvc/megaglest/trunk/docs/CHANGELOG.txt?revision=3397</changelog>
+ <doc lang="en">http://glest.wikia.com/wiki/MG</doc>
+ <bugs-to>https://sourceforge.net/tracker/?group_id=300350&amp;atid=1266776</bugs-to>
+ <remote-id type="github">MegaGlest/megaglest-source</remote-id>
+ </upstream>
+ <use>
+ <flag name="editor">Build map editor</flag>
+ <flag name="fribidi">Enable FriBIDi support</flag>
+ <flag name="streflop">Use the library streflop. Out of synchs may
+ occur if not enabled.</flag>
+ <flag name="tools">Build model import/export tools</flag>
+ <flag name="unicode">Use unicode strings for wxwidgets</flag>
+ <flag name="wxuniversal">Use the wxUniversal port which implements
+ the various GUI controls by drawing them itself </flag>
+ <flag name="model-viewer">Build model viewer</flag>
+ </use>
+ <longdescription lang="en">
+ MegaGlest is an entertaining free (freeware and free software) and
+ open source cross-platform 3D real-time strategy (RTS) game, where
+ you control the armies of one of seven different factions: Tech,
+ Magic, Egyptians, Indians, Norsemen, Persian or Romans. The game is
+ setup in one of 17 naturally looking settings, which -like the unit
+ models- are crafted with great appreciation for detail. Additional
+ game data can be downloaded from within the game at no cost.
+ </longdescription>
+</pkgmetadata>
diff --git a/games-strategy/metadata.xml b/games-strategy/metadata.xml
new file mode 100644
index 00000000000..9cac05913c0
--- /dev/null
+++ b/games-strategy/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The games-strategy category contains strategy games.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie games-strategy enthält Strategiespiele.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría games-strategy contiene juegos de estrategia.
+ </longdescription>
+ <longdescription lang="ja">
+ games-strategyカテゴリーにはストラテジー・ゲームが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De games-strategy categorie bevat strategiespellen.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm games-strategy chứa các trò chơi chiến thuật.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria games-strategy contiene giochi strategici.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria games-strategy contém jogos de estratégia.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria games-strategy zawiera gry strategiczne.
+ </longdescription>
+</catmetadata>
+
diff --git a/games-strategy/mindrover-demo/Manifest b/games-strategy/mindrover-demo/Manifest
new file mode 100644
index 00000000000..fa62ff5189d
--- /dev/null
+++ b/games-strategy/mindrover-demo/Manifest
@@ -0,0 +1 @@
+DIST mindrover_demo.run 25266633 SHA256 049a70cb220e6a2cc5fcd4b1175d7cfb1727e960c9d300b5dfedd3755603e44a SHA512 ddb78f6a40bd42dd3b3ce0a6793f5e217937d3be1dd294d7d8596f8409eee506522a64d9396db2d93fa3beca197d85c7a6507a8f2ae773d0b9b123e9be1e761c WHIRLPOOL b3f5c684fed28cbfc1d0b815c8e2051b792384d9fbd22428b206b20029d8bd5e903d25a4466ebc545df94a7bc25e770648819caab3c61f22360878d733e46c98
diff --git a/games-strategy/mindrover-demo/metadata.xml b/games-strategy/mindrover-demo/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/mindrover-demo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/mindrover-demo/mindrover-demo-1.07b.ebuild b/games-strategy/mindrover-demo/mindrover-demo-1.07b.ebuild
new file mode 100644
index 00000000000..6caca7feb1b
--- /dev/null
+++ b/games-strategy/mindrover-demo/mindrover-demo-1.07b.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_P="mindrover_demo.run"
+DESCRIPTION="Control a robot as it races across Europa"
+HOMEPAGE="http://www.linuxgamepublishing.com/info.php?id=9"
+SRC_URI=" http://demos.linuxgamepublishing.com/mindrover/${MY_P}"
+
+LICENSE="all-rights-reserved GPL-2+"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+RESTRICT="mirror bindist strip"
+
+RDEPEND="virtual/opengl"
+
+S=${WORKDIR}
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+src_install() {
+ einfo "This will take a while ... go get a pizza or something"
+
+ dodir "${dir}"
+
+ tar -zxf data.tar.gz -C "${Ddir}"/ || die
+ tar -zxf music.tar.gz -C "${Ddir}"/ || die
+
+ dodoc README
+ newicon icon.xpm ${PN}.xpm || die
+ exeinto "${dir}"
+ doexe bin/Linux/x86/glibc-2.1/mindrover_demo \
+ bin/Linux/x86/glibc-2.1/lib/libopenal.so.0.0.6 || die
+ dosym "${dir}"/libopenal.so.0.0.6 "${dir}"/libopenal.so.0
+
+ games_make_wrapper ${PN} ./mindrover_demo "${dir}" "${dir}"
+ make_desktop_entry ${PN} "Mindrover: Europa Project (Demo)"
+
+ prepgamesdirs
+}
diff --git a/games-strategy/naev/Manifest b/games-strategy/naev/Manifest
new file mode 100644
index 00000000000..4ec87502aa5
--- /dev/null
+++ b/games-strategy/naev/Manifest
@@ -0,0 +1,2 @@
+DIST naev-0.6.0.tar.bz2 1054649 SHA256 0f0b498c7642e36dfaa15f284e13b9aa2d20e4aa01ed812fb7854583e7161cac SHA512 263c404a9ec4d4dafdf2ea9afc1ea58679792916b9143b7646918210b9f5f4656fe315e0b83c7983646206d03329b3314430acc8a5cbea3da830d183702cde4b WHIRLPOOL 53a425ddd13b791c1b3469e6ed16a897609391e821056dc55e8b7484d5c394fee6956fe5c6e8be503c8bd1c6f382ad103200a2acefbfe5c17035851b3d0e1778
+DIST ndata-0.6.0.zip 302646395 SHA256 07ccb9f50652bceb8064fa1e48cd9df2b4ce0e3c52b60f27398cdfc3186ac52b SHA512 dc55a49132543477ad42d17224ceacc146b68ebc1f37e4325b1ffe61c64571ec47e012194103f59d664b64eb021c19741e184aca00d800d39efcdc3646146974 WHIRLPOOL 7a002a3de45bb121afad52e75c08e1a15a16ca5613ed3190f73335de93862389aa6376b0601744c756bfe76e77be048d877a9200c2046f4868e390ce5973e2b4
diff --git a/games-strategy/naev/metadata.xml b/games-strategy/naev/metadata.xml
new file mode 100644
index 00000000000..da0a81aa42b
--- /dev/null
+++ b/games-strategy/naev/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="mixer">
+ Enables <pkg>media-libs/sdl-mixer</pkg> sound backend in addition to
+ <pkg>media-libs/openal</pkg> one.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">naev</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/naev/naev-0.6.0.ebuild b/games-strategy/naev/naev-0.6.0.ebuild
new file mode 100644
index 00000000000..ee69405728f
--- /dev/null
+++ b/games-strategy/naev/naev-0.6.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic gnome2-utils games
+
+DESCRIPTION="A 2D space trading and combat game, in a similar vein to Escape Velocity"
+HOMEPAGE="http://blog.naev.org/"
+SRC_URI="mirror://sourceforge/naev/${P}.tar.bz2
+ mirror://sourceforge/naev/ndata-${PV}.zip"
+
+LICENSE="GPL-2 GPL-3 public-domain CC-BY-3.0 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug +mixer +openal"
+
+RDEPEND="media-libs/libsdl2[X,sound,video]
+ dev-libs/libzip
+ dev-libs/libxml2
+ >=media-libs/freetype-2
+ >=media-libs/libvorbis-1.2.1
+ >=media-libs/libpng-1.2:0
+ virtual/glu
+ virtual/opengl
+ dev-lang/lua:0
+ mixer? ( media-libs/sdl2-mixer )
+ openal? ( media-libs/openal )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+}
+
+src_configure() {
+ egamesconf \
+ --docdir=/usr/share/doc/${PF} \
+ --enable-lua=shared \
+ $(use_enable debug) \
+ $(use_with openal) \
+ $(use_with mixer sdlmixer)
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ appicondir=/usr/share/pixmaps \
+ Graphicsdir=/usr/share/applications \
+ install
+
+ insinto "${GAMES_DATADIR}"/${PN}
+ newins "${DISTDIR}"/ndata-${PV}.zip ndata
+
+ local res
+ for res in 16 32 64 128; do
+ newicon -s ${res} extras/logos/logo${res}.png naev.png
+ done
+
+ rm -f "${D}"/usr/share/doc/${PF}/LICENSE
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/netherearth/Manifest b/games-strategy/netherearth/Manifest
new file mode 100644
index 00000000000..8d50b29f57a
--- /dev/null
+++ b/games-strategy/netherearth/Manifest
@@ -0,0 +1,2 @@
+DIST netherearth052.zip 872397 SHA256 79d533a56b4939a402edd7665f234e7f462e68b00ea36d9ae110f02a36357caf SHA512 1f2cb3e896ac076c5ed3d346f19d8328b879546c4dc58609251bdbc8fd96b201cbc5dcb400df2a0dd4c717c7be002f83b92acf33f607890fa736b572c72a8cf5 WHIRLPOOL ac0862bfe148b6fbd2f51e559d5b3488b4a4234008566bfecf2153ff82d7bd2decce510deeb0933bc5852da7bc506b624a32e551f7ae32987146644d3c12db85
+DIST sources.zip 75918 SHA256 0d4f80f5d3f73e957ccb7c292dcc830b88cb5624aa086ea3416522a8a66b766f SHA512 8daa9def65f4be8a541df15c69531da84344906e0f3eab2b7e84f8a94e2f3278d2033e37a9edd4b17fc19b1f7fbf3537286a2a2a9877950d19a51a1167487b75 WHIRLPOOL 755d398586edabe01c9fd299b14e6534b42aecf212332bf00fbca87c9a11a2710a5ad1cf750508d26c98aa34dc71cee5d99aaf7fe5952a89346fcf058553b679
diff --git a/games-strategy/netherearth/files/Makefile b/games-strategy/netherearth/files/Makefile
new file mode 100644
index 00000000000..07c671a10e3
--- /dev/null
+++ b/games-strategy/netherearth/files/Makefile
@@ -0,0 +1,20 @@
+# ls *.cpp
+#
+#3dobject-ase.cpp construction.cpp maps.cpp netherdebug.cpp radar.cpp
+#3dobject.cpp enemy_ai.cpp menu.cpp nethersave.cpp robot_ai.cpp
+#bitmap.cpp glprintf.cpp myglutaux.cpp particles.cpp robots.cpp
+#bullet.cpp main.cpp nether.cpp piece3dobject.cpp shadow3dobject.cpp
+#cmc.cpp mainmenu.cpp nethercycle.cpp quaternion.cpp vector.cpp
+
+
+SOURCES = 3dobject-ase.cpp 3dobject.cpp cmc.cpp nether.cpp piece3dobject.cpp vector.cpp bitmap.cpp bullet.cpp glprintf.cpp main.cpp mainmenu.cpp maps.cpp menu.cpp myglutaux.cpp nethercycle.cpp netherdebug.cpp nethersave.cpp particles.cpp construction.cpp quaternion.cpp radar.cpp enemy_ai.cpp robot_ai.cpp robots.cpp shadow3dobject.cpp
+OBJECTS = $(SOURCES:.cpp=.o)
+TARGET = nether_earth
+
+.cpp.o:
+ g++ ${CXXFLAGS} -c $< -o $@
+
+all: $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ g++ $(OBJECTS) -o $(TARGET) -lGL -lGLU -lglut -lSDL -lSDL_mixer -lpthread
diff --git a/games-strategy/netherearth/files/netherearth-0.52-freeglut.patch b/games-strategy/netherearth/files/netherearth-0.52-freeglut.patch
new file mode 100644
index 00000000000..0fc147f0b7a
--- /dev/null
+++ b/games-strategy/netherearth/files/netherearth-0.52-freeglut.patch
@@ -0,0 +1,18 @@
+--- main.cpp
++++ main.cpp
+@@ -8,6 +8,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <GL/glut.h>
+ #include "SDL/SDL.h"
+ #include "SDL/SDL_mixer.h"
+
+@@ -144,6 +145,7 @@
+ bool quit = false;
+
+ load_configuration();
++ glutInit(&argc, argv);
+
+ screen_sfc = initialization((fullscreen ? SDL_FULLSCREEN : 0));
+ if (screen_sfc==0) return 0;
diff --git a/games-strategy/netherearth/files/netherearth-0.52-gentoo-paths.patch b/games-strategy/netherearth/files/netherearth-0.52-gentoo-paths.patch
new file mode 100644
index 00000000000..25f99be50fa
--- /dev/null
+++ b/games-strategy/netherearth/files/netherearth-0.52-gentoo-paths.patch
@@ -0,0 +1,139 @@
+diff -ud ../NetherEarth_v0.51-linsrc.orig/3dobject-ase.cpp ./3dobject-ase.cpp
+--- ../NetherEarth_v0.51-linsrc.orig/3dobject-ase.cpp 2002-10-26 00:00:00.000000000 +0300
++++ ./3dobject-ase.cpp 2004-04-16 21:42:55.000000000 +0300
+@@ -34,7 +34,7 @@
+ char buffer[256];
+ FILE *fp;
+
+- fp=fopen(file,"r+");
++ fp=fopen(file,"r");
+ if (fp==NULL) return false;
+
+ /* Look for the materials: */
+diff -ud ../NetherEarth_v0.51-linsrc.orig/3dobject.cpp ./3dobject.cpp
+--- ../NetherEarth_v0.51-linsrc.orig/3dobject.cpp 2004-01-06 20:49:00.000000000 +0200
++++ ./3dobject.cpp 2004-04-16 21:43:44.000000000 +0300
+@@ -74,7 +74,7 @@
+
+ int *smooth;
+
+- fp=fopen(file,"r+");
++ fp=fopen(file,"r");
+ if (fp==NULL) return false;
+
+ /* Importar un fichero .ASC de 3DStudio */
+diff -ud ../NetherEarth_v0.51-linsrc.orig/bitmap.cpp ./bitmap.cpp
+--- ../NetherEarth_v0.51-linsrc.orig/bitmap.cpp 2004-01-06 20:49:00.000000000 +0200
++++ ./bitmap.cpp 2004-04-16 21:45:13.000000000 +0300
+@@ -14,7 +14,7 @@
+ g=0;
+ b=0;
+
+- fp=fopen(file,"rb+");
++ fp=fopen(file,"rb");
+ if (fp==NULL) return;
+
+ /* Tag: */
+diff -ud ../NetherEarth_v0.51-linsrc.orig/mainmenu.cpp ./mainmenu.cpp
+--- ../NetherEarth_v0.51-linsrc.orig/mainmenu.cpp 2004-01-06 20:50:00.000000000 +0200
++++ ./mainmenu.cpp 2004-04-16 21:14:14.000000000 +0300
+@@ -6,6 +6,9 @@
+ #include <dirent.h>
+ #endif
+
++#include <stdlib.h>
++#include <fcntl.h>
++#include <unistd.h>
+ #include "string.h"
+ #include "stdio.h"
+ #include "math.h"
+@@ -483,8 +486,10 @@
+ {
+ int v;
+ FILE *fp;
++ char cfg_path[300];
+
+- fp=fopen("nether.cfg","r");
++ sprintf(cfg_path, "%s/.netherearth/nether.cfg", getenv("HOME"));
++ fp=fopen(cfg_path,"r");
+ if (fp==0) return;
+
+ if (2!=fscanf(fp,"%i %i",&SCREEN_X,&SCREEN_Y)) return;
+@@ -510,8 +515,12 @@
+ void save_configuration(void)
+ {
+ FILE *fp;
++ char cfg_path[300];
+
+- fp=fopen("nether.cfg","w");
++ sprintf(cfg_path, "%s/.netherearth", getenv("HOME"));
++ mkdir(cfg_path, 0755);
++ sprintf(cfg_path, "%s/.netherearth/nether.cfg", getenv("HOME"));
++ fp=fopen(cfg_path,"w");
+ if (fp==0) return;
+
+ fprintf(fp,"%i %i\n",SCREEN_X,SCREEN_Y);
+diff -ud ../NetherEarth_v0.51-linsrc.orig/nether.cpp ./nether.cpp
+--- ../NetherEarth_v0.51-linsrc.orig/nether.cpp 2004-01-06 21:03:00.000000000 +0200
++++ ./nether.cpp 2004-04-16 20:54:54.000000000 +0300
+@@ -1203,7 +1203,7 @@
+ if (option_menu==(i+1)) glColor3f(1.0,0.0,0.0);
+ else glColor3f(0.5,0.5,1.0);
+ glTranslatef(0,-2,0);
+- sprintf(filename,"savedgame%i.txt",i);
++ sprintf(filename,"%s/.netherearth/savedgame%i.txt", getenv("HOME"), i);
+ fp=fopen(filename,"r");
+ if (fp==0) {
+ scaledglprintf(0.01,0.01,"SLOT%i - EMPTY",i+1);
+@@ -1232,7 +1232,7 @@
+ if (option_menu==(i+1)) glColor3f(1.0,0.0,0.0);
+ else glColor3f(0.5,0.5,1.0);
+ glTranslatef(0,-2,0);
+- sprintf(filename,"savedgame%i.txt",i);
++ sprintf(filename,"%s/.netherearth/savedgame%i.txt", getenv("HOME"), i);
+ fp=fopen(filename,"r");
+ if (fp==0) {
+ scaledglprintf(0.01,0.01,"SLOT%i - EMPTY",i+1);
+@@ -1291,7 +1291,7 @@
+ case 4:
+ {
+ char filename[80];
+- sprintf(filename,"savedgame%i.txt",option_menu-1);
++ sprintf(filename,"%s/.netherearth/savedgame%i.txt", getenv("HOME"), option_menu-1);
+ save_game(filename);
+ //save_debug_report("debugreport.txt");
+ game_state=STATE_PAUSE;
+@@ -1326,7 +1326,7 @@
+ case 4:
+ {
+ char filename[80];
+- sprintf(filename,"savedgame%i.txt",option_menu-1);
++ sprintf(filename,"%s/.netherearth/savedgame%i.txt", getenv("HOME"), option_menu-1);
+ killmenu(act_menu);
+ load_game(filename);
+ newmenu(act_menu);
+diff -ud ../NetherEarth_v0.51-linsrc.orig/nethersave.cpp ./nethersave.cpp
+--- ../NetherEarth_v0.51-linsrc.orig/nethersave.cpp 2003-09-17 00:00:00.000000000 +0300
++++ ./nethersave.cpp 2004-04-16 21:23:04.000000000 +0300
+@@ -2,6 +2,10 @@
+ #include "windows.h"
+ #endif
+
++#include <stdlib.h>
++#include <sys/types.h>
++#include <fcntl.h>
++#include <unistd.h>
+ #include "string.h"
+ #include "stdio.h"
+ #include "math.h"
+@@ -40,7 +44,10 @@
+ ROBOT *r;
+ BULLET *bul;
+ EXPLOSION *e;
++ char tmp_path[300];
+
++ sprintf(tmp_path, "%s/.netherearth", getenv("HOME"));
++ mkdir(tmp_path, 0755);
+ fp=fopen(filename,"w");
+ if (fp==0) return false;
+
diff --git a/games-strategy/netherearth/files/netherearth-0.52-glibc-212.patch b/games-strategy/netherearth/files/netherearth-0.52-glibc-212.patch
new file mode 100644
index 00000000000..813f963db4c
--- /dev/null
+++ b/games-strategy/netherearth/files/netherearth-0.52-glibc-212.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/335137
+
+--- sources/mainmenu.cpp
++++ sources/mainmenu.cpp
+@@ -3,6 +3,7 @@
+ #else
+ #include <stddef.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <dirent.h>
+ #endif
+
+--- sources/nethersave.cpp
++++ sources/nethersave.cpp
+@@ -1,5 +1,8 @@
+ #ifdef _WIN32
+ #include "windows.h"
++#else
++#include <sys/types.h>
++#include <sys/stat.h>
+ #endif
+
+ #include "string.h"
diff --git a/games-strategy/netherearth/files/netherearth-0.52-ldflags.patch b/games-strategy/netherearth/files/netherearth-0.52-ldflags.patch
new file mode 100644
index 00000000000..6b7ed3a8989
--- /dev/null
+++ b/games-strategy/netherearth/files/netherearth-0.52-ldflags.patch
@@ -0,0 +1,8 @@
+--- Makefile.old 2010-10-12 09:30:19.000000000 +0200
++++ Makefile 2010-10-12 09:30:38.000000000 +0200
+@@ -17,4 +17,4 @@
+ all: $(TARGET)
+
+ $(TARGET): $(OBJECTS)
+- g++ $(OBJECTS) -o $(TARGET) -lGL -lGLU -lglut -lSDL -lSDL_mixer -lpthread
++ g++ $(LDFLAGS) $(OBJECTS) -o $(TARGET) -lGL -lGLU -lglut -lSDL -lSDL_mixer -lpthread
diff --git a/games-strategy/netherearth/files/netherearth-0.52-linux.patch b/games-strategy/netherearth/files/netherearth-0.52-linux.patch
new file mode 100644
index 00000000000..6c4c0d1e973
--- /dev/null
+++ b/games-strategy/netherearth/files/netherearth-0.52-linux.patch
@@ -0,0 +1,47 @@
+diff -burN sources/glprintf.cpp sources-linux/glprintf.cpp
+--- sources/glprintf.cpp 2002-10-26 00:17:00.000000000 +0200
++++ sources-linux/glprintf.cpp 2005-06-18 18:22:54.000000000 +0200
+@@ -3,6 +3,7 @@
+ #endif
+ #include "GL/gl.h"
+
++#include "string.h"
+ #include "stdio.h"
+ #include "stdarg.h"
+ #include "GL/gl.h"
+diff -burN sources/list.h sources-linux/list.h
+--- sources/list.h 2002-10-27 12:17:00.000000000 +0100
++++ sources-linux/list.h 2005-06-18 18:21:34.000000000 +0200
+@@ -1,6 +1,9 @@
+ #ifndef GENERIC_LIST
+ #define GENERIC_LIST
+
++
++#include "stdlib.h"
++
+ /*
+ Funciones para LISTAS:
+
+diff -burN sources/maps.cpp sources-linux/maps.cpp
+--- sources/maps.cpp 2005-05-05 23:42:00.000000000 +0200
++++ sources-linux/maps.cpp 2005-06-18 18:23:05.000000000 +0200
+@@ -3,6 +3,7 @@
+ #endif
+
+ #include "stdio.h"
++#include "string.h"
+
+ #include "GL/gl.h"
+ #include "GL/glu.h"
+diff -burN sources/myglutaux.cpp sources-linux/myglutaux.cpp
+--- sources/myglutaux.cpp 2002-10-26 00:17:00.000000000 +0200
++++ sources-linux/myglutaux.cpp 2005-06-18 18:23:29.000000000 +0200
+@@ -5,6 +5,8 @@
+ #include <GL/gl.h>
+ #include "GL/glut.h"
+
++#include "string.h"
++#include "stdlib.h"
+ #include "stdio.h"
+ #include "math.h"
+ #include "vector.h"
diff --git a/games-strategy/netherearth/metadata.xml b/games-strategy/netherearth/metadata.xml
new file mode 100644
index 00000000000..7c5a4830d79
--- /dev/null
+++ b/games-strategy/netherearth/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription lang="en">
+ Nether Earth was the very first real time strategy game. It worked on a
+ SPECTRUM machine, and only needed 48KB of RAM to work!! It has all the
+ typical elements of strategy games: resources, factories, combat units,
+ etc.
+ </longdescription>
+</pkgmetadata>
diff --git a/games-strategy/netherearth/netherearth-0.52.ebuild b/games-strategy/netherearth/netherearth-0.52.ebuild
new file mode 100644
index 00000000000..ef93d435739
--- /dev/null
+++ b/games-strategy/netherearth/netherearth-0.52.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+MY_PV="${PV/./}"
+DESCRIPTION="A remake of the SPECTRUM game Nether Earth"
+HOMEPAGE="http://www.braingames.getput.com/nether/"
+SRC_URI="http://www.braingames.getput.com/nether/sources.zip
+ http://www.braingames.getput.com/nether/${PN}${MY_PV}.zip"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+RESTRICT="mirror bindist"
+
+RDEPEND=">=media-libs/libsdl-1.2.6-r3
+ >=media-libs/sdl-mixer-1.2.5-r1
+ media-libs/freeglut"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/sources
+
+data=../nether\ earth\ v${PV}
+
+src_unpack() {
+ unzip -LL "${DISTDIR}/${PN}${MY_PV}.zip" >/dev/null || die
+ unzip -LL "${DISTDIR}/sources.zip" >/dev/null || die
+}
+
+src_prepare() {
+ DATA_DIR=${GAMES_DATADIR}/${PN}
+
+ cp "${FILESDIR}/Makefile" . || die
+
+ # Fix compilation errors/warnings
+ epatch "${FILESDIR}"/${P}-linux.patch
+
+ epatch "${FILESDIR}"/${P}-freeglut.patch \
+ "${FILESDIR}"/${P}-glibc-212.patch \
+ "${FILESDIR}"/${P}-ldflags.patch
+
+ # Modify dirs and some fopen() permissions
+ epatch "${FILESDIR}/${P}-gentoo-paths.patch"
+ sed -i \
+ -e "s:models:${DATA_DIR}/models:" \
+ -e "s:textures:${DATA_DIR}/textures:" \
+ -e "s:maps/\*:${DATA_DIR}/maps/\*:" \
+ -e "s:\./maps:${DATA_DIR}/maps:" \
+ mainmenu.cpp || die
+ sed -i \
+ -e "s:models:${DATA_DIR}/models:g" \
+ -e "s:textures:${DATA_DIR}/textures:" \
+ -e "s:sound/:${DATA_DIR}/sound/:" \
+ nether.cpp || die
+ sed -i -e "s:maps:${DATA_DIR}/maps:" \
+ main.cpp || die
+ sed -i -e "s:textures/:${DATA_DIR}/textures/:" \
+ myglutaux.cpp || die
+
+ cd "${data}"
+ rm textures/thumbs.db
+}
+
+src_install() {
+ dogamesbin nether_earth
+
+ cd "${data}"
+
+ # Install all game data
+ insinto "${DATA_DIR}"
+ doins -r maps models sound textures
+
+ dodoc readme.txt
+
+ prepgamesdirs
+}
diff --git a/games-strategy/netpanzer/Manifest b/games-strategy/netpanzer/Manifest
new file mode 100644
index 00000000000..89f785ed939
--- /dev/null
+++ b/games-strategy/netpanzer/Manifest
@@ -0,0 +1,2 @@
+DIST netpanzer-0.8.2.tar.bz2 10416147 SHA256 bc70badec3a846cca8090b6ecda388956c01053b7ea2596b44c730bcc29e3979 SHA512 7d7f5b485b20b2cefc71061412367edd963e59612767f6b69751915eda3f2939eebedfa29cb77ba0986cf4966b0fc12456b1bb6cfc2bd794c47fbce0b5f6f57a WHIRLPOOL cd7fd3ac6d07cc711d3f968e24f07016574aaa1d393e76ef851f439572cc31d1e402cc538e84e7ae80853ec3a5bd97d2d6ddbf6ad811a65227837ed01712e2b8
+DIST netpanzer-data-0.8.tar.bz2 10123751 SHA256 0ed4398f5e0a796422474fcc518934d74ceb056ca7ab624d8d239b749535277b SHA512 9120d8d3a190069206ed327f1d7d2b2d36f40feefa823956cf6db66e8d0622959449b9385d81b08fdfc59b3b44b7e4d6f6ca2c7362f1a857e1110d61e7c08ce6 WHIRLPOOL 8664957ff1bd22acb1efeb3bcfad2106c8c048853a8ab4f238c793f601d6ec9fa31574bcc1d819fcf8593a5b31138bda894fd24fde32e87ec399244d57718285
diff --git a/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc43.patch b/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc43.patch
new file mode 100644
index 00000000000..cf73ba4c225
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc43.patch
@@ -0,0 +1,62 @@
+Index: netpanzer-0.8.2/src/Lib/2D/ColorTable.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/Lib/2D/ColorTable.cpp 2008-02-05 16:36:27.000000000 +0000
++++ netpanzer-0.8.2/src/Lib/2D/ColorTable.cpp 2008-02-05 16:36:39.000000000 +0000
+@@ -17,6 +17,8 @@
+ */
+ #include <config.h>
+
++#include <memory>
++
+ #include "Util/FileSystem.hpp"
+ #include "Util/Log.hpp"
+ #include "Util/Exception.hpp"
+Index: netpanzer-0.8.2/src/Lib/2D/Palette.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/Lib/2D/Palette.cpp 2008-02-05 16:36:27.000000000 +0000
++++ netpanzer-0.8.2/src/Lib/2D/Palette.cpp 2008-02-05 16:36:39.000000000 +0000
+@@ -18,6 +18,7 @@
+ #include <config.h>
+
+ #include <math.h>
++#include <memory>
+
+ #include "Palette.hpp"
+ #include "Util/FileSystem.hpp"
+Index: netpanzer-0.8.2/src/NetPanzer/Network/ProxyServer.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/NetPanzer/Network/ProxyServer.cpp 2008-02-05 16:36:27.000000000 +0000
++++ netpanzer-0.8.2/src/NetPanzer/Network/ProxyServer.cpp 2008-02-05 16:36:39.000000000 +0000
+@@ -17,6 +17,7 @@
+ */
+ #include <config.h>
+
++#include <cstdlib>
+ #include <string>
+ #include <stdexcept>
+ #include <ctype.h>
+Index: netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp 2008-02-05 16:36:27.000000000 +0000
++++ netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp 2008-02-05 16:36:39.000000000 +0000
+@@ -17,6 +17,7 @@
+ */
+ #include <config.h>
+
++#include <memory>
+ #include <vector>
+ #include <string>
+ #include "MapSelectionView.hpp"
+Index: netpanzer-0.8.2/src/Lib/Util/Log.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/Lib/Util/Log.cpp 2008-02-05 17:13:36.000000000 +0000
++++ netpanzer-0.8.2/src/Lib/Util/Log.cpp 2008-02-05 17:13:43.000000000 +0000
+@@ -26,6 +26,7 @@
+ #include <vector>
+ #include <exception>
+ #include <iomanip>
++#include <algorithm>
+
+ #include "Exception.hpp"
+ #include "FileSystem.hpp"
+
diff --git a/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc47.patch b/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc47.patch
new file mode 100644
index 00000000000..432f40a9f9a
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc47.patch
@@ -0,0 +1,11 @@
+--- src/Lib/ArrayUtil/QueueTemplate.hpp.old 2012-10-16 13:57:33.000000000 +0200
++++ src/Lib/ArrayUtil/QueueTemplate.hpp 2012-10-16 13:58:16.000000000 +0200
+@@ -42,7 +42,7 @@
+
+ bool enqueue(const TYPE& object )
+ {
+- add( object, (rear + 1) % this->size );
++ this->add( object, (rear + 1) % this->size );
+ rear = (rear + 1) % this->size;
+
+ if ( front == rear )
diff --git a/games-strategy/netpanzer/files/netpanzer-ded b/games-strategy/netpanzer/files/netpanzer-ded
new file mode 100644
index 00000000000..d6dd8519364
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-ded
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+running=yes
+while [[ $running = yes ]] ; do
+ /usr/games/bin/netpanzer --game_config=/etc/netpanzer-ded.ini -d $@
+ if [[ $? -ge 128 ]] ; then
+ echo "`date`: Restarting server after crash"
+ # wait a bit to not blow cpu and logfiles on constant crashs
+ sleep 30
+ else
+ #normal exit
+ running=no
+ fi
+done
+
diff --git a/games-strategy/netpanzer/files/netpanzer-ded.ini b/games-strategy/netpanzer/files/netpanzer-ded.ini
new file mode 100644
index 00000000000..903fb3b493b
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-ded.ini
@@ -0,0 +1,80 @@
+[game]
+
+[interface]
+attacknotificationtime=5
+consoletextdelay=3
+consoletextusage=25
+drawunitdamage=yes
+drawunitflags=yes
+drawunitreload=no
+gameinfoposition_x=0
+gameinfoposition_y=0
+minimapdrawtype=0
+minimapposition_x=0
+minimapposition_y=0
+minimapsize_x=194
+minimapsize_y=194
+playerflag=26
+rankposition_x=0
+rankposition_y=0
+scrollrate=1000
+toolbarposition_x=0
+toolbarposition_y=0
+unitcolor=0
+unitinfodrawlayer=0
+unitselectionmode=1
+vehicleselectioncolor=1
+viewdrawbackgroundmode=0
+
+[player]
+masterservers=81.169.185.36,81.173.119.122
+name=Gentoo NetPanzer Server
+proxyserver=
+proxyserverpass=
+proxyserveruser=
+
+[radar]
+alliedoutpostcolor=11
+alliedunitcolor=11
+displayclouds=no
+enemyoutpostcolor=4
+objectivedrawmode=1
+playeroutpostcolor=1
+playerunitcolor=0
+resizerate=400
+unitsize=0
+
+[server]
+allowallies=yes
+bindaddress=
+cloudcoverage=0
+fraglimit=500
+gametype=0
+logging=yes
+mapcycle=Cramped, Tight Quarters, Two Villages, Cramped
+maxplayers=8
+maxunits=160
+objectivepercentage=75
+powerups=yes
+public=yes
+respawntype=1
+serverport=3030
+timelimit=50
+windspeed=30
+
+[sound]
+effects=yes
+effectsvolume=100
+enable=yes
+music=yes
+musicvolume=80
+
+[visuals]
+blendsmoke=yes
+displayshadows=yes
+fullscreen=yes
+gamma=50
+hardwareDoubleBuffer=yes
+hardwareSurface=yes
+resolution=0
+
diff --git a/games-strategy/netpanzer/files/netpanzer.rc b/games-strategy/netpanzer/files/netpanzer.rc
new file mode 100644
index 00000000000..87ff15f9953
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer.rc
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting netpanzer dedicated server"
+ screen -A -m -d -S netpanzer-ded su - GAMES_USER_DED -c "GENTOO_DIR/netpanzer-ded"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping netpanzer dedicated server"
+ local pid=`screen -list | grep netpanzer-ded | awk -F . '{print $1}' | sed -e s/.//`
+ if [[ -z "${pid}" ]] ; then
+ eend 1 "Lost screen session"
+ else
+ pid=`pstree -p ${pid} | sed -e 's:^.*netpanzer-ded(\([0-9]*\)).*:\1:'`
+ if [[ -z "${pid}" ]] ; then
+ eend 1 "Lost netpanzer-ded session"
+ else
+ kill ${pid}
+ eend $? "Could not kill netpanzer-ded"
+ fi
+ fi
+}
+
+status() {
+ screen -list | grep netpanzer-ded
+}
diff --git a/games-strategy/netpanzer/metadata.xml b/games-strategy/netpanzer/metadata.xml
new file mode 100644
index 00000000000..aea9e2c8753
--- /dev/null
+++ b/games-strategy/netpanzer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">netpanzer.berlios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/netpanzer/netpanzer-0.8.2.ebuild b/games-strategy/netpanzer/netpanzer-0.8.2.ebuild
new file mode 100644
index 00000000000..2c909c28949
--- /dev/null
+++ b/games-strategy/netpanzer/netpanzer-0.8.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DATAVERSION="0.8"
+DESCRIPTION="Fast-action multiplayer strategic network game"
+HOMEPAGE="http://www.netpanzer.info/"
+SRC_URI="mirror://sourceforge/netpanzer.berlios/${P}.tar.bz2
+ mirror://sourceforge/netpanzer.berlios/${PN}-data-${DATAVERSION}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="ppc x86"
+IUSE="dedicated"
+
+RDEPEND="dedicated? ( app-misc/screen )
+ media-libs/libsdl[sound,video]
+ media-libs/sdl-mixer
+ media-libs/sdl-image
+ dev-games/physfs"
+DEPEND="${RDEPEND}
+ dev-util/ftjam"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-gcc47.patch
+}
+
+src_configure() {
+ egamesconf
+ cd "${WORKDIR}"/${PN}-data-${DATAVERSION} \
+ && egamesconf
+}
+
+src_compile() {
+ AR="${AR} cru" jam -q || die
+
+ cd "${WORKDIR}"/${PN}-data-${DATAVERSION}
+ jam -q || die
+}
+
+src_install() {
+ jam -sDESTDIR="${D}" -sappdocdir=/usr/share/doc/${PF} install || die
+
+ cd "${WORKDIR}"/${PN}-data-${DATAVERSION}
+ jam -sDESTDIR="${D}" -sappdocdir=/usr/share/doc/${PF} install || die
+
+ if use dedicated ; then
+ newinitd "${FILESDIR}"/${PN}.rc ${PN}
+ sed -i \
+ -e "s:GAMES_USER_DED:${GAMES_USER_DED}:" \
+ -e "s:GENTOO_DIR:${GAMES_BINDIR}:" \
+ "${D}"/etc/init.d/${PN} || die
+
+ insinto /etc
+ doins "${FILESDIR}"/${PN}-ded.ini
+ dogamesbin "${FILESDIR}"/${PN}-ded
+ sed -i \
+ -e "s:GENTOO_DIR:${GAMES_BINDIR}:" \
+ "${D}/${GAMES_BINDIR}"/${PN}-ded || die
+ fi
+
+ rm -rf "${D}/${GAMES_DATADIR}"/{applications,pixmaps}
+ doicon "${S}"/${PN}.png
+ make_desktop_entry ${PN} NetPanzer
+ prepgamesdirs
+}
diff --git a/games-strategy/openra/Manifest b/games-strategy/openra/Manifest
new file mode 100644
index 00000000000..e6a6a9f584c
--- /dev/null
+++ b/games-strategy/openra/Manifest
@@ -0,0 +1,6 @@
+DIST openra-20120630.tar.gz 10330304 SHA256 f95b9d41ea4b4094ea61519f6fb0185fa242af156e2ec26dc1f2d55197470a3c SHA512 ab5996a3f48d8be227edc029d3fa7948a80756a64bca65d1936c3f4480ef5258cb62365d079cc28ba2be59796db91326c4f8c8d500ea4d2bbf3a8439d783fceb WHIRLPOOL 390b5fa57ef322e6204a23006fc3a7755178d28e115fd52fa4ca5b46ecf58f8df61b44a90ba2fe143a7fadd0be42aaf3488c3b938eaea11171636b562dfe344d
+DIST openra-20130514.tar.gz 12592295 SHA256 0912303c7a02cf3907f618405c3605c56bcf30f053dcbbd110aba7dbad012210 SHA512 a9efddffb74b215cc9f5319f6b4613aa23116d328226c0cb428e8d2be97b03dfe45024c532c34e91d959434700a6170faa91a56b324aa2bfe1f1ce7ce96d46c4 WHIRLPOOL d91b911b76a7e3f6286f50d4d33beb6a7cb3e0035ef8b3331e6033e2487a13be8e8aac70fde30b7cbc139b71bd8bf5259a97ce0a642fcb386a3e5136223322ea
+DIST openra-20131223.tar.gz 10770453 SHA256 408943991ffbba3ac1269cdb88c6080bfd4aa1a7abd3e27b8489294f7e94d541 SHA512 11376994c7c337989fda8eb4daeffc8a2a4ce2db5818d52c905bdf0eb861b330e27b3cc5f4dbb2ab621f0d324dc2daea6bcaeab43d923530410c10ce7aad87ab WHIRLPOOL 5d8b02fdbfe5e5876a1f111794e40df20c1fcd79c2106408bd14b6155a130d128396bd3e5f6ebc7c81000b53f9ac8b9a16e5e5dcbe52a20fd9f5ce48cfacf0ab
+DIST openra-20140608.tar.gz 13536365 SHA256 cacfc1d96f856e63516263922e2c669e549358477d286f33f0828b0815502f96 SHA512 c13ea559b026a308eea6d1190633e25abee6f8272d23f97bf5edb02dfa82d1a65acea2927bf5e1090ab42cc260613aa9612cce4f118f4bbacd254b6cd5f070a6 WHIRLPOOL 4f5b9c8a5477eada39bc920d4d6f3271acc0dfb35f55d6a75509fd2e19570fad571aab45aa74a5addcb8f1f7a3d0c172f7aa1607804963dc510d52cd51b1bd48
+DIST openra-20140722.tar.gz 13894070 SHA256 55dbfdd2ab11f22d9618c15d874f4ab381185dd99d830f03982fc284c71b9dd4 SHA512 d85345057da1b1dc02a47b5923b0bd28d57713d0e8b180aee113d956559850751f0b8c4a900d0802b2f1992039d3b6a55f51d4a64392b7ba554f5f1fe3ad1fda WHIRLPOOL 6ee575d74b2fdc83bd7ad3c5f75d3bde45490bc398fb22a7981794b3bce65c18200d3cd6252eb4a8f9af81bc9126fb5a99f260feaf5f23e4833147dfed3387dc
+DIST openra-20141029.tar.gz 15340674 SHA256 4c3f8224a7ad9d3cb78c3ce2696850246ba0d9703cbd91bf5a42806b09c26a36 SHA512 44594ec3c3a590ae29b0291fdf2292c72ba920dff7892cc269e729a161505c4bc0c5c682bf3c6d3cabb0cdebfa3cac5975eeeeec3f5a673e948ed28132c4a313 WHIRLPOOL 39e4585500c9963b02e42d62829bbc258d83b0050e56f56a90da8292d0c31b0c2d5d68c8eefb8bba22ac1dc719671cee7b7ffe9909bbd9d4d146982108c6e530
diff --git a/games-strategy/openra/files/README.gentoo b/games-strategy/openra/files/README.gentoo
new file mode 100644
index 00000000000..33502af0f9d
--- /dev/null
+++ b/games-strategy/openra/files/README.gentoo
@@ -0,0 +1,111 @@
+OpenRA is a Libre/Free Real Time Strategy game engine supporting early
+Westwood games like Command & Conquer and Command & Conquer: Red Alert.
+
+Distributed mods include a reimagining and updating of both the Red
+Alert and Command & Conquer multiplayer games.
+
+You may run the game from desktop games menu or just manually
+run the game with `mono OpenRA.Game.exe Game.Mods=ra` for Red Alert
+or `mono OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer.
+
+If you have problems starting the game consider switching to
+alternative Cg Renderer. You may run the game with alternative
+Cg Graphics Renderer from desktop games menu or by adding
+`Graphics.Renderer=Cg` parameter explicitly to above console commands
+ (convenient for some integrated graphics cards).
+To run explicitly with a default one use `Graphics.Renderer=Gl`
+parameter. The default Graphics Renderer is a better one, so
+don't forget to upgrade your graphics hardware drivers to the
+latest version. For Cg renderer also try to upgrade nvidia-cg-toolkit
+too.
+
+The RA packages will need to be extracted to ~/.openra/Content/ra/
+before the RA mod will actually work. The C&C packages will need
+to be extracted to ~/.openra/Contet/cnc/ for C&C mod. You may
+execute OpenRA and it will suggest to download content from original
+CD or a minimal one from OpenRA site automatically. You may also try
+to download minimal content pack from OpenRA site manually by using
+OpenRA Utility:
+
+cd /usr/share/games/openra
+mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=ra-packages,/tmp/ra-packages.zip
+mono OpenRA.Utility.exe --extract-zip=/tmp/ra-packages.zip,~/.openra/Content/ra/
+
+The same commands for C&C mod:
+mono OpenRA.Utility.exe --download-url=http://open-ra.org/get-dependency.php?file=cnc-packages,/tmp/cnc-packages.zip
+mono OpenRA.Utility.exe --extract-zip=/tmp/cnc-packages.zip,~/.openra/Content/cnc/
+
+But the better choice is to download a full pack from original game CD
+(or iso). However, full CD pack usage result in slower game start from
+OpenRA Lobby. It happens due to a lot of unnecessary things like video
+clips were pre-packaged in it. If you want optimal game start and all
+music themes (made by Frank Klepacki) from classic CD you should
+download them from OpenRA Forum:
+http://www.sleipnirstuff.com/forum/viewtopic.php?f=83&t=15063
+
+The minimal required files for the Red Alert mod are:
+EITHER:
+ * conquer.mix
+ * temperat.mix
+ * interior.mix
+ * snow.mix
+ * sounds.mix
+ * allies.mix
+ * russian.mix
+OR: (Usually pretty long game start)
+ * main.mix
+AND:
+ * redalert.mix
+
+The minimal required files for the Command and Conquer mod are:
+ * cclocal.mix
+ * speech.mix
+ * conquer.mix
+ * sounds.mix
+ * tempicnh.mix
+ * temperat.mix
+ * winter.mix
+ * desert.mix
+
+If you have a case-sensitive filesystem you must change the filenames to
+lower case.
+
+Red Alert and C&C have been released by EA Games as freeware. They could be
+downloaded from http://www.commandandconquer.com/classic
+Unfortunately the installer is 16-bit and so won’t run on 64-bit operating
+systems. This can be worked around by using the Red Alert Setup Manager
+ (http://ra.afraid.org/html/downloads/utilities-3.html).
+Make sure you apply the no-CD protection fix so all the files needed
+are installed to the hard drive.
+
+If your notebook doesn't show long battery life under OpenRA load you can
+do several things:
+1. Turn off "Show Shellmap" item under General tab of Settings menu.
+2. Edit ~/.openra/settings.yaml in the "Graphics:" section to add
+framelimiter. Add "CapFramerate: True" string there to enable framelimiter.
+The default setting is 60 frames per second. You can change it's value by
+adding "MaxFramerate: 70", for example, string in that section. Be careful
+with special tab symbols at the beginning of the strings. Don't forget to
+backup your settings file.
+
+Please note: OpenRA has 2 types of released versions:
+1. Release Versions or just Versions.
+2. Unstable Playtests Versions or just Playtests.
+Release Versions are considered as more stable ones. Playtests are also
+pretty stable in most cases but they have usually more features wich are
+needed to be tested before inclusion into release. So, if you have any
+problems, please report them to the IRC channel #openra on irc.freenode.net
+(Use http://webchat.freenode.net/ if you don't have IRC client)
+or to the bug-tracker (http://bugs.open-ra.org).
+
+You may also see servers list with
+http://master.open-ra.org/list.php
+or by using orabot on IRC channel:
+]games (or !games)
+to see the games wich are waiting to start or
+]games --all
+to see all games.
+
+Please read HACKING for an overview of the engine and read OpenRA Wiki
+page for more info about the game and it's development:
+https://github.com/OpenRA/OpenRA/wiki
diff --git a/games-strategy/openra/files/openra-20120630-sound.patch b/games-strategy/openra/files/openra-20120630-sound.patch
new file mode 100644
index 00000000000..9bea3ee7fb9
--- /dev/null
+++ b/games-strategy/openra/files/openra-20120630-sound.patch
@@ -0,0 +1,18 @@
+Date: Sun Jul 1 00:34:03 UTC 2012
+Subject: https://github.com/OpenRA/OpenRA/issues/2005
+
+fixed in https://github.com/OpenRA/OpenRA/commit/c068be453a9bcb7bc1fdd5874dc1296b6f4810d0#diff-0
+
+--- OpenRA.FileFormats/FieldLoader.cs
++++ OpenRA.FileFormats/FieldLoader.cs
+@@ -325,6 +325,10 @@
+ ((int)c.B).Clamp(0, 255));
+ }
+
++ // Don't save floats in settings.yaml using country-specific decimal separators which can be misunderstood as group seperators.
++ if (t == typeof(float))
++ return ((float)v).ToString(CultureInfo.InvariantCulture);
++
+ if (t == typeof(Rectangle))
+ {
+ var r = (Rectangle)v;
diff --git a/games-strategy/openra/files/openra-20130514-makefile.patch b/games-strategy/openra/files/openra-20130514-makefile.patch
new file mode 100644
index 00000000000..537b688c7df
--- /dev/null
+++ b/games-strategy/openra/files/openra-20130514-makefile.patch
@@ -0,0 +1,382 @@
+https://github.com/OpenRA/OpenRA/pull/3500
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,34 +1,69 @@
++############################# INSTRUCTIONS #############################
++#
++# to compile, run:
++# make
++#
++# to compile with development tools, run:
++# make all
++#
++# to install, run:
++# make [prefix=/foo] [bindir=/bar/bin] install
++#
++# to install with development tools, run:
++# make [prefix=/foo] [bindir=/bar/bin] install-all
++#
++# to uninstall, run:
++# make uninstall
++#
++# for help, run:
++# make help
++#
++# to start the game, run:
++# openra
++
++
++
++############################## TOOLCHAIN ###############################
++#
+ CSC = gmcs
+ CSFLAGS = -nologo -warn:4 -debug:full -optimize- -codepage:utf8 -unsafe -warnaserror
+ DEFINE = DEBUG;TRACE
+ COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll thirdparty/ICSharpCode.SharpZipLib.dll thirdparty/FuzzyLogicLibrary.dll thirdparty/Mono.Nat.dll
+-PHONY = core tools package all mods clean distclean dependencies version
++
++
++
++######################### UTILITIES/SETTINGS ###########################
++#
++# install locations
++prefix ?= /usr/local
++datarootdir ?= $(prefix)/share
++datadir ?= $(datarootdir)
++bindir ?= $(prefix)/bin
++BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
++DATA_INSTALL_DIR = $(DESTDIR)$(datadir)/openra
++
++# install tools
++RM = rm
++RM_R = $(RM) -r
++RM_F = $(RM) -f
++CP = cp
++CP_R = $(CP) -r
++INSTALL = install
++INSTALL_DIR = $(INSTALL) -d
++INSTALL_PROGRAM = $(INSTALL) -m755
++INSTALL_DATA = $(INSTALL) -m644
++
++# program targets
++CORE = fileformats rcg rgl rsdl rnull game utility
++TOOLS = editor tsbuild ralint
++
+ VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
+
+-.SUFFIXES:
+-core: game renderers mods utility tsbuild
+-tools: editor ralint tsbuild
+-package: dependencies core editor docs version
+-mods: mod_ra mod_cnc mod_d2k
+-all: dependencies core tools
+-clean:
+- @-rm -f *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
+-distclean: clean
+-dependencies:
+- @ cp -r thirdparty/*.dl* .
+- @ cp -r thirdparty/Tao/* .
+-version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml
+- @for i in $? ; do \
+- awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
+- mv -f $${i}.tmp $${i} ; \
+- done
+-default: dependencies core
+-
+-.DEFAULT_GOAL := default
+-
++
++
++######################## PROGRAM TARGET RULES ##########################
+ #
+ # Core binaries
+-#
+ fileformats_SRCS := $(shell find OpenRA.FileFormats/ -iname '*.cs')
+ fileformats_TARGET = OpenRA.FileFormats.dll
+ fileformats_KIND = library
+@@ -39,16 +74,14 @@
+ game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
+ game_TARGET = OpenRA.Game.exe
+ game_KIND = winexe
+-game_DEPS = $(fileformats_TARGET)
++game_DEPS = $(fileformats_TARGET)
+ game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \
+ thirdparty/Tao/Tao.OpenAl.dll thirdparty/SharpFont.dll
+ game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
+ PROGRAMS += game
+ game: $(game_TARGET)
+
+-#
+ # Renderer dlls
+-#
+ rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs')
+ rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll
+ rsdl_KIND = library
+@@ -82,19 +115,18 @@
+ PROGRAMS += rcg rgl rnull rsdl
+ renderers: $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) $(rsdl_TARGET)
+
+-#
+-# Official Mods
+-#
+-# Red Alert
++
++##### Official Mods #####
+
+ STD_MOD_LIBS = $(fileformats_TARGET) $(game_TARGET)
+ STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET)
+
++# Red Alert
+ mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs')
+ mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
+ mod_ra_KIND = library
+-mod_ra_DEPS = $(STD_MOD_DEPS)
+-mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS)
++mod_ra_DEPS = $(STD_MOD_DEPS) $(utility_TARGET)
++mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(utility_TARGET)
+ mod_ra_EXTRA_CMDS = mono --debug RALint.exe ra
+ PROGRAMS += mod_ra
+ mod_ra: $(mod_ra_TARGET)
+@@ -119,9 +151,9 @@
+ PROGRAMS += mod_d2k
+ mod_d2k: $(mod_d2k_TARGET)
+
+-#
+-# Tools
+-#
++
++##### Tools #####
++
+ # Map Editor
+ editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
+ editor_TARGET = OpenRA.Editor.exe
+@@ -163,13 +195,8 @@
+ resgen2 OpenRA.TilesetBuilder/Surface.resx OpenRA.TilesetBuilder.Surface.resources 1> /dev/null
+ tsbuild: OpenRA.TilesetBuilder.frmBuilder.resources OpenRA.TilesetBuilder.frmNew.resources OpenRA.TilesetBuilder.Surface.resources $(tsbuild_TARGET)
+
+-#
+-# Launchers / Utilities
+-#
+-# Patches binary headers to work around a mono bug
+-fixheader.exe: packaging/fixheader.cs
+- @echo CSC fixheader.exe
+- @$(CSC) packaging/fixheader.cs $(CSFLAGS) -out:fixheader.exe -t:exe $(COMMON_LIBS:%=-r:%)
++
++##### Launchers / Utilities #####
+
+ # Backend for the launcher apps - queries game/mod info and applies actions to an install
+ utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs')
+@@ -180,11 +207,13 @@
+ PROGRAMS += utility
+ utility: $(utility_TARGET)
+
+-.PHONY: $(PHONY) $(PROGRAMS)
+-
+-#
++
++# Patches binary headers to work around a mono bug
++fixheader.exe: packaging/fixheader.cs
++ @echo CSC fixheader.exe
++ @$(CSC) packaging/fixheader.cs $(CSFLAGS) -out:fixheader.exe -t:exe $(COMMON_LIBS:%=-r:%)
++
+ # Generate build rules for each target defined above in PROGRAMS
+-#
+ define BUILD_ASSEMBLY
+
+ $$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS) fixheader.exe
+@@ -203,68 +232,67 @@
+ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
+
+
+-#
+-# Install / Uninstall for *nix
+-#
+-prefix ?= /usr/local
+-datarootdir ?= $(prefix)/share
+-datadir ?= $(datarootdir)
+-bindir ?= $(prefix)/bin
+-BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
+-INSTALL_DIR = $(DESTDIR)$(datadir)/openra
+-INSTALL = install
+-INSTALL_PROGRAM = $(INSTALL)
+-CORE = fileformats rcg rgl rsdl rnull game editor utility tsbuild
++
++########################## MAKE/INSTALL RULES ##########################
++#
++default: dependencies core
++
++core: game renderers mods utility tsbuild
++
++tools: editor tsbuild ralint
++
++package: dependencies core editor docs version
++
++mods: mod_ra mod_cnc mod_d2k
++
++all: dependencies core tools
++
++clean:
++ @-$(RM_F) *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
++
++distclean: clean
++
++dependencies:
++ @ $(CP_R) thirdparty/*.dl* .
++ @ $(CP_R) thirdparty/Tao/* .
++
++version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml
++ @for i in $? ; do \
++ awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
++ mv -f $${i}.tmp $${i} ; \
++ done
+
+ # Documentation (d2k depends on all mod libraries)
+-docs:
++docs: utility
+ @mono --debug OpenRA.Utility.exe --docs d2k > DOCUMENTATION.md
+
+-install: all
+- @-echo "Installing OpenRA to $(INSTALL_DIR)"
+- @$(INSTALL_PROGRAM) -d $(INSTALL_DIR)
+- @$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
+- @$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
+- @$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(INSTALL_DIR)/mods/cnc
+- @$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/ra
+- @$(INSTALL_PROGRAM) $(mod_ra_TARGET) $(INSTALL_DIR)/mods/ra
+- @$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/d2k
+- @$(INSTALL_PROGRAM) $(mod_d2k_TARGET) $(INSTALL_DIR)/mods/d2k
+-
+- @-cp $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc
+- @cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc
+- @cp -r mods/cnc/chrome $(INSTALL_DIR)/mods/cnc
+- @cp -r mods/cnc/bits $(INSTALL_DIR)/mods/cnc
+- @cp -r mods/cnc/rules $(INSTALL_DIR)/mods/cnc
+- @cp -r mods/cnc/sequences $(INSTALL_DIR)/mods/cnc
+- @cp -r mods/cnc/tilesets $(INSTALL_DIR)/mods/cnc
+- @cp -r mods/cnc/uibits $(INSTALL_DIR)/mods/cnc
+-
+- @-cp $(foreach f,$(shell ls mods/ra --hide=*.dll),mods/ra/$(f)) $(INSTALL_DIR)/mods/ra
+- @cp -r mods/ra/maps $(INSTALL_DIR)/mods/ra
+- @cp -r mods/ra/bits $(INSTALL_DIR)/mods/ra
+- @cp -r mods/ra/chrome $(INSTALL_DIR)/mods/ra
+- @cp -r mods/ra/rules $(INSTALL_DIR)/mods/ra
+- @cp -r mods/ra/tilesets $(INSTALL_DIR)/mods/ra
+- @cp -r mods/ra/uibits $(INSTALL_DIR)/mods/ra
+-
+- @-cp $(foreach f,$(shell ls mods/d2k --hide=*.dll),mods/d2k/$(f)) $(INSTALL_DIR)/mods/d2k
+- @cp -r mods/d2k/maps $(INSTALL_DIR)/mods/d2k
+- @cp -r mods/d2k/bits $(INSTALL_DIR)/mods/d2k
+- @cp -r mods/d2k/chrome $(INSTALL_DIR)/mods/d2k
+- @cp -r mods/d2k/rules $(INSTALL_DIR)/mods/d2k
+- @cp -r mods/d2k/tilesets $(INSTALL_DIR)/mods/d2k
+- @cp -r mods/d2k/uibits $(INSTALL_DIR)/mods/d2k
+-
+- @cp -r glsl $(INSTALL_DIR)
+- @cp -r cg $(INSTALL_DIR)
+- @cp *.ttf $(INSTALL_DIR)
+- @cp thirdparty/Tao/* $(INSTALL_DIR)
+- @$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll $(INSTALL_DIR)
+- @$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll $(INSTALL_DIR)
+- @$(INSTALL_PROGRAM) thirdparty/SharpFont.dll $(INSTALL_DIR)
+- @cp thirdparty/SharpFont.dll.config $(INSTALL_DIR)
+- @$(INSTALL_PROGRAM) thirdparty/Mono.Nat.dll $(INSTALL_DIR)
++install: install-core
++
++install-all: install-core install-tools
++
++install-core: default
++ @-echo "Installing OpenRA to $(DATA_INSTALL_DIR)"
++ @$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
++ @$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
++ @$(INSTALL_DIR) "$(DATA_INSTALL_DIR)/mods"
++ @$(CP_R) mods/cnc "$(DATA_INSTALL_DIR)/mods/"
++ @$(INSTALL_PROGRAM) $(mod_cnc_TARGET) "$(DATA_INSTALL_DIR)/mods/cnc"
++ @$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/"
++ @$(INSTALL_PROGRAM) $(mod_ra_TARGET) "$(DATA_INSTALL_DIR)/mods/ra"
++ @$(CP_R) mods/d2k "$(DATA_INSTALL_DIR)/mods/"
++ @$(INSTALL_PROGRAM) $(mod_d2k_TARGET) "$(DATA_INSTALL_DIR)/mods/d2k"
++
++ @$(INSTALL_DATA) AUTHORS "$(DATA_INSTALL_DIR)/AUTHORS"
++
++ @$(CP_R) glsl "$(DATA_INSTALL_DIR)"
++ @$(CP_R) cg "$(DATA_INSTALL_DIR)"
++ @$(CP) *.ttf "$(DATA_INSTALL_DIR)"
++ @$(CP) thirdparty/Tao/* "$(DATA_INSTALL_DIR)"
++ @$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)"
++ @$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)"
++ @$(INSTALL_PROGRAM) thirdparty/SharpFont.dll "$(DATA_INSTALL_DIR)"
++ @$(CP) thirdparty/SharpFont.dll.config "$(DATA_INSTALL_DIR)"
++ @$(INSTALL_PROGRAM) thirdparty/Mono.Nat.dll "$(DATA_INSTALL_DIR)"
+
+ @echo "#!/bin/sh" > openra
+ @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra
+@@ -273,6 +301,16 @@
+ @echo 'cd "$${DATADIR}/openra"' >> openra
+ @echo 'exec mono OpenRA.Game.exe "$$@"' >> openra
+
++ @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
++ @$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
++
++ @-$(RM) openra
++
++install-tools: tools
++ @-echo "Installing OpenRA tools to $(DATA_INSTALL_DIR)"
++ @$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
++ @$(INSTALL_PROGRAM) $(foreach prog,$(TOOLS),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
++
+ @echo "#!/bin/sh" > openra-editor
+ @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor
+ @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor
+@@ -280,14 +318,42 @@
+ @echo 'cd "$${DATADIR}/openra"' >> openra-editor
+ @echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor
+
+- @$(INSTALL_PROGRAM) -d $(BIN_INSTALL_DIR)
+- @$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR)
+- @$(INSTALL_PROGRAM) -m +rx openra-editor $(BIN_INSTALL_DIR)
+-
+- @-rm openra
+- @-rm openra-editor
++ @$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
++ @$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)"
++
++ @-$(RM) openra-editor
+
+ uninstall:
+- @-rm -r $(INSTALL_DIR)
+- @-rm $(DESTDIR)$(bindir)/openra
+- @-rm $(DESTDIR)$(bindir)/openra-editor
++ @-$(RM_R) "$(DATA_INSTALL_DIR)"
++ @-$(RM_F) "$(BIN_INSTALL_DIR)/openra"
++ @-$(RM_F) "$(BIN_INSTALL_DIR)/openra-editor"
++
++help:
++ @echo to compile, run:
++ @echo \ \ make
++ @echo
++ @echo to compile with development tools, run:
++ @echo \ \ make all
++ @echo
++ @echo to install, run:
++ @echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install
++ @echo
++ @echo to install with development tools, run:
++ @echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install-all
++ @echo
++ @echo to uninstall, run:
++ @echo \ \ make uninstall
++ @echo
++ @echo to start the game, run:
++ @echo \ \ openra
++
++
++
++
++########################### MAKEFILE SETTINGS ##########################
++#
++.DEFAULT_GOAL := default
++
++.SUFFIXES:
++
++.PHONY: core tools package all mods clean distclean dependencies version $(PROGRAMS)
diff --git a/games-strategy/openra/files/openra-20131223-sdl2.patch b/games-strategy/openra/files/openra-20131223-sdl2.patch
new file mode 100644
index 00000000000..acb87e83ae9
--- /dev/null
+++ b/games-strategy/openra/files/openra-20131223-sdl2.patch
@@ -0,0 +1,15 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Tue Dec 24 21:10:12 UTC 2013
+Subject: fix engine detection
+
+--- a/OpenRA.Game/GameRules/Settings.cs
++++ b/OpenRA.Game/GameRules/Settings.cs
+@@ -83,7 +83,7 @@
+
+ public class GraphicSettings
+ {
+- public string Renderer = "Gl";
++ public string Renderer = "Sdl2";
+ public WindowMode Mode = WindowMode.PseudoFullscreen;
+ public int2 FullscreenSize = new int2(0,0);
+ public int2 WindowedSize = new int2(1024, 768);
diff --git a/games-strategy/openra/metadata.xml b/games-strategy/openra/metadata.xml
new file mode 100644
index 00000000000..18bf86dc0db
--- /dev/null
+++ b/games-strategy/openra/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ <description>Maintainer, assign bugs to him</description>
+ </maintainer>
+ <upstream>
+ <changelog>http://openra.res0l.net/news/</changelog>
+ <doc lang="en">https://github.com/OpenRA/OpenRA/wiki</doc>
+ <bugs-to>https://github.com/OpenRA/OpenRA/issues</bugs-to>
+ <remote-id type="github">OpenRA/OpenRA</remote-id>
+ </upstream>
+ <use>
+ <flag name="cg">NVIDIA toolkit plugin</flag>
+ <flag name="tools">Install some development tools
+ such as editor.</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-strategy/openra/openra-20120630.ebuild b/games-strategy/openra/openra-20120630.ebuild
new file mode 100644
index 00000000000..9d469464e71
--- /dev/null
+++ b/games-strategy/openra/openra-20120630.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils mono gnome2-utils vcs-snapshot games
+
+DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert"
+HOMEPAGE="http://open-ra.org/"
+SRC_URI="http://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cg"
+
+DEPEND="dev-dotnet/libgdiplus
+ dev-lang/mono
+ media-libs/freetype:2[X]
+ media-libs/libsdl[X,opengl,video]
+ media-libs/openal
+ virtual/jpeg
+ virtual/opengl
+ cg? ( >=media-gfx/nvidia-cg-toolkit-2.1.0017 )"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ vcs-snapshot_src_unpack
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sound.patch
+
+ # register game-version
+ sed \
+ -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
+ -i mods/{ra,cnc}/mod.yaml || die
+}
+
+src_compile() {
+ emake all
+}
+
+src_install() {
+ emake \
+ datadir="${GAMES_DATADIR}" \
+ bindir="${GAMES_BINDIR}" \
+ libdir="$(games_get_libdir)/${PN}" \
+ DESTDIR="${D}" \
+ install
+
+ # icons
+ insinto /usr/share/icons/
+ doins -r packaging/linux/hicolor
+
+ # desktop entries
+ local myrenderer=$(usex cg Cg Gl)
+ make_desktop_entry "${PN} Game.Mods=cnc Graphics.Renderer=${myrenderer}" \
+ "OpenRA CNC" ${PN}
+ make_desktop_entry "${PN} Game.Mods=ra Graphics.Renderer=${myrenderer}" \
+ "OpenRA RA" ${PN}
+ make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
+
+ dodoc "${FILESDIR}"/README.gentoo README HACKING CHANGELOG
+
+ # file permissions
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ if ! use cg ; then
+ elog "If you have problems starting the game consider switching"
+ elog "to Graphics.Renderer=Cg in openra*.desktop or manually"
+ elog "run:"
+ elog "${PN} Game.Mods=\$mod Graphics.Renderer=Cg"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/openra/openra-20130514-r1.ebuild b/games-strategy/openra/openra-20130514-r1.ebuild
new file mode 100644
index 00000000000..198236e3262
--- /dev/null
+++ b/games-strategy/openra/openra-20130514-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils mono-env gnome2-utils vcs-snapshot games
+
+DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert"
+HOMEPAGE="http://open-ra.org/"
+SRC_URI="https://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cg tools"
+
+DEPEND="dev-dotnet/libgdiplus
+ dev-lang/mono
+ media-libs/freetype:2[X]
+ media-libs/libsdl[X,opengl,video]
+ media-libs/openal
+ virtual/jpeg
+ virtual/opengl
+ cg? ( >=media-gfx/nvidia-cg-toolkit-2.1.0017 )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ games_pkg_setup
+}
+
+src_unpack() {
+ vcs-snapshot_src_unpack
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+
+ # register game-version
+ sed \
+ -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
+ -i mods/{ra,cnc,d2k}/mod.yaml || die
+}
+
+src_compile() {
+ emake $(usex tools "all" "")
+}
+
+src_install() {
+ emake \
+ datadir="${GAMES_DATADIR}" \
+ bindir="${GAMES_BINDIR}" \
+ libdir="$(games_get_libdir)/${PN}" \
+ DESTDIR="${D}" \
+ $(usex tools "install-all" "install")
+
+ # icons
+ insinto /usr/share/icons/
+ doins -r packaging/linux/hicolor
+
+ # desktop entries
+ local myrenderer=$(usex cg Cg Gl)
+ make_desktop_entry "${PN} Game.Mods=cnc Graphics.Renderer=${myrenderer}" \
+ "OpenRA CNC" ${PN}
+ make_desktop_entry "${PN} Game.Mods=ra Graphics.Renderer=${myrenderer}" \
+ "OpenRA RA" ${PN}
+ make_desktop_entry "${PN} Game.Mods=d2k Graphics.Renderer=${myrenderer}" \
+ "OpenRA Dune2k" ${PN}
+ make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
+
+ dodoc "${FILESDIR}"/README.gentoo README.md HACKING CHANGELOG
+
+ # file permissions
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ if ! use cg ; then
+ elog "If you have problems starting the game consider switching"
+ elog "to Graphics.Renderer=Cg in openra*.desktop or manually"
+ elog "run:"
+ elog "${PN} Game.Mods=\$mod Graphics.Renderer=Cg"
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/openra/openra-20131223-r1.ebuild b/games-strategy/openra/openra-20131223-r1.ebuild
new file mode 100644
index 00000000000..a6d7ef30111
--- /dev/null
+++ b/games-strategy/openra/openra-20131223-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils mono-env gnome2-utils vcs-snapshot games
+
+DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert"
+HOMEPAGE="http://open-ra.org/"
+SRC_URI="https://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="tools"
+
+DEPEND="dev-dotnet/libgdiplus
+ dev-lang/mono
+ media-libs/freetype:2[X]
+ || (
+ media-libs/libsdl[X,opengl,video]
+ media-libs/libsdl2[X,opengl,video]
+ )
+ media-libs/openal
+ virtual/jpeg
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ games_pkg_setup
+}
+
+src_unpack() {
+ vcs-snapshot_src_unpack
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sdl2.patch
+ # register game-version
+ sed \
+ -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
+ -i mods/{ra,cnc,d2k}/mod.yaml || die
+}
+
+src_compile() {
+ emake $(usex tools "all" "")
+}
+
+src_install() {
+ emake \
+ bindir="${GAMES_BINDIR}" \
+ libexecdir="$(games_get_libdir)" \
+ DESTDIR="${D}" \
+ $(usex tools "install-all" "install")
+
+ # icons
+ insinto /usr/share/icons/
+ doins -r packaging/linux/hicolor
+
+ # desktop entries
+ make_desktop_entry "${PN} Game.Mods=cnc" "OpenRA CNC" ${PN}
+ make_desktop_entry "${PN} Game.Mods=ra" "OpenRA RA" ${PN}
+ make_desktop_entry "${PN} Game.Mods=d2k" "OpenRA Dune2k" ${PN}
+ make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
+
+ dodoc "${FILESDIR}"/README.gentoo README.md CHANGELOG
+
+ # file permissions
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ elog "optional dependencies:"
+ elog " media-gfx/nvidia-cg-toolkit (fallback renderer if OpenGL fails)"
+ elog
+ elog "you might also want to emerge media-libs/libsdl2 specifically,"
+ elog "because ${PN} supports both sdl1.2 and sdl2, but the ebuild only"
+ elog "pulls in one of them, prefering sdl1.2."
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/openra/openra-20140608.ebuild b/games-strategy/openra/openra-20140608.ebuild
new file mode 100644
index 00000000000..dec5437088b
--- /dev/null
+++ b/games-strategy/openra/openra-20140608.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils mono-env gnome2-utils vcs-snapshot games
+
+DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert"
+HOMEPAGE="http://open-ra.org/"
+SRC_URI="https://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tools"
+
+QA_PREBUILT="$(games_get_libdir)/openra/liblua*"
+
+DEPEND="dev-dotnet/libgdiplus
+ dev-lang/mono
+ media-libs/freetype:2[X]
+ media-libs/libsdl2[X,opengl,video]
+ media-libs/openal
+ virtual/jpeg
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ games_pkg_setup
+}
+
+src_unpack() {
+ vcs-snapshot_src_unpack
+}
+
+src_configure() { :; }
+
+src_prepare() {
+ # register game-version
+ sed \
+ -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
+ -i mods/{ra,cnc,d2k}/mod.yaml || die
+}
+
+src_compile() {
+ emake $(usex tools "all" "")
+ emake native-dependencies
+ emake docs
+}
+
+src_install() {
+ emake \
+ datadir="/usr/share" \
+ bindir="${GAMES_BINDIR}" \
+ libdir="$(games_get_libdir)" \
+ DESTDIR="${D}" \
+ $(usex tools "install-all" "install") install-linux-scripts
+
+ exeinto "$(games_get_libdir)/openra"
+ doexe Eluant.dll.config liblua$(usex amd64 "64" "32")*
+
+ # icons
+ insinto /usr/share/icons/
+ doins -r packaging/linux/hicolor
+
+ # desktop entries
+ make_desktop_entry "${PN} Game.Mods=cnc" "OpenRA CNC" ${PN}
+ make_desktop_entry "${PN} Game.Mods=ra" "OpenRA RA" ${PN}
+ make_desktop_entry "${PN} Game.Mods=d2k" "OpenRA Dune2k" ${PN}
+ make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
+
+ dodoc "${FILESDIR}"/README.gentoo README.md CONTRIBUTING.md AUTHORS \
+ DOCUMENTATION.md Lua-API.md
+
+ # file permissions
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ elog "optional dependencies:"
+ elog " media-gfx/nvidia-cg-toolkit (fallback renderer if OpenGL fails)"
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/openra/openra-20140722.ebuild b/games-strategy/openra/openra-20140722.ebuild
new file mode 100644
index 00000000000..deca771a8c0
--- /dev/null
+++ b/games-strategy/openra/openra-20140722.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils mono-env gnome2-utils vcs-snapshot games
+
+DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert"
+HOMEPAGE="http://open-ra.org/"
+SRC_URI="https://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="tools"
+
+QA_PREBUILT="$(games_get_libdir)/openra/liblua*"
+
+DEPEND="dev-dotnet/libgdiplus
+ dev-lang/mono
+ media-libs/freetype:2[X]
+ media-libs/libsdl2[X,opengl,video]
+ media-libs/openal
+ virtual/jpeg
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ games_pkg_setup
+}
+
+src_unpack() {
+ vcs-snapshot_src_unpack
+}
+
+src_configure() { :; }
+
+src_prepare() {
+ # register game-version
+ sed \
+ -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
+ -i mods/{ra,cnc,d2k}/mod.yaml || die
+}
+
+src_compile() {
+ emake $(usex tools "all" "")
+ emake native-dependencies
+ emake docs
+}
+
+src_install() {
+ emake \
+ datadir="/usr/share" \
+ bindir="${GAMES_BINDIR}" \
+ libdir="$(games_get_libdir)" \
+ DESTDIR="${D}" \
+ $(usex tools "install-all" "install") install-linux-scripts
+
+ exeinto "$(games_get_libdir)/openra"
+ doexe Eluant.dll.config liblua$(usex amd64 "64" "32")*
+
+ # icons
+ insinto /usr/share/icons/
+ doins -r packaging/linux/hicolor
+
+ # desktop entries
+ make_desktop_entry "${PN} Game.Mods=cnc" "OpenRA CNC" ${PN}
+ make_desktop_entry "${PN} Game.Mods=ra" "OpenRA RA" ${PN}
+ make_desktop_entry "${PN} Game.Mods=d2k" "OpenRA Dune2k" ${PN}
+ make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
+
+ dodoc "${FILESDIR}"/README.gentoo README.md CONTRIBUTING.md AUTHORS \
+ DOCUMENTATION.md Lua-API.md
+
+ # file permissions
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ elog "optional dependencies:"
+ elog " media-gfx/nvidia-cg-toolkit (fallback renderer if OpenGL fails)"
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/openra/openra-20141029.ebuild b/games-strategy/openra/openra-20141029.ebuild
new file mode 100644
index 00000000000..dec5437088b
--- /dev/null
+++ b/games-strategy/openra/openra-20141029.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils mono-env gnome2-utils vcs-snapshot games
+
+DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert"
+HOMEPAGE="http://open-ra.org/"
+SRC_URI="https://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tools"
+
+QA_PREBUILT="$(games_get_libdir)/openra/liblua*"
+
+DEPEND="dev-dotnet/libgdiplus
+ dev-lang/mono
+ media-libs/freetype:2[X]
+ media-libs/libsdl2[X,opengl,video]
+ media-libs/openal
+ virtual/jpeg
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ games_pkg_setup
+}
+
+src_unpack() {
+ vcs-snapshot_src_unpack
+}
+
+src_configure() { :; }
+
+src_prepare() {
+ # register game-version
+ sed \
+ -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
+ -i mods/{ra,cnc,d2k}/mod.yaml || die
+}
+
+src_compile() {
+ emake $(usex tools "all" "")
+ emake native-dependencies
+ emake docs
+}
+
+src_install() {
+ emake \
+ datadir="/usr/share" \
+ bindir="${GAMES_BINDIR}" \
+ libdir="$(games_get_libdir)" \
+ DESTDIR="${D}" \
+ $(usex tools "install-all" "install") install-linux-scripts
+
+ exeinto "$(games_get_libdir)/openra"
+ doexe Eluant.dll.config liblua$(usex amd64 "64" "32")*
+
+ # icons
+ insinto /usr/share/icons/
+ doins -r packaging/linux/hicolor
+
+ # desktop entries
+ make_desktop_entry "${PN} Game.Mods=cnc" "OpenRA CNC" ${PN}
+ make_desktop_entry "${PN} Game.Mods=ra" "OpenRA RA" ${PN}
+ make_desktop_entry "${PN} Game.Mods=d2k" "OpenRA Dune2k" ${PN}
+ make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
+
+ dodoc "${FILESDIR}"/README.gentoo README.md CONTRIBUTING.md AUTHORS \
+ DOCUMENTATION.md Lua-API.md
+
+ # file permissions
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ elog "optional dependencies:"
+ elog " media-gfx/nvidia-cg-toolkit (fallback renderer if OpenGL fails)"
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/outerspace/Manifest b/games-strategy/outerspace/Manifest
new file mode 100644
index 00000000000..3ccff6313b8
--- /dev/null
+++ b/games-strategy/outerspace/Manifest
@@ -0,0 +1,2 @@
+DIST outerspace-0.5.68.tar.gz 2249703 SHA256 6ca1ab9f9954821631d150ada07143f84f01eb9eb7773d1656121f657870be01 SHA512 dc2cbebf16fefabcc3356efb496766b90a5eabbf218f085fdc83cf956ca9503e99ef3154e0905c2432a3bf7caabd1f2af585a43397ba368581cd66546fcddc6b WHIRLPOOL cd72366bed75a5eb0a74dfaa8003b47cfa6b5f743b41c427135e965b44f9552bb88aa48203c987fe355824698019d0fe994983c2cfa751679315391fd90aa8f6
+DIST outerspace_0.5.68-0ubuntu1_all.deb 2634188 SHA256 c750f5ab5b124477f59e419f5146548231a48ee3a695a0b7a923628b836e1661 SHA512 9520cf1207a59497d6253b42bc34d580f9b805cf4ae55a5c921082e965892aa67921c4624ea94a5145c911dc2b24a1cca2806c06770ef8d1ded10855fb42666c WHIRLPOOL 137d44d414c3572a7dbbdf16556c499a7132739407407f3f71ee32af2f3671a9c7ec6ae853122cabc466d8963df090fe8b3bfb9881bd643bb498c992304e0e3b
diff --git a/games-strategy/outerspace/files/outerspace b/games-strategy/outerspace/files/outerspace
new file mode 100644
index 00000000000..2a6bbe26daf
--- /dev/null
+++ b/games-strategy/outerspace/files/outerspace
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+mkdir -p ~/.outerspace
+cd ~/.outerspace || exit 1
+
+ln -sf "@GENTOO_LIBDIR@"/{osc.py,lib,libsrvr} .
+ln -sf "@GENTOO_DATADIR@"/res .
+
+exec python osc.py "$@"
diff --git a/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
new file mode 100644
index 00000000000..202c53bc7ee
--- /dev/null
+++ b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
@@ -0,0 +1,83 @@
+--- setup.py
++++ setup.py
+@@ -42,12 +42,7 @@
+
+ # collect data files
+ data_files = []
+-data_files.append(
+- (
+- ".",
+- ["../ChangeLog.txt", "../COPYING", "../README", "../README_CZ"]
+- )
+-)
++
+
+ # resources
+ for root, dirs, files in os.walk('res'):
+@@ -57,16 +52,6 @@
+ pass
+ if files:
+ data_files.append((root, [os.path.join(root, file) for file in files]))
+-
+-data_files.append(
+- (
+- "res/techspec",
+- [
+- "../server/lib/ige/ospace/Rules/techs.spf",
+- "../server/lib/ige/ospace/Rules/Tech.spf",
+- ]
+- )
+-)
+
+ if havePy2Exe:
+ data_files.append((".", ["../updater/update.exe"]))
+@@ -114,10 +99,3 @@
+ **extraArgs
+ )
+
+-# cleanup
+-def onerror(func, path, err):
+- if func is os.remove:
+- os.chmod(path, stat.S_IWRITE)
+- os.remove(path)
+-
+-shutil.rmtree("libsrvr", onerror = onerror)
+--- osc.py
++++ osc.py
+@@ -23,12 +23,36 @@
+ # tweak PYTHONPATH
+ import sys
+ import os
++import errno
+ sys.path.insert(0, "lib")
+
+ for item in ("libsrvr", "../server/lib"):
+ if os.path.exists(item):
+ sys.path.insert(0, item)
+ break
++
++userdir=os.path.expanduser("~/.outerspace")
++resdir=os.path.join(userdir, "res")
++rootresdir="@GENTOO_DATADIR@/res"
++
++if not (os.path.isdir(userdir)):
++ try:
++ os.makedirs(userdir)
++ except:
++ sys.exit("unable to create %s" % userdir)
++
++try:
++ os.symlink(rootresdir, resdir)
++except OSError, e:
++ if e.errno == errno.EEXIST:
++ os.remove(resdir)
++ os.symlink(rootresdir, resdir)
++
++try:
++ os.chdir(userdir)
++except:
++ sys.exit("unable to cd into %s" % userdir)
++
+
+ #configure gc
+ #import gc
diff --git a/games-strategy/outerspace/metadata.xml b/games-strategy/outerspace/metadata.xml
new file mode 100644
index 00000000000..a7960bf9fec
--- /dev/null
+++ b/games-strategy/outerspace/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <longdescription lang="en">
+Outer Space is an on-line strategy game which takes place in the dangerous
+universe. You will become powerful commander of many stars, planets, and great
+fleets and will struggle for survival with other commanders.
+
+Outer Space communicates with the server in the same way as your browser, but
+you will need a special client to play it. Using this client you can create an
+account on the server and you can start to explore the world of the Outer Space.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ospace</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/outerspace/outerspace-0.5.68.ebuild b/games-strategy/outerspace/outerspace-0.5.68.ebuild
new file mode 100644
index 00000000000..a78a4e17f92
--- /dev/null
+++ b/games-strategy/outerspace/outerspace-0.5.68.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils gnome2-utils distutils-r1 games
+
+MY_PN=${PN/outerspace/Outer Space}
+DESCRIPTION="on-line strategy game taking place in the dangerous universe"
+HOMEPAGE="http://www.ospace.net/"
+SRC_URI="mirror://sourceforge/ospace/Client/${PV}/Outer%20Space-${PV}.tar.gz -> ${P}.tar.gz
+ mirror://sourceforge/ospace/Client/${PV}/outerspace_${PV}-0ubuntu1_all.deb"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=dev-python/pygame-1.7"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_unpack() {
+ default
+ unpack ./data.tar.gz
+}
+
+python_install() {
+ distutils-r1_python_install \
+ --install-scripts="${GAMES_BINDIR}" \
+ --install-data="${GAMES_DATADIR}/${PN}" \
+ --install-lib="$(python_get_sitedir)"
+
+ # source tarball is missing files
+ # get them from ubuntu.deb
+ insinto "$(python_get_sitedir)"/ige/ospace/Rules
+ doins "${WORKDIR}"/usr/share/games/outerspace/libsrvr/ige/ospace/Rules/{Tech,techs}.spf
+}
+
+src_prepare() {
+ # fix setup script
+ # rework python start script to avoid shell-wrapper script
+ epatch "${FILESDIR}"/${P}-setup.patch
+
+ sed -i\
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ osc.py || die "sed failed"
+
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ distutils-r1_src_compile
+}
+
+src_install() {
+ distutils-r1_src_install
+ newicon -s 48 res/icon48.png ${PN}.png
+ make_desktop_entry "osc.py" "${MY_PN}"
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ einfo
+ einfo "start the game via 'osc.py'"
+ einfo
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/revenge-of-the-titans/Manifest b/games-strategy/revenge-of-the-titans/Manifest
new file mode 100644
index 00000000000..c341f5cab7b
--- /dev/null
+++ b/games-strategy/revenge-of-the-titans/Manifest
@@ -0,0 +1,2 @@
+DIST revenge-of-the-titans-1.80.12-amd64.tar.gz 60169813 SHA256 ff0c210b39fe8b6c26c42aef822bfb5e8d8646ad875a39727b543d97e516cd0e
+DIST revenge-of-the-titans-1.80.12-i386.tar.gz 60125162 SHA256 c0c8a29bf874285e89811d38d20a163732823373570bf4d7450ac11cd4244c53
diff --git a/games-strategy/revenge-of-the-titans/metadata.xml b/games-strategy/revenge-of-the-titans/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/revenge-of-the-titans/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/revenge-of-the-titans/revenge-of-the-titans-1.80.12.ebuild b/games-strategy/revenge-of-the-titans/revenge-of-the-titans-1.80.12.ebuild
new file mode 100644
index 00000000000..fa8a9754f2a
--- /dev/null
+++ b/games-strategy/revenge-of-the-titans/revenge-of-the-titans-1.80.12.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games java-pkg-2
+
+DESCRIPTION="defeat the returning Titan horde in a series of epic ground battles"
+HOMEPAGE="http://www.puppygames.net/revenge-of-the-titans/"
+SRC_URI="amd64? ( http://downloads.puppygames.net/RevengeOfTheTitans-amd64.tar.gz -> ${P}-amd64.tar.gz )
+ x86? ( http://downloads.puppygames.net/RevengeOfTheTitans-i386.tar.gz -> ${P}-i386.tar.gz )"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6
+ virtual/opengl"
+DEPEND=""
+
+RESTRICT="mirror bindist strip"
+
+S=${WORKDIR}/${PN//-}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ games_pkg_setup
+}
+
+# nothing to do ... stubs for eclasses
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ local dir="${GAMES_PREFIX_OPT}/${PN}"
+
+ insinto "${dir}"
+ doins *.jar
+
+ exeinto "${dir}"
+ doexe *.so revenge.sh
+
+ games_make_wrapper ${PN} ./revenge.sh "${dir}" "${dir}"
+ doicon revenge.png
+ make_desktop_entry ${PN} "Revenge of the Titans" revenge
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ java-pkg-2_pkg_preinst
+ games_pkg_preinst
+}
diff --git a/games-strategy/s25rttr/Manifest b/games-strategy/s25rttr/Manifest
new file mode 100644
index 00000000000..c4abcc387b6
--- /dev/null
+++ b/games-strategy/s25rttr/Manifest
@@ -0,0 +1 @@
+DIST s25rttr-0.8.1.tar.xz 39644940 SHA256 683282a1d7d0549bb3a9db64c14aea111fcef79212461a099a2fe2e3960263bf SHA512 31a7d640e1ecd5488ef02d0ed3adcaeb9b5ae5f6af5e006deb4100fde3eb8ec567e34519e9c2b82f38c9972d62790a6f6978d5da6c6dfca7f1c153fa65f22df2 WHIRLPOOL 6558b6235b805489b8bc16b51175c7f46cc4d4887a088d79680826542b65f73f93bcd5801847b6284390a2f0ddbb112cfdb5decd1fb89a8c6ed585280f2f7de4
diff --git a/games-strategy/s25rttr/files/s25rttr-0.8.1-cmake.patch b/games-strategy/s25rttr/files/s25rttr-0.8.1-cmake.patch
new file mode 100644
index 00000000000..d8cdfedbb9a
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.8.1-cmake.patch
@@ -0,0 +1,160 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Oct 5 13:33:05 UTC 2012
+
+make build system gentoo-compatible
+provide options for SDL and GLFW video drivers
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -19,12 +19,19 @@
+
+ ################################################################################
+
+-INCLUDE(cmake/crosscompile.cmake)
+-
+ PROJECT(s25client)
+
+ ################################################################################
+
++# options
++OPTION(BUILD_GLFW_DRIVER "Build the GLFW video driver" 0)
++OPTION(BUILD_SDL_DRIVER "Build the sdl video driver" 1)
++IF (UNIX)
++ IF (NOT BUILD_SDL_DRIVER AND NOT BUILD_GLFW_DRIVER)
++ MESSAGE(FATAL_ERROR "No video driver selected! Either use SDL or GLFW.")
++ ENDIF (NOT BUILD_SDL_DRIVER AND NOT BUILD_GLFW_DRIVER)
++ENDIF (UNIX)
++
+ SET(PREFIX ${PREFIX} CACHE STRING "Path prefix")
+ SET(BINDIR ${BINDIR} CACHE STRING "Directory for the binaries")
+ SET(DATADIR ${DATADIR} CACHE STRING "Data directory")
+@@ -106,38 +113,6 @@
+ build_paths.h)
+ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build_version.h.cmake"
+ build_version.h)
+-CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build/preinstall.sh.cmake"
+- preinstall.sh @ONLY)
+-CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build/postinstall.sh.cmake"
+- postinstall.sh @ONLY)
+-
+-################################################################################
+-
+-ADD_SUBDIRECTORY(version)
+-
+-ADD_CUSTOM_TARGET(updateversion ALL
+- COMMAND "${CMAKE_BINARY_DIR}/version/src/version" "${CMAKE_SOURCE_DIR}"
+- DEPENDS version
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+-)
+-
+-ADD_CUSTOM_TARGET(mrproper
+- COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/build/cleanup.sh"
+- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+-)
+-
+-ADD_CUSTOM_TARGET(create_nightly
+- COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/release/create_release.sh" "nightly" "${CMAKE_SOURCE_DIR}"
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+-)
+-
+-ADD_CUSTOM_TARGET(create_stable
+- COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/release/create_release.sh" "stable" "${CMAKE_SOURCE_DIR}"
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+-)
+-
+-# preinstall script
+-INSTALL(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/preinstall.cmake")
+
+ ################################################################################
+
+@@ -148,7 +123,6 @@
+ ADD_SUBDIRECTORY(libutil)
+ ADD_SUBDIRECTORY(liblobby)
+ ADD_SUBDIRECTORY(s-c)
+-ADD_SUBDIRECTORY(s25update)
+ ADD_SUBDIRECTORY(src)
+
+ ################################################################################
+@@ -157,7 +131,6 @@
+ INSTALL(CODE "INCLUDE(driver/cmake_install.cmake)")
+ INSTALL(CODE "INCLUDE(libsiedler2/cmake_install.cmake)")
+ INSTALL(CODE "INCLUDE(s-c/cmake_install.cmake)")
+-INSTALL(CODE "INCLUDE(s25update/cmake_install.cmake)")
+ INSTALL(CODE "INCLUDE(src/cmake_install.cmake)")
+
+ # and then dont let him install anything
+--- driver/video/CMakeLists.txt
++++ driver/video/CMakeLists.txt
+@@ -3,7 +3,11 @@
+ #################################################################################
+
+ ADD_SUBDIRECTORY( WinAPI )
+-ADD_SUBDIRECTORY( GLFW )
+-ADD_SUBDIRECTORY( SDL )
++IF(BUILD_GLFW_DRIVER)
++ ADD_SUBDIRECTORY( GLFW )
++ENDIF(BUILD_GLFW_DRIVER)
++IF(BUILD_SDL_DRIVER)
++ ADD_SUBDIRECTORY( SDL )
++ENDIF(BUILD_SDL_DRIVER)
+
+ #################################################################################
+--- driver/video/SDL/src/CMakeLists.txt
++++ driver/video/SDL/src/CMakeLists.txt
+@@ -30,9 +30,9 @@
+ ADD_CUSTOM_COMMAND(TARGET videoSDL POST_BUILD COMMAND ln -fvs SDL/src/${SL_PREFIX}videoSDL${CMAKE_SHARED_LIBRARY_SUFFIX} ../../videoSDL${CMAKE_SHARED_LIBRARY_SUFFIX})
+
+ INSTALL(TARGETS videoSDL
+- RUNTIME DESTINATION ${LIBDIR}/driver/video
+- LIBRARY DESTINATION ${LIBDIR}/driver/video
+- ARCHIVE DESTINATION ${LIBDIR}/driver/video
++ RUNTIME DESTINATION ${LIBDIR}
++ LIBRARY DESTINATION ${LIBDIR}
++ ARCHIVE DESTINATION ${LIBDIR}
+ )
+ ELSE (SDL_FOUND)
+ MESSAGE(WARNING ": SDL library not found: Not building SDL videodriver")
+--- driver/video/GLFW/src/CMakeLists.txt
++++ driver/video/GLFW/src/CMakeLists.txt
+@@ -2,7 +2,7 @@
+ ### $Id$
+ #################################################################################
+
+-IF ("${COMPILEFOR}/${COMPILEARCH}" STREQUAL "linux/i386" )
++IF ("${COMPILEFOR}" STREQUAL "linux" )
+ FIND_LIBRARY(GLFW_LIBRARY glfw)
+
+ IF (GLFW_LIBRARY)
+@@ -21,6 +21,6 @@
+ ELSE (GLFW_LIBRARY)
+ MESSAGE(WARNING ": GLFW library not found: Not building GLFW videodriver")
+ ENDIF (GLFW_LIBRARY)
+-ENDIF ("${COMPILEFOR}/${COMPILEARCH}" STREQUAL "linux/i386" )
++ENDIF ("${COMPILEFOR}" STREQUAL "linux" )
+
+ #################################################################################
+--- driver/audio/SDL/src/CMakeLists.txt
++++ driver/audio/SDL/src/CMakeLists.txt
+@@ -34,9 +34,9 @@
+ ADD_CUSTOM_COMMAND(TARGET audioSDL POST_BUILD COMMAND ln -fvs SDL/src/${SL_PREFIX}audioSDL${CMAKE_SHARED_LIBRARY_SUFFIX} ../../audioSDL${CMAKE_SHARED_LIBRARY_SUFFIX})
+
+ INSTALL(TARGETS audioSDL
+- RUNTIME DESTINATION ${LIBDIR}/driver/audio
+- LIBRARY DESTINATION ${LIBDIR}/driver/audio
+- ARCHIVE DESTINATION ${LIBDIR}/driver/audio
++ RUNTIME DESTINATION ${LIBDIR}
++ LIBRARY DESTINATION ${LIBDIR}
++ ARCHIVE DESTINATION ${LIBDIR}
+ )
+ ELSE (SDLMIXER_FOUND)
+ MESSAGE(WARNING ": SDL_mixer library not found: Not building SDL audiodriver")
+--- build_paths.h.cmake
++++ build_paths.h.cmake
+@@ -41,6 +41,7 @@
+
+ // set game directory (normal $(datadir)/s25rttr/S2)
+ //#define GAMEDIR DATADIR"/S2"
++#cmakedefine GAMEDIR "${GAMEDIR}"
+
+ // set driver directory (normal $(libdir)/driver)
+ //#define DRIVERDIR LIBDIR"/driver"
diff --git a/games-strategy/s25rttr/files/s25rttr-0.8.1-soundconverter.patch b/games-strategy/s25rttr/files/s25rttr-0.8.1-soundconverter.patch
new file mode 100644
index 00000000000..493d7cb404b
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.8.1-soundconverter.patch
@@ -0,0 +1,17 @@
+From: hasufell <julian.ospald@googlemail.com>
+Date: Mon Apr 30 20:42:28 UTC 2012
+
+relocate executables sound-convert and s-c_resample which get installed
+into datadir by default
+
+--- libutil/src/files.h
++++ libutil/src/files.h
+@@ -140,7 +140,7 @@
+ /* 54 */RTTRDIR "", // unbenutzt
+ /* 55 */SETTINGSDIR "/LSTS/SOUND.LST", // Die konvertierte sound.lst
+ /* 56 */RTTRDIR "/sound.scs", // Das konvertier-script
+- /* 57 */RTTRDIR "", // Basispfad fürn Soundconverter
++ /* 57 */DRIVERDIR "", // Basispfad fürn Soundconverter
+ /* 58 */GAMEDIR "/DATA/MIS0BOBS.LST",
+ /* 59 */GAMEDIR "/DATA/MIS1BOBS.LST",
+ /* 60 */GAMEDIR "/DATA/MIS2BOBS.LST",
diff --git a/games-strategy/s25rttr/metadata.xml b/games-strategy/s25rttr/metadata.xml
new file mode 100644
index 00000000000..d916cbb4d0c
--- /dev/null
+++ b/games-strategy/s25rttr/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <changelog>http://www.siedler25.org/index.php?com=dynamic&amp;mod=9&amp;PHPSESSID=e5fa4f90c4db5df0cb1e417e128300b5</changelog>
+ <bugs-to>https://bugs.launchpad.net/s25rttr</bugs-to>
+ </upstream>
+ <use>
+ <flag name='glfw'>Compile another video driver based on <pkg>media-libs/glfw</pkg>.</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/games-strategy/s25rttr/s25rttr-0.8.1.ebuild b/games-strategy/s25rttr/s25rttr-0.8.1.ebuild
new file mode 100644
index 00000000000..799f46d953c
--- /dev/null
+++ b/games-strategy/s25rttr/s25rttr-0.8.1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils gnome2-utils games
+
+DESCRIPTION="Open Source remake of The Settlers II game (needs original game files)"
+HOMEPAGE="http://www.siedler25.org/"
+# no upstream source tarball yet
+# https://bugs.launchpad.net/s25rttr/+bug/1069546
+SRC_URI="http://dev.gentoo.org/~hasufell/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug glfw"
+
+RDEPEND="app-arch/bzip2
+ media-libs/libsamplerate
+ media-libs/libsdl[X,sound,opengl,video]
+ media-libs/libsndfile
+ media-libs/sdl-mixer[vorbis]
+ net-libs/miniupnpc
+ virtual/libiconv
+ virtual/opengl
+ glfw? ( <media-libs/glfw-3 )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cmake.patch \
+ "${FILESDIR}"/${P}-soundconverter.patch
+}
+
+src_configure() {
+ local arch
+ case ${ARCH} in
+ amd64)
+ arch="x86_64" ;;
+ x86)
+ arch="i386" ;;
+ *) die "Architecture ${ARCH} not yet supported" ;;
+ esac
+
+ local mycmakeargs=(
+ -DCOMPILEFOR="linux"
+ -DCOMPILEARCH="${arch}"
+ -DCMAKE_SKIP_RPATH=YES
+ -DPREFIX="${GAMES_PREFIX}"
+ -DBINDIR="${GAMES_BINDIR}"
+ -DDATADIR="${GAMES_DATADIR}"
+ -DLIBDIR="$(games_get_libdir)/${PN}"
+ -DDRIVERDIR="$(games_get_libdir)/${PN}"
+ -DGAMEDIR="~/.${PN}/S2"
+ $(cmake-utils_use_build glfw GLFW_DRIVER)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # work around some relative paths (CMAKE_IN_SOURCE_BUILD not supported)
+ ln -s "${CMAKE_USE_DIR}"/RTTR "${CMAKE_BUILD_DIR}"/RTTR || die
+
+ cmake-utils_src_compile
+
+ mv "${CMAKE_USE_DIR}"/RTTR/{sound-convert,s-c_resample} "${T}"/ || die
+}
+
+src_install() {
+ cd "${CMAKE_BUILD_DIR}" || die
+
+ exeinto "$(games_get_libdir)"/${PN}
+ doexe "${T}"/{sound-convert,s-c_resample}
+ exeinto "$(games_get_libdir)"/${PN}/video
+ doexe driver/video/SDL/src/libvideoSDL.so
+ use glfw && doexe driver/video/GLFW/src/libvideoGLFW.so
+ exeinto "$(games_get_libdir)"/${PN}/audio
+ doexe driver/audio/SDL/src/libaudioSDL.so
+
+ insinto "${GAMES_DATADIR}"
+ doins -r "${CMAKE_USE_DIR}"/RTTR
+ dosym ./LSTS/splash.bmp "${GAMES_DATADIR}"/RTTR/splash.bmp
+
+ doicon -s 64 "${CMAKE_USE_DIR}"/debian/${PN}.png
+ dogamesbin src/s25client
+ make_desktop_entry "s25client" "Settlers RTTR" "${PN}"
+ dodoc RTTR/texte/{keyboardlayout.txt,readme.txt}
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "Copy your Settlers2 game files into ~/.${PN}/S2"
+
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/scorched3d/Manifest b/games-strategy/scorched3d/Manifest
new file mode 100644
index 00000000000..170c7f00279
--- /dev/null
+++ b/games-strategy/scorched3d/Manifest
@@ -0,0 +1 @@
+DIST Scorched3D-44-src.tar.gz 41689613 SHA256 1c8320bb2210030be71dd713c214fbd32f7dd663ea82031383e6b3636f8a8dba SHA512 27341d12ef9db5b64c1051a8abe45cef8a957e26c2cd8928f64c071589052d2857fc6f8104772bb67d5d348aef14122a117d9e00d61e4d9f963f3b5bbe5859ca WHIRLPOOL 6b7c744702b86df856d8879454e7c9616e31dc3a9f539bd97c53cba4bea0e59f44e3c703f847f3cd505ba0e90386887f7134f9500421b3d58ba12a9cc1fdbc0e
diff --git a/games-strategy/scorched3d/files/scorched3d-44-fixups.patch b/games-strategy/scorched3d/files/scorched3d-44-fixups.patch
new file mode 100644
index 00000000000..47499d4cf30
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-fixups.patch
@@ -0,0 +1,25 @@
+--- scorched.orig/configure.ac
++++ scorched/configure.ac
+@@ -13,22 +13,6 @@
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+
+-LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -L/usr/X11R6"
+-CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include -I/usr/X11R6"
+-
+-if test `uname` == Darwin; then
+-LDFLAGS="$LDFLAGS -lmx"
+-CPPFLAGS="$CPPFLAGS -DFFTW_USE_DOUBLE -D__DARWIN__ -D__MACOSX__"
+-else
+-LDFLAGS="$LDFLAGS -L/usr/local/lib"
+-CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+-fi
+-
+-AC_CHECK_LIB(fridge, beer, echo "Hmm?!",[
+- echo "Warning: No beer found in fridge!";
+- echo "We highly suggest that you rectify this situation immediately."
+-])
+-
+ AC_ARG_ENABLE(serveronly,
+ [ --enable-serveronly Enable server only compilation],
+ , enable_serveronly=no,
diff --git a/games-strategy/scorched3d/files/scorched3d-44-freetype.patch b/games-strategy/scorched3d/files/scorched3d-44-freetype.patch
new file mode 100644
index 00000000000..93c8ca358b3
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-freetype.patch
@@ -0,0 +1,45 @@
+--- acinclude.m4.orig
++++ acinclude.m4
+@@ -437,7 +437,7 @@
+ if test "$FT2_CONFIG" = "no" ; then
+ no_ft=yes
+ else
+- FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
++ FT2_CFLAGS="`$FT2_CONFIG $ft_config_args --cflags` `$FT2_CONFIG $ft_config_args --cflags | sed -e 's:freetype2:freetype2/freetype:'`"
+ FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
+ ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+--- src.orig/client/GLEXT/GLFont2dFreeType.h
++++ src/client/GLEXT/GLFont2dFreeType.h
+@@ -23,10 +23,10 @@
+
+ #include <GLEXT/GLFont2dStorage.h>
+ #include <ft2build.h>
+-#include <freetype/freetype.h>
+-#include <freetype/ftglyph.h>
+-#include <freetype/ftoutln.h>
+-#include <freetype/fttrigon.h>
++#include <freetype.h>
++#include <ftglyph.h>
++#include <ftoutln.h>
++#include <fttrigon.h>
+ #include <string>
+
+ class GLFont2dFreeType
+--- src.orig/launcher/wxdialogs/TrueTypeFont.h
++++ src/launcher/wxdialogs/TrueTypeFont.h
+@@ -25,10 +25,10 @@
+ #include <wx/image.h>
+ #include <ft2build.h>
+ #include <string>
+-#include <freetype/freetype.h>
+-#include <freetype/ftglyph.h>
+-#include <freetype/ftoutln.h>
+-#include <freetype/fttrigon.h>
++#include <freetype.h>
++#include <ftglyph.h>
++#include <ftoutln.h>
++#include <fttrigon.h>
+
+ class TrueTypeFont
+ {
diff --git a/games-strategy/scorched3d/files/scorched3d-44-gcc43.patch b/games-strategy/scorched3d/files/scorched3d-44-gcc43.patch
new file mode 100644
index 00000000000..79f40b70e65
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-gcc43.patch
@@ -0,0 +1,22 @@
+--- scorched.old/src/common/common/main.h
++++ scorched/src/common/common/main.h
+@@ -40,7 +40,7 @@
+ void _no_storage()
+ {
+ printf("Failed to allocate memory!!");
+- std::exit(1);
++ exit(1);
+ }
+
+ void run_main(int argc, char *argv[], OptionsParameters &params)
+--- scorched.old/src/common/porting/windows.h
++++ scorched/src/common/porting/windows.h
+@@ -20,7 +20,7 @@
+ typedef unsigned short WORD;
+ typedef unsigned char BYTE;
+
+-typedef int HWND;
++// typedef int HWND;
+ typedef void * HINSTANCE;
+ typedef int WPARAM;
+ typedef int LPARAM;
diff --git a/games-strategy/scorched3d/files/scorched3d-44-jpeg9.patch b/games-strategy/scorched3d/files/scorched3d-44-jpeg9.patch
new file mode 100644
index 00000000000..8255dd33f5d
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-jpeg9.patch
@@ -0,0 +1,20 @@
+--- src/common/image/ImageJpgFactory.cpp.old 2014-12-03 09:52:03.306552513 +0100
++++ src/common/image/ImageJpgFactory.cpp 2014-12-03 09:53:22.117786304 +0100
+@@ -79,7 +79,7 @@
+ src->next_input_byte = FakeEOI;
+ src->bytes_in_buffer = 2;
+
+- return TRUE;
++ return (boolean)TRUE;
+ }
+
+ METHODDEF(void)
+@@ -166,7 +166,7 @@
+ src->bytes_in_buffer = buffer.getBufferUsed();
+ src->next_input_byte = (JOCTET *) buffer.getBuffer();
+
+- jpeg_read_header(&cinfo, TRUE);
++ jpeg_read_header(&cinfo, (boolean)TRUE);
+ jpeg_start_decompress(&cinfo);
+
+ if ((cinfo.output_components == 3 && !readalpha) ||
diff --git a/games-strategy/scorched3d/files/scorched3d-44-odbc.patch b/games-strategy/scorched3d/files/scorched3d-44-odbc.patch
new file mode 100644
index 00000000000..e7f3833bf89
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-odbc.patch
@@ -0,0 +1,16 @@
+When x11-libs/wxGTK is built with the odbc use flag, scorched3d fails to build.
+bug #285384 - patch from Bob Johnson
+
+--- scorched/src/common/porting/windows.h
++++ fix_scorched/src/common/porting/windows.h
+@@ -11,8 +11,8 @@
+
+ typedef char * LPSTR;
+ typedef const char * LPCTSTR;
+-typedef unsigned int DWORD;
+-typedef unsigned int * LPDWORD;
++typedef unsigned long DWORD;
++typedef DWORD * LPDWORD;
+ typedef unsigned char * LPBYTE;
+ typedef int INT;
+ typedef long LONG;
diff --git a/games-strategy/scorched3d/files/scorched3d-44-win32.patch b/games-strategy/scorched3d/files/scorched3d-44-win32.patch
new file mode 100644
index 00000000000..05f9c806b1c
--- /dev/null
+++ b/games-strategy/scorched3d/files/scorched3d-44-win32.patch
@@ -0,0 +1,18 @@
+--- scorched.old/src/common/porting/windows.h
++++ scorched/src/common/porting/windows.h
+@@ -9,6 +9,7 @@
+ #include <ctype.h>
+ #include <common/Defines.h>
+
++#ifdef _WIN32
+ typedef char * LPSTR;
+ typedef const char * LPCTSTR;
+ typedef unsigned int DWORD;
+@@ -27,6 +28,7 @@
+ typedef int LRESULT;
+ typedef void * HDC;
+ typedef void * HGLRC;
++#endif /* _WIN32 */
+
+ #define _strnicmp(a,b,c) strncasecmp(a,b,c)
+ #define stricmp(a,b) strcasecmp(a,b)
diff --git a/games-strategy/scorched3d/metadata.xml b/games-strategy/scorched3d/metadata.xml
new file mode 100644
index 00000000000..339e10439c7
--- /dev/null
+++ b/games-strategy/scorched3d/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">scorched3d</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/scorched3d/scorched3d-44.ebuild b/games-strategy/scorched3d/scorched3d-44.ebuild
new file mode 100644
index 00000000000..19078cd23b4
--- /dev/null
+++ b/games-strategy/scorched3d/scorched3d-44.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER=2.8
+inherit autotools eutils wxwidgets games
+
+DESCRIPTION="Multi-player tank battle in 3D (OpenGL)"
+HOMEPAGE="http://www.scorched3d.co.uk/"
+SRC_URI="mirror://sourceforge/scorched3d/Scorched3D-${PV}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="dedicated mysql"
+
+RDEPEND="media-libs/libsdl[video]
+ media-libs/sdl-net
+ media-libs/libpng:0
+ sys-libs/zlib
+ virtual/jpeg:0
+ dev-libs/expat
+ media-fonts/dejavu
+ !dedicated? (
+ virtual/opengl
+ virtual/glu
+ media-libs/glew
+ media-libs/libogg
+ media-libs/libvorbis
+ media-libs/openal
+ media-libs/freealut
+ x11-libs/wxGTK:2.8[X]
+ media-libs/freetype:2
+ sci-libs/fftw:3.0
+ )
+ mysql? ( virtual/mysql )"
+DEPEND="${RDEPEND}
+ !dedicated? ( virtual/pkgconfig )"
+
+S=${WORKDIR}/scorched
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-fixups.patch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-odbc.patch \
+ "${FILESDIR}"/${P}-win32.patch \
+ "${FILESDIR}"/${P}-freetype.patch \
+ "${FILESDIR}"/${P}-jpeg9.patch
+ eautoreconf
+}
+
+src_configure() {
+ egamesconf \
+ --with-fftw=/usr \
+ --with-ogg=/usr \
+ --with-vorbis=/usr \
+ --datadir="${GAMES_DATADIR}/${PN}" \
+ --with-docdir="/usr/share/doc/${PF}" \
+ --with-wx-config="${WX_CONFIG}" \
+ --without-pgsql \
+ $(use_with mysql) \
+ $(use_enable dedicated serveronly)
+}
+
+src_install() {
+ default
+ rm "${ED}${GAMES_DATADIR}"/${PN}/data/fonts/* || die
+ dosym /usr/share/fonts/dejavu/DejaVuSans.ttf "${GAMES_DATADIR}/${PN}/data/fonts/dejavusans.ttf"
+ dosym /usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf "${GAMES_DATADIR}/${PN}/data/fonts/dejavusconbd.ttf"
+ dosym /usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf "${GAMES_DATADIR}/${PN}/data/fonts/dejavusmobd.ttf"
+ if ! use dedicated ; then
+ newicon data/images/tank-old.bmp ${PN}.bmp || die
+ make_desktop_entry ${PN} "Scorched 3D" /usr/share/pixmaps/${PN}.bmp
+ fi
+ prepgamesdirs
+}
diff --git a/games-strategy/seven-kingdoms/Manifest b/games-strategy/seven-kingdoms/Manifest
new file mode 100644
index 00000000000..78caac3ff9e
--- /dev/null
+++ b/games-strategy/seven-kingdoms/Manifest
@@ -0,0 +1,3 @@
+DIST 7kaa-2.14.5.tar.xz 31223408 SHA256 c7f04fa640d324ed8f1523da49945acd0f1ee2a99e3ee82ee29b52d2f735e464 SHA512 cd797e63ba377d1f7b3e37cd775afd381ad015baf90bdfe00bc3f8741f745548b8abdd61e4b334e9fa54a5c04b48493ba8a90fbebef3f977517f12563d1efddd WHIRLPOOL 0a786e9657568349579fa7ce2fe907942ffbcec1e03eb07b22a3ede915005a57389957960971df9680f7f8cb1a0b281e9da289500b9bf1e5c3e414aa60769451
+DIST 7kaa-source-2.14.4.tar.bz2 27366752 SHA256 60b61f321db6c295330fb3fb21894bc41cb6e0bd797aff9abe45cf2392b49fa1 SHA512 7ee39aba89993d9f0041ab991e053069e0c3ab4298f74c0ec95e3f30f49a71731ef37d8870b1ab9afd97b1c4618a879492976006b8a513bfc4bc44dfac591bf0 WHIRLPOOL 4568d36278d4a286e0395b79ec06c03905b5e69be827faa80f4808c8b8fa097a65ac69ee5c58020dfcf21aa00649eaab2a3ac87a636b680167b4c83b3d3e5f73
+DIST 7kaa.png 559 SHA256 354f64479b55df2021ca67366abb4724218ca3676fde9e735bfb2218bc1559f4 SHA512 0ec1ba67107a7823943704879efaf12297c5441c43b54f49684550927b10dc40c657fe93eb7c4cc85208d08194f179c9602fd8df6545776f3e1b4481803b16e6 WHIRLPOOL cb896939453d8ed6fc425931bb1f5b74c62aeea67e71e4645fe79fc69fb13fae89d4959651fd95dcbb416c378b4ef44873dc6ebdabc1f2bb1fed3753332209da
diff --git a/games-strategy/seven-kingdoms/metadata.xml b/games-strategy/seven-kingdoms/metadata.xml
new file mode 100644
index 00000000000..58be49dda6e
--- /dev/null
+++ b/games-strategy/seven-kingdoms/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <use>
+ <flag name="network">Enable support for multiplayer via <pkg>media-libs/sdl-net</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">skfans</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/seven-kingdoms/seven-kingdoms-2.14.4.ebuild b/games-strategy/seven-kingdoms/seven-kingdoms-2.14.4.ebuild
new file mode 100644
index 00000000000..56e043eea11
--- /dev/null
+++ b/games-strategy/seven-kingdoms/seven-kingdoms-2.14.4.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit autotools-utils games
+
+MY_PN="7kaa"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Seven Kingdoms: Ancient Adversaries"
+HOMEPAGE="http://7kfans.com/"
+SRC_URI="mirror://sourceforge/skfans/${MY_PN}-source-${PV}.tar.bz2
+ http://dev.gentoo.org/~pinkbyte/distfiles/${MY_PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="network"
+
+DEPEND="media-libs/libsdl[X,video]
+ media-libs/openal
+ network? ( media-libs/sdl-net )
+ !games-strategy/seven-kingdoms-data"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( README )
+
+src_prepare() {
+ sed -i -e '/#include <player_desc.h>/a\#include <string.h>' src/multiplayer/common/player_desc.cpp || die 'sed failed'
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # In current state debugging works only on Windows :-/
+ egamesconf \
+ $(use_enable network) \
+ --disable-debug \
+ --without-directx \
+ --without-wine \
+ --datadir="${GAMES_DATADIR}/${MY_PN}"
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ newgamesbin "src/client/${MY_PN}" "${MY_PN}.bin"
+ doicon "${DISTDIR}/${MY_PN}.png"
+ games_make_wrapper "${MY_PN}" "${GAMES_BINDIR}/${MY_PN}.bin" "${GAMES_DATADIR}/${MY_PN}"
+ make_desktop_entry "${MY_PN}" "Seven Kingdoms: Ancient Adversaries" "${MY_PN}" "Game;StrategyGame"
+
+ prepgamesdirs
+}
diff --git a/games-strategy/seven-kingdoms/seven-kingdoms-2.14.5.ebuild b/games-strategy/seven-kingdoms/seven-kingdoms-2.14.5.ebuild
new file mode 100644
index 00000000000..740d38f936a
--- /dev/null
+++ b/games-strategy/seven-kingdoms/seven-kingdoms-2.14.5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils games
+
+MY_PN="7kaa"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Seven Kingdoms: Ancient Adversaries"
+HOMEPAGE="http://7kfans.com/"
+SRC_URI="mirror://sourceforge/skfans/${MY_PN}-${PV}.tar.xz
+ http://dev.gentoo.org/~pinkbyte/distfiles/${MY_PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="net-libs/enet:1.3=
+ media-libs/libsdl2[X,video]
+ media-libs/openal
+ !games-strategy/seven-kingdoms-data"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( README )
+
+src_unpack() {
+ unpack ${MY_PN}-${PV}.tar.xz
+}
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ # In current state debugging works only on Windows :-/
+ egamesconf \
+ --disable-debug \
+ --without-wine \
+ --datadir="${GAMES_DATADIR}/${MY_PN}"
+}
+
+src_install() {
+ default
+
+ newgamesbin "src/client/${MY_PN}" "${MY_PN}.bin"
+ doicon "${DISTDIR}/${MY_PN}.png"
+ games_make_wrapper "${MY_PN}" "${GAMES_BINDIR}/${MY_PN}.bin" "${GAMES_DATADIR}/${MY_PN}"
+ make_desktop_entry "${MY_PN}" "Seven Kingdoms: Ancient Adversaries" "${MY_PN}" "Game;StrategyGame"
+
+ prepgamesdirs
+}
diff --git a/games-strategy/smac/Manifest b/games-strategy/smac/Manifest
new file mode 100644
index 00000000000..1f98b7e20bf
--- /dev/null
+++ b/games-strategy/smac/Manifest
@@ -0,0 +1,2 @@
+DIST smac-6.0a-x86.run 6801730 SHA256 69b845728f55caef038c6392f148beae47156933f5bff0ce7d9c49162f1d0ee7 SHA512 b71dd1ee46d37d66131cf6fc15c6a406719989021c8dbb6e74cded18c5520ee9ba4bbdfc5bdfc0ddfa67fa2e846365636be41d87a6440473e8ae5ebf542b7744 WHIRLPOOL 24ac3d1f79a38407b0d21287055a0ab37888ce06f424e95a4be98a78ddd003301b6a00d8ba967da802a78ae025a4f4f00ad7565745fc679997b88bca9b46aa8f
+DIST smac-install-ppc.run 18528928 SHA256 ad90f6fa4fa3bfe39f5474016ea6a0c738687fc038995bcd7675294c0438477c SHA512 99fc6edca2c9e64bfc0cab644cbd061c3842359c16e5e6537a2aa2df4cd2a1a6a39169a2b9540199b08f7aee28f4e2cfad814499fdd55b5edf7ab9b19c12d793 WHIRLPOOL df1068532845e5c7be68cf84122a7b90ba3fcd5e89442cff76143eccb35012861980a0cb4bc79948f73b0e2821aa3a8e0673cc2bde7065a2f4d4e895ba4a0ab1
diff --git a/games-strategy/smac/metadata.xml b/games-strategy/smac/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/smac/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/smac/smac-6.0a.ebuild b/games-strategy/smac/smac-6.0a.ebuild
new file mode 100644
index 00000000000..189d9018086
--- /dev/null
+++ b/games-strategy/smac/smac-6.0a.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils unpacker cdrom games
+
+DESCRIPTION="Linux port of the popular strategy game from Firaxis"
+HOMEPAGE="http://www.lokigames.com/products/smac/"
+SRC_URI="x86? ( mirror://lokigames/${PN}/${P}-x86.run )
+ amd64? ( mirror://lokigames/${PN}/${P}-x86.run )
+ ppc? ( http://mirrors.dotsrc.org/lokigames/installers/${PN}/${PN}-install-ppc.run )"
+
+LICENSE="LOKI-EULA"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="+videos"
+RESTRICT="strip"
+
+DEPEND="games-util/loki_patch"
+RDEPEND="sys-libs/glibc
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ !ppc? ( sys-libs/lib-compat-loki )
+ media-libs/libsdl[sound,video]
+ media-libs/sdl-ttf
+ media-libs/sdl-mixer
+ media-libs/smpeg
+ media-libs/freetype
+ sys-libs/zlib"
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+src_unpack() {
+ cdrom_get_cds Alien_Crossfire_Manual.pdf
+ mkdir -p "${S}"/a
+ cd "${S}"/a
+ use x86 || use amd64 && unpack_makeself ${P}-x86.run
+ use ppc && unpack_makeself ${PN}-install-ppc.run
+}
+
+src_install() {
+ einfo "Copying files... this may take a while..."
+ exeinto "${dir}"
+ doexe "${CDROM_ROOT}"/bin/x86/{smac,smacx,smacpack}
+
+ insinto "${dir}"
+ doins ${CDROM_ROOT}/{{Alien_Crossfire,Alpha_Centauri}_Manual.pdf,QuickStart.txt,README,icon.{bmp,xpm}}
+
+ cd "${Ddir}"
+ tar xzf "${CDROM_ROOT}"/data.tar.gz || die
+ insinto "${dir}"/data
+ doins "${CDROM_ROOT}"/data/*.{pcx,cvr,flc,gif}
+ doins -r "${CDROM_ROOT}"/data/{facs,fx,projs,techs,voices}
+
+ if use videos ; then
+ doins -r "${CDROM_ROOT}"/data/movies
+ fi
+
+ cd "${S}"/a
+ if use ppc ; then
+ cd ${P}-ppc
+ fi
+ loki_patch --verify patch.dat
+ loki_patch patch.dat "${Ddir}" >& /dev/null || die
+
+ # now, since these files are coming off a cd, the times/sizes/md5sums wont
+ # be different ... that means portage will try to unmerge some files (!)
+ # we run touch on ${D} so as to make sure portage doesnt do any such thing
+ find "${Ddir}" -exec touch '{}' +
+
+ newicon "${CDROM_ROOT}"/icon.xpm smac.xpm
+
+ games_make_wrapper ${PN}pack ./${PN}pack "${dir}" "${dir}"
+ games_make_wrapper ${PN} ./${PN} "${dir}" "${dir}"
+ games_make_wrapper ${PN}x ./${PN}x "${dir}" "${dir}"
+ make_desktop_entry smacpack "Sid Meier's SMAC Planetary Pack" smacpack
+ make_desktop_entry smac "Sid Meier's Alpha Centauri" smac
+ make_desktop_entry smacx "Sid Meier's Alpha Centauri - Alien Crossfire" smac
+ prepgamesdirs
+
+ if use x86 || use amd64 ; then
+ einfo "Linking libs provided by 'sys-libs/lib-compat-loki' to '${dir}'."
+ dosym /lib/loki_ld-linux.so.2 "${dir}"/ld-linux.so.2 && \
+ dosym /usr/lib/loki_libc.so.6 "${dir}"/libc.so.6 && \
+ dosym /usr/lib/loki_libnss_files.so.2 "${dir}"/libnss_files.so.2
+ fi
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "To start Sid Meyer's SMAC Planetary Pack run:"
+ elog " smac"
+ elog "To play Sid Meyer's Alpha Centauri run:"
+ elog " smac"
+ elog "To play Alien Crossfire run:"
+ elog " smacx"
+ elog "Be sure to enable CONFIG_UID16 in your kernel config or"
+ elog "the game will error." # bug 340303
+}
diff --git a/games-strategy/spaz/Manifest b/games-strategy/spaz/Manifest
new file mode 100644
index 00000000000..2aaa60cb673
--- /dev/null
+++ b/games-strategy/spaz/Manifest
@@ -0,0 +1 @@
+DIST spaz-linux-humblebundle-09182012-bin 157466422 SHA256 b143b8e0b09baec1f5c9f02daada9f1125bbd0109f0878e3b00b14657a4fb7cd SHA512 ba62be6a247dfb1ee04db8784b3e173140e7491f2bd68a528ad9c81cab4bc8f807bfeb4593fa37c76e43401420a6f788075cd2541fd16ed7443fe4301a76d50c WHIRLPOOL 508ec9ccfd2f75f52823628659d53568bc8e50da73866bad645a4910c4aee782b2d48488ec43b0a34bd7f7c829a18b2162052ae1293af661e09d50b193659665
diff --git a/games-strategy/spaz/metadata.xml b/games-strategy/spaz/metadata.xml
new file mode 100644
index 00000000000..b6b8956cde3
--- /dev/null
+++ b/games-strategy/spaz/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-strategy/spaz/spaz-1.605.ebuild b/games-strategy/spaz/spaz-1.605.ebuild
new file mode 100644
index 00000000000..85950e1abfe
--- /dev/null
+++ b/games-strategy/spaz/spaz-1.605.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit unpacker games
+
+DESCRIPTION="Space Pirates and Zombies"
+HOMEPAGE="http://spacepiratesandzombies.com"
+SRC_URI="${PN}-linux-humblebundle-09182012-bin"
+LICENSE="LOKI-EULA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="alsa pulseaudio"
+RESTRICT="fetch strip"
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=media-libs/openal-1.15.1[alsa?,pulseaudio?,abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r4[abi_x86_32(-)]"
+
+S="${WORKDIR}"/data
+
+QA_PREBUILT="opt/spaz/SPAZ"
+
+src_unpack() {
+ unpack_zip ${A}
+}
+
+src_install() {
+ local dir="${GAMES_PREFIX_OPT}/${PN}"
+
+ insinto "${dir}"
+ exeinto "${dir}"
+ doexe SPAZ
+ doins -r common game mods
+ doins audio.so
+ newicon SPAZ.png spaz.png
+ dodoc README-linux.txt
+
+ games_make_wrapper ${PN} ./SPAZ "${dir}" "${dir}"
+ make_desktop_entry ${PN} "Space Pirates and Zombies" ${PN}
+
+ prepgamesdirs
+}
diff --git a/games-strategy/tornado/Manifest b/games-strategy/tornado/Manifest
new file mode 100644
index 00000000000..fd05abfe73e
--- /dev/null
+++ b/games-strategy/tornado/Manifest
@@ -0,0 +1 @@
+DIST tornado-1.4.tar.gz 54591 SHA256 d0506377c9b80581a6167a9d97233638678943bbc0a32fb714e09cf0e918b791 SHA512 764c18b228a24cdcaf1456af79d1bdb997f200c09bc33d8f54df28f1f995db1b1a3a328550c5561bc8ebd38d4187f472aa1c892d91889e613b9ff42b86bee322 WHIRLPOOL adede7e43642f1c03200c4b903612ba01aaa761f5c74002322bcc98d3abc97680826f4b7aead6aabc6b0fc9f7b6264593cb9ee453e93cf42d5bdf6dd1e7bd17f
diff --git a/games-strategy/tornado/files/tornado-1.4-gentoo.patch b/games-strategy/tornado/files/tornado-1.4-gentoo.patch
new file mode 100644
index 00000000000..fb896684115
--- /dev/null
+++ b/games-strategy/tornado/files/tornado-1.4-gentoo.patch
@@ -0,0 +1,26 @@
+--- Makefile.old 2009-02-12 12:42:25.000000000 +0100
++++ Makefile 2009-02-12 12:44:52.000000000 +0100
+@@ -1,10 +1,9 @@
+-CC = gcc
+ MAKE = make
+-LDFLAGS = -lncurses
++LDLIBS = -lncurses
+ OBJFILES = main.o draw.o erwin.o network.o scores.o
+-PREFIX = /usr/local
+-LOCALEPATH = /usr/local/share/locale
+-CFLAGS = -Wall -O2 -DPREFIX="\"$(PREFIX)\"" -DLOCALEPATH="\"$(LOCALEPATH)\""
++PREFIX = /usr
++LOCALEPATH = /usr/share/locale
++CFLAGS += -DPREFIX="\"$(PREFIX)\"" -DLOCALEPATH="\"$(LOCALEPATH)\""
+ VERSION = `grep " VERSION" version.h | sed s/\"//g | sed s/\#define\ VERSION\ //`
+ LOCALES = de
+ MAN = doc/man
+@@ -25,7 +24,7 @@
+ $(MAKE) -C $(MAN) all
+
+ tornado: $(OBJFILES)
+- $(CC) $(LDFLAGS) $(OBJFILES) -o tornado
++ $(CC) $(LDFLAGS) $(OBJFILES) $(LDLIBS) -o tornado
+
+ debug: tornado.6 locales
+ gcc -g -ggdb -Wall -ansi -pedantic -o tornado draw.c main.c erwin.c network.c scores.c -lncurses -DPREFIX="\"$(PREFIX)\"" -DLOCALEPATH="\"$(LOCALEPATH)\""
diff --git a/games-strategy/tornado/metadata.xml b/games-strategy/tornado/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/tornado/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/tornado/tornado-1.4.ebuild b/games-strategy/tornado/tornado-1.4.ebuild
new file mode 100644
index 00000000000..fa428300b3c
--- /dev/null
+++ b/games-strategy/tornado/tornado-1.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Clone of a C64 game - destroy the opponent's house"
+HOMEPAGE="http://kiza.kcore.de/software/tornado/"
+SRC_URI="http://kiza.kcore.de/software/tornado/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+
+src_prepare() {
+ sed -i \
+ -e "s:PREFIX/bin:${GAMES_BINDIR}:" \
+ -e "s:PREFIX/man:/usr/man:" \
+ -e "s:/var/games:${GAMES_STATEDIR}:" \
+ -e "s:/usr/local:/usr:" \
+ doc/man/tornado.6.in \
+ || die "sed failed"
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_install() {
+ dogamesbin tornado
+ doman doc/man/tornado.6
+ dodoc AUTHOR CREDITS Changelog README TODO
+ insinto "${GAMES_STATEDIR}"
+ doins tornado.scores
+ prepgamesdirs
+ fperms 664 "${GAMES_STATEDIR}/tornado.scores"
+}
diff --git a/games-strategy/triplea/Manifest b/games-strategy/triplea/Manifest
new file mode 100644
index 00000000000..07a106dc7f2
--- /dev/null
+++ b/games-strategy/triplea/Manifest
@@ -0,0 +1,2 @@
+DIST triplea_1_7_0_3_source_code_only.zip 238479931 SHA256 4cd3a0596bfe4f81cc61e5eab02a5ccd96226a291c5afb8441df5bf9898829e5 SHA512 6d6ddff0a630e1ce357c00205636b3c7586159daf8a1c66fea371c0cd053aaa75814131267cb937d9e1dc313aa2eef99dd6c73fcd4275e82ac7a2250332a8a49 WHIRLPOOL da0b259ffaedecd425cd6ddecfef3d51bd35e0274dbd996298a4de299b1a4f8f8e0c74365af8fcaf21f49ab480b282562a6867c36b4918fcb6b4815b773308c2
+DIST triplea_1_8_0_5_source_code_only.zip 377607369 SHA256 7d43d8936650ee5ce8b215c7bb6c5ac611f3a232559c0cbb48dba910f63643f5 SHA512 76275121e71b727d05c47612c3a27431beb3e610f1953c8aea4cef878bac4f0a4309794c805462b75fff71d875bc92395108f196f1e04544bb4ef0b8e298904c WHIRLPOOL be06d9c6c4af75ca3ab221b69c13e8e3139569f7108cb4c5de510397a888da7e21822dd1a2e1b5ee63ce5e2e36153d3651088d036089e6f1e08beb5a473f015c
diff --git a/games-strategy/triplea/metadata.xml b/games-strategy/triplea/metadata.xml
new file mode 100644
index 00000000000..8b5efe7e31a
--- /dev/null
+++ b/games-strategy/triplea/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">triplea</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/triplea/triplea-1.7.0.3.ebuild b/games-strategy/triplea/triplea-1.7.0.3.ebuild
new file mode 100644
index 00000000000..d5d4a9dad82
--- /dev/null
+++ b/games-strategy/triplea/triplea-1.7.0.3.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils java-pkg-2 java-ant-2 versionator games
+
+MY_PV=$(replace_all_version_separators _)
+DESCRIPTION="An open source clone of the popular Axis and Allies boardgame"
+HOMEPAGE="http://triplea.sourceforge.net/"
+SRC_URI="mirror://sourceforge/triplea/${PN}_${MY_PV}_source_code_only.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+RESTRICT="test" # Needs X11 maybe use virtualx.eclass
+
+RDEPEND="dev-java/commons-httpclient:3
+ dev-java/apple-java-extensions-bin
+ dev-java/commons-logging
+ dev-java/commons-codec
+ =dev-java/junit-3.8*"
+DEPEND="${RDEPEND}
+ >=virtual/jdk-1.6
+ app-arch/unzip"
+RDEPEND="${RDEPEND}
+ >=virtual/jre-1.6"
+
+S=${WORKDIR}/${PN}_${MY_PV}
+
+pkg_setup() {
+ games_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_prepare() {
+ sed -i \
+ -e 's:"triplea":".triplea":g' \
+ src/games/strategy/engine/framework/GameRunner.java || die
+
+ rm lib/derby_10_1_2.jar || die
+ rm -r old/ || die
+ java-pkg_jar-from apple-java-extensions-bin AppleJavaExtensions.jar \
+ lib/AppleJavaExtensions.jar
+ java-pkg_jar-from commons-httpclient-3 commons-httpclient.jar \
+ lib/commons-httpclient-3.0.1.jar
+ java-pkg_jar-from commons-logging commons-logging.jar \
+ lib/commons-logging-1.1.jar
+ java-pkg_jar-from commons-codec commons-codec.jar \
+ lib/commons-codec-1.3.jar
+ # installs the test files
+ java-pkg_jar-from --into lib junit
+ # Needs the substance package
+ #java-pkg_jar-from substance substance.jar \
+ # lib/substance_5_3.jar
+
+ # also these from some other java package...
+ #lib/mailapi.jar
+ #lib/upnp.jar
+ #lib/activation.jar
+ #lib/smtp.jar
+
+ #java-pkg_ensure-no-bundled-jars
+}
+
+src_compile() {
+ eant || die
+ echo "triplea.saveGamesInHomeDir=true" > data/triplea.properties
+ # The only target creating this is zip which does unjar etc
+ cd classes || die
+ jar cf ../bin/triplea.jar * || die
+ rm -r * || die
+}
+
+src_test() {
+ ANT_TASKS="ant-junit" eant test
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r assets bin data dice_servers maps
+
+ java-pkg_regjar "${D}/${GAMES_DATADIR}"/${PN}/bin/*.jar
+ java-pkg_dolauncher ${PN} -into "${GAMES_PREFIX}" \
+ --java_args "-Xmx256m" --main \
+ games.strategy.engine.framework.GameRunner
+ java-pkg_dolauncher ${PN}-server -into "${GAMES_PREFIX}" \
+ --java_args "-server -Xmx64m -Dtriplea.lobby.port=3303 -Dtriplea.lobby.console=true" \
+ --main games.strategy.engine.lobby.server.LobbyServer
+
+ newicon icons/triplea_icon.png ${PN}.png
+ newicon icons/triplea_icon.png ${PN}-server.png
+ make_desktop_entry ${PN} TripleA
+ make_desktop_entry ${PN}-server TripleA-server
+
+ dodoc changelog.txt TripleA_RuleBook.pdf
+ dohtml -r doc/* readme.html
+ prepgamesdirs
+}
diff --git a/games-strategy/triplea/triplea-1.8.0.5.ebuild b/games-strategy/triplea/triplea-1.8.0.5.ebuild
new file mode 100644
index 00000000000..fd9662b393d
--- /dev/null
+++ b/games-strategy/triplea/triplea-1.8.0.5.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils java-pkg-2 java-ant-2 versionator games
+
+MY_PV=$(replace_all_version_separators _)
+DESCRIPTION="An open source clone of the popular Axis and Allies boardgame"
+HOMEPAGE="http://triplea.sourceforge.net/"
+SRC_URI="mirror://sourceforge/triplea/${PN}_${MY_PV}_source_code_only.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="test" # Needs X11 maybe use virtualx.eclass
+
+RDEPEND="dev-java/commons-httpclient:3
+ dev-java/apple-java-extensions-bin
+ dev-java/commons-logging
+ dev-java/commons-codec
+ =dev-java/junit-3.8*"
+DEPEND="${RDEPEND}
+ >=virtual/jdk-1.6
+ app-arch/unzip"
+RDEPEND="${RDEPEND}
+ >=virtual/jre-1.6"
+
+S=${WORKDIR}/${PN}_${MY_PV}
+
+pkg_setup() {
+ games_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_prepare() {
+ sed -i \
+ -e '/userHome.*triplea/s:"triplea":".triplea":g' \
+ src/games/strategy/engine/framework/GameRunner2.java || die
+
+ rm -r old/ lib/derby*.jar || die
+ java-pkg_jar-from apple-java-extensions-bin AppleJavaExtensions.jar \
+ lib/AppleJavaExtensions.jar
+ java-pkg_jar-from commons-httpclient-3 commons-httpclient.jar \
+ lib/commons-httpclient-3.0.1.jar
+ java-pkg_jar-from commons-logging commons-logging.jar \
+ lib/commons-logging-1.1.jar
+ java-pkg_jar-from commons-codec commons-codec.jar \
+ lib/commons-codec-1.3.jar
+ # installs the test files
+ java-pkg_jar-from --into lib junit
+
+ # lots of other jars from some other java packages...
+ # either missing from portage or none stable is ages.
+ #java-pkg_ensure-no-bundled-jars
+}
+
+src_compile() {
+ eant || die
+ echo "triplea.saveGamesInHomeDir=true" > data/triplea.properties
+ # The only target creating this is zip which does unjar etc
+ cd classes || die
+ jar cf ../bin/triplea.jar * || die
+ rm -r * || die
+}
+
+src_test() {
+ ANT_TASKS="ant-junit" eant test
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r assets bin data dice_servers maps
+
+ java-pkg_regjar "${D}/${GAMES_DATADIR}"/${PN}/bin/*.jar
+ java-pkg_dolauncher ${PN} -into "${GAMES_PREFIX}" \
+ --java_args "-Xmx256m" --main \
+ games.strategy.engine.framework.GameRunner
+ java-pkg_dolauncher ${PN}-server -into "${GAMES_PREFIX}" \
+ --java_args "-server -Xmx64m -Dtriplea.lobby.port=3303 -Dtriplea.lobby.console=true" \
+ --main games.strategy.engine.lobby.server.LobbyServer
+
+ newicon icons/triplea_icon.png ${PN}.png
+ newicon icons/triplea_icon.png ${PN}-server.png
+ make_desktop_entry ${PN} TripleA
+ make_desktop_entry ${PN}-server TripleA-server
+
+ dodoc changelog.txt TripleA_RuleBook.pdf
+ dohtml -r doc/* readme.html
+ prepgamesdirs
+}
diff --git a/games-strategy/ufo-ai/Manifest b/games-strategy/ufo-ai/Manifest
new file mode 100644
index 00000000000..6f19f0d848e
--- /dev/null
+++ b/games-strategy/ufo-ai/Manifest
@@ -0,0 +1,3 @@
+DIST 1maps.pk3 242016 SHA256 8cdb8c231c0ba98900d97012b62c5cef72ab5710fe3f087e534496a66f7b0e4e SHA512 9615b365e590dceb82362e7cd683980e15401a3b5a2b359a33c7ed2a4c51e5328efb352618cc48f46971a2ced1717276b5270ca6bf6d2bc7fc2b2238030eb3ae WHIRLPOOL 8e798ffeaa83609114fd239ea8f379ee54fa6038735a09bd3abe3076073e92b44e7fa867c893d597577da462b4e583fb0a2bba7cd2014a9f4b4bb8ef04b377e6
+DIST ufoai-2.4-data.tar 937062400 SHA256 6bb322fc0362781d07439799de32c677884cef7c96fcf17dd87c62cc108030b7 SHA512 471eab2f62cad144fe9966317d48c408fba19de0c33cf7414918b502c723b722af38a025f808848698d9a06ffc10fb0faac145dd01dcd3d321547c87da1c6246 WHIRLPOOL 139251bdbd76f86cb38175eb9c14149ea0cab6bbcb04e2dba7351cdb5b0e21bdfd231e350c0af4f52379d0c5bee91f0512422a7eb9f6339eb6a07170d64fec0c
+DIST ufoai-2.4-source.tar.bz2 16875353 SHA256 254a61b770f141374d57e5c2589048be9298d0a920e914c6e72c2b98255bb94f SHA512 3f9d0df7392f50c201464c81e42435f860df97d5d7a2ef53bb9a05d2b2fc645a1130baaf16fc34818b88bb07b8cf83283f7479d685cbd3caf80ea7522e13c56f WHIRLPOOL 0e68149ab2b3eeffb7134e65cc29de9cecf60dc89c965958a0d669c2d22462d05b89b0a81a3225ebbd7e47015fc63697cbad365136706f4853f9c1e690b0667d
diff --git a/games-strategy/ufo-ai/files/ufo-ai-2.4-anon.patch b/games-strategy/ufo-ai/files/ufo-ai-2.4-anon.patch
new file mode 100644
index 00000000000..53f07261bb7
--- /dev/null
+++ b/games-strategy/ufo-ai/files/ufo-ai-2.4-anon.patch
@@ -0,0 +1,17 @@
+--- src/tools/radiant/radiant/camera/CameraSettings.h.old 2014-10-22 08:30:35.690248415 +0200
++++ src/tools/radiant/radiant/camera/CameraSettings.h 2014-10-22 08:31:12.329900302 +0200
+@@ -16,13 +16,13 @@
+ const std::string RKEY_ENABLE_FARCLIP = "user/ui/camera/enableCubicClipping";
+ const std::string RKEY_DRAWMODE = "user/ui/camera/drawMode";
+ const std::string RKEY_SOLID_SELECTION_BOXES = "user/ui/xyview/solidSelectionBoxes";
++}
+
+ enum CameraDrawMode
+ {
+ drawWire, drawSolid, drawTexture
+ };
+
+-}
+ /* greebo: This is the home of all the camera settings. As this class derives
+ * from a RegistryKeyObserver, it can be connected to the according registry keys
+ * and gets notified if any of the observed keys are changed.*/
diff --git a/games-strategy/ufo-ai/files/ufo-ai-2.4-locale.patch b/games-strategy/ufo-ai/files/ufo-ai-2.4-locale.patch
new file mode 100644
index 00000000000..632e0d4fdc0
--- /dev/null
+++ b/games-strategy/ufo-ai/files/ufo-ai-2.4-locale.patch
@@ -0,0 +1,15 @@
+diff -urN ufoai-2.4-source.old//src/client/cl_main.c ufoai-2.4-source/src/client/cl_main.c
+--- ufoai-2.4-source.old//src/client/cl_main.c 2012-05-01 10:59:51.720868619 +0200
++++ ufoai-2.4-source/src/client/cl_main.c 2012-05-01 11:00:57.235869759 +0200
+@@ -1180,7 +1180,11 @@
+ if (fs_i18ndir->string[0] != '\0')
+ Q_strncpyz(languagePath, fs_i18ndir->string, sizeof(languagePath));
+ else
++#ifdef LOCALEDIR
++ Q_strncpyz(languagePath, LOCALEDIR, sizeof(languagePath));
++#else
+ Com_sprintf(languagePath, sizeof(languagePath), "%s/"BASEDIRNAME"/i18n/", FS_GetCwd());
++#endif
+ Com_DPrintf(DEBUG_CLIENT, "...using mo files from %s\n", languagePath);
+ bindtextdomain(TEXT_DOMAIN, languagePath);
+ bind_textdomain_codeset(TEXT_DOMAIN, "UTF-8");
diff --git a/games-strategy/ufo-ai/files/ufo-ai-2.4-mathlib.patch b/games-strategy/ufo-ai/files/ufo-ai-2.4-mathlib.patch
new file mode 100644
index 00000000000..72fd81038fb
--- /dev/null
+++ b/games-strategy/ufo-ai/files/ufo-ai-2.4-mathlib.patch
@@ -0,0 +1,29 @@
+http://bugs.gentoo.org/509928
+
+src/common/common.c:261: error: undefined reference to 'sincos'
+src/shared/mathlib.c:476: error: undefined reference to '__acosf_finite'
+[ ... snip ... ]
+collect2: error: ld returned 1 exit status
+
+--- build/modules/ufo.mk
++++ build/modules/ufo.mk
+@@ -9,7 +9,7 @@
+ $(TARGET)_LINKER := $(CC)
+ $(TARGET)_FILE := $(TARGET)$(EXE_EXT)
+ $(TARGET)_CFLAGS += -DCOMPILE_UFO $(BFD_CFLAGS) $(SDL_CFLAGS) $(SDL_TTF_CFLAGS) $(SDL_MIXER_CFLAGS) $(CURL_CFLAGS) $(THEORA_CFLAGS) $(XVID_CFLAGS) $(VORBIS_CFLAGS) $(OGG_CFLAGS) $(MXML_CFLAGS)
+-$(TARGET)_LDFLAGS += -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz
++$(TARGET)_LDFLAGS += -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz -lm
+
+ $(TARGET)_SRCS = \
+ client/cl_console.c \
+--- build/modules/testall.mk
++++ build/modules/testall.mk
+@@ -9,7 +9,7 @@
+ $(TARGET)_LINKER := $(CC)
+ $(TARGET)_FILE := $(TARGET)$(EXE_EXT)
+ $(TARGET)_CFLAGS += -DCOMPILE_UFO -DHARD_LINKED_GAME -DCOMPILE_UNITTESTS $(BFD_CFLAGS) $(SDL_CFLAGS) $(CURL_CFLAGS) $(OGG_CFLAGS) $(MXML_CFLAGS)
+-$(TARGET)_LDFLAGS += -lcunit -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz
++$(TARGET)_LDFLAGS += -lcunit -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz -lm
+
+ $(TARGET)_SRCS = \
+ tests/test_all.c \
diff --git a/games-strategy/ufo-ai/metadata.xml b/games-strategy/ufo-ai/metadata.xml
new file mode 100644
index 00000000000..b7362ac28a4
--- /dev/null
+++ b/games-strategy/ufo-ai/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="editor">Build map editor</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ufoai</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/ufo-ai/ufo-ai-2.4.ebuild b/games-strategy/ufo-ai/ufo-ai-2.4.ebuild
new file mode 100644
index 00000000000..4c3c9fe064d
--- /dev/null
+++ b/games-strategy/ufo-ai/ufo-ai-2.4.ebuild
@@ -0,0 +1,119 @@
+# 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
+
+MY_P=${P/o-a/oa}
+
+DESCRIPTION="UFO: Alien Invasion - X-COM inspired strategy game"
+HOMEPAGE="http://ufoai.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ufoai/${MY_P}-source.tar.bz2
+ mirror://sourceforge/ufoai/${MY_P}-data.tar
+ http://mattn.ninex.info/1maps.pk3"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug dedicated editor"
+
+# Dependencies and more instructions can be found here:
+# http://ufoai.ninex.info/wiki/index.php/Compile_for_Linux
+DEPEND="!dedicated? (
+ virtual/opengl
+ virtual/glu
+ media-libs/libsdl
+ media-libs/sdl-image[jpeg,png]
+ media-libs/sdl-ttf
+ media-libs/sdl-mixer
+ virtual/jpeg
+ media-libs/libpng:0
+ media-libs/libogg
+ media-libs/libvorbis
+ x11-proto/xf86vidmodeproto
+ )
+ net-misc/curl
+ sys-devel/gettext
+ sys-libs/zlib
+ editor? (
+ dev-libs/libxml2
+ virtual/jpeg
+ media-libs/openal
+ x11-libs/gtkglext
+ x11-libs/gtksourceview:2.0
+ )"
+
+S=${WORKDIR}/${MY_P}-source
+
+src_prepare() {
+ if has_version '>=sys-libs/zlib-1.2.5.1-r1' ; then
+ sed -i -e '1i#define OF(x) x' src/common/ioapi.h || die
+ fi
+
+ # don't try to use the system mini-xml
+ sed -i -e '/mxml/d' configure || die
+
+ epatch \
+ "${FILESDIR}"/${P}-mathlib.patch \
+ "${FILESDIR}"/${P}-anon.patch \
+ "${FILESDIR}"/${P}-locale.patch
+
+ cp "${DISTDIR}"/1maps.pk3 "${WORKDIR}"/base/ || die
+ mv "${WORKDIR}"/base/ "${S}"/ || die
+}
+
+src_configure() {
+ # they are special and provide hand batched configure file
+ local myconf="
+ --disable-dependency-tracking
+ $(use_enable !debug release)
+ $(use_enable editor ufo2map)
+ $(use_enable editor uforadiant)
+ --enable-ufoded
+ --bindir="${GAMES_BINDIR}"
+ --libdir="$(games_get_libdir)"
+ --datadir="${GAMES_DATADIR}/${PN/-}"
+ --localedir="${EPREFIX}/usr/share/locale/"
+ --prefix="${GAMES_PREFIX}"
+ "
+ echo "./configure ${myconf}"
+ ./configure ${myconf} || die
+}
+
+src_compile() {
+ emake
+ emake lang
+
+ if use editor; then
+ emake uforadiant
+ fi
+}
+
+src_install() {
+ newicon src/ports/linux/ufo.png ${PN}.png
+ dobin ufoded
+ make_desktop_entry ufoded "UFO: Alien Invasion Server" ${PN}
+ if ! use dedicated; then
+ dobin ufo
+ make_desktop_entry ufo "UFO: Alien Invasion" ${PN}
+ fi
+
+ if use editor; then
+ dobin ufo2map ufomodel
+ fi
+
+ # install data
+ insinto "${GAMES_DATADIR}"/${PN/-}
+ doins -r base
+ rm -rf "${ED}/${GAMES_DATADIR}/${PN/-}/base/game.so"
+ dogameslib base/game.so
+
+ # move translations where they belong
+ dodir "${GAMES_DATADIR_BASE}/locale"
+ mv "${ED}/${GAMES_DATADIR}/${PN/-}/base/i18n/"* \
+ "${ED}/${GAMES_DATADIR_BASE}/locale/" || die
+ rm -rf "${ED}/${GAMES_DATADIR}/${PN/-}/base/i18n/" || die
+
+ prepgamesdirs
+}
diff --git a/games-strategy/uqm/Manifest b/games-strategy/uqm/Manifest
new file mode 100644
index 00000000000..f9f349b341b
--- /dev/null
+++ b/games-strategy/uqm/Manifest
@@ -0,0 +1,7 @@
+DIST uqm-0.7.0-3domusic.uqm 18980671 SHA256 c57085e64dad4bddf8a679a9aa2adf63f2156d5f6cbabe63af80519033dbcb82 SHA512 e7d723194685388813d72e1add9a710ecd3de9b33381dfe66acee6c31a31634ee9031ecc83c2003a5222b9381efe150a2f2a9289f8505d842182ca03b012183b WHIRLPOOL c975e37f7ade37891e9009c84b1219d57b17c354efec6d7d777623385c8e1ea8c82ac11a05d14391052a262645205d5f9f9c04f41e5b7590e6103c77a85f59cb
+DIST uqm-0.7.0-content.uqm 11538533 SHA256 b8f6db8ba29f0628fb1d5c233830896b19f441aee3744bda671ea264b44da3bf SHA512 c80aa9f1158d07534abc1ef625662dfcd5021cb5e8091d46b3e9a2d96a0fffbe7e9e6cc88680b43d810c8e68a580f7a0d4b62c08e9f7b948ae7f017e4ad20dd2 WHIRLPOOL 328bbbd68701d560eb1bb3f838166afa0f958bb8bd7e6dcc5f7c223a1a5d79c57f08a48cda33612e99d7904d55a0e23b78eabe419f5c5a35ba009cd0b45d8104
+DIST uqm-0.7.0-source.tgz 1562003 SHA256 a3695c5f7f0be7ec9c0f80ec569907b382023a1fee6e635532bd53b7b53bb221 SHA512 443ac13da401d45743f913755647b3309834c57f371fb673c3ea2cacb81184bf30430db10af9001de854363520d1f792f47faffd690c8c2b2f3d12d63b217815 WHIRLPOOL 2e35a334ed575d13c3b48dd819298442cbe30554b00c34dd3cf687a30793c9b4d403339cf807331307d51dd609f253d063930b4dc9f2ce68ce9aff86480cce99
+DIST uqm-0.7.0-voice.uqm 115143439 SHA256 bcccf801b4ba37594ff6217b292744ea586ee2d447e927804842ccae8b73c979 SHA512 693a4869f8567637b112138f8a074b65919776175addbd353e3601085ee4e4bb4758daca64921c902463f5dc38baa6f7fda4ad32f3cf1786646ef48f15cdeb80 WHIRLPOOL 6c447e5d6e09e195390346e93b8052ce6a7b2f9a4ccad7e15b30fd1473029fdec41cb2bc743129de36fe6c136e4fface6f3cbedfcb9360b19a219e47207401ce
+DIST uqm-remix-disc1.uqm 50188876 SHA256 b697694745d939311e8ebffdd5edf692e010c25d7966e1481074940a4d0487e8 SHA512 fed2a6e260ee96802898ad9b6c968acaac3613187fe38370fb557d6d220b499b922447ea04edd15763d0161f5c156ce03bc9d55a86ed3b4e2e0140a4fb17e99b WHIRLPOOL fee79171e43fb203dcc2b8cbca7d3e2edfa4c6334a1f0996fa8951dc67ef94e67f06edbe250810e1385f5887834a7a0755e1e40a9aa3cdae0cdfb937e238fe46
+DIST uqm-remix-disc2.uqm 60282662 SHA256 7fbb4744102e31273e4459b01a156da052ec537c128fe91793643e348bc1bade SHA512 3053693417facef6d01cdb366a15c1bd2a6272961df5870c4151a928845dd76e4ac5fc59f232da5034d56fd9476d3074840a2e9f16d63dba341aeffd92827c4e WHIRLPOOL e52f1eb1c8cd0007eb77d80719f8feeb044c61bb2d72c14fae92ba62ea8ad1225ffa427db39dadd864304818839c4df0e1e0fe9c0d8a2b265ceead14f70df56e
+DIST uqm-remix-disc3.uqm 39924875 SHA256 e6d89f8f66cf1df1cb278fca1e92261b1776ee670dff26132e33f14dbd31e91d SHA512 2337752e3a2447ab048cc6782153bbb120d2d6b890c5bfae9cbef60a46d12abf716917863286b0196bf6f5e8ef301b5f84338237520880b10cbf75e450076951 WHIRLPOOL ba1ed49bb6761d9955fe9beced1987dd4458cd0203a9c8e712bb55034fd8d278f489c995969866cb7096bea75e88b330031f070b7aeb7e09f48fda0ece862e36
diff --git a/games-strategy/uqm/metadata.xml b/games-strategy/uqm/metadata.xml
new file mode 100644
index 00000000000..df896deaf03
--- /dev/null
+++ b/games-strategy/uqm/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="music">download and install music files (large)</flag>
+ <flag name="remix">download and install music remix files (large)</flag>
+ <flag name="voice">download and install voice files (large)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">sc2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/uqm/uqm-0.7.0-r2.ebuild b/games-strategy/uqm/uqm-0.7.0-r2.ebuild
new file mode 100644
index 00000000000..250d9fc45cb
--- /dev/null
+++ b/games-strategy/uqm/uqm-0.7.0-r2.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs games
+
+DESCRIPTION="The Ur-Quan Masters: Port of Star Control 2"
+HOMEPAGE="http://sc2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sc2/${P}-source.tgz
+ mirror://sourceforge/sc2/${P}-content.uqm
+ music? ( mirror://sourceforge/sc2/${P}-3domusic.uqm )
+ voice? ( mirror://sourceforge/sc2/${P}-voice.uqm )
+ remix? ( mirror://sourceforge/sc2/${PN}-remix-disc1.uqm \
+ mirror://sourceforge/sc2/${PN}-remix-disc2.uqm \
+ mirror://sourceforge/sc2/${PN}-remix-disc3.uqm )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="music opengl remix voice"
+
+RDEPEND="media-libs/libmikmod
+ media-libs/libogg
+ >=media-libs/libpng-1.4
+ media-libs/libsdl[X,sound,joystick,video]
+ media-libs/libvorbis
+ media-libs/sdl-image[png]
+ sys-libs/zlib
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ local myopengl
+
+ use opengl \
+ && myopengl=opengl \
+ || myopengl=pure
+
+ cat <<-EOF > config.state
+ CHOICE_debug_VALUE='nodebug'
+ CHOICE_graphics_VALUE='${myopengl}'
+ CHOICE_sound_VALUE='mixsdl'
+ CHOICE_accel_VALUE='plainc'
+ INPUT_install_prefix_VALUE='${GAMES_PREFIX}'
+ INPUT_install_bindir_VALUE='\$prefix/bin'
+ INPUT_install_libdir_VALUE='\$prefix/lib'
+ INPUT_install_sharedir_VALUE='${GAMES_DATADIR}/'
+ EOF
+
+ # Take out the read so we can be non-interactive.
+ sed -i \
+ -e '/read CHOICE/d' build/unix/menu_functions || die
+
+ # respect CFLAGS
+ sed -i \
+ -e "s/-O3//" build/unix/build.config || die
+
+ sed -i \
+ -e "s:@INSTALL_LIBDIR@:$(games_get_libdir)/:g" \
+ build/unix/uqm-wrapper.in || die
+
+ # respect CC
+ sed -i \
+ -e "s/PROG_gcc_FILE=\"gcc\"/PROG_gcc_FILE=\"$(tc-getCC)\"/" \
+ build/unix/config_proginfo_build || die
+}
+
+src_compile() {
+ MAKE_VERBOSE=1 ./build.sh uqm || die
+}
+
+src_install() {
+ # Using the included install scripts seems quite painful.
+ # This manual install is totally fragile but maybe they'll
+ # use a sane build system for the next release.
+ newgamesbin uqm-wrapper uqm
+ exeinto "$(games_get_libdir)"/${PN}
+ doexe uqm
+
+ insinto "${GAMES_DATADIR}"/${PN}/content/packages
+ doins "${DISTDIR}"/${P}-content.uqm
+ echo ${P} > "${D}${GAMES_DATADIR}"/${PN}/content/version || die
+
+ insinto "${GAMES_DATADIR}"/${PN}/content/addons
+ if use music; then
+ doins "${DISTDIR}"/${P}-3domusic.uqm
+ fi
+
+ if use voice; then
+ doins "${DISTDIR}"/${P}-voice.uqm
+ fi
+
+ if use remix; then
+ insinto "${GAMES_DATADIR}"/${PN}/content/addons
+ doins "${DISTDIR}"/${PN}-remix-disc{1,2,3}.uqm
+ fi
+
+ dodoc AUTHORS ChangeLog Contributing README WhatsNew doc/users/manual.txt
+ docinto devel
+ dodoc doc/devel/[!n]*
+ docinto devel/netplay
+ dodoc doc/devel/netplay/*
+ make_desktop_entry uqm "The Ur-Quan Masters"
+ prepgamesdirs
+}
diff --git a/games-strategy/wargus-data/metadata.xml b/games-strategy/wargus-data/metadata.xml
new file mode 100644
index 00000000000..cad5a2aa177
--- /dev/null
+++ b/games-strategy/wargus-data/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/wargus-data/wargus-data-0.ebuild b/games-strategy/wargus-data/wargus-data-0.ebuild
new file mode 100644
index 00000000000..cc06c763c9f
--- /dev/null
+++ b/games-strategy/wargus-data/wargus-data-0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cdrom games
+
+DESCRIPTION="Warcraft II data for wargus (needs DOS CD)"
+HOMEPAGE="http://wargus.sourceforge.net/"
+SRC_URI=""
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="${RDEPEND}
+ media-sound/cdparanoia
+ media-sound/timidity++
+ media-video/ffmpeg2theora"
+# wrt bug #419331
+RESTRICT="userpriv"
+
+S=${WORKDIR}
+
+src_prepare() {
+ export CDROM_NAME="WARCRAFT2"
+ cdrom_get_cds data/rezdat.war
+}
+
+src_compile() {
+ # cdparanoia needs write acces to the cdrom device
+ # this fixes sandbox violation wrt #418051
+ local save_sandbox_write=${SANDBOX_WRITE}
+ addwrite /dev
+ "${GAMES_BINDIR}"/wartool -m -v -r "${CDROM_ROOT}"/data "${S}"/ || die
+ SANDBOX_WRITE=${save_sandbox_write}
+}
+
+src_install() {
+ insinto "${GAMES_DATADIR}"/stratagus/wargus
+ doins -r *
+ prepgamesdirs
+}
diff --git a/games-strategy/wargus/Manifest b/games-strategy/wargus/Manifest
new file mode 100644
index 00000000000..9c0175c5700
--- /dev/null
+++ b/games-strategy/wargus/Manifest
@@ -0,0 +1 @@
+DIST wargus_2.2.7.orig.tar.gz 3655476 SHA256 f688663458e035725f5cd18535a7a1eaecd66eaf55b032fe2ac21ed48b239908 SHA512 a419e70c53db6f3919255ef98ea717a0802e0854095b019bd9c6eef66d6602f75c1849a53ef654b5d66191a824725e3eff23f1f01767eab861e6ddfaf2414bbb WHIRLPOOL d440ac1f279912b13f37fd618f31b1bb2ac53f143789dbe56835343e9486a6ec2aeca71874c4ae2bd9c707706cdf33efbec8df8993d102b0276da0aa53e04cc3
diff --git a/games-strategy/wargus/metadata.xml b/games-strategy/wargus/metadata.xml
new file mode 100644
index 00000000000..5218dcb6ae6
--- /dev/null
+++ b/games-strategy/wargus/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="launchpad">wargus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/wargus/wargus-2.2.7.ebuild b/games-strategy/wargus/wargus-2.2.7.ebuild
new file mode 100644
index 00000000000..440d4d43870
--- /dev/null
+++ b/games-strategy/wargus/wargus-2.2.7.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils gnome2-utils games
+
+DESCRIPTION="Warcraft II for the Stratagus game engine"
+HOMEPAGE="http://wargus.sourceforge.net/"
+SRC_URI="http://launchpad.net/${PN}/trunk/${PV}/+download/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="=games-engines/stratagus-${PV}*[theora]
+ media-libs/freetype
+ media-libs/libpng:0
+ sys-libs/zlib
+ x11-libs/gtk+:2
+ x11-libs/libX11"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+PDEPEND="games-strategy/wargus-data"
+
+S=${WORKDIR}/${PN}_${PV}.orig
+
+src_configure() {
+ local mycmakeargs=(
+ -DGAMEDIR="${GAMES_BINDIR}"
+ -DBINDIR="${GAMES_BINDIR}"
+ -DSTRATAGUS="${GAMES_BINDIR}"/stratagus
+ -DICONDIR=/usr/share/icons/hicolor/64x64/apps
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ elog "Enabling OpenGL in-game seems to cause segfaults/crashes."
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/warmux/Manifest b/games-strategy/warmux/Manifest
new file mode 100644
index 00000000000..fa49955b819
--- /dev/null
+++ b/games-strategy/warmux/Manifest
@@ -0,0 +1 @@
+DIST warmux-11.04.1.tar.bz2 110083622 SHA256 789c4f353e4c5ce0a2aba2e82861d3fd0e5218bc76d8da1a332f2c7b1b27e4ee SHA512 99501ea186e091b55a6e45935de83440be02ae4fc12ee6def5ec24e213c829230b4f6017043be6afbc7188e442b0e1128cfd27c290fbe0e49b6597f927fd1e2d WHIRLPOOL 2cce871fe330452c2f807ec4a9d99ff39de81a9f52c040e48f68a3478ce0a7407003159f9687c4d321c09fbdff7503e92cf47c64a5970666777e8b5d5536b220
diff --git a/games-strategy/warmux/files/warmux-11.04.1-action.patch b/games-strategy/warmux/files/warmux-11.04.1-action.patch
new file mode 100644
index 00000000000..e1530337a25
--- /dev/null
+++ b/games-strategy/warmux/files/warmux-11.04.1-action.patch
@@ -0,0 +1,12 @@
+diff -uNr warmux-11.04.orig/lib/warmux/action/action.cpp warmux-11.04/lib/warmux/action/action.cpp
+--- warmux-11.04.orig/lib/warmux/action/action.cpp 2012-03-27 15:18:08.440709875 +0200
++++ warmux-11.04/lib/warmux/action/action.cpp 2012-03-27 15:17:44.871711354 +0200
+@@ -85,7 +85,7 @@
+ {
+ m_creator = _creator;
+
+- m_header.len = SDLNet_Read32(buffer);
++ m_header.len = SDLNet_Read32((void *)buffer);
+ ASSERT(m_header.len >= sizeof(Header));
+ buffer += 4;
+ // All of the following could be skipped for the actions we now, \ No newline at end of file
diff --git a/games-strategy/warmux/files/warmux-11.04.1-gcc47.patch b/games-strategy/warmux/files/warmux-11.04.1-gcc47.patch
new file mode 100644
index 00000000000..8460bcbd0b1
--- /dev/null
+++ b/games-strategy/warmux/files/warmux-11.04.1-gcc47.patch
@@ -0,0 +1,11 @@
+Description: Fix FTBFS with gcc 4.7.
+Author: Felix Geyer <debfx-pkg@fobos.de>
+
+--- warmux-11.04.1+repack.orig/tools/list_games/main.cpp
++++ warmux-11.04.1+repack/tools/list_games/main.cpp
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <unistd.h>
+ #include <WARMUX_types.h>
+ #include <WARMUX_network.h>
+ #include <WARMUX_index_server.h>
diff --git a/games-strategy/warmux/files/warmux-11.04.1-gentoo.patch b/games-strategy/warmux/files/warmux-11.04.1-gentoo.patch
new file mode 100644
index 00000000000..62d22f84c82
--- /dev/null
+++ b/games-strategy/warmux/files/warmux-11.04.1-gentoo.patch
@@ -0,0 +1,40 @@
+diff -ru warmux-11.04.orig/configure.ac warmux-11.04/configure.ac
+--- warmux-11.04.orig/configure.ac 2011-04-18 16:46:12.000000000 -0400
++++ warmux-11.04/configure.ac 2011-04-19 11:17:27.380256500 -0400
+@@ -43,8 +43,6 @@
+ AC_MSG_ERROR([*** No C++ compiler can be found!])
+ fi
+
+-AX_CFLAGS_WARN_ALL([CXXFLAGS])
+-
+ # ==========================================================================
+ # == Set flags for various environments =
+ # ==========================================================================
+@@ -348,14 +346,9 @@
+ exit 1
+ fi
+
+-dnl === Add Werror flag for gcc/g++ if debug mode is enabled, ==============
+-dnl === but allow RTTI (ie dynamic_cast, typeid/typeinfo unavailable) ======
+-if test "x${debug}" = "xyes"; then
++if test "x${debug}" != "xyes"; then
+- CFLAGS="$CFLAGS -Werror"
+- CXXFLAGS="$CXXFLAGS -Werror"
+-else
+ CXXFLAGS="$CXXFLAGS -fno-rtti"
+ fi
+
+ dnl === Forbid exceptions (Android platform requirement) ===================
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+diff -ru warmux-11.04.orig/data/Makefile.am warmux-11.04/data/Makefile.am
+--- warmux-11.04.orig/data/Makefile.am 2011-04-18 16:46:11.000000000 -0400
++++ warmux-11.04/data/Makefile.am 2011-04-19 11:17:45.134724536 -0400
+@@ -1,8 +1,2 @@
+-xdg_appsdir = $(prefix)/share/applications
+-xdg_apps_DATA = warmux.desktop warmux_files.desktop
+-pixmapsdir = $(prefix)/share/pixmaps
+-pixmaps_DATA = icon/warmux_128x128.png
+-
+ nobase_dist_pkgdata_DATA = @DATA_FILES@
+ pkgdatadir = @DATADIR@
+-EXTRA_DIST = $(pixmaps_DATA)
diff --git a/games-strategy/warmux/files/warmux-11.04.1-stat.patch b/games-strategy/warmux/files/warmux-11.04.1-stat.patch
new file mode 100644
index 00000000000..487b3805ba6
--- /dev/null
+++ b/games-strategy/warmux/files/warmux-11.04.1-stat.patch
@@ -0,0 +1,61 @@
+diff -ur warmux-11.04.orig/lib/warmux/tools/file_tools.cpp warmux-11.04/lib/warmux/tools/file_tools.cpp
+--- warmux-11.04.orig/lib/warmux/tools/file_tools.cpp 2011-04-28 21:03:13.000000000 +0200
++++ warmux-11.04/lib/warmux/tools/file_tools.cpp 2013-03-05 16:58:42.040443845 +0100
+@@ -33,6 +33,8 @@
+ # include <direct.h>
+ # undef DeleteFile // windows.h defines it I think
+ #else
++# include <sys/types.h>
++# include <sys/stat.h>
+ # include <stdlib.h> // getenv
+ # include <unistd.h> // not needed by mingw
+ #endif
+@@ -275,18 +277,14 @@
+ {
+ DIR *dir;
+ struct dirent *file;
+-#ifdef __SYMBIAN32__
+ std::string dname;
+-#endif
+ };
+
+ FolderSearch* OpenFolder(const std::string& dirname)
+ {
+ FolderSearch *f = new FolderSearch;
+ f->dir = opendir(dirname.c_str());
+-#ifdef __SYMBIAN32__
+ f->dname = dirname;
+-#endif
+
+ if (!f->dir) {
+ delete f;
+@@ -300,11 +298,11 @@
+ {
+ while ((f->file = readdir(f->dir)) != NULL) {
+
++ if (
+ #ifdef __SYMBIAN32__
+- if (f->file->d_namlen && DoesFolderExist(f->dname+"/"+std::string(f->file->d_name))) {
+-#else
+- if (f->file->d_type == DT_DIR) {
++ f->file->d_namlen &&
+ #endif
++ DoesFolderExist(f->dname+"/"+std::string(f->file->d_name))) {
+ // If we are also looking for files, report it isn't one
+ if (file)
+ file = false;
+@@ -316,11 +314,11 @@
+ continue;
+
+ // This is a file and we do search for file
++ if (
+ #ifdef __SYMBIAN32__
+- if (f->file->d_namlen && DoesFileExist(f->dname+"/"+std::string(f->file->d_name))) {
+-#else
+- if (f->file->d_type == DT_REG) {
++ f->file->d_namlen &&
+ #endif
++ DoesFileExist(f->dname+"/"+std::string(f->file->d_name))) {
+ file = true;
+ return f->file->d_name;
+ }
diff --git a/games-strategy/warmux/files/warmux-11.04.1-zlib.patch b/games-strategy/warmux/files/warmux-11.04.1-zlib.patch
new file mode 100644
index 00000000000..c7e77aba11c
--- /dev/null
+++ b/games-strategy/warmux/files/warmux-11.04.1-zlib.patch
@@ -0,0 +1,11 @@
+diff -uNr warmux-11.04.orig/src/graphic/surface.cpp warmux-11.04/src/graphic/surface.cpp
+--- warmux-11.04.orig/src/graphic/surface.cpp 2011-09-19 09:26:52.392650465 +0200
++++ warmux-11.04/src/graphic/surface.cpp 2011-09-19 09:26:19.417648189 +0200
+@@ -25,6 +25,7 @@
+ #include <SDL_image.h>
+ #include <SDL_rotozoom.h>
+ #include <png.h>
++#include <zlib.h>
+
+ #include "graphic/surface.h"
+ #include "tool/math_tools.h"
diff --git a/games-strategy/warmux/metadata.xml b/games-strategy/warmux/metadata.xml
new file mode 100644
index 00000000000..d3c2cc926f0
--- /dev/null
+++ b/games-strategy/warmux/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-strategy/warmux/warmux-11.04.1.ebuild b/games-strategy/warmux/warmux-11.04.1.ebuild
new file mode 100644
index 00000000000..6be4fcdfeaf
--- /dev/null
+++ b/games-strategy/warmux/warmux-11.04.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils games
+
+DESCRIPTION="A free Worms clone"
+HOMEPAGE="http://gna.org/projects/warmux/"
+SRC_URI="http://download.gna.org/warmux/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="debug nls unicode"
+
+RDEPEND="media-libs/libsdl[joystick,video]
+ media-libs/sdl-image[jpeg,png]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-ttf
+ media-libs/sdl-net
+ >=media-libs/sdl-gfx-2.0.22
+ net-misc/curl
+ media-fonts/dejavu
+ dev-libs/libxml2
+ x11-libs/libX11
+ nls? ( virtual/libintl )
+ unicode? ( dev-libs/fribidi )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}-11.04
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-zlib.patch \
+ "${FILESDIR}"/${P}-action.patch \
+ "${FILESDIR}"/${P}-gcc47.patch \
+ "${FILESDIR}"/${P}-stat.patch
+ eautoreconf
+}
+
+src_configure() {
+ egamesconf \
+ --with-localedir-name=/usr/share/locale \
+ --with-datadir-name="${GAMES_DATADIR}/${PN}" \
+ --with-font-path=/usr/share/fonts/dejavu/DejaVuSans.ttf \
+ $(use_enable debug) \
+ $(use_enable nls) \
+ $(use_enable unicode fribidi)
+}
+
+src_install() {
+ default
+ rm -f "${D}${GAMES_DATADIR}/${PN}/font/DejaVuSans.ttf"
+ doicon data/icon/warmux.svg
+ make_desktop_entry warmux Warmux
+ prepgamesdirs
+}
diff --git a/games-strategy/warzone2100/Manifest b/games-strategy/warzone2100/Manifest
new file mode 100644
index 00000000000..ebee4ebec7e
--- /dev/null
+++ b/games-strategy/warzone2100/Manifest
@@ -0,0 +1,2 @@
+DIST warzone2100-3.1.2.tar.xz 86232636 SHA256 e33b0c89b981acda4ca2b473e105510caaecd0a0c6648ae22262f4b561566f1b SHA512 55046ebb661ccc948b426dd07b116173bce70221a94c55fbe0897b3ad2137e22af6163476a72c4f1a7e00eed3a04f53eb1f2243d64491b48467c67928992ae87 WHIRLPOOL 0d2cc9a09e1118a9afad6fae88682a93fc0622df22f30cedb097cff670329b1a820d04df65538585e92bc0017e3790b1026bf228ad77a8fbb69c423f85d7eb64
+DIST warzone2100-videos-2.2.wz 571937134 SHA256 142ae905be288cca33357a49f42b884c190e828fc0b1b1773ded5dff774f41a3 SHA512 ca1a1af51296afdaca137114821508c5783f077090e665eae0f6df895855f57c43f84434706309e819417f5f35d1c649bd14e96dc9fbbb1252d30a4f9a223cf6 WHIRLPOOL 167e39a896081d75415810cdaa9c00ce3fa4062db1ef2b4f6f164beb9c1a1d3fd34cd474880521b75e4580f4496b246586d9270219e1cfe8e7740d1f7af35ebe
diff --git a/games-strategy/warzone2100/files/warzone2100-3.1.2-openGL.patch b/games-strategy/warzone2100/files/warzone2100-3.1.2-openGL.patch
new file mode 100644
index 00000000000..568510eb726
--- /dev/null
+++ b/games-strategy/warzone2100/files/warzone2100-3.1.2-openGL.patch
@@ -0,0 +1,11 @@
+--- lib/ivis_opengl/screen.cpp.old 2014-10-29 13:45:01.516359163 +0100
++++ lib/ivis_opengl/screen.cpp 2014-10-29 13:45:42.743968030 +0100
+@@ -261,7 +261,7 @@
+ __glewUseProgram = __glewUseProgramObjectARB;
+ __glewGetShaderiv = __glewGetObjectParameterivARB;
+ __glewLinkProgram = __glewLinkProgramARB;
+- __glewShaderSource = __glewShaderSourceARB;
++ __glewShaderSource = (PFNGLSHADERSOURCEPROC)__glewShaderSourceARB;
+ __glewUniform1f = __glewUniform1fARB;
+ __glewUniform1i = __glewUniform1iARB;
+ __glewUniform4fv = __glewUniform4fvARB;
diff --git a/games-strategy/warzone2100/files/warzone2100-3.1.2-pkgconf.patch b/games-strategy/warzone2100/files/warzone2100-3.1.2-pkgconf.patch
new file mode 100644
index 00000000000..0149ea77652
--- /dev/null
+++ b/games-strategy/warzone2100/files/warzone2100-3.1.2-pkgconf.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/show_bug.cgi?id=428494
+
+should be obsolete with >=dev-util/pkgconf-0.8.4
+
+--- warzone2100-3.1.0/configure.ac
++++ warzone2100-3.1.0/configure.ac
+@@ -89,7 +89,6 @@
+
+ # Check for pkg-config
+ PKG_PROG_PKG_CONFIG
+-AC_PROG_VERSION_CHECK([pkg-config], [0.9])
+
+ AC_MSG_CHECKING([for backend])
+ AC_ARG_WITH([backend],
diff --git a/games-strategy/warzone2100/metadata.xml b/games-strategy/warzone2100/metadata.xml
new file mode 100644
index 00000000000..3de7437cdf1
--- /dev/null
+++ b/games-strategy/warzone2100/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="qt4">Use qt-gui/qt-opengl for backend rendering instead of sdl</flag>
+ </use>
+ <longdescription>
+ Warzone 2100 offers campaign, multi-player, and single-player
+ skirmish modes. An extensive tech tree with over 400 different
+ technologies, combined with the unit design system, allows for
+ a wide variety of possible units and tactics.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">warzone2100</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/warzone2100/warzone2100-3.1.2.ebuild b/games-strategy/warzone2100/warzone2100-3.1.2.ebuild
new file mode 100644
index 00000000000..b39602836c0
--- /dev/null
+++ b/games-strategy/warzone2100/warzone2100-3.1.2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools toolchain-funcs eutils versionator gnome2-utils games
+
+MY_PV=$(get_version_component_range -2)
+VIDEOS_PV=2.2
+VIDEOS_P=${PN}-videos-${VIDEOS_PV}.wz
+DESCRIPTION="3D real-time strategy game"
+HOMEPAGE="http://wz2100.net/"
+SRC_URI="mirror://sourceforge/warzone2100/${P}.tar.xz
+ videos? ( mirror://sourceforge/warzone2100/warzone2100/Videos/${VIDEOS_PV}/high-quality-en/sequences.wz -> ${VIDEOS_P} )"
+
+LICENSE="GPL-2 CC-BY-SA-3.0 public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+# upstream requested debug support
+IUSE="debug nls qt4 videos"
+
+# TODO: unbundle miniupnpc and quesoglc
+RDEPEND=">=dev-games/physfs-2[zip]
+ dev-libs/fribidi
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/glew
+ media-libs/libogg
+ media-libs/libpng:0
+ media-libs/libtheora
+ media-libs/libvorbis
+ media-libs/openal
+ sys-libs/zlib
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXrandr
+ dev-qt/qtcore:4
+ dev-qt/qtscript:4
+ nls? ( virtual/libintl )
+ qt4? (
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ )
+ !qt4? ( media-libs/libsdl[opengl,video] )"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+RDEPEND="${RDEPEND}
+ media-fonts/dejavu"
+
+src_prepare() {
+ sed -i \
+ -e 's/#top_builddir/top_builddir/' \
+ po/Makevars || die
+
+ epatch "${FILESDIR}"/${P}-pkgconf.patch \
+ "${FILESDIR}"/${P}-openGL.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ egamesconf \
+ --docdir=/usr/share/doc/${PF} \
+ --localedir=/usr/share/locale \
+ --with-distributor="Gentoo ${PF}" \
+ --with-icondir=/usr/share/icons/hicolor/128x128/apps \
+ --with-applicationdir=/usr/share/applications \
+ $(use_enable debug debug relaxed) \
+ $(use_enable nls) \
+ --with-backend=$(usex qt4 "qt" "sdl")
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING*
+ if use videos ; then
+ insinto "${GAMES_DATADIR}"/${PN}
+ newins "${DISTDIR}"/${VIDEOS_P} sequences.wz
+ fi
+ doman doc/warzone2100.6
+ dodoc doc/quickstartguide.pdf
+
+ elog "If you are using opensource drivers you should consider installing: "
+ elog " media-libs/libtxc_dxtn"
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-strategy/wesnoth/Manifest b/games-strategy/wesnoth/Manifest
new file mode 100644
index 00000000000..17a83aa5d75
--- /dev/null
+++ b/games-strategy/wesnoth/Manifest
@@ -0,0 +1,2 @@
+DIST wesnoth-1.12.2.tar.bz2 392234446 SHA256 1f4f76e5fd0ce175a3eb7b9855aff7a58dc75899c534d7653d97ac9fd4fe798b SHA512 023df596da0cbcc53d44a91a56635c9f31cfc2f3f4315c4029b44084c07ba838d22a10e378f14fab0c27dd1befe6e1a4d9e2c92ef47890748a30d36c9355c590 WHIRLPOOL cd65d622afad67d96acb3df33841740f2db25e8850addfc979a4b63b79b959699810be9ffc0df855453fc92e385ac27f52db4db6222d66ef2b94c9ed0a6aa911
+DIST wesnoth-1.12.4.tar.bz2 392278313 SHA256 bf525060da4201f1e62f861ed021f13175766e074a8a490b995052453df51ea7 SHA512 d8ea6d8c14b69318f4458d7e6dcace28979230ea13b76d07635ae9be7f2c675d4aa9822ff376a9617fe9fc1560999afdcf3165319842a5c2f0a4f87a31c170e9 WHIRLPOOL d4767d809f6085ef979c02928482b4bb16d3a1bdf34246bdb8b9eae0c8a7650f9d7160a851318c24b969fef777064ab7fda7c7687aab09c49a52f08327f4af0f
diff --git a/games-strategy/wesnoth/files/wesnothd.rc b/games-strategy/wesnoth/files/wesnothd.rc
new file mode 100644
index 00000000000..025a85c7de4
--- /dev/null
+++ b/games-strategy/wesnoth/files/wesnothd.rc
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting wesnothd"
+ start-stop-daemon --start --quiet -b -m \
+ --pidfile "GAMES_STATEDIR"/run/wesnothd/wesnothd.pid \
+ -c GAMES_USER_DED:GAMES_GROUP \
+ --exec "GAMES_BINDIR"/wesnothd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping wesnothd"
+ start-stop-daemon --stop --quiet --pidfile "GAMES_STATEDIR"/run/wesnothd/wesnothd.pid
+ eend $?
+}
diff --git a/games-strategy/wesnoth/metadata.xml b/games-strategy/wesnoth/metadata.xml
new file mode 100644
index 00000000000..02af598e0ea
--- /dev/null
+++ b/games-strategy/wesnoth/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <use>
+ <flag name="server">Enable compilation of server</flag>
+ <flag name="fribidi">Support for right-to-left languages</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">wesnoth</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/wesnoth/wesnoth-1.12.2.ebuild b/games-strategy/wesnoth/wesnoth-1.12.2.ebuild
new file mode 100644
index 00000000000..1c325fd2591
--- /dev/null
+++ b/games-strategy/wesnoth/wesnoth-1.12.2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils eutils multilib toolchain-funcs flag-o-matic games
+
+DESCRIPTION="Battle for Wesnoth - A fantasy turn-based strategy game"
+HOMEPAGE="http://www.wesnoth.org/"
+SRC_URI="mirror://sourceforge/wesnoth/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86 ~x86-fbsd"
+IUSE="dbus dedicated doc fribidi nls server"
+
+RDEPEND=">=media-libs/libsdl-1.2.7:0[joystick,video,X]
+ media-libs/sdl-net
+ !dedicated? (
+ >=media-libs/sdl-ttf-2.0.8
+ >=media-libs/sdl-mixer-1.2[vorbis]
+ >=media-libs/sdl-image-1.2[jpeg,png]
+ fribidi? ( dev-libs/fribidi )
+ dbus? ( sys-apps/dbus )
+ sys-libs/zlib
+ x11-libs/pango
+ dev-lang/lua:0
+ media-libs/fontconfig
+ )
+ >=dev-libs/boost-1.48[nls,threads]
+ virtual/libintl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+src_prepare() {
+ if use dedicated || use server ; then
+ sed \
+ -e "s:GAMES_BINDIR:${GAMES_BINDIR}:" \
+ -e "s:GAMES_STATEDIR:${GAMES_STATEDIR}:" \
+ -e "s/GAMES_USER_DED/${GAMES_USER_DED}/" \
+ -e "s/GAMES_GROUP/${GAMES_GROUP}/" "${FILESDIR}"/wesnothd.rc \
+ > "${T}"/wesnothd || die
+ fi
+ if ! use doc ; then
+ sed -i \
+ -e '/manual/d' \
+ doc/CMakeLists.txt || die
+ fi
+ # bug #472994
+ mv icons/wesnoth-icon-Mac.png icons/wesnoth-icon.png || die
+ mv icons/map-editor-icon-Mac.png icons/wesnoth_editor-icon.png || die
+
+ # respect LINGUAS (bug #483316)
+ if [[ ${LINGUAS+set} ]] ; then
+ local langs
+ for lang in $(cat po/LINGUAS)
+ do
+ has $lang $LINGUAS && langs+="$lang "
+ done
+ echo "$langs" > po/LINGUAS || die
+ fi
+}
+
+src_configure() {
+ filter-flags -ftracer -fomit-frame-pointer
+ if [[ $(gcc-major-version) -eq 3 ]] ; then
+ filter-flags -fstack-protector
+ append-flags -fno-stack-protector
+ fi
+ # Work around eclass
+ append-flags -UNDEBUG
+ if use dedicated || use server ; then
+ mycmakeargs=(
+ "-DENABLE_CAMPAIGN_SERVER=TRUE"
+ "-DENABLE_SERVER=TRUE"
+ "-DSERVER_UID=${GAMES_USER_DED}"
+ "-DSERVER_GID=${GAMES_GROUP}"
+ "-DFIFO_DIR=${GAMES_STATEDIR}/run/wesnothd"
+ )
+ else
+ mycmakeargs=(
+ $(cmake-utils_use_enable fribidi FRIBIDI)
+ "-DENABLE_CAMPAIGN_SERVER=FALSE"
+ "-DENABLE_SERVER=FALSE"
+ )
+ fi
+ mycmakeargs+=(
+ $(cmake-utils_use_enable !dedicated GAME)
+ $(cmake-utils_use_enable !dedicated ENABLE_DESKTOP_ENTRY)
+ $(cmake-utils_use_enable nls NLS)
+ $(cmake-utils_use_enable dbus NOTIFICATIONS)
+ "-DCMAKE_VERBOSE_MAKEFILE=TRUE"
+ "-DENABLE_STRICT_COMPILATION=FALSE"
+ "-DCMAKE_INSTALL_PREFIX=${GAMES_PREFIX}"
+ "-DDATAROOTDIR=${GAMES_DATADIR}"
+ "-DBINDIR=${GAMES_BINDIR}"
+ "-DICONDIR=/usr/share/pixmaps"
+ "-DDESKTOPDIR=/usr/share/applications"
+ "-DLOCALEDIR=/usr/share/locale"
+ "-DMANDIR=/usr/share/man"
+ "-DDOCDIR=/usr/share/doc/${PF}"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ DOCS="README changelog players_changelog" cmake-utils_src_install
+ if use dedicated || use server; then
+ keepdir "${GAMES_STATEDIR}/run/wesnothd"
+ doinitd "${T}"/wesnothd || die
+ fi
+ prepgamesdirs
+}
diff --git a/games-strategy/wesnoth/wesnoth-1.12.4.ebuild b/games-strategy/wesnoth/wesnoth-1.12.4.ebuild
new file mode 100644
index 00000000000..080e59e1744
--- /dev/null
+++ b/games-strategy/wesnoth/wesnoth-1.12.4.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils eutils multilib toolchain-funcs flag-o-matic games
+
+DESCRIPTION="Battle for Wesnoth - A fantasy turn-based strategy game"
+HOMEPAGE="http://www.wesnoth.org/"
+SRC_URI="mirror://sourceforge/wesnoth/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="dbus dedicated doc fribidi nls server"
+
+RDEPEND=">=media-libs/libsdl-1.2.7:0[joystick,video,X]
+ media-libs/sdl-net
+ !dedicated? (
+ >=media-libs/sdl-ttf-2.0.8
+ >=media-libs/sdl-mixer-1.2[vorbis]
+ >=media-libs/sdl-image-1.2[jpeg,png]
+ fribidi? ( dev-libs/fribidi )
+ dbus? ( sys-apps/dbus )
+ sys-libs/zlib
+ x11-libs/pango
+ dev-lang/lua:0
+ media-libs/fontconfig
+ )
+ >=dev-libs/boost-1.48:=[nls,threads]
+ virtual/libintl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+src_prepare() {
+ if use dedicated || use server ; then
+ sed \
+ -e "s:GAMES_BINDIR:${GAMES_BINDIR}:" \
+ -e "s:GAMES_STATEDIR:${GAMES_STATEDIR}:" \
+ -e "s/GAMES_USER_DED/${GAMES_USER_DED}/" \
+ -e "s/GAMES_GROUP/${GAMES_GROUP}/" "${FILESDIR}"/wesnothd.rc \
+ > "${T}"/wesnothd || die
+ fi
+ if ! use doc ; then
+ sed -i \
+ -e '/manual/d' \
+ doc/CMakeLists.txt || die
+ fi
+ # bug #472994
+ mv icons/wesnoth-icon-Mac.png icons/wesnoth-icon.png || die
+ mv icons/map-editor-icon-Mac.png icons/wesnoth_editor-icon.png || die
+
+ # respect LINGUAS (bug #483316)
+ if [[ ${LINGUAS+set} ]] ; then
+ local langs
+ for lang in $(cat po/LINGUAS)
+ do
+ has $lang $LINGUAS && langs+="$lang "
+ done
+ echo "$langs" > po/LINGUAS || die
+ fi
+}
+
+src_configure() {
+ filter-flags -ftracer -fomit-frame-pointer
+ if [[ $(gcc-major-version) -eq 3 ]] ; then
+ filter-flags -fstack-protector
+ append-flags -fno-stack-protector
+ fi
+ # Work around eclass
+ append-flags -UNDEBUG
+ if use dedicated || use server ; then
+ mycmakeargs=(
+ "-DENABLE_CAMPAIGN_SERVER=TRUE"
+ "-DENABLE_SERVER=TRUE"
+ "-DSERVER_UID=${GAMES_USER_DED}"
+ "-DSERVER_GID=${GAMES_GROUP}"
+ "-DFIFO_DIR=${GAMES_STATEDIR}/run/wesnothd"
+ )
+ else
+ mycmakeargs=(
+ $(cmake-utils_use_enable fribidi FRIBIDI)
+ "-DENABLE_CAMPAIGN_SERVER=FALSE"
+ "-DENABLE_SERVER=FALSE"
+ )
+ fi
+ mycmakeargs+=(
+ $(cmake-utils_use_enable !dedicated GAME)
+ $(cmake-utils_use_enable !dedicated ENABLE_DESKTOP_ENTRY)
+ $(cmake-utils_use_enable nls NLS)
+ $(cmake-utils_use_enable dbus NOTIFICATIONS)
+ "-DCMAKE_VERBOSE_MAKEFILE=TRUE"
+ "-DENABLE_STRICT_COMPILATION=FALSE"
+ "-DCMAKE_INSTALL_PREFIX=${GAMES_PREFIX}"
+ "-DDATAROOTDIR=${GAMES_DATADIR}"
+ "-DBINDIR=${GAMES_BINDIR}"
+ "-DICONDIR=/usr/share/pixmaps"
+ "-DDESKTOPDIR=/usr/share/applications"
+ "-DLOCALEDIR=/usr/share/locale"
+ "-DMANDIR=/usr/share/man"
+ "-DDOCDIR=/usr/share/doc/${PF}"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ DOCS="README.md changelog players_changelog" cmake-utils_src_install
+ if use dedicated || use server; then
+ keepdir "${GAMES_STATEDIR}/run/wesnothd"
+ doinitd "${T}"/wesnothd
+ fi
+ prepgamesdirs
+}
diff --git a/games-strategy/widelands/Manifest b/games-strategy/widelands/Manifest
new file mode 100644
index 00000000000..9c0c0115bff
--- /dev/null
+++ b/games-strategy/widelands/Manifest
@@ -0,0 +1 @@
+DIST widelands-build17-src.tar.bz2 175547379 SHA256 be48b3b8f342a537b39a3aec2f7702250a6a47e427188ba3bece67d7d90f3cc5 SHA512 ace4127ba00bbe788cb266d2c508b2d9b0651c99f65f08a3c7d680f8998e64e26252f7095c1b62d94012b99ef1a6dc2f8be08d17f2e8f1ab864abc650c658f2d WHIRLPOOL 35454b86d467058017ac71da8fae23b3556fe8e6ced5cf94fbd07ff21b2b38eca444be6168224d3023cd1af81867a3e6e45dd1773ef54675769ec51403b24cfa
diff --git a/games-strategy/widelands/files/widelands-0.17-cxxflags.patch b/games-strategy/widelands/files/widelands-0.17-cxxflags.patch
new file mode 100644
index 00000000000..419d5d78a35
--- /dev/null
+++ b/games-strategy/widelands/files/widelands-0.17-cxxflags.patch
@@ -0,0 +1,33 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Wed May 16 12:06:13 UTC 2012
+
+respect CXXFLAGS
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -209,24 +209,7 @@
+
+ # CMAKE only defines "-g", but we need -DDEBUG also, and we need -DNOPARACHUTE (for SDL) in Debug
+ set (CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG -DNOPARACHUTE${WL_COMPILERFLAG_OLDSTYLECAST}${WL_COMPILERFLAG_GENERICWARNINGS}${WL_COMPILERFLAG_EXTRAWARNINGS}${WL_COMPILERFLAG_STRICT}" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+-
+-#This can be removed if no one uses gcc 4.5.1 or 4.5.2 any more
+-IF (${CMAKE_COMPILER_IS_GNUCXX})
+-EXEC_PROGRAM (
+- ${CMAKE_CXX_COMPILER}
+- ARGS --version
+- OUTPUT_VARIABLE WLBUILD_COMPILERVERSION
+- )
+- STRING(REGEX REPLACE ".*(4)\\.(5)\\.([0-9]).*" "\\1.\\2.\\3" WLBUILD_COMPILERVERSION_REP ${WLBUILD_COMPILERVERSION})
+- IF (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
+- message("Detected gcc ${WLBUILD_COMPILERVERSION_REP}")
+- message("Suffering from gcc bug, disabling -O3")
+- set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+- ELSE (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
+- #This line is the default and should be preserved.
+- set (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+- ENDIF (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
+-ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
++set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" CACHE STRING "Release compiler flags" FORCE)
+
+ #If building with MSVC, then check for 3rdparty libs
+ if (DEFINED MSVC)
diff --git a/games-strategy/widelands/files/widelands-0.17-gcc47.patch b/games-strategy/widelands/files/widelands-0.17-gcc47.patch
new file mode 100644
index 00000000000..9ea19c3571d
--- /dev/null
+++ b/games-strategy/widelands/files/widelands-0.17-gcc47.patch
@@ -0,0 +1,12 @@
+=== modified file 'src/main.cc'
+--- src/main.cc 2012-02-15 21:25:34 +0000
++++ src/main.cc 2012-05-02 07:43:01 +0000
+@@ -28,6 +28,7 @@
+ #include <iostream>
+ #include <stdexcept>
+ #include <typeinfo>
++#include <unistd.h>
+
+ #include <SDL_main.h>
+
+
diff --git a/games-strategy/widelands/metadata.xml b/games-strategy/widelands/metadata.xml
new file mode 100644
index 00000000000..78bf2ca1e1e
--- /dev/null
+++ b/games-strategy/widelands/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="launchpad">widelands</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/widelands/widelands-0.17.ebuild b/games-strategy/widelands/widelands-0.17.ebuild
new file mode 100644
index 00000000000..9a4e1caa886
--- /dev/null
+++ b/games-strategy/widelands/widelands-0.17.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils versionator toolchain-funcs flag-o-matic cmake-utils games
+
+MY_PV=build$(get_version_component_range 2)
+MY_P=${PN}-${MY_PV}-src
+DESCRIPTION="A game similar to Settlers 2"
+HOMEPAGE="http://www.widelands.org/"
+SRC_URI="http://launchpad.net/widelands/${MY_PV}/build-$(get_version_component_range 2)/+download/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-lang/lua
+ media-libs/libsdl[video]
+ media-libs/sdl-image[jpeg,png]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-gfx
+ media-libs/sdl-net
+ media-libs/libpng
+ sys-libs/zlib
+ media-libs/glew
+ media-libs/sdl-ttf
+ >=dev-libs/boost-1.37"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+CMAKE_BUILD_TYPE=Release
+PREFIX=${GAMES_DATADIR}/${PN}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-cxxflags.patch \
+ "${FILESDIR}"/${P}-gcc47.patch
+
+ sed -i -e 's:__ppc__:__PPC__:' src/s2map.cc || die
+ sed -i -e '74i#define OF(x) x' src/io/filesystem/{un,}zip.h || die
+ sed -i -e '22i#define OF(x) x' src/io/filesystem/ioapi.h || die
+ sed -i -e '/Boost_USE_STATIC_LIBS/s:ON:OFF:' CMakeLists.txt || die
+
+ # how do I hate boost? Let me count the ways...
+ local boost_ver=$(best_version ">=dev-libs/boost-1.37")
+
+ boost_ver=${boost_ver/*boost-/}
+ boost_ver=${boost_ver%.*}
+ boost_ver=${boost_ver/./_}
+
+ einfo "Using boost version ${boost_ver}"
+ append-cxxflags \
+ -I/usr/include/boost-${boost_ver}
+ append-ldflags \
+ -L/usr/$(get_libdir)/boost-${boost_ver}
+ export BOOST_INCLUDEDIR="/usr/include/boost-${boost_ver}"
+ export BOOST_LIBRARYDIR="/usr/$(get_libdir)/boost-${boost_ver}"
+}
+
+src_configure() {
+ local mycmakeargs+=(
+ '-DWL_VERSION_STANDARD=true'
+ "-DWL_INSTALL_PREFIX=${GAMES_PREFIX}"
+ "-DWL_INSTALL_DATADIR=${GAMES_DATADIR}/${PN}"
+ "-DWL_INSTALL_LOCALEDIR=${GAMES_DATADIR}/${PN}/locale"
+ "-DWL_INSTALL_BINDIR=${GAMES_BINDIR}"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ newicon pics/wl-ico-128.png ${PN}.png
+ make_desktop_entry ${PN} Widelands
+ dodoc ChangeLog CREDITS
+ prepgamesdirs
+}
diff --git a/games-strategy/xbattle/Manifest b/games-strategy/xbattle/Manifest
new file mode 100644
index 00000000000..92a1689b2a9
--- /dev/null
+++ b/games-strategy/xbattle/Manifest
@@ -0,0 +1 @@
+DIST xbattle-5.4.1.tar.gz 128982 SHA256 9de38df361c87d0fdc65e13cf2fa3bb28dc22a8d04cc94f2f08e6cd9457ee180
diff --git a/games-strategy/xbattle/metadata.xml b/games-strategy/xbattle/metadata.xml
new file mode 100644
index 00000000000..e46af3a374b
--- /dev/null
+++ b/games-strategy/xbattle/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<maintainer>
+<email>mr_bones_@gentoo.org</email>
+<name>Michael Sterrett</name>
+</maintainer>
+<longdescription>
+From the HOMEPAGE:
+XBattle is a concurrent multi-player arcade/strategy game that captures
+the dynamics of a wide range of military situations through numerous
+options. The game board is a matrix of game cells which can be occupied
+by troops of various colors, with troop strength indicated by the size of
+colored markers within a cell. Troops are commanded by clicking the mouse
+near the edge of an occupied cell in the direction that movement is to take
+place. XBattle is concurrent, so that commands are given continuously by
+all players without waiting for turns. A command will be acknowledged by
+the appearance of a command vector, and thereafter, in each update cycle,
+a certain proportion of the troops will move from the source cell to the
+destination cell. In this way, troops can be slowly redistributed via
+supply lines which steadily deliver troops to their endpoints. Troops
+of different colors engage in battle whenever they come to occupy the
+same cell. A wide variety of options are available for configuring troop
+movement, distribution, and production.
+</longdescription>
+</pkgmetadata>
diff --git a/games-strategy/xbattle/xbattle-5.4.1.ebuild b/games-strategy/xbattle/xbattle-5.4.1.ebuild
new file mode 100644
index 00000000000..25b405599bf
--- /dev/null
+++ b/games-strategy/xbattle/xbattle-5.4.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit games
+
+DESCRIPTION="A multi-player game of strategy and coordination"
+HOMEPAGE="http://www.cgl.uwaterloo.ca/~jdsteele/xbattle.html"
+SRC_URI="ftp://cns-ftp.bu.edu/pub/xbattle/${P}.tar.gz"
+
+LICENSE="xbattle"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc sparc x86"
+IUSE=""
+
+RDEPEND="x11-libs/libXext
+ x11-libs/libX11
+ !games-strategy/xbattleai"
+DEPEND="${RDEPEND}
+ x11-proto/xproto
+ app-text/rman
+ x11-misc/imake"
+
+src_prepare() {
+ sed -i \
+ -e "s:/export/home/lesher/:${GAMES_DATADIR}/${PN}/:" Imakefile || die
+}
+
+src_configure() {
+ xmkmf || die
+}
+
+src_compile() {
+ emake \
+ CDEBUGFLAGS="${CFLAGS}" \
+ LOCAL_LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dogamesbin xbattle
+ newgamesbin tutorial1 xbattle-tutorial1
+ newgamesbin tutorial2 xbattle-tutorial2
+ dodir "${GAMES_DATADIR}/${PN}"
+ cp -r xbas/ xbos/ xbts/ "${D}${GAMES_DATADIR}/${PN}/" || die
+ newman xbattle.man xbattle.6
+ dodoc README xbattle.dot
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog 'You may be interested by these tutorials:'
+ elog ' xbattle-tutorial1'
+ elog ' xbattle-tutorial2'
+}
diff --git a/games-strategy/xbattleai/Manifest b/games-strategy/xbattleai/Manifest
new file mode 100644
index 00000000000..fd91ad5b610
--- /dev/null
+++ b/games-strategy/xbattleai/Manifest
@@ -0,0 +1 @@
+DIST xbattleai-1.2.2.tgz 1511991 SHA256 5dc137e33cbb8afb1a2333df1a8bec9c069d83254265826ac33568ae1f502d70
diff --git a/games-strategy/xbattleai/files/xbattleai-1.2.2-sandbox.patch b/games-strategy/xbattleai/files/xbattleai-1.2.2-sandbox.patch
new file mode 100644
index 00000000000..566d4eec056
--- /dev/null
+++ b/games-strategy/xbattleai/files/xbattleai-1.2.2-sandbox.patch
@@ -0,0 +1,114 @@
+--- Makefile.in
++++ Makefile.in
+@@ -200,87 +200,87 @@
+ .PHONY: install-bin
+
+ install-bin: ${TARGET} ${SCRIPTS}
+- ${INSTALL_DIRS} ${bindir}
++ ${INSTALL_DIRS} ${DESTDIR}/${bindir}
+ @list='${TARGET} ${SCRIPTS}'; for p in $$list; do \
+ if test -f $$p; then \
+ ${ECHO} "${INSTALL_PROGRAM} $$p ${bindir}"; \
+- ${INSTALL_PROGRAM} $$p ${bindir}; \
++ ${INSTALL_PROGRAM} $$p ${DESTDIR}/${bindir}; \
+ else :; fi; \
+ done
+
+ .PHONY: install-man
+
+ install-man:
+- ${INSTALL_DIRS} ${mandir}
++ ${INSTALL_DIRS} ${DESTDIR}/${mandir}
+ @list='${MAN1}'; for p in $$list; do \
+ ${INSTALL_DIRS} ${mandir}/man1; \
+ if test -f ${SRC_DIR}/$${p}.man; then \
+ ${ECHO} "${INSTALL_DATA} ${SRC_DIR}/$${p}.man ${mandir}/man1/$${p}.1"; \
+- ${INSTALL_DATA} ${SRC_DIR}/$${p}.man ${mandir}/man1/$${p}.1; \
++ ${INSTALL_DATA} ${SRC_DIR}/$${p}.man ${DESTDIR}/${mandir}/man1/$${p}.1; \
+ else :; fi; \
+ done
+ @list='${MAN6}'; for p in $$list; do \
+- ${INSTALL_DIRS} ${mandir}/man6; \
++ ${INSTALL_DIRS} ${DESTDIR}/${mandir}/man6; \
+ if test -f ${SRC_DIR}/$${p}.man; then \
+ ${ECHO} "${INSTALL_DATA} ${SRC_DIR}/$${p}.man ${mandir}/man6/$${p}.6"; \
+- ${INSTALL_DATA} ${SRC_DIR}/$${p}.man ${mandir}/man6/$${p}.6; \
++ ${INSTALL_DATA} ${SRC_DIR}/$${p}.man ${DESTDIR}/${mandir}/man6/$${p}.6; \
+ else :; fi; \
+ done
+
+ .PHONY: install-share
+
+ install-share:
+- ${INSTALL_DIRS} ${XBO_DIR}
++ ${INSTALL_DIRS} ${DESTDIR}/${XBO_DIR}
+ @list='${SRC_DIR}/xbos/*'; for p in $$list; do \
+ if test -f $$p; then \
+ ${ECHO} "${INSTALL_DATA} $$p ${XBO_DIR}"; \
+- ${INSTALL_DATA} $$p ${XBO_DIR}; \
++ ${INSTALL_DATA} $$p ${DESTDIR}/${XBO_DIR}; \
+ else :; fi; \
+ done
+- ${INSTALL_DIRS} ${XBT_DIR}
++ ${INSTALL_DIRS} ${DESTDIR}/${XBT_DIR}
+ @list='${SRC_DIR}/xbts/*'; for p in $$list; do \
+ if test -f $$p; then \
+ ${ECHO} "${INSTALL_DATA} $$p ${XBT_DIR}"; \
+- ${INSTALL_DATA} $$p ${XBT_DIR}; \
++ ${INSTALL_DATA} $$p ${DESTDIR}/${XBT_DIR}; \
+ else :; fi; \
+ done
+- ${INSTALL_DIRS} ${XBA_DIR}
++ ${INSTALL_DIRS} ${DESTDIR}/${XBA_DIR}
+ @list='${SRC_DIR}/xbas/*'; for p in $$list; do \
+ if test -f $$p; then \
+ ${ECHO} "${INSTALL_DATA} $$p ${XBA_DIR}"; \
+- ${INSTALL_DATA} $$p ${XBA_DIR}; \
++ ${INSTALL_DATA} $$p ${DESTDIR}/${XBA_DIR}; \
+ else :; fi; \
+ done
+- ${INSTALL_DIRS} ${IMG_DIR}
++ ${INSTALL_DIRS} ${DESTDIR}/${IMG_DIR}
+ @list='${SRC_DIR}/images/*'; for p in $$list; do \
+ if test -f $$p; then \
+ ${ECHO} "${INSTALL_DATA} $$p ${IMG_DIR}"; \
+- ${INSTALL_DATA} $$p ${IMG_DIR}; \
++ ${INSTALL_DATA} $$p ${DESTDIR}/${IMG_DIR}; \
+ else :; fi; \
+ done
+- ${INSTALL_DIRS} ${SND_DIR}
++ ${INSTALL_DIRS} ${DESTDIR}/${SND_DIR}
+ @list='${SRC_DIR}/snd/*'; for p in $$list; do \
+ if test -f $$p; then \
+ ${ECHO} "${INSTALL_DATA} $$p ${SND_DIR}"; \
+- ${INSTALL_DATA} $$p ${SND_DIR}; \
++ ${INSTALL_DATA} $$p ${DESTDIR}/${SND_DIR}; \
+ else :; fi; \
+ done
+- ${INSTALL_DIRS} ${XBC_DIR}
++ ${INSTALL_DIRS} ${DESTDIR}/${XBC_DIR}
+ @list='${SRC_DIR}/xbcs/*'; for p in $$list; do \
+ if test -f $$p; then \
+ ${ECHO} "${INSTALL_DATA} $$p ${XBC_DIR}"; \
+- ${INSTALL_DATA} $$p ${XBC_DIR}; \
++ ${INSTALL_DATA} $$p ${DESTDIR}/${XBC_DIR}; \
+ else :; fi; \
+ done
+- ${INSTALL_DIRS} ${GC_DIR}
+- ${INSTALL_DATA} ${SRC_DIR}/gauntlet/gauntlet.dat ${GC_DIR};
+- ${INSTALL_DATA} ${SRC_DIR}/gauntlet/gauntlet.xbo ${GC_DIR};
+- ${INSTALL_PROGRAM} ${SRC_DIR}/gauntlet/gauntlet_interp.awk ${GC_DIR};
+- ${INSTALL_DIRS} ${GC_DIR}/gauntlet_levels
++ ${INSTALL_DIRS} ${DESTDIR}/${GC_DIR}
++ ${INSTALL_DATA} ${SRC_DIR}/gauntlet/gauntlet.dat ${DESTDIR}/${GC_DIR};
++ ${INSTALL_DATA} ${SRC_DIR}/gauntlet/gauntlet.xbo ${DESTDIR}/${GC_DIR};
++ ${INSTALL_PROGRAM} ${SRC_DIR}/gauntlet/gauntlet_interp.awk ${DESTDIR}/${GC_DIR};
++ ${INSTALL_DIRS} ${DESTDIR}/${GC_DIR}/gauntlet_levels
+ @list='${SRC_DIR}/gauntlet/gauntlet_levels/*'; for p in $$list; do \
+ if test -f $$p; then \
+ ${ECHO} "${INSTALL_DATA} $$p ${GC_DIR}/gauntlet_levels"; \
+- ${INSTALL_DATA} $$p ${GC_DIR}/gauntlet_levels; \
++ ${INSTALL_DATA} $$p ${DESTDIR}/${GC_DIR}/gauntlet_levels; \
+ else :; fi; \
+ done
+
diff --git a/games-strategy/xbattleai/metadata.xml b/games-strategy/xbattleai/metadata.xml
new file mode 100644
index 00000000000..e46af3a374b
--- /dev/null
+++ b/games-strategy/xbattleai/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<maintainer>
+<email>mr_bones_@gentoo.org</email>
+<name>Michael Sterrett</name>
+</maintainer>
+<longdescription>
+From the HOMEPAGE:
+XBattle is a concurrent multi-player arcade/strategy game that captures
+the dynamics of a wide range of military situations through numerous
+options. The game board is a matrix of game cells which can be occupied
+by troops of various colors, with troop strength indicated by the size of
+colored markers within a cell. Troops are commanded by clicking the mouse
+near the edge of an occupied cell in the direction that movement is to take
+place. XBattle is concurrent, so that commands are given continuously by
+all players without waiting for turns. A command will be acknowledged by
+the appearance of a command vector, and thereafter, in each update cycle,
+a certain proportion of the troops will move from the source cell to the
+destination cell. In this way, troops can be slowly redistributed via
+supply lines which steadily deliver troops to their endpoints. Troops
+of different colors engage in battle whenever they come to occupy the
+same cell. A wide variety of options are available for configuring troop
+movement, distribution, and production.
+</longdescription>
+</pkgmetadata>
diff --git a/games-strategy/xbattleai/xbattleai-1.2.2-r1.ebuild b/games-strategy/xbattleai/xbattleai-1.2.2-r1.ebuild
new file mode 100644
index 00000000000..6f62978f532
--- /dev/null
+++ b/games-strategy/xbattleai/xbattleai-1.2.2-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="A multi-player game of strategy and coordination"
+HOMEPAGE="https://inf.ug.edu.pl/~piotao/xbattle/mirror/www.lysator.liu.se/XBattleAI/"
+SRC_URI="https://inf.ug.edu.pl/~piotao/xbattle/mirror/www.lysator.liu.se/XBattleAI/${P}.tgz"
+
+LICENSE="xbattle"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+# Since this uses similar code and the same binary name as the original XBattle,
+# we want to make sure you can't install both at the same time
+RDEPEND="
+ x11-libs/libXext
+ x11-libs/libX11
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ !games-strategy/xbattle"
+DEPEND="${RDEPEND}
+ x11-proto/xproto
+ app-text/rman
+ x11-misc/imake"
+
+src_prepare() {
+ rm -f xbcs/foo.xbc~
+ epatch "${FILESDIR}"/${P}-sandbox.patch
+}
+
+src_install() {
+ DOCS="CONTRIBUTORS README README.AI TODO xbattle.dot" \
+ default
+ mv "${D}/${GAMES_BINDIR}"/{,xb_}gauntletCampaign
+ prepgamesdirs
+}