summaryrefslogtreecommitdiff
path: root/games-sports
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-sports
reinit the tree, so we can have metadata
Diffstat (limited to 'games-sports')
-rw-r--r--games-sports/billardgl/Manifest7
-rw-r--r--games-sports/billardgl/billardgl-1.75-r1.ebuild54
-rw-r--r--games-sports/billardgl/billardgl-1.75-r2.ebuild55
-rw-r--r--games-sports/billardgl/metadata.xml11
-rw-r--r--games-sports/bygfoot/Manifest6
-rw-r--r--games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild45
-rw-r--r--games-sports/bygfoot/bygfoot-2.3.2.ebuild43
-rw-r--r--games-sports/bygfoot/metadata.xml11
-rw-r--r--games-sports/dustrac/Manifest7
-rw-r--r--games-sports/dustrac/dustrac-1.11.0-r1.ebuild68
-rw-r--r--games-sports/dustrac/dustrac-1.11.0.ebuild69
-rw-r--r--games-sports/dustrac/files/dustrac-1.11.0-cmake.patch23
-rw-r--r--games-sports/dustrac/metadata.xml18
-rw-r--r--games-sports/foobillard/Manifest9
-rw-r--r--games-sports/foobillard/files/foobillard-3.0a-as-needed.patch10
-rw-r--r--games-sports/foobillard/files/foobillard-3.0a-fbsd.patch29
-rw-r--r--games-sports/foobillard/files/foobillard-3.0a-gl-clamp.patch14
-rw-r--r--games-sports/foobillard/files/foobillard-3.0a-no_nvidia.patch18
-rw-r--r--games-sports/foobillard/foobillard-3.0a.ebuild53
-rw-r--r--games-sports/foobillard/metadata.xml11
-rw-r--r--games-sports/gracer/Manifest14
-rw-r--r--games-sports/gracer/files/0.1.5-gldefs.patch33
-rw-r--r--games-sports/gracer/files/gracer-0.1.5-as-needed.patch11
-rw-r--r--games-sports/gracer/files/gracer-0.1.5-gcc41.patch11
-rw-r--r--games-sports/gracer/files/gracer-0.1.5-giflib.patch14
-rw-r--r--games-sports/gracer/files/gracer-0.1.5-libpng14.patch13
-rw-r--r--games-sports/gracer/files/gracer-0.1.5-png15.patch11
-rw-r--r--games-sports/gracer/files/gracer-0.1.5-warnings.patch21
-rw-r--r--games-sports/gracer/files/gracer-gcc-3.4.patch120
-rw-r--r--games-sports/gracer/gracer-0.1.5-r1.ebuild49
-rw-r--r--games-sports/gracer/gracer-0.1.5.ebuild55
-rw-r--r--games-sports/gracer/metadata.xml11
-rw-r--r--games-sports/metadata.xml32
-rw-r--r--games-sports/miniracer/Manifest7
-rw-r--r--games-sports/miniracer/files/miniracer-1.04-ldflags.patch48
-rw-r--r--games-sports/miniracer/files/miniracer-1.04-nosharedelf.patch23
-rw-r--r--games-sports/miniracer/metadata.xml11
-rw-r--r--games-sports/miniracer/miniracer-1.04.ebuild41
-rw-r--r--games-sports/ski/Manifest8
-rw-r--r--games-sports/ski/metadata.xml8
-rw-r--r--games-sports/ski/ski-6.8.ebuild36
-rw-r--r--games-sports/ski/ski-6.9-r1.ebuild30
-rw-r--r--games-sports/ski/ski-6.9.ebuild36
-rw-r--r--games-sports/speed-dreams/Manifest10
-rw-r--r--games-sports/speed-dreams/files/speed-dreams-1.4.0-asneeded.patch110
-rw-r--r--games-sports/speed-dreams/files/speed-dreams-1.4.0-automake.patch35
-rw-r--r--games-sports/speed-dreams/files/speed-dreams-1.4.0-libpng15.patch20
-rw-r--r--games-sports/speed-dreams/files/speed-dreams-1.4.0-math-hack.patch25
-rw-r--r--games-sports/speed-dreams/metadata.xml14
-rw-r--r--games-sports/speed-dreams/speed-dreams-1.4.0-r1.ebuild85
-rw-r--r--games-sports/speed-dreams/speed-dreams-1.4.0.ebuild84
-rw-r--r--games-sports/stormbaancoureur/Manifest7
-rw-r--r--games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-gentoo.patch110
-rw-r--r--games-sports/stormbaancoureur/metadata.xml8
-rw-r--r--games-sports/stormbaancoureur/stormbaancoureur-2.1.6-r1.ebuild43
-rw-r--r--games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild38
-rw-r--r--games-sports/torcs/Manifest12
-rw-r--r--games-sports/torcs/files/torcs-1.3.6-as-needed.patch96
-rw-r--r--games-sports/torcs/files/torcs-1.3.6-flags.patch14
-rw-r--r--games-sports/torcs/files/torcs-1.3.6-format.patch34
-rw-r--r--games-sports/torcs/files/torcs-1.3.6-gcc6.patch11
-rw-r--r--games-sports/torcs/files/torcs-1.3.6-no-automake.patch21
-rw-r--r--games-sports/torcs/files/torcs-1.3.6-noXmuXt.patch15
-rw-r--r--games-sports/torcs/metadata.xml11
-rw-r--r--games-sports/torcs/torcs-1.3.6-r1.ebuild67
-rw-r--r--games-sports/torcs/torcs-1.3.6.ebuild64
-rw-r--r--games-sports/trigger/Manifest6
-rw-r--r--games-sports/trigger/files/trigger-0.6.1-gcc6.patch39
-rw-r--r--games-sports/trigger/metadata.xml11
-rw-r--r--games-sports/trigger/trigger-0.6.1-r1.ebuild61
-rw-r--r--games-sports/trophy/Manifest6
-rw-r--r--games-sports/trophy/metadata.xml11
-rw-r--r--games-sports/trophy/trophy-2.0.3-r1.ebuild30
-rw-r--r--games-sports/trophy/trophy-2.0.3.ebuild41
-rw-r--r--games-sports/ultimatestunts/Manifest8
-rw-r--r--games-sports/ultimatestunts/files/ultimatestunts-0.7.7-gcc-4.7.patch16
-rw-r--r--games-sports/ultimatestunts/files/ultimatestunts-0.7.7-paths.patch19
-rw-r--r--games-sports/ultimatestunts/metadata.xml11
-rw-r--r--games-sports/ultimatestunts/ultimatestunts-0.7.7-r1.ebuild59
-rw-r--r--games-sports/ultimatestunts/ultimatestunts-0.7.7.ebuild53
-rw-r--r--games-sports/vdrift/Manifest8
-rw-r--r--games-sports/vdrift/files/vdrift-20120722-build.patch28
-rw-r--r--games-sports/vdrift/files/vdrift-20120722-bullet.patch100
-rw-r--r--games-sports/vdrift/metadata.xml11
-rw-r--r--games-sports/vdrift/vdrift-20120722.ebuild70
-rw-r--r--games-sports/xmoto/Manifest8
-rw-r--r--games-sports/xmoto/metadata.xml11
-rw-r--r--games-sports/xmoto/xmoto-0.5.11-r1.ebuild96
-rw-r--r--games-sports/xmoto/xmoto-0.5.11.ebuild96
89 files changed, 2937 insertions, 0 deletions
diff --git a/games-sports/billardgl/Manifest b/games-sports/billardgl/Manifest
new file mode 100644
index 000000000000..bf2868e29d99
--- /dev/null
+++ b/games-sports/billardgl/Manifest
@@ -0,0 +1,7 @@
+DIST BillardGL-1.75.tar.gz 736295 SHA256 9b865b1254aa30125480ec7ea2ce00d91524db066a524b78492545782856df96 SHA512 a81d50aa44f97f06fcafd32c3436709c302f86d37f915b2d63acd9c5d48eef22259858064ff56366c7c1cdff40e4a16ad84abe1b91a0daa408cb05ba728d1e88 WHIRLPOOL bb1a48bdcee58b76f959ae98068e0a215dab573ab1fe243d0e2ab4e76ce1a28430ab14d1d3d537982abd95cdeaa36bddae798d90a1504f226260454deb24bdd2
+DIST billardgl.png 3212 SHA256 a79b27cffca343ddb8f57cd6880acc6c60daf82959919868932a296f57be286e SHA512 d9606d8c6e6f9e2ce820a135aa32a8d3604b619a6ce6626fe742424074e48e71703919c5a1923d1ee6b38670ee70c757c328123d3f3c7f595a3c2fc704bd6f74 WHIRLPOOL 40baf57c751225571ee712912cdaac081a46554485cd8d89b83fd1612405ac65f3887cc9d9526c763a3fb1cceec7837668ac6c2e4dc33ea16b71f6b106035203
+EBUILD billardgl-1.75-r1.ebuild 1191 SHA256 fa6d8a461d000e2a29a50a34bd831f4134a9afa7e9ee79b5d8779c0e7cf2dedb SHA512 ce9319749bbef536056acc41541346e203222f3fae62471a09cacd3b66044f043a458d6b60dee627350ed7eae8d944ab97b84fee6516ce3ac72e9c1dc2496606 WHIRLPOOL ec291362df45a8f4206d10160f381ecca7bb148fd43824b31b296c6c985946fef6afe03835629c93d42ed0b16ee6334ea977aa77ecfc47c1c400a121132a0c0d
+EBUILD billardgl-1.75-r2.ebuild 1164 SHA256 3bcb19b5d795244fea443ba11ab16832b9048cf6dc2af8d110d7ccd47d2c6ba6 SHA512 63437aad99cda7b7f1b7d3e0f43afdc908f5627ffefa9494714ed36ad39f16fe9c2ca297a92cfb0fcda75de9d24eef82c685dff7365517657bf70c6054249738 WHIRLPOOL 83637f83849158c026bf8f7ea463a7838cd1744b36b074adda584e4ee399b833eae32e50765bc9777d41bc3c8b7fad7acfddab76eccdebfc8c2451a2d6d3d0a8
+MISC ChangeLog 2697 SHA256 b712a0e11144ade6210e461af09ce3c59bda80bbd54650e0d2e57b136b60b34f SHA512 33cc85922bdfaf3a9e7c6316715ee666a661d520832253799e37aa5559577666d7fff98541ad88640a005f49d160f8a8e0b779fc550d6338dc27497c60acf30d WHIRLPOOL 5cb3b55346cfdaa2607cc9e97a6cf0c87bdd90eea2d26b21e731cbc62b53634417212b42eaf1f7eb7e8f438dc3a55d29dfdf08220e93382cb4a37075e9b6c1a2
+MISC ChangeLog-2015 2763 SHA256 009293e71f8093ee11bb0887f613d08cada152b7df34f3749dc453cdb48bd901 SHA512 c28f6a0dc7adce9856bbef0fdb45dbd46b5659f11ea72c3f80cd6144679478b2e60b437485a36d5ed404dae9d4c16df50dd625fe8fb126b2002db49c913bd33d WHIRLPOOL c7698d93bebc72c0a150e33e2735cad5f46111893f7e722f76178c33734272d733cb2f9b2fb9ab39794c880057273daef3a9c7d89d8a4b06785d8131bd2a4592
+MISC metadata.xml 332 SHA256 5c2a0ecc20891f48f13e07207ad6ecbdbb11a0674050aebe00cc664b4ecbfa7e SHA512 332e3ee7d7aef28c4cc13d9e0504c1f93f97b50f7a6e8fd1ba93ff0ecdd4cfe07bf2acca4a5599418af61bfeda824fdfb641715ceeb7aa5aa48ee991263cc921 WHIRLPOOL 2cf8e74ba3e990e4163630e9f2de49687a342750db48cdb6e4916f0be356e628fe4afb606847330738dc8d01e6a177121eb9a39b4dafe9fd522dd2cbff8be759
diff --git a/games-sports/billardgl/billardgl-1.75-r1.ebuild b/games-sports/billardgl/billardgl-1.75-r1.ebuild
new file mode 100644
index 000000000000..97221d90724d
--- /dev/null
+++ b/games-sports/billardgl/billardgl-1.75-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="an OpenGL billards game"
+HOMEPAGE="http://www.billardgl.de/"
+SRC_URI="mirror://sourceforge/${PN}/BillardGL-${PV}.tar.gz
+ mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="x11-libs/libXi
+ x11-libs/libXmu
+ virtual/opengl
+ virtual/glu
+ media-libs/freeglut"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/BillardGL-${PV}/src
+
+src_prepare() {
+ sed -i \
+ -e "s:/usr/share/BillardGL/:${GAMES_DATADIR}/${PN}/:" \
+ Namen.h \
+ || die "sed Namen.h failed"
+ sed -i \
+ -e '/^LINK/s:g++:$(CXX):' \
+ -e '/^CXX[[:space:]]/d' \
+ -e '/^CC[[:space:]]/d' \
+ -e '/^CXXFLAGS/s:=.*\(-D.*\)-.*:+=\1:' \
+ -e "/^LFLAGS/s:=:=${LDFLAGS}:" \
+ Makefile \
+ || die "sed Makefile failed"
+ sed -i \
+ -e 's:<iostream.h>:<iostream>:' \
+ -e 's:<fstream.h>:<fstream>\nusing namespace std;:' \
+ bmp.cpp \
+ || die "sed bmp.cpp failed"
+}
+
+src_install() {
+ newgamesbin BillardGL ${PN}
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r lang Texturen
+ dodoc README
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN} BillardGL
+ prepgamesdirs
+}
diff --git a/games-sports/billardgl/billardgl-1.75-r2.ebuild b/games-sports/billardgl/billardgl-1.75-r2.ebuild
new file mode 100644
index 000000000000..e71f5aa777d3
--- /dev/null
+++ b/games-sports/billardgl/billardgl-1.75-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+DESCRIPTION="an OpenGL billards game"
+HOMEPAGE="http://www.billardgl.de/"
+SRC_URI="mirror://sourceforge/${PN}/BillardGL-${PV}.tar.gz
+ mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ media-libs/freeglut
+ x11-libs/libXi
+ x11-libs/libXmu
+ virtual/opengl
+ virtual/glu"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/BillardGL-${PV}/src
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s:/usr/share/BillardGL/:/usr/share/${PN}/:" \
+ Namen.h \
+ || die "sed Namen.h failed"
+ sed -i \
+ -e '/^LINK/s:g++:$(CXX):' \
+ -e '/^CXX[[:space:]]/d' \
+ -e '/^CC[[:space:]]/d' \
+ -e '/^CXXFLAGS/s:=.*\(-D.*\)-.*:+=\1:' \
+ -e "/^LFLAGS/s:=:=${LDFLAGS}:" \
+ Makefile \
+ || die "sed Makefile failed"
+ sed -i \
+ -e 's:<iostream.h>:<iostream>:' \
+ -e 's:<fstream.h>:<fstream>\nusing namespace std;:' \
+ bmp.cpp \
+ || die "sed bmp.cpp failed"
+}
+
+src_install() {
+ newbin BillardGL ${PN}
+ insinto /usr/share/${PN}
+ doins -r lang Texturen
+ dodoc README
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN} BillardGL
+}
diff --git a/games-sports/billardgl/metadata.xml b/games-sports/billardgl/metadata.xml
new file mode 100644
index 000000000000..d755f0671516
--- /dev/null
+++ b/games-sports/billardgl/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">billardgl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/bygfoot/Manifest b/games-sports/bygfoot/Manifest
new file mode 100644
index 000000000000..71cbd613dd9e
--- /dev/null
+++ b/games-sports/bygfoot/Manifest
@@ -0,0 +1,6 @@
+DIST bygfoot-2.3.2.tar.bz2 1585550 SHA256 2e7f300ff33d45406cae3fa9e846fd5abcccbef500787a690ec8eccd020a224d SHA512 ce93333f50de6696538a494794d469d6768b93332f8cca1c96725259d23a78f64b94fcfff1e6227ddce52e75ae2d1e55ed78f2e94603bf1c06c6fc808f0b9626 WHIRLPOOL 33132c3410924e2edf29c85a465dcedff6f63fe9283f02cfe198e351710330e46d4ac4d0b7cfcbca74952bb4c5c19c0a85c8c6d712363df1080b7015e9f902f8
+EBUILD bygfoot-2.3.2-r1.ebuild 949 SHA256 8bbd97fb623712b127a9aa41f0311eda6c7f58b3282641ff2d3f809244dc1245 SHA512 a3a8ec2b6fc61b9e67bbd3a395bcfb18664d9f40c2ac9c9d311312b66ca72ff176b77f4cba4518c2eb95032478e8fe4dfe88cabc28806325f815243a863fe215 WHIRLPOOL ff7e5e4cd554946fd35d42975994b7a7f333e3a7a9dc30d7bbc65b3c8baf818d878e662fca9c031a9217b5c82e1d5eb764dcdb303e96268e21ef28160e6a9977
+EBUILD bygfoot-2.3.2.ebuild 961 SHA256 0b435df5fbcfb09ea27cc756cc12190de0f82f9616885ca93161ac2fbd54802b SHA512 e276f04b9bad8cdeabc6538f00ddd9c1352fe869d543e3e5258e979e0018e3797e3127b240aabc3244a3c5f1f722b8b6aa4a9b44bc39e4bfd725af2ef2997576 WHIRLPOOL 9138b94eef750fd610fb915c9b8eb656d0d9aafd995f10fb97fcf9a8efce09f5260376e5c5be15a5c62c2ba391eadad75db4c7fc9d602d18d3cd2bc1c05fec6b
+MISC ChangeLog 2685 SHA256 750090008b317dea4210b9b78f509e6c637cd12128bdbf927855f2044dbd3b92 SHA512 3f27fbe38ff4599b3be7f5a755f013a2b8cb6e8cbae5dac8a5dceea693e760f9745663e110c93b7c511a1ea4b7a384132393fb0b5c5432e94fded315ab7c0b07 WHIRLPOOL 4774b55c570cee8febdb4c5d5172f1f6782ea02c869e10b44e73b109ad087c8c7c02be0698242b92c761ed885d9a1857ccf783510582636556aecb097ed57cbb
+MISC ChangeLog-2015 4140 SHA256 cad9b2f1c33f2843497a83e9c59cb75491812efb662c1e42a307268495695d6c SHA512 ddee33ed892a6a9fe0dad973328be97d06a658446c2936fd9131b7a64896e5d222621e29ce804093e2565e4253f14c5eb64c8d7abed3c6119d0a742001c46677 WHIRLPOOL 0c56a7d9a5311e180ab1b53353c0be2067c4836deb4659b4c81180c398af9c8820c5a112c848cbe821d834ea905b97f1422188bad56042fc78fa3ff11cba25fe
+MISC metadata.xml 330 SHA256 8c4a3024c60a6b9f5c436c29c24f33a07c4d33500dc30f7ad9a01b3982bb9ae4 SHA512 ab2de414d15e699ff5c054e0684847b55bc8a30915652b69b02a7b38f2da2cc960b5b92ca8da199a2fdb3187e5d47d0472be5c85012bf76925b79bc01e20575d WHIRLPOOL a25f926932977874a9f37a9fd3a0c1ad712d3144b58fb8c7c5dd1a67f10736e843b30e9c7d255d4500d5fd4fca123ca2f1466348fc5737ae7065d68b7be5ab48
diff --git a/games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild b/games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild
new file mode 100644
index 000000000000..ea344fe4a073
--- /dev/null
+++ b/games-sports/bygfoot/bygfoot-2.3.2-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
+
+DESCRIPTION="GTK+2 Soccer Management Game"
+HOMEPAGE="http://bygfoot.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ app-arch/zip
+ media-libs/freetype:2
+ x11-libs/gtk+:2
+ virtual/libintl"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's:$(gnulocaledir):/usr/share/locale:' \
+ -e '/PACKAGE_LOCALE_DIR/s:\$(prefix)/\$(DATADIRNAME):/usr/share:' \
+ -e '/bygfoot_LDADD/s/$/ -lm/' \
+ po/Makefile.in.in src/Makefile.in || die
+}
+
+src_configure() {
+ econf --disable-gstreamer
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ esvn_clean "${D}"
+ dodoc AUTHORS ChangeLog README TODO UPDATE
+ newicon support_files/pixmaps/bygfoot_icon.png ${PN}.png
+ make_desktop_entry ${PN} Bygfoot
+}
diff --git a/games-sports/bygfoot/bygfoot-2.3.2.ebuild b/games-sports/bygfoot/bygfoot-2.3.2.ebuild
new file mode 100644
index 000000000000..8ab954920967
--- /dev/null
+++ b/games-sports/bygfoot/bygfoot-2.3.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="GTK+2 Soccer Management Game"
+HOMEPAGE="http://bygfoot.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ media-libs/freetype:2
+ app-arch/zip
+ virtual/libintl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+src_prepare() {
+ sed -i \
+ -e 's:$(gnulocaledir):/usr/share/locale:' \
+ -e '/PACKAGE_LOCALE_DIR/s:\$(prefix)/\$(DATADIRNAME):/usr/share:' \
+ -e '/bygfoot_LDADD/s/$/ -lm/' \
+ po/Makefile.in.in src/Makefile.in || die
+}
+
+src_configure() {
+ egamesconf --disable-gstreamer
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ esvn_clean "${D}"
+ dodoc AUTHORS ChangeLog README TODO UPDATE
+ newicon support_files/pixmaps/bygfoot_icon.png ${PN}.png
+ make_desktop_entry ${PN} Bygfoot
+ prepgamesdirs
+}
diff --git a/games-sports/bygfoot/metadata.xml b/games-sports/bygfoot/metadata.xml
new file mode 100644
index 000000000000..bd5aa766b504
--- /dev/null
+++ b/games-sports/bygfoot/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">bygfoot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/dustrac/Manifest b/games-sports/dustrac/Manifest
new file mode 100644
index 000000000000..f373403b29d4
--- /dev/null
+++ b/games-sports/dustrac/Manifest
@@ -0,0 +1,7 @@
+AUX dustrac-1.11.0-cmake.patch 1194 SHA256 60e7ae2f85864d10f10969b29ed8704475e9118a5f7321cba9cdf5225df311a6 SHA512 e614de1c2e0fdd8880876831ec39d525c5cd8c9bcc7bb90b95313aa8c394abd1120c139bb3a73691aa168d5e4ac537511227660b5e6b28515aa3a52e36377aba WHIRLPOOL 45df30f8dff71ece8b756c062d30c9d880a27118b9b076d653b9ed262e4dec7231828818d37baa94e72e0501d65fc3149d016784458195549eb5414be13590c1
+DIST dustrac-1.11.0.tar.gz 27505282 SHA256 3f1cca3d431152eb2e7702c772f744a216a47c4e0f44fa193aa62ba227e15e43 SHA512 af67b76a815543d41cf8e5681ede11bfd63a2d6be7e4a21986d495d77b2673f5a145bb1c9cd5237d2caf64a4e77f221ae48b97a38a883dcd4e5bb0ef8c55f839 WHIRLPOOL fb9dea84a5d2b771124d5ac933646fbc228078916a29cffd9330f39cb31a825379d5a40000a96909e270c739ceea5725b8798969eff3193142897e1ba659526a
+EBUILD dustrac-1.11.0-r1.ebuild 1406 SHA256 a60eba1539726f68045f2819bd6ca2c8d6dcc585298cfb7ede39ca4f1bb06bc8 SHA512 4540337bd03354350b50199ebc4a784f328f1e7dc749f722c886b017fbfeffda0b6a2adc45df23f0a293ee2e657d9098b77464c03dea0cad1f1522241fba99d6 WHIRLPOOL c3e6e7aab296f94c9894e45b15eb8eaaf74f36e3f0817b03ec10aeefeb7cf2be9760fe7b662e338787f6028ea2a16585a1eb4f213e634f412f0623f5df4cfe73
+EBUILD dustrac-1.11.0.ebuild 1462 SHA256 1dcde7a0f2cbbb47a7242b22d03ff110a46b8e5f76fd33d8c361d7eb5a46e4d9 SHA512 059df0a337c0a3d526edf71c833f2635d6aabadfab56ca8abbeb1e5fe10605d2730e38f1a5dd806c74382a52035827da8bb73f858250e8caa090c416d26e3889 WHIRLPOOL 59901ee04ce8c791a0593a03b8db690cd0b029aaf71547395f48ba4a8906dbb6de014659d477b30b33a075ae8b13660a6fcddfe5772d2e9606db9d4b7fce94c3
+MISC ChangeLog 3077 SHA256 f6f76ca56a3688ae9e744914d34722f25ca8f778b46529fcea2a13556e87cd91 SHA512 bb62ffa0ed5c6ad97b0099893e28852230fb27305f584cd14ba243b7ee9950b5f677d8fe07ff9010fc1d713f9c20658245ea82aa0759d4cfce844d6bb7bd72ed WHIRLPOOL 61d624eaab7575404be33a9b15804acbecb894cc1c6c262369709c543a582d519b0bcaf43b97aeda3ced48a6f65e295cf03c6126235f7c25ea8ddae2fc66bf6a
+MISC ChangeLog-2015 2294 SHA256 2369587351f71e8a75757752a687092c4ec060bcba8990da6b7933ed31337ce7 SHA512 bafe26dc6c8b66e3e58dac3e79dbbd19cbec388105c36c29032789f29e76403a1d1a78b1edbbb63b6f56ac8741f2e511328102fe2a909f062899fc822c4145ad WHIRLPOOL ad790a7b29daafadf0006e0f84466065ad71124046f0041e596c49ab5c806718a7da6854a9b5e247d2b1813026ae29b539e7a2343b04f3d5008d947803c4bdaf
+MISC metadata.xml 682 SHA256 db3c41e487f561101c68df784d80cb305579afe65dedbd6bb86f9f0a51fd8331 SHA512 355e91033f2e318fbb9163cd6e2eca8babe47ce495aca9c9e0b533284e38cbe51331b194d9a905ee6b056bcdf7ba38bcb6d1b968b8ba801832253f216d41b7de WHIRLPOOL acc5d2eb272c48ee8d69d9878acd0935aaf8c2727362be7a96b940c6c20f8b42f592d5464514769c68005e99ffee2de30c5edb4ebe22bd3bf228a72a7c424211
diff --git a/games-sports/dustrac/dustrac-1.11.0-r1.ebuild b/games-sports/dustrac/dustrac-1.11.0-r1.ebuild
new file mode 100644
index 000000000000..550cbced1e66
--- /dev/null
+++ b/games-sports/dustrac/dustrac-1.11.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils gnome2-utils cmake-utils
+
+DESCRIPTION="Tile-based, cross-platform 2D racing game"
+HOMEPAGE="http://dustrac.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dustrac/${P}.tar.gz"
+
+LICENSE="GPL-3+ CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtxml:5
+ media-libs/libvorbis
+ media-libs/openal
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+ dev-qt/qttest:5
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cmake.patch
+)
+
+src_configure() {
+ # -DGLES=ON didn't build for me but maybe just need use flags on some QT package?
+ # Maybe add a local gles use flag
+ local mycmakeargs=(
+ -DReleaseBuild=ON
+ -DDATA_PATH="/usr/share/${PN}"
+ -DBIN_PATH="/usr/bin"
+ -DDOC_PATH=/usr/share/doc/${PF}
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # FIXME: where should these come from?
+ dosym /usr/share/fonts/ubuntu-font-family/UbuntuMono-B.ttf "/usr/share/${PN}/fonts/UbuntuMono-B.ttf"
+ dosym /usr/share/fonts/ubuntu-font-family/UbuntuMono-R.ttf "/usr/share/${PN}/fonts/UbuntuMono-R.ttf"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-sports/dustrac/dustrac-1.11.0.ebuild b/games-sports/dustrac/dustrac-1.11.0.ebuild
new file mode 100644
index 000000000000..e8d008cc7d05
--- /dev/null
+++ b/games-sports/dustrac/dustrac-1.11.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils gnome2-utils cmake-utils games
+
+DESCRIPTION="Tile-based, cross-platform 2D racing game"
+HOMEPAGE="http://dustrac.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dustrac/${P}.tar.gz"
+
+LICENSE="GPL-3+ CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtxml:5
+ media-libs/libvorbis
+ media-libs/openal
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+ dev-qt/qttest:5
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cmake.patch
+}
+
+src_configure() {
+ # -DGLES=ON didn't build for me but maybe just need use flags on some QT package?
+ # Maybe add a local gles use flag
+ local mycmakeargs=(
+ -DReleaseBuild=ON
+ -DDATA_PATH="${GAMES_DATADIR}/${PN}"
+ -DBIN_PATH="${GAMES_BINDIR}"
+ -DDOC_PATH=/usr/share/doc/${PF}
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ dosym /usr/share/fonts/ubuntu-font-family/UbuntuMono-B.ttf "${GAMES_DATADIR}/${PN}/fonts/UbuntuMono-B.ttf"
+ dosym /usr/share/fonts/ubuntu-font-family/UbuntuMono-R.ttf "${GAMES_DATADIR}/${PN}/fonts/UbuntuMono-R.ttf"
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-sports/dustrac/files/dustrac-1.11.0-cmake.patch b/games-sports/dustrac/files/dustrac-1.11.0-cmake.patch
new file mode 100644
index 000000000000..6f497e4969ef
--- /dev/null
+++ b/games-sports/dustrac/files/dustrac-1.11.0-cmake.patch
@@ -0,0 +1,23 @@
+--- dustrac-1.11.0.orig/CMakeLists.txt
++++ dustrac-1.11.0/CMakeLists.txt
+@@ -68,8 +68,7 @@
+ endif()
+
+ if(CMAKE_COMPILER_IS_GNUCXX OR MINGW OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+- add_compile_options(-std=c++11 -W -Wall -O3 -pedantic)
+- add_compile_options(-fomit-frame-pointer -finline-functions -ffast-math)
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -W -Wall -fomit-frame-pointer -finline-functions")
+ elseif(MSVC)
+ add_definitions(-DNOMINMAX)
+ endif()
+--- dustrac-1.11.0.orig/InstallLinux.cmake
++++ dustrac-1.11.0/InstallLinux.cmake
+@@ -58,7 +58,7 @@
+ install(FILES data/fonts.conf DESTINATION ${DATA_PATH})
+ install(FILES data/meshes.conf DESTINATION ${DATA_PATH})
+ install(FILES data/surfaces.conf DESTINATION ${DATA_PATH})
+- install(FILES AUTHORS CHANGELOG COPYING README DESTINATION ${DOC_PATH})
++ install(FILES AUTHORS CHANGELOG README DESTINATION ${DOC_PATH})
+ install(DIRECTORY data/images DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.jpg")
+ install(DIRECTORY data/images DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.png")
+ install(DIRECTORY data/levels DESTINATION ${DATA_PATH} FILES_MATCHING PATTERN "*.trk")
diff --git a/games-sports/dustrac/metadata.xml b/games-sports/dustrac/metadata.xml
new file mode 100644
index 000000000000..065d1cf194d5
--- /dev/null
+++ b/games-sports/dustrac/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Dust Racing (Dustrac) is a tile-based, cross-platform 2D racing
+ game written in Qt (C++) and OpenGL. Dust Racing comes with a
+ Qt-based level editor for easy level creation. A custom engine,
+ MiniCore, is used for physics modeling. Dust Racing 2D is
+ inspired by Super Cars and Slicks’n Slide.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">dustrac</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/foobillard/Manifest b/games-sports/foobillard/Manifest
new file mode 100644
index 000000000000..b861be05db9f
--- /dev/null
+++ b/games-sports/foobillard/Manifest
@@ -0,0 +1,9 @@
+AUX foobillard-3.0a-as-needed.patch 799 SHA256 185041c56dc00ac0ea553fe68833dc6524282a647baceab3db2eb98e2c833b27 SHA512 91f003cbc8c6f3ce61b4eff79a7d70200374f17aa8a0c45a8f5fecdd56a4f7b58170ca28c92bf729625dcf819c413fe854f0550eef516339d5c712b4bf5bbe3c WHIRLPOOL 46f8546d6d885d3827a0eb0c80e637fe2ca73162d9a13a70addcc71a28524f887ab1423eb7bae6b28dbde8359c25ac7cde96692d965a9c53cfa5abb97480c86e
+AUX foobillard-3.0a-fbsd.patch 930 SHA256 c08aa1e217408fee5729e3e4cc407bf183f5232096ffe0092a3949e9ea6bcffa SHA512 c0fb2ace1c5e89be8642b0ece28eacf1ace516c59c52f6bd4dfc68701528f71f1830facc9889a50444eb4c799bd57dcbcc6345932c35070aee037453f36b0943 WHIRLPOOL 4ebd762f3d15b367d4d916a7e7116c19f6de2b076682c8d7137afe085d4c0fbd8962e7102e72925a29493391c1140ca98464f7641c02cb1712b0ebf1e7424ef7
+AUX foobillard-3.0a-gl-clamp.patch 841 SHA256 a34d83cee0dc0896942353fb8b2ded11226b02b4338d4d82d7181d98e990f9a1 SHA512 3be3c896f9e789d35236b630e7a587d53112abbfc70e0b5cb32bad1f2b5f0692ed804e14ed7d1f84db89cdb8c34eaccc09801fd5a450efee9d741eb59bd3a3e1 WHIRLPOOL 9366716a4c1c8ef98e6d335bbaabe6c14b4bdc53e644c2455423a9758a85a32826adc28bc958aa9dac8cb05ba143a730879cc56a56ca1ce65c00e38da42ae8af
+AUX foobillard-3.0a-no_nvidia.patch 770 SHA256 d94d36c24b8a7d8629bf028a8fba28ed5cf542c5ec2ccdcbf782373b7b9a928b SHA512 77530c4080cbf56c34d4bed20b2b95fd0aaac25e6e640f09aec83ef3eafbbac828c3b801159537b0980aeec1edc4f53d94de431eb4c053f76d5c5c4eb3296f69 WHIRLPOOL db5e1a564efaf3b8f557ea319d0b0fb66642bda9b5fdcd9b5f246f8c8040dd46868949052dd2aeb844d58baf7df5c27313ba372dc0fa0e27ba270989c06c0f58
+DIST foobillard-3.0a.tar.gz 1138477 SHA256 d05807077bdba32c4ca1d369344ac983675dc859cb7b192fca4196f23b89b137 SHA512 6ff85255384a83cb147a9682beefa021658ba34ad00ed7879bf7887fff248d41aeb34d2dbe39148ee10bffc53091ea5f168b4afeddac9b50d577bad7799d59b2 WHIRLPOOL 97e4ce788721c5327d7b1e7f42cb507c61af6b8e0e00208a728b107d8eb3bd89216810a607fab1e950c7045c9774d0aa4ce3ef95b31def953de0ce615bf590aa
+EBUILD foobillard-3.0a.ebuild 1215 SHA256 337fd5f61b7fe1b028269d389175f12d251a54c37b0bf764b6b9d98a009f8734 SHA512 15364983ff114038ac707e295562ed57eea705400cd8775791a780598d41aa1dd30a74a694923daa73992ac093549a046232d242433ac2d32f4909d768587c0e WHIRLPOOL c35e1be23f59d4715296a4ad296d68982f5a15be6ab0b72310f35e820f9afebe283840916f1438e3a1be1d17d5c7b53ffd246a2f43e57943dbd4bd961555e484
+MISC ChangeLog 3317 SHA256 4df09c59d3a33b45cfb1e11034bea0efa0fdcc50449099bde2e244c6770a569d SHA512 83e73688e23179a8e08bcbca22f05c7b81d52284a5e6dc2ed247f202501e9363f2ebe045ec8a6494763b03f28ccd21564d140eac31153237e4a4039a27d16a68 WHIRLPOOL 90ecbe37722cf58645a54b03b80fc5eb2c8404e30d3445b719ce0839da278a0d98440f00110893b290a96e49fa84457a7b6b0a755016ed6bb8cfc310b8a80f49
+MISC ChangeLog-2015 3758 SHA256 d82f528c8326864f24dd8e9d75d8ff1e18e26fae33f55a9cf755b7e2c52f4a30 SHA512 59483793837cc39cd229405e6feecfbaab429b82fbdbd7512b8b1fbe80bfda9e15255bd84e5a9761c6578254119aa512426e4c9dfcbb1639d46c0b47e92f0b00 WHIRLPOOL ada60c8a78a449aa46829942a4ad418487b48cf73d2b57118a0721d7c673344eec1d5c4818c456c74e7dd2747f06383888f6008ec4ce2f01f4c23cc0a24035f8
+MISC metadata.xml 333 SHA256 3e77939931904556e5faf406cb0b6fcb2d57bfeeec945dcb75ecddfba4694572 SHA512 0dd5f539d8dbd30c937ca6a8b67ad9c2d2b62627a0629dffb04b95673635f44f54b99773b0f938ba24b3aec19aa858c5458e9abb121230d9fa7e3652318a9689 WHIRLPOOL a63648aa1b8e8f1a76778234f5440beae2dcee4a635267bf0756c80c92b95fcdc146dce2356d0355c0ba44971989bc0e1c49829c720cf500dd17c9be0d980896
diff --git a/games-sports/foobillard/files/foobillard-3.0a-as-needed.patch b/games-sports/foobillard/files/foobillard-3.0a-as-needed.patch
new file mode 100644
index 000000000000..1d9ddbd8b729
--- /dev/null
+++ b/games-sports/foobillard/files/foobillard-3.0a-as-needed.patch
@@ -0,0 +1,10 @@
+--- foobillard-3.0a.old/src/Makefile.am 2004-02-25 07:23:56.000000000 +0100
++++ foobillard-3.0a/src/Makefile.am 2008-12-06 21:57:03.000000000 +0100
+@@ -83,6 +83,5 @@ AM_CFLAGS = -Wall `freetype-config --cfl
+
+ #LIBS = -L$(LIBDIR) -lglut -lGLU -lGL -lXext -lXaw -lm -lXi -lpng -lz
+ #LIBS = -L$(LIBDIR) -lglut -lGLU -lGL -lXext -lXaw -lm -lXi -lpng -lz
+-AM_LDFLAGS = ${all_libraries} `freetype-config --libs` ${SDL_LIBS} ${GLUT_LIBS}
+ #LDADD = ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS} -lGL -lGLU -lXaw -lm -lXi -lpng -lz -L/home/floh/nvsdk/OpenGL/lib/ -lnvparse
+-LDADD = ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS} -lGL -lGLU -lXaw -lm -lXi -lpng -lz
++LIBS = ${all_libraries} `freetype-config --libs` ${SDL_LIBS} ${GLUT_LIBS} ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS} -lGL -lGLU -lXaw -lm -lXi -lpng -lz
diff --git a/games-sports/foobillard/files/foobillard-3.0a-fbsd.patch b/games-sports/foobillard/files/foobillard-3.0a-fbsd.patch
new file mode 100644
index 000000000000..301260cb8360
--- /dev/null
+++ b/games-sports/foobillard/files/foobillard-3.0a-fbsd.patch
@@ -0,0 +1,29 @@
+Index: foobillard-3.0a/configure.in
+===================================================================
+--- foobillard-3.0a.orig/configure.in
++++ foobillard-3.0a/configure.in
+@@ -13,7 +13,7 @@ dnl Checks for libraries.
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS(limits.h unistd.h math.h stdlib.h stdio.h ft2build.h)
++AC_CHECK_HEADERS(limits.h unistd.h math.h stdlib.h stdio.h ft2build.h endian.h sys/endian.h)
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+Index: foobillard-3.0a/src/billard3d.c
+===================================================================
+--- foobillard-3.0a.orig/src/billard3d.c
++++ foobillard-3.0a/src/billard3d.c
+@@ -24,7 +24,11 @@
+ #include <string.h>
+ #include <math.h>
+ #include <unistd.h>
++#ifdef HAVE_ENDIAN_H
+ #include <endian.h>
++#elif defined(HAVE_SYS_ENDIAN_H)
++#include <sys/endian.h>
++#endif
+
+ #ifndef USE_SDL
+ #include <GL/glut.h>
diff --git a/games-sports/foobillard/files/foobillard-3.0a-gl-clamp.patch b/games-sports/foobillard/files/foobillard-3.0a-gl-clamp.patch
new file mode 100644
index 000000000000..972d14cabb0a
--- /dev/null
+++ b/games-sports/foobillard/files/foobillard-3.0a-gl-clamp.patch
@@ -0,0 +1,14 @@
+diff -ur foobillard-3.0a/src/table.c foobillard-3.0a-glclamp/src/table.c
+--- foobillard-3.0a/src/table.c 2004-01-11 21:53:02.000000000 +0000
++++ foobillard-3.0a-glclamp/src/table.c 2011-02-21 09:14:36.000000000 +0000
+@@ -1214,8 +1214,8 @@
+ GL_UNSIGNED_BYTE, tabletexdata);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, options_tex_min_filter);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, options_tex_mag_filter);
+- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
++ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
++ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ free( tabletexdata );
+ } else {
+ tabletexbind=0;
diff --git a/games-sports/foobillard/files/foobillard-3.0a-no_nvidia.patch b/games-sports/foobillard/files/foobillard-3.0a-no_nvidia.patch
new file mode 100644
index 000000000000..b43707bc403b
--- /dev/null
+++ b/games-sports/foobillard/files/foobillard-3.0a-no_nvidia.patch
@@ -0,0 +1,18 @@
+--- src/ball.c.orig 2004-06-02 07:00:57.000000000 -0400
++++ src/ball.c 2004-06-02 07:03:52.000000000 -0400
+@@ -1821,6 +1821,7 @@
+ } else if( options_cuberef && cuberef_binds!=0 ){
+ glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, cuberef_binds[i]);
+ #ifdef GL_VERTEX_PROGRAM_NV
++#ifdef USE_BALL_FRESNEL
+ {
+ myvec cam_pos2;
+ // cam_pos2=vec_scale(vec_unit(vec_diff(cam_pos,balls.ball[i].r)),BALL_D/2.5);
+@@ -1829,6 +1830,7 @@
+ BALL_D/2.0,BALL_D/2.5,0,0 );
+ }
+ #endif
++#endif
+ draw_ball(&balls.ball[i],cam_pos,cam_FOV,win_width,0);
+ }else{
+ draw_ball(&balls.ball[i],cam_pos,cam_FOV,win_width,0);
diff --git a/games-sports/foobillard/foobillard-3.0a.ebuild b/games-sports/foobillard/foobillard-3.0a.ebuild
new file mode 100644
index 000000000000..b3da787d3868
--- /dev/null
+++ b/games-sports/foobillard/foobillard-3.0a.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic autotools toolchain-funcs games
+
+DESCRIPTION="8ball, 9ball, snooker and carambol game"
+HOMEPAGE="http://foobillard.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE="sdl video_cards_nvidia"
+
+DEPEND="x11-libs/libXaw
+ x11-libs/libXi
+ virtual/opengl
+ virtual/glu
+ >=media-libs/freetype-2.0.9
+ media-libs/libpng:0
+ sdl? ( media-libs/libsdl[video] )
+ !sdl? ( media-libs/freeglut )"
+RDEPEND=${DEPEND}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-no_nvidia.patch \
+ "${FILESDIR}"/${P}-fbsd.patch \
+ "${FILESDIR}"/${P}-as-needed.patch \
+ "${FILESDIR}"/${P}-gl-clamp.patch
+ mv configure.{in,ac}
+ rm aclocal.m4
+
+ eautoreconf
+}
+
+src_configure() {
+ use video_cards_nvidia && append-ldflags -L/usr/$(get_libdir)/opengl/nvidia/lib
+ egamesconf \
+ --enable-sound \
+ $(use_enable sdl SDL) \
+ $(use_enable !sdl glut) \
+ $(use_enable video_cards_nvidia nvidia)
+}
+
+src_install() {
+ default
+ doman foobillard.6
+ newicon data/full_symbol.png foobillard.png
+ make_desktop_entry foobillard Foobillard
+ prepgamesdirs
+}
diff --git a/games-sports/foobillard/metadata.xml b/games-sports/foobillard/metadata.xml
new file mode 100644
index 000000000000..9a3afbb16c8e
--- /dev/null
+++ b/games-sports/foobillard/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">foobillard</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/gracer/Manifest b/games-sports/gracer/Manifest
new file mode 100644
index 000000000000..845e99b9d0a7
--- /dev/null
+++ b/games-sports/gracer/Manifest
@@ -0,0 +1,14 @@
+AUX 0.1.5-gldefs.patch 1066 SHA256 f7cd80f1cd75734d5c5f201288d46ef84ecc17a625969d8a0569229c792c0506 SHA512 817bfa44ccdc07366177e1048b47c822313d1509c90c4f7569ec4c6dd423d75053e45e95b52c8986ec23b1300b49be4e8dae3f875c47b168c438996d6fff9e5f WHIRLPOOL e5a11316701e2d40da73d87780577887780965b351c0924602c1e99089403b33826857d172ce11a28ad6db8a07a3930ea3b40114935d1fad6cd42f03e215e78f
+AUX gracer-0.1.5-as-needed.patch 1134 SHA256 34678d10ee8e7afd326f4c163373ba508e472398628a1f0493c7c5c6cfe4c684 SHA512 dc7738a289d8ca9df8548cdf3011e523814ddd8071df0cc73f1ff0a2ce52e679b821608bd91978585f0c3c658e3b9091204ccad58100c190524b6c0326236b85 WHIRLPOOL cca57cf0cb3165ab6a51db50e38be124801e7e11076df14c6e404d3e705e8b7a28b7ace0f8091b55e67655e0bedcf503926426fd5a5c39ab10156ddec8fc8892
+AUX gracer-0.1.5-gcc41.patch 414 SHA256 b2661e13bb04352dc3a687fd1aa9c3df69ee00249d4d10c9bc756a224b05b119 SHA512 b732fcb3f0dc990f32ea55cddc35e44eb57994989a5f3b1c38b1d89a9e4e1e4c77ffa0244c0eb1b5b1259e396a7d8718289a32cf314ae7b8b2738a3ec0acc8ac WHIRLPOOL ff8d7c988f7a04f55fe960c2dbcc060d387cdc872c8ed5ae7a00c69f720a2cc942a8c4f04f60a655712ba6d32f437ab9ef17622e903476d8d454abec3476cd9d
+AUX gracer-0.1.5-giflib.patch 331 SHA256 5b18fb9acfc6303add2e7e49e2d7263664bd737aeb1a33627b47f917e82284fb SHA512 56ced23de71bdaeb577b5b006fd2f139f70d681584d4de7b96e33e5199f2f3c6e2a31ece79b9c32eb61ffdac1848a504bc8a1ed9f1bad2a90f41bb2fbeb51b57 WHIRLPOOL 868a5c4ec7b0ac1867ac52b2d0576ded0d9747b0077f9a1f6bed1181b32eb3de049a455752625d902bda904189568df6edb0266a109358613161e3c292a5b011
+AUX gracer-0.1.5-libpng14.patch 389 SHA256 80344f3fea6e444b18b7a652ac98ddb7548f2696a681ff3c86da6d171b15d70f SHA512 8074b990613e2c1957e41e7091289291275dcb5aaf54e89553cdcc333cfc0c226d4ae9af71809f847b541280667f26912711d3eb868ae746952b8dccdaf6519f WHIRLPOOL 8b67e214d9a9b49be0b1a644c1cf631812fc4200554779a110a29103f566d9dc65a31f1abed4df1b24be0dd23986f1b0fb6bef75e354c5f026ce12a810b60a4a
+AUX gracer-0.1.5-png15.patch 314 SHA256 a9da554f852aec950f951c3b1eeb76f63899f94b5eecb879553bf362359d3479 SHA512 aa7e16d49084e96ed59068e765103f9f8a73e94a4c457ffa4a5813a4e6fd794bc64385cf81978d399eeac43426c8975d35900eca38c0b5c6613c76dc8e917fc9 WHIRLPOOL d963863b76aa83a230b96b69bcdb8108e12700dcca1e9d7d74c11cddd5b06c7bc85e88f5b856e4d97de90157af5afa62b45938a7010afc8084034c39c53806f2
+AUX gracer-0.1.5-warnings.patch 433 SHA256 ff0bc0c4357beb37ad92b87cf13ca60a1189171492ecb0e38bd551524743c5a9 SHA512 a8a1c2ac8b6d38355b48bfb61980f6eee15b0404dd4d8d8a17debe3d69a319f1b9f48aa40e0d00857af8051f1d93d864e6970d2d051791e8e21ffedbb09b2d31 WHIRLPOOL 1d852d1fb7f6ce6ebaab5ab2857d087d053133030a0cc03ef9f6e40283b2769207027bc569166df36757ff7fe37663c44d3fd0ccb7483c46c29b028f49939ff9
+AUX gracer-gcc-3.4.patch 1755 SHA256 b27947c57a31785611a5b4543b103fad604c9de23f1c7aab9469ef6ed8277b05 SHA512 544bb200bb49bf40b798c32f30f24795204c6e3f67a971ad9254f040e7f30a063e17974a6256de54d4550cb347392a4e71fb8aa29fc46f1fbcf92b1cf0ad015c WHIRLPOOL 878f0e8c314d54d3c08fb09509d00bb893a09f9f2a0692c69cd220e39367cd6e2184eb59fc2807a736fc75636699f251e7c1b01019adfc7c4b38873d1e355344
+DIST gracer-0.1.5.tar.gz 520599 SHA256 dc478610d60cd5f00a52cc52877a333bd4b3a2d96ed1660ba8d26ad7143367c0 SHA512 eb812c517087a955d4b421e5d0e4bc841428162ed3f76dcac1a7a36b67e6ac14e8a6c231cca2a8ba9c60a4a25c79d532983a13dc4e9b9e4b7dfad3e78f1284bc WHIRLPOOL f0a68874ce5aaed897197c94b2028f94fd89aac4cc961e75260bb48ddb66bf790e8a0ecda3be30916b97a88796e004096c3f6c10a8bf739ac00cf01e96383c0e
+EBUILD gracer-0.1.5-r1.ebuild 996 SHA256 c1852ac6b3b1b90007d1bbf7784c4d3d8cdf8a1e43f367bea39bce2ff98e8077 SHA512 f7817438fcd36264d1e047161f5ee5fb491d3016530c8864e320563835c5d14ee3d80fe12ed8e575e629f3a0852abe1db9c6a37f9b6430cebed7c89653c02bf1 WHIRLPOOL 51f0e9ff340300478566521844ef7012c741ef315f1cc85234807e804162d38cfbc4690015c26a5681c54d92a1ce46560dadfaf1c4389cff20eecb179528338c
+EBUILD gracer-0.1.5.ebuild 1092 SHA256 50fe3517c819a73fc83765bc0a484a5f0c39e962dae2c4bcdb2d3915f701f408 SHA512 b02d9e7507771faa90649295e8a808d0f4d96d206baa026b8f2666b29946e5da509db617930bd64ff747f59e596e89d7b31b2a29d4b52b9061fc8e7cad5b323f WHIRLPOOL f593305596013872317e812e5337e16a7544ef36b2f1d68152177795e44a6a0c5fdb6243b0748700f4dcd9b473ffc374809029df58cd6ddf503a2a19639c2da2
+MISC ChangeLog 3681 SHA256 f93ad578dc415d49de83000d302ffada18025c0ac3f2e2be89bec758d3ba74c8 SHA512 635caf5823bf85c04a7ea96a72281ff92969b097321b1f5363c142789c5812f50a52722f3f846d4a388f9f0c54a490fe304b341f3beb43c081f3564a22c81603 WHIRLPOOL 366dfa439ec1cdbe3932fc9354086485d7b6b020d138248db48a172fa6e8b93212cd0c70e2733e64cb85b5a376eff08aa0e14319e623ed8c9aba1cc606757acf
+MISC ChangeLog-2015 2806 SHA256 3cfa4718506068922edd846d7a58ee39d597740ad24b54d42233f5c340d4e4ae SHA512 03d1cabf73328b3b4688ad6a826f1158bfdd8772f7527428fe59a7ab42a5a044d83e6bce8b718bc9b753cb82294cfaca030ffff23e8f5940d061ed369d6532e7 WHIRLPOOL 54a29086a464a968b4f39ae59baeb2c001b9987f8ac08c731efde676dfe0f6f6af9fd9315a95b70173dc9378f7d01e4a8832070dace2684227300cccbc9f9695
+MISC metadata.xml 329 SHA256 3f7a882acb9cec8ba5d89cc1a980835f431d66206a6419f0a1542b05c9130cdf SHA512 c2f7b825c898da8e7ff14e83350c02a880eb2338607f562c42cd7dabd25ddaa938f4202aff742091302b0e609f02d2c4abf5c3b34e24b29262530934ffd2139d WHIRLPOOL 2e62e46297597f6cd2d1b286bfdece2355685738607720ff1ee6a63186759988f8c595f71b04769b8a629b3900799093eeb9dfbe1bd768f09b141fb62c8f34fb
diff --git a/games-sports/gracer/files/0.1.5-gldefs.patch b/games-sports/gracer/files/0.1.5-gldefs.patch
new file mode 100644
index 000000000000..43fe7385dc6e
--- /dev/null
+++ b/games-sports/gracer/files/0.1.5-gldefs.patch
@@ -0,0 +1,33 @@
+--- a/src/glbind.c 2003-07-30 00:18:37.000000000 -0400
++++ b/src/glbind.c 2003-07-30 00:19:32.000000000 -0400
+@@ -22,6 +22,8 @@
+ #include <unistd.h>
+ #include <GL/gl.h>
+ #include <GL/glut.h>
++#undef GL_EXT_texture_object
++#include <GL/glext.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <ctype.h>
+--- a/src/glhash.h 2003-07-30 00:20:32.000000000 -0400
++++ b/src/glhash.h 2003-07-30 00:20:58.000000000 -0400
+@@ -1,4 +1,5 @@
+ /* this file is generated automaticaly from GL/gl.h */
++#undef GL_EXT_paletted_texture
+ #include <GL/gl.h>
+
+ glWordList glwordlist[] = {
+@@ -632,13 +632,11 @@
+
+ #ifdef GL_SGIS_multitexture
+ {"selected_texture_sgis", GL_SELECTED_TEXTURE_SGIS},
+- {"selected_texture_coord_set_sgis", GL_SELECTED_TEXTURE_COORD_SET_SGIS},
+ {"max_textures_sgis", GL_MAX_TEXTURES_SGIS},
+ {"texture0_sgis", GL_TEXTURE0_SGIS},
+ {"texture1_sgis", GL_TEXTURE1_SGIS},
+ {"texture2_sgis", GL_TEXTURE2_SGIS},
+ {"texture3_sgis", GL_TEXTURE3_SGIS},
+- {"texture_coord_set_source_sgis", GL_TEXTURE_COORD_SET_SOURCE_SGIS},
+ #endif
+
+ #ifdef GL_EXT_multitexture
diff --git a/games-sports/gracer/files/gracer-0.1.5-as-needed.patch b/games-sports/gracer/files/gracer-0.1.5-as-needed.patch
new file mode 100644
index 000000000000..1b8b21f1a186
--- /dev/null
+++ b/games-sports/gracer/files/gracer-0.1.5-as-needed.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile.in 2009-02-11 14:31:56.000000000 +0100
++++ b/src/Makefile.in 2009-02-11 14:32:29.000000000 +0100
+@@ -109,7 +109,7 @@
+ INCLUDES = -I$(top_srcdir) @X_CFLAGS@ @GL_CFLAGS@ @GLUT_CFLAGS@ @TCL_CFLAGS@ @GIF_CFLAGS@ @JPEG_CFLAGS@ @PNG_CFLAGS@ @PLIB_CFLAGS@
+
+
+-gracer_LDADD = @PLIB_LDFLAGS@ @GIF_LDFLAGS@ @JPEG_LDFLAGS@ @PNG_LDFLAGS@ @GL_LDFLAGS@ @GLUT_LDFLAGS@ @X_LDFLAGS@ @TCL_LDFLAGS@ @TCL_LIBS@ @X_LIBS@ @GL_LIBS@ @GLUT_LIBS@ @GIF_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @SOUND_LIBS@ $(top_builddir)/common/libcommon.a
++gracer_LDADD = $(top_builddir)/common/libcommon.a @PLIB_LDFLAGS@ @GIF_LDFLAGS@ @JPEG_LDFLAGS@ @PNG_LDFLAGS@ @GL_LDFLAGS@ @GLUT_LDFLAGS@ @X_LDFLAGS@ @TCL_LDFLAGS@ @TCL_LIBS@ @X_LIBS@ @GL_LIBS@ @GLUT_LIBS@ @GIF_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @SOUND_LIBS@
+
+
+ gracer_SOURCES = control.h glbind.c glbind.h glutwidgets.c glutwidgets.h gluttclwidgets.c gluttclwidgets.h glutgame.c glutgame.h gr_world.c gr_world.h glhash.h gluthash.h vehicle.c vehicle.h lap.c lap.h joystick.c joystick.h tcldefs.h sound.h sound.cxx main.cxx
diff --git a/games-sports/gracer/files/gracer-0.1.5-gcc41.patch b/games-sports/gracer/files/gracer-0.1.5-gcc41.patch
new file mode 100644
index 000000000000..3877e76e577e
--- /dev/null
+++ b/games-sports/gracer/files/gracer-0.1.5-gcc41.patch
@@ -0,0 +1,11 @@
+--- a/common/gr_memory.h 2006-05-23 09:16:21.000000000 +0200
++++ b/common/gr_memory.h 2006-05-23 09:16:40.000000000 +0200
+@@ -64,7 +64,7 @@
+ void gr_dlist_free (GrDList *list);
+
+ #define gr_FOREACH(l,p) \
+- for (; (l) != NULL && ((void *)(p) = (l)->data, 1); (l) = (l)->next)
++ for (; (l) != NULL && (p = (l)->data, 1); (l) = (l)->next)
+
+ void gr_ref_incr (GrRef *ref);
+ void gr_ref_decr (GrRef *ref);
diff --git a/games-sports/gracer/files/gracer-0.1.5-giflib.patch b/games-sports/gracer/files/gracer-0.1.5-giflib.patch
new file mode 100644
index 000000000000..a5ce023f5734
--- /dev/null
+++ b/games-sports/gracer/files/gracer-0.1.5-giflib.patch
@@ -0,0 +1,14 @@
+--- gracer-0.1.5/common/gr_texture.c
++++ gracer-0.1.5/common/gr_texture.c
+@@ -274,7 +274,11 @@
+ int index;
+ int width, height;
+
++#if (GIFLIB_MAJOR >= 5&& !(GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0))
++ file = DGifOpenFileName (filename, &i);
++#else
+ file = DGifOpenFileName (filename);
++#endif
+ if (!file)
+ return -1;
+
diff --git a/games-sports/gracer/files/gracer-0.1.5-libpng14.patch b/games-sports/gracer/files/gracer-0.1.5-libpng14.patch
new file mode 100644
index 000000000000..618c987a3152
--- /dev/null
+++ b/games-sports/gracer/files/gracer-0.1.5-libpng14.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/show_bug.cgi?id=308885
+
+--- a/common/gr_texture.c
++++ b/common/gr_texture.c
+@@ -419,7 +419,7 @@ read_png_file (GrTexture *texture, char
+ if (fread (header, 1, PNG_BYTES_TO_CHECK, file) != PNG_BYTES_TO_CHECK) {
+ goto ERROR;
+ }
+- if (!png_check_sig (header, PNG_BYTES_TO_CHECK)) {
++ if (png_sig_cmp (header, 0, PNG_BYTES_TO_CHECK)) {
+ goto ERROR;
+ }
+
diff --git a/games-sports/gracer/files/gracer-0.1.5-png15.patch b/games-sports/gracer/files/gracer-0.1.5-png15.patch
new file mode 100644
index 000000000000..d606c14cd4e2
--- /dev/null
+++ b/games-sports/gracer/files/gracer-0.1.5-png15.patch
@@ -0,0 +1,11 @@
+--- a/common/gr_texture.c 2011-09-14 14:23:46.820207882 +0200
++++ b/common/gr_texture.c 2011-09-14 14:24:22.861203604 +0200
+@@ -431,7 +431,7 @@
+ if (!info_ptr) {
+ goto ERROR;
+ }
+- if (setjmp (png_ptr->jmpbuf)) {
++ if (setjmp (png_jmpbuf(png_ptr))) {
+ goto ERROR;
+ }
+ png_init_io (png_ptr, file);
diff --git a/games-sports/gracer/files/gracer-0.1.5-warnings.patch b/games-sports/gracer/files/gracer-0.1.5-warnings.patch
new file mode 100644
index 000000000000..b5ede40e1492
--- /dev/null
+++ b/games-sports/gracer/files/gracer-0.1.5-warnings.patch
@@ -0,0 +1,21 @@
+--- gracer-0.1.5/src/glbind.c
++++ gracer-0.1.5/src/glbind.c
+@@ -142,7 +142,7 @@
+ return NULL;
+
+ entry = Tcl_FindHashEntry (&cache_hash, key);
+- if (&entry)
++ if (!entry)
+ return NULL;
+
+ return Tcl_GetHashValue (entry);
+--- gracer-0.1.5/src/joystick.c
++++ gracer-0.1.5/src/joystick.c
+@@ -20,6 +20,7 @@
+ */
+
+ #include <unistd.h>
++#include <string.h>
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
diff --git a/games-sports/gracer/files/gracer-gcc-3.4.patch b/games-sports/gracer/files/gracer-gcc-3.4.patch
new file mode 100644
index 000000000000..c12cb9a1f0cf
--- /dev/null
+++ b/games-sports/gracer/files/gracer-gcc-3.4.patch
@@ -0,0 +1,120 @@
+--- a/src/glbind.c 2004-11-05 01:15:07.141221016 +0000
++++ b/src/glbind.c 2004-11-05 01:15:32.808319024 +0000
+@@ -2150,6 +2150,7 @@
+ return 3;
+
+ default:
++ ;
+ }
+
+ ERROR:
+@@ -2889,6 +2890,7 @@
+ return 6;
+
+ default:
++ ;
+ }
+
+ ERROR:
+@@ -3081,6 +3083,7 @@
+ return 4;
+
+ default:
++ ;
+ }
+
+ ERROR:
+--- a/src/glutwidgets.c 2004-11-05 01:17:17.941336376 +0000
++++ b/src/glutwidgets.c 2004-11-05 01:18:42.059548464 +0000
+@@ -255,6 +255,7 @@
+ widget->width += (width - screen_width);
+ break;
+ default:
++ ;
+ }
+ switch (widget->anchor & GR_VERTICAL_MASK) {
+ case GR_BOTTOM:
+@@ -268,6 +269,7 @@
+ widget->height += (width - screen_height);
+ break;
+ default:
++ ;
+ }
+ glut_widget_calc_bbox (widget);
+ }
+@@ -327,6 +329,7 @@
+ break;
+
+ default:
++ ;
+ }
+ }
+
+@@ -504,6 +507,7 @@
+ break;
+
+ default:
++ ;
+ }
+ }
+
+@@ -1299,6 +1303,7 @@
+ break;
+
+ default:
++ ;
+ }
+ }
+
+@@ -1571,6 +1576,7 @@
+ break;
+
+ default:
++ ;
+ }
+
+ glColor4fv (widget->fg_color[GR_STATE_NORMAL]);
+--- a/src/gr_world.c 2004-11-05 01:19:30.766143936 +0000
++++ b/src/gr_world.c 2004-11-05 01:19:07.717647840 +0000
+@@ -169,6 +169,7 @@
+ break;
+
+ default:
++ ;
+ }
+
+ tlist = entry->triggers;
+--- a/ac2scene/ac2scene.c 2004-11-05 01:13:55.845059680 +0000
++++ b/ac2scene/ac2scene.c 2004-11-05 01:14:32.526483256 +0000
+@@ -162,6 +162,7 @@
+ break;
+
+ default:
++ ;
+ }
+
+ return 0;
+@@ -234,6 +235,7 @@
+ break;
+
+ default:
++ ;
+ }
+
+ return 0;
+@@ -316,6 +318,7 @@
+ }
+ break;
+ default:
++ ;
+ }
+
+ return 0;
+@@ -399,6 +402,7 @@
+ break;
+
+ default:
++ ;
+ }
+ }
+
diff --git a/games-sports/gracer/gracer-0.1.5-r1.ebuild b/games-sports/gracer/gracer-0.1.5-r1.ebuild
new file mode 100644
index 000000000000..c604168f2c6c
--- /dev/null
+++ b/games-sports/gracer/gracer-0.1.5-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="3D motor sports simulator"
+HOMEPAGE="http://gracer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gracer/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="joystick"
+
+DEPEND="
+ dev-lang/tcl:0
+ media-libs/freeglut
+ media-libs/giflib
+ media-libs/libpng:0
+ media-libs/plib
+ x11-libs/libXi
+ x11-libs/libXmu
+ virtual/glu
+ virtual/jpeg:0
+ virtual/opengl"
+
+RDEPEND=${DEPEND}
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-gldefs.patch
+ "${FILESDIR}"/${PN}-gcc-3.4.patch
+ "${FILESDIR}/${P}"-gcc41.patch
+ "${FILESDIR}"/${P}-as-needed.patch
+ "${FILESDIR}"/${P}-libpng14.patch
+ "${FILESDIR}"/${P}-png15.patch
+ "${FILESDIR}"/${P}-giflib.patch
+ "${FILESDIR}"/${P}-warnings.patch
+)
+
+src_configure() {
+ econf \
+ --enable-gif \
+ --enable-jpeg \
+ --enable-png \
+ $(use_enable joystick)
+ sed -i \
+ -e 's:-lplibsl:-lplibsl -lplibul:' \
+ $(find -name Makefile) || die
+}
diff --git a/games-sports/gracer/gracer-0.1.5.ebuild b/games-sports/gracer/gracer-0.1.5.ebuild
new file mode 100644
index 000000000000..cc64aa4d108e
--- /dev/null
+++ b/games-sports/gracer/gracer-0.1.5.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="3D motor sports simulator"
+HOMEPAGE="http://gracer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gracer/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="joystick"
+
+DEPEND="
+ dev-lang/tcl:0
+ media-libs/freeglut
+ media-libs/giflib
+ media-libs/libpng:0
+ media-libs/plib
+ x11-libs/libXi
+ x11-libs/libXmu
+ virtual/glu
+ virtual/opengl
+ virtual/jpeg:0"
+RDEPEND=${DEPEND}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-gldefs.patch \
+ "${FILESDIR}"/${PN}-gcc-3.4.patch \
+ "${FILESDIR}/${P}"-gcc41.patch \
+ "${FILESDIR}"/${P}-as-needed.patch \
+ "${FILESDIR}"/${P}-libpng14.patch \
+ "${FILESDIR}"/${P}-png15.patch \
+ "${FILESDIR}"/${P}-giflib.patch \
+ "${FILESDIR}"/${P}-warnings.patch
+}
+
+src_configure() {
+ egamesconf \
+ --enable-gif \
+ --enable-jpeg \
+ --enable-png \
+ $(use_enable joystick)
+ sed -i \
+ -e 's:-lplibsl:-lplibsl -lplibul:' \
+ $(find -name Makefile) || die
+}
+
+src_install() {
+ default
+ prepgamesdirs
+}
diff --git a/games-sports/gracer/metadata.xml b/games-sports/gracer/metadata.xml
new file mode 100644
index 000000000000..f8270e9a0c3b
--- /dev/null
+++ b/games-sports/gracer/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">gracer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/metadata.xml b/games-sports/metadata.xml
new file mode 100644
index 000000000000..370d356069e1
--- /dev/null
+++ b/games-sports/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-sports category contains sports games.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie games-sports enthält Sportspiele.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría games-sports contiene juegos de deporte.
+ </longdescription>
+ <longdescription lang="ja">
+ games-sportsカテゴリーにはスポーツ・ゲームが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De games-sports categorie bevat sportspellen.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm games-sports chứa các trò chơi thể thao.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria games-sports contiene giochi sportivi.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria games-sports contém jogos de esportes.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria games-sports zawiera gry sportowe.
+ </longdescription>
+</catmetadata>
+
diff --git a/games-sports/miniracer/Manifest b/games-sports/miniracer/Manifest
new file mode 100644
index 000000000000..42824988d396
--- /dev/null
+++ b/games-sports/miniracer/Manifest
@@ -0,0 +1,7 @@
+AUX miniracer-1.04-ldflags.patch 1988 SHA256 4906b9f9ce4aad83b48113187bcacca0c045cb7eb6d98a5c29245235117bd97e SHA512 d2fd6d9ad5afa5d9269b161892c9b83fc76879fb7ca9f90dc4210c84dc14c99e0a810c6eb9bbef531574e3888563ce561bb588529e3294f181d836c98c6f3237 WHIRLPOOL 6e2989cd9ccc4fe8582fa60c5aa669920fd9456f6c43f20682c82777cdf984e4f074881dd1f66f843a764f6e1d2cbb6978404d781f406cdc3aad7bf7a8d61655
+AUX miniracer-1.04-nosharedelf.patch 542 SHA256 185efe81b41ac9d14b4163f1571819c97d886b4c26323fcda0e17d0cbcf4088d SHA512 34b5cfb83287650f2a621c5996cc988d905ad01a703b2f33d6bbcbb0cfb94fe319fda4d0ff00d23959e5c5276f685fc497f31e06844d0cecd4a4f7c8d86e15ac WHIRLPOOL 34659c0f8c10b2d39f64f4020634336826633d5f8b062b26b7547028da653748a49a71b999e83cd31736e45db66ca7e709a965506582834fd3b112f57d5c927a
+DIST miniracer-1.04.tar.gz 5315353 SHA256 474ab98fd952df6233e51a5080bae655012ad573ff22cb42eca2ceaf97fe385d SHA512 6dc34371b6ea2d67c4a7d86b1200c9e7c7d56ef6b91af5ec4b0648da11dcfe6e125f6dc401a85e4c5bd3af2980d5a54b322c5466f96b7e21683e85ec4a7b0d6c WHIRLPOOL 79a1bccbb1106ccfdcaa5a3af07fc51e41783ff0e699d27721524e5efbc0908c859040c5bbb11e5bc6dbdee19e53d2dc1bad944ab2de397974554930c5c1ebf1
+EBUILD miniracer-1.04.ebuild 899 SHA256 28152d59bf30b76ba0c20c2febd7bbdb60b09267f2d9448089fff8e7116cfc87 SHA512 86275b3ffb2fca1470b8e975afc464637c7d2f0a0b00ad9f293be5d3040d9dce0df250ab66d9b3ee1f652c2c768d4fd7a19f013d0090ba3a60fbcb090160c148 WHIRLPOOL 097bee3fde6e0e59aa2688afdd26534dcc1a7db0a390e5bbe416d067179a2c2c6d71cb1fb6c08a6a70cbc1eda1b92164a19c7bd60c9be0c511040756bfcfca94
+MISC ChangeLog 2517 SHA256 0b8710adf26527dbcb0acb7c3d73cf7f389d6812f0aa183422e5b9d88b61823f SHA512 f2eb068b7233a155e11052977e8afa79b659f5fb1dba9eabf0d19dd5816c6a88c040400b64f0fcdc614d724cc37bed545454d2fbe97d9d3bb52a8639601507c1 WHIRLPOOL fd2a4f67a5372c7a9aab8487e092e1f982c7c45a8143fea493bbee6e66b2009264785232783e1697a0ae5fd84dfc69270dc3502a20d495d30d5f77aaf333f74d
+MISC ChangeLog-2015 1351 SHA256 49d7e440745c59a2a8c5729dcd26134761a207620bf16628542b555cdeb93b19 SHA512 281d8a8a9c0e1ec128b1505e3a594dac1d1bf34b21e5fd1d091aef8dd3681bc5a185957ee6fc7795dc4210a5b900432f8043004597f9a5b84704b29c8986e23f WHIRLPOOL 10764042d39fea300875329caf910e30bdfae1021969bae9d1032e0fd31086e49c65aaa887177fc34105420319f112163ecd074913881bd46ca825a01843425a
+MISC metadata.xml 332 SHA256 e357f34478e12d80a8061c984320895cb62bf9d399075ade468eaef716368c59 SHA512 ade0aa3bd8cf05a614c929da53b540fa7bdbd1d39c3b5459b6f795ba04f72544bfe5e87918ca605a36ba7941e119b7ba73bb7adf68f95446f243ab3e1a02996a WHIRLPOOL 2229c41a1791c8f5fd6ef0acf61f24e66863a4e4c2bc385d46dd81d6806a2e19f7921d32629531b50682ad12caa5a6639cfb2a2561b100a94813653941a6daf5
diff --git a/games-sports/miniracer/files/miniracer-1.04-ldflags.patch b/games-sports/miniracer/files/miniracer-1.04-ldflags.patch
new file mode 100644
index 000000000000..4c37dc9e1aa3
--- /dev/null
+++ b/games-sports/miniracer/files/miniracer-1.04-ldflags.patch
@@ -0,0 +1,48 @@
+--- Makefile.old 2010-10-13 12:41:01.000000000 +0200
++++ Makefile 2010-10-13 12:56:04.000000000 +0200
+@@ -10,13 +10,12 @@
+
+ BUILDDIR=obj
+
+-CC=gcc
+ DEFS=-DVIDMODEXT_GAMMA_RAMP -DSOUND
+-INCLUDES= -I. -I/usr/X11R6/include -I/usr/include/SDL
+-CFLAGS=$(DEFS) $(INCLUDES) -O3 -march=i486 -ffast-math -fexpensive-optimizations
++INCLUDES= -I. -I/usr/X11R6/include $(shell sdl-config --cflags)
++CFLAGS=$(DEFS) $(INCLUDES) @CFLAGS@
+
+ GL_LDFLAGS=-L/usr/X11R6/lib -lGL -lXxf86dga -lXxf86vm -lX11 -lXext -lm
+-LDFLAGS=$(GL_LDFLAGS) -ldl -lSDL -lSDL_mixer -lpthread
++LDLIBS=$(GL_LDFLAGS) -ldl -lSDL_mixer $(shell sdl-config --libs)
+
+ #############################################################################
+ # SETUP AND BUILD
+@@ -43,15 +42,16 @@
+ build_release: engine.glx
+
+ install:
+- install -d $(DESTDIR)/usr/bin
++ install -d $(DESTDIR)@GAMES_BINDIR@
+ install -d $(DESTDIR)/usr/share/man/man6
+ install -d $(DESTDIR)/usr/share/games/MiniRacer
+ install -d $(DESTDIR)/usr/share/games/MiniRacer/data
+ install -d $(DESTDIR)/usr/share/games/MiniRacer/data/maps
+- install -m 755 engine.glx $(DESTDIR)/usr/share/games/MiniRacer
++ install -d $(DESTDIR)@GAMES_LIBDIR@
++ install -m 755 engine.glx $(DESTDIR)@GAMES_LIBDIR@
+ install -m 644 data/pak0.pak $(DESTDIR)/usr/share/games/MiniRacer/data
+ install -m 644 data/config.cfg $(DESTDIR)/usr/share/games/MiniRacer/data
+- install -m 755 miniracer $(DESTDIR)/usr/bin/miniracer
++ install -m 755 miniracer $(DESTDIR)@GAMES_BINDIR@/miniracer
+ install -m 644 miniracer.6 $(DESTDIR)/usr/share/man/man6
+ install -m 644 data/maps/*.bsp $(DESTDIR)/usr/share/games/MiniRacer/data/maps
+ install -m 644 data/maps/maps1.lst $(DESTDIR)/usr/share/games/MiniRacer/data/maps
+@@ -145,7 +145,7 @@
+ $(CC) $(CFLAGS) $(GLCFLAGS) -o $@ -c $<
+
+ engine.glx : $(GLMR_OBJS)
+- $(CC) $(CFLAGS) -o $@ $(GLMR_OBJS) $(LDFLAGS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(GLMR_OBJS) $(LDLIBS)
+
+ #############################################################################
+ # MISC
diff --git a/games-sports/miniracer/files/miniracer-1.04-nosharedelf.patch b/games-sports/miniracer/files/miniracer-1.04-nosharedelf.patch
new file mode 100644
index 000000000000..0bb0b5da846e
--- /dev/null
+++ b/games-sports/miniracer/files/miniracer-1.04-nosharedelf.patch
@@ -0,0 +1,23 @@
+--- miniracer.old 2010-02-27 21:05:11.000000000 +0100
++++ miniracer 2010-02-27 21:10:34.000000000 +0100
+@@ -12,10 +12,6 @@
+ fi
+
+ #checks for files
+-if ! [ -f $HOME/.MiniRacer/engine.glx ]; then
+- ln -s $MINIRACERDIR/engine.glx $HOME/.MiniRacer
+-fi
+-
+ if ! [ -f $HOME/.MiniRacer/data/pak0.pak ]; then
+ ln -s $MINIRACERDIR/data/pak0.pak $HOME/.MiniRacer/data
+ fi
+@@ -35,7 +31,4 @@
+
+ # change directory and start MiniRacer
+ cd $HOME/.MiniRacer
+-./engine.glx $*
+-
+-exit 0
+-
+\ No newline at end of file
++exec @GAMES_LIBDIR@/engine.glx $*
diff --git a/games-sports/miniracer/metadata.xml b/games-sports/miniracer/metadata.xml
new file mode 100644
index 000000000000..b948d3db5863
--- /dev/null
+++ b/games-sports/miniracer/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">miniracer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/miniracer/miniracer-1.04.ebuild b/games-sports/miniracer/miniracer-1.04.ebuild
new file mode 100644
index 000000000000..d7e2bf28549e
--- /dev/null
+++ b/games-sports/miniracer/miniracer-1.04.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="an OpenGL car racing game, based on ID's famous Quake engine"
+HOMEPAGE="http://miniracer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+RDEPEND="virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ media-libs/libsdl
+ media-libs/sdl-mixer"
+DEPEND="${RDEPEND}
+ x11-proto/xf86dgaproto
+ x11-proto/xf86vidmodeproto
+ x11-proto/xproto"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-nosharedelf.patch \
+ "${FILESDIR}"/${P}-ldflags.patch
+ sed -i \
+ -e "s:@CFLAGS@:${CFLAGS}:" \
+ -e "s:@GAMES_LIBDIR@:$(games_get_libdir)/${PN}:" \
+ -e "s:@GAMES_BINDIR@:${GAMES_BINDIR}:" \
+ miniracer Makefile || die
+}
+
+src_install() {
+ default
+ prepgamesdirs
+}
diff --git a/games-sports/ski/Manifest b/games-sports/ski/Manifest
new file mode 100644
index 000000000000..ddbb30359e7b
--- /dev/null
+++ b/games-sports/ski/Manifest
@@ -0,0 +1,8 @@
+DIST ski-6.8.tar.gz 17119 SHA256 776849dc61ffe834def7d22b9027a64491559a1700351d817313f187cee36c4d SHA512 0e63b6d34e809d74ddaea3749e6d1df44907ebe26bc19185b6c9cc6998f538747cb32a747fd0b4307bf05beec65564f1174e982a851270e344117d943f4ecca9 WHIRLPOOL ff730a786e7961170545c5dbe9f26c0030e78a9cf422e60791e90cb02098b7c0352489b08af16838a1b4f48dca3bb8b9e386d665dd537094482de937dfccc08d
+DIST ski-6.9.tar.gz 17543 SHA256 d0f2fd7770a63319340fab8ee275c6221dff0e0e7fe488f2298f567583902d37 SHA512 bdcd9a267153b23bc1e4b99f0073d9d26ff8a8d670d70ec06cc27b91cd4a3bdaf821507671d73a359b3447261d52e596c61cbf9596eead7191102d1a089178b6 WHIRLPOOL ee31f8ddcfb28111e353be6162fc6e49ce2f8aa45d3f57e34e7343a4e4244a4be59ae026cbd27a08b0c4f4f7660d8558a945cd1bcfd8778d23f2c337c8296b5c
+EBUILD ski-6.8.ebuild 674 SHA256 6722ce0ea6b012146a4ef3922f2e6aacc7186e7b65e3e08aaebf4326a5a5b854 SHA512 c1ed7ee3819ae08569a562ff452b426f9a8267d21de645c23270ffe14b5c5b94f17f8c738a7d2f105acba687f21e326ff69463a348f4b7afcf18c8f3d20ec2cd WHIRLPOOL 17e9634d5501b058dacb75a72f1fa49cdb64a450a79c29df77807f65220e5fca0c6e08b65dd053f5b5cab88c8c02c7ffb995be7ae00b7bb2f6de3f358ee13f35
+EBUILD ski-6.9-r1.ebuild 588 SHA256 ec7075bb5d1d9591babb46d171831e7fcd9a2dd38743f4f26b548b25b396d61a SHA512 37247f23ce3412bba5f93bac1a6e30efaab45fa5b50e0cd077986e8f6025bf52edfd6c4d70f82d5d857503df2d79d647cbea6cde3ab02b6e4690b1aeb6530510 WHIRLPOOL 12d09cde36af5d820aec095a9211b5f5bc7a96cfb6dc3836a5907a35e186acaee40c512677f47a6e42c02419783bab2856408e66104ee78ee280e52ce16d82d6
+EBUILD ski-6.9.ebuild 674 SHA256 6722ce0ea6b012146a4ef3922f2e6aacc7186e7b65e3e08aaebf4326a5a5b854 SHA512 c1ed7ee3819ae08569a562ff452b426f9a8267d21de645c23270ffe14b5c5b94f17f8c738a7d2f105acba687f21e326ff69463a348f4b7afcf18c8f3d20ec2cd WHIRLPOOL 17e9634d5501b058dacb75a72f1fa49cdb64a450a79c29df77807f65220e5fca0c6e08b65dd053f5b5cab88c8c02c7ffb995be7ae00b7bb2f6de3f358ee13f35
+MISC ChangeLog 2695 SHA256 68a9efca07921fc9070e54d35be390f3673890aa200b1aaa2bfdad0c56a38804 SHA512 125362851a9f3542813add75270997dad33873c498bcd4b609e37ab19f7423f556097df139ca6a928379e459d4dbe2424333c741531a0cd921841f4ed54b2dfa WHIRLPOOL 4aba14331e34ac55c990edbeb74c5cf77da0e217fe69c40fcd6f3c5d17c445ca36c2292caac9c7ecfac9d2fd2d9793bb1b8f0f346fd66eebd5f4b2db322b229c
+MISC ChangeLog-2015 2560 SHA256 4fa15e4c6910ba19321d6e4f5894e27995b95c457287863b3f3cda9405d32e7c SHA512 41c4974255c2765efd62b0765de388eb0df0955baf1e316f12c3c688cb6e94bb7ac1b5fa7c206aeb3e75ad1eb8cc5f0a30d7a8f406bc22afc27cf98b4317fabf WHIRLPOOL 9fb03b66128301de0b42e692550a4bc6adb6e35e241e12389d5ea031ce38da46e2012524d3c3498029093568a5d68eb4a6553919b44625be8429ff06065990bb
+MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088
diff --git a/games-sports/ski/metadata.xml b/games-sports/ski/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-sports/ski/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-sports/ski/ski-6.8.ebuild b/games-sports/ski/ski-6.8.ebuild
new file mode 100644
index 000000000000..40f73a07266c
--- /dev/null
+++ b/games-sports/ski/ski-6.8.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 games
+
+DESCRIPTION="A simple text-mode skiing game"
+HOMEPAGE="http://www.catb.org/~esr/ski/"
+SRC_URI="http://www.catb.org/~esr/ski/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ games_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_install() {
+ dogamesbin ski
+ dodoc NEWS README
+ doman ski.6
+ domenu ski.desktop
+ doicon ski.png
+ prepgamesdirs
+ python_fix_shebang "${ED}${GAMES_BINDIR}"
+}
diff --git a/games-sports/ski/ski-6.9-r1.ebuild b/games-sports/ski/ski-6.9-r1.ebuild
new file mode 100644
index 000000000000..e817d5cc3607
--- /dev/null
+++ b/games-sports/ski/ski-6.9-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1
+
+DESCRIPTION="A simple text-mode skiing game"
+HOMEPAGE="http://www.catb.org/~esr/ski/"
+SRC_URI="http://www.catb.org/~esr/ski/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ dobin ski
+ dodoc NEWS README
+ doman ski.6
+ domenu ski.desktop
+ doicon ski.png
+ python_fix_shebang "${ED}/usr/bin"
+}
diff --git a/games-sports/ski/ski-6.9.ebuild b/games-sports/ski/ski-6.9.ebuild
new file mode 100644
index 000000000000..40f73a07266c
--- /dev/null
+++ b/games-sports/ski/ski-6.9.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 games
+
+DESCRIPTION="A simple text-mode skiing game"
+HOMEPAGE="http://www.catb.org/~esr/ski/"
+SRC_URI="http://www.catb.org/~esr/ski/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ games_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_install() {
+ dogamesbin ski
+ dodoc NEWS README
+ doman ski.6
+ domenu ski.desktop
+ doicon ski.png
+ prepgamesdirs
+ python_fix_shebang "${ED}${GAMES_BINDIR}"
+}
diff --git a/games-sports/speed-dreams/Manifest b/games-sports/speed-dreams/Manifest
new file mode 100644
index 000000000000..187954b803ef
--- /dev/null
+++ b/games-sports/speed-dreams/Manifest
@@ -0,0 +1,10 @@
+AUX speed-dreams-1.4.0-asneeded.patch 4214 SHA256 89ca6276a53e80aa9fe08300f5d4c3cba2a9327072426933c85c56d227bcd6e7 SHA512 908ca897a843c5bc1e1a1260adea227f445a2d7a3e09cc2cf7deb1cc85d4163fd89046db95679b8ed1288e2c104585322380765abdd65f2edd10b6027b7b4bab WHIRLPOOL 498f058be99ae3efe8f1312301a2e339e0eaac326219107b9d811acfa1e65522179069fea8fc6c7f664326caf128d0d25d6f9cda72629f29e3b7d6986e74f9f6
+AUX speed-dreams-1.4.0-automake.patch 995 SHA256 67bceb669b135c3fa4ce95806cde62916cbf0a06ed13dc9b96cdbc58cb57775a SHA512 2300dd95087d0b7f0aada40041eea70976046085a9d9dc467c86691cf21058855941e642547a7eda26786b5a756d5930867616fb62534a0a2da1301dab3af8f0 WHIRLPOOL d9d951ae3f410449e32dec34f4c81e4c5ae0b068036f7a3fb317745fb19af752e4bce5bc93b96ca7b5d6b0b1a055e16412490a3ca6488415794ba16bf65788a9
+AUX speed-dreams-1.4.0-libpng15.patch 516 SHA256 8fe1de4656ee42c6ef4910658e18999fa85e59711608d271834452d6eec62500 SHA512 f945622e791d15020370a1e31d328bc1329e08163a3c4f66fd63987e2dd357e2708338402fcfb5b2e994d4339a3d8d6df7f908b2ecbdff5cb6bd865259d40fa9 WHIRLPOOL 9631e15dbbe43c2ffc0e868795d7ec6fdb7dfb90a556d5ef27841424370c277537ac4d49b15982c9329c31941e5837df73f673e8163be8ead11efcd6cdb8c837
+AUX speed-dreams-1.4.0-math-hack.patch 1426 SHA256 d0daef007a4643bb8a5babead1ffec64d8be61cf420948854d360c935f69fc72 SHA512 6187e0948b4b9b29f9934d4a760fb9bfdd81bd083d9f01a119f023fcacfe3f6163f8950934241cde24678ec4e4e081eafe6183263bc09c5f9f4db00c5f90259d WHIRLPOOL 47c9400a54d2021b8aecd6ccfaac25c47845b78b3db832c8027933986d25e7eeeaae934a972d6dc57a77fc4ef39454d1b15fbfe91ade54033c33ebd20d53ad85
+DIST speed-dreams-1.4.0-r2307-src.tar.bz2 332667666 SHA256 c109bb77785e33ab66992db8566584f4393d2f141fb12e32a58793953fcd6893 SHA512 6ae88691f52480351825c20c8bfb3ff54783b84bfbbc385ae2c0578991fa9025b16dcdc4ce136b85246a2a479452f2b209ecbec2be0a7ae85818929ea5fa1195 WHIRLPOOL f80ad50b71461fdd4ceb69af35cf021f5ced80903101929d50196b31384e15f6aea3bfbdb3c230aba737a8d0262411226dec606af766c20b939b542f56d5975a
+EBUILD speed-dreams-1.4.0-r1.ebuild 1809 SHA256 c17e2415f2cd720e4a0c8a0943fd6c69da5c6126fe882d55a230e3fed8e5ba90 SHA512 1b6291e07ce4f1c980aa20931ae269ebc6d0d7b3959d471c28355ad39d2dcd1eec7b58d2dc8fc18712571f113328cbd1f91a1ca2866a796de800b054d95f9abf WHIRLPOOL e183949f4e4114cdffd4faeda6f04325ebfe654e1582182305e17764f9b6e7a4f5b9734ef3075d99806d78f952125023819400acc962283e17b5928c74541701
+EBUILD speed-dreams-1.4.0.ebuild 1845 SHA256 8a8af6b8e8f9a8c32e05338d9880f6326bd6cc610f051fa70035d89afc60dc00 SHA512 f5dbbb616ab550dc3f84ee80d70e8fe43df9de093123f616608da5342881fbd721f373d999ccb9da022efb922a7d9f42db6c164330a6fa3bcd72b97f2c223b38 WHIRLPOOL 702fe2e1cb2d04c4fe425a04346cffbe80ff4a06ec68168f92f854969b4e7697dfab1179f9d12155c08b61e9b5c6e76920ae86e64ae1596c5b2793d2c9f1f599
+MISC ChangeLog 3357 SHA256 d0c85fc98027052f65f0df9c3603a464d59ec73dc36d813f2e2858a6d2057a3f SHA512 a6ca110afc1426da20fa84ebba807838c055d3dddae63483d6a3277dc3d43d2e54cae266aead92f1e70c89732735010513d5daa56401d3608b8604dc33816ca5 WHIRLPOOL 585afd2d7d81065f7484d941511ac05ef8d02cf3eafe48e4a0338425bdc15f18c63c2b8ab36e347fdb2b21f3af460c09dd88eab23a259afba0644229aaf34022
+MISC ChangeLog-2015 2203 SHA256 5b1ac4e4fb8a67d846ae7fb0e87be3020b072862c053c3a56541d602f7e6d238 SHA512 5eea509bb531cfd647c42058841891b24b255468f9e6d2d5ef1e34253cd0c75c8dde7372191170cb31b7a6ea17410b5cd29cde91af229c2e296e8d65132a74a7 WHIRLPOOL 2ebd0f224e081ec564595fd1657affb00a64c350a57e81e461aa0b7006c31fd2fdcdec0e15df67bfa9497d59b7afee10fde3d820c1fb551a4fb185dcc9063789
+MISC metadata.xml 435 SHA256 dda70b6ef364b1f09e0a3984a304683c7a569fc97f0b302f638013563b7bb4f6 SHA512 d7b7bcb0acec23ac1f3b45f794a99597318194ab58d9b488c21766a8a6c32572b3d62540090a0c06e06a7f90d4330d3f7eb730e4c4a56a0a7a7c2bc94d77ed2f WHIRLPOOL 358c55411943bc971c537576c62806ea7305bfc4711001f58687c713f5786daa346ef3779ae387b3011ce0d4c16615650c471f5d21693cc3928279b26d0190ff
diff --git a/games-sports/speed-dreams/files/speed-dreams-1.4.0-asneeded.patch b/games-sports/speed-dreams/files/speed-dreams-1.4.0-asneeded.patch
new file mode 100644
index 000000000000..779119d995b1
--- /dev/null
+++ b/games-sports/speed-dreams/files/speed-dreams-1.4.0-asneeded.patch
@@ -0,0 +1,110 @@
+--- a/configure.in
++++ b/configure.in
+@@ -123,8 +123,7 @@
+ AC_CHECK_LIB(Xrandr, XRRQueryVersion,,AC_MSG_ERROR([Can't find libXrandr. Please check config.log and if you can't solve the problem send the file to speed-dreams-users@lists.sourceforge.net with the subject \"Speed Dreams compilation problem\"]))
+ AC_CHECK_LIB(openal, alEnable,, AC_MSG_ERROR([Can't find AL/al.h. OpenAL can be found on http://www.openal.org/]))
+ AC_CHECK_LIB(alut, alutLoadWAVFile,
+- LDFLAGS="$LDFLAGS -lalut",
+- LDFLAGS="$LDFLAGS")
++ LIBS="$LIBS -lalut", )
+
+ AC_CHECK_LIB(dl, dlopen)
+ AC_CHECK_FUNC(dlopen,,AC_MSG_ERROR([Can't find dlopen function. Please check config.log and if you can't solve the problem send the file to speed-dreams-users@lists.sourceforge.net with the subject \"Speed Dreams compilation problem\"]))
+@@ -141,7 +140,7 @@
+ AC_CHECK_LIB(glut, glutSwapBuffers,,AC_MSG_ERROR([Can't find libglut. freeglut can be found on http://freeglut.sourceforge.net/]))
+
+ dnl Checks for plib libraries.
+-LDFLAGS="$LDFLAGS -lplibjs"
++AC_CHECK_LIB(plibjs, main,,AC_MSG_ERROR([Can't find libplibjs. PLIB can be found on http://plib.sourceforge.net/]))
+ AC_CHECK_LIB(plibul, main,,AC_MSG_ERROR([Can't find libplibul. PLIB can be found on http://plib.sourceforge.net/]))
+ AC_CHECK_LIB(plibsg, main,,AC_MSG_ERROR([Can't find libplibsg. PLIB can be found on http://plib.sourceforge.net/]))
+ AC_CHECK_LIB(plibsl, main,,AC_MSG_ERROR([Can't find libplibsl. PLIB can be found on http://plib.sourceforge.net/]))
+--- a/Make-default.mk
++++ b/Make-default.mk
+@@ -402,7 +402,7 @@
+ ifdef PROGRAM
+
+ ${PROGRAM}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${SOLIBS} ${EXT_LIBS} -o $@
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ installprogram: ${PROGRAM}
+ @ createdir="${INSTLIBBASE}" ; \
+@@ -420,14 +420,14 @@
+ ifdef LOCALTOOLS
+
+ ${LOCALTOOLS}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${EXT_LIBS} ${SOLIBS} -o $@
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ endif
+
+ ifdef TOOLS
+
+ ${TOOLS}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${EXT_LIBS} ${SOLIBS} -o $@
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ installtools: ${TOOLS}
+ @createdir="${INSTBINBASE}/${TOOLSDIR}" ; \
+@@ -478,7 +478,7 @@
+ ifdef SOLIBRARY
+
+ ${SOLIBRARY}: ${OBJECTS}
+- ${CXX} -shared -o ${SOLIBRARY} ${OBJECTS} ${LDFLAGS} ${LIBSPATH} ${LIBS} ${DEBUG_LIBS}
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -o ${SOLIBRARY} ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+ @D=`pwd` ; \
+ createdir="${EXPORTBASE}/lib" ; \
+ $(mkinstalldirs) $$createdir ; \
+@@ -509,7 +509,7 @@
+ ifdef MODULE
+
+ ${MODULE}: ${OBJECTS}
+- ${CXX} -shared -o ${MODULE} ${OBJECTS} ${LDFLAGS} ${LIBSPATH} ${LIBS}
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -o ${MODULE} ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+ @D=`pwd` ; \
+ createdir="${EXPORTBASE}/${MODULEDIR}" ; \
+ $(mkinstalldirs) $$createdir ; \
+--- a/src/libs/client/Makefile
++++ b/src/libs/client/Makefile
+@@ -23,6 +23,8 @@
+ SOURCES = entry.cpp mainmenu.cpp splash.cpp exitmenu.cpp \
+ optionmenu.cpp
+
++SOLIBS = -lconfscreens -lraceengine
++
+ LIBS = -lplibssg -lplibsg -lplibul
+
+ EXPDIR = include
+--- a/src/libs/Makefile
++++ b/src/libs/Makefile
+@@ -23,7 +23,7 @@
+
+ TOOLSUBDIRS = txml
+
+-SUBDIRS = confscreens racescreens robottools txml tgf tgfclient client raceengineclient learning \
++SUBDIRS = confscreens racescreens robottools txml tgf tgfclient raceengineclient client learning \
+ portability math
+
+ PKGSUBDIRS = $(SUBDIRS)
+--- a/src/libs/raceengineclient/Makefile
++++ b/src/libs/raceengineclient/Makefile
+@@ -23,6 +23,8 @@
+ SOURCES = singleplayer.cpp raceinit.cpp racemain.cpp racemanmenu.cpp racestate.cpp racegl.cpp \
+ raceengine.cpp raceresults.cpp
+
++SOLIBS = -lconfscreens -lrobottools -lracescreens
++
+ EXPDIR = include
+
+ EXPORTS = singleplayer.h raceinit.h
+--- a/src/libs/tgf/Makefile
++++ b/src/libs/tgf/Makefile
+@@ -29,6 +29,7 @@
+ profiler.cpp \
+ hash.cpp
+
++SOLIBS = -ltxml
+
+ EXPDIR = include
+
diff --git a/games-sports/speed-dreams/files/speed-dreams-1.4.0-automake.patch b/games-sports/speed-dreams/files/speed-dreams-1.4.0-automake.patch
new file mode 100644
index 000000000000..72c755af9ebd
--- /dev/null
+++ b/games-sports/speed-dreams/files/speed-dreams-1.4.0-automake.patch
@@ -0,0 +1,35 @@
+--- a/configure.in 2012-03-13 08:15:34.891163505 +0100
++++ b/configure.in 2012-03-13 08:18:40.154092687 +0100
+@@ -14,9 +14,10 @@
+ #
+ ##############################################################################
+
+-AC_INIT(Make-config.in)
++AC_INIT([speed-dreams], [1.4.0-r2307])
++AC_CONFIG_SRCDIR([Make-config.in])
+ AC_CONFIG_HEADERS(config.h)
+-AM_INIT_AUTOMAKE(speed-dreams, 1.4.0-r2307)
++AC_DEFINE(VERSION, ["1.4.0-r2307"], [Version])
+
+ dnl Checks for programs.
+ AC_PROG_CC
+--- a/Makefile 2012-03-13 10:43:30.563720337 +0100
++++ b/Makefile 2012-03-13 10:44:26.339794119 +0100
+@@ -88,17 +88,7 @@
+ -include ${MAKE_DEFAULT}
+
+ Make-config: configure Make-config.in
+- rm -f config.status config.log config.cache
+ ./configure
+- rm -f config.status config.log config.cache
+-
+-configure: configure.in config.h.in aclocal.m4
+- rm -f config.status config.log config.cache
+- autoheader
+- autoconf
+-
+-aclocal.m4: acinclude.m4
+- aclocal
+
+ distclean: clean
+ rm -f config.status config.log config.cache
diff --git a/games-sports/speed-dreams/files/speed-dreams-1.4.0-libpng15.patch b/games-sports/speed-dreams/files/speed-dreams-1.4.0-libpng15.patch
new file mode 100644
index 000000000000..6b09ce2a41c8
--- /dev/null
+++ b/games-sports/speed-dreams/files/speed-dreams-1.4.0-libpng15.patch
@@ -0,0 +1,20 @@
+--- a/src/libs/tgfclient/img.cpp
++++ b/src/libs/tgfclient/img.cpp
+@@ -98,7 +98,7 @@
+ return (unsigned char *)NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+@@ -229,7 +229,7 @@
+ return -1;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(fp);
+ return -1;
diff --git a/games-sports/speed-dreams/files/speed-dreams-1.4.0-math-hack.patch b/games-sports/speed-dreams/files/speed-dreams-1.4.0-math-hack.patch
new file mode 100644
index 000000000000..32b4f85a2000
--- /dev/null
+++ b/games-sports/speed-dreams/files/speed-dreams-1.4.0-math-hack.patch
@@ -0,0 +1,25 @@
+https://sourceforge.net/p/speed-dreams/tickets/952/
+https://bugs.gentoo.org/580054
+
+--- a/src/modules/simu/simuv2/simu.cpp
++++ b/src/modules/simu/simuv2/simu.cpp
+@@ -61,7 +61,7 @@
+ if (isnan(car->ctrl->brakeCmd) || isinf(car->ctrl->brakeCmd)) car->ctrl->brakeCmd = 0;
+ if (isnan(car->ctrl->clutchCmd) || isinf(car->ctrl->clutchCmd)) car->ctrl->clutchCmd = 0;
+ if (isnan(car->ctrl->steer) || isinf(car->ctrl->steer)) car->ctrl->steer = 0;
+- if (isnan(car->ctrl->gear) || isinf(car->ctrl->gear)) car->ctrl->gear = 0;
++ if (isnan((float)car->ctrl->gear) || isinf((float)car->ctrl->gear)) car->ctrl->gear = 0;
+ #else
+ if (isnan(car->ctrl->accelCmd)) car->ctrl->accelCmd = 0;
+ if (isnan(car->ctrl->brakeCmd)) car->ctrl->brakeCmd = 0;
+--- a/src/modules/simu/simuv3/simu.cpp
++++ b/src/modules/simu/simuv3/simu.cpp
+@@ -61,7 +61,7 @@
+ if (isnan(car->ctrl->brakeCmd) || isinf(car->ctrl->brakeCmd)) car->ctrl->brakeCmd = 0;
+ if (isnan(car->ctrl->clutchCmd) || isinf(car->ctrl->clutchCmd)) car->ctrl->clutchCmd = 0;
+ if (isnan(car->ctrl->steer) || isinf(car->ctrl->steer)) car->ctrl->steer = 0;
+- if (isnan(car->ctrl->gear) || isinf(car->ctrl->gear)) car->ctrl->gear = 0;
++ if (isnan((float)car->ctrl->gear) || isinf((float)car->ctrl->gear)) car->ctrl->gear = 0;
+ #else
+ if (isnan(car->ctrl->accelCmd)) car->ctrl->accelCmd = 0;
+ if (isnan(car->ctrl->brakeCmd)) car->ctrl->brakeCmd = 0;
diff --git a/games-sports/speed-dreams/metadata.xml b/games-sports/speed-dreams/metadata.xml
new file mode 100644
index 000000000000..7585d6ad4181
--- /dev/null
+++ b/games-sports/speed-dreams/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="xrandr">Enable support for the X xrandr extension</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">speed-dreams</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/speed-dreams/speed-dreams-1.4.0-r1.ebuild b/games-sports/speed-dreams/speed-dreams-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..a59596cbb565
--- /dev/null
+++ b/games-sports/speed-dreams/speed-dreams-1.4.0-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils versionator
+
+DESCRIPTION="A fork of the famous open racing car simulator TORCS"
+HOMEPAGE="http://speed-dreams.sourceforge.net/"
+SRC_URI="mirror://sourceforge/speed-dreams/${P}-r2307-src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="xrandr"
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ media-libs/freealut
+ media-libs/freeglut
+ >=media-libs/libpng-1.2.40:0
+ media-libs/openal
+ sys-libs/zlib
+ x11-libs/libX11
+ x11-libs/libXxf86vm
+ xrandr? ( x11-libs/libXrandr )"
+DEPEND="${RDEPEND}
+ >=media-libs/plib-1.8.3
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXt
+ x11-libs/libXmu
+ x11-libs/libXrender
+ x11-proto/xproto
+ xrandr? ( x11-proto/randrproto )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)-src
+
+PATCHES=(
+ "${FILESDIR}"/${P}-asneeded.patch
+ "${FILESDIR}"/${P}-automake.patch
+ "${FILESDIR}"/${P}-libpng15.patch
+ "${FILESDIR}"/${P}-math-hack.patch
+)
+
+src_prepare() {
+ default
+
+ # https://sourceforge.net/apps/trac/speed-dreams/ticket/111
+ MAKEOPTS="${MAKEOPTS} -j1"
+
+ sed -i \
+ -e '/ADDCFLAGS/s: -O2::' \
+ configure.in || die
+ sed -i \
+ -e '/COPYING/s:=.*:= \\:' \
+ Makefile || die
+ sed -i \
+ -e '/LDFLAGS/s:-L/usr/lib::' \
+ -e "/^datadir/s:=.*:= /usr/share/games/${PN}:" \
+ Make-config.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ addpredict $(echo /dev/snd/controlC? | sed 's/ /:/g')
+ [[ -e /dev/dsp ]] && addpredict /dev/dsp
+ econf \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ $(use_enable xrandr)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install datainstall
+
+ find "${D}" -name Makefile -exec rm -f {} +
+
+ dodoc CHANGES README TODO
+
+ newicon icon.svg ${PN}.svg
+ make_desktop_entry ${PN} "Speed Dreams"
+}
diff --git a/games-sports/speed-dreams/speed-dreams-1.4.0.ebuild b/games-sports/speed-dreams/speed-dreams-1.4.0.ebuild
new file mode 100644
index 000000000000..ae1445e44a4b
--- /dev/null
+++ b/games-sports/speed-dreams/speed-dreams-1.4.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils versionator games
+
+DESCRIPTION="A fork of the famous open racing car simulator TORCS"
+HOMEPAGE="http://speed-dreams.sourceforge.net/"
+SRC_URI="mirror://sourceforge/speed-dreams/${P}-r2307-src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="xrandr"
+
+RDEPEND="virtual/opengl
+ virtual/glu
+ media-libs/freeglut
+ media-libs/openal
+ media-libs/freealut
+ x11-libs/libX11
+ x11-libs/libXxf86vm
+ xrandr? ( x11-libs/libXrandr )
+ sys-libs/zlib
+ >=media-libs/libpng-1.2.40:0"
+DEPEND="${RDEPEND}
+ >=media-libs/plib-1.8.3
+ x11-proto/xproto
+ x11-libs/libXext
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXt
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXrender
+ xrandr? ( x11-proto/randrproto )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)-src
+
+src_prepare() {
+ # https://sourceforge.net/apps/trac/speed-dreams/ticket/111
+ MAKEOPTS="${MAKEOPTS} -j1"
+
+ epatch \
+ "${FILESDIR}"/${P}-asneeded.patch \
+ "${FILESDIR}"/${P}-automake.patch \
+ "${FILESDIR}"/${P}-libpng15.patch \
+ "${FILESDIR}"/${P}-math-hack.patch
+
+ sed -i \
+ -e '/ADDCFLAGS/s: -O2::' \
+ configure.in || die
+ sed -i \
+ -e '/COPYING/s:=.*:= \\:' \
+ Makefile || die
+ sed -i \
+ -e '/LDFLAGS/s:-L/usr/lib::' \
+ -e "/^datadir/s:=.*:= ${GAMES_DATADIR}/${PN}:" \
+ Make-config.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ addpredict $(echo /dev/snd/controlC? | sed 's/ /:/g')
+ [[ -e /dev/dsp ]] && addpredict /dev/dsp
+ egamesconf \
+ --prefix=/usr \
+ --bindir="${GAMES_BINDIR}" \
+ $(use_enable xrandr)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install datainstall
+
+ find "${D}" -name Makefile -exec rm -f {} +
+
+ dodoc CHANGES README TODO
+
+ newicon icon.svg ${PN}.svg
+ make_desktop_entry ${PN} "Speed Dreams"
+
+ prepgamesdirs
+}
diff --git a/games-sports/stormbaancoureur/Manifest b/games-sports/stormbaancoureur/Manifest
new file mode 100644
index 000000000000..56f1d004f89b
--- /dev/null
+++ b/games-sports/stormbaancoureur/Manifest
@@ -0,0 +1,7 @@
+AUX stormbaancoureur-2.1.6-gentoo.patch 3705 SHA256 12b75c0b9b2a53ba05cc256bbd0bbc3bd43587654e57f46155c9496b22e00087 SHA512 a879e05a420cf98760f245c66f60f985e0444bda1be5bde1ec509954d5d3fc184c11d96fb3a199122f6f3a9789ca2ad557e85a7d0380a2ce2e0ca410f820680b WHIRLPOOL 3a20d67d712b5f126a72999320fba9a5408a8c511494219e1c5ce0893224fcb455e5a8e8281867cf72ab20ef371a22e33259c46dce0fd3f4f30dfe1f856e30c5
+DIST stormbaancoureur-2.1.6.tar.gz 3976459 SHA256 c6bd67695734fd430ce8e8d744710531ed4dae1bc78d5cd0529af930144e7903 SHA512 af949efc966aa088e75aadae27cd6b7e4e342d3fa00563a756ce6fb90b0ea64071f2e85087644fb6472db81c6a92584b485c5dcc71653cc54d90231e60bafd08 WHIRLPOOL 56917ebaa653ebb4271234f6e8fd0af96c246063e2f6eb4227055250b4e3f67ea6d4a64b1141b05a8546b4f6c4d085ba6935b77d48343921a87c8926e34a289a
+EBUILD stormbaancoureur-2.1.6-r1.ebuild 846 SHA256 dc235c7c7b9946a9ef8be4970ca64298327eb2a84f7e730d23cf31afa661988d SHA512 50271f9b08e8c4d5912ecf11f4bf28536cf890b3b73352edc5c71f87d4702b26ebcc938500926ad4bc9547debca8a830ba0c5a0735a4780b80e1d76da0fbec69 WHIRLPOOL a0ac1af70f5d8ed1f2227a2666c9d779cb163db3058033c3abf0fc176689e755a2e3d51fe1c947854a3c98581ae478f1037cd52ebd20b2e33484b22b0f0b5f45
+EBUILD stormbaancoureur-2.1.6.ebuild 866 SHA256 2b563048228b5a56c8a936ffc33067c1bcb1da7c15e7b0adda5ac25359ab9361 SHA512 ac4e45521d149dd9b3348e3dfeb0bf52657a4592c67aff79a48f77892f2070550ad877a6ffbabdaeae0201783f2facdbec890c9a09a909fbc7278c79ee3f37ef WHIRLPOOL 6dec292bb27211631fe1e157e3e5c007b60da8b9c5789ccf3286722c43aeec38535168a561b8fe82aedf9669b393bd2d1d04a9738d358113ca304f2e51bac6f4
+MISC ChangeLog 2821 SHA256 3b16e0e799dccd304d55279e65054a0b67098b550b9b711601b721b97c49e46a SHA512 ad8eb7ee0fef450e62b47df7fa8b833a67750c044ff0df60cc96bc0d96acb81c2c88010e65dd300e6300a0d80eb6ca15ec5c46aa026baac1b336054fd21fd8dc WHIRLPOOL b71cb645202497c6bad84fd4b3962fc4a5419994369306d475458f23a3aabdb67924c17bbe4a2dade73d2cf72bc8cb336dd97999eb5f85af7ceac1d46b68e912
+MISC ChangeLog-2015 3346 SHA256 9ad0cb1e8238b939c6230d4103086454accf7294f2551c534599e16acb506245 SHA512 979791bca06151fd8cc59075e5a7d2a80cd76482926fd5510283ceb2cae407e1660f367dbfb26cd1826ca7a8a44fc4d5cda5794d64ea2d2093163bfaacbdda1c WHIRLPOOL 2059e27168ebb491539e216e642dd19e74d20111347f9c66f35f19153f849599e990be4384d31f795a15ed3980b779f6c6c9b7f5e23ced3bc673f76c78c43d2b
+MISC metadata.xml 249 SHA256 943b9ce0cd072229b43569ab668dd7ec741d9dfefd942c8921dabd4490b27b0c SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 WHIRLPOOL b10e21575c78e201a652c8582cd16e3f7c86b13dd20a30f4cea44066fb139440b3c186147dbaae83478f11a20b6f457a99c8b29ee1239a4caaa21eee01250088
diff --git a/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-gentoo.patch b/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-gentoo.patch
new file mode 100644
index 000000000000..4523d677e9f8
--- /dev/null
+++ b/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-gentoo.patch
@@ -0,0 +1,110 @@
+--- src-stormbaancoureur/Makefile
++++ src-stormbaancoureur/Makefile
+@@ -5,21 +5,21 @@
+ GLPREFIX=/usr
+ PLIBPREFIX=/usr
+ ODEPREFIX=/usr
+-CXX=g++
+ LIBDIRNAME=lib
+
+ # END OF CUSTOM SETTINGS
+
+-CXXFLAGS=\
++LCXXFLAGS:=\
+ -I$(GLPREFIX)/include \
+ -I$(ODEPREFIX)/include \
+ -I$(PLIBPREFIX)/include \
+ -I../src-common \
+ -I. \
+ -DGAMEVERSION=$(VERSION) \
+- -O2 -g -Wall
++ $(shell ode-config --cflags) \
++ $(CXXFLAGS)
+
+-LFLAGS=\
++LFLAGS= $(LDFLAGS) \
+ -L$(PLIBPREFIX)/$(LIBDIRNAME) \
+ -L/usr/X11R6/$(LIBDIRNAME)
+
+@@ -39,7 +38,7 @@
+
+
+ LIBS=\
+- $(ODEPREFIX)/$(LIBDIRNAME)/libode.a \
++ -lode \
+ -lplibssgaux -lplibssg -lplibsg -lplibpu -lplibfnt -lplibul \
+ -lglut -lGLU -lGL -lasound
+
+@@ -47,41 +46,41 @@
+ all: stormbaancoureur
+
+
+-stormbaancoureur: $(OBJS) $(ODEPREFIX)/$(LIBDIRNAME)/libode.a
++stormbaancoureur: $(OBJS)
+ $(CXX) -o stormbaancoureur $(OBJS) $(LFLAGS) $(LIBS)
+
+ staticworldobject.o: ../src-common/staticworldobject.cxx ../src-common/staticworldobject.h ../src-common/worldobject.h
+- $(CXX) -c $(CXXFLAGS) ../src-common/staticworldobject.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/staticworldobject.cxx
+
+ dynamicobject.o: ../src-common/dynamicobject.cxx ../src-common/dynamicobject.h ../src-common/worldobject.h
+- $(CXX) -c $(CXXFLAGS) ../src-common/dynamicobject.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/dynamicobject.cxx
+
+ carobject.o: carobject.cxx carobject.h
+- $(CXX) -c $(CXXFLAGS) carobject.cxx
++ $(CXX) -c $(LCXXFLAGS) carobject.cxx
+
+ controllerpad.o: controllerpad.cxx controller.h ../src-common/joydb.h
+- $(CXX) -c $(CXXFLAGS) controllerpad.cxx
++ $(CXX) -c $(LCXXFLAGS) controllerpad.cxx
+
+ controllerkey.o: controllerkey.cxx
+- $(CXX) -c $(CXXFLAGS) controllerkey.cxx
++ $(CXX) -c $(LCXXFLAGS) controllerkey.cxx
+
+ intro.o: intro.cxx intro.h
+- $(CXX) -c $(CXXFLAGS) intro.cxx
++ $(CXX) -c $(LCXXFLAGS) intro.cxx
+
+ vectortext.o: ../src-common/vectortext.cxx ../src-common/vectortext.h
+- $(CXX) -c $(CXXFLAGS) ../src-common/vectortext.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/vectortext.cxx
+
+ postscore.o: postscore.cxx postscore.h
+- $(CXX) -c $(CXXFLAGS) postscore.cxx
++ $(CXX) -c $(LCXXFLAGS) postscore.cxx
+
+ soundenginealsa.o: ../src-common/soundenginealsa.cxx ../src-common/soundenginealsa.h ../src-common/soundfeed.h ../src-common/soundclip.h
+- $(CXX) -c $(CXXFLAGS) ../src-common/soundenginealsa.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/soundenginealsa.cxx
+
+ ogl.o: ../src-common/ogl.cxx
+- $(CXX) -c $(CXXFLAGS) ../src-common/ogl.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/ogl.cxx
+
+ main.o: main.cxx ../src-common/usercam.h ../src-common/trackingcam.h ../src-common/soundenginealsa.h cratewall.h controller.h intro.h plodegui.h doorstand.h carpettrack.h spikejump.h ferriswheel.h turntable.h sturmbahn.h ../src-common/modelmap.h starsky.h carobject.h respawnpoint.h
+- $(CXX) -c $(CXXFLAGS) main.cxx
++ $(CXX) -c $(LCXXFLAGS) main.cxx
+
+ debugrun: stormbaancoureur
+ PLODE_DATADIR=`pwd` gdb ./stormbaancoureur
+--- src-stormbaancoureur/main.cxx
++++ src-stormbaancoureur/main.cxx
+@@ -836,15 +836,7 @@
+ fprintf(stderr,"plib is (c) by Steve Baker\n");
+ fprintf(stderr,"OpenDE is (c) by Russel L. Smith\n");
+
+- char *bindirname = dirname(argv[0]);
+- if (!strcmp(bindirname,"."))
+- dirprefix="/usr/share/games/stormbaancoureur";
+- else
+- {
+- dirprefix = dirname(bindirname) + std::string("/share/games/stormbaancoureur");
+- }
+- if (getenv("PLODE_DATADIR"))
+- dirprefix = getenv("PLODE_DATADIR");
++ dirprefix="GENTOODIR";
+ if (getenv("PLODE_DISPLAYMODE"))
+ displaymode = getenv("PLODE_DISPLAYMODE");
+ assert(displaymode == "monoscopic" || displaymode == "quadbufferstereoscopic" || displaymode == "passivestereoscopic");
diff --git a/games-sports/stormbaancoureur/metadata.xml b/games-sports/stormbaancoureur/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-sports/stormbaancoureur/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-sports/stormbaancoureur/stormbaancoureur-2.1.6-r1.ebuild b/games-sports/stormbaancoureur/stormbaancoureur-2.1.6-r1.ebuild
new file mode 100644
index 000000000000..fd84d6d9c602
--- /dev/null
+++ b/games-sports/stormbaancoureur/stormbaancoureur-2.1.6-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+DESCRIPTION="Simulated obstacle course for automobiles"
+HOMEPAGE="http://www.stolk.org/stormbaancoureur/"
+SRC_URI="http://www.stolk.org/stormbaancoureur/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ >=dev-games/ode-0.8
+ media-libs/alsa-lib
+ media-libs/freeglut
+ >=media-libs/plib-1.8.4
+ virtual/glu
+ virtual/opengl"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${P}/src-${PN}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_prepare() {
+ default
+
+ sed -ie "s:GENTOODIR:/usr/share/${PN}:" main.cxx || die
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /usr/share/${PN}
+ doins -r images/ models/ sounds/ shaders/
+ dodoc JOYSTICKS README TODO
+ make_desktop_entry ${PN} "Stormbaan Coureur"
+}
diff --git a/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild b/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild
new file mode 100644
index 000000000000..48dc4c8b0c87
--- /dev/null
+++ b/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils games
+
+DESCRIPTION="Simulated obstacle course for automobiles"
+HOMEPAGE="http://www.stolk.org/stormbaancoureur/"
+SRC_URI="http://www.stolk.org/stormbaancoureur/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="virtual/opengl
+ virtual/glu
+ media-libs/freeglut
+ >=dev-games/ode-0.8
+ >=media-libs/plib-1.8.4
+ media-libs/alsa-lib"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${P}/src-${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ sed -ie "s:GENTOODIR:${GAMES_DATADIR}/${PN}:" main.cxx || die
+}
+
+src_install() {
+ dogamesbin ${PN}
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r images/ models/ sounds/ shaders/
+ dodoc JOYSTICKS README TODO
+ make_desktop_entry ${PN} "Stormbaan Coureur"
+ prepgamesdirs
+}
diff --git a/games-sports/torcs/Manifest b/games-sports/torcs/Manifest
new file mode 100644
index 000000000000..c9e0c378b5dd
--- /dev/null
+++ b/games-sports/torcs/Manifest
@@ -0,0 +1,12 @@
+AUX torcs-1.3.6-as-needed.patch 4112 SHA256 368285ea3efdc5118730e3e09b47f06796e77e6a65007fbf032356de91901c2b SHA512 8df4f57b470100c123de5868edc471e4233bf7c8e3d23f759a822536ab28e74403375ecdbcbc404ed442d6820260db97d6c76be7d4fabdef7015722600148b2c WHIRLPOOL a345f4ba17c104e38261fe7bf4cd3044c1e5289a2319c153774fc8f7ce273fd1e64b43cc8c6f6d155c00ac0dae536f6c2a42c7e197a241c8920ad61d9da64db2
+AUX torcs-1.3.6-flags.patch 412 SHA256 2cc81e8fe19a88c367fdb2918d32cbcd3f62d7a1a77442057caeaad277555fcb SHA512 875ee57815c11b7c12617b6ee7eec08c7759df5d50bf13f52fdc29ffc9d4cec3689368f5eecfd3ae6739dfe1b4031d1335b9dbcf1c5df0472c36f061d031759e WHIRLPOOL 045e75a4f2a05965952167a6f2d25b29a30f8e852296b96e12e7c600416e42c52b62b0dbfc30dcf429a8c45335e8a6999c55b356180fdadd21f78f9591cf4897
+AUX torcs-1.3.6-format.patch 1012 SHA256 baf4b26749de1a806030fb3e3e9a56e808997d6dda050d266cdec54d9f94a534 SHA512 6368ab1df79005f5dede537b45db7ccc1943c2c53e0c696ff6b743680f2d48508e29b5ad56b10a373beddf28c82d5f123998d9e794b66ce49e0ea2226f2332aa WHIRLPOOL d01f6be34d41387965f544024d8f50d1ec361ab94dbf16ee590e54705b0d9c65666e65f701d753d41da91a7df6c17c14c6c8c9348f97fd67a0c7d05aa87cbb89
+AUX torcs-1.3.6-gcc6.patch 215 SHA256 27338dfe88c568f0fc23885bf5c85b0ad7b1c9d6d898ea159414977c19141a03 SHA512 9c29c78c4a2f6d2ea187f80c4c10337556ec13cf7dbe4380af37bccd0fa09a67a6209caff319a50c65f9e831b7d07c1af2c1ba8c33d9a3addc55713988fc3e46 WHIRLPOOL a3499d7dd457fac26cbdff143b7056f2ec8017d3eb3f51cc0929b4923928139152c2b2eae7f49b7bf3afbf2f2d3e2bacfd17d439920f4135962d621be4215142
+AUX torcs-1.3.6-no-automake.patch 597 SHA256 9c3ac2cb678fb56110c264ae656f387d9fdf7f729a1d8c5a2b6ff58208f7b224 SHA512 ba450b2e4ed438af241d81fdd0e522f960d2e46b81ce1339a08b0238e7000ccd304b8f74e6906e1742839b754963c9bbb7efae959f4bd7ac1bf9b32d9a94d4e1 WHIRLPOOL 5cec185e2bcba3f9d5c49f7ea5bd203b97bd1240614b55813b5945fc601d9267e73ff65ca8263be3a176d38cf8eadfa05c8172eee7698cfc242358616ea82230
+AUX torcs-1.3.6-noXmuXt.patch 2107 SHA256 6ec2637c53255a7b4f0b69ed8737ba874f5b5aaf6047dd7720f706545a4ea568 SHA512 573e63f49039b40172517bd876a68b0f35ce1abca9f35b1ae68d579c5f758d1466fcc9f59c85c72aabd4672934d0df006fd9ed5a8b626067c76be1034e8d1ddb WHIRLPOOL 4d6fd623fbdf40fa2428955521922b6b0a02a4c7e73aab4a088d348f1a8a990f3bb4af2ffc867b3301165101540fd61e9dacc5d746d0e05d7a4d2406d3f82949
+DIST torcs-1.3.6.tar.bz2 477954437 SHA256 193cb1820170eb18335dffeaa345499229a4b7972a78acbfaca197597a3075af SHA512 4116c920b92ecbf5dcd3f14a137e86685651167f68725f2ad4549b2d3d20e3dc54569685925e08ffff6e7e19e532ecb1a95ec77dfe22a542a26c9e006b0c8c0d WHIRLPOOL 41579dc91f3df9950a9808d7c858f736b0218a781bf8565914097edca4ba2918ea6f5434335f5f6fae488d391bbce2f7c68be613fbd95825575497d093124f10
+EBUILD torcs-1.3.6-r1.ebuild 1398 SHA256 622d8d2b3689d043ca6b639e6f1360ebafcf06cd043d6362eef4d001dfaabc8c SHA512 1bcbd9fb1c5dae0aacf3da8575f8a56b8c835937a4b8994e8a17f94299cdc48293b5931a14dd3f0e0e12f8570ec98d9eb38b7d03d8d081f6c051089fa68c8a6e WHIRLPOOL 947c5296880e8e165ec6b2bf3b13fc263555a362497baa44cfe5862a38b06bba9487f02005710260bee72fc1fd6a82405d56136381ab71f2418029f740acd8ab
+EBUILD torcs-1.3.6.ebuild 1439 SHA256 02682fade5b7ebccce1dddd7ceb916eb2860ca469191900235ebb30573a0ef90 SHA512 b9fe5dbcaa8bc3f3f3fee8e326912f24def1b2035d270123c38ff9943ce8905e49ec4bc168c601b4c181b57f8cbe6e17204b8c09eefe2569809db1c9582b8695 WHIRLPOOL 9e1044d35900f72674406be6274acd4999312364e4374f932ab801c93c54e3efad021dadd90c9289d5c312af49dbcf7be5b270145df2f323fcb7a6f8b8ae499e
+MISC ChangeLog 3071 SHA256 f945f26d653814c61bc2f060fcf15ecd345157e2973c9d6ae8697c306ab3b04c SHA512 cc9f67405ce7cd11903e710b1eae618cc23b6b6ce3c52b22f5e7b725b40fd9c769805d7ead4a2d0b47116438b1bf9181fa1dfafc287715e89a07752a53dd4402 WHIRLPOOL b49bf40d94d26bb1ca91a83e85f26b508ccc6f95ac71d1dfd0dd27c24122168ad68501a6de4e2247a3c003c8b15250e61e887bdef223adeba0eb5312fcd9f6fa
+MISC ChangeLog-2015 7147 SHA256 826021976994b3fd6213ee4981bfc28ca472ecacd000a47728e0b6ba7cb579ed SHA512 8934861146ab71d3a880bda35bd4a72d053949d08a650c94b877e259b9842b331c0bebc9a0074caeb10deaa28782f1b8f787b699fc3f8e3e60a6962ab5487f36 WHIRLPOOL 3db0ff3d80b4454981c2b54b848a97030b85c9e2c962cd21ad7c79305a44da90e82243bf3011afd43a823d25596daca4c8931d7e08873081b3a114d11b30e77c
+MISC metadata.xml 328 SHA256 86f3c1c00b86d711e84415cf7e02e5be3db2250d38163cd387d558d3057cf0e2 SHA512 f146cbabfd1d356485e94c0811bcdaa29b027bf054e319f6c49d8c9c50f3cb235f34f684dab42f5534ab4bfcffb440c9c8b8a2dc9f7d97316b28656d3ad1c91d WHIRLPOOL 1dba41facce40bc4289c979432978c7da38884c7b0a07ed249b5850f9ea75dc5b4a810edff2048fafe236f3468466f7aa9573b558c327b58547fc46bb39ed344
diff --git a/games-sports/torcs/files/torcs-1.3.6-as-needed.patch b/games-sports/torcs/files/torcs-1.3.6-as-needed.patch
new file mode 100644
index 000000000000..d848538c07ea
--- /dev/null
+++ b/games-sports/torcs/files/torcs-1.3.6-as-needed.patch
@@ -0,0 +1,96 @@
+--- torcs-1.3.6.orig/Make-default.mk
++++ torcs-1.3.6/Make-default.mk
+@@ -402,7 +402,7 @@
+ ifdef PROGRAM
+
+ ${PROGRAM}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${SOLIBS} ${EXT_LIBS} -o $@
++ ${CXX} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ installprogram: ${PROGRAM}
+ @ createdir="${INSTLIBBASE}" ; \
+@@ -420,14 +420,14 @@
+ ifdef LOCALTOOLS
+
+ ${LOCALTOOLS}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${EXT_LIBS} ${SOLIBS} -o $@
++ ${CXX} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ endif
+
+ ifdef TOOLS
+
+ ${TOOLS}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
+- ${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${EXT_LIBS} ${SOLIBS} -o $@
++ ${CXX} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+
+ installtools: ${TOOLS}
+ @createdir="${INSTBINBASE}/${TOOLSDIR}" ; \
+@@ -478,7 +478,7 @@
+ ifdef SOLIBRARY
+
+ ${SOLIBRARY}: ${OBJECTS}
+- ${CXX} -shared -o ${SOLIBRARY} ${OBJECTS} ${SOLIBS} ${LDFLAGS} ${LIBSPATH} ${LIBS} ${DEBUG_LIBS}
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -o ${SOLIBRARY} ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+ @D=`pwd` ; \
+ createdir="${EXPORTBASE}/lib" ; \
+ $(mkinstalldirs) $$createdir ; \
+@@ -509,7 +509,7 @@
+ ifdef MODULE
+
+ ${MODULE}: ${OBJECTS}
+- ${CXX} -shared -o ${MODULE} ${OBJECTS} ${LDFLAGS} ${LIBSPATH} ${LIBS}
++ ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -o ${MODULE} ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
+ @D=`pwd` ; \
+ createdir="${EXPORTBASE}/${MODULEDIR}" ; \
+ $(mkinstalldirs) $$createdir ; \
+--- torcs-1.3.6.orig/configure.in
++++ torcs-1.3.6/configure.in
+@@ -123,11 +123,11 @@
+ AC_CHECK_LIB(Xxf86vm, XF86VidModeSetViewPort,,AC_MSG_ERROR([Can't find libXxf86vm. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+ AC_CHECK_LIB(Xrender, XRenderSetSubpixelOrder,,AC_MSG_ERROR([Can't find libXrender. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+ AC_CHECK_LIB(Xrandr, XRRQueryVersion,,AC_MSG_ERROR([Can't find libXrandr. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+-AC_CHECK_LIB(openal, alEnable, LDFLAGS="$LDFLAGS -lopenal", AC_MSG_ERROR([Can't find AL/al.h. OpenAL can be found on http://www.openal.org/]))
++AC_CHECK_LIB(openal, alEnable, LIBS="$LIBS -lopenal", AC_MSG_ERROR([Can't find AL/al.h. OpenAL can be found on http://www.openal.org/]))
+ AC_CHECK_LIB(alut, alutLoadWAVFile,
+- LDFLAGS="$LDFLAGS -lalut",
+- LDFLAGS="$LDFLAGS")
+-AC_CHECK_LIB(vorbisfile, ov_fopen, LDFLAGS="$LDFLAGS -lvorbisfile", AC_MSG_ERROR([Can't find libvorbis.]))
++ LIBS="$LIBS -lalut", )
++AC_CHECK_LIB(vorbisfile, ov_fopen, LIBS="$LIBS -lvorbisfile", AC_MSG_ERROR([Can't find libvorbis.]))
++
+
+ AC_CHECK_LIB(dl, dlopen)
+ AC_CHECK_FUNC(dlopen,,AC_MSG_ERROR([Can't find dlopen function. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+--- torcs-1.3.6.orig/src/libs/Makefile
++++ torcs-1.3.6/src/libs/Makefile
+@@ -23,7 +23,7 @@
+
+ TOOLSUBDIRS = txml
+
+-SUBDIRS = confscreens racescreens robottools txml tgf tgfclient client raceengineclient learning \
++SUBDIRS = confscreens racescreens robottools txml tgf tgfclient raceengineclient client learning \
+ portability math musicplayer
+
+ PKGSUBDIRS = $(SUBDIRS)
+--- torcs-1.3.6.orig/src/libs/client/Makefile
++++ torcs-1.3.6/src/libs/client/Makefile
+@@ -23,6 +23,8 @@
+ SOURCES = entry.cpp mainmenu.cpp splash.cpp exitmenu.cpp \
+ optionmenu.cpp
+
++SOLIBS = -lconfscreens -lraceengine
++
+ LIBS = -lplibssg -lplibsg -lplibul
+
+ EXPDIR = include
+--- torcs-1.3.6.orig/src/libs/tgf/Makefile
++++ torcs-1.3.6/src/libs/tgf/Makefile
+@@ -29,6 +29,7 @@
+ profiler.cpp \
+ hash.cpp
+
++SOLIBS = -ltxml
+
+ EXPDIR = include
+
diff --git a/games-sports/torcs/files/torcs-1.3.6-flags.patch b/games-sports/torcs/files/torcs-1.3.6-flags.patch
new file mode 100644
index 000000000000..5f11fd270ef1
--- /dev/null
+++ b/games-sports/torcs/files/torcs-1.3.6-flags.patch
@@ -0,0 +1,14 @@
+respect cflags
+
+--- torcs-1.3.6/configure.in
++++ torcs-1.3.6/configure.in
+@@ -50,8 +50,7 @@
+ ADDCFLAGS="-Wall -fPIC -fno-strict-aliasing"
+ AC_ARG_ENABLE(debug,
+ [ --enable-debug set the debug mode],
+- ADDCFLAGS="$ADDCFLAGS -g -DDEBUG -DDEBUG_OUT",
+- ADDCFLAGS="$ADDCFLAGS -O2")
++ ADDCFLAGS="$ADDCFLAGS -g -DDEBUG -DDEBUG_OUT")
+
+ AC_ARG_ENABLE(xrandr,
+ [ --disable-xrandr reset the XRANDR mode],
diff --git a/games-sports/torcs/files/torcs-1.3.6-format.patch b/games-sports/torcs/files/torcs-1.3.6-format.patch
new file mode 100644
index 000000000000..da59c4da4fa0
--- /dev/null
+++ b/games-sports/torcs/files/torcs-1.3.6-format.patch
@@ -0,0 +1,34 @@
+--- a/src/tools/texmapper/maintexmapper.cpp 2015-12-23 20:55:24.874102363 +0100
++++ b/src/tools/texmapper/maintexmapper.cpp 2015-12-23 20:55:55.071553325 +0100
+@@ -103,7 +103,7 @@
+ {
+ int i, j;
+
+- printf(title);
++ printf("%s", title);
+ for (j = 0; j < 4; j ++){
+ for (i = 0; i < 4; i ++) {
+ printf("%.6f ", m[i][j]);
+--- a/src/tools/trackgen/objects.cpp 2015-12-23 20:59:49.671287196 +0100
++++ b/src/tools/trackgen/objects.cpp 2015-12-23 21:02:21.639523189 +0100
+@@ -234,9 +234,9 @@
+
+ ssgLeaf *vt = (ssgLeaf *)ent;
+ if (vt->getCullFace() == TRUE) {
+- surf = "SURF 0x10\n";
++ surf = "0x10";
+ } else {
+- surf = "SURF 0x30\n";
++ surf = "0x30";
+ }
+
+ int num_verts = vt->getNumVertices();
+@@ -304,7 +304,7 @@
+ fprintf (save_fd, "numsurf %d\n", num_tris);
+
+ for (i = 0; i < num_tris; i++) {
+- fprintf (save_fd, surf);
++ fprintf (save_fd, "SURF %s\n", surf);
+ fprintf (save_fd, "mat 0\n");
+ fprintf (save_fd, "refs 3\n");
+ fprintf (save_fd, "%d %g %g\n",
diff --git a/games-sports/torcs/files/torcs-1.3.6-gcc6.patch b/games-sports/torcs/files/torcs-1.3.6-gcc6.patch
new file mode 100644
index 000000000000..6daf22a81b11
--- /dev/null
+++ b/games-sports/torcs/files/torcs-1.3.6-gcc6.patch
@@ -0,0 +1,11 @@
+--- a/src/drivers/olethros/geometry.cpp
++++ b/src/drivers/olethros/geometry.cpp
+@@ -27,6 +27,8 @@
+ #ifdef WIN32
+ #include <float.h>
+ #define isnan _isnan
++#elif __cplusplus >= 201103L
++using std::isnan;
+ #endif
+
+
diff --git a/games-sports/torcs/files/torcs-1.3.6-no-automake.patch b/games-sports/torcs/files/torcs-1.3.6-no-automake.patch
new file mode 100644
index 000000000000..9b47bfb9a64c
--- /dev/null
+++ b/games-sports/torcs/files/torcs-1.3.6-no-automake.patch
@@ -0,0 +1,21 @@
+torcs doesn't use automake, so it shouldn't be calling the macro
+
+http://bugs.gentoo.org/408473
+
+--- torcs-1.3.6.orig/configure.in
++++ torcs-1.3.6/configure.in
+@@ -15,9 +15,12 @@
+ #
+ ##############################################################################
+
+-AC_INIT(Make-config.in)
++AC_INIT(torcs, 1.3.6)
+ AC_CONFIG_HEADERS(config.h)
+-AM_INIT_AUTOMAKE(torcs, 1.3.6)
++dnl Workaround code using old VERSION instead of new PACKAGE_VERSION
++VERSION=$PACKAGE_VERSION
++AC_DEFINE_UNQUOTED([VERSION], "$VERSION", [old VERSION workaround])
++AC_SUBST(VERSION)
+
+ dnl Checks for programs.
+ AC_PROG_CC
diff --git a/games-sports/torcs/files/torcs-1.3.6-noXmuXt.patch b/games-sports/torcs/files/torcs-1.3.6-noXmuXt.patch
new file mode 100644
index 000000000000..f87fb750d199
--- /dev/null
+++ b/games-sports/torcs/files/torcs-1.3.6-noXmuXt.patch
@@ -0,0 +1,15 @@
+--- a/configure.in
++++ b/configure.in
+@@ -116,12 +116,8 @@
+ AC_CHECK_LIB(ICE, IceSetIOErrorHandler,,AC_MSG_ERROR([Can't find libICE. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+ dnl Replace `main' with a function in -lSM:
+ AC_CHECK_LIB(SM, SmsSetErrorHandler,,AC_MSG_ERROR([Can't find libSM. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+-dnl Replace `main' with a function in -lXt:
+-AC_CHECK_LIB(Xt, XtDisplay,,AC_MSG_ERROR([Can't find libXt. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+ dnl Replace `main' with a function in -lXi:
+ AC_CHECK_LIB(Xi, XOpenDevice,,AC_MSG_ERROR([Can't find libXi. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+-dnl Replace `main' with a function in -lXmu:
+-AC_CHECK_LIB(Xmu, XmuSimpleErrorHandler,,AC_MSG_ERROR([Can't find libXmu. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+ AC_CHECK_LIB(Xxf86vm, XF86VidModeSetViewPort,,AC_MSG_ERROR([Can't find libXxf86vm. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+ AC_CHECK_LIB(Xrender, XRenderSetSubpixelOrder,,AC_MSG_ERROR([Can't find libXrender. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
+ AC_CHECK_LIB(Xrandr, XRRQueryVersion,,AC_MSG_ERROR([Can't find libXrandr. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
diff --git a/games-sports/torcs/metadata.xml b/games-sports/torcs/metadata.xml
new file mode 100644
index 000000000000..dd8247bbc427
--- /dev/null
+++ b/games-sports/torcs/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">torcs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/torcs/torcs-1.3.6-r1.ebuild b/games-sports/torcs/torcs-1.3.6-r1.ebuild
new file mode 100644
index 000000000000..c92083f6cbc0
--- /dev/null
+++ b/games-sports/torcs/torcs-1.3.6-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils multilib
+
+DESCRIPTION="The Open Racing Car Simulator"
+HOMEPAGE="http://torcs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/torcs/${P}.tar.bz2"
+
+LICENSE="GPL-2 FreeArt"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/freealut
+ media-libs/freeglut
+ media-libs/libpng:0
+ media-libs/libvorbis:=
+ media-libs/openal
+ >=media-libs/plib-1.8.5
+ sys-libs/zlib:0=
+ virtual/opengl
+ virtual/glu
+ x11-libs/libX11
+ x11-libs/libXrandr"
+DEPEND="${RDEPEND}
+ x11-proto/xf86vidmodeproto"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-automake.patch
+ "${FILESDIR}"/${P}-as-needed.patch
+ "${FILESDIR}"/${P}-flags.patch
+ "${FILESDIR}"/${P}-format.patch
+ "${FILESDIR}"/${P}-noXmuXt.patch
+ "${FILESDIR}"/${P}-gcc6.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+ ecvs_clean
+}
+
+src_configure() {
+ addpredict $(echo /dev/snd/controlC? | sed 's/ /:/g')
+ [[ -e /dev/dsp ]] && addpredict /dev/dsp
+ econf \
+ --datadir=/usr/share \
+ --x-libraries=/usr/$(get_libdir) \
+ --enable-xrandr
+}
+
+src_compile() {
+ # So ugly... patches welcome.
+ emake -j1
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install datainstall
+ newicon Ticon.png ${PN}.png
+ make_desktop_entry ${PN} TORCS
+ dodoc README doc/history/history.txt
+ doman doc/man/*.6
+ dodoc -r doc/faq/faq.html doc/tutorials doc/userman
+}
diff --git a/games-sports/torcs/torcs-1.3.6.ebuild b/games-sports/torcs/torcs-1.3.6.ebuild
new file mode 100644
index 000000000000..c37169833555
--- /dev/null
+++ b/games-sports/torcs/torcs-1.3.6.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils multilib games
+
+DESCRIPTION="The Open Racing Car Simulator"
+HOMEPAGE="http://torcs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/torcs/${P}.tar.bz2"
+
+LICENSE="GPL-2 FreeArt"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="media-libs/freealut
+ media-libs/freeglut
+ media-libs/libpng:0
+ media-libs/libvorbis:=
+ media-libs/openal
+ >=media-libs/plib-1.8.5
+ sys-libs/zlib:0=
+ virtual/opengl
+ virtual/glu
+ x11-libs/libX11
+ x11-libs/libXrandr"
+DEPEND="${RDEPEND}
+ x11-proto/xf86vidmodeproto"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-no-automake.patch \
+ "${FILESDIR}"/${P}-as-needed.patch \
+ "${FILESDIR}"/${P}-flags.patch \
+ "${FILESDIR}"/${P}-format.patch \
+ "${FILESDIR}"/${P}-noXmuXt.patch \
+ "${FILESDIR}"/${P}-gcc6.patch
+ eautoreconf
+ ecvs_clean
+}
+
+src_configure() {
+ addpredict $(echo /dev/snd/controlC? | sed 's/ /:/g')
+ [[ -e /dev/dsp ]] && addpredict /dev/dsp
+ egamesconf \
+ --datadir="${GAMES_DATADIR_BASE}" \
+ --x-libraries=/usr/$(get_libdir) \
+ --enable-xrandr
+}
+
+src_compile() {
+ # So ugly... patches welcome.
+ emake -j1
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install datainstall
+ newicon Ticon.png ${PN}.png
+ make_desktop_entry ${PN} TORCS
+ dodoc README doc/history/history.txt
+ doman doc/man/*.6
+ dohtml -r doc/faq/faq.html doc/tutorials doc/userman
+ prepgamesdirs
+}
diff --git a/games-sports/trigger/Manifest b/games-sports/trigger/Manifest
new file mode 100644
index 000000000000..fdd3ad570d69
--- /dev/null
+++ b/games-sports/trigger/Manifest
@@ -0,0 +1,6 @@
+AUX trigger-0.6.1-gcc6.patch 814 SHA256 e0168f80c799849c72d02d01c0f4b12a019af5d32dc924ff4788343f6d7976b3 SHA512 32e2979f09363010e252f436b04b888c7dc127e7b6817ea53ac400a1859c6d900990c284169a965bcd18388a972c9ed2c7a8e7f1c928147adbfb0007f7f50aa3 WHIRLPOOL 8656cb4744a65771d8d4679574bf096250d242d996ed1f2adf89b9ec9fdc4b30f709770808a418331d54fa278c269f543061fd61f625bc61d5e863bd41f67e2e
+DIST trigger-rally-0.6.1.tar.bz2 61083932 SHA256 00b22fd290420ed7ed217c3d0bf53b46ad2eaf4c691347f4d3aaca5b1384958a SHA512 9f7e57758ffa61002efff6c7ac4d69f53ef4769651bdfdd21b6a8d101f8fd06ba7dc5998a8877146f50e6124896300e3595b4b5fff4decd53b6555e622de85bf WHIRLPOOL 8b4553a3758f915a3da7d2f6d2fc38a42338e4262e44c0f83026240546aa30e4fcf18b5810436a03e9209d14e8ed228e353c60b32d92f647adcbb0f2e72d6808
+EBUILD trigger-0.6.1-r1.ebuild 1191 SHA256 c83acbbf09462254e845b1f67f9397c2121dd02223b2ab34997cea9dd8e6af1e SHA512 87e12e8c40c6a07ce0b151370d904a8b0a909324cdb9590f4e68d54140b18d98fa4b81be21b0bdd7b474b7630da09c2002d124f0fcc4af9a6054d420eaf3c680 WHIRLPOOL c6a3bfd66aa87de8c835cf225c407c43b4a2e14620ba5c503c7ff3047bbe8c06f6db38a84b17528812c122f4742deaef6dd66ee0b571d91ede262810fb869585
+MISC ChangeLog 2685 SHA256 ae41c65e0c75443de33eeb31c21fa67c57489ec28610d77ca10d2ae66ab3d4f6 SHA512 b1371e90ade932c7924a8ebd2cf662a1d7767a8256446c73569f88fe534738905ec0e7375efd085e6db49f7756b5a1aa1373c3e70778757c1f9881d9cec0f850 WHIRLPOOL f48dde76089ec02e4c7e88715d65061a4a9f393ff56edfee4c740d0c295a3cb71602d564fd6a03770986fe8a646d00699725b0650053709fc32a2c741a333e40
+MISC ChangeLog-2015 4426 SHA256 2e8d1032a7bc82c37ceb562affc68d96a39cf4bfe12b0a71ae0eee50ce0925d6 SHA512 284f20d919f03e2e9d01435daebcfe9041551f542d999ec8cb9fdde4a977abcffd4ff8f847919acaf12ed527cae0538fe4e11e1c9f826ddb605957413251ad7d WHIRLPOOL d9e766cb5ef46ff8df15e55da8f47e738baf49cbce4ef74b74b5eeec12b900ea84d5a7b7f0fb5b39aef902522dce165ea4d15e4b22b75c973fbc1bc8c8f77511
+MISC metadata.xml 336 SHA256 4c7fe81e4cd677bd73b2a92259b8c0ff1ebb606eb5d6ea1c17fbb3f8c2b26140 SHA512 9eb1580903ba730dbe8dd12cd1be749e0dcfbb577c8d2eb7de8e0999c5348f7baa8b5fa13664893b8b3365e6bd0603596097c43821aa40af534fba4818778305 WHIRLPOOL 98049c1ca3aaa3818db0c40fde3a97e6616f0eb7e6b26c35c8992c34e37366f892766026a05f85662ec071990488336e8b9ec79d433d5ec053c0e772d276d70a
diff --git a/games-sports/trigger/files/trigger-0.6.1-gcc6.patch b/games-sports/trigger/files/trigger-0.6.1-gcc6.patch
new file mode 100644
index 000000000000..38822287c61d
--- /dev/null
+++ b/games-sports/trigger/files/trigger-0.6.1-gcc6.patch
@@ -0,0 +1,39 @@
+Bug: https://bugs.gentoo.org/617886
+
+--- a/src/pengine/tinyxmlparser.cpp
++++ b/src/pengine/tinyxmlparser.cpp
+@@ -326,14 +326,14 @@
+ if ( !p || !*p )
+ {
+ SetError( TIXML_ERROR_DOCUMENT_EMPTY );
+- return false;
++ return NULL;
+ }
+
+ p = SkipWhiteSpace( p );
+ if ( !p )
+ {
+ SetError( TIXML_ERROR_DOCUMENT_EMPTY );
+- return false;
++ return NULL;
+ }
+
+ while ( p && *p )
+@@ -541,7 +541,7 @@
+ if ( !p || !*p || *p != '<' )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT );
+- return false;
++ return NULL;
+ }
+
+ p = SkipWhiteSpace( p+1 );
+@@ -551,7 +551,7 @@
+ if ( !p || !*p )
+ {
+ if ( document ) document->SetError( TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME );
+- return false;
++ return NULL;
+ }
+
+ TIXML_STRING endTag ("</");
diff --git a/games-sports/trigger/metadata.xml b/games-sports/trigger/metadata.xml
new file mode 100644
index 000000000000..c9f6b92e908a
--- /dev/null
+++ b/games-sports/trigger/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">trigger-rally</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/trigger/trigger-0.6.1-r1.ebuild b/games-sports/trigger/trigger-0.6.1-r1.ebuild
new file mode 100644
index 000000000000..08b3404df78b
--- /dev/null
+++ b/games-sports/trigger/trigger-0.6.1-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+MY_PN=${PN}-rally
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="Free OpenGL rally car racing game"
+HOMEPAGE="http://trigger-rally.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ dev-games/physfs
+ media-libs/freealut
+ media-libs/libsdl
+ media-libs/openal
+ media-libs/sdl-image[jpeg,png]
+ media-libs/sdl-mixer
+ virtual/glu
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ dev-util/ftjam"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
+
+pkg_setup() {
+ # Otherwise build fails with:
+ # ...skipped trigger for lack of libpengine.a...
+ tc-export AR
+}
+
+src_configure() {
+ econf --datadir=/usr/share/games/${PN}
+}
+
+src_compile() {
+ AR="${AR} cru" jam -dx -qa || die
+
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /usr/share/games/${PN}
+ doins -r data/*
+ newicon data/textures/life_helmet.png ${PN}.png
+ make_desktop_entry ${PN} Trigger
+ dodoc doc/*.txt
+}
+
+pkg_postinst() {
+ elog "After running ${PN} for the first time, a config file is"
+ elog "available in ~/.trigger/trigger.config"
+}
diff --git a/games-sports/trophy/Manifest b/games-sports/trophy/Manifest
new file mode 100644
index 000000000000..78662bd65bc4
--- /dev/null
+++ b/games-sports/trophy/Manifest
@@ -0,0 +1,6 @@
+DIST trophy-2.0.3.tar.gz 14780127 SHA256 1fc8311458f86abeae51d7b47db8f95221bea737ea782786892cc36677a97030 SHA512 40376c2a27f205421189d5fea3dc154492fae8977b62d1150c986be6fe823d0f718b61a51a2febad851fc96cf4e1b408ab9318ab32e32d685966228f51327b06 WHIRLPOOL 7ae116c433808570cec5b122cd31aebb86d26c2b8cc7654f19201160e806ce66f56b12c9587ef1dbb5d693a3f5faec0ddd0a12e93e9625c6ddc294b0390b41e1
+EBUILD trophy-2.0.3-r1.ebuild 532 SHA256 4e86ab9393cc10fb5d0293c476ce1fe591ed048235def5574441aaf5ee58ad62 SHA512 f088ba3fccbc3c70f4679de5b1705034941d666310d603120852fe15d9ee723a2bfaeb93efed59357948ba52463e1e834cc314001605f3b95faac340fb3a0f29 WHIRLPOOL f54086830cab9c922ad7fc8f3bf6def7c333fec160f806093aefd4b290766e66b4d0bad519fb095899ed5683bebadb1f73d455e35f26304ec7e94877d6b44be7
+EBUILD trophy-2.0.3.ebuild 810 SHA256 f171dd7ebb2d76760816f4ad7d73637fd118a2a01bb6b161b230d08641522e6e SHA512 f0771f981944d15c3923af297be628a7f1714a141ef9a3ff2b4e72323f09a474463de85050d0c5c5fe9d81c73e214ae6495e0fc0e7409a1e57c99757fa886dcc WHIRLPOOL bdcd6d0ae432a20e641a75bbf126a4cc3950aa26878579c438926f2fa257bc4dab3091a9116470f9bf787783c5266f1e968b17ccd8d08d42d4e562dae3f99e3d
+MISC ChangeLog 2678 SHA256 678b38ff6e3451994a7cabad8f40595f9302afa1c123977d7ad5ef010dac79e4 SHA512 5ae1e871f5e2eb8ebb87ef00c1a0ac876b5de71eca2b85ac145267c80652ce10f9222a33a3ac8e85f1351f5ee088fd917ec15b57618c590df8d581d3522c157f WHIRLPOOL 50789d8c97647d9aa39b3ec0ae3ab8127f45ea91715136a635e5e49fd3ccf59705e8ebb951e4af1cc70a96a6e1597636a972233bd53c52ab95ca00e97ba8656c
+MISC ChangeLog-2015 1969 SHA256 01bf4ca185444f7bd9b7947c210561879ca23803a3964112f8c0602e7043823a SHA512 a6136620da8d60a270cd176f8aaf6edfedc3f612b4cd4eaa51bbb414b9e79b2049626c88b4f489ed3d6e4d711fa8b83f9c3c78c269aec1061fb7ffd9b992dcc8 WHIRLPOOL 3e227f5318bb9bcabb2e1cda9f09a97fd05efd55f6c9c578124443fd16cd3563eb6bb49c4d87c498e473d8d46736d654d8d71fd0a0072644daa90e3df15db9da
+MISC metadata.xml 329 SHA256 8c085abd7448a680825dd6425db59fd823f76a03efb6d8c4ea597272e3145bae SHA512 2812231691e421c29bae3f29d934cfac14f611190985b785cbecb628091a6a9d774699685cef482d1be47879a4d9938f9e773188178395ca7d68ce9a0e8ac7fa WHIRLPOOL 522cc52ac28cfc031eb55404fbdd15a932282a9cf6adbbb5c801ebca4b6a7ae621cf732403c03434a414385ced06cc3daf0c13d8968a893575d152c3ff6f31ce
diff --git a/games-sports/trophy/metadata.xml b/games-sports/trophy/metadata.xml
new file mode 100644
index 000000000000..f3c03da7ef8e
--- /dev/null
+++ b/games-sports/trophy/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">trophy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/trophy/trophy-2.0.3-r1.ebuild b/games-sports/trophy/trophy-2.0.3-r1.ebuild
new file mode 100644
index 000000000000..e038f16088bf
--- /dev/null
+++ b/games-sports/trophy/trophy-2.0.3-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils gnome2-utils
+
+DESCRIPTION="2D Racing Game"
+HOMEPAGE="http://trophy.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-games/clanlib:0.8[opengl]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-sports/trophy/trophy-2.0.3.ebuild b/games-sports/trophy/trophy-2.0.3.ebuild
new file mode 100644
index 000000000000..ac5132cd9742
--- /dev/null
+++ b/games-sports/trophy/trophy-2.0.3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils gnome2-utils games
+
+DESCRIPTION="2D Racing Game"
+HOMEPAGE="http://trophy.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-games/clanlib:0.8[opengl]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ default
+ doicon -s 72 "${D}${GAMES_DATADIR}"/icons/${PN}.png
+ rm -rf "${D}${GAMES_DATADIR}"/icons
+ domenu "${D}${GAMES_DATADIR}"/applications/${PN}.desktop
+ rm -rf "${D}${GAMES_DATADIR}"/applications
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-sports/ultimatestunts/Manifest b/games-sports/ultimatestunts/Manifest
new file mode 100644
index 000000000000..48ffe5afa903
--- /dev/null
+++ b/games-sports/ultimatestunts/Manifest
@@ -0,0 +1,8 @@
+AUX ultimatestunts-0.7.7-gcc-4.7.patch 457 SHA256 c8be34a256e5dd8dcc11307283e3f999803de4d0ec8856532acef614499715f8 SHA512 19fe87b1c4fde66803b299e5db5d8ac6112ba07ea334720cadee59ce5f238564b37af7f863bb4bab7b9ca780169e293ca2ab2defad3ce79f3123c8b956cb6c32 WHIRLPOOL 242bbf33df09650c1fbe879ff1dfb946b55670230eeb2da9ca6a454b6e4261c32b41b20f05284eb3904401420b92af0adb6279bbeae6b3693146f22e6d5e9e3c
+AUX ultimatestunts-0.7.7-paths.patch 764 SHA256 bc8cdd38705d93812e33a8777c3ecf1d27e242248364ce410e52d22d65f186d3 SHA512 da896527c8a76fad854270b38219b646689016c03c4800f89800b36f419ca210d8e5d524ef9a95beb9eef342c22edab7f70e0f28e6f14e4cf4b38ef23771080f WHIRLPOOL 18b2304cb24094ef2ef4929d5f5e42de846397d5d53a4689f3afe0b96d2694479ef54d6220df95210211a2111c59389190e17bfc717ee82ce0df564911c9a173
+DIST ultimatestunts-srcdata-0771.tar.gz 47449346 SHA256 fcc06e4a2ff2c5c1bd937670acdb079140f3ce0efdf00578eb6559a20ebb26d3 SHA512 c532d1434570775da8e0b8156659f96dcfbdf82890f07aebbe398bdcf2039a11c832ead8106c8522af1a4a847f685727dc6f7739443a99858621995452ce4741 WHIRLPOOL d4f0d7d7b5c138a949de4aded91a37c371362394d6022546c1e596c52c040bde02d8e9dfa3aafb9ff9b6af1d8a29533100a76ae82f52e8a7113cfd8358897392
+EBUILD ultimatestunts-0.7.7-r1.ebuild 1088 SHA256 c35d21d708b5136defa4e770ab274ea1e7ee55d9ff2152c50358d8ea8cf25461 SHA512 8ce6f8df02ff60cc0400aa6d8e84fd929cc16ee516c5c01633423fd8506169ac9f3bb291e931465860684668a592103e6c9ac176aeac590450c993580be4ac7e WHIRLPOOL 4b7a968803db71c2df758da624c2fb64ec511f5cecac1770c7cb031b26e4e72c6ea500531e8b124a131d0330a0cd59d6fb38051ddf5b0d0e5955be75429365a0
+EBUILD ultimatestunts-0.7.7.ebuild 1096 SHA256 0ebe2fcea6ceb7399f57df197853c958b047654190943cb6af0c4375b4d43244 SHA512 a4a0eb1839e9fce7318375809a60e3b71bc5c95cccf8a342fb214498211376da1f53e3c77064e7661ef479ab2d7e260c711ed02f0e7cf08a02894a055f347a98 WHIRLPOOL b85466ed993d3355866fca6e4d4cb6e2fc2cab07a1c46c1e54073c28df4c43d9dcc208b0bd2200d212083ae55349b7d139556f1ecc893121ff7197a955d2ef4f
+MISC ChangeLog 2850 SHA256 35ca5d3a2e05969c72bc195f4be6b805bd8b14ae4595c232b0d76fe4c4ea6ceb SHA512 6d8c0c940e9e023beb284d520e2fa7b399a9a431f9f067dfc71ce007ba4702799e673dbe1c5709c5f577f2ef2b831bf6ee85a6ab8846a85bc878e48c9b9c3ae5 WHIRLPOOL b9f7e743b87189387f64e383e59eca6adc88e03d1a52dba07c937d5fbc3c2f87c7ec7e958ee40c45fc34c7bc15a5a6d621d83045af396ce96a4f042d9f840f21
+MISC ChangeLog-2015 5796 SHA256 0d2efaf8174db02ba3b68bbb9a530ea52eabc4521fa51465cc81f885a0167924 SHA512 6c878a4e394b8a9e7c1e5ac3978bf4528801f2c2b4c38b977731804e44b8ee27b14059e10b05a69eeab77ba686413a3e8194d0e3b3a49137f58ae37d5f0a9298 WHIRLPOOL 1e5373eb5e2d8a42174f78475442e27f67799b9dd9fdb15146a8e6d78c5a649dafbd0494a7cca602418f8cb328c84d2c0451e39219aed6fa31f7e95e1b427284
+MISC metadata.xml 337 SHA256 89033d742f5d09d06ca340860808646b76f1b50948570077d3313d3ca1faa23e SHA512 cb7883dede9a55d0894a6a1bd9a944d5458047cff524fdc03ae1a3c6d771fcd77bc82151ff2a9bbf2f47772ee5a46c104c82e694a2649e60d1ed4e46e615f25b WHIRLPOOL cba604acc5914825b289a87f3b5bc04f52b23013b39ecf42749ca087b43c808564f203fd6025e3fb8dbd64d6d3f9065b413911cd06ba4e9b27449eaa267494fb
diff --git a/games-sports/ultimatestunts/files/ultimatestunts-0.7.7-gcc-4.7.patch b/games-sports/ultimatestunts/files/ultimatestunts-0.7.7-gcc-4.7.patch
new file mode 100644
index 000000000000..f323bce22aa5
--- /dev/null
+++ b/games-sports/ultimatestunts/files/ultimatestunts-0.7.7-gcc-4.7.patch
@@ -0,0 +1,16 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Jul 14 20:55:35 UTC 2012
+Subject: fix compilation on gcc-4.7
+
+https://bugs.gentoo.org/show_bug.cgi?id=426612
+
+--- a/simulation/metaserver.cpp
++++ b/simulation/metaserver.cpp
+@@ -16,6 +16,7 @@
+ ***************************************************************************/
+ #include <cstdio>
+ #include <cstdlib>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
diff --git a/games-sports/ultimatestunts/files/ultimatestunts-0.7.7-paths.patch b/games-sports/ultimatestunts/files/ultimatestunts-0.7.7-paths.patch
new file mode 100644
index 000000000000..c9fd879b1887
--- /dev/null
+++ b/games-sports/ultimatestunts/files/ultimatestunts-0.7.7-paths.patch
@@ -0,0 +1,19 @@
+--- ultimatestunts-srcdata-0771.orig/data/Makefile.in
++++ ultimatestunts-srcdata-0771/data/Makefile.in
+@@ -358,11 +358,11 @@
+
+
+ install:
+- $(mkinstalldirs) ${usdatadir}
+- cp -r cars environment lang misc music textures textures.dat tiles tracks ${usdatadir}
+- chmod 644 ${usdatadir}/*.*
+- chmod 644 ${usdatadir}/*/*.*
+- chmod 644 ${usdatadir}/*/*/*.*
++ $(mkinstalldirs) $(DESTDIR)${usdatadir}
++ cp -r cars environment lang misc music textures textures.dat tiles tracks $(DESTDIR)${usdatadir}
++ chmod 644 $(DESTDIR)${usdatadir}/*.*
++ chmod 644 $(DESTDIR)${usdatadir}/*/*.*
++ chmod 644 $(DESTDIR)${usdatadir}/*/*/*.*
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/games-sports/ultimatestunts/metadata.xml b/games-sports/ultimatestunts/metadata.xml
new file mode 100644
index 000000000000..ad38b6a0fe1b
--- /dev/null
+++ b/games-sports/ultimatestunts/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">ultimatestunts</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/ultimatestunts/ultimatestunts-0.7.7-r1.ebuild b/games-sports/ultimatestunts/ultimatestunts-0.7.7-r1.ebuild
new file mode 100644
index 000000000000..53a8f0c1a688
--- /dev/null
+++ b/games-sports/ultimatestunts/ultimatestunts-0.7.7-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 flag-o-matic versionator
+
+MY_P=${PN}-srcdata-$(replace_all_version_separators)1
+DESCRIPTION="Remake of the famous Stunts game"
+HOMEPAGE="http://www.ultimatestunts.nl/"
+SRC_URI="mirror://sourceforge/ultimatestunts/${MY_P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+RDEPEND="
+ media-libs/freealut
+ media-libs/libsdl[joystick,opengl,video]
+ media-libs/libvorbis
+ >=media-libs/openal-1
+ media-libs/sdl-image
+ virtual/opengl
+ virtual/glu
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-paths.patch
+ "${FILESDIR}"/${P}-gcc-4.7.patch
+)
+
+src_prepare() {
+ default
+
+ esvn_clean
+ append-cppflags $(sdl-config --cflags)
+}
+
+src_configure() {
+ econf \
+ --with-openal \
+ $(use_enable nls)
+}
+
+src_compile() {
+ emake -C trackedit libtrackedit.a
+ emake
+}
+
+src_install() {
+ default
+
+ newicon data/cars/diablo/steer.png ${PN}.png
+ make_desktop_entry ustunts "Ultimate Stunts"
+}
diff --git a/games-sports/ultimatestunts/ultimatestunts-0.7.7.ebuild b/games-sports/ultimatestunts/ultimatestunts-0.7.7.ebuild
new file mode 100644
index 000000000000..1e850e8150bd
--- /dev/null
+++ b/games-sports/ultimatestunts/ultimatestunts-0.7.7.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic versionator games
+
+MY_P=${PN}-srcdata-$(replace_all_version_separators)1
+DESCRIPTION="Remake of the famous Stunts game"
+HOMEPAGE="http://www.ultimatestunts.nl/"
+SRC_URI="mirror://sourceforge/ultimatestunts/${MY_P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="nls"
+
+RDEPEND="media-libs/libsdl[joystick,opengl,video]
+ media-libs/sdl-image
+ >=media-libs/openal-1
+ media-libs/libvorbis
+ media-libs/freealut
+ virtual/opengl
+ virtual/glu
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ esvn_clean
+ epatch "${FILESDIR}"/${P}-paths.patch \
+ "${FILESDIR}"/${P}-gcc-4.7.patch
+ append-cppflags $(sdl-config --cflags)
+}
+
+src_configure() {
+ egamesconf \
+ --with-openal \
+ $(use_enable nls)
+}
+
+src_compile() {
+ emake -C trackedit libtrackedit.a
+ emake
+}
+
+src_install() {
+ default
+ newicon data/cars/diablo/steer.png ${PN}.png
+ make_desktop_entry ustunts "Ultimate Stunts"
+ prepgamesdirs
+}
diff --git a/games-sports/vdrift/Manifest b/games-sports/vdrift/Manifest
new file mode 100644
index 000000000000..77d6cbd5963e
--- /dev/null
+++ b/games-sports/vdrift/Manifest
@@ -0,0 +1,8 @@
+AUX vdrift-20120722-build.patch 1199 SHA256 25b95cdb59f4edc0263a2a0bc54d661b559c80eb979e6a6af369903dc0a3bb32 SHA512 4a12d2c3120d641668263dd7d8a2fb8b455e7f39ca33fabe85945fe6b7439f54d7cd2cf0b1752c7aae29d0b88c727f84f4e7092d3233bf5532c4db278b0eae39 WHIRLPOOL a3048f6a25b020ed155f5d36da2095484a273bf25a08e99f6352bd961b7093aa49f144ecb318d803321a40942d3c2f28d835c0be96aec92497b3fcae615d83bc
+AUX vdrift-20120722-bullet.patch 3406 SHA256 3c70c730b47865f491a04abdae9c245e6800129b31972aa7520bc7687d771640 SHA512 aab973d586ae876b1f8fd528cdff80f97d5082954e616296604bd334694116fd4ce980698219e8a2c9662f50da9c5daf9ca9cc70ddd2a2f6795f0aa9673c7a71 WHIRLPOOL f7e4eccd601498ed9aedc016310d8f4975313477d5728366d3a688dd89c0b80bd01cbcdaaf469834deba76f7d20f36d1f1cc25862bc529fcaf1fbc5481d459c6
+DIST vdrift-2012-07-22.tar.bz2 589288618 SHA256 5409feea1d9eb3d943f49ecc265b73f3283a00036e055038f5e5114dfc6113fb SHA512 eb6f243fd28e5fe46e856c37cb528c8ec903bdec91b6aa86681add79a333077a3a8874f694255913ae8492b965884f02057a95a98e37027ff67c082a8ca5527e WHIRLPOOL 7488cbc64b1fefca9d16267a623afd08b1fb2bd02af13b0c12cdbc9a2cc18f8965a796b2d8222e85826a277aaf17d8f9adda4e2b9621e6b7779fcb3546f140dd
+DIST vdrift-2012-07-22c_patch.diff 21689 SHA256 3e669ac2ce6da04548bb53b63694d21fd83cd8971e3f268031d7ffd93b79ae22 SHA512 7b82ba53f3c19ccd01de9ea64e0b7e15224219c0c614a6505b2a3f552ce78565fdedf7781a198c58606d3e9b94e594dee79097d46687e7d4fc763868204b761d WHIRLPOOL f24a7acb58d711d6bf4cda04ff4be1990c241399effdc821ecc8330bfd04a9067a048a840db9be7cabd1c6ca1b7051b003d548b87b2a1bb7d5000afdeb4e0a03
+EBUILD vdrift-20120722.ebuild 1511 SHA256 7bde191a3a78af18c56df9d3a3ef580d9678fd49c7492e07aa4af343972fafce SHA512 738e9e57c9fa01f243b5711ac602070ed2450e25c2c1b18726ba47f5edecb4a56a9a72388fac0107ef1db87223927c5ae57a6e93153917edb19662a6de02862a WHIRLPOOL 07bb484996b227e8857197bc3454d56458c637f83fbf9e3efa1883289b6f04e2cca8320ce15b4666a8ff13148290eaa70727bf77ea86842a5f14cf1a0b2a3434
+MISC ChangeLog 2509 SHA256 398eada9eb4d66a2ce1d4186c237dd6355b74b5e12509e190806393f90002731 SHA512 a05b5bb43ed472f70d8aade290070114b3af041c9a10fc03677c29c1a2afb6c171738e27373a949ae80a95db135bb4447de5cf94051c5892a68893d6101d5565 WHIRLPOOL 1dfd21d51e4f3e61e583ee149929180e51ef1674822e340e3537c3f2572cfea8db70a0b5af63488f33c9841a3f6c292d7fde1beaa1930c7dca2fd27183fbcb4d
+MISC ChangeLog-2015 4045 SHA256 1590c81837b1df9fb26a6c56f764dbee657c1c53084e74ce31b80f66d68b96ff SHA512 c3f1c5edb742afbd38ac35b6e0e1422349845f3707286ad14765c5b2a2224d0fea676386714074a2747b78d8dae1269db814285481db0dd7d0125ab0a94168b9 WHIRLPOOL 39afa7aa130bd38cee29462579d498de3f5a160e89ebb2be8bfd945a339c7707cdc8608fcf05b3a42cf08a0b8fb22b0e55f741daa2dfdcab1b2f4291763d892a
+MISC metadata.xml 329 SHA256 f97ce8d7731cbabf78239b811a2d22eef1b35b9e7a94f7534515f515e0916a2c SHA512 c669371ccb3d0aee737982574fa3cbadba74d6e559fede3bfbac99d7f4f8c1e8e632a2659460008938c307b0e52dd66af357a3f65752c88d8735cf036046fcc0 WHIRLPOOL b347e2e8bd985778984b8bc90091816aa183afc0af352fdb09f732dfa8869a595cce49b486549f31719f70f6c51520602032d2685cd04d2038349ba799b8e134
diff --git a/games-sports/vdrift/files/vdrift-20120722-build.patch b/games-sports/vdrift/files/vdrift-20120722-build.patch
new file mode 100644
index 000000000000..16b6fe4c9ba1
--- /dev/null
+++ b/games-sports/vdrift/files/vdrift-20120722-build.patch
@@ -0,0 +1,28 @@
+--- VDrift.orig/SConstruct
++++ VDrift/SConstruct
+@@ -44,6 +44,7 @@
+ LIBPATH = ['.', '#lib', LOCALBASE + '/lib'],
+ LINKFLAGS = ['-pthread','-lintl'],
+ options = opts)
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+ check_headers = ['GL/gl.h', 'GL/glu.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_rotozoom.h', 'vorbis/vorbisfile.h', 'GL/glew.h', 'bullet/btBulletCollisionCommon.h']
+ check_libs = []
+ if 'CC' in os.environ:
+@@ -380,7 +381,7 @@
+ if env['release']:
+ # release build, debugging off, optimizations on
+ if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8') and (sys.platform != 'freebsd9') and (sys.platform != 'win32') and (sys.platform != 'cygwin'):
+- env.Append(CCFLAGS = ['-O1', '-pipe'])
++ env.Append(CCFLAGS = ['-pipe'])
+ else:
+ # debug build, lots of debugging, no optimizations
+ env.Append(CCFLAGS = ['-g3'])
+@@ -399,7 +400,6 @@
+ env.Append(CCFLAGS = ['-pg'])
+ env.Append(LINKFLAGS = ['-pg'])
+ env.Append(CCFLAGS = ['-g3'])
+- env.Append(CCFLAGS = ['-O1'])
+
+ #------------------------------------#
+ # compile-time efficiency assessment #
+
diff --git a/games-sports/vdrift/files/vdrift-20120722-bullet.patch b/games-sports/vdrift/files/vdrift-20120722-bullet.patch
new file mode 100644
index 000000000000..907433417ee6
--- /dev/null
+++ b/games-sports/vdrift/files/vdrift-20120722-bullet.patch
@@ -0,0 +1,100 @@
+--- src/cardynamics.cpp Mon Jan 19 23:26:36 1970
++++ src/cardynamics.cpp Mon Jan 19 23:26:36 1970
+@@ -1791,23 +1791,29 @@
+
+ bool CARDYNAMICS::WheelContactCallback(
+ btManifoldPoint& cp,
+- const btCollisionObject* colObj0,
+- int partId0,
++ const btCollisionObjectWrapper* col0,
++ int part0,
+ int index0,
+- const btCollisionObject* colObj1,
+- int partId1,
++ const btCollisionObjectWrapper* col1,
++ int part1,
+ int index1)
+ {
+- // cars are fracture bodies, wheel is a cylinder shape
+- const btCollisionShape* shape = colObj0->getCollisionShape();
+- if ((colObj0->getInternalType() & CO_FRACTURE_TYPE) &&
++#if (BT_BULLET_VERSION < 281)
++ const btCollisionObject* obj = col0;
++ const btCollisionShape* shape = obj->getCollisionShape();
++ const btCollisionShape* rootshape = obj->getRootCollisionShape();
++#else
++ const btCollisionObject* obj = col0->getCollisionObject();
++ const btCollisionShape* shape = col0->getCollisionShape();
++ const btCollisionShape* rootshape = obj->getCollisionShape();
++#endif
++ if ((obj->getInternalType() & CO_FRACTURE_TYPE) &&
+ (shape->getShapeType() == CYLINDER_SHAPE_PROXYTYPE))
+ {
+- // is contact within contact patch?
+- const btCompoundShape* car = static_cast<const btCompoundShape*>(colObj0->getRootCollisionShape());
+- const btCylinderShapeX* wheel = static_cast<const btCylinderShapeX*>(shape);
+- btVector3 contactPoint = cp.m_localPointA - car->getChildTransform(cp.m_index0).getOrigin();
+- if (-direction::up.dot(contactPoint) > 0.5 * wheel->getRadius())
++ const btCompoundShape* carshape = static_cast<const btCompoundShape*>(rootshape);
++ const btCylinderShapeX* wheelshape = static_cast<const btCylinderShapeX*>(shape);
++ btVector3 contactPoint = cp.m_localPointA - carshape->getChildTransform(cp.m_index0).getOrigin();
++ if (-direction::up.dot(contactPoint) > 0.5 * wheelshape->getRadius())
+ {
+ // break contact (hack)
+ cp.m_normalWorldOnB = btVector3(0, 0, 0);
+--- src/cardynamics.h Mon Jan 19 23:26:36 1970
++++ src/cardynamics.h Mon Jan 19 23:26:36 1970
+@@ -25,6 +25,12 @@
+ class FractureBody;
+ class PTree;
+
++#if (BT_BULLET_VERSION < 281)
++#define btCollisionObjectWrapper btCollisionObject
++#else
++struct btCollisionObjectWrapper;
++#endif
++
+ class CARDYNAMICS : public btActionInterface
+ {
+ friend class PERFORMANCE_TESTING;
+@@ -151,11 +157,11 @@
+
+ static bool WheelContactCallback(
+ btManifoldPoint& cp,
+- const btCollisionObject* colObj0,
+- int partId0,
++ const btCollisionObjectWrapper* col0,
++ int part0,
+ int index0,
+- const btCollisionObject* colObj1,
+- int partId1,
++ const btCollisionObjectWrapper* col1,
++ int part1,
+ int index1);
+
+ protected:
+--- src/dynamicsworld.cpp Mon Jan 19 23:26:36 1970
++++ src/dynamicsworld.cpp Mon Jan 19 23:26:36 1970
+@@ -105,7 +105,7 @@
+ int patch_id = -1;
+ const BEZIER * b = 0;
+ const TRACKSURFACE * s = TRACKSURFACE::None();
+- btCollisionObject * c = 0;
++ const btCollisionObject * c = 0;
+
+ MyRayResultCallback ray(origin, p, caster);
+ rayTest(origin, p, ray);
+@@ -221,6 +221,7 @@
+
+ void DynamicsWorld::fractureCallback()
+ {
++#if (BT_BULLET_VERSION < 281)
+ m_activeConnections.resize(0);
+
+ int numManifolds = getDispatcher()->getNumManifolds();
+@@ -268,4 +269,5 @@
+ btRigidBody* child = body->updateConnection(con_id);
+ if (child) addRigidBody(child);
+ }
++#endif
+ } \ No newline at end of file
diff --git a/games-sports/vdrift/metadata.xml b/games-sports/vdrift/metadata.xml
new file mode 100644
index 000000000000..873fcd84214e
--- /dev/null
+++ b/games-sports/vdrift/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">vdrift</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-sports/vdrift/vdrift-20120722.ebuild b/games-sports/vdrift/vdrift-20120722.ebuild
new file mode 100644
index 000000000000..316f904278a1
--- /dev/null
+++ b/games-sports/vdrift/vdrift-20120722.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils scons-utils games
+
+MY_P=${PN}-${PV:0:4}-${PV:4:2}-${PV:6:2}
+DESCRIPTION="A driving simulation made with drift racing in mind"
+HOMEPAGE="http://vdrift.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2
+ mirror://sourceforge/${PN}/${MY_P}c_patch.diff"
+
+LICENSE="GPL-3 ZLIB LGPL-2.1+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="app-arch/libarchive
+ media-libs/glew
+ media-libs/libsdl[opengl,video]
+ media-libs/sdl-gfx
+ media-libs/sdl-image[png]
+ media-libs/libvorbis
+ net-misc/curl
+ sci-physics/bullet[-double-precision]
+ virtual/opengl
+ virtual/glu"
+DEPEND="${RDEPEND}
+ dev-cpp/asio
+ dev-libs/boost
+ virtual/pkgconfig"
+
+S=${WORKDIR}/VDrift
+
+src_unpack() {
+ unpack ${MY_P}.tar.bz2
+}
+
+src_prepare() {
+ epatch \
+ "${DISTDIR}"/${MY_P}c_patch.diff \
+ "${FILESDIR}"/${P}-build.patch \
+ "${FILESDIR}"/${P}-bullet.patch
+}
+
+src_compile() {
+ escons \
+ force_feedback=1 \
+ destdir="${D}" \
+ bindir="${GAMES_BINDIR}" \
+ datadir="${GAMES_DATADIR}"/${PN} \
+ prefix= \
+ use_binreloc=0 \
+ release=1 \
+ os_cc=1 \
+ os_cxx=1 \
+ os_cxxflags=1 \
+ || die
+}
+
+src_install() {
+ dogamesbin build/vdrift
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins -r data/*
+ newicon data/textures/icons/vdrift-64x64.png ${PN}.png
+ make_desktop_entry ${PN} VDrift
+ find "${D}" -name "SCon*" -exec rm \{\} +
+ keepdir "${GAMES_DATADIR}"/${PN}/{music,settings/replays,settings/screenshots}
+ prepgamesdirs
+}
diff --git a/games-sports/xmoto/Manifest b/games-sports/xmoto/Manifest
new file mode 100644
index 000000000000..fc11347f914a
--- /dev/null
+++ b/games-sports/xmoto/Manifest
@@ -0,0 +1,8 @@
+DIST inksmoto-0.7.0.tar.gz 2628941 SHA256 60bd1369d4c347e127886a5813af13daf39b56ce818c9f8b2fc7d4bba0af7e11 SHA512 af0ae49ea160a2274f6835abd82ccaa00dc9ff81875b7d4ea29789388c131b519cb77e6da42efeaf51d52b97090c67320af38145204a1d5418781c99cb23a704 WHIRLPOOL e7137f1f23815cdef1061896b8dd687af38a79be341827dcaa437c39de95a98d94b4173d973899a8422c3e77088da11869957996f21c2822d8cfddf15b6a7ea6
+DIST xmoto-0.5.11-src.tar.gz 40785573 SHA256 a584a6f9292b184686b72c78f16de4b82d5c5b72ad89e41912ff50d03eca26b2 SHA512 7046745e8f7a045fa2ce1deb3fd75b73b233dc1092f5ecd6dd4e42938f70269a93a3a623a39a1f0520c90643a42dc1ce93c43ad07bf225ff6c50741cc02511f6 WHIRLPOOL 9301a6456dea420cc92706022b9003446363d90591f6c90977a1e85195419f42d168456db61077d4e757976ee7ccbb183e6337fda4a683334cea796aa65a7c3b
+DIST xmoto_0.5.11+dfsg-6.debian.tar.xz 25240 SHA256 066a62c61c026a5bb698058023db058f6192c062e48c04edcae73abc608eb0d2 SHA512 961f97a3427e77cf020d73820ff99fdc0ca81e5953a18ed9386a1b476eb2af897073adcd7141e993fbf4f8fdca9efdab8cf20b89bfc31196afdcb4f2095ab390 WHIRLPOOL d1c57655ff095d4edb81643c65a4c9530c7287cf79d7a20247b33a4f33b0e3a83afc798ac5248e8f097c9a38cb54a104fb7e125071b27e3e27ba5a9bfccd8aa3
+EBUILD xmoto-0.5.11-r1.ebuild 2604 SHA256 e68e6f0b40889debb6c9068cb423c03e612d7bdc324498a99612c9c6387a6f0c SHA512 4b8e1c280fe9bd3d1dd1bc1f3f54201cf7564fe67080462335c16fca93bc24ab302713fbe3278aef404fe2f2952dd70968365736194f57db29d8569b1a4d2c1d WHIRLPOOL 58308466edd14dcc30645771403edbf1350c3d44efd8ab148a9b4ff0288da8ccf928de5b51fa0c4c138dca5e5fe91f53823ba7be4d1b739780754c95bb3dd358
+EBUILD xmoto-0.5.11.ebuild 2660 SHA256 efb22c8c37dff3e2a80dfe8bce6c559fe1a55aa145262ecca90f47fa85ef429e SHA512 70b21d085d3629e93e65016cb14b99228aa59a3f4acb1aca89ef390ccd482705d1b2ee59ef96a95295c8e613c80427037deb52787899a268cace835e786985ab WHIRLPOOL c15a2e7f7acf41e8a7c90b5ea848000064717249890b73dbd0f166e695360f8358bb54449818fcc9bc3dd736ed3891eaddb6df2bd71574d2713af6959e6d6cb7
+MISC ChangeLog 3326 SHA256 bbe279f0a80c5dfba95f2d2789f00a4f9faf2c0a71acdcdc1da108211b3af9f4 SHA512 7cc70ce8446b6371645d968d509b69ef2b3da976625a91534915b773855ec272e159e91a8e65d863fff00f6a59769450ba9869423f5034c4342a412477a4079d WHIRLPOOL 7b50d93a8e62aec00750578eb49912d8eb62b6c6389d54d4afb94e05c69febb4dc5cba3c6a14d041b02934e75d37a9d080223b035207c81dd8ae915a5009bf42
+MISC ChangeLog-2015 9984 SHA256 6927f270d21b78282cb9008e73eb1639245d165010e28b9654ea6a4e660e70a3 SHA512 7409891e44c31679d8f553f631cb6cf1bb8e9ab24031a35b82bd9b9ae55ef7401b32d3c6ee79791306cdc5881c80fe999eb820f635f0d8dc1e01799b743055d9 WHIRLPOOL a9efc469528e18a7251a4ac41b6050e4f69663d87c93ab052bac0095d91291b4124f21020f58052cf9a55419015a7a679874d37befcd89b2bfaaad8bd3f8ae89
+MISC metadata.xml 369 SHA256 86a15721fc1a51247d53e9e68fcc71056b03dff9641851aa4e291739d396526a SHA512 392f5a45194ba2a42e56516d171862c7255094d88b5cce82a3e8135441399b02dd4d35c98e3649de3a4c7fd3212f31582a00a6118acee7216e6537ea17388cd8 WHIRLPOOL 726ca653152d4219c47aeb99cafb5b09a8a39e0e0d6f2e650192b5a73534f97dd90370df86075bb581e61edfa9f5e72843c287390836da5418f3264d66f04b72
diff --git a/games-sports/xmoto/metadata.xml b/games-sports/xmoto/metadata.xml
new file mode 100644
index 000000000000..23c7b787914a
--- /dev/null
+++ b/games-sports/xmoto/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>
+ <use>
+ <flag name="editor">Depend on inkscape, scripts to convert svg to level (svg2lvl)</flag>
+ </use>
+</pkgmetadata>
diff --git a/games-sports/xmoto/xmoto-0.5.11-r1.ebuild b/games-sports/xmoto/xmoto-0.5.11-r1.ebuild
new file mode 100644
index 000000000000..b6e40c184637
--- /dev/null
+++ b/games-sports/xmoto/xmoto-0.5.11-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils flag-o-matic
+
+LVL_PV="0.7.0" #they unfortunately don't release both at the same time, why ~ as separator :(
+LVL="inksmoto-${LVL_PV}"
+DEB_PV=6
+DESCRIPTION="A challenging 2D motocross platform game"
+HOMEPAGE="http://xmoto.tuxfamily.org"
+SRC_URI="http://download.tuxfamily.org/xmoto/xmoto/${PV}/${P}-src.tar.gz
+ mirror://debian/pool/main/x/${PN}/${PN}_${PV}+dfsg-${DEB_PV}.debian.tar.xz
+ editor? ( http://download.tuxfamily.org/xmoto/svg2lvl/${LVL_PV}/${LVL}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="editor nls"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-db/sqlite:3
+ dev-games/ode
+ dev-lang/lua:0[deprecated]
+ dev-libs/libxdg-basedir
+ dev-libs/libxml2
+ media-fonts/dejavu
+ media-libs/libpng:0
+ media-libs/libsdl[joystick,opengl]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-net
+ media-libs/sdl-ttf
+ net-misc/curl
+ virtual/jpeg:0
+ virtual/opengl
+ virtual/glu
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )"
+RDEPEND="${RDEPEND}
+ editor? ( media-gfx/inkscape )"
+
+src_prepare() {
+ default
+
+ EPATCH_SOURCE="${WORKDIR}/debian/patches" \
+ epatch $(cat ${WORKDIR}/debian/patches/series)
+ use editor && rm -vf "${WORKDIR}"/extensions/{bezmisc,inkex}.py
+ sed -i \
+ -e '/^gettextsrcdir/s:=.*:= @localedir@/gettext/po:' \
+ po/Makefile.in.in || die
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ # bug #289792
+ filter-flags -DdDOUBLE -DdSINGLE
+
+ # bug #569624 - ode-0.13 needs one or the other defined
+ append-cppflags -Dd$(has_version 'dev-games/ode[double-precision]' && echo DOUBLE || echo SINGLE)
+
+ econf \
+ --enable-threads=posix \
+ $(use_enable nls) \
+ --localedir=/usr/share/locale \
+ --with-localesdir=/usr/share/locale \
+ --with-renderer-sdlGfx=0 \
+ --with-renderer-openGl=1
+}
+
+src_install() {
+ default
+
+ rm -f "${D}/usr/share/xmoto"/Textures/Fonts/DejaVu*.ttf
+ dosym /usr/share/fonts/dejavu/DejaVuSans.ttf /usr/share/xmoto/Textures/Fonts/DejaVuSans.ttf
+ dosym /usr/share/fonts/dejavu/DejaVuSansMono.ttf /usr/share/xmoto/Textures/Fonts/DejaVuSansMono.ttf
+ doicon extra/xmoto.xpm
+ make_desktop_entry xmoto Xmoto
+
+ if use editor; then
+ insinto /usr/share/inkscape/
+ doins -r "${WORKDIR}"/extensions/
+ fi
+}
+
+pkg_postinst() {
+ if use editor; then
+ elog "If you want to know how to create Xmoto levels"
+ elog "have a look at this Tutorial:"
+ elog " http://wiki.xmoto.tuxfamily.org/index.php?title=Inksmoto-${LVL_PV}"
+ elog "You can share your levels on the Xmoto homepage."
+ fi
+}
diff --git a/games-sports/xmoto/xmoto-0.5.11.ebuild b/games-sports/xmoto/xmoto-0.5.11.ebuild
new file mode 100644
index 000000000000..99e74c4c2098
--- /dev/null
+++ b/games-sports/xmoto/xmoto-0.5.11.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils flag-o-matic games
+
+LVL_PV="0.7.0" #they unfortunately don't release both at the same time, why ~ as separator :(
+LVL="inksmoto-${LVL_PV}"
+DEB_PV=6
+DESCRIPTION="A challenging 2D motocross platform game"
+HOMEPAGE="http://xmoto.tuxfamily.org"
+SRC_URI="http://download.tuxfamily.org/xmoto/xmoto/${PV}/${P}-src.tar.gz
+ mirror://debian/pool/main/x/${PN}/${PN}_${PV}+dfsg-${DEB_PV}.debian.tar.xz
+ editor? ( http://download.tuxfamily.org/xmoto/svg2lvl/${LVL_PV}/${LVL}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="editor nls"
+
+RDEPEND="
+ dev-libs/libxdg-basedir
+ dev-db/sqlite:3
+ dev-games/ode
+ dev-lang/lua:0[deprecated]
+ virtual/jpeg:0
+ media-libs/libpng:0
+ dev-libs/libxml2
+ media-libs/libsdl[joystick,opengl]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-ttf
+ media-libs/sdl-net
+ net-misc/curl
+ app-arch/bzip2
+ virtual/opengl
+ virtual/glu
+ media-fonts/dejavu
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ nls? ( sys-devel/gettext )"
+RDEPEND="${RDEPEND}
+ editor? ( media-gfx/inkscape )"
+
+src_prepare() {
+ EPATCH_SOURCE="${WORKDIR}/debian/patches" \
+ epatch $(cat ${WORKDIR}/debian/patches/series)
+ use editor && rm -vf "${WORKDIR}"/extensions/{bezmisc,inkex}.py
+ sed -i \
+ -e '/^gettextsrcdir/s:=.*:= @localedir@/gettext/po:' \
+ po/Makefile.in.in || die
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ # bug #289792
+ filter-flags -DdDOUBLE -DdSINGLE
+ # bug #569624 - ode-0.13 needs one or the other defined
+ append-cppflags -Dd$(has_version 'dev-games/ode[double-precision]' && echo DOUBLE || echo SINGLE)
+
+ egamesconf \
+ --enable-threads=posix \
+ $(use_enable nls) \
+ --localedir=/usr/share/locale \
+ --with-localesdir=/usr/share/locale \
+ --with-renderer-sdlGfx=0 \
+ --with-renderer-openGl=1
+}
+
+src_install() {
+ default
+
+ rm -f "${D}${GAMES_DATADIR}/xmoto"/Textures/Fonts/DejaVu*.ttf
+ dosym /usr/share/fonts/dejavu/DejaVuSans.ttf "${GAMES_DATADIR}/xmoto"/Textures/Fonts/DejaVuSans.ttf
+ dosym /usr/share/fonts/dejavu/DejaVuSansMono.ttf "${GAMES_DATADIR}/xmoto"/Textures/Fonts/DejaVuSansMono.ttf
+ doicon extra/xmoto.xpm
+ make_desktop_entry xmoto Xmoto
+
+ prepgamesdirs
+
+ if use editor; then
+ insinto /usr/share/inkscape/
+ doins -r "${WORKDIR}"/extensions/
+ fi
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ if use editor; then
+ elog "If you want to know how to create Xmoto levels"
+ elog "have a look at this Tutorial:"
+ elog " http://wiki.xmoto.tuxfamily.org/index.php?title=Inksmoto-${LVL_PV}"
+ elog "You can share your levels on the Xmoto homepage."
+ fi
+}