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: Sat, 30 Jul 2022 14:52:04
Message-Id: 1659192685.41f0e0d05a98a687b10bd592cc05ccecba31100b.sarnex@gentoo
1 commit: 41f0e0d05a98a687b10bd592cc05ccecba31100b
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 30 14:43:33 2022 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 30 14:51:25 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41f0e0d0
7
8 app-emulation/wine-staging: drop 7.10
9
10 Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
11
12 app-emulation/wine-staging/Manifest | 2 -
13 .../wine-staging/wine-staging-7.10.ebuild | 544 ---------------------
14 2 files changed, 546 deletions(-)
15
16 diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest
17 index 70caf507aba3..2fc70ba41df0 100644
18 --- a/app-emulation/wine-staging/Manifest
19 +++ b/app-emulation/wine-staging/Manifest
20 @@ -1,10 +1,8 @@
21 DIST gentoo-wine-patches-20211122.tar.xz 59796 BLAKE2B 21460e6adf4934a52f8841f76f234a764c2dc1ac77eeed1cee10adafec3aa723640ebd4b51559e9ef433070ac731c4648620bd9e75e99f31b2e2f494cf01f02d SHA512 a18cb320617e2157977032c38c322177a2d248f14e43051d38de595af171495546c93d5e71e0dbe1a4f326a2dc819bb03dcfd04454ac85bbcd6b1975ae5d9d96
22 -DIST wine-7.10.tar.xz 27915328 BLAKE2B fc778285cce52317d77461f0bce11d6e3214a536ecd42364d6cd31f609a23116fa582a7cb85873a99c61eb5cf5e1e3036e4d4d1887b87f75f501109ac3eb4625 SHA512 be460be6c3f6f54c20220287a7c4c9d41d27bd14fabb97b1f9824a4be361e38b2e2e51a621e0332d6c48934b1af425efaec92132f73e6d1270337ffbfcac2576
23 DIST wine-7.11.tar.xz 27975308 BLAKE2B 7031c950de4ee6d00c1006841a2d6fe55cebce644d354eb05cb963207b491a717c6ba7ce8f19c337167ec8bd6c1480427112a32b4363db745e99461be5917c77 SHA512 aff6a5996ba7336d97c59a1402688b109e6cca123c60fa6f03813d81ad6478f4ed4a62fb7813dc6952cca7ec1250182730873f3ac17f0855bbf000bf3c1d86fe
24 DIST wine-7.12.tar.xz 28221024 BLAKE2B 551f37360a6dd2c535b5b1a9896cd9c9c091d56c4d2f3d2988092d48d54aa447fc0dad18034bad7b7beaa9c6587071e8d32bd08092a9ba93acb39dac9ddfc391 SHA512 4746fb1c3d0ec7f20e22d821f8e88e5415b85cb60f53e9ad61b89e8321b6a6b2999eb2b70c7ac46477f633bccb6c2aba49ce2655c380cb85cd5c71dbe4af50b4
25 DIST wine-7.13.tar.xz 28237664 BLAKE2B f65f6ab2ec159d0a25b44e6bcbc83db2c5ada6b0c39dd0e3fe86db74bb964d0b1bcba85e5300d5140e24c305b7e30a58953e7582df8a2117ce5d8127538f484b SHA512 2eca3aa80afa19dd0cc3cfeb8b58b78d22d2925b8201e0b7278638084a529870c1468ffc300e6a1bb343d0f0c7e28c2b3bb6c59af15dec43b8f6c1eb78b46c1e
26 DIST wine-7.14.tar.xz 28274396 BLAKE2B 632c4c77a5b93597b8b217a04e34a4867d9e34497322cbcdf89d3bd2c98ee2ce27983582e1aa6737ec6bf5e080f64bcb4813f3e5c83b67cebd36895251a07e2f SHA512 6727be4a23b1911b36c44ac8d347be1c98bb53e67101355d6ae829d14a3a0867ba83f77a52f4dbc02a35c3b513291dd4800148a31d28f50069d199fdee04b6e9
27 -DIST wine-staging-7.10.tar.gz 9646352 BLAKE2B acb68df0b79c5912ecfc400ac7b40fd0205908ce7edb06f69fa4c8e7a3c94d33551b98c7ae2aadded65c012aaf1b7990ac7aeefb37e7c07779aaeceb7d74397e SHA512 7c2aa5ec78f12ef3415f7e3615775f8a0a727f6e5bb0173f5746934166dbec5d4edfaa572d3fe26ef62fe933772346495a6c618d58ee0a6374028a158beb05c8
28 DIST wine-staging-7.11.tar.gz 9643832 BLAKE2B d215353a0163011b964d24d6e0cb3011286ce8d9ad6b42ad2bd389cb65c214db01a67a6f37db3eedd36d34995d7423112bbddbd06abbcbc5bb5f0d565d06a157 SHA512 5985f7536f7d0a8bedcfcdf095861a06589ea6ad9896c87043ca88f9ef3c4bc9854931b51b64471e361378f332cea70adc58ef9303e9e5d1a6dcc9789761c187
29 DIST wine-staging-7.12.tar.gz 9644343 BLAKE2B 760b34abf245b8d2e5baed13db57a841bba73f9dd6652f958428fec3617000cdc00d6f3ac305f4b580cf462938a56ef9a6f0c6931306c25ce82b7fe4da314d9f SHA512 0cf7554011835052b75a836fca89c6cf9b5fa1653c96a82b0dcd3cf40147602eebaf81aa6b94348432371bef9550c8dc21c9cf7d78b49a422bd113e8a6a8e3b0
30 DIST wine-staging-7.13.tar.gz 9644182 BLAKE2B 1fecdd231e93de44d4327cceef0f72759de331b507ea16cd39749be3195716883a5327804f6379ca563e635fbf317d131d6cf87e4b49f177a45116ee3be55527 SHA512 f0fbd0d96272e457006d0eac350905e2fd27b472943d08771b4cd1cde88afefeb239e46f88979bcb7d45d525610f5d69c74bf8294b101e064ca2051494ab3127
31
32 diff --git a/app-emulation/wine-staging/wine-staging-7.10.ebuild b/app-emulation/wine-staging/wine-staging-7.10.ebuild
33 deleted file mode 100644
34 index 7c7e3938e005..000000000000
35 --- a/app-emulation/wine-staging/wine-staging-7.10.ebuild
36 +++ /dev/null
37 @@ -1,544 +0,0 @@
38 -# Copyright 1999-2022 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=8
42 -
43 -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"
44 -PLOCALE_BACKUP="en"
45 -
46 -inherit autotools estack flag-o-matic multilib-minimal pax-utils plocale toolchain-funcs virtualx wrapper xdg-utils
47 -MY_PN="${PN%%-*}"
48 -MY_PV="${PV/_/-}"
49 -MY_P="${MY_PN}-${MY_PV}"
50 -
51 -if [[ ${MY_PV} == "9999" ]] ; then
52 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
53 - EGIT_BRANCH="master"
54 - inherit git-r3
55 - SRC_URI=""
56 - #KEYWORDS=""
57 -else
58 - MAJOR_V=$(ver_cut 1)
59 - MINOR_V=$(ver_cut 2)
60 - if [[ ${MINOR_V} != "0" ]] ; then
61 - MINOR_V="x"
62 - fi
63 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.${MINOR_V}/${MY_P}.tar.xz"
64 - KEYWORDS="-* ~amd64 ~x86"
65 -fi
66 -S="${WORKDIR}/${MY_P}"
67 -
68 -STAGING_P="wine-staging-${MY_PV}"
69 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
70 -GWP_V="20211122"
71 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
72 -
73 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
74 -HOMEPAGE="https://www.winehq.org/"
75 -SRC_URI="${SRC_URI}
76 - https://dev.gentoo.org/~sarnex/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
77 -"
78 -
79 -if [[ ${MY_PV} == "9999" ]] ; then
80 - STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git"
81 -else
82 - SRC_URI="${SRC_URI}
83 - staging? ( https://github.com/wine-staging/wine-staging/archive/v${MY_PV}.tar.gz -> ${STAGING_P}.tar.gz )"
84 -fi
85 -
86 -LICENSE="LGPL-2.1"
87 -SLOT="${MY_PV}"
88 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vulkan +X +xcomposite xinerama"
89 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
90 - X? ( truetype )
91 - crossdev-mingw? ( mingw )
92 - elibc_glibc? ( threads )
93 - osmesa? ( opengl )
94 - pipelight? ( staging )
95 - test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124
96 -
97 -# FIXME: the test suite is unsuitable for us; many tests require net access
98 -# or fail due to Xvfb's opengl limitations.
99 -RESTRICT="test"
100 -
101 -BDEPEND="sys-devel/flex
102 - virtual/yacc
103 - virtual/pkgconfig
104 - mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) )"
105 -
106 -COMMON_DEPEND="
107 - X? (
108 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
109 - x11-libs/libXext[${MULTILIB_USEDEP}]
110 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
111 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
112 - x11-libs/libXi[${MULTILIB_USEDEP}]
113 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
114 - )
115 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
116 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
117 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
118 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
119 - gphoto2? (
120 - media-libs/libgphoto2:=[${MULTILIB_USEDEP}]
121 - media-libs/libjpeg-turbo:0=[${MULTILIB_USEDEP}]
122 - )
123 - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
124 - gstreamer? (
125 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
126 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
127 - )
128 - kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] )
129 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
130 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
131 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
132 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
133 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
134 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
135 - opengl? (
136 - virtual/opengl[${MULTILIB_USEDEP}]
137 - )
138 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
139 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
140 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
141 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
142 - sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] )
143 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
144 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
145 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
146 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
147 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
148 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
149 - usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
150 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
151 - vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
152 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
153 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )"
154 -
155 -RDEPEND="${COMMON_DEPEND}
156 - app-emulation/wine-desktop-common
157 - >app-eselect/eselect-wine-0.3
158 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
159 - gecko? ( app-emulation/wine-gecko:2.47.2[abi_x86_32?,abi_x86_64?] )
160 - mono? ( app-emulation/wine-mono:7.3.0 )
161 - perl? (
162 - dev-lang/perl
163 - dev-perl/XML-Simple
164 - )
165 - pulseaudio? (
166 - realtime? ( sys-auth/rtkit )
167 - )
168 - samba? ( >=net-fs/samba-3.0.25[winbind] )
169 - selinux? ( sec-policy/selinux-wine )
170 - udisks? ( sys-fs/udisks:2 )"
171 -
172 -# tools/make_requests requires perl
173 -DEPEND="${COMMON_DEPEND}
174 - ${BDEPEND}
175 - >=sys-kernel/linux-headers-2.6
176 - X? ( x11-base/xorg-proto )
177 - staging? (
178 - dev-lang/perl
179 - dev-perl/XML-Simple
180 - )
181 - xinerama? ( x11-base/xorg-proto )"
182 -
183 -# These use a non-standard "Wine" category, which is provided by
184 -# /etc/xdg/applications-merged/wine.menu
185 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
186 -usr/share/applications/wine-notepad.desktop
187 -usr/share/applications/wine-uninstaller.desktop
188 -usr/share/applications/wine-winecfg.desktop"
189 -
190 -PATCHES=(
191 - "${PATCHDIR}/patches/${MY_PN}-6.22-winegcc.patch" #260726
192 - "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615
193 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
194 -)
195 -PATCHES_BIN=()
196 -
197 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
198 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${MY_PV} == 9999 ]]; then
199 - DEPEND+=" dev-util/patchbin"
200 -fi
201 -
202 -wine_compiler_check() {
203 - # Ensure compiler support
204 - # (No checks here as of 2022)
205 - return 0
206 -}
207 -
208 -wine_build_environment_check() {
209 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
210 -
211 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
212 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
213 - eerror "See https://bugs.gentoo.org/487864 for more details."
214 - eerror
215 - return 1
216 - fi
217 -}
218 -
219 -wine_env_vcs_vars() {
220 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
221 - local pn_live_val="${pn_live_var}"
222 - eval pn_live_val='$'${pn_live_val}
223 - if [[ ! -z ${pn_live_val} ]]; then
224 - if use staging; then
225 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
226 - eerror "cannot be used to set the commit. Instead, you may use the"
227 - eerror "environment variables:"
228 - eerror " EGIT_OVERRIDE_COMMIT_WINE"
229 - eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING"
230 - eerror
231 - return 1
232 - fi
233 - fi
234 - if [[ ! -z ${EGIT_COMMIT} ]]; then
235 - eerror "Commits must now be specified using the environment variables:"
236 - eerror " EGIT_OVERRIDE_COMMIT_WINE"
237 - eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING"
238 - eerror
239 - return 1
240 - fi
241 -}
242 -
243 -pkg_pretend() {
244 - if [[ ${MERGE_TYPE} != binary ]] ; then
245 - wine_build_environment_check || die
246 -
247 - # Verify OSS support
248 - if use oss; then
249 - if ! has_version ">=media-sound/oss-4"; then
250 - eerror "You cannot build wine with USE=oss without having support from"
251 - eerror ">=media-sound/oss-4 (only available through external repos)"
252 - eerror
253 - die
254 - fi
255 - fi
256 -
257 - if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
258 - local mingw=-w64-mingw32
259 - for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
260 - type -P ${mingw}-gcc && continue
261 - eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
262 - eerror "yourself by installing sys-devel/crossdev then running:"
263 - eerror
264 - eerror " crossdev --target ${mingw}"
265 - eerror
266 - eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
267 - die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
268 - done
269 - fi
270 - fi
271 -}
272 -
273 -pkg_setup() {
274 - wine_build_environment_check || die
275 - wine_env_vcs_vars || die
276 -
277 - WINE_VARIANT="${PN#wine}-${MY_PV}"
278 - WINE_VARIANT="${WINE_VARIANT#-}"
279 -
280 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
281 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
282 - MY_DATADIR="${MY_DATAROOTDIR}"
283 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
284 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
285 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
286 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
287 - MY_MANDIR="${MY_DATADIR}/man"
288 -}
289 -
290 -src_unpack() {
291 - if [[ ${MY_PV} == "9999" ]] ; then
292 - EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack
293 - if use staging; then
294 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
295 -
296 - EGIT_CHECKOUT_DIR="${STAGING_DIR}" EGIT_REPO_URI="${STAGING_EGIT_REPO_URI}" git-r3_src_unpack
297 -
298 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
299 -
300 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
301 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
302 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
303 - einfo "Example: EGIT_OVERRIDE_COMMIT_WINE=${COMPAT_WINE_COMMIT} emerge -1 wine"
304 - fi
305 - fi
306 - fi
307 -
308 - default
309 -
310 - plocale_find_changes "${S}/po" "" ".po"
311 -}
312 -
313 -src_prepare() {
314 -
315 - eapply_bin(){
316 - local patch
317 - for patch in ${PATCHES_BIN[@]}; do
318 - patchbin --nogit < "${patch}" || die
319 - done
320 - }
321 -
322 - local md5="$(md5sum server/protocol.def)"
323 -
324 - if use staging; then
325 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
326 - ewarn "Wine bugzilla should explicitly state that staging was used."
327 -
328 - local STAGING_EXCLUDE="-W winemenubuilder-Desktop_Icon_Path" #652176
329 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
330 -
331 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
332 - ebegin "Running Wine-Staging patch installer"
333 - (
334 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
335 - cd "${STAGING_DIR}/patches"
336 - source "${STAGING_DIR}/patches/patchinstall.sh"
337 - )
338 - eend $? || die "Failed to apply Wine-Staging patches"
339 - fi
340 -
341 - default
342 - eapply_bin
343 - eautoreconf
344 -
345 - # Modification of the server protocol requires regenerating the server requests
346 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
347 - einfo "server/protocol.def was patched; running tools/make_requests"
348 - tools/make_requests || die #432348
349 - fi
350 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
351 - if ! use run-exes; then
352 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
353 - fi
354 -
355 - # Edit wine.desktop to work for specific variant
356 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
357 -
358 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
359 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
360 -
361 - plocale_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
362 -
363 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
364 -
365 - # Duplicate manpages input files for wine64
366 - local f
367 - for f in loader/*.man.in; do
368 - cp ${f} ${f/wine/wine64} || die
369 - done
370 - # Add wine64 manpages to Makefile
371 - if use abi_x86_64; then
372 - sed -i "/wine.man.in/i \
373 - \\\twine64.man.in \\\\" loader/Makefile.in || die
374 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
375 -\164\2/' loader/Makefile.in || die
376 - fi
377 -
378 - rm_man_file(){
379 - local file="${1}"
380 - loc=${2}
381 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
382 - }
383 -
384 - while read f; do
385 - plocale_for_each_disabled_locale rm_man_file "${f}"
386 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
387 -}
388 -
389 -src_configure() {
390 - wine_compiler_check || die
391 -
392 - export LDCONFIG=/bin/true
393 - use custom-cflags || strip-flags
394 - if use mingw; then
395 - use crossdev-mingw || PATH="${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}"
396 -
397 - # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu)
398 - local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc}
399 - : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}"
400 - : "${CROSSLDFLAGS:=$(
401 - filter-flags '-fuse-ld=*'
402 - CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}"
403 - export CROSS{C,LD}FLAGS
404 - fi
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="${EPREFIX}/etc/wine"
421 - $(use_with alsa)
422 - $(use_with capi)
423 - $(use_with cups)
424 - $(use_with udisks dbus)
425 - $(use_with fontconfig)
426 - $(use_with ssl gnutls)
427 - $(use_enable gecko mshtml)
428 - $(use_with gphoto2 gphoto)
429 - $(use_with gssapi)
430 - $(use_with gstreamer)
431 - --enable-hal
432 - $(use_with kerberos krb5)
433 - $(use_with ldap)
434 - # TODO: Will bug 685172 still need special handling?
435 - $(use_with mingw)
436 - $(use_enable mono mscoree)
437 - $(use_with netapi)
438 - $(use_with nls gettext)
439 - $(use_with openal)
440 - $(use_with opencl)
441 - $(use_with opengl)
442 - $(use_with osmesa)
443 - $(use_with oss)
444 - $(use_with pcap)
445 - $(use_with pulseaudio pulse)
446 - $(use_with threads pthread)
447 - $(use_with scanner sane)
448 - $(use_with sdl)
449 - $(use_enable test tests)
450 - $(use_with truetype freetype)
451 - $(use_with udev)
452 - $(use_with unwind)
453 - $(use_with usb)
454 - $(use_with v4l v4l2)
455 - $(use_with vulkan)
456 - $(use_with X x)
457 - $(use_with X xfixes)
458 - $(use_with xcomposite)
459 - $(use_with xinerama)
460 - )
461 -
462 - use staging && myconf+=(
463 - --with-xattr
464 - )
465 -
466 - local PKG_CONFIG
467 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
468 - tc-export PKG_CONFIG
469 -
470 - if use amd64; then
471 - if [[ ${ABI} == amd64 ]]; then
472 - myconf+=( --enable-win64 )
473 - else
474 - myconf+=( --disable-win64 )
475 - fi
476 -
477 - # Note: using --with-wine64 results in problems with multilib.eclass
478 - # CC/LD hackery. We're using separate tools instead.
479 - fi
480 -
481 - ECONF_SOURCE=${S} \
482 - econf "${myconf[@]}"
483 - emake depend
484 -}
485 -
486 -multilib_src_test() {
487 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
488 - if [[ ${ABI} == x86 ]]; then
489 - if [[ $(id -u) == 0 ]]; then
490 - ewarn "Skipping tests since they cannot be run under the root user."
491 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
492 - return
493 - fi
494 -
495 - WINEPREFIX="${T}/.wine-${ABI}" \
496 - virtx emake test
497 - fi
498 -}
499 -
500 -multilib_src_install_all() {
501 - local DOCS=( ANNOUNCE AUTHORS README )
502 - add_locale_docs() {
503 - local locale_doc="documentation/README.$1"
504 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
505 - }
506 - plocale_for_each_locale add_locale_docs
507 -
508 - einstalldocs
509 - find "${ED}" -name *.la -delete || die
510 -
511 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
512 - rm "${D%}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
513 - "${D%}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
514 - fi
515 -
516 - use abi_x86_32 && pax-mark psmr "${D%}${MY_PREFIX}"/bin/wine{,-preloader} #255055
517 - use abi_x86_64 && pax-mark psmr "${D%}${MY_PREFIX}"/bin/wine64{,-preloader}
518 -
519 - # Avoid double prefix from dosym and make_wrapper
520 - MY_PREFIX=${MY_PREFIX#${EPREFIX}}
521 -
522 - if use abi_x86_64 && ! use abi_x86_32; then
523 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
524 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
525 - fi
526 -
527 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
528 - eshopts_push -s failglob #615218
529 - # Make wrappers for binaries for handling multiple variants
530 - # Note: wrappers instead of symlinks because some are shell which use basename
531 - local b
532 - for b in "${ED%}${MY_PREFIX}"/bin/*; do
533 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
534 - done
535 - eshopts_pop
536 -}
537 -
538 -pkg_postinst() {
539 - eselect wine register ${PN}-${MY_PV}
540 - if [[ ${PN} == "wine-vanilla" ]]; then
541 - eselect wine register --vanilla ${PN}-${MY_PV} || die
542 - else
543 - if use staging; then
544 - eselect wine register --staging ${PN}-${MY_PV} || die
545 - fi
546 - fi
547 -
548 - eselect wine update --all --if-unset || die
549 -
550 - xdg_desktop_database_update
551 -
552 - if ! use gecko; then
553 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
554 - ewarn "implementation of iexplore. Many older windows applications"
555 - ewarn "rely upon the existence of an iexplore implementation, so"
556 - ewarn "you will likely need to install an external one, like via winetricks"
557 - fi
558 - if ! use mono; then
559 - ewarn "Without Wine Mono, wine prefixes will not have a default"
560 - ewarn "implementation of .NET. Many windows applications rely upon"
561 - ewarn "the existence of a .NET implementation, so you will likely need"
562 - ewarn "to install an external one, like via winetricks"
563 - fi
564 -}
565 -
566 -pkg_prerm() {
567 - eselect wine deregister ${PN}-${MY_PV}
568 - if [[ ${PN} == "wine-vanilla" ]]; then
569 - eselect wine deregister --vanilla ${PN}-${MY_PV} || die
570 - else
571 - if use staging; then
572 - eselect wine deregister --staging ${PN}-${MY_PV}|| die
573 - fi
574 - fi
575 -
576 - eselect wine update --all --if-unset || die
577 -}
578 -
579 -pkg_postrm() {
580 - xdg_desktop_database_update
581 -}