Gentoo Archives: gentoo-commits

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