summaryrefslogtreecommitdiff
path: root/games-arcade
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-25 01:28:26 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-25 01:28:26 +0100
commit9fce2d9787c37a690336f5e345a49d83ee60bc8a (patch)
tree0dabdf3dfaf12e3782b5551f1c84f30f19d22bec /games-arcade
parentd2f5fa9c5505a5c3df8170b498e890f50dfc9553 (diff)
gentoo auto-resync : 25:06:2023 - 01:28:26
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/Manifest.gzbin20885 -> 20885 bytes
-rw-r--r--games-arcade/shovel-knight/Manifest1
-rw-r--r--games-arcade/shovel-knight/shovel-knight-4.1b-r1.ebuild110
3 files changed, 111 insertions, 0 deletions
diff --git a/games-arcade/Manifest.gz b/games-arcade/Manifest.gz
index ecdf7e19098f..d161036ea9fe 100644
--- a/games-arcade/Manifest.gz
+++ b/games-arcade/Manifest.gz
Binary files differ
diff --git a/games-arcade/shovel-knight/Manifest b/games-arcade/shovel-knight/Manifest
index 28080f418700..5bc37a7f4613 100644
--- a/games-arcade/shovel-knight/Manifest
+++ b/games-arcade/shovel-knight/Manifest
@@ -1,3 +1,4 @@
DIST shovel_knight_treasure_trove_4_1b_arby_s_46298.sh 338751327 BLAKE2B 6285266a6013331ed59b399fcbe4a3a2069e1efe403411c7e85a9c165a33e262c0a92085c7a5da7fca31573eaeb29b32915f006cc9093944be03214407e891ef SHA512 ecb5967de37e482aec8fcd992f4d7c269e8b676ed119785114f465dd85932453f3facfcd7e77d7bf3044033189d0d33692bb4de3332753ee57bac74b7adec499
+EBUILD shovel-knight-4.1b-r1.ebuild 3292 BLAKE2B 3e8e3081e1116a66d85d4ec278371a531c97042ff82eca8e9f4803f4acad63c233c1530442a8502c73824ca6c9b63397e195a1e25aa15a35ec15c94ee49291c3 SHA512 3e1cbbe93f0da45778460813d2815c4cec38915565eb25e9aa276312b3563e3f10ec6f4dab277dccfa8b711fe16ecd45cf7874cf6145ced6ededda73ae3fe48f
EBUILD shovel-knight-4.1b.ebuild 1550 BLAKE2B df1751295311940c3c28db758eb7f2737dddaf55fef6bf5af0c2edc1b0e14198b5d6994ceddefdd688aa2e1928dacaca00085dd6fa5b7d3df37de4a62ac4c70b SHA512 595f53570953ee217cb8bfb585ed58c20e0dab9b6dcc95ce631094b81470cdce0fb7233a1353b239d5c85b896f24f04aff76b9135b0859c1f1a9881ba1d65022
MISC metadata.xml 254 BLAKE2B 4e6c8e1f126f76233a38aba6f5388488656795cb1d7d4767ccb1349772f5e78d59fc5663d4f1933dbe4633c2fbb90cd1d42d4b4d4f5ededc53653e7df13c7187 SHA512 2b82da849e3b0dec378f3fb497014f5d1dbc7aceb8a1f9d1638e83fe69448b1c5151eb4b1187154d828e4a296609ce5125b40977b2581d95b5588e353ca75135
diff --git a/games-arcade/shovel-knight/shovel-knight-4.1b-r1.ebuild b/games-arcade/shovel-knight/shovel-knight-4.1b-r1.ebuild
new file mode 100644
index 000000000000..185cfa3f331a
--- /dev/null
+++ b/games-arcade/shovel-knight/shovel-knight-4.1b-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop unpacker wrapper xdg
+
+MY_PN="ShovelKnight"
+DESCRIPTION="Sweeping classic action adventure with an 8-bit retro aesthetic"
+HOMEPAGE="https://yachtclubgames.com/games/shovel-knight-treasure-trove/"
+SRC_URI="${PN//-/_}_treasure_trove_4_1b_arby_s_46298.sh"
+S="${WORKDIR}/data/noarch/game"
+
+LICENSE="Yacht-Club-Games-EULA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="+joystick"
+RESTRICT="bindist fetch splitdebug"
+
+# I packaged Box2D in the hope of unbundling it but it turns out this
+# game uses a custom version. -- Chewi :(
+
+RDEPEND="
+ media-libs/glew:1.10
+ virtual/opengl
+ !x86? ( media-libs/libsdl2[joystick?,opengl,sound,video] )
+ x86? ( !joystick? ( media-libs/libsdl2[opengl,sound,video] ) )
+"
+
+BDEPEND="
+ dev-util/patchelf
+"
+
+DIR="/opt/${PN}"
+QA_PREBUILT="${DIR#/}/*"
+
+pkg_nofetch() {
+ einfo "Please buy and download ${SRC_URI} from:"
+ einfo " https://www.gog.com/game/${PN//-/_}"
+ einfo "and move it to your distfiles directory."
+}
+
+src_unpack() {
+ unpack_zip ${A}
+}
+
+src_install() {
+ local BITS=$(usex amd64 64 32) LIB=
+
+ exeinto "${DIR}"
+ doexe ${BITS}/${MY_PN}
+ make_wrapper ${MY_PN} ./${MY_PN} "${DIR}"
+
+ exeinto "${DIR}"/lib
+ doexe ${BITS}/lib/lib{Box2D.so.*,fmod*-*.so}
+
+ for LIB in ${BITS}/lib/libfmod*-*.so; do
+ LIB=${LIB##*/}
+
+ # The FMOD libraries are duplicated rather than symlinked, which is
+ # silly, so create our own symlinks. Both sets of names are needed.
+ dosym "${LIB}" "${DIR}/lib/${LIB%-*}.so"
+
+ # The SONAMEs are also unset, which upsets our QA check, so fix.
+ patchelf --set-soname "${LIB%-*}.so" "${ED}${DIR}/lib/${LIB}" || die
+ done
+
+ if use joystick; then
+ local SDL=libSDL2-2.0.so.0
+ local SDLj=libSDL2-joystick.so
+
+ if use x86; then
+ # Under x86, using our own SDL2 causes the game to crash when a
+ # controller is connected, even after applying the workaround below.
+ # It is seemingly caused by a change to the SDL_GetJoystickGUIDInfo
+ # signature. We must therefore use the bundled SDL2.
+ doexe ${BITS}/lib/${SDL}
+ else
+ # The game uses internal SDL2 joystick functions. These functions
+ # have since been hidden and some have been removed. Using our own
+ # SDL2 therefore causes the game to crash when a controller is
+ # connected. We still want to use our own SDL2 for things like
+ # Wayland, but we can work around this by loading both, using the
+ # bundled one as a fallback.
+ newexe ${BITS}/lib/${SDL} ${SDLj}
+
+ # The bundled SDL2 SONAME has to be set to something different.
+ patchelf --set-soname ${SDLj} "${ED}${DIR}"/lib/${SDLj} || die
+
+ # We need to add the new SONAME as a NEEDED entry, but the order is
+ # important, so we also need to remove the existing NEEDED entry
+ # first and add it back again afterwards.
+ patchelf \
+ --remove-needed ${SDL} \
+ --add-needed ${SDLj} \
+ --add-needed ${SDL} \
+ "${ED}${DIR}"/${MY_PN} || die
+ fi
+ fi
+
+ # The RUNPATHs are not entirely correct so fix up.
+ patchelf --set-rpath '$ORIGIN/lib' "${ED}${DIR}"/${MY_PN} || die
+ patchelf --set-rpath '$ORIGIN' "${ED}${DIR}"/lib/libfmodevent*.so || die
+
+ insinto "${DIR}"
+ doins -r data/
+
+ newicon -s 256 ../support/icon.png ${PN}.png
+ make_desktop_entry ${MY_PN} "Shovel Knight"
+}