commit:     ede1b94b6962267f7397c729ca7f34aa60957b5f
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 28 00:55:54 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Jun 28 16:42:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ede1b94b

games-arcade/lbreakout: fix install, EAPI 6->8, tidy

Broken since games.eclass migration in 2018 (bug #655000) due
to the removal of the "dodir" line.

Also prevent direct cc/c++ call, use gamestat, add .desktop file,
and tighten sdl dep (notably won't start without sound support).

No revbump given this never worked.

Fixes: 0bb75edcb56e4fe87bac5059fe0e7004883c021a
Closes: https://bugs.gentoo.org/655000
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-arcade/lbreakout/lbreakout-010315-r1.ebuild | 38 ++++++++++++++++-------
 1 file changed, 26 insertions(+), 12 deletions(-)

diff --git a/games-arcade/lbreakout/lbreakout-010315-r1.ebuild 
b/games-arcade/lbreakout/lbreakout-010315-r1.ebuild
index 4a465d929cf..a00036389b1 100644
--- a/games-arcade/lbreakout/lbreakout-010315-r1.ebuild
+++ b/games-arcade/lbreakout/lbreakout-010315-r1.ebuild
@@ -1,30 +1,44 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
+
+inherit desktop toolchain-funcs
 
 DESCRIPTION="Breakout clone written with the SDL library"
 HOMEPAGE="http://lgames.sourceforge.net/LBreakout/";
 SRC_URI="mirror://sourceforge/lgames/${P}.tar.gz"
 
-LICENSE="GPL-2"
+LICENSE="GPL-2+"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
 
-DEPEND=">=media-libs/libsdl-1.1.5"
-RDEPEND="${DEPEND}"
+RDEPEND="
+       acct-group/gamestat
+       media-libs/libsdl[sound,video]"
+DEPEND="${RDEPEND}"
+
+HTML_DOCS=( lbreakout/manual/. )
 
 src_prepare() {
        default
-       sed -i \
-               -e '/^sdir=/s:$datadir/games:$datadir:' \
-               -e '/^hdir=/s:/var/lib/games:$localstatedir:' \
-               configure \
-               || die "sed failed"
+
+       # remove /games from datadir, and use /var/games for highscore file
+       sed -e '/^sdir=/s|/games.*||;' \
+               -e "/^hdir=/s|=.*|=${EPREFIX}/var/games|" \
+               -i configure || die
+
+       tc-export CC CXX
 }
 
 src_install() {
-       HTML_DOCS="lbreakout/manual/*"
+       dodir /var/games #655000
+
        default
+
+       fowners :gamestat /usr/bin/${PN} /var/games/${PN}.hscr
+       fperms g+s /usr/bin/${PN}
+       fperms 660 /var/games/${PN}.hscr
+
+       make_desktop_entry ${PN} LBreakout applications-games
 }

Reply via email to