1 |
commit: ad9d7959aa9ccba99aa11e628e8e910a0ee811d9 |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 30 03:10:02 2018 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 30 03:12:51 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad9d7959 |
7 |
|
8 |
app-emulation/wine-staging: Drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.31, Repoman-2.3.9 |
11 |
|
12 |
app-emulation/wine-staging/Manifest | 6 - |
13 |
.../wine-staging/wine-staging-2.19.ebuild | 603 -------------------- |
14 |
.../wine-staging/wine-staging-2.20.ebuild | 605 --------------------- |
15 |
.../wine-staging/wine-staging-2.21.ebuild | 605 --------------------- |
16 |
4 files changed, 1819 deletions(-) |
17 |
|
18 |
diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest |
19 |
index 5a948b439a6..bc09295a9d5 100644 |
20 |
--- a/app-emulation/wine-staging/Manifest |
21 |
+++ b/app-emulation/wine-staging/Manifest |
22 |
@@ -1,15 +1,9 @@ |
23 |
DIST gentoo-wine-patches-20180120.tar.xz 58672 BLAKE2B 84d621075b65475cec41a06429680b518d7eafb938cefd903f3f8aa71ea3049ac9d8de05af48f9f4f4a1b9172c7ef17784540413e410eb8ec11e8ec4a63858c6 SHA512 5b354a409c7a2b77499aaa593b9248a1d15d755e3687b095755faacc30068bfcdbdd5c2a2a78617cb1a78c46d2931162bd69ec3379b035d81494bea7108263c2 |
24 |
DIST wine-2.0.tar.bz2 23662707 BLAKE2B 1d485c1359ce8a0395a9f6378c1f8be33ea2836b80390d1eb1095057a0acedd21708daab16e1851a315391b9f9b0a360879b9d98c73bcc8371c5023e9a8037f5 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186 |
25 |
-DIST wine-2.19.tar.xz 19549464 BLAKE2B 86d130cc43d7d674d2f478365952962b2792fd585b8d074564108bc7e9f4f7690337e4758b9a24e54fe8fd60187d3a96496a5ffc454ba674b02ecdde68efd3bb SHA512 83558231bdc592b1f69cfedf6c689063df7bd9fecdfafba6fb7f6a2c7fa7783973efb85a6a49305afc18b1aa268209ee5b9c0655756e05d7550468698dfa51ae |
26 |
-DIST wine-2.20.tar.xz 19597556 BLAKE2B 80a9886fa77e5788b143521288f7d83c92754610c9426e58c759d2c33767bd23f7d2a44a17ceeec0bfe9065264393e0aa1087a0827ea7d438ffd938ba2eb2fb5 SHA512 d8d374d1e690ce9d3964fc81054fb7f4cd56cbae6bc44ebbf80b7dc7f04524baa2bd831e0be8f00de4cb0e14c1cb71780d424f5dcb9851fcaed9fb22f5ce5d23 |
27 |
-DIST wine-2.21.tar.xz 19620888 BLAKE2B 26d19c5805db58b53530b80eda3ab229f7961542d398cb0e74155e5341de8b484d301c263653ae50e953588538f6782a9b2200b822ba66f091e65d259e07db8e SHA512 4e33c463debe637827ed65f1118e692832bb5374491f706f9d251b8a2956e20d2df5d90ceba218b9bc9e946de91b8ba1d96b460453f59cdd9d82f070d07e0c43 |
28 |
DIST wine-3.5.tar.xz 19963436 BLAKE2B 83d7c0719a088f8c705f7a9d8a6df6b9ee5e0a5ffa57c0a921875097be29298bebb9025222039432c65da32359e187a93413e04a5bb73171f0033911595baf9f SHA512 c1e36f3db862fdedd00c3ac20c84c6eb799b53fe32e959b481a6168baf7d9725ed9bd0a97e7f9b651e3ccfba4f8fb623445369be03fde5010ed0fcb0a53e7d3f |
29 |
DIST wine-3.6.tar.xz 20005240 BLAKE2B 6dd48180b9aed8a3b69c40b3ed7b2ff5adbebfb591860dda6603d2219f9059bc069df000cd2614c80d34911c451388f0124af3dd8a11b806b227ca8e16659d71 SHA512 31d24cc78734bdb743afcec7df05b641ab0625568361401eaf8cd5e217719c8c51a0ef7ed737a560fe42cb9ecd88f10d35e62a98d9df69b966502a5b0dab5a22 |
30 |
DIST wine-3.7.tar.xz 20454036 BLAKE2B 04ac94d5679377c5d0bb37a6d3e8e3ec7c09faa300f8422a09a22b14ef4244d2bb14c80a47cfca5e11526506a8064f0cfa4e28868d7f04669f85ab743dbbb36d SHA512 a699418574dd8f407c064421cf6cdfe3923562c8adf9a7749e716f3853291eab05358ea64f0217c303c26c0f8f59d2116024b7b6978f9a52a055147e689a8694 |
31 |
DIST wine-staging-2.0.tar.gz 10182575 BLAKE2B 1de645f66fa3e5e0d8ceddf5439fd246510470f63d6331c7029abed7192180b7b8430e43a2e732a30a5fbe0c73ba39b7fafcfc08830c68e679dff90576c3a960 SHA512 51412299259d6e92c8993543d5fdb3239ebe31e0d1d715e0a9e8ce94b3139c0567b08ff1600d41be94f12427cbfccc2f6b6b2ed030535445c95618aaf6578580 |
32 |
-DIST wine-staging-2.19.tar.gz 10241240 BLAKE2B e661e3272328988e9a1aacc22fc02f0773804b58777f208c79c6af866032f31b6140a52e2aa5af954e52437db234712863d1369e960e98e2c212d1efc7f6344f SHA512 90916cb096bbfec35514eff4c1b6e2090b6e68e3e7af1164715f5abb1d255c5cfd6411f53c27cb277adcf0982fa6d6e508a7cdbc1404dcca6c2700b05c2c5483 |
33 |
-DIST wine-staging-2.20.tar.gz 10240761 BLAKE2B 2a212e59c606f4c53e711b0f975a9527cbb930423061eeeb962c3bba7232890f3f4853e1aa98cba11bcb9c9ba6a37c915ef8df7f4f3d3243da96f625e6d45a57 SHA512 16f55130291ca70487a74d01cee9057f95f3eae3e049d30fb2a9aeb8e425b2020289fb805fdbae860708be0615a86da0502c06ff32cc21536d040088cc13605f |
34 |
-DIST wine-staging-2.21.tar.gz 10229454 BLAKE2B a971b9b96e1e57f658b492e3dd5d6daf5410b6bb6a7df9432d14b48e6ca4b21a4ab62ee362addf370ea5940e4f7a6af05ec6c026124cb9e9b6cc790f7fc8e204 SHA512 701c6352c8bc5745b8078947bcc3b6209e4e6c387905395cc81d42276402243522d7fa543bb34293c74786adcde9a3c50a2cf4cd57e05e0f4c68991a49a00b41 |
35 |
DIST wine-staging-3.5.tar.gz 10024748 BLAKE2B b5399bd22fd1edc1e22ee82e19bb9e54d4d12e771cfa0578dfc69d5cc18c0b6c1dba8e9c522ffddd14c187e012f33196738035dd34b45d71f48eac96997fd8b5 SHA512 39ce4fccac408d69c55fe53376744d218d546d09fc3fcaa5c8e87ba070de5ed52128ebdf0ed76cb5e3a5178a79c8fb25a8786b129e8b3eb59156732d7a4bf15c |
36 |
DIST wine-staging-3.6.tar.gz 9958882 BLAKE2B 9f7d3d6d748f7bceb08a584bc93a1ce97c09d13cf5448ed1fbe1981494e0009e4686f047d8005a059522ec78749dd120f29f7c6562da8578a95a5dda91c23895 SHA512 839731fa3dba91cefd9e0f036b4d688c4786fe8cb19143819457fb9e45a6c14ef3a70630b585abdd424a00036312114034a2529700012ea1863527e45fbfac2a |
37 |
DIST wine-staging-3.7.tar.gz 9951654 BLAKE2B 3d6c9a023f3a4f9da6e506a88490365d4f0959231e7f9e375e8ae46006c3cfd82ca4e65af9df79d9c54cf7ee5e53452b10ac5146f2c0de97a7c4946aefac3cd5 SHA512 4a00b7c61121798b6c4e918aadeb71865e359f6471035b9ed33ae242f3fe70f1977b1c0b3628fb244b5ba4942d771d2ee797bcc087d38192fcd9325e1886ed14 |
38 |
|
39 |
diff --git a/app-emulation/wine-staging/wine-staging-2.19.ebuild b/app-emulation/wine-staging/wine-staging-2.19.ebuild |
40 |
deleted file mode 100644 |
41 |
index 933b53a87ff..00000000000 |
42 |
--- a/app-emulation/wine-staging/wine-staging-2.19.ebuild |
43 |
+++ /dev/null |
44 |
@@ -1,603 +0,0 @@ |
45 |
-# Copyright 1999-2018 Gentoo Foundation |
46 |
-# Distributed under the terms of the GNU General Public License v2 |
47 |
- |
48 |
-EAPI=6 |
49 |
- |
50 |
-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" |
51 |
-PLOCALE_BACKUP="en" |
52 |
- |
53 |
-inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
54 |
- |
55 |
-MY_PN="${PN%%-*}" |
56 |
-MY_P="${MY_PN}-${PV}" |
57 |
- |
58 |
-if [[ ${PV} == "9999" ]] ; then |
59 |
- EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
60 |
- EGIT_BRANCH="master" |
61 |
- inherit git-r3 |
62 |
- SRC_URI="" |
63 |
- #KEYWORDS="" |
64 |
-else |
65 |
- MAJOR_V=$(get_version_component_range 1) |
66 |
- SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
67 |
- KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
68 |
-fi |
69 |
-S="${WORKDIR}/${MY_P}" |
70 |
- |
71 |
-STAGING_P="wine-staging-${PV}" |
72 |
-STAGING_DIR="${WORKDIR}/${STAGING_P}" |
73 |
-GWP_V="20180120" |
74 |
-PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
75 |
- |
76 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" |
77 |
-HOMEPAGE="https://www.winehq.org/" |
78 |
-SRC_URI="${SRC_URI} |
79 |
- https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
80 |
-" |
81 |
- |
82 |
-if [[ ${PV} == "9999" ]] ; then |
83 |
- STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git" |
84 |
-else |
85 |
- SRC_URI="${SRC_URI} |
86 |
- staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )" |
87 |
-fi |
88 |
- |
89 |
-LICENSE="LGPL-2.1" |
90 |
-SLOT="${PV}" |
91 |
-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 pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
92 |
-REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
93 |
- X? ( truetype ) |
94 |
- elibc_glibc? ( threads ) |
95 |
- osmesa? ( opengl ) |
96 |
- pipelight? ( staging ) |
97 |
- s3tc? ( staging ) |
98 |
- test? ( abi_x86_32 ) |
99 |
- themes? ( staging ) |
100 |
- vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
101 |
- |
102 |
-# FIXME: the test suite is unsuitable for us; many tests require net access |
103 |
-# or fail due to Xvfb's opengl limitations. |
104 |
-RESTRICT="test" |
105 |
- |
106 |
-COMMON_DEPEND=" |
107 |
- X? ( |
108 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
109 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
110 |
- x11-libs/libXfixes[${MULTILIB_USEDEP}] |
111 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
112 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
113 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
114 |
- ) |
115 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
116 |
- capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
117 |
- cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
118 |
- fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
119 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
120 |
- gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
121 |
- gstreamer? ( |
122 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
123 |
- media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
124 |
- ) |
125 |
- jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
126 |
- lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
127 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
128 |
- mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
129 |
- ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
130 |
- netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
131 |
- nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
132 |
- odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
133 |
- openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
134 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
135 |
- opengl? ( |
136 |
- virtual/glu[${MULTILIB_USEDEP}] |
137 |
- virtual/opengl[${MULTILIB_USEDEP}] |
138 |
- ) |
139 |
- osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
140 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
141 |
- png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
142 |
- pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
143 |
- scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
144 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
145 |
- staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
146 |
- themes? ( |
147 |
- dev-libs/glib:2[${MULTILIB_USEDEP}] |
148 |
- x11-libs/cairo[${MULTILIB_USEDEP}] |
149 |
- x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
150 |
- ) |
151 |
- truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
152 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
153 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
154 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
155 |
- vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
156 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
157 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
158 |
- xml? ( |
159 |
- dev-libs/libxml2[${MULTILIB_USEDEP}] |
160 |
- dev-libs/libxslt[${MULTILIB_USEDEP}] |
161 |
- )" |
162 |
- |
163 |
-RDEPEND="${COMMON_DEPEND} |
164 |
- app-emulation/wine-desktop-common |
165 |
- >app-eselect/eselect-wine-0.3 |
166 |
- !app-emulation/wine:0 |
167 |
- dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
168 |
- gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
169 |
- mono? ( app-emulation/wine-mono:4.7.1 ) |
170 |
- perl? ( |
171 |
- dev-lang/perl |
172 |
- dev-perl/XML-Simple |
173 |
- ) |
174 |
- pulseaudio? ( |
175 |
- realtime? ( sys-auth/rtkit ) |
176 |
- ) |
177 |
- s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
178 |
- samba? ( >=net-fs/samba-3.0.25[winbind] ) |
179 |
- selinux? ( sec-policy/selinux-wine ) |
180 |
- udisks? ( sys-fs/udisks:2 )" |
181 |
- |
182 |
-# tools/make_requests requires perl |
183 |
-DEPEND="${COMMON_DEPEND} |
184 |
- sys-devel/flex |
185 |
- >=sys-kernel/linux-headers-2.6 |
186 |
- virtual/pkgconfig |
187 |
- virtual/yacc |
188 |
- X? ( x11-base/xorg-proto ) |
189 |
- prelink? ( sys-devel/prelink ) |
190 |
- staging? ( |
191 |
- dev-lang/perl |
192 |
- dev-perl/XML-Simple |
193 |
- ) |
194 |
- xinerama? ( x11-base/xorg-proto )" |
195 |
- |
196 |
-# These use a non-standard "Wine" category, which is provided by |
197 |
-# /etc/xdg/applications-merged/wine.menu |
198 |
-QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
199 |
-usr/share/applications/wine-notepad.desktop |
200 |
-usr/share/applications/wine-uninstaller.desktop |
201 |
-usr/share/applications/wine-winecfg.desktop" |
202 |
- |
203 |
-PATCHES=( |
204 |
- "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
205 |
- "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
206 |
- "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
207 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
208 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864 |
209 |
-) |
210 |
-PATCHES_BIN=() |
211 |
- |
212 |
-# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
213 |
-if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
214 |
- DEPEND+=" dev-util/patchbin" |
215 |
-fi |
216 |
- |
217 |
-wine_compiler_check() { |
218 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
219 |
- |
220 |
- # GCC-specific bugs |
221 |
- if tc-is-gcc; then |
222 |
- # bug #549768 |
223 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
224 |
- ebegin "Checking for gcc-5 ms_abi compiler bug" |
225 |
- $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
226 |
- # Run in subshell to prevent "Aborted" message |
227 |
- ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
228 |
- if ! eend $?; then |
229 |
- eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
230 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
231 |
- eerror "or use gcc-config to select a different compiler version." |
232 |
- eerror "See https://bugs.gentoo.org/549768" |
233 |
- eerror |
234 |
- return 1 |
235 |
- fi |
236 |
- fi |
237 |
- # bug #574044 |
238 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
239 |
- ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
240 |
- # Compile in subshell to prevent "Aborted" message |
241 |
- ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
242 |
- if ! eend $?; then |
243 |
- eerror "Wine cannot be built with this version of gcc-5.3" |
244 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
245 |
- eerror "or use gcc-config to select a different compiler version." |
246 |
- eerror "See https://bugs.gentoo.org/574044" |
247 |
- eerror |
248 |
- return 1 |
249 |
- fi |
250 |
- fi |
251 |
- fi |
252 |
- |
253 |
- # Ensure compiler support |
254 |
- if use abi_x86_64; then |
255 |
- ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
256 |
- # Compile in subshell to prevent "Aborted" message |
257 |
- ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
258 |
- if ! eend $?; then |
259 |
- eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
260 |
- eerror |
261 |
- eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
262 |
- eerror |
263 |
- return 1 |
264 |
- fi |
265 |
- fi |
266 |
-} |
267 |
- |
268 |
-wine_build_environment_check() { |
269 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
270 |
- |
271 |
- if use abi_x86_64; then |
272 |
- if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
273 |
- eerror "You need gcc-4.4+ to compile 64-bit wine" |
274 |
- die |
275 |
- elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
276 |
- eerror "You need clang-3.8+ to compile 64-bit wine" |
277 |
- die |
278 |
- fi |
279 |
- fi |
280 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
281 |
- ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
282 |
- ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
283 |
- ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
284 |
- fi |
285 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
286 |
- if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
287 |
- ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
288 |
- ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
289 |
- ewarn "See package.env in man 5 portage for more information on how to do this." |
290 |
- ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
291 |
- fi |
292 |
- fi |
293 |
- |
294 |
- if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
295 |
- eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
296 |
- eerror "See https://bugs.gentoo.org/487864 for more details." |
297 |
- eerror |
298 |
- return 1 |
299 |
- fi |
300 |
-} |
301 |
- |
302 |
-wine_env_vcs_vars() { |
303 |
- local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
304 |
- local pn_live_val="${pn_live_var}" |
305 |
- eval pn_live_val='$'${pn_live_val} |
306 |
- if [[ ! -z ${pn_live_val} ]]; then |
307 |
- if use staging; then |
308 |
- eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
309 |
- eerror "cannot be used to set the commit. Instead, you may use the" |
310 |
- eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT." |
311 |
- eerror |
312 |
- return 1 |
313 |
- fi |
314 |
- fi |
315 |
- if [[ ! -z ${EGIT_COMMIT} ]]; then |
316 |
- eerror "Commits must now be specified using the environmental variables" |
317 |
- eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
318 |
- eerror |
319 |
- return 1 |
320 |
- fi |
321 |
-} |
322 |
- |
323 |
-pkg_pretend() { |
324 |
- wine_build_environment_check || die |
325 |
- |
326 |
- # Verify OSS support |
327 |
- if use oss && ! use kernel_FreeBSD; then |
328 |
- if ! has_version ">=media-sound/oss-4"; then |
329 |
- eerror "You cannot build wine with USE=oss without having support from a" |
330 |
- eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
331 |
- eerror |
332 |
- die |
333 |
- fi |
334 |
- fi |
335 |
-} |
336 |
- |
337 |
-pkg_setup() { |
338 |
- wine_build_environment_check || die |
339 |
- wine_env_vcs_vars || die |
340 |
- |
341 |
- WINE_VARIANT="${PN#wine}-${PV}" |
342 |
- WINE_VARIANT="${WINE_VARIANT#-}" |
343 |
- |
344 |
- MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
345 |
- MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
346 |
- MY_DATADIR="${MY_DATAROOTDIR}" |
347 |
- MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
348 |
- MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
349 |
- MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
350 |
- MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
351 |
- MY_MANDIR="${MY_DATADIR}/man" |
352 |
-} |
353 |
- |
354 |
-src_unpack() { |
355 |
- if [[ ${PV} == "9999" ]] ; then |
356 |
- EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
357 |
- if use staging; then |
358 |
- local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
359 |
- |
360 |
- git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
361 |
- git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
362 |
- |
363 |
- local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
364 |
- |
365 |
- if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
366 |
- einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
367 |
- einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
368 |
- einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
369 |
- fi |
370 |
- fi |
371 |
- fi |
372 |
- |
373 |
- default |
374 |
- |
375 |
- l10n_find_plocales_changes "${S}/po" "" ".po" |
376 |
-} |
377 |
- |
378 |
-src_prepare() { |
379 |
- |
380 |
- eapply_bin(){ |
381 |
- local patch |
382 |
- for patch in ${PATCHES_BIN[@]}; do |
383 |
- patchbin --nogit < "${patch}" || die |
384 |
- done |
385 |
- } |
386 |
- |
387 |
- local md5="$(md5sum server/protocol.def)" |
388 |
- |
389 |
- if use staging; then |
390 |
- ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
391 |
- ewarn "Wine bugzilla should explicitly state that staging was used." |
392 |
- |
393 |
- local STAGING_EXCLUDE="" |
394 |
- STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
395 |
- use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
396 |
- |
397 |
- # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
398 |
- ebegin "Running Wine-Staging patch installer" |
399 |
- ( |
400 |
- set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
401 |
- cd "${STAGING_DIR}/patches" |
402 |
- source "${STAGING_DIR}/patches/patchinstall.sh" |
403 |
- ) |
404 |
- eend $? || die "Failed to apply Wine-Staging patches" |
405 |
- fi |
406 |
- |
407 |
- default |
408 |
- eapply_bin |
409 |
- eautoreconf |
410 |
- |
411 |
- # Modification of the server protocol requires regenerating the server requests |
412 |
- if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
413 |
- einfo "server/protocol.def was patched; running tools/make_requests" |
414 |
- tools/make_requests || die #432348 |
415 |
- fi |
416 |
- sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
417 |
- if ! use run-exes; then |
418 |
- sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
419 |
- fi |
420 |
- |
421 |
- # Edit wine.desktop to work for specific variant |
422 |
- sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
423 |
- |
424 |
- # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
425 |
- cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
426 |
- |
427 |
- l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
428 |
- |
429 |
- # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
430 |
- # Requires wine-2.0-rearrange-manpages.patch |
431 |
- |
432 |
- # Duplicate manpages input files for wine64 |
433 |
- local f |
434 |
- for f in loader/*.man.in; do |
435 |
- cp ${f} ${f/wine/wine64} || die |
436 |
- done |
437 |
- # Add wine64 manpages to Makefile |
438 |
- if use abi_x86_64; then |
439 |
- sed -i "/wine.man.in/i \ |
440 |
- \\\twine64.man.in \\\\" loader/Makefile.in || die |
441 |
- sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
442 |
-\164\2/' loader/Makefile.in || die |
443 |
- fi |
444 |
- |
445 |
- rm_man_file(){ |
446 |
- local file="${1}" |
447 |
- loc=${2} |
448 |
- sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
449 |
- } |
450 |
- |
451 |
- while read f; do |
452 |
- l10n_for_each_disabled_locale_do rm_man_file "${f}" |
453 |
- done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
454 |
-} |
455 |
- |
456 |
-src_configure() { |
457 |
- wine_compiler_check || die |
458 |
- |
459 |
- export LDCONFIG=/bin/true |
460 |
- use custom-cflags || strip-flags |
461 |
- |
462 |
- multilib-minimal_src_configure |
463 |
-} |
464 |
- |
465 |
-multilib_src_configure() { |
466 |
- local myconf=( |
467 |
- --prefix="${MY_PREFIX}" |
468 |
- --datarootdir="${MY_DATAROOTDIR}" |
469 |
- --datadir="${MY_DATADIR}" |
470 |
- --docdir="${MY_DOCDIR}" |
471 |
- --includedir="${MY_INCLUDEDIR}" |
472 |
- --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
473 |
- --libexecdir="${MY_LIBEXECDIR}" |
474 |
- --localstatedir="${MY_LOCALSTATEDIR}" |
475 |
- --mandir="${MY_MANDIR}" |
476 |
- --sysconfdir=/etc/wine |
477 |
- $(use_with alsa) |
478 |
- $(use_with capi) |
479 |
- $(use_with lcms cms) |
480 |
- $(use_with cups) |
481 |
- $(use_with ncurses curses) |
482 |
- $(use_with udisks dbus) |
483 |
- $(use_with fontconfig) |
484 |
- $(use_with ssl gnutls) |
485 |
- $(use_enable gecko mshtml) |
486 |
- $(use_with gphoto2 gphoto) |
487 |
- $(use_with gsm) |
488 |
- $(use_with gstreamer) |
489 |
- --without-hal |
490 |
- $(use_with jpeg) |
491 |
- $(use_with ldap) |
492 |
- $(use_enable mono mscoree) |
493 |
- $(use_with mp3 mpg123) |
494 |
- $(use_with netapi) |
495 |
- $(use_with nls gettext) |
496 |
- $(use_with openal) |
497 |
- $(use_with opencl) |
498 |
- $(use_with opengl) |
499 |
- $(use_with osmesa) |
500 |
- $(use_with oss) |
501 |
- $(use_with pcap) |
502 |
- $(use_with png) |
503 |
- $(use_with pulseaudio pulse) |
504 |
- $(use_with threads pthread) |
505 |
- $(use_with scanner sane) |
506 |
- $(use_enable test tests) |
507 |
- $(use_with truetype freetype) |
508 |
- $(use_with udev) |
509 |
- $(use_with v4l) |
510 |
- $(use_with X x) |
511 |
- $(use_with X xfixes) |
512 |
- $(use_with xcomposite) |
513 |
- $(use_with xinerama) |
514 |
- $(use_with xml) |
515 |
- $(use_with xml xslt) |
516 |
- ) |
517 |
- |
518 |
- use staging && myconf+=( |
519 |
- --with-xattr |
520 |
- $(use_with themes gtk3) |
521 |
- $(use_with vaapi va) |
522 |
- ) |
523 |
- |
524 |
- local PKG_CONFIG AR RANLIB |
525 |
- # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
526 |
- # set AR and RANLIB to make QA scripts happy; #483342 |
527 |
- tc-export PKG_CONFIG AR RANLIB |
528 |
- |
529 |
- if use amd64; then |
530 |
- if [[ ${ABI} == amd64 ]]; then |
531 |
- myconf+=( --enable-win64 ) |
532 |
- else |
533 |
- myconf+=( --disable-win64 ) |
534 |
- fi |
535 |
- |
536 |
- # Note: using --with-wine64 results in problems with multilib.eclass |
537 |
- # CC/LD hackery. We're using separate tools instead. |
538 |
- fi |
539 |
- |
540 |
- ECONF_SOURCE=${S} \ |
541 |
- econf "${myconf[@]}" |
542 |
- emake depend |
543 |
-} |
544 |
- |
545 |
-multilib_src_test() { |
546 |
- # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
547 |
- if [[ ${ABI} == x86 ]]; then |
548 |
- if [[ $(id -u) == 0 ]]; then |
549 |
- ewarn "Skipping tests since they cannot be run under the root user." |
550 |
- ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
551 |
- return |
552 |
- fi |
553 |
- |
554 |
- WINEPREFIX="${T}/.wine-${ABI}" \ |
555 |
- Xemake test |
556 |
- fi |
557 |
-} |
558 |
- |
559 |
-multilib_src_install_all() { |
560 |
- local DOCS=( ANNOUNCE AUTHORS README ) |
561 |
- add_locale_docs() { |
562 |
- local locale_doc="documentation/README.$1" |
563 |
- [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
564 |
- } |
565 |
- l10n_for_each_locale_do add_locale_docs |
566 |
- |
567 |
- einstalldocs |
568 |
- prune_libtool_files --all |
569 |
- |
570 |
- if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
571 |
- rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
572 |
- "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
573 |
- fi |
574 |
- |
575 |
- # Remove wineconsole if neither backend is installed #551124 |
576 |
- if ! use X && ! use ncurses; then |
577 |
- rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
578 |
- rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
579 |
- rm_wineconsole() { |
580 |
- rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
581 |
- } |
582 |
- multilib_foreach_abi rm_wineconsole |
583 |
- fi |
584 |
- |
585 |
- use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
586 |
- use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
587 |
- |
588 |
- if use abi_x86_64 && ! use abi_x86_32; then |
589 |
- dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
590 |
- dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
591 |
- fi |
592 |
- |
593 |
- # Failglob for binloops, shouldn't be necessary, but including to stay safe |
594 |
- eshopts_push -s failglob #615218 |
595 |
- # Make wrappers for binaries for handling multiple variants |
596 |
- # Note: wrappers instead of symlinks because some are shell which use basename |
597 |
- local b |
598 |
- for b in "${D%/}${MY_PREFIX}"/bin/*; do |
599 |
- make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
600 |
- done |
601 |
- eshopts_pop |
602 |
-} |
603 |
- |
604 |
-pkg_postinst() { |
605 |
- eselect wine register ${P} |
606 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
607 |
- eselect wine register --vanilla ${P} || die |
608 |
- else |
609 |
- if use staging; then |
610 |
- eselect wine register --staging ${P} || die |
611 |
- fi |
612 |
- fi |
613 |
- |
614 |
- eselect wine update --all --if-unset || die |
615 |
- |
616 |
- xdg_desktop_database_update |
617 |
- |
618 |
- if ! use gecko; then |
619 |
- ewarn "Without Wine Gecko, wine prefixes will not have a default" |
620 |
- ewarn "implementation of iexplore. Many older windows applications" |
621 |
- ewarn "rely upon the existence of an iexplore implementation, so" |
622 |
- ewarn "you will likely need to install an external one, like via winetricks" |
623 |
- fi |
624 |
- if ! use mono; then |
625 |
- ewarn "Without Wine Mono, wine prefixes will not have a default" |
626 |
- ewarn "implementation of .NET. Many windows applications rely upon" |
627 |
- ewarn "the existence of a .NET implementation, so you will likely need" |
628 |
- ewarn "to install an external one, like via winetricks" |
629 |
- fi |
630 |
-} |
631 |
- |
632 |
-pkg_prerm() { |
633 |
- eselect wine deregister ${P} |
634 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
635 |
- eselect wine deregister --vanilla ${P} || die |
636 |
- else |
637 |
- if use staging; then |
638 |
- eselect wine deregister --staging ${P} || die |
639 |
- fi |
640 |
- fi |
641 |
- |
642 |
- eselect wine update --all --if-unset || die |
643 |
-} |
644 |
- |
645 |
-pkg_postrm() { |
646 |
- xdg_desktop_database_update |
647 |
-} |
648 |
|
649 |
diff --git a/app-emulation/wine-staging/wine-staging-2.20.ebuild b/app-emulation/wine-staging/wine-staging-2.20.ebuild |
650 |
deleted file mode 100644 |
651 |
index e3bcca8e5da..00000000000 |
652 |
--- a/app-emulation/wine-staging/wine-staging-2.20.ebuild |
653 |
+++ /dev/null |
654 |
@@ -1,605 +0,0 @@ |
655 |
-# Copyright 1999-2018 Gentoo Foundation |
656 |
-# Distributed under the terms of the GNU General Public License v2 |
657 |
- |
658 |
-EAPI=6 |
659 |
- |
660 |
-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" |
661 |
-PLOCALE_BACKUP="en" |
662 |
- |
663 |
-inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
664 |
- |
665 |
-MY_PN="${PN%%-*}" |
666 |
-MY_P="${MY_PN}-${PV}" |
667 |
- |
668 |
-if [[ ${PV} == "9999" ]] ; then |
669 |
- EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
670 |
- EGIT_BRANCH="master" |
671 |
- inherit git-r3 |
672 |
- SRC_URI="" |
673 |
- #KEYWORDS="" |
674 |
-else |
675 |
- MAJOR_V=$(get_version_component_range 1) |
676 |
- SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
677 |
- KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
678 |
-fi |
679 |
-S="${WORKDIR}/${MY_P}" |
680 |
- |
681 |
-STAGING_P="wine-staging-${PV}" |
682 |
-STAGING_DIR="${WORKDIR}/${STAGING_P}" |
683 |
-GWP_V="20180120" |
684 |
-PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
685 |
- |
686 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" |
687 |
-HOMEPAGE="https://www.winehq.org/" |
688 |
-SRC_URI="${SRC_URI} |
689 |
- https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
690 |
-" |
691 |
- |
692 |
-if [[ ${PV} == "9999" ]] ; then |
693 |
- STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git" |
694 |
-else |
695 |
- SRC_URI="${SRC_URI} |
696 |
- staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )" |
697 |
-fi |
698 |
- |
699 |
-LICENSE="LGPL-2.1" |
700 |
-SLOT="${PV}" |
701 |
-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 pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
702 |
-REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
703 |
- X? ( truetype ) |
704 |
- elibc_glibc? ( threads ) |
705 |
- osmesa? ( opengl ) |
706 |
- pipelight? ( staging ) |
707 |
- s3tc? ( staging ) |
708 |
- test? ( abi_x86_32 ) |
709 |
- themes? ( staging ) |
710 |
- vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
711 |
- |
712 |
-# FIXME: the test suite is unsuitable for us; many tests require net access |
713 |
-# or fail due to Xvfb's opengl limitations. |
714 |
-RESTRICT="test" |
715 |
- |
716 |
-COMMON_DEPEND=" |
717 |
- X? ( |
718 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
719 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
720 |
- x11-libs/libXfixes[${MULTILIB_USEDEP}] |
721 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
722 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
723 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
724 |
- ) |
725 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
726 |
- capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
727 |
- cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
728 |
- fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
729 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
730 |
- gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
731 |
- gstreamer? ( |
732 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
733 |
- media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
734 |
- ) |
735 |
- jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
736 |
- kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) |
737 |
- lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
738 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
739 |
- mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
740 |
- ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
741 |
- netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
742 |
- nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
743 |
- odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
744 |
- openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
745 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
746 |
- opengl? ( |
747 |
- virtual/glu[${MULTILIB_USEDEP}] |
748 |
- virtual/opengl[${MULTILIB_USEDEP}] |
749 |
- ) |
750 |
- osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
751 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
752 |
- png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
753 |
- pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
754 |
- scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
755 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
756 |
- staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
757 |
- themes? ( |
758 |
- dev-libs/glib:2[${MULTILIB_USEDEP}] |
759 |
- x11-libs/cairo[${MULTILIB_USEDEP}] |
760 |
- x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
761 |
- ) |
762 |
- truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
763 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
764 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
765 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
766 |
- vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
767 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
768 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
769 |
- xml? ( |
770 |
- dev-libs/libxml2[${MULTILIB_USEDEP}] |
771 |
- dev-libs/libxslt[${MULTILIB_USEDEP}] |
772 |
- )" |
773 |
- |
774 |
-RDEPEND="${COMMON_DEPEND} |
775 |
- app-emulation/wine-desktop-common |
776 |
- >app-eselect/eselect-wine-0.3 |
777 |
- !app-emulation/wine:0 |
778 |
- dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
779 |
- gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
780 |
- mono? ( app-emulation/wine-mono:4.7.1 ) |
781 |
- perl? ( |
782 |
- dev-lang/perl |
783 |
- dev-perl/XML-Simple |
784 |
- ) |
785 |
- pulseaudio? ( |
786 |
- realtime? ( sys-auth/rtkit ) |
787 |
- ) |
788 |
- s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
789 |
- samba? ( >=net-fs/samba-3.0.25[winbind] ) |
790 |
- selinux? ( sec-policy/selinux-wine ) |
791 |
- udisks? ( sys-fs/udisks:2 )" |
792 |
- |
793 |
-# tools/make_requests requires perl |
794 |
-DEPEND="${COMMON_DEPEND} |
795 |
- sys-devel/flex |
796 |
- >=sys-kernel/linux-headers-2.6 |
797 |
- virtual/pkgconfig |
798 |
- virtual/yacc |
799 |
- X? ( x11-base/xorg-proto ) |
800 |
- prelink? ( sys-devel/prelink ) |
801 |
- staging? ( |
802 |
- dev-lang/perl |
803 |
- dev-perl/XML-Simple |
804 |
- ) |
805 |
- xinerama? ( x11-base/xorg-proto )" |
806 |
- |
807 |
-# These use a non-standard "Wine" category, which is provided by |
808 |
-# /etc/xdg/applications-merged/wine.menu |
809 |
-QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
810 |
-usr/share/applications/wine-notepad.desktop |
811 |
-usr/share/applications/wine-uninstaller.desktop |
812 |
-usr/share/applications/wine-winecfg.desktop" |
813 |
- |
814 |
-PATCHES=( |
815 |
- "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
816 |
- "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
817 |
- "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
818 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
819 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864 |
820 |
-) |
821 |
-PATCHES_BIN=() |
822 |
- |
823 |
-# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
824 |
-if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
825 |
- DEPEND+=" dev-util/patchbin" |
826 |
-fi |
827 |
- |
828 |
-wine_compiler_check() { |
829 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
830 |
- |
831 |
- # GCC-specific bugs |
832 |
- if tc-is-gcc; then |
833 |
- # bug #549768 |
834 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
835 |
- ebegin "Checking for gcc-5 ms_abi compiler bug" |
836 |
- $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
837 |
- # Run in subshell to prevent "Aborted" message |
838 |
- ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
839 |
- if ! eend $?; then |
840 |
- eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
841 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
842 |
- eerror "or use gcc-config to select a different compiler version." |
843 |
- eerror "See https://bugs.gentoo.org/549768" |
844 |
- eerror |
845 |
- return 1 |
846 |
- fi |
847 |
- fi |
848 |
- # bug #574044 |
849 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
850 |
- ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
851 |
- # Compile in subshell to prevent "Aborted" message |
852 |
- ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
853 |
- if ! eend $?; then |
854 |
- eerror "Wine cannot be built with this version of gcc-5.3" |
855 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
856 |
- eerror "or use gcc-config to select a different compiler version." |
857 |
- eerror "See https://bugs.gentoo.org/574044" |
858 |
- eerror |
859 |
- return 1 |
860 |
- fi |
861 |
- fi |
862 |
- fi |
863 |
- |
864 |
- # Ensure compiler support |
865 |
- if use abi_x86_64; then |
866 |
- ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
867 |
- # Compile in subshell to prevent "Aborted" message |
868 |
- ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
869 |
- if ! eend $?; then |
870 |
- eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
871 |
- eerror |
872 |
- eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
873 |
- eerror |
874 |
- return 1 |
875 |
- fi |
876 |
- fi |
877 |
-} |
878 |
- |
879 |
-wine_build_environment_check() { |
880 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
881 |
- |
882 |
- if use abi_x86_64; then |
883 |
- if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
884 |
- eerror "You need gcc-4.4+ to compile 64-bit wine" |
885 |
- die |
886 |
- elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
887 |
- eerror "You need clang-3.8+ to compile 64-bit wine" |
888 |
- die |
889 |
- fi |
890 |
- fi |
891 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
892 |
- ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
893 |
- ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
894 |
- ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
895 |
- fi |
896 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
897 |
- if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
898 |
- ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
899 |
- ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
900 |
- ewarn "See package.env in man 5 portage for more information on how to do this." |
901 |
- ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
902 |
- fi |
903 |
- fi |
904 |
- |
905 |
- if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
906 |
- eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
907 |
- eerror "See https://bugs.gentoo.org/487864 for more details." |
908 |
- eerror |
909 |
- return 1 |
910 |
- fi |
911 |
-} |
912 |
- |
913 |
-wine_env_vcs_vars() { |
914 |
- local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
915 |
- local pn_live_val="${pn_live_var}" |
916 |
- eval pn_live_val='$'${pn_live_val} |
917 |
- if [[ ! -z ${pn_live_val} ]]; then |
918 |
- if use staging; then |
919 |
- eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
920 |
- eerror "cannot be used to set the commit. Instead, you may use the" |
921 |
- eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT." |
922 |
- eerror |
923 |
- return 1 |
924 |
- fi |
925 |
- fi |
926 |
- if [[ ! -z ${EGIT_COMMIT} ]]; then |
927 |
- eerror "Commits must now be specified using the environmental variables" |
928 |
- eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
929 |
- eerror |
930 |
- return 1 |
931 |
- fi |
932 |
-} |
933 |
- |
934 |
-pkg_pretend() { |
935 |
- wine_build_environment_check || die |
936 |
- |
937 |
- # Verify OSS support |
938 |
- if use oss && ! use kernel_FreeBSD; then |
939 |
- if ! has_version ">=media-sound/oss-4"; then |
940 |
- eerror "You cannot build wine with USE=oss without having support from a" |
941 |
- eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
942 |
- eerror |
943 |
- die |
944 |
- fi |
945 |
- fi |
946 |
-} |
947 |
- |
948 |
-pkg_setup() { |
949 |
- wine_build_environment_check || die |
950 |
- wine_env_vcs_vars || die |
951 |
- |
952 |
- WINE_VARIANT="${PN#wine}-${PV}" |
953 |
- WINE_VARIANT="${WINE_VARIANT#-}" |
954 |
- |
955 |
- MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
956 |
- MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
957 |
- MY_DATADIR="${MY_DATAROOTDIR}" |
958 |
- MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
959 |
- MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
960 |
- MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
961 |
- MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
962 |
- MY_MANDIR="${MY_DATADIR}/man" |
963 |
-} |
964 |
- |
965 |
-src_unpack() { |
966 |
- if [[ ${PV} == "9999" ]] ; then |
967 |
- EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
968 |
- if use staging; then |
969 |
- local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
970 |
- |
971 |
- git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
972 |
- git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
973 |
- |
974 |
- local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
975 |
- |
976 |
- if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
977 |
- einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
978 |
- einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
979 |
- einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
980 |
- fi |
981 |
- fi |
982 |
- fi |
983 |
- |
984 |
- default |
985 |
- |
986 |
- l10n_find_plocales_changes "${S}/po" "" ".po" |
987 |
-} |
988 |
- |
989 |
-src_prepare() { |
990 |
- |
991 |
- eapply_bin(){ |
992 |
- local patch |
993 |
- for patch in ${PATCHES_BIN[@]}; do |
994 |
- patchbin --nogit < "${patch}" || die |
995 |
- done |
996 |
- } |
997 |
- |
998 |
- local md5="$(md5sum server/protocol.def)" |
999 |
- |
1000 |
- if use staging; then |
1001 |
- ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
1002 |
- ewarn "Wine bugzilla should explicitly state that staging was used." |
1003 |
- |
1004 |
- local STAGING_EXCLUDE="" |
1005 |
- STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
1006 |
- use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
1007 |
- |
1008 |
- # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
1009 |
- ebegin "Running Wine-Staging patch installer" |
1010 |
- ( |
1011 |
- set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
1012 |
- cd "${STAGING_DIR}/patches" |
1013 |
- source "${STAGING_DIR}/patches/patchinstall.sh" |
1014 |
- ) |
1015 |
- eend $? || die "Failed to apply Wine-Staging patches" |
1016 |
- fi |
1017 |
- |
1018 |
- default |
1019 |
- eapply_bin |
1020 |
- eautoreconf |
1021 |
- |
1022 |
- # Modification of the server protocol requires regenerating the server requests |
1023 |
- if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
1024 |
- einfo "server/protocol.def was patched; running tools/make_requests" |
1025 |
- tools/make_requests || die #432348 |
1026 |
- fi |
1027 |
- sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
1028 |
- if ! use run-exes; then |
1029 |
- sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
1030 |
- fi |
1031 |
- |
1032 |
- # Edit wine.desktop to work for specific variant |
1033 |
- sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
1034 |
- |
1035 |
- # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
1036 |
- cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
1037 |
- |
1038 |
- l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
1039 |
- |
1040 |
- # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
1041 |
- # Requires wine-2.0-rearrange-manpages.patch |
1042 |
- |
1043 |
- # Duplicate manpages input files for wine64 |
1044 |
- local f |
1045 |
- for f in loader/*.man.in; do |
1046 |
- cp ${f} ${f/wine/wine64} || die |
1047 |
- done |
1048 |
- # Add wine64 manpages to Makefile |
1049 |
- if use abi_x86_64; then |
1050 |
- sed -i "/wine.man.in/i \ |
1051 |
- \\\twine64.man.in \\\\" loader/Makefile.in || die |
1052 |
- sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
1053 |
-\164\2/' loader/Makefile.in || die |
1054 |
- fi |
1055 |
- |
1056 |
- rm_man_file(){ |
1057 |
- local file="${1}" |
1058 |
- loc=${2} |
1059 |
- sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
1060 |
- } |
1061 |
- |
1062 |
- while read f; do |
1063 |
- l10n_for_each_disabled_locale_do rm_man_file "${f}" |
1064 |
- done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
1065 |
-} |
1066 |
- |
1067 |
-src_configure() { |
1068 |
- wine_compiler_check || die |
1069 |
- |
1070 |
- export LDCONFIG=/bin/true |
1071 |
- use custom-cflags || strip-flags |
1072 |
- |
1073 |
- multilib-minimal_src_configure |
1074 |
-} |
1075 |
- |
1076 |
-multilib_src_configure() { |
1077 |
- local myconf=( |
1078 |
- --prefix="${MY_PREFIX}" |
1079 |
- --datarootdir="${MY_DATAROOTDIR}" |
1080 |
- --datadir="${MY_DATADIR}" |
1081 |
- --docdir="${MY_DOCDIR}" |
1082 |
- --includedir="${MY_INCLUDEDIR}" |
1083 |
- --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
1084 |
- --libexecdir="${MY_LIBEXECDIR}" |
1085 |
- --localstatedir="${MY_LOCALSTATEDIR}" |
1086 |
- --mandir="${MY_MANDIR}" |
1087 |
- --sysconfdir=/etc/wine |
1088 |
- $(use_with alsa) |
1089 |
- $(use_with capi) |
1090 |
- $(use_with lcms cms) |
1091 |
- $(use_with cups) |
1092 |
- $(use_with ncurses curses) |
1093 |
- $(use_with udisks dbus) |
1094 |
- $(use_with fontconfig) |
1095 |
- $(use_with ssl gnutls) |
1096 |
- $(use_enable gecko mshtml) |
1097 |
- $(use_with gphoto2 gphoto) |
1098 |
- $(use_with gsm) |
1099 |
- $(use_with gstreamer) |
1100 |
- --without-hal |
1101 |
- $(use_with jpeg) |
1102 |
- $(use_with kerberos krb5) |
1103 |
- $(use_with ldap) |
1104 |
- $(use_enable mono mscoree) |
1105 |
- $(use_with mp3 mpg123) |
1106 |
- $(use_with netapi) |
1107 |
- $(use_with nls gettext) |
1108 |
- $(use_with openal) |
1109 |
- $(use_with opencl) |
1110 |
- $(use_with opengl) |
1111 |
- $(use_with osmesa) |
1112 |
- $(use_with oss) |
1113 |
- $(use_with pcap) |
1114 |
- $(use_with png) |
1115 |
- $(use_with pulseaudio pulse) |
1116 |
- $(use_with threads pthread) |
1117 |
- $(use_with scanner sane) |
1118 |
- $(use_enable test tests) |
1119 |
- $(use_with truetype freetype) |
1120 |
- $(use_with udev) |
1121 |
- $(use_with v4l) |
1122 |
- $(use_with X x) |
1123 |
- $(use_with X xfixes) |
1124 |
- $(use_with xcomposite) |
1125 |
- $(use_with xinerama) |
1126 |
- $(use_with xml) |
1127 |
- $(use_with xml xslt) |
1128 |
- ) |
1129 |
- |
1130 |
- use staging && myconf+=( |
1131 |
- --with-xattr |
1132 |
- $(use_with themes gtk3) |
1133 |
- $(use_with vaapi va) |
1134 |
- ) |
1135 |
- |
1136 |
- local PKG_CONFIG AR RANLIB |
1137 |
- # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
1138 |
- # set AR and RANLIB to make QA scripts happy; #483342 |
1139 |
- tc-export PKG_CONFIG AR RANLIB |
1140 |
- |
1141 |
- if use amd64; then |
1142 |
- if [[ ${ABI} == amd64 ]]; then |
1143 |
- myconf+=( --enable-win64 ) |
1144 |
- else |
1145 |
- myconf+=( --disable-win64 ) |
1146 |
- fi |
1147 |
- |
1148 |
- # Note: using --with-wine64 results in problems with multilib.eclass |
1149 |
- # CC/LD hackery. We're using separate tools instead. |
1150 |
- fi |
1151 |
- |
1152 |
- ECONF_SOURCE=${S} \ |
1153 |
- econf "${myconf[@]}" |
1154 |
- emake depend |
1155 |
-} |
1156 |
- |
1157 |
-multilib_src_test() { |
1158 |
- # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
1159 |
- if [[ ${ABI} == x86 ]]; then |
1160 |
- if [[ $(id -u) == 0 ]]; then |
1161 |
- ewarn "Skipping tests since they cannot be run under the root user." |
1162 |
- ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
1163 |
- return |
1164 |
- fi |
1165 |
- |
1166 |
- WINEPREFIX="${T}/.wine-${ABI}" \ |
1167 |
- Xemake test |
1168 |
- fi |
1169 |
-} |
1170 |
- |
1171 |
-multilib_src_install_all() { |
1172 |
- local DOCS=( ANNOUNCE AUTHORS README ) |
1173 |
- add_locale_docs() { |
1174 |
- local locale_doc="documentation/README.$1" |
1175 |
- [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
1176 |
- } |
1177 |
- l10n_for_each_locale_do add_locale_docs |
1178 |
- |
1179 |
- einstalldocs |
1180 |
- prune_libtool_files --all |
1181 |
- |
1182 |
- if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
1183 |
- rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
1184 |
- "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
1185 |
- fi |
1186 |
- |
1187 |
- # Remove wineconsole if neither backend is installed #551124 |
1188 |
- if ! use X && ! use ncurses; then |
1189 |
- rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
1190 |
- rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
1191 |
- rm_wineconsole() { |
1192 |
- rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
1193 |
- } |
1194 |
- multilib_foreach_abi rm_wineconsole |
1195 |
- fi |
1196 |
- |
1197 |
- use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
1198 |
- use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
1199 |
- |
1200 |
- if use abi_x86_64 && ! use abi_x86_32; then |
1201 |
- dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
1202 |
- dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
1203 |
- fi |
1204 |
- |
1205 |
- # Failglob for binloops, shouldn't be necessary, but including to stay safe |
1206 |
- eshopts_push -s failglob #615218 |
1207 |
- # Make wrappers for binaries for handling multiple variants |
1208 |
- # Note: wrappers instead of symlinks because some are shell which use basename |
1209 |
- local b |
1210 |
- for b in "${D%/}${MY_PREFIX}"/bin/*; do |
1211 |
- make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
1212 |
- done |
1213 |
- eshopts_pop |
1214 |
-} |
1215 |
- |
1216 |
-pkg_postinst() { |
1217 |
- eselect wine register ${P} |
1218 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
1219 |
- eselect wine register --vanilla ${P} || die |
1220 |
- else |
1221 |
- if use staging; then |
1222 |
- eselect wine register --staging ${P} || die |
1223 |
- fi |
1224 |
- fi |
1225 |
- |
1226 |
- eselect wine update --all --if-unset || die |
1227 |
- |
1228 |
- xdg_desktop_database_update |
1229 |
- |
1230 |
- if ! use gecko; then |
1231 |
- ewarn "Without Wine Gecko, wine prefixes will not have a default" |
1232 |
- ewarn "implementation of iexplore. Many older windows applications" |
1233 |
- ewarn "rely upon the existence of an iexplore implementation, so" |
1234 |
- ewarn "you will likely need to install an external one, like via winetricks" |
1235 |
- fi |
1236 |
- if ! use mono; then |
1237 |
- ewarn "Without Wine Mono, wine prefixes will not have a default" |
1238 |
- ewarn "implementation of .NET. Many windows applications rely upon" |
1239 |
- ewarn "the existence of a .NET implementation, so you will likely need" |
1240 |
- ewarn "to install an external one, like via winetricks" |
1241 |
- fi |
1242 |
-} |
1243 |
- |
1244 |
-pkg_prerm() { |
1245 |
- eselect wine deregister ${P} |
1246 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
1247 |
- eselect wine deregister --vanilla ${P} || die |
1248 |
- else |
1249 |
- if use staging; then |
1250 |
- eselect wine deregister --staging ${P} || die |
1251 |
- fi |
1252 |
- fi |
1253 |
- |
1254 |
- eselect wine update --all --if-unset || die |
1255 |
-} |
1256 |
- |
1257 |
-pkg_postrm() { |
1258 |
- xdg_desktop_database_update |
1259 |
-} |
1260 |
|
1261 |
diff --git a/app-emulation/wine-staging/wine-staging-2.21.ebuild b/app-emulation/wine-staging/wine-staging-2.21.ebuild |
1262 |
deleted file mode 100644 |
1263 |
index e3bcca8e5da..00000000000 |
1264 |
--- a/app-emulation/wine-staging/wine-staging-2.21.ebuild |
1265 |
+++ /dev/null |
1266 |
@@ -1,605 +0,0 @@ |
1267 |
-# Copyright 1999-2018 Gentoo Foundation |
1268 |
-# Distributed under the terms of the GNU General Public License v2 |
1269 |
- |
1270 |
-EAPI=6 |
1271 |
- |
1272 |
-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" |
1273 |
-PLOCALE_BACKUP="en" |
1274 |
- |
1275 |
-inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
1276 |
- |
1277 |
-MY_PN="${PN%%-*}" |
1278 |
-MY_P="${MY_PN}-${PV}" |
1279 |
- |
1280 |
-if [[ ${PV} == "9999" ]] ; then |
1281 |
- EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
1282 |
- EGIT_BRANCH="master" |
1283 |
- inherit git-r3 |
1284 |
- SRC_URI="" |
1285 |
- #KEYWORDS="" |
1286 |
-else |
1287 |
- MAJOR_V=$(get_version_component_range 1) |
1288 |
- SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
1289 |
- KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
1290 |
-fi |
1291 |
-S="${WORKDIR}/${MY_P}" |
1292 |
- |
1293 |
-STAGING_P="wine-staging-${PV}" |
1294 |
-STAGING_DIR="${WORKDIR}/${STAGING_P}" |
1295 |
-GWP_V="20180120" |
1296 |
-PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
1297 |
- |
1298 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" |
1299 |
-HOMEPAGE="https://www.winehq.org/" |
1300 |
-SRC_URI="${SRC_URI} |
1301 |
- https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
1302 |
-" |
1303 |
- |
1304 |
-if [[ ${PV} == "9999" ]] ; then |
1305 |
- STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git" |
1306 |
-else |
1307 |
- SRC_URI="${SRC_URI} |
1308 |
- staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )" |
1309 |
-fi |
1310 |
- |
1311 |
-LICENSE="LGPL-2.1" |
1312 |
-SLOT="${PV}" |
1313 |
-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 pipelight +png prelink pulseaudio +realtime +run-exes s3tc samba scanner selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi +X +xcomposite xinerama +xml" |
1314 |
-REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
1315 |
- X? ( truetype ) |
1316 |
- elibc_glibc? ( threads ) |
1317 |
- osmesa? ( opengl ) |
1318 |
- pipelight? ( staging ) |
1319 |
- s3tc? ( staging ) |
1320 |
- test? ( abi_x86_32 ) |
1321 |
- themes? ( staging ) |
1322 |
- vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124 |
1323 |
- |
1324 |
-# FIXME: the test suite is unsuitable for us; many tests require net access |
1325 |
-# or fail due to Xvfb's opengl limitations. |
1326 |
-RESTRICT="test" |
1327 |
- |
1328 |
-COMMON_DEPEND=" |
1329 |
- X? ( |
1330 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
1331 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
1332 |
- x11-libs/libXfixes[${MULTILIB_USEDEP}] |
1333 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
1334 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
1335 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
1336 |
- ) |
1337 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
1338 |
- capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
1339 |
- cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
1340 |
- fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
1341 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
1342 |
- gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
1343 |
- gstreamer? ( |
1344 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
1345 |
- media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
1346 |
- ) |
1347 |
- jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
1348 |
- kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) |
1349 |
- lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
1350 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
1351 |
- mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
1352 |
- ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
1353 |
- netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
1354 |
- nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
1355 |
- odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
1356 |
- openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
1357 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
1358 |
- opengl? ( |
1359 |
- virtual/glu[${MULTILIB_USEDEP}] |
1360 |
- virtual/opengl[${MULTILIB_USEDEP}] |
1361 |
- ) |
1362 |
- osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
1363 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
1364 |
- png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
1365 |
- pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
1366 |
- scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
1367 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
1368 |
- staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
1369 |
- themes? ( |
1370 |
- dev-libs/glib:2[${MULTILIB_USEDEP}] |
1371 |
- x11-libs/cairo[${MULTILIB_USEDEP}] |
1372 |
- x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
1373 |
- ) |
1374 |
- truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
1375 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
1376 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
1377 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
1378 |
- vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
1379 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
1380 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
1381 |
- xml? ( |
1382 |
- dev-libs/libxml2[${MULTILIB_USEDEP}] |
1383 |
- dev-libs/libxslt[${MULTILIB_USEDEP}] |
1384 |
- )" |
1385 |
- |
1386 |
-RDEPEND="${COMMON_DEPEND} |
1387 |
- app-emulation/wine-desktop-common |
1388 |
- >app-eselect/eselect-wine-0.3 |
1389 |
- !app-emulation/wine:0 |
1390 |
- dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
1391 |
- gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
1392 |
- mono? ( app-emulation/wine-mono:4.7.1 ) |
1393 |
- perl? ( |
1394 |
- dev-lang/perl |
1395 |
- dev-perl/XML-Simple |
1396 |
- ) |
1397 |
- pulseaudio? ( |
1398 |
- realtime? ( sys-auth/rtkit ) |
1399 |
- ) |
1400 |
- s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] ) |
1401 |
- samba? ( >=net-fs/samba-3.0.25[winbind] ) |
1402 |
- selinux? ( sec-policy/selinux-wine ) |
1403 |
- udisks? ( sys-fs/udisks:2 )" |
1404 |
- |
1405 |
-# tools/make_requests requires perl |
1406 |
-DEPEND="${COMMON_DEPEND} |
1407 |
- sys-devel/flex |
1408 |
- >=sys-kernel/linux-headers-2.6 |
1409 |
- virtual/pkgconfig |
1410 |
- virtual/yacc |
1411 |
- X? ( x11-base/xorg-proto ) |
1412 |
- prelink? ( sys-devel/prelink ) |
1413 |
- staging? ( |
1414 |
- dev-lang/perl |
1415 |
- dev-perl/XML-Simple |
1416 |
- ) |
1417 |
- xinerama? ( x11-base/xorg-proto )" |
1418 |
- |
1419 |
-# These use a non-standard "Wine" category, which is provided by |
1420 |
-# /etc/xdg/applications-merged/wine.menu |
1421 |
-QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
1422 |
-usr/share/applications/wine-notepad.desktop |
1423 |
-usr/share/applications/wine-uninstaller.desktop |
1424 |
-usr/share/applications/wine-winecfg.desktop" |
1425 |
- |
1426 |
-PATCHES=( |
1427 |
- "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
1428 |
- "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
1429 |
- "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
1430 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
1431 |
- "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864 |
1432 |
-) |
1433 |
-PATCHES_BIN=() |
1434 |
- |
1435 |
-# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
1436 |
-if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
1437 |
- DEPEND+=" dev-util/patchbin" |
1438 |
-fi |
1439 |
- |
1440 |
-wine_compiler_check() { |
1441 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1442 |
- |
1443 |
- # GCC-specific bugs |
1444 |
- if tc-is-gcc; then |
1445 |
- # bug #549768 |
1446 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
1447 |
- ebegin "Checking for gcc-5 ms_abi compiler bug" |
1448 |
- $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
1449 |
- # Run in subshell to prevent "Aborted" message |
1450 |
- ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
1451 |
- if ! eend $?; then |
1452 |
- eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
1453 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
1454 |
- eerror "or use gcc-config to select a different compiler version." |
1455 |
- eerror "See https://bugs.gentoo.org/549768" |
1456 |
- eerror |
1457 |
- return 1 |
1458 |
- fi |
1459 |
- fi |
1460 |
- # bug #574044 |
1461 |
- if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
1462 |
- ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
1463 |
- # Compile in subshell to prevent "Aborted" message |
1464 |
- ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
1465 |
- if ! eend $?; then |
1466 |
- eerror "Wine cannot be built with this version of gcc-5.3" |
1467 |
- eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
1468 |
- eerror "or use gcc-config to select a different compiler version." |
1469 |
- eerror "See https://bugs.gentoo.org/574044" |
1470 |
- eerror |
1471 |
- return 1 |
1472 |
- fi |
1473 |
- fi |
1474 |
- fi |
1475 |
- |
1476 |
- # Ensure compiler support |
1477 |
- if use abi_x86_64; then |
1478 |
- ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
1479 |
- # Compile in subshell to prevent "Aborted" message |
1480 |
- ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
1481 |
- if ! eend $?; then |
1482 |
- eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
1483 |
- eerror |
1484 |
- eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
1485 |
- eerror |
1486 |
- return 1 |
1487 |
- fi |
1488 |
- fi |
1489 |
-} |
1490 |
- |
1491 |
-wine_build_environment_check() { |
1492 |
- [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
1493 |
- |
1494 |
- if use abi_x86_64; then |
1495 |
- if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
1496 |
- eerror "You need gcc-4.4+ to compile 64-bit wine" |
1497 |
- die |
1498 |
- elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
1499 |
- eerror "You need clang-3.8+ to compile 64-bit wine" |
1500 |
- die |
1501 |
- fi |
1502 |
- fi |
1503 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
1504 |
- ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
1505 |
- ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
1506 |
- ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
1507 |
- fi |
1508 |
- if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
1509 |
- if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
1510 |
- ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
1511 |
- ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
1512 |
- ewarn "See package.env in man 5 portage for more information on how to do this." |
1513 |
- ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
1514 |
- fi |
1515 |
- fi |
1516 |
- |
1517 |
- if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
1518 |
- eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
1519 |
- eerror "See https://bugs.gentoo.org/487864 for more details." |
1520 |
- eerror |
1521 |
- return 1 |
1522 |
- fi |
1523 |
-} |
1524 |
- |
1525 |
-wine_env_vcs_vars() { |
1526 |
- local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
1527 |
- local pn_live_val="${pn_live_var}" |
1528 |
- eval pn_live_val='$'${pn_live_val} |
1529 |
- if [[ ! -z ${pn_live_val} ]]; then |
1530 |
- if use staging; then |
1531 |
- eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
1532 |
- eerror "cannot be used to set the commit. Instead, you may use the" |
1533 |
- eerror "environmental variables WINE_COMMIT, and STAGING_COMMIT." |
1534 |
- eerror |
1535 |
- return 1 |
1536 |
- fi |
1537 |
- fi |
1538 |
- if [[ ! -z ${EGIT_COMMIT} ]]; then |
1539 |
- eerror "Commits must now be specified using the environmental variables" |
1540 |
- eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT" |
1541 |
- eerror |
1542 |
- return 1 |
1543 |
- fi |
1544 |
-} |
1545 |
- |
1546 |
-pkg_pretend() { |
1547 |
- wine_build_environment_check || die |
1548 |
- |
1549 |
- # Verify OSS support |
1550 |
- if use oss && ! use kernel_FreeBSD; then |
1551 |
- if ! has_version ">=media-sound/oss-4"; then |
1552 |
- eerror "You cannot build wine with USE=oss without having support from a" |
1553 |
- eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
1554 |
- eerror |
1555 |
- die |
1556 |
- fi |
1557 |
- fi |
1558 |
-} |
1559 |
- |
1560 |
-pkg_setup() { |
1561 |
- wine_build_environment_check || die |
1562 |
- wine_env_vcs_vars || die |
1563 |
- |
1564 |
- WINE_VARIANT="${PN#wine}-${PV}" |
1565 |
- WINE_VARIANT="${WINE_VARIANT#-}" |
1566 |
- |
1567 |
- MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
1568 |
- MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
1569 |
- MY_DATADIR="${MY_DATAROOTDIR}" |
1570 |
- MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
1571 |
- MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
1572 |
- MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
1573 |
- MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
1574 |
- MY_MANDIR="${MY_DATADIR}/man" |
1575 |
-} |
1576 |
- |
1577 |
-src_unpack() { |
1578 |
- if [[ ${PV} == "9999" ]] ; then |
1579 |
- EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
1580 |
- if use staging; then |
1581 |
- local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
1582 |
- |
1583 |
- git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}" |
1584 |
- git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}" |
1585 |
- |
1586 |
- local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
1587 |
- |
1588 |
- if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
1589 |
- einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
1590 |
- einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
1591 |
- einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine" |
1592 |
- fi |
1593 |
- fi |
1594 |
- fi |
1595 |
- |
1596 |
- default |
1597 |
- |
1598 |
- l10n_find_plocales_changes "${S}/po" "" ".po" |
1599 |
-} |
1600 |
- |
1601 |
-src_prepare() { |
1602 |
- |
1603 |
- eapply_bin(){ |
1604 |
- local patch |
1605 |
- for patch in ${PATCHES_BIN[@]}; do |
1606 |
- patchbin --nogit < "${patch}" || die |
1607 |
- done |
1608 |
- } |
1609 |
- |
1610 |
- local md5="$(md5sum server/protocol.def)" |
1611 |
- |
1612 |
- if use staging; then |
1613 |
- ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
1614 |
- ewarn "Wine bugzilla should explicitly state that staging was used." |
1615 |
- |
1616 |
- local STAGING_EXCLUDE="" |
1617 |
- STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132 |
1618 |
- use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
1619 |
- |
1620 |
- # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
1621 |
- ebegin "Running Wine-Staging patch installer" |
1622 |
- ( |
1623 |
- set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
1624 |
- cd "${STAGING_DIR}/patches" |
1625 |
- source "${STAGING_DIR}/patches/patchinstall.sh" |
1626 |
- ) |
1627 |
- eend $? || die "Failed to apply Wine-Staging patches" |
1628 |
- fi |
1629 |
- |
1630 |
- default |
1631 |
- eapply_bin |
1632 |
- eautoreconf |
1633 |
- |
1634 |
- # Modification of the server protocol requires regenerating the server requests |
1635 |
- if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
1636 |
- einfo "server/protocol.def was patched; running tools/make_requests" |
1637 |
- tools/make_requests || die #432348 |
1638 |
- fi |
1639 |
- sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
1640 |
- if ! use run-exes; then |
1641 |
- sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
1642 |
- fi |
1643 |
- |
1644 |
- # Edit wine.desktop to work for specific variant |
1645 |
- sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
1646 |
- |
1647 |
- # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
1648 |
- cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
1649 |
- |
1650 |
- l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
1651 |
- |
1652 |
- # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
1653 |
- # Requires wine-2.0-rearrange-manpages.patch |
1654 |
- |
1655 |
- # Duplicate manpages input files for wine64 |
1656 |
- local f |
1657 |
- for f in loader/*.man.in; do |
1658 |
- cp ${f} ${f/wine/wine64} || die |
1659 |
- done |
1660 |
- # Add wine64 manpages to Makefile |
1661 |
- if use abi_x86_64; then |
1662 |
- sed -i "/wine.man.in/i \ |
1663 |
- \\\twine64.man.in \\\\" loader/Makefile.in || die |
1664 |
- sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
1665 |
-\164\2/' loader/Makefile.in || die |
1666 |
- fi |
1667 |
- |
1668 |
- rm_man_file(){ |
1669 |
- local file="${1}" |
1670 |
- loc=${2} |
1671 |
- sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
1672 |
- } |
1673 |
- |
1674 |
- while read f; do |
1675 |
- l10n_for_each_disabled_locale_do rm_man_file "${f}" |
1676 |
- done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
1677 |
-} |
1678 |
- |
1679 |
-src_configure() { |
1680 |
- wine_compiler_check || die |
1681 |
- |
1682 |
- export LDCONFIG=/bin/true |
1683 |
- use custom-cflags || strip-flags |
1684 |
- |
1685 |
- multilib-minimal_src_configure |
1686 |
-} |
1687 |
- |
1688 |
-multilib_src_configure() { |
1689 |
- local myconf=( |
1690 |
- --prefix="${MY_PREFIX}" |
1691 |
- --datarootdir="${MY_DATAROOTDIR}" |
1692 |
- --datadir="${MY_DATADIR}" |
1693 |
- --docdir="${MY_DOCDIR}" |
1694 |
- --includedir="${MY_INCLUDEDIR}" |
1695 |
- --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
1696 |
- --libexecdir="${MY_LIBEXECDIR}" |
1697 |
- --localstatedir="${MY_LOCALSTATEDIR}" |
1698 |
- --mandir="${MY_MANDIR}" |
1699 |
- --sysconfdir=/etc/wine |
1700 |
- $(use_with alsa) |
1701 |
- $(use_with capi) |
1702 |
- $(use_with lcms cms) |
1703 |
- $(use_with cups) |
1704 |
- $(use_with ncurses curses) |
1705 |
- $(use_with udisks dbus) |
1706 |
- $(use_with fontconfig) |
1707 |
- $(use_with ssl gnutls) |
1708 |
- $(use_enable gecko mshtml) |
1709 |
- $(use_with gphoto2 gphoto) |
1710 |
- $(use_with gsm) |
1711 |
- $(use_with gstreamer) |
1712 |
- --without-hal |
1713 |
- $(use_with jpeg) |
1714 |
- $(use_with kerberos krb5) |
1715 |
- $(use_with ldap) |
1716 |
- $(use_enable mono mscoree) |
1717 |
- $(use_with mp3 mpg123) |
1718 |
- $(use_with netapi) |
1719 |
- $(use_with nls gettext) |
1720 |
- $(use_with openal) |
1721 |
- $(use_with opencl) |
1722 |
- $(use_with opengl) |
1723 |
- $(use_with osmesa) |
1724 |
- $(use_with oss) |
1725 |
- $(use_with pcap) |
1726 |
- $(use_with png) |
1727 |
- $(use_with pulseaudio pulse) |
1728 |
- $(use_with threads pthread) |
1729 |
- $(use_with scanner sane) |
1730 |
- $(use_enable test tests) |
1731 |
- $(use_with truetype freetype) |
1732 |
- $(use_with udev) |
1733 |
- $(use_with v4l) |
1734 |
- $(use_with X x) |
1735 |
- $(use_with X xfixes) |
1736 |
- $(use_with xcomposite) |
1737 |
- $(use_with xinerama) |
1738 |
- $(use_with xml) |
1739 |
- $(use_with xml xslt) |
1740 |
- ) |
1741 |
- |
1742 |
- use staging && myconf+=( |
1743 |
- --with-xattr |
1744 |
- $(use_with themes gtk3) |
1745 |
- $(use_with vaapi va) |
1746 |
- ) |
1747 |
- |
1748 |
- local PKG_CONFIG AR RANLIB |
1749 |
- # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
1750 |
- # set AR and RANLIB to make QA scripts happy; #483342 |
1751 |
- tc-export PKG_CONFIG AR RANLIB |
1752 |
- |
1753 |
- if use amd64; then |
1754 |
- if [[ ${ABI} == amd64 ]]; then |
1755 |
- myconf+=( --enable-win64 ) |
1756 |
- else |
1757 |
- myconf+=( --disable-win64 ) |
1758 |
- fi |
1759 |
- |
1760 |
- # Note: using --with-wine64 results in problems with multilib.eclass |
1761 |
- # CC/LD hackery. We're using separate tools instead. |
1762 |
- fi |
1763 |
- |
1764 |
- ECONF_SOURCE=${S} \ |
1765 |
- econf "${myconf[@]}" |
1766 |
- emake depend |
1767 |
-} |
1768 |
- |
1769 |
-multilib_src_test() { |
1770 |
- # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
1771 |
- if [[ ${ABI} == x86 ]]; then |
1772 |
- if [[ $(id -u) == 0 ]]; then |
1773 |
- ewarn "Skipping tests since they cannot be run under the root user." |
1774 |
- ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
1775 |
- return |
1776 |
- fi |
1777 |
- |
1778 |
- WINEPREFIX="${T}/.wine-${ABI}" \ |
1779 |
- Xemake test |
1780 |
- fi |
1781 |
-} |
1782 |
- |
1783 |
-multilib_src_install_all() { |
1784 |
- local DOCS=( ANNOUNCE AUTHORS README ) |
1785 |
- add_locale_docs() { |
1786 |
- local locale_doc="documentation/README.$1" |
1787 |
- [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
1788 |
- } |
1789 |
- l10n_for_each_locale_do add_locale_docs |
1790 |
- |
1791 |
- einstalldocs |
1792 |
- prune_libtool_files --all |
1793 |
- |
1794 |
- if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
1795 |
- rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
1796 |
- "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
1797 |
- fi |
1798 |
- |
1799 |
- # Remove wineconsole if neither backend is installed #551124 |
1800 |
- if ! use X && ! use ncurses; then |
1801 |
- rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
1802 |
- rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
1803 |
- rm_wineconsole() { |
1804 |
- rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
1805 |
- } |
1806 |
- multilib_foreach_abi rm_wineconsole |
1807 |
- fi |
1808 |
- |
1809 |
- use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
1810 |
- use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
1811 |
- |
1812 |
- if use abi_x86_64 && ! use abi_x86_32; then |
1813 |
- dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
1814 |
- dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
1815 |
- fi |
1816 |
- |
1817 |
- # Failglob for binloops, shouldn't be necessary, but including to stay safe |
1818 |
- eshopts_push -s failglob #615218 |
1819 |
- # Make wrappers for binaries for handling multiple variants |
1820 |
- # Note: wrappers instead of symlinks because some are shell which use basename |
1821 |
- local b |
1822 |
- for b in "${D%/}${MY_PREFIX}"/bin/*; do |
1823 |
- make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
1824 |
- done |
1825 |
- eshopts_pop |
1826 |
-} |
1827 |
- |
1828 |
-pkg_postinst() { |
1829 |
- eselect wine register ${P} |
1830 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
1831 |
- eselect wine register --vanilla ${P} || die |
1832 |
- else |
1833 |
- if use staging; then |
1834 |
- eselect wine register --staging ${P} || die |
1835 |
- fi |
1836 |
- fi |
1837 |
- |
1838 |
- eselect wine update --all --if-unset || die |
1839 |
- |
1840 |
- xdg_desktop_database_update |
1841 |
- |
1842 |
- if ! use gecko; then |
1843 |
- ewarn "Without Wine Gecko, wine prefixes will not have a default" |
1844 |
- ewarn "implementation of iexplore. Many older windows applications" |
1845 |
- ewarn "rely upon the existence of an iexplore implementation, so" |
1846 |
- ewarn "you will likely need to install an external one, like via winetricks" |
1847 |
- fi |
1848 |
- if ! use mono; then |
1849 |
- ewarn "Without Wine Mono, wine prefixes will not have a default" |
1850 |
- ewarn "implementation of .NET. Many windows applications rely upon" |
1851 |
- ewarn "the existence of a .NET implementation, so you will likely need" |
1852 |
- ewarn "to install an external one, like via winetricks" |
1853 |
- fi |
1854 |
-} |
1855 |
- |
1856 |
-pkg_prerm() { |
1857 |
- eselect wine deregister ${P} |
1858 |
- if [[ ${PN} == "wine-vanilla" ]]; then |
1859 |
- eselect wine deregister --vanilla ${P} || die |
1860 |
- else |
1861 |
- if use staging; then |
1862 |
- eselect wine deregister --staging ${P} || die |
1863 |
- fi |
1864 |
- fi |
1865 |
- |
1866 |
- eselect wine update --all --if-unset || die |
1867 |
-} |
1868 |
- |
1869 |
-pkg_postrm() { |
1870 |
- xdg_desktop_database_update |
1871 |
-} |