1 |
commit: 67f467f2be969a6293563835fa3b4ca8c5a6e68e |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 30 17:28:21 2018 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 30 17:28:21 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=67f467f2 |
7 |
|
8 |
app-emulation/wine-vanilla: Bump stable to 3.0.2 |
9 |
|
10 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
11 |
|
12 |
app-emulation/wine-vanilla/Manifest | 1 + |
13 |
.../wine-vanilla/wine-vanilla-3.0.2.ebuild | 525 +++++++++++++++++++++ |
14 |
2 files changed, 526 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest |
17 |
index 0badd19..9815b3f 100644 |
18 |
--- a/app-emulation/wine-vanilla/Manifest |
19 |
+++ b/app-emulation/wine-vanilla/Manifest |
20 |
@@ -27,6 +27,7 @@ DIST wine-2.7.tar.xz 19101108 BLAKE2B cf5ff292ada8b65498098269b5961dc8f5c412cab4 |
21 |
DIST wine-2.8.tar.xz 19120740 BLAKE2B 6d6a7eb0a30a654337ede94d358bb9d477ce5162d9b50efc8ca75e6b143b638eca916f77e120cd35e632fbdfc7cf036f67132d19db86d8d5c6340b9ac18afee5 SHA512 4d0b167b1e5add31ed0ed05b328d16fc13cd268285c03a9100e7ddc53864aa07f6b216a555ef0c2e51dee550e3f4abf0c7c20db2cbca177bb38e8c3e11f05b97 |
22 |
DIST wine-2.9.tar.xz 19154668 BLAKE2B 45961ad031404a4cba8733bbbfe34ac1db361a508deca45e81938b25be0ed1b59e7fa9c9619bcfecce540b0c96e57cee75c6a98a144fbff6e91fa72af55ece94 SHA512 6d06e511d8f338297ed0ddb7bf2ffb501f528209eaecbbee3d4e5d53db649dd5ea0aeb78bba661a9bcfda5f97e170ca10eb8fab355e229bfe7db6a5feb7ec4e8 |
23 |
DIST wine-3.0.1.tar.xz 19722444 BLAKE2B e042d280c3f4c2df64c2d426cdebdb65e9c7263034961b1916bc9c6206bf9c107aefaf8cee166d9f1a2ea21dfa57db0d3641ca5e8025f70520f11aa24d20ca60 SHA512 3d59f08a87da1d2ee280954a4c91e861b6994048b36eff1ac8df67dbab08a792d391b23ced66ea99f8503a979b3ec26cd35558b71c4d29d68775a5d484bf7d00 |
24 |
+DIST wine-3.0.2.tar.xz 19726920 BLAKE2B e108f851b2d893b052a26ae4368f3337bebcc81bb9ea9abf93c5b7d6e01e613ce6e5db98696ab6ad8e266f6f0f0b9c5ddccb66ae7ba7183912a7911fac4b9633 SHA512 dbd0f242c5eace297ad16e314b8ad139e7d430de7eb8ca52b2006d0b80db4809e28a0e785d404a65ea1acdb56e7f06ebfc9a50071db1edaa6180c8835e7c4b13 |
25 |
DIST wine-3.0.tar.xz 19712932 BLAKE2B 4478c6781bb171ecca426d1fdc85e0d0bbe13b62b6c983933de55e2abdd0bda7a01cbf251c021824b00129ea6230d1d4e718a64b7d919bb5c07a106b8771adb6 SHA512 a51f41b66f4805e09b223528eff6670e94b9c0c0c947be647507baf9d8d9afe7c3fdc88684c2c8d3573b4739d9a086ab929a744a8594d3c8f6ceb52070f43f0a |
26 |
DIST wine-3.1.tar.xz 19730700 BLAKE2B 287cc42474a9cc57eb7f4b5db2ba79ac5ec8742dffb5367c189f19465cc69bcf78b10fe62ffe6f84ae1360f639a899a7f19128e30e1d9a5b8bbd63deb85e7650 SHA512 49c30d820b8f4028935b4d90dd6251c881cb8cd41bde8833db2782f04111a3d111e24605a87b2d70e419d54cfb6bb42d941f4593f9b381812e3602bf1307c545 |
27 |
DIST wine-3.10.tar.xz 20485784 BLAKE2B 3a5e9ca948880a3bc979c33e797296d156425438c2502c3d2c50a6d5241e485bdc081ff195b0647cfa1db1cab247e941f02d0511f7b94dc0037fa24e2e61eb5c SHA512 bb1a1d8e8ad7f48d9fcf48ebbf0ebbb8e3b45ea211736bd7837144ea34b373f74955d3c0ccc4cdc44020eea23c8af8e67252e1c5cd6115e11419ad5f6ef24843 |
28 |
|
29 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-3.0.2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-3.0.2.ebuild |
30 |
new file mode 100644 |
31 |
index 0000000..0fc7213 |
32 |
--- /dev/null |
33 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-3.0.2.ebuild |
34 |
@@ -0,0 +1,525 @@ |
35 |
+# Copyright 1999-2018 Gentoo Foundation |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=6 |
39 |
+ |
40 |
+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" |
41 |
+PLOCALE_BACKUP="en" |
42 |
+ |
43 |
+inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
44 |
+ |
45 |
+MY_PN="${PN%%-*}" |
46 |
+MY_P="${MY_PN}-${PV}" |
47 |
+ |
48 |
+if [[ ${PV} == "9999" ]] ; then |
49 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
50 |
+ EGIT_BRANCH="master" |
51 |
+ inherit git-r3 |
52 |
+ SRC_URI="" |
53 |
+ #KEYWORDS="" |
54 |
+else |
55 |
+ MAJOR_V=$(get_version_component_range 1) |
56 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.0/${MY_P}.tar.xz" |
57 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
58 |
+fi |
59 |
+S="${WORKDIR}/${MY_P}" |
60 |
+ |
61 |
+GWP_V="20180120" |
62 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
63 |
+ |
64 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
65 |
+HOMEPAGE="https://www.winehq.org/" |
66 |
+SRC_URI="${SRC_URI} |
67 |
+ https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
68 |
+" |
69 |
+ |
70 |
+LICENSE="LGPL-2.1" |
71 |
+SLOT="${PV}" |
72 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kerberos 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" |
73 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
74 |
+ X? ( truetype ) |
75 |
+ elibc_glibc? ( threads ) |
76 |
+ osmesa? ( opengl ) |
77 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
78 |
+ |
79 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
80 |
+# or fail due to Xvfb's opengl limitations. |
81 |
+RESTRICT="test" |
82 |
+ |
83 |
+COMMON_DEPEND=" |
84 |
+ X? ( |
85 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
86 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
87 |
+ x11-libs/libXfixes[${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 |
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
104 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
105 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
106 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
107 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
108 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
109 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
110 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
111 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
112 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
113 |
+ opengl? ( |
114 |
+ virtual/glu[${MULTILIB_USEDEP}] |
115 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
116 |
+ ) |
117 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
118 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
119 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
120 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
121 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
122 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
123 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
124 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
125 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
126 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
127 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
128 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
129 |
+ xml? ( |
130 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
131 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
132 |
+ )" |
133 |
+ |
134 |
+RDEPEND="${COMMON_DEPEND} |
135 |
+ app-emulation/wine-desktop-common |
136 |
+ >app-eselect/eselect-wine-0.3 |
137 |
+ !app-emulation/wine:0 |
138 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
139 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
140 |
+ mono? ( app-emulation/wine-mono:4.7.1 ) |
141 |
+ perl? ( |
142 |
+ dev-lang/perl |
143 |
+ dev-perl/XML-Simple |
144 |
+ ) |
145 |
+ pulseaudio? ( |
146 |
+ realtime? ( sys-auth/rtkit ) |
147 |
+ ) |
148 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
149 |
+ selinux? ( sec-policy/selinux-wine ) |
150 |
+ udisks? ( sys-fs/udisks:2 )" |
151 |
+ |
152 |
+# tools/make_requests requires perl |
153 |
+DEPEND="${COMMON_DEPEND} |
154 |
+ sys-devel/flex |
155 |
+ >=sys-kernel/linux-headers-2.6 |
156 |
+ virtual/pkgconfig |
157 |
+ virtual/yacc |
158 |
+ X? ( x11-base/xorg-proto ) |
159 |
+ prelink? ( sys-devel/prelink ) |
160 |
+ xinerama? ( x11-base/xorg-proto )" |
161 |
+ |
162 |
+# These use a non-standard "Wine" category, which is provided by |
163 |
+# /etc/xdg/applications-merged/wine.menu |
164 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
165 |
+usr/share/applications/wine-notepad.desktop |
166 |
+usr/share/applications/wine-uninstaller.desktop |
167 |
+usr/share/applications/wine-winecfg.desktop" |
168 |
+ |
169 |
+PATCHES=( |
170 |
+ "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
171 |
+ "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
172 |
+ "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
173 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
174 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864 |
175 |
+) |
176 |
+PATCHES_BIN=() |
177 |
+ |
178 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
179 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
180 |
+ DEPEND+=" dev-util/patchbin" |
181 |
+fi |
182 |
+ |
183 |
+wine_compiler_check() { |
184 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
185 |
+ |
186 |
+ # GCC-specific bugs |
187 |
+ if tc-is-gcc; then |
188 |
+ # bug #549768 |
189 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
190 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
191 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
192 |
+ # Run in subshell to prevent "Aborted" message |
193 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
194 |
+ if ! eend $?; then |
195 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
196 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
197 |
+ eerror "or use gcc-config to select a different compiler version." |
198 |
+ eerror "See https://bugs.gentoo.org/549768" |
199 |
+ eerror |
200 |
+ return 1 |
201 |
+ fi |
202 |
+ fi |
203 |
+ # bug #574044 |
204 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
205 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
206 |
+ # Compile in subshell to prevent "Aborted" message |
207 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
208 |
+ if ! eend $?; then |
209 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
210 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
211 |
+ eerror "or use gcc-config to select a different compiler version." |
212 |
+ eerror "See https://bugs.gentoo.org/574044" |
213 |
+ eerror |
214 |
+ return 1 |
215 |
+ fi |
216 |
+ fi |
217 |
+ fi |
218 |
+ |
219 |
+ # Ensure compiler support |
220 |
+ if use abi_x86_64; then |
221 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
222 |
+ # Compile in subshell to prevent "Aborted" message |
223 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
224 |
+ if ! eend $?; then |
225 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
226 |
+ eerror |
227 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
228 |
+ eerror |
229 |
+ return 1 |
230 |
+ fi |
231 |
+ fi |
232 |
+} |
233 |
+ |
234 |
+wine_build_environment_check() { |
235 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
236 |
+ |
237 |
+ if use abi_x86_64; then |
238 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
239 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
240 |
+ die |
241 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
242 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
243 |
+ die |
244 |
+ fi |
245 |
+ fi |
246 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
247 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
248 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
249 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
250 |
+ fi |
251 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
252 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
253 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
254 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
255 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
256 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
257 |
+ fi |
258 |
+ fi |
259 |
+ |
260 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
261 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
262 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
263 |
+ eerror |
264 |
+ return 1 |
265 |
+ fi |
266 |
+} |
267 |
+ |
268 |
+wine_env_vcs_vars() { |
269 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
270 |
+ local pn_live_val="${pn_live_var}" |
271 |
+ eval pn_live_val='$'${pn_live_val} |
272 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
273 |
+ eerror "Commits must now be specified using the environmental variables" |
274 |
+ eerror "WINE_COMMIT" |
275 |
+ eerror |
276 |
+ return 1 |
277 |
+ fi |
278 |
+} |
279 |
+ |
280 |
+pkg_pretend() { |
281 |
+ wine_build_environment_check || die |
282 |
+ |
283 |
+ # Verify OSS support |
284 |
+ if use oss && ! use kernel_FreeBSD; then |
285 |
+ if ! has_version ">=media-sound/oss-4"; then |
286 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
287 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
288 |
+ eerror |
289 |
+ die |
290 |
+ fi |
291 |
+ fi |
292 |
+} |
293 |
+ |
294 |
+pkg_setup() { |
295 |
+ wine_build_environment_check || die |
296 |
+ wine_env_vcs_vars || die |
297 |
+ |
298 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
299 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
300 |
+ |
301 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
302 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
303 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
304 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
305 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
306 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
307 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
308 |
+ MY_MANDIR="${MY_DATADIR}/man" |
309 |
+} |
310 |
+ |
311 |
+src_unpack() { |
312 |
+ if [[ ${PV} == "9999" ]] ; then |
313 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
314 |
+ fi |
315 |
+ |
316 |
+ default |
317 |
+ |
318 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
319 |
+} |
320 |
+ |
321 |
+src_prepare() { |
322 |
+ |
323 |
+ eapply_bin(){ |
324 |
+ local patch |
325 |
+ for patch in ${PATCHES_BIN[@]}; do |
326 |
+ patchbin --nogit < "${patch}" || die |
327 |
+ done |
328 |
+ } |
329 |
+ |
330 |
+ local md5="$(md5sum server/protocol.def)" |
331 |
+ |
332 |
+ default |
333 |
+ eapply_bin |
334 |
+ eautoreconf |
335 |
+ |
336 |
+ # Modification of the server protocol requires regenerating the server requests |
337 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
338 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
339 |
+ tools/make_requests || die #432348 |
340 |
+ fi |
341 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
342 |
+ if ! use run-exes; then |
343 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
344 |
+ fi |
345 |
+ |
346 |
+ # Edit wine.desktop to work for specific variant |
347 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
348 |
+ |
349 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
350 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
351 |
+ |
352 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
353 |
+ |
354 |
+ # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
355 |
+ # Requires wine-2.0-rearrange-manpages.patch |
356 |
+ |
357 |
+ # Duplicate manpages input files for wine64 |
358 |
+ local f |
359 |
+ for f in loader/*.man.in; do |
360 |
+ cp ${f} ${f/wine/wine64} || die |
361 |
+ done |
362 |
+ # Add wine64 manpages to Makefile |
363 |
+ if use abi_x86_64; then |
364 |
+ sed -i "/wine.man.in/i \ |
365 |
+ \\\twine64.man.in \\\\" loader/Makefile.in || die |
366 |
+ sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
367 |
+\164\2/' loader/Makefile.in || die |
368 |
+ fi |
369 |
+ |
370 |
+ rm_man_file(){ |
371 |
+ local file="${1}" |
372 |
+ loc=${2} |
373 |
+ sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
374 |
+ } |
375 |
+ |
376 |
+ while read f; do |
377 |
+ l10n_for_each_disabled_locale_do rm_man_file "${f}" |
378 |
+ done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
379 |
+} |
380 |
+ |
381 |
+src_configure() { |
382 |
+ wine_compiler_check || die |
383 |
+ |
384 |
+ export LDCONFIG=/bin/true |
385 |
+ use custom-cflags || strip-flags |
386 |
+ |
387 |
+ multilib-minimal_src_configure |
388 |
+} |
389 |
+ |
390 |
+multilib_src_configure() { |
391 |
+ local myconf=( |
392 |
+ --prefix="${MY_PREFIX}" |
393 |
+ --datarootdir="${MY_DATAROOTDIR}" |
394 |
+ --datadir="${MY_DATADIR}" |
395 |
+ --docdir="${MY_DOCDIR}" |
396 |
+ --includedir="${MY_INCLUDEDIR}" |
397 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
398 |
+ --libexecdir="${MY_LIBEXECDIR}" |
399 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
400 |
+ --mandir="${MY_MANDIR}" |
401 |
+ --sysconfdir=/etc/wine |
402 |
+ $(use_with alsa) |
403 |
+ $(use_with capi) |
404 |
+ $(use_with lcms cms) |
405 |
+ $(use_with cups) |
406 |
+ $(use_with ncurses curses) |
407 |
+ $(use_with udisks dbus) |
408 |
+ $(use_with fontconfig) |
409 |
+ $(use_with ssl gnutls) |
410 |
+ $(use_enable gecko mshtml) |
411 |
+ $(use_with gphoto2 gphoto) |
412 |
+ $(use_with gsm) |
413 |
+ $(use_with gstreamer) |
414 |
+ --without-hal |
415 |
+ $(use_with jpeg) |
416 |
+ $(use_with kerberos krb5) |
417 |
+ $(use_with ldap) |
418 |
+ $(use_enable mono mscoree) |
419 |
+ $(use_with mp3 mpg123) |
420 |
+ $(use_with netapi) |
421 |
+ $(use_with nls gettext) |
422 |
+ $(use_with openal) |
423 |
+ $(use_with opencl) |
424 |
+ $(use_with opengl) |
425 |
+ $(use_with osmesa) |
426 |
+ $(use_with oss) |
427 |
+ $(use_with pcap) |
428 |
+ $(use_with png) |
429 |
+ $(use_with pulseaudio pulse) |
430 |
+ $(use_with threads pthread) |
431 |
+ $(use_with scanner sane) |
432 |
+ $(use_enable test tests) |
433 |
+ $(use_with truetype freetype) |
434 |
+ $(use_with udev) |
435 |
+ $(use_with v4l) |
436 |
+ $(use_with X x) |
437 |
+ $(use_with X xfixes) |
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 binloops, shouldn't be necessary, but including to stay safe |
514 |
+ eshopts_push -s failglob #615218 |
515 |
+ # Make wrappers for binaries for handling multiple variants |
516 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
517 |
+ local b |
518 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
519 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
520 |
+ done |
521 |
+ eshopts_pop |
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 |
+} |