1 |
commit: 1da3c10cc574473121a60893967c541c01f7cf2e |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 22 01:58:56 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 22 05:41:47 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1da3c10c |
7 |
|
8 |
app-emulation/vice: add cpuhistory flag, tidy ebuild |
9 |
|
10 |
Also fixed USE=debug and a configure-stage direct AR call. |
11 |
|
12 |
Thanks-to: Vedran Vrbanc |
13 |
Closes: https://bugs.gentoo.org/782571 |
14 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
15 |
|
16 |
app-emulation/vice/metadata.xml | 1 + |
17 |
app-emulation/vice/vice-3.5.ebuild | 131 ++++++++++++++++++++----------------- |
18 |
2 files changed, 71 insertions(+), 61 deletions(-) |
19 |
|
20 |
diff --git a/app-emulation/vice/metadata.xml b/app-emulation/vice/metadata.xml |
21 |
index 2294b11c8d0..331360dc216 100644 |
22 |
--- a/app-emulation/vice/metadata.xml |
23 |
+++ b/app-emulation/vice/metadata.xml |
24 |
@@ -6,6 +6,7 @@ |
25 |
<name>Gentoo Games Project</name> |
26 |
</maintainer> |
27 |
<use> |
28 |
+ <flag name="cpuhistory">Enable 65xx CPU history support (may decrease performance)</flag> |
29 |
<flag name="ethernet">Enable ethernet emulation</flag> |
30 |
<flag name="headless">Include the headless variant of the emulator</flag> |
31 |
<flag name="mpg123">Enable mp3@64 cartridge support</flag> |
32 |
|
33 |
diff --git a/app-emulation/vice/vice-3.5.ebuild b/app-emulation/vice/vice-3.5.ebuild |
34 |
index a24aa963357..4518b5ff92f 100644 |
35 |
--- a/app-emulation/vice/vice-3.5.ebuild |
36 |
+++ b/app-emulation/vice/vice-3.5.ebuild |
37 |
@@ -3,7 +3,7 @@ |
38 |
|
39 |
EAPI=7 |
40 |
|
41 |
-inherit multibuild xdg |
42 |
+inherit multibuild toolchain-funcs xdg |
43 |
|
44 |
DESCRIPTION="The Versatile Commodore Emulator" |
45 |
HOMEPAGE="https://vice-emu.sourceforge.io/" |
46 |
@@ -12,16 +12,21 @@ SRC_URI="mirror://sourceforge/vice-emu/releases/${P}.tar.gz" |
47 |
LICENSE="GPL-2+" |
48 |
SLOT="0" |
49 |
KEYWORDS="~amd64 ~x86" |
50 |
-IUSE="alsa debug doc ethernet ffmpeg flac gif +gtk headless ipv6 jpeg lame mpg123 ogg oss parport pci png portaudio pulseaudio sdl zlib" |
51 |
-REQUIRED_USE="|| ( gtk headless sdl ) gtk? ( zlib )" |
52 |
+IUSE=" |
53 |
+ alsa cpuhistory debug doc ethernet ffmpeg flac gif +gtk headless |
54 |
+ ipv6 jpeg lame mpg123 ogg oss parport pci png portaudio pulseaudio |
55 |
+ sdl zlib" |
56 |
+REQUIRED_USE=" |
57 |
+ || ( gtk headless sdl ) |
58 |
+ gtk? ( zlib )" |
59 |
|
60 |
RDEPEND=" |
61 |
sys-libs/readline:0= |
62 |
virtual/libintl |
63 |
alsa? ( media-libs/alsa-lib ) |
64 |
ethernet? ( |
65 |
- >=net-libs/libpcap-0.9.8 |
66 |
>=net-libs/libnet-1.1.2.1:1.1 |
67 |
+ >=net-libs/libpcap-0.9.8 |
68 |
) |
69 |
ffmpeg? ( media-video/ffmpeg:= ) |
70 |
flac? ( media-libs/flac ) |
71 |
@@ -30,17 +35,17 @@ RDEPEND=" |
72 |
dev-libs/glib:2 |
73 |
media-libs/fontconfig:1.0 |
74 |
media-libs/glew:0= |
75 |
+ virtual/opengl |
76 |
x11-libs/cairo |
77 |
x11-libs/gtk+:3 |
78 |
x11-libs/pango |
79 |
- virtual/opengl |
80 |
) |
81 |
jpeg? ( virtual/jpeg ) |
82 |
lame? ( media-sound/lame ) |
83 |
mpg123? ( media-sound/mpg123 ) |
84 |
ogg? ( |
85 |
- media-libs/libogg |
86 |
- media-libs/libvorbis |
87 |
+ media-libs/libogg |
88 |
+ media-libs/libvorbis |
89 |
) |
90 |
parport? ( sys-libs/libieee1284 ) |
91 |
pci? ( sys-apps/pciutils ) |
92 |
@@ -51,14 +56,10 @@ RDEPEND=" |
93 |
media-libs/libsdl2[video] |
94 |
media-libs/sdl2-image |
95 |
) |
96 |
- zlib? ( sys-libs/zlib ) |
97 |
-" |
98 |
- |
99 |
+ zlib? ( sys-libs/zlib )" |
100 |
DEPEND=" |
101 |
${RDEPEND} |
102 |
- x11-base/xorg-proto |
103 |
-" |
104 |
- |
105 |
+ x11-base/xorg-proto" |
106 |
BDEPEND=" |
107 |
app-arch/unzip |
108 |
app-text/dos2unix |
109 |
@@ -70,10 +71,7 @@ BDEPEND=" |
110 |
virtual/pkgconfig |
111 |
virtual/yacc |
112 |
doc? ( virtual/texi2dvi ) |
113 |
- gtk? ( x11-misc/xdg-utils ) |
114 |
-" |
115 |
- |
116 |
-ECONF_SOURCE="${S}" |
117 |
+ gtk? ( x11-misc/xdg-utils )" |
118 |
|
119 |
src_prepare() { |
120 |
default |
121 |
@@ -83,71 +81,80 @@ src_prepare() { |
122 |
|
123 |
# Strip the predefined C(XX)FLAGS. |
124 |
sed -i -r 's:(VICE_C(XX)?FLAGS=)"[^$]+":\1:' configure || die |
125 |
-} |
126 |
|
127 |
-src_configure() { |
128 |
MULTIBUILD_VARIANTS=( |
129 |
$(usev gtk) |
130 |
$(usev headless) |
131 |
$(usev sdl) |
132 |
) |
133 |
|
134 |
+ # Debug build currently broken without copy sources. |
135 |
+ multibuild_copy_sources |
136 |
+} |
137 |
+ |
138 |
+src_configure() { |
139 |
+ tc-export AR |
140 |
+ |
141 |
multibuild_foreach_variant run_in_build_dir multibuild_src_configure |
142 |
} |
143 |
|
144 |
multibuild_enable() { |
145 |
- if [[ ${MULTIBUILD_VARIANT} == $1 ]]; then |
146 |
- printf -- "--enable-%s\n" "$2" |
147 |
+ if [[ ${MULTIBUILD_VARIANT} == ${1} ]]; then |
148 |
+ echo --enable-${2} |
149 |
else |
150 |
- printf -- "--disable-%s\n" "$2" |
151 |
+ echo --disable-${2} |
152 |
fi |
153 |
} |
154 |
|
155 |
multibuild_src_configure() { |
156 |
- # Some dependencies lack configure options so prevent them becoming |
157 |
- # automagic by using configure cache variables. |
158 |
- use pci || export ac_cv_header_pci_pci_h=no |
159 |
- |
160 |
- # Ensure we use giflib, not ungif. |
161 |
- export ac_cv_lib_ungif_EGifPutLine=no |
162 |
- |
163 |
# Append ".variant" to x* programs if building multiple variants. |
164 |
+ local xform |
165 |
if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then |
166 |
xform="/^x/s/\$/.${MULTIBUILD_VARIANT}/" |
167 |
- else |
168 |
- unset xform |
169 |
fi |
170 |
|
171 |
- econf \ |
172 |
- --program-transform-name="${xform}" \ |
173 |
- --disable-arch \ |
174 |
- $(use_enable debug) \ |
175 |
- $(use_enable debug debug-gtk3ui) \ |
176 |
- $(use_enable ffmpeg external-ffmpeg) \ |
177 |
- $(multibuild_enable headless headlessui) \ |
178 |
- --enable-html-docs \ |
179 |
- $(use_enable ethernet) \ |
180 |
- $(use_enable ipv6) \ |
181 |
- $(use_enable lame) \ |
182 |
- $(use_enable parport libieee1284) \ |
183 |
- $(multibuild_enable gtk native-gtk3ui) \ |
184 |
- $(use_enable doc pdf-docs) \ |
185 |
- $(use_enable portaudio) \ |
186 |
- --disable-sdlui \ |
187 |
- $(multibuild_enable sdl sdlui2) \ |
188 |
- --disable-shared-ffmpeg \ |
189 |
- --disable-static-ffmpeg \ |
190 |
- $(multibuild_enable gtk desktop-files) \ |
191 |
- $(use_with alsa) \ |
192 |
- $(use_with gif) \ |
193 |
- $(use_with jpeg) \ |
194 |
- $(use_with oss) \ |
195 |
- $(use_with png) \ |
196 |
- $(use_with pulseaudio pulse) \ |
197 |
- $(use_with zlib) \ |
198 |
- $(use_with mpg123) \ |
199 |
- $(use_with ogg vorbis) \ |
200 |
+ local econfargs=( |
201 |
+ --program-transform-name="${xform}" |
202 |
+ $(multibuild_enable gtk desktop-files) |
203 |
+ $(multibuild_enable gtk native-gtk3ui) |
204 |
+ $(multibuild_enable headless headlessui) |
205 |
+ $(multibuild_enable sdl sdlui2) |
206 |
+ |
207 |
+ $(use_enable cpuhistory) |
208 |
+ $(use_enable debug debug-gtk3ui) |
209 |
+ $(use_enable debug) |
210 |
+ $(use_enable doc pdf-docs) |
211 |
+ $(use_enable ethernet) |
212 |
+ $(use_enable ffmpeg external-ffmpeg) |
213 |
+ $(use_enable ipv6) |
214 |
+ $(use_enable lame) |
215 |
+ $(use_enable parport libieee1284) |
216 |
+ $(use_enable portaudio) |
217 |
+ $(use_with alsa) |
218 |
$(use_with flac) |
219 |
+ $(use_with gif) |
220 |
+ $(use_with jpeg) |
221 |
+ $(use_with mpg123) |
222 |
+ $(use_with ogg vorbis) |
223 |
+ $(use_with oss) |
224 |
+ $(use_with png) |
225 |
+ $(use_with pulseaudio pulse) |
226 |
+ $(use_with zlib) |
227 |
+ --disable-arch |
228 |
+ --disable-sdlui |
229 |
+ --disable-shared-ffmpeg |
230 |
+ --disable-static-ffmpeg |
231 |
+ --enable-html-docs |
232 |
+ |
233 |
+ # Some dependencies lack configure options so prevent them becoming |
234 |
+ # automagic by using configure cache variables. |
235 |
+ $(usex pci '' ac_cv_header_pci_pci_h=no) |
236 |
+ |
237 |
+ # Ensure we use giflib, not ungif. |
238 |
+ ac_cv_lib_ungif_EGifPutLine=no |
239 |
+ ) |
240 |
+ |
241 |
+ econf "${econfargs[@]}" |
242 |
} |
243 |
|
244 |
src_compile() { |
245 |
@@ -157,13 +164,15 @@ src_compile() { |
246 |
src_install() { |
247 |
# Get xdg-desktop-menu to play nicely while doing the install. |
248 |
dodir /etc/xdg/menus /usr/share/{applications,desktop-directories} |
249 |
+ |
250 |
XDG_UTILS_INSTALL_MODE=system \ |
251 |
XDG_DATA_DIRS="${ED}"/usr/share \ |
252 |
XDG_CONFIG_DIRS="${ED}"/etc/xdg \ |
253 |
multibuild_foreach_variant run_in_build_dir default |
254 |
+ |
255 |
rm -f "${ED}"/usr/share/applications/*.cache || die |
256 |
|
257 |
# Delete the bundled fonts. These could be packaged separately but |
258 |
# they're only for the HTML documentation. |
259 |
- rm -r "${ED}"/usr/share/doc/${PF}/html/fonts/ || die |
260 |
+ rm -r "${ED}"/usr/share/doc/${PF}/html/fonts || die |
261 |
} |