commit:     124fa0620ebaabef3359b219d409b644e1052e20
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Oct  6 04:01:27 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct  8 05:50:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=124fa062

games-emulation/jollycv-jg: add new USE flags

Add USE flags doc, examples, jgmodule and shared.

Signed-off-by: orbea <orbea <AT> riseup.net>
Part-of: https://github.com/gentoo/gentoo/pull/44060
Closes: https://github.com/gentoo/gentoo/pull/44060
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-emulation/jollycv-jg/jollycv-jg-9999.ebuild | 54 ++++++++++++++++++-----
 games-emulation/jollycv-jg/metadata.xml           |  4 ++
 2 files changed, 47 insertions(+), 11 deletions(-)

diff --git a/games-emulation/jollycv-jg/jollycv-jg-9999.ebuild 
b/games-emulation/jollycv-jg/jollycv-jg-9999.ebuild
index db3830fb16c1..b9097c666980 100644
--- a/games-emulation/jollycv-jg/jollycv-jg-9999.ebuild
+++ b/games-emulation/jollycv-jg/jollycv-jg-9999.ebuild
@@ -1,13 +1,16 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2022-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit toolchain-funcs
+DOCS_BUILDER="doxygen"
+DOCS_DIR="objs/doc"
+
+inherit docs toolchain-funcs
 
 MY_PN=${PN%-*}
 MY_P=${MY_PN}-${PV}
-DESCRIPTION="Jolly Good ColecoVision Emulator"
+DESCRIPTION="Jolly Good ColecoVision, CreatiVision and My Vision Emulator"
 HOMEPAGE="https://gitlab.com/jgemu/jollycv";
 if [[ "${PV}" == *9999 ]] ; then
        inherit git-r3
@@ -18,29 +21,58 @@ else
        KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
 fi
 
-LICENSE="BSD MIT"
+LICENSE="
+       BSD MIT
+       examples? ( 0BSD )
+"
 SLOT="1"
+IUSE="examples +jgmodule shared"
+REQUIRED_USE="
+       || ( examples jgmodule shared )
+       doc? ( shared )
+"
 
 DEPEND="
-       media-libs/jg:1=
        media-libs/speexdsp
+       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)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+       local mymakeargs=(
+               CC="$(tc-getCC)"
+               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/jollycv-jg/metadata.xml 
b/games-emulation/jollycv-jg/metadata.xml
index bdc875749d79..ba501a852f42 100644
--- a/games-emulation/jollycv-jg/metadata.xml
+++ b/games-emulation/jollycv-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>
                JollyCV is a highly accurate emulator for the ColecoVision,
                including support for the Super Game Module. It was written in

Reply via email to