Gentoo Archives: gentoo-commits

From: Nick Sarnie <sarnex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-staging/
Date: Tue, 02 Mar 2021 05:11:17
Message-Id: 1614661863.0c8f67beb016e231aea79cbbf0e847a7410e8901.sarnex@gentoo
1 commit: 0c8f67beb016e231aea79cbbf0e847a7410e8901
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 2 05:10:38 2021 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 2 05:11:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c8f67be
7
8 app-emulation/wine-staging: Drop old
9
10 Package-Manager: Portage-3.0.16, Repoman-3.0.2
11 Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
12
13 app-emulation/wine-staging/wine-staging-6.3.ebuild | 667 ---------------------
14 1 file changed, 667 deletions(-)
15
16 diff --git a/app-emulation/wine-staging/wine-staging-6.3.ebuild b/app-emulation/wine-staging/wine-staging-6.3.ebuild
17 deleted file mode 100644
18 index 9bb1565d005..00000000000
19 --- a/app-emulation/wine-staging/wine-staging-6.3.ebuild
20 +++ /dev/null
21 @@ -1,667 +0,0 @@
22 -# Copyright 1999-2021 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=6
26 -
27 -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"
28 -PLOCALE_BACKUP="en"
29 -
30 -inherit autotools eapi7-ver estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx xdg-utils
31 -MY_PN="${PN%%-*}"
32 -MY_PV="${PV/_/-}"
33 -MY_P="${MY_PN}-${MY_PV}"
34 -
35 -if [[ ${MY_PV} == "9999" ]] ; then
36 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
37 - EGIT_BRANCH="master"
38 - inherit git-r3
39 - SRC_URI=""
40 - #KEYWORDS=""
41 -else
42 - MAJOR_V=$(ver_cut 1)
43 - MINOR_V=$(ver_cut 2)
44 - if [[ ${MINOR_V} != "0" ]] ; then
45 - MINOR_V="x"
46 - fi
47 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.${MINOR_V}/${MY_P}.tar.xz"
48 - KEYWORDS="-* ~amd64 ~x86"
49 -fi
50 -S="${WORKDIR}/${MY_P}"
51 -
52 -STAGING_P="wine-staging-${MY_PV}"
53 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
54 -GWP_V="20200523"
55 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
56 -
57 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
58 -HOMEPAGE="https://www.winehq.org/"
59 -SRC_URI="${SRC_URI}
60 - https://dev.gentoo.org/~sarnex/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
61 -"
62 -
63 -if [[ ${MY_PV} == "9999" ]] ; then
64 - STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git"
65 -else
66 - SRC_URI="${SRC_URI}
67 - staging? ( https://github.com/wine-staging/wine-staging/archive/v${MY_PV}.tar.gz -> ${STAGING_P}.tar.gz )"
68 -fi
69 -
70 -LICENSE="LGPL-2.1"
71 -SLOT="${MY_PV}"
72 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +faudio +fontconfig +gcrypt +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test themes +threads +truetype udev +udisks +unwind usb v4l vaapi vkd3d vulkan +X +xcomposite xinerama +xml"
73 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
74 - X? ( truetype )
75 - elibc_glibc? ( threads )
76 - osmesa? ( opengl )
77 - pipelight? ( staging )
78 - test? ( abi_x86_32 )
79 - themes? ( staging )
80 - vaapi? ( staging )
81 - vkd3d? ( vulkan )" # osmesa-opengl #286560 # X-truetype #551124
82 -
83 -# FIXME: the test suite is unsuitable for us; many tests require net access
84 -# or fail due to Xvfb's opengl limitations.
85 -RESTRICT="test"
86 -
87 -COMMON_DEPEND="
88 - X? (
89 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
90 - x11-libs/libXext[${MULTILIB_USEDEP}]
91 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
92 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
93 - x11-libs/libXi[${MULTILIB_USEDEP}]
94 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
95 - )
96 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
97 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
98 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
99 - faudio? ( app-emulation/faudio:=[${MULTILIB_USEDEP}] )
100 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
101 - gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] )
102 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
103 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
104 - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
105 - gstreamer? (
106 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
107 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
108 - )
109 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
110 - kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] )
111 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
112 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
113 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
114 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
115 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
116 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
117 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
118 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
119 - opengl? (
120 - virtual/glu[${MULTILIB_USEDEP}]
121 - virtual/opengl[${MULTILIB_USEDEP}]
122 - )
123 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
124 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
125 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
126 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
127 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
128 - sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] )
129 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
130 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
131 - themes? (
132 - dev-libs/glib:2[${MULTILIB_USEDEP}]
133 - x11-libs/cairo[${MULTILIB_USEDEP}]
134 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
135 - )
136 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
137 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
138 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
139 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
140 - usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
141 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
142 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
143 - vkd3d? ( >=app-emulation/vkd3d-1.2[${MULTILIB_USEDEP}] )
144 - vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
145 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
146 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
147 - xml? (
148 - dev-libs/libxml2[${MULTILIB_USEDEP}]
149 - dev-libs/libxslt[${MULTILIB_USEDEP}]
150 - )"
151 -
152 -RDEPEND="${COMMON_DEPEND}
153 - app-emulation/wine-desktop-common
154 - >app-eselect/eselect-wine-0.3
155 - !app-emulation/wine:0
156 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
157 - gecko? ( app-emulation/wine-gecko:2.47.2[abi_x86_32?,abi_x86_64?] )
158 - mono? ( app-emulation/wine-mono:6.0.0 )
159 - perl? (
160 - dev-lang/perl
161 - dev-perl/XML-Simple
162 - )
163 - pulseaudio? (
164 - realtime? ( sys-auth/rtkit )
165 - )
166 - samba? ( >=net-fs/samba-3.0.25[winbind] )
167 - selinux? ( sec-policy/selinux-wine )
168 - udisks? ( sys-fs/udisks:2 )"
169 -
170 -# tools/make_requests requires perl
171 -DEPEND="${COMMON_DEPEND}
172 - sys-devel/flex
173 - >=sys-kernel/linux-headers-2.6
174 - virtual/pkgconfig
175 - virtual/yacc
176 - X? ( x11-base/xorg-proto )
177 - prelink? ( sys-devel/prelink )
178 - staging? (
179 - dev-lang/perl
180 - dev-perl/XML-Simple
181 - )
182 - xinerama? ( x11-base/xorg-proto )"
183 -
184 -# These use a non-standard "Wine" category, which is provided by
185 -# /etc/xdg/applications-merged/wine.menu
186 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
187 -usr/share/applications/wine-notepad.desktop
188 -usr/share/applications/wine-uninstaller.desktop
189 -usr/share/applications/wine-winecfg.desktop"
190 -
191 -PATCHES=(
192 - "${PATCHDIR}/patches/${MY_PN}-5.0-winegcc.patch" #260726
193 - "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615
194 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
195 - "${PATCHDIR}/patches/${MY_PN}-5.9-Revert-makedep-Install-also-generated-typelib-for-in.patch"
196 -)
197 -PATCHES_BIN=()
198 -
199 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
200 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${MY_PV} == 9999 ]]; then
201 - DEPEND+=" dev-util/patchbin"
202 -fi
203 -
204 -wine_compiler_check() {
205 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
206 -
207 - # GCC-specific bugs
208 - if tc-is-gcc; then
209 - # bug #549768
210 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
211 - ebegin "Checking for gcc-5 ms_abi compiler bug"
212 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
213 - # Run in subshell to prevent "Aborted" message
214 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
215 - if ! eend $?; then
216 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
217 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
218 - eerror "or use gcc-config to select a different compiler version."
219 - eerror "See https://bugs.gentoo.org/549768"
220 - eerror
221 - return 1
222 - fi
223 - fi
224 - # bug #574044
225 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
226 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
227 - # Compile in subshell to prevent "Aborted" message
228 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
229 - if ! eend $?; then
230 - eerror "Wine cannot be built with this version of gcc-5.3"
231 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
232 - eerror "or use gcc-config to select a different compiler version."
233 - eerror "See https://bugs.gentoo.org/574044"
234 - eerror
235 - return 1
236 - fi
237 - fi
238 - fi
239 -
240 - # Ensure compiler support
241 - if use abi_x86_64; then
242 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
243 - # Compile in subshell to prevent "Aborted" message
244 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
245 - if ! eend $?; then
246 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
247 - eerror
248 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
249 - eerror
250 - return 1
251 - fi
252 - fi
253 -}
254 -
255 -wine_build_environment_check() {
256 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
257 -
258 - if use abi_x86_64; then
259 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
260 - eerror "You need gcc-4.4+ to compile 64-bit wine"
261 - die
262 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
263 - eerror "You need clang-3.8+ to compile 64-bit wine"
264 - die
265 - fi
266 - fi
267 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
268 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
269 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
270 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
271 - fi
272 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
273 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
274 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
275 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
276 - ewarn "See package.env in man 5 portage for more information on how to do this."
277 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
278 - fi
279 - fi
280 -
281 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
282 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
283 - eerror "See https://bugs.gentoo.org/487864 for more details."
284 - eerror
285 - return 1
286 - fi
287 -}
288 -
289 -wine_env_vcs_vars() {
290 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
291 - local pn_live_val="${pn_live_var}"
292 - eval pn_live_val='$'${pn_live_val}
293 - if [[ ! -z ${pn_live_val} ]]; then
294 - if use staging; then
295 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
296 - eerror "cannot be used to set the commit. Instead, you may use the"
297 - eerror "environment variables:"
298 - eerror " EGIT_OVERRIDE_COMMIT_WINE"
299 - eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING"
300 - eerror
301 - return 1
302 - fi
303 - fi
304 - if [[ ! -z ${EGIT_COMMIT} ]]; then
305 - eerror "Commits must now be specified using the environment variables:"
306 - eerror " EGIT_OVERRIDE_COMMIT_WINE"
307 - eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING"
308 - eerror
309 - return 1
310 - fi
311 -}
312 -
313 -pkg_pretend() {
314 - if [[ ${MERGE_TYPE} != binary ]] ; then
315 - wine_build_environment_check || die
316 -
317 - # Verify OSS support
318 - if use oss && ! use kernel_FreeBSD; then
319 - if ! has_version ">=media-sound/oss-4"; then
320 - eerror "You cannot build wine with USE=oss without having support from a"
321 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
322 - eerror
323 - die
324 - fi
325 - fi
326 -
327 - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then
328 - eerror
329 - eerror "USE=\"mingw\" is currently experimental, and requires the"
330 - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds."
331 - eerror
332 - eerror "These can be installed by using 'sys-devel/crossdev':"
333 - eerror
334 - eerror "crossdev --target i686-w64-mingw32"
335 - eerror
336 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
337 - eerror
338 - die "MinGW build was enabled, but no compiler to support it was found."
339 - fi
340 -
341 - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then
342 - eerror
343 - eerror "USE=\"mingw\" is currently experimental, and requires the"
344 - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds."
345 - eerror
346 - eerror "These can be installed by using 'sys-devel/crossdev':"
347 - eerror
348 - eerror "crossdev --target x86_64-w64-mingw32"
349 - eerror
350 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
351 - eerror
352 - die "MinGW build was enabled, but no compiler to support it was found."
353 - fi
354 - fi
355 -}
356 -
357 -pkg_setup() {
358 - wine_build_environment_check || die
359 - wine_env_vcs_vars || die
360 -
361 - WINE_VARIANT="${PN#wine}-${MY_PV}"
362 - WINE_VARIANT="${WINE_VARIANT#-}"
363 -
364 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
365 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
366 - MY_DATADIR="${MY_DATAROOTDIR}"
367 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
368 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
369 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
370 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
371 - MY_MANDIR="${MY_DATADIR}/man"
372 -}
373 -
374 -src_unpack() {
375 - if [[ ${MY_PV} == "9999" ]] ; then
376 - EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack
377 - if use staging; then
378 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
379 -
380 - EGIT_CHECKOUT_DIR="${STAGING_DIR}" EGIT_REPO_URI="${STAGING_EGIT_REPO_URI}" git-r3_src_unpack
381 -
382 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
383 -
384 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
385 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
386 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
387 - einfo "Example: EGIT_OVERRIDE_COMMIT_WINE=${COMPAT_WINE_COMMIT} emerge -1 wine"
388 - fi
389 - fi
390 - fi
391 -
392 - default
393 -
394 - l10n_find_plocales_changes "${S}/po" "" ".po"
395 -}
396 -
397 -src_prepare() {
398 -
399 - eapply_bin(){
400 - local patch
401 - for patch in ${PATCHES_BIN[@]}; do
402 - patchbin --nogit < "${patch}" || die
403 - done
404 - }
405 -
406 - local md5="$(md5sum server/protocol.def)"
407 -
408 - if use staging; then
409 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
410 - ewarn "Wine bugzilla should explicitly state that staging was used."
411 -
412 - local STAGING_EXCLUDE="-W winemenubuilder-Desktop_Icon_Path" #652176
413 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
414 -
415 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
416 - ebegin "Running Wine-Staging patch installer"
417 - (
418 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
419 - cd "${STAGING_DIR}/patches"
420 - source "${STAGING_DIR}/patches/patchinstall.sh"
421 - )
422 - eend $? || die "Failed to apply Wine-Staging patches"
423 - fi
424 -
425 - default
426 - eapply_bin
427 - eautoreconf
428 -
429 - # Modification of the server protocol requires regenerating the server requests
430 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
431 - einfo "server/protocol.def was patched; running tools/make_requests"
432 - tools/make_requests || die #432348
433 - fi
434 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
435 - if ! use run-exes; then
436 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
437 - fi
438 -
439 - # Edit wine.desktop to work for specific variant
440 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
441 -
442 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
443 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
444 -
445 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
446 -
447 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
448 -
449 - # Duplicate manpages input files for wine64
450 - local f
451 - for f in loader/*.man.in; do
452 - cp ${f} ${f/wine/wine64} || die
453 - done
454 - # Add wine64 manpages to Makefile
455 - if use abi_x86_64; then
456 - sed -i "/wine.man.in/i \
457 - \\\twine64.man.in \\\\" loader/Makefile.in || die
458 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
459 -\164\2/' loader/Makefile.in || die
460 - fi
461 -
462 - rm_man_file(){
463 - local file="${1}"
464 - loc=${2}
465 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
466 - }
467 -
468 - while read f; do
469 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
470 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
471 -}
472 -
473 -src_configure() {
474 - wine_compiler_check || die
475 -
476 - export LDCONFIG=/bin/true
477 - use custom-cflags || strip-flags
478 - if use mingw; then
479 - export CROSSCFLAGS="${CFLAGS}"
480 - fi
481 -
482 - multilib-minimal_src_configure
483 -}
484 -
485 -multilib_src_configure() {
486 - local myconf=(
487 - --prefix="${MY_PREFIX}"
488 - --datarootdir="${MY_DATAROOTDIR}"
489 - --datadir="${MY_DATADIR}"
490 - --docdir="${MY_DOCDIR}"
491 - --includedir="${MY_INCLUDEDIR}"
492 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
493 - --libexecdir="${MY_LIBEXECDIR}"
494 - --localstatedir="${MY_LOCALSTATEDIR}"
495 - --mandir="${MY_MANDIR}"
496 - --sysconfdir="${EPREFIX}/etc/wine"
497 - $(use_with alsa)
498 - $(use_with capi)
499 - $(use_with lcms cms)
500 - $(use_with cups)
501 - $(use_with udisks dbus)
502 - $(use_with faudio)
503 - $(use_with fontconfig)
504 - $(use_with ssl gnutls)
505 - $(use_enable gecko mshtml)
506 - $(use_with gcrypt)
507 - $(use_with gphoto2 gphoto)
508 - $(use_with gsm)
509 - $(use_with gssapi)
510 - $(use_with gstreamer)
511 - --without-hal
512 - $(use_with jpeg)
513 - $(use_with kerberos krb5)
514 - $(use_with ldap)
515 - # TODO: Will bug 685172 still need special handling?
516 - $(use_with mingw)
517 - $(use_enable mono mscoree)
518 - $(use_with mp3 mpg123)
519 - $(use_with netapi)
520 - $(use_with nls gettext)
521 - $(use_with openal)
522 - $(use_with opencl)
523 - $(use_with opengl)
524 - $(use_with osmesa)
525 - $(use_with oss)
526 - $(use_with pcap)
527 - $(use_with png)
528 - $(use_with pulseaudio pulse)
529 - $(use_with threads pthread)
530 - $(use_with scanner sane)
531 - $(use_with sdl)
532 - $(use_enable test tests)
533 - $(use_with truetype freetype)
534 - $(use_with udev)
535 - $(use_with unwind)
536 - $(use_with usb)
537 - $(use_with v4l v4l2)
538 - $(use_with vkd3d)
539 - $(use_with vulkan)
540 - $(use_with X x)
541 - $(use_with X xfixes)
542 - $(use_with xcomposite)
543 - $(use_with xinerama)
544 - $(use_with xml)
545 - $(use_with xml xslt)
546 - )
547 -
548 - use staging && myconf+=(
549 - --with-xattr
550 - $(use_with themes gtk3)
551 - $(use_with vaapi va)
552 - )
553 -
554 - local PKG_CONFIG AR RANLIB
555 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
556 - # set AR and RANLIB to make QA scripts happy; #483342
557 - tc-export PKG_CONFIG AR RANLIB
558 -
559 - if use amd64; then
560 - if [[ ${ABI} == amd64 ]]; then
561 - myconf+=( --enable-win64 )
562 - else
563 - myconf+=( --disable-win64 )
564 - fi
565 -
566 - # Note: using --with-wine64 results in problems with multilib.eclass
567 - # CC/LD hackery. We're using separate tools instead.
568 - fi
569 -
570 - ECONF_SOURCE=${S} \
571 - econf "${myconf[@]}"
572 - emake depend
573 -}
574 -
575 -multilib_src_test() {
576 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
577 - if [[ ${ABI} == x86 ]]; then
578 - if [[ $(id -u) == 0 ]]; then
579 - ewarn "Skipping tests since they cannot be run under the root user."
580 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
581 - return
582 - fi
583 -
584 - WINEPREFIX="${T}/.wine-${ABI}" \
585 - Xemake test
586 - fi
587 -}
588 -
589 -multilib_src_install_all() {
590 - local DOCS=( ANNOUNCE AUTHORS README )
591 - add_locale_docs() {
592 - local locale_doc="documentation/README.$1"
593 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
594 - }
595 - l10n_for_each_locale_do add_locale_docs
596 -
597 - einstalldocs
598 - prune_libtool_files --all
599 -
600 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
601 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
602 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
603 - fi
604 -
605 - # Remove wineconsole if neither backend is installed #551124
606 - if ! use X; then
607 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
608 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
609 -
610 - if ! use mingw; then
611 - rm_wineconsole() {
612 - rm "${D%/}/usr/$(get_libdir)/wine-${WINE_VARIANT}"/wine/{,fakedlls/}wineconsole.exe* || die
613 - }
614 - else
615 - rm_wineconsole() {
616 - rm "${D%/}/usr/$(get_libdir)/wine-${WINE_VARIANT}"/wine/wineconsole.exe* || die
617 - }
618 - fi
619 -
620 - multilib_foreach_abi rm_wineconsole
621 - fi
622 -
623 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
624 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
625 -
626 - # Avoid double prefix from dosym and make_wrapper
627 - MY_PREFIX=${MY_PREFIX#${EPREFIX}}
628 -
629 - if use abi_x86_64 && ! use abi_x86_32; then
630 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
631 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
632 - fi
633 -
634 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
635 - eshopts_push -s failglob #615218
636 - # Make wrappers for binaries for handling multiple variants
637 - # Note: wrappers instead of symlinks because some are shell which use basename
638 - local b
639 - for b in "${ED%/}${MY_PREFIX}"/bin/*; do
640 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
641 - done
642 - eshopts_pop
643 -}
644 -
645 -pkg_postinst() {
646 - eselect wine register ${PN}-${MY_PV}
647 - if [[ ${PN} == "wine-vanilla" ]]; then
648 - eselect wine register --vanilla ${PN}-${MY_PV} || die
649 - else
650 - if use staging; then
651 - eselect wine register --staging ${PN}-${MY_PV} || die
652 - fi
653 - fi
654 -
655 - eselect wine update --all --if-unset || die
656 -
657 - xdg_desktop_database_update
658 -
659 - if ! use gecko; then
660 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
661 - ewarn "implementation of iexplore. Many older windows applications"
662 - ewarn "rely upon the existence of an iexplore implementation, so"
663 - ewarn "you will likely need to install an external one, like via winetricks"
664 - fi
665 - if ! use mono; then
666 - ewarn "Without Wine Mono, wine prefixes will not have a default"
667 - ewarn "implementation of .NET. Many windows applications rely upon"
668 - ewarn "the existence of a .NET implementation, so you will likely need"
669 - ewarn "to install an external one, like via winetricks"
670 - fi
671 -}
672 -
673 -pkg_prerm() {
674 - eselect wine deregister ${PN}-${MY_PV}
675 - if [[ ${PN} == "wine-vanilla" ]]; then
676 - eselect wine deregister --vanilla ${PN}-${MY_PV} || die
677 - else
678 - if use staging; then
679 - eselect wine deregister --staging ${PN}-${MY_PV}|| die
680 - fi
681 - fi
682 -
683 - eselect wine update --all --if-unset || die
684 -}
685 -
686 -pkg_postrm() {
687 - xdg_desktop_database_update
688 -}