gentoo-ebuilds/games-emulation/jollycv-jg/jollycv-jg-2.0.0.ebuild
orbea d68ca66473
games-emulation/jollycv-jg: add 2.0.0
Signed-off-by: orbea <orbea@riseup.net>
Part-of: https://github.com/gentoo/gentoo/pull/44177
Closes: https://github.com/gentoo/gentoo/pull/44177
Signed-off-by: Sam James <sam@gentoo.org>
2025-10-19 17:38:44 +01:00

78 lines
1.5 KiB
Bash

# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DOCS_BUILDER="doxygen"
DOCS_DIR="objs/doc"
inherit docs toolchain-funcs
MY_PN=${PN%-*}
MY_P=${MY_PN}-${PV}
DESCRIPTION="Jolly Good ColecoVision, CreatiVision and My Vision Emulator"
HOMEPAGE="https://gitlab.com/jgemu/jollycv"
if [[ "${PV}" == *9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.com/jgemu/${MY_PN}.git"
else
SRC_URI="https://gitlab.com/jgemu/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2"
S="${WORKDIR}/${MY_P}"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
fi
LICENSE="
BSD MIT
examples? ( 0BSD )
"
SLOT="1"
IUSE="examples +jgmodule shared"
REQUIRED_USE="
|| ( examples jgmodule shared )
doc? ( shared )
"
DEPEND="
media-libs/speexdsp
examples? ( media-libs/libsdl2[sound,video] )
jgmodule? ( media-libs/jg:1= )
"
RDEPEND="
${DEPEND}
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() {
local mymakeargs=(
CC="$(tc-getCC)"
PKG_CONFIG="$(tc-getPKG_CONFIG)"
${MY_MAKEOPTS}
)
emake "${mymakeargs[@]}"
use doc && emake doxyfile
docs_compile
}
src_install() {
local mymakeargs=(
DESTDIR="${D}"
DOCDIR="${EPREFIX}"/usr/share/doc/${PF}
LIBDIR="${EPREFIX}/usr/$(get_libdir)"
${MY_MAKEOPTS}
)
emake install "${mymakeargs[@]}"
use doc && einstalldocs
}