Skip to content

Commit

Permalink
games-action/armagetronad: restore -j1, fix dedicated, tidy
Browse files Browse the repository at this point in the history
j1 was removed for bug #588104, but turns out still needed for
install until proper fix (bug #698020).

No longer attempt to remove desktop/ when USE=dedicated (bug #716442).

Bug: https://bugs.gentoo.org/588104
Closes: https://bugs.gentoo.org/698020
Closes: https://bugs.gentoo.org/716442
Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
ionenwks committed Jun 14, 2021
1 parent 0cce357 commit ad66a3f
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions games-action/armagetronad/armagetronad-0.2.9.1.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

EAPI=7

inherit autotools desktop xdg-utils
inherit autotools desktop

DESCRIPTION="Fast-paced 3D lightcycle game based on Tron"
HOMEPAGE="http://armagetronad.org/"
Expand All @@ -24,9 +24,11 @@ RDEPEND="
virtual/opengl
sound? ( media-libs/sdl-mixer )
)"
DEPEND=${RDEPEND}
DEPEND="${RDEPEND}"

PATCHES=("${FILESDIR}"/${P}-AR.patch)
PATCHES=(
"${FILESDIR}"/${P}-AR.patch
)

src_prepare() {
default
Expand All @@ -35,29 +37,28 @@ src_prepare() {
}

src_configure() {
# --enable-games just messes up paths
econf \
$(use_enable dedicated) \
$(use_enable sound music) \
--disable-sysinstall \
--disable-useradd \
--disable-uninstall \
local econfargs=(
$(use_enable dedicated)
$(use_enable sound music)
# following options only mess with paths and users
--disable-games
--disable-sysinstall
--disable-uninstall
--disable-useradd
)
econf ${econfargs[@]}
}

src_install() {
default

# misplaced desktop-file/icons
rm -r "${ED}"/usr/share/${PN}/desktop || die
doicon -s 48 desktop/icons/48x48/armagetronad.png
make_desktop_entry ${PN}
}

pkg_postinst() {
xdg_icon_cache_update
}
# long history of being broken without -j1 (bug #330705,698020)
# do not remove (again) without a proper fix or extensive tests
emake -j1 DESTDIR="${D}" install
einstalldocs

pkg_postrm() {
xdg_icon_cache_update
# handle misplaced .desktop / icons
if ! use dedicated; then
rm -r "${ED}"/usr/share/${PN}/desktop || die
doicon desktop/icons/48x48/armagetronad.png
make_desktop_entry ${PN}
fi
}

0 comments on commit ad66a3f

Please sign in to comment.