games-puzzle/flobopuyo: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 11:37:17 +0000 (13:37 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 19:32:30 +0000 (21:32 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-puzzle/flobopuyo/files/flobopuyo-0.20-libs.patch
games-puzzle/flobopuyo/flobopuyo-0.20-r2.ebuild [new file with mode: 0644]

index 64cd0335ce9c2692ef8791750adb6dcb7df366ba..b9b55a333cb62b3cbe3d25f6d03aff78b4d5559b 100644 (file)
@@ -1,5 +1,5 @@
---- Makefile.orig      2004-10-08 18:41:12.000000000 -0400
-+++ Makefile   2008-08-06 19:48:47.000000000 -0400
+--- a/Makefile.orig    2004-10-08 18:41:12.000000000 -0400
++++ b/Makefile 2008-08-06 19:48:47.000000000 -0400
 @@ -41,15 +41,13 @@
  ##############
  
diff --git a/games-puzzle/flobopuyo/flobopuyo-0.20-r2.ebuild b/games-puzzle/flobopuyo/flobopuyo-0.20-r2.ebuild
new file mode 100644 (file)
index 0000000..41ee671
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop toolchain-funcs
+
+DESCRIPTION="Clone of the famous PuyoPuyo game"
+HOMEPAGE="http://www.ios-software.com/?page=projet&quoi=29"
+SRC_URI="http://www.ios-software.com/flobopuyo/${P}.tgz
+       mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+IUSE="opengl"
+
+DEPEND="media-libs/libsdl
+       media-libs/sdl-image[jpeg,png]
+       media-libs/sdl-mixer[mod]
+       opengl? ( virtual/opengl )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       default
+       eapply \
+               "${FILESDIR}"/${P}-gcc4.patch \
+               "${FILESDIR}"/${P}-gcc41.patch \
+               "${FILESDIR}"/${P}-libs.patch
+
+       find . -type f -name ".*" -exec rm -f \{\} \;
+       sed -i \
+               -e "s:^DATADIR=.*:DATADIR=\"/usr/share/${PN}\":" \
+               -e "/^INSTALL_BINDIR/s:/\$(PREFIX)/games:/usr/bin:" \
+               Makefile \
+               || die
+}
+
+src_compile() {
+       emake \
+               CXX="$(tc-getCXX)" \
+               ENABLE_OPENGL="$(use opengl && echo true || echo false)"
+}
+
+src_install() {
+       default
+       doman man/flobopuyo.6
+       doicon "${DISTDIR}/${PN}.png"
+       make_desktop_entry flobopuyo FloboPuyo
+}