Gentoo Archives: gentoo-commits

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