diff options
author | orbea <orbea@riseup.net> | 2024-01-28 15:00:25 -0800 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2024-02-23 11:22:07 +0200 |
commit | 00afd8addb1784b03b0bb637ca6c2fd85676044f (patch) | |
tree | 2e375fa7fc34e930fb086e0af2ef5a18043738e7 /games-emulation | |
parent | mail-mta/exim: DANE support cannot be disabled using OpenSSL (diff) | |
download | gentoo-00afd8addb1784b03b0bb637ca6c2fd85676044f.tar.gz gentoo-00afd8addb1784b03b0bb637ca6c2fd85676044f.tar.bz2 gentoo-00afd8addb1784b03b0bb637ca6c2fd85676044f.zip |
games-emulation/gambatte-jg: new USE flags
* examples: Install the example frontend for libgambatte
* jgmodule: Install the module for The Jolly Good API
* shared: Install the shared libgambatte library
The old behavior was to only build the Jollygood module.
Signed-off-by: orbea <orbea@riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/35060
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r-- | games-emulation/gambatte-jg/gambatte-jg-9999.ebuild | 51 | ||||
-rw-r--r-- | games-emulation/gambatte-jg/metadata.xml | 4 |
2 files changed, 44 insertions, 11 deletions
diff --git a/games-emulation/gambatte-jg/gambatte-jg-9999.ebuild b/games-emulation/gambatte-jg/gambatte-jg-9999.ebuild index bc00ccf2fcc5..1c1fd17466dd 100644 --- a/games-emulation/gambatte-jg/gambatte-jg-9999.ebuild +++ b/games-emulation/gambatte-jg/gambatte-jg-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022 Gentoo Authors +# Copyright 2022-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -15,32 +15,61 @@ if [[ "${PV}" == *9999 ]] ; then else SRC_URI="https://gitlab.com/jgemu/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2" S="${WORKDIR}/${MY_P}" - KEYWORDS="~amd64" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" fi -LICENSE="BSD GPL-2" +LICENSE=" + GPL-2 + examples? ( 0BSD ) + jgmodule? ( BSD ) +" SLOT="1" +IUSE="examples +jgmodule shared" +REQUIRED_USE="|| ( examples jgmodule shared )" DEPEND=" - media-libs/jg:1= - media-libs/soxr + examples? ( + media-libs/libsdl2[opengl,sound,video] + media-libs/speexdsp + ) + jgmodule? ( + media-libs/jg:1= + media-libs/soxr + ) " RDEPEND=" ${DEPEND} - games-emulation/jgrf + jgmodule? ( games-emulation/jgrf ) " BDEPEND=" virtual/pkgconfig " +pkg_setup() { + local makeopts=( + 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 CXX="$(tc-getCXX)" PKG_CONFIG="$(tc-getPKG_CONFIG)" + local mymakeargs=( + CXX="$(tc-getCXX)" + PKG_CONFIG="$(tc-getPKG_CONFIG)" + ${MY_MAKEOPTS} + ) + emake "${mymakeargs[@]}" } src_install() { - emake install \ - DESTDIR="${D}" \ - PREFIX="${EPREFIX}"/usr \ - DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \ + local mymakeargs=( + DESTDIR="${D}" + PREFIX="${EPREFIX}"/usr + DOCDIR="${EPREFIX}"/usr/share/doc/${PF} LIBDIR="${EPREFIX}/usr/$(get_libdir)" + ${MY_MAKEOPTS} + ) + emake install "${mymakeargs[@]}" } diff --git a/games-emulation/gambatte-jg/metadata.xml b/games-emulation/gambatte-jg/metadata.xml index 184d31eac85b..537d0c732c6f 100644 --- a/games-emulation/gambatte-jg/metadata.xml +++ b/games-emulation/gambatte-jg/metadata.xml @@ -9,6 +9,10 @@ <email>sam@gentoo.org</email> <name>Sam James</name> </maintainer> + <use> + <flag name="jgmodule">Build module for The Jolly Good API</flag> + <flag name="shared">Build shared library</flag> + </use> <longdescription> Gambatte JG is an emulator for the Nintendo Game Boy/Game Boy Color. This is a fork of the final public revision of Gambatte. |