summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-04 00:10:09 +0000
committerSam James <sam@gentoo.org>2021-04-04 06:32:31 +0000
commitc851c49041fb730f64eeaf699110f0795a8a3b85 (patch)
tree8c0df32247d73d6fb6babf3f1845cf25977508cc /games-puzzle
parentgames-engines/frobtads: port to EAPI 7 (diff)
downloadgentoo-c851c49041fb730f64eeaf699110f0795a8a3b85.tar.gz
gentoo-c851c49041fb730f64eeaf699110f0795a8a3b85.tar.bz2
gentoo-c851c49041fb730f64eeaf699110f0795a8a3b85.zip
games-puzzle/xbomb: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/xbomb/files/xbomb-2.2b-DESTDIR.patch61
-rw-r--r--games-puzzle/xbomb/files/xbomb-2.2b-ldflags.patch4
-rw-r--r--games-puzzle/xbomb/xbomb-2.2b-r1.ebuild (renamed from games-puzzle/xbomb/xbomb-2.2b.ebuild)41
3 files changed, 57 insertions, 49 deletions
diff --git a/games-puzzle/xbomb/files/xbomb-2.2b-DESTDIR.patch b/games-puzzle/xbomb/files/xbomb-2.2b-DESTDIR.patch
index 2ee8edd4ec91..6f45b4c82fa2 100644
--- a/games-puzzle/xbomb/files/xbomb-2.2b-DESTDIR.patch
+++ b/games-puzzle/xbomb/files/xbomb-2.2b-DESTDIR.patch
@@ -1,34 +1,27 @@
-*** xbomb-2.1/Makefile 1996-01-20 16:02:46.000000000 -0500
---- xbomb-2.1.new/Makefile
-***************
-*** 27,34 ****
-
- OBJ=xbomb.o xwindow.o hiscore.o
-
-- INSTDIR=/usr/local
--
- ########
-
- xbomb : $(OBJ)
---- 27,32 ----
-***************
-*** 52,60 ****
-
- install :
- strip xbomb
-! install -d $(INSTDIR)/bin
-! install -d $(INSTDIR)/man/man6
-! install -d $(INSTDIR)/lib/app-defaults
-! install -m 755 xbomb $(INSTDIR)/bin
-! install -m 644 xbomb.6 $(INSTDIR)/man/man6
-! install -m 644 xbomb.ad $(INSTDIR)/lib/app-defaults/XBomb
---- 50,58 ----
-
- install :
- strip xbomb
-! install -d $(DESTDIR)/usr/bin
-! install -d $(DESTDIR)/usr/share/man/man6
-! install -d $(DESTDIR)/etc/X11/app-defaults
-! install -m 755 xbomb $(DESTDIR)/usr/bin
-! install -m 644 xbomb.6 $(DESTDIR)/usr/share/man/man6
-! install -m 644 xbomb.ad $(DESTDIR)/etc/X11/app-defaults/XBomb
+--- a/Makefile
++++ b/Makefile
+@@ -27,8 +27,6 @@
+
+ OBJ=xbomb.o xwindow.o hiscore.o
+
+-INSTDIR=/usr/local
+-
+ ########
+
+ xbomb : $(OBJ)
+@@ -52,9 +50,9 @@
+
+ install :
+ strip xbomb
+- install -d $(INSTDIR)/bin
+- install -d $(INSTDIR)/man/man6
+- install -d $(INSTDIR)/lib/app-defaults
+- install -m 755 xbomb $(INSTDIR)/bin
+- install -m 644 xbomb.6 $(INSTDIR)/man/man6
+- install -m 644 xbomb.ad $(INSTDIR)/lib/app-defaults/XBomb
++ install -d $(DESTDIR)/usr/bin
++ install -d $(DESTDIR)/usr/share/man/man6
++ install -d $(DESTDIR)/etc/X11/app-defaults
++ install -m 755 xbomb $(DESTDIR)/usr/bin
++ install -m 644 xbomb.6 $(DESTDIR)/usr/share/man/man6
++ install -m 644 xbomb.ad $(DESTDIR)/etc/X11/app-defaults/XBomb
diff --git a/games-puzzle/xbomb/files/xbomb-2.2b-ldflags.patch b/games-puzzle/xbomb/files/xbomb-2.2b-ldflags.patch
index a320b0900c53..9f1f524b33cf 100644
--- a/games-puzzle/xbomb/files/xbomb-2.2b-ldflags.patch
+++ b/games-puzzle/xbomb/files/xbomb-2.2b-ldflags.patch
@@ -1,5 +1,5 @@
---- Makefile.old
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
@@ -30,7 +30,7 @@
########
diff --git a/games-puzzle/xbomb/xbomb-2.2b.ebuild b/games-puzzle/xbomb/xbomb-2.2b-r1.ebuild
index 488c4de4bd50..d717dc1dcef8 100644
--- a/games-puzzle/xbomb/xbomb-2.2b.ebuild
+++ b/games-puzzle/xbomb/xbomb-2.2b-r1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils games
+EAPI=7
+
+inherit desktop toolchain-funcs
DESCRIPTION="Minesweeper clone with hexagonal, rectangular and triangular grid"
HOMEPAGE="http://www.gedanken.org.uk/software/xbomb/"
@@ -11,30 +12,44 @@ SRC_URI="http://www.gedanken.org.uk/software/xbomb/download/${P}.tgz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE=""
DEPEND="x11-libs/libXaw"
-RDEPEND=${DEPEND}
+RDEPEND="
+ ${DEPEND}
+ acct-group/gamestat
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-DESTDIR.patch
+ "${FILESDIR}"/${P}-ldflags.patch
+)
src_prepare() {
- epatch "${FILESDIR}"/${P}-DESTDIR.patch \
- "${FILESDIR}"/${P}-ldflags.patch
+ default
+
sed -i \
-e '/strip/d' \
-e '/^CC=/d' \
-e "/^CFLAGS/ { s:=.*:=${CFLAGS}: }" \
- -e "s:/usr/bin:${GAMES_BINDIR}:" \
Makefile || die
sed -i \
- -e "s:/var/tmp:${GAMES_STATEDIR}/${PN}:g" \
+ -e "s:/var/tmp:/var/lib/${PN}:g" \
hiscore.c || die
}
+src_configure() {
+ tc-export CC
+}
+
src_install() {
default
- dodir "${GAMES_STATEDIR}"/${PN}
- touch "${D}/${GAMES_STATEDIR}"/${PN}/${PN}{3,4,6}.hi || die "touch failed"
- fperms 660 "${GAMES_STATEDIR}"/${PN}/${PN}{3,4,6}.hi
+
+ dodir /var/lib/${PN}
+ touch "${ED}"/var/lib/${PN}/${PN}{3,4,6}.hi || die "touch failed"
+ fperms 660 /var/lib/${PN}/${PN}{3,4,6}.hi
+
+ fowners root:gamestat /var/lib/${PN}
+ fperms g+s /usr/bin/${PN}
+
make_desktop_entry xbomb XBomb
- prepgamesdirs
}