Gentoo Archives: gentoo-commits

From: Nick Sarnie <sarnex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/wine:master commit in: app-emulation/wine-vanilla/
Date: Mon, 30 Apr 2018 01:34:01
Message-Id: 1525051879.59d899fc13c70ec1194dea0e9573abde359af121.sarnex@gentoo
1 commit: 59d899fc13c70ec1194dea0e9573abde359af121
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 28 18:49:13 2018 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 30 01:31:19 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=59d899fc
7
8 app-emulation/wine-vanilla: Bump to 3.3
9
10 Closes: https://bugs.gentoo.org/654164
11
12 Package-Manager: Portage-2.3.31, Repoman-2.3.9
13
14 app-emulation/wine-vanilla/Manifest | 1 +
15 app-emulation/wine-vanilla/wine-vanilla-3.3.ebuild | 529 +++++++++++++++++++++
16 2 files changed, 530 insertions(+)
17
18 diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
19 index a4c540a..d8cab25 100644
20 --- a/app-emulation/wine-vanilla/Manifest
21 +++ b/app-emulation/wine-vanilla/Manifest
22 @@ -29,3 +29,4 @@ DIST wine-2.9.tar.xz 19154668 BLAKE2B 45961ad031404a4cba8733bbbfe34ac1db361a508d
23 DIST wine-3.0.tar.xz 19712932 BLAKE2B 4478c6781bb171ecca426d1fdc85e0d0bbe13b62b6c983933de55e2abdd0bda7a01cbf251c021824b00129ea6230d1d4e718a64b7d919bb5c07a106b8771adb6 SHA512 a51f41b66f4805e09b223528eff6670e94b9c0c0c947be647507baf9d8d9afe7c3fdc88684c2c8d3573b4739d9a086ab929a744a8594d3c8f6ceb52070f43f0a
24 DIST wine-3.1.tar.xz 19730700 BLAKE2B 287cc42474a9cc57eb7f4b5db2ba79ac5ec8742dffb5367c189f19465cc69bcf78b10fe62ffe6f84ae1360f639a899a7f19128e30e1d9a5b8bbd63deb85e7650 SHA512 49c30d820b8f4028935b4d90dd6251c881cb8cd41bde8833db2782f04111a3d111e24605a87b2d70e419d54cfb6bb42d941f4593f9b381812e3602bf1307c545
25 DIST wine-3.2.tar.xz 19793180 BLAKE2B 014256734f4c1d70c81115ba6c470f8264746b57be663d81f7e54593fb328a548da00c5e52438af75d923a3c6c5d3997097bd76cf1856b99f0f921f36e5151da SHA512 94b4903d628bf7aacd712a2bf566b53161880bf28311611106776df222222f592edb212d491f02e4c1b0c60d88e4b4a126981d445d1e18018238ff993c6c3092
26 +DIST wine-3.3.tar.xz 19891048 BLAKE2B be77224e7add585f6bba77f436faa8bc9da4f4416d07e2fc67e29d5f9553b03ae8cef12fcb8dee917d84bb5a1c66af16d3140b17b195f2db58464ffe86ff7d9e SHA512 c9e4c75e94d745837208bf877b19c4e4e46df1e78082d21e716f52c9f9d93eaabbec8bf34783cda68e4275f53e37929b81ac128e5b8a13c1e5035223b2621d6a
27
28 diff --git a/app-emulation/wine-vanilla/wine-vanilla-3.3.ebuild b/app-emulation/wine-vanilla/wine-vanilla-3.3.ebuild
29 new file mode 100644
30 index 0000000..9bebca2
31 --- /dev/null
32 +++ b/app-emulation/wine-vanilla/wine-vanilla-3.3.ebuild
33 @@ -0,0 +1,529 @@
34 +# Copyright 1999-2018 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +PLOCALES="ar 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 sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW"
40 +PLOCALE_BACKUP="en"
41 +
42 +inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
43 +
44 +MY_PN="${PN%%-*}"
45 +MY_P="${MY_PN}-${PV}"
46 +
47 +if [[ ${PV} == "9999" ]] ; then
48 + EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
49 + EGIT_BRANCH="master"
50 + inherit git-r3
51 + SRC_URI=""
52 + #KEYWORDS=""
53 +else
54 + MAJOR_V=$(get_version_component_range 1)
55 + SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
56 + KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
57 +fi
58 +S="${WORKDIR}/${MY_P}"
59 +
60 +GWP_V="20180120"
61 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
62 +
63 +DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
64 +HOMEPAGE="https://www.winehq.org/"
65 +SRC_URI="${SRC_URI}
66 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
67 +"
68 +
69 +LICENSE="LGPL-2.1"
70 +SLOT="${PV}"
71 +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +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 v4l vulkan +X +xcomposite xinerama +xml"
72 +REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
73 + X? ( truetype )
74 + elibc_glibc? ( threads )
75 + osmesa? ( opengl )
76 + test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124
77 +
78 +# FIXME: the test suite is unsuitable for us; many tests require net access
79 +# or fail due to Xvfb's opengl limitations.
80 +RESTRICT="test"
81 +
82 +COMMON_DEPEND="
83 + X? (
84 + x11-libs/libXcursor[${MULTILIB_USEDEP}]
85 + x11-libs/libXext[${MULTILIB_USEDEP}]
86 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
87 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
88 + x11-libs/libXi[${MULTILIB_USEDEP}]
89 + x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
90 + )
91 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
92 + capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
93 + cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
94 + fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
95 + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
96 + gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
97 + gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
98 + gstreamer? (
99 + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
100 + media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
101 + )
102 + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
103 + kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
104 + lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
105 + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
106 + mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
107 + ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
108 + netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
109 + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
110 + odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
111 + openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
112 + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
113 + opengl? (
114 + virtual/glu[${MULTILIB_USEDEP}]
115 + virtual/opengl[${MULTILIB_USEDEP}]
116 + )
117 + osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
118 + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
119 + png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
120 + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
121 + scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
122 + sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] )
123 + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
124 + truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
125 + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
126 + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
127 + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
128 + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
129 + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
130 + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
131 + xml? (
132 + dev-libs/libxml2[${MULTILIB_USEDEP}]
133 + dev-libs/libxslt[${MULTILIB_USEDEP}]
134 + )"
135 +
136 +RDEPEND="${COMMON_DEPEND}
137 + app-emulation/wine-desktop-common
138 + >app-eselect/eselect-wine-0.3
139 + !app-emulation/wine:0
140 + dos? ( >=games-emulation/dosbox-0.74_p20160629 )
141 + gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
142 + mono? ( app-emulation/wine-mono:4.7.1 )
143 + perl? (
144 + dev-lang/perl
145 + dev-perl/XML-Simple
146 + )
147 + pulseaudio? (
148 + realtime? ( sys-auth/rtkit )
149 + )
150 + samba? ( >=net-fs/samba-3.0.25[winbind] )
151 + selinux? ( sec-policy/selinux-wine )
152 + udisks? ( sys-fs/udisks:2 )"
153 +
154 +# tools/make_requests requires perl
155 +DEPEND="${COMMON_DEPEND}
156 + sys-devel/flex
157 + >=sys-kernel/linux-headers-2.6
158 + virtual/pkgconfig
159 + virtual/yacc
160 + X? ( x11-base/xorg-proto )
161 + prelink? ( sys-devel/prelink )
162 + xinerama? ( x11-base/xorg-proto )"
163 +
164 +# These use a non-standard "Wine" category, which is provided by
165 +# /etc/xdg/applications-merged/wine.menu
166 +QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
167 +usr/share/applications/wine-notepad.desktop
168 +usr/share/applications/wine-uninstaller.desktop
169 +usr/share/applications/wine-winecfg.desktop"
170 +
171 +PATCHES=(
172 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
173 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
174 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
175 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
176 +)
177 +PATCHES_BIN=()
178 +
179 +# https://bugs.gentoo.org/show_bug.cgi?id=635222
180 +if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
181 + DEPEND+=" dev-util/patchbin"
182 +fi
183 +
184 +wine_compiler_check() {
185 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
186 +
187 + # GCC-specific bugs
188 + if tc-is-gcc; then
189 + # bug #549768
190 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
191 + ebegin "Checking for gcc-5 ms_abi compiler bug"
192 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
193 + # Run in subshell to prevent "Aborted" message
194 + ( "${T}"/pr66838 || false ) >/dev/null 2>&1
195 + if ! eend $?; then
196 + eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
197 + eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
198 + eerror "or use gcc-config to select a different compiler version."
199 + eerror "See https://bugs.gentoo.org/549768"
200 + eerror
201 + return 1
202 + fi
203 + fi
204 + # bug #574044
205 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
206 + ebegin "Checking for gcc-5-3 stack realignment compiler bug"
207 + # Compile in subshell to prevent "Aborted" message
208 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
209 + if ! eend $?; then
210 + eerror "Wine cannot be built with this version of gcc-5.3"
211 + eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
212 + eerror "or use gcc-config to select a different compiler version."
213 + eerror "See https://bugs.gentoo.org/574044"
214 + eerror
215 + return 1
216 + fi
217 + fi
218 + fi
219 +
220 + # Ensure compiler support
221 + if use abi_x86_64; then
222 + ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
223 + # Compile in subshell to prevent "Aborted" message
224 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
225 + if ! eend $?; then
226 + eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
227 + eerror
228 + eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
229 + eerror
230 + return 1
231 + fi
232 + fi
233 +}
234 +
235 +wine_build_environment_check() {
236 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
237 +
238 + if use abi_x86_64; then
239 + if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
240 + eerror "You need gcc-4.4+ to compile 64-bit wine"
241 + die
242 + elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
243 + eerror "You need clang-3.8+ to compile 64-bit wine"
244 + die
245 + fi
246 + fi
247 + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
248 + ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
249 + ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
250 + ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
251 + fi
252 + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
253 + if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
254 + ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
255 + ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
256 + ewarn "See package.env in man 5 portage for more information on how to do this."
257 + ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
258 + fi
259 + fi
260 +
261 + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
262 + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
263 + eerror "See https://bugs.gentoo.org/487864 for more details."
264 + eerror
265 + return 1
266 + fi
267 +}
268 +
269 +wine_env_vcs_vars() {
270 + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
271 + local pn_live_val="${pn_live_var}"
272 + eval pn_live_val='$'${pn_live_val}
273 + if [[ ! -z ${EGIT_COMMIT} ]]; then
274 + eerror "Commits must now be specified using the environmental variables"
275 + eerror "WINE_COMMIT"
276 + eerror
277 + return 1
278 + fi
279 +}
280 +
281 +pkg_pretend() {
282 + wine_build_environment_check || die
283 +
284 + # Verify OSS support
285 + if use oss && ! use kernel_FreeBSD; then
286 + if ! has_version ">=media-sound/oss-4"; then
287 + eerror "You cannot build wine with USE=oss without having support from a"
288 + eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
289 + eerror
290 + die
291 + fi
292 + fi
293 +}
294 +
295 +pkg_setup() {
296 + wine_build_environment_check || die
297 + wine_env_vcs_vars || die
298 +
299 + WINE_VARIANT="${PN#wine}-${PV}"
300 + WINE_VARIANT="${WINE_VARIANT#-}"
301 +
302 + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
303 + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
304 + MY_DATADIR="${MY_DATAROOTDIR}"
305 + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
306 + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
307 + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
308 + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
309 + MY_MANDIR="${MY_DATADIR}/man"
310 +}
311 +
312 +src_unpack() {
313 + if [[ ${PV} == "9999" ]] ; then
314 + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
315 + fi
316 +
317 + default
318 +
319 + l10n_find_plocales_changes "${S}/po" "" ".po"
320 +}
321 +
322 +src_prepare() {
323 +
324 + eapply_bin(){
325 + local patch
326 + for patch in ${PATCHES_BIN[@]}; do
327 + patchbin --nogit < "${patch}" || die
328 + done
329 + }
330 +
331 + local md5="$(md5sum server/protocol.def)"
332 +
333 + default
334 + eapply_bin
335 + eautoreconf
336 +
337 + # Modification of the server protocol requires regenerating the server requests
338 + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
339 + einfo "server/protocol.def was patched; running tools/make_requests"
340 + tools/make_requests || die #432348
341 + fi
342 + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
343 + if ! use run-exes; then
344 + sed -i '/^MimeType/d' loader/wine.desktop || die #117785
345 + fi
346 +
347 + # Edit wine.desktop to work for specific variant
348 + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
349 +
350 + # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
351 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
352 +
353 + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
354 +
355 + # Fix manpage generation for locales #469418 and abi_x86_64 #617864
356 +
357 + # Duplicate manpages input files for wine64
358 + local f
359 + for f in loader/*.man.in; do
360 + cp ${f} ${f/wine/wine64} || die
361 + done
362 + # Add wine64 manpages to Makefile
363 + if use abi_x86_64; then
364 + sed -i "/wine.man.in/i \
365 + \\\twine64.man.in \\\\" loader/Makefile.in || die
366 + sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
367 +\164\2/' loader/Makefile.in || die
368 + fi
369 +
370 + rm_man_file(){
371 + local file="${1}"
372 + loc=${2}
373 + sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
374 + }
375 +
376 + while read f; do
377 + l10n_for_each_disabled_locale_do rm_man_file "${f}"
378 + done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
379 +}
380 +
381 +src_configure() {
382 + wine_compiler_check || die
383 +
384 + export LDCONFIG=/bin/true
385 + use custom-cflags || strip-flags
386 +
387 + multilib-minimal_src_configure
388 +}
389 +
390 +multilib_src_configure() {
391 + local myconf=(
392 + --prefix="${MY_PREFIX}"
393 + --datarootdir="${MY_DATAROOTDIR}"
394 + --datadir="${MY_DATADIR}"
395 + --docdir="${MY_DOCDIR}"
396 + --includedir="${MY_INCLUDEDIR}"
397 + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
398 + --libexecdir="${MY_LIBEXECDIR}"
399 + --localstatedir="${MY_LOCALSTATEDIR}"
400 + --mandir="${MY_MANDIR}"
401 + --sysconfdir=/etc/wine
402 + $(use_with alsa)
403 + $(use_with capi)
404 + $(use_with lcms cms)
405 + $(use_with cups)
406 + $(use_with ncurses curses)
407 + $(use_with udisks dbus)
408 + $(use_with fontconfig)
409 + $(use_with ssl gnutls)
410 + $(use_enable gecko mshtml)
411 + $(use_with gphoto2 gphoto)
412 + $(use_with gsm)
413 + $(use_with gssapi)
414 + $(use_with gstreamer)
415 + --without-hal
416 + $(use_with jpeg)
417 + $(use_with kerberos krb5)
418 + $(use_with ldap)
419 + $(use_enable mono mscoree)
420 + $(use_with mp3 mpg123)
421 + $(use_with netapi)
422 + $(use_with nls gettext)
423 + $(use_with openal)
424 + $(use_with opencl)
425 + $(use_with opengl)
426 + $(use_with osmesa)
427 + $(use_with oss)
428 + $(use_with pcap)
429 + $(use_with png)
430 + $(use_with pulseaudio pulse)
431 + $(use_with threads pthread)
432 + $(use_with scanner sane)
433 + $(use_with sdl)
434 + $(use_enable test tests)
435 + $(use_with truetype freetype)
436 + $(use_with udev)
437 + $(use_with v4l)
438 + $(use_with vulkan)
439 + $(use_with X x)
440 + $(use_with X xfixes)
441 + $(use_with xcomposite)
442 + $(use_with xinerama)
443 + $(use_with xml)
444 + $(use_with xml xslt)
445 + )
446 +
447 + local PKG_CONFIG AR RANLIB
448 + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
449 + # set AR and RANLIB to make QA scripts happy; #483342
450 + tc-export PKG_CONFIG AR RANLIB
451 +
452 + if use amd64; then
453 + if [[ ${ABI} == amd64 ]]; then
454 + myconf+=( --enable-win64 )
455 + else
456 + myconf+=( --disable-win64 )
457 + fi
458 +
459 + # Note: using --with-wine64 results in problems with multilib.eclass
460 + # CC/LD hackery. We're using separate tools instead.
461 + fi
462 +
463 + ECONF_SOURCE=${S} \
464 + econf "${myconf[@]}"
465 + emake depend
466 +}
467 +
468 +multilib_src_test() {
469 + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
470 + if [[ ${ABI} == x86 ]]; then
471 + if [[ $(id -u) == 0 ]]; then
472 + ewarn "Skipping tests since they cannot be run under the root user."
473 + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
474 + return
475 + fi
476 +
477 + WINEPREFIX="${T}/.wine-${ABI}" \
478 + Xemake test
479 + fi
480 +}
481 +
482 +multilib_src_install_all() {
483 + local DOCS=( ANNOUNCE AUTHORS README )
484 + add_locale_docs() {
485 + local locale_doc="documentation/README.$1"
486 + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
487 + }
488 + l10n_for_each_locale_do add_locale_docs
489 +
490 + einstalldocs
491 + prune_libtool_files --all
492 +
493 + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
494 + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
495 + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
496 + fi
497 +
498 + # Remove wineconsole if neither backend is installed #551124
499 + if ! use X && ! use ncurses; then
500 + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
501 + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
502 + rm_wineconsole() {
503 + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
504 + }
505 + multilib_foreach_abi rm_wineconsole
506 + fi
507 +
508 + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
509 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
510 +
511 + if use abi_x86_64 && ! use abi_x86_32; then
512 + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
513 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
514 + fi
515 +
516 + # Failglob for binloops, shouldn't be necessary, but including to stay safe
517 + eshopts_push -s failglob #615218
518 + # Make wrappers for binaries for handling multiple variants
519 + # Note: wrappers instead of symlinks because some are shell which use basename
520 + local b
521 + for b in "${D%/}${MY_PREFIX}"/bin/*; do
522 + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
523 + done
524 + eshopts_pop
525 +}
526 +
527 +pkg_postinst() {
528 + eselect wine register ${P}
529 + if [[ ${PN} == "wine-vanilla" ]]; then
530 + eselect wine register --vanilla ${P} || die
531 + fi
532 +
533 + eselect wine update --all --if-unset || die
534 +
535 + xdg_desktop_database_update
536 +
537 + if ! use gecko; then
538 + ewarn "Without Wine Gecko, wine prefixes will not have a default"
539 + ewarn "implementation of iexplore. Many older windows applications"
540 + ewarn "rely upon the existence of an iexplore implementation, so"
541 + ewarn "you will likely need to install an external one, like via winetricks"
542 + fi
543 + if ! use mono; then
544 + ewarn "Without Wine Mono, wine prefixes will not have a default"
545 + ewarn "implementation of .NET. Many windows applications rely upon"
546 + ewarn "the existence of a .NET implementation, so you will likely need"
547 + ewarn "to install an external one, like via winetricks"
548 + fi
549 +}
550 +
551 +pkg_prerm() {
552 + eselect wine deregister ${P}
553 + if [[ ${PN} == "wine-vanilla" ]]; then
554 + eselect wine deregister --vanilla ${P} || die
555 + fi
556 +
557 + eselect wine update --all --if-unset || die
558 +}
559 +
560 +pkg_postrm() {
561 + xdg_desktop_database_update
562 +}