summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2022-03-11 22:38:39 +0100
committerJoonas Niilola <juippis@gentoo.org>2022-05-26 09:36:33 +0300
commit5673186acd87d77631b0b1b2ced9238491bedf18 (patch)
treeb91391e58056a46ec736279578d999aa6cd9ca7a
parentdev-libs/nspr: add 4.34 (diff)
downloadgentoo-5673186acd87d77631b0b1b2ced9238491bedf18.tar.gz
gentoo-5673186acd87d77631b0b1b2ced9238491bedf18.tar.bz2
gentoo-5673186acd87d77631b0b1b2ced9238491bedf18.zip
games-arcade/oshu: Version bump, 2.0.2
Closes: https://bugs.gentoo.org/834370 Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Closes: https://github.com/gentoo/gentoo/pull/24499 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--games-arcade/oshu/Manifest1
-rw-r--r--games-arcade/oshu/files/oshu-2.0.2-ffmpeg4-compat.patch16
-rw-r--r--games-arcade/oshu/oshu-2.0.2.ebuild65
-rw-r--r--games-arcade/oshu/oshu-9999.ebuild18
4 files changed, 95 insertions, 5 deletions
diff --git a/games-arcade/oshu/Manifest b/games-arcade/oshu/Manifest
index ebf8762f324e..218a6c1c7a76 100644
--- a/games-arcade/oshu/Manifest
+++ b/games-arcade/oshu/Manifest
@@ -1,2 +1,3 @@
DIST oshu-2.0.1.tar.gz 144900 BLAKE2B 47f1d0a11255459ae357142499aeffcf07fbcad961cb34ba98e9efa7cb4229cf8d61ec836a4c899f2ea0883f1252395bc0c6ff34c5d670d67091cf6483d135ff SHA512 65768b3d8e7733464f05a19bbee594c0be728267bbd0667bc0f34e0d01a39e52d4ecce89a9223f7c454d73b21bc735401e9d83eea8b0a2eaf1c7825a3bd6b1cf
+DIST oshu-2.0.2.tar.gz 146109 BLAKE2B 98dd49f972f1f1f820f654a2d358ceffdd2c54cd2daa0594914e6a1e29f1d1e757fe46d021afc75a33f4ef94bbb370213f20229843c173d7c55d876fe3db7e12 SHA512 e881e9429cebaf74337e55e7fa5445d992627d7616088f15abfafa2c125e1ff057a5b0f39ee4a1d1728c310728a8590e65286b9a0f81dca1f8963b2943fba596
DIST oshu-skin-v1.tar.gz 2224947 BLAKE2B 0b463133dd7ab54421551627d12932f5257848b1130d57af8c2ff6b6836a49c9322b8f2f7e95de540909390d0139e547650a6bb321614cf92fac464b09075674 SHA512 d562294ac5e122a9d9971e3ab92f6168d848177cc5e22a94bbc450fde2b3b14007796a24d33722da9b6675467b109ce128ba94dca5dcc7c61c91c1e373032618
diff --git a/games-arcade/oshu/files/oshu-2.0.2-ffmpeg4-compat.patch b/games-arcade/oshu/files/oshu-2.0.2-ffmpeg4-compat.patch
new file mode 100644
index 000000000000..c16e61ce1288
--- /dev/null
+++ b/games-arcade/oshu/files/oshu-2.0.2-ffmpeg4-compat.patch
@@ -0,0 +1,16 @@
+diff --git a/./lib/audio/stream.cc.old b/./lib/audio/stream.cc
+index 808851f..09eb4fb 100644
+--- a/./lib/audio/stream.cc.old
++++ b/./lib/audio/stream.cc
+@@ -193,7 +193,11 @@ static int open_demuxer(const char *url, oshu::stream *stream)
+ stream->demuxer,
+ AVMEDIA_TYPE_AUDIO,
+ -1, -1,
++#if LIBAVCODEC_VERSION_MAJOR < 59
++ &stream->codec,
++#else
+ (const AVCodec**)&stream->codec,
++#endif
+ 0
+ );
+ if (rc < 0 || stream->codec == NULL) {
diff --git a/games-arcade/oshu/oshu-2.0.2.ebuild b/games-arcade/oshu/oshu-2.0.2.ebuild
new file mode 100644
index 000000000000..c1d02ab63c76
--- /dev/null
+++ b/games-arcade/oshu/oshu-2.0.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg
+
+DESCRIPTION="Lightweight osu! port"
+HOMEPAGE="https://github.com/fmang/oshu"
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/fmang/oshu.git"
+ SRC_URI="osu-skin? ( https://www.mg0.fr/oshu/skins/osu-v1.tar.gz -> ${PN}-skin-v1.tar.gz )"
+else
+ SRC_URI="https://github.com/fmang/oshu/archive/${PV}.tar.gz -> oshu-${PV}.tar.gz
+ osu-skin? ( https://www.mg0.fr/oshu/skins/osu-v1.tar.gz -> ${PN}-skin-v1.tar.gz )"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3 CC-BY-NC-4.0"
+SLOT="0"
+IUSE="osu-skin"
+
+RDEPEND="
+ media-libs/libsdl2
+ media-libs/sdl2-image
+ x11-libs/cairo
+ x11-libs/pango
+ media-video/ffmpeg:=
+"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/oshu-2.0.2-ffmpeg4-compat.patch" )
+
+src_unpack() {
+ default
+
+ if [[ ${PV} = *9999 ]]; then
+ git-r3_src_unpack
+ fi
+}
+
+src_prepare() {
+ if use osu-skin; then
+ eapply "${FILESDIR}/oshu-2.0.0-use_unpacked_osu-skin.patch"
+ mv "${WORKDIR}/osu" share/skins/ || die "Failed to move osu-skin"
+ fi
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOSHU_DEFAULT_SKIN=$(usex osu-skin osu minimal)
+ -DOSHU_SKINS=minimal$(usev osu-skin ';osu')
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ cmake_build check
+}
diff --git a/games-arcade/oshu/oshu-9999.ebuild b/games-arcade/oshu/oshu-9999.ebuild
index 5ebae7bfdcd6..cf543ede25bd 100644
--- a/games-arcade/oshu/oshu-9999.ebuild
+++ b/games-arcade/oshu/oshu-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit cmake xdg
@@ -27,11 +27,19 @@ RDEPEND="
media-libs/sdl2-image
x11-libs/cairo
x11-libs/pango
- media-video/ffmpeg:=
+ >media-video/ffmpeg-5:=
"
DEPEND="${RDEPEND}"
+src_unpack() {
+ default
+
+ if [[ ${PV} = *9999 ]]; then
+ git-r3_src_unpack
+ fi
+}
+
src_prepare() {
if use osu-skin; then
eapply "${FILESDIR}/oshu-2.0.0-use_unpacked_osu-skin.patch"
@@ -43,8 +51,8 @@ src_prepare() {
src_configure() {
local mycmakeargs=(
- '-DOSHU_DEFAULT_SKIN='$(usex osu-skin 'osu' 'minimal')
- '-DOSHU_SKINS=minimal'$(usex osu-skin ';osu' '')
+ -DOSHU_DEFAULT_SKIN=$(usex osu-skin osu minimal)
+ -DOSHU_SKINS=minimal$(usev osu-skin ';osu')
)
cmake_src_configure