summaryrefslogtreecommitdiff
path: root/games-simulation
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-simulation
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-simulation')
-rw-r--r--games-simulation/Manifest.gzbin4239 -> 3232 bytes
-rw-r--r--games-simulation/bcs-demo-1.3-r112
-rw-r--r--games-simulation/bcs-demo/Manifest4
-rw-r--r--games-simulation/bcs-demo/bcs-demo-1.3-r1.ebuild57
-rw-r--r--games-simulation/bcs-demo/metadata.xml29
-rw-r--r--games-simulation/cannonsmash-0.6.6-r113
-rw-r--r--games-simulation/cannonsmash/Manifest8
-rw-r--r--games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild71
-rw-r--r--games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch21
-rw-r--r--games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch22
-rw-r--r--games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch11
-rw-r--r--games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch18
-rw-r--r--games-simulation/cannonsmash/metadata.xml11
-rw-r--r--games-simulation/crashtest-1.1-r112
-rw-r--r--games-simulation/crashtest/Manifest4
-rw-r--r--games-simulation/crashtest/crashtest-1.1-r1.ebuild45
-rw-r--r--games-simulation/crashtest/files/crashtest-1.1-gentoo.patch94
-rw-r--r--games-simulation/crashtest/metadata.xml14
-rw-r--r--games-simulation/crrcsim-0.9.1313
-rw-r--r--games-simulation/crrcsim/Manifest6
-rw-r--r--games-simulation/crrcsim/crrcsim-0.9.13.ebuild62
-rw-r--r--games-simulation/crrcsim/files/crrcsim-0.9.13-buildsystem.patch62
-rw-r--r--games-simulation/crrcsim/files/crrcsim-0.9.13-gcc6.patch14
-rw-r--r--games-simulation/crrcsim/files/crrcsim-cgal_gmp.patch11
-rw-r--r--games-simulation/crrcsim/metadata.xml15
-rw-r--r--games-simulation/dangerdeep-0.3.013
-rw-r--r--games-simulation/dangerdeep/Manifest9
-rw-r--r--games-simulation/dangerdeep/dangerdeep-0.3.0.ebuild63
-rw-r--r--games-simulation/dangerdeep/files/dangerdeep-0.3.0-build.patch39
-rw-r--r--games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc43.patch80
-rw-r--r--games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc44.patch20
-rw-r--r--games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc47.patch10
-rw-r--r--games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc6.patch38
-rw-r--r--games-simulation/dangerdeep/metadata.xml11
-rw-r--r--games-simulation/flightgear-2018.1.113
-rw-r--r--games-simulation/flightgear-2018.2.113
-rw-r--r--games-simulation/flightgear-999911
-rw-r--r--games-simulation/flightgear-data-2018.1.110
-rw-r--r--games-simulation/flightgear-data-2018.2.110
-rw-r--r--games-simulation/flightgear-data-999910
-rw-r--r--games-simulation/flightgear-data/Manifest6
-rw-r--r--games-simulation/flightgear-data/flightgear-data-2018.1.1.ebuild26
-rw-r--r--games-simulation/flightgear-data/flightgear-data-2018.2.1.ebuild26
-rw-r--r--games-simulation/flightgear-data/flightgear-data-9999.ebuild28
-rw-r--r--games-simulation/flightgear-data/metadata.xml15
-rw-r--r--games-simulation/flightgear/Manifest9
-rw-r--r--games-simulation/flightgear/files/ac3d.vim1
-rw-r--r--games-simulation/flightgear/files/flightgear-2018.2.1-cmake.patch11
-rw-r--r--games-simulation/flightgear/files/nasal.vim1
-rw-r--r--games-simulation/flightgear/flightgear-2018.1.1.ebuild144
-rw-r--r--games-simulation/flightgear/flightgear-2018.2.1.ebuild150
-rw-r--r--games-simulation/flightgear/flightgear-9999.ebuild146
-rw-r--r--games-simulation/flightgear/metadata.xml22
-rw-r--r--games-simulation/gl117-1.3.2-r112
-rw-r--r--games-simulation/gl117/Manifest4
-rw-r--r--games-simulation/gl117/files/gl117-1.3.2-mode.patch12
-rw-r--r--games-simulation/gl117/gl117-1.3.2-r1.ebuild37
-rw-r--r--games-simulation/gl117/metadata.xml11
-rw-r--r--games-simulation/lincity-1.13.1-r113
-rw-r--r--games-simulation/lincity-ng-2.013
-rw-r--r--games-simulation/lincity-ng/Manifest4
-rw-r--r--games-simulation/lincity-ng/files/lincity-ng-2.0-build.patch35
-rw-r--r--games-simulation/lincity-ng/lincity-ng-2.0.ebuild47
-rw-r--r--games-simulation/lincity-ng/metadata.xml11
-rw-r--r--games-simulation/lincity/Manifest4
-rw-r--r--games-simulation/lincity/files/lincity-1.13.1-build.patch74
-rw-r--r--games-simulation/lincity/lincity-1.13.1-r1.ebuild52
-rw-r--r--games-simulation/lincity/metadata.xml11
-rw-r--r--games-simulation/metadata.xml32
-rw-r--r--games-simulation/micropolis-1.0-r112
-rw-r--r--games-simulation/micropolis/Manifest4
-rw-r--r--games-simulation/micropolis/metadata.xml9
-rw-r--r--games-simulation/micropolis/micropolis-1.0-r1.ebuild59
-rw-r--r--games-simulation/openrct2-0.1.213
-rw-r--r--games-simulation/openrct2-999912
-rw-r--r--games-simulation/openrct2/Manifest6
-rw-r--r--games-simulation/openrct2/metadata.xml27
-rw-r--r--games-simulation/openrct2/openrct2-0.1.2.ebuild101
-rw-r--r--games-simulation/openrct2/openrct2-9999.ebuild109
-rw-r--r--games-simulation/openttd-1.7.1-r115
-rw-r--r--games-simulation/openttd-1.7.215
-rw-r--r--games-simulation/openttd-1.8.0_rc115
-rw-r--r--games-simulation/openttd/Manifest10
-rw-r--r--games-simulation/openttd/files/openttd-1.6.0-cflags.patch42
-rw-r--r--games-simulation/openttd/files/openttd.initd19
-rw-r--r--games-simulation/openttd/files/openttd.initd-r113
-rw-r--r--games-simulation/openttd/metadata.xml15
-rw-r--r--games-simulation/openttd/openttd-1.7.1-r1.ebuild170
-rw-r--r--games-simulation/openttd/openttd-1.7.2.ebuild170
-rw-r--r--games-simulation/openttd/openttd-1.8.0_rc1.ebuild175
-rw-r--r--games-simulation/pmars-sdl-0.9.2e-r113
-rw-r--r--games-simulation/pmars-sdl/Manifest4
-rw-r--r--games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch65
-rw-r--r--games-simulation/pmars-sdl/metadata.xml8
-rw-r--r--games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild92
-rw-r--r--games-simulation/searchandrescue-1.5.0-r112
-rw-r--r--games-simulation/searchandrescue/Manifest5
-rw-r--r--games-simulation/searchandrescue/files/searchandrescue-1.5.0-build.patch66
-rw-r--r--games-simulation/searchandrescue/metadata.xml11
-rw-r--r--games-simulation/searchandrescue/searchandrescue-1.5.0-r1.ebuild77
-rw-r--r--games-simulation/senken-0.3.0-r113
-rw-r--r--games-simulation/senken/Manifest5
-rw-r--r--games-simulation/senken/files/senken-0.3.0-as-needed.patch24
-rw-r--r--games-simulation/senken/files/senken-0.3.0-warnings.patch31
-rw-r--r--games-simulation/senken/metadata.xml8
-rw-r--r--games-simulation/senken/senken-0.3.0-r1.ebuild52
-rw-r--r--games-simulation/simutrans-0.120.2.212
-rw-r--r--games-simulation/simutrans/Manifest6
-rw-r--r--games-simulation/simutrans/files/simutrans-0.120.2.2-Makefile.patch89
-rw-r--r--games-simulation/simutrans/metadata.xml11
-rw-r--r--games-simulation/simutrans/simutrans-0.120.2.2.ebuild71
-rw-r--r--games-simulation/singularity-0.30c-r214
-rw-r--r--games-simulation/singularity/Manifest4
-rw-r--r--games-simulation/singularity/metadata.xml14
-rw-r--r--games-simulation/singularity/singularity-0.30c-r2.ebuild49
115 files changed, 3389 insertions, 314 deletions
diff --git a/games-simulation/Manifest.gz b/games-simulation/Manifest.gz
index d0e603b2870a..a029f91f6fae 100644
--- a/games-simulation/Manifest.gz
+++ b/games-simulation/Manifest.gz
Binary files differ
diff --git a/games-simulation/bcs-demo-1.3-r1 b/games-simulation/bcs-demo-1.3-r1
deleted file mode 100644
index d738523a751f..000000000000
--- a/games-simulation/bcs-demo-1.3-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install unpack
-DESCRIPTION=design and build bridges and then stress test them with trains
-EAPI=6
-HOMEPAGE=http://www.chroniclogic.com/pontifex2.htm
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=BCS
-RDEPEND=media-libs/libsdl[abi_x86_32(-)] sys-libs/glibc x11-libs/libX11[abi_x86_32(-)] x11-libs/libXau[abi_x86_32(-)] x11-libs/libXdmcp[abi_x86_32(-)] x11-libs/libXext[abi_x86_32(-)] virtual/opengl[abi_x86_32(-)]
-RESTRICT=strip
-SLOT=0
-SRC_URI=ftp://ggdev-1.homelan.com/bcs/bcsdemo_v1_3.sh.bin http://www.highprogrammer.com/alan/pfx2/openal-alan-hack-0.0.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 unpacker 87633b2194cdb56adaa1f5a5c8862c44 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=54f632376d84748ea2f2658d1fe3fa73
diff --git a/games-simulation/bcs-demo/Manifest b/games-simulation/bcs-demo/Manifest
new file mode 100644
index 000000000000..dbf41fd88123
--- /dev/null
+++ b/games-simulation/bcs-demo/Manifest
@@ -0,0 +1,4 @@
+DIST bcsdemo_v1_3.sh.bin 5965217 BLAKE2B ba69858933c5ff1fbd966cc5038ecf891abea70cb6a7f09e40e698da495a7f3578460f90e033c1455918f7d188e37839ae0f140be8c419911d520e4cef13cd48 SHA512 b3916ac72d21e80a09b80a406ea18ab4365d9c1b8139eec848f2e5d697d3d5afb6f27de5dac31c6b6fd860e3b406a3eae8a28aac0e00134629dbd5906bde816d
+DIST openal-alan-hack-0.0.1.tar.gz 86168 BLAKE2B 77ab97ef9b31b4c3ab00c89afaad7094b6ecc388e296b31969bfbbe3953b812036c1cb4a04a09ad0ca986941d2508469c40f5ab7d458c1ceb5fa78b1f9ca7c81 SHA512 1794461cb917dcf2130977bd0ac9f09bf93cd235dd742d29e50a3e2666e6db60865bacd1927fc4607a4b308dcdf421fa2a186ad2a06eea778069ce712a89d943
+EBUILD bcs-demo-1.3-r1.ebuild 1380 BLAKE2B 7d91114725777944c45b43c6051b27473a7000a708bb8a84ab67d87c9cb7b0c7c8fdf4d7d1a22e5a13d5b716f899d8675372147bc197c99ced40f0c9dd902941 SHA512 a0073df4c848a2c33827072348d1ad2c7de3fdaf5a2b9f3270dae3eadd8fdf2a9ff832b7e32b3ff53a834af4ecf3dcda35250100543834fa81918dbbf3048b5d
+MISC metadata.xml 1473 BLAKE2B 98ce5cff21aaefe1ebe09f390be6e01780902ef652e3f0ddee815b0018652678719c061ef7a88dae81824170f2bdc7fa8b7b024227a2c71f03f04f783d831504 SHA512 2813c65cdae4aa2f8e0d0cb15e3b45af6d842e2ad02bc45783d3eb9fc8acbbd8467241ce7af2fa420bedc39b7c449b398f339cdc868fb6e45e0b5cec68b538c2
diff --git a/games-simulation/bcs-demo/bcs-demo-1.3-r1.ebuild b/games-simulation/bcs-demo/bcs-demo-1.3-r1.ebuild
new file mode 100644
index 000000000000..106a657357f5
--- /dev/null
+++ b/games-simulation/bcs-demo/bcs-demo-1.3-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils unpacker
+
+DESCRIPTION="design and build bridges and then stress test them with trains"
+HOMEPAGE="http://www.chroniclogic.com/pontifex2.htm"
+SRC_URI="ftp://ggdev-1.homelan.com/bcs/bcsdemo_v${PV/./_}.sh.bin
+ http://www.highprogrammer.com/alan/pfx2/openal-alan-hack-0.0.1.tar.gz"
+
+LICENSE="BCS"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="strip"
+
+RDEPEND="
+ media-libs/libsdl[abi_x86_32(-)]
+ sys-libs/glibc
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXau[abi_x86_32(-)]
+ x11-libs/libXdmcp[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=/opt/${PN}
+Ddir=${D}/${dir}
+QA_PREBUILT="${dir:1}/*"
+
+src_unpack() {
+ unpack_makeself bcsdemo_v${PV/./_}.sh.bin
+ unpack openal-alan-hack-0.0.1.tar.gz
+}
+
+src_install() {
+ dodir "${dir}"
+
+ tar -zxf bcsdemo.tar.gz -C "${Ddir}" || die
+ rm -f "${Ddir}"/bcs-linux-openal-fixer.sh || die
+
+ exeinto "${dir}"
+# doexe bin/Linux/x86/rungame.sh
+# exeinto ${dir}/lib
+ mv "${Ddir}"/bcs "${Ddir}"/bcs-bin
+ newexe libopenal.so.0.0.6 libopenal.so.0
+ echo '#!/bin/bash' >> "${Ddir}"/bcs
+ echo 'LD_PRELOAD="./libopenal.so.0" ./bcs-bin' >> "${Ddir}"/bcs
+ fperms 755 "${dir}"/bcs
+ make_wrapper bcs-demo ./bcs "${dir}" "${dir}"
+
+ insinto "${dir}"
+ doins *.cfg
+ dodoc readme*
+}
diff --git a/games-simulation/bcs-demo/metadata.xml b/games-simulation/bcs-demo/metadata.xml
new file mode 100644
index 000000000000..6955d95241d3
--- /dev/null
+++ b/games-simulation/bcs-demo/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription>
+Building a bridge that doesn't break is what its all about, although watching
+your bridge creation break and plunge a train into the watery depths below can be
+half the fun. In the Bridge Construction Set you design and build bridges and
+then stress test them to see how your creations hold up under pressure. If when
+test vehicles pass over your bridge they make it safely across you know you've
+succeeded. If they plummet into the river you know you need to go back to the
+drawing board.
+
+The robust physics deployed in the Bridge Construction Set let you build a wide
+variety of bridges that can span the river. The 3D graphics allow you to view
+your bridge from any angle including a first person train view - its like being
+strapped to the front of the train when your bridge is first tested (if this
+happened in real life I think we might have engineers checking all their bridges
+in a simulator).
+
+The Bridge Construction Set includes many types of bridge building levels in
+varying degrees of difficulty from simple to complex with a tutorial secition to
+get you started. A Level Editor is also included so you can create your own
+levels and trade them with others.
+</longdescription>
+</pkgmetadata>
diff --git a/games-simulation/cannonsmash-0.6.6-r1 b/games-simulation/cannonsmash-0.6.6-r1
deleted file mode 100644
index 8f2240aed789..000000000000
--- a/games-simulation/cannonsmash-0.6.6-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare unpack
-DEPEND=virtual/opengl virtual/glu media-libs/libsdl[sound,video] media-libs/sdl-mixer[vorbis?] media-libs/sdl-image[jpeg,png] x11-libs/gtk+:2 nls? ( virtual/libintl ) virtual/pkgconfig nls? ( sys-devel/gettext )
-DESCRIPTION=3D tabletennis game
-EAPI=6
-HOMEPAGE=http://cannonsmash.sourceforge.net/
-IUSE=vorbis nls
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=virtual/opengl virtual/glu media-libs/libsdl[sound,video] media-libs/sdl-mixer[vorbis?] media-libs/sdl-image[jpeg,png] x11-libs/gtk+:2 nls? ( virtual/libintl )
-SLOT=0
-SRC_URI=mirror://sourceforge/cannonsmash/csmash-0.6.6.tar.gz vorbis? ( http://nan.p.utmc.or.jp/danslatristesse2-48.ogg )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097
-_md5_=f362e4c841491dc21b6796281ae71a30
diff --git a/games-simulation/cannonsmash/Manifest b/games-simulation/cannonsmash/Manifest
new file mode 100644
index 000000000000..c7b4c1f1960b
--- /dev/null
+++ b/games-simulation/cannonsmash/Manifest
@@ -0,0 +1,8 @@
+AUX cannonsmash-0.6.6-flags.patch 524 BLAKE2B 5a85b73b59c1dcbc097df325e2b94701cef5629bd929c3c22f43fe65d259c22cdf5949b82a14e2e87f190952ce554947b465403e058aa3564a27f6ef1c5bff38 SHA512 38f6edfc9f6c434496ae9b5f45fa7f42df8c8156bd7507efce7d9d5c0f6950b3178200d863b6d75552caf1a0206fd75b61328ce4ca96eb59d84b7006f5b44fb6
+AUX cannonsmash-0.6.6-gcc41.patch 594 BLAKE2B 392ceebbba587580c9ddc8511c7139aa68d0c881f372c362ef0c068119060f593462b999514340d81075bbecc1d0a11c617c0ab4ec8ac2180350bd9cfd046a1e SHA512 a9bbadb4d6ff279eb368be17ff6326b2ddcdcd3231ace4fe2a4368bd82ece6cd11cbcf6c2464ad9e79d41ad099e66b8c4ab5efea4995bdd7beabfefb5b92c3ca
+AUX cannonsmash-0.6.6-sizeof-cast.patch 362 BLAKE2B 1a7dbf4c921497c2209c078e9453f6ff1106f4a3baca52e57f1778022763a7f8f79259f443f88d74c0b412aef223fd948c93e0c79158df25bea2cf6cbcc0209e SHA512 9e38b5ef20529587dbcf86ecd4712e9e4b751ec4fd2d735f3924a03afbcd56345f738b65e37525e90e1717117160dd175e0bacdb2cf39dfa8b2d5d09690ffdc4
+AUX cannonsmash-0.6.6-x-inc.patch 309 BLAKE2B efcd58b83b9433065efbde3aa4356b48b8fb0bba4462fb2e92c28368e3610c995060ffc0dd7a76d5ef994341e154716c1d5b3b09869396314002e04029479767 SHA512 d6f6139014782eee11965595e0ea61e53a773be3be5edcaba2ebc602983b9dd2f0178298c34507ebf722a868c0f43535adae519cbebdd2a7e3da730e4f54c0ab
+DIST csmash-0.6.6.tar.gz 1989943 BLAKE2B 723b7accd9a899f6d80df07573f8583684606c6b5bf8f11753902f4db196a9a2738cd11899e0a3b4e5637b04553173d75701edbed6e2d800b7b18edb82b2a10f SHA512 e8406eb17adf6c6cc4454b7d0a432ad1b071e1f72d9867fd46e458ade2d1dc1e927a7f2a336c80988b97051b9d188c3027dd8207f89f7e1fa60e1d0a6a5e8916
+DIST danslatristesse2-48.ogg 1070787 BLAKE2B 91bb5b552a45349d6b34d459f2d5071498b6def76c9b7e7ce1538c29af762698708d4ad6fe780e087f14b6ca42dad258c8ed2a7cd368027a5080aab52d02575a SHA512 5cbc457d511bdc736f3b359a8ddd3a514bd0d14418f2dbd68409394baadfcd9fd7630b228e4e9654b14b513e158e9a46b67bc58c5c04bfe382ee6e624dd16834
+EBUILD cannonsmash-0.6.6-r1.ebuild 1401 BLAKE2B dd927348ecc38a65865bb53769886b571c5c8543b4fc9f8f1e7ee5c2e8048c38a4ba0e12b7bb643abe9948c278781ee4f04356cd81f4fa690f4ef74322dc5e1d SHA512 d73328460d50c06230d130e8a18cabae84335f748cfe2116257eac522852e6254072eaff232aa4d7b00328a8d57b3731052c9fd903ff718b3a52db302424a638
+MISC metadata.xml 334 BLAKE2B 7143d65b7fa8567c3598adc245e6a6f8148074d8775f23c06eff18b0e94cb3e570c3c483a1c44df49f148c6150271172150dcf870873e4fb796be0d08c718663 SHA512 feb36e586e7e460e47a342dccf7cc812319860809033b31a8597c8df12f7c09e725af4e5536933a50341e22e921009557600801bcf64d9bf13e88b24d4b53e34
diff --git a/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild b/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild
new file mode 100644
index 000000000000..8da30598da0c
--- /dev/null
+++ b/games-simulation/cannonsmash/cannonsmash-0.6.6-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+MY_OGG=danslatristesse2-48.ogg
+DESCRIPTION="3D tabletennis game"
+HOMEPAGE="http://cannonsmash.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/csmash-${PV}.tar.gz
+ vorbis? ( http://nan.p.utmc.or.jp/${MY_OGG} )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="vorbis nls"
+
+RDEPEND="
+ virtual/opengl
+ virtual/glu
+ media-libs/libsdl[sound,video]
+ media-libs/sdl-mixer[vorbis?]
+ media-libs/sdl-image[jpeg,png]
+ x11-libs/gtk+:2
+ nls? ( virtual/libintl )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/csmash-${PV}"
+
+src_unpack() {
+ unpack csmash-${PV}.tar.gz
+}
+
+src_prepare() {
+ default
+ eapply \
+ "${FILESDIR}"/${P}-x-inc.patch \
+ "${FILESDIR}"/${P}-sizeof-cast.patch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-flags.patch
+ if use vorbis ; then
+ sed -i \
+ -e "s:${MY_OGG}:/usr/share/csmash/games/${MY_OGG}:" ttinc.h \
+ || die "sed failed"
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --datadir="/usr/share"
+}
+
+src_compile() {
+ emake \
+ localedir="/usr/share"
+}
+
+src_install() {
+ default
+ if use vorbis ; then
+ insinto /usr/share/games/csmash
+ doins "${DISTDIR}"/${MY_OGG}
+ fi
+ newicon win32/orange.ico ${PN}.ico
+ make_desktop_entry csmash "Cannon Smash" /usr/share/pixmaps/${PN}.ico
+}
diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch
new file mode 100644
index 000000000000..c7b3b561d2d1
--- /dev/null
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-flags.patch
@@ -0,0 +1,21 @@
+--- a/configure.old 2010-10-18 15:05:02.000000000 +0200
++++ b/configure 2010-10-18 15:05:31.000000000 +0200
+@@ -5516,12 +5516,12 @@
+
+
+ if test "x$x_includes" != "x"; then
+- CFLAGS="-I $x_includes"
+-else
+- CFLAGS=""
+-fi
+-LDFLAGS="-L/usr/local/lib -L$x_libraries -L$libdir"
+-CXXFLAGS="$CFLAGS -Wall"
++ CFLAGS="${CFLAGS} -I $x_includes"
++else
++ CFLAGS="${CFLAGS}"
++fi
++LDFLAGS="${LDFLAGS} -L/usr/local/lib -L$x_libraries -L$libdir"
++CXXFLAGS="${CXXFLAGS} -Wall"
+
+
+ echo "$as_me:$LINENO: checking for main in -lXmu" >&5
diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch
new file mode 100644
index 000000000000..6602c2f09304
--- /dev/null
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-gcc41.patch
@@ -0,0 +1,22 @@
+--- a/BallView.h.old 2006-04-11 00:10:37.000000000 +0200
++++ b/BallView.h 2006-04-11 00:10:53.000000000 +0200
+@@ -32,7 +32,7 @@
+
+ static GLuint m_number[10];
+ private:
+- void BallView::DrawTargetCircle();
++ void DrawTargetCircle();
+ GLUquadricObj *m_quad;
+
+ void DrawBall();
+--- a/matrix.old 2006-04-11 00:13:18.000000000 +0200
++++ b/matrix 2006-04-11 00:19:34.000000000 +0200
+@@ -42,7 +42,7 @@
+
+ /* __BEGIN__BEGIN__ */
+ //__NAMESPACE_BEGIN(ese);
+-#if (!defined __GNUG__) || (__GNUC__ == 3)
++#if (!defined __GNUG__) || (__GNUC__ >= 3)
+ template<typename T>
+ void swap(T& a, T& b)
+ {
diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch
new file mode 100644
index 000000000000..ead10c90400b
--- /dev/null
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-sizeof-cast.patch
@@ -0,0 +1,11 @@
+Don't typecast otherwise C++ will fail to match on some arches.
+
+http://bugs.gentoo.org/84187
+
+--- a/loadparts.cpp
++++ b/loadparts.cpp
+@@ -247,3 +247,3 @@
+ // concat next line(s)
+- int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1);
++ int bufsize = clamp((size_t)0, sizeof(line)-l, sizeof(line)-1);
+ fgets(&line[l-2], bufsize, fp);
diff --git a/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch
new file mode 100644
index 000000000000..e56b51e0b92a
--- /dev/null
+++ b/games-simulation/cannonsmash/files/cannonsmash-0.6.6-x-inc.patch
@@ -0,0 +1,18 @@
+Patch by Jason Bucata.
+http://bugs.gentoo.org/84187
+
+--- a/configure
++++ b/configure
+@@ -5515,7 +5515,11 @@
+ fi
+
+
+-CFLAGS="-I $x_includes"
++if test "x$x_includes" != "x"; then
++ CFLAGS="-I $x_includes"
++else
++ CFLAGS=""
++fi
+ LDFLAGS="-L/usr/local/lib -L$x_libraries -L$libdir"
+ CXXFLAGS="$CFLAGS -Wall"
+
diff --git a/games-simulation/cannonsmash/metadata.xml b/games-simulation/cannonsmash/metadata.xml
new file mode 100644
index 000000000000..a7e14e54406d
--- /dev/null
+++ b/games-simulation/cannonsmash/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">cannonsmash</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/crashtest-1.1-r1 b/games-simulation/crashtest-1.1-r1
deleted file mode 100644
index 432758f029ce..000000000000
--- a/games-simulation/crashtest-1.1-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare
-DEPEND=dev-games/ode media-libs/alsa-lib media-libs/freeglut x11-libs/fltk:1[opengl] virtual/opengl virtual/glu >=media-libs/plib-1.8.4
-DESCRIPTION=Educational car crash simulator
-EAPI=6
-HOMEPAGE=http://www.stolk.org/crashtest/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-games/ode media-libs/alsa-lib media-libs/freeglut x11-libs/fltk:1[opengl] virtual/opengl virtual/glu
-SLOT=0
-SRC_URI=http://www.stolk.org/crashtest/crashtest-1.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2cd696473405b9e16a97a46117816f1c
diff --git a/games-simulation/crashtest/Manifest b/games-simulation/crashtest/Manifest
new file mode 100644
index 000000000000..f688984c9769
--- /dev/null
+++ b/games-simulation/crashtest/Manifest
@@ -0,0 +1,4 @@
+AUX crashtest-1.1-gentoo.patch 2907 BLAKE2B 5d99f7943f568877d31a1d3cadcbb670487db8923275d44384d9e4a2897320b7c963c59163cb7076ff995617f11d8b1c3482a0cca4b02cc28a5ff5b4ce7e7f9f SHA512 6b657329db9eba28de9dcbf33bfd46002e89e0a5a348a9109742cfa6b0ab6a431a8c5edd880201b40ab0dcc4cc5b27be16dc5e38e16621596ec62ea07676c716
+DIST crashtest-1.1.tar.gz 134769 BLAKE2B 16c7be2723d705bbcfc4457a0d7bb545ddaacfb9009cc184c849c59a1c356c67d0151bd7bbb0d1909efb89d24e18657038fe0dd66e218e0c7ed24c67ba82089b SHA512 f361b5f202cdcdca871357eb2a2158af2958f4058b6754c63dc5a20c3e08e2ef532e984596d0daac073f2321b2db02e3f8c2a0a4998450fc953c1661d712d59c
+EBUILD crashtest-1.1-r1.ebuild 831 BLAKE2B b57fac9716e9a510d5971ad00a16493c3594ceb018e180fbcc62090cb75ca4187587ce7863ecbbe06a17ce91354b26656f62d0c0c08e7eec9a9de5861f9eb6f6 SHA512 312efd5ef21b25f35c8f78e1088d909afdf8ec56beb7dc2c3c043c5db18c3d68b726ca9590fd4e484299fe508c7b9e6f0eb6c898becd8c49cc2f7be607346112
+MISC metadata.xml 562 BLAKE2B ae31c43ea940ab17bf1295a254c715d4c3a9460a38617deeb7e41e075b04cc20ad2c7710fa66ffc124c9441d00787902ca423537a494c4eaed57c933abf23cb2 SHA512 94005d1dd7a8f13dc37e0c81290486eb34dfda05a2808eb9b4908b5ba7ba722e0435acdde3d2da082e61a70e60eb2e6df70cd0d59589ccb913a6e6e87b81bc55
diff --git a/games-simulation/crashtest/crashtest-1.1-r1.ebuild b/games-simulation/crashtest/crashtest-1.1-r1.ebuild
new file mode 100644
index 000000000000..1faed8379238
--- /dev/null
+++ b/games-simulation/crashtest/crashtest-1.1-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic
+
+DESCRIPTION="Educational car crash simulator"
+HOMEPAGE="http://www.stolk.org/crashtest/"
+SRC_URI="http://www.stolk.org/crashtest/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-games/ode
+ media-libs/alsa-lib
+ media-libs/freeglut
+ x11-libs/fltk:1[opengl]
+ virtual/opengl
+ virtual/glu"
+DEPEND="${RDEPEND}
+ >=media-libs/plib-1.8.4"
+
+S=${WORKDIR}/${P}/src-${PN}
+
+PATCHES=(
+ "${FILESDIR}/${P}"-gentoo.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \
+ -e "s:@GENTOO_BINDIR@:/usr/bin:" \
+ Makefile ${PN}.cxx || die
+ append-cppflags -DHAVE_ISNANF
+}
+
+src_install() {
+ default
+ make_desktop_entry ${PN} Crashtest
+}
diff --git a/games-simulation/crashtest/files/crashtest-1.1-gentoo.patch b/games-simulation/crashtest/files/crashtest-1.1-gentoo.patch
new file mode 100644
index 000000000000..b384c87278c2
--- /dev/null
+++ b/games-simulation/crashtest/files/crashtest-1.1-gentoo.patch
@@ -0,0 +1,94 @@
+diff -ru a/Makefile b/Makefile
+--- a/Makefile 2009-02-15 17:11:31.000000000 -0500
++++ b/Makefile 2009-10-14 01:00:13.900627555 -0400
+@@ -1,34 +1,12 @@
+-# EDIT THESE SETTINGS
+-
+-PLIBPREFIX=/usr
+-ODEPREFIX=/usr
+-CXX=g++
+-
+-#PLIBPREFIX=$(HOME)
+-#ODEPREFIX=$(HOME)
+-#CXX=g++-4.0
+-
+-# END OF CUSTOM SETTINGS
+-
+-CXXFLAGS=\
+- -I$(ODEPREFIX)/include \
+- -I$(PLIBPREFIX)/include \
+- -I../src-common \
+- -O2 -g -Wall
+-
+-LFLAGS=\
+- -L$(PLIBPREFIX)/lib \
+- -L/usr/X11R6/lib
+-
+ OBJS=staticworldobject.o crashtest.o dynamicobject.o cartobject.o
++CXXFLAGS+=-I `fltk-config --includedir` `ode-config --cflags`
+
+-LIBS= $(ODEPREFIX)/lib/libode.a -lplibssgaux -lplibssg -lplibsg -lplibpu -lplibfnt -lplibul -lGLU -lGL `fltk-config --use-gl --use-images --ldflags`
+-
++LIBS= `ode-config --libs` -lplibssgaux -lplibssg -lplibsg -lplibpu -lplibfnt -lplibul -lGLU -lGL -lasound `fltk-config --use-gl --use-images --ldflags` -lglut
+
+ all: crashtest
+
+ crashtest: $(OBJS)
+- $(CXX) -o crashtest $(OBJS) $(LFLAGS) $(LIBS)
++ $(CXX) -o crashtest $(OBJS) $(LDFLAGS) $(LIBS)
+
+ staticworldobject.o: ../src-common/staticworldobject.cxx ../src-common/staticworldobject.h ../src-common/worldobject.h
+ $(CXX) -c $(CXXFLAGS) ../src-common/staticworldobject.cxx
+@@ -37,10 +14,10 @@
+ $(CXX) -c $(CXXFLAGS) ../src-common/dynamicobject.cxx
+
+ cartobject.o: cartobject.cxx cartobject.h
+- $(CXX) -c $(CXXFLAGS) cartobject.cxx
++ $(CXX) -c $(CXXFLAGS) -I../src-common cartobject.cxx
+
+ crashtest.o: crashtest.cxx crashworld.h ../src-common/modelmap.h cartobject.h bipedobject.h ../src-common/brickwall.h ../src-common/stereocontext.h ../src-common/usercam.h
+- $(CXX) -c $(CXXFLAGS) crashtest.cxx
++ $(CXX) -c $(CXXFLAGS) -I../src-common crashtest.cxx
+
+
+
+@@ -48,13 +25,13 @@
+ PLODE_DATADIR=`pwd` ./crashtest
+
+
+-GAMEDIR=$(DESTDIR)/usr/share/games/crashtest
++GAMEDIR=$(DESTDIR)@GENTOO_DATADIR@
+ install: crashtest
+ # Directories
+- mkdir -p $(DESTDIR)/usr/games/
++ mkdir -p $(DESTDIR)@GENTOO_BINDIR@
+ mkdir -p $(GAMEDIR)/models/
+ # Binary
+- install crashtest $(DESTDIR)/usr/games/crashtest
++ install crashtest $(DESTDIR)@GENTOO_BINDIR@
+ # Models
+ install -m 644 models/testground.3ds $(GAMEDIR)/models/testground.3ds
+ install -m 644 models/biped_torso.3ds $(GAMEDIR)/models/biped_torso.3ds
+diff -ru a/crashtest.cxx b/crashtest.cxx
+--- a/crashtest.cxx 2009-02-15 17:08:24.000000000 -0500
++++ b/crashtest.cxx 2009-10-14 01:01:25.822753522 -0400
+@@ -615,13 +615,7 @@
+
+ int main(int argc, char *argv[])
+ {
+- char *bindirname = dirname(argv[0]);
+- if (!strcmp(bindirname,"."))
+- dirprefix="/usr/share/games/crashtest";
+- else
+- {
+- dirprefix = dirname(bindirname) + std::string("/share/games/crashtest");
+- }
++ dirprefix="@GENTOO_DATADIR@";
+ if (getenv("PLODE_DATADIR"))
+ dirprefix = getenv("PLODE_DATADIR");
+ modelmap = new ModelMap(dirprefix);
+@@ -745,4 +739,3 @@
+ Fl::add_idle(idle, &simwin);
+ Fl::run();
+ }
+-
diff --git a/games-simulation/crashtest/metadata.xml b/games-simulation/crashtest/metadata.xml
new file mode 100644
index 000000000000..3dc7fa0644b5
--- /dev/null
+++ b/games-simulation/crashtest/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 type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription lang="en">
+Crashtest simulates car crashes. This is an educational tool that can be used to
+acquire much insight into this complex process. The user can learn about the
+relation between speed, reaction-time and stopping distance. Also, many physical
+properties can be studied.
+</longdescription>
+</pkgmetadata>
diff --git a/games-simulation/crrcsim-0.9.13 b/games-simulation/crrcsim-0.9.13
deleted file mode 100644
index bd087d8f4820..000000000000
--- a/games-simulation/crrcsim-0.9.13
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare
-DEPEND=media-libs/libsdl[X,sound,joystick,opengl,video] media-libs/plib sci-mathematics/cgal portaudio? ( media-libs/portaudio ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 =sys-devel/automake-1.10* >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 >=sys-apps/sed-4
-DESCRIPTION=model-airplane flight simulation program
-EAPI=6
-HOMEPAGE=https://sourceforge.net/projects/crrcsim/
-IUSE=portaudio
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libsdl[X,sound,joystick,opengl,video] media-libs/plib sci-mathematics/cgal portaudio? ( media-libs/portaudio )
-SLOT=0
-SRC_URI=mirror://sourceforge/crrcsim/crrcsim-0.9.13.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=81d854cb129648e1cdb00374596f566b
diff --git a/games-simulation/crrcsim/Manifest b/games-simulation/crrcsim/Manifest
new file mode 100644
index 000000000000..dedc0191769e
--- /dev/null
+++ b/games-simulation/crrcsim/Manifest
@@ -0,0 +1,6 @@
+AUX crrcsim-0.9.13-buildsystem.patch 2183 BLAKE2B 2f1fb768f93e7d3db1fbd7a2a30c8244c14f6a2701d8a8e80679723aeac11882d7801aaba3f4433036fa078c3f199d7c4fc01a6e8ce2363db37519cb205386aa SHA512 9b28fe63ea4bd3d21559306bd110eaa2c518dc933a572a93dc21182464ee4f95bf7d8bc3f21ebe78addbcc2e432fcd2992587925f97d633270ce9d47ff2e228b
+AUX crrcsim-0.9.13-gcc6.patch 461 BLAKE2B 7e2016db5781e0158e27d999fb1d88d07dc6294740466c736a2e42eb46547fdb35ac112b6c8e93a5571103d28d6037a6acdb2be752bfb2650cc349538e72c3f4 SHA512 34bda65c0791622adb8436d08b60e6a877c2a3bbb12f93379686c39c2c572364c0fa265011bbc788229fa2ddaa3bfa3be8397d2ff98ea967f423fa3cd48465e9
+AUX crrcsim-cgal_gmp.patch 352 BLAKE2B 1a9cf7250753c1a0099dd07b5020b7c5af89dffa8387d68f71c51e21a7803ecb2395144de65915ce84cf077b522fecc5790d26190abf9673fef687d1e16f0d6b SHA512 1b8302f71e220df54b73819988f866a7e35ec6b11d271a6a57ad886372fba4eb1a02367ab9942030baf04fbeb5fa093d23e38de2614c39c2c75e76795ec69274
+DIST crrcsim-0.9.13.tar.gz 8337392 BLAKE2B ccaaf3a4255b2082fc52712d49302c7de1347b87e9489c6d859662365f1cd5af538fe76cee232aed61b0c1b68138c47a2e34e128071c3e098e20f1d51c1c409c SHA512 b687837e07abc07606404d920288984abe7e304afb69158fd840d83bcfe1e9acc4afd8462c0c759df67d50a15ca3753eaf48c4526b201e64a2d641fa3aa8c1ab
+EBUILD crrcsim-0.9.13.ebuild 1232 BLAKE2B ccf89f098cff67e93ee091af11464fd63878c32b052218acb944c0b22934fc27be1d89c45fbcecdb2c616d4fc30c8c4cc460c6085a41868104bd28dc1dbcc5d4 SHA512 ab16d675e3135e65b649ab7cc9a912c84e4d90881042531b89a06e9ce25cfa44fd5e23f525a6b41396c2b907c25db867e7329e96f0f015bc8c0b1c85098c5adb
+MISC metadata.xml 434 BLAKE2B fee01c09cd762a25d96338cf574d37a09240069d6c4eac694fdcb84bf819310a55c89790902b97f9bb7b58e199106bbfd1e5a89ce2a061e0af91285419d461f6 SHA512 bb752783e5e310b3a0f321dda5ffb813df1b54c9dbd4b062f3a42ab41466751d4029f02bd56eb70d025b6087487782eee4e2b0aedd683d13e99336b512b2cbec
diff --git a/games-simulation/crrcsim/crrcsim-0.9.13.ebuild b/games-simulation/crrcsim/crrcsim-0.9.13.ebuild
new file mode 100644
index 000000000000..ef5b5ce752df
--- /dev/null
+++ b/games-simulation/crrcsim/crrcsim-0.9.13.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WANT_AUTOMAKE="1.10"
+inherit autotools eutils gnome2-utils
+
+DESCRIPTION="model-airplane flight simulation program"
+HOMEPAGE="https://sourceforge.net/projects/crrcsim/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="portaudio"
+
+RDEPEND="media-libs/libsdl[X,sound,joystick,opengl,video]
+ media-libs/plib
+ sci-mathematics/cgal
+ portaudio? ( media-libs/portaudio )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-buildsystem.patch
+ "${FILESDIR}"/${P}-gcc6.patch
+)
+
+src_prepare() {
+ default
+
+ if has_version "sci-mathematics/cgal[gmp(+)]" ; then
+ eapply "${FILESDIR}"/${PN}-cgal_gmp.patch
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --datadir="/usr/share" \
+ --datarootdir="${EPREFIX%/}/usr/share" \
+ --docdir="${EPREFIX%/}/usr/share/doc/${PF}" \
+ $(use_with portaudio)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS HISTORY NEWS README
+ doicon -s 32 packages/icons/${PN}.png
+ make_desktop_entry ${PN}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-simulation/crrcsim/files/crrcsim-0.9.13-buildsystem.patch b/games-simulation/crrcsim/files/crrcsim-0.9.13-buildsystem.patch
new file mode 100644
index 000000000000..396fd573ec90
--- /dev/null
+++ b/games-simulation/crrcsim/files/crrcsim-0.9.13-buildsystem.patch
@@ -0,0 +1,62 @@
+--- crrcsim-0.9.11/configure.ac
++++ crrcsim-0.9.11/configure.ac
+@@ -79,8 +79,12 @@
+ dnl Default is: no portaudio present
+ portaudio=0
+
++AC_ARG_WITH([portaudio], AS_HELP_STRING([--without-portaudio], [Build without portaudio library (default: test)]))
++
++AS_IF([test "x$with_portaudio" != "xno"], [
+ dnl Check for the Portaudio header file
+ AC_CHECK_HEADER([portaudio.h])
++])
+
+ if (test "x$ac_cv_header_portaudio_h" = "xyes"); then
+ dnl Check for Portaudio 18
+--- crrcsim-0.9.13/src/mod_misc/filesystools.cpp
++++ crrcsim-0.9.13/src/mod_misc/filesystools.cpp
+@@ -113,8 +113,8 @@
+ // $USERPROFILE/.crrcsim (WIN32)
+ // $HOME/.crrcsim (LINUX)
+ // CRRC_DATA_PATH (LINUX)
+- // /usr/local/share/games/crrcsim (LINUX)
+- // /usr/share/games/crrcsim (LINUX)
++ // /usr/local/share/crrcsim (LINUX)
++ // /usr/share/crrcsim (LINUX)
+
+ // cwd
+ if (dirname != "")
+@@ -154,13 +154,13 @@
+ s.append(dirname);
+ pathlist.push_back(s);
+ #endif
+- s = "/usr/local/share/games/" + appname + "/";
++ s = "/usr/local/share/" + appname + "/";
+ if (s != data_path) // avoid adding this path twice
+ {
+ s.append(dirname);
+ pathlist.push_back(s);
+ }
+- s = "/usr/share/games/" + appname + "/";
++ s = "/usr/share/" + appname + "/";
+ if (s != data_path) // avoid adding this path twice
+ {
+ s.append(dirname);
+@@ -172,13 +172,13 @@
+ #ifdef CRRC_DATA_PATH
+ pathlist.push_back(data_path);
+ #endif
+- if (data_path != "/usr/local/share/games/" + appname) // avoid adding this path twice
++ if (data_path != "/usr/local/share/" + appname) // avoid adding this path twice
+ {
+- pathlist.push_back("/usr/local/share/games/" + appname);
++ pathlist.push_back("/usr/local/share/" + appname);
+ }
+- if (data_path != "/usr/share/games/" + appname) // avoid adding this path twice
++ if (data_path != "/usr/share/" + appname) // avoid adding this path twice
+ {
+- pathlist.push_back("/usr/share/games/" + appname);
++ pathlist.push_back("/usr/share/" + appname);
+ }
+ }
+ #endif
diff --git a/games-simulation/crrcsim/files/crrcsim-0.9.13-gcc6.patch b/games-simulation/crrcsim/files/crrcsim-0.9.13-gcc6.patch
new file mode 100644
index 000000000000..b11550f3dff6
--- /dev/null
+++ b/games-simulation/crrcsim/files/crrcsim-0.9.13-gcc6.patch
@@ -0,0 +1,14 @@
+Bug: https://bugs.gentoo.org/610560
+Upstream commit: https://sourceforge.net/p/crrcsim/code/ci/28ed9ba57011371cab8b637550acc716b973c47d
+
+--- a/src/mod_video/crrc_animation.cpp
++++ b/src/mod_video/crrc_animation.cpp
+@@ -84,7 +84,7 @@
+ else
+ {
+ std::cerr << "createAnimation: unknown animation type \'"
+- << type << "\'" << std::cerr;
++ << type << "\'" << std::endl;
+ }
+
+ if (anim != NULL)
diff --git a/games-simulation/crrcsim/files/crrcsim-cgal_gmp.patch b/games-simulation/crrcsim/files/crrcsim-cgal_gmp.patch
new file mode 100644
index 000000000000..10d6bff6b769
--- /dev/null
+++ b/games-simulation/crrcsim/files/crrcsim-cgal_gmp.patch
@@ -0,0 +1,11 @@
+--- crrcsim-0.9.11/configure.ac
++++ crrcsim-0.9.11/configure.ac
+@@ -229,7 +229,7 @@
+ has_CGAL="yes (found CGAL v3)"
+ fi
+ CGAL_CFLAGS=-frounding-math
+- CGAL_LIBS=-lCGAL
++ CGAL_LIBS="-lCGAL -lgmp"
+ AC_DEFINE([WINDDATA3D], [1], [Import code for wind data, needs CGAL, 0 to disable])
+ else
+ has_CGAL="no (CGAL not found)"
diff --git a/games-simulation/crrcsim/metadata.xml b/games-simulation/crrcsim/metadata.xml
new file mode 100644
index 000000000000..9bc28cff4765
--- /dev/null
+++ b/games-simulation/crrcsim/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">crrcsim</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/dangerdeep-0.3.0 b/games-simulation/dangerdeep-0.3.0
deleted file mode 100644
index 74083ca5f138..000000000000
--- a/games-simulation/dangerdeep-0.3.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=virtual/opengl virtual/glu sci-libs/fftw:3.0 media-libs/libsdl[joystick,opengl,video] media-libs/sdl-mixer[vorbis] media-libs/sdl-image[jpeg,png] media-libs/sdl-net app-arch/unzip dev-util/scons[python_targets_python2_7]
-DESCRIPTION=a World War II German submarine simulation
-EAPI=5
-HOMEPAGE=http://dangerdeep.sourceforge.net/
-IUSE=cpu_flags_x86_sse debug
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 CC-BY-NC-ND-2.0
-RDEPEND=virtual/opengl virtual/glu sci-libs/fftw:3.0 media-libs/libsdl[joystick,opengl,video] media-libs/sdl-mixer[vorbis] media-libs/sdl-image[jpeg,png] media-libs/sdl-net games-misc/games-envd
-SLOT=0
-SRC_URI=mirror://sourceforge/dangerdeep/dangerdeep-0.3.0.tar.gz mirror://sourceforge/dangerdeep/dangerdeep-data-0.3.0.zip
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 scons-utils abbc7625ff457854eae0edaa1fd55cc7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=970ef0bb5c86bd8edfd4f055ee9f7ea4
diff --git a/games-simulation/dangerdeep/Manifest b/games-simulation/dangerdeep/Manifest
new file mode 100644
index 000000000000..2f26e5705f7d
--- /dev/null
+++ b/games-simulation/dangerdeep/Manifest
@@ -0,0 +1,9 @@
+AUX dangerdeep-0.3.0-build.patch 1516 BLAKE2B 93b222884db5be518c122a1ca790943894bd39e1eeb9b53eb19091877123e191e0b2b99f9cf44f7097c50502749ffb2db3f6c531ff55ee9e984d58fe05db71ce SHA512 074e520d59fb483d4f15301fbae4bce7776a24f12d5522db1b1239177433095e663a5839ac2663ac2b6f4090e5d9e779ba1249607bbd47be9f7ddc6bd326318b
+AUX dangerdeep-0.3.0-gcc43.patch 1704 BLAKE2B 3f028a40abc3cffa81939d9941e2102e7630b91b352ac2be0d1436916128169d278a1e74128627a4d7c91b923c522a453bdea259d6d811cb1c48cfcd89d63964 SHA512 aa3c26e08475d1a6262712caceb25839bb86c18d23d7fb1a14c84fbe960c0596440f6b20e7a1921dc1c04c6adba44c317e4aeac1b13a80e21ecc44a513efc05f
+AUX dangerdeep-0.3.0-gcc44.patch 339 BLAKE2B 62a9868ddb6c723529e0a3bcb29fed4a4879d77708652fa18df6e46070c57bbcb56c8ae6a9fa4267699584914ece2601ce35cd2c1bf336f549ba9974bc9acd75 SHA512 3a17a8e577e9e3e6ac66a14e1c55a612e567286a6a7141592399a8f914999adb16c346ad9b7e4366e41885f4af4887795644e92e3796f522844d90651ea9128e
+AUX dangerdeep-0.3.0-gcc47.patch 311 BLAKE2B 982f3f9b20689da95be99b117abce3308509bd545ca1df272831759300a5c6a0ad858a9caad0e2f2ef56d6474252a64384c4feafae3f798bb6a47510e09a9832 SHA512 f071856eec5c1643e1915e48f68175ca61ce7447f3801dd859476b0e7d400ffdfd1a359851f176d971565d480405395566c330348acf9b7b5f6af202cad3a649
+AUX dangerdeep-0.3.0-gcc6.patch 898 BLAKE2B f5def500c096c65cc4b4e1b89a039d168b3ce6d8622d814f70f5f52b61ccbd5662b76eae109f5a1e47205ec7225bfb3500d9d7cb887c798af016e6b18d56fa36 SHA512 4bd3d6e9077ae408feaf38de6f0b9c484f345e87bc79bdcebfb7d8a73c4686dafabc4617b08a1532fdb2fe6ca2afb2a8932f486f54134c891972ef1882650fb3
+DIST dangerdeep-0.3.0.tar.gz 1100972 BLAKE2B 5f0de6c1e37759a480a8d6f835efb6dba96321697fb5a15559d35cb27a35356c4a307bf1138c237af1722365f18a9d341cf6cab122c8ebe4f1bacc088abc666a SHA512 97d47654d6d3728365ec0f7955f360a35ad105442663f5dd05f0a37ae6ae67216eb33f183df788c3cd0ba9878dbef22d607ddac86bf43159e87ef1c2429b7f87
+DIST dangerdeep-data-0.3.0.zip 61914764 BLAKE2B a727364509e8dc166338bb0c587d48f0b2ffbf406fde94aecae7435b8b1707af128ec80b6c74f04de46eb56d48189f7b7149f20f6a1836e4547fa30aa4c2eb42 SHA512 c6d7de055abc77c1c61d0f999d885f44121934d66f89c8e4e55231cc20605ef679cd278bebadc879862e3da07d46bae3ab02f97d3ee4179762efd895e8f91b3e
+EBUILD dangerdeep-0.3.0.ebuild 1387 BLAKE2B f2f69d9b85e6d7abd23a5c1fbefdaee115bf35a3dc56a90226ff347b8a54a6bc0925b12a583d944be64d8212121bba5f57b5a06fe0a42c8a247221c234fd3ea9 SHA512 66d73dfbdb733b363aa12ef7acdef7b2c05dab25ca825c053f5b4db2946f7784b9def2b4a1cf1b21e9da48cc74173c5fd4bbe97fa4b1df28dba99a080c139dfa
+MISC metadata.xml 333 BLAKE2B 80892da67439a3879df882ea5ef0b52e8e40e63857d86f78411a7da3178d07f944cd632fefd9a062c301f584d3a32cbaab2e5792d49510ca60f014166fd84259 SHA512 399d1439cce706aad93bcaf11f84e4e0481e104549468b007c09c8592c9ebe4309a12293724f622bd44c7812f77ba21b85571636ff9559ae0bae77a6cae1acc1
diff --git a/games-simulation/dangerdeep/dangerdeep-0.3.0.ebuild b/games-simulation/dangerdeep/dangerdeep-0.3.0.ebuild
new file mode 100644
index 000000000000..44122c119cf3
--- /dev/null
+++ b/games-simulation/dangerdeep/dangerdeep-0.3.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils scons-utils games
+
+DESCRIPTION="a World War II German submarine simulation"
+HOMEPAGE="http://dangerdeep.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://sourceforge/${PN}/${PN}-data-${PV}.zip"
+
+LICENSE="GPL-2 CC-BY-NC-ND-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_sse debug"
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ sci-libs/fftw:3.0
+ media-libs/libsdl[joystick,opengl,video]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-image[jpeg,png]
+ media-libs/sdl-net"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-build.patch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-gcc47.patch \
+ "${FILESDIR}"/${P}-gcc44.patch \
+ "${FILESDIR}"/${P}-gcc6.patch
+ sed -i -e "/console_log.txt/ s:fopen.*:stderr;:" src/system.cpp || die
+}
+
+src_compile() {
+ local sse=-1
+
+ if use cpu_flags_x86_sse ; then
+ use amd64 && sse=3 || sse=1
+ fi
+
+ escons \
+ usex86sse=${sse} \
+ datadir="${GAMES_DATADIR}"/${PN} \
+ $(use_scons debug)
+}
+
+src_install() {
+ dogamesbin build/linux/${PN}
+
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r ../data/*
+
+ newicon dftd_icon.png ${PN}.png
+ make_desktop_entry ${PN} "Danger from the Deep"
+
+ dodoc ChangeLog CREDITS README
+ doman doc/man/${PN}.6
+
+ prepgamesdirs
+}
diff --git a/games-simulation/dangerdeep/files/dangerdeep-0.3.0-build.patch b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-build.patch
new file mode 100644
index 000000000000..367db1cfbb96
--- /dev/null
+++ b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-build.patch
@@ -0,0 +1,39 @@
+--- SConstruct
++++ SConstruct
+@@ -119,6 +119,7 @@
+
+ else:
+ print "Compiling for Unix/Posix/Linux Environment"
++ SConsignFile()
+ env = Environment(ENV = os.environ)
+ env.Append(CPPPATH = ['/usr/include/SDL', '/usr/include/GL'])
+ libpath = ['/usr/X11R6/lib']
+@@ -126,13 +127,18 @@
+ sdllibs = ['SDL', 'SDL_image']
+ ccflags = '-Wall `sdl-config --cflags` `pkg-config --cflags x11`'
+ env.Append(LINKFLAGS = '`pkg-config --libs-only-L x11`')
++ if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
++ if os.environ.has_key('CXXFLAGS'):
++ ccflags += os.environ['CXXFLAGS']
++ if os.environ.has_key('LDFLAGS'):
++ env.Append(LINKFLAGS = os.environ['LDFLAGS'])
+ if (debug >= 3):
+ ccflags += ' -g -pg -O3' # profiling
+ elif (debug == 2):
+ ccflags += ' -g -O0'
+ env.Append(CPPDEFINES = ['DEBUG'])
+ elif (debug == 1):
+- ccflags += ' -g -O1'
+ env.Append(CPPDEFINES = ['DEBUG'])
+ elif (debug == -1):
+ ccflags += ' -g -O3 -march=athlon-xp -mfpmath=sse -mmmx -msse -m3dnow'
+@@ -140,8 +144,6 @@
+ ccflags += ' -g -O3 -march=athlon-xp -mfpmath=sse -mmmx -msse -m3dnow -ftree-vectorize -ftree-vectorizer-verbose=2'
+ elif (debug == -3): # special g++4.0+ auto vectorization
+ ccflags += ' -g -O3 -march=athlon64 -mfpmath=sse -mmmx -msse -msse2 -m3dnow -ftree-vectorize -ftree-vectorizer-verbose=2'
+- else:
+- ccflags += ' -g -O2' # debug symbols will be stripped by the linker for a debian package
+ # choose specific architecture if requested
+ if archflag != '':
+ ccflags += ' -march=' + archflag
diff --git a/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc43.patch b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc43.patch
new file mode 100644
index 000000000000..1588b0bbae07
--- /dev/null
+++ b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc43.patch
@@ -0,0 +1,80 @@
+--- src/bspline_test.cpp
++++ src/bspline_test.cpp
+@@ -1,6 +1,7 @@
+ // some test code for the 2d bsplines!
+ #include "bspline.h"
+ #include <fstream>
++#include <cstdlib>
+ using namespace std;
+
+ double rnd() { return double(rand())/RAND_MAX; }
+--- src/convoy.h
++++ src/convoy.h
+@@ -27,6 +27,7 @@
+ #include "vector2.h"
+ #include <new>
+ #include <list>
++#include <memory>
+ class ship;
+
+ ///\brief Grouping of ships and other objects with central control.
+--- src/date.cpp
++++ src/date.cpp
+@@ -21,6 +21,7 @@
+ // subsim (C)+(W) Markus Petermann and Thorsten Jordan. SEE LICENSE
+
+ #include <iomanip>
++#include <cstdlib>
+ #include "date.h"
+ #include "texts.h"
+
+--- src/ocean_wave_generator.h
++++ src/ocean_wave_generator.h
+@@ -29,6 +29,7 @@
+ #include "environment.h"
+ #include <complex>
+ #include <vector>
++#include <cstdlib>
+
+ // use float fftw (faster) or double (default) ?
+ #ifdef WITH_FLOAT_FFTW
+--- src/ptrlist.h
++++ src/ptrlist.h
+@@ -25,6 +25,7 @@
+
+ #include <list>
+ #include <stdexcept>
++#include <memory>
+
+ // same as std::list regarding the interface (partly), but handles pointers.
+ template <class T>
+--- src/ptrvector.h
++++ src/ptrvector.h
+@@ -25,6 +25,7 @@
+
+ #include <vector>
+ #include <stdexcept>
++#include <memory>
+
+ // same as std::vector regarding the interface, but handles pointers.
+ template <class T>
+--- src/sea_object.h
++++ src/sea_object.h
+@@ -27,6 +27,7 @@
+ #include "ptrvector.h"
+ #include <new>
+ #include <stdexcept>
++#include <memory>
+
+ #include "vector3.h"
+ #include "angle.h"
+--- src/widget.cpp
++++ src/widget.cpp
+@@ -32,6 +32,7 @@
+ #include "datadirs.h"
+ #include <set>
+ #include <sstream>
++#include <algorithm>
+ using std::vector;
+ using std::list;
+ using std::string;
diff --git a/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc44.patch b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc44.patch
new file mode 100644
index 000000000000..23d3c470c900
--- /dev/null
+++ b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc44.patch
@@ -0,0 +1,20 @@
+--- src/date.cpp
++++ src/date.cpp
+@@ -22,6 +22,7 @@
+
+ #include <iomanip>
+ #include <cstdlib>
++#include <cstdio>
+ #include "date.h"
+ #include "texts.h"
+
+--- src/filehelper.cpp
++++ src/filehelper.cpp
+@@ -23,6 +23,7 @@
+ #include "filehelper.h"
+ #include "error.h"
+ #include <vector>
++#include <cstdio>
+ using namespace std;
+
+ #ifdef WIN32
diff --git a/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc47.patch b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc47.patch
new file mode 100644
index 000000000000..54adcec10daf
--- /dev/null
+++ b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc47.patch
@@ -0,0 +1,10 @@
+--- src/faulthandler.h.old 2012-07-25 14:37:32.000000000 +0200
++++ src/faulthandler.h 2012-07-25 14:38:16.000000000 +0200
+@@ -50,6 +50,7 @@
+ #include <signal.h>
+ #include <string>
+ #include <sstream>
++#include <unistd.h>
+
+ // Note: use --export-dynamic as linker option or you won't get function names here.
+
diff --git a/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc6.patch b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc6.patch
new file mode 100644
index 000000000000..1634aa763e4c
--- /dev/null
+++ b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc6.patch
@@ -0,0 +1,38 @@
+Bug: https://bugs.gentoo.org/show_bug.cgi?id=610654
+Upstream Ticket: https://sourceforge.net/p/dangerdeep/patches/26/
+
+--- a/src/system.cpp
++++ b/src/system.cpp
+@@ -178,7 +178,7 @@
+ instance = this;
+ }
+
+-system::~system()
++system::~system() DTOR_NOEXCEPT
+ {
+ if (!instance) {
+ SDL_Quit();
+--- a/src/system.h
++++ b/src/system.h
+@@ -52,6 +52,12 @@
+ #define ASSERT(a,...)
+ #endif
+
++#if __cplusplus >= 201103L
++#define DTOR_NOEXCEPT noexcept(false)
++#else
++#define DTOR_NOEXCEPT
++#endif
++
+ class font;
+ class texture;
+
+@@ -61,7 +67,7 @@
+ public:
+ enum button_type { left_button=0x1, right_button=0x2, middle_button=0x4, wheel_up=0x8, wheel_down=0x10 };
+ system(double nearz_, double farz_, unsigned res_x=1024, unsigned res_y=768, bool fullscreen=true);
+- ~system();
++ ~system() DTOR_NOEXCEPT;
+ void set_video_mode(unsigned res_x_, unsigned res_y_, bool fullscreen);
+ void swap_buffers();
+
diff --git a/games-simulation/dangerdeep/metadata.xml b/games-simulation/dangerdeep/metadata.xml
new file mode 100644
index 000000000000..461e3ba8e89b
--- /dev/null
+++ b/games-simulation/dangerdeep/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dangerdeep</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/flightgear-2018.1.1 b/games-simulation/flightgear-2018.1.1
deleted file mode 100644
index a300f7506bcb..000000000000
--- a/games-simulation/flightgear-2018.1.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare pretend test
-DEPEND=dev-db/sqlite:3 >=dev-games/openscenegraph-3.2.0[jpeg,png] ~dev-games/simgear-2018.1.1[gdal=] media-libs/openal >=media-libs/speex-1.2.0:0 media-libs/speexdsp:0 media-sound/gsm sys-libs/zlib virtual/glu x11-libs/libX11 dbus? ( >=sys-apps/dbus-1.6.18-r1 ) gdal? ( >=sci-libs/gdal-2.0.0:0 ) qt5? ( >=dev-qt/qtcore-5.7.1:5 >=dev-qt/qtdeclarative-5.7.1:5 >=dev-qt/qtgui-5.7.1:5 >=dev-qt/qtnetwork-5.7.1:5 >=dev-qt/qtwidgets-5.7.1:5 ) udev? ( virtual/udev ) utils? ( media-libs/freeglut media-libs/freetype:2 media-libs/glew:0 media-libs/libpng:0 virtual/opengl qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 ) ) >=dev-libs/boost-1.44 >=media-libs/plib-1.8.5 utils? ( x11-libs/libXi x11-libs/libXmu ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Open Source Flight Simulator
-EAPI=6
-HOMEPAGE=http://www.flightgear.org/
-IUSE=dbus debug examples gdal openmp qt5 test +udev +utils vim-syntax
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-db/sqlite:3 >=dev-games/openscenegraph-3.2.0[jpeg,png] ~dev-games/simgear-2018.1.1[gdal=] media-libs/openal >=media-libs/speex-1.2.0:0 media-libs/speexdsp:0 media-sound/gsm sys-libs/zlib virtual/glu x11-libs/libX11 dbus? ( >=sys-apps/dbus-1.6.18-r1 ) gdal? ( >=sci-libs/gdal-2.0.0:0 ) qt5? ( >=dev-qt/qtcore-5.7.1:5 >=dev-qt/qtdeclarative-5.7.1:5 >=dev-qt/qtgui-5.7.1:5 >=dev-qt/qtnetwork-5.7.1:5 >=dev-qt/qtwidgets-5.7.1:5 ) udev? ( virtual/udev ) utils? ( media-libs/freeglut media-libs/freetype:2 media-libs/glew:0 media-libs/libpng:0 virtual/opengl qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 ) ) ~games-simulation/flightgear-data-2018.1.1
-SLOT=0
-SRC_URI=mirror://sourceforge/flightgear/flightgear-2018.1.1.tar.bz2
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=6e0fd50a2fe96d27c794fc34dadca527
diff --git a/games-simulation/flightgear-2018.2.1 b/games-simulation/flightgear-2018.2.1
deleted file mode 100644
index aa89a41cfc90..000000000000
--- a/games-simulation/flightgear-2018.2.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare pretend test
-DEPEND=dev-db/sqlite:3 >=dev-games/openscenegraph-3.2.0[jpeg,png] ~dev-games/simgear-2018.2.1[gdal=] media-libs/openal >=media-libs/speex-1.2.0:0 media-libs/speexdsp:0 media-sound/gsm sys-libs/zlib virtual/glu x11-libs/libX11 dbus? ( >=sys-apps/dbus-1.6.18-r1 ) gdal? ( >=sci-libs/gdal-2.0.0:0 ) qt5? ( >=dev-qt/qtcore-5.7.1:5 >=dev-qt/qtdeclarative-5.7.1:5 >=dev-qt/qtgui-5.7.1:5 >=dev-qt/qtnetwork-5.7.1:5 >=dev-qt/qtwidgets-5.7.1:5 ) udev? ( virtual/udev ) utils? ( media-libs/freeglut media-libs/freetype:2 media-libs/glew:0 media-libs/libpng:0 virtual/opengl qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 ) ) >=dev-libs/boost-1.44 >=media-libs/plib-1.8.5 utils? ( x11-libs/libXi x11-libs/libXmu ) test? ( dev-util/cppunit ) sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=Open Source Flight Simulator
-EAPI=6
-HOMEPAGE=http://www.flightgear.org/
-IUSE=dbus debug examples gdal openmp qt5 test +udev +utils vim-syntax
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-db/sqlite:3 >=dev-games/openscenegraph-3.2.0[jpeg,png] ~dev-games/simgear-2018.2.1[gdal=] media-libs/openal >=media-libs/speex-1.2.0:0 media-libs/speexdsp:0 media-sound/gsm sys-libs/zlib virtual/glu x11-libs/libX11 dbus? ( >=sys-apps/dbus-1.6.18-r1 ) gdal? ( >=sci-libs/gdal-2.0.0:0 ) qt5? ( >=dev-qt/qtcore-5.7.1:5 >=dev-qt/qtdeclarative-5.7.1:5 >=dev-qt/qtgui-5.7.1:5 >=dev-qt/qtnetwork-5.7.1:5 >=dev-qt/qtwidgets-5.7.1:5 ) udev? ( virtual/udev ) utils? ( media-libs/freeglut media-libs/freetype:2 media-libs/glew:0 media-libs/libpng:0 virtual/opengl qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 ) ) ~games-simulation/flightgear-data-2018.2.1
-SLOT=0
-SRC_URI=mirror://sourceforge/flightgear/flightgear-2018.2.1.tar.bz2
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=7dfb2ebb2fe6cdfcedf805df9067c84b
diff --git a/games-simulation/flightgear-9999 b/games-simulation/flightgear-9999
deleted file mode 100644
index d21b38adcd19..000000000000
--- a/games-simulation/flightgear-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare pretend test unpack
-DEPEND=dev-db/sqlite:3 >=dev-games/openscenegraph-3.2.0[jpeg,png] ~dev-games/simgear-9999[gdal=] media-libs/openal >=media-libs/speex-1.2.0:0 media-libs/speexdsp:0 media-sound/gsm sys-libs/zlib virtual/glu x11-libs/libX11 dbus? ( >=sys-apps/dbus-1.6.18-r1 ) gdal? ( >=sci-libs/gdal-2.0.0:0 ) qt5? ( >=dev-qt/qtcore-5.7.1:5 >=dev-qt/qtdeclarative-5.7.1:5 >=dev-qt/qtgui-5.7.1:5 >=dev-qt/qtnetwork-5.7.1:5 >=dev-qt/qtwidgets-5.7.1:5 ) udev? ( virtual/udev ) utils? ( media-libs/freeglut media-libs/freetype:2 media-libs/glew:0 media-libs/libpng:0 virtual/opengl qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 ) ) >=dev-libs/boost-1.44 >=media-libs/plib-1.8.5 utils? ( x11-libs/libXi x11-libs/libXmu ) sys-devel/make >=dev-util/cmake-3.9.6 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Open Source Flight Simulator
-EAPI=6
-HOMEPAGE=http://www.flightgear.org/
-IUSE=dbus debug examples gdal openmp qt5 test +udev +utils vim-syntax
-LICENSE=GPL-2
-RDEPEND=dev-db/sqlite:3 >=dev-games/openscenegraph-3.2.0[jpeg,png] ~dev-games/simgear-9999[gdal=] media-libs/openal >=media-libs/speex-1.2.0:0 media-libs/speexdsp:0 media-sound/gsm sys-libs/zlib virtual/glu x11-libs/libX11 dbus? ( >=sys-apps/dbus-1.6.18-r1 ) gdal? ( >=sci-libs/gdal-2.0.0:0 ) qt5? ( >=dev-qt/qtcore-5.7.1:5 >=dev-qt/qtdeclarative-5.7.1:5 >=dev-qt/qtgui-5.7.1:5 >=dev-qt/qtnetwork-5.7.1:5 >=dev-qt/qtwidgets-5.7.1:5 ) udev? ( virtual/udev ) utils? ( media-libs/freeglut media-libs/freetype:2 media-libs/glew:0 media-libs/libpng:0 virtual/opengl qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 ) ) ~games-simulation/flightgear-data-9999
-SLOT=0
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 git-r3 8f6de46b0aa318aea0e8cac62ece098b ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=05a9d8e1182024bb3594b8b29e122bf8
diff --git a/games-simulation/flightgear-data-2018.1.1 b/games-simulation/flightgear-data-2018.1.1
deleted file mode 100644
index 2fa65586faa0..000000000000
--- a/games-simulation/flightgear-data-2018.1.1
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=FlightGear data files
-EAPI=6
-HOMEPAGE=http://www.flightgear.org/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=!<games-simulation/flightgear-2.10.0
-SLOT=0
-SRC_URI=mirror://sourceforge/flightgear/FlightGear-2018.1.1-data.tar.bz2
-_md5_=6d1392d5134baed3cb4d88f3ec7e4527
diff --git a/games-simulation/flightgear-data-2018.2.1 b/games-simulation/flightgear-data-2018.2.1
deleted file mode 100644
index e790985c93b7..000000000000
--- a/games-simulation/flightgear-data-2018.2.1
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=FlightGear data files
-EAPI=6
-HOMEPAGE=http://www.flightgear.org/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=!<games-simulation/flightgear-2.10.0
-SLOT=0
-SRC_URI=mirror://sourceforge/flightgear/FlightGear-2018.2.1-data.tar.bz2
-_md5_=7d7bcb03b285aa0d1ee17c420ba0631f
diff --git a/games-simulation/flightgear-data-9999 b/games-simulation/flightgear-data-9999
deleted file mode 100644
index 6ff62a323d05..000000000000
--- a/games-simulation/flightgear-data-9999
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install unpack
-DEPEND=>=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=FlightGear data files
-EAPI=6
-HOMEPAGE=http://www.flightgear.org/
-LICENSE=GPL-2
-RDEPEND=!<games-simulation/flightgear-2.10.0
-SLOT=0
-_eclasses_=git-r3 8f6de46b0aa318aea0e8cac62ece098b
-_md5_=bde9fe5b13b85f270b9a654f588685c0
diff --git a/games-simulation/flightgear-data/Manifest b/games-simulation/flightgear-data/Manifest
new file mode 100644
index 000000000000..114cc3e21bb6
--- /dev/null
+++ b/games-simulation/flightgear-data/Manifest
@@ -0,0 +1,6 @@
+DIST FlightGear-2018.1.1-data.tar.bz2 1576049981 BLAKE2B cfcf028ca04ed785ba7c65979e6566ab773d8af869a9b62050969295eafecf7d1f5b6162f498af96786fa23a46e886390f240b56c83e7107473f59552a1155a5 SHA512 022f102f95c9cd8b153d991dad55ecd182e71aa0f3ecfe1502a35d6dcda0746a1fd183f808e59aba8c7f3a0cc9ae1f2f91ff49565bff4c7bc5a1c4889fcc127f
+DIST FlightGear-2018.2.1-data.tar.bz2 1624676603 BLAKE2B baecea2002fc3c256205e70c6692102f9bccd04c839902353b0e6d803a97221479e8b54095530dc7af366d842c487d04447f0fd775527e6f5ea0ac32ed602dd6 SHA512 93690703965dd83b610ea0ba67938c0d3fb2d5f6d8c842851a979f352387431eacafb4d181a56dad6def474b2ab84f412cf5531570ce18c1ec80076fe92e4d05
+EBUILD flightgear-data-2018.1.1.ebuild 518 BLAKE2B afd977b91675529215c7c72fb939a8a2c1be99b5af682a86cfd06175b9a9386c6fe665b31fe8e2e5102fba0f33f0d28bed2c150e614758f6b758738b9c53c86d SHA512 02ea5407ec76fadeb0230b3567e9c83445d562a49853681c1b5418dc4ccd7e97e582e4776bef02347fed25270ab2637fb8b530beca6ebfa1d19b805209d4192f
+EBUILD flightgear-data-2018.2.1.ebuild 518 BLAKE2B b28ff44f4d60306ee8edd3d1cc1af8659891ec4d358aa677112d3489584f3d79abc4d093b84795750894ce8f6bbffefaaa219df6b6467189aa445dfe7d05fde0 SHA512 6c2c9171b3d91fd9eeb5c3b2f6cfbdd5cc5a6fe6ab3ec5cb8fbc9bbf6b311f69e43d269fdff725a4eb1e081e72aab191ab544f890954fdec4fd99088be881ddc
+EBUILD flightgear-data-9999.ebuild 546 BLAKE2B ea1647fcbee2eee6a213ad67e6fa6ca22ee66d8a7ed4cc6928a75a9e2852b9befbba63aa5032921da37aa83cbb22d3d6433d459faa5787d80cdd33678215125c SHA512 92dae00bd54b164590c4c9cd66f3797a8f39211a66773c6cb710ecfff4d47f1d65d03861ec9648a8165a823f038f3d19b54dbd2b9b145147d29696569b4ae508
+MISC metadata.xml 445 BLAKE2B a66be5a62283a2a7c8c086ad4d0cfbce8e1c7bdcd890e39fef504821b8eb01facc32f36afcdc4c62544bbc1b5c5b49e8a752f8b42dcbcf7adeb50b0cb5fd7afc SHA512 d68eedacc672f04b42ec6d6a9e0e8302dbe09283f73484945b9c8c277a1c65c02c19c1187dc18d4c9e68d56a26cd989d04df83e74ff44d48977fe3c24fb81466
diff --git a/games-simulation/flightgear-data/flightgear-data-2018.1.1.ebuild b/games-simulation/flightgear-data/flightgear-data-2018.1.1.ebuild
new file mode 100644
index 000000000000..f835ef53253b
--- /dev/null
+++ b/games-simulation/flightgear-data/flightgear-data-2018.1.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="FlightGear data files"
+HOMEPAGE="http://www.flightgear.org/"
+SRC_URI="mirror://sourceforge/flightgear/FlightGear-${PV}-data.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# data files split to separate package since 2.10.0
+RDEPEND="
+ !<games-simulation/flightgear-2.10.0
+"
+
+S=${WORKDIR}/fgdata
+
+src_install() {
+ insinto /usr/share/flightgear
+ rm -fr .git
+ doins -r *
+}
diff --git a/games-simulation/flightgear-data/flightgear-data-2018.2.1.ebuild b/games-simulation/flightgear-data/flightgear-data-2018.2.1.ebuild
new file mode 100644
index 000000000000..f364395e8473
--- /dev/null
+++ b/games-simulation/flightgear-data/flightgear-data-2018.2.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="FlightGear data files"
+HOMEPAGE="http://www.flightgear.org/"
+SRC_URI="mirror://sourceforge/flightgear/FlightGear-${PV}-data.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# data files split to separate package since 2.10.0
+RDEPEND="
+ !<games-simulation/flightgear-2.10.0
+"
+
+S=${WORKDIR}/fgdata
+
+src_install() {
+ insinto /usr/share/flightgear
+ rm -fr .git
+ doins -r *
+}
diff --git a/games-simulation/flightgear-data/flightgear-data-9999.ebuild b/games-simulation/flightgear-data/flightgear-data-9999.ebuild
new file mode 100644
index 000000000000..3e99ac372dbe
--- /dev/null
+++ b/games-simulation/flightgear-data/flightgear-data-9999.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit git-r3
+
+DESCRIPTION="FlightGear data files"
+HOMEPAGE="http://www.flightgear.org/"
+EGIT_REPO_URI="git://git.code.sf.net/p/flightgear/fgdata
+ git://mapserver.flightgear.org/fgdata"
+EGIT_BRANCH="next"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+# data files split to separate package since 2.10.0
+RDEPEND="
+ !<games-simulation/flightgear-2.10.0
+"
+
+src_install() {
+ insinto /usr/share/flightgear
+ rm -fr .git
+ doins -r *
+}
diff --git a/games-simulation/flightgear-data/metadata.xml b/games-simulation/flightgear-data/metadata.xml
new file mode 100644
index 000000000000..40aacc328d8e
--- /dev/null
+++ b/games-simulation/flightgear-data/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>reavertm@gentoo.org</email>
+ <name>Maciej Mrozowski</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">flightgear</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/flightgear/Manifest b/games-simulation/flightgear/Manifest
new file mode 100644
index 000000000000..6d5c731446e3
--- /dev/null
+++ b/games-simulation/flightgear/Manifest
@@ -0,0 +1,9 @@
+AUX ac3d.vim 45 BLAKE2B 04a6e4c70a8be0f7d996f1192289cc05012d4b4cc82a56a14b5d6d2dd7aae8f23f1cd853d29d071a0b9691cf5b8e8b262355b40752f43bccaa318065992d709b SHA512 b691585c6772222525b7f2d67ed41431663400930d9c7deed843a6abe50f67b517bd3180026a0cfe949df29036a49bcaf33ab759dd958ae64d550c271150a7da
+AUX flightgear-2018.2.1-cmake.patch 364 BLAKE2B fd191b13792a4a9846dfc1a1f3875e13cd0641f3caf9572498d841ada6b20036610ff667d66781990d71a34f0e7bca893c403e6988c903066abd305aa47be4a8 SHA512 522e4f3cb8f1e0d8f4b44d4454d5652ba545841b9d8f8f180bc45a059274580ed64b11ab64fd2e5214100f85dbf4b8de365478d367115f242f46ce2ae789141c
+AUX nasal.vim 47 BLAKE2B c3809ad7297d5811ff0b4a004295cd8e7a0984d30acc5790e5c05f5aa400c4c0723e480256e26627f67969a85e9ed91706fae9d9807e19e0566b32339a41031b SHA512 1edfa24fabbaae5037c8c521052d7013f3b29d2933d79a8381593121115229df6764219614d8d06b4058eb93cf84d9cc75773fd0864fd7a6e2aebd811e9d1afb
+DIST flightgear-2018.1.1.tar.bz2 8158999 BLAKE2B 5d7ca65c0b2627c7b34681e0af8e060f67cbed80d7e313c056fb92f026bc2355af66bbb6b377573db32f5101c63f1fa04521ba7fdffd584a56ae1049d1bcce83 SHA512 962be602a8c294081109ee1893383ac22dd83a0511fdb600d24d5dc9eca24d19687eaeed545695259502431e6d8c8bcdafe26846636ad40be28f5c2e4b0cfe93
+DIST flightgear-2018.2.1.tar.bz2 8344999 BLAKE2B fc5fbd43bcc2e40ed3245aa5059b0e5a40918a707cbddc8383de191e29f6cdfaa6960f6cfffb201b20ad10f5da0f343a693768d38be2788fd2582f7b5dc2419c SHA512 d308eebf6d6017794c086d534f6543c03a54e55bd7f48caf8359d5a84776406eac8cd8f32252efb2cd8bbb82c9c15fe4d7e3229ff2483e7a9772bd532331be03
+EBUILD flightgear-2018.1.1.ebuild 3675 BLAKE2B 3b5f1278f9d30def22ce34477f0a014de7aded6c8065758f518040211ddb5df5d834d4eeec3eb70c34705117cc8cd4541e80b37781d6e5fcc27932aec4c476a4 SHA512 b6854ea8183ff5674935a33c223c881e181fc71999e0af93d3af5a9104bc03630b25cb50d7dc019360efb70056fd53f5a2debfb507bff59d2ca08d094eee7c3b
+EBUILD flightgear-2018.2.1.ebuild 3864 BLAKE2B 2cf1d7735e1b5395f00580b83d32518eabc3468cc9992836bc7ab084a5b157e7ff94504f61282a25dd8dbd86ea7dc2d9b3faee58fad80e4b2377146e835ca37c SHA512 67f6547445806bab8e6c57ae727784a7f7c82a3784d3cfd532ecf26b9e19accda55fd0bd265ef18fdb01ee49e5559a2f13bdd73f23a2f855157eebeb14fb2c13
+EBUILD flightgear-9999.ebuild 3725 BLAKE2B 433c07af5de569f1add5ed24527745d40b2f65bdf1e9e9fc611f1bd22159559c778b7b6b4181acd2055ebf4b3c6d6c27298f55979b03f42466ad4ea1435d4c90 SHA512 88412936aa8b2a16fb9501952345185f66d8952c8727422250f17868a3b70639e23da2cb82d2640d80d6183bcc30c1d9cf6baf782cf6da0a8cc1a048c97e3066
+MISC metadata.xml 867 BLAKE2B b6bb892bffffec9fa00677768455fc49dd49164fae26b1c6ae70ac905feeaca79d670f4041294fb94e7c11d741a68bc6e3205e34aba5caf36da77fc808fdff8c SHA512 645a952785a101a8400be7a2608e7c71007c093c8f7cdbd0fab36f21b64ea1bbeb67e8f30404ab63841d41e5709a30570223732ebb586c780727ab0cfed0d943
diff --git a/games-simulation/flightgear/files/ac3d.vim b/games-simulation/flightgear/files/ac3d.vim
new file mode 100644
index 000000000000..6477d949b762
--- /dev/null
+++ b/games-simulation/flightgear/files/ac3d.vim
@@ -0,0 +1 @@
+au BufRead,BufNewFile *.ac set filetype=ac3d
diff --git a/games-simulation/flightgear/files/flightgear-2018.2.1-cmake.patch b/games-simulation/flightgear/files/flightgear-2018.2.1-cmake.patch
new file mode 100644
index 000000000000..eca04212833a
--- /dev/null
+++ b/games-simulation/flightgear/files/flightgear-2018.2.1-cmake.patch
@@ -0,0 +1,11 @@
+diff -ruN flightgear-2018.2.1/CMakeLists.txt my/CMakeLists.txt
+--- flightgear-2018.2.1/CMakeLists.txt 2018-06-03 09:47:23.000000000 +0200
++++ my/CMakeLists.txt 2018-06-07 01:09:14.621303443 +0200
+@@ -596,4 +596,6 @@
+
+
+ # The test suite.
+-add_subdirectory(test_suite EXCLUDE_FROM_ALL)
++if(ENABLE_TESTS)
++ add_subdirectory(test_suite EXCLUDE_FROM_ALL)
++endif()
diff --git a/games-simulation/flightgear/files/nasal.vim b/games-simulation/flightgear/files/nasal.vim
new file mode 100644
index 000000000000..65a2ed17fc26
--- /dev/null
+++ b/games-simulation/flightgear/files/nasal.vim
@@ -0,0 +1 @@
+au BufRead,BufNewFile *.nas set filetype=nasal
diff --git a/games-simulation/flightgear/flightgear-2018.1.1.ebuild b/games-simulation/flightgear/flightgear-2018.1.1.ebuild
new file mode 100644
index 000000000000..f32f93c30b98
--- /dev/null
+++ b/games-simulation/flightgear/flightgear-2018.1.1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils bash-completion-r1 toolchain-funcs
+
+DESCRIPTION="Open Source Flight Simulator"
+HOMEPAGE="http://www.flightgear.org/"
+SRC_URI="mirror://sourceforge/flightgear/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="dbus debug examples gdal openmp qt5 test +udev +utils vim-syntax"
+
+# zlib is some strange auto-dep from simgear
+COMMON_DEPEND="
+ dev-db/sqlite:3
+ >=dev-games/openscenegraph-3.2.0[jpeg,png]
+ ~dev-games/simgear-${PV}[gdal=]
+ media-libs/openal
+ >=media-libs/speex-1.2.0:0
+ media-libs/speexdsp:0
+ media-sound/gsm
+ sys-libs/zlib
+ virtual/glu
+ x11-libs/libX11
+ dbus? ( >=sys-apps/dbus-1.6.18-r1 )
+ gdal? ( >=sci-libs/gdal-2.0.0:0 )
+ qt5? (
+ >=dev-qt/qtcore-5.7.1:5
+ >=dev-qt/qtdeclarative-5.7.1:5
+ >=dev-qt/qtgui-5.7.1:5
+ >=dev-qt/qtnetwork-5.7.1:5
+ >=dev-qt/qtwidgets-5.7.1:5
+ )
+ udev? ( virtual/udev )
+ utils? (
+ media-libs/freeglut
+ media-libs/freetype:2
+ media-libs/glew:0
+ media-libs/libpng:0
+ virtual/opengl
+ qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 )
+ )
+"
+# libXi and libXmu are build-only-deps according to FindGLUT.cmake
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/boost-1.44
+ >=media-libs/plib-1.8.5
+ utils? (
+ x11-libs/libXi
+ x11-libs/libXmu
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ ~games-simulation/${PN}-data-${PV}
+"
+
+DOCS=(AUTHORS ChangeLog NEWS README Thanks)
+
+pkg_pretend() {
+ use openmp && tc-check-openmp
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEMCONVERT=$(usex gdal && usex utils)
+ -DENABLE_FGCOM=$(usex utils)
+ -DENABLE_FGELEV=$(usex utils)
+ -DENABLE_FGJS=$(usex utils)
+ -DENABLE_FGQCANVAS=$(usex qt5 && usex utils)
+ -DENABLE_FGVIEWER=$(usex utils)
+ -DENABLE_FLITE=OFF
+ -DENABLE_GDAL=$(usex gdal)
+ -DENABLE_GPSSMOOTH=$(usex utils)
+ -DENABLE_HID_INPUT=$(usex udev)
+ -DENABLE_JS_DEMO=$(usex utils)
+ -DENABLE_JSBSIM=ON
+ -DENABLE_LARCSIM=ON
+ -DENABLE_METAR=$(usex utils)
+ -DENABLE_OPENMP=$(usex openmp)
+ -DENABLE_PROFILE=OFF
+ -DENABLE_QT=$(usex qt5)
+ -DENABLE_RTI=OFF
+ -DENABLE_TERRASYNC=$(usex utils)
+ -DENABLE_TESTS=$(usex test)
+ -DENABLE_TRAFFIC=$(usex utils)
+ -DENABLE_UIUC_MODEL=ON
+ -DENABLE_YASIM=ON
+ -DEVENT_INPUT=$(usex udev)
+ -DFG_BUILD_TYPE=Release
+ -DFG_DATA_DIR=/usr/share/${PN}
+ -DJSBSIM_TERRAIN=ON
+ -DOSG_FSTREAM_EXPORT_FIXED=OFF # TODO also see simgear
+ -DSP_FDMS=ON
+ -DSYSTEM_FLITE=ON
+ -DSYSTEM_HTS_ENGINE=ON
+ -DSYSTEM_SPEEX=ON
+ -DSYSTEM_GSM=ON
+ -DSYSTEM_SQLITE=ON
+ -DUSE_AEONWAVE=OFF
+ -DUSE_DBUS=$(usex dbus)
+ -DWITH_FGPANEL=$(usex utils)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Install bash completion (TODO zsh)
+ # Uncomment below when scripts stops writing files...
+# sed -e "s|/usr/local/share/FlightGear|${GAMES_DATADIR}/${PN}|" \
+# -i scripts/completion/fg-completion.bash || die 'unable to replace FG_ROOT'
+# newbashcomp scripts/completion/fg-completion.bash ${PN}
+
+ # Install examples and other misc files
+ if use examples; then
+ insinto /usr/share/doc/"${PF}"/examples
+ doins -r scripts/java scripts/perl scripts/python
+ insinto /usr/share/doc/"${PF}"/examples/c++
+ doins -r scripts/example/*
+ insinto /usr/share/doc/"${PF}"/tools
+ doins -r scripts/atis scripts/tools/*
+ fi
+
+ # Install nasal script syntax
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins scripts/syntax/{ac3d,nasal}.vim
+ insinto /usr/share/vim/vimfiles/ftdetect/
+ doins "${FILESDIR}"/{ac3d,nasal}.vim
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please note that data files location changed to /usr/share/flightgear"
+ if use qt5; then
+ einfo "To use launcher, run fgfs with '--launcher' parameter"
+ fi
+}
diff --git a/games-simulation/flightgear/flightgear-2018.2.1.ebuild b/games-simulation/flightgear/flightgear-2018.2.1.ebuild
new file mode 100644
index 000000000000..15be88e6c57e
--- /dev/null
+++ b/games-simulation/flightgear/flightgear-2018.2.1.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils bash-completion-r1 toolchain-funcs
+
+DESCRIPTION="Open Source Flight Simulator"
+HOMEPAGE="http://www.flightgear.org/"
+SRC_URI="mirror://sourceforge/flightgear/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="dbus debug examples gdal openmp qt5 test +udev +utils vim-syntax"
+
+# zlib is some strange auto-dep from simgear
+COMMON_DEPEND="
+ dev-db/sqlite:3
+ >=dev-games/openscenegraph-3.2.0[jpeg,png]
+ ~dev-games/simgear-${PV}[gdal=]
+ media-libs/openal
+ >=media-libs/speex-1.2.0:0
+ media-libs/speexdsp:0
+ media-sound/gsm
+ sys-libs/zlib
+ virtual/glu
+ x11-libs/libX11
+ dbus? ( >=sys-apps/dbus-1.6.18-r1 )
+ gdal? ( >=sci-libs/gdal-2.0.0:0 )
+ qt5? (
+ >=dev-qt/qtcore-5.7.1:5
+ >=dev-qt/qtdeclarative-5.7.1:5
+ >=dev-qt/qtgui-5.7.1:5
+ >=dev-qt/qtnetwork-5.7.1:5
+ >=dev-qt/qtwidgets-5.7.1:5
+ )
+ udev? ( virtual/udev )
+ utils? (
+ media-libs/freeglut
+ media-libs/freetype:2
+ media-libs/glew:0
+ media-libs/libpng:0
+ virtual/opengl
+ qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 )
+ )
+"
+# libXi and libXmu are build-only-deps according to FindGLUT.cmake
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/boost-1.44
+ >=media-libs/plib-1.8.5
+ utils? (
+ x11-libs/libXi
+ x11-libs/libXmu
+ )
+ test? ( dev-util/cppunit )
+"
+RDEPEND="${COMMON_DEPEND}
+ ~games-simulation/${PN}-data-${PV}
+"
+
+PATCHES=("${FILESDIR}/${P}-cmake.patch")
+
+DOCS=(AUTHORS ChangeLog NEWS README Thanks)
+
+pkg_pretend() {
+ use openmp && tc-check-openmp
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_AUTOTESTING=OFF
+ -DENABLE_DEMCONVERT=$(usex gdal && usex utils)
+ -DENABLE_FGCOM=$(usex utils)
+ -DENABLE_FGELEV=$(usex utils)
+ -DENABLE_FGJS=$(usex utils)
+ -DENABLE_FGQCANVAS=$(usex qt5 && usex utils)
+ -DENABLE_FGVIEWER=$(usex utils)
+ -DENABLE_FLITE=OFF
+ -DENABLE_GDAL=$(usex gdal)
+ -DENABLE_GPSSMOOTH=$(usex utils)
+ -DENABLE_HID_INPUT=$(usex udev)
+ -DENABLE_JS_DEMO=$(usex utils)
+ -DENABLE_JSBSIM=ON
+ -DENABLE_LARCSIM=ON
+ -DENABLE_METAR=$(usex utils)
+ -DENABLE_OPENMP=$(usex openmp)
+ -DENABLE_PLIB_JOYSTICK=ON # NOTE look for defaults changes in CMake
+ -DENABLE_PROFILE=OFF
+ -DENABLE_QT=$(usex qt5)
+ -DENABLE_RTI=OFF
+ -DENABLE_TERRASYNC=$(usex utils)
+ -DENABLE_TESTS=$(usex test)
+ -DENABLE_TRAFFIC=$(usex utils)
+ -DENABLE_UIUC_MODEL=ON
+ -DENABLE_YASIM=ON
+ -DEVENT_INPUT=$(usex udev)
+ -DFG_BUILD_TYPE=Release
+ -DFG_DATA_DIR=/usr/share/${PN}
+ -DJSBSIM_TERRAIN=ON
+ -DOSG_FSTREAM_EXPORT_FIXED=OFF # TODO also see simgear
+ -DSP_FDMS=ON
+ -DSYSTEM_CPPUNIT=ON
+ -DSYSTEM_FLITE=ON
+ -DSYSTEM_HTS_ENGINE=ON
+ -DSYSTEM_SPEEX=ON
+ -DSYSTEM_GSM=ON
+ -DSYSTEM_SQLITE=ON
+ -DUSE_AEONWAVE=OFF
+ -DUSE_DBUS=$(usex dbus)
+ -DWITH_FGPANEL=$(usex utils)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Install bash completion (TODO zsh)
+ # Uncomment below when scripts stops writing files...
+# sed -e "s|/usr/local/share/FlightGear|${GAMES_DATADIR}/${PN}|" \
+# -i scripts/completion/fg-completion.bash || die 'unable to replace FG_ROOT'
+# newbashcomp scripts/completion/fg-completion.bash ${PN}
+
+ # Install examples and other misc files
+ if use examples; then
+ insinto /usr/share/doc/"${PF}"/examples
+ doins -r scripts/java scripts/perl scripts/python
+ insinto /usr/share/doc/"${PF}"/examples/c++
+ doins -r scripts/example/*
+ insinto /usr/share/doc/"${PF}"/tools
+ doins -r scripts/atis scripts/tools/*
+ fi
+
+ # Install nasal script syntax
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins scripts/syntax/{ac3d,nasal}.vim
+ insinto /usr/share/vim/vimfiles/ftdetect/
+ doins "${FILESDIR}"/{ac3d,nasal}.vim
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please note that data files location changed to /usr/share/flightgear"
+ if use qt5; then
+ einfo "To use launcher, run fgfs with '--launcher' parameter"
+ fi
+}
diff --git a/games-simulation/flightgear/flightgear-9999.ebuild b/games-simulation/flightgear/flightgear-9999.ebuild
new file mode 100644
index 000000000000..10e2e7113b34
--- /dev/null
+++ b/games-simulation/flightgear/flightgear-9999.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils bash-completion-r1 toolchain-funcs git-r3
+
+DESCRIPTION="Open Source Flight Simulator"
+HOMEPAGE="http://www.flightgear.org/"
+EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/${PN}
+ git://mapserver.flightgear.org/${PN}"
+EGIT_BRANCH="next"
+
+LICENSE="GPL-2"
+KEYWORDS=""
+SLOT="0"
+IUSE="dbus debug examples gdal openmp qt5 test +udev +utils vim-syntax"
+
+# zlib is some strange auto-dep from simgear
+COMMON_DEPEND="
+ dev-db/sqlite:3
+ >=dev-games/openscenegraph-3.2.0[jpeg,png]
+ ~dev-games/simgear-${PV}[gdal=]
+ media-libs/openal
+ >=media-libs/speex-1.2.0:0
+ media-libs/speexdsp:0
+ media-sound/gsm
+ sys-libs/zlib
+ virtual/glu
+ x11-libs/libX11
+ dbus? ( >=sys-apps/dbus-1.6.18-r1 )
+ gdal? ( >=sci-libs/gdal-2.0.0:0 )
+ qt5? (
+ >=dev-qt/qtcore-5.7.1:5
+ >=dev-qt/qtdeclarative-5.7.1:5
+ >=dev-qt/qtgui-5.7.1:5
+ >=dev-qt/qtnetwork-5.7.1:5
+ >=dev-qt/qtwidgets-5.7.1:5
+ )
+ udev? ( virtual/udev )
+ utils? (
+ media-libs/freeglut
+ media-libs/freetype:2
+ media-libs/glew:0
+ media-libs/libpng:0
+ virtual/opengl
+ qt5? ( >=dev-qt/qtwebsockets-5.7.1:5 )
+ )
+"
+# libXi and libXmu are build-only-deps according to FindGLUT.cmake
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/boost-1.44
+ >=media-libs/plib-1.8.5
+ utils? (
+ x11-libs/libXi
+ x11-libs/libXmu
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ ~games-simulation/${PN}-data-${PV}
+"
+
+DOCS=(AUTHORS ChangeLog NEWS README Thanks)
+
+pkg_pretend() {
+ use openmp && tc-check-openmp
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEMCONVERT=$(usex gdal && usex utils)
+ -DENABLE_FGCOM=$(usex utils)
+ -DENABLE_FGELEV=$(usex utils)
+ -DENABLE_FGJS=$(usex utils)
+ -DENABLE_FGQCANVAS=$(usex qt5 && usex utils)
+ -DENABLE_FGVIEWER=$(usex utils)
+ -DENABLE_FLITE=OFF
+ -DENABLE_GDAL=$(usex gdal)
+ -DENABLE_GPSSMOOTH=$(usex utils)
+ -DENABLE_HID_INPUT=$(usex udev)
+ -DENABLE_JS_DEMO=$(usex utils)
+ -DENABLE_JSBSIM=ON
+ -DENABLE_LARCSIM=ON
+ -DENABLE_METAR=$(usex utils)
+ -DENABLE_OPENMP=$(usex openmp)
+ -DENABLE_PROFILE=OFF
+ -DENABLE_QT=$(usex qt5)
+ -DENABLE_RTI=OFF
+ -DENABLE_TERRASYNC=$(usex utils)
+ -DENABLE_TESTS=$(usex test)
+ -DENABLE_TRAFFIC=$(usex utils)
+ -DENABLE_UIUC_MODEL=ON
+ -DENABLE_YASIM=ON
+ -DEVENT_INPUT=$(usex udev)
+ -DFG_BUILD_TYPE=Nightly
+ -DFG_DATA_DIR=/usr/share/${PN}
+ -DJSBSIM_TERRAIN=ON
+ -DOSG_FSTREAM_EXPORT_FIXED=OFF # TODO also see simgear
+ -DSP_FDMS=ON
+ -DSYSTEM_FLITE=ON
+ -DSYSTEM_HTS_ENGINE=ON
+ -DSYSTEM_SPEEX=ON
+ -DSYSTEM_GSM=ON
+ -DSYSTEM_SQLITE=ON
+ -DUSE_AEONWAVE=OFF
+ -DUSE_DBUS=$(usex dbus)
+ -DWITH_FGPANEL=$(usex utils)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Install bash completion (TODO zsh)
+ # Uncomment below when scripts stops writing files...
+# sed -e "s|/usr/local/share/FlightGear|${GAMES_DATADIR}/${PN}|" \
+# -i scripts/completion/fg-completion.bash || die 'unable to replace FG_ROOT'
+# newbashcomp scripts/completion/fg-completion.bash ${PN}
+
+ # Install examples and other misc files
+ if use examples; then
+ insinto /usr/share/doc/"${PF}"/examples
+ doins -r scripts/java scripts/perl scripts/python
+ insinto /usr/share/doc/"${PF}"/examples/c++
+ doins -r scripts/example/*
+ insinto /usr/share/doc/"${PF}"/tools
+ doins -r scripts/atis scripts/tools/*
+ fi
+
+ # Install nasal script syntax
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins scripts/syntax/{ac3d,nasal}.vim
+ insinto /usr/share/vim/vimfiles/ftdetect/
+ doins "${FILESDIR}"/{ac3d,nasal}.vim
+ fi
+}
+
+pkg_postinst() {
+ einfo "Please note that data files location changed to /usr/share/flightgear"
+ if use qt5; then
+ einfo "To use launcher, run fgfs with '--launcher' parameter"
+ fi
+}
diff --git a/games-simulation/flightgear/metadata.xml b/games-simulation/flightgear/metadata.xml
new file mode 100644
index 000000000000..2f0f827b8840
--- /dev/null
+++ b/games-simulation/flightgear/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>reavertm@gentoo.org</email>
+ <name>Maciej Mrozowski</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="dbus">Enable screensaver DBus interaction</flag>
+ <flag name="gdal">Enable alternative terrain engine based on pagedLOD using <pkg>sci-libs/gdal</pkg></flag>
+ <flag name="qt5">Build Qt5 launcher application</flag>
+ <flag name="udev">Enable event-based Input devices through <pkg>virtual/udev</pkg></flag>
+ <flag name="utils">Build various utilities (fgpanel, fgviewer among others)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">flightgear</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/gl117-1.3.2-r1 b/games-simulation/gl117-1.3.2-r1
deleted file mode 100644
index 3a08702cb702..000000000000
--- a/games-simulation/gl117-1.3.2-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install
-DEPEND=media-libs/freeglut media-libs/libsdl[sound,joystick,opengl,video] media-libs/sdl-mixer[mod] virtual/glu virtual/opengl
-DESCRIPTION=An action flight simulator
-EAPI=6
-HOMEPAGE=http://www.heptargon.de/gl-117/gl-117.html
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/freeglut media-libs/libsdl[sound,joystick,opengl,video] media-libs/sdl-mixer[mod] virtual/glu virtual/opengl
-SLOT=0
-SRC_URI=mirror://sourceforge/gl-117/gl-117-1.3.2-src.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=71c1f2ff0d2a03776d811719b300d350
diff --git a/games-simulation/gl117/Manifest b/games-simulation/gl117/Manifest
new file mode 100644
index 000000000000..1a6914d62f08
--- /dev/null
+++ b/games-simulation/gl117/Manifest
@@ -0,0 +1,4 @@
+AUX gl117-1.3.2-mode.patch 394 BLAKE2B ee932b73f82100910bea6466edeb4a8a0d5782ac64baac4b64872cb95b3018391bd66550c5a2ff7575aff7449aa01e856769aabd0e4f9ef51bed71c4de7349e6 SHA512 b6bdfa938f19481dff3f4d275826f1308aea99c1a2fc78df6f2b49096ecabce6c476cbf7de64afd0ac0903ea0ac3b5d84e43a876ae333bd0db20b39a0085ca11
+DIST gl-117-1.3.2-src.tar.bz2 2411075 BLAKE2B efd2c7b9dd3f71bf0b8b1aac79f90dcc6286301997913346f8ee536b3f5981564438e6a805c658678b5ae0402f84da762b60472ddc553cab49f9ffb421d69993 SHA512 1d2382576c6399d8c84d56ddc7eb2b11b9e1e3ffeebcc1bd30e258ef231626d15d1be649f8c791f30e4f2f78aca2b4290c5d08036c5f482eef01eda8f4f48b5f
+EBUILD gl117-1.3.2-r1.ebuild 790 BLAKE2B 9e0539a943ce93f7db7bb0481a6c9baf4cf0642ff3fc13300a60e43825dfad17e3299d9fc8dd5644c35bb2af1c2595efbd19d8cdf5dec56b0637aa22c9fc2a96 SHA512 dfa801635069584401af3e9b7fed23ed79cd54217dfffe1a5f3666704d666a11fd470adfd437fe02d05e46179477981ab3b9128edacbc6663c635b069faa02f8
+MISC metadata.xml 329 BLAKE2B 69ad3f12c9a48f6cbb1094fb1952d75e5e317060ad8534cd95e1e94bf2e3bb824862ad2a050aa81f55970b0cb0d032197ae86b6336beb09835a9f6c56aba0a0f SHA512 a2756adb5a9afa30e93c7f7726706ed9b435f76631d268685f9fea734a4ef6e643a8f8fdae8f59cc979a1bfcb91e2778496828db50458d6adacd789b3b3763f9
diff --git a/games-simulation/gl117/files/gl117-1.3.2-mode.patch b/games-simulation/gl117/files/gl117-1.3.2-mode.patch
new file mode 100644
index 000000000000..d3f13084a96f
--- /dev/null
+++ b/games-simulation/gl117/files/gl117-1.3.2-mode.patch
@@ -0,0 +1,12 @@
+--- a/src/main.cpp 2010-07-13 09:35:18.374122609 +0100
++++ b/src/main.cpp 2010-07-13 09:35:45.334955120 +0100
+@@ -71,8 +71,7 @@ int mode = 0;
+
+ // pre-defined screen resolutions (x, y, bpp, fullscreen)
+ int resolution [4] [4] =
+- { { 1024, 768, 32, 1 },
+- { 800, 600, 32, 1 },
++ { { 800, 600, 32, 1 },
+ { 640, 480, 32, 1 },
+ { 640, 480, 32, 0 } };
+
diff --git a/games-simulation/gl117/gl117-1.3.2-r1.ebuild b/games-simulation/gl117/gl117-1.3.2-r1.ebuild
new file mode 100644
index 000000000000..f5c52f6068ab
--- /dev/null
+++ b/games-simulation/gl117/gl117-1.3.2-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+MY_P="gl-117-${PV}-src"
+DESCRIPTION="An action flight simulator"
+HOMEPAGE="http://www.heptargon.de/gl-117/gl-117.html"
+SRC_URI="mirror://sourceforge/gl-117/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ media-libs/freeglut
+ media-libs/libsdl[sound,joystick,opengl,video]
+ media-libs/sdl-mixer[mod]
+ virtual/glu
+ virtual/opengl"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-mode.patch
+)
+
+src_install() {
+ DOCS="doc/gl-117.pdf AUTHORS ChangeLog FAQ NEWS README" \
+ default
+ newicon doc/src/falcon.jpg ${PN}.jpg
+ make_desktop_entry gl-117 GL-117 /usr/share/pixmaps/${PN}.jpg
+ doman doc/gl-117.6
+}
diff --git a/games-simulation/gl117/metadata.xml b/games-simulation/gl117/metadata.xml
new file mode 100644
index 000000000000..e991eac66f1d
--- /dev/null
+++ b/games-simulation/gl117/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gl-117</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/lincity-1.13.1-r1 b/games-simulation/lincity-1.13.1-r1
deleted file mode 100644
index ef31c0fe28df..000000000000
--- a/games-simulation/lincity-1.13.1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DEPEND=media-libs/libpng:0 x11-libs/libSM x11-libs/libXext nls? ( virtual/libintl ) nls? ( sys-devel/gettext )
-DESCRIPTION=city/country simulation game for X and Linux SVGALib
-EAPI=6
-HOMEPAGE=http://lincity.sourceforge.net/
-IUSE=nls
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libpng:0 x11-libs/libSM x11-libs/libXext nls? ( virtual/libintl )
-SLOT=0
-SRC_URI=mirror://sourceforge/lincity/lincity-1.13.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2baf3cdc638f9b0c330bd65d8d5ab9c1
diff --git a/games-simulation/lincity-ng-2.0 b/games-simulation/lincity-ng-2.0
deleted file mode 100644
index a4c2e816c310..000000000000
--- a/games-simulation/lincity-ng-2.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst preinst prepare setup unpack
-DEPEND=virtual/opengl sys-libs/zlib dev-libs/libxml2 media-libs/libsdl[sound,joystick,opengl,video] media-libs/sdl-mixer[vorbis] media-libs/sdl-image[png] media-libs/sdl-ttf media-libs/sdl-gfx dev-games/physfs virtual/pkgconfig dev-util/ftjam
-DESCRIPTION=city/country simulation game for X and opengl
-EAPI=5
-HOMEPAGE=https://sourceforge.net/projects/lincity-ng.berlios/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 BitstreamVera
-RDEPEND=virtual/opengl sys-libs/zlib dev-libs/libxml2 media-libs/libsdl[sound,joystick,opengl,video] media-libs/sdl-mixer[vorbis] media-libs/sdl-image[png] media-libs/sdl-ttf media-libs/sdl-gfx dev-games/physfs games-misc/games-envd
-RESTRICT=mirror
-SLOT=0
-SRC_URI=mirror://sourceforge/lincity-ng.berlios/lincity-ng-2.0.tar.bz2
-_eclasses_=base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc games 2bb3ede665927a68ffdb7c41eec7efde ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 user 8bc2845510e2109af75e3eeac607ec81 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9bdba06bbec6f3a9354ae42a8ba06547
diff --git a/games-simulation/lincity-ng/Manifest b/games-simulation/lincity-ng/Manifest
new file mode 100644
index 000000000000..6da303dd5120
--- /dev/null
+++ b/games-simulation/lincity-ng/Manifest
@@ -0,0 +1,4 @@
+AUX lincity-ng-2.0-build.patch 886 BLAKE2B b2b7680db28cf2d69352268c007b1ed86dc5e5340e7f48ad7f0f1aabf7da13d7f0c9a7b539c138698079bbad5401cf8c63d15dddd782dedee50350c0c87daa98 SHA512 0ac99a14e61ec3341dbe2d46f5a36e0a4d9e2dca4fceb2ddc8754a901eebdb2a8251c66fac36359688c77a2243ad4388142215bc57d6acd762723aee73c5f3d5
+DIST lincity-ng-2.0.tar.bz2 39475719 BLAKE2B 39992e6a2ef78e53eea1b0e347c968f6828089b5267e6d62dac7405ea91b182335431b1718ef9892b649b1437751959deb9fa407dfd899fd1dfca55145d059f2 SHA512 d85cd398145d1591f8640458c076f2a0b55713c39ede28b67d99adc7b76d38f09b58cd2ec84d9acac11bbaa794f6d97f6200f54efcdd4286315e6b3133284c55
+EBUILD lincity-ng-2.0.ebuild 1106 BLAKE2B 1c2538f2b9b7db2095619ea87ff75d0e8df2c15364d2b0743e6b7d29c2c3cd1c7422cd8fc77c5887d44d5a3dc89df1626d5a33009fbbbf508f17b86ab078aa69 SHA512 2422299580819a493afa66faf3c9df252d7bea336d73406fb06330412099345382a284428850c7a61f67c63d958b54963fed26462f09d5101a6574d88a726007
+MISC metadata.xml 341 BLAKE2B 971b9b371fbe6bbb577214a2fcb2f39948f4f8abe02398fd7f6e86d650434f778bc8e1556a6d08be49149da35f848e7e8a23e56034626823704872e88ada99e5 SHA512 0c2607743dbc1b832fad2d9edf774b51c9e816cca447c5991cd3958f001fded11bfd0fd0b90316ddab7c3371b0ec98d6f4ada27054e5d74e3295cf2cd1beeb90
diff --git a/games-simulation/lincity-ng/files/lincity-ng-2.0-build.patch b/games-simulation/lincity-ng/files/lincity-ng-2.0-build.patch
new file mode 100644
index 000000000000..ad2f2eeaff8d
--- /dev/null
+++ b/games-simulation/lincity-ng/files/lincity-ng-2.0-build.patch
@@ -0,0 +1,35 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Mon Jul 30 07:06:54 UTC 2012
+Subject: build system
+
+arguments to AR would be overwritten if we export AR
+
+--- lincity-ng-2.0.orig/lincity-ng.desktop
++++ lincity-ng-2.0/lincity-ng.desktop
+@@ -1,12 +1,11 @@
+ [Desktop Entry]
+ Type=Application
+ Version=1.0
+-Encoding=UTF-8
+ Name=Lincity-NG
+ GenericName=City Simulation Game
+ GenericName[de]=Stadtsimulationsspiel
+ Comment=Plan and Build a city and take care of transport, economics, electricityand others.
+-Icon=lincity-ng.png
++Icon=lincity-ng
+ Exec=lincity-ng
+ Terminal=false
+ StartupNotify=false
+--- lincity-ng-2.0.orig/mk/jam/unix.jam
++++ lincity-ng-2.0/mk/jam/unix.jam
+@@ -45,4 +45,10 @@
+ $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
+ }
+
++# jam Archive action seems to include the arguments which will break our AR export
++actions Archive
++{
++ $(AR) ru $(<) $(>)
++}
++
+
diff --git a/games-simulation/lincity-ng/lincity-ng-2.0.ebuild b/games-simulation/lincity-ng/lincity-ng-2.0.ebuild
new file mode 100644
index 000000000000..5da88e889d4c
--- /dev/null
+++ b/games-simulation/lincity-ng/lincity-ng-2.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils multiprocessing games
+
+DESCRIPTION="city/country simulation game for X and opengl"
+HOMEPAGE="https://sourceforge.net/projects/lincity-ng.berlios/"
+SRC_URI="mirror://sourceforge/lincity-ng.berlios/${P}.tar.bz2"
+
+LICENSE="GPL-2 BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT=mirror
+
+RDEPEND="virtual/opengl
+ sys-libs/zlib
+ dev-libs/libxml2
+ media-libs/libsdl[sound,joystick,opengl,video]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-image[png]
+ media-libs/sdl-ttf
+ media-libs/sdl-gfx
+ dev-games/physfs"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-util/ftjam"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+
+src_compile() {
+ jam -q -dx -j $(makeopts_jobs) || die "jam failed"
+}
+
+src_install() {
+ jam -sDESTDIR="${D}" \
+ -sappdocdir="/usr/share/doc/${PF}" \
+ -sapplicationsdir="/usr/share/applications" \
+ -spixmapsdir="/usr/share/pixmaps" \
+ install \
+ || die "jam install failed"
+ rm -f "${D}"/usr/share/doc/${PF}/COPYING*
+ prepgamesdirs
+}
diff --git a/games-simulation/lincity-ng/metadata.xml b/games-simulation/lincity-ng/metadata.xml
new file mode 100644
index 000000000000..7dd75a46b634
--- /dev/null
+++ b/games-simulation/lincity-ng/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lincity-ng.berlios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/lincity/Manifest b/games-simulation/lincity/Manifest
new file mode 100644
index 000000000000..e8bd15ae11b5
--- /dev/null
+++ b/games-simulation/lincity/Manifest
@@ -0,0 +1,4 @@
+AUX lincity-1.13.1-build.patch 2196 BLAKE2B 871577b9ac4b2536b9d46c094c6bd3492eb8e46188f2fc7d8efafa84d6e76914e60a579e30b1294e56daa96f8ab4a2b0247c0ddb5d0ce7d6d9e2180a7b0306cf SHA512 c0590673e7f04e16ffb6c9a25ce0f00d25dcaf689908117647e00989ed6db3a2c5d1db63abeb23e5c9a0f0999219515a53994ed4400f2712a8dea5b6eca5a8b3
+DIST lincity-1.13.1.tar.gz 1064236 BLAKE2B 1172ced3255048f3132f85cd9ae994c7e0558170f7e7a24909af1856669c4ad90d57acd76f330fb556656ed74843dda159005350760fc059c6b184cedf1e9393 SHA512 bc4ee7a1642b1efa25f9edaabd3aeb52d1ca1d016735c5094586f52fda3ec4e9080ff35fe518c1ccbfad9fd54babb370f4b9b6a158b4d2f43b7182155084eefc
+EBUILD lincity-1.13.1-r1.ebuild 946 BLAKE2B f1592d817a747fc1283eaa77e6ce82f452b8949f1292a6c4c28159cf5ff8c40d4234e4dd1abf3c1b9152e12f084fb4dfdb2cf9fde3649130673af7b616b83129 SHA512 7a47b905d33c64cfd627af661a66ab3224e4c508e9857bc6cf054621097089eb3d7d21c138a83786f038ce860e3c4fc4a1d7dd131200fdc4886c530d7ccf6aeb
+MISC metadata.xml 330 BLAKE2B 27e534512b77895bcfea8da8f49e1fa4ce2c9a8df47cf0ce813a8a88893b3c69c03d25083412d22bea3d2d73dfe2baa6a26292b983409c28d6c40bd70e222f6f SHA512 c36fecc06a5c84b3a93dfd25ffeb05bb14a5a96676eb1d7e976903ef7892a10c22ee7afa894c581c0bc3079ce2e30574143cc6b49195b346463c48f3e34ff1c0
diff --git a/games-simulation/lincity/files/lincity-1.13.1-build.patch b/games-simulation/lincity/files/lincity-1.13.1-build.patch
new file mode 100644
index 000000000000..f7f41f954baf
--- /dev/null
+++ b/games-simulation/lincity/files/lincity-1.13.1-build.patch
@@ -0,0 +1,74 @@
+--- lincity-1.13.1.orig/intl/Makefile.in
++++ lincity-1.13.1/intl/Makefile.in
+@@ -32,7 +32,7 @@
+ libdir = @libdir@
+ includedir = @includedir@
+ datadir = @datadir@
+-localedir = $(datadir)/locale
++localedir = /usr/share/locale
+ gettextsrcdir = $(datadir)/gettext/intl
+ aliaspath = $(localedir)
+ subdir = intl
+--- lincity-1.13.1.orig/mouse.c
++++ lincity-1.13.1/mouse.c
+@@ -1057,7 +1057,7 @@
+ and set to 1 if the existing transport if the more expensive sort
+ (e.g. GROUP_RAIL when overwriting GROUP_ROAD).
+ */
+-inline int
++int
+ mt_erase(int x, int y)
+ {
+ if (x < 0 || y < 0 || x >= WORLD_SIDE_LEN || y >= WORLD_SIDE_LEN)
+--- lincity-1.13.1.orig/pixmap.c
++++ lincity-1.13.1/pixmap.c
+@@ -390,7 +390,7 @@
+ likes it in the file. Still need to fix this in autoconf,
+ but for now this will do. */
+ #if !defined (WIN32)
+-inline int
++int
+ pixmap_index (int x, int y)
+ {
+ return y*pixmap_width + x;
+--- lincity-1.13.1.orig/pixmap.h
++++ lincity-1.13.1/pixmap.h
+@@ -19,7 +19,7 @@
+ void initialize_pixmap (void);
+ void resize_pixmap (int new_width, int new_height);
+ int pixmap_getpixel (int x, int y);
+-inline int pixmap_index (int x, int y);
++int pixmap_index (int x, int y);
+ int pixmap_getpixel (int x, int y);
+ void pixmap_setpixel (int x, int y, int col);
+ void pixmap_hline (int x1, int y1, int x2, int col);
+@@ -33,7 +33,7 @@
+ * Public Inline Functions
+ * ---------------------------------------------------------------------- */
+ #if defined (WIN32)
+-inline int
++int
+ pixmap_index (int x, int y) {
+ return y*pixmap_width + x;
+ }
+--- lincity-1.13.1.orig/po/Makefile.in.in
++++ lincity-1.13.1/po/Makefile.in.in
+@@ -21,7 +21,7 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ datadir = @datadir@
+-localedir = $(datadir)/locale
++localedir = /usr/share/locale
+ gettextsrcdir = $(datadir)/gettext/po
+
+ INSTALL = @INSTALL@
+--- lincity-1.13.1.orig/readpng.c
++++ lincity-1.13.1/readpng.c
+@@ -3,6 +3,7 @@
+ * This file is part of lincity (see COPYRIGHT for copyright information).
+ * ---------------------------------------------------------------------- */
+ #include <stdlib.h>
++#include <string.h>
+ #include "png.h"
+ #include "malloc.h"
+ #include "lin-city.h"
diff --git a/games-simulation/lincity/lincity-1.13.1-r1.ebuild b/games-simulation/lincity/lincity-1.13.1-r1.ebuild
new file mode 100644
index 000000000000..02968c06f2ed
--- /dev/null
+++ b/games-simulation/lincity/lincity-1.13.1-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic
+
+DESCRIPTION="city/country simulation game for X and Linux SVGALib"
+HOMEPAGE="http://lincity.sourceforge.net/"
+SRC_URI="mirror://sourceforge/lincity/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+# dep fix (bug #82318)
+RDEPEND="media-libs/libpng:0
+ x11-libs/libSM
+ x11-libs/libXext
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+)
+
+src_prepare() {
+ default
+
+ append-cflags -std=gnu89 # build with gcc5 (bug #570574)
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --with-gzip \
+ --with-x
+}
+
+src_compile() {
+ # build system logic is severely broken
+ emake
+ emake X_PROGS
+}
+
+src_install() {
+ default
+ dodoc Acknowledgements CHANGES README* TODO
+ make_desktop_entry xlincity Lincity
+ dobin xlincity
+}
diff --git a/games-simulation/lincity/metadata.xml b/games-simulation/lincity/metadata.xml
new file mode 100644
index 000000000000..41975d1ec190
--- /dev/null
+++ b/games-simulation/lincity/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lincity</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/metadata.xml b/games-simulation/metadata.xml
new file mode 100644
index 000000000000..9a1d4a49170f
--- /dev/null
+++ b/games-simulation/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-simulation category contains simulation games.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie games-simulation enthält Simulatoren.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría games-simulation contiene juegos de simulación.
+ </longdescription>
+ <longdescription lang="ja">
+ games-simulationカテゴリーにはシミュレーション・ゲームが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De games-simulation categorie bevat simulatiespellen.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm games-simulation chứa các trò chơi mô phỏng.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria games-simulation contiene giochi di simulazione.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria games-simulation contém jogos de simulação.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria games-simulation zawiera gry symulacyjne.
+ </longdescription>
+</catmetadata>
+
diff --git a/games-simulation/micropolis-1.0-r1 b/games-simulation/micropolis-1.0-r1
deleted file mode 100644
index 4278b92d5851..000000000000
--- a/games-simulation/micropolis-1.0-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare unpack
-DEPEND=media-libs/libsdl media-libs/sdl-mixer x11-libs/libX11 x11-libs/libXpm sys-devel/bison
-DESCRIPTION=Free version of the well-known city building simulation
-EAPI=6
-HOMEPAGE=http://www.donhopkins.com/home/micropolis/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=media-libs/libsdl media-libs/sdl-mixer x11-libs/libX11 x11-libs/libXpm
-SLOT=0
-SRC_URI=http://www.donhopkins.com/home/micropolis/micropolis-activity-source.tgz http://rmdir.de/~michael/micropolis_git.patch
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=92839228573d08da19083c093b8022a4
diff --git a/games-simulation/micropolis/Manifest b/games-simulation/micropolis/Manifest
new file mode 100644
index 000000000000..716b3e095510
--- /dev/null
+++ b/games-simulation/micropolis/Manifest
@@ -0,0 +1,4 @@
+DIST micropolis-activity-source.tgz 7676438 BLAKE2B 9415cf2f1980fe5a1f412561c9a53dca86d388f9fb529801af1e6071b3c92bc03daaff84c1ac1f964578d5805a4f2a9f60cfa0c56c0a1032bc0eed686207e538 SHA512 fe65966c43d044e01a63a3cfe3cad48466eb1e5ec8b13c03abb52d582395a8ab527332d4d04454a4f32e85b65e55d72fe5e4d53a3f37b422d90e9208f00d9976
+DIST micropolis_git.patch 83549 BLAKE2B 13cd94f3018ffd23dcbe5c1baf0b948cac7fb9b2f858d42f259003f2697060b156b900fcc8611e560a8b46e0e68fb6ff78d376bfc937cf12b55655067fb13f6d SHA512 9d1801478a27184c48d327094cad8238f7972c2cf3624c7c196375f2dd20c3374575b393d44cb2fb99613e19d66c4cc4fb27ae52df9fddf4e42adb42523bdc17
+EBUILD micropolis-1.0-r1.ebuild 1190 BLAKE2B c5d6f1deb3a01fd50eca19f71f33c176140ab30974a9c5dc328fbab46bd5a6d6a57058a380f443d4639de2e6ea908a1989622a37b4c3d9f76af5f12bd861ac84 SHA512 227c999dffdd95f89123d987d0eaece6672899147db634181e6080399d83fceb2eac6565601e6baa79dacfc0f137b0a3a20a7ee10b1fd5986c87645e573e7574
+MISC metadata.xml 318 BLAKE2B 0a772efef1bdef4bff48d961f943d5075316a69f050f31ffae69a30c8f70ad11b31712ce20cd840d9c6aef7f366ccaba0e2b265f5050a5bdc1c56ec240493e9d SHA512 7dde0fe493b040693af161ef449f7d5bce64988568d7fdf5eae0f9c7e8e404386a498da6aaae768e60ebc84bc948e8a65642cbb6ad8f128bd52163722ba129bc
diff --git a/games-simulation/micropolis/metadata.xml b/games-simulation/micropolis/metadata.xml
new file mode 100644
index 000000000000..eac64a74f324
--- /dev/null
+++ b/games-simulation/micropolis/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person"><email>hanno@gentoo.org</email></maintainer>
+<maintainer type="project">
+<email>games@gentoo.org</email>
+<name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-simulation/micropolis/micropolis-1.0-r1.ebuild b/games-simulation/micropolis/micropolis-1.0-r1.ebuild
new file mode 100644
index 000000000000..b6f6a4e58bd3
--- /dev/null
+++ b/games-simulation/micropolis/micropolis-1.0-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+DESCRIPTION="Free version of the well-known city building simulation"
+HOMEPAGE="http://www.donhopkins.com/home/micropolis/"
+SRC_URI="http://www.donhopkins.com/home/micropolis/${PN}-activity-source.tgz
+ http://rmdir.de/~michael/${PN}_git.patch"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ media-libs/libsdl
+ media-libs/sdl-mixer
+ x11-libs/libX11
+ x11-libs/libXpm"
+DEPEND="${RDEPEND}
+ sys-devel/bison"
+
+S=${WORKDIR}/${PN}-activity/
+
+PATCHES=(
+ "${DISTDIR}"/${PN}_git.patch
+)
+
+src_unpack() {
+ unpack ${PN}-activity-source.tgz
+}
+
+src_prepare() {
+ default
+
+ sed -i -e "s:-O3:${CFLAGS}:" \
+ src/tclx/config.mk src/{sim,tcl,tk}/makefile || die
+ sed -i -e "s:XLDFLAGS=:&${LDFLAGS}:" \
+ src/tclx/config.mk || die
+}
+
+src_compile() {
+ emake -C src LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ local dir=/usr/share/${PN}
+
+ exeinto "${dir}/res"
+ doexe src/sim/sim
+ insinto "${dir}"
+ doins -r activity cities images manual res
+
+ make_wrapper micropolis res/sim "${dir}"
+ doicon Micropolis.png
+ make_desktop_entry micropolis "Micropolis" Micropolis
+}
diff --git a/games-simulation/openrct2-0.1.2 b/games-simulation/openrct2-0.1.2
deleted file mode 100644
index ae16ab6b73f9..000000000000
--- a/games-simulation/openrct2-0.1.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test unpack
-DEPEND=>=dev-libs/jansson-2.5 >=dev-libs/libzip-1.0 media-libs/libpng:0= media-libs/libsdl2 media-libs/speexdsp multiplayer? ( libressl? ( dev-libs/libressl:0= ) !libressl? ( dev-libs/openssl:0= ) ) opengl? ( virtual/opengl ) truetype? ( media-libs/sdl2-ttf media-libs/fontconfig ) twitch? ( net-misc/curl[ssl] ) app-arch/unzip test? ( dev-cpp/gtest ) sys-devel/make >=dev-util/cmake-3.9.6 >=sys-apps/sed-4
-DESCRIPTION=An open source re-implementation of RollerCoaster Tycoon 2
-EAPI=6
-HOMEPAGE=https://openrct2.website/
-IUSE=libressl +multiplayer opengl test truetype +twitch
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=>=dev-libs/jansson-2.5 >=dev-libs/libzip-1.0 media-libs/libpng:0= media-libs/libsdl2 media-libs/speexdsp multiplayer? ( libressl? ( dev-libs/libressl:0= ) !libressl? ( dev-libs/openssl:0= ) ) opengl? ( virtual/opengl ) truetype? ( media-libs/sdl2-ttf media-libs/fontconfig ) twitch? ( net-misc/curl[ssl] )
-SLOT=0
-SRC_URI=https://github.com/OpenRCT2/OpenRCT2/archive/v0.1.2.tar.gz -> openrct2-0.1.2.tar.gz https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2/title-sequence-v0.1.2.zip -> openrct2-title-sequence-v0.1.2.zip
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=685e7bd51588298d881c66ad05b04203
diff --git a/games-simulation/openrct2-9999 b/games-simulation/openrct2-9999
deleted file mode 100644
index 9f6e3d7eeec2..000000000000
--- a/games-simulation/openrct2-9999
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test unpack
-DEPEND=>=dev-libs/jansson-2.5 >=dev-libs/libzip-1.0 media-libs/libpng:0= media-libs/libsdl2 media-libs/speexdsp multiplayer? ( libressl? ( dev-libs/libressl:0= ) !libressl? ( dev-libs/openssl:0= ) ) opengl? ( virtual/opengl ) truetype? ( media-libs/sdl2-ttf media-libs/fontconfig ) twitch? ( net-misc/curl[ssl] ) app-arch/unzip test? ( dev-cpp/gtest ) sys-devel/make >=dev-util/cmake-3.9.6 >=sys-apps/sed-4 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=An open source re-implementation of RollerCoaster Tycoon 2
-EAPI=6
-HOMEPAGE=https://openrct2.website/
-IUSE=libressl +multiplayer opengl test truetype +twitch
-LICENSE=GPL-3
-RDEPEND=>=dev-libs/jansson-2.5 >=dev-libs/libzip-1.0 media-libs/libpng:0= media-libs/libsdl2 media-libs/speexdsp multiplayer? ( libressl? ( dev-libs/libressl:0= ) !libressl? ( dev-libs/openssl:0= ) ) opengl? ( virtual/opengl ) truetype? ( media-libs/sdl2-ttf media-libs/fontconfig ) twitch? ( net-misc/curl[ssl] )
-SLOT=0
-SRC_URI=https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2/title-sequence-v0.1.2.zip -> openrct2-title-sequence-v0.1.2.zip https://github.com/OpenRCT2/objects/releases/download/v1.0/objects.zip -> openrct2-objects-v1.0.zip
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 git-r3 8f6de46b0aa318aea0e8cac62ece098b gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=ebdfdebd0fdd55c1e37ea79eaf8a9192
diff --git a/games-simulation/openrct2/Manifest b/games-simulation/openrct2/Manifest
new file mode 100644
index 000000000000..36721103acef
--- /dev/null
+++ b/games-simulation/openrct2/Manifest
@@ -0,0 +1,6 @@
+DIST openrct2-0.1.2.tar.gz 6769785 BLAKE2B 0cc6ef6c68c1db6c822dd6038bc2d115f487a52b5891316273ee36db1713913baa2f119dabace88a37c16f87c90b14cf84df75a24b26b22571e98966afd2adbc SHA512 489dac96e1eda1449680f98a4b500eeb7b3f1ffbdaa5a5c701300071eb3a7862c65fa5a81e769083927b95a14914db54307724756a9841cff0c769c9e5471adc
+DIST openrct2-objects-v1.0.zip 2050225 BLAKE2B 52ae6f5ab4de5d4b121cea6a3d6711b04f1c4857795c995f7568e3be2862409104be55e233781ff6708c7e821f49af8e91f9f4c87c037b6a8a77698534747925 SHA512 a125fee04c12c49ffd16880eb5b8722e25c5fb82adae305d9904c3a6251c83e73e4a29c7e3694acee3abf336894759cfbff94018c6b210df4d794ca3ec34dc84
+DIST openrct2-title-sequence-v0.1.2.zip 4073116 BLAKE2B a36fb07e8da62afce129f2224f4cf5cc226922094132a3dc515fda1f02e0f8bbe07c973363f824ae58a54a26f252ad96f3f673bf5f142be5c964f45b6f712ed6 SHA512 7592c5397ceb27347c127ae5c4f8e11d7ef2ff23c97f627b354f941894420f546ffdcff88e2348e42c82d182ccf620e739c745d894a9b5650a0d7d028b68a106
+EBUILD openrct2-0.1.2.ebuild 2325 BLAKE2B 7e7f5b87be6b5182bd64a746ba2e80732309277fc635cea93b0867ba65beff9f10bf13792d3e5b31ef42d3c217a5e58aa9b643a3e6aab811281a1a7628c61839 SHA512 ec94c4ff953d139ba359cabf6c064de04b64bf17bdd9f5230ca8ed39aaf7089828425507ce8f6ad247a1f763c9a6a5b4974dd8bcd773e363eac07f61256c5efa
+EBUILD openrct2-9999.ebuild 2571 BLAKE2B b04b112df994b6ea260407bd396a724c5eb772f06fb58b0e5dc99fdf8e0c3ec792354265123db0b8ff92d6a856f6210c789949d4b4a6ab5c53f5046587fcf93e SHA512 689c71dbc7d1a297fc61e73c6fecdc678b9e800ea557e26a1cc4afbdede49e28c71cf1a3e91b15b4b7cd4ad0ec41cdfdfdedebc7e95f95d54979cc3c9ce6af4c
+MISC metadata.xml 967 BLAKE2B 6dc048c366eb9719d895ab269a207a51f233125ee0861e360bf0d65a2de0d56b8bed7147f71bbf1d8c4b286a843a3542e74e17c8e3231682742435a2b28dfef0 SHA512 874ed9f406c5219bc5c6102b775a53b4e2526ff0f7cfa0dd9b5511717d10ee1fd63012cd19a926904b556195a12a7e2328548de9d1000605afdc471db513198f
diff --git a/games-simulation/openrct2/metadata.xml b/games-simulation/openrct2/metadata.xml
new file mode 100644
index 000000000000..e6ebc48e755d
--- /dev/null
+++ b/games-simulation/openrct2/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jan@segre.in</email>
+ <name>Jan Segre</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>hendrik@consetetur.de</email>
+ <name>Hendrik v. Raven (lorem_ipsum)</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ An open-source re-implementation of RollerCoaster Tycoon 2. A construction and management simulation video game that simulates amusement park management.
+ </longdescription>
+ <use>
+ <flag name="multiplayer">Enable multiplayer functionality</flag>
+ <flag name="twitch">Enable Twitch support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">OpenRCT2/OpenRCT2</remote-id>
+ <bugs-to>https://github.com/OpenRCT2/OpenRCT2/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/openrct2/openrct2-0.1.2.ebuild b/games-simulation/openrct2/openrct2-0.1.2.ebuild
new file mode 100644
index 000000000000..ae25725577a7
--- /dev/null
+++ b/games-simulation/openrct2/openrct2-0.1.2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils gnome2-utils xdg-utils
+
+DESCRIPTION="An open source re-implementation of RollerCoaster Tycoon 2"
+HOMEPAGE="https://openrct2.website/"
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRCT2/OpenRCT2.git"
+ EGIT_BRANCH="develop"
+ inherit git-r3
+ SRC_URI=""
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/OpenRCT2/OpenRCT2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/OpenRCT2-${PV}"
+fi
+
+TSV="${PV}"
+SRC_URI+=" https://github.com/OpenRCT2/title-sequences/releases/download/v${TSV}/title-sequence-v${TSV}.zip -> ${PN}-title-sequence-v${TSV}.zip "
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="libressl +multiplayer opengl test truetype +twitch"
+
+RDEPEND="
+ >=dev-libs/jansson-2.5
+ >=dev-libs/libzip-1.0
+ media-libs/libpng:0=
+ media-libs/libsdl2
+ media-libs/speexdsp
+ multiplayer? (
+ libressl? ( dev-libs/libressl:0= )
+ !libressl? ( dev-libs/openssl:0= )
+ )
+ opengl? ( virtual/opengl )
+ truetype? (
+ media-libs/sdl2-ttf
+ media-libs/fontconfig
+ )
+ twitch? ( net-misc/curl[ssl] )
+"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ test? ( dev-cpp/gtest )
+"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ unpack ${P}.tar.gz
+ fi
+
+ mkdir -p "${S}/data/title" || die
+ pushd "${S}/data/title" || die
+ unpack ${PN}-title-sequence-v${TSV}.zip
+ popd || die
+}
+
+src_prepare() {
+ sed -i CMakeLists.txt -e 's/-Werror//' || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DDISABLE_HTTP_TWITCH="$(usex !twitch)"
+ -DDISABLE_NETWORK="$(usex !multiplayer)"
+ -DDISABLE_OPENGL="$(usex !opengl)"
+ -DDISABLE_TTF="$(usex !truetype)"
+ -DWITH_TESTS="$(usex test)"
+ -DDOWNLOAD_TITLE_SEQUENCES=OFF
+ -DDISABLE_RCT2_TESTS=ON
+ -DSYSTEM_GTEST=ON
+ -DBUILD_SHARED_LIBS=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn ""
+ ewarn "You need the original RollerCoaster Tycoon 2 files to play this game."
+ ewarn "See: https://github.com/OpenRCT2/OpenRCT2/wiki/Required-RCT2-files#how-to-retrieve"
+ ewarn ""
+ fi
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}
diff --git a/games-simulation/openrct2/openrct2-9999.ebuild b/games-simulation/openrct2/openrct2-9999.ebuild
new file mode 100644
index 000000000000..1058facd68fd
--- /dev/null
+++ b/games-simulation/openrct2/openrct2-9999.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils gnome2-utils xdg-utils
+
+DESCRIPTION="An open source re-implementation of RollerCoaster Tycoon 2"
+HOMEPAGE="https://openrct2.website/"
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/OpenRCT2/OpenRCT2.git"
+ EGIT_BRANCH="develop"
+ inherit git-r3
+ SRC_URI=""
+else
+ KEYWORDS="~amd64 ~x86"
+ SRC_URI="https://github.com/OpenRCT2/OpenRCT2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/OpenRCT2-${PV}"
+fi
+
+TSV="0.1.2"
+SRC_URI+=" https://github.com/OpenRCT2/title-sequences/releases/download/v${TSV}/title-sequence-v${TSV}.zip -> ${PN}-title-sequence-v${TSV}.zip "
+
+OBJV="1.0"
+SRC_URI+=" https://github.com/OpenRCT2/objects/releases/download/v${OBJV}/objects.zip -> ${PN}-objects-v${OBJV}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="libressl +multiplayer opengl test truetype +twitch"
+
+RDEPEND="
+ >=dev-libs/jansson-2.5
+ >=dev-libs/libzip-1.0
+ media-libs/libpng:0=
+ media-libs/libsdl2
+ media-libs/speexdsp
+ multiplayer? (
+ libressl? ( dev-libs/libressl:0= )
+ !libressl? ( dev-libs/openssl:0= )
+ )
+ opengl? ( virtual/opengl )
+ truetype? (
+ media-libs/sdl2-ttf
+ media-libs/fontconfig
+ )
+ twitch? ( net-misc/curl[ssl] )
+"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ test? ( dev-cpp/gtest )
+"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ unpack ${P}.tar.gz
+ fi
+
+ mkdir -p "${S}/data/title" || die
+ pushd "${S}/data/title" || die
+ unpack ${PN}-title-sequence-v${TSV}.zip
+ popd || die
+
+ mkdir -p "${S}/data/object" || die
+ pushd "${S}/data/object" || die
+ unpack ${PN}-objects-v${OBJV}.zip
+ popd || die
+}
+
+src_prepare() {
+ sed -i CMakeLists.txt -e 's/-Werror//' || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DDISABLE_HTTP_TWITCH="$(usex !twitch)"
+ -DDISABLE_NETWORK="$(usex !multiplayer)"
+ -DDISABLE_OPENGL="$(usex !opengl)"
+ -DDISABLE_TTF="$(usex !truetype)"
+ -DWITH_TESTS="$(usex test)"
+ -DDOWNLOAD_TITLE_SEQUENCES=OFF
+ -DDOWNLOAD_OBJECTS=OFF
+ -DSYSTEM_GTEST=ON
+ -DBUILD_SHARED_LIBS=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn ""
+ ewarn "You need the original RollerCoaster Tycoon 2 files to play this game."
+ ewarn "See: https://github.com/OpenRCT2/OpenRCT2/wiki/Required-RCT2-files#how-to-retrieve"
+ ewarn ""
+ fi
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}
diff --git a/games-simulation/openttd-1.7.1-r1 b/games-simulation/openttd-1.7.1-r1
deleted file mode 100644
index cf1ccc395260..000000000000
--- a/games-simulation/openttd-1.7.1-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst
-DEPEND=!dedicated? ( media-libs/libsdl[sound,X,video] icu? ( dev-libs/icu-layoutex dev-libs/icu-le-hb >=dev-libs/icu-58.1:= ) truetype? ( media-libs/fontconfig media-libs/freetype:2 sys-libs/zlib ) ) lzo? ( dev-libs/lzo:2 ) iconv? ( virtual/libiconv ) png? ( media-libs/libpng:0 ) zlib? ( sys-libs/zlib ) virtual/pkgconfig >=sys-apps/sed-4
-DESCRIPTION=OpenTTD is a clone of Transport Tycoon Deluxe
-EAPI=6
-HOMEPAGE=http://www.openttd.org/
-IUSE=aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib
-KEYWORDS=~amd64 ~ppc64 ~x86
-LICENSE=GPL-2
-PDEPEND=!dedicated? ( openmedia? ( games-misc/openmsx games-misc/opensfx ) aplaymidi? ( media-sound/alsa-utils ) !aplaymidi? ( timidity? ( media-sound/timidity++ ) ) ) openmedia? ( >=games-misc/opengfx-0.4.7 )
-RDEPEND=!dedicated? ( media-libs/libsdl[sound,X,video] icu? ( dev-libs/icu-layoutex dev-libs/icu-le-hb >=dev-libs/icu-58.1:= ) truetype? ( media-libs/fontconfig media-libs/freetype:2 sys-libs/zlib ) ) lzo? ( dev-libs/lzo:2 ) iconv? ( virtual/libiconv ) png? ( media-libs/libpng:0 ) zlib? ( sys-libs/zlib )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://binaries.openttd.org/releases/1.7.1/openttd-1.7.1-source.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=5c9cda55d3206afaf99f1c3b2df26171
diff --git a/games-simulation/openttd-1.7.2 b/games-simulation/openttd-1.7.2
deleted file mode 100644
index b288bba14c60..000000000000
--- a/games-simulation/openttd-1.7.2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst
-DEPEND=!dedicated? ( media-libs/libsdl[sound,X,video] icu? ( dev-libs/icu-layoutex dev-libs/icu-le-hb >=dev-libs/icu-58.1:= ) truetype? ( media-libs/fontconfig media-libs/freetype:2 sys-libs/zlib ) ) lzo? ( dev-libs/lzo:2 ) iconv? ( virtual/libiconv ) png? ( media-libs/libpng:0 ) zlib? ( sys-libs/zlib ) virtual/pkgconfig >=sys-apps/sed-4
-DESCRIPTION=OpenTTD is a clone of Transport Tycoon Deluxe
-EAPI=6
-HOMEPAGE=http://www.openttd.org/
-IUSE=aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib
-KEYWORDS=~amd64 ~ppc64 ~x86
-LICENSE=GPL-2
-PDEPEND=!dedicated? ( openmedia? ( games-misc/openmsx games-misc/opensfx ) aplaymidi? ( media-sound/alsa-utils ) !aplaymidi? ( timidity? ( media-sound/timidity++ ) ) ) openmedia? ( >=games-misc/opengfx-0.4.7 )
-RDEPEND=!dedicated? ( media-libs/libsdl[sound,X,video] icu? ( dev-libs/icu-layoutex dev-libs/icu-le-hb >=dev-libs/icu-58.1:= ) truetype? ( media-libs/fontconfig media-libs/freetype:2 sys-libs/zlib ) ) lzo? ( dev-libs/lzo:2 ) iconv? ( virtual/libiconv ) png? ( media-libs/libpng:0 ) zlib? ( sys-libs/zlib )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://binaries.openttd.org/releases/1.7.2/openttd-1.7.2-source.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=035f7c35894880d5718b5616f98f2cfb
diff --git a/games-simulation/openttd-1.8.0_rc1 b/games-simulation/openttd-1.8.0_rc1
deleted file mode 100644
index 19cd22f2004e..000000000000
--- a/games-simulation/openttd-1.8.0_rc1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst
-DEPEND=!dedicated? ( media-libs/libsdl[sound,X,video] icu? ( dev-libs/icu-layoutex dev-libs/icu-le-hb >=dev-libs/icu-58.1:= ) truetype? ( media-libs/fontconfig media-libs/freetype:2 sys-libs/zlib ) ) lzo? ( dev-libs/lzo:2 ) iconv? ( virtual/libiconv ) png? ( media-libs/libpng:0 ) zlib? ( sys-libs/zlib ) virtual/pkgconfig >=sys-apps/sed-4
-DESCRIPTION=OpenTTD is a clone of Transport Tycoon Deluxe
-EAPI=6
-HOMEPAGE=http://www.openttd.org/
-IUSE=aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib
-KEYWORDS=~amd64 ~ppc64 ~x86
-LICENSE=GPL-2
-PDEPEND=!dedicated? ( openmedia? ( games-misc/openmsx games-misc/opensfx ) aplaymidi? ( media-sound/alsa-utils ) !aplaymidi? ( timidity? ( media-sound/timidity++ ) ) ) openmedia? ( >=games-misc/opengfx-0.4.7 )
-RDEPEND=!dedicated? ( media-libs/libsdl[sound,X,video] icu? ( dev-libs/icu-layoutex dev-libs/icu-le-hb >=dev-libs/icu-58.1:= ) truetype? ( media-libs/fontconfig media-libs/freetype:2 sys-libs/zlib ) ) lzo? ( dev-libs/lzo:2 ) iconv? ( virtual/libiconv ) png? ( media-libs/libpng:0 ) zlib? ( sys-libs/zlib )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://binaries.openttd.org/releases/1.8.0-RC1/openttd-1.8.0-RC1-source.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=062662c23070ee972c27afdc097d8a2e
diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest
new file mode 100644
index 000000000000..832a962b3258
--- /dev/null
+++ b/games-simulation/openttd/Manifest
@@ -0,0 +1,10 @@
+AUX openttd-1.6.0-cflags.patch 1028 BLAKE2B bc71e2620a834b37f5957d3da885dcd5e692fcca238c7e87949a36e24029677f036da9773d786b44022e4f8d920ea25f881ed782ec107f9c963558e9411b9d98 SHA512 e29ef624562c717b37496ca2e8353c1c065f776548878e3863420df5431743a6dc80f952699c3738f3fa1dbe77c9a6bf457a7c21241c723db5b1f7865afa180f
+AUX openttd.initd 412 BLAKE2B 04a18d4a8cd30a600b2e033792714f2a8bee16e0b9207d6609a3c1ef2101a611cf17d028af23c61fcaef3233c7199e45612b90a5c9af14e992a5d7d74b1695f6 SHA512 eb14a32baa8a6601945e5f0cd844e2dc9620661ee4ab841d5085b75a0fb4a1ea8698b9292a489d63792d1163a13c7843795ef843fe0babdeac0a0468313667a3
+AUX openttd.initd-r1 306 BLAKE2B d36e2f405a1b8808c708edd0c66e23d9976c2f5ef0fc2af3430bb8ba287c237dffe3d11cde6428b8ab668886ac4ff5eb4bc4fe5b39f205da4bf3d7773f66f7ef SHA512 bd04f9d812d5d68eebd953e9a667e5138d8e440139eb9c07f8da089495774b7d45e3b23bfb2af38ed053b333d4ead5f4be5c5fa877ad9f9bb0effee5c4a499dc
+DIST openttd-1.7.1-source.tar.gz 10090311 BLAKE2B 339171cd2895398ee1fedcfd24d1126fbc060b6d4530b267310b3f220448f8e6469a726e71e9882bea117585ea7b9f7271205f576ee2b26de6dec079f57f1620 SHA512 4a0d2ee424374b50fe0d089b86ff16b5de3159848a38143ca6745e349b6126567f1e4beda9afe2e6bc21ffffce1166acf719d3f5c95703a14c1379f8857e83d3
+DIST openttd-1.7.2-source.tar.gz 10097175 BLAKE2B a027b6ca6d3116dc3e6ad6ae43965682107268e367032418200cf1c1e16c5b5dad39c275ea57d923f17564d80cceb0e9909dc5aaf7ee230242f0ce0f46f06b1a SHA512 44d25061c42cb9c81baa67a40ff31a6681dcbb121c61db74c5179a31f189919471a82b7fd3f79c2cdeef02af5b47ec35fdbdc7feed74ca2360c028869fe772e8
+DIST openttd-1.8.0-RC1-source.tar.xz 6520976 BLAKE2B 17d34378ba3aa7a9def9f3ff764c42b890a646946211184660c3af9e252b9a809d481ccdd31421442efd9c7fac86f5c9c6091987070d53d1c913d3ef680f413c SHA512 aff6833934ce875320bdba3410be15a53fc8c233e7efe60628158636eed3b179fea5c8e9f8af2181c16bc173c409eab93477f2165d448100d048959bf63ba3d2
+EBUILD openttd-1.7.1-r1.ebuild 4811 BLAKE2B 0a362bab76f8ffd48b5f565111aeee4517dc0e3b5c6b93e823189dd314ca83649827173611fca36ca529375c60ceebd654c4f5959dc0c959d0c38a5ba684cf40 SHA512 e54396fa54e8e065be21964fea386b1b734c72395e156b343eec1e2789393bf381093e7212e8ff673dfb849d9d36afc4c11bfc70620543dda7462bda9ccc8787
+EBUILD openttd-1.7.2.ebuild 4811 BLAKE2B 1ff782a7493162f1c76b93c45bbe5509c2d5f090d518e41428b0d04adeb3205ca9ced894b85011c92bc65ce67fe6c581b5685da9c7233d03e0e5f291d1d979ad SHA512 586fcfd067dc19abf56d3064fd7478ea2c7cb4cc38a870bee7d79fc615056b8183b420908897d3739686dcd4f5d5054b3e836d8410ca85a8d0cce92228dc86ee
+EBUILD openttd-1.8.0_rc1.ebuild 4886 BLAKE2B 128e9209ab520a6716f8e35b875214186223ee407058d2ddd9033b37719e11dd1da3bb31038e61efa05fd2018b4cec6b0714800023241455327bd54a535f4050 SHA512 337500f620abda29fbdd51cfbe31589cd5f1b73e7ac0f756c0f63c8a282696c0ae2f1228ea952cf56f048cb0fad5ceb5b3967780c785c3939233e5dcacb49369
+MISC metadata.xml 752 BLAKE2B 85476f4dbf68d94a5d95e35cff935edfe35caee4bd2a253c7bad747b0915b80f0f7009bf78e419417a05345210bed17dff8f82ce603480c96781323d7d5a89fd SHA512 ddb1fbbe98d5e0bc1e23385b38502603819b89bd1d9285b0193a55efe2263b8ab6e045c7befdc908303eea27de8c9148dbcc8e7b6c035b267f5c8ff0f16b4b56
diff --git a/games-simulation/openttd/files/openttd-1.6.0-cflags.patch b/games-simulation/openttd/files/openttd-1.6.0-cflags.patch
new file mode 100644
index 000000000000..bb7f768b3798
--- /dev/null
+++ b/games-simulation/openttd/files/openttd-1.6.0-cflags.patch
@@ -0,0 +1,42 @@
+--- openttd-1.4.4/config.lib
++++ openttd-1.4.4/config.lib
+@@ -1450,12 +1450,6 @@
+ CFLAGS="-I/gg/os-include -noixemul -fstrict-aliasing -fexpensive-optimizations -mcpu=604 -fno-inline -mstring -mmultiple $CFLAGS"
+ LDFLAGS="$LDFLAGS -noixemul"
+ fi
+-
+- if [ "$enable_profiling" = "0" ]; then
+- # -fomit-frame-pointer and -pg do not go well together (gcc errors they are incompatible)
+- CFLAGS="-fomit-frame-pointer $CFLAGS"
+- fi
+- CFLAGS="-O2 $CFLAGS"
+ else
+ OBJS_SUBDIR="debug"
+
+@@ -1466,14 +1460,6 @@
+ CFLAGS="$CFLAGS -G0"
+ fi
+ fi
+- if [ $enable_debug -ge 2 ]; then
+- CFLAGS="$CFLAGS -fno-inline"
+- fi
+- if [ $enable_debug -ge 3 ]; then
+- CFLAGS="$CFLAGS -O0"
+- else
+- CFLAGS="$CFLAGS -O2"
+- fi
+ fi
+
+ if [ $enable_debug -le 2 ]; then
+@@ -1498,11 +1484,6 @@
+ CFLAGS="$CFLAGS -fno-expensive-optimizations"
+ fi
+
+- if [ "$enable_profiling" != "0" ]; then
+- CFLAGS="$CFLAGS -pg"
+- LDFLAGS="$LDFLAGS -pg"
+- fi
+-
+ if [ "$with_threads" = "0" ]; then
+ CFLAGS="$CFLAGS -DNO_THREADS"
+ fi
diff --git a/games-simulation/openttd/files/openttd.initd b/games-simulation/openttd/files/openttd.initd
new file mode 100644
index 000000000000..7a719587c7d6
--- /dev/null
+++ b/games-simulation/openttd/files/openttd.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting OpenTTD dedicated server"
+ start-stop-daemon --start -q --exec /usr/games/bin/openttd -- -D -f > /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenTTD dedicated server"
+ start-stop-daemon --stop -q -n openttd
+ eend $?
+}
diff --git a/games-simulation/openttd/files/openttd.initd-r1 b/games-simulation/openttd/files/openttd.initd-r1
new file mode 100644
index 000000000000..0bfeefddf6d6
--- /dev/null
+++ b/games-simulation/openttd/files/openttd.initd-r1
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="OpenTTD dedicated game server"
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/openttd"
+command_args="-D"
+command_background="true"
+
+depend() {
+ need net
+}
diff --git a/games-simulation/openttd/metadata.xml b/games-simulation/openttd/metadata.xml
new file mode 100644
index 000000000000..a5465cd55c4a
--- /dev/null
+++ b/games-simulation/openttd/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="aplaymidi">Enables midi music in game, using aplaymidi as an external player</flag>
+
+ <flag name="openmedia">Enables the free open media sets: OpenGFX, OpenSFX, OpenMSX, removing the requirement for proprietary TTD assets to play OpenTTD.</flag>
+ <flag name="lzo">Enables LZO compression for savegames. This is only needed to load extremely old savegames. (versions before 0.2)</flag>
+ <flag name="dedicated">Build only the openttd server, and not the client.</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-simulation/openttd/openttd-1.7.1-r1.ebuild b/games-simulation/openttd/openttd-1.7.1-r1.ebuild
new file mode 100644
index 000000000000..f24302009a47
--- /dev/null
+++ b/games-simulation/openttd/openttd-1.7.1-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils gnome2-utils
+
+DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe"
+HOMEPAGE="http://www.openttd.org/"
+SRC_URI="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib"
+RESTRICT="test" # needs a graphics set in order to test
+
+RDEPEND="!dedicated? (
+ media-libs/libsdl[sound,X,video]
+ icu? (
+ dev-libs/icu-layoutex
+ dev-libs/icu-le-hb
+ >=dev-libs/icu-58.1:=
+ )
+ truetype? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ sys-libs/zlib
+ )
+ )
+ lzo? ( dev-libs/lzo:2 )
+ iconv? ( virtual/libiconv )
+ png? ( media-libs/libpng:0 )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+PDEPEND="
+ !dedicated? (
+ openmedia? (
+ games-misc/openmsx
+ games-misc/opensfx
+ )
+ aplaymidi? ( media-sound/alsa-utils )
+ !aplaymidi? ( timidity? ( media-sound/timidity++ ) )
+ )
+ openmedia? ( >=games-misc/opengfx-0.4.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.0-cflags.patch
+)
+
+src_configure() {
+ local myopts=()
+ # there is an allegro interface available as well as sdl, but
+ # the configure for it looks broken so the sdl interface is
+ # always built instead.
+ local myopts+=( --without-allegro )
+
+ # libtimidity not needed except for some embedded platform
+ # nevertheless, it will be automagically linked if it is
+ # installed. Hence, we disable it.
+ myopts+=( --without-libtimidity )
+
+ use debug && myopts+=( --enable-debug=3 )
+
+ if use dedicated ; then
+ myopts+=( --enable-dedicated )
+ else
+ use aplaymidi && myopts+=( --with-midi='/usr/bin/aplaymidi' )
+ myopts+=(
+ $(use_with truetype freetype)
+ $(use_with icu)
+ --with-sdl
+ )
+ fi
+ if use png || { use !dedicated && use truetype; } || use zlib ; then
+ myopts+=( --with-zlib )
+ else
+ myopts+=( --without-zlib )
+ fi
+
+ # configure is a hand-written bash-script, so econf will not work.
+ # It's all built as C++, upstream uses CFLAGS internally.
+ CFLAGS="" ./configure \
+ --disable-strip \
+ --prefix-dir="${EPREFIX%/}/usr" \
+ --binary-dir="bin" \
+ --install-dir="${D}" \
+ --menu-group="Game;Simulation;" \
+ ${myopts[@]} \
+ $(use_with iconv) \
+ $(use_with png) \
+ $(use_with cpu_flags_x86_sse sse) \
+ $(use_with lzo liblzo2) \
+ || die
+}
+
+src_compile() {
+ emake VERBOSE=1
+}
+
+src_install() {
+ default
+ if use dedicated ; then
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ rm -rf "${ED}"/usr/share/{applications,icons,pixmaps}
+ fi
+ rm -f "${ED}"/usr/share/doc/${PF}/COPYING
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+
+ if ! use lzo ; then
+ elog "OpenTTD was built without 'lzo' in USE. While 'lzo' is not"
+ elog "required, disabling it does mean that loading old savegames"
+ elog "or scenarios from ancient versions (~0.2) will fail."
+ elog
+ fi
+
+ if use dedicated ; then
+ ewarn "Warning: The init script will kill all running openttd"
+ ewarn "processes when triggered, including any running client sessions!"
+ else
+ if use aplaymidi ; then
+ elog "You have emerged with 'aplaymidi' for playing MIDI."
+ elog "This option is for those with a hardware midi device,"
+ elog "or who have set up ALSA to handle midi ports."
+ elog "You must set the environment variable ALSA_OUTPUT_PORTS."
+ elog "Available ports can be listed by using 'aplaymidi -l'."
+ else
+ if ! use timidity ; then
+ elog "OpenTTD was built with neither 'aplaymidi' nor 'timidity'"
+ elog "in USE. Music may or may not work in-game. If you happen"
+ elog "to have timidity++ installed, music will work so long"
+ elog "as it remains installed, but OpenTTD will not depend on it."
+ fi
+ fi
+ if ! use openmedia ; then
+ elog
+ elog "OpenTTD was compiled without the 'openmedia' USE flag."
+ elog
+ elog "In order to play, you must at least install:"
+ elog "games-misc/opengfx, and games-misc/opensfx, or copy the "
+ elog "following 6 files from a version of Transport Tycoon Deluxe"
+ elog "(windows or DOS) to ~/.openttd/data/ or"
+ elog "${GAMES_DATADIR}/${PN}/data/."
+ elog
+ elog "From the WINDOWS version you need: "
+ elog "sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf"
+ elog "OR from the DOS version you need: "
+ elog "SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF"
+ elog
+ elog "File names are case sensitive, but should work either with"
+ elog "all upper or all lower case names"
+ elog
+ elog "In addition, in-game music will be unavailable: for music,"
+ elog "install games-misc/openmsx, or use the in-game download"
+ elog "functionality to get a music set"
+ elog
+ fi
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-simulation/openttd/openttd-1.7.2.ebuild b/games-simulation/openttd/openttd-1.7.2.ebuild
new file mode 100644
index 000000000000..f6e90e926ac5
--- /dev/null
+++ b/games-simulation/openttd/openttd-1.7.2.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils gnome2-utils
+
+DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe"
+HOMEPAGE="http://www.openttd.org/"
+SRC_URI="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib"
+RESTRICT="test" # needs a graphics set in order to test
+
+RDEPEND="!dedicated? (
+ media-libs/libsdl[sound,X,video]
+ icu? (
+ dev-libs/icu-layoutex
+ dev-libs/icu-le-hb
+ >=dev-libs/icu-58.1:=
+ )
+ truetype? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ sys-libs/zlib
+ )
+ )
+ lzo? ( dev-libs/lzo:2 )
+ iconv? ( virtual/libiconv )
+ png? ( media-libs/libpng:0 )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+PDEPEND="
+ !dedicated? (
+ openmedia? (
+ games-misc/openmsx
+ games-misc/opensfx
+ )
+ aplaymidi? ( media-sound/alsa-utils )
+ !aplaymidi? ( timidity? ( media-sound/timidity++ ) )
+ )
+ openmedia? ( >=games-misc/opengfx-0.4.7 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.0-cflags.patch
+)
+
+src_configure() {
+ local myopts=()
+ # there is an allegro interface available as well as sdl, but
+ # the configure for it looks broken so the sdl interface is
+ # always built instead.
+ local myopts+=( --without-allegro )
+
+ # libtimidity not needed except for some embedded platform
+ # nevertheless, it will be automagically linked if it is
+ # installed. Hence, we disable it.
+ myopts+=( --without-libtimidity )
+
+ use debug && myopts+=( --enable-debug=3 )
+
+ if use dedicated ; then
+ myopts+=( --enable-dedicated )
+ else
+ use aplaymidi && myopts+=( --with-midi='/usr/bin/aplaymidi' )
+ myopts+=(
+ $(use_with truetype freetype)
+ $(use_with icu)
+ --with-sdl
+ )
+ fi
+ if use png || { use !dedicated && use truetype; } || use zlib ; then
+ myopts+=( --with-zlib )
+ else
+ myopts+=( --without-zlib )
+ fi
+
+ # configure is a hand-written bash-script, so econf will not work.
+ # It's all built as C++, upstream uses CFLAGS internally.
+ CFLAGS="" ./configure \
+ --disable-strip \
+ --prefix-dir="${EPREFIX%/}/usr" \
+ --binary-dir="bin" \
+ --install-dir="${D}" \
+ --menu-group="Game;Simulation;" \
+ ${myopts[@]} \
+ $(use_with iconv) \
+ $(use_with png) \
+ $(use_with cpu_flags_x86_sse sse) \
+ $(use_with lzo liblzo2) \
+ || die
+}
+
+src_compile() {
+ emake VERBOSE=1
+}
+
+src_install() {
+ default
+ if use dedicated ; then
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ rm -rf "${ED}"/usr/share/{applications,icons,pixmaps}
+ fi
+ rm -f "${ED}"/usr/share/doc/${PF}/COPYING
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+
+ if ! use lzo ; then
+ elog "OpenTTD was built without 'lzo' in USE. While 'lzo' is not"
+ elog "required, disabling it does mean that loading old savegames"
+ elog "or scenarios from ancient versions (~0.2) will fail."
+ elog
+ fi
+
+ if use dedicated ; then
+ ewarn "Warning: The init script will kill all running openttd"
+ ewarn "processes when triggered, including any running client sessions!"
+ else
+ if use aplaymidi ; then
+ elog "You have emerged with 'aplaymidi' for playing MIDI."
+ elog "This option is for those with a hardware midi device,"
+ elog "or who have set up ALSA to handle midi ports."
+ elog "You must set the environment variable ALSA_OUTPUT_PORTS."
+ elog "Available ports can be listed by using 'aplaymidi -l'."
+ else
+ if ! use timidity ; then
+ elog "OpenTTD was built with neither 'aplaymidi' nor 'timidity'"
+ elog "in USE. Music may or may not work in-game. If you happen"
+ elog "to have timidity++ installed, music will work so long"
+ elog "as it remains installed, but OpenTTD will not depend on it."
+ fi
+ fi
+ if ! use openmedia ; then
+ elog
+ elog "OpenTTD was compiled without the 'openmedia' USE flag."
+ elog
+ elog "In order to play, you must at least install:"
+ elog "games-misc/opengfx, and games-misc/opensfx, or copy the "
+ elog "following 6 files from a version of Transport Tycoon Deluxe"
+ elog "(windows or DOS) to ~/.openttd/data/ or"
+ elog "${GAMES_DATADIR}/${PN}/data/."
+ elog
+ elog "From the WINDOWS version you need: "
+ elog "sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf"
+ elog "OR from the DOS version you need: "
+ elog "SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF"
+ elog
+ elog "File names are case sensitive, but should work either with"
+ elog "all upper or all lower case names"
+ elog
+ elog "In addition, in-game music will be unavailable: for music,"
+ elog "install games-misc/openmsx, or use the in-game download"
+ elog "functionality to get a music set"
+ elog
+ fi
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-simulation/openttd/openttd-1.8.0_rc1.ebuild b/games-simulation/openttd/openttd-1.8.0_rc1.ebuild
new file mode 100644
index 000000000000..6eca8d5fbef6
--- /dev/null
+++ b/games-simulation/openttd/openttd-1.8.0_rc1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils gnome2-utils
+
+MY_PV="${PV/_rc/-RC}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe"
+HOMEPAGE="http://www.openttd.org/"
+SRC_URI="http://binaries.openttd.org/releases/${MY_PV}/${MY_P}-source.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib"
+RESTRICT="test" # needs a graphics set in order to test
+
+RDEPEND="!dedicated? (
+ media-libs/libsdl[sound,X,video]
+ icu? (
+ dev-libs/icu-layoutex
+ dev-libs/icu-le-hb
+ >=dev-libs/icu-58.1:=
+ )
+ truetype? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ sys-libs/zlib
+ )
+ )
+ lzo? ( dev-libs/lzo:2 )
+ iconv? ( virtual/libiconv )
+ png? ( media-libs/libpng:0 )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+PDEPEND="
+ !dedicated? (
+ openmedia? (
+ games-misc/openmsx
+ games-misc/opensfx
+ )
+ aplaymidi? ( media-sound/alsa-utils )
+ !aplaymidi? ( timidity? ( media-sound/timidity++ ) )
+ )
+ openmedia? ( >=games-misc/opengfx-0.4.7 )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.6.0-cflags.patch
+)
+
+src_configure() {
+ local myopts=()
+ # there is an allegro interface available as well as sdl, but
+ # the configure for it looks broken so the sdl interface is
+ # always built instead.
+ local myopts+=( --without-allegro )
+
+ # libtimidity not needed except for some embedded platform
+ # nevertheless, it will be automagically linked if it is
+ # installed. Hence, we disable it.
+ myopts+=( --without-libtimidity )
+
+ use debug && myopts+=( --enable-debug=3 )
+
+ if use dedicated ; then
+ myopts+=( --enable-dedicated )
+ else
+ use aplaymidi && myopts+=( --with-midi='/usr/bin/aplaymidi' )
+ myopts+=(
+ $(use_with truetype freetype)
+ $(use_with icu)
+ --with-sdl
+ )
+ fi
+ if use png || { use !dedicated && use truetype; } || use zlib ; then
+ myopts+=( --with-zlib )
+ else
+ myopts+=( --without-zlib )
+ fi
+
+ # configure is a hand-written bash-script, so econf will not work.
+ # It's all built as C++, upstream uses CFLAGS internally.
+ CFLAGS="" ./configure \
+ --disable-strip \
+ --prefix-dir="${EPREFIX%/}/usr" \
+ --binary-dir="bin" \
+ --install-dir="${D}" \
+ --menu-group="Game;Simulation;" \
+ ${myopts[@]} \
+ $(use_with iconv) \
+ $(use_with png) \
+ $(use_with cpu_flags_x86_sse sse) \
+ $(use_with lzo liblzo2) \
+ || die
+}
+
+src_compile() {
+ emake VERBOSE=1
+}
+
+src_install() {
+ default
+ if use dedicated ; then
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ rm -rf "${ED}"/usr/share/{applications,icons,pixmaps}
+ fi
+ rm -f "${ED}"/usr/share/doc/${PF}/COPYING
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+
+ if ! use lzo ; then
+ elog "OpenTTD was built without 'lzo' in USE. While 'lzo' is not"
+ elog "required, disabling it does mean that loading old savegames"
+ elog "or scenarios from ancient versions (~0.2) will fail."
+ elog
+ fi
+
+ if use dedicated ; then
+ ewarn "Warning: The init script will kill all running openttd"
+ ewarn "processes when triggered, including any running client sessions!"
+ else
+ if use aplaymidi ; then
+ elog "You have emerged with 'aplaymidi' for playing MIDI."
+ elog "This option is for those with a hardware midi device,"
+ elog "or who have set up ALSA to handle midi ports."
+ elog "You must set the environment variable ALSA_OUTPUT_PORTS."
+ elog "Available ports can be listed by using 'aplaymidi -l'."
+ else
+ if ! use timidity ; then
+ elog "OpenTTD was built with neither 'aplaymidi' nor 'timidity'"
+ elog "in USE. Music may or may not work in-game. If you happen"
+ elog "to have timidity++ installed, music will work so long"
+ elog "as it remains installed, but OpenTTD will not depend on it."
+ fi
+ fi
+ if ! use openmedia ; then
+ elog
+ elog "OpenTTD was compiled without the 'openmedia' USE flag."
+ elog
+ elog "In order to play, you must at least install:"
+ elog "games-misc/opengfx, and games-misc/opensfx, or copy the "
+ elog "following 6 files from a version of Transport Tycoon Deluxe"
+ elog "(windows or DOS) to ~/.openttd/data/ or"
+ elog "${GAMES_DATADIR}/${PN}/data/."
+ elog
+ elog "From the WINDOWS version you need: "
+ elog "sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf"
+ elog "OR from the DOS version you need: "
+ elog "SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF"
+ elog
+ elog "File names are case sensitive, but should work either with"
+ elog "all upper or all lower case names"
+ elog
+ elog "In addition, in-game music will be unavailable: for music,"
+ elog "install games-misc/openmsx, or use the in-game download"
+ elog "functionality to get a music set"
+ elog
+ fi
+ fi
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-simulation/pmars-sdl-0.9.2e-r1 b/games-simulation/pmars-sdl-0.9.2e-r1
deleted file mode 100644
index 4bf6343c4679..000000000000
--- a/games-simulation/pmars-sdl-0.9.2e-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst
-DEPEND=sdl? ( x11-libs/libX11 media-libs/libsdl[video] ) X? ( x11-libs/libX11 ) !sdl? ( !X? ( sys-libs/ncurses:0= ) )
-DESCRIPTION=Portable redcode simulator's sdl port for core war
-EAPI=6
-HOMEPAGE=http://corewar.co.uk/pihlaja/pmars-sdl/
-IUSE=sdl X
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD GPL-2
-RDEPEND=sdl? ( x11-libs/libX11 media-libs/libsdl[video] ) X? ( x11-libs/libX11 ) !sdl? ( !X? ( sys-libs/ncurses:0= ) )
-SLOT=0
-SRC_URI=http://corewar.co.uk/pihlaja/pmars-sdl/pmars-0.9.2-5.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e readme.gentoo-r1 54aecea034d5e90bdb0684b80da5c9f3 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=86ab54130f1149f89e68ccf344797170
diff --git a/games-simulation/pmars-sdl/Manifest b/games-simulation/pmars-sdl/Manifest
new file mode 100644
index 000000000000..e45bc381d418
--- /dev/null
+++ b/games-simulation/pmars-sdl/Manifest
@@ -0,0 +1,4 @@
+AUX pmars-sdl-0.9.2e-format.patch 1988 BLAKE2B 57e96f71c6dfb6cea7286421acaa2a576ca26d9e5068a0c840b2d00dabd3ea87b2b482fe28253ef0d1b6c667bb13a2b9b8ad53f59cbb54a98f7d4da6ab1f66bf SHA512 1736220e86c762392e7074674d506fe161308a09c682a7c3cccfa7e58be880f6d44738854eae2c2c6dfc22d819c04c8fb5e9a5db632d00c35de09f4b44347014
+DIST pmars-0.9.2-5.tar.gz 200966 BLAKE2B 398323191290a9e3d57cb371c2070585cf78f845ca4cbadfa09f03045abc80f7b3fb71a58c18bbfdf503a3239d25bd0734b10e784d6570766e6b5c0ec606aadf SHA512 197d1967507199ed5eb075fb232a2f15d9bdf4bec03fc6b1d6df5d6259d6627eb40338c5787852ea10d96858029144348128b08e86c7079d96f10fd09dafc315
+EBUILD pmars-sdl-0.9.2e-r1.ebuild 1796 BLAKE2B 4620393a9697e9f68ac759f7a3e5fc01e0508aa82fd0aa9462b87e58f44471e6ccde75197654a3a7756de2dfa978c6ed360ac00269e50a3a175c190b9b43ef2d SHA512 2c831bc2e06429ffc4dd79a41c26c726cdbc1b9a890cd8551c2726839be867e3de2325d990bbcbdeafd640758364c71819ede81761dbee310bd70306375b589e
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch
new file mode 100644
index 000000000000..4e02da8a82a8
--- /dev/null
+++ b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch
@@ -0,0 +1,65 @@
+--- a/src/asm.c.old 2015-10-28 13:23:53.465014342 +0100
++++ b/src/asm.c 2015-10-28 13:23:10.502813377 +0100
+@@ -652,7 +652,7 @@
+ macputs(str);
+ #else
+ if (!inCdb)
+- fprintf(stderr, str);
++ fprintf(stderr, "%s", str);
+ #if defined DOSALLGRAPHX
+ else {
+ if (displayMode == TEXT)
+@@ -833,7 +833,7 @@
+ #ifdef __MAC__
+ textout(notEnoughMemErr);
+ #else
+- fprintf(stderr, notEnoughMemErr);
++ fprintf(stderr, "%s", notEnoughMemErr);
+ #endif
+ Exit(MEMERR);
+ break;
+@@ -916,7 +916,7 @@
+ }
+
+ if (ierr >= ERRMAX) {
+- sprintf(outs, tooManyMsgErr);
++ sprintf(outs, "%s", tooManyMsgErr);
+ #ifndef VMS
+ textout(outs);
+ #else
+--- a/src/cdb.c.old 2015-10-28 13:24:04.669805966 +0100
++++ b/src/cdb.c 2015-10-28 13:23:10.502813377 +0100
+@@ -2760,7 +2760,7 @@
+ fprintf(outp, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName,
+ scrV[idxV[i]]);
+ if (warriors > 2) {
+- fprintf(outp, resultsAre);
++ fprintf(outp, "%s", resultsAre);
+ for (j = 0; j < warriors; ++j) {
+ fprintf(outp, " %d", warrior[idxV[i]].score[j]);
+ }
+--- a/src/clparse.c.old 2015-10-28 13:24:10.648694768 +0100
++++ b/src/clparse.c 2015-10-28 13:23:10.502813377 +0100
+@@ -289,7 +289,7 @@
+ if (next_input(filep, inputs)) {
+ if (!strcmp(inputs, "-")) {
+ newFile = stdin;
+- fprintf(stderr, readingStdin);
++ fprintf(stderr, "%s", readingStdin);
+ } else {
+ if ((newFile = fopen(inputs, "r")) == NULL) {
+ code = FILENAME; /* command file not found */
+@@ -430,11 +430,11 @@
+ errout(outs);
+ break;
+ case MEMORY:
+- sprintf(outs, outOfMemory);
++ sprintf(outs, "%s", outOfMemory);
+ errout(outs);
+ break;
+ case FILENAME:
+- sprintf(outs, cannotOpenParameterFile);
++ sprintf(outs, "%s", cannotOpenParameterFile);
+ errout(outs);
+ break;
+ }
diff --git a/games-simulation/pmars-sdl/metadata.xml b/games-simulation/pmars-sdl/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-simulation/pmars-sdl/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 type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild
new file mode 100644
index 000000000000..b7f96156df97
--- /dev/null
+++ b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit readme.gentoo-r1 toolchain-funcs
+
+MY_PN="${PN/-sdl/}"
+MY_PV="${PV/e/-5}"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="Portable redcode simulator's sdl port for core war"
+HOMEPAGE="http://corewar.co.uk/pihlaja/pmars-sdl/"
+SRC_URI="http://corewar.co.uk/pihlaja/pmars-sdl/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="sdl X"
+
+RDEPEND="
+ sdl? ( x11-libs/libX11 media-libs/libsdl[video] )
+ X? ( x11-libs/libX11 )
+ !sdl? ( !X? ( sys-libs/ncurses:0= ) )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}"/${P}-format.patch )
+
+DOC_CONTENTS="
+ There are some macros in /usr/share/pmars/macros
+ which you should make accessible to pmars by typing
+ export PMARSHOME=/usr/share/pmars/macros\n
+"
+
+src_compile() {
+ CFLAGS="${CFLAGS} -DEXT94 -DPERMUTATE"
+ LFLAGS="-x"
+
+ if use sdl ; then
+ CFLAGS="${CFLAGS} -DSDLGRAPHX `sdl-config --cflags`"
+ LIB=`sdl-config --libs`
+ elif use X ; then
+ CFLAGS="${CFLAGS} -DXWINGRAPHX"
+ LIB="-L/usr/X11R6/lib -lX11"
+ else
+ CFLAGS="${CFLAGS} -DCURSESGRAPHX"
+ LIB="-lcurses"
+ fi
+
+ cd src
+
+ SRC="asm.c
+ cdb.c
+ clparse.c
+ disasm.c
+ eval.c
+ global.c
+ pmars.c
+ sim.c
+ pos.c
+ str_eng.c
+ token.c"
+
+ for x in ${SRC}; do
+ einfo "compiling ${x}"
+ $(tc-getCC) ${CFLAGS} ${x} -c || die
+ done
+
+ echo
+ einfo "linking with LIB: ${LIB}"
+ $(tc-getCC) ${LDFLAGS} *.o ${LIB} -o ${MY_PN} || die
+}
+
+src_install() {
+ dobin src/${MY_PN}
+ doman doc/${MY_PN}.6
+
+ dodoc AUTHORS CONTRIB ChangeLog README doc/redcode.ref
+ readme.gentoo_create_doc
+
+ insinto "/usr/share/${MY_PN}/warriors"
+ doins warriors/*
+
+ insinto "/usr/share/${MY_PN}/macros"
+ doins config/*.mac
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/games-simulation/searchandrescue-1.5.0-r1 b/games-simulation/searchandrescue-1.5.0-r1
deleted file mode 100644
index 61e15eea555b..000000000000
--- a/games-simulation/searchandrescue-1.5.0-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare unpack
-DEPEND=media-libs/libsdl media-libs/sdl-mixer x11-libs/libICE x11-libs/libSM x11-libs/libXi x11-libs/libXmu x11-libs/libXpm x11-libs/libXxf86vm virtual/opengl virtual/glu x11-base/xorg-proto
-DESCRIPTION=Helicopter based air rescue flight simulator
-EAPI=6
-HOMEPAGE=http://searchandrescue.sourceforge.net/
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=media-libs/libsdl media-libs/sdl-mixer x11-libs/libICE x11-libs/libSM x11-libs/libXi x11-libs/libXmu x11-libs/libXpm x11-libs/libXxf86vm virtual/opengl virtual/glu
-SLOT=0
-SRC_URI=mirror://sourceforge/searchandrescue/SearchAndRescue-1.5.0.tar.gz mirror://sourceforge/searchandrescue/SearchAndRescue-data-1.3.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=dcb0aca3a41417b412da6ffb9fe465e7
diff --git a/games-simulation/searchandrescue/Manifest b/games-simulation/searchandrescue/Manifest
new file mode 100644
index 000000000000..42a2f5363352
--- /dev/null
+++ b/games-simulation/searchandrescue/Manifest
@@ -0,0 +1,5 @@
+AUX searchandrescue-1.5.0-build.patch 2110 BLAKE2B ce57c8702e1d9eeb44ace585c977a07d058b73eb109c0f22f85669199b5070d6339ae6248a54b8229735094ec8705c195a66e8c272292a738d0f8cd7f30866bd SHA512 9162d53482d1a364ff8991a318aa19322399c939e657b568e8e9d621d8ab9e462db7c14c0f350e03e6f8a6d5059d11f038485a91b92869bb7800aa77640954f8
+DIST SearchAndRescue-1.5.0.tar.gz 1473765 BLAKE2B cf7dcbb4d250a124a5450115e4fa6f016e83ba16a5ba12cbc53a3c3725643f0a0d306853a3239471ae87d4fc5bef16f2fe903601daf24e2c7a8e3dc71b1a1c2f SHA512 72a8e5c375bb2f5d11d1346bb3c81ea4678a9c58c36f53c048e9a16d32a926ff93c3ec9756867f0869aa2a8da5fb0bfe7764f704c4e79519ee0834d225513657
+DIST SearchAndRescue-data-1.3.0.tar.gz 52152370 BLAKE2B e6f19b03f45d971c43cfeb72e3202fbf99c1e3d276acc8e133e6c345b08f19cfdc1ae997fdb3d90e173fe5a6bd46685ac3903b1e1da3eda7fa105fc8d9547c7f SHA512 5419376aeecb0f05570a8d2a0a6f830f3b22ce9d1d34a5e490485767546c6d0d1d2a2a3f37e5dfcef69e271a94a9c7dfc6b592e3c0dd62a8a6c38e4bf7d25ccd
+EBUILD searchandrescue-1.5.0-r1.ebuild 1789 BLAKE2B c7a9c6a252c4e66d774d725d08eade45c683638a5d70b8c0cb4975773b76e79f15413dc96cd6988685afbcae359ba4e7d01d9988cb3d80aa520752e538082944 SHA512 46811d91f1e3de45c3ab17369e636346270c9795944e0e4badea6851b8ee138cae181e95d9ac124e276a5a57816c41f4d1b715797236371f44117cc5700c03d3
+MISC metadata.xml 338 BLAKE2B 75bbcfd013fbf4ea2aea09b64bb19a03e1e3f1490d77f4ed7f07af069ccc9c0643e5e1d0368d4dab289c709a49306645befbb28a087c59779415ab0bee0f6ab6 SHA512 434ce984794eb43c0e4083cefe03dff01118cc3b9aa64d43c7bfbfccaae20212baa111dce95ac79a9b9e94f9fc405e30bd09bd7fc845bba749e5659ae26ce388
diff --git a/games-simulation/searchandrescue/files/searchandrescue-1.5.0-build.patch b/games-simulation/searchandrescue/files/searchandrescue-1.5.0-build.patch
new file mode 100644
index 000000000000..40428bade2d7
--- /dev/null
+++ b/games-simulation/searchandrescue/files/searchandrescue-1.5.0-build.patch
@@ -0,0 +1,66 @@
+--- searchandrescue_1.3.0.orig/sar/makefile_append.ini
++++ searchandrescue_1.3.0/sar/makefile_append.ini
+@@ -3,7 +3,7 @@
+
+
+ # C++ flags:
+-CPPFLAGS = -D__cplusplus -Dc_plusplus
++CPPFLAGS += -D__cplusplus -Dc_plusplus
+
+
+ # Source files list:
+@@ -16,14 +16,12 @@
+ OBJ_CPP = $(SRC_CPP:.cpp=.o)
+ .c.o:
+ @echo "Compiling module $*.o"
+- @$(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
++ $(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
+ .cpp.o:
+ @echo "Compiling module $*.o"
+- @$(CPP) -c $*.cpp $(INC_DIRS) $(CFLAGS) $(CPPFLAGS)
++ $(CPP) -c $*.cpp $(INC_DIRS) $(CPPFLAGS)
+
+ # Programs
+-LS = ls
+-LSFLAGS = -s -h -c --color=auto
+ RM = rm
+ RMFLAGS = -f
+
+@@ -32,9 +30,8 @@
+
+ modules: $(OBJ_C) $(OBJ_CPP)
+ @echo -n "Linking modules..."
+- @$(CPP) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LIBS) $(LIB_DIRS)
++ $(CPP) $(OBJ_C) $(OBJ_CPP) $(LDFLAGS) -o $(BIN) $(LIBS) $(LIB_DIRS)
+ @echo -n " "
+- @-$(LS) $(LSFLAGS) $(BIN)
+
+ prebuild:
+ @echo "Building program \"$(BIN)\"..."
+@@ -54,5 +51,5 @@
+ clean:
+ @echo "Cleaning program \"$(BIN)\"..."
+ @echo "Deleting all intermediate files..."
+- @$(RM) $(RMFLAGS) a.out core *.o $(BIN)
++ $(RM) $(RMFLAGS) a.out core *.o $(BIN)
+ @echo "Clean done."
+--- searchandrescue_1.3.0.orig/sar/platforms.ini
++++ searchandrescue_1.3.0/sar/platforms.ini
+@@ -102,7 +102,7 @@
+ FeatureDepend = xf86vidmode-lib
+ DependType = Library
+ MustExist = Yes
+- DependPath = libXxf86vm.a
++ DependPath = libXxf86vm.so
+ DependGrepString = XF86VidModeQueryExtension
+ FeatureDepend = xf86vidmode-devel
+ DependType = Header
+@@ -223,7 +223,7 @@
+ FeatureDepend = xf86vidmode-lib
+ DependType = Library
+ MustExist = Yes
+- DependPath = libXxf86vm.a
++ DependPath = libXxf86vm.so
+ DependGrepString = XF86VidModeQueryExtension
+ FeatureDepend = xf86vidmode-devel
+ DependType = Header
diff --git a/games-simulation/searchandrescue/metadata.xml b/games-simulation/searchandrescue/metadata.xml
new file mode 100644
index 000000000000..2ddbf0d5866c
--- /dev/null
+++ b/games-simulation/searchandrescue/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">searchandrescue</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/searchandrescue/searchandrescue-1.5.0-r1.ebuild b/games-simulation/searchandrescue/searchandrescue-1.5.0-r1.ebuild
new file mode 100644
index 000000000000..9213c1144606
--- /dev/null
+++ b/games-simulation/searchandrescue/searchandrescue-1.5.0-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_DATA_PV=1.3.0
+MY_PN=SearchAndRescue
+DESCRIPTION="Helicopter based air rescue flight simulator"
+HOMEPAGE="http://searchandrescue.sourceforge.net/"
+SRC_URI="mirror://sourceforge/searchandrescue/${MY_PN}-${PV}.tar.gz
+ mirror://sourceforge/searchandrescue/${MY_PN}-data-${MY_DATA_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ media-libs/libsdl
+ media-libs/sdl-mixer
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXxf86vm
+ virtual/opengl
+ virtual/glu"
+DEPEND="${RDEPEND}
+ x11-base/xorg-proto"
+
+S=${WORKDIR}/${PN}_${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+)
+
+src_unpack() {
+ unpack ${MY_PN}-${PV}.tar.gz
+ mkdir data && cd data && \
+ unpack ${MY_PN}-data-${MY_DATA_PV}.tar.gz
+ bunzip2 "${S}"/sar/man/${MY_PN}.6.bz2 || die
+}
+
+src_prepare() {
+ default
+
+ rm pconf/pconf || die
+ sed -i -e '/Wall/s/$/ $(CFLAGS)/' pconf/Makefile || die
+}
+
+src_configure() {
+ emake CC=$(tc-getCC) -C pconf pconf # Needed for the configure script
+
+ append-cppflags -DNEW_GRAPHICS -DHAVE_SDL_MIXER
+ export CPP="$(tc-getCXX)"
+ export CPPFLAGS="${CXXFLAGS}"
+ # NOTE: not an autoconf script
+ ./configure Linux --prefix="/usr" || die
+ sed -i -e 's/@\$/$/' sar/Makefile || die
+}
+
+src_compile() {
+ emake -C sar
+}
+
+src_install() {
+ dobin sar/${MY_PN}
+ doman sar/man/${MY_PN}.6
+ dodoc AUTHORS HACKING README
+ doicon sar/icons/SearchAndRescue.xpm
+ newicon sar/icons/SearchAndRescue.xpm ${PN}.xpm
+ dodir /usr/share/games/${PN}
+ cp -r "${WORKDIR}"/data/* "${D}/usr/share/games/${PN}/" || die
+ make_desktop_entry SearchAndRescue "SearchAndRescue" /usr/share/pixmaps/${PN}.xpm
+}
diff --git a/games-simulation/senken-0.3.0-r1 b/games-simulation/senken-0.3.0-r1
deleted file mode 100644
index 8f18061b70a9..000000000000
--- a/games-simulation/senken-0.3.0-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=media-libs/libsdl-1.2.4 media-libs/sdl-image x11-libs/gtk+:2 nls? ( virtual/libintl ) nls? ( sys-devel/gettext )
-DESCRIPTION=city simulation game
-EAPI=6
-HOMEPAGE=https://savannah.nongnu.org/projects/senken/
-IUSE=nls
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=>=media-libs/libsdl-1.2.4 media-libs/sdl-image x11-libs/gtk+:2 nls? ( virtual/libintl )
-SLOT=0
-SRC_URI=mirror://gentoo/senken-0.3.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=4f6369171bae93c9d1e7a02f1cc08dc8
diff --git a/games-simulation/senken/Manifest b/games-simulation/senken/Manifest
new file mode 100644
index 000000000000..5820deac0110
--- /dev/null
+++ b/games-simulation/senken/Manifest
@@ -0,0 +1,5 @@
+AUX senken-0.3.0-as-needed.patch 947 BLAKE2B 0de09e827bf94bd9a4e2f289a3a685dfcbfa8860e9f2d3f343fb29ff4e345984b88f7c731add1f58a9a179061cee1e93ec3a4ec718e8c3f0dd80a4a4730e79c9 SHA512 6f1f5ae454b9f186624a2ac9d3d5d802c973fadcedf236d83b47020302645c197683ee8765c9b3536866d5281fd37ce94ebdafebde5b5653c1a2188a81fd6a44
+AUX senken-0.3.0-warnings.patch 1099 BLAKE2B 845bca95ba6ef003a751a096e3895386efe7920ac707249c229cfdd5593dd23c44adb96f985890a353233c7fd38f5f705b21a1e31b53b3dc6ae21523a01b2adf SHA512 5e48805adcec08e8deab671df7bf5a8303c29d8d2679bf9ce6608674d225e5acafc3f0f66b07c0362f9da735263773259db8f77dfe7028f268dbe13ce67e6b10
+DIST senken-0.3.0.tar.gz 1391010 BLAKE2B ac55f61c6a1c86ca3a891190f562e91aaed56f19f08dffe2a17016dd8ef5e35a3e1c6188b402506d063c4ee812a43f63bfd45b58e102c4a1199a733ab336a8dc SHA512 df0c15cabf667fb7b56db40baf03fcae6695aa9ec0e42a7db682ff20877a5b89ee67e7799e762b4a78cf0f3fdee7f001419091f0683df74ba1bbe6b9501f0272
+EBUILD senken-0.3.0-r1.ebuild 1060 BLAKE2B 47b7a86ea77ce4ae749c949443251e5ae8351552a4c23623b5e0e453e7c192a25a8ebaf7d628aaf3246e10360343ba0d2b900ee6b6f439b1f318a73136c1740d SHA512 7e472b25ed6b5a45bf287dde998787117a2399b4092669ffef9954c5b401b37ce61d8c5734e9667ddeaf72b7e6f9df82e9bf6ee8226973189015cc9e41d042d8
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-simulation/senken/files/senken-0.3.0-as-needed.patch b/games-simulation/senken/files/senken-0.3.0-as-needed.patch
new file mode 100644
index 000000000000..428cbc9ee4c6
--- /dev/null
+++ b/games-simulation/senken/files/senken-0.3.0-as-needed.patch
@@ -0,0 +1,24 @@
+diff -ru senken-0.3.0.orig/server/Makefile.in senken-0.3.0/server/Makefile.in
+--- senken-0.3.0.orig/server/Makefile.in 2003-11-20 02:30:15.000000000 -0500
++++ senken-0.3.0/server/Makefile.in 2014-10-30 10:58:51.202157036 -0400
+@@ -10,7 +10,7 @@
+
+ DEFS = @DEFS@
+ CPPFLAGS = -I$(srcdir)/../lib -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@
+-LIBS = ../lib/libsenken.a @LIBS@ @LIBINTL@
++LIBS = ../lib/libsenken.a @LIBS@ @LIBINTL@ -lm
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+diff -ru senken-0.3.0.orig/src/Makefile.in senken-0.3.0/src/Makefile.in
+--- senken-0.3.0.orig/src/Makefile.in 2003-11-20 02:30:16.000000000 -0500
++++ senken-0.3.0/src/Makefile.in 2014-10-30 10:59:05.154704393 -0400
+@@ -8,7 +8,7 @@
+
+ DEFS = @DEFS@
+ CPPFLAGS = -I$(srcdir)/../lib -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @GTK_CFLAGS@
+-LIBS = ../lib/libsenken.a @LIBS@ @GTK_LIBS@
++LIBS = ../lib/libsenken.a @LIBS@ @GTK_LIBS@ -lm
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
diff --git a/games-simulation/senken/files/senken-0.3.0-warnings.patch b/games-simulation/senken/files/senken-0.3.0-warnings.patch
new file mode 100644
index 000000000000..b15565ad0a90
--- /dev/null
+++ b/games-simulation/senken/files/senken-0.3.0-warnings.patch
@@ -0,0 +1,31 @@
+diff -ru senken-0.3.0.orig/server/protocol.c senken-0.3.0/server/protocol.c
+--- senken-0.3.0.orig/server/protocol.c 2003-11-20 02:30:15.000000000 -0500
++++ senken-0.3.0/server/protocol.c 2014-10-30 11:04:39.831848871 -0400
+@@ -294,7 +294,7 @@
+ /*
+ * If transaction active just save this for later
+ */
+- if (connection_txn_active) {
++ if (connection_txn_active(conn)) {
+ set_op_t *op = calloc(1, sizeof(set_op_t));
+ int r;
+
+diff -ru senken-0.3.0.orig/src/gtkhelp_reports.c senken-0.3.0/src/gtkhelp_reports.c
+--- senken-0.3.0.orig/src/gtkhelp_reports.c 2003-11-20 02:30:16.000000000 -0500
++++ senken-0.3.0/src/gtkhelp_reports.c 2014-10-30 11:06:43.795828908 -0400
+@@ -1,3 +1,4 @@
++#include <string.h>
+ #include <gtk/gtk.h>
+ #include <gdk/gdk.h>
+
+diff -ru senken-0.3.0.orig/src/main.c senken-0.3.0/src/main.c
+--- senken-0.3.0.orig/src/main.c 2003-11-20 02:30:16.000000000 -0500
++++ senken-0.3.0/src/main.c 2014-10-30 11:06:28.147336339 -0400
+@@ -25,6 +25,7 @@
+ # include <config.h>
+ #endif
+
++#include <string.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <gtk/gtk.h>
diff --git a/games-simulation/senken/metadata.xml b/games-simulation/senken/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-simulation/senken/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 type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-simulation/senken/senken-0.3.0-r1.ebuild b/games-simulation/senken/senken-0.3.0-r1.ebuild
new file mode 100644
index 000000000000..9b4e0cb1e242
--- /dev/null
+++ b/games-simulation/senken/senken-0.3.0-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+DESCRIPTION="city simulation game"
+HOMEPAGE="https://savannah.nongnu.org/projects/senken/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+RDEPEND="
+ >=media-libs/libsdl-1.2.4
+ media-libs/sdl-image
+ x11-libs/gtk+:2
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-as-needed.patch
+ "${FILESDIR}"/${P}-warnings.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s:/usr/local/share:/usr/share:" \
+ lib/utils.h || die
+}
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_install() {
+ default
+
+ #dodir "${GAMES_DATADIR}"
+ #mv "${D}/${GAMES_PREFIX}/share/senken" "${D}/${GAMES_DATADIR}/" || die
+ #rm -rf "${D}/${GAMES_PREFIX}"/{include,lib,man,share} || die
+
+ insinto /usr/share/senken/img
+ doins img/*.png
+
+ find "${D}/usr/share/" -type f -exec chmod a-x \{\} +
+ find "${D}/usr/share/" -name "Makefile.*" -exec rm -f \{\} +
+}
diff --git a/games-simulation/simutrans-0.120.2.2 b/games-simulation/simutrans-0.120.2.2
deleted file mode 100644
index c089c694ca24..000000000000
--- a/games-simulation/simutrans-0.120.2.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare unpack
-DEPEND=sys-libs/zlib app-arch/bzip2 media-libs/sdl-mixer media-libs/libpng:0 media-libs/libsdl[sound,video] app-arch/unzip
-DESCRIPTION=A free Transport Tycoon clone
-EAPI=6
-HOMEPAGE=http://www.simutrans.com/
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=Artistic
-RDEPEND=sys-libs/zlib app-arch/bzip2 media-libs/sdl-mixer media-libs/libpng:0 media-libs/libsdl[sound,video]
-SLOT=0
-SRC_URI=mirror://sourceforge/simutrans/simutrans-src-120-2-2.zip http://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip mirror://sourceforge/simutrans/simupak64-120-2.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a1cdedb875dc084508f7825cf7b3bfdc
diff --git a/games-simulation/simutrans/Manifest b/games-simulation/simutrans/Manifest
new file mode 100644
index 000000000000..5b83f40f1580
--- /dev/null
+++ b/games-simulation/simutrans/Manifest
@@ -0,0 +1,6 @@
+AUX simutrans-0.120.2.2-Makefile.patch 2015 BLAKE2B 1a3aac151b1ead4355d4206064d1c773813789b0463b2cb90494ce759cfcd31b9ce7db5f8d52c055d9364bd7fec2e8096437e023e1e618f58a53b58666f98cdf SHA512 2d85d4a048a40c6a3581492f50f7d2364cfd36f6d0496fcf89406ed1d7ad091b218700b2e8d1f26e0bdd346b3f449e0c0d30ef4bffed30b351c1e424ce7a4439
+DIST language_pack-Base+texts.zip 1097263 BLAKE2B 08678f36a2425b84bf5f440a546af7ca6507ee17bdcfd3096335c20ce60c23a5375eb133f597806bed28db2d9ed067669e83a4df47443be0cb48bf151ba91ef2 SHA512 015caafaeace03bd5475e66c93bb433d9b07b600c3fcf125a4bda9b2856ba41dc43b923e032920df4a060087ead7180df59092f23ab6dcf12579b580827b1248
+DIST simupak64-120-2.zip 4453079 BLAKE2B 910f7937d5eabe8c97f9b9fb6b1d0a63ffe5c7a897a83d5649581f629c1e6d000442399f3e181c0a6e2b08a6f9948354df1848b84df6c2d37bd65d4c303d1626 SHA512 c7f819142b66c093c8631fcfe8e70c3be667680d745a66eab65e06979f849592d2c09ed18eb33ca2e359b2830f57874ae23d989ab5aa901eece69de83180f357
+DIST simutrans-src-120-2-2.zip 3900947 BLAKE2B 69e9f78883d1b611bc76bbff1dc46ab1a645580ec0114f342aeb5e243c643c0fa4d3684e8102a0196f95320b4f93a0a50a93bb61802e81236f286a2989ac646f SHA512 db9797be132bb1936d8c3192e536523d1249d20a513f3758037097ef46c2bab40d4be8adb68cb21eda2b4820369e89bd0a6e2abc4fe2bbcefe40bb414a3d1ab2
+EBUILD simutrans-0.120.2.2.ebuild 1498 BLAKE2B 9ac5acaa5c8a3181e2e92a8c8c3def5a564bff80de99f1f90e6389480e5e2a6955321259c4504b42b5a5b2f70e289b925e1bb97ded6c8db1967613dd384ec2f0 SHA512 20cbfabc2f86bab1d741d6ccaab13070587e9e668db536cd48bcc1fde86b9b6e43e92da7daa51a77d573abdc345ddb40925660d72a2ac466ae93fc10e4cf0fc7
+MISC metadata.xml 332 BLAKE2B cbfe0465e3d6ce4bdda79fcac0b10b477c384630855de37cb25500225eaaf628a2b8a5bfc95f73d90c5f4b8ed0d213fbb7f8a28ee7e5333c59048d5002cb5886 SHA512 c8e6f7d4963c82a5d993a6edc3d8dfc925ffc9df28fbbadf6d2fa91f5f34c9afb4fc8f821a8a7e2e99522ec9bf2d2bc0a7f620337d2097f13af77016846dad36
diff --git a/games-simulation/simutrans/files/simutrans-0.120.2.2-Makefile.patch b/games-simulation/simutrans/files/simutrans-0.120.2.2-Makefile.patch
new file mode 100644
index 000000000000..f9fb48ab682f
--- /dev/null
+++ b/games-simulation/simutrans/files/simutrans-0.120.2.2-Makefile.patch
@@ -0,0 +1,89 @@
+--- a/Makefile 2017-03-29 12:04:15.000000000 +0300
++++ b/Makefile 2017-06-08 01:41:32.605031258 +0300
+@@ -87,8 +87,6 @@
+ CFLAGS += -minline-all-stringops
+ endif
+ endif
+-else
+- CFLAGS += -O
+ endif
+
+ ifdef DEBUG
+@@ -110,6 +108,7 @@
+ endif
+ else
+ CFLAGS += -DNDEBUG
++ CXXFLAGS += -DNDEBUG
+ endif
+
+ ifdef MSG_LEVEL
+@@ -127,6 +126,7 @@
+ ifneq ($(MULTI_THREAD),)
+ ifeq ($(shell expr $(MULTI_THREAD) \>= 1), 1)
+ CFLAGS += -DMULTI_THREAD
++ CXXFLAGS += -DMULTI_THREAD
+ ifneq ($(OSTYPE),haiku)
+ LDFLAGS += -lpthread
+ endif
+@@ -142,11 +142,13 @@
+ endif
+ ifneq ($(REV),)
+ CFLAGS += -DREVISION="$(REV)"
++ CXXFLAGS += -DREVISION="$(REV)"
+ endif
+ endif
+ endif
+
+ CFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS)
++CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS)
+ CCFLAGS += -ansi -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+
+
+@@ -514,6 +516,7 @@
+ endif
+ endif
+ CFLAGS += $(SDL_CFLAGS)
++ CXXFLAGS += $(SDL_CFLAGS)
+ LIBS += $(SDL_LDFLAGS)
+ endif
+
+@@ -553,6 +556,7 @@
+ endif
+ endif
+ CFLAGS += $(SDL_CFLAGS)
++ CXXFLAGS += $(SDL_CFLAGS)
+ LIBS += $(SDL_LDFLAGS)
+ endif
+
+@@ -568,6 +572,7 @@
+ SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
+ endif
+ CFLAGS += $(SDL_CFLAGS)
++ CXXFLAGS += $(SDL_CFLAGS)
+ LIBS += $(SDL_LDFLAGS) -lSDL_mixer
+ endif
+
+@@ -594,6 +599,7 @@
+ SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
+ endif
+ CFLAGS += $(SDL_CFLAGS)
++ CXXFLAGS += $(SDL_CFLAGS)
+ LIBS += $(SDL_LDFLAGS) -lglew32
+ ifeq ($(OSTYPE),mingw)
+ LIBS += -lopengl32
+@@ -609,6 +615,7 @@
+ endif
+
+ CFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH)
++CXXFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH)
+
+ ifneq ($(findstring $(OSTYPE), cygwin mingw),)
+ SOURCES += simres.rc
+@@ -616,7 +623,6 @@
+ endif
+
+ CCFLAGS += $(CFLAGS)
+-CXXFLAGS += $(CFLAGS)
+
+ BUILDDIR ?= build/$(CFG)
+ PROGDIR ?= $(BUILDDIR)
diff --git a/games-simulation/simutrans/metadata.xml b/games-simulation/simutrans/metadata.xml
new file mode 100644
index 000000000000..9d88e43fb074
--- /dev/null
+++ b/games-simulation/simutrans/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">simutrans</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/simutrans/simutrans-0.120.2.2.ebuild b/games-simulation/simutrans/simutrans-0.120.2.2.ebuild
new file mode 100644
index 000000000000..f175a36b9e03
--- /dev/null
+++ b/games-simulation/simutrans/simutrans-0.120.2.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic eutils
+
+MY_PV=${PV/0./}
+MY_PV=${MY_PV//./-}
+SIMUPAK="simupak64-${MY_PV%-[0-9]*}.zip"
+
+DESCRIPTION="A free Transport Tycoon clone"
+HOMEPAGE="http://www.simutrans.com/"
+SRC_URI="mirror://sourceforge/simutrans/simutrans-src-${MY_PV}.zip
+ http://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip
+ mirror://sourceforge/simutrans/${SIMUPAK}"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ sys-libs/zlib
+ app-arch/bzip2
+ media-libs/sdl-mixer
+ media-libs/libpng:0
+ media-libs/libsdl[sound,video]"
+
+DEPEND="
+ ${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-Makefile.patch
+)
+
+src_unpack() {
+ unpack simutrans-src-${MY_PV}.zip
+ unpack "${SIMUPAK}"
+
+ # Bundled text files are incomplete, bug #580948
+ cd "${S}/simutrans/text" || die
+ unpack language_pack-Base+texts.zip
+}
+
+src_prepare() {
+ default
+
+ strip-flags # bug #293927
+ printf "BACKEND=mixer_sdl\nCOLOUR_DEPTH=16\nOSTYPE=linux\nVERBOSE=1" \
+ > config.default || die
+
+ # make it look in the install location for the data
+ sed -i \
+ -e "s:argv\[0\]:\"/usr/share/${PN}/\":" \
+ simmain.cc || die
+
+ rm simutrans/*.txt || die
+}
+
+src_install() {
+ newbin build/default/sim ${PN}
+ insinto /usr/share/${PN}
+ doins -r simutrans/*
+ dodoc documentation/*
+ doicon simutrans.ico
+ make_desktop_entry simutrans Simutrans /usr/share/pixmaps/simutrans.ico
+}
diff --git a/games-simulation/singularity-0.30c-r2 b/games-simulation/singularity-0.30c-r2
deleted file mode 100644
index 0828cab216a7..000000000000
--- a/games-simulation/singularity-0.30c-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install prepare setup
-DEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] app-arch/unzip
-DESCRIPTION=Simulation of a true AI. Go from computer to computer, chased by the whole world
-EAPI=6
-HOMEPAGE=http://www.emhsoft.com/singularity/
-IUSE=+music python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 CC-BY-SA-2.5
-RDEPEND=python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/numpy[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] dev-python/pygame[python_targets_python2_7(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),python_single_target_python2_7(+)] media-libs/sdl-mixer[vorbis]
-REQUIRED_USE=python_targets_python2_7
-SLOT=0
-SRC_URI=https://endgame-singularity.googlecode.com/files/singularity-0.30c-src.tar.gz music? ( https://endgame-singularity.googlecode.com/files/endgame-singularity-music-006.zip )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-single-r1 26fdbe5e685d53f67303a3a43d9e4848 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=121458a1beaaaae4072cd4e553b07334
diff --git a/games-simulation/singularity/Manifest b/games-simulation/singularity/Manifest
new file mode 100644
index 000000000000..c65c109f4353
--- /dev/null
+++ b/games-simulation/singularity/Manifest
@@ -0,0 +1,4 @@
+DIST endgame-singularity-music-006.zip 28250705 BLAKE2B 62f39536afe12d0928056cca05cccbc7542d79ce5a2acfb23dc99e66ea291eeadc2ae8e771cfed5a96ff69bdc217b69f44b8c5143a323fa5c06fe2d34ac6d425 SHA512 47e489112309cc742c2dcffec004aff25c54488fdf2a5f2dc67b7dcf67ca55996fe8e8403e4a16712fbc4e22289f12e612ad9d4322cd1d1aaab871f0ffb27e19
+DIST singularity-0.30c-src.tar.gz 2265133 BLAKE2B a3f7612ac173ef34183ea500d8bef8b1c823b54d0b0acb6a40bce058497d424f76df5fd51da8f1acfb636a556759cea2114529e0e60b453652d0b04a139b19a1 SHA512 ffca50c179b745561a25e3fb3525abb862d72f63f533f8a41472067d0ce94c8a236486c9c40a5040335d84e903c498805d591dc546a92d0a7651105103fe114f
+EBUILD singularity-0.30c-r2.ebuild 1221 BLAKE2B 308560485eaad449831520685a57dddceeea6ea08905ebfdfc3a101eac98e081646d9f7c86a117e59c21271d65338e9c13c31ce6df05c238cebf88a038291e43 SHA512 4ee050a90784b2241fd09a07c09c4ea755c53cf1558041e694cf89dc74080ca28686d075bbba0168f04db0b2432a4d29157566a00106ab6e0bd9ad4b39498442
+MISC metadata.xml 405 BLAKE2B 5ce059ade56e4080d77172d347c4f22a80c7d0762df1ddb9833fc92455b0bc22aca2263eb217b15ea82f76bfe268d9d1793b169774f2150888652d8aec83a745 SHA512 c32086dbbfce16439635063e3ed94a44a9bff47f5047cc9c078ed59bf4eac0e7e91b86037f4fd19c1e21fdcb4853e794535cc4d1a8ee898f8e292b26bbe7883f
diff --git a/games-simulation/singularity/metadata.xml b/games-simulation/singularity/metadata.xml
new file mode 100644
index 000000000000..3bc51b541a4a
--- /dev/null
+++ b/games-simulation/singularity/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 type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="music">Install music files</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">endgame-singularity</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-simulation/singularity/singularity-0.30c-r2.ebuild b/games-simulation/singularity/singularity-0.30c-r2.ebuild
new file mode 100644
index 000000000000..51ceaa93529d
--- /dev/null
+++ b/games-simulation/singularity/singularity-0.30c-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-single-r1
+
+MUSIC=endgame-${PN}-music-006
+DESCRIPTION="Simulation of a true AI. Go from computer to computer, chased by the whole world"
+HOMEPAGE="http://www.emhsoft.com/singularity/"
+SRC_URI="https://endgame-singularity.googlecode.com/files/${P}-src.tar.gz
+ music? ( https://endgame-singularity.googlecode.com/files/${MUSIC}.zip )"
+
+LICENSE="GPL-2 CC-BY-SA-2.5"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+music"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pygame[${PYTHON_USEDEP}]
+ media-libs/sdl-mixer[vorbis]"
+DEPEND="${DEPEND}
+ app-arch/unzip"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ rm -f code/{,*}/*.pyc data/*.html || die # Remove unecessary files
+}
+
+src_install() {
+ insinto /usr/share/${PN}
+ doins -r code data ${PN}.py || die
+ python_optimize ${ED%/}/usr/share/${PN}
+
+ if use music ; then
+ doins -r ../${MUSIC}/music || die
+ fi
+
+ make_wrapper ${PN} "${EPYTHON} ${PN}.py" /usr/share/${PN}
+ dodoc README.txt TODO Changelog AUTHORS
+}