summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2024-09-18 09:48:05 -0700
committerJoonas Niilola <juippis@gentoo.org>2024-11-02 14:46:00 +0200
commit55f57746223d41b4fbb28919e108dec41e7c2897 (patch)
tree7695587a11c901f47f0081a5d589406d0f957f5e /games-emulation
parentsys-firmware/ipxe: destabilize 1.21.1_p20230601-r1 for ~ppc64 (diff)
downloadgentoo-55f57746223d41b4fbb28919e108dec41e7c2897.tar.gz
gentoo-55f57746223d41b4fbb28919e108dec41e7c2897.tar.bz2
gentoo-55f57746223d41b4fbb28919e108dec41e7c2897.zip
games-emulation/bsnes-jg: add new USE flags
bsnes-jg now also offers libbsnes, an example and doxygen documentation. Signed-off-by: orbea <orbea@riseup.net> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/bsnes-jg/bsnes-jg-9999.ebuild51
-rw-r--r--games-emulation/bsnes-jg/metadata.xml4
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>proxy-maint@gentoo.org</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,