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-vanilla/
Date: Sun, 03 Jul 2022 15:16:18
Message-Id: 1656861285.b618ae497c1365faac9d4f79bb957d78b2624279.sarnex@gentoo
1 commit: b618ae497c1365faac9d4f79bb957d78b2624279
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 3 15:09:48 2022 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 15:14:45 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b618ae49
7
8 app-emulation/wine-vanilla: Version bump
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
12
13 app-emulation/wine-vanilla/Manifest | 1 +
14 .../wine-vanilla/wine-vanilla-7.12.ebuild | 467 +++++++++++++++++++++
15 2 files changed, 468 insertions(+)
16
17 diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
18 index 5664f11d232d..3ac86513bdbb 100644
19 --- a/app-emulation/wine-vanilla/Manifest
20 +++ b/app-emulation/wine-vanilla/Manifest
21 @@ -2,5 +2,6 @@ DIST gentoo-wine-patches-20211122.tar.xz 59796 BLAKE2B 21460e6adf4934a52f8841f76
22 DIST wine-7.0.tar.xz 27120912 BLAKE2B 84bfeb28d56f0f40bb93b1b5bf8954c8be2fd90fde5a61608e7c35f48addcce7a4d660e63c3caa3ca2c365d1e83b55a1c3485872b2d6bfa8941e2bce44c4aca6 SHA512 eec17b046ed5447eb540f421c9b2748d9419ce087496c2743a9914fd27bbe5ff9da0cfe47d3cd76fa97323bd1188a1d82b1eef4968d86ed1957dc1a95e28529c
23 DIST wine-7.10.tar.xz 27915328 BLAKE2B fc778285cce52317d77461f0bce11d6e3214a536ecd42364d6cd31f609a23116fa582a7cb85873a99c61eb5cf5e1e3036e4d4d1887b87f75f501109ac3eb4625 SHA512 be460be6c3f6f54c20220287a7c4c9d41d27bd14fabb97b1f9824a4be361e38b2e2e51a621e0332d6c48934b1af425efaec92132f73e6d1270337ffbfcac2576
24 DIST wine-7.11.tar.xz 27975308 BLAKE2B 7031c950de4ee6d00c1006841a2d6fe55cebce644d354eb05cb963207b491a717c6ba7ce8f19c337167ec8bd6c1480427112a32b4363db745e99461be5917c77 SHA512 aff6a5996ba7336d97c59a1402688b109e6cca123c60fa6f03813d81ad6478f4ed4a62fb7813dc6952cca7ec1250182730873f3ac17f0855bbf000bf3c1d86fe
25 +DIST wine-7.12.tar.xz 28221024 BLAKE2B 551f37360a6dd2c535b5b1a9896cd9c9c091d56c4d2f3d2988092d48d54aa447fc0dad18034bad7b7beaa9c6587071e8d32bd08092a9ba93acb39dac9ddfc391 SHA512 4746fb1c3d0ec7f20e22d821f8e88e5415b85cb60f53e9ad61b89e8321b6a6b2999eb2b70c7ac46477f633bccb6c2aba49ce2655c380cb85cd5c71dbe4af50b4
26 DIST wine-7.8.tar.xz 27728116 BLAKE2B 3c878de8377906a687026bf1d5f9167bdce6b13a3d750d2a92fdcf70aed8e3da01560d26e4b075b6564b741996fc2168bb98c409f95618ab9fbb8e8b583a5384 SHA512 5e63edabc7dcdce62a1ce683c9ef387a2d801af3a0f99c32daacfea566a3813086f4f5977279c7b7526574f5cd95d052805bd5c145b82221d321d8aa638bfe1d
27 DIST wine-7.9.tar.xz 27783272 BLAKE2B 3265402b90913670b6a81a1f0d91d84d536734883749d31af572953e3b244ba721c15bb851e0e0e868c402d9add2e2007e49225bdaaa02a8dedee575d4e69602 SHA512 47ecbb8bc31a06d0f40a63469ffe3df4a1e05c9476a8926ec7f20c2230de8afecb5e0df9f3c5dd238ce3d0323d7cf9c9f48c41ef6ca149822458a4e605a2e029
28
29 diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.12.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.12.ebuild
30 new file mode 100644
31 index 000000000000..2fb6362afb24
32 --- /dev/null
33 +++ b/app-emulation/wine-vanilla/wine-vanilla-7.12.ebuild
34 @@ -0,0 +1,467 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=8
39 +
40 +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"
41 +PLOCALE_BACKUP="en"
42 +
43 +inherit autotools estack flag-o-matic multilib-minimal pax-utils plocale toolchain-funcs virtualx wrapper 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=$(ver_cut 1)
56 + SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
57 + KEYWORDS="-* ~amd64 ~x86"
58 +fi
59 +S="${WORKDIR}/${MY_P}"
60 +
61 +GWP_V="20211122"
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/~sarnex/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 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 pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks +unwind usb v4l vulkan +X +xcomposite xinerama"
73 +REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
74 + X? ( truetype )
75 + crossdev-mingw? ( mingw )
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 +BDEPEND="sys-devel/flex
85 + virtual/yacc
86 + virtual/pkgconfig
87 + mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) )"
88 +
89 +COMMON_DEPEND="
90 + X? (
91 + x11-libs/libXcursor[${MULTILIB_USEDEP}]
92 + x11-libs/libXext[${MULTILIB_USEDEP}]
93 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
94 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
95 + x11-libs/libXi[${MULTILIB_USEDEP}]
96 + x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
97 + )
98 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
99 + capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
100 + cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
101 + fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
102 + gphoto2? (
103 + media-libs/libgphoto2:=[${MULTILIB_USEDEP}]
104 + media-libs/libjpeg-turbo:0=[${MULTILIB_USEDEP}]
105 + )
106 + gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
107 + gstreamer? (
108 + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
109 + media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
110 + )
111 + kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
112 + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
113 + netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
114 + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
115 + odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
116 + openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
117 + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
118 + opengl? (
119 + virtual/opengl[${MULTILIB_USEDEP}]
120 + )
121 + osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
122 + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
123 + pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
124 + scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
125 + sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] )
126 + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
127 + truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
128 + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
129 + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
130 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
131 + usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
132 + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
133 + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
134 + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
135 + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )"
136 +
137 +RDEPEND="${COMMON_DEPEND}
138 + app-emulation/wine-desktop-common
139 + >app-eselect/eselect-wine-0.3
140 + dos? ( >=games-emulation/dosbox-0.74_p20160629 )
141 + gecko? ( app-emulation/wine-gecko:2.47.2[abi_x86_32?,abi_x86_64?] )
142 + mono? ( app-emulation/wine-mono:7.3.0 )
143 + perl? (
144 + dev-lang/perl
145 + dev-perl/XML-Simple
146 + )
147 + pulseaudio? (
148 + realtime? ( sys-auth/rtkit )
149 + )
150 + samba? ( >=net-fs/samba-3.0.25[winbind] )
151 + selinux? ( sec-policy/selinux-wine )
152 + udisks? ( sys-fs/udisks:2 )"
153 +
154 +# tools/make_requests requires perl
155 +DEPEND="${COMMON_DEPEND}
156 + ${BDEPEND}
157 + >=sys-kernel/linux-headers-2.6
158 + X? ( x11-base/xorg-proto )
159 + xinerama? ( x11-base/xorg-proto )"
160 +
161 +# These use a non-standard "Wine" category, which is provided by
162 +# /etc/xdg/applications-merged/wine.menu
163 +QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
164 +usr/share/applications/wine-notepad.desktop
165 +usr/share/applications/wine-uninstaller.desktop
166 +usr/share/applications/wine-winecfg.desktop"
167 +
168 +PATCHES=(
169 + "${PATCHDIR}/patches/${MY_PN}-6.22-winegcc.patch" #260726
170 + "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615
171 + "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
172 +)
173 +PATCHES_BIN=()
174 +
175 +# https://bugs.gentoo.org/show_bug.cgi?id=635222
176 +if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
177 + DEPEND+=" dev-util/patchbin"
178 +fi
179 +
180 +wine_compiler_check() {
181 + # Ensure compiler support
182 + # (No checks here as of 2022)
183 + return 0
184 +}
185 +
186 +wine_build_environment_check() {
187 + [[ ${MERGE_TYPE} = "binary" ]] && return 0
188 +
189 + if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
190 + eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
191 + eerror "See https://bugs.gentoo.org/487864 for more details."
192 + eerror
193 + return 1
194 + fi
195 +}
196 +
197 +wine_env_vcs_vars() {
198 + local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
199 + local pn_live_val="${pn_live_var}"
200 + eval pn_live_val='$'${pn_live_val}
201 + if [[ ! -z ${EGIT_COMMIT} ]]; then
202 + eerror "Commits must now be specified using the environmental variables"
203 + eerror "EGIT_OVERRIDE_COMMIT_WINE"
204 + eerror
205 + return 1
206 + fi
207 +}
208 +
209 +pkg_pretend() {
210 + wine_build_environment_check || die
211 +
212 + # Verify OSS support
213 + if use oss; then
214 + if ! has_version ">=media-sound/oss-4"; then
215 + eerror "You cannot build wine with USE=oss without having support from"
216 + eerror ">=media-sound/oss-4 (only available through external repos)"
217 + eerror
218 + die
219 + fi
220 + fi
221 +
222 + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
223 + local mingw=-w64-mingw32
224 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
225 + type -P ${mingw}-gcc && continue
226 + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
227 + eerror "yourself by installing sys-devel/crossdev then running:"
228 + eerror
229 + eerror " crossdev --target ${mingw}"
230 + eerror
231 + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
232 + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
233 + done
234 + fi
235 +}
236 +
237 +pkg_setup() {
238 + wine_build_environment_check || die
239 + wine_env_vcs_vars || die
240 +
241 + WINE_VARIANT="${PN#wine}-${PV}"
242 + WINE_VARIANT="${WINE_VARIANT#-}"
243 +
244 + MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
245 + MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
246 + MY_DATADIR="${MY_DATAROOTDIR}"
247 + MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
248 + MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
249 + MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
250 + MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
251 + MY_MANDIR="${MY_DATADIR}/man"
252 +}
253 +
254 +src_unpack() {
255 + if [[ ${PV} == "9999" ]] ; then
256 + EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack
257 + fi
258 +
259 + default
260 +
261 + plocale_find_changes "${S}/po" "" ".po"
262 +}
263 +
264 +src_prepare() {
265 +
266 + eapply_bin(){
267 + local patch
268 + for patch in ${PATCHES_BIN[@]}; do
269 + patchbin --nogit < "${patch}" || die
270 + done
271 + }
272 +
273 + local md5="$(md5sum server/protocol.def)"
274 +
275 + default
276 + eapply_bin
277 + eautoreconf
278 +
279 + # Modification of the server protocol requires regenerating the server requests
280 + if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
281 + einfo "server/protocol.def was patched; running tools/make_requests"
282 + tools/make_requests || die #432348
283 + fi
284 + sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
285 + if ! use run-exes; then
286 + sed -i '/^MimeType/d' loader/wine.desktop || die #117785
287 + fi
288 +
289 + # Edit wine.desktop to work for specific variant
290 + sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
291 +
292 + # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
293 + cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
294 +
295 + plocale_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
296 +
297 + # Fix manpage generation for locales #469418 and abi_x86_64 #617864
298 +
299 + # Duplicate manpages input files for wine64
300 + local f
301 + for f in loader/*.man.in; do
302 + cp ${f} ${f/wine/wine64} || die
303 + done
304 + # Add wine64 manpages to Makefile
305 + if use abi_x86_64; then
306 + sed -i "/wine.man.in/i \
307 + \\\twine64.man.in \\\\" loader/Makefile.in || die
308 + sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
309 +\164\2/' loader/Makefile.in || die
310 + fi
311 +
312 + rm_man_file(){
313 + local file="${1}"
314 + loc=${2}
315 + sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
316 + }
317 +
318 + while read f; do
319 + plocale_for_each_disabled_locale rm_man_file "${f}"
320 + done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
321 +}
322 +
323 +src_configure() {
324 + wine_compiler_check || die
325 +
326 + export LDCONFIG=/bin/true
327 + use custom-cflags || strip-flags
328 + if use mingw; then
329 + use crossdev-mingw || PATH="${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}"
330 +
331 + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu)
332 + local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc}
333 + : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}"
334 + : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}"
335 + export CROSS{C,LD}FLAGS
336 + fi
337 +
338 + multilib-minimal_src_configure
339 +}
340 +
341 +multilib_src_configure() {
342 + local myconf=(
343 + --prefix="${MY_PREFIX}"
344 + --datarootdir="${MY_DATAROOTDIR}"
345 + --datadir="${MY_DATADIR}"
346 + --docdir="${MY_DOCDIR}"
347 + --includedir="${MY_INCLUDEDIR}"
348 + --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
349 + --libexecdir="${MY_LIBEXECDIR}"
350 + --localstatedir="${MY_LOCALSTATEDIR}"
351 + --mandir="${MY_MANDIR}"
352 + --sysconfdir="${EPREFIX}/etc/wine"
353 + $(use_with alsa)
354 + $(use_with capi)
355 + $(use_with cups)
356 + $(use_with udisks dbus)
357 + $(use_with fontconfig)
358 + $(use_with ssl gnutls)
359 + $(use_enable gecko mshtml)
360 + $(use_with gphoto2 gphoto)
361 + $(use_with gssapi)
362 + $(use_with gstreamer)
363 + --enable-hal
364 + $(use_with kerberos krb5)
365 + $(use_with ldap)
366 + # TODO: Will bug 685172 still need special handling?
367 + $(use_with mingw)
368 + $(use_enable mono mscoree)
369 + $(use_with netapi)
370 + $(use_with nls gettext)
371 + $(use_with openal)
372 + $(use_with opencl)
373 + $(use_with opengl)
374 + $(use_with osmesa)
375 + $(use_with oss)
376 + $(use_with pcap)
377 + $(use_with pulseaudio pulse)
378 + $(use_with threads pthread)
379 + $(use_with scanner sane)
380 + $(use_with sdl)
381 + $(use_enable test tests)
382 + $(use_with truetype freetype)
383 + $(use_with udev)
384 + $(use_with unwind)
385 + $(use_with usb)
386 + $(use_with v4l v4l2)
387 + $(use_with vulkan)
388 + $(use_with X x)
389 + $(use_with X xfixes)
390 + $(use_with xcomposite)
391 + $(use_with xinerama)
392 + )
393 +
394 + local PKG_CONFIG
395 + # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
396 + tc-export PKG_CONFIG
397 +
398 + if use amd64; then
399 + if [[ ${ABI} == amd64 ]]; then
400 + myconf+=( --enable-win64 )
401 + else
402 + myconf+=( --disable-win64 )
403 + fi
404 +
405 + # Note: using --with-wine64 results in problems with multilib.eclass
406 + # CC/LD hackery. We're using separate tools instead.
407 + fi
408 +
409 + ECONF_SOURCE=${S} \
410 + econf "${myconf[@]}"
411 + emake depend
412 +}
413 +
414 +multilib_src_test() {
415 + # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
416 + if [[ ${ABI} == x86 ]]; then
417 + if [[ $(id -u) == 0 ]]; then
418 + ewarn "Skipping tests since they cannot be run under the root user."
419 + ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
420 + return
421 + fi
422 +
423 + WINEPREFIX="${T}/.wine-${ABI}" \
424 + virtx emake test
425 + fi
426 +}
427 +
428 +multilib_src_install_all() {
429 + local DOCS=( ANNOUNCE AUTHORS README )
430 + add_locale_docs() {
431 + local locale_doc="documentation/README.$1"
432 + [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
433 + }
434 + plocale_for_each_locale add_locale_docs
435 +
436 + einstalldocs
437 + find "${ED}" -name *.la -delete || die
438 +
439 + if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
440 + rm "${D%}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
441 + "${D%}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
442 + fi
443 +
444 + use abi_x86_32 && pax-mark psmr "${D%}${MY_PREFIX}"/bin/wine{,-preloader} #255055
445 + use abi_x86_64 && pax-mark psmr "${D%}${MY_PREFIX}"/bin/wine64{,-preloader}
446 +
447 + # Avoid double prefix from dosym and make_wrapper
448 + MY_PREFIX=${MY_PREFIX#${EPREFIX}}
449 +
450 + if use abi_x86_64 && ! use abi_x86_32; then
451 + dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
452 + dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
453 + fi
454 +
455 + # Failglob for binloops, shouldn't be necessary, but including to stay safe
456 + eshopts_push -s failglob #615218
457 + # Make wrappers for binaries for handling multiple variants
458 + # Note: wrappers instead of symlinks because some are shell which use basename
459 + local b
460 + for b in "${ED%}${MY_PREFIX}"/bin/*; do
461 + make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
462 + done
463 + eshopts_pop
464 +}
465 +
466 +pkg_postinst() {
467 + eselect wine register ${P}
468 + if [[ ${PN} == "wine-vanilla" ]]; then
469 + eselect wine register --vanilla ${P} || die
470 + fi
471 +
472 + eselect wine update --all --if-unset || die
473 +
474 + xdg_desktop_database_update
475 +
476 + if ! use gecko; then
477 + ewarn "Without Wine Gecko, wine prefixes will not have a default"
478 + ewarn "implementation of iexplore. Many older windows applications"
479 + ewarn "rely upon the existence of an iexplore implementation, so"
480 + ewarn "you will likely need to install an external one, like via winetricks"
481 + fi
482 + if ! use mono; then
483 + ewarn "Without Wine Mono, wine prefixes will not have a default"
484 + ewarn "implementation of .NET. Many windows applications rely upon"
485 + ewarn "the existence of a .NET implementation, so you will likely need"
486 + ewarn "to install an external one, like via winetricks"
487 + fi
488 +}
489 +
490 +pkg_prerm() {
491 + eselect wine deregister ${P}
492 + if [[ ${PN} == "wine-vanilla" ]]; then
493 + eselect wine deregister --vanilla ${P} || die
494 + fi
495 +
496 + eselect wine update --all --if-unset || die
497 +}
498 +
499 +pkg_postrm() {
500 + xdg_desktop_database_update
501 +}