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