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