1 |
commit: 663a0da3ee83e245a2a765d60911cbe38b3e6dab |
2 |
Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 4 06:57:06 2017 +0000 |
4 |
Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 4 06:57:39 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=663a0da3 |
7 |
|
8 |
app-emulation/wine-vanilla: Remove old |
9 |
|
10 |
Package-Manager: Portage-2.3.14, Repoman-2.3.6 |
11 |
|
12 |
.../wine-vanilla/wine-vanilla-2.0.1.ebuild | 518 --------------------- |
13 |
.../wine-vanilla/wine-vanilla-2.0.2.ebuild | 518 --------------------- |
14 |
2 files changed, 1036 deletions(-) |
15 |
|
16 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.0.1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0.1.ebuild |
17 |
deleted file mode 100644 |
18 |
index 6585f56..0000000 |
19 |
--- a/app-emulation/wine-vanilla/wine-vanilla-2.0.1.ebuild |
20 |
+++ /dev/null |
21 |
@@ -1,518 +0,0 @@ |
22 |
-# Copyright 1999-2017 Gentoo Foundation |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
- |
25 |
-EAPI=6 |
26 |
- |
27 |
-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" |
28 |
-PLOCALE_BACKUP="en" |
29 |
- |
30 |
-inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator 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=$(get_version_component_range 1) |
43 |
- SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.xz" |
44 |
- KEYWORDS="-* amd64 x86 ~x86-fbsd" |
45 |
-fi |
46 |
-S="${WORKDIR}/${MY_P}" |
47 |
- |
48 |
-GWP_V="20170830" |
49 |
-PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
50 |
- |
51 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
52 |
-HOMEPAGE="https://www.winehq.org/" |
53 |
-SRC_URI="${SRC_URI} |
54 |
- https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
55 |
-" |
56 |
- |
57 |
-LICENSE="LGPL-2.1" |
58 |
-SLOT="${PV}" |
59 |
-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" |
60 |
-REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
61 |
- X? ( truetype ) |
62 |
- elibc_glibc? ( threads ) |
63 |
- osmesa? ( opengl ) |
64 |
- test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
65 |
- |
66 |
-# FIXME: the test suite is unsuitable for us; many tests require net access |
67 |
-# or fail due to Xvfb's opengl limitations. |
68 |
-RESTRICT="test" |
69 |
- |
70 |
-COMMON_DEPEND=" |
71 |
- X? ( |
72 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
73 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
74 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
75 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
76 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
77 |
- ) |
78 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
79 |
- capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
80 |
- cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
81 |
- fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
82 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
83 |
- gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
84 |
- gstreamer? ( |
85 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
86 |
- media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
87 |
- ) |
88 |
- jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
89 |
- lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
90 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
91 |
- mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
92 |
- ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
93 |
- netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
94 |
- nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
95 |
- odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
96 |
- openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
97 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
98 |
- opengl? ( |
99 |
- virtual/glu[${MULTILIB_USEDEP}] |
100 |
- virtual/opengl[${MULTILIB_USEDEP}] |
101 |
- ) |
102 |
- osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
103 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
104 |
- png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
105 |
- pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
106 |
- scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
107 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
108 |
- truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
109 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
110 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
111 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
112 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
113 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
114 |
- xml? ( |
115 |
- dev-libs/libxml2[${MULTILIB_USEDEP}] |
116 |
- dev-libs/libxslt[${MULTILIB_USEDEP}] |
117 |
- ) |
118 |
- abi_x86_32? ( |
119 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
120 |
- !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
121 |
- !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
122 |
- !<app-emulation/emul-linux-x86-db-20140508-r3 |
123 |
- !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
124 |
- !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
125 |
- !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
126 |
- !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
127 |
- !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
128 |
- !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
129 |
- !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
130 |
- !<app-emulation/emul-linux-x86-soundlibs-20140508 |
131 |
- !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
132 |
- !<app-emulation/emul-linux-x86-xlibs-20140508 |
133 |
- )" |
134 |
- |
135 |
-RDEPEND="${COMMON_DEPEND} |
136 |
- app-emulation/wine-desktop-common |
137 |
- >app-eselect/eselect-wine-0.3 |
138 |
- !app-emulation/wine:0 |
139 |
- dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
140 |
- gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
141 |
- mono? ( app-emulation/wine-mono:4.6.4 ) |
142 |
- perl? ( |
143 |
- dev-lang/perl |
144 |
- dev-perl/XML-Simple |
145 |
- ) |
146 |
- pulseaudio? ( |
147 |
- realtime? ( sys-auth/rtkit ) |
148 |
- ) |
149 |
- samba? ( >=net-fs/samba-3.0.25[winbind] ) |
150 |
- selinux? ( sec-policy/selinux-wine ) |
151 |
- udisks? ( sys-fs/udisks:2 )" |
152 |
- |
153 |
-# tools/make_requests requires perl |
154 |
-DEPEND="${COMMON_DEPEND} |
155 |
- sys-devel/flex |
156 |
- >=sys-kernel/linux-headers-2.6 |
157 |
- virtual/pkgconfig |
158 |
- virtual/yacc |
159 |
- X? ( |
160 |
- x11-proto/inputproto |
161 |
- x11-proto/xextproto |
162 |
- x11-proto/xf86vidmodeproto |
163 |
- ) |
164 |
- prelink? ( sys-devel/prelink ) |
165 |
- xinerama? ( x11-proto/xineramaproto )" |
166 |
- |
167 |
-# These use a non-standard "Wine" category, which is provided by |
168 |
-# /etc/xdg/applications-merged/wine.menu |
169 |
-QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
170 |
-usr/share/applications/wine-notepad.desktop |
171 |
-usr/share/applications/wine-uninstaller.desktop |
172 |
-usr/share/applications/wine-winecfg.desktop" |
173 |
- |
174 |
-wine_compiler_check() { |
175 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
176 |
- |
177 |
- # GCC-specific bugs |
178 |
- if tc-is-gcc; then |
179 |
- # bug #549768 |
180 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
181 |
- ebegin "Checking for gcc-5 ms_abi compiler bug" |
182 |
- $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
183 |
- # Run in subshell to prevent "Aborted" message |
184 |
- ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
185 |
- if ! eend $?; then |
186 |
- eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
187 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
188 |
- eerror "or use gcc-config to select a different compiler version." |
189 |
- eerror "See https://bugs.gentoo.org/549768" |
190 |
- eerror |
191 |
- return 1 |
192 |
- fi |
193 |
- fi |
194 |
- # bug #574044 |
195 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
196 |
- ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
197 |
- # Compile in subshell to prevent "Aborted" message |
198 |
- ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
199 |
- if ! eend $?; then |
200 |
- eerror "Wine cannot be built with this version of gcc-5.3" |
201 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
202 |
- eerror "or use gcc-config to select a different compiler version." |
203 |
- eerror "See https://bugs.gentoo.org/574044" |
204 |
- eerror |
205 |
- return 1 |
206 |
- fi |
207 |
- fi |
208 |
- fi |
209 |
- |
210 |
- # Ensure compiler support |
211 |
- if use abi_x86_64; then |
212 |
- ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
213 |
- # Compile in subshell to prevent "Aborted" message |
214 |
- ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
215 |
- if ! eend $?; then |
216 |
- eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
217 |
- eerror |
218 |
- eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
219 |
- eerror |
220 |
- return 1 |
221 |
- fi |
222 |
- fi |
223 |
-} |
224 |
- |
225 |
-wine_build_environment_check() { |
226 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
227 |
- |
228 |
- if use abi_x86_64; then |
229 |
- if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
230 |
- eerror "You need gcc-4.4+ to compile 64-bit wine" |
231 |
- die |
232 |
- elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
233 |
- eerror "You need clang-3.8+ to compile 64-bit wine" |
234 |
- die |
235 |
- fi |
236 |
- fi |
237 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
238 |
- ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
239 |
- ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
240 |
- ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
241 |
- fi |
242 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
243 |
- if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
244 |
- ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
245 |
- ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
246 |
- ewarn "See package.env in man 5 portage for more information on how to do this." |
247 |
- ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
248 |
- fi |
249 |
- fi |
250 |
- |
251 |
- if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
252 |
- eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
253 |
- eerror "See https://bugs.gentoo.org/487864 for more details." |
254 |
- eerror |
255 |
- return 1 |
256 |
- fi |
257 |
-} |
258 |
- |
259 |
-wine_env_vcs_vars() { |
260 |
- local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
261 |
- local pn_live_val="${pn_live_var}" |
262 |
- eval pn_live_val='$'${pn_live_val} |
263 |
- if [[ ! -z ${EGIT_COMMIT} ]]; then |
264 |
- eerror "Commits must now be specified using the environmental variables" |
265 |
- eerror "WINE_COMMIT" |
266 |
- eerror |
267 |
- return 1 |
268 |
- fi |
269 |
-} |
270 |
- |
271 |
-pkg_pretend() { |
272 |
- wine_build_environment_check || die |
273 |
- |
274 |
- # Verify OSS support |
275 |
- if use oss && ! use kernel_FreeBSD; then |
276 |
- if ! has_version ">=media-sound/oss-4"; then |
277 |
- eerror "You cannot build wine with USE=oss without having support from a" |
278 |
- eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
279 |
- eerror |
280 |
- die |
281 |
- fi |
282 |
- fi |
283 |
-} |
284 |
- |
285 |
-pkg_setup() { |
286 |
- wine_build_environment_check || die |
287 |
- wine_env_vcs_vars || die |
288 |
- |
289 |
- WINE_VARIANT="${PN#wine}-${PV}" |
290 |
- WINE_VARIANT="${WINE_VARIANT#-}" |
291 |
- |
292 |
- MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
293 |
- MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
294 |
- MY_DATADIR="${MY_DATAROOTDIR}" |
295 |
- MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
296 |
- MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
297 |
- MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
298 |
- MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
299 |
- MY_MANDIR="${MY_DATADIR}/man" |
300 |
-} |
301 |
- |
302 |
-src_unpack() { |
303 |
- if [[ ${PV} == "9999" ]] ; then |
304 |
- EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
305 |
- fi |
306 |
- |
307 |
- default |
308 |
- |
309 |
- l10n_find_plocales_changes "${S}/po" "" ".po" |
310 |
-} |
311 |
- |
312 |
-src_prepare() { |
313 |
- |
314 |
- eapply_bin(){ |
315 |
- local patch |
316 |
- for patch in ${PATCHES_BIN[@]}; do |
317 |
- patchbin --nogit < "${patch}" || die |
318 |
- done |
319 |
- } |
320 |
- |
321 |
- local md5="$(md5sum server/protocol.def)" |
322 |
- local PATCHES=( |
323 |
- "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
324 |
- "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
325 |
- "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
326 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" |
327 |
- ) |
328 |
- local PATCHES_BIN=( |
329 |
- ) |
330 |
- |
331 |
- default |
332 |
- eapply_bin |
333 |
- eautoreconf |
334 |
- |
335 |
- # Modification of the server protocol requires regenerating the server requests |
336 |
- if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
337 |
- einfo "server/protocol.def was patched; running tools/make_requests" |
338 |
- tools/make_requests || die #432348 |
339 |
- fi |
340 |
- sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
341 |
- if ! use run-exes; then |
342 |
- sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
343 |
- fi |
344 |
- |
345 |
- # Edit wine.desktop to work for specific variant |
346 |
- sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
347 |
- |
348 |
- # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
349 |
- cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
350 |
- |
351 |
- l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
352 |
-} |
353 |
- |
354 |
-src_configure() { |
355 |
- wine_compiler_check || die |
356 |
- |
357 |
- export LDCONFIG=/bin/true |
358 |
- use custom-cflags || strip-flags |
359 |
- |
360 |
- multilib-minimal_src_configure |
361 |
-} |
362 |
- |
363 |
-multilib_src_configure() { |
364 |
- local myconf=( |
365 |
- --prefix="${MY_PREFIX}" |
366 |
- --datarootdir="${MY_DATAROOTDIR}" |
367 |
- --datadir="${MY_DATADIR}" |
368 |
- --docdir="${MY_DOCDIR}" |
369 |
- --includedir="${MY_INCLUDEDIR}" |
370 |
- --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
371 |
- --libexecdir="${MY_LIBEXECDIR}" |
372 |
- --localstatedir="${MY_LOCALSTATEDIR}" |
373 |
- --mandir="${MY_MANDIR}" |
374 |
- --sysconfdir=/etc/wine |
375 |
- $(use_with alsa) |
376 |
- $(use_with capi) |
377 |
- $(use_with lcms cms) |
378 |
- $(use_with cups) |
379 |
- $(use_with ncurses curses) |
380 |
- $(use_with udisks dbus) |
381 |
- $(use_with fontconfig) |
382 |
- $(use_with ssl gnutls) |
383 |
- $(use_enable gecko mshtml) |
384 |
- $(use_with gphoto2 gphoto) |
385 |
- $(use_with gsm) |
386 |
- $(use_with gstreamer) |
387 |
- --without-hal |
388 |
- $(use_with jpeg) |
389 |
- $(use_with ldap) |
390 |
- $(use_enable mono mscoree) |
391 |
- $(use_with mp3 mpg123) |
392 |
- $(use_with netapi) |
393 |
- $(use_with nls gettext) |
394 |
- $(use_with openal) |
395 |
- $(use_with opencl) |
396 |
- $(use_with opengl) |
397 |
- $(use_with osmesa) |
398 |
- $(use_with oss) |
399 |
- $(use_with pcap) |
400 |
- $(use_with png) |
401 |
- $(use_with pulseaudio pulse) |
402 |
- $(use_with threads pthread) |
403 |
- $(use_with scanner sane) |
404 |
- $(use_enable test tests) |
405 |
- $(use_with truetype freetype) |
406 |
- $(use_with udev) |
407 |
- $(use_with v4l) |
408 |
- $(use_with X x) |
409 |
- $(use_with xcomposite) |
410 |
- $(use_with xinerama) |
411 |
- $(use_with xml) |
412 |
- $(use_with xml xslt) |
413 |
- ) |
414 |
- |
415 |
- local PKG_CONFIG AR RANLIB |
416 |
- # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
417 |
- # set AR and RANLIB to make QA scripts happy; #483342 |
418 |
- tc-export PKG_CONFIG AR RANLIB |
419 |
- |
420 |
- if use amd64; then |
421 |
- if [[ ${ABI} == amd64 ]]; then |
422 |
- myconf+=( --enable-win64 ) |
423 |
- else |
424 |
- myconf+=( --disable-win64 ) |
425 |
- fi |
426 |
- |
427 |
- # Note: using --with-wine64 results in problems with multilib.eclass |
428 |
- # CC/LD hackery. We're using separate tools instead. |
429 |
- fi |
430 |
- |
431 |
- ECONF_SOURCE=${S} \ |
432 |
- econf "${myconf[@]}" |
433 |
- emake depend |
434 |
-} |
435 |
- |
436 |
-multilib_src_test() { |
437 |
- # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
438 |
- if [[ ${ABI} == x86 ]]; then |
439 |
- if [[ $(id -u) == 0 ]]; then |
440 |
- ewarn "Skipping tests since they cannot be run under the root user." |
441 |
- ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
442 |
- return |
443 |
- fi |
444 |
- |
445 |
- WINEPREFIX="${T}/.wine-${ABI}" \ |
446 |
- Xemake test |
447 |
- fi |
448 |
-} |
449 |
- |
450 |
-multilib_src_install_all() { |
451 |
- local DOCS=( ANNOUNCE AUTHORS README ) |
452 |
- add_locale_docs() { |
453 |
- local locale_doc="documentation/README.$1" |
454 |
- [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
455 |
- } |
456 |
- l10n_for_each_locale_do add_locale_docs |
457 |
- |
458 |
- einstalldocs |
459 |
- prune_libtool_files --all |
460 |
- |
461 |
- if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
462 |
- rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
463 |
- "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
464 |
- fi |
465 |
- |
466 |
- # Remove wineconsole if neither backend is installed #551124 |
467 |
- if ! use X && ! use ncurses; then |
468 |
- rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
469 |
- rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
470 |
- rm_wineconsole() { |
471 |
- rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
472 |
- } |
473 |
- multilib_foreach_abi rm_wineconsole |
474 |
- fi |
475 |
- |
476 |
- use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
477 |
- use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
478 |
- |
479 |
- if use abi_x86_64 && ! use abi_x86_32; then |
480 |
- dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
481 |
- dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
482 |
- fi |
483 |
- |
484 |
- # Failglob for bin and man loops |
485 |
- local glob_state=$(shopt -p failglob) |
486 |
- shopt -s failglob |
487 |
- |
488 |
- # Make wrappers for binaries for handling multiple variants |
489 |
- # Note: wrappers instead of symlinks because some are shell which use basename |
490 |
- local b |
491 |
- for b in "${D%/}${MY_PREFIX}"/bin/*; do |
492 |
- make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
493 |
- done |
494 |
- |
495 |
- # respect LINGUAS when installing man pages, #469418 |
496 |
- local l |
497 |
- for l in de fr pl; do |
498 |
- use linguas_${l} || rm -rf "${D%/}${MY_MANDIR}"/${l}* |
499 |
- done |
500 |
- |
501 |
- eval "${glob_state}" |
502 |
-} |
503 |
- |
504 |
-pkg_postinst() { |
505 |
- eselect wine register ${P} |
506 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
507 |
- eselect wine register --vanilla ${P} || die |
508 |
- fi |
509 |
- |
510 |
- eselect wine update --all --if-unset || die |
511 |
- |
512 |
- xdg_desktop_database_update |
513 |
- |
514 |
- if ! use gecko; then |
515 |
- ewarn "Without Wine Gecko, wine prefixes will not have a default" |
516 |
- ewarn "implementation of iexplore. Many older windows applications" |
517 |
- ewarn "rely upon the existence of an iexplore implementation, so" |
518 |
- ewarn "you will likely need to install an external one, like via winetricks" |
519 |
- fi |
520 |
- if ! use mono; then |
521 |
- ewarn "Without Wine Mono, wine prefixes will not have a default" |
522 |
- ewarn "implementation of .NET. Many windows applications rely upon" |
523 |
- ewarn "the existence of a .NET implementation, so you will likely need" |
524 |
- ewarn "to install an external one, like via winetricks" |
525 |
- fi |
526 |
-} |
527 |
- |
528 |
-pkg_prerm() { |
529 |
- eselect wine deregister ${P} |
530 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
531 |
- eselect wine deregister --vanilla ${P} || die |
532 |
- fi |
533 |
- |
534 |
- eselect wine update --all --if-unset || die |
535 |
-} |
536 |
- |
537 |
-pkg_postrm() { |
538 |
- xdg_desktop_database_update |
539 |
-} |
540 |
|
541 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.0.2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0.2.ebuild |
542 |
deleted file mode 100644 |
543 |
index 6585f56..0000000 |
544 |
--- a/app-emulation/wine-vanilla/wine-vanilla-2.0.2.ebuild |
545 |
+++ /dev/null |
546 |
@@ -1,518 +0,0 @@ |
547 |
-# Copyright 1999-2017 Gentoo Foundation |
548 |
-# Distributed under the terms of the GNU General Public License v2 |
549 |
- |
550 |
-EAPI=6 |
551 |
- |
552 |
-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" |
553 |
-PLOCALE_BACKUP="en" |
554 |
- |
555 |
-inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
556 |
- |
557 |
-MY_PN="${PN%%-*}" |
558 |
-MY_P="${MY_PN}-${PV}" |
559 |
- |
560 |
-if [[ ${PV} == "9999" ]] ; then |
561 |
- EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
562 |
- EGIT_BRANCH="master" |
563 |
- inherit git-r3 |
564 |
- SRC_URI="" |
565 |
- #KEYWORDS="" |
566 |
-else |
567 |
- MAJOR_V=$(get_version_component_range 1) |
568 |
- SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.xz" |
569 |
- KEYWORDS="-* amd64 x86 ~x86-fbsd" |
570 |
-fi |
571 |
-S="${WORKDIR}/${MY_P}" |
572 |
- |
573 |
-GWP_V="20170830" |
574 |
-PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
575 |
- |
576 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
577 |
-HOMEPAGE="https://www.winehq.org/" |
578 |
-SRC_URI="${SRC_URI} |
579 |
- https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
580 |
-" |
581 |
- |
582 |
-LICENSE="LGPL-2.1" |
583 |
-SLOT="${PV}" |
584 |
-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" |
585 |
-REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
586 |
- X? ( truetype ) |
587 |
- elibc_glibc? ( threads ) |
588 |
- osmesa? ( opengl ) |
589 |
- test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
590 |
- |
591 |
-# FIXME: the test suite is unsuitable for us; many tests require net access |
592 |
-# or fail due to Xvfb's opengl limitations. |
593 |
-RESTRICT="test" |
594 |
- |
595 |
-COMMON_DEPEND=" |
596 |
- X? ( |
597 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
598 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
599 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
600 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
601 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
602 |
- ) |
603 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
604 |
- capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
605 |
- cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
606 |
- fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
607 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
608 |
- gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
609 |
- gstreamer? ( |
610 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
611 |
- media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
612 |
- ) |
613 |
- jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
614 |
- lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
615 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
616 |
- mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
617 |
- ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
618 |
- netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
619 |
- nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
620 |
- odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
621 |
- openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
622 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
623 |
- opengl? ( |
624 |
- virtual/glu[${MULTILIB_USEDEP}] |
625 |
- virtual/opengl[${MULTILIB_USEDEP}] |
626 |
- ) |
627 |
- osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
628 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
629 |
- png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
630 |
- pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
631 |
- scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
632 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
633 |
- truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
634 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
635 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
636 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
637 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
638 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
639 |
- xml? ( |
640 |
- dev-libs/libxml2[${MULTILIB_USEDEP}] |
641 |
- dev-libs/libxslt[${MULTILIB_USEDEP}] |
642 |
- ) |
643 |
- abi_x86_32? ( |
644 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
645 |
- !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
646 |
- !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
647 |
- !<app-emulation/emul-linux-x86-db-20140508-r3 |
648 |
- !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
649 |
- !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
650 |
- !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
651 |
- !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
652 |
- !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
653 |
- !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
654 |
- !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
655 |
- !<app-emulation/emul-linux-x86-soundlibs-20140508 |
656 |
- !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
657 |
- !<app-emulation/emul-linux-x86-xlibs-20140508 |
658 |
- )" |
659 |
- |
660 |
-RDEPEND="${COMMON_DEPEND} |
661 |
- app-emulation/wine-desktop-common |
662 |
- >app-eselect/eselect-wine-0.3 |
663 |
- !app-emulation/wine:0 |
664 |
- dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
665 |
- gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
666 |
- mono? ( app-emulation/wine-mono:4.6.4 ) |
667 |
- perl? ( |
668 |
- dev-lang/perl |
669 |
- dev-perl/XML-Simple |
670 |
- ) |
671 |
- pulseaudio? ( |
672 |
- realtime? ( sys-auth/rtkit ) |
673 |
- ) |
674 |
- samba? ( >=net-fs/samba-3.0.25[winbind] ) |
675 |
- selinux? ( sec-policy/selinux-wine ) |
676 |
- udisks? ( sys-fs/udisks:2 )" |
677 |
- |
678 |
-# tools/make_requests requires perl |
679 |
-DEPEND="${COMMON_DEPEND} |
680 |
- sys-devel/flex |
681 |
- >=sys-kernel/linux-headers-2.6 |
682 |
- virtual/pkgconfig |
683 |
- virtual/yacc |
684 |
- X? ( |
685 |
- x11-proto/inputproto |
686 |
- x11-proto/xextproto |
687 |
- x11-proto/xf86vidmodeproto |
688 |
- ) |
689 |
- prelink? ( sys-devel/prelink ) |
690 |
- xinerama? ( x11-proto/xineramaproto )" |
691 |
- |
692 |
-# These use a non-standard "Wine" category, which is provided by |
693 |
-# /etc/xdg/applications-merged/wine.menu |
694 |
-QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
695 |
-usr/share/applications/wine-notepad.desktop |
696 |
-usr/share/applications/wine-uninstaller.desktop |
697 |
-usr/share/applications/wine-winecfg.desktop" |
698 |
- |
699 |
-wine_compiler_check() { |
700 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
701 |
- |
702 |
- # GCC-specific bugs |
703 |
- if tc-is-gcc; then |
704 |
- # bug #549768 |
705 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
706 |
- ebegin "Checking for gcc-5 ms_abi compiler bug" |
707 |
- $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
708 |
- # Run in subshell to prevent "Aborted" message |
709 |
- ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
710 |
- if ! eend $?; then |
711 |
- eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
712 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
713 |
- eerror "or use gcc-config to select a different compiler version." |
714 |
- eerror "See https://bugs.gentoo.org/549768" |
715 |
- eerror |
716 |
- return 1 |
717 |
- fi |
718 |
- fi |
719 |
- # bug #574044 |
720 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
721 |
- ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
722 |
- # Compile in subshell to prevent "Aborted" message |
723 |
- ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
724 |
- if ! eend $?; then |
725 |
- eerror "Wine cannot be built with this version of gcc-5.3" |
726 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
727 |
- eerror "or use gcc-config to select a different compiler version." |
728 |
- eerror "See https://bugs.gentoo.org/574044" |
729 |
- eerror |
730 |
- return 1 |
731 |
- fi |
732 |
- fi |
733 |
- fi |
734 |
- |
735 |
- # Ensure compiler support |
736 |
- if use abi_x86_64; then |
737 |
- ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
738 |
- # Compile in subshell to prevent "Aborted" message |
739 |
- ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
740 |
- if ! eend $?; then |
741 |
- eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
742 |
- eerror |
743 |
- eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
744 |
- eerror |
745 |
- return 1 |
746 |
- fi |
747 |
- fi |
748 |
-} |
749 |
- |
750 |
-wine_build_environment_check() { |
751 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
752 |
- |
753 |
- if use abi_x86_64; then |
754 |
- if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
755 |
- eerror "You need gcc-4.4+ to compile 64-bit wine" |
756 |
- die |
757 |
- elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
758 |
- eerror "You need clang-3.8+ to compile 64-bit wine" |
759 |
- die |
760 |
- fi |
761 |
- fi |
762 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
763 |
- ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
764 |
- ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
765 |
- ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
766 |
- fi |
767 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
768 |
- if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
769 |
- ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
770 |
- ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
771 |
- ewarn "See package.env in man 5 portage for more information on how to do this." |
772 |
- ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
773 |
- fi |
774 |
- fi |
775 |
- |
776 |
- if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
777 |
- eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
778 |
- eerror "See https://bugs.gentoo.org/487864 for more details." |
779 |
- eerror |
780 |
- return 1 |
781 |
- fi |
782 |
-} |
783 |
- |
784 |
-wine_env_vcs_vars() { |
785 |
- local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
786 |
- local pn_live_val="${pn_live_var}" |
787 |
- eval pn_live_val='$'${pn_live_val} |
788 |
- if [[ ! -z ${EGIT_COMMIT} ]]; then |
789 |
- eerror "Commits must now be specified using the environmental variables" |
790 |
- eerror "WINE_COMMIT" |
791 |
- eerror |
792 |
- return 1 |
793 |
- fi |
794 |
-} |
795 |
- |
796 |
-pkg_pretend() { |
797 |
- wine_build_environment_check || die |
798 |
- |
799 |
- # Verify OSS support |
800 |
- if use oss && ! use kernel_FreeBSD; then |
801 |
- if ! has_version ">=media-sound/oss-4"; then |
802 |
- eerror "You cannot build wine with USE=oss without having support from a" |
803 |
- eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
804 |
- eerror |
805 |
- die |
806 |
- fi |
807 |
- fi |
808 |
-} |
809 |
- |
810 |
-pkg_setup() { |
811 |
- wine_build_environment_check || die |
812 |
- wine_env_vcs_vars || die |
813 |
- |
814 |
- WINE_VARIANT="${PN#wine}-${PV}" |
815 |
- WINE_VARIANT="${WINE_VARIANT#-}" |
816 |
- |
817 |
- MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
818 |
- MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
819 |
- MY_DATADIR="${MY_DATAROOTDIR}" |
820 |
- MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
821 |
- MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
822 |
- MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
823 |
- MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
824 |
- MY_MANDIR="${MY_DATADIR}/man" |
825 |
-} |
826 |
- |
827 |
-src_unpack() { |
828 |
- if [[ ${PV} == "9999" ]] ; then |
829 |
- EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
830 |
- fi |
831 |
- |
832 |
- default |
833 |
- |
834 |
- l10n_find_plocales_changes "${S}/po" "" ".po" |
835 |
-} |
836 |
- |
837 |
-src_prepare() { |
838 |
- |
839 |
- eapply_bin(){ |
840 |
- local patch |
841 |
- for patch in ${PATCHES_BIN[@]}; do |
842 |
- patchbin --nogit < "${patch}" || die |
843 |
- done |
844 |
- } |
845 |
- |
846 |
- local md5="$(md5sum server/protocol.def)" |
847 |
- local PATCHES=( |
848 |
- "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
849 |
- "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
850 |
- "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
851 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" |
852 |
- ) |
853 |
- local PATCHES_BIN=( |
854 |
- ) |
855 |
- |
856 |
- default |
857 |
- eapply_bin |
858 |
- eautoreconf |
859 |
- |
860 |
- # Modification of the server protocol requires regenerating the server requests |
861 |
- if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
862 |
- einfo "server/protocol.def was patched; running tools/make_requests" |
863 |
- tools/make_requests || die #432348 |
864 |
- fi |
865 |
- sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
866 |
- if ! use run-exes; then |
867 |
- sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
868 |
- fi |
869 |
- |
870 |
- # Edit wine.desktop to work for specific variant |
871 |
- sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
872 |
- |
873 |
- # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
874 |
- cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
875 |
- |
876 |
- l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
877 |
-} |
878 |
- |
879 |
-src_configure() { |
880 |
- wine_compiler_check || die |
881 |
- |
882 |
- export LDCONFIG=/bin/true |
883 |
- use custom-cflags || strip-flags |
884 |
- |
885 |
- multilib-minimal_src_configure |
886 |
-} |
887 |
- |
888 |
-multilib_src_configure() { |
889 |
- local myconf=( |
890 |
- --prefix="${MY_PREFIX}" |
891 |
- --datarootdir="${MY_DATAROOTDIR}" |
892 |
- --datadir="${MY_DATADIR}" |
893 |
- --docdir="${MY_DOCDIR}" |
894 |
- --includedir="${MY_INCLUDEDIR}" |
895 |
- --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
896 |
- --libexecdir="${MY_LIBEXECDIR}" |
897 |
- --localstatedir="${MY_LOCALSTATEDIR}" |
898 |
- --mandir="${MY_MANDIR}" |
899 |
- --sysconfdir=/etc/wine |
900 |
- $(use_with alsa) |
901 |
- $(use_with capi) |
902 |
- $(use_with lcms cms) |
903 |
- $(use_with cups) |
904 |
- $(use_with ncurses curses) |
905 |
- $(use_with udisks dbus) |
906 |
- $(use_with fontconfig) |
907 |
- $(use_with ssl gnutls) |
908 |
- $(use_enable gecko mshtml) |
909 |
- $(use_with gphoto2 gphoto) |
910 |
- $(use_with gsm) |
911 |
- $(use_with gstreamer) |
912 |
- --without-hal |
913 |
- $(use_with jpeg) |
914 |
- $(use_with ldap) |
915 |
- $(use_enable mono mscoree) |
916 |
- $(use_with mp3 mpg123) |
917 |
- $(use_with netapi) |
918 |
- $(use_with nls gettext) |
919 |
- $(use_with openal) |
920 |
- $(use_with opencl) |
921 |
- $(use_with opengl) |
922 |
- $(use_with osmesa) |
923 |
- $(use_with oss) |
924 |
- $(use_with pcap) |
925 |
- $(use_with png) |
926 |
- $(use_with pulseaudio pulse) |
927 |
- $(use_with threads pthread) |
928 |
- $(use_with scanner sane) |
929 |
- $(use_enable test tests) |
930 |
- $(use_with truetype freetype) |
931 |
- $(use_with udev) |
932 |
- $(use_with v4l) |
933 |
- $(use_with X x) |
934 |
- $(use_with xcomposite) |
935 |
- $(use_with xinerama) |
936 |
- $(use_with xml) |
937 |
- $(use_with xml xslt) |
938 |
- ) |
939 |
- |
940 |
- local PKG_CONFIG AR RANLIB |
941 |
- # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
942 |
- # set AR and RANLIB to make QA scripts happy; #483342 |
943 |
- tc-export PKG_CONFIG AR RANLIB |
944 |
- |
945 |
- if use amd64; then |
946 |
- if [[ ${ABI} == amd64 ]]; then |
947 |
- myconf+=( --enable-win64 ) |
948 |
- else |
949 |
- myconf+=( --disable-win64 ) |
950 |
- fi |
951 |
- |
952 |
- # Note: using --with-wine64 results in problems with multilib.eclass |
953 |
- # CC/LD hackery. We're using separate tools instead. |
954 |
- fi |
955 |
- |
956 |
- ECONF_SOURCE=${S} \ |
957 |
- econf "${myconf[@]}" |
958 |
- emake depend |
959 |
-} |
960 |
- |
961 |
-multilib_src_test() { |
962 |
- # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
963 |
- if [[ ${ABI} == x86 ]]; then |
964 |
- if [[ $(id -u) == 0 ]]; then |
965 |
- ewarn "Skipping tests since they cannot be run under the root user." |
966 |
- ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
967 |
- return |
968 |
- fi |
969 |
- |
970 |
- WINEPREFIX="${T}/.wine-${ABI}" \ |
971 |
- Xemake test |
972 |
- fi |
973 |
-} |
974 |
- |
975 |
-multilib_src_install_all() { |
976 |
- local DOCS=( ANNOUNCE AUTHORS README ) |
977 |
- add_locale_docs() { |
978 |
- local locale_doc="documentation/README.$1" |
979 |
- [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
980 |
- } |
981 |
- l10n_for_each_locale_do add_locale_docs |
982 |
- |
983 |
- einstalldocs |
984 |
- prune_libtool_files --all |
985 |
- |
986 |
- if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
987 |
- rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
988 |
- "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
989 |
- fi |
990 |
- |
991 |
- # Remove wineconsole if neither backend is installed #551124 |
992 |
- if ! use X && ! use ncurses; then |
993 |
- rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
994 |
- rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
995 |
- rm_wineconsole() { |
996 |
- rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
997 |
- } |
998 |
- multilib_foreach_abi rm_wineconsole |
999 |
- fi |
1000 |
- |
1001 |
- use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
1002 |
- use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
1003 |
- |
1004 |
- if use abi_x86_64 && ! use abi_x86_32; then |
1005 |
- dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
1006 |
- dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
1007 |
- fi |
1008 |
- |
1009 |
- # Failglob for bin and man loops |
1010 |
- local glob_state=$(shopt -p failglob) |
1011 |
- shopt -s failglob |
1012 |
- |
1013 |
- # Make wrappers for binaries for handling multiple variants |
1014 |
- # Note: wrappers instead of symlinks because some are shell which use basename |
1015 |
- local b |
1016 |
- for b in "${D%/}${MY_PREFIX}"/bin/*; do |
1017 |
- make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
1018 |
- done |
1019 |
- |
1020 |
- # respect LINGUAS when installing man pages, #469418 |
1021 |
- local l |
1022 |
- for l in de fr pl; do |
1023 |
- use linguas_${l} || rm -rf "${D%/}${MY_MANDIR}"/${l}* |
1024 |
- done |
1025 |
- |
1026 |
- eval "${glob_state}" |
1027 |
-} |
1028 |
- |
1029 |
-pkg_postinst() { |
1030 |
- eselect wine register ${P} |
1031 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
1032 |
- eselect wine register --vanilla ${P} || die |
1033 |
- fi |
1034 |
- |
1035 |
- eselect wine update --all --if-unset || die |
1036 |
- |
1037 |
- xdg_desktop_database_update |
1038 |
- |
1039 |
- if ! use gecko; then |
1040 |
- ewarn "Without Wine Gecko, wine prefixes will not have a default" |
1041 |
- ewarn "implementation of iexplore. Many older windows applications" |
1042 |
- ewarn "rely upon the existence of an iexplore implementation, so" |
1043 |
- ewarn "you will likely need to install an external one, like via winetricks" |
1044 |
- fi |
1045 |
- if ! use mono; then |
1046 |
- ewarn "Without Wine Mono, wine prefixes will not have a default" |
1047 |
- ewarn "implementation of .NET. Many windows applications rely upon" |
1048 |
- ewarn "the existence of a .NET implementation, so you will likely need" |
1049 |
- ewarn "to install an external one, like via winetricks" |
1050 |
- fi |
1051 |
-} |
1052 |
- |
1053 |
-pkg_prerm() { |
1054 |
- eselect wine deregister ${P} |
1055 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
1056 |
- eselect wine deregister --vanilla ${P} || die |
1057 |
- fi |
1058 |
- |
1059 |
- eselect wine update --all --if-unset || die |
1060 |
-} |
1061 |
- |
1062 |
-pkg_postrm() { |
1063 |
- xdg_desktop_database_update |
1064 |
-} |