commit: 55f57746223d41b4fbb28919e108dec41e7c2897
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Sep 18 16:48:05 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Nov 2 12:46:00 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55f57746
games-emulation/bsnes-jg: add new USE flags
bsnes-jg now also offers libbsnes, an example and doxygen documentation.
Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
games-emulation/bsnes-jg/bsnes-jg-9999.ebuild | 51 ++++++++++++++++++++++-----
games-emulation/bsnes-jg/metadata.xml | 4 +++
2 files changed, 46 insertions(+), 9 deletions(-)
diff --git a/games-emulation/bsnes-jg/bsnes-jg-9999.ebuild
b/games-emulation/bsnes-jg/bsnes-jg-9999.ebuild
index 243ad0946b1d..261d967b3f3f 100644
--- a/games-emulation/bsnes-jg/bsnes-jg-9999.ebuild
+++ b/games-emulation/bsnes-jg/bsnes-jg-9999.ebuild
@@ -3,7 +3,10 @@
EAPI=8
-inherit toolchain-funcs
+DOCS_BUILDER="doxygen"
+DOCS_DIR="objs/doc"
+
+inherit docs toolchain-funcs
MY_PN=${PN%-*}
MY_P=${MY_PN}-${PV}
@@ -18,29 +21,59 @@ else
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
fi
-LICENSE="ISC GPL-3+ LGPL-2.1+ MIT ZLIB"
+LICENSE="
+ ISC GPL-3+ LGPL-2.1+ MIT ZLIB
+ examples? ( 0BSD )
+"
SLOT="1"
+IUSE="examples +jgmodule shared"
+REQUIRED_USE="
+ || ( examples jgmodule shared )
+ doc? ( shared )
+"
DEPEND="
- media-libs/jg:1=
media-libs/libsamplerate
+ examples? ( media-libs/libsdl2[sound,video] )
+ jgmodule? ( media-libs/jg:1= )
"
RDEPEND="
${DEPEND}
- games-emulation/jgrf
+ jgmodule? ( games-emulation/jgrf )
"
BDEPEND="
virtual/pkgconfig
"
+src_configure() {
+ local makeopts=(
+ PREFIX="${EPREFIX}"/usr
+ DISABLE_MODULE=$(usex jgmodule 0 1)
+ ENABLE_EXAMPLE=$(usex examples 1 0)
+ ENABLE_SHARED=$(usex shared 1 0)
+ )
+ export MY_MAKEOPTS="${makeopts[@]}"
+}
+
src_compile() {
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)"
PKG_CONFIG="$(tc-getPKG_CONFIG)"
+ local mymakeargs=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ PKG_CONFIG="$(tc-getPKG_CONFIG)"
+ ${MY_MAKEOPTS}
+ )
+ emake "${mymakeargs[@]}"
+ use doc && emake doxyfile
+ docs_compile
}
src_install() {
- emake install \
- DESTDIR="${D}" \
- PREFIX="${EPREFIX}"/usr \
- DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ local mymakeargs=(
+ DESTDIR="${D}"
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF}
LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+ ${MY_MAKEOPTS}
+ )
+ emake install "${mymakeargs[@]}"
+ use doc && einstalldocs
}
diff --git a/games-emulation/bsnes-jg/metadata.xml
b/games-emulation/bsnes-jg/metadata.xml
index 8d62f9db73ee..3904aaeb005d 100644
--- a/games-emulation/bsnes-jg/metadata.xml
+++ b/games-emulation/bsnes-jg/metadata.xml
@@ -9,6 +9,10 @@
<email>[email protected]</email>
<name>Proxy Maintainers</name>
</maintainer>
+ <use>
+ <flag name="jgmodule">Build module for The Jolly Good API</flag>
+ <flag name="shared">Build shared library</flag>
+ </use>
<longdescription>
bsnes-jg is a cycle accurate emulator for the Super
Famicom/Super
Nintendo Entertainment System, including support for the Super
Game Boy,