games-arcade/tuxpuck: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 24 Apr 2018 19:07:41 +0000 (21:07 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 24 Apr 2018 19:26:28 +0000 (21:26 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-arcade/tuxpuck/files/tuxpuck-0.8.2-ldflags.patch
games-arcade/tuxpuck/files/tuxpuck-0.8.2-parallel.patch
games-arcade/tuxpuck/files/tuxpuck-0.8.2-png15.patch
games-arcade/tuxpuck/tuxpuck-0.8.2-r2.ebuild [new file with mode: 0644]

index 28fcef48a7ecb7951a9a2b341b2a6218d1d790e5..b4abb60f0fd4a2ce9ef8644df1b533659e994243 100644 (file)
@@ -1,5 +1,5 @@
---- Makefile.old       2010-10-05 10:34:57.000000000 +0200
-+++ Makefile   2010-10-05 10:35:28.000000000 +0200
+--- a/Makefile.old     2010-10-05 10:34:57.000000000 +0200
++++ b/Makefile 2010-10-05 10:35:28.000000000 +0200
 @@ -20,7 +20,7 @@
  
  $(NAME) : $(OBJS)
index cdcdecc42c32f0edc87cf9357cf11e27dd97b755..7d9b199f55cfaf47d081fc1ce8c557bd7d78ed75 100644 (file)
@@ -1,5 +1,5 @@
---- data/Makefile.old  2015-01-07 14:22:34.852150894 +0100
-+++ data/Makefile      2015-01-07 14:57:44.079822614 +0100
+--- a/data/Makefile.old        2015-01-07 14:22:34.852150894 +0100
++++ b/data/Makefile    2015-01-07 14:57:44.079822614 +0100
 @@ -15,20 +15,29 @@
        ar r libdata.a $(OBJS)
        ranlib libdata.a
index ca9539f39e515ffa7046277d54441411c863a615..5860d2b1c171de5d4725b951a2c938c791c98a6a 100644 (file)
@@ -1,5 +1,5 @@
---- png.c.old  2011-09-14 16:25:54.415338149 +0200
-+++ png.c      2011-09-14 17:41:02.190803110 +0200
+--- a/png.c.old        2011-09-14 16:25:54.415338149 +0200
++++ b/png.c    2011-09-14 17:41:02.190803110 +0200
 @@ -38,6 +38,8 @@
    png_color_16 *transv;
    SDL_RWops *src = NULL;
diff --git a/games-arcade/tuxpuck/tuxpuck-0.8.2-r2.ebuild b/games-arcade/tuxpuck/tuxpuck-0.8.2-r2.ebuild
new file mode 100644 (file)
index 0000000..b1df215
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Hover hockey"
+HOMEPAGE="http://home.no.net/munsuun/tuxpuck/"
+SRC_URI="http://home.no.net/munsuun/tuxpuck/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="
+       media-libs/libsdl
+       media-libs/libpng:0=
+       virtual/jpeg:0
+       media-libs/libvorbis
+"
+DEPEND="${RDEPEND}
+       media-libs/freetype:2
+"
+
+src_prepare() {
+       default
+       # Bug #376741 - Make unpack call compatible with both
+       # PMS and <sys-apps/portage-2.1.10.10.
+       cd man || die
+       unpack ./${PN}.6.gz
+       cd .. || die
+       sed -i \
+               -e 's/-Werror//' \
+               -e '/^CC/d' \
+               Makefile \
+               utils/Makefile \
+               data/Makefile \
+               || die "sed failed"
+
+       eapply "${FILESDIR}"/${P}-ldflags.patch \
+               "${FILESDIR}"/${P}-png15.patch \
+               "${FILESDIR}"/${P}-parallel.patch
+}
+
+src_compile() {
+       emake -C utils
+       emake -C data
+       emake
+}
+
+src_install() {
+       dobin tuxpuck
+       doman man/tuxpuck.6
+       dodoc *.txt
+       doicon data/icons/${PN}.ico
+       make_desktop_entry ${PN} "TuxPuck" /usr/share/pixmaps/${PN}.ico
+       einstalldocs
+}