games-board/gmchess: remove deprecated games eclass
authorAustin English <wizardedit@gentoo.org>
Wed, 7 Sep 2016 21:52:56 +0000 (16:52 -0500)
committerAustin English <wizardedit@gentoo.org>
Wed, 7 Sep 2016 22:16:14 +0000 (17:16 -0500)
Also update to EAPI 6

Gentoo-Bug: https://bugs.gentoo.org/574082

Package-Manager: portage-2.3.0

games-board/gmchess/files/gmchess-0.29.6-gentoo-r1.patch [new file with mode: 0644]
games-board/gmchess/gmchess-0.29.6-r2.ebuild [new file with mode: 0644]

diff --git a/games-board/gmchess/files/gmchess-0.29.6-gentoo-r1.patch b/games-board/gmchess/files/gmchess-0.29.6-gentoo-r1.patch
new file mode 100644 (file)
index 0000000..6ef9904
--- /dev/null
@@ -0,0 +1,25 @@
+diff -ru gmchess-0.29.6.orig/configure.in gmchess-0.29.6/configure.in
+--- gmchess-0.29.6.orig/configure.in   2011-11-28 07:22:56.000000000 -0500
++++ gmchess-0.29.6/configure.in        2013-05-13 21:30:38.103817044 -0400
+@@ -4,7 +4,7 @@
+ AC_PREREQ([2.63])
+ AC_INIT(gmchess, 0.29.6, lerosua@gmail.com)
+ AC_CONFIG_SRCDIR([src/Pgnfile.cc])
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+ AM_INIT_AUTOMAKE(gmchess,0.29.6)
+diff -ru gmchess-0.29.6.orig/data/gmchess.desktop.in gmchess-0.29.6/data/gmchess.desktop.in
+--- gmchess-0.29.6.orig/data/gmchess.desktop.in        2009-09-07 08:08:47.000000000 -0400
++++ gmchess-0.29.6/data/gmchess.desktop.in     2013-05-13 21:30:19.444462390 -0400
+@@ -1,4 +1,3 @@
+-
+ [Desktop Entry]
+ Name=Chinese chess
+ Name[zh_CN]=天书棋谈
+@@ -10,4 +9,3 @@
+ Type=Application
+ Categories=GNOME;GTK;Game;BoardGame;
+ StartupNotify=true
+-Encoding=UTF-8
diff --git a/games-board/gmchess/gmchess-0.29.6-r2.ebuild b/games-board/gmchess/gmchess-0.29.6-r2.ebuild
new file mode 100644 (file)
index 0000000..f464f20
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit autotools flag-o-matic libtool gnome2-utils
+
+DESCRIPTION="Chinese chess with gtkmm and c++"
+HOMEPAGE="https://code.google.com/p/gmchess/"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.bz2"
+RESTRICT="test"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-cpp/gtkmm:2.4"
+RDEPEND=${DEPEND}
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gentoo-r1.patch
+)
+
+src_prepare() {
+       default
+       mv configure.{in,ac}
+       eautoreconf
+}
+
+src_configure() {
+       append-cxxflags -std=c++11
+       econf \
+               --disable-static \
+               --localedir='/usr/share/locale'
+}
+
+src_install() {
+       emake DESTDIR="${D}" \
+               itlocaledir='/usr/share/locale' \
+               pixmapsdir='/usr/share/pixmaps' \
+               desktopdir='/usr/share/applications' \
+               install
+       dodoc AUTHORS NEWS README
+       prune_libtool_files
+}
+
+pkg_preinst() {
+       gnome2_icon_savelist
+}
+
+pkg_postinst() {
+       gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+       gnome2_icon_cache_update
+}