summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-09-03 10:28:46 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-09-03 12:08:57 -0400
commite2ea95086070844e55e40871a97c012b1c8929d2 (patch)
treea19b49e524817396ca8fbb800667ce37e2d16ba8 /games-emulation
parentgames-emulation/emutos: add 1.1.1 (diff)
downloadgentoo-e2ea95086070844e55e40871a97c012b1c8929d2.tar.gz
gentoo-e2ea95086070844e55e40871a97c012b1c8929d2.tar.bz2
gentoo-e2ea95086070844e55e40871a97c012b1c8929d2.zip
games-emulation/hatari: tidy, remove X11 automagic, use new emutos
Single etos512k.img is gone in emutos-1.1.1 and was replaced by a "best for hatari" 1024k, which makes sense to default to here. Also spotted this had automagic on libX11, and uses [joystick]. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/hatari/hatari-2.3.1-r1.ebuild95
1 files changed, 95 insertions, 0 deletions
diff --git a/games-emulation/hatari/hatari-2.3.1-r1.ebuild b/games-emulation/hatari/hatari-2.3.1-r1.ebuild
new file mode 100644
index 000000000000..874bf6b1be3e
--- /dev/null
+++ b/games-emulation/hatari/hatari-2.3.1-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+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 gui microphone png portmidi readline udev zlib"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="
+ media-libs/libsdl2[X?,joystick,sound,video]
+ X? ( x11-libs/libX11 )
+ capsimage? ( >=dev-libs/spsdeclib-5.1-r1 )
+ microphone? ( media-libs/portaudio )
+ 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-1.1.1"
+DEPEND="
+ ${COMMON_DEPEND}
+ X? ( x11-base/xorg-proto )"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-caps5-include-path.patch
+ "${FILESDIR}"/${P}-cmake-include-checksym.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/g;T;s/gzip[^\$]*/cat /g" {*/,}*/CMakeLists.txt || die
+ sed -i "s:doc/${PN}:doc/${PF}:" python-ui/uihelpers.py || die
+ # Note: >2.3.1 renames /python/ to /python3/, update accordingly
+ sed -i "s/python/${EPYTHON}/;s/dosfs/fs.fat/" 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}
+ -DETCDIR="${EPREFIX}"/etc
+ $(cmake_use_find_package X X11)
+ $(cmake_use_find_package capsimage CapsImage)
+ $(cmake_use_find_package microphone PortAudio)
+ $(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) # disables python-ui/
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ insinto /etc
+ doins hatari.cfg
+
+ python_fix_shebang "${ED}"/usr/bin
+ use gui && python_fix_shebang "${ED}"/usr/share/${PN}/${PN}ui
+}