1 |
commit: ce0149aa2e86a92221a174ba37f745717808c568 |
2 |
Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 3 17:55:50 2017 +0000 |
4 |
Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 5 05:53:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce0149aa |
7 |
|
8 |
app-emulation/wine-vanilla: Bump to 2.0.3 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=635928 |
11 |
Package-Manager: Portage-2.3.13, Repoman-2.3.4 |
12 |
|
13 |
app-emulation/wine-vanilla/Manifest | 1 + |
14 |
.../wine-vanilla/wine-vanilla-2.0.3.ebuild | 524 +++++++++++++++++++++ |
15 |
2 files changed, 525 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest |
18 |
index e5961980c52..3fac2e2874c 100644 |
19 |
--- a/app-emulation/wine-vanilla/Manifest |
20 |
+++ b/app-emulation/wine-vanilla/Manifest |
21 |
@@ -1,6 +1,7 @@ |
22 |
DIST gentoo-wine-patches-20170830.tar.xz 58456 SHA256 fb7781d0ae360cbc3860c2d2e81527a1b903da824c01f5d5040e95aaf99a3970 SHA512 5e5159e3252b246bba0ef7fdba345db3ab1071c5b8b8b625f98eda18779d4024c5b76bdbf49ce7bd5c6b01b422807adf76820beddb2b4a6ee9e67d13052cc575 WHIRLPOOL a79be264bab3fcdeee06fef47efd28e6e1125254ac7f82300cb6ba2591ef69cd76b5fed8f778b1849a0659e680e9fc785f0273d55cb2ed95648a74dffa5e22d2 |
23 |
DIST wine-2.0.1.tar.xz 18845444 SHA256 6cfb4eaae566dc7afb7ac0f1f2db2c0d69969952acab0debf084ee8f7b071583 SHA512 b32d07443655898768383b7409c21093b60c028fef166a596dad5dfab5a329b9fce4552e612c6d182e4f67eb1f28ed497fe2ed6af55d0000d3e96a124547722d WHIRLPOOL 0fbaf53504e4e40db6227f45f5b92ac388c2bf23d4f573e4d3b60ccaaadeeccb5a696226d1bd4aa8b245f21c8d6a13aac423ead3f4692ebc1e8e613714168501 |
24 |
DIST wine-2.0.2.tar.xz 18854952 SHA256 f71884f539928877f4b415309f582825d3d3c9976104e43d566944c710713c9a SHA512 3f37080a951819304cd3475f6012f1d6b5a94879b137cdf816cac4c8fde68ddc777905e92277ec5dce96437d8c32c43d55d3750b582781a9f9774b118f1a5b90 WHIRLPOOL cf21a899c60749c37353abc4ba974b3d6cc369769ace70fde899ff1cb5ac8a97828165cf2dbfbcf0915f5196ac58974948fe3e5b2c9854296a5eea75f8023ae5 |
25 |
+DIST wine-2.0.3.tar.xz 18864648 SHA256 a811c664f870a3a01449443a93a6fcee41aea2e912e58f72742eb7924962be56 SHA512 e20dbcb3a48ecb3526eba075d4baebab2529dfc50b7a6d5e18294704470f61db386013f457118c270274b911f9643d203110f46558d23e84e6a6c2d78e237dbb WHIRLPOOL 36928e816b6e4dec2173c424042c3e9da83be4a8fb3847bc90606d92858c66d4f1f41d4e1477d797e19d955d21a01710f1c3149f72da7011fae186705529f29c |
26 |
DIST wine-2.0.tar.bz2 23662707 SHA256 9756f5a2129b6a83ba701e546173cbff86caa671b0af73eb8f72c03b20c066c6 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 WHIRLPOOL fa9f774d87dae73c7d1f3b86dc3b03ea27065eb6140f1cac13c82fe16f7ebff8f8365ed447220cf5c2788b9f4aae7c482e4f9e2e69f47e5435209e148f5dbdfe |
27 |
DIST wine-2.1.tar.xz 18887032 SHA256 bfb9abf63691c93df28d9599aaa866dc2b4e27209b3b7b546df8a37d7d9d1e6e SHA512 03d678ee6e89c2804813f2827255fcf59e96ca9a45b7d8ac441cfc84f835e5e5689c70a79a41a04c631e1add7807fa4a5758acef3bd7aadfb2e92e68958c6ef6 WHIRLPOOL 063d935f1ff0922100641f2f53cdac23d2993a83182d45e028e485fd7d0a13bc5cfb77bca76550b1537b3f42fecacef7fd64785adbf6425af823f56f96973b54 |
28 |
DIST wine-2.10.tar.xz 19209580 SHA256 488df7ffd2e81da455bf428fc9eb784bb4273a890334500895665711bd52f179 SHA512 8807e16a571bf45d99097ad5fdfb9fe755f6dbe84010a330fed82f1d48c76b7f19589bfc0e5dde0b9e49a608fd0501db3f7e3e129e4d9d34bcae03bc51a73139 WHIRLPOOL e9a8248aac31593fbac28a3d8d4e62bfce14a7c41cc416ebfca8606518d28efd31b32196133da211f75f48bd228bd5d21fcbbc0479293e813ed99b258b37126e |
29 |
|
30 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-2.0.3.ebuild b/app-emulation/wine-vanilla/wine-vanilla-2.0.3.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..0763279543a |
33 |
--- /dev/null |
34 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-2.0.3.ebuild |
35 |
@@ -0,0 +1,524 @@ |
36 |
+# Copyright 1999-2017 Gentoo Foundation |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=6 |
40 |
+ |
41 |
+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" |
42 |
+PLOCALE_BACKUP="en" |
43 |
+ |
44 |
+inherit autotools eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
45 |
+ |
46 |
+MY_PN="${PN%%-*}" |
47 |
+MY_P="${MY_PN}-${PV}" |
48 |
+ |
49 |
+if [[ ${PV} == "9999" ]] ; then |
50 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
51 |
+ EGIT_BRANCH="master" |
52 |
+ inherit git-r3 |
53 |
+ SRC_URI="" |
54 |
+ #KEYWORDS="" |
55 |
+else |
56 |
+ MAJOR_V=$(get_version_component_range 1) |
57 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.xz" |
58 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
59 |
+fi |
60 |
+S="${WORKDIR}/${MY_P}" |
61 |
+ |
62 |
+GWP_V="20170830" |
63 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
64 |
+ |
65 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
66 |
+HOMEPAGE="https://www.winehq.org/" |
67 |
+SRC_URI="${SRC_URI} |
68 |
+ https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
69 |
+" |
70 |
+ |
71 |
+LICENSE="LGPL-2.1" |
72 |
+SLOT="${PV}" |
73 |
+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" |
74 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
75 |
+ X? ( truetype ) |
76 |
+ elibc_glibc? ( threads ) |
77 |
+ osmesa? ( opengl ) |
78 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
79 |
+ |
80 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
81 |
+# or fail due to Xvfb's opengl limitations. |
82 |
+RESTRICT="test" |
83 |
+ |
84 |
+COMMON_DEPEND=" |
85 |
+ X? ( |
86 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
87 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
88 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
89 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
90 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
91 |
+ ) |
92 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
93 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
94 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
95 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
96 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
97 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
98 |
+ gstreamer? ( |
99 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
100 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
101 |
+ ) |
102 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
103 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
104 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
105 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
106 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
107 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
108 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
109 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
110 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
111 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
112 |
+ opengl? ( |
113 |
+ virtual/glu[${MULTILIB_USEDEP}] |
114 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
115 |
+ ) |
116 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
117 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
118 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
119 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
120 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
121 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
122 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
123 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
124 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
125 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
126 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
127 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
128 |
+ xml? ( |
129 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
130 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
131 |
+ ) |
132 |
+ abi_x86_32? ( |
133 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
134 |
+ !<app-emulation/emul-linux-x86-baselibs-20140508-r14 |
135 |
+ !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] |
136 |
+ !<app-emulation/emul-linux-x86-db-20140508-r3 |
137 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] |
138 |
+ !<app-emulation/emul-linux-x86-medialibs-20140508-r6 |
139 |
+ !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] |
140 |
+ !<app-emulation/emul-linux-x86-opengl-20140508-r1 |
141 |
+ !app-emulation/emul-linux-x86-sdl[-abi_x86_32(-)] |
142 |
+ !<app-emulation/emul-linux-x86-sdl-20140508-r1 |
143 |
+ !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] |
144 |
+ !<app-emulation/emul-linux-x86-soundlibs-20140508 |
145 |
+ !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] |
146 |
+ !<app-emulation/emul-linux-x86-xlibs-20140508 |
147 |
+ )" |
148 |
+ |
149 |
+RDEPEND="${COMMON_DEPEND} |
150 |
+ app-emulation/wine-desktop-common |
151 |
+ >app-eselect/eselect-wine-0.3 |
152 |
+ !app-emulation/wine:0 |
153 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
154 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
155 |
+ mono? ( app-emulation/wine-mono:4.6.4 ) |
156 |
+ perl? ( |
157 |
+ dev-lang/perl |
158 |
+ dev-perl/XML-Simple |
159 |
+ ) |
160 |
+ pulseaudio? ( |
161 |
+ realtime? ( sys-auth/rtkit ) |
162 |
+ ) |
163 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
164 |
+ selinux? ( sec-policy/selinux-wine ) |
165 |
+ udisks? ( sys-fs/udisks:2 )" |
166 |
+ |
167 |
+# tools/make_requests requires perl |
168 |
+DEPEND="${COMMON_DEPEND} |
169 |
+ dev-util/patchbin |
170 |
+ sys-devel/flex |
171 |
+ >=sys-kernel/linux-headers-2.6 |
172 |
+ virtual/pkgconfig |
173 |
+ virtual/yacc |
174 |
+ X? ( |
175 |
+ x11-proto/inputproto |
176 |
+ x11-proto/xextproto |
177 |
+ x11-proto/xf86vidmodeproto |
178 |
+ ) |
179 |
+ prelink? ( sys-devel/prelink ) |
180 |
+ xinerama? ( x11-proto/xineramaproto )" |
181 |
+ |
182 |
+# These use a non-standard "Wine" category, which is provided by |
183 |
+# /etc/xdg/applications-merged/wine.menu |
184 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
185 |
+usr/share/applications/wine-notepad.desktop |
186 |
+usr/share/applications/wine-uninstaller.desktop |
187 |
+usr/share/applications/wine-winecfg.desktop" |
188 |
+ |
189 |
+PATCHES=( |
190 |
+ "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
191 |
+ "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
192 |
+ "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
193 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" |
194 |
+) |
195 |
+PATCHES_BIN=() |
196 |
+ |
197 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
198 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
199 |
+ DEPEND+=" dev-util/patchbin" |
200 |
+fi |
201 |
+ |
202 |
+wine_compiler_check() { |
203 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
204 |
+ |
205 |
+ # GCC-specific bugs |
206 |
+ if tc-is-gcc; then |
207 |
+ # bug #549768 |
208 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
209 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
210 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
211 |
+ # Run in subshell to prevent "Aborted" message |
212 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
213 |
+ if ! eend $?; then |
214 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
215 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
216 |
+ eerror "or use gcc-config to select a different compiler version." |
217 |
+ eerror "See https://bugs.gentoo.org/549768" |
218 |
+ eerror |
219 |
+ return 1 |
220 |
+ fi |
221 |
+ fi |
222 |
+ # bug #574044 |
223 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
224 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
225 |
+ # Compile in subshell to prevent "Aborted" message |
226 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
227 |
+ if ! eend $?; then |
228 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
229 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
230 |
+ eerror "or use gcc-config to select a different compiler version." |
231 |
+ eerror "See https://bugs.gentoo.org/574044" |
232 |
+ eerror |
233 |
+ return 1 |
234 |
+ fi |
235 |
+ fi |
236 |
+ fi |
237 |
+ |
238 |
+ # Ensure compiler support |
239 |
+ if use abi_x86_64; then |
240 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
241 |
+ # Compile in subshell to prevent "Aborted" message |
242 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
243 |
+ if ! eend $?; then |
244 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
245 |
+ eerror |
246 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
247 |
+ eerror |
248 |
+ return 1 |
249 |
+ fi |
250 |
+ fi |
251 |
+} |
252 |
+ |
253 |
+wine_build_environment_check() { |
254 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
255 |
+ |
256 |
+ if use abi_x86_64; then |
257 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
258 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
259 |
+ die |
260 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
261 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
262 |
+ die |
263 |
+ fi |
264 |
+ fi |
265 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
266 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
267 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
268 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
269 |
+ fi |
270 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
271 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
272 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
273 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
274 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
275 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
276 |
+ fi |
277 |
+ fi |
278 |
+ |
279 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
280 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
281 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
282 |
+ eerror |
283 |
+ return 1 |
284 |
+ fi |
285 |
+} |
286 |
+ |
287 |
+wine_env_vcs_vars() { |
288 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
289 |
+ local pn_live_val="${pn_live_var}" |
290 |
+ eval pn_live_val='$'${pn_live_val} |
291 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
292 |
+ eerror "Commits must now be specified using the environmental variables" |
293 |
+ eerror "WINE_COMMIT" |
294 |
+ eerror |
295 |
+ return 1 |
296 |
+ fi |
297 |
+} |
298 |
+ |
299 |
+pkg_pretend() { |
300 |
+ wine_build_environment_check || die |
301 |
+ |
302 |
+ # Verify OSS support |
303 |
+ if use oss && ! use kernel_FreeBSD; then |
304 |
+ if ! has_version ">=media-sound/oss-4"; then |
305 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
306 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
307 |
+ eerror |
308 |
+ die |
309 |
+ fi |
310 |
+ fi |
311 |
+} |
312 |
+ |
313 |
+pkg_setup() { |
314 |
+ wine_build_environment_check || die |
315 |
+ wine_env_vcs_vars || die |
316 |
+ |
317 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
318 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
319 |
+ |
320 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
321 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
322 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
323 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
324 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
325 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
326 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
327 |
+ MY_MANDIR="${MY_DATADIR}/man" |
328 |
+} |
329 |
+ |
330 |
+src_unpack() { |
331 |
+ if [[ ${PV} == "9999" ]] ; then |
332 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
333 |
+ fi |
334 |
+ |
335 |
+ default |
336 |
+ |
337 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
338 |
+} |
339 |
+ |
340 |
+src_prepare() { |
341 |
+ |
342 |
+ eapply_bin(){ |
343 |
+ local patch |
344 |
+ for patch in ${PATCHES_BIN[@]}; do |
345 |
+ patchbin --nogit < "${patch}" || die |
346 |
+ done |
347 |
+ } |
348 |
+ |
349 |
+ local md5="$(md5sum server/protocol.def)" |
350 |
+ |
351 |
+ default |
352 |
+ eapply_bin |
353 |
+ eautoreconf |
354 |
+ |
355 |
+ # Modification of the server protocol requires regenerating the server requests |
356 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
357 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
358 |
+ tools/make_requests || die #432348 |
359 |
+ fi |
360 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
361 |
+ if ! use run-exes; then |
362 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
363 |
+ fi |
364 |
+ |
365 |
+ # Edit wine.desktop to work for specific variant |
366 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
367 |
+ |
368 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
369 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
370 |
+ |
371 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
372 |
+} |
373 |
+ |
374 |
+src_configure() { |
375 |
+ wine_compiler_check || die |
376 |
+ |
377 |
+ export LDCONFIG=/bin/true |
378 |
+ use custom-cflags || strip-flags |
379 |
+ |
380 |
+ multilib-minimal_src_configure |
381 |
+} |
382 |
+ |
383 |
+multilib_src_configure() { |
384 |
+ local myconf=( |
385 |
+ --prefix="${MY_PREFIX}" |
386 |
+ --datarootdir="${MY_DATAROOTDIR}" |
387 |
+ --datadir="${MY_DATADIR}" |
388 |
+ --docdir="${MY_DOCDIR}" |
389 |
+ --includedir="${MY_INCLUDEDIR}" |
390 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
391 |
+ --libexecdir="${MY_LIBEXECDIR}" |
392 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
393 |
+ --mandir="${MY_MANDIR}" |
394 |
+ --sysconfdir=/etc/wine |
395 |
+ $(use_with alsa) |
396 |
+ $(use_with capi) |
397 |
+ $(use_with lcms cms) |
398 |
+ $(use_with cups) |
399 |
+ $(use_with ncurses curses) |
400 |
+ $(use_with udisks dbus) |
401 |
+ $(use_with fontconfig) |
402 |
+ $(use_with ssl gnutls) |
403 |
+ $(use_enable gecko mshtml) |
404 |
+ $(use_with gphoto2 gphoto) |
405 |
+ $(use_with gsm) |
406 |
+ $(use_with gstreamer) |
407 |
+ --without-hal |
408 |
+ $(use_with jpeg) |
409 |
+ $(use_with ldap) |
410 |
+ $(use_enable mono mscoree) |
411 |
+ $(use_with mp3 mpg123) |
412 |
+ $(use_with netapi) |
413 |
+ $(use_with nls gettext) |
414 |
+ $(use_with openal) |
415 |
+ $(use_with opencl) |
416 |
+ $(use_with opengl) |
417 |
+ $(use_with osmesa) |
418 |
+ $(use_with oss) |
419 |
+ $(use_with pcap) |
420 |
+ $(use_with png) |
421 |
+ $(use_with pulseaudio pulse) |
422 |
+ $(use_with threads pthread) |
423 |
+ $(use_with scanner sane) |
424 |
+ $(use_enable test tests) |
425 |
+ $(use_with truetype freetype) |
426 |
+ $(use_with udev) |
427 |
+ $(use_with v4l) |
428 |
+ $(use_with X x) |
429 |
+ $(use_with xcomposite) |
430 |
+ $(use_with xinerama) |
431 |
+ $(use_with xml) |
432 |
+ $(use_with xml xslt) |
433 |
+ ) |
434 |
+ |
435 |
+ local PKG_CONFIG AR RANLIB |
436 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
437 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
438 |
+ tc-export PKG_CONFIG AR RANLIB |
439 |
+ |
440 |
+ if use amd64; then |
441 |
+ if [[ ${ABI} == amd64 ]]; then |
442 |
+ myconf+=( --enable-win64 ) |
443 |
+ else |
444 |
+ myconf+=( --disable-win64 ) |
445 |
+ fi |
446 |
+ |
447 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
448 |
+ # CC/LD hackery. We're using separate tools instead. |
449 |
+ fi |
450 |
+ |
451 |
+ ECONF_SOURCE=${S} \ |
452 |
+ econf "${myconf[@]}" |
453 |
+ emake depend |
454 |
+} |
455 |
+ |
456 |
+multilib_src_test() { |
457 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
458 |
+ if [[ ${ABI} == x86 ]]; then |
459 |
+ if [[ $(id -u) == 0 ]]; then |
460 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
461 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
462 |
+ return |
463 |
+ fi |
464 |
+ |
465 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
466 |
+ Xemake test |
467 |
+ fi |
468 |
+} |
469 |
+ |
470 |
+multilib_src_install_all() { |
471 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
472 |
+ add_locale_docs() { |
473 |
+ local locale_doc="documentation/README.$1" |
474 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
475 |
+ } |
476 |
+ l10n_for_each_locale_do add_locale_docs |
477 |
+ |
478 |
+ einstalldocs |
479 |
+ prune_libtool_files --all |
480 |
+ |
481 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
482 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
483 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
484 |
+ fi |
485 |
+ |
486 |
+ # Remove wineconsole if neither backend is installed #551124 |
487 |
+ if ! use X && ! use ncurses; then |
488 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
489 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
490 |
+ rm_wineconsole() { |
491 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
492 |
+ } |
493 |
+ multilib_foreach_abi rm_wineconsole |
494 |
+ fi |
495 |
+ |
496 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
497 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
498 |
+ |
499 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
500 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
501 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
502 |
+ fi |
503 |
+ |
504 |
+ # Failglob for bin and man loops |
505 |
+ local glob_state=$(shopt -p failglob) |
506 |
+ shopt -s failglob |
507 |
+ |
508 |
+ # Make wrappers for binaries for handling multiple variants |
509 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
510 |
+ local b |
511 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
512 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
513 |
+ done |
514 |
+ |
515 |
+ # respect LINGUAS when installing man pages, #469418 |
516 |
+ local l |
517 |
+ for l in de fr pl; do |
518 |
+ use linguas_${l} || rm -r "${D%/}${MY_MANDIR}"/${l}* |
519 |
+ done |
520 |
+ |
521 |
+ eval "${glob_state}" |
522 |
+} |
523 |
+ |
524 |
+pkg_postinst() { |
525 |
+ eselect wine register ${P} |
526 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
527 |
+ eselect wine register --vanilla ${P} || die |
528 |
+ fi |
529 |
+ |
530 |
+ eselect wine update --all --if-unset || die |
531 |
+ |
532 |
+ xdg_desktop_database_update |
533 |
+ |
534 |
+ if ! use gecko; then |
535 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
536 |
+ ewarn "implementation of iexplore. Many older windows applications" |
537 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
538 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
539 |
+ fi |
540 |
+ if ! use mono; then |
541 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
542 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
543 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
544 |
+ ewarn "to install an external one, like via winetricks" |
545 |
+ fi |
546 |
+} |
547 |
+ |
548 |
+pkg_prerm() { |
549 |
+ eselect wine deregister ${P} |
550 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
551 |
+ eselect wine deregister --vanilla ${P} || die |
552 |
+ fi |
553 |
+ |
554 |
+ eselect wine update --all --if-unset || die |
555 |
+} |
556 |
+ |
557 |
+pkg_postrm() { |
558 |
+ xdg_desktop_database_update |
559 |
+} |