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