games-arcade/crack-attack: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Sun, 15 Apr 2018 18:44:26 +0000 (20:44 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sun, 15 Apr 2018 19:00:27 +0000 (21:00 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

games-arcade/crack-attack/crack-attack-1.1.14-r2.ebuild [new file with mode: 0644]
games-arcade/crack-attack/files/crack-attack-1.1.14-gcc43.patch
games-arcade/crack-attack/files/crack-attack-1.1.14-glut.patch

diff --git a/games-arcade/crack-attack/crack-attack-1.1.14-r2.ebuild b/games-arcade/crack-attack/crack-attack-1.1.14-r2.ebuild
new file mode 100644 (file)
index 0000000..eded2a7
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Addictive OpenGL-based block game"
+HOMEPAGE="http://www.nongnu.org/crack-attack/"
+SRC_URI="https://savannah.nongnu.org/download/crack-attack/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~x86"
+IUSE="gtk sdl"
+
+RDEPEND="
+       media-libs/freeglut
+       sdl? ( media-libs/libsdl
+               media-libs/sdl-mixer )
+       gtk? ( >=x11-libs/gtk+-2.6:2 )
+"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+"
+
+src_prepare() {
+       default
+       eapply \
+               "${FILESDIR}"/${P}-glut.patch \
+               "${FILESDIR}"/${P}-gcc43.patch
+       sed -i 's/-lXmu//' src/gtk-gui/Makefile.in src/Makefile.in || die
+       touch -r . * */*
+}
+
+src_configure() {
+       econf \
+               --disable-binreloc \
+               $(use_enable sdl sound) \
+               $(use_enable gtk)
+}
+
+src_install() {
+       HTML_DOCS="doc/*"
+       default
+       doicon data/crack-attack.xpm
+       make_desktop_entry crack-attack Crack-attack
+}
index 009d062f2eac5f425943e495d5fdc167f4cff727..8cabe7eb2574b555a87333a79f5c9ee9dd2ae348 100644 (file)
@@ -1,5 +1,5 @@
---- src/Game.h
-+++ src/Game.h
+--- a/src/Game.h
++++ b/src/Game.h
 @@ -34,6 +34,7 @@
  #include <climits>
  #include <cstdlib>
index fc16c1b8bc4e8c3fd50204ee0f0ac74b974071a9..430d4e742f317a56a60f52b2735bbd18955260b6 100644 (file)
@@ -2,8 +2,8 @@ Fix from upstream to work with newer freegluts.
 
 http://bugs.gentoo.org/97954
 
---- src/Attack.cxx
-+++ src/Attack.cxx
+--- a/src/Attack.cxx
++++ b/src/Attack.cxx
 @@ -83,6 +83,7 @@
    int height = -1, width = -1;