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: Mon, 01 May 2017 17:34:36
Message-Id: 1493660049.52dce951269764f9aa6e8599b85bd0fc994e8277.np-hardass@gentoo
1 commit: 52dce951269764f9aa6e8599b85bd0fc994e8277
2 Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 1 17:33:52 2017 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Mon May 1 17:34:09 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52dce951
7
8 app-emulation/wine-vanilla: Bump to 2.7
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.7.ebuild | 507 +++++++++++++++++++++
14 2 files changed, 508 insertions(+)
15
16 diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
17 index 253730fe709..4f7f99de028 100644
18 --- a/app-emulation/wine-vanilla/Manifest
19 +++ b/app-emulation/wine-vanilla/Manifest
20 @@ -6,4 +6,5 @@ DIST wine-2.3.tar.xz 18931732 SHA256 afc95c7a87cc8f0730b462c50a5dfc9c462eb02c6bf
21 DIST wine-2.4.tar.xz 18953748 SHA256 87b5df07e4781fecce2f92415a4717208ea253a20a0df8b36b9f90b69b72748e SHA512 15ae7e97dc72a8636b2c15c93803ed430fa456d673add61457cf3e479e769559c682b40949b5d38828f6681f13183e560fcb4a2eb0f0ba25e6eade46f7d3d7c0 WHIRLPOOL 558ab7b7517ad5e03366b4db974047eba776585e958a5b71bb2e93993e21bc725ea7a8bcf2a4354f34ca38c94ba99ccd15f2f8b5e4b58066bf339d3517eec56c
22 DIST wine-2.5.tar.xz 18993176 SHA256 13f92b7ab483323aaabbc6519851e688ad4372ea30569961c831d40d6d3bccd2 SHA512 7b6faf6d8aa3d41465ad93ebae055581136f736c7eb8b4c61682e5a05589c83a0ff2c85e0f9abbca016f31b6f1c1435617c4994f1913f715a8707ebee3f28467 WHIRLPOOL 5acd2ac65df5dee1c860ddca72b8df8e021a0b95a3a1870d15468ce4591d569fa15bf8a0a6d341bcd3a624d13d0affe5b0263e67f9dfcbbf3ae7b59218dcded9
23 DIST wine-2.6.tar.xz 19023352 SHA256 e6ff64758f437647e99a36c1275e41adf54f0432907172d3bba22b070a97aac0 SHA512 2aa55413ac090e011725566d004e42ee46323cd4c6961b9faa63e3de422ba60bb657bf224a4d7e8aa712a8e26e11977d07acb7c088ffeef8c37310e8cc698970 WHIRLPOOL 82e6a06cc342c7d6eace64a97bae10cc39c120c5776170b059700542b8b6fef56be9a697f05b3bc21ae82621f4bf50f3ab478311c9a3a55d86ed7c0a009766b0
24 +DIST wine-2.7.tar.xz 19101108 SHA256 e55a43088e313c45f7ab49272b7cb441c06f5659fb4220b2325dc060db0ee14c SHA512 1e61b9a4aa1f5f42fb27d11d5254a9ba90f348ad9c4d1ddd4b5da47cd7de638290a20accf7447db9c0e4ced4c2144497cdf5fc906a5eac60e923dabb61f65d3a WHIRLPOOL 133426a0313facc856eebad3d16d199948b780ce4c4561e5784845c119fe462b8942ed86fa5e823e729a997d704bd3c70f44a64ce3eef965b4f3eb92587dfa4d
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.7.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.7.ebuild
28 new file mode 100644
29 index 00000000000..1916f83483d
30 --- /dev/null
31 +++ b/app-emulation/wine-vanilla/wine-vanilla-2.7.ebuild
32 @@ -0,0 +1,507 @@
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-13[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.6-memset-O3.patch #480508
329 + "${FILESDIR}"/${MY_PN}-2.0-multislot-apploader.patch
330 + )
331 +
332 + default
333 + eautoreconf
334 +
335 + # Modification of the server protocol requires regenerating the server requests
336 + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
337 + einfo "server/protocol.def was patched; running tools/make_requests"
338 + tools/make_requests || die #432348
339 + fi
340 + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
341 + if ! use run-exes; then
342 + sed -i '/^MimeType/d' loader/wine.desktop || die #117785
343 + fi
344 +
345 + # Edit wine.desktop to work for specific variant
346 + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
347 +
348 + # hi-res default icon, #472990, http://bugs.winehq.org/show_bug.cgi?id=24652
349 + cp "${WORKDIR}/${WINE_DESKTOP_COMMON_P}/icons/oic_winlogo.ico" dlls/user32/resources/ || die
350 +
351 + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
352 +}
353 +
354 +src_configure() {
355 + wine_compiler_check || die
356 +
357 + export LDCONFIG=/bin/true
358 + use custom-cflags || strip-flags
359 +
360 + multilib-minimal_src_configure
361 +}
362 +
363 +multilib_src_configure() {
364 + local myconf=(
365 + --prefix="${MY_PREFIX}"
366 + --datarootdir="${MY_DATAROOTDIR}"
367 + --datadir="${MY_DATADIR}"
368 + --docdir="${MY_DOCDIR}"
369 + --includedir="${MY_INCLUDEDIR}"
370 + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
371 + --libexecdir="${MY_LIBEXECDIR}"
372 + --localstatedir="${MY_LOCALSTATEDIR}"
373 + --mandir="${MY_MANDIR}"
374 + --sysconfdir=/etc/wine
375 + $(use_with alsa)
376 + $(use_with capi)
377 + $(use_with lcms cms)
378 + $(use_with cups)
379 + $(use_with ncurses curses)
380 + $(use_with udisks dbus)
381 + $(use_with fontconfig)
382 + $(use_with ssl gnutls)
383 + $(use_enable gecko mshtml)
384 + $(use_with gphoto2 gphoto)
385 + $(use_with gsm)
386 + $(use_with gstreamer)
387 + --without-hal
388 + $(use_with jpeg)
389 + $(use_with ldap)
390 + $(use_enable mono mscoree)
391 + $(use_with mp3 mpg123)
392 + $(use_with netapi)
393 + $(use_with nls gettext)
394 + $(use_with openal)
395 + $(use_with opencl)
396 + $(use_with opengl)
397 + $(use_with osmesa)
398 + $(use_with oss)
399 + $(use_with pcap)
400 + $(use_with png)
401 + $(use_with pulseaudio pulse)
402 + $(use_with threads pthread)
403 + $(use_with scanner sane)
404 + $(use_enable test tests)
405 + $(use_with truetype freetype)
406 + $(use_with udev)
407 + $(use_with v4l)
408 + $(use_with X x)
409 + $(use_with xcomposite)
410 + $(use_with xinerama)
411 + $(use_with xml)
412 + $(use_with xml xslt)
413 + )
414 +
415 + local PKG_CONFIG AR RANLIB
416 + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
417 + # set AR and RANLIB to make QA scripts happy; #483342
418 + tc-export PKG_CONFIG AR RANLIB
419 +
420 + if use amd64; then
421 + if [[ ${ABI} == amd64 ]]; then
422 + myconf+=( --enable-win64 )
423 + else
424 + myconf+=( --disable-win64 )
425 + fi
426 +
427 + # Note: using --with-wine64 results in problems with multilib.eclass
428 + # CC/LD hackery. We're using separate tools instead.
429 + fi
430 +
431 + ECONF_SOURCE=${S} \
432 + econf "${myconf[@]}"
433 + emake depend
434 +}
435 +
436 +multilib_src_test() {
437 + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
438 + if [[ ${ABI} == x86 ]]; then
439 + if [[ $(id -u) == 0 ]]; then
440 + ewarn "Skipping tests since they cannot be run under the root user."
441 + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
442 + return
443 + fi
444 +
445 + WINEPREFIX="${T}/.wine-${ABI}" \
446 + Xemake test
447 + fi
448 +}
449 +
450 +multilib_src_install_all() {
451 + local DOCS=( ANNOUNCE AUTHORS README )
452 + add_locale_docs() {
453 + local locale_doc="documentation/README.$1"
454 + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
455 + }
456 + l10n_for_each_locale_do add_locale_docs
457 +
458 + einstalldocs
459 + prune_libtool_files --all
460 +
461 + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
462 + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
463 + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
464 + fi
465 +
466 + # Remove wineconsole if neither backend is installed #551124
467 + if ! use X && ! use ncurses; then
468 + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
469 + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
470 + rm_wineconsole() {
471 + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
472 + }
473 + multilib_foreach_abi rm_wineconsole
474 + fi
475 +
476 + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
477 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
478 +
479 + if use abi_x86_64 && ! use abi_x86_32; then
480 + dosym "${MY_PREFIX}"/bin/wine{64,} # 404331
481 + dosym "${MY_PREFIX}"/bin/wine{64,}-preloader
482 + fi
483 +
484 + # Failglob for bin and man loops
485 + local glob_state=$(shopt -p failglob)
486 + shopt -s failglob
487 +
488 + # Make wrappers for binaries for handling multiple variants
489 + # Note: wrappers instead of symlinks because some are shell which use basename
490 + local b
491 + for b in "${D%/}${MY_PREFIX}"/bin/*; do
492 + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
493 + done
494 +
495 + # respect LINGUAS when installing man pages, #469418
496 + local l
497 + for l in de fr pl; do
498 + use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
499 + done
500 +
501 + eval "${glob_state}"
502 +}
503 +
504 +pkg_postinst() {
505 + eselect wine register ${P}
506 + if [[ ${PN} == "wine-vanilla" ]]; then
507 + eselect wine register --vanilla ${P} || die
508 + fi
509 +
510 + eselect wine update --all --if-unset || die
511 +
512 + fdo-mime_desktop_database_update
513 +
514 + if ! use gecko; then
515 + ewarn "Without Wine Gecko, wine prefixes will not have a default"
516 + ewarn "implementation of iexplore. Many older windows applications"
517 + ewarn "rely upon the existence of an iexplore implementation, so"
518 + ewarn "you will likely need to install an external one, like via winetricks"
519 + fi
520 + if ! use mono; then
521 + ewarn "Without Wine Mono, wine prefixes will not have a default"
522 + ewarn "implementation of .NET. Many windows applications rely upon"
523 + ewarn "the existence of a .NET implementation, so you will likely need"
524 + ewarn "to install an external one, like via winetricks"
525 + fi
526 +}
527 +
528 +pkg_prerm() {
529 + eselect wine deregister ${P}
530 + if [[ ${PN} == "wine-vanilla" ]]; then
531 + eselect wine deregister --vanilla ${P} || die
532 + fi
533 +
534 + eselect wine update --all --if-unset || die
535 +}
536 +
537 +pkg_postrm() {
538 + fdo-mime_desktop_database_update
539 +}