1 |
commit: 97aca905d70e7ea2e4d5b9e045c3b42201cc9d6c |
2 |
Author: Lino Bigatti <linobigatti <AT> protonmail <DOT> com> |
3 |
AuthorDate: Thu Apr 15 21:22:53 2021 +0000 |
4 |
Commit: Lino Bigatti <linobigatti <AT> protonmail <DOT> com> |
5 |
CommitDate: Thu Apr 15 21:23:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=97aca905 |
7 |
|
8 |
games-emulation/np2kai: ebuild QA fixes |
9 |
|
10 |
Package-Manager: Portage-3.0.17, Repoman-3.0.2 |
11 |
Signed-off-by: Lino Bigatti <linobigatti <AT> protonmail.com> |
12 |
|
13 |
games-emulation/np2kai/metadata.xml | 9 ++-- |
14 |
games-emulation/np2kai/np2kai-22.ebuild | 86 ++++++++++++++++++--------------- |
15 |
2 files changed, 52 insertions(+), 43 deletions(-) |
16 |
|
17 |
diff --git a/games-emulation/np2kai/metadata.xml b/games-emulation/np2kai/metadata.xml |
18 |
index c8c54e1d0..7dcbc8858 100644 |
19 |
--- a/games-emulation/np2kai/metadata.xml |
20 |
+++ b/games-emulation/np2kai/metadata.xml |
21 |
@@ -11,12 +11,11 @@ |
22 |
It is based on Neko project II. |
23 |
</longdescription> |
24 |
<use> |
25 |
- <flag name="sdl"> |
26 |
- Use <pkg>media-libs/libsdl</pkg> over <pkg>media-libs/libsdl2</pkg> |
27 |
- </flag> |
28 |
+ <flag name="sdl">Use <pkg>media-libs/libsdl</pkg></flag> |
29 |
+ <flag name="sdl2">Use <pkg>media-libs/libsdl2</pkg></flag> |
30 |
<flag name="i286"> |
31 |
- Enable i286 emulation. |
32 |
- USE="ia32" or USE="haxm" will disable it, |
33 |
+ Enable i286 emulation |
34 |
+ USE="ia32" or USE="haxm" will disable it, |
35 |
unless all 3 emulation USE flags are set |
36 |
</flag> |
37 |
<flag name="ia32">Enable ia32 emulation</flag> |
38 |
|
39 |
diff --git a/games-emulation/np2kai/np2kai-22.ebuild b/games-emulation/np2kai/np2kai-22.ebuild |
40 |
index 22a7116ff..035962b57 100644 |
41 |
--- a/games-emulation/np2kai/np2kai-22.ebuild |
42 |
+++ b/games-emulation/np2kai/np2kai-22.ebuild |
43 |
@@ -3,66 +3,76 @@ |
44 |
|
45 |
EAPI=7 |
46 |
|
47 |
-DESCRIPTION="NP2kai is an emulator for the japanese PC-98 series of computers." |
48 |
+DESCRIPTION="NP2kai is an emulator for the japanese PC-98 series of computers" |
49 |
HOMEPAGE="https://domisan.sakura.ne.jp/article/np2kai/np2kai.html" |
50 |
SRC_URI="https://github.com/AZO234/NP2kai/archive/refs/tags/rev.${PV}.tar.gz -> ${P}.tar.gz" |
51 |
|
52 |
-PATCHES=( |
53 |
- "${FILESDIR}/${P}-autogen.patch" |
54 |
-) |
55 |
- |
56 |
LICENSE="MIT" |
57 |
SLOT="0" |
58 |
KEYWORDS="~amd64" |
59 |
- |
60 |
-IUSE="sdl +i286 ia32 haxm" |
61 |
+IUSE="sdl +sdl2 +i286 ia32 haxm" |
62 |
+REQUIRED_USE="^^ ( sdl sdl2 )" |
63 |
|
64 |
# Configure crashes if sdl AND sdl2 are not present, even if the options are off |
65 |
# It also requires sdl2-ttf even when building for sdl |
66 |
-DEPEND="sys-libs/glibc |
67 |
- media-libs/libsdl |
68 |
- sdl? ( media-libs/sdl-mixer ) |
69 |
- sdl? ( media-libs/sdl-ttf ) |
70 |
+# TODO: test musl |
71 |
+# TODO: migrate from gtk2 to gtk3 |
72 |
+DEPEND="media-libs/libsdl |
73 |
media-libs/libsdl2 |
74 |
- !sdl? ( media-libs/sdl2-mixer ) |
75 |
+ sdl? ( |
76 |
+ media-libs/sdl-mixer |
77 |
+ media-libs/sdl-ttf |
78 |
+ ) |
79 |
+ sdl2? ( |
80 |
+ media-libs/sdl2-mixer |
81 |
+ ) |
82 |
media-libs/sdl2-ttf |
83 |
virtual/libusb:1 |
84 |
x11-base/xorg-server |
85 |
x11-libs/gtk+:2" |
86 |
- |
87 |
RDEPEND="${DEPEND}" |
88 |
-BDEPEND="sys-devel/gcc |
89 |
- sys-devel/automake |
90 |
- dev-util/cmake" |
91 |
+BDEPEND="sys-devel/automake" |
92 |
|
93 |
-S=${WORKDIR}/NP2kai-rev.${PV}/x11 |
94 |
+S="${WORKDIR}/NP2kai-rev.${PV}/x11" |
95 |
|
96 |
+PATCHES=( |
97 |
+ "${FILESDIR}/${P}-autogen.patch" |
98 |
+) |
99 |
+ |
100 |
+# TODO: add a die statement to autogen |
101 |
src_configure() { |
102 |
bash "${S}/autogen.sh" |
103 |
- sdlconf=$(usex sdl "--enable-sdl --enable-sdlmixer --enable-sdlttf |
104 |
- --disable-sdl2 --disable-sdl2mixer --disable-sdl2ttf" \ |
105 |
- "--enable-sdl2 --enable-sdl2mixer --enable-sdl2ttf |
106 |
- --disable-sdl --disable-sdlmixer --disable-sdlttf" ) |
107 |
- features=$( if use i286 && use ia32 && use haxm ; \ |
108 |
- then echo --enable-build-all ; \ |
109 |
- else echo $(use_enable ia32) $(use_enable haxm) ; \ |
110 |
- fi ) |
111 |
- econf ${sdlconf} ${features} |
112 |
+ if use i286 && use ia32 && use haxm ; then |
113 |
+ features=("--enable-build-all") |
114 |
+ else |
115 |
+ features=($(use_enable ia32) $(use_enable haxm)) |
116 |
+ fi |
117 |
+ local myeconfargs=( |
118 |
+ $(use_enable sdl) |
119 |
+ $(use_enable sdl sdlmixer) |
120 |
+ $(use_enable sdl sdlttf) |
121 |
+ $(use_enable sdl2) |
122 |
+ $(use_enable sdl2 sdl2mixer) |
123 |
+ $(use_enable sdl2 sdl2ttf) |
124 |
+ ) |
125 |
+ econf "${myeconfargs[@]}" "${features}" |
126 |
} |
127 |
|
128 |
pkg_postinst() { |
129 |
- if [ "${features}" = "--enable-build-all" ] ; then |
130 |
- cfgname="{xnp2kai, xnp21kai}" |
131 |
- elif ! use ia32 && ! use haxm ; then |
132 |
- cfgname="xnp2kai" |
133 |
- else |
134 |
- cfgname="xnp21kai" |
135 |
- fi |
136 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
137 |
+ if [ use i286 && use ia32 && use haxm ] ; then |
138 |
+ cfgname="{xnp2kai, xnp21kai}" |
139 |
+ elif [ ! use ia32 && ! use haxm ] ; then |
140 |
+ cfgname="xnp2kai" |
141 |
+ else |
142 |
+ cfgname="xnp21kai" |
143 |
+ fi |
144 |
|
145 |
- elog "Japanese fonts are needed to use the emulator." |
146 |
- elog "Please run the following command to configure them:" |
147 |
- elog "mkdir -p ~/.config/${cfgname} && ln -s /path/to/font.ttf ~/.config/${cfgname}/default.ttf && rm ~/.config/${cfgname}/font.tmp" |
148 |
+ elog "Japanese fonts are needed to use the emulator." |
149 |
+ elog "Please run the following command to configure them:" |
150 |
+ elog "mkdir -p ~/.config/${cfgname} && ln -s /path/to/font.ttf ~/.config/${cfgname}/default.ttf && rm ~/.config/${cfgname}/font.tmp" |
151 |
|
152 |
- elog "Neko project 2 requires a BIOS dump to work." |
153 |
- elog "Please dump the BIOS from your device and put the files under ~/.config/${cfgname}" |
154 |
+ elog "Neko project 2 requires a BIOS dump to work." |
155 |
+ elog "Please dump the BIOS from your device and put the files under ~/.config/${cfgname}" |
156 |
+ fi |
157 |
} |