games-puzzle/penguzzle: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 13:42:42 +0000 (15:42 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 19:33:51 +0000 (21:33 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-puzzle/penguzzle/files/penguzzle-1.0-tclx.patch
games-puzzle/penguzzle/penguzzle-1.0-r2.ebuild [new file with mode: 0644]

index d8c078de6a912ea873c722d0d9d65a61b8f15aa2..0f2ca8b8b23d4a9f9663b001aa27289ce79abd01 100644 (file)
@@ -1,5 +1,5 @@
---- bin/penguzzle
-+++ bin/penguzzle
+--- a/bin/penguzzle
++++ b/bin/penguzzle
 @@ -1,4 +1,6 @@
 -#!/usr/bin/wishx
 +#!/usr/bin/wish
diff --git a/games-puzzle/penguzzle/penguzzle-1.0-r2.ebuild b/games-puzzle/penguzzle/penguzzle-1.0-r2.ebuild
new file mode 100644 (file)
index 0000000..54cc987
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Tcl/Tk variant of the well-known 15-puzzle game"
+HOMEPAGE="http://www.naskita.com/linux/penguzzle/penguzzle.shtml"
+SRC_URI="http://www.naskita.com/linux/${PN}/${PN}.zip"
+
+LICENSE="penguzzle"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+       dev-lang/tk:0=
+       dev-tcltk/tclx
+"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}/${PN}${PV}"
+
+src_prepare() {
+       default
+       sed -i \
+               -e "s:~/puzz/images:/usr/share/${PN}:" \
+               lib/init \
+               || die "sed init failed"
+       sed -i \
+               -e "s:~/puzz/lib:/usr/$(get_libdir)/${PN}:" \
+               bin/${PN} \
+               || die "sed ${PN} failed"
+
+       eapply "${FILESDIR}"/${P}-tclx.patch
+}
+
+src_install() {
+       insinto /usr/share/${PN}
+       doins images/img0.gif
+
+       insinto /usr/"$(get_libdir)"/${PN}
+       doins lib/init
+
+       dobin bin/${PN}
+
+       newicon images/img0.gif ${PN}.gif
+       make_desktop_entry ${PN} "Penguzzle" /usr/share/pixmaps/${PN}.gif
+
+       einstalldocs
+}