Gentoo Archives: gentoo-commits

From: NP Hardass <np-hardass@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/wine:master commit in: app-emulation/wine-vanilla/
Date: Fri, 02 Mar 2018 02:02:21
Message-Id: 1519943120.114a082eed0ba5b634a21bc3ccf74973b74d7148.np-hardass@gentoo
1 commit: 114a082eed0ba5b634a21bc3ccf74973b74d7148
2 Author: Lucian Poston <lucian.poston <AT> gmail <DOT> com>
3 AuthorDate: Fri Feb 2 20:51:07 2018 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 1 22:25:20 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=114a082e
7
8 app-emulation/wine-vanilla: Bump to 3.1
9
10 Package-Manager: Portage-2.3.19, Repoman-2.3.6
11 Signed-off-by: NP-Hardass <NP-Hardass <AT> gentoo.org>
12
13 app-emulation/wine-vanilla/Manifest | 1 +
14 app-emulation/wine-vanilla/wine-vanilla-3.1.ebuild | 547 +++++++++++++++++++++
15 2 files changed, 548 insertions(+)
16
17 diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
18 index e066695..0ac67ce 100644
19 --- a/app-emulation/wine-vanilla/Manifest
20 +++ b/app-emulation/wine-vanilla/Manifest
21 @@ -27,3 +27,4 @@ DIST wine-2.7.tar.xz 19101108 SHA256 e55a43088e313c45f7ab49272b7cb441c06f5659fb4
22 DIST wine-2.8.tar.xz 19120740 SHA256 83e9607af66d86020dc27a368ebba28fa7e8ffecfdf8f149da06b3531ac3e579 SHA512 4d0b167b1e5add31ed0ed05b328d16fc13cd268285c03a9100e7ddc53864aa07f6b216a555ef0c2e51dee550e3f4abf0c7c20db2cbca177bb38e8c3e11f05b97 WHIRLPOOL 568cf46caf7322eb5e26b364bd15f9e80c41a65340952a1ee0fa80514bbee3c5adfa72af40809a978a5d4202f5e8d3da3e4581767bab9fa08ab441cdd5d1da31
23 DIST wine-2.9.tar.xz 19154668 SHA256 ac46f7bbbbc1dc135c95e4f98d28bf6e3d7a78fb7f9ba6caa7354a3e8786545f SHA512 6d06e511d8f338297ed0ddb7bf2ffb501f528209eaecbbee3d4e5d53db649dd5ea0aeb78bba661a9bcfda5f97e170ca10eb8fab355e229bfe7db6a5feb7ec4e8 WHIRLPOOL 7355166aeaac54abb6e1d25da6f87a4814d37764044e95462bc2a83f8d5a9b7a3bb10730bb5506516e130a4fc9ee35e3656d1106939bbbc1310c6aff0d798a1c
24 DIST wine-3.0.tar.xz 19712932 SHA256 346a050aca5cd0d9978a655af11c30e68c201a58aea0c70d5e4c4f1b63c2fbec SHA512 a51f41b66f4805e09b223528eff6670e94b9c0c0c947be647507baf9d8d9afe7c3fdc88684c2c8d3573b4739d9a086ab929a744a8594d3c8f6ceb52070f43f0a WHIRLPOOL 85a44fb122cae5b15487e9b637bf4793cd023ef1429a642333a669c4dfe4b41c82ac31f2e4f2a43595add70a9d226a7f343b373f5ed2f65cc2e66b1425cc9c4a
25 +DIST wine-3.1.tar.xz 19730700 SHA256 0f33c021b9fdd35954c812dc09dc243f13796c254b41bb5fc47250f7cca42099 SHA512 49c30d820b8f4028935b4d90dd6251c881cb8cd41bde8833db2782f04111a3d111e24605a87b2d70e419d54cfb6bb42d941f4593f9b381812e3602bf1307c545 WHIRLPOOL 98c84221f34ceeaa9e428b8fbf4893a030cfec0f0f5655e24810d0234db14eb478798ab2f09f6a771ea19c03f97f3a0367ca6134a46182c21bb9545ae022dee3
26
27 diff --git a/app-emulation/wine-vanilla/wine-vanilla-3.1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-3.1.ebuild
28 new file mode 100644
29 index 0000000..1c122ab
30 --- /dev/null
31 +++ b/app-emulation/wine-vanilla/wine-vanilla-3.1.ebuild
32 @@ -0,0 +1,547 @@
33 +# Copyright 1999-2018 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 estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
42 +
43 +MY_PN="${PN%%-*}"
44 +MY_P="${MY_PN}-${PV}"
45 +
46 +if [[ ${PV} == "9999" ]] ; then
47 + EGIT_REPO_URI="https://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 +GWP_V="20180120"
60 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
61 +
62 +DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
63 +HOMEPAGE="https://www.winehq.org/"
64 +SRC_URI="${SRC_URI}
65 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
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 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"
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/libXfixes[${MULTILIB_USEDEP}]
86 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
87 + x11-libs/libXi[${MULTILIB_USEDEP}]
88 + x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
89 + )
90 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
91 + capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
92 + cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
93 + fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
94 + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
95 + gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
96 + gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
97 + gstreamer? (
98 + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
99 + media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
100 + )
101 + jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
102 + kerberos? ( virtual/krb5[${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 +PATCHES=(
189 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
190 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
191 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
192 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
193 + "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
194 +)
195 +PATCHES_BIN=()
196 +
197 +# https://bugs.gentoo.org/show_bug.cgi?id=635222
198 +if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
199 + DEPEND+=" dev-util/patchbin"
200 +fi
201 +
202 +wine_compiler_check() {
203 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
204 +
205 + # GCC-specific bugs
206 + if tc-is-gcc; then
207 + # bug #549768
208 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
209 + ebegin "Checking for gcc-5 ms_abi compiler bug"
210 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
211 + # Run in subshell to prevent "Aborted" message
212 + ( "${T}"/pr66838 || false ) >/dev/null 2>&1
213 + if ! eend $?; then
214 + eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
215 + eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
216 + eerror "or use gcc-config to select a different compiler version."
217 + eerror "See https://bugs.gentoo.org/549768"
218 + eerror
219 + return 1
220 + fi
221 + fi
222 + # bug #574044
223 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
224 + ebegin "Checking for gcc-5-3 stack realignment compiler bug"
225 + # Compile in subshell to prevent "Aborted" message
226 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
227 + if ! eend $?; then
228 + eerror "Wine cannot be built with this version of gcc-5.3"
229 + eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
230 + eerror "or use gcc-config to select a different compiler version."
231 + eerror "See https://bugs.gentoo.org/574044"
232 + eerror
233 + return 1
234 + fi
235 + fi
236 + fi
237 +
238 + # Ensure compiler support
239 + if use abi_x86_64; then
240 + ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
241 + # Compile in subshell to prevent "Aborted" message
242 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
243 + if ! eend $?; then
244 + eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
245 + eerror
246 + eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
247 + eerror
248 + return 1
249 + fi
250 + fi
251 +}
252 +
253 +wine_build_environment_check() {
254 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
255 +
256 + if use abi_x86_64; then
257 + if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
258 + eerror "You need gcc-4.4+ to compile 64-bit wine"
259 + die
260 + elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
261 + eerror "You need clang-3.8+ to compile 64-bit wine"
262 + die
263 + fi
264 + fi
265 + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
266 + ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
267 + ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
268 + ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
269 + fi
270 + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
271 + if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
272 + ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
273 + ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
274 + ewarn "See package.env in man 5 portage for more information on how to do this."
275 + ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
276 + fi
277 + fi
278 +
279 + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
280 + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
281 + eerror "See https://bugs.gentoo.org/487864 for more details."
282 + eerror
283 + return 1
284 + fi
285 +}
286 +
287 +wine_env_vcs_vars() {
288 + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
289 + local pn_live_val="${pn_live_var}"
290 + eval pn_live_val='$'${pn_live_val}
291 + if [[ ! -z ${EGIT_COMMIT} ]]; then
292 + eerror "Commits must now be specified using the environmental variables"
293 + eerror "WINE_COMMIT"
294 + eerror
295 + return 1
296 + fi
297 +}
298 +
299 +pkg_pretend() {
300 + wine_build_environment_check || die
301 +
302 + # Verify OSS support
303 + if use oss && ! use kernel_FreeBSD; then
304 + if ! has_version ">=media-sound/oss-4"; then
305 + eerror "You cannot build wine with USE=oss without having support from a"
306 + eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
307 + eerror
308 + die
309 + fi
310 + fi
311 +}
312 +
313 +pkg_setup() {
314 + wine_build_environment_check || die
315 + wine_env_vcs_vars || die
316 +
317 + WINE_VARIANT="${PN#wine}-${PV}"
318 + WINE_VARIANT="${WINE_VARIANT#-}"
319 +
320 + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
321 + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
322 + MY_DATADIR="${MY_DATAROOTDIR}"
323 + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
324 + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
325 + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
326 + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
327 + MY_MANDIR="${MY_DATADIR}/man"
328 +}
329 +
330 +src_unpack() {
331 + if [[ ${PV} == "9999" ]] ; then
332 + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
333 + fi
334 +
335 + default
336 +
337 + l10n_find_plocales_changes "${S}/po" "" ".po"
338 +}
339 +
340 +src_prepare() {
341 +
342 + eapply_bin(){
343 + local patch
344 + for patch in ${PATCHES_BIN[@]}; do
345 + patchbin --nogit < "${patch}" || die
346 + done
347 + }
348 +
349 + local md5="$(md5sum server/protocol.def)"
350 +
351 + default
352 + eapply_bin
353 + eautoreconf
354 +
355 + # Modification of the server protocol requires regenerating the server requests
356 + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
357 + einfo "server/protocol.def was patched; running tools/make_requests"
358 + tools/make_requests || die #432348
359 + fi
360 + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
361 + if ! use run-exes; then
362 + sed -i '/^MimeType/d' loader/wine.desktop || die #117785
363 + fi
364 +
365 + # Edit wine.desktop to work for specific variant
366 + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
367 +
368 + # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
369 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
370 +
371 + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
372 +
373 + # Fix manpage generation for locales #469418 and abi_x86_64 #617864
374 + # Requires wine-2.0-rearrange-manpages.patch
375 +
376 + # Duplicate manpages input files for wine64
377 + local f
378 + for f in loader/*.man.in; do
379 + cp ${f} ${f/wine/wine64} || die
380 + done
381 + # Add wine64 manpages to Makefile
382 + if use abi_x86_64; then
383 + sed -i "/wine.man.in/i \
384 + \\\twine64.man.in \\\\" loader/Makefile.in || die
385 + sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
386 +\164\2/' loader/Makefile.in || die
387 + fi
388 +
389 + rm_man_file(){
390 + local file="${1}"
391 + loc=${2}
392 + sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
393 + }
394 +
395 + while read f; do
396 + l10n_for_each_disabled_locale_do rm_man_file "${f}"
397 + done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
398 +}
399 +
400 +src_configure() {
401 + wine_compiler_check || die
402 +
403 + export LDCONFIG=/bin/true
404 + use custom-cflags || strip-flags
405 +
406 + multilib-minimal_src_configure
407 +}
408 +
409 +multilib_src_configure() {
410 + local myconf=(
411 + --prefix="${MY_PREFIX}"
412 + --datarootdir="${MY_DATAROOTDIR}"
413 + --datadir="${MY_DATADIR}"
414 + --docdir="${MY_DOCDIR}"
415 + --includedir="${MY_INCLUDEDIR}"
416 + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
417 + --libexecdir="${MY_LIBEXECDIR}"
418 + --localstatedir="${MY_LOCALSTATEDIR}"
419 + --mandir="${MY_MANDIR}"
420 + --sysconfdir=/etc/wine
421 + $(use_with alsa)
422 + $(use_with capi)
423 + $(use_with lcms cms)
424 + $(use_with cups)
425 + $(use_with ncurses curses)
426 + $(use_with udisks dbus)
427 + $(use_with fontconfig)
428 + $(use_with ssl gnutls)
429 + $(use_enable gecko mshtml)
430 + $(use_with gphoto2 gphoto)
431 + $(use_with gsm)
432 + $(use_with gssapi)
433 + $(use_with gstreamer)
434 + --without-hal
435 + $(use_with jpeg)
436 + $(use_with kerberos krb5)
437 + $(use_with ldap)
438 + $(use_enable mono mscoree)
439 + $(use_with mp3 mpg123)
440 + $(use_with netapi)
441 + $(use_with nls gettext)
442 + $(use_with openal)
443 + $(use_with opencl)
444 + $(use_with opengl)
445 + $(use_with osmesa)
446 + $(use_with oss)
447 + $(use_with pcap)
448 + $(use_with png)
449 + $(use_with pulseaudio pulse)
450 + $(use_with threads pthread)
451 + $(use_with scanner sane)
452 + $(use_enable test tests)
453 + $(use_with truetype freetype)
454 + $(use_with udev)
455 + $(use_with v4l)
456 + $(use_with X x)
457 + $(use_with X xfixes)
458 + $(use_with xcomposite)
459 + $(use_with xinerama)
460 + $(use_with xml)
461 + $(use_with xml xslt)
462 + )
463 +
464 + local PKG_CONFIG AR RANLIB
465 + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
466 + # set AR and RANLIB to make QA scripts happy; #483342
467 + tc-export PKG_CONFIG AR RANLIB
468 +
469 + if use amd64; then
470 + if [[ ${ABI} == amd64 ]]; then
471 + myconf+=( --enable-win64 )
472 + else
473 + myconf+=( --disable-win64 )
474 + fi
475 +
476 + # Note: using --with-wine64 results in problems with multilib.eclass
477 + # CC/LD hackery. We're using separate tools instead.
478 + fi
479 +
480 + ECONF_SOURCE=${S} \
481 + econf "${myconf[@]}"
482 + emake depend
483 +}
484 +
485 +multilib_src_test() {
486 + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
487 + if [[ ${ABI} == x86 ]]; then
488 + if [[ $(id -u) == 0 ]]; then
489 + ewarn "Skipping tests since they cannot be run under the root user."
490 + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
491 + return
492 + fi
493 +
494 + WINEPREFIX="${T}/.wine-${ABI}" \
495 + Xemake test
496 + fi
497 +}
498 +
499 +multilib_src_install_all() {
500 + local DOCS=( ANNOUNCE AUTHORS README )
501 + add_locale_docs() {
502 + local locale_doc="documentation/README.$1"
503 + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
504 + }
505 + l10n_for_each_locale_do add_locale_docs
506 +
507 + einstalldocs
508 + prune_libtool_files --all
509 +
510 + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
511 + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
512 + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
513 + fi
514 +
515 + # Remove wineconsole if neither backend is installed #551124
516 + if ! use X && ! use ncurses; then
517 + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
518 + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
519 + rm_wineconsole() {
520 + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
521 + }
522 + multilib_foreach_abi rm_wineconsole
523 + fi
524 +
525 + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
526 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
527 +
528 + if use abi_x86_64 && ! use abi_x86_32; then
529 + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
530 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
531 + fi
532 +
533 + # Failglob for binloops, shouldn't be necessary, but including to stay safe
534 + eshopts_push -s failglob #615218
535 + # Make wrappers for binaries for handling multiple variants
536 + # Note: wrappers instead of symlinks because some are shell which use basename
537 + local b
538 + for b in "${D%/}${MY_PREFIX}"/bin/*; do
539 + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
540 + done
541 + eshopts_pop
542 +}
543 +
544 +pkg_postinst() {
545 + eselect wine register ${P}
546 + if [[ ${PN} == "wine-vanilla" ]]; then
547 + eselect wine register --vanilla ${P} || die
548 + fi
549 +
550 + eselect wine update --all --if-unset || die
551 +
552 + xdg_desktop_database_update
553 +
554 + if ! use gecko; then
555 + ewarn "Without Wine Gecko, wine prefixes will not have a default"
556 + ewarn "implementation of iexplore. Many older windows applications"
557 + ewarn "rely upon the existence of an iexplore implementation, so"
558 + ewarn "you will likely need to install an external one, like via winetricks"
559 + fi
560 + if ! use mono; then
561 + ewarn "Without Wine Mono, wine prefixes will not have a default"
562 + ewarn "implementation of .NET. Many windows applications rely upon"
563 + ewarn "the existence of a .NET implementation, so you will likely need"
564 + ewarn "to install an external one, like via winetricks"
565 + fi
566 +}
567 +
568 +pkg_prerm() {
569 + eselect wine deregister ${P}
570 + if [[ ${PN} == "wine-vanilla" ]]; then
571 + eselect wine deregister --vanilla ${P} || die
572 + fi
573 +
574 + eselect wine update --all --if-unset || die
575 +}
576 +
577 +pkg_postrm() {
578 + xdg_desktop_database_update
579 +}