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: Mon, 30 Apr 2018 01:57:33
Message-Id: 1525053418.6f4ea4556bbefe552b5945486ceb800e23790048.sarnex@gentoo
1 commit: 6f4ea4556bbefe552b5945486ceb800e23790048
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 30 01:55:58 2018 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 30 01:56:58 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f4ea455
7
8 app-emulation/wine-vanilla: Drop old
9
10 Package-Manager: Portage-2.3.31, Repoman-2.3.9
11
12 app-emulation/wine-vanilla/Manifest | 5 -
13 .../wine-vanilla/wine-vanilla-2.20.ebuild | 525 --------------------
14 .../wine-vanilla/wine-vanilla-2.21.ebuild | 525 --------------------
15 .../wine-vanilla/wine-vanilla-2.22.ebuild | 525 --------------------
16 app-emulation/wine-vanilla/wine-vanilla-3.1.ebuild | 527 ---------------------
17 app-emulation/wine-vanilla/wine-vanilla-3.2.ebuild | 527 ---------------------
18 6 files changed, 2634 deletions(-)
19
20 diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
21 index 5e0453c1e0f..fdc29151759 100644
22 --- a/app-emulation/wine-vanilla/Manifest
23 +++ b/app-emulation/wine-vanilla/Manifest
24 @@ -4,12 +4,7 @@ DIST wine-2.0.2.tar.xz 18854952 BLAKE2B ae55b6a31e4d36b367a84e0e5fa7bea8c39a61ec
25 DIST wine-2.0.3.tar.xz 18864648 BLAKE2B 0503a11e7545d5af805bfc3c2f614b6e35e39b7b532ee45dd9947e1a9a53eb788a304e744c683e42bf84f0e67e2c046ea5f839b6bbad1cf73b9996eaae5c30c1 SHA512 e20dbcb3a48ecb3526eba075d4baebab2529dfc50b7a6d5e18294704470f61db386013f457118c270274b911f9643d203110f46558d23e84e6a6c2d78e237dbb
26 DIST wine-2.0.4.tar.xz 18898148 BLAKE2B a21c920e1cf15e064bc6b37067a11a5568f8d1906783c200236456b73947bbd24212208ab1bcc2ca526ed40d8b2e80a2dc5d95db1a8d356a484213afb6897f59 SHA512 8fccb93e5ebe482ed81e948e3b7f87d4fe5b1f838a10f9cdcafa9561de4ef54b7d5acdc292bf28ad3aaf44be34c5ad8452ebbfc39f49f95fcbe9f9d0fcfc862c
27 DIST wine-2.0.tar.bz2 23662707 BLAKE2B 1d485c1359ce8a0395a9f6378c1f8be33ea2836b80390d1eb1095057a0acedd21708daab16e1851a315391b9f9b0a360879b9d98c73bcc8371c5023e9a8037f5 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186
28 -DIST wine-2.20.tar.xz 19597556 BLAKE2B 80a9886fa77e5788b143521288f7d83c92754610c9426e58c759d2c33767bd23f7d2a44a17ceeec0bfe9065264393e0aa1087a0827ea7d438ffd938ba2eb2fb5 SHA512 d8d374d1e690ce9d3964fc81054fb7f4cd56cbae6bc44ebbf80b7dc7f04524baa2bd831e0be8f00de4cb0e14c1cb71780d424f5dcb9851fcaed9fb22f5ce5d23
29 -DIST wine-2.21.tar.xz 19620888 BLAKE2B 26d19c5805db58b53530b80eda3ab229f7961542d398cb0e74155e5341de8b484d301c263653ae50e953588538f6782a9b2200b822ba66f091e65d259e07db8e SHA512 4e33c463debe637827ed65f1118e692832bb5374491f706f9d251b8a2956e20d2df5d90ceba218b9bc9e946de91b8ba1d96b460453f59cdd9d82f070d07e0c43
30 -DIST wine-2.22.tar.xz 19635032 BLAKE2B 30534fb37ee0fe7b9f20309797240e461f14bc09ef1927e2c03e16cb136b83031ff186d29cc1092600ac53ede9533d0ddad6d4312e501e97201b0c632fedaae5 SHA512 14ecc25c3012c4eb9b1d3207372d0a4187f62593f986caca3196811b8aac0a7b898ae9acd94c707e0d63b6702019cf5051a964ada606b1ff8fb034bb353116bb
31 DIST wine-3.0.tar.xz 19712932 BLAKE2B 4478c6781bb171ecca426d1fdc85e0d0bbe13b62b6c983933de55e2abdd0bda7a01cbf251c021824b00129ea6230d1d4e718a64b7d919bb5c07a106b8771adb6 SHA512 a51f41b66f4805e09b223528eff6670e94b9c0c0c947be647507baf9d8d9afe7c3fdc88684c2c8d3573b4739d9a086ab929a744a8594d3c8f6ceb52070f43f0a
32 -DIST wine-3.1.tar.xz 19730700 BLAKE2B 287cc42474a9cc57eb7f4b5db2ba79ac5ec8742dffb5367c189f19465cc69bcf78b10fe62ffe6f84ae1360f639a899a7f19128e30e1d9a5b8bbd63deb85e7650 SHA512 49c30d820b8f4028935b4d90dd6251c881cb8cd41bde8833db2782f04111a3d111e24605a87b2d70e419d54cfb6bb42d941f4593f9b381812e3602bf1307c545
33 -DIST wine-3.2.tar.xz 19793180 BLAKE2B 014256734f4c1d70c81115ba6c470f8264746b57be663d81f7e54593fb328a548da00c5e52438af75d923a3c6c5d3997097bd76cf1856b99f0f921f36e5151da SHA512 94b4903d628bf7aacd712a2bf566b53161880bf28311611106776df222222f592edb212d491f02e4c1b0c60d88e4b4a126981d445d1e18018238ff993c6c3092
34 DIST wine-3.5.tar.xz 19963436 BLAKE2B 83d7c0719a088f8c705f7a9d8a6df6b9ee5e0a5ffa57c0a921875097be29298bebb9025222039432c65da32359e187a93413e04a5bb73171f0033911595baf9f SHA512 c1e36f3db862fdedd00c3ac20c84c6eb799b53fe32e959b481a6168baf7d9725ed9bd0a97e7f9b651e3ccfba4f8fb623445369be03fde5010ed0fcb0a53e7d3f
35 DIST wine-3.6.tar.xz 20005240 BLAKE2B 6dd48180b9aed8a3b69c40b3ed7b2ff5adbebfb591860dda6603d2219f9059bc069df000cd2614c80d34911c451388f0124af3dd8a11b806b227ca8e16659d71 SHA512 31d24cc78734bdb743afcec7df05b641ab0625568361401eaf8cd5e217719c8c51a0ef7ed737a560fe42cb9ecd88f10d35e62a98d9df69b966502a5b0dab5a22
36 DIST wine-3.7.tar.xz 20454036 BLAKE2B 04ac94d5679377c5d0bb37a6d3e8e3ec7c09faa300f8422a09a22b14ef4244d2bb14c80a47cfca5e11526506a8064f0cfa4e28868d7f04669f85ab743dbbb36d SHA512 a699418574dd8f407c064421cf6cdfe3923562c8adf9a7749e716f3853291eab05358ea64f0217c303c26c0f8f59d2116024b7b6978f9a52a055147e689a8694
37
38 diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.20.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.20.ebuild
39 deleted file mode 100644
40 index 40d354c58c0..00000000000
41 --- a/app-emulation/wine-vanilla/wine-vanilla-2.20.ebuild
42 +++ /dev/null
43 @@ -1,525 +0,0 @@
44 -# Copyright 1999-2018 Gentoo Foundation
45 -# Distributed under the terms of the GNU General Public License v2
46 -
47 -EAPI=6
48 -
49 -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"
50 -PLOCALE_BACKUP="en"
51 -
52 -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
53 -
54 -MY_PN="${PN%%-*}"
55 -MY_P="${MY_PN}-${PV}"
56 -
57 -if [[ ${PV} == "9999" ]] ; then
58 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
59 - EGIT_BRANCH="master"
60 - inherit git-r3
61 - SRC_URI=""
62 - #KEYWORDS=""
63 -else
64 - MAJOR_V=$(get_version_component_range 1)
65 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
66 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
67 -fi
68 -S="${WORKDIR}/${MY_P}"
69 -
70 -GWP_V="20180120"
71 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
72 -
73 -DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
74 -HOMEPAGE="https://www.winehq.org/"
75 -SRC_URI="${SRC_URI}
76 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
77 -"
78 -
79 -LICENSE="LGPL-2.1"
80 -SLOT="${PV}"
81 -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"
82 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
83 - X? ( truetype )
84 - elibc_glibc? ( threads )
85 - osmesa? ( opengl )
86 - test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124
87 -
88 -# FIXME: the test suite is unsuitable for us; many tests require net access
89 -# or fail due to Xvfb's opengl limitations.
90 -RESTRICT="test"
91 -
92 -COMMON_DEPEND="
93 - X? (
94 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
95 - x11-libs/libXext[${MULTILIB_USEDEP}]
96 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
97 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
98 - x11-libs/libXi[${MULTILIB_USEDEP}]
99 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
100 - )
101 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
102 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
103 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
104 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
105 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
106 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
107 - gstreamer? (
108 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
109 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
110 - )
111 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
112 - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
113 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
114 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
115 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
116 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
117 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
118 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
119 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
120 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
121 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
122 - opengl? (
123 - virtual/glu[${MULTILIB_USEDEP}]
124 - virtual/opengl[${MULTILIB_USEDEP}]
125 - )
126 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
127 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
128 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
129 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
130 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
131 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
132 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
133 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
134 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
135 - v4l? ( media-libs/libv4l[${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.7.1 )
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}-1.5.26-winegcc.patch" #260726
180 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
181 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
182 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
183 - "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
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 "WINE_COMMIT"
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_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
314 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
315 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
316 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
317 - MY_MANDIR="${MY_DATADIR}/man"
318 -}
319 -
320 -src_unpack() {
321 - if [[ ${PV} == "9999" ]] ; then
322 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
323 - fi
324 -
325 - default
326 -
327 - l10n_find_plocales_changes "${S}/po" "" ".po"
328 -}
329 -
330 -src_prepare() {
331 -
332 - eapply_bin(){
333 - local patch
334 - for patch in ${PATCHES_BIN[@]}; do
335 - patchbin --nogit < "${patch}" || die
336 - done
337 - }
338 -
339 - local md5="$(md5sum server/protocol.def)"
340 -
341 - default
342 - eapply_bin
343 - eautoreconf
344 -
345 - # Modification of the server protocol requires regenerating the server requests
346 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
347 - einfo "server/protocol.def was patched; running tools/make_requests"
348 - tools/make_requests || die #432348
349 - fi
350 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
351 - if ! use run-exes; then
352 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
353 - fi
354 -
355 - # Edit wine.desktop to work for specific variant
356 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
357 -
358 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
359 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
360 -
361 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
362 -
363 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
364 - # Requires wine-2.0-rearrange-manpages.patch
365 -
366 - # Duplicate manpages input files for wine64
367 - local f
368 - for f in loader/*.man.in; do
369 - cp ${f} ${f/wine/wine64} || die
370 - done
371 - # Add wine64 manpages to Makefile
372 - if use abi_x86_64; then
373 - sed -i "/wine.man.in/i \
374 - \\\twine64.man.in \\\\" loader/Makefile.in || die
375 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
376 -\164\2/' loader/Makefile.in || die
377 - fi
378 -
379 - rm_man_file(){
380 - local file="${1}"
381 - loc=${2}
382 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
383 - }
384 -
385 - while read f; do
386 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
387 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
388 -}
389 -
390 -src_configure() {
391 - wine_compiler_check || die
392 -
393 - export LDCONFIG=/bin/true
394 - use custom-cflags || strip-flags
395 -
396 - multilib-minimal_src_configure
397 -}
398 -
399 -multilib_src_configure() {
400 - local myconf=(
401 - --prefix="${MY_PREFIX}"
402 - --datarootdir="${MY_DATAROOTDIR}"
403 - --datadir="${MY_DATADIR}"
404 - --docdir="${MY_DOCDIR}"
405 - --includedir="${MY_INCLUDEDIR}"
406 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
407 - --libexecdir="${MY_LIBEXECDIR}"
408 - --localstatedir="${MY_LOCALSTATEDIR}"
409 - --mandir="${MY_MANDIR}"
410 - --sysconfdir=/etc/wine
411 - $(use_with alsa)
412 - $(use_with capi)
413 - $(use_with lcms cms)
414 - $(use_with cups)
415 - $(use_with ncurses curses)
416 - $(use_with udisks dbus)
417 - $(use_with fontconfig)
418 - $(use_with ssl gnutls)
419 - $(use_enable gecko mshtml)
420 - $(use_with gphoto2 gphoto)
421 - $(use_with gsm)
422 - $(use_with gstreamer)
423 - --without-hal
424 - $(use_with jpeg)
425 - $(use_with kerberos krb5)
426 - $(use_with ldap)
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_enable test tests)
442 - $(use_with truetype freetype)
443 - $(use_with udev)
444 - $(use_with v4l)
445 - $(use_with X x)
446 - $(use_with X xfixes)
447 - $(use_with xcomposite)
448 - $(use_with xinerama)
449 - $(use_with xml)
450 - $(use_with xml xslt)
451 - )
452 -
453 - local PKG_CONFIG AR RANLIB
454 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
455 - # set AR and RANLIB to make QA scripts happy; #483342
456 - tc-export PKG_CONFIG AR RANLIB
457 -
458 - if use amd64; then
459 - if [[ ${ABI} == amd64 ]]; then
460 - myconf+=( --enable-win64 )
461 - else
462 - myconf+=( --disable-win64 )
463 - fi
464 -
465 - # Note: using --with-wine64 results in problems with multilib.eclass
466 - # CC/LD hackery. We're using separate tools instead.
467 - fi
468 -
469 - ECONF_SOURCE=${S} \
470 - econf "${myconf[@]}"
471 - emake depend
472 -}
473 -
474 -multilib_src_test() {
475 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
476 - if [[ ${ABI} == x86 ]]; then
477 - if [[ $(id -u) == 0 ]]; then
478 - ewarn "Skipping tests since they cannot be run under the root user."
479 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
480 - return
481 - fi
482 -
483 - WINEPREFIX="${T}/.wine-${ABI}" \
484 - Xemake test
485 - fi
486 -}
487 -
488 -multilib_src_install_all() {
489 - local DOCS=( ANNOUNCE AUTHORS README )
490 - add_locale_docs() {
491 - local locale_doc="documentation/README.$1"
492 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
493 - }
494 - l10n_for_each_locale_do add_locale_docs
495 -
496 - einstalldocs
497 - prune_libtool_files --all
498 -
499 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
500 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
501 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
502 - fi
503 -
504 - # Remove wineconsole if neither backend is installed #551124
505 - if ! use X && ! use ncurses; then
506 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
507 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
508 - rm_wineconsole() {
509 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
510 - }
511 - multilib_foreach_abi rm_wineconsole
512 - fi
513 -
514 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
515 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
516 -
517 - if use abi_x86_64 && ! use abi_x86_32; then
518 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
519 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
520 - fi
521 -
522 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
523 - eshopts_push -s failglob #615218
524 - # Make wrappers for binaries for handling multiple variants
525 - # Note: wrappers instead of symlinks because some are shell which use basename
526 - local b
527 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
528 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
529 - done
530 - eshopts_pop
531 -}
532 -
533 -pkg_postinst() {
534 - eselect wine register ${P}
535 - if [[ ${PN} == "wine-vanilla" ]]; then
536 - eselect wine register --vanilla ${P} || die
537 - fi
538 -
539 - eselect wine update --all --if-unset || die
540 -
541 - xdg_desktop_database_update
542 -
543 - if ! use gecko; then
544 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
545 - ewarn "implementation of iexplore. Many older windows applications"
546 - ewarn "rely upon the existence of an iexplore implementation, so"
547 - ewarn "you will likely need to install an external one, like via winetricks"
548 - fi
549 - if ! use mono; then
550 - ewarn "Without Wine Mono, wine prefixes will not have a default"
551 - ewarn "implementation of .NET. Many windows applications rely upon"
552 - ewarn "the existence of a .NET implementation, so you will likely need"
553 - ewarn "to install an external one, like via winetricks"
554 - fi
555 -}
556 -
557 -pkg_prerm() {
558 - eselect wine deregister ${P}
559 - if [[ ${PN} == "wine-vanilla" ]]; then
560 - eselect wine deregister --vanilla ${P} || die
561 - fi
562 -
563 - eselect wine update --all --if-unset || die
564 -}
565 -
566 -pkg_postrm() {
567 - xdg_desktop_database_update
568 -}
569
570 diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.21.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.21.ebuild
571 deleted file mode 100644
572 index 40d354c58c0..00000000000
573 --- a/app-emulation/wine-vanilla/wine-vanilla-2.21.ebuild
574 +++ /dev/null
575 @@ -1,525 +0,0 @@
576 -# Copyright 1999-2018 Gentoo Foundation
577 -# Distributed under the terms of the GNU General Public License v2
578 -
579 -EAPI=6
580 -
581 -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"
582 -PLOCALE_BACKUP="en"
583 -
584 -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
585 -
586 -MY_PN="${PN%%-*}"
587 -MY_P="${MY_PN}-${PV}"
588 -
589 -if [[ ${PV} == "9999" ]] ; then
590 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
591 - EGIT_BRANCH="master"
592 - inherit git-r3
593 - SRC_URI=""
594 - #KEYWORDS=""
595 -else
596 - MAJOR_V=$(get_version_component_range 1)
597 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
598 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
599 -fi
600 -S="${WORKDIR}/${MY_P}"
601 -
602 -GWP_V="20180120"
603 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
604 -
605 -DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
606 -HOMEPAGE="https://www.winehq.org/"
607 -SRC_URI="${SRC_URI}
608 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
609 -"
610 -
611 -LICENSE="LGPL-2.1"
612 -SLOT="${PV}"
613 -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"
614 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
615 - X? ( truetype )
616 - elibc_glibc? ( threads )
617 - osmesa? ( opengl )
618 - test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124
619 -
620 -# FIXME: the test suite is unsuitable for us; many tests require net access
621 -# or fail due to Xvfb's opengl limitations.
622 -RESTRICT="test"
623 -
624 -COMMON_DEPEND="
625 - X? (
626 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
627 - x11-libs/libXext[${MULTILIB_USEDEP}]
628 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
629 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
630 - x11-libs/libXi[${MULTILIB_USEDEP}]
631 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
632 - )
633 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
634 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
635 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
636 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
637 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
638 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
639 - gstreamer? (
640 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
641 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
642 - )
643 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
644 - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
645 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
646 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
647 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
648 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
649 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
650 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
651 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
652 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
653 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
654 - opengl? (
655 - virtual/glu[${MULTILIB_USEDEP}]
656 - virtual/opengl[${MULTILIB_USEDEP}]
657 - )
658 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
659 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
660 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
661 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
662 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
663 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
664 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
665 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
666 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
667 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
668 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
669 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
670 - xml? (
671 - dev-libs/libxml2[${MULTILIB_USEDEP}]
672 - dev-libs/libxslt[${MULTILIB_USEDEP}]
673 - )"
674 -
675 -RDEPEND="${COMMON_DEPEND}
676 - app-emulation/wine-desktop-common
677 - >app-eselect/eselect-wine-0.3
678 - !app-emulation/wine:0
679 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
680 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
681 - mono? ( app-emulation/wine-mono:4.7.1 )
682 - perl? (
683 - dev-lang/perl
684 - dev-perl/XML-Simple
685 - )
686 - pulseaudio? (
687 - realtime? ( sys-auth/rtkit )
688 - )
689 - samba? ( >=net-fs/samba-3.0.25[winbind] )
690 - selinux? ( sec-policy/selinux-wine )
691 - udisks? ( sys-fs/udisks:2 )"
692 -
693 -# tools/make_requests requires perl
694 -DEPEND="${COMMON_DEPEND}
695 - sys-devel/flex
696 - >=sys-kernel/linux-headers-2.6
697 - virtual/pkgconfig
698 - virtual/yacc
699 - X? ( x11-base/xorg-proto )
700 - prelink? ( sys-devel/prelink )
701 - xinerama? ( x11-base/xorg-proto )"
702 -
703 -# These use a non-standard "Wine" category, which is provided by
704 -# /etc/xdg/applications-merged/wine.menu
705 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
706 -usr/share/applications/wine-notepad.desktop
707 -usr/share/applications/wine-uninstaller.desktop
708 -usr/share/applications/wine-winecfg.desktop"
709 -
710 -PATCHES=(
711 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
712 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
713 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
714 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
715 - "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
716 -)
717 -PATCHES_BIN=()
718 -
719 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
720 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
721 - DEPEND+=" dev-util/patchbin"
722 -fi
723 -
724 -wine_compiler_check() {
725 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
726 -
727 - # GCC-specific bugs
728 - if tc-is-gcc; then
729 - # bug #549768
730 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
731 - ebegin "Checking for gcc-5 ms_abi compiler bug"
732 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
733 - # Run in subshell to prevent "Aborted" message
734 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
735 - if ! eend $?; then
736 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
737 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
738 - eerror "or use gcc-config to select a different compiler version."
739 - eerror "See https://bugs.gentoo.org/549768"
740 - eerror
741 - return 1
742 - fi
743 - fi
744 - # bug #574044
745 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
746 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
747 - # Compile in subshell to prevent "Aborted" message
748 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
749 - if ! eend $?; then
750 - eerror "Wine cannot be built with this version of gcc-5.3"
751 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
752 - eerror "or use gcc-config to select a different compiler version."
753 - eerror "See https://bugs.gentoo.org/574044"
754 - eerror
755 - return 1
756 - fi
757 - fi
758 - fi
759 -
760 - # Ensure compiler support
761 - if use abi_x86_64; then
762 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
763 - # Compile in subshell to prevent "Aborted" message
764 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
765 - if ! eend $?; then
766 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
767 - eerror
768 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
769 - eerror
770 - return 1
771 - fi
772 - fi
773 -}
774 -
775 -wine_build_environment_check() {
776 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
777 -
778 - if use abi_x86_64; then
779 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
780 - eerror "You need gcc-4.4+ to compile 64-bit wine"
781 - die
782 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
783 - eerror "You need clang-3.8+ to compile 64-bit wine"
784 - die
785 - fi
786 - fi
787 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
788 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
789 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
790 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
791 - fi
792 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
793 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
794 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
795 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
796 - ewarn "See package.env in man 5 portage for more information on how to do this."
797 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
798 - fi
799 - fi
800 -
801 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
802 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
803 - eerror "See https://bugs.gentoo.org/487864 for more details."
804 - eerror
805 - return 1
806 - fi
807 -}
808 -
809 -wine_env_vcs_vars() {
810 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
811 - local pn_live_val="${pn_live_var}"
812 - eval pn_live_val='$'${pn_live_val}
813 - if [[ ! -z ${EGIT_COMMIT} ]]; then
814 - eerror "Commits must now be specified using the environmental variables"
815 - eerror "WINE_COMMIT"
816 - eerror
817 - return 1
818 - fi
819 -}
820 -
821 -pkg_pretend() {
822 - wine_build_environment_check || die
823 -
824 - # Verify OSS support
825 - if use oss && ! use kernel_FreeBSD; then
826 - if ! has_version ">=media-sound/oss-4"; then
827 - eerror "You cannot build wine with USE=oss without having support from a"
828 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
829 - eerror
830 - die
831 - fi
832 - fi
833 -}
834 -
835 -pkg_setup() {
836 - wine_build_environment_check || die
837 - wine_env_vcs_vars || die
838 -
839 - WINE_VARIANT="${PN#wine}-${PV}"
840 - WINE_VARIANT="${WINE_VARIANT#-}"
841 -
842 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
843 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
844 - MY_DATADIR="${MY_DATAROOTDIR}"
845 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
846 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
847 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
848 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
849 - MY_MANDIR="${MY_DATADIR}/man"
850 -}
851 -
852 -src_unpack() {
853 - if [[ ${PV} == "9999" ]] ; then
854 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
855 - fi
856 -
857 - default
858 -
859 - l10n_find_plocales_changes "${S}/po" "" ".po"
860 -}
861 -
862 -src_prepare() {
863 -
864 - eapply_bin(){
865 - local patch
866 - for patch in ${PATCHES_BIN[@]}; do
867 - patchbin --nogit < "${patch}" || die
868 - done
869 - }
870 -
871 - local md5="$(md5sum server/protocol.def)"
872 -
873 - default
874 - eapply_bin
875 - eautoreconf
876 -
877 - # Modification of the server protocol requires regenerating the server requests
878 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
879 - einfo "server/protocol.def was patched; running tools/make_requests"
880 - tools/make_requests || die #432348
881 - fi
882 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
883 - if ! use run-exes; then
884 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
885 - fi
886 -
887 - # Edit wine.desktop to work for specific variant
888 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
889 -
890 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
891 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
892 -
893 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
894 -
895 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
896 - # Requires wine-2.0-rearrange-manpages.patch
897 -
898 - # Duplicate manpages input files for wine64
899 - local f
900 - for f in loader/*.man.in; do
901 - cp ${f} ${f/wine/wine64} || die
902 - done
903 - # Add wine64 manpages to Makefile
904 - if use abi_x86_64; then
905 - sed -i "/wine.man.in/i \
906 - \\\twine64.man.in \\\\" loader/Makefile.in || die
907 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
908 -\164\2/' loader/Makefile.in || die
909 - fi
910 -
911 - rm_man_file(){
912 - local file="${1}"
913 - loc=${2}
914 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
915 - }
916 -
917 - while read f; do
918 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
919 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
920 -}
921 -
922 -src_configure() {
923 - wine_compiler_check || die
924 -
925 - export LDCONFIG=/bin/true
926 - use custom-cflags || strip-flags
927 -
928 - multilib-minimal_src_configure
929 -}
930 -
931 -multilib_src_configure() {
932 - local myconf=(
933 - --prefix="${MY_PREFIX}"
934 - --datarootdir="${MY_DATAROOTDIR}"
935 - --datadir="${MY_DATADIR}"
936 - --docdir="${MY_DOCDIR}"
937 - --includedir="${MY_INCLUDEDIR}"
938 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
939 - --libexecdir="${MY_LIBEXECDIR}"
940 - --localstatedir="${MY_LOCALSTATEDIR}"
941 - --mandir="${MY_MANDIR}"
942 - --sysconfdir=/etc/wine
943 - $(use_with alsa)
944 - $(use_with capi)
945 - $(use_with lcms cms)
946 - $(use_with cups)
947 - $(use_with ncurses curses)
948 - $(use_with udisks dbus)
949 - $(use_with fontconfig)
950 - $(use_with ssl gnutls)
951 - $(use_enable gecko mshtml)
952 - $(use_with gphoto2 gphoto)
953 - $(use_with gsm)
954 - $(use_with gstreamer)
955 - --without-hal
956 - $(use_with jpeg)
957 - $(use_with kerberos krb5)
958 - $(use_with ldap)
959 - $(use_enable mono mscoree)
960 - $(use_with mp3 mpg123)
961 - $(use_with netapi)
962 - $(use_with nls gettext)
963 - $(use_with openal)
964 - $(use_with opencl)
965 - $(use_with opengl)
966 - $(use_with osmesa)
967 - $(use_with oss)
968 - $(use_with pcap)
969 - $(use_with png)
970 - $(use_with pulseaudio pulse)
971 - $(use_with threads pthread)
972 - $(use_with scanner sane)
973 - $(use_enable test tests)
974 - $(use_with truetype freetype)
975 - $(use_with udev)
976 - $(use_with v4l)
977 - $(use_with X x)
978 - $(use_with X xfixes)
979 - $(use_with xcomposite)
980 - $(use_with xinerama)
981 - $(use_with xml)
982 - $(use_with xml xslt)
983 - )
984 -
985 - local PKG_CONFIG AR RANLIB
986 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
987 - # set AR and RANLIB to make QA scripts happy; #483342
988 - tc-export PKG_CONFIG AR RANLIB
989 -
990 - if use amd64; then
991 - if [[ ${ABI} == amd64 ]]; then
992 - myconf+=( --enable-win64 )
993 - else
994 - myconf+=( --disable-win64 )
995 - fi
996 -
997 - # Note: using --with-wine64 results in problems with multilib.eclass
998 - # CC/LD hackery. We're using separate tools instead.
999 - fi
1000 -
1001 - ECONF_SOURCE=${S} \
1002 - econf "${myconf[@]}"
1003 - emake depend
1004 -}
1005 -
1006 -multilib_src_test() {
1007 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
1008 - if [[ ${ABI} == x86 ]]; then
1009 - if [[ $(id -u) == 0 ]]; then
1010 - ewarn "Skipping tests since they cannot be run under the root user."
1011 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
1012 - return
1013 - fi
1014 -
1015 - WINEPREFIX="${T}/.wine-${ABI}" \
1016 - Xemake test
1017 - fi
1018 -}
1019 -
1020 -multilib_src_install_all() {
1021 - local DOCS=( ANNOUNCE AUTHORS README )
1022 - add_locale_docs() {
1023 - local locale_doc="documentation/README.$1"
1024 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
1025 - }
1026 - l10n_for_each_locale_do add_locale_docs
1027 -
1028 - einstalldocs
1029 - prune_libtool_files --all
1030 -
1031 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
1032 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
1033 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
1034 - fi
1035 -
1036 - # Remove wineconsole if neither backend is installed #551124
1037 - if ! use X && ! use ncurses; then
1038 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
1039 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
1040 - rm_wineconsole() {
1041 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
1042 - }
1043 - multilib_foreach_abi rm_wineconsole
1044 - fi
1045 -
1046 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
1047 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
1048 -
1049 - if use abi_x86_64 && ! use abi_x86_32; then
1050 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
1051 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
1052 - fi
1053 -
1054 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
1055 - eshopts_push -s failglob #615218
1056 - # Make wrappers for binaries for handling multiple variants
1057 - # Note: wrappers instead of symlinks because some are shell which use basename
1058 - local b
1059 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
1060 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
1061 - done
1062 - eshopts_pop
1063 -}
1064 -
1065 -pkg_postinst() {
1066 - eselect wine register ${P}
1067 - if [[ ${PN} == "wine-vanilla" ]]; then
1068 - eselect wine register --vanilla ${P} || die
1069 - fi
1070 -
1071 - eselect wine update --all --if-unset || die
1072 -
1073 - xdg_desktop_database_update
1074 -
1075 - if ! use gecko; then
1076 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
1077 - ewarn "implementation of iexplore. Many older windows applications"
1078 - ewarn "rely upon the existence of an iexplore implementation, so"
1079 - ewarn "you will likely need to install an external one, like via winetricks"
1080 - fi
1081 - if ! use mono; then
1082 - ewarn "Without Wine Mono, wine prefixes will not have a default"
1083 - ewarn "implementation of .NET. Many windows applications rely upon"
1084 - ewarn "the existence of a .NET implementation, so you will likely need"
1085 - ewarn "to install an external one, like via winetricks"
1086 - fi
1087 -}
1088 -
1089 -pkg_prerm() {
1090 - eselect wine deregister ${P}
1091 - if [[ ${PN} == "wine-vanilla" ]]; then
1092 - eselect wine deregister --vanilla ${P} || die
1093 - fi
1094 -
1095 - eselect wine update --all --if-unset || die
1096 -}
1097 -
1098 -pkg_postrm() {
1099 - xdg_desktop_database_update
1100 -}
1101
1102 diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.22.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.22.ebuild
1103 deleted file mode 100644
1104 index 40d354c58c0..00000000000
1105 --- a/app-emulation/wine-vanilla/wine-vanilla-2.22.ebuild
1106 +++ /dev/null
1107 @@ -1,525 +0,0 @@
1108 -# Copyright 1999-2018 Gentoo Foundation
1109 -# Distributed under the terms of the GNU General Public License v2
1110 -
1111 -EAPI=6
1112 -
1113 -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"
1114 -PLOCALE_BACKUP="en"
1115 -
1116 -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
1117 -
1118 -MY_PN="${PN%%-*}"
1119 -MY_P="${MY_PN}-${PV}"
1120 -
1121 -if [[ ${PV} == "9999" ]] ; then
1122 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1123 - EGIT_BRANCH="master"
1124 - inherit git-r3
1125 - SRC_URI=""
1126 - #KEYWORDS=""
1127 -else
1128 - MAJOR_V=$(get_version_component_range 1)
1129 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
1130 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
1131 -fi
1132 -S="${WORKDIR}/${MY_P}"
1133 -
1134 -GWP_V="20180120"
1135 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1136 -
1137 -DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
1138 -HOMEPAGE="https://www.winehq.org/"
1139 -SRC_URI="${SRC_URI}
1140 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1141 -"
1142 -
1143 -LICENSE="LGPL-2.1"
1144 -SLOT="${PV}"
1145 -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"
1146 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
1147 - X? ( truetype )
1148 - elibc_glibc? ( threads )
1149 - osmesa? ( opengl )
1150 - test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124
1151 -
1152 -# FIXME: the test suite is unsuitable for us; many tests require net access
1153 -# or fail due to Xvfb's opengl limitations.
1154 -RESTRICT="test"
1155 -
1156 -COMMON_DEPEND="
1157 - X? (
1158 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
1159 - x11-libs/libXext[${MULTILIB_USEDEP}]
1160 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
1161 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1162 - x11-libs/libXi[${MULTILIB_USEDEP}]
1163 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
1164 - )
1165 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
1166 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
1167 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
1168 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
1169 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
1170 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
1171 - gstreamer? (
1172 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
1173 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
1174 - )
1175 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
1176 - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
1177 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
1178 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
1179 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
1180 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
1181 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
1182 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
1183 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
1184 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
1185 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
1186 - opengl? (
1187 - virtual/glu[${MULTILIB_USEDEP}]
1188 - virtual/opengl[${MULTILIB_USEDEP}]
1189 - )
1190 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
1191 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
1192 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
1193 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
1194 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
1195 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
1196 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
1197 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
1198 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
1199 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
1200 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
1201 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
1202 - xml? (
1203 - dev-libs/libxml2[${MULTILIB_USEDEP}]
1204 - dev-libs/libxslt[${MULTILIB_USEDEP}]
1205 - )"
1206 -
1207 -RDEPEND="${COMMON_DEPEND}
1208 - app-emulation/wine-desktop-common
1209 - >app-eselect/eselect-wine-0.3
1210 - !app-emulation/wine:0
1211 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
1212 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
1213 - mono? ( app-emulation/wine-mono:4.7.1 )
1214 - perl? (
1215 - dev-lang/perl
1216 - dev-perl/XML-Simple
1217 - )
1218 - pulseaudio? (
1219 - realtime? ( sys-auth/rtkit )
1220 - )
1221 - samba? ( >=net-fs/samba-3.0.25[winbind] )
1222 - selinux? ( sec-policy/selinux-wine )
1223 - udisks? ( sys-fs/udisks:2 )"
1224 -
1225 -# tools/make_requests requires perl
1226 -DEPEND="${COMMON_DEPEND}
1227 - sys-devel/flex
1228 - >=sys-kernel/linux-headers-2.6
1229 - virtual/pkgconfig
1230 - virtual/yacc
1231 - X? ( x11-base/xorg-proto )
1232 - prelink? ( sys-devel/prelink )
1233 - xinerama? ( x11-base/xorg-proto )"
1234 -
1235 -# These use a non-standard "Wine" category, which is provided by
1236 -# /etc/xdg/applications-merged/wine.menu
1237 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
1238 -usr/share/applications/wine-notepad.desktop
1239 -usr/share/applications/wine-uninstaller.desktop
1240 -usr/share/applications/wine-winecfg.desktop"
1241 -
1242 -PATCHES=(
1243 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1244 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1245 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1246 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
1247 - "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
1248 -)
1249 -PATCHES_BIN=()
1250 -
1251 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
1252 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
1253 - DEPEND+=" dev-util/patchbin"
1254 -fi
1255 -
1256 -wine_compiler_check() {
1257 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
1258 -
1259 - # GCC-specific bugs
1260 - if tc-is-gcc; then
1261 - # bug #549768
1262 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1263 - ebegin "Checking for gcc-5 ms_abi compiler bug"
1264 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1265 - # Run in subshell to prevent "Aborted" message
1266 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1267 - if ! eend $?; then
1268 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
1269 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
1270 - eerror "or use gcc-config to select a different compiler version."
1271 - eerror "See https://bugs.gentoo.org/549768"
1272 - eerror
1273 - return 1
1274 - fi
1275 - fi
1276 - # bug #574044
1277 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1278 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1279 - # Compile in subshell to prevent "Aborted" message
1280 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1281 - if ! eend $?; then
1282 - eerror "Wine cannot be built with this version of gcc-5.3"
1283 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1284 - eerror "or use gcc-config to select a different compiler version."
1285 - eerror "See https://bugs.gentoo.org/574044"
1286 - eerror
1287 - return 1
1288 - fi
1289 - fi
1290 - fi
1291 -
1292 - # Ensure compiler support
1293 - if use abi_x86_64; then
1294 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1295 - # Compile in subshell to prevent "Aborted" message
1296 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1297 - if ! eend $?; then
1298 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1299 - eerror
1300 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
1301 - eerror
1302 - return 1
1303 - fi
1304 - fi
1305 -}
1306 -
1307 -wine_build_environment_check() {
1308 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
1309 -
1310 - if use abi_x86_64; then
1311 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
1312 - eerror "You need gcc-4.4+ to compile 64-bit wine"
1313 - die
1314 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
1315 - eerror "You need clang-3.8+ to compile 64-bit wine"
1316 - die
1317 - fi
1318 - fi
1319 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
1320 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
1321 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
1322 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
1323 - fi
1324 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
1325 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
1326 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
1327 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
1328 - ewarn "See package.env in man 5 portage for more information on how to do this."
1329 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
1330 - fi
1331 - fi
1332 -
1333 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
1334 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
1335 - eerror "See https://bugs.gentoo.org/487864 for more details."
1336 - eerror
1337 - return 1
1338 - fi
1339 -}
1340 -
1341 -wine_env_vcs_vars() {
1342 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
1343 - local pn_live_val="${pn_live_var}"
1344 - eval pn_live_val='$'${pn_live_val}
1345 - if [[ ! -z ${EGIT_COMMIT} ]]; then
1346 - eerror "Commits must now be specified using the environmental variables"
1347 - eerror "WINE_COMMIT"
1348 - eerror
1349 - return 1
1350 - fi
1351 -}
1352 -
1353 -pkg_pretend() {
1354 - wine_build_environment_check || die
1355 -
1356 - # Verify OSS support
1357 - if use oss && ! use kernel_FreeBSD; then
1358 - if ! has_version ">=media-sound/oss-4"; then
1359 - eerror "You cannot build wine with USE=oss without having support from a"
1360 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
1361 - eerror
1362 - die
1363 - fi
1364 - fi
1365 -}
1366 -
1367 -pkg_setup() {
1368 - wine_build_environment_check || die
1369 - wine_env_vcs_vars || die
1370 -
1371 - WINE_VARIANT="${PN#wine}-${PV}"
1372 - WINE_VARIANT="${WINE_VARIANT#-}"
1373 -
1374 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
1375 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
1376 - MY_DATADIR="${MY_DATAROOTDIR}"
1377 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
1378 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
1379 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
1380 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
1381 - MY_MANDIR="${MY_DATADIR}/man"
1382 -}
1383 -
1384 -src_unpack() {
1385 - if [[ ${PV} == "9999" ]] ; then
1386 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
1387 - fi
1388 -
1389 - default
1390 -
1391 - l10n_find_plocales_changes "${S}/po" "" ".po"
1392 -}
1393 -
1394 -src_prepare() {
1395 -
1396 - eapply_bin(){
1397 - local patch
1398 - for patch in ${PATCHES_BIN[@]}; do
1399 - patchbin --nogit < "${patch}" || die
1400 - done
1401 - }
1402 -
1403 - local md5="$(md5sum server/protocol.def)"
1404 -
1405 - default
1406 - eapply_bin
1407 - eautoreconf
1408 -
1409 - # Modification of the server protocol requires regenerating the server requests
1410 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
1411 - einfo "server/protocol.def was patched; running tools/make_requests"
1412 - tools/make_requests || die #432348
1413 - fi
1414 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
1415 - if ! use run-exes; then
1416 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
1417 - fi
1418 -
1419 - # Edit wine.desktop to work for specific variant
1420 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1421 -
1422 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1423 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1424 -
1425 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1426 -
1427 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
1428 - # Requires wine-2.0-rearrange-manpages.patch
1429 -
1430 - # Duplicate manpages input files for wine64
1431 - local f
1432 - for f in loader/*.man.in; do
1433 - cp ${f} ${f/wine/wine64} || die
1434 - done
1435 - # Add wine64 manpages to Makefile
1436 - if use abi_x86_64; then
1437 - sed -i "/wine.man.in/i \
1438 - \\\twine64.man.in \\\\" loader/Makefile.in || die
1439 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
1440 -\164\2/' loader/Makefile.in || die
1441 - fi
1442 -
1443 - rm_man_file(){
1444 - local file="${1}"
1445 - loc=${2}
1446 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
1447 - }
1448 -
1449 - while read f; do
1450 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
1451 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
1452 -}
1453 -
1454 -src_configure() {
1455 - wine_compiler_check || die
1456 -
1457 - export LDCONFIG=/bin/true
1458 - use custom-cflags || strip-flags
1459 -
1460 - multilib-minimal_src_configure
1461 -}
1462 -
1463 -multilib_src_configure() {
1464 - local myconf=(
1465 - --prefix="${MY_PREFIX}"
1466 - --datarootdir="${MY_DATAROOTDIR}"
1467 - --datadir="${MY_DATADIR}"
1468 - --docdir="${MY_DOCDIR}"
1469 - --includedir="${MY_INCLUDEDIR}"
1470 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
1471 - --libexecdir="${MY_LIBEXECDIR}"
1472 - --localstatedir="${MY_LOCALSTATEDIR}"
1473 - --mandir="${MY_MANDIR}"
1474 - --sysconfdir=/etc/wine
1475 - $(use_with alsa)
1476 - $(use_with capi)
1477 - $(use_with lcms cms)
1478 - $(use_with cups)
1479 - $(use_with ncurses curses)
1480 - $(use_with udisks dbus)
1481 - $(use_with fontconfig)
1482 - $(use_with ssl gnutls)
1483 - $(use_enable gecko mshtml)
1484 - $(use_with gphoto2 gphoto)
1485 - $(use_with gsm)
1486 - $(use_with gstreamer)
1487 - --without-hal
1488 - $(use_with jpeg)
1489 - $(use_with kerberos krb5)
1490 - $(use_with ldap)
1491 - $(use_enable mono mscoree)
1492 - $(use_with mp3 mpg123)
1493 - $(use_with netapi)
1494 - $(use_with nls gettext)
1495 - $(use_with openal)
1496 - $(use_with opencl)
1497 - $(use_with opengl)
1498 - $(use_with osmesa)
1499 - $(use_with oss)
1500 - $(use_with pcap)
1501 - $(use_with png)
1502 - $(use_with pulseaudio pulse)
1503 - $(use_with threads pthread)
1504 - $(use_with scanner sane)
1505 - $(use_enable test tests)
1506 - $(use_with truetype freetype)
1507 - $(use_with udev)
1508 - $(use_with v4l)
1509 - $(use_with X x)
1510 - $(use_with X xfixes)
1511 - $(use_with xcomposite)
1512 - $(use_with xinerama)
1513 - $(use_with xml)
1514 - $(use_with xml xslt)
1515 - )
1516 -
1517 - local PKG_CONFIG AR RANLIB
1518 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
1519 - # set AR and RANLIB to make QA scripts happy; #483342
1520 - tc-export PKG_CONFIG AR RANLIB
1521 -
1522 - if use amd64; then
1523 - if [[ ${ABI} == amd64 ]]; then
1524 - myconf+=( --enable-win64 )
1525 - else
1526 - myconf+=( --disable-win64 )
1527 - fi
1528 -
1529 - # Note: using --with-wine64 results in problems with multilib.eclass
1530 - # CC/LD hackery. We're using separate tools instead.
1531 - fi
1532 -
1533 - ECONF_SOURCE=${S} \
1534 - econf "${myconf[@]}"
1535 - emake depend
1536 -}
1537 -
1538 -multilib_src_test() {
1539 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
1540 - if [[ ${ABI} == x86 ]]; then
1541 - if [[ $(id -u) == 0 ]]; then
1542 - ewarn "Skipping tests since they cannot be run under the root user."
1543 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
1544 - return
1545 - fi
1546 -
1547 - WINEPREFIX="${T}/.wine-${ABI}" \
1548 - Xemake test
1549 - fi
1550 -}
1551 -
1552 -multilib_src_install_all() {
1553 - local DOCS=( ANNOUNCE AUTHORS README )
1554 - add_locale_docs() {
1555 - local locale_doc="documentation/README.$1"
1556 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
1557 - }
1558 - l10n_for_each_locale_do add_locale_docs
1559 -
1560 - einstalldocs
1561 - prune_libtool_files --all
1562 -
1563 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
1564 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
1565 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
1566 - fi
1567 -
1568 - # Remove wineconsole if neither backend is installed #551124
1569 - if ! use X && ! use ncurses; then
1570 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
1571 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
1572 - rm_wineconsole() {
1573 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
1574 - }
1575 - multilib_foreach_abi rm_wineconsole
1576 - fi
1577 -
1578 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
1579 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
1580 -
1581 - if use abi_x86_64 && ! use abi_x86_32; then
1582 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
1583 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
1584 - fi
1585 -
1586 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
1587 - eshopts_push -s failglob #615218
1588 - # Make wrappers for binaries for handling multiple variants
1589 - # Note: wrappers instead of symlinks because some are shell which use basename
1590 - local b
1591 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
1592 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
1593 - done
1594 - eshopts_pop
1595 -}
1596 -
1597 -pkg_postinst() {
1598 - eselect wine register ${P}
1599 - if [[ ${PN} == "wine-vanilla" ]]; then
1600 - eselect wine register --vanilla ${P} || die
1601 - fi
1602 -
1603 - eselect wine update --all --if-unset || die
1604 -
1605 - xdg_desktop_database_update
1606 -
1607 - if ! use gecko; then
1608 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
1609 - ewarn "implementation of iexplore. Many older windows applications"
1610 - ewarn "rely upon the existence of an iexplore implementation, so"
1611 - ewarn "you will likely need to install an external one, like via winetricks"
1612 - fi
1613 - if ! use mono; then
1614 - ewarn "Without Wine Mono, wine prefixes will not have a default"
1615 - ewarn "implementation of .NET. Many windows applications rely upon"
1616 - ewarn "the existence of a .NET implementation, so you will likely need"
1617 - ewarn "to install an external one, like via winetricks"
1618 - fi
1619 -}
1620 -
1621 -pkg_prerm() {
1622 - eselect wine deregister ${P}
1623 - if [[ ${PN} == "wine-vanilla" ]]; then
1624 - eselect wine deregister --vanilla ${P} || die
1625 - fi
1626 -
1627 - eselect wine update --all --if-unset || die
1628 -}
1629 -
1630 -pkg_postrm() {
1631 - xdg_desktop_database_update
1632 -}
1633
1634 diff --git a/app-emulation/wine-vanilla/wine-vanilla-3.1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-3.1.ebuild
1635 deleted file mode 100644
1636 index a7cee775064..00000000000
1637 --- a/app-emulation/wine-vanilla/wine-vanilla-3.1.ebuild
1638 +++ /dev/null
1639 @@ -1,527 +0,0 @@
1640 -# Copyright 1999-2018 Gentoo Foundation
1641 -# Distributed under the terms of the GNU General Public License v2
1642 -
1643 -EAPI=6
1644 -
1645 -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"
1646 -PLOCALE_BACKUP="en"
1647 -
1648 -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
1649 -
1650 -MY_PN="${PN%%-*}"
1651 -MY_P="${MY_PN}-${PV}"
1652 -
1653 -if [[ ${PV} == "9999" ]] ; then
1654 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1655 - EGIT_BRANCH="master"
1656 - inherit git-r3
1657 - SRC_URI=""
1658 - #KEYWORDS=""
1659 -else
1660 - MAJOR_V=$(get_version_component_range 1)
1661 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
1662 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
1663 -fi
1664 -S="${WORKDIR}/${MY_P}"
1665 -
1666 -GWP_V="20180120"
1667 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1668 -
1669 -DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
1670 -HOMEPAGE="https://www.winehq.org/"
1671 -SRC_URI="${SRC_URI}
1672 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1673 -"
1674 -
1675 -LICENSE="LGPL-2.1"
1676 -SLOT="${PV}"
1677 -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 selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
1678 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
1679 - X? ( truetype )
1680 - elibc_glibc? ( threads )
1681 - osmesa? ( opengl )
1682 - test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124
1683 -
1684 -# FIXME: the test suite is unsuitable for us; many tests require net access
1685 -# or fail due to Xvfb's opengl limitations.
1686 -RESTRICT="test"
1687 -
1688 -COMMON_DEPEND="
1689 - X? (
1690 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
1691 - x11-libs/libXext[${MULTILIB_USEDEP}]
1692 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
1693 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1694 - x11-libs/libXi[${MULTILIB_USEDEP}]
1695 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
1696 - )
1697 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
1698 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
1699 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
1700 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
1701 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
1702 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
1703 - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
1704 - gstreamer? (
1705 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
1706 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
1707 - )
1708 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
1709 - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
1710 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
1711 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
1712 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
1713 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
1714 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
1715 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
1716 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
1717 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
1718 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
1719 - opengl? (
1720 - virtual/glu[${MULTILIB_USEDEP}]
1721 - virtual/opengl[${MULTILIB_USEDEP}]
1722 - )
1723 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
1724 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
1725 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
1726 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
1727 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
1728 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
1729 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
1730 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
1731 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
1732 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
1733 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
1734 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
1735 - xml? (
1736 - dev-libs/libxml2[${MULTILIB_USEDEP}]
1737 - dev-libs/libxslt[${MULTILIB_USEDEP}]
1738 - )"
1739 -
1740 -RDEPEND="${COMMON_DEPEND}
1741 - app-emulation/wine-desktop-common
1742 - >app-eselect/eselect-wine-0.3
1743 - !app-emulation/wine:0
1744 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
1745 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
1746 - mono? ( app-emulation/wine-mono:4.7.1 )
1747 - perl? (
1748 - dev-lang/perl
1749 - dev-perl/XML-Simple
1750 - )
1751 - pulseaudio? (
1752 - realtime? ( sys-auth/rtkit )
1753 - )
1754 - samba? ( >=net-fs/samba-3.0.25[winbind] )
1755 - selinux? ( sec-policy/selinux-wine )
1756 - udisks? ( sys-fs/udisks:2 )"
1757 -
1758 -# tools/make_requests requires perl
1759 -DEPEND="${COMMON_DEPEND}
1760 - sys-devel/flex
1761 - >=sys-kernel/linux-headers-2.6
1762 - virtual/pkgconfig
1763 - virtual/yacc
1764 - X? ( x11-base/xorg-proto )
1765 - prelink? ( sys-devel/prelink )
1766 - xinerama? ( x11-base/xorg-proto )"
1767 -
1768 -# These use a non-standard "Wine" category, which is provided by
1769 -# /etc/xdg/applications-merged/wine.menu
1770 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
1771 -usr/share/applications/wine-notepad.desktop
1772 -usr/share/applications/wine-uninstaller.desktop
1773 -usr/share/applications/wine-winecfg.desktop"
1774 -
1775 -PATCHES=(
1776 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1777 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1778 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1779 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
1780 - "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
1781 -)
1782 -PATCHES_BIN=()
1783 -
1784 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
1785 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
1786 - DEPEND+=" dev-util/patchbin"
1787 -fi
1788 -
1789 -wine_compiler_check() {
1790 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
1791 -
1792 - # GCC-specific bugs
1793 - if tc-is-gcc; then
1794 - # bug #549768
1795 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1796 - ebegin "Checking for gcc-5 ms_abi compiler bug"
1797 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1798 - # Run in subshell to prevent "Aborted" message
1799 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1800 - if ! eend $?; then
1801 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
1802 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
1803 - eerror "or use gcc-config to select a different compiler version."
1804 - eerror "See https://bugs.gentoo.org/549768"
1805 - eerror
1806 - return 1
1807 - fi
1808 - fi
1809 - # bug #574044
1810 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1811 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1812 - # Compile in subshell to prevent "Aborted" message
1813 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1814 - if ! eend $?; then
1815 - eerror "Wine cannot be built with this version of gcc-5.3"
1816 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1817 - eerror "or use gcc-config to select a different compiler version."
1818 - eerror "See https://bugs.gentoo.org/574044"
1819 - eerror
1820 - return 1
1821 - fi
1822 - fi
1823 - fi
1824 -
1825 - # Ensure compiler support
1826 - if use abi_x86_64; then
1827 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1828 - # Compile in subshell to prevent "Aborted" message
1829 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1830 - if ! eend $?; then
1831 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1832 - eerror
1833 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
1834 - eerror
1835 - return 1
1836 - fi
1837 - fi
1838 -}
1839 -
1840 -wine_build_environment_check() {
1841 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
1842 -
1843 - if use abi_x86_64; then
1844 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
1845 - eerror "You need gcc-4.4+ to compile 64-bit wine"
1846 - die
1847 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
1848 - eerror "You need clang-3.8+ to compile 64-bit wine"
1849 - die
1850 - fi
1851 - fi
1852 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
1853 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
1854 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
1855 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
1856 - fi
1857 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
1858 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
1859 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
1860 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
1861 - ewarn "See package.env in man 5 portage for more information on how to do this."
1862 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
1863 - fi
1864 - fi
1865 -
1866 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
1867 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
1868 - eerror "See https://bugs.gentoo.org/487864 for more details."
1869 - eerror
1870 - return 1
1871 - fi
1872 -}
1873 -
1874 -wine_env_vcs_vars() {
1875 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
1876 - local pn_live_val="${pn_live_var}"
1877 - eval pn_live_val='$'${pn_live_val}
1878 - if [[ ! -z ${EGIT_COMMIT} ]]; then
1879 - eerror "Commits must now be specified using the environmental variables"
1880 - eerror "WINE_COMMIT"
1881 - eerror
1882 - return 1
1883 - fi
1884 -}
1885 -
1886 -pkg_pretend() {
1887 - wine_build_environment_check || die
1888 -
1889 - # Verify OSS support
1890 - if use oss && ! use kernel_FreeBSD; then
1891 - if ! has_version ">=media-sound/oss-4"; then
1892 - eerror "You cannot build wine with USE=oss without having support from a"
1893 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
1894 - eerror
1895 - die
1896 - fi
1897 - fi
1898 -}
1899 -
1900 -pkg_setup() {
1901 - wine_build_environment_check || die
1902 - wine_env_vcs_vars || die
1903 -
1904 - WINE_VARIANT="${PN#wine}-${PV}"
1905 - WINE_VARIANT="${WINE_VARIANT#-}"
1906 -
1907 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
1908 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
1909 - MY_DATADIR="${MY_DATAROOTDIR}"
1910 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
1911 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
1912 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
1913 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
1914 - MY_MANDIR="${MY_DATADIR}/man"
1915 -}
1916 -
1917 -src_unpack() {
1918 - if [[ ${PV} == "9999" ]] ; then
1919 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
1920 - fi
1921 -
1922 - default
1923 -
1924 - l10n_find_plocales_changes "${S}/po" "" ".po"
1925 -}
1926 -
1927 -src_prepare() {
1928 -
1929 - eapply_bin(){
1930 - local patch
1931 - for patch in ${PATCHES_BIN[@]}; do
1932 - patchbin --nogit < "${patch}" || die
1933 - done
1934 - }
1935 -
1936 - local md5="$(md5sum server/protocol.def)"
1937 -
1938 - default
1939 - eapply_bin
1940 - eautoreconf
1941 -
1942 - # Modification of the server protocol requires regenerating the server requests
1943 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
1944 - einfo "server/protocol.def was patched; running tools/make_requests"
1945 - tools/make_requests || die #432348
1946 - fi
1947 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
1948 - if ! use run-exes; then
1949 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
1950 - fi
1951 -
1952 - # Edit wine.desktop to work for specific variant
1953 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1954 -
1955 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1956 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1957 -
1958 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1959 -
1960 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
1961 - # Requires wine-2.0-rearrange-manpages.patch
1962 -
1963 - # Duplicate manpages input files for wine64
1964 - local f
1965 - for f in loader/*.man.in; do
1966 - cp ${f} ${f/wine/wine64} || die
1967 - done
1968 - # Add wine64 manpages to Makefile
1969 - if use abi_x86_64; then
1970 - sed -i "/wine.man.in/i \
1971 - \\\twine64.man.in \\\\" loader/Makefile.in || die
1972 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
1973 -\164\2/' loader/Makefile.in || die
1974 - fi
1975 -
1976 - rm_man_file(){
1977 - local file="${1}"
1978 - loc=${2}
1979 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
1980 - }
1981 -
1982 - while read f; do
1983 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
1984 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
1985 -}
1986 -
1987 -src_configure() {
1988 - wine_compiler_check || die
1989 -
1990 - export LDCONFIG=/bin/true
1991 - use custom-cflags || strip-flags
1992 -
1993 - multilib-minimal_src_configure
1994 -}
1995 -
1996 -multilib_src_configure() {
1997 - local myconf=(
1998 - --prefix="${MY_PREFIX}"
1999 - --datarootdir="${MY_DATAROOTDIR}"
2000 - --datadir="${MY_DATADIR}"
2001 - --docdir="${MY_DOCDIR}"
2002 - --includedir="${MY_INCLUDEDIR}"
2003 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
2004 - --libexecdir="${MY_LIBEXECDIR}"
2005 - --localstatedir="${MY_LOCALSTATEDIR}"
2006 - --mandir="${MY_MANDIR}"
2007 - --sysconfdir=/etc/wine
2008 - $(use_with alsa)
2009 - $(use_with capi)
2010 - $(use_with lcms cms)
2011 - $(use_with cups)
2012 - $(use_with ncurses curses)
2013 - $(use_with udisks dbus)
2014 - $(use_with fontconfig)
2015 - $(use_with ssl gnutls)
2016 - $(use_enable gecko mshtml)
2017 - $(use_with gphoto2 gphoto)
2018 - $(use_with gsm)
2019 - $(use_with gssapi)
2020 - $(use_with gstreamer)
2021 - --without-hal
2022 - $(use_with jpeg)
2023 - $(use_with kerberos krb5)
2024 - $(use_with ldap)
2025 - $(use_enable mono mscoree)
2026 - $(use_with mp3 mpg123)
2027 - $(use_with netapi)
2028 - $(use_with nls gettext)
2029 - $(use_with openal)
2030 - $(use_with opencl)
2031 - $(use_with opengl)
2032 - $(use_with osmesa)
2033 - $(use_with oss)
2034 - $(use_with pcap)
2035 - $(use_with png)
2036 - $(use_with pulseaudio pulse)
2037 - $(use_with threads pthread)
2038 - $(use_with scanner sane)
2039 - $(use_enable test tests)
2040 - $(use_with truetype freetype)
2041 - $(use_with udev)
2042 - $(use_with v4l)
2043 - $(use_with X x)
2044 - $(use_with X xfixes)
2045 - $(use_with xcomposite)
2046 - $(use_with xinerama)
2047 - $(use_with xml)
2048 - $(use_with xml xslt)
2049 - )
2050 -
2051 - local PKG_CONFIG AR RANLIB
2052 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
2053 - # set AR and RANLIB to make QA scripts happy; #483342
2054 - tc-export PKG_CONFIG AR RANLIB
2055 -
2056 - if use amd64; then
2057 - if [[ ${ABI} == amd64 ]]; then
2058 - myconf+=( --enable-win64 )
2059 - else
2060 - myconf+=( --disable-win64 )
2061 - fi
2062 -
2063 - # Note: using --with-wine64 results in problems with multilib.eclass
2064 - # CC/LD hackery. We're using separate tools instead.
2065 - fi
2066 -
2067 - ECONF_SOURCE=${S} \
2068 - econf "${myconf[@]}"
2069 - emake depend
2070 -}
2071 -
2072 -multilib_src_test() {
2073 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
2074 - if [[ ${ABI} == x86 ]]; then
2075 - if [[ $(id -u) == 0 ]]; then
2076 - ewarn "Skipping tests since they cannot be run under the root user."
2077 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
2078 - return
2079 - fi
2080 -
2081 - WINEPREFIX="${T}/.wine-${ABI}" \
2082 - Xemake test
2083 - fi
2084 -}
2085 -
2086 -multilib_src_install_all() {
2087 - local DOCS=( ANNOUNCE AUTHORS README )
2088 - add_locale_docs() {
2089 - local locale_doc="documentation/README.$1"
2090 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
2091 - }
2092 - l10n_for_each_locale_do add_locale_docs
2093 -
2094 - einstalldocs
2095 - prune_libtool_files --all
2096 -
2097 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
2098 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
2099 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
2100 - fi
2101 -
2102 - # Remove wineconsole if neither backend is installed #551124
2103 - if ! use X && ! use ncurses; then
2104 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
2105 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
2106 - rm_wineconsole() {
2107 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
2108 - }
2109 - multilib_foreach_abi rm_wineconsole
2110 - fi
2111 -
2112 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
2113 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
2114 -
2115 - if use abi_x86_64 && ! use abi_x86_32; then
2116 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
2117 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
2118 - fi
2119 -
2120 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
2121 - eshopts_push -s failglob #615218
2122 - # Make wrappers for binaries for handling multiple variants
2123 - # Note: wrappers instead of symlinks because some are shell which use basename
2124 - local b
2125 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
2126 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
2127 - done
2128 - eshopts_pop
2129 -}
2130 -
2131 -pkg_postinst() {
2132 - eselect wine register ${P}
2133 - if [[ ${PN} == "wine-vanilla" ]]; then
2134 - eselect wine register --vanilla ${P} || die
2135 - fi
2136 -
2137 - eselect wine update --all --if-unset || die
2138 -
2139 - xdg_desktop_database_update
2140 -
2141 - if ! use gecko; then
2142 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
2143 - ewarn "implementation of iexplore. Many older windows applications"
2144 - ewarn "rely upon the existence of an iexplore implementation, so"
2145 - ewarn "you will likely need to install an external one, like via winetricks"
2146 - fi
2147 - if ! use mono; then
2148 - ewarn "Without Wine Mono, wine prefixes will not have a default"
2149 - ewarn "implementation of .NET. Many windows applications rely upon"
2150 - ewarn "the existence of a .NET implementation, so you will likely need"
2151 - ewarn "to install an external one, like via winetricks"
2152 - fi
2153 -}
2154 -
2155 -pkg_prerm() {
2156 - eselect wine deregister ${P}
2157 - if [[ ${PN} == "wine-vanilla" ]]; then
2158 - eselect wine deregister --vanilla ${P} || die
2159 - fi
2160 -
2161 - eselect wine update --all --if-unset || die
2162 -}
2163 -
2164 -pkg_postrm() {
2165 - xdg_desktop_database_update
2166 -}
2167
2168 diff --git a/app-emulation/wine-vanilla/wine-vanilla-3.2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-3.2.ebuild
2169 deleted file mode 100644
2170 index a7cee775064..00000000000
2171 --- a/app-emulation/wine-vanilla/wine-vanilla-3.2.ebuild
2172 +++ /dev/null
2173 @@ -1,527 +0,0 @@
2174 -# Copyright 1999-2018 Gentoo Foundation
2175 -# Distributed under the terms of the GNU General Public License v2
2176 -
2177 -EAPI=6
2178 -
2179 -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"
2180 -PLOCALE_BACKUP="en"
2181 -
2182 -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
2183 -
2184 -MY_PN="${PN%%-*}"
2185 -MY_P="${MY_PN}-${PV}"
2186 -
2187 -if [[ ${PV} == "9999" ]] ; then
2188 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
2189 - EGIT_BRANCH="master"
2190 - inherit git-r3
2191 - SRC_URI=""
2192 - #KEYWORDS=""
2193 -else
2194 - MAJOR_V=$(get_version_component_range 1)
2195 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
2196 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
2197 -fi
2198 -S="${WORKDIR}/${MY_P}"
2199 -
2200 -GWP_V="20180120"
2201 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
2202 -
2203 -DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
2204 -HOMEPAGE="https://www.winehq.org/"
2205 -SRC_URI="${SRC_URI}
2206 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
2207 -"
2208 -
2209 -LICENSE="LGPL-2.1"
2210 -SLOT="${PV}"
2211 -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 selinux +ssl test +threads +truetype udev +udisks v4l +X +xcomposite xinerama +xml"
2212 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
2213 - X? ( truetype )
2214 - elibc_glibc? ( threads )
2215 - osmesa? ( opengl )
2216 - test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124
2217 -
2218 -# FIXME: the test suite is unsuitable for us; many tests require net access
2219 -# or fail due to Xvfb's opengl limitations.
2220 -RESTRICT="test"
2221 -
2222 -COMMON_DEPEND="
2223 - X? (
2224 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
2225 - x11-libs/libXext[${MULTILIB_USEDEP}]
2226 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
2227 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
2228 - x11-libs/libXi[${MULTILIB_USEDEP}]
2229 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
2230 - )
2231 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
2232 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
2233 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
2234 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
2235 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
2236 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
2237 - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
2238 - gstreamer? (
2239 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
2240 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
2241 - )
2242 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
2243 - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
2244 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
2245 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
2246 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
2247 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
2248 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
2249 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
2250 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
2251 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
2252 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
2253 - opengl? (
2254 - virtual/glu[${MULTILIB_USEDEP}]
2255 - virtual/opengl[${MULTILIB_USEDEP}]
2256 - )
2257 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
2258 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
2259 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
2260 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
2261 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
2262 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
2263 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
2264 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
2265 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
2266 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
2267 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
2268 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
2269 - xml? (
2270 - dev-libs/libxml2[${MULTILIB_USEDEP}]
2271 - dev-libs/libxslt[${MULTILIB_USEDEP}]
2272 - )"
2273 -
2274 -RDEPEND="${COMMON_DEPEND}
2275 - app-emulation/wine-desktop-common
2276 - >app-eselect/eselect-wine-0.3
2277 - !app-emulation/wine:0
2278 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
2279 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
2280 - mono? ( app-emulation/wine-mono:4.7.1 )
2281 - perl? (
2282 - dev-lang/perl
2283 - dev-perl/XML-Simple
2284 - )
2285 - pulseaudio? (
2286 - realtime? ( sys-auth/rtkit )
2287 - )
2288 - samba? ( >=net-fs/samba-3.0.25[winbind] )
2289 - selinux? ( sec-policy/selinux-wine )
2290 - udisks? ( sys-fs/udisks:2 )"
2291 -
2292 -# tools/make_requests requires perl
2293 -DEPEND="${COMMON_DEPEND}
2294 - sys-devel/flex
2295 - >=sys-kernel/linux-headers-2.6
2296 - virtual/pkgconfig
2297 - virtual/yacc
2298 - X? ( x11-base/xorg-proto )
2299 - prelink? ( sys-devel/prelink )
2300 - xinerama? ( x11-base/xorg-proto )"
2301 -
2302 -# These use a non-standard "Wine" category, which is provided by
2303 -# /etc/xdg/applications-merged/wine.menu
2304 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
2305 -usr/share/applications/wine-notepad.desktop
2306 -usr/share/applications/wine-uninstaller.desktop
2307 -usr/share/applications/wine-winecfg.desktop"
2308 -
2309 -PATCHES=(
2310 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
2311 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
2312 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
2313 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
2314 - "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
2315 -)
2316 -PATCHES_BIN=()
2317 -
2318 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
2319 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
2320 - DEPEND+=" dev-util/patchbin"
2321 -fi
2322 -
2323 -wine_compiler_check() {
2324 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
2325 -
2326 - # GCC-specific bugs
2327 - if tc-is-gcc; then
2328 - # bug #549768
2329 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
2330 - ebegin "Checking for gcc-5 ms_abi compiler bug"
2331 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
2332 - # Run in subshell to prevent "Aborted" message
2333 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
2334 - if ! eend $?; then
2335 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
2336 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
2337 - eerror "or use gcc-config to select a different compiler version."
2338 - eerror "See https://bugs.gentoo.org/549768"
2339 - eerror
2340 - return 1
2341 - fi
2342 - fi
2343 - # bug #574044
2344 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
2345 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
2346 - # Compile in subshell to prevent "Aborted" message
2347 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
2348 - if ! eend $?; then
2349 - eerror "Wine cannot be built with this version of gcc-5.3"
2350 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
2351 - eerror "or use gcc-config to select a different compiler version."
2352 - eerror "See https://bugs.gentoo.org/574044"
2353 - eerror
2354 - return 1
2355 - fi
2356 - fi
2357 - fi
2358 -
2359 - # Ensure compiler support
2360 - if use abi_x86_64; then
2361 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
2362 - # Compile in subshell to prevent "Aborted" message
2363 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
2364 - if ! eend $?; then
2365 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
2366 - eerror
2367 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
2368 - eerror
2369 - return 1
2370 - fi
2371 - fi
2372 -}
2373 -
2374 -wine_build_environment_check() {
2375 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
2376 -
2377 - if use abi_x86_64; then
2378 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
2379 - eerror "You need gcc-4.4+ to compile 64-bit wine"
2380 - die
2381 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
2382 - eerror "You need clang-3.8+ to compile 64-bit wine"
2383 - die
2384 - fi
2385 - fi
2386 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
2387 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
2388 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
2389 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
2390 - fi
2391 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
2392 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
2393 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
2394 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
2395 - ewarn "See package.env in man 5 portage for more information on how to do this."
2396 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
2397 - fi
2398 - fi
2399 -
2400 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
2401 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
2402 - eerror "See https://bugs.gentoo.org/487864 for more details."
2403 - eerror
2404 - return 1
2405 - fi
2406 -}
2407 -
2408 -wine_env_vcs_vars() {
2409 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
2410 - local pn_live_val="${pn_live_var}"
2411 - eval pn_live_val='$'${pn_live_val}
2412 - if [[ ! -z ${EGIT_COMMIT} ]]; then
2413 - eerror "Commits must now be specified using the environmental variables"
2414 - eerror "WINE_COMMIT"
2415 - eerror
2416 - return 1
2417 - fi
2418 -}
2419 -
2420 -pkg_pretend() {
2421 - wine_build_environment_check || die
2422 -
2423 - # Verify OSS support
2424 - if use oss && ! use kernel_FreeBSD; then
2425 - if ! has_version ">=media-sound/oss-4"; then
2426 - eerror "You cannot build wine with USE=oss without having support from a"
2427 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
2428 - eerror
2429 - die
2430 - fi
2431 - fi
2432 -}
2433 -
2434 -pkg_setup() {
2435 - wine_build_environment_check || die
2436 - wine_env_vcs_vars || die
2437 -
2438 - WINE_VARIANT="${PN#wine}-${PV}"
2439 - WINE_VARIANT="${WINE_VARIANT#-}"
2440 -
2441 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
2442 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
2443 - MY_DATADIR="${MY_DATAROOTDIR}"
2444 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
2445 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
2446 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
2447 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
2448 - MY_MANDIR="${MY_DATADIR}/man"
2449 -}
2450 -
2451 -src_unpack() {
2452 - if [[ ${PV} == "9999" ]] ; then
2453 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
2454 - fi
2455 -
2456 - default
2457 -
2458 - l10n_find_plocales_changes "${S}/po" "" ".po"
2459 -}
2460 -
2461 -src_prepare() {
2462 -
2463 - eapply_bin(){
2464 - local patch
2465 - for patch in ${PATCHES_BIN[@]}; do
2466 - patchbin --nogit < "${patch}" || die
2467 - done
2468 - }
2469 -
2470 - local md5="$(md5sum server/protocol.def)"
2471 -
2472 - default
2473 - eapply_bin
2474 - eautoreconf
2475 -
2476 - # Modification of the server protocol requires regenerating the server requests
2477 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
2478 - einfo "server/protocol.def was patched; running tools/make_requests"
2479 - tools/make_requests || die #432348
2480 - fi
2481 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
2482 - if ! use run-exes; then
2483 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
2484 - fi
2485 -
2486 - # Edit wine.desktop to work for specific variant
2487 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
2488 -
2489 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
2490 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
2491 -
2492 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
2493 -
2494 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
2495 - # Requires wine-2.0-rearrange-manpages.patch
2496 -
2497 - # Duplicate manpages input files for wine64
2498 - local f
2499 - for f in loader/*.man.in; do
2500 - cp ${f} ${f/wine/wine64} || die
2501 - done
2502 - # Add wine64 manpages to Makefile
2503 - if use abi_x86_64; then
2504 - sed -i "/wine.man.in/i \
2505 - \\\twine64.man.in \\\\" loader/Makefile.in || die
2506 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
2507 -\164\2/' loader/Makefile.in || die
2508 - fi
2509 -
2510 - rm_man_file(){
2511 - local file="${1}"
2512 - loc=${2}
2513 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
2514 - }
2515 -
2516 - while read f; do
2517 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
2518 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
2519 -}
2520 -
2521 -src_configure() {
2522 - wine_compiler_check || die
2523 -
2524 - export LDCONFIG=/bin/true
2525 - use custom-cflags || strip-flags
2526 -
2527 - multilib-minimal_src_configure
2528 -}
2529 -
2530 -multilib_src_configure() {
2531 - local myconf=(
2532 - --prefix="${MY_PREFIX}"
2533 - --datarootdir="${MY_DATAROOTDIR}"
2534 - --datadir="${MY_DATADIR}"
2535 - --docdir="${MY_DOCDIR}"
2536 - --includedir="${MY_INCLUDEDIR}"
2537 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
2538 - --libexecdir="${MY_LIBEXECDIR}"
2539 - --localstatedir="${MY_LOCALSTATEDIR}"
2540 - --mandir="${MY_MANDIR}"
2541 - --sysconfdir=/etc/wine
2542 - $(use_with alsa)
2543 - $(use_with capi)
2544 - $(use_with lcms cms)
2545 - $(use_with cups)
2546 - $(use_with ncurses curses)
2547 - $(use_with udisks dbus)
2548 - $(use_with fontconfig)
2549 - $(use_with ssl gnutls)
2550 - $(use_enable gecko mshtml)
2551 - $(use_with gphoto2 gphoto)
2552 - $(use_with gsm)
2553 - $(use_with gssapi)
2554 - $(use_with gstreamer)
2555 - --without-hal
2556 - $(use_with jpeg)
2557 - $(use_with kerberos krb5)
2558 - $(use_with ldap)
2559 - $(use_enable mono mscoree)
2560 - $(use_with mp3 mpg123)
2561 - $(use_with netapi)
2562 - $(use_with nls gettext)
2563 - $(use_with openal)
2564 - $(use_with opencl)
2565 - $(use_with opengl)
2566 - $(use_with osmesa)
2567 - $(use_with oss)
2568 - $(use_with pcap)
2569 - $(use_with png)
2570 - $(use_with pulseaudio pulse)
2571 - $(use_with threads pthread)
2572 - $(use_with scanner sane)
2573 - $(use_enable test tests)
2574 - $(use_with truetype freetype)
2575 - $(use_with udev)
2576 - $(use_with v4l)
2577 - $(use_with X x)
2578 - $(use_with X xfixes)
2579 - $(use_with xcomposite)
2580 - $(use_with xinerama)
2581 - $(use_with xml)
2582 - $(use_with xml xslt)
2583 - )
2584 -
2585 - local PKG_CONFIG AR RANLIB
2586 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
2587 - # set AR and RANLIB to make QA scripts happy; #483342
2588 - tc-export PKG_CONFIG AR RANLIB
2589 -
2590 - if use amd64; then
2591 - if [[ ${ABI} == amd64 ]]; then
2592 - myconf+=( --enable-win64 )
2593 - else
2594 - myconf+=( --disable-win64 )
2595 - fi
2596 -
2597 - # Note: using --with-wine64 results in problems with multilib.eclass
2598 - # CC/LD hackery. We're using separate tools instead.
2599 - fi
2600 -
2601 - ECONF_SOURCE=${S} \
2602 - econf "${myconf[@]}"
2603 - emake depend
2604 -}
2605 -
2606 -multilib_src_test() {
2607 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
2608 - if [[ ${ABI} == x86 ]]; then
2609 - if [[ $(id -u) == 0 ]]; then
2610 - ewarn "Skipping tests since they cannot be run under the root user."
2611 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
2612 - return
2613 - fi
2614 -
2615 - WINEPREFIX="${T}/.wine-${ABI}" \
2616 - Xemake test
2617 - fi
2618 -}
2619 -
2620 -multilib_src_install_all() {
2621 - local DOCS=( ANNOUNCE AUTHORS README )
2622 - add_locale_docs() {
2623 - local locale_doc="documentation/README.$1"
2624 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
2625 - }
2626 - l10n_for_each_locale_do add_locale_docs
2627 -
2628 - einstalldocs
2629 - prune_libtool_files --all
2630 -
2631 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
2632 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
2633 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
2634 - fi
2635 -
2636 - # Remove wineconsole if neither backend is installed #551124
2637 - if ! use X && ! use ncurses; then
2638 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
2639 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
2640 - rm_wineconsole() {
2641 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
2642 - }
2643 - multilib_foreach_abi rm_wineconsole
2644 - fi
2645 -
2646 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
2647 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
2648 -
2649 - if use abi_x86_64 && ! use abi_x86_32; then
2650 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
2651 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
2652 - fi
2653 -
2654 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
2655 - eshopts_push -s failglob #615218
2656 - # Make wrappers for binaries for handling multiple variants
2657 - # Note: wrappers instead of symlinks because some are shell which use basename
2658 - local b
2659 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
2660 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
2661 - done
2662 - eshopts_pop
2663 -}
2664 -
2665 -pkg_postinst() {
2666 - eselect wine register ${P}
2667 - if [[ ${PN} == "wine-vanilla" ]]; then
2668 - eselect wine register --vanilla ${P} || die
2669 - fi
2670 -
2671 - eselect wine update --all --if-unset || die
2672 -
2673 - xdg_desktop_database_update
2674 -
2675 - if ! use gecko; then
2676 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
2677 - ewarn "implementation of iexplore. Many older windows applications"
2678 - ewarn "rely upon the existence of an iexplore implementation, so"
2679 - ewarn "you will likely need to install an external one, like via winetricks"
2680 - fi
2681 - if ! use mono; then
2682 - ewarn "Without Wine Mono, wine prefixes will not have a default"
2683 - ewarn "implementation of .NET. Many windows applications rely upon"
2684 - ewarn "the existence of a .NET implementation, so you will likely need"
2685 - ewarn "to install an external one, like via winetricks"
2686 - fi
2687 -}
2688 -
2689 -pkg_prerm() {
2690 - eselect wine deregister ${P}
2691 - if [[ ${PN} == "wine-vanilla" ]]; then
2692 - eselect wine deregister --vanilla ${P} || die
2693 - fi
2694 -
2695 - eselect wine update --all --if-unset || die
2696 -}
2697 -
2698 -pkg_postrm() {
2699 - xdg_desktop_database_update
2700 -}