commit:     d052233a2c67fb7f7d296e9eede48310f61ff3c0
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 29 22:31:35 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Mar 29 22:38:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d052233a

games-emulation/openmsx: Bump to 20.0, python3_13(t), clean up

One test is failing, don't know why.

Closes: https://bugs.gentoo.org/952483
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-emulation/openmsx/Manifest            |  1 +
 games-emulation/openmsx/openmsx-20.0.ebuild | 99 +++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)

diff --git a/games-emulation/openmsx/Manifest b/games-emulation/openmsx/Manifest
index cdf6479cb279..6a345faa73c6 100644
--- a/games-emulation/openmsx/Manifest
+++ b/games-emulation/openmsx/Manifest
@@ -1 +1,2 @@
 DIST openmsx-19.1.tar.gz 4216833 BLAKE2B 
7d1ed4dfb76d0d9d3eecf1447395b4bec775f6c92edf8164583de3b0fe9fc98bce00c47206340e2cde417ba5580785ec92be04ec7a6c5cf2f1a03cd5769ce746
 SHA512 
107208f7a9324beb348e8dd7f9ad878ee04ee3948159448065ff2a8c78a9c890e38cb2cbcada754bfc3698a6ba53b0ad1a9ac837d6071eb330b18ea2bdb0fbc7
+DIST openmsx-20.0.tar.gz 5947913 BLAKE2B 
f5fddf81dc5641cc14f29a0dda9a82778c39e5b48347682af3d304f7ae095fb31e9ce86a9e834d05e88e9cfe901e5ce32f0fdea31b4f634041b3b36567820791
 SHA512 
b4095ac786eab0d0e2a73d8a9088d246c6281ffb0a801ce6497fba23933f361a5280b62473555476dbbe74039357ac6c930f628c0b7f0eeda884f341b47bad9a

diff --git a/games-emulation/openmsx/openmsx-20.0.ebuild 
b/games-emulation/openmsx/openmsx-20.0.ebuild
new file mode 100644
index 000000000000..8440bdb995b9
--- /dev/null
+++ b/games-emulation/openmsx/openmsx-20.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} python3_13t )
+
+inherit desktop python-any-r1 readme.gentoo-r1 toolchain-funcs xdg
+
+DESCRIPTION="MSX emulator that aims for perfection"
+HOMEPAGE="https://openmsx.org/";
+SRC_URI="https://github.com/openMSX/openMSX/releases/download/RELEASE_${PV//./_}/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+joystick"
+
+RDEPEND="dev-lang/tcl:0=
+       media-libs/alsa-lib
+       media-libs/freetype:2
+       media-libs/libogg
+       media-libs/libpng:0=
+       media-libs/libsdl2[joystick=,sound,video]
+       media-libs/libtheora
+       media-libs/libvorbis
+       media-libs/sdl2-ttf
+       >=media-libs/glew-1.3.2:0=
+       sys-libs/zlib
+       virtual/opengl"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+DOC_CONTENTS="If you want to if you want to emulate real MSX systems and not 
only the free C-BIOS machines, put the system ROMs in one of the following 
directories: ${EPREFIX}/usr/share/${PN}/systemroms or 
~/.openMSX/share/systemroms"
+
+src_prepare() {
+       default
+       sed -i -e 's/-fsanitize=address//' build/flavour-unittest.mk || die
+       sed -i -e '/SYMLINK/s:true:false:' build/custom.mk || die # Can't be 
overridden
+       sed -i -e 's/GPL\.txt//' doc/node.mk || die
+
+       # Build system only configured to use bundled version - but not from the
+       # directory it's distributed in
+       cp "${S}/Contrib/catch2/catch.hpp" "${S}/src/unittest" || die
+}
+
+my_emake() {
+       emake \
+               V=1 \
+               CXX="$(tc-getCXX)" \
+               CXXFLAGS="${CXXFLAGS}" \
+               LDFLAGS="${LDFLAGS}" \
+               LINK_FLAGS_PREFIX= \
+               OPENMSX_STRIP=false \
+               "${@}"
+}
+
+src_compile() {
+       my_emake \
+               INSTALL_SHARE_DIR="${EPREFIX}/usr/share/${PN}"
+}
+
+src_test() {
+       # To get tests, we need to build with OPENMSX_FLAVOUR=unittest and then 
the
+       # build is stored in a directory of the pattern
+       # ${WORKDIR}/derived/*-unittest/. This is separate from the actual 
build,
+       # stored in ${WORKDIR}/derived/*-opt. The unittest binary and the 
workdir
+       # binary are in each of these directories under their `bin` directories.
+       my_emake \
+               OPENMSX_FLAVOUR=unittest
+
+       # There will only ever be one *-unittest directory
+       "${S}"/derived/*-unittest/bin/openmsx || die
+}
+
+src_install() {
+       # To guarantee installing the proper binary in case tests were built,
+       # specify the default OPENMSX_FLAVOUR
+       my_emake \
+               INSTALL_BINARY_DIR="${ED}/usr/bin" \
+               INSTALL_SHARE_DIR="${ED}/usr/share/${PN}" \
+               INSTALL_DOC_DIR="${ED}/usr/share/doc/${PF}" \
+               OPENMSX_FLAVOUR=opt \
+               install
+
+       einstalldocs
+       readme.gentoo_create_doc
+
+       local i
+       for i in 16 32 48 64 128 256 ; do
+               newicon -s "${i}" "share/icons/openMSX-logo-${i}.png" 
"${PN}.png"
+       done
+       make_desktop_entry "${PN}" "openMSX"
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+       xdg_pkg_postinst
+}

Reply via email to