---- configure.ac
-+++ configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -64,14 +64,12 @@
,dnl default action of assigning shell value
with_games_dir="${runtime_datadir}/games"
echo $ac_n "ordering crap from http://www.amazon.com/gp/registry/296ST2NHEBO0Z" 1>&6
---- src/Makefile.am
-+++ src/Makefile.am
+--- a/src/Makefile.am
++++ b/src/Makefile.am
@@ -1,6 +1,4 @@
-pkgdata_PROGRAMS = snipe2d.@CPU_IS@.dynamic snipe2d.@CPU_IS@.static
-BUILT_SOURCES = snipe2d
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit autotools eutils
+
+MY_P=${PN//-/_}-${PV}
+DESCRIPTION="Snipe terrorists from your orbital base"
+HOMEPAGE="http://icculus.org/oes/"
+SRC_URI="http://filesingularity.timedoctor.org/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[joystick,video]
+ media-libs/sdl-image[png]
+ media-libs/sdl-mixer[vorbis]"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-datadir.patch
+ "${FILESDIR}"/${P}-gcc43.patch
+)
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/^sleep /d' \
+ configure.ac || die
+ eautoreconf
+}
+
+src_install() {
+ DOCS="AUTHORS ChangeLog readme.txt README TODO" \
+ default
+ make_desktop_entry snipe2d "Orbital Eunuchs Sniper"
+}