1 |
commit: 59f5af28fafefaa5aa1decf4d47b0c8f7f0d95c0 |
2 |
Author: John Helmert III <ajak <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 5 04:27:31 2022 +0000 |
4 |
Commit: John Helmert III <ajak <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 5 04:28:08 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59f5af28 |
7 |
|
8 |
games-emulation/openmsx: add 18.0 |
9 |
|
10 |
Signed-off-by: John Helmert III <ajak <AT> gentoo.org> |
11 |
|
12 |
games-emulation/openmsx/Manifest | 1 + |
13 |
games-emulation/openmsx/openmsx-18.0.ebuild | 112 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 113 insertions(+) |
15 |
|
16 |
diff --git a/games-emulation/openmsx/Manifest b/games-emulation/openmsx/Manifest |
17 |
index 61bc81a9d708..5c3a8475c626 100644 |
18 |
--- a/games-emulation/openmsx/Manifest |
19 |
+++ b/games-emulation/openmsx/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST openmsx-17.0.tar.gz 4045461 BLAKE2B 46c70ce3f853aecebf8bdeddc5786903634d88d013497383490d79b0dbf455f48a70b3658b9913db197cf7e66cbc6f4da37da58b1b24d77c75b731e842c663df SHA512 4fc87efd2bfbcd12bebb4e005b18b1cb2048f5d8f3188ef9b55f1e003c8d021fb47bd67d647137daa6a8640b5656b0db363f3b62158d690ddb5f7bf1af3459e1 |
22 |
+DIST openmsx-18.0.tar.gz 4151084 BLAKE2B 0d5b4e4745c12689e4227408481367b4b4faaa4c7c2830ec0c4b9a5eb90c4b415628cd21834384d39fa4a820c725431848e98f7ef722c437f7bb4f96ae7b14c4 SHA512 f395fae8eac3bcb9334251c1c266a8c4d2951d6510a7c4885ddbc95aaed39f4ef8ae12a177d4a9ff44745ca368055f55f9983029b47441f4fd9731696f79809f |
23 |
|
24 |
diff --git a/games-emulation/openmsx/openmsx-18.0.ebuild b/games-emulation/openmsx/openmsx-18.0.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..1fbd9a8dba20 |
27 |
--- /dev/null |
28 |
+++ b/games-emulation/openmsx/openmsx-18.0.ebuild |
29 |
@@ -0,0 +1,112 @@ |
30 |
+# Copyright 1999-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+PYTHON_COMPAT=( python3_{9,10,11} ) |
36 |
+ |
37 |
+inherit desktop flag-o-matic python-any-r1 readme.gentoo-r1 toolchain-funcs xdg |
38 |
+ |
39 |
+DESCRIPTION="MSX emulator that aims for perfection" |
40 |
+HOMEPAGE="https://openmsx.org/" |
41 |
+SRC_URI="https://github.com/openMSX/openMSX/releases/download/RELEASE_${PV//./_}/${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="GPL-2" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~amd64 ~x86" |
46 |
+IUSE="+joystick" |
47 |
+ |
48 |
+RDEPEND="dev-lang/tcl:0= |
49 |
+ media-libs/alsa-lib |
50 |
+ media-libs/libogg |
51 |
+ media-libs/libpng:0= |
52 |
+ media-libs/libsdl2[joystick=,sound,video] |
53 |
+ media-libs/libtheora |
54 |
+ media-libs/libvorbis |
55 |
+ media-libs/sdl2-ttf |
56 |
+ >=media-libs/glew-1.3.2:0= |
57 |
+ sys-libs/zlib |
58 |
+ virtual/opengl" |
59 |
+DEPEND="${RDEPEND}" |
60 |
+BDEPEND="${PYTHON_DEPS}" |
61 |
+ |
62 |
+DOC_CONTENTS=" |
63 |
+If you want to if you want to emulate real MSX systems and not |
64 |
+only the free C-BIOS machines, put the system ROMs in one of |
65 |
+the following directories: /usr/share/${PN}/systemroms |
66 |
+or ~/.openMSX/share/systemroms |
67 |
+" |
68 |
+ |
69 |
+src_prepare() { |
70 |
+ default |
71 |
+ sed -i \ |
72 |
+ -e '/^LDFLAGS:=/d' \ |
73 |
+ -e '/LINK_FLAGS_PREFIX/d' \ |
74 |
+ -e '/LINK_FLAGS+=/s/-s//' \ |
75 |
+ -e '/LINK_FLAGS+=\$(TARGET_FLAGS)/s/$/ $(LDFLAGS)/' \ |
76 |
+ build/main.mk \ |
77 |
+ || die |
78 |
+ sed -i -e '/SYMLINK/s:true:false:' build/custom.mk || die |
79 |
+ sed -i -e 's/GPL.txt//' doc/node.mk || die |
80 |
+ |
81 |
+ # Build system only configured to use bundled version - but not from the |
82 |
+ # directory it's distributed in |
83 |
+ cp "${S}/Contrib/catch2/catch.hpp" "${S}/src/unittest" || die |
84 |
+} |
85 |
+ |
86 |
+src_configure() { |
87 |
+ tc-export CXX |
88 |
+ |
89 |
+ # Doesn't compile without this, and build system doesn't consistently add |
90 |
+ # it properly for all compilers |
91 |
+ append-cxxflags '-std=c++17' |
92 |
+ |
93 |
+ default |
94 |
+} |
95 |
+ |
96 |
+src_compile() { |
97 |
+ emake \ |
98 |
+ CXXFLAGS="${CXXFLAGS}" \ |
99 |
+ INSTALL_SHARE_DIR="${EPREFIX}/usr/share/${PN}" \ |
100 |
+ V=1 |
101 |
+} |
102 |
+ |
103 |
+src_test() { |
104 |
+ # To get tests, we need to build with OPENMSX_FLAVOUR=unittest and then the |
105 |
+ # build is stored in a directory of the pattern |
106 |
+ # ${WORKDIR}/derived/*-unittest/. This is separate from the actual build, |
107 |
+ # stored in ${WORKDIR}/derived/*-opt. The unittest binary and the workdir |
108 |
+ # binary are in each of these directories under their `bin` directories. |
109 |
+ emake \ |
110 |
+ V=1 \ |
111 |
+ CXXFLAGS="${CXXFLAGS}" \ |
112 |
+ OPENMSX_FLAVOUR=unittest |
113 |
+ |
114 |
+ # There will only ever be one *-unittest directory |
115 |
+ "${S}"/derived/*-unittest/bin/openmsx || die |
116 |
+} |
117 |
+ |
118 |
+src_install() { |
119 |
+ # To guarantee installing the proper binary in case tests were built, |
120 |
+ # specify the default OPENMSX_FLAVOUR |
121 |
+ emake \ |
122 |
+ V=1 \ |
123 |
+ INSTALL_BINARY_DIR="${ED}/usr/bin" \ |
124 |
+ INSTALL_SHARE_DIR="${ED}/usr/share/${PN}" \ |
125 |
+ INSTALL_DOC_DIR="${ED}/usr/share/doc/${PF}" \ |
126 |
+ OPENMSX_FLAVOUR=opt \ |
127 |
+ install |
128 |
+ |
129 |
+ einstalldocs |
130 |
+ readme.gentoo_create_doc |
131 |
+ |
132 |
+ for i in 16 32 48 64 128 256 ; do |
133 |
+ newicon -s "${i}" "share/icons/openMSX-logo-${i}.png" "${PN}.png" |
134 |
+ done |
135 |
+ make_desktop_entry "${PN}" "openMSX" |
136 |
+} |
137 |
+ |
138 |
+pkg_postinst() { |
139 |
+ readme.gentoo_print_elog |
140 |
+ xdg_pkg_postinst |
141 |
+} |