From 2bb582efa85e6226ea40b99c149f141c5329e4ae Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Sat, 4 May 2024 12:57:44 -0400 Subject: games-emulation/hatari: add 2.5.0, enable py3.12 wrt bug #879691, the check for strlcpy was removed entirely (hopefully nothing else, haven't looked in-depth) gui "seems" fine with 3.12, albeit not have messed with it much Closes: https://bugs.gentoo.org/879691 Closes: https://bugs.gentoo.org/929577 Signed-off-by: Ionen Wolkens --- games-emulation/hatari/Manifest | 1 + games-emulation/hatari/hatari-2.5.0.ebuild | 103 +++++++++++++++++++++++++++++ games-emulation/hatari/metadata.xml | 1 + 3 files changed, 105 insertions(+) create mode 100644 games-emulation/hatari/hatari-2.5.0.ebuild (limited to 'games-emulation/hatari') diff --git a/games-emulation/hatari/Manifest b/games-emulation/hatari/Manifest index e5dec1b910f2..7a08070ac4dd 100644 --- a/games-emulation/hatari/Manifest +++ b/games-emulation/hatari/Manifest @@ -1 +1,2 @@ DIST hatari-2.4.1.tar.bz2 4446656 BLAKE2B 0844f14f2161de931ba098d290655152ecde354a80cc9c18b460fda77149759386cf7ed46d0ce1dd36dc303f1f3cfe421f37f169e06d46a06589cef1d601dbc6 SHA512 90c555150b0fa86b88e4ba3360384edf6afa05d45b82b3260853178b77fd542da6f31bd2e80c8307380fff9c61f0230545ec987e6e74b8c3d708bc5ef5ca8f42 +DIST hatari-2.5.0.tar.bz2 2820580 BLAKE2B 42d955db9a219632d39697041667c2f9ddbd2cc06472c7ca508a097a3dcd5681a73a1069a3a6e788eca79a9aae2ff1ce00288a09556c8bedd697bcd77256f653 SHA512 53c5d5164ccaba8abea2babfbca971995fe6bd4f796d418f01243d3d40ac43371ba04c20600c5117b3e7b7b9a36d092e15cd209cc08324d17a05a7ca8e93cd84 diff --git a/games-emulation/hatari/hatari-2.5.0.ebuild b/games-emulation/hatari/hatari-2.5.0.ebuild new file mode 100644 index 000000000000..7b8c40d50801 --- /dev/null +++ b/games-emulation/hatari/hatari-2.5.0.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake python-single-r1 xdg + +DESCRIPTION="Atari ST emulator" +HOMEPAGE="https://hatari.tuxfamily.org/" +SRC_URI="https://download.tuxfamily.org/hatari/${PV}/${P}.tar.bz2" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X capsimage capstone gui png portmidi readline udev zlib" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + png? ( zlib ) +" + +COMMON_DEPEND=" + media-libs/libsdl2[X?,joystick,sound,video] + X? ( x11-libs/libX11 ) + capsimage? ( dev-libs/spsdeclib ) + capstone? ( dev-libs/capstone:= ) + png? ( media-libs/libpng:= ) + portmidi? ( media-libs/portmidi ) + readline? ( sys-libs/readline:= ) + udev? ( virtual/udev ) + zlib? ( sys-libs/zlib:= ) +" +RDEPEND=" + ${PYTHON_DEPS} + ${COMMON_DEPEND} + gui? ( + $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]') + x11-libs/gtk+:3[introspection] + ) + games-emulation/emutos +" +DEPEND=" + ${COMMON_DEPEND} + X? ( x11-base/xorg-proto ) +" +BDEPEND="${PYTHON_DEPS}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3.1-caps5-include-path.patch +) + +DOCS=( + readme.txt + doc/{bugs,changelog,scsi-driver,thanks,video-recording}.txt +) + +src_prepare() { + cmake_src_prepare + + sed -i "s/\.1\.gz\b/.1/;T;s/gzip[^\$]*/cat /" {*/,}*/CMakeLists.txt || die + sed -i "s:doc/${PN}:doc/${PF}/html:" python-ui/uihelpers.py || die + sed -e "s/python3/${EPYTHON}/" \ + -e 's/mkdosfs/mkfs.fat/' \ + -i tools/atari-hd-image.sh || die + + # use emutos package rather than bundled ROM + rm src/tos.img || die + cat <<-EOF > hatari.cfg || die + [ROM] + szTosImageFileName = ${EPREFIX}/usr/share/emutos/etos1024k.img + EOF +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=OFF + -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}/html + -DETCDIR="${EPREFIX}"/etc + $(cmake_use_find_package X X11) + $(cmake_use_find_package capsimage CapsImage) + $(cmake_use_find_package capstone Capstone) + $(cmake_use_find_package png PNG) + $(cmake_use_find_package portmidi PortMidi) + $(cmake_use_find_package readline Readline) + $(cmake_use_find_package udev Udev) + $(cmake_use_find_package zlib ZLIB) + $(usev !gui -DPYTHON_EXECUTABLE=false) # only disables python-ui/ + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + insinto /etc + doins hatari.cfg + + mv -- "${ED}"/usr/share/doc/${PF}/{html/*.txt,} || die + + python_fix_shebang "${ED}"/usr/bin + use gui && python_fix_shebang "${ED}"/usr/share/${PN}/${PN}ui +} diff --git a/games-emulation/hatari/metadata.xml b/games-emulation/hatari/metadata.xml index 8f24f9114b50..acb3e4b7e028 100644 --- a/games-emulation/hatari/metadata.xml +++ b/games-emulation/hatari/metadata.xml @@ -7,6 +7,7 @@ Use dev-libs/spsdeclib to read .IPF, .RAW, and .CTR disk images + Use dev-libs/capstone for disassembly output in the debugger Use media-libs/portmidi as an alternative MIDI backend -- cgit v1.2.3-65-gdbad