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