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