1 |
commit: f161975e2a310eec02789128306f8bfb54af35a8 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 1 11:59:26 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 2 02:20:51 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f161975e |
7 |
|
8 |
games-emulation/hatari: add 2.3.1 |
9 |
|
10 |
- removed upstreamed joystick patch |
11 |
- replaced default-rom patch by using /etc/hatari.cfg, effective even |
12 |
if user has their own .cfg in $HOME unless overrides same option |
13 |
- removed libsdl1 support, upstream advises against using and it'll |
14 |
be removed entirely next version |
15 |
- added python3_10 (haven't managed to find issues) |
16 |
- the python-ui frontend was previously missing gtk+:3[introspection] |
17 |
dep and, rather than add unconditionally, introducing USE=gui |
18 |
- plus other small adjustments/fixes |
19 |
|
20 |
bug 739146 config-file test failure was caused by the default-rom patch |
21 |
|
22 |
Closes: https://bugs.gentoo.org/739146 |
23 |
Closes: https://bugs.gentoo.org/765004 |
24 |
Closes: https://bugs.gentoo.org/765115 |
25 |
Closes: https://github.com/gentoo/gentoo/pull/20905 |
26 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
27 |
|
28 |
games-emulation/hatari/Manifest | 1 + |
29 |
.../files/hatari-2.3.1-caps5-include-path.patch | 18 +++++ |
30 |
.../hatari-2.3.1-cmake-include-checksym.patch | 12 +++ |
31 |
games-emulation/hatari/hatari-2.3.1.ebuild | 90 ++++++++++++++++++++++ |
32 |
4 files changed, 121 insertions(+) |
33 |
|
34 |
diff --git a/games-emulation/hatari/Manifest b/games-emulation/hatari/Manifest |
35 |
index ed73c9b263e..aaf8342bc92 100644 |
36 |
--- a/games-emulation/hatari/Manifest |
37 |
+++ b/games-emulation/hatari/Manifest |
38 |
@@ -1 +1,2 @@ |
39 |
DIST hatari-2.2.1.tar.bz2 4162798 BLAKE2B 51938a649957779652b0debf7f867b2abe2d54fd3bb31086542f9f5970d01a120455e4381a9cb173724fbc7c45359d4009377bfe99038b338142fa5b82723533 SHA512 0e4c148a355a53c9cf79bdd28e5d7bb5f3389c780576017c6ebe2b69465d67522f373945f0e51681120ece24f5f08442265515486d2d7df7a02d9cd94cc44f1e |
40 |
+DIST hatari-2.3.1.tar.bz2 4334129 BLAKE2B f309a31cbf181135b02858ebefa4d70116e66d252ef5de03cffa8254c0e86e4eeebfbf626613103790fb803d08028b318721020b292ea748c79e4d008e6d503d SHA512 78a6c7d80bfcd9b3a85a82754f4180cfd906eb95c6a44c8fbb92c2a648dc9c21c74c9dd18db4783d87259a3061b39e639c54cdd6c033d83de1252afef811382f |
41 |
|
42 |
diff --git a/games-emulation/hatari/files/hatari-2.3.1-caps5-include-path.patch b/games-emulation/hatari/files/hatari-2.3.1-caps5-include-path.patch |
43 |
new file mode 100644 |
44 |
index 00000000000..a12207b0958 |
45 |
--- /dev/null |
46 |
+++ b/games-emulation/hatari/files/hatari-2.3.1-caps5-include-path.patch |
47 |
@@ -0,0 +1,18 @@ |
48 |
+Gentoo's spsdeclib ebuild installs headers in caps5/ |
49 |
+while upstream now expects them in caps/ |
50 |
+ |
51 |
+See: https://github.com/hatari/hatari/commit/367a87b |
52 |
+--- a/cmake/FindCapsImage.cmake |
53 |
++++ b/cmake/FindCapsImage.cmake |
54 |
+@@ -6,3 +6,3 @@ |
55 |
+ |
56 |
+-SET(CAPSIMAGE_DIR caps) |
57 |
++SET(CAPSIMAGE_DIR caps5) |
58 |
+ FIND_PATH(CAPSIMAGE_INCLUDE_DIR ${CAPSIMAGE_DIR}/CapsAPI.h) |
59 |
+--- a/src/floppy_ipf.c |
60 |
++++ b/src/floppy_ipf.c |
61 |
+@@ -34,3 +34,3 @@ |
62 |
+ #endif |
63 |
+-#include <caps/CapsLibAll.h> |
64 |
++#include <caps5/CapsLibAll.h> |
65 |
+ #define CapsLong SDWORD |
66 |
|
67 |
diff --git a/games-emulation/hatari/files/hatari-2.3.1-cmake-include-checksym.patch b/games-emulation/hatari/files/hatari-2.3.1-cmake-include-checksym.patch |
68 |
new file mode 100644 |
69 |
index 00000000000..39da11ea307 |
70 |
--- /dev/null |
71 |
+++ b/games-emulation/hatari/files/hatari-2.3.1-cmake-include-checksym.patch |
72 |
@@ -0,0 +1,12 @@ |
73 |
+Fix edge case build failure triggered by passing every |
74 |
+DISABLE_FIND_PACKAGE, including disabling the normally |
75 |
+always-enabled readline. |
76 |
+ |
77 |
+CMake Error at CMakeLists.txt:229 (check_symbol_exists): |
78 |
+ Unknown CMake command "check_symbol_exists". |
79 |
+--- a/CMakeLists.txt |
80 |
++++ b/CMakeLists.txt |
81 |
+@@ -12,2 +12,3 @@ |
82 |
+ include(CheckStructHasMember) |
83 |
++include(CheckSymbolExists) |
84 |
+ include(CheckCCompilerFlag) |
85 |
|
86 |
diff --git a/games-emulation/hatari/hatari-2.3.1.ebuild b/games-emulation/hatari/hatari-2.3.1.ebuild |
87 |
new file mode 100644 |
88 |
index 00000000000..2512ca06655 |
89 |
--- /dev/null |
90 |
+++ b/games-emulation/hatari/hatari-2.3.1.ebuild |
91 |
@@ -0,0 +1,90 @@ |
92 |
+# Copyright 1999-2021 Gentoo Authors |
93 |
+# Distributed under the terms of the GNU General Public License v2 |
94 |
+ |
95 |
+EAPI=7 |
96 |
+ |
97 |
+PYTHON_COMPAT=( python3_{7..10} ) |
98 |
+inherit cmake python-single-r1 xdg |
99 |
+ |
100 |
+DESCRIPTION="Atari ST emulator" |
101 |
+HOMEPAGE="https://hatari.tuxfamily.org/" |
102 |
+SRC_URI="https://download.tuxfamily.org/hatari/${PV}/${P}.tar.bz2" |
103 |
+ |
104 |
+LICENSE="GPL-2+" |
105 |
+SLOT="0" |
106 |
+KEYWORDS="~amd64 ~x86" |
107 |
+IUSE="capsimage gui microphone png portmidi readline udev zlib" |
108 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
109 |
+ |
110 |
+DEPEND=" |
111 |
+ ${PYTHON_DEPS} |
112 |
+ media-libs/libsdl2[sound,video] |
113 |
+ capsimage? ( >=dev-libs/spsdeclib-5.1-r1 ) |
114 |
+ microphone? ( media-libs/portaudio ) |
115 |
+ png? ( media-libs/libpng:= ) |
116 |
+ portmidi? ( media-libs/portmidi ) |
117 |
+ readline? ( sys-libs/readline:= ) |
118 |
+ udev? ( virtual/udev ) |
119 |
+ zlib? ( sys-libs/zlib:= )" |
120 |
+RDEPEND=" |
121 |
+ ${DEPEND} |
122 |
+ gui? ( |
123 |
+ $(python_gen_cond_dep ' |
124 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
125 |
+ ') |
126 |
+ x11-libs/gtk+:3[introspection] |
127 |
+ ) |
128 |
+ >=games-emulation/emutos-0.9.9.1" |
129 |
+BDEPEND="virtual/pkgconfig" |
130 |
+ |
131 |
+PATCHES=( |
132 |
+ "${FILESDIR}"/${P}-caps5-include-path.patch |
133 |
+ "${FILESDIR}"/${P}-cmake-include-checksym.patch |
134 |
+) |
135 |
+DOCS=( |
136 |
+ readme.txt |
137 |
+ doc/{bugs,changelog,scsi-driver,thanks,video-recording}.txt |
138 |
+) |
139 |
+ |
140 |
+src_prepare() { |
141 |
+ cmake_src_prepare |
142 |
+ |
143 |
+ sed -i "s/\.1\.gz\b/.1/g;T;s/gzip[^\$]*/cat /g" {*/,}*/CMakeLists.txt || die |
144 |
+ sed -i "s:doc/${PN}:doc/${PF}:" python-ui/uihelpers.py || die |
145 |
+ # Note: >2.3.1 renames /python/ to /python3/, update accordingly |
146 |
+ sed -i "s/python/${EPYTHON}/;s/dosfs/fs.fat/" tools/atari-hd-image.sh || die |
147 |
+ |
148 |
+ # Use emutos package rather than bundled ROM. |
149 |
+ rm src/tos.img || die |
150 |
+ cat <<-EOF > hatari.cfg || die |
151 |
+ [ROM] |
152 |
+ szTosImageFileName = ${EPREFIX}/usr/share/emutos/etos512k.img |
153 |
+ EOF |
154 |
+} |
155 |
+ |
156 |
+src_configure() { |
157 |
+ local mycmakeargs=( |
158 |
+ -DBUILD_SHARED_LIBS=OFF |
159 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_CapsImage=$(usex !capsimage) |
160 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_PNG=$(usex !png) |
161 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_PortAudio=$(usex !microphone) |
162 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_PortMidi=$(usex !portmidi) |
163 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Readline=$(usex !readline) |
164 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Udev=$(usex !udev) |
165 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=$(usex !zlib) |
166 |
+ -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF} |
167 |
+ -DETCDIR="${EPREFIX}"/etc |
168 |
+ $(usex gui '' -DPYTHON_EXECUTABLE=false) # disables python-ui/ |
169 |
+ ) |
170 |
+ cmake_src_configure |
171 |
+} |
172 |
+ |
173 |
+src_install() { |
174 |
+ cmake_src_install |
175 |
+ |
176 |
+ insinto /etc |
177 |
+ doins hatari.cfg |
178 |
+ |
179 |
+ python_fix_shebang "${ED}"/usr/bin |
180 |
+ use gui && python_fix_shebang "${ED}"/usr/share/${PN}/${PN}ui |
181 |
+} |