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: Sun, 29 Oct 2017 21:00:17
Message-Id: 1509310801.3dab9baf3673a92d8d850852e91a2d04baf96976.np-hardass@gentoo
1 commit: 3dab9baf3673a92d8d850852e91a2d04baf96976
2 Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 24 06:50:31 2017 +0000
4 Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 29 21:00:01 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dab9baf
7
8 app-emulation/wine-vanilla: Bump to 2.19
9
10 Package-Manager: Portage-2.3.12, Repoman-2.3.3
11
12 app-emulation/wine-vanilla/Manifest | 1 +
13 .../wine-vanilla/wine-vanilla-2.19.ebuild | 521 +++++++++++++++++++++
14 2 files changed, 522 insertions(+)
15
16 diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
17 index fc1c90266e9..bbf9ead8882 100644
18 --- a/app-emulation/wine-vanilla/Manifest
19 +++ b/app-emulation/wine-vanilla/Manifest
20 @@ -12,6 +12,7 @@ DIST wine-2.15.tar.xz 19463720 SHA256 d82d500cbf81fb08c711d3619bd52373138a05574d
21 DIST wine-2.16.tar.xz 19484716 SHA256 a561edcabecd6c44948e5b2ef11941b2ba047275240418fa2c98c1fdceda2c21 SHA512 749a36b536506c4b63ff7512e316f44503cdb0db46e38a124da86df638f3e8ff9c404b034ece5cbb95cf20c09bc46be9a38f2ee66480aa6a4f2385e2a7a7eea4 WHIRLPOOL 92ae0a427d89b24d41d4565e333cf3b7499c1dfedb6d2a204f934975c35cb589d38b4f669890c1fd6a37b9fe8f34d98be3e7d0986e9ff99516fe00a004574520
22 DIST wine-2.17.tar.xz 19505528 SHA256 7edc95739043ccc55957af663fb910318283dc5d1db42cd7f0224e30acfcea69 SHA512 cb10c876e689aa601c68673aab32c0514dd174692a01bdb3afc78d5e6079b0e77f48783af2f54245f397c762da3b4e5f2c1d39d2ce7fdb3b117d338b95c24810 WHIRLPOOL 196427a68ab3b1261cb63bafd7f82b7a688ad439fa82ae3fc04b18c9da14cc8e95b827ca8ddd07124e1179c55ed0e0aba3bdcb4639b724a6dacf4952e8827e16
23 DIST wine-2.18.tar.xz 19546360 SHA256 9f0931129878157d717cb39f16cd33bf49f40aac77331c93d0ad30f2ccac4f50 SHA512 61cc39fa3d2b0a0ab3c5d17579865e6aea76dd9513a4b3c45975a2d5c05f2b4ba952b97eef547131a014763c7f692a08df29bc2ebf7e4ac7e2616e6a7822ddb9 WHIRLPOOL e864dd1705c0480d3f3095aa02ab1e7bc5b41693cd6b791cdf05e636c7099562020ac3adcba6421653efdf5dbe232b5abe9071792785e008ea30dedbb63e080e
24 +DIST wine-2.19.tar.xz 19549464 SHA256 487131e69875ae9c2d042798f954160146e603e449c3c97981f29b42f4a66095 SHA512 83558231bdc592b1f69cfedf6c689063df7bd9fecdfafba6fb7f6a2c7fa7783973efb85a6a49305afc18b1aa268209ee5b9c0655756e05d7550468698dfa51ae WHIRLPOOL 123aec3a367e67353655d940ba2ffe9386a583afbd0961dd3f446a00b0cf82ad4ed590508e03bf2a4e60b11753f8f430e748e6614f476675423f3bdaf7089288
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.19.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.19.ebuild
30 new file mode 100644
31 index 00000000000..8851cfc5ac4
32 --- /dev/null
33 +++ b/app-emulation/wine-vanilla/wine-vanilla-2.19.ebuild
34 @@ -0,0 +1,521 @@
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"
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 +GWP_V="20170830"
62 +PATCHDIR="${WORKDIR}/gentoo-wine-patches"
63 +
64 +DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
65 +HOMEPAGE="https://www.winehq.org/"
66 +SRC_URI="${SRC_URI}
67 + https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
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 + dev-util/patchbin
170 + sys-devel/flex
171 + >=sys-kernel/linux-headers-2.6
172 + virtual/pkgconfig
173 + virtual/yacc
174 + X? (
175 + x11-proto/inputproto
176 + x11-proto/xextproto
177 + x11-proto/xf86vidmodeproto
178 + )
179 + prelink? ( sys-devel/prelink )
180 + xinerama? ( x11-proto/xineramaproto )"
181 +
182 +# These use a non-standard "Wine" category, which is provided by
183 +# /etc/xdg/applications-merged/wine.menu
184 +QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
185 +usr/share/applications/wine-notepad.desktop
186 +usr/share/applications/wine-uninstaller.desktop
187 +usr/share/applications/wine-winecfg.desktop"
188 +
189 +wine_compiler_check() {
190 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
191 +
192 + # GCC-specific bugs
193 + if tc-is-gcc; then
194 + # bug #549768
195 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
196 + ebegin "Checking for gcc-5 ms_abi compiler bug"
197 + $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
198 + # Run in subshell to prevent "Aborted" message
199 + ( "${T}"/pr66838 || false ) >/dev/null 2>&1
200 + if ! eend $?; then
201 + eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
202 + eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
203 + eerror "or use gcc-config to select a different compiler version."
204 + eerror "See https://bugs.gentoo.org/549768"
205 + eerror
206 + return 1
207 + fi
208 + fi
209 + # bug #574044
210 + if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
211 + ebegin "Checking for gcc-5-3 stack realignment compiler bug"
212 + # Compile in subshell to prevent "Aborted" message
213 + ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
214 + if ! eend $?; then
215 + eerror "Wine cannot be built with this version of gcc-5.3"
216 + eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
217 + eerror "or use gcc-config to select a different compiler version."
218 + eerror "See https://bugs.gentoo.org/574044"
219 + eerror
220 + return 1
221 + fi
222 + fi
223 + fi
224 +
225 + # Ensure compiler support
226 + if use abi_x86_64; then
227 + ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
228 + # Compile in subshell to prevent "Aborted" message
229 + ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
230 + if ! eend $?; then
231 + eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
232 + eerror
233 + eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
234 + eerror
235 + return 1
236 + fi
237 + fi
238 +}
239 +
240 +wine_build_environment_check() {
241 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
242 +
243 + if use abi_x86_64; then
244 + if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
245 + eerror "You need gcc-4.4+ to compile 64-bit wine"
246 + die
247 + elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
248 + eerror "You need clang-3.8+ to compile 64-bit wine"
249 + die
250 + fi
251 + fi
252 + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
253 + ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
254 + ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
255 + ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
256 + fi
257 + if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
258 + if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
259 + ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
260 + ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
261 + ewarn "See package.env in man 5 portage for more information on how to do this."
262 + ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
263 + fi
264 + fi
265 +
266 + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
267 + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
268 + eerror "See https://bugs.gentoo.org/487864 for more details."
269 + eerror
270 + return 1
271 + fi
272 +}
273 +
274 +wine_env_vcs_vars() {
275 + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
276 + local pn_live_val="${pn_live_var}"
277 + eval pn_live_val='$'${pn_live_val}
278 + if [[ ! -z ${EGIT_COMMIT} ]]; then
279 + eerror "Commits must now be specified using the environmental variables"
280 + eerror "WINE_COMMIT"
281 + eerror
282 + return 1
283 + fi
284 +}
285 +
286 +pkg_pretend() {
287 + wine_build_environment_check || die
288 +
289 + # Verify OSS support
290 + if use oss && ! use kernel_FreeBSD; then
291 + if ! has_version ">=media-sound/oss-4"; then
292 + eerror "You cannot build wine with USE=oss without having support from a"
293 + eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
294 + eerror
295 + die
296 + fi
297 + fi
298 +}
299 +
300 +pkg_setup() {
301 + wine_build_environment_check || die
302 + wine_env_vcs_vars || die
303 +
304 + WINE_VARIANT="${PN#wine}-${PV}"
305 + WINE_VARIANT="${WINE_VARIANT#-}"
306 +
307 + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
308 + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
309 + MY_DATADIR="${MY_DATAROOTDIR}"
310 + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
311 + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
312 + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
313 + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
314 + MY_MANDIR="${MY_DATADIR}/man"
315 +}
316 +
317 +src_unpack() {
318 + if [[ ${PV} == "9999" ]] ; then
319 + EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
320 + fi
321 +
322 + default
323 +
324 + l10n_find_plocales_changes "${S}/po" "" ".po"
325 +}
326 +
327 +src_prepare() {
328 +
329 + eapply_bin(){
330 + local patch
331 + for patch in ${PATCHES_BIN[@]}; do
332 + patchbin --nogit < "${patch}" || die
333 + done
334 + }
335 +
336 + local md5="$(md5sum server/protocol.def)"
337 + local PATCHES=(
338 + "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
339 + "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
340 + "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
341 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch"
342 + )
343 + local PATCHES_BIN=(
344 + )
345 +
346 + default
347 + eapply_bin
348 + eautoreconf
349 +
350 + # Modification of the server protocol requires regenerating the server requests
351 + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
352 + einfo "server/protocol.def was patched; running tools/make_requests"
353 + tools/make_requests || die #432348
354 + fi
355 + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
356 + if ! use run-exes; then
357 + sed -i '/^MimeType/d' loader/wine.desktop || die #117785
358 + fi
359 +
360 + # Edit wine.desktop to work for specific variant
361 + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
362 +
363 + # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
364 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
365 +
366 + l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
367 +}
368 +
369 +src_configure() {
370 + wine_compiler_check || die
371 +
372 + export LDCONFIG=/bin/true
373 + use custom-cflags || strip-flags
374 +
375 + multilib-minimal_src_configure
376 +}
377 +
378 +multilib_src_configure() {
379 + local myconf=(
380 + --prefix="${MY_PREFIX}"
381 + --datarootdir="${MY_DATAROOTDIR}"
382 + --datadir="${MY_DATADIR}"
383 + --docdir="${MY_DOCDIR}"
384 + --includedir="${MY_INCLUDEDIR}"
385 + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
386 + --libexecdir="${MY_LIBEXECDIR}"
387 + --localstatedir="${MY_LOCALSTATEDIR}"
388 + --mandir="${MY_MANDIR}"
389 + --sysconfdir=/etc/wine
390 + $(use_with alsa)
391 + $(use_with capi)
392 + $(use_with lcms cms)
393 + $(use_with cups)
394 + $(use_with ncurses curses)
395 + $(use_with udisks dbus)
396 + $(use_with fontconfig)
397 + $(use_with ssl gnutls)
398 + $(use_enable gecko mshtml)
399 + $(use_with gphoto2 gphoto)
400 + $(use_with gsm)
401 + $(use_with gstreamer)
402 + --without-hal
403 + $(use_with jpeg)
404 + $(use_with ldap)
405 + $(use_enable mono mscoree)
406 + $(use_with mp3 mpg123)
407 + $(use_with netapi)
408 + $(use_with nls gettext)
409 + $(use_with openal)
410 + $(use_with opencl)
411 + $(use_with opengl)
412 + $(use_with osmesa)
413 + $(use_with oss)
414 + $(use_with pcap)
415 + $(use_with png)
416 + $(use_with pulseaudio pulse)
417 + $(use_with threads pthread)
418 + $(use_with scanner sane)
419 + $(use_enable test tests)
420 + $(use_with truetype freetype)
421 + $(use_with udev)
422 + $(use_with v4l)
423 + $(use_with X x)
424 + $(use_with X xfixes)
425 + $(use_with xcomposite)
426 + $(use_with xinerama)
427 + $(use_with xml)
428 + $(use_with xml xslt)
429 + )
430 +
431 + local PKG_CONFIG AR RANLIB
432 + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
433 + # set AR and RANLIB to make QA scripts happy; #483342
434 + tc-export PKG_CONFIG AR RANLIB
435 +
436 + if use amd64; then
437 + if [[ ${ABI} == amd64 ]]; then
438 + myconf+=( --enable-win64 )
439 + else
440 + myconf+=( --disable-win64 )
441 + fi
442 +
443 + # Note: using --with-wine64 results in problems with multilib.eclass
444 + # CC/LD hackery. We're using separate tools instead.
445 + fi
446 +
447 + ECONF_SOURCE=${S} \
448 + econf "${myconf[@]}"
449 + emake depend
450 +}
451 +
452 +multilib_src_test() {
453 + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
454 + if [[ ${ABI} == x86 ]]; then
455 + if [[ $(id -u) == 0 ]]; then
456 + ewarn "Skipping tests since they cannot be run under the root user."
457 + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
458 + return
459 + fi
460 +
461 + WINEPREFIX="${T}/.wine-${ABI}" \
462 + Xemake test
463 + fi
464 +}
465 +
466 +multilib_src_install_all() {
467 + local DOCS=( ANNOUNCE AUTHORS README )
468 + add_locale_docs() {
469 + local locale_doc="documentation/README.$1"
470 + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
471 + }
472 + l10n_for_each_locale_do add_locale_docs
473 +
474 + einstalldocs
475 + prune_libtool_files --all
476 +
477 + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
478 + rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
479 + "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
480 + fi
481 +
482 + # Remove wineconsole if neither backend is installed #551124
483 + if ! use X && ! use ncurses; then
484 + rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
485 + rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
486 + rm_wineconsole() {
487 + rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
488 + }
489 + multilib_foreach_abi rm_wineconsole
490 + fi
491 +
492 + use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
493 + use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
494 +
495 + if use abi_x86_64 && ! use abi_x86_32; then
496 + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
497 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
498 + fi
499 +
500 + # Failglob for bin and man loops
501 + local glob_state=$(shopt -p failglob)
502 + shopt -s failglob
503 +
504 + # Make wrappers for binaries for handling multiple variants
505 + # Note: wrappers instead of symlinks because some are shell which use basename
506 + local b
507 + for b in "${D%/}${MY_PREFIX}"/bin/*; do
508 + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
509 + done
510 +
511 + # respect LINGUAS when installing man pages, #469418
512 + local l
513 + for l in de fr pl; do
514 + use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}*
515 + done
516 +
517 + eval "${glob_state}"
518 +}
519 +
520 +pkg_postinst() {
521 + eselect wine register ${P}
522 + if [[ ${PN} == "wine-vanilla" ]]; then
523 + eselect wine register --vanilla ${P} || die
524 + fi
525 +
526 + eselect wine update --all --if-unset || die
527 +
528 + xdg_desktop_database_update
529 +
530 + if ! use gecko; then
531 + ewarn "Without Wine Gecko, wine prefixes will not have a default"
532 + ewarn "implementation of iexplore. Many older windows applications"
533 + ewarn "rely upon the existence of an iexplore implementation, so"
534 + ewarn "you will likely need to install an external one, like via winetricks"
535 + fi
536 + if ! use mono; then
537 + ewarn "Without Wine Mono, wine prefixes will not have a default"
538 + ewarn "implementation of .NET. Many windows applications rely upon"
539 + ewarn "the existence of a .NET implementation, so you will likely need"
540 + ewarn "to install an external one, like via winetricks"
541 + fi
542 +}
543 +
544 +pkg_prerm() {
545 + eselect wine deregister ${P}
546 + if [[ ${PN} == "wine-vanilla" ]]; then
547 + eselect wine deregister --vanilla ${P} || die
548 + fi
549 +
550 + eselect wine update --all --if-unset || die
551 +}
552 +
553 +pkg_postrm() {
554 + xdg_desktop_database_update
555 +}