Gentoo Archives: gentoo-commits

From: NP Hardass <np-hardass@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/
Date: Thu, 13 Apr 2017 20:30:27
Message-Id: 1492115416.e8f93689eb95274ca1fa5ae1f3bdcc805a584e2d.np-hardass@gentoo
1 commit: e8f93689eb95274ca1fa5ae1f3bdcc805a584e2d
2 Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 13 20:29:52 2017 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 13 20:30:16 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8f93689
7
8 app-emulation/wine-vanilla: Bump to 2.6
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 app-emulation/wine-vanilla/Manifest | 1 +
13 app-emulation/wine-vanilla/wine-vanilla-2.6.ebuild | 508 +++++++++++++++++++++
14 2 files changed, 509 insertions(+)
15
16 diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
17 index 0c5f4ca012d..cadbb509cc9 100644
18 --- a/app-emulation/wine-vanilla/Manifest
19 +++ b/app-emulation/wine-vanilla/Manifest
20 @@ -4,4 +4,5 @@ DIST wine-2.2.tar.xz 18916364 SHA256 64cb57e1d8aa07f5c89ef26743b494f2d3ef9c0f4e5
21 DIST wine-2.3.tar.xz 18931732 SHA256 afc95c7a87cc8f0730b462c50a5dfc9c462eb02c6bf5874b4fa99946f49e067e SHA512 bea78e8468555ff9e08dedf3918da5ea82721549c43984869989bbdafeea00e454820ff9558aa29925c97a165a9b01e5cd1fd397f133833c58824984a6686171 WHIRLPOOL 1f5ec8e5c32d124277e4c71d95726d3a5337575757c3029567c77165d65fcfec2ddf33d3863b4bf55c9eff7c3582c1ec7dbd76d84ed8bbbe89dd16db6b0128c1
22 DIST wine-2.4.tar.xz 18953748 SHA256 87b5df07e4781fecce2f92415a4717208ea253a20a0df8b36b9f90b69b72748e SHA512 15ae7e97dc72a8636b2c15c93803ed430fa456d673add61457cf3e479e769559c682b40949b5d38828f6681f13183e560fcb4a2eb0f0ba25e6eade46f7d3d7c0 WHIRLPOOL 558ab7b7517ad5e03366b4db974047eba776585e958a5b71bb2e93993e21bc725ea7a8bcf2a4354f34ca38c94ba99ccd15f2f8b5e4b58066bf339d3517eec56c
23 DIST wine-2.5.tar.xz 18993176 SHA256 13f92b7ab483323aaabbc6519851e688ad4372ea30569961c831d40d6d3bccd2 SHA512 7b6faf6d8aa3d41465ad93ebae055581136f736c7eb8b4c61682e5a05589c83a0ff2c85e0f9abbca016f31b6f1c1435617c4994f1913f715a8707ebee3f28467 WHIRLPOOL 5acd2ac65df5dee1c860ddca72b8df8e021a0b95a3a1870d15468ce4591d569fa15bf8a0a6d341bcd3a624d13d0affe5b0263e67f9dfcbbf3ae7b59218dcded9
24 +DIST wine-2.6.tar.xz 19023352 SHA256 e6ff64758f437647e99a36c1275e41adf54f0432907172d3bba22b070a97aac0 SHA512 2aa55413ac090e011725566d004e42ee46323cd4c6961b9faa63e3de422ba60bb657bf224a4d7e8aa712a8e26e11977d07acb7c088ffeef8c37310e8cc698970 WHIRLPOOL 82e6a06cc342c7d6eace64a97bae10cc39c120c5776170b059700542b8b6fef56be9a697f05b3bc21ae82621f4bf50f3ab478311c9a3a55d86ed7c0a009766b0
25 DIST wine-desktop-common-20150204.tar.gz 99491 SHA256 444ad6b52b5290ec7d160e2cc40e4ba0910b4c4983dba1ceb054b81b09b24b5e SHA512 1f3d7022c5cff87ed3b8fd3b7cd14397c6f23b98fe6a7c583ac0d2f439ff29d943f57375f23687aa6519ff1d84ff07624a9a712d6f19fa207fd26d01edcb6688 WHIRLPOOL e9810b2952d25c05d831000e00e423de86809ec31b9a033fd4c64a70709da7338a9afc9e632e678f49c789a8a3702fbd0113226770cdb806623f2de371a16f54
26
27 diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.6.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.6.ebuild
28 new file mode 100644
29 index 00000000000..5245b136e23
30 --- /dev/null
31 +++ b/app-emulation/wine-vanilla/wine-vanilla-2.6.ebuild
32 @@ -0,0 +1,508 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +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"
39 +PLOCALE_BACKUP="en"
40 +
41 +inherit autotools eutils fdo-mime flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator
42 +
43 +MY_PN="${PN%%-*}"
44 +MY_P="${MY_PN}-${PV}"
45 +
46 +if [[ ${PV} == "9999" ]] ; then
47 + EGIT_REPO_URI="git://source.winehq.org/git/wine.git http://source.winehq.org/git/wine.git"
48 + EGIT_BRANCH="master"
49 + inherit git-r3
50 + SRC_URI=""
51 + #KEYWORDS=""
52 +else
53 + MAJOR_V=$(get_version_component_range 1)
54 + SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
55 + KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
56 +fi
57 +S="${WORKDIR}/${MY_P}"
58 +
59 +WDC_V="20150204"
60 +WINE_DESKTOP_COMMON_P="wine-desktop-common-${WDC_V}"
61 +
62 +DESCRIPTION="Free implementation of Windows(tm) on Unix"
63 +HOMEPAGE="http://www.winehq.org/"
64 +SRC_URI="${SRC_URI}
65 + https://github.com/NP-Hardass/wine-desktop-common/archive/${WDC_V}.tar.gz -> ${WINE_DESKTOP_COMMON_P}.tar.gz
66 +"
67 +
68 +LICENSE="LGPL-2.1"
69 +SLOT="${PV}"
70 +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg 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"
71 +REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
72 + X? ( truetype )
73 + elibc_glibc? ( threads )
74 + osmesa? ( opengl )
75 + test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124
76 +
77 +# FIXME: the test suite is unsuitable for us; many tests require net access
78 +# or fail due to Xvfb's opengl limitations.
79 +RESTRICT="test"
80 +
81 +COMMON_DEPEND="
82 + X? (
83 + x11-libs/libXcursor[${MULTILIB_USEDEP}]
84 + x11-libs/libXext[${MULTILIB_USEDEP}]
85 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
86 + x11-libs/libXi[${MULTILIB_USEDEP}]
87 + x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
88 + )
89 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
90 + capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
91 + cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
92 + fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
93 + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
94 + gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
95 + gstreamer? (
96 + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
97 + media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
98 + )
99 + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
100 + lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
101 + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
102 + mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
103 + ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
104 + netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
105 + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
106 + odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
107 + openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
108 + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
109 + opengl? (
110 + virtual/glu[${MULTILIB_USEDEP}]
111 + virtual/opengl[${MULTILIB_USEDEP}]
112 + )
113 + osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
114 + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
115 + png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
116 + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
117 + scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
118 + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
119 + truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
120 + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
121 + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
122 + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
123 + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
124 + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
125 + xml? (
126 + dev-libs/libxml2[${MULTILIB_USEDEP}]
127 + dev-libs/libxslt[${MULTILIB_USEDEP}]
128 + )
129 + abi_x86_32? (
130 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
131 + !<app-emulation/emul-linux-x86-baselibs-20140508-r14
132 + !app-emulation/emul-linux-x86-db[-abi_x86_32(-)]
133 + !<app-emulation/emul-linux-x86-db-20140508-r3
134 + !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
135 + !<app-emulation/emul-linux-x86-medialibs-20140508-r6
136 + !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)]
137 + !<app-emulation/emul-linux-x86-opengl-20140508-r1
138 + !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)]
139 + !<app-emulation/emul-linux-x86-sdl-20140508-r1
140 + !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
141 + !<app-emulation/emul-linux-x86-soundlibs-20140508
142 + !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
143 + !<app-emulation/emul-linux-x86-xlibs-20140508
144 + )"
145 +
146 +RDEPEND="${COMMON_DEPEND}
147 + app-emulation/wine-desktop-common
148 + >app-eselect/eselect-wine-0.3
149 + !app-emulation/wine:0
150 + dos? ( >=games-emulation/dosbox-0.74_p20160629 )
151 + gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
152 + mono? ( app-emulation/wine-mono:4.7.0 )
153 + perl? (
154 + dev-lang/perl
155 + dev-perl/XML-Simple
156 + )
157 + pulseaudio? (
158 + realtime? ( sys-auth/rtkit )
159 + )
160 + samba? ( >=net-fs/samba-3.0.25[winbind] )
161 + selinux? ( sec-policy/selinux-wine )
162 + udisks? ( sys-fs/udisks:2 )"
163 +
164 +# tools/make_requests requires perl
165 +DEPEND="${COMMON_DEPEND}
166 + sys-devel/flex
167 + >=sys-kernel/linux-headers-2.6
168 + virtual/pkgconfig
169 + virtual/yacc
170 + X? (
171 + x11-proto/inputproto
172 + x11-proto/xextproto
173 + x11-proto/xf86vidmodeproto
174 + )
175 + prelink? ( sys-devel/prelink )
176 + xinerama? ( x11-proto/xineramaproto )"
177 +
178 +# These use a non-standard "Wine" category, which is provided by
179 +# /etc/xdg/applications-merged/wine.menu
180 +QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
181 +usr/share/applications/wine-notepad.desktop
182 +usr/share/applications/wine-uninstaller.desktop
183 +usr/share/applications/wine-winecfg.desktop"
184 +
185 +wine_compiler_check() {
186 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
187 +
188 + # GCC-specific bugs
189 + if tc-is-gcc; then
190 + # bug #549768
191 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
192 + ebegin "Checking for gcc-5 ms_abi compiler bug"
193 + $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
194 + # Run in subshell to prevent "Aborted" message
195 + ( "${T}"/pr66838 || false ) >/dev/null 2>&1
196 + if ! eend $?; then
197 + eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
198 + eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
199 + eerror "or use gcc-config to select a different compiler version."
200 + eerror "See https://bugs.gentoo.org/549768"
201 + eerror
202 + return 1
203 + fi
204 + fi
205 + # bug #574044
206 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
207 + ebegin "Checking for gcc-5-3 stack realignment compiler bug"
208 + # Compile in subshell to prevent "Aborted" message
209 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 ) >/dev/null 2>&1
210 + if ! eend $?; then
211 + eerror "Wine cannot be built with this version of gcc-5.3"
212 + eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
213 + eerror "or use gcc-config to select a different compiler version."
214 + eerror "See https://bugs.gentoo.org/574044"
215 + eerror
216 + return 1
217 + fi
218 + fi
219 + fi
220 +
221 + # Ensure compiler support
222 + if use abi_x86_64; then
223 + ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
224 + # Compile in subshell to prevent "Aborted" message
225 + ( $(tc-getCC) -O2 "${FILESDIR}"/builtin_ms_va_list.c -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
226 + if ! eend $?; then
227 + eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
228 + eerror
229 + eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
230 + eerror
231 + return 1
232 + fi
233 + fi
234 +}
235 +
236 +wine_build_environment_check() {
237 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
238 +
239 + if use abi_x86_64; then
240 + if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
241 + eerror "You need gcc-4.4+ to compile 64-bit wine"
242 + die
243 + elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
244 + eerror "You need clang-3.8+ to compile 64-bit wine"
245 + die
246 + fi
247 + fi
248 + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
249 + ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
250 + ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
251 + ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
252 + fi
253 + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
254 + if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
255 + ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
256 + ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
257 + ewarn "See package.env in man 5 portage for more information on how to do this."
258 + ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
259 + fi
260 + fi
261 +
262 + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
263 + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
264 + eerror "See https://bugs.gentoo.org/487864 for more details."
265 + eerror
266 + return 1
267 + fi
268 +}
269 +
270 +wine_env_vcs_vars() {
271 + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
272 + local pn_live_val="${pn_live_var}"
273 + eval pn_live_val='$'${pn_live_val}
274 + if [[ ! -z ${EGIT_COMMIT} ]]; then
275 + eerror "Commits must now be specified using the environmental variables"
276 + eerror "WINE_COMMIT"
277 + eerror
278 + return 1
279 + fi
280 +}
281 +
282 +pkg_pretend() {
283 + wine_build_environment_check || die
284 +
285 + # Verify OSS support
286 + if use oss && ! use kernel_FreeBSD; then
287 + if ! has_version ">=media-sound/oss-4"; then
288 + eerror "You cannot build wine with USE=oss without having support from a"
289 + eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
290 + eerror
291 + die
292 + fi
293 + fi
294 +}
295 +
296 +pkg_setup() {
297 + wine_build_environment_check || die
298 + wine_env_vcs_vars || die
299 +
300 + WINE_VARIANT="${PN#wine}-${PV}"
301 + WINE_VARIANT="${WINE_VARIANT#-}"
302 +
303 + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
304 + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
305 + MY_DATADIR="${MY_DATAROOTDIR}"
306 + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
307 + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
308 + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
309 + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
310 + MY_MANDIR="${MY_DATADIR}/man"
311 +}
312 +
313 +src_unpack() {
314 + if [[ ${PV} == "9999" ]] ; then
315 + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
316 + fi
317 +
318 + default
319 +
320 + l10n_find_plocales_changes "${S}/po" "" ".po"
321 +}
322 +
323 +src_prepare() {
324 + local md5="$(md5sum server/protocol.def)"
325 + local PATCHES=(
326 + "${FILESDIR}"/${MY_PN}-1.5.26-winegcc.patch #260726
327 + "${FILESDIR}"/${MY_PN}-1.9.5-multilib-portage.patch #395615
328 + "${FILESDIR}"/${MY_PN}-1.7.12-osmesa-check.patch #429386
329 + "${FILESDIR}"/${MY_PN}-1.6-memset-O3.patch #480508
330 + "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
331 + )
332 +
333 + default
334 + eautoreconf
335 +
336 + # Modification of the server protocol requires regenerating the server requests
337 + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
338 + einfo "server/protocol.def was patched; running tools/make_requests"
339 + tools/make_requests || die #432348
340 + fi
341 + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
342 + if ! use run-exes; then
343 + sed -i '/^MimeType/d' loader/wine.desktop || die #117785
344 + fi
345 +
346 + # Edit wine.desktop to work for specific variant
347 + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
348 +
349 + # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
350 + cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
351 +
352 + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
353 +}
354 +
355 +src_configure() {
356 + wine_compiler_check || die
357 +
358 + export LDCONFIG=/bin/true
359 + use custom-cflags || strip-flags
360 +
361 + multilib-minimal_src_configure
362 +}
363 +
364 +multilib_src_configure() {
365 + local myconf=(
366 + --prefix="${MY_PREFIX}"
367 + --datarootdir="${MY_DATAROOTDIR}"
368 + --datadir="${MY_DATADIR}"
369 + --docdir="${MY_DOCDIR}"
370 + --includedir="${MY_INCLUDEDIR}"
371 + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
372 + --libexecdir="${MY_LIBEXECDIR}"
373 + --localstatedir="${MY_LOCALSTATEDIR}"
374 + --mandir="${MY_MANDIR}"
375 + --sysconfdir=/etc/wine
376 + $(use_with alsa)
377 + $(use_with capi)
378 + $(use_with lcms cms)
379 + $(use_with cups)
380 + $(use_with ncurses curses)
381 + $(use_with udisks dbus)
382 + $(use_with fontconfig)
383 + $(use_with ssl gnutls)
384 + $(use_enable gecko mshtml)
385 + $(use_with gphoto2 gphoto)
386 + $(use_with gsm)
387 + $(use_with gstreamer)
388 + --without-hal
389 + $(use_with jpeg)
390 + $(use_with ldap)
391 + $(use_enable mono mscoree)
392 + $(use_with mp3 mpg123)
393 + $(use_with netapi)
394 + $(use_with nls gettext)
395 + $(use_with openal)
396 + $(use_with opencl)
397 + $(use_with opengl)
398 + $(use_with osmesa)
399 + $(use_with oss)
400 + $(use_with pcap)
401 + $(use_with png)
402 + $(use_with pulseaudio pulse)
403 + $(use_with threads pthread)
404 + $(use_with scanner sane)
405 + $(use_enable test tests)
406 + $(use_with truetype freetype)
407 + $(use_with udev)
408 + $(use_with v4l)
409 + $(use_with X x)
410 + $(use_with xcomposite)
411 + $(use_with xinerama)
412 + $(use_with xml)
413 + $(use_with xml xslt)
414 + )
415 +
416 + local PKG_CONFIG AR RANLIB
417 + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
418 + # set AR and RANLIB to make QA scripts happy; #483342
419 + tc-export PKG_CONFIG AR RANLIB
420 +
421 + if use amd64; then
422 + if [[ ${ABI} == amd64 ]]; then
423 + myconf+=( --enable-win64 )
424 + else
425 + myconf+=( --disable-win64 )
426 + fi
427 +
428 + # Note: using --with-wine64 results in problems with multilib.eclass
429 + # CC/LD hackery. We're using separate tools instead.
430 + fi
431 +
432 + ECONF_SOURCE=${S} \
433 + econf "${myconf[@]}"
434 + emake depend
435 +}
436 +
437 +multilib_src_test() {
438 + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
439 + if [[ ${ABI} == x86 ]]; then
440 + if [[ $(id -u) == 0 ]]; then
441 + ewarn "Skipping tests since they cannot be run under the root user."
442 + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
443 + return
444 + fi
445 +
446 + WINEPREFIX="${T}/.wine-${ABI}" \
447 + Xemake test
448 + fi
449 +}
450 +
451 +multilib_src_install_all() {
452 + local DOCS=( ANNOUNCE AUTHORS README )
453 + add_locale_docs() {
454 + local locale_doc="documentation/README.$1"
455 + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
456 + }
457 + l10n_for_each_locale_do add_locale_docs
458 +
459 + einstalldocs
460 + prune_libtool_files --all
461 +
462 + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
463 + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
464 + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
465 + fi
466 +
467 + # Remove wineconsole if neither backend is installed #551124
468 + if ! use X && ! use ncurses; then
469 + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
470 + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
471 + rm_wineconsole() {
472 + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
473 + }
474 + multilib_foreach_abi rm_wineconsole
475 + fi
476 +
477 + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
478 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
479 +
480 + if use abi_x86_64 && ! use abi_x86_32; then
481 + dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
482 + dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
483 + fi
484 +
485 + # Failglob for bin and man loops
486 + local glob_state=$(shopt -p failglob)
487 + shopt -s failglob
488 +
489 + # Make wrappers for binaries for handling multiple variants
490 + # Note: wrappers instead of symlinks because some are shell which use basename
491 + local b
492 + for b in "${D%/}${MY_PREFIX}"/bin/*; do
493 + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
494 + done
495 +
496 + # respect LINGUAS when installing man pages, #469418
497 + local l
498 + for l in de fr pl; do
499 + use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
500 + done
501 +
502 + eval "${glob_state}"
503 +}
504 +
505 +pkg_postinst() {
506 + eselect wine register ${P}
507 + if [[ ${PN} == "wine-vanilla" ]]; then
508 + eselect wine register --vanilla ${P} || die
509 + fi
510 +
511 + eselect wine update --all --if-unset || die
512 +
513 + fdo-mime_desktop_database_update
514 +
515 + if ! use gecko; then
516 + ewarn "Without Wine Gecko, wine prefixes will not have a default"
517 + ewarn "implementation of iexplore. Many older windows applications"
518 + ewarn "rely upon the existence of an iexplore implementation, so"
519 + ewarn "you will likely need to install an external one, like via winetricks"
520 + fi
521 + if ! use mono; then
522 + ewarn "Without Wine Mono, wine prefixes will not have a default"
523 + ewarn "implementation of .NET. Many windows applications rely upon"
524 + ewarn "the existence of a .NET implementation, so you will likely need"
525 + ewarn "to install an external one, like via winetricks"
526 + fi
527 +}
528 +
529 +pkg_prerm() {
530 + eselect wine deregister ${P}
531 + if [[ ${PN} == "wine-vanilla" ]]; then
532 + eselect wine deregister --vanilla ${P} || die
533 + fi
534 +
535 + eselect wine update --all --if-unset || die
536 +}
537 +
538 +pkg_postrm() {
539 + fdo-mime_desktop_database_update
540 +}