1 |
commit: 6770269786c4520ac618bc779d414b0695601ccc |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 1 14:53:57 2020 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 1 14:55:01 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67702697 |
7 |
|
8 |
app-emulation/wine-vanilla: Drop old |
9 |
|
10 |
Package-Manager: Portage-3.0.11, Repoman-3.0.2 |
11 |
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org> |
12 |
|
13 |
.../wine-vanilla/wine-vanilla-5.22-r1.ebuild | 568 --------------------- |
14 |
.../wine-vanilla/wine-vanilla-5.22.ebuild | 539 ------------------- |
15 |
2 files changed, 1107 deletions(-) |
16 |
|
17 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-5.22-r1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-5.22-r1.ebuild |
18 |
deleted file mode 100644 |
19 |
index a422ff77cdc..00000000000 |
20 |
--- a/app-emulation/wine-vanilla/wine-vanilla-5.22-r1.ebuild |
21 |
+++ /dev/null |
22 |
@@ -1,568 +0,0 @@ |
23 |
-# Copyright 1999-2020 Gentoo Authors |
24 |
-# Distributed under the terms of the GNU General Public License v2 |
25 |
- |
26 |
-EAPI=6 |
27 |
- |
28 |
-PLOCALES="ar ast bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru si sk sl sr_RS@cyrillic sr_RS@latin sv ta te th tr uk wa zh_CN zh_TW" |
29 |
-PLOCALE_BACKUP="en" |
30 |
- |
31 |
-inherit autotools eapi7-ver estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx xdg-utils |
32 |
- |
33 |
-MY_PN="${PN%%-*}" |
34 |
-MY_P="${MY_PN}-${PV}" |
35 |
- |
36 |
-if [[ ${PV} == "9999" ]] ; then |
37 |
- EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
38 |
- EGIT_BRANCH="master" |
39 |
- inherit git-r3 |
40 |
- SRC_URI="" |
41 |
- #KEYWORDS="" |
42 |
-else |
43 |
- MAJOR_V=$(ver_cut 1) |
44 |
- SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
45 |
- KEYWORDS="-* ~amd64 ~x86" |
46 |
-fi |
47 |
-S="${WORKDIR}/${MY_P}" |
48 |
- |
49 |
-GWP_V="20200523" |
50 |
-PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
51 |
- |
52 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
53 |
-HOMEPAGE="https://www.winehq.org/" |
54 |
-SRC_URI="${SRC_URI} |
55 |
- https://dev.gentoo.org/~sarnex/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
56 |
-" |
57 |
- |
58 |
-LICENSE="LGPL-2.1" |
59 |
-SLOT="${PV}" |
60 |
-IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +faudio +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap mingw +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks +unwind v4l vkd3d vulkan +X +xcomposite xinerama +xml" |
61 |
-REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
62 |
- X? ( truetype ) |
63 |
- elibc_glibc? ( threads ) |
64 |
- osmesa? ( opengl ) |
65 |
- test? ( abi_x86_32 ) |
66 |
- vkd3d? ( vulkan )" # osmesa-opengl #286560 # X-truetype #551124 |
67 |
- |
68 |
-# FIXME: the test suite is unsuitable for us; many tests require net access |
69 |
-# or fail due to Xvfb's opengl limitations. |
70 |
-RESTRICT="test" |
71 |
- |
72 |
-COMMON_DEPEND=" |
73 |
- X? ( |
74 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
75 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
76 |
- x11-libs/libXfixes[${MULTILIB_USEDEP}] |
77 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
78 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
79 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
80 |
- ) |
81 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
82 |
- capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
83 |
- cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
84 |
- faudio? ( app-emulation/faudio:=[${MULTILIB_USEDEP}] ) |
85 |
- fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
86 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
87 |
- gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
88 |
- gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
89 |
- gstreamer? ( |
90 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
91 |
- media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
92 |
- ) |
93 |
- jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
94 |
- kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
95 |
- lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
96 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
97 |
- mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
98 |
- ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
99 |
- netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
100 |
- nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
101 |
- odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
102 |
- openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
103 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
104 |
- opengl? ( |
105 |
- virtual/glu[${MULTILIB_USEDEP}] |
106 |
- virtual/opengl[${MULTILIB_USEDEP}] |
107 |
- ) |
108 |
- osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
109 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
110 |
- png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
111 |
- pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
112 |
- scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
113 |
- sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) |
114 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
115 |
- truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
116 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
117 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
118 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
119 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
120 |
- vkd3d? ( >=app-emulation/vkd3d-1.2[${MULTILIB_USEDEP}] ) |
121 |
- vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) |
122 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
123 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
124 |
- xml? ( |
125 |
- dev-libs/libxml2[${MULTILIB_USEDEP}] |
126 |
- dev-libs/libxslt[${MULTILIB_USEDEP}] |
127 |
- )" |
128 |
- |
129 |
-RDEPEND="${COMMON_DEPEND} |
130 |
- app-emulation/wine-desktop-common |
131 |
- >app-eselect/eselect-wine-0.3 |
132 |
- !app-emulation/wine:0 |
133 |
- dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
134 |
- gecko? ( app-emulation/wine-gecko:2.47.1[abi_x86_32?,abi_x86_64?] ) |
135 |
- mono? ( app-emulation/wine-mono:5.1.1 ) |
136 |
- perl? ( |
137 |
- dev-lang/perl |
138 |
- dev-perl/XML-Simple |
139 |
- ) |
140 |
- pulseaudio? ( |
141 |
- realtime? ( sys-auth/rtkit ) |
142 |
- ) |
143 |
- samba? ( >=net-fs/samba-3.0.25[winbind] ) |
144 |
- selinux? ( sec-policy/selinux-wine ) |
145 |
- udisks? ( sys-fs/udisks:2 )" |
146 |
- |
147 |
-# tools/make_requests requires perl |
148 |
-DEPEND="${COMMON_DEPEND} |
149 |
- sys-devel/flex |
150 |
- >=sys-kernel/linux-headers-2.6 |
151 |
- virtual/pkgconfig |
152 |
- virtual/yacc |
153 |
- X? ( x11-base/xorg-proto ) |
154 |
- prelink? ( sys-devel/prelink ) |
155 |
- xinerama? ( x11-base/xorg-proto )" |
156 |
- |
157 |
-# These use a non-standard "Wine" category, which is provided by |
158 |
-# /etc/xdg/applications-merged/wine.menu |
159 |
-QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
160 |
-usr/share/applications/wine-notepad.desktop |
161 |
-usr/share/applications/wine-uninstaller.desktop |
162 |
-usr/share/applications/wine-winecfg.desktop" |
163 |
- |
164 |
-PATCHES=( |
165 |
- "${PATCHDIR}/patches/${MY_PN}-5.0-winegcc.patch" #260726 |
166 |
- "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615 |
167 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
168 |
- "${PATCHDIR}/patches/${MY_PN}-5.9-Revert-makedep-Install-also-generated-typelib-for-in.patch" |
169 |
-) |
170 |
-PATCHES_BIN=() |
171 |
- |
172 |
-# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
173 |
-if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
174 |
- DEPEND+=" dev-util/patchbin" |
175 |
-fi |
176 |
- |
177 |
-wine_compiler_check() { |
178 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
179 |
- |
180 |
- # GCC-specific bugs |
181 |
- if tc-is-gcc; then |
182 |
- # bug #549768 |
183 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
184 |
- ebegin "Checking for gcc-5 ms_abi compiler bug" |
185 |
- $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
186 |
- # Run in subshell to prevent "Aborted" message |
187 |
- ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
188 |
- if ! eend $?; then |
189 |
- eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
190 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
191 |
- eerror "or use gcc-config to select a different compiler version." |
192 |
- eerror "See https://bugs.gentoo.org/549768" |
193 |
- eerror |
194 |
- return 1 |
195 |
- fi |
196 |
- fi |
197 |
- # bug #574044 |
198 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
199 |
- ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
200 |
- # Compile in subshell to prevent "Aborted" message |
201 |
- ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
202 |
- if ! eend $?; then |
203 |
- eerror "Wine cannot be built with this version of gcc-5.3" |
204 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
205 |
- eerror "or use gcc-config to select a different compiler version." |
206 |
- eerror "See https://bugs.gentoo.org/574044" |
207 |
- eerror |
208 |
- return 1 |
209 |
- fi |
210 |
- fi |
211 |
- fi |
212 |
- |
213 |
- # Ensure compiler support |
214 |
- if use abi_x86_64; then |
215 |
- ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
216 |
- # Compile in subshell to prevent "Aborted" message |
217 |
- ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
218 |
- if ! eend $?; then |
219 |
- eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
220 |
- eerror |
221 |
- eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
222 |
- eerror |
223 |
- return 1 |
224 |
- fi |
225 |
- fi |
226 |
-} |
227 |
- |
228 |
-wine_build_environment_check() { |
229 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
230 |
- |
231 |
- if use abi_x86_64; then |
232 |
- if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
233 |
- eerror "You need gcc-4.4+ to compile 64-bit wine" |
234 |
- die |
235 |
- elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
236 |
- eerror "You need clang-3.8+ to compile 64-bit wine" |
237 |
- die |
238 |
- fi |
239 |
- fi |
240 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
241 |
- ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
242 |
- ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
243 |
- ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
244 |
- fi |
245 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
246 |
- if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
247 |
- ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
248 |
- ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
249 |
- ewarn "See package.env in man 5 portage for more information on how to do this." |
250 |
- ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
251 |
- fi |
252 |
- fi |
253 |
- |
254 |
- if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
255 |
- eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
256 |
- eerror "See https://bugs.gentoo.org/487864 for more details." |
257 |
- eerror |
258 |
- return 1 |
259 |
- fi |
260 |
-} |
261 |
- |
262 |
-wine_env_vcs_vars() { |
263 |
- local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
264 |
- local pn_live_val="${pn_live_var}" |
265 |
- eval pn_live_val='$'${pn_live_val} |
266 |
- if [[ ! -z ${EGIT_COMMIT} ]]; then |
267 |
- eerror "Commits must now be specified using the environmental variables" |
268 |
- eerror "EGIT_OVERRIDE_COMMIT_WINE" |
269 |
- eerror |
270 |
- return 1 |
271 |
- fi |
272 |
-} |
273 |
- |
274 |
-pkg_pretend() { |
275 |
- wine_build_environment_check || die |
276 |
- |
277 |
- # Verify OSS support |
278 |
- if use oss && ! use kernel_FreeBSD; then |
279 |
- if ! has_version ">=media-sound/oss-4"; then |
280 |
- eerror "You cannot build wine with USE=oss without having support from a" |
281 |
- eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
282 |
- eerror |
283 |
- die |
284 |
- fi |
285 |
- fi |
286 |
- |
287 |
- if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then |
288 |
- eerror |
289 |
- eerror "USE=\"mingw\" is currently experimental, and requires the" |
290 |
- eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds." |
291 |
- eerror |
292 |
- eerror "These can be installed by using 'sys-devel/crossdev':" |
293 |
- eerror |
294 |
- eerror "crossdev --target i686-w64-mingw32" |
295 |
- eerror |
296 |
- eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" |
297 |
- eerror |
298 |
- die "MinGW build was enabled, but no compiler to support it was found." |
299 |
- fi |
300 |
- |
301 |
- if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then |
302 |
- eerror |
303 |
- eerror "USE=\"mingw\" is currently experimental, and requires the" |
304 |
- eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds." |
305 |
- eerror |
306 |
- eerror "These can be installed by using 'sys-devel/crossdev':" |
307 |
- eerror |
308 |
- eerror "crossdev --target x86_64-w64-mingw32" |
309 |
- eerror |
310 |
- eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" |
311 |
- eerror |
312 |
- die "MinGW build was enabled, but no compiler to support it was found." |
313 |
- fi |
314 |
-} |
315 |
- |
316 |
-pkg_setup() { |
317 |
- wine_build_environment_check || die |
318 |
- wine_env_vcs_vars || die |
319 |
- |
320 |
- WINE_VARIANT="${PN#wine}-${PV}" |
321 |
- WINE_VARIANT="${WINE_VARIANT#-}" |
322 |
- |
323 |
- MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
324 |
- MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
325 |
- MY_DATADIR="${MY_DATAROOTDIR}" |
326 |
- MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
327 |
- MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
328 |
- MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
329 |
- MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
330 |
- MY_MANDIR="${MY_DATADIR}/man" |
331 |
-} |
332 |
- |
333 |
-src_unpack() { |
334 |
- if [[ ${PV} == "9999" ]] ; then |
335 |
- EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack |
336 |
- fi |
337 |
- |
338 |
- default |
339 |
- |
340 |
- l10n_find_plocales_changes "${S}/po" "" ".po" |
341 |
-} |
342 |
- |
343 |
-src_prepare() { |
344 |
- |
345 |
- eapply_bin(){ |
346 |
- local patch |
347 |
- for patch in ${PATCHES_BIN[@]}; do |
348 |
- patchbin --nogit < "${patch}" || die |
349 |
- done |
350 |
- } |
351 |
- |
352 |
- local md5="$(md5sum server/protocol.def)" |
353 |
- |
354 |
- default |
355 |
- eapply_bin |
356 |
- eautoreconf |
357 |
- |
358 |
- # Modification of the server protocol requires regenerating the server requests |
359 |
- if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
360 |
- einfo "server/protocol.def was patched; running tools/make_requests" |
361 |
- tools/make_requests || die #432348 |
362 |
- fi |
363 |
- sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
364 |
- if ! use run-exes; then |
365 |
- sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
366 |
- fi |
367 |
- |
368 |
- # Edit wine.desktop to work for specific variant |
369 |
- sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
370 |
- |
371 |
- # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
372 |
- cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
373 |
- |
374 |
- l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
375 |
- |
376 |
- # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
377 |
- |
378 |
- # Duplicate manpages input files for wine64 |
379 |
- local f |
380 |
- for f in loader/*.man.in; do |
381 |
- cp ${f} ${f/wine/wine64} || die |
382 |
- done |
383 |
- # Add wine64 manpages to Makefile |
384 |
- if use abi_x86_64; then |
385 |
- sed -i "/wine.man.in/i \ |
386 |
- \\\twine64.man.in \\\\" loader/Makefile.in || die |
387 |
- sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
388 |
-\164\2/' loader/Makefile.in || die |
389 |
- fi |
390 |
- |
391 |
- rm_man_file(){ |
392 |
- local file="${1}" |
393 |
- loc=${2} |
394 |
- sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
395 |
- } |
396 |
- |
397 |
- while read f; do |
398 |
- l10n_for_each_disabled_locale_do rm_man_file "${f}" |
399 |
- done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
400 |
-} |
401 |
- |
402 |
-src_configure() { |
403 |
- wine_compiler_check || die |
404 |
- |
405 |
- export LDCONFIG=/bin/true |
406 |
- use custom-cflags || strip-flags |
407 |
- |
408 |
- multilib-minimal_src_configure |
409 |
-} |
410 |
- |
411 |
-multilib_src_configure() { |
412 |
- local myconf=( |
413 |
- --prefix="${MY_PREFIX}" |
414 |
- --datarootdir="${MY_DATAROOTDIR}" |
415 |
- --datadir="${MY_DATADIR}" |
416 |
- --docdir="${MY_DOCDIR}" |
417 |
- --includedir="${MY_INCLUDEDIR}" |
418 |
- --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
419 |
- --libexecdir="${MY_LIBEXECDIR}" |
420 |
- --localstatedir="${MY_LOCALSTATEDIR}" |
421 |
- --mandir="${MY_MANDIR}" |
422 |
- --sysconfdir="${EPREFIX}/etc/wine" |
423 |
- $(use_with alsa) |
424 |
- $(use_with capi) |
425 |
- $(use_with lcms cms) |
426 |
- $(use_with cups) |
427 |
- $(use_with ncurses curses) |
428 |
- $(use_with udisks dbus) |
429 |
- $(use_with faudio) |
430 |
- $(use_with fontconfig) |
431 |
- $(use_with ssl gnutls) |
432 |
- $(use_enable gecko mshtml) |
433 |
- $(use_with gphoto2 gphoto) |
434 |
- $(use_with gsm) |
435 |
- $(use_with gssapi) |
436 |
- $(use_with gstreamer) |
437 |
- --without-hal |
438 |
- $(use_with jpeg) |
439 |
- $(use_with kerberos krb5) |
440 |
- $(use_with ldap) |
441 |
- # TODO: Will bug 685172 still need special handling? |
442 |
- $(use_with mingw) |
443 |
- $(use_enable mono mscoree) |
444 |
- $(use_with mp3 mpg123) |
445 |
- $(use_with netapi) |
446 |
- $(use_with nls gettext) |
447 |
- $(use_with openal) |
448 |
- $(use_with opencl) |
449 |
- $(use_with opengl) |
450 |
- $(use_with osmesa) |
451 |
- $(use_with oss) |
452 |
- $(use_with pcap) |
453 |
- $(use_with png) |
454 |
- $(use_with pulseaudio pulse) |
455 |
- $(use_with threads pthread) |
456 |
- $(use_with scanner sane) |
457 |
- $(use_with sdl) |
458 |
- $(use_enable test tests) |
459 |
- $(use_with truetype freetype) |
460 |
- $(use_with udev) |
461 |
- $(use_with unwind) |
462 |
- $(use_with v4l v4l2) |
463 |
- $(use_with vkd3d) |
464 |
- $(use_with vulkan) |
465 |
- $(use_with X x) |
466 |
- $(use_with X xfixes) |
467 |
- $(use_with xcomposite) |
468 |
- $(use_with xinerama) |
469 |
- $(use_with xml) |
470 |
- $(use_with xml xslt) |
471 |
- ) |
472 |
- |
473 |
- local PKG_CONFIG |
474 |
- # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
475 |
- tc-export PKG_CONFIG |
476 |
- |
477 |
- if use amd64; then |
478 |
- if [[ ${ABI} == amd64 ]]; then |
479 |
- myconf+=( --enable-win64 ) |
480 |
- else |
481 |
- myconf+=( --disable-win64 ) |
482 |
- fi |
483 |
- |
484 |
- # Note: using --with-wine64 results in problems with multilib.eclass |
485 |
- # CC/LD hackery. We're using separate tools instead. |
486 |
- fi |
487 |
- |
488 |
- ECONF_SOURCE=${S} \ |
489 |
- econf "${myconf[@]}" |
490 |
- emake depend |
491 |
-} |
492 |
- |
493 |
-multilib_src_test() { |
494 |
- # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
495 |
- if [[ ${ABI} == x86 ]]; then |
496 |
- if [[ $(id -u) == 0 ]]; then |
497 |
- ewarn "Skipping tests since they cannot be run under the root user." |
498 |
- ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
499 |
- return |
500 |
- fi |
501 |
- |
502 |
- WINEPREFIX="${T}/.wine-${ABI}" \ |
503 |
- Xemake test |
504 |
- fi |
505 |
-} |
506 |
- |
507 |
-multilib_src_install_all() { |
508 |
- local DOCS=( ANNOUNCE AUTHORS README ) |
509 |
- add_locale_docs() { |
510 |
- local locale_doc="documentation/README.$1" |
511 |
- [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
512 |
- } |
513 |
- l10n_for_each_locale_do add_locale_docs |
514 |
- |
515 |
- einstalldocs |
516 |
- prune_libtool_files --all |
517 |
- |
518 |
- if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
519 |
- rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
520 |
- "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
521 |
- fi |
522 |
- |
523 |
- # Remove wineconsole if neither backend is installed #551124 |
524 |
- if ! use X && ! use ncurses; then |
525 |
- rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
526 |
- rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
527 |
- rm_wineconsole() { |
528 |
- rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
529 |
- } |
530 |
- multilib_foreach_abi rm_wineconsole |
531 |
- fi |
532 |
- |
533 |
- use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
534 |
- use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
535 |
- |
536 |
- # Avoid double prefix from dosym and make_wrapper |
537 |
- MY_PREFIX=${MY_PREFIX#${EPREFIX}} |
538 |
- |
539 |
- if use abi_x86_64 && ! use abi_x86_32; then |
540 |
- dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
541 |
- dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
542 |
- fi |
543 |
- |
544 |
- # Failglob for binloops, shouldn't be necessary, but including to stay safe |
545 |
- eshopts_push -s failglob #615218 |
546 |
- # Make wrappers for binaries for handling multiple variants |
547 |
- # Note: wrappers instead of symlinks because some are shell which use basename |
548 |
- local b |
549 |
- for b in "${ED%/}${MY_PREFIX}"/bin/*; do |
550 |
- make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
551 |
- done |
552 |
- eshopts_pop |
553 |
-} |
554 |
- |
555 |
-pkg_postinst() { |
556 |
- eselect wine register ${P} |
557 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
558 |
- eselect wine register --vanilla ${P} || die |
559 |
- fi |
560 |
- |
561 |
- eselect wine update --all --if-unset || die |
562 |
- |
563 |
- xdg_desktop_database_update |
564 |
- |
565 |
- if ! use gecko; then |
566 |
- ewarn "Without Wine Gecko, wine prefixes will not have a default" |
567 |
- ewarn "implementation of iexplore. Many older windows applications" |
568 |
- ewarn "rely upon the existence of an iexplore implementation, so" |
569 |
- ewarn "you will likely need to install an external one, like via winetricks" |
570 |
- fi |
571 |
- if ! use mono; then |
572 |
- ewarn "Without Wine Mono, wine prefixes will not have a default" |
573 |
- ewarn "implementation of .NET. Many windows applications rely upon" |
574 |
- ewarn "the existence of a .NET implementation, so you will likely need" |
575 |
- ewarn "to install an external one, like via winetricks" |
576 |
- fi |
577 |
-} |
578 |
- |
579 |
-pkg_prerm() { |
580 |
- eselect wine deregister ${P} |
581 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
582 |
- eselect wine deregister --vanilla ${P} || die |
583 |
- fi |
584 |
- |
585 |
- eselect wine update --all --if-unset || die |
586 |
-} |
587 |
- |
588 |
-pkg_postrm() { |
589 |
- xdg_desktop_database_update |
590 |
-} |
591 |
|
592 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-5.22.ebuild b/app-emulation/wine-vanilla/wine-vanilla-5.22.ebuild |
593 |
deleted file mode 100644 |
594 |
index 226b93efb90..00000000000 |
595 |
--- a/app-emulation/wine-vanilla/wine-vanilla-5.22.ebuild |
596 |
+++ /dev/null |
597 |
@@ -1,539 +0,0 @@ |
598 |
-# Copyright 1999-2020 Gentoo Authors |
599 |
-# Distributed under the terms of the GNU General Public License v2 |
600 |
- |
601 |
-EAPI=6 |
602 |
- |
603 |
-PLOCALES="ar ast bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru si sk sl sr_RS@cyrillic sr_RS@latin sv ta te th tr uk wa zh_CN zh_TW" |
604 |
-PLOCALE_BACKUP="en" |
605 |
- |
606 |
-inherit autotools eapi7-ver estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx xdg-utils |
607 |
- |
608 |
-MY_PN="${PN%%-*}" |
609 |
-MY_P="${MY_PN}-${PV}" |
610 |
- |
611 |
-if [[ ${PV} == "9999" ]] ; then |
612 |
- EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
613 |
- EGIT_BRANCH="master" |
614 |
- inherit git-r3 |
615 |
- SRC_URI="" |
616 |
- #KEYWORDS="" |
617 |
-else |
618 |
- MAJOR_V=$(ver_cut 1) |
619 |
- SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
620 |
- KEYWORDS="-* ~amd64 ~x86" |
621 |
-fi |
622 |
-S="${WORKDIR}/${MY_P}" |
623 |
- |
624 |
-GWP_V="20200523" |
625 |
-PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
626 |
- |
627 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
628 |
-HOMEPAGE="https://www.winehq.org/" |
629 |
-SRC_URI="${SRC_URI} |
630 |
- https://dev.gentoo.org/~sarnex/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
631 |
-" |
632 |
- |
633 |
-LICENSE="LGPL-2.1" |
634 |
-SLOT="${PV}" |
635 |
-IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +faudio +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks +unwind v4l vkd3d vulkan +X +xcomposite xinerama +xml" |
636 |
-REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
637 |
- X? ( truetype ) |
638 |
- elibc_glibc? ( threads ) |
639 |
- osmesa? ( opengl ) |
640 |
- test? ( abi_x86_32 ) |
641 |
- vkd3d? ( vulkan )" # osmesa-opengl #286560 # X-truetype #551124 |
642 |
- |
643 |
-# FIXME: the test suite is unsuitable for us; many tests require net access |
644 |
-# or fail due to Xvfb's opengl limitations. |
645 |
-RESTRICT="test" |
646 |
- |
647 |
-COMMON_DEPEND=" |
648 |
- X? ( |
649 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
650 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
651 |
- x11-libs/libXfixes[${MULTILIB_USEDEP}] |
652 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
653 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
654 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
655 |
- ) |
656 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
657 |
- capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
658 |
- cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
659 |
- faudio? ( app-emulation/faudio:=[${MULTILIB_USEDEP}] ) |
660 |
- fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
661 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
662 |
- gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
663 |
- gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
664 |
- gstreamer? ( |
665 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
666 |
- media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
667 |
- ) |
668 |
- jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
669 |
- kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
670 |
- lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
671 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
672 |
- mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
673 |
- ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
674 |
- netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
675 |
- nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
676 |
- odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
677 |
- openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
678 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
679 |
- opengl? ( |
680 |
- virtual/glu[${MULTILIB_USEDEP}] |
681 |
- virtual/opengl[${MULTILIB_USEDEP}] |
682 |
- ) |
683 |
- osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
684 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
685 |
- png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
686 |
- pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
687 |
- scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
688 |
- sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) |
689 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
690 |
- truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
691 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
692 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
693 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
694 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
695 |
- vkd3d? ( >=app-emulation/vkd3d-1.2[${MULTILIB_USEDEP}] ) |
696 |
- vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) |
697 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
698 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
699 |
- xml? ( |
700 |
- dev-libs/libxml2[${MULTILIB_USEDEP}] |
701 |
- dev-libs/libxslt[${MULTILIB_USEDEP}] |
702 |
- )" |
703 |
- |
704 |
-RDEPEND="${COMMON_DEPEND} |
705 |
- app-emulation/wine-desktop-common |
706 |
- >app-eselect/eselect-wine-0.3 |
707 |
- !app-emulation/wine:0 |
708 |
- dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
709 |
- gecko? ( app-emulation/wine-gecko:2.47.1[abi_x86_32?,abi_x86_64?] ) |
710 |
- mono? ( app-emulation/wine-mono:5.1.1 ) |
711 |
- perl? ( |
712 |
- dev-lang/perl |
713 |
- dev-perl/XML-Simple |
714 |
- ) |
715 |
- pulseaudio? ( |
716 |
- realtime? ( sys-auth/rtkit ) |
717 |
- ) |
718 |
- samba? ( >=net-fs/samba-3.0.25[winbind] ) |
719 |
- selinux? ( sec-policy/selinux-wine ) |
720 |
- udisks? ( sys-fs/udisks:2 )" |
721 |
- |
722 |
-# tools/make_requests requires perl |
723 |
-DEPEND="${COMMON_DEPEND} |
724 |
- sys-devel/flex |
725 |
- >=sys-kernel/linux-headers-2.6 |
726 |
- virtual/pkgconfig |
727 |
- virtual/yacc |
728 |
- X? ( x11-base/xorg-proto ) |
729 |
- prelink? ( sys-devel/prelink ) |
730 |
- xinerama? ( x11-base/xorg-proto )" |
731 |
- |
732 |
-# These use a non-standard "Wine" category, which is provided by |
733 |
-# /etc/xdg/applications-merged/wine.menu |
734 |
-QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
735 |
-usr/share/applications/wine-notepad.desktop |
736 |
-usr/share/applications/wine-uninstaller.desktop |
737 |
-usr/share/applications/wine-winecfg.desktop" |
738 |
- |
739 |
-PATCHES=( |
740 |
- "${PATCHDIR}/patches/${MY_PN}-5.0-winegcc.patch" #260726 |
741 |
- "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615 |
742 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
743 |
- "${PATCHDIR}/patches/${MY_PN}-5.9-Revert-makedep-Install-also-generated-typelib-for-in.patch" |
744 |
-) |
745 |
-PATCHES_BIN=() |
746 |
- |
747 |
-# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
748 |
-if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
749 |
- DEPEND+=" dev-util/patchbin" |
750 |
-fi |
751 |
- |
752 |
-wine_compiler_check() { |
753 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
754 |
- |
755 |
- # GCC-specific bugs |
756 |
- if tc-is-gcc; then |
757 |
- # bug #549768 |
758 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
759 |
- ebegin "Checking for gcc-5 ms_abi compiler bug" |
760 |
- $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
761 |
- # Run in subshell to prevent "Aborted" message |
762 |
- ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
763 |
- if ! eend $?; then |
764 |
- eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
765 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
766 |
- eerror "or use gcc-config to select a different compiler version." |
767 |
- eerror "See https://bugs.gentoo.org/549768" |
768 |
- eerror |
769 |
- return 1 |
770 |
- fi |
771 |
- fi |
772 |
- # bug #574044 |
773 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
774 |
- ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
775 |
- # Compile in subshell to prevent "Aborted" message |
776 |
- ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
777 |
- if ! eend $?; then |
778 |
- eerror "Wine cannot be built with this version of gcc-5.3" |
779 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
780 |
- eerror "or use gcc-config to select a different compiler version." |
781 |
- eerror "See https://bugs.gentoo.org/574044" |
782 |
- eerror |
783 |
- return 1 |
784 |
- fi |
785 |
- fi |
786 |
- fi |
787 |
- |
788 |
- # Ensure compiler support |
789 |
- if use abi_x86_64; then |
790 |
- ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
791 |
- # Compile in subshell to prevent "Aborted" message |
792 |
- ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
793 |
- if ! eend $?; then |
794 |
- eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
795 |
- eerror |
796 |
- eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
797 |
- eerror |
798 |
- return 1 |
799 |
- fi |
800 |
- fi |
801 |
-} |
802 |
- |
803 |
-wine_build_environment_check() { |
804 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
805 |
- |
806 |
- if use abi_x86_64; then |
807 |
- if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
808 |
- eerror "You need gcc-4.4+ to compile 64-bit wine" |
809 |
- die |
810 |
- elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
811 |
- eerror "You need clang-3.8+ to compile 64-bit wine" |
812 |
- die |
813 |
- fi |
814 |
- fi |
815 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
816 |
- ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
817 |
- ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
818 |
- ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
819 |
- fi |
820 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
821 |
- if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
822 |
- ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
823 |
- ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
824 |
- ewarn "See package.env in man 5 portage for more information on how to do this." |
825 |
- ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
826 |
- fi |
827 |
- fi |
828 |
- |
829 |
- if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
830 |
- eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
831 |
- eerror "See https://bugs.gentoo.org/487864 for more details." |
832 |
- eerror |
833 |
- return 1 |
834 |
- fi |
835 |
-} |
836 |
- |
837 |
-wine_env_vcs_vars() { |
838 |
- local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
839 |
- local pn_live_val="${pn_live_var}" |
840 |
- eval pn_live_val='$'${pn_live_val} |
841 |
- if [[ ! -z ${EGIT_COMMIT} ]]; then |
842 |
- eerror "Commits must now be specified using the environmental variables" |
843 |
- eerror "EGIT_OVERRIDE_COMMIT_WINE" |
844 |
- eerror |
845 |
- return 1 |
846 |
- fi |
847 |
-} |
848 |
- |
849 |
-pkg_pretend() { |
850 |
- wine_build_environment_check || die |
851 |
- |
852 |
- # Verify OSS support |
853 |
- if use oss && ! use kernel_FreeBSD; then |
854 |
- if ! has_version ">=media-sound/oss-4"; then |
855 |
- eerror "You cannot build wine with USE=oss without having support from a" |
856 |
- eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
857 |
- eerror |
858 |
- die |
859 |
- fi |
860 |
- fi |
861 |
-} |
862 |
- |
863 |
-pkg_setup() { |
864 |
- wine_build_environment_check || die |
865 |
- wine_env_vcs_vars || die |
866 |
- |
867 |
- WINE_VARIANT="${PN#wine}-${PV}" |
868 |
- WINE_VARIANT="${WINE_VARIANT#-}" |
869 |
- |
870 |
- MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
871 |
- MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
872 |
- MY_DATADIR="${MY_DATAROOTDIR}" |
873 |
- MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
874 |
- MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
875 |
- MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
876 |
- MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
877 |
- MY_MANDIR="${MY_DATADIR}/man" |
878 |
-} |
879 |
- |
880 |
-src_unpack() { |
881 |
- if [[ ${PV} == "9999" ]] ; then |
882 |
- EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack |
883 |
- fi |
884 |
- |
885 |
- default |
886 |
- |
887 |
- l10n_find_plocales_changes "${S}/po" "" ".po" |
888 |
-} |
889 |
- |
890 |
-src_prepare() { |
891 |
- |
892 |
- eapply_bin(){ |
893 |
- local patch |
894 |
- for patch in ${PATCHES_BIN[@]}; do |
895 |
- patchbin --nogit < "${patch}" || die |
896 |
- done |
897 |
- } |
898 |
- |
899 |
- local md5="$(md5sum server/protocol.def)" |
900 |
- |
901 |
- default |
902 |
- eapply_bin |
903 |
- eautoreconf |
904 |
- |
905 |
- # Modification of the server protocol requires regenerating the server requests |
906 |
- if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
907 |
- einfo "server/protocol.def was patched; running tools/make_requests" |
908 |
- tools/make_requests || die #432348 |
909 |
- fi |
910 |
- sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
911 |
- if ! use run-exes; then |
912 |
- sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
913 |
- fi |
914 |
- |
915 |
- # Edit wine.desktop to work for specific variant |
916 |
- sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
917 |
- |
918 |
- # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
919 |
- cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
920 |
- |
921 |
- l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
922 |
- |
923 |
- # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
924 |
- |
925 |
- # Duplicate manpages input files for wine64 |
926 |
- local f |
927 |
- for f in loader/*.man.in; do |
928 |
- cp ${f} ${f/wine/wine64} || die |
929 |
- done |
930 |
- # Add wine64 manpages to Makefile |
931 |
- if use abi_x86_64; then |
932 |
- sed -i "/wine.man.in/i \ |
933 |
- \\\twine64.man.in \\\\" loader/Makefile.in || die |
934 |
- sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
935 |
-\164\2/' loader/Makefile.in || die |
936 |
- fi |
937 |
- |
938 |
- rm_man_file(){ |
939 |
- local file="${1}" |
940 |
- loc=${2} |
941 |
- sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
942 |
- } |
943 |
- |
944 |
- while read f; do |
945 |
- l10n_for_each_disabled_locale_do rm_man_file "${f}" |
946 |
- done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
947 |
-} |
948 |
- |
949 |
-src_configure() { |
950 |
- wine_compiler_check || die |
951 |
- |
952 |
- export LDCONFIG=/bin/true |
953 |
- use custom-cflags || strip-flags |
954 |
- |
955 |
- multilib-minimal_src_configure |
956 |
-} |
957 |
- |
958 |
-multilib_src_configure() { |
959 |
- local myconf=( |
960 |
- --prefix="${MY_PREFIX}" |
961 |
- --datarootdir="${MY_DATAROOTDIR}" |
962 |
- --datadir="${MY_DATADIR}" |
963 |
- --docdir="${MY_DOCDIR}" |
964 |
- --includedir="${MY_INCLUDEDIR}" |
965 |
- --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
966 |
- --libexecdir="${MY_LIBEXECDIR}" |
967 |
- --localstatedir="${MY_LOCALSTATEDIR}" |
968 |
- --mandir="${MY_MANDIR}" |
969 |
- --sysconfdir="${EPREFIX}/etc/wine" |
970 |
- $(use_with alsa) |
971 |
- $(use_with capi) |
972 |
- $(use_with lcms cms) |
973 |
- $(use_with cups) |
974 |
- $(use_with ncurses curses) |
975 |
- $(use_with udisks dbus) |
976 |
- $(use_with faudio) |
977 |
- $(use_with fontconfig) |
978 |
- $(use_with ssl gnutls) |
979 |
- $(use_enable gecko mshtml) |
980 |
- $(use_with gphoto2 gphoto) |
981 |
- $(use_with gsm) |
982 |
- $(use_with gssapi) |
983 |
- $(use_with gstreamer) |
984 |
- --without-hal |
985 |
- $(use_with jpeg) |
986 |
- $(use_with kerberos krb5) |
987 |
- $(use_with ldap) |
988 |
- --without-mingw # linux LDFLAGS leak in mingw32: bug #685172 |
989 |
- $(use_enable mono mscoree) |
990 |
- $(use_with mp3 mpg123) |
991 |
- $(use_with netapi) |
992 |
- $(use_with nls gettext) |
993 |
- $(use_with openal) |
994 |
- $(use_with opencl) |
995 |
- $(use_with opengl) |
996 |
- $(use_with osmesa) |
997 |
- $(use_with oss) |
998 |
- $(use_with pcap) |
999 |
- $(use_with png) |
1000 |
- $(use_with pulseaudio pulse) |
1001 |
- $(use_with threads pthread) |
1002 |
- $(use_with scanner sane) |
1003 |
- $(use_with sdl) |
1004 |
- $(use_enable test tests) |
1005 |
- $(use_with truetype freetype) |
1006 |
- $(use_with udev) |
1007 |
- $(use_with unwind) |
1008 |
- $(use_with v4l v4l2) |
1009 |
- $(use_with vkd3d) |
1010 |
- $(use_with vulkan) |
1011 |
- $(use_with X x) |
1012 |
- $(use_with X xfixes) |
1013 |
- $(use_with xcomposite) |
1014 |
- $(use_with xinerama) |
1015 |
- $(use_with xml) |
1016 |
- $(use_with xml xslt) |
1017 |
- ) |
1018 |
- |
1019 |
- local PKG_CONFIG |
1020 |
- # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
1021 |
- tc-export PKG_CONFIG |
1022 |
- |
1023 |
- if use amd64; then |
1024 |
- if [[ ${ABI} == amd64 ]]; then |
1025 |
- myconf+=( --enable-win64 ) |
1026 |
- else |
1027 |
- myconf+=( --disable-win64 ) |
1028 |
- fi |
1029 |
- |
1030 |
- # Note: using --with-wine64 results in problems with multilib.eclass |
1031 |
- # CC/LD hackery. We're using separate tools instead. |
1032 |
- fi |
1033 |
- |
1034 |
- ECONF_SOURCE=${S} \ |
1035 |
- econf "${myconf[@]}" |
1036 |
- emake depend |
1037 |
-} |
1038 |
- |
1039 |
-multilib_src_test() { |
1040 |
- # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
1041 |
- if [[ ${ABI} == x86 ]]; then |
1042 |
- if [[ $(id -u) == 0 ]]; then |
1043 |
- ewarn "Skipping tests since they cannot be run under the root user." |
1044 |
- ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
1045 |
- return |
1046 |
- fi |
1047 |
- |
1048 |
- WINEPREFIX="${T}/.wine-${ABI}" \ |
1049 |
- Xemake test |
1050 |
- fi |
1051 |
-} |
1052 |
- |
1053 |
-multilib_src_install_all() { |
1054 |
- local DOCS=( ANNOUNCE AUTHORS README ) |
1055 |
- add_locale_docs() { |
1056 |
- local locale_doc="documentation/README.$1" |
1057 |
- [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
1058 |
- } |
1059 |
- l10n_for_each_locale_do add_locale_docs |
1060 |
- |
1061 |
- einstalldocs |
1062 |
- prune_libtool_files --all |
1063 |
- |
1064 |
- if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
1065 |
- rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
1066 |
- "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
1067 |
- fi |
1068 |
- |
1069 |
- # Remove wineconsole if neither backend is installed #551124 |
1070 |
- if ! use X && ! use ncurses; then |
1071 |
- rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
1072 |
- rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
1073 |
- rm_wineconsole() { |
1074 |
- rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
1075 |
- } |
1076 |
- multilib_foreach_abi rm_wineconsole |
1077 |
- fi |
1078 |
- |
1079 |
- use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
1080 |
- use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
1081 |
- |
1082 |
- # Avoid double prefix from dosym and make_wrapper |
1083 |
- MY_PREFIX=${MY_PREFIX#${EPREFIX}} |
1084 |
- |
1085 |
- if use abi_x86_64 && ! use abi_x86_32; then |
1086 |
- dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
1087 |
- dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
1088 |
- fi |
1089 |
- |
1090 |
- # Failglob for binloops, shouldn't be necessary, but including to stay safe |
1091 |
- eshopts_push -s failglob #615218 |
1092 |
- # Make wrappers for binaries for handling multiple variants |
1093 |
- # Note: wrappers instead of symlinks because some are shell which use basename |
1094 |
- local b |
1095 |
- for b in "${ED%/}${MY_PREFIX}"/bin/*; do |
1096 |
- make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
1097 |
- done |
1098 |
- eshopts_pop |
1099 |
-} |
1100 |
- |
1101 |
-pkg_postinst() { |
1102 |
- eselect wine register ${P} |
1103 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
1104 |
- eselect wine register --vanilla ${P} || die |
1105 |
- fi |
1106 |
- |
1107 |
- eselect wine update --all --if-unset || die |
1108 |
- |
1109 |
- xdg_desktop_database_update |
1110 |
- |
1111 |
- if ! use gecko; then |
1112 |
- ewarn "Without Wine Gecko, wine prefixes will not have a default" |
1113 |
- ewarn "implementation of iexplore. Many older windows applications" |
1114 |
- ewarn "rely upon the existence of an iexplore implementation, so" |
1115 |
- ewarn "you will likely need to install an external one, like via winetricks" |
1116 |
- fi |
1117 |
- if ! use mono; then |
1118 |
- ewarn "Without Wine Mono, wine prefixes will not have a default" |
1119 |
- ewarn "implementation of .NET. Many windows applications rely upon" |
1120 |
- ewarn "the existence of a .NET implementation, so you will likely need" |
1121 |
- ewarn "to install an external one, like via winetricks" |
1122 |
- fi |
1123 |
-} |
1124 |
- |
1125 |
-pkg_prerm() { |
1126 |
- eselect wine deregister ${P} |
1127 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
1128 |
- eselect wine deregister --vanilla ${P} || die |
1129 |
- fi |
1130 |
- |
1131 |
- eselect wine update --all --if-unset || die |
1132 |
-} |
1133 |
- |
1134 |
-pkg_postrm() { |
1135 |
- xdg_desktop_database_update |
1136 |
-} |