1 |
commit: 6ff9364cd4d51968424067a6970828644d338400 |
2 |
Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 29 02:24:07 2017 +0000 |
4 |
Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 29 02:29:41 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ff9364c |
7 |
|
8 |
app-emulation/wine-vanilla: Re-add upstream stable releases |
9 |
|
10 |
Package-Manager: Portage-2.3.14, Repoman-2.3.6 |
11 |
|
12 |
app-emulation/wine-vanilla/Manifest | 7 +- |
13 |
.../wine-vanilla/wine-vanilla-2.0-r1.ebuild | 527 +++++++++++++++++++++ |
14 |
.../wine-vanilla/wine-vanilla-2.0.1-r1.ebuild | 527 +++++++++++++++++++++ |
15 |
.../wine-vanilla/wine-vanilla-2.0.1.ebuild | 518 ++++++++++++++++++++ |
16 |
.../wine-vanilla/wine-vanilla-2.0.2-r1.ebuild | 527 +++++++++++++++++++++ |
17 |
.../wine-vanilla/wine-vanilla-2.0.3.ebuild | 523 ++++++++++++++++++++ |
18 |
6 files changed, 2627 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest |
21 |
index d179e68e660..bd97bedd8f0 100644 |
22 |
--- a/app-emulation/wine-vanilla/Manifest |
23 |
+++ b/app-emulation/wine-vanilla/Manifest |
24 |
@@ -1,5 +1,8 @@ |
25 |
DIST gentoo-wine-patches-20170830.tar.xz 58456 BLAKE2B 86445a6d91d9981d069ff2fb3b64a47e166c76b4721ef877c74cd60e359ee5bdbe36ebf37cf796a18e9cf42dbc69ce1496777144fc28b072f47c965173bf48b4 SHA512 5e5159e3252b246bba0ef7fdba345db3ab1071c5b8b8b625f98eda18779d4024c5b76bdbf49ce7bd5c6b01b422807adf76820beddb2b4a6ee9e67d13052cc575 |
26 |
-DIST wine-2.0.2.tar.xz 18854952 SHA256 f71884f539928877f4b415309f582825d3d3c9976104e43d566944c710713c9a SHA512 3f37080a951819304cd3475f6012f1d6b5a94879b137cdf816cac4c8fde68ddc777905e92277ec5dce96437d8c32c43d55d3750b582781a9f9774b118f1a5b90 WHIRLPOOL cf21a899c60749c37353abc4ba974b3d6cc369769ace70fde899ff1cb5ac8a97828165cf2dbfbcf0915f5196ac58974948fe3e5b2c9854296a5eea75f8023ae5 |
27 |
-DIST wine-2.18.tar.xz 19546360 SHA256 9f0931129878157d717cb39f16cd33bf49f40aac77331c93d0ad30f2ccac4f50 SHA512 61cc39fa3d2b0a0ab3c5d17579865e6aea76dd9513a4b3c45975a2d5c05f2b4ba952b97eef547131a014763c7f692a08df29bc2ebf7e4ac7e2616e6a7822ddb9 WHIRLPOOL e864dd1705c0480d3f3095aa02ab1e7bc5b41693cd6b791cdf05e636c7099562020ac3adcba6421653efdf5dbe232b5abe9071792785e008ea30dedbb63e080e |
28 |
+DIST wine-2.0.1.tar.xz 18845444 BLAKE2B 82e692c9a216087ea3b51cba659b12a79b25b44aac2ab572b9cf6d12c29b8fa5cee3c4bb9f8e9dca526ded2c6ba1f77d2c948b783914427ec2b93409e64ccaec SHA512 b32d07443655898768383b7409c21093b60c028fef166a596dad5dfab5a329b9fce4552e612c6d182e4f67eb1f28ed497fe2ed6af55d0000d3e96a124547722d |
29 |
+DIST wine-2.0.2.tar.xz 18854952 BLAKE2B ae55b6a31e4d36b367a84e0e5fa7bea8c39a61ecfe7def4082747df4c55d0ee5c72e132bc77b49935fee8d0faf7f4d2cddfda0c712b6042b440dda1946e682b6 SHA512 3f37080a951819304cd3475f6012f1d6b5a94879b137cdf816cac4c8fde68ddc777905e92277ec5dce96437d8c32c43d55d3750b582781a9f9774b118f1a5b90 |
30 |
+DIST wine-2.0.3.tar.xz 18864648 BLAKE2B 0503a11e7545d5af805bfc3c2f614b6e35e39b7b532ee45dd9947e1a9a53eb788a304e744c683e42bf84f0e67e2c046ea5f839b6bbad1cf73b9996eaae5c30c1 SHA512 e20dbcb3a48ecb3526eba075d4baebab2529dfc50b7a6d5e18294704470f61db386013f457118c270274b911f9643d203110f46558d23e84e6a6c2d78e237dbb |
31 |
+DIST wine-2.0.tar.bz2 23662707 BLAKE2B 1d485c1359ce8a0395a9f6378c1f8be33ea2836b80390d1eb1095057a0acedd21708daab16e1851a315391b9f9b0a360879b9d98c73bcc8371c5023e9a8037f5 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 |
32 |
+DIST wine-2.18.tar.xz 19546360 BLAKE2B 711b1396160b325a3021f066cc80eda0e2eb69c46ab671c6a4d1f417d0c2439e53854d37fee8507296386d1a828484af93e833f6c08413fd2571c03477e97386 SHA512 61cc39fa3d2b0a0ab3c5d17579865e6aea76dd9513a4b3c45975a2d5c05f2b4ba952b97eef547131a014763c7f692a08df29bc2ebf7e4ac7e2616e6a7822ddb9 |
33 |
DIST wine-2.19.tar.xz 19549464 BLAKE2B 86d130cc43d7d674d2f478365952962b2792fd585b8d074564108bc7e9f4f7690337e4758b9a24e54fe8fd60187d3a96496a5ffc454ba674b02ecdde68efd3bb SHA512 83558231bdc592b1f69cfedf6c689063df7bd9fecdfafba6fb7f6a2c7fa7783973efb85a6a49305afc18b1aa268209ee5b9c0655756e05d7550468698dfa51ae |
34 |
DIST wine-2.20.tar.xz 19597556 BLAKE2B 80a9886fa77e5788b143521288f7d83c92754610c9426e58c759d2c33767bd23f7d2a44a17ceeec0bfe9065264393e0aa1087a0827ea7d438ffd938ba2eb2fb5 SHA512 d8d374d1e690ce9d3964fc81054fb7f4cd56cbae6bc44ebbf80b7dc7f04524baa2bd831e0be8f00de4cb0e14c1cb71780d424f5dcb9851fcaed9fb22f5ce5d23 |
35 |
|
36 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.0-r1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0-r1.ebuild |
37 |
new file mode 100644 |
38 |
index 00000000000..d9e20bebdf6 |
39 |
--- /dev/null |
40 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.0-r1.ebuild |
41 |
@@ -0,0 +1,527 @@ |
42 |
+# Copyright 1999-2017 Gentoo Foundation |
43 |
+# Distributed under the terms of the GNU General Public License v2 |
44 |
+ |
45 |
+EAPI=6 |
46 |
+ |
47 |
+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" |
48 |
+PLOCALE_BACKUP="en" |
49 |
+ |
50 |
+inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
51 |
+ |
52 |
+MY_PN="${PN%%-*}" |
53 |
+MY_P="${MY_PN}-${PV}" |
54 |
+ |
55 |
+if [[ ${PV} == "9999" ]] ; then |
56 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
57 |
+ EGIT_BRANCH="master" |
58 |
+ inherit git-r3 |
59 |
+ SRC_URI="" |
60 |
+ #KEYWORDS="" |
61 |
+else |
62 |
+ MAJOR_V=$(get_version_component_range 1) |
63 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.bz2" |
64 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
65 |
+fi |
66 |
+S="${WORKDIR}/${MY_P}" |
67 |
+ |
68 |
+GWP_V="20170830" |
69 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
70 |
+ |
71 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
72 |
+HOMEPAGE="https://www.winehq.org/" |
73 |
+SRC_URI="${SRC_URI} |
74 |
+ https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
75 |
+" |
76 |
+ |
77 |
+LICENSE="LGPL-2.1" |
78 |
+SLOT="${PV}" |
79 |
+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" |
80 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
81 |
+ X? ( truetype ) |
82 |
+ elibc_glibc? ( threads ) |
83 |
+ osmesa? ( opengl ) |
84 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
85 |
+ |
86 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
87 |
+# or fail due to Xvfb's opengl limitations. |
88 |
+RESTRICT="test" |
89 |
+ |
90 |
+COMMON_DEPEND=" |
91 |
+ X? ( |
92 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
93 |
+ x11-libs/libXext[${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? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
103 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
104 |
+ gstreamer? ( |
105 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
106 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
107 |
+ ) |
108 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
109 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
110 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
111 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
112 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${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/glu[${MULTILIB_USEDEP}] |
120 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
121 |
+ ) |
122 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
123 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
124 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
125 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
126 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
127 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
128 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
129 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
130 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
131 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
132 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
133 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
134 |
+ xml? ( |
135 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
136 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
137 |
+ ) |
138 |
+ abi_x86_32? ( |
139 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
140 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
141 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
142 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
143 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
144 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
145 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
146 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
147 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
148 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
149 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
150 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
151 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
152 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
153 |
+ )" |
154 |
+ |
155 |
+RDEPEND="${COMMON_DEPEND} |
156 |
+ app-emulation/wine-desktop-common |
157 |
+ >app-eselect/eselect-wine-0.3 |
158 |
+ !app-emulation/wine:0 |
159 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
160 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
161 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
162 |
+ perl? ( |
163 |
+ dev-lang/perl |
164 |
+ dev-perl/XML-Simple |
165 |
+ ) |
166 |
+ pulseaudio? ( |
167 |
+ realtime? ( sys-auth/rtkit ) |
168 |
+ ) |
169 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
170 |
+ selinux? ( sec-policy/selinux-wine ) |
171 |
+ udisks? ( sys-fs/udisks:2 )" |
172 |
+ |
173 |
+# tools/make_requests requires perl |
174 |
+DEPEND="${COMMON_DEPEND} |
175 |
+ sys-devel/flex |
176 |
+ >=sys-kernel/linux-headers-2.6 |
177 |
+ virtual/pkgconfig |
178 |
+ virtual/yacc |
179 |
+ X? ( |
180 |
+ x11-proto/inputproto |
181 |
+ x11-proto/xextproto |
182 |
+ x11-proto/xf86vidmodeproto |
183 |
+ ) |
184 |
+ prelink? ( sys-devel/prelink ) |
185 |
+ xinerama? ( x11-proto/xineramaproto )" |
186 |
+ |
187 |
+# These use a non-standard "Wine" category, which is provided by |
188 |
+# /etc/xdg/applications-merged/wine.menu |
189 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
190 |
+usr/share/applications/wine-notepad.desktop |
191 |
+usr/share/applications/wine-uninstaller.desktop |
192 |
+usr/share/applications/wine-winecfg.desktop" |
193 |
+ |
194 |
+PATCHES=( |
195 |
+ "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
196 |
+ "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
197 |
+ "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
198 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" |
199 |
+ "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676 |
200 |
+ "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376 |
201 |
+) |
202 |
+PATCHES_BIN=( |
203 |
+ "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376 |
204 |
+) |
205 |
+ |
206 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
207 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
208 |
+ DEPEND+=" dev-util/patchbin" |
209 |
+fi |
210 |
+ |
211 |
+wine_compiler_check() { |
212 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
213 |
+ |
214 |
+ # GCC-specific bugs |
215 |
+ if tc-is-gcc; then |
216 |
+ # bug #549768 |
217 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
218 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
219 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
220 |
+ # Run in subshell to prevent "Aborted" message |
221 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
222 |
+ if ! eend $?; then |
223 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
224 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
225 |
+ eerror "or use gcc-config to select a different compiler version." |
226 |
+ eerror "See https://bugs.gentoo.org/549768" |
227 |
+ eerror |
228 |
+ return 1 |
229 |
+ fi |
230 |
+ fi |
231 |
+ # bug #574044 |
232 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
233 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
234 |
+ # Compile in subshell to prevent "Aborted" message |
235 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
236 |
+ if ! eend $?; then |
237 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
238 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
239 |
+ eerror "or use gcc-config to select a different compiler version." |
240 |
+ eerror "See https://bugs.gentoo.org/574044" |
241 |
+ eerror |
242 |
+ return 1 |
243 |
+ fi |
244 |
+ fi |
245 |
+ fi |
246 |
+ |
247 |
+ # Ensure compiler support |
248 |
+ if use abi_x86_64; then |
249 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
250 |
+ # Compile in subshell to prevent "Aborted" message |
251 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
252 |
+ if ! eend $?; then |
253 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
254 |
+ eerror |
255 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
256 |
+ eerror |
257 |
+ return 1 |
258 |
+ fi |
259 |
+ fi |
260 |
+} |
261 |
+ |
262 |
+wine_build_environment_check() { |
263 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
264 |
+ |
265 |
+ if use abi_x86_64; then |
266 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
267 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
268 |
+ die |
269 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
270 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
271 |
+ die |
272 |
+ fi |
273 |
+ fi |
274 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
275 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
276 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
277 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
278 |
+ fi |
279 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
280 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
281 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
282 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
283 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
284 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
285 |
+ fi |
286 |
+ fi |
287 |
+ |
288 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
289 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
290 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
291 |
+ eerror |
292 |
+ return 1 |
293 |
+ fi |
294 |
+} |
295 |
+ |
296 |
+wine_env_vcs_vars() { |
297 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
298 |
+ local pn_live_val="${pn_live_var}" |
299 |
+ eval pn_live_val='$'${pn_live_val} |
300 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
301 |
+ eerror "Commits must now be specified using the environmental variables" |
302 |
+ eerror "WINE_COMMIT" |
303 |
+ eerror |
304 |
+ return 1 |
305 |
+ fi |
306 |
+} |
307 |
+ |
308 |
+pkg_pretend() { |
309 |
+ wine_build_environment_check || die |
310 |
+ |
311 |
+ # Verify OSS support |
312 |
+ if use oss && ! use kernel_FreeBSD; then |
313 |
+ if ! has_version ">=media-sound/oss-4"; then |
314 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
315 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
316 |
+ eerror |
317 |
+ die |
318 |
+ fi |
319 |
+ fi |
320 |
+} |
321 |
+ |
322 |
+pkg_setup() { |
323 |
+ wine_build_environment_check || die |
324 |
+ wine_env_vcs_vars || die |
325 |
+ |
326 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
327 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
328 |
+ |
329 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
330 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
331 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
332 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
333 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
334 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
335 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
336 |
+ MY_MANDIR="${MY_DATADIR}/man" |
337 |
+} |
338 |
+ |
339 |
+src_unpack() { |
340 |
+ if [[ ${PV} == "9999" ]] ; then |
341 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
342 |
+ fi |
343 |
+ |
344 |
+ default |
345 |
+ |
346 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
347 |
+} |
348 |
+ |
349 |
+src_prepare() { |
350 |
+ |
351 |
+ eapply_bin(){ |
352 |
+ local patch |
353 |
+ for patch in ${PATCHES_BIN[@]}; do |
354 |
+ patchbin --nogit < "${patch}" || die |
355 |
+ done |
356 |
+ } |
357 |
+ |
358 |
+ local md5="$(md5sum server/protocol.def)" |
359 |
+ |
360 |
+ default |
361 |
+ eapply_bin |
362 |
+ eautoreconf |
363 |
+ |
364 |
+ # Modification of the server protocol requires regenerating the server requests |
365 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
366 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
367 |
+ tools/make_requests || die #432348 |
368 |
+ fi |
369 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
370 |
+ if ! use run-exes; then |
371 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
372 |
+ fi |
373 |
+ |
374 |
+ # Edit wine.desktop to work for specific variant |
375 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
376 |
+ |
377 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
378 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
379 |
+ |
380 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
381 |
+} |
382 |
+ |
383 |
+src_configure() { |
384 |
+ wine_compiler_check || die |
385 |
+ |
386 |
+ export LDCONFIG=/bin/true |
387 |
+ use custom-cflags || strip-flags |
388 |
+ |
389 |
+ multilib-minimal_src_configure |
390 |
+} |
391 |
+ |
392 |
+multilib_src_configure() { |
393 |
+ local myconf=( |
394 |
+ --prefix="${MY_PREFIX}" |
395 |
+ --datarootdir="${MY_DATAROOTDIR}" |
396 |
+ --datadir="${MY_DATADIR}" |
397 |
+ --docdir="${MY_DOCDIR}" |
398 |
+ --includedir="${MY_INCLUDEDIR}" |
399 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
400 |
+ --libexecdir="${MY_LIBEXECDIR}" |
401 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
402 |
+ --mandir="${MY_MANDIR}" |
403 |
+ --sysconfdir=/etc/wine |
404 |
+ $(use_with alsa) |
405 |
+ $(use_with capi) |
406 |
+ $(use_with lcms cms) |
407 |
+ $(use_with cups) |
408 |
+ $(use_with ncurses curses) |
409 |
+ $(use_with udisks dbus) |
410 |
+ $(use_with fontconfig) |
411 |
+ $(use_with ssl gnutls) |
412 |
+ $(use_enable gecko mshtml) |
413 |
+ $(use_with gphoto2 gphoto) |
414 |
+ $(use_with gsm) |
415 |
+ $(use_with gstreamer) |
416 |
+ --without-hal |
417 |
+ $(use_with jpeg) |
418 |
+ $(use_with ldap) |
419 |
+ $(use_enable mono mscoree) |
420 |
+ $(use_with mp3 mpg123) |
421 |
+ $(use_with netapi) |
422 |
+ $(use_with nls gettext) |
423 |
+ $(use_with openal) |
424 |
+ $(use_with opencl) |
425 |
+ $(use_with opengl) |
426 |
+ $(use_with osmesa) |
427 |
+ $(use_with oss) |
428 |
+ $(use_with pcap) |
429 |
+ $(use_with png) |
430 |
+ $(use_with pulseaudio pulse) |
431 |
+ $(use_with threads pthread) |
432 |
+ $(use_with scanner sane) |
433 |
+ $(use_enable test tests) |
434 |
+ $(use_with truetype freetype) |
435 |
+ $(use_with udev) |
436 |
+ $(use_with v4l) |
437 |
+ $(use_with X x) |
438 |
+ $(use_with xcomposite) |
439 |
+ $(use_with xinerama) |
440 |
+ $(use_with xml) |
441 |
+ $(use_with xml xslt) |
442 |
+ ) |
443 |
+ |
444 |
+ local PKG_CONFIG AR RANLIB |
445 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
446 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
447 |
+ tc-export PKG_CONFIG AR RANLIB |
448 |
+ |
449 |
+ if use amd64; then |
450 |
+ if [[ ${ABI} == amd64 ]]; then |
451 |
+ myconf+=( --enable-win64 ) |
452 |
+ else |
453 |
+ myconf+=( --disable-win64 ) |
454 |
+ fi |
455 |
+ |
456 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
457 |
+ # CC/LD hackery. We're using separate tools instead. |
458 |
+ fi |
459 |
+ |
460 |
+ ECONF_SOURCE=${S} \ |
461 |
+ econf "${myconf[@]}" |
462 |
+ emake depend |
463 |
+} |
464 |
+ |
465 |
+multilib_src_test() { |
466 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
467 |
+ if [[ ${ABI} == x86 ]]; then |
468 |
+ if [[ $(id -u) == 0 ]]; then |
469 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
470 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
471 |
+ return |
472 |
+ fi |
473 |
+ |
474 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
475 |
+ Xemake test |
476 |
+ fi |
477 |
+} |
478 |
+ |
479 |
+multilib_src_install_all() { |
480 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
481 |
+ add_locale_docs() { |
482 |
+ local locale_doc="documentation/README.$1" |
483 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
484 |
+ } |
485 |
+ l10n_for_each_locale_do add_locale_docs |
486 |
+ |
487 |
+ einstalldocs |
488 |
+ prune_libtool_files --all |
489 |
+ |
490 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
491 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
492 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
493 |
+ fi |
494 |
+ |
495 |
+ # Remove wineconsole if neither backend is installed #551124 |
496 |
+ if ! use X && ! use ncurses; then |
497 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
498 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
499 |
+ rm_wineconsole() { |
500 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
501 |
+ } |
502 |
+ multilib_foreach_abi rm_wineconsole |
503 |
+ fi |
504 |
+ |
505 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
506 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
507 |
+ |
508 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
509 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
510 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
511 |
+ fi |
512 |
+ |
513 |
+ # Failglob for bin and man loops |
514 |
+ local glob_state=$(shopt -p failglob) |
515 |
+ shopt -s failglob |
516 |
+ |
517 |
+ # Make wrappers for binaries for handling multiple variants |
518 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
519 |
+ local b |
520 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
521 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
522 |
+ done |
523 |
+ |
524 |
+ # respect LINGUAS when installing man pages, #469418 |
525 |
+ local l |
526 |
+ for l in de fr pl; do |
527 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
528 |
+ done |
529 |
+ |
530 |
+ eval "${glob_state}" |
531 |
+} |
532 |
+ |
533 |
+pkg_postinst() { |
534 |
+ eselect wine register ${P} |
535 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
536 |
+ eselect wine register --vanilla ${P} || die |
537 |
+ fi |
538 |
+ |
539 |
+ eselect wine update --all --if-unset || die |
540 |
+ |
541 |
+ xdg_desktop_database_update |
542 |
+ |
543 |
+ if ! use gecko; then |
544 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
545 |
+ ewarn "implementation of iexplore. Many older windows applications" |
546 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
547 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
548 |
+ fi |
549 |
+ if ! use mono; then |
550 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
551 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
552 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
553 |
+ ewarn "to install an external one, like via winetricks" |
554 |
+ fi |
555 |
+} |
556 |
+ |
557 |
+pkg_prerm() { |
558 |
+ eselect wine deregister ${P} |
559 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
560 |
+ eselect wine deregister --vanilla ${P} || die |
561 |
+ fi |
562 |
+ |
563 |
+ eselect wine update --all --if-unset || die |
564 |
+} |
565 |
+ |
566 |
+pkg_postrm() { |
567 |
+ xdg_desktop_database_update |
568 |
+} |
569 |
|
570 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.0.1-r1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0.1-r1.ebuild |
571 |
new file mode 100644 |
572 |
index 00000000000..0a297502ec6 |
573 |
--- /dev/null |
574 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.0.1-r1.ebuild |
575 |
@@ -0,0 +1,527 @@ |
576 |
+# Copyright 1999-2017 Gentoo Foundation |
577 |
+# Distributed under the terms of the GNU General Public License v2 |
578 |
+ |
579 |
+EAPI=6 |
580 |
+ |
581 |
+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" |
582 |
+PLOCALE_BACKUP="en" |
583 |
+ |
584 |
+inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
585 |
+ |
586 |
+MY_PN="${PN%%-*}" |
587 |
+MY_P="${MY_PN}-${PV}" |
588 |
+ |
589 |
+if [[ ${PV} == "9999" ]] ; then |
590 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
591 |
+ EGIT_BRANCH="master" |
592 |
+ inherit git-r3 |
593 |
+ SRC_URI="" |
594 |
+ #KEYWORDS="" |
595 |
+else |
596 |
+ MAJOR_V=$(get_version_component_range 1) |
597 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.xz" |
598 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
599 |
+fi |
600 |
+S="${WORKDIR}/${MY_P}" |
601 |
+ |
602 |
+GWP_V="20170830" |
603 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
604 |
+ |
605 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
606 |
+HOMEPAGE="https://www.winehq.org/" |
607 |
+SRC_URI="${SRC_URI} |
608 |
+ https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
609 |
+" |
610 |
+ |
611 |
+LICENSE="LGPL-2.1" |
612 |
+SLOT="${PV}" |
613 |
+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" |
614 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
615 |
+ X? ( truetype ) |
616 |
+ elibc_glibc? ( threads ) |
617 |
+ osmesa? ( opengl ) |
618 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
619 |
+ |
620 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
621 |
+# or fail due to Xvfb's opengl limitations. |
622 |
+RESTRICT="test" |
623 |
+ |
624 |
+COMMON_DEPEND=" |
625 |
+ X? ( |
626 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
627 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
628 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
629 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
630 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
631 |
+ ) |
632 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
633 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
634 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
635 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
636 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
637 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
638 |
+ gstreamer? ( |
639 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
640 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
641 |
+ ) |
642 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
643 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
644 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
645 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
646 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
647 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
648 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
649 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
650 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
651 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
652 |
+ opengl? ( |
653 |
+ virtual/glu[${MULTILIB_USEDEP}] |
654 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
655 |
+ ) |
656 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
657 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
658 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
659 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
660 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
661 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
662 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
663 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
664 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
665 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
666 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
667 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
668 |
+ xml? ( |
669 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
670 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
671 |
+ ) |
672 |
+ abi_x86_32? ( |
673 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
674 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
675 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
676 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
677 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
678 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
679 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
680 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
681 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
682 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
683 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
684 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
685 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
686 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
687 |
+ )" |
688 |
+ |
689 |
+RDEPEND="${COMMON_DEPEND} |
690 |
+ app-emulation/wine-desktop-common |
691 |
+ >app-eselect/eselect-wine-0.3 |
692 |
+ !app-emulation/wine:0 |
693 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
694 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
695 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
696 |
+ perl? ( |
697 |
+ dev-lang/perl |
698 |
+ dev-perl/XML-Simple |
699 |
+ ) |
700 |
+ pulseaudio? ( |
701 |
+ realtime? ( sys-auth/rtkit ) |
702 |
+ ) |
703 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
704 |
+ selinux? ( sec-policy/selinux-wine ) |
705 |
+ udisks? ( sys-fs/udisks:2 )" |
706 |
+ |
707 |
+# tools/make_requests requires perl |
708 |
+DEPEND="${COMMON_DEPEND} |
709 |
+ sys-devel/flex |
710 |
+ >=sys-kernel/linux-headers-2.6 |
711 |
+ virtual/pkgconfig |
712 |
+ virtual/yacc |
713 |
+ X? ( |
714 |
+ x11-proto/inputproto |
715 |
+ x11-proto/xextproto |
716 |
+ x11-proto/xf86vidmodeproto |
717 |
+ ) |
718 |
+ prelink? ( sys-devel/prelink ) |
719 |
+ xinerama? ( x11-proto/xineramaproto )" |
720 |
+ |
721 |
+# These use a non-standard "Wine" category, which is provided by |
722 |
+# /etc/xdg/applications-merged/wine.menu |
723 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
724 |
+usr/share/applications/wine-notepad.desktop |
725 |
+usr/share/applications/wine-uninstaller.desktop |
726 |
+usr/share/applications/wine-winecfg.desktop" |
727 |
+ |
728 |
+PATCHES=( |
729 |
+ "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
730 |
+ "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
731 |
+ "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
732 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" |
733 |
+ "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676 |
734 |
+ "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376 |
735 |
+) |
736 |
+PATCHES_BIN=( |
737 |
+ "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376 |
738 |
+) |
739 |
+ |
740 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
741 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
742 |
+ DEPEND+=" dev-util/patchbin" |
743 |
+fi |
744 |
+ |
745 |
+wine_compiler_check() { |
746 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
747 |
+ |
748 |
+ # GCC-specific bugs |
749 |
+ if tc-is-gcc; then |
750 |
+ # bug #549768 |
751 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
752 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
753 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
754 |
+ # Run in subshell to prevent "Aborted" message |
755 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
756 |
+ if ! eend $?; then |
757 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
758 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
759 |
+ eerror "or use gcc-config to select a different compiler version." |
760 |
+ eerror "See https://bugs.gentoo.org/549768" |
761 |
+ eerror |
762 |
+ return 1 |
763 |
+ fi |
764 |
+ fi |
765 |
+ # bug #574044 |
766 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
767 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
768 |
+ # Compile in subshell to prevent "Aborted" message |
769 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
770 |
+ if ! eend $?; then |
771 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
772 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
773 |
+ eerror "or use gcc-config to select a different compiler version." |
774 |
+ eerror "See https://bugs.gentoo.org/574044" |
775 |
+ eerror |
776 |
+ return 1 |
777 |
+ fi |
778 |
+ fi |
779 |
+ fi |
780 |
+ |
781 |
+ # Ensure compiler support |
782 |
+ if use abi_x86_64; then |
783 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
784 |
+ # Compile in subshell to prevent "Aborted" message |
785 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
786 |
+ if ! eend $?; then |
787 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
788 |
+ eerror |
789 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
790 |
+ eerror |
791 |
+ return 1 |
792 |
+ fi |
793 |
+ fi |
794 |
+} |
795 |
+ |
796 |
+wine_build_environment_check() { |
797 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
798 |
+ |
799 |
+ if use abi_x86_64; then |
800 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
801 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
802 |
+ die |
803 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
804 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
805 |
+ die |
806 |
+ fi |
807 |
+ fi |
808 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
809 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
810 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
811 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
812 |
+ fi |
813 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
814 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
815 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
816 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
817 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
818 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
819 |
+ fi |
820 |
+ fi |
821 |
+ |
822 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
823 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
824 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
825 |
+ eerror |
826 |
+ return 1 |
827 |
+ fi |
828 |
+} |
829 |
+ |
830 |
+wine_env_vcs_vars() { |
831 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
832 |
+ local pn_live_val="${pn_live_var}" |
833 |
+ eval pn_live_val='$'${pn_live_val} |
834 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
835 |
+ eerror "Commits must now be specified using the environmental variables" |
836 |
+ eerror "WINE_COMMIT" |
837 |
+ eerror |
838 |
+ return 1 |
839 |
+ fi |
840 |
+} |
841 |
+ |
842 |
+pkg_pretend() { |
843 |
+ wine_build_environment_check || die |
844 |
+ |
845 |
+ # Verify OSS support |
846 |
+ if use oss && ! use kernel_FreeBSD; then |
847 |
+ if ! has_version ">=media-sound/oss-4"; then |
848 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
849 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
850 |
+ eerror |
851 |
+ die |
852 |
+ fi |
853 |
+ fi |
854 |
+} |
855 |
+ |
856 |
+pkg_setup() { |
857 |
+ wine_build_environment_check || die |
858 |
+ wine_env_vcs_vars || die |
859 |
+ |
860 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
861 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
862 |
+ |
863 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
864 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
865 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
866 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
867 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
868 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
869 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
870 |
+ MY_MANDIR="${MY_DATADIR}/man" |
871 |
+} |
872 |
+ |
873 |
+src_unpack() { |
874 |
+ if [[ ${PV} == "9999" ]] ; then |
875 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
876 |
+ fi |
877 |
+ |
878 |
+ default |
879 |
+ |
880 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
881 |
+} |
882 |
+ |
883 |
+src_prepare() { |
884 |
+ |
885 |
+ eapply_bin(){ |
886 |
+ local patch |
887 |
+ for patch in ${PATCHES_BIN[@]}; do |
888 |
+ patchbin --nogit < "${patch}" || die |
889 |
+ done |
890 |
+ } |
891 |
+ |
892 |
+ local md5="$(md5sum server/protocol.def)" |
893 |
+ |
894 |
+ default |
895 |
+ eapply_bin |
896 |
+ eautoreconf |
897 |
+ |
898 |
+ # Modification of the server protocol requires regenerating the server requests |
899 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
900 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
901 |
+ tools/make_requests || die #432348 |
902 |
+ fi |
903 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
904 |
+ if ! use run-exes; then |
905 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
906 |
+ fi |
907 |
+ |
908 |
+ # Edit wine.desktop to work for specific variant |
909 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
910 |
+ |
911 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
912 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
913 |
+ |
914 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
915 |
+} |
916 |
+ |
917 |
+src_configure() { |
918 |
+ wine_compiler_check || die |
919 |
+ |
920 |
+ export LDCONFIG=/bin/true |
921 |
+ use custom-cflags || strip-flags |
922 |
+ |
923 |
+ multilib-minimal_src_configure |
924 |
+} |
925 |
+ |
926 |
+multilib_src_configure() { |
927 |
+ local myconf=( |
928 |
+ --prefix="${MY_PREFIX}" |
929 |
+ --datarootdir="${MY_DATAROOTDIR}" |
930 |
+ --datadir="${MY_DATADIR}" |
931 |
+ --docdir="${MY_DOCDIR}" |
932 |
+ --includedir="${MY_INCLUDEDIR}" |
933 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
934 |
+ --libexecdir="${MY_LIBEXECDIR}" |
935 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
936 |
+ --mandir="${MY_MANDIR}" |
937 |
+ --sysconfdir=/etc/wine |
938 |
+ $(use_with alsa) |
939 |
+ $(use_with capi) |
940 |
+ $(use_with lcms cms) |
941 |
+ $(use_with cups) |
942 |
+ $(use_with ncurses curses) |
943 |
+ $(use_with udisks dbus) |
944 |
+ $(use_with fontconfig) |
945 |
+ $(use_with ssl gnutls) |
946 |
+ $(use_enable gecko mshtml) |
947 |
+ $(use_with gphoto2 gphoto) |
948 |
+ $(use_with gsm) |
949 |
+ $(use_with gstreamer) |
950 |
+ --without-hal |
951 |
+ $(use_with jpeg) |
952 |
+ $(use_with ldap) |
953 |
+ $(use_enable mono mscoree) |
954 |
+ $(use_with mp3 mpg123) |
955 |
+ $(use_with netapi) |
956 |
+ $(use_with nls gettext) |
957 |
+ $(use_with openal) |
958 |
+ $(use_with opencl) |
959 |
+ $(use_with opengl) |
960 |
+ $(use_with osmesa) |
961 |
+ $(use_with oss) |
962 |
+ $(use_with pcap) |
963 |
+ $(use_with png) |
964 |
+ $(use_with pulseaudio pulse) |
965 |
+ $(use_with threads pthread) |
966 |
+ $(use_with scanner sane) |
967 |
+ $(use_enable test tests) |
968 |
+ $(use_with truetype freetype) |
969 |
+ $(use_with udev) |
970 |
+ $(use_with v4l) |
971 |
+ $(use_with X x) |
972 |
+ $(use_with xcomposite) |
973 |
+ $(use_with xinerama) |
974 |
+ $(use_with xml) |
975 |
+ $(use_with xml xslt) |
976 |
+ ) |
977 |
+ |
978 |
+ local PKG_CONFIG AR RANLIB |
979 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
980 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
981 |
+ tc-export PKG_CONFIG AR RANLIB |
982 |
+ |
983 |
+ if use amd64; then |
984 |
+ if [[ ${ABI} == amd64 ]]; then |
985 |
+ myconf+=( --enable-win64 ) |
986 |
+ else |
987 |
+ myconf+=( --disable-win64 ) |
988 |
+ fi |
989 |
+ |
990 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
991 |
+ # CC/LD hackery. We're using separate tools instead. |
992 |
+ fi |
993 |
+ |
994 |
+ ECONF_SOURCE=${S} \ |
995 |
+ econf "${myconf[@]}" |
996 |
+ emake depend |
997 |
+} |
998 |
+ |
999 |
+multilib_src_test() { |
1000 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
1001 |
+ if [[ ${ABI} == x86 ]]; then |
1002 |
+ if [[ $(id -u) == 0 ]]; then |
1003 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
1004 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
1005 |
+ return |
1006 |
+ fi |
1007 |
+ |
1008 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
1009 |
+ Xemake test |
1010 |
+ fi |
1011 |
+} |
1012 |
+ |
1013 |
+multilib_src_install_all() { |
1014 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
1015 |
+ add_locale_docs() { |
1016 |
+ local locale_doc="documentation/README.$1" |
1017 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
1018 |
+ } |
1019 |
+ l10n_for_each_locale_do add_locale_docs |
1020 |
+ |
1021 |
+ einstalldocs |
1022 |
+ prune_libtool_files --all |
1023 |
+ |
1024 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
1025 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
1026 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
1027 |
+ fi |
1028 |
+ |
1029 |
+ # Remove wineconsole if neither backend is installed #551124 |
1030 |
+ if ! use X && ! use ncurses; then |
1031 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
1032 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
1033 |
+ rm_wineconsole() { |
1034 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
1035 |
+ } |
1036 |
+ multilib_foreach_abi rm_wineconsole |
1037 |
+ fi |
1038 |
+ |
1039 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
1040 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
1041 |
+ |
1042 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
1043 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
1044 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
1045 |
+ fi |
1046 |
+ |
1047 |
+ # Failglob for bin and man loops |
1048 |
+ local glob_state=$(shopt -p failglob) |
1049 |
+ shopt -s failglob |
1050 |
+ |
1051 |
+ # Make wrappers for binaries for handling multiple variants |
1052 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
1053 |
+ local b |
1054 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
1055 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
1056 |
+ done |
1057 |
+ |
1058 |
+ # respect LINGUAS when installing man pages, #469418 |
1059 |
+ local l |
1060 |
+ for l in de fr pl; do |
1061 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
1062 |
+ done |
1063 |
+ |
1064 |
+ eval "${glob_state}" |
1065 |
+} |
1066 |
+ |
1067 |
+pkg_postinst() { |
1068 |
+ eselect wine register ${P} |
1069 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
1070 |
+ eselect wine register --vanilla ${P} || die |
1071 |
+ fi |
1072 |
+ |
1073 |
+ eselect wine update --all --if-unset || die |
1074 |
+ |
1075 |
+ xdg_desktop_database_update |
1076 |
+ |
1077 |
+ if ! use gecko; then |
1078 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
1079 |
+ ewarn "implementation of iexplore. Many older windows applications" |
1080 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
1081 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
1082 |
+ fi |
1083 |
+ if ! use mono; then |
1084 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
1085 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
1086 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
1087 |
+ ewarn "to install an external one, like via winetricks" |
1088 |
+ fi |
1089 |
+} |
1090 |
+ |
1091 |
+pkg_prerm() { |
1092 |
+ eselect wine deregister ${P} |
1093 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
1094 |
+ eselect wine deregister --vanilla ${P} || die |
1095 |
+ fi |
1096 |
+ |
1097 |
+ eselect wine update --all --if-unset || die |
1098 |
+} |
1099 |
+ |
1100 |
+pkg_postrm() { |
1101 |
+ xdg_desktop_database_update |
1102 |
+} |
1103 |
|
1104 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.0.1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0.1.ebuild |
1105 |
new file mode 100644 |
1106 |
index 00000000000..4024b479135 |
1107 |
--- /dev/null |
1108 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.0.1.ebuild |
1109 |
@@ -0,0 +1,518 @@ |
1110 |
+# Copyright 1999-2017 Gentoo Foundation |
1111 |
+# Distributed under the terms of the GNU General Public License v2 |
1112 |
+ |
1113 |
+EAPI=6 |
1114 |
+ |
1115 |
+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" |
1116 |
+PLOCALE_BACKUP="en" |
1117 |
+ |
1118 |
+inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
1119 |
+ |
1120 |
+MY_PN="${PN%%-*}" |
1121 |
+MY_P="${MY_PN}-${PV}" |
1122 |
+ |
1123 |
+if [[ ${PV} == "9999" ]] ; then |
1124 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
1125 |
+ EGIT_BRANCH="master" |
1126 |
+ inherit git-r3 |
1127 |
+ SRC_URI="" |
1128 |
+ #KEYWORDS="" |
1129 |
+else |
1130 |
+ MAJOR_V=$(get_version_component_range 1) |
1131 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.xz" |
1132 |
+ KEYWORDS="-* amd64 x86 ~x86-fbsd" |
1133 |
+fi |
1134 |
+S="${WORKDIR}/${MY_P}" |
1135 |
+ |
1136 |
+GWP_V="20170830" |
1137 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
1138 |
+ |
1139 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
1140 |
+HOMEPAGE="https://www.winehq.org/" |
1141 |
+SRC_URI="${SRC_URI} |
1142 |
+ https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
1143 |
+" |
1144 |
+ |
1145 |
+LICENSE="LGPL-2.1" |
1146 |
+SLOT="${PV}" |
1147 |
+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" |
1148 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
1149 |
+ X? ( truetype ) |
1150 |
+ elibc_glibc? ( threads ) |
1151 |
+ osmesa? ( opengl ) |
1152 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
1153 |
+ |
1154 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
1155 |
+# or fail due to Xvfb's opengl limitations. |
1156 |
+RESTRICT="test" |
1157 |
+ |
1158 |
+COMMON_DEPEND=" |
1159 |
+ X? ( |
1160 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
1161 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
1162 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
1163 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
1164 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
1165 |
+ ) |
1166 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
1167 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
1168 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
1169 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
1170 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
1171 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
1172 |
+ gstreamer? ( |
1173 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
1174 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
1175 |
+ ) |
1176 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
1177 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
1178 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
1179 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
1180 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
1181 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
1182 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
1183 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
1184 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
1185 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
1186 |
+ opengl? ( |
1187 |
+ virtual/glu[${MULTILIB_USEDEP}] |
1188 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
1189 |
+ ) |
1190 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
1191 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
1192 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
1193 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
1194 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
1195 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
1196 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
1197 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
1198 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
1199 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
1200 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
1201 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
1202 |
+ xml? ( |
1203 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
1204 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
1205 |
+ ) |
1206 |
+ abi_x86_32? ( |
1207 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
1208 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
1209 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
1210 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
1211 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
1212 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
1213 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
1214 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
1215 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
1216 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
1217 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
1218 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
1219 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
1220 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
1221 |
+ )" |
1222 |
+ |
1223 |
+RDEPEND="${COMMON_DEPEND} |
1224 |
+ app-emulation/wine-desktop-common |
1225 |
+ >app-eselect/eselect-wine-0.3 |
1226 |
+ !app-emulation/wine:0 |
1227 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
1228 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
1229 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
1230 |
+ perl? ( |
1231 |
+ dev-lang/perl |
1232 |
+ dev-perl/XML-Simple |
1233 |
+ ) |
1234 |
+ pulseaudio? ( |
1235 |
+ realtime? ( sys-auth/rtkit ) |
1236 |
+ ) |
1237 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
1238 |
+ selinux? ( sec-policy/selinux-wine ) |
1239 |
+ udisks? ( sys-fs/udisks:2 )" |
1240 |
+ |
1241 |
+# tools/make_requests requires perl |
1242 |
+DEPEND="${COMMON_DEPEND} |
1243 |
+ sys-devel/flex |
1244 |
+ >=sys-kernel/linux-headers-2.6 |
1245 |
+ virtual/pkgconfig |
1246 |
+ virtual/yacc |
1247 |
+ X? ( |
1248 |
+ x11-proto/inputproto |
1249 |
+ x11-proto/xextproto |
1250 |
+ x11-proto/xf86vidmodeproto |
1251 |
+ ) |
1252 |
+ prelink? ( sys-devel/prelink ) |
1253 |
+ xinerama? ( x11-proto/xineramaproto )" |
1254 |
+ |
1255 |
+# These use a non-standard "Wine" category, which is provided by |
1256 |
+# /etc/xdg/applications-merged/wine.menu |
1257 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
1258 |
+usr/share/applications/wine-notepad.desktop |
1259 |
+usr/share/applications/wine-uninstaller.desktop |
1260 |
+usr/share/applications/wine-winecfg.desktop" |
1261 |
+ |
1262 |
+wine_compiler_check() { |
1263 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1264 |
+ |
1265 |
+ # GCC-specific bugs |
1266 |
+ if tc-is-gcc; then |
1267 |
+ # bug #549768 |
1268 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
1269 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
1270 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
1271 |
+ # Run in subshell to prevent "Aborted" message |
1272 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
1273 |
+ if ! eend $?; then |
1274 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
1275 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
1276 |
+ eerror "or use gcc-config to select a different compiler version." |
1277 |
+ eerror "See https://bugs.gentoo.org/549768" |
1278 |
+ eerror |
1279 |
+ return 1 |
1280 |
+ fi |
1281 |
+ fi |
1282 |
+ # bug #574044 |
1283 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
1284 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
1285 |
+ # Compile in subshell to prevent "Aborted" message |
1286 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
1287 |
+ if ! eend $?; then |
1288 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
1289 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
1290 |
+ eerror "or use gcc-config to select a different compiler version." |
1291 |
+ eerror "See https://bugs.gentoo.org/574044" |
1292 |
+ eerror |
1293 |
+ return 1 |
1294 |
+ fi |
1295 |
+ fi |
1296 |
+ fi |
1297 |
+ |
1298 |
+ # Ensure compiler support |
1299 |
+ if use abi_x86_64; then |
1300 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
1301 |
+ # Compile in subshell to prevent "Aborted" message |
1302 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
1303 |
+ if ! eend $?; then |
1304 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
1305 |
+ eerror |
1306 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
1307 |
+ eerror |
1308 |
+ return 1 |
1309 |
+ fi |
1310 |
+ fi |
1311 |
+} |
1312 |
+ |
1313 |
+wine_build_environment_check() { |
1314 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1315 |
+ |
1316 |
+ if use abi_x86_64; then |
1317 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
1318 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
1319 |
+ die |
1320 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
1321 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
1322 |
+ die |
1323 |
+ fi |
1324 |
+ fi |
1325 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
1326 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
1327 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
1328 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
1329 |
+ fi |
1330 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
1331 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
1332 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
1333 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
1334 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
1335 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
1336 |
+ fi |
1337 |
+ fi |
1338 |
+ |
1339 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
1340 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
1341 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
1342 |
+ eerror |
1343 |
+ return 1 |
1344 |
+ fi |
1345 |
+} |
1346 |
+ |
1347 |
+wine_env_vcs_vars() { |
1348 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
1349 |
+ local pn_live_val="${pn_live_var}" |
1350 |
+ eval pn_live_val='$'${pn_live_val} |
1351 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
1352 |
+ eerror "Commits must now be specified using the environmental variables" |
1353 |
+ eerror "WINE_COMMIT" |
1354 |
+ eerror |
1355 |
+ return 1 |
1356 |
+ fi |
1357 |
+} |
1358 |
+ |
1359 |
+pkg_pretend() { |
1360 |
+ wine_build_environment_check || die |
1361 |
+ |
1362 |
+ # Verify OSS support |
1363 |
+ if use oss && ! use kernel_FreeBSD; then |
1364 |
+ if ! has_version ">=media-sound/oss-4"; then |
1365 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
1366 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
1367 |
+ eerror |
1368 |
+ die |
1369 |
+ fi |
1370 |
+ fi |
1371 |
+} |
1372 |
+ |
1373 |
+pkg_setup() { |
1374 |
+ wine_build_environment_check || die |
1375 |
+ wine_env_vcs_vars || die |
1376 |
+ |
1377 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
1378 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
1379 |
+ |
1380 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
1381 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
1382 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
1383 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
1384 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
1385 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
1386 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
1387 |
+ MY_MANDIR="${MY_DATADIR}/man" |
1388 |
+} |
1389 |
+ |
1390 |
+src_unpack() { |
1391 |
+ if [[ ${PV} == "9999" ]] ; then |
1392 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
1393 |
+ fi |
1394 |
+ |
1395 |
+ default |
1396 |
+ |
1397 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
1398 |
+} |
1399 |
+ |
1400 |
+src_prepare() { |
1401 |
+ |
1402 |
+ eapply_bin(){ |
1403 |
+ local patch |
1404 |
+ for patch in ${PATCHES_BIN[@]}; do |
1405 |
+ patchbin --nogit < "${patch}" || die |
1406 |
+ done |
1407 |
+ } |
1408 |
+ |
1409 |
+ local md5="$(md5sum server/protocol.def)" |
1410 |
+ local PATCHES=( |
1411 |
+ "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
1412 |
+ "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
1413 |
+ "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
1414 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" |
1415 |
+ ) |
1416 |
+ local PATCHES_BIN=( |
1417 |
+ ) |
1418 |
+ |
1419 |
+ default |
1420 |
+ eapply_bin |
1421 |
+ eautoreconf |
1422 |
+ |
1423 |
+ # Modification of the server protocol requires regenerating the server requests |
1424 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
1425 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
1426 |
+ tools/make_requests || die #432348 |
1427 |
+ fi |
1428 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
1429 |
+ if ! use run-exes; then |
1430 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
1431 |
+ fi |
1432 |
+ |
1433 |
+ # Edit wine.desktop to work for specific variant |
1434 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
1435 |
+ |
1436 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
1437 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
1438 |
+ |
1439 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
1440 |
+} |
1441 |
+ |
1442 |
+src_configure() { |
1443 |
+ wine_compiler_check || die |
1444 |
+ |
1445 |
+ export LDCONFIG=/bin/true |
1446 |
+ use custom-cflags || strip-flags |
1447 |
+ |
1448 |
+ multilib-minimal_src_configure |
1449 |
+} |
1450 |
+ |
1451 |
+multilib_src_configure() { |
1452 |
+ local myconf=( |
1453 |
+ --prefix="${MY_PREFIX}" |
1454 |
+ --datarootdir="${MY_DATAROOTDIR}" |
1455 |
+ --datadir="${MY_DATADIR}" |
1456 |
+ --docdir="${MY_DOCDIR}" |
1457 |
+ --includedir="${MY_INCLUDEDIR}" |
1458 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
1459 |
+ --libexecdir="${MY_LIBEXECDIR}" |
1460 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
1461 |
+ --mandir="${MY_MANDIR}" |
1462 |
+ --sysconfdir=/etc/wine |
1463 |
+ $(use_with alsa) |
1464 |
+ $(use_with capi) |
1465 |
+ $(use_with lcms cms) |
1466 |
+ $(use_with cups) |
1467 |
+ $(use_with ncurses curses) |
1468 |
+ $(use_with udisks dbus) |
1469 |
+ $(use_with fontconfig) |
1470 |
+ $(use_with ssl gnutls) |
1471 |
+ $(use_enable gecko mshtml) |
1472 |
+ $(use_with gphoto2 gphoto) |
1473 |
+ $(use_with gsm) |
1474 |
+ $(use_with gstreamer) |
1475 |
+ --without-hal |
1476 |
+ $(use_with jpeg) |
1477 |
+ $(use_with ldap) |
1478 |
+ $(use_enable mono mscoree) |
1479 |
+ $(use_with mp3 mpg123) |
1480 |
+ $(use_with netapi) |
1481 |
+ $(use_with nls gettext) |
1482 |
+ $(use_with openal) |
1483 |
+ $(use_with opencl) |
1484 |
+ $(use_with opengl) |
1485 |
+ $(use_with osmesa) |
1486 |
+ $(use_with oss) |
1487 |
+ $(use_with pcap) |
1488 |
+ $(use_with png) |
1489 |
+ $(use_with pulseaudio pulse) |
1490 |
+ $(use_with threads pthread) |
1491 |
+ $(use_with scanner sane) |
1492 |
+ $(use_enable test tests) |
1493 |
+ $(use_with truetype freetype) |
1494 |
+ $(use_with udev) |
1495 |
+ $(use_with v4l) |
1496 |
+ $(use_with X x) |
1497 |
+ $(use_with xcomposite) |
1498 |
+ $(use_with xinerama) |
1499 |
+ $(use_with xml) |
1500 |
+ $(use_with xml xslt) |
1501 |
+ ) |
1502 |
+ |
1503 |
+ local PKG_CONFIG AR RANLIB |
1504 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
1505 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
1506 |
+ tc-export PKG_CONFIG AR RANLIB |
1507 |
+ |
1508 |
+ if use amd64; then |
1509 |
+ if [[ ${ABI} == amd64 ]]; then |
1510 |
+ myconf+=( --enable-win64 ) |
1511 |
+ else |
1512 |
+ myconf+=( --disable-win64 ) |
1513 |
+ fi |
1514 |
+ |
1515 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
1516 |
+ # CC/LD hackery. We're using separate tools instead. |
1517 |
+ fi |
1518 |
+ |
1519 |
+ ECONF_SOURCE=${S} \ |
1520 |
+ econf "${myconf[@]}" |
1521 |
+ emake depend |
1522 |
+} |
1523 |
+ |
1524 |
+multilib_src_test() { |
1525 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
1526 |
+ if [[ ${ABI} == x86 ]]; then |
1527 |
+ if [[ $(id -u) == 0 ]]; then |
1528 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
1529 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
1530 |
+ return |
1531 |
+ fi |
1532 |
+ |
1533 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
1534 |
+ Xemake test |
1535 |
+ fi |
1536 |
+} |
1537 |
+ |
1538 |
+multilib_src_install_all() { |
1539 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
1540 |
+ add_locale_docs() { |
1541 |
+ local locale_doc="documentation/README.$1" |
1542 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
1543 |
+ } |
1544 |
+ l10n_for_each_locale_do add_locale_docs |
1545 |
+ |
1546 |
+ einstalldocs |
1547 |
+ prune_libtool_files --all |
1548 |
+ |
1549 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
1550 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
1551 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
1552 |
+ fi |
1553 |
+ |
1554 |
+ # Remove wineconsole if neither backend is installed #551124 |
1555 |
+ if ! use X && ! use ncurses; then |
1556 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
1557 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
1558 |
+ rm_wineconsole() { |
1559 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
1560 |
+ } |
1561 |
+ multilib_foreach_abi rm_wineconsole |
1562 |
+ fi |
1563 |
+ |
1564 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
1565 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
1566 |
+ |
1567 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
1568 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
1569 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
1570 |
+ fi |
1571 |
+ |
1572 |
+ # Failglob for bin and man loops |
1573 |
+ local glob_state=$(shopt -p failglob) |
1574 |
+ shopt -s failglob |
1575 |
+ |
1576 |
+ # Make wrappers for binaries for handling multiple variants |
1577 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
1578 |
+ local b |
1579 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
1580 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
1581 |
+ done |
1582 |
+ |
1583 |
+ # respect LINGUAS when installing man pages, #469418 |
1584 |
+ local l |
1585 |
+ for l in de fr pl; do |
1586 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
1587 |
+ done |
1588 |
+ |
1589 |
+ eval "${glob_state}" |
1590 |
+} |
1591 |
+ |
1592 |
+pkg_postinst() { |
1593 |
+ eselect wine register ${P} |
1594 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
1595 |
+ eselect wine register --vanilla ${P} || die |
1596 |
+ fi |
1597 |
+ |
1598 |
+ eselect wine update --all --if-unset || die |
1599 |
+ |
1600 |
+ xdg_desktop_database_update |
1601 |
+ |
1602 |
+ if ! use gecko; then |
1603 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
1604 |
+ ewarn "implementation of iexplore. Many older windows applications" |
1605 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
1606 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
1607 |
+ fi |
1608 |
+ if ! use mono; then |
1609 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
1610 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
1611 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
1612 |
+ ewarn "to install an external one, like via winetricks" |
1613 |
+ fi |
1614 |
+} |
1615 |
+ |
1616 |
+pkg_prerm() { |
1617 |
+ eselect wine deregister ${P} |
1618 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
1619 |
+ eselect wine deregister --vanilla ${P} || die |
1620 |
+ fi |
1621 |
+ |
1622 |
+ eselect wine update --all --if-unset || die |
1623 |
+} |
1624 |
+ |
1625 |
+pkg_postrm() { |
1626 |
+ xdg_desktop_database_update |
1627 |
+} |
1628 |
|
1629 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.0.2-r1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0.2-r1.ebuild |
1630 |
new file mode 100644 |
1631 |
index 00000000000..0a297502ec6 |
1632 |
--- /dev/null |
1633 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.0.2-r1.ebuild |
1634 |
@@ -0,0 +1,527 @@ |
1635 |
+# Copyright 1999-2017 Gentoo Foundation |
1636 |
+# Distributed under the terms of the GNU General Public License v2 |
1637 |
+ |
1638 |
+EAPI=6 |
1639 |
+ |
1640 |
+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" |
1641 |
+PLOCALE_BACKUP="en" |
1642 |
+ |
1643 |
+inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
1644 |
+ |
1645 |
+MY_PN="${PN%%-*}" |
1646 |
+MY_P="${MY_PN}-${PV}" |
1647 |
+ |
1648 |
+if [[ ${PV} == "9999" ]] ; then |
1649 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
1650 |
+ EGIT_BRANCH="master" |
1651 |
+ inherit git-r3 |
1652 |
+ SRC_URI="" |
1653 |
+ #KEYWORDS="" |
1654 |
+else |
1655 |
+ MAJOR_V=$(get_version_component_range 1) |
1656 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.xz" |
1657 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
1658 |
+fi |
1659 |
+S="${WORKDIR}/${MY_P}" |
1660 |
+ |
1661 |
+GWP_V="20170830" |
1662 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
1663 |
+ |
1664 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
1665 |
+HOMEPAGE="https://www.winehq.org/" |
1666 |
+SRC_URI="${SRC_URI} |
1667 |
+ https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
1668 |
+" |
1669 |
+ |
1670 |
+LICENSE="LGPL-2.1" |
1671 |
+SLOT="${PV}" |
1672 |
+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" |
1673 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
1674 |
+ X? ( truetype ) |
1675 |
+ elibc_glibc? ( threads ) |
1676 |
+ osmesa? ( opengl ) |
1677 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
1678 |
+ |
1679 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
1680 |
+# or fail due to Xvfb's opengl limitations. |
1681 |
+RESTRICT="test" |
1682 |
+ |
1683 |
+COMMON_DEPEND=" |
1684 |
+ X? ( |
1685 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
1686 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
1687 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
1688 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
1689 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
1690 |
+ ) |
1691 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
1692 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
1693 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
1694 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
1695 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
1696 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
1697 |
+ gstreamer? ( |
1698 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
1699 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
1700 |
+ ) |
1701 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
1702 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
1703 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
1704 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
1705 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
1706 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
1707 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
1708 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
1709 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
1710 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
1711 |
+ opengl? ( |
1712 |
+ virtual/glu[${MULTILIB_USEDEP}] |
1713 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
1714 |
+ ) |
1715 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
1716 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
1717 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
1718 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
1719 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
1720 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
1721 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
1722 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
1723 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
1724 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
1725 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
1726 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
1727 |
+ xml? ( |
1728 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
1729 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
1730 |
+ ) |
1731 |
+ abi_x86_32? ( |
1732 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
1733 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
1734 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
1735 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
1736 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
1737 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
1738 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
1739 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
1740 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
1741 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
1742 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
1743 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
1744 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
1745 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
1746 |
+ )" |
1747 |
+ |
1748 |
+RDEPEND="${COMMON_DEPEND} |
1749 |
+ app-emulation/wine-desktop-common |
1750 |
+ >app-eselect/eselect-wine-0.3 |
1751 |
+ !app-emulation/wine:0 |
1752 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
1753 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
1754 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
1755 |
+ perl? ( |
1756 |
+ dev-lang/perl |
1757 |
+ dev-perl/XML-Simple |
1758 |
+ ) |
1759 |
+ pulseaudio? ( |
1760 |
+ realtime? ( sys-auth/rtkit ) |
1761 |
+ ) |
1762 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
1763 |
+ selinux? ( sec-policy/selinux-wine ) |
1764 |
+ udisks? ( sys-fs/udisks:2 )" |
1765 |
+ |
1766 |
+# tools/make_requests requires perl |
1767 |
+DEPEND="${COMMON_DEPEND} |
1768 |
+ sys-devel/flex |
1769 |
+ >=sys-kernel/linux-headers-2.6 |
1770 |
+ virtual/pkgconfig |
1771 |
+ virtual/yacc |
1772 |
+ X? ( |
1773 |
+ x11-proto/inputproto |
1774 |
+ x11-proto/xextproto |
1775 |
+ x11-proto/xf86vidmodeproto |
1776 |
+ ) |
1777 |
+ prelink? ( sys-devel/prelink ) |
1778 |
+ xinerama? ( x11-proto/xineramaproto )" |
1779 |
+ |
1780 |
+# These use a non-standard "Wine" category, which is provided by |
1781 |
+# /etc/xdg/applications-merged/wine.menu |
1782 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
1783 |
+usr/share/applications/wine-notepad.desktop |
1784 |
+usr/share/applications/wine-uninstaller.desktop |
1785 |
+usr/share/applications/wine-winecfg.desktop" |
1786 |
+ |
1787 |
+PATCHES=( |
1788 |
+ "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
1789 |
+ "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
1790 |
+ "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
1791 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" |
1792 |
+ "${PATCHDIR}/patches/freetype-2.8.1-segfault.patch" #631676 |
1793 |
+ "${PATCHDIR}/patches/freetype-2.8.1-drop-glyphs.patch" #631376 |
1794 |
+) |
1795 |
+PATCHES_BIN=( |
1796 |
+ "${PATCHDIR}/patches/freetype-2.8.1-patch-fonts.patch" #631376 |
1797 |
+) |
1798 |
+ |
1799 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
1800 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
1801 |
+ DEPEND+=" dev-util/patchbin" |
1802 |
+fi |
1803 |
+ |
1804 |
+wine_compiler_check() { |
1805 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1806 |
+ |
1807 |
+ # GCC-specific bugs |
1808 |
+ if tc-is-gcc; then |
1809 |
+ # bug #549768 |
1810 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
1811 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
1812 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
1813 |
+ # Run in subshell to prevent "Aborted" message |
1814 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
1815 |
+ if ! eend $?; then |
1816 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
1817 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
1818 |
+ eerror "or use gcc-config to select a different compiler version." |
1819 |
+ eerror "See https://bugs.gentoo.org/549768" |
1820 |
+ eerror |
1821 |
+ return 1 |
1822 |
+ fi |
1823 |
+ fi |
1824 |
+ # bug #574044 |
1825 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
1826 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
1827 |
+ # Compile in subshell to prevent "Aborted" message |
1828 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
1829 |
+ if ! eend $?; then |
1830 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
1831 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
1832 |
+ eerror "or use gcc-config to select a different compiler version." |
1833 |
+ eerror "See https://bugs.gentoo.org/574044" |
1834 |
+ eerror |
1835 |
+ return 1 |
1836 |
+ fi |
1837 |
+ fi |
1838 |
+ fi |
1839 |
+ |
1840 |
+ # Ensure compiler support |
1841 |
+ if use abi_x86_64; then |
1842 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
1843 |
+ # Compile in subshell to prevent "Aborted" message |
1844 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
1845 |
+ if ! eend $?; then |
1846 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
1847 |
+ eerror |
1848 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
1849 |
+ eerror |
1850 |
+ return 1 |
1851 |
+ fi |
1852 |
+ fi |
1853 |
+} |
1854 |
+ |
1855 |
+wine_build_environment_check() { |
1856 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1857 |
+ |
1858 |
+ if use abi_x86_64; then |
1859 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
1860 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
1861 |
+ die |
1862 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
1863 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
1864 |
+ die |
1865 |
+ fi |
1866 |
+ fi |
1867 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
1868 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
1869 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
1870 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
1871 |
+ fi |
1872 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
1873 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
1874 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
1875 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
1876 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
1877 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
1878 |
+ fi |
1879 |
+ fi |
1880 |
+ |
1881 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
1882 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
1883 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
1884 |
+ eerror |
1885 |
+ return 1 |
1886 |
+ fi |
1887 |
+} |
1888 |
+ |
1889 |
+wine_env_vcs_vars() { |
1890 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
1891 |
+ local pn_live_val="${pn_live_var}" |
1892 |
+ eval pn_live_val='$'${pn_live_val} |
1893 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
1894 |
+ eerror "Commits must now be specified using the environmental variables" |
1895 |
+ eerror "WINE_COMMIT" |
1896 |
+ eerror |
1897 |
+ return 1 |
1898 |
+ fi |
1899 |
+} |
1900 |
+ |
1901 |
+pkg_pretend() { |
1902 |
+ wine_build_environment_check || die |
1903 |
+ |
1904 |
+ # Verify OSS support |
1905 |
+ if use oss && ! use kernel_FreeBSD; then |
1906 |
+ if ! has_version ">=media-sound/oss-4"; then |
1907 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
1908 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
1909 |
+ eerror |
1910 |
+ die |
1911 |
+ fi |
1912 |
+ fi |
1913 |
+} |
1914 |
+ |
1915 |
+pkg_setup() { |
1916 |
+ wine_build_environment_check || die |
1917 |
+ wine_env_vcs_vars || die |
1918 |
+ |
1919 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
1920 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
1921 |
+ |
1922 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
1923 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
1924 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
1925 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
1926 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
1927 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
1928 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
1929 |
+ MY_MANDIR="${MY_DATADIR}/man" |
1930 |
+} |
1931 |
+ |
1932 |
+src_unpack() { |
1933 |
+ if [[ ${PV} == "9999" ]] ; then |
1934 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
1935 |
+ fi |
1936 |
+ |
1937 |
+ default |
1938 |
+ |
1939 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
1940 |
+} |
1941 |
+ |
1942 |
+src_prepare() { |
1943 |
+ |
1944 |
+ eapply_bin(){ |
1945 |
+ local patch |
1946 |
+ for patch in ${PATCHES_BIN[@]}; do |
1947 |
+ patchbin --nogit < "${patch}" || die |
1948 |
+ done |
1949 |
+ } |
1950 |
+ |
1951 |
+ local md5="$(md5sum server/protocol.def)" |
1952 |
+ |
1953 |
+ default |
1954 |
+ eapply_bin |
1955 |
+ eautoreconf |
1956 |
+ |
1957 |
+ # Modification of the server protocol requires regenerating the server requests |
1958 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
1959 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
1960 |
+ tools/make_requests || die #432348 |
1961 |
+ fi |
1962 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
1963 |
+ if ! use run-exes; then |
1964 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
1965 |
+ fi |
1966 |
+ |
1967 |
+ # Edit wine.desktop to work for specific variant |
1968 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
1969 |
+ |
1970 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
1971 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
1972 |
+ |
1973 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
1974 |
+} |
1975 |
+ |
1976 |
+src_configure() { |
1977 |
+ wine_compiler_check || die |
1978 |
+ |
1979 |
+ export LDCONFIG=/bin/true |
1980 |
+ use custom-cflags || strip-flags |
1981 |
+ |
1982 |
+ multilib-minimal_src_configure |
1983 |
+} |
1984 |
+ |
1985 |
+multilib_src_configure() { |
1986 |
+ local myconf=( |
1987 |
+ --prefix="${MY_PREFIX}" |
1988 |
+ --datarootdir="${MY_DATAROOTDIR}" |
1989 |
+ --datadir="${MY_DATADIR}" |
1990 |
+ --docdir="${MY_DOCDIR}" |
1991 |
+ --includedir="${MY_INCLUDEDIR}" |
1992 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
1993 |
+ --libexecdir="${MY_LIBEXECDIR}" |
1994 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
1995 |
+ --mandir="${MY_MANDIR}" |
1996 |
+ --sysconfdir=/etc/wine |
1997 |
+ $(use_with alsa) |
1998 |
+ $(use_with capi) |
1999 |
+ $(use_with lcms cms) |
2000 |
+ $(use_with cups) |
2001 |
+ $(use_with ncurses curses) |
2002 |
+ $(use_with udisks dbus) |
2003 |
+ $(use_with fontconfig) |
2004 |
+ $(use_with ssl gnutls) |
2005 |
+ $(use_enable gecko mshtml) |
2006 |
+ $(use_with gphoto2 gphoto) |
2007 |
+ $(use_with gsm) |
2008 |
+ $(use_with gstreamer) |
2009 |
+ --without-hal |
2010 |
+ $(use_with jpeg) |
2011 |
+ $(use_with ldap) |
2012 |
+ $(use_enable mono mscoree) |
2013 |
+ $(use_with mp3 mpg123) |
2014 |
+ $(use_with netapi) |
2015 |
+ $(use_with nls gettext) |
2016 |
+ $(use_with openal) |
2017 |
+ $(use_with opencl) |
2018 |
+ $(use_with opengl) |
2019 |
+ $(use_with osmesa) |
2020 |
+ $(use_with oss) |
2021 |
+ $(use_with pcap) |
2022 |
+ $(use_with png) |
2023 |
+ $(use_with pulseaudio pulse) |
2024 |
+ $(use_with threads pthread) |
2025 |
+ $(use_with scanner sane) |
2026 |
+ $(use_enable test tests) |
2027 |
+ $(use_with truetype freetype) |
2028 |
+ $(use_with udev) |
2029 |
+ $(use_with v4l) |
2030 |
+ $(use_with X x) |
2031 |
+ $(use_with xcomposite) |
2032 |
+ $(use_with xinerama) |
2033 |
+ $(use_with xml) |
2034 |
+ $(use_with xml xslt) |
2035 |
+ ) |
2036 |
+ |
2037 |
+ local PKG_CONFIG AR RANLIB |
2038 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
2039 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
2040 |
+ tc-export PKG_CONFIG AR RANLIB |
2041 |
+ |
2042 |
+ if use amd64; then |
2043 |
+ if [[ ${ABI} == amd64 ]]; then |
2044 |
+ myconf+=( --enable-win64 ) |
2045 |
+ else |
2046 |
+ myconf+=( --disable-win64 ) |
2047 |
+ fi |
2048 |
+ |
2049 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
2050 |
+ # CC/LD hackery. We're using separate tools instead. |
2051 |
+ fi |
2052 |
+ |
2053 |
+ ECONF_SOURCE=${S} \ |
2054 |
+ econf "${myconf[@]}" |
2055 |
+ emake depend |
2056 |
+} |
2057 |
+ |
2058 |
+multilib_src_test() { |
2059 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
2060 |
+ if [[ ${ABI} == x86 ]]; then |
2061 |
+ if [[ $(id -u) == 0 ]]; then |
2062 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
2063 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
2064 |
+ return |
2065 |
+ fi |
2066 |
+ |
2067 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
2068 |
+ Xemake test |
2069 |
+ fi |
2070 |
+} |
2071 |
+ |
2072 |
+multilib_src_install_all() { |
2073 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
2074 |
+ add_locale_docs() { |
2075 |
+ local locale_doc="documentation/README.$1" |
2076 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
2077 |
+ } |
2078 |
+ l10n_for_each_locale_do add_locale_docs |
2079 |
+ |
2080 |
+ einstalldocs |
2081 |
+ prune_libtool_files --all |
2082 |
+ |
2083 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
2084 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
2085 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
2086 |
+ fi |
2087 |
+ |
2088 |
+ # Remove wineconsole if neither backend is installed #551124 |
2089 |
+ if ! use X && ! use ncurses; then |
2090 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
2091 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
2092 |
+ rm_wineconsole() { |
2093 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
2094 |
+ } |
2095 |
+ multilib_foreach_abi rm_wineconsole |
2096 |
+ fi |
2097 |
+ |
2098 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
2099 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
2100 |
+ |
2101 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
2102 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
2103 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
2104 |
+ fi |
2105 |
+ |
2106 |
+ # Failglob for bin and man loops |
2107 |
+ local glob_state=$(shopt -p failglob) |
2108 |
+ shopt -s failglob |
2109 |
+ |
2110 |
+ # Make wrappers for binaries for handling multiple variants |
2111 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
2112 |
+ local b |
2113 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
2114 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
2115 |
+ done |
2116 |
+ |
2117 |
+ # respect LINGUAS when installing man pages, #469418 |
2118 |
+ local l |
2119 |
+ for l in de fr pl; do |
2120 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
2121 |
+ done |
2122 |
+ |
2123 |
+ eval "${glob_state}" |
2124 |
+} |
2125 |
+ |
2126 |
+pkg_postinst() { |
2127 |
+ eselect wine register ${P} |
2128 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
2129 |
+ eselect wine register --vanilla ${P} || die |
2130 |
+ fi |
2131 |
+ |
2132 |
+ eselect wine update --all --if-unset || die |
2133 |
+ |
2134 |
+ xdg_desktop_database_update |
2135 |
+ |
2136 |
+ if ! use gecko; then |
2137 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
2138 |
+ ewarn "implementation of iexplore. Many older windows applications" |
2139 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
2140 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
2141 |
+ fi |
2142 |
+ if ! use mono; then |
2143 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
2144 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
2145 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
2146 |
+ ewarn "to install an external one, like via winetricks" |
2147 |
+ fi |
2148 |
+} |
2149 |
+ |
2150 |
+pkg_prerm() { |
2151 |
+ eselect wine deregister ${P} |
2152 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
2153 |
+ eselect wine deregister --vanilla ${P} || die |
2154 |
+ fi |
2155 |
+ |
2156 |
+ eselect wine update --all --if-unset || die |
2157 |
+} |
2158 |
+ |
2159 |
+pkg_postrm() { |
2160 |
+ xdg_desktop_database_update |
2161 |
+} |
2162 |
|
2163 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.0.3.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0.3.ebuild |
2164 |
new file mode 100644 |
2165 |
index 00000000000..ffa871203d4 |
2166 |
--- /dev/null |
2167 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.0.3.ebuild |
2168 |
@@ -0,0 +1,523 @@ |
2169 |
+# Copyright 1999-2017 Gentoo Foundation |
2170 |
+# Distributed under the terms of the GNU General Public License v2 |
2171 |
+ |
2172 |
+EAPI=6 |
2173 |
+ |
2174 |
+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" |
2175 |
+PLOCALE_BACKUP="en" |
2176 |
+ |
2177 |
+inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
2178 |
+ |
2179 |
+MY_PN="${PN%%-*}" |
2180 |
+MY_P="${MY_PN}-${PV}" |
2181 |
+ |
2182 |
+if [[ ${PV} == "9999" ]] ; then |
2183 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
2184 |
+ EGIT_BRANCH="master" |
2185 |
+ inherit git-r3 |
2186 |
+ SRC_URI="" |
2187 |
+ #KEYWORDS="" |
2188 |
+else |
2189 |
+ MAJOR_V=$(get_version_component_range 1) |
2190 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.xz" |
2191 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
2192 |
+fi |
2193 |
+S="${WORKDIR}/${MY_P}" |
2194 |
+ |
2195 |
+GWP_V="20170830" |
2196 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
2197 |
+ |
2198 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
2199 |
+HOMEPAGE="https://www.winehq.org/" |
2200 |
+SRC_URI="${SRC_URI} |
2201 |
+ https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
2202 |
+" |
2203 |
+ |
2204 |
+LICENSE="LGPL-2.1" |
2205 |
+SLOT="${PV}" |
2206 |
+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" |
2207 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
2208 |
+ X? ( truetype ) |
2209 |
+ elibc_glibc? ( threads ) |
2210 |
+ osmesa? ( opengl ) |
2211 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
2212 |
+ |
2213 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
2214 |
+# or fail due to Xvfb's opengl limitations. |
2215 |
+RESTRICT="test" |
2216 |
+ |
2217 |
+COMMON_DEPEND=" |
2218 |
+ X? ( |
2219 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
2220 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
2221 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
2222 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
2223 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
2224 |
+ ) |
2225 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
2226 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
2227 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
2228 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
2229 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
2230 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
2231 |
+ gstreamer? ( |
2232 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
2233 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
2234 |
+ ) |
2235 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
2236 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
2237 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
2238 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
2239 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
2240 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
2241 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
2242 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
2243 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
2244 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
2245 |
+ opengl? ( |
2246 |
+ virtual/glu[${MULTILIB_USEDEP}] |
2247 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
2248 |
+ ) |
2249 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
2250 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
2251 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
2252 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
2253 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
2254 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
2255 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
2256 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
2257 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
2258 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
2259 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
2260 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
2261 |
+ xml? ( |
2262 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
2263 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
2264 |
+ ) |
2265 |
+ abi_x86_32? ( |
2266 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
2267 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
2268 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
2269 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
2270 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
2271 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
2272 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
2273 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
2274 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
2275 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
2276 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
2277 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
2278 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
2279 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
2280 |
+ )" |
2281 |
+ |
2282 |
+RDEPEND="${COMMON_DEPEND} |
2283 |
+ app-emulation/wine-desktop-common |
2284 |
+ >app-eselect/eselect-wine-0.3 |
2285 |
+ !app-emulation/wine:0 |
2286 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
2287 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
2288 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
2289 |
+ perl? ( |
2290 |
+ dev-lang/perl |
2291 |
+ dev-perl/XML-Simple |
2292 |
+ ) |
2293 |
+ pulseaudio? ( |
2294 |
+ realtime? ( sys-auth/rtkit ) |
2295 |
+ ) |
2296 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
2297 |
+ selinux? ( sec-policy/selinux-wine ) |
2298 |
+ udisks? ( sys-fs/udisks:2 )" |
2299 |
+ |
2300 |
+# tools/make_requests requires perl |
2301 |
+DEPEND="${COMMON_DEPEND} |
2302 |
+ sys-devel/flex |
2303 |
+ >=sys-kernel/linux-headers-2.6 |
2304 |
+ virtual/pkgconfig |
2305 |
+ virtual/yacc |
2306 |
+ X? ( |
2307 |
+ x11-proto/inputproto |
2308 |
+ x11-proto/xextproto |
2309 |
+ x11-proto/xf86vidmodeproto |
2310 |
+ ) |
2311 |
+ prelink? ( sys-devel/prelink ) |
2312 |
+ xinerama? ( x11-proto/xineramaproto )" |
2313 |
+ |
2314 |
+# These use a non-standard "Wine" category, which is provided by |
2315 |
+# /etc/xdg/applications-merged/wine.menu |
2316 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
2317 |
+usr/share/applications/wine-notepad.desktop |
2318 |
+usr/share/applications/wine-uninstaller.desktop |
2319 |
+usr/share/applications/wine-winecfg.desktop" |
2320 |
+ |
2321 |
+PATCHES=( |
2322 |
+ "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
2323 |
+ "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
2324 |
+ "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
2325 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" |
2326 |
+) |
2327 |
+PATCHES_BIN=() |
2328 |
+ |
2329 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
2330 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
2331 |
+ DEPEND+=" dev-util/patchbin" |
2332 |
+fi |
2333 |
+ |
2334 |
+wine_compiler_check() { |
2335 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
2336 |
+ |
2337 |
+ # GCC-specific bugs |
2338 |
+ if tc-is-gcc; then |
2339 |
+ # bug #549768 |
2340 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
2341 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
2342 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
2343 |
+ # Run in subshell to prevent "Aborted" message |
2344 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
2345 |
+ if ! eend $?; then |
2346 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
2347 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
2348 |
+ eerror "or use gcc-config to select a different compiler version." |
2349 |
+ eerror "See https://bugs.gentoo.org/549768" |
2350 |
+ eerror |
2351 |
+ return 1 |
2352 |
+ fi |
2353 |
+ fi |
2354 |
+ # bug #574044 |
2355 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
2356 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
2357 |
+ # Compile in subshell to prevent "Aborted" message |
2358 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
2359 |
+ if ! eend $?; then |
2360 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
2361 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
2362 |
+ eerror "or use gcc-config to select a different compiler version." |
2363 |
+ eerror "See https://bugs.gentoo.org/574044" |
2364 |
+ eerror |
2365 |
+ return 1 |
2366 |
+ fi |
2367 |
+ fi |
2368 |
+ fi |
2369 |
+ |
2370 |
+ # Ensure compiler support |
2371 |
+ if use abi_x86_64; then |
2372 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
2373 |
+ # Compile in subshell to prevent "Aborted" message |
2374 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
2375 |
+ if ! eend $?; then |
2376 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
2377 |
+ eerror |
2378 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
2379 |
+ eerror |
2380 |
+ return 1 |
2381 |
+ fi |
2382 |
+ fi |
2383 |
+} |
2384 |
+ |
2385 |
+wine_build_environment_check() { |
2386 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
2387 |
+ |
2388 |
+ if use abi_x86_64; then |
2389 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
2390 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
2391 |
+ die |
2392 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
2393 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
2394 |
+ die |
2395 |
+ fi |
2396 |
+ fi |
2397 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
2398 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
2399 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
2400 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
2401 |
+ fi |
2402 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
2403 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
2404 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
2405 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
2406 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
2407 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
2408 |
+ fi |
2409 |
+ fi |
2410 |
+ |
2411 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
2412 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
2413 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
2414 |
+ eerror |
2415 |
+ return 1 |
2416 |
+ fi |
2417 |
+} |
2418 |
+ |
2419 |
+wine_env_vcs_vars() { |
2420 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
2421 |
+ local pn_live_val="${pn_live_var}" |
2422 |
+ eval pn_live_val='$'${pn_live_val} |
2423 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
2424 |
+ eerror "Commits must now be specified using the environmental variables" |
2425 |
+ eerror "WINE_COMMIT" |
2426 |
+ eerror |
2427 |
+ return 1 |
2428 |
+ fi |
2429 |
+} |
2430 |
+ |
2431 |
+pkg_pretend() { |
2432 |
+ wine_build_environment_check || die |
2433 |
+ |
2434 |
+ # Verify OSS support |
2435 |
+ if use oss && ! use kernel_FreeBSD; then |
2436 |
+ if ! has_version ">=media-sound/oss-4"; then |
2437 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
2438 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
2439 |
+ eerror |
2440 |
+ die |
2441 |
+ fi |
2442 |
+ fi |
2443 |
+} |
2444 |
+ |
2445 |
+pkg_setup() { |
2446 |
+ wine_build_environment_check || die |
2447 |
+ wine_env_vcs_vars || die |
2448 |
+ |
2449 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
2450 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
2451 |
+ |
2452 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
2453 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
2454 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
2455 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
2456 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
2457 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
2458 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
2459 |
+ MY_MANDIR="${MY_DATADIR}/man" |
2460 |
+} |
2461 |
+ |
2462 |
+src_unpack() { |
2463 |
+ if [[ ${PV} == "9999" ]] ; then |
2464 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
2465 |
+ fi |
2466 |
+ |
2467 |
+ default |
2468 |
+ |
2469 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
2470 |
+} |
2471 |
+ |
2472 |
+src_prepare() { |
2473 |
+ |
2474 |
+ eapply_bin(){ |
2475 |
+ local patch |
2476 |
+ for patch in ${PATCHES_BIN[@]}; do |
2477 |
+ patchbin --nogit < "${patch}" || die |
2478 |
+ done |
2479 |
+ } |
2480 |
+ |
2481 |
+ local md5="$(md5sum server/protocol.def)" |
2482 |
+ |
2483 |
+ default |
2484 |
+ eapply_bin |
2485 |
+ eautoreconf |
2486 |
+ |
2487 |
+ # Modification of the server protocol requires regenerating the server requests |
2488 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
2489 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
2490 |
+ tools/make_requests || die #432348 |
2491 |
+ fi |
2492 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
2493 |
+ if ! use run-exes; then |
2494 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
2495 |
+ fi |
2496 |
+ |
2497 |
+ # Edit wine.desktop to work for specific variant |
2498 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
2499 |
+ |
2500 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
2501 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
2502 |
+ |
2503 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
2504 |
+} |
2505 |
+ |
2506 |
+src_configure() { |
2507 |
+ wine_compiler_check || die |
2508 |
+ |
2509 |
+ export LDCONFIG=/bin/true |
2510 |
+ use custom-cflags || strip-flags |
2511 |
+ |
2512 |
+ multilib-minimal_src_configure |
2513 |
+} |
2514 |
+ |
2515 |
+multilib_src_configure() { |
2516 |
+ local myconf=( |
2517 |
+ --prefix="${MY_PREFIX}" |
2518 |
+ --datarootdir="${MY_DATAROOTDIR}" |
2519 |
+ --datadir="${MY_DATADIR}" |
2520 |
+ --docdir="${MY_DOCDIR}" |
2521 |
+ --includedir="${MY_INCLUDEDIR}" |
2522 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
2523 |
+ --libexecdir="${MY_LIBEXECDIR}" |
2524 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
2525 |
+ --mandir="${MY_MANDIR}" |
2526 |
+ --sysconfdir=/etc/wine |
2527 |
+ $(use_with alsa) |
2528 |
+ $(use_with capi) |
2529 |
+ $(use_with lcms cms) |
2530 |
+ $(use_with cups) |
2531 |
+ $(use_with ncurses curses) |
2532 |
+ $(use_with udisks dbus) |
2533 |
+ $(use_with fontconfig) |
2534 |
+ $(use_with ssl gnutls) |
2535 |
+ $(use_enable gecko mshtml) |
2536 |
+ $(use_with gphoto2 gphoto) |
2537 |
+ $(use_with gsm) |
2538 |
+ $(use_with gstreamer) |
2539 |
+ --without-hal |
2540 |
+ $(use_with jpeg) |
2541 |
+ $(use_with ldap) |
2542 |
+ $(use_enable mono mscoree) |
2543 |
+ $(use_with mp3 mpg123) |
2544 |
+ $(use_with netapi) |
2545 |
+ $(use_with nls gettext) |
2546 |
+ $(use_with openal) |
2547 |
+ $(use_with opencl) |
2548 |
+ $(use_with opengl) |
2549 |
+ $(use_with osmesa) |
2550 |
+ $(use_with oss) |
2551 |
+ $(use_with pcap) |
2552 |
+ $(use_with png) |
2553 |
+ $(use_with pulseaudio pulse) |
2554 |
+ $(use_with threads pthread) |
2555 |
+ $(use_with scanner sane) |
2556 |
+ $(use_enable test tests) |
2557 |
+ $(use_with truetype freetype) |
2558 |
+ $(use_with udev) |
2559 |
+ $(use_with v4l) |
2560 |
+ $(use_with X x) |
2561 |
+ $(use_with xcomposite) |
2562 |
+ $(use_with xinerama) |
2563 |
+ $(use_with xml) |
2564 |
+ $(use_with xml xslt) |
2565 |
+ ) |
2566 |
+ |
2567 |
+ local PKG_CONFIG AR RANLIB |
2568 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
2569 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
2570 |
+ tc-export PKG_CONFIG AR RANLIB |
2571 |
+ |
2572 |
+ if use amd64; then |
2573 |
+ if [[ ${ABI} == amd64 ]]; then |
2574 |
+ myconf+=( --enable-win64 ) |
2575 |
+ else |
2576 |
+ myconf+=( --disable-win64 ) |
2577 |
+ fi |
2578 |
+ |
2579 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
2580 |
+ # CC/LD hackery. We're using separate tools instead. |
2581 |
+ fi |
2582 |
+ |
2583 |
+ ECONF_SOURCE=${S} \ |
2584 |
+ econf "${myconf[@]}" |
2585 |
+ emake depend |
2586 |
+} |
2587 |
+ |
2588 |
+multilib_src_test() { |
2589 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
2590 |
+ if [[ ${ABI} == x86 ]]; then |
2591 |
+ if [[ $(id -u) == 0 ]]; then |
2592 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
2593 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
2594 |
+ return |
2595 |
+ fi |
2596 |
+ |
2597 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
2598 |
+ Xemake test |
2599 |
+ fi |
2600 |
+} |
2601 |
+ |
2602 |
+multilib_src_install_all() { |
2603 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
2604 |
+ add_locale_docs() { |
2605 |
+ local locale_doc="documentation/README.$1" |
2606 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
2607 |
+ } |
2608 |
+ l10n_for_each_locale_do add_locale_docs |
2609 |
+ |
2610 |
+ einstalldocs |
2611 |
+ prune_libtool_files --all |
2612 |
+ |
2613 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
2614 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
2615 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
2616 |
+ fi |
2617 |
+ |
2618 |
+ # Remove wineconsole if neither backend is installed #551124 |
2619 |
+ if ! use X && ! use ncurses; then |
2620 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
2621 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
2622 |
+ rm_wineconsole() { |
2623 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
2624 |
+ } |
2625 |
+ multilib_foreach_abi rm_wineconsole |
2626 |
+ fi |
2627 |
+ |
2628 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
2629 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
2630 |
+ |
2631 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
2632 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
2633 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
2634 |
+ fi |
2635 |
+ |
2636 |
+ # Failglob for bin and man loops |
2637 |
+ local glob_state=$(shopt -p failglob) |
2638 |
+ shopt -s failglob |
2639 |
+ |
2640 |
+ # Make wrappers for binaries for handling multiple variants |
2641 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
2642 |
+ local b |
2643 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
2644 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
2645 |
+ done |
2646 |
+ |
2647 |
+ # respect LINGUAS when installing man pages, #469418 |
2648 |
+ local l |
2649 |
+ for l in de fr pl; do |
2650 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
2651 |
+ done |
2652 |
+ |
2653 |
+ eval "${glob_state}" |
2654 |
+} |
2655 |
+ |
2656 |
+pkg_postinst() { |
2657 |
+ eselect wine register ${P} |
2658 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
2659 |
+ eselect wine register --vanilla ${P} || die |
2660 |
+ fi |
2661 |
+ |
2662 |
+ eselect wine update --all --if-unset || die |
2663 |
+ |
2664 |
+ xdg_desktop_database_update |
2665 |
+ |
2666 |
+ if ! use gecko; then |
2667 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
2668 |
+ ewarn "implementation of iexplore. Many older windows applications" |
2669 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
2670 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
2671 |
+ fi |
2672 |
+ if ! use mono; then |
2673 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
2674 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
2675 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
2676 |
+ ewarn "to install an external one, like via winetricks" |
2677 |
+ fi |
2678 |
+} |
2679 |
+ |
2680 |
+pkg_prerm() { |
2681 |
+ eselect wine deregister ${P} |
2682 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
2683 |
+ eselect wine deregister --vanilla ${P} || die |
2684 |
+ fi |
2685 |
+ |
2686 |
+ eselect wine update --all --if-unset || die |
2687 |
+} |
2688 |
+ |
2689 |
+pkg_postrm() { |
2690 |
+ xdg_desktop_database_update |
2691 |
+} |