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