1 |
commit: d20458e5acd07447803514d53bbe2d48957946aa |
2 |
Author: Theo Anderson <telans <AT> posteo <DOT> de> |
3 |
AuthorDate: Fri Apr 16 11:28:33 2021 +0000 |
4 |
Commit: Theo Anderson <telans <AT> posteo <DOT> de> |
5 |
CommitDate: Fri Apr 16 11:30:39 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d20458e5 |
7 |
|
8 |
games-emulation/np2kai: add 22_p20210211 |
9 |
|
10 |
* unkeyworded for testing |
11 |
* migrated to cmake build system |
12 |
|
13 |
Signed-off-by: Theo Anderson <telans <AT> posteo.de> |
14 |
|
15 |
games-emulation/np2kai/Manifest | 2 + |
16 |
games-emulation/np2kai/metadata.xml | 7 +- |
17 |
games-emulation/np2kai/np2kai-22_p20210211.ebuild | 91 +++++++++++++++++++++++ |
18 |
3 files changed, 97 insertions(+), 3 deletions(-) |
19 |
|
20 |
diff --git a/games-emulation/np2kai/Manifest b/games-emulation/np2kai/Manifest |
21 |
index a12654926..48529de63 100644 |
22 |
--- a/games-emulation/np2kai/Manifest |
23 |
+++ b/games-emulation/np2kai/Manifest |
24 |
@@ -1 +1,3 @@ |
25 |
DIST np2kai-22.tar.gz 3189290 BLAKE2B 74856a40ae57a71b1958f5c546ee3c907b1b1f5975715b21ce5a6c3a044a4c9ebf425e6ed1819e2d688e48be3853bb5f161e3e0c5031cd316359f7ebce0d5418 SHA512 47cd75b251dc0382537769225297dd155bb7b95a1fba7417a9c06b56f4fc89b0c38de101a68da8e8d776d456574aa6bf7f4e1490b3666f20469d4bf18e72b6dd |
26 |
+DIST np2kai-22_p20210211.tar.gz 3121849 BLAKE2B 21679e1d2a6bc9877ffeb256ddb19ca613e6f1abaf643087bdcff8b92e77aee9099d6dc7c574fe25407f092e6401f3d974463bedd6898e09d56d6e3a1465f93e SHA512 a9e9413a9257496498e5b289d4346072bc9582437691a4e2aa68d93fb1a1a5b12a0ff526cd436a6492629f77724e87564635dc83b53c4c1fe9341ea36597c251 |
27 |
+DIST sdl2-cmake-modules-ad006a3daae65a612ed87415037e32188b81071e.tar.gz 11996 BLAKE2B 751cde3370594b20520fdedef35fc6aa1806932f3fbe01c6068b0dbe696d113df1afbfe6e84eb7c5166afb4cb12a619282855e7f050374bc49d7cd948e5cb808 SHA512 72b20cce9073d554df67c6efa23e77da07fadce064535d03d943aab05a0bfab2b0253fa4fc04e98f9e9aa169429f0597f825867cebf71c4048032fe85cf61de3 |
28 |
|
29 |
diff --git a/games-emulation/np2kai/metadata.xml b/games-emulation/np2kai/metadata.xml |
30 |
index 7dcbc8858..b00def1c4 100644 |
31 |
--- a/games-emulation/np2kai/metadata.xml |
32 |
+++ b/games-emulation/np2kai/metadata.xml |
33 |
@@ -11,14 +11,15 @@ |
34 |
It is based on Neko project II. |
35 |
</longdescription> |
36 |
<use> |
37 |
- <flag name="sdl">Use <pkg>media-libs/libsdl</pkg></flag> |
38 |
- <flag name="sdl2">Use <pkg>media-libs/libsdl2</pkg></flag> |
39 |
+ <flag name="haxm">Enable haxm emulation</flag> |
40 |
<flag name="i286"> |
41 |
Enable i286 emulation |
42 |
USE="ia32" or USE="haxm" will disable it, |
43 |
unless all 3 emulation USE flags are set |
44 |
</flag> |
45 |
<flag name="ia32">Enable ia32 emulation</flag> |
46 |
- <flag name="haxm">Enable haxm emulation</flag> |
47 |
+ <flag name="sdl">Use <pkg>media-libs/libsdl</pkg> instead of <pkg>media-libs/libsdl2</pkg></flag> |
48 |
+ <flag name="sdl2">Use <pkg>media-libs/libsdl2</pkg> instead of <pkg>media-libs/libsdl</pkg></flag> |
49 |
+ <flag name="X">Build support for X</flag> |
50 |
</use> |
51 |
</pkgmetadata> |
52 |
|
53 |
diff --git a/games-emulation/np2kai/np2kai-22_p20210211.ebuild b/games-emulation/np2kai/np2kai-22_p20210211.ebuild |
54 |
new file mode 100644 |
55 |
index 000000000..92756c159 |
56 |
--- /dev/null |
57 |
+++ b/games-emulation/np2kai/np2kai-22_p20210211.ebuild |
58 |
@@ -0,0 +1,91 @@ |
59 |
+# Copyright 2021 Gentoo Authors |
60 |
+# Distributed under the terms of the GNU General Public License v2 |
61 |
+ |
62 |
+EAPI=7 |
63 |
+ |
64 |
+inherit xdg cmake |
65 |
+ |
66 |
+MY_REV=3e8fedc7c1c6f68faa26589187512474a766ee9e |
67 |
+MY_SDL2_CMAKE_MODULES_REV=ad006a3daae65a612ed87415037e32188b81071e |
68 |
+ |
69 |
+DESCRIPTION="NP2kai is an emulator for the japanese PC-98 series of computers" |
70 |
+HOMEPAGE="https://domisan.sakura.ne.jp/article/np2kai/np2kai.html" |
71 |
+SRC_URI=" |
72 |
+ https://github.com/AZO234/NP2kai/archive/${MY_REV}.tar.gz -> ${P}.tar.gz |
73 |
+ https://github.com/aminosbh/sdl2-cmake-modules/archive/${MY_SDL2_CMAKE_MODULES_REV}.tar.gz \ |
74 |
+ -> sdl2-cmake-modules-${MY_SDL2_CMAKE_MODULES_REV}.tar.gz |
75 |
+" |
76 |
+ |
77 |
+LICENSE="MIT BSD" |
78 |
+SLOT="0" |
79 |
+KEYWORDS="" # Unkeyworded for testing |
80 |
+IUSE="haxm +i286 +sdl2 +X" |
81 |
+REQUIRED_USE="|| ( sdl2 X )" |
82 |
+ |
83 |
+# TODO: migrate from gtk2 to gtk3 |
84 |
+DEPEND=" |
85 |
+ dev-libs/openssl:= |
86 |
+ virtual/libusb:1 |
87 |
+ sdl2? ( |
88 |
+ media-libs/libsdl2 |
89 |
+ media-libs/sdl2-ttf |
90 |
+ media-libs/sdl2-mixer |
91 |
+ ) |
92 |
+ !sdl2? ( |
93 |
+ media-libs/libsdl |
94 |
+ media-libs/sdl-mixer |
95 |
+ media-libs/sdl-ttf |
96 |
+ ) |
97 |
+ X? ( |
98 |
+ dev-libs/glib |
99 |
+ media-libs/freetype |
100 |
+ media-libs/fontconfig |
101 |
+ x11-libs/gtk+:2 |
102 |
+ x11-libs/libX11 |
103 |
+ ) |
104 |
+" |
105 |
+RDEPEND="${DEPEND}" |
106 |
+ |
107 |
+S="${WORKDIR}/NP2kai-${MY_REV}" |
108 |
+ |
109 |
+src_prepare() { |
110 |
+ sed -i 's/CONFIGURATIONS Release/CONFIGURATIONS Gentoo/g' CMakeLists.txt || die |
111 |
+ mv "${WORKDIR}"/sdl2-cmake-modules-${MY_SDL2_CMAKE_MODULES_REV}/* \ |
112 |
+ "${S}"/cmake/sdl2-cmake-modules/ || die |
113 |
+ |
114 |
+ cmake_src_prepare |
115 |
+} |
116 |
+ |
117 |
+src_configure() { |
118 |
+ local mycmakeargs=( |
119 |
+ -DBUILD_I286=$(usex i286) |
120 |
+ -DBUILD_HAXM=$(usex haxm) |
121 |
+ -DBUILD_SDL=ON |
122 |
+ -DBUILD_X=$(usex X) |
123 |
+ -DNP2kai_temp=NO |
124 |
+ -DUSE_HAXM=$(usex haxm) |
125 |
+ -DUSE_SDL2=$(usex sdl2) |
126 |
+ ) |
127 |
+ |
128 |
+ NP2KAI_VERSION=${PV} NP2KAI_HASH=${MY_REV} cmake_src_configure |
129 |
+} |
130 |
+ |
131 |
+pkg_postinst() { |
132 |
+ xdg_pkg_postinst |
133 |
+ if [[ -z ${REPLACING_VERSIONS} ]]; then |
134 |
+ if use i286 && use haxm; then |
135 |
+ local cfgname="{xnp2kai,xnp21kai}" |
136 |
+ elif ! use haxm; then |
137 |
+ local cfgname="xnp2kai" |
138 |
+ else |
139 |
+ local cfgname="xnp21kai" |
140 |
+ fi |
141 |
+ |
142 |
+ elog "Japanese fonts are needed to use the emulator." |
143 |
+ elog "Please run the following command to configure them:" |
144 |
+ elog "mkdir -p ~/.config/${cfgname} && ln -s /path/to/font.ttf ~/.config/${cfgname}/default.ttf && rm ~/.config/${cfgname}/font.tmp" |
145 |
+ elog |
146 |
+ elog "Neko project 2 requires a BIOS dump to work." |
147 |
+ elog "Please dump the BIOS from your device and put the files under ~/.config/${cfgname}" |
148 |
+ fi |
149 |
+} |