summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-06-20 08:04:04 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-06-20 08:40:32 -0400
commit21fb4b0761c36f7f768f3619e6b22f24e6d77b74 (patch)
tree70ed7962418fc2e60c1ba9454dceae0eddc5ec2d /games-action/solar2
parentgames-action/shootingstar: fix segfault, tighten sdl deps, and tidy (diff)
downloadgentoo-21fb4b0761c36f7f768f3619e6b22f24e6d77b74.tar.gz
gentoo-21fb4b0761c36f7f768f3619e6b22f24e6d77b74.tar.bz2
gentoo-21fb4b0761c36f7f768f3619e6b22f24e6d77b74.zip
games-action/solar2: EAPI-8 bump, fix install
EAPI-8 used for fetch+ and dosym -r Dropped support for bundled-libs USE, works well and more versatile for sound (bundled sdl-mixer also has unnecessary deps). But keeping mono given using system's does not seem to work at all currently. No revbump given current -r1 always failed in install phase due to missing / in $MYGAMEDIR (non-absolute path fperms error). Fixes: 754f86637206db9e292e125877865b7d4d96aca8 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-action/solar2')
-rw-r--r--games-action/solar2/metadata.xml5
-rw-r--r--games-action/solar2/solar2-1.10-r1.ebuild107
2 files changed, 31 insertions, 81 deletions
diff --git a/games-action/solar2/metadata.xml b/games-action/solar2/metadata.xml
index b878aaa1812d..26079e608bed 100644
--- a/games-action/solar2/metadata.xml
+++ b/games-action/solar2/metadata.xml
@@ -5,9 +5,4 @@
<email>games@gentoo.org</email>
<name>Gentoo Games Project</name>
</maintainer>
- <use>
- <flag name="bundled-libs">
- Use the upstream provided bundled libraries.
- </flag>
- </use>
</pkgmetadata>
diff --git a/games-action/solar2/solar2-1.10-r1.ebuild b/games-action/solar2/solar2-1.10-r1.ebuild
index 1d32c61c8bba..a201117007e2 100644
--- a/games-action/solar2/solar2-1.10-r1.ebuild
+++ b/games-action/solar2/solar2-1.10-r1.ebuild
@@ -1,105 +1,60 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit desktop gnome2-utils wrapper
+inherit desktop wrapper
-GAMEBALL="${PN}-linux-${PV}.tar.gz"
-ICONFILE="https://dev.gentoo.org/~chewi/distfiles/${PN}.png"
-DESCRIPTION="An open-world, sandbox game set in an infinite abstract universe"
+DESCRIPTION="Open-world sandbox game set in an infinite abstract universe"
HOMEPAGE="http://murudai.com/solar/"
-SRC_URI="${GAMEBALL} ${ICONFILE}"
-S="${WORKDIR}"/Solar2
+SRC_URI="
+ ${PN}-linux-${PV}.tar.gz
+ fetch+https://dev.gentoo.org/~chewi/distfiles/${PN}.png"
+S="${WORKDIR}/Solar2"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
-IUSE="bundled-libs"
+RESTRICT="bindist fetch"
-RESTRICT="bindist fetch splitdebug"
+# game outputs audio using openal and libsdl backends simultaneously
+RDEPEND="
+ media-libs/libsdl[X,joystick,opengl,sound,video,abi_x86_32(-)]
+ media-libs/openal[abi_x86_32(-)]
+ media-libs/sdl-mixer[mad,mp3,abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]"
-MYGAMEDIR=opt/${PN}
QA_PREBUILT="
- ${MYGAMEDIR#/}/lib/*
- ${MYGAMEDIR#/}/Solar2.bin.x86
-"
-
-# TODO: - unbundle libmono for 64bit
-# - unbundling libSDL_mixer breaks the game
-# - provide icon
-# - test useflags for libsdl on x86
-RDEPEND="
- virtual/opengl
- amd64? (
- >=media-libs/flac-1.2.1-r5[abi_x86_32(-)]
- >=media-libs/libsdl-1.2.15-r4[X,sound,video,joystick,abi_x86_32(-)]
- >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)]
- >=virtual/opengl-7.0-r1[abi_x86_32(-)]
- !bundled-libs? (
- >=media-libs/libmad-0.15.1b-r8[abi_x86_32(-)]
- >=media-libs/openal-1.15.1[abi_x86_32(-)]
- >=media-libs/sdl-mixer-1.2.12-r4[flac,mikmod,mad,mp3,vorbis,abi_x86_32(-)]
- >=media-libs/libmikmod-3.2.0[abi_x86_32(-)]
- )
- )
- x86? (
- media-libs/flac
- media-libs/libsdl[X,sound,video,joystick]
- media-libs/libvorbis
- !bundled-libs? (
- dev-lang/mono
- media-libs/libmad
- media-libs/libmikmod
- media-libs/openal
- media-libs/sdl-mixer[flac,mikmod,mad,mp3,vorbis]
- )
- )"
+ opt/${PN}/Solar2.bin.x86
+ opt/${PN}/lib/libmono-2.0.so.1"
pkg_nofetch() {
- einfo "Please buy and download ${GAMEBALL} from:"
+ einfo "Please buy and download '${A%% *}' from:"
einfo " ${HOMEPAGE}"
- einfo "Also download ${ICONFILE}"
- einfo "and move both to your distfiles directory. The Humble Bundle download"
- einfo "may have a timestamp appended to the filename."
+ einfo "and place it in your distfiles directory. The Humble Bundle"
+ einfo "download may have a timestamp appended to the filename."
}
src_prepare() {
default
- # remove unused files
- rm solar2.sh || die
+ # remove duplicate libmono and unused wrapper
+ rm lib/libmono-2.0.so solar2.sh || die
- if ! use bundled-libs ; then
- einfo "Removing bundled libs..."
- if use amd64 ; then
- # no mono 32bit libs on amd64 yet
- rm -v lib/libmad.so* lib/libmikmod.so* lib/libopenal.so* || die
- else
- rm -v lib/libmad.so* lib/libmikmod.so* lib/libopenal.so* lib/libmono-2.0.so* || die
- fi
- fi
+ # remove bundled libs except mono (had no success using system's)
+ rm lib/lib{SDL_mixer-1.2,mad,mikmod,openal}.so* || die
}
src_install() {
- insinto ${MYGAMEDIR}
- doins -r *
-
- make_wrapper ${PN} "./Solar2.bin.x86" "${MYGAMEDIR}"
- make_desktop_entry ${PN}
- doicon -s 64 "${DISTDIR}"/${PN}.png
+ insinto /opt/${PN}
+ doins -r .
- fperms +x ${MYGAMEDIR}/Solar2.bin.x86
-}
-
-pkg_preinst() {
- gnome2_icon_savelist
-}
+ fperms +x /opt/${PN}/Solar2.bin.x86
+ make_wrapper ${PN} ./Solar2.bin.x86 /opt/${PN}
-pkg_postinst() {
- gnome2_icon_cache_update
-}
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN} "Solar 2"
-pkg_postrm() {
- gnome2_icon_cache_update
+ # game insists on loading sdl-mixer from its own directory
+ dosym -r /{usr,opt/${PN}}/lib/libSDL_mixer-1.2.so.0
}