1 |
commit: b3d1e407c3d69a0bac81f2bc69caf71ab53945d1 |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 31 22:37:31 2022 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 31 22:41:35 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3d1e407 |
7 |
|
8 |
app-emulation/wine-staging: add 7.16 |
9 |
|
10 |
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org> |
11 |
|
12 |
app-emulation/wine-staging/Manifest | 2 + |
13 |
.../wine-staging/wine-staging-7.16.ebuild | 543 +++++++++++++++++++++ |
14 |
2 files changed, 545 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest |
17 |
index 15ef745d6127..9b30d5a26427 100644 |
18 |
--- a/app-emulation/wine-staging/Manifest |
19 |
+++ b/app-emulation/wine-staging/Manifest |
20 |
@@ -3,7 +3,9 @@ DIST wine-7.12.tar.xz 28221024 BLAKE2B 551f37360a6dd2c535b5b1a9896cd9c9c091d56c4 |
21 |
DIST wine-7.13.tar.xz 28237664 BLAKE2B f65f6ab2ec159d0a25b44e6bcbc83db2c5ada6b0c39dd0e3fe86db74bb964d0b1bcba85e5300d5140e24c305b7e30a58953e7582df8a2117ce5d8127538f484b SHA512 2eca3aa80afa19dd0cc3cfeb8b58b78d22d2925b8201e0b7278638084a529870c1468ffc300e6a1bb343d0f0c7e28c2b3bb6c59af15dec43b8f6c1eb78b46c1e |
22 |
DIST wine-7.14.tar.xz 28274396 BLAKE2B 632c4c77a5b93597b8b217a04e34a4867d9e34497322cbcdf89d3bd2c98ee2ce27983582e1aa6737ec6bf5e080f64bcb4813f3e5c83b67cebd36895251a07e2f SHA512 6727be4a23b1911b36c44ac8d347be1c98bb53e67101355d6ae829d14a3a0867ba83f77a52f4dbc02a35c3b513291dd4800148a31d28f50069d199fdee04b6e9 |
23 |
DIST wine-7.15.tar.xz 28324772 BLAKE2B 2ae7f693acfa3477c5b925cb6bfc6e2c3094cf56049aae9a310206dce3ef26d32af74ab414f06020dc0e9cf782b8e3cf6b65739ae10b71e783415498b7339618 SHA512 9edf9f6169c26fd829255d323ebdda4fd606f9cf9dfebae2c0823c32a2ca40741e10acba6938e0d49a99dd15276795506887ab582fed296beb0202f77b2db1b4 |
24 |
+DIST wine-7.16.tar.xz 28345428 BLAKE2B 6540dd196639c5b3e01af801439e4ca8d3d17ce6b9832c3ab7d0263909e0a963a5901b8baad00537242c32599af92d04ad58c9f51660583e28693b4ec1bdd803 SHA512 5085c7c1b0e762c508f33775f7f0aa41e94cb75805bb649093addad25f90f7f57d5101ba96227f58a6f18b3ae228bd004df11ec1c033692ad130e9b5279ea19e |
25 |
DIST wine-staging-7.12.tar.gz 9644343 BLAKE2B 760b34abf245b8d2e5baed13db57a841bba73f9dd6652f958428fec3617000cdc00d6f3ac305f4b580cf462938a56ef9a6f0c6931306c25ce82b7fe4da314d9f SHA512 0cf7554011835052b75a836fca89c6cf9b5fa1653c96a82b0dcd3cf40147602eebaf81aa6b94348432371bef9550c8dc21c9cf7d78b49a422bd113e8a6a8e3b0 |
26 |
DIST wine-staging-7.13.tar.gz 9644182 BLAKE2B 1fecdd231e93de44d4327cceef0f72759de331b507ea16cd39749be3195716883a5327804f6379ca563e635fbf317d131d6cf87e4b49f177a45116ee3be55527 SHA512 f0fbd0d96272e457006d0eac350905e2fd27b472943d08771b4cd1cde88afefeb239e46f88979bcb7d45d525610f5d69c74bf8294b101e064ca2051494ab3127 |
27 |
DIST wine-staging-7.14.tar.gz 9644603 BLAKE2B d923321c1562e71c7826e73aec52bd0fb451bb8ff302841f7756428c23b80ea00f815d1a6cc5e3354a83ce87137b2af7ac3389c2c018344cf80afdae50f151b1 SHA512 40ffa7a64780a054bdace9fd5f294a45f7648f6db933ba0a74450b5412df5cc989b7aa442dcba1f185f8d0e5a7740a9508203f1ee323f26fd77867caa9d4fcb3 |
28 |
DIST wine-staging-7.15.tar.gz 9644942 BLAKE2B 1d04730b540785d03cec919ee643cd182c09c3ad022a6b9f5111348ea82a7c3e34e2108141e544855423224db15a5d954623840b3a0d3e3709d0cd23ad1e3236 SHA512 57b6145b3a39a8fb5e98648072e3c1f4f1528fdcfe1f8612f41dc7e0ea4fcc09e4e78d3bbe8fa7a5c14ff0708328306cf0eb8367016f6b2fda9e34f0f1be0621 |
29 |
+DIST wine-staging-7.16.tar.gz 9640421 BLAKE2B 551a282c40de44a03afd7d6ef7edefac29e6ece53bd9eff854076edab400ed58c37f2d89737354c7a9d3ac9af7c576bc0ec68c61159842e9b46ac4d95c0d07ae SHA512 57003888580f3c442b9d9bc1b36c3e967bfe5b5d61b7fcd8d832a463cbea793c4bf6afce35da18ea9cee568237a0a919583e1dc6b3fea7bc09a7a13e9d9260ce |
30 |
|
31 |
diff --git a/app-emulation/wine-staging/wine-staging-7.16.ebuild b/app-emulation/wine-staging/wine-staging-7.16.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..b9684696efbb |
34 |
--- /dev/null |
35 |
+++ b/app-emulation/wine-staging/wine-staging-7.16.ebuild |
36 |
@@ -0,0 +1,543 @@ |
37 |
+# Copyright 1999-2022 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=8 |
41 |
+ |
42 |
+PLOCALES="ar ast 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 si sk sl sr_RS@cyrillic sr_RS@latin sv ta te th tr uk wa zh_CN zh_TW" |
43 |
+PLOCALE_BACKUP="en" |
44 |
+ |
45 |
+inherit autotools estack flag-o-matic multilib-minimal pax-utils plocale toolchain-funcs virtualx wrapper xdg-utils |
46 |
+MY_PN="${PN%%-*}" |
47 |
+MY_PV="${PV/_/-}" |
48 |
+MY_P="${MY_PN}-${MY_PV}" |
49 |
+ |
50 |
+if [[ ${MY_PV} == "9999" ]] ; then |
51 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
52 |
+ EGIT_BRANCH="master" |
53 |
+ inherit git-r3 |
54 |
+ SRC_URI="" |
55 |
+ #KEYWORDS="" |
56 |
+else |
57 |
+ MAJOR_V=$(ver_cut 1) |
58 |
+ MINOR_V=$(ver_cut 2) |
59 |
+ if [[ ${MINOR_V} != "0" ]] ; then |
60 |
+ MINOR_V="x" |
61 |
+ fi |
62 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.${MINOR_V}/${MY_P}.tar.xz" |
63 |
+ KEYWORDS="-* ~amd64 ~x86" |
64 |
+fi |
65 |
+S="${WORKDIR}/${MY_P}" |
66 |
+ |
67 |
+STAGING_P="wine-staging-${MY_PV}" |
68 |
+STAGING_DIR="${WORKDIR}/${STAGING_P}" |
69 |
+GWP_V="20211122" |
70 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
71 |
+ |
72 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" |
73 |
+HOMEPAGE="https://www.winehq.org/" |
74 |
+SRC_URI="${SRC_URI} |
75 |
+ https://dev.gentoo.org/~sarnex/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
76 |
+" |
77 |
+ |
78 |
+if [[ ${MY_PV} == "9999" ]] ; then |
79 |
+ STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" |
80 |
+else |
81 |
+ SRC_URI="${SRC_URI} |
82 |
+ staging? ( https://github.com/wine-staging/wine-staging/archive/v${MY_PV}.tar.gz -> ${STAGING_P}.tar.gz )" |
83 |
+fi |
84 |
+ |
85 |
+LICENSE="LGPL-2.1" |
86 |
+SLOT="${MY_PV}" |
87 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups custom-cflags dos +fontconfig +gecko gphoto2 gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vulkan +X +xcomposite xinerama" |
88 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
89 |
+ X? ( truetype ) |
90 |
+ crossdev-mingw? ( mingw ) |
91 |
+ elibc_glibc? ( threads ) |
92 |
+ osmesa? ( opengl ) |
93 |
+ pipelight? ( staging ) |
94 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
95 |
+ |
96 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
97 |
+# or fail due to Xvfb's opengl limitations. |
98 |
+RESTRICT="test" |
99 |
+ |
100 |
+BDEPEND="sys-devel/flex |
101 |
+ virtual/yacc |
102 |
+ virtual/pkgconfig |
103 |
+ mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) )" |
104 |
+ |
105 |
+COMMON_DEPEND=" |
106 |
+ X? ( |
107 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
108 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
109 |
+ x11-libs/libXfixes[${MULTILIB_USEDEP}] |
110 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
111 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
112 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
113 |
+ ) |
114 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
115 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
116 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
117 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
118 |
+ gphoto2? ( |
119 |
+ media-libs/libgphoto2:=[${MULTILIB_USEDEP}] |
120 |
+ media-libs/libjpeg-turbo:0=[${MULTILIB_USEDEP}] |
121 |
+ ) |
122 |
+ gstreamer? ( |
123 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
124 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
125 |
+ ) |
126 |
+ kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) |
127 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
128 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
129 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
130 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
131 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
132 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
133 |
+ opengl? ( |
134 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
135 |
+ ) |
136 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
137 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
138 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
139 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
140 |
+ sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) |
141 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
142 |
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
143 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
144 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
145 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
146 |
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
147 |
+ usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] ) |
148 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
149 |
+ vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) |
150 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
151 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )" |
152 |
+ |
153 |
+RDEPEND="${COMMON_DEPEND} |
154 |
+ app-emulation/wine-desktop-common |
155 |
+ >app-eselect/eselect-wine-0.3 |
156 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
157 |
+ gecko? ( app-emulation/wine-gecko:2.47.3[abi_x86_32?,abi_x86_64?] ) |
158 |
+ mono? ( app-emulation/wine-mono:7.3.0 ) |
159 |
+ perl? ( |
160 |
+ dev-lang/perl |
161 |
+ dev-perl/XML-Simple |
162 |
+ ) |
163 |
+ pulseaudio? ( |
164 |
+ realtime? ( sys-auth/rtkit ) |
165 |
+ ) |
166 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
167 |
+ selinux? ( sec-policy/selinux-wine ) |
168 |
+ udisks? ( sys-fs/udisks:2 )" |
169 |
+ |
170 |
+# tools/make_requests requires perl |
171 |
+DEPEND="${COMMON_DEPEND} |
172 |
+ ${BDEPEND} |
173 |
+ >=sys-kernel/linux-headers-2.6 |
174 |
+ X? ( x11-base/xorg-proto ) |
175 |
+ staging? ( |
176 |
+ dev-lang/perl |
177 |
+ dev-perl/XML-Simple |
178 |
+ ) |
179 |
+ xinerama? ( x11-base/xorg-proto )" |
180 |
+ |
181 |
+# These use a non-standard "Wine" category, which is provided by |
182 |
+# /etc/xdg/applications-merged/wine.menu |
183 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
184 |
+usr/share/applications/wine-notepad.desktop |
185 |
+usr/share/applications/wine-uninstaller.desktop |
186 |
+usr/share/applications/wine-winecfg.desktop" |
187 |
+ |
188 |
+PATCHES=( |
189 |
+ "${PATCHDIR}/patches/${MY_PN}-6.22-winegcc.patch" #260726 |
190 |
+ "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615 |
191 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
192 |
+) |
193 |
+PATCHES_BIN=() |
194 |
+ |
195 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
196 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${MY_PV} == 9999 ]]; then |
197 |
+ DEPEND+=" dev-util/patchbin" |
198 |
+fi |
199 |
+ |
200 |
+wine_compiler_check() { |
201 |
+ # Ensure compiler support |
202 |
+ # (No checks here as of 2022) |
203 |
+ return 0 |
204 |
+} |
205 |
+ |
206 |
+wine_build_environment_check() { |
207 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
208 |
+ |
209 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
210 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
211 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
212 |
+ eerror |
213 |
+ return 1 |
214 |
+ fi |
215 |
+} |
216 |
+ |
217 |
+wine_env_vcs_vars() { |
218 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
219 |
+ local pn_live_val="${pn_live_var}" |
220 |
+ eval pn_live_val='$'${pn_live_val} |
221 |
+ if [[ ! -z ${pn_live_val} ]]; then |
222 |
+ if use staging; then |
223 |
+ eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
224 |
+ eerror "cannot be used to set the commit. Instead, you may use the" |
225 |
+ eerror "environment variables:" |
226 |
+ eerror " EGIT_OVERRIDE_COMMIT_WINE" |
227 |
+ eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING" |
228 |
+ eerror |
229 |
+ return 1 |
230 |
+ fi |
231 |
+ fi |
232 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
233 |
+ eerror "Commits must now be specified using the environment variables:" |
234 |
+ eerror " EGIT_OVERRIDE_COMMIT_WINE" |
235 |
+ eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING" |
236 |
+ eerror |
237 |
+ return 1 |
238 |
+ fi |
239 |
+} |
240 |
+ |
241 |
+pkg_pretend() { |
242 |
+ if [[ ${MERGE_TYPE} != binary ]] ; then |
243 |
+ wine_build_environment_check || die |
244 |
+ |
245 |
+ # Verify OSS support |
246 |
+ if use oss; then |
247 |
+ if ! has_version ">=media-sound/oss-4"; then |
248 |
+ eerror "You cannot build wine with USE=oss without having support from" |
249 |
+ eerror ">=media-sound/oss-4 (only available through external repos)" |
250 |
+ eerror |
251 |
+ die |
252 |
+ fi |
253 |
+ fi |
254 |
+ |
255 |
+ if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then |
256 |
+ local mingw=-w64-mingw32 |
257 |
+ for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do |
258 |
+ type -P ${mingw}-gcc && continue |
259 |
+ eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" |
260 |
+ eerror "yourself by installing sys-devel/crossdev then running:" |
261 |
+ eerror |
262 |
+ eerror " crossdev --target ${mingw}" |
263 |
+ eerror |
264 |
+ eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" |
265 |
+ die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" |
266 |
+ done |
267 |
+ fi |
268 |
+ fi |
269 |
+} |
270 |
+ |
271 |
+pkg_setup() { |
272 |
+ wine_build_environment_check || die |
273 |
+ wine_env_vcs_vars || die |
274 |
+ |
275 |
+ WINE_VARIANT="${PN#wine}-${MY_PV}" |
276 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
277 |
+ |
278 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
279 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
280 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
281 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
282 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
283 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
284 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
285 |
+ MY_MANDIR="${MY_DATADIR}/man" |
286 |
+} |
287 |
+ |
288 |
+src_unpack() { |
289 |
+ if [[ ${MY_PV} == "9999" ]] ; then |
290 |
+ EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack |
291 |
+ if use staging; then |
292 |
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
293 |
+ |
294 |
+ EGIT_CHECKOUT_DIR="${STAGING_DIR}" EGIT_REPO_URI="${STAGING_EGIT_REPO_URI}" git-r3_src_unpack |
295 |
+ |
296 |
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
297 |
+ |
298 |
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
299 |
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
300 |
+ einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
301 |
+ einfo "Example: EGIT_OVERRIDE_COMMIT_WINE=${COMPAT_WINE_COMMIT} emerge -1 wine" |
302 |
+ fi |
303 |
+ fi |
304 |
+ fi |
305 |
+ |
306 |
+ default |
307 |
+ |
308 |
+ plocale_find_changes "${S}/po" "" ".po" |
309 |
+} |
310 |
+ |
311 |
+src_prepare() { |
312 |
+ |
313 |
+ eapply_bin(){ |
314 |
+ local patch |
315 |
+ for patch in ${PATCHES_BIN[@]}; do |
316 |
+ patchbin --nogit < "${patch}" || die |
317 |
+ done |
318 |
+ } |
319 |
+ |
320 |
+ local md5="$(md5sum server/protocol.def)" |
321 |
+ |
322 |
+ if use staging; then |
323 |
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
324 |
+ ewarn "Wine bugzilla should explicitly state that staging was used." |
325 |
+ |
326 |
+ local STAGING_EXCLUDE="-W winemenubuilder-Desktop_Icon_Path" #652176 |
327 |
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
328 |
+ |
329 |
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
330 |
+ ebegin "Running Wine-Staging patch installer" |
331 |
+ ( |
332 |
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
333 |
+ cd "${STAGING_DIR}/patches" |
334 |
+ source "${STAGING_DIR}/patches/patchinstall.sh" |
335 |
+ ) |
336 |
+ eend $? || die "Failed to apply Wine-Staging patches" |
337 |
+ fi |
338 |
+ |
339 |
+ default |
340 |
+ eapply_bin |
341 |
+ eautoreconf |
342 |
+ |
343 |
+ # Modification of the server protocol requires regenerating the server requests |
344 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
345 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
346 |
+ tools/make_requests || die #432348 |
347 |
+ fi |
348 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
349 |
+ if ! use run-exes; then |
350 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
351 |
+ fi |
352 |
+ |
353 |
+ # Edit wine.desktop to work for specific variant |
354 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
355 |
+ |
356 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
357 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
358 |
+ |
359 |
+ plocale_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
360 |
+ |
361 |
+ # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
362 |
+ |
363 |
+ # Duplicate manpages input files for wine64 |
364 |
+ local f |
365 |
+ for f in loader/*.man.in; do |
366 |
+ cp ${f} ${f/wine/wine64} || die |
367 |
+ done |
368 |
+ # Add wine64 manpages to Makefile |
369 |
+ if use abi_x86_64; then |
370 |
+ sed -i "/wine.man.in/i \ |
371 |
+ \\\twine64.man.in \\\\" loader/Makefile.in || die |
372 |
+ sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
373 |
+\164\2/' loader/Makefile.in || die |
374 |
+ fi |
375 |
+ |
376 |
+ rm_man_file(){ |
377 |
+ local file="${1}" |
378 |
+ loc=${2} |
379 |
+ sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
380 |
+ } |
381 |
+ |
382 |
+ while read f; do |
383 |
+ plocale_for_each_disabled_locale rm_man_file "${f}" |
384 |
+ done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
385 |
+} |
386 |
+ |
387 |
+src_configure() { |
388 |
+ wine_compiler_check || die |
389 |
+ |
390 |
+ export LDCONFIG=/bin/true |
391 |
+ use custom-cflags || strip-flags |
392 |
+ if use mingw; then |
393 |
+ use crossdev-mingw || PATH="${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}" |
394 |
+ |
395 |
+ # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) |
396 |
+ local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} |
397 |
+ : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" |
398 |
+ : "${CROSSLDFLAGS:=$( |
399 |
+ filter-flags '-fuse-ld=*' |
400 |
+ CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" |
401 |
+ export CROSS{C,LD}FLAGS |
402 |
+ fi |
403 |
+ |
404 |
+ multilib-minimal_src_configure |
405 |
+} |
406 |
+ |
407 |
+multilib_src_configure() { |
408 |
+ local myconf=( |
409 |
+ --prefix="${MY_PREFIX}" |
410 |
+ --datarootdir="${MY_DATAROOTDIR}" |
411 |
+ --datadir="${MY_DATADIR}" |
412 |
+ --docdir="${MY_DOCDIR}" |
413 |
+ --includedir="${MY_INCLUDEDIR}" |
414 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
415 |
+ --libexecdir="${MY_LIBEXECDIR}" |
416 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
417 |
+ --mandir="${MY_MANDIR}" |
418 |
+ --sysconfdir="${EPREFIX}/etc/wine" |
419 |
+ $(use_with alsa) |
420 |
+ $(use_with capi) |
421 |
+ $(use_with cups) |
422 |
+ $(use_with udisks dbus) |
423 |
+ $(use_with fontconfig) |
424 |
+ $(use_with ssl gnutls) |
425 |
+ $(use_enable gecko mshtml) |
426 |
+ $(use_with gphoto2 gphoto) |
427 |
+ $(use_with gstreamer) |
428 |
+ --enable-hal |
429 |
+ $(use_with kerberos gssapi) |
430 |
+ $(use_with kerberos krb5) |
431 |
+ $(use_with ldap) |
432 |
+ # TODO: Will bug 685172 still need special handling? |
433 |
+ $(use_with mingw) |
434 |
+ $(use_enable mono mscoree) |
435 |
+ $(use_with netapi) |
436 |
+ $(use_with nls gettext) |
437 |
+ $(use_with openal) |
438 |
+ $(use_with opencl) |
439 |
+ $(use_with opengl) |
440 |
+ $(use_with osmesa) |
441 |
+ $(use_with oss) |
442 |
+ $(use_with pcap) |
443 |
+ $(use_with pulseaudio pulse) |
444 |
+ $(use_with threads pthread) |
445 |
+ $(use_with scanner sane) |
446 |
+ $(use_with sdl) |
447 |
+ $(use_enable test tests) |
448 |
+ $(use_with truetype freetype) |
449 |
+ $(use_with udev) |
450 |
+ $(use_with unwind) |
451 |
+ $(use_with usb) |
452 |
+ $(use_with v4l v4l2) |
453 |
+ $(use_with vulkan) |
454 |
+ $(use_with X x) |
455 |
+ $(use_with X xfixes) |
456 |
+ $(use_with xcomposite) |
457 |
+ $(use_with xinerama) |
458 |
+ ) |
459 |
+ |
460 |
+ use staging && myconf+=( |
461 |
+ --with-xattr |
462 |
+ ) |
463 |
+ |
464 |
+ local PKG_CONFIG |
465 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
466 |
+ tc-export PKG_CONFIG |
467 |
+ |
468 |
+ if use amd64; then |
469 |
+ if [[ ${ABI} == amd64 ]]; then |
470 |
+ myconf+=( --enable-win64 ) |
471 |
+ else |
472 |
+ myconf+=( --disable-win64 ) |
473 |
+ fi |
474 |
+ |
475 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
476 |
+ # CC/LD hackery. We're using separate tools instead. |
477 |
+ fi |
478 |
+ |
479 |
+ ECONF_SOURCE=${S} \ |
480 |
+ econf "${myconf[@]}" |
481 |
+ emake depend |
482 |
+} |
483 |
+ |
484 |
+multilib_src_test() { |
485 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
486 |
+ if [[ ${ABI} == x86 ]]; then |
487 |
+ if [[ $(id -u) == 0 ]]; then |
488 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
489 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
490 |
+ return |
491 |
+ fi |
492 |
+ |
493 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
494 |
+ virtx emake test |
495 |
+ fi |
496 |
+} |
497 |
+ |
498 |
+multilib_src_install_all() { |
499 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
500 |
+ add_locale_docs() { |
501 |
+ local locale_doc="documentation/README.$1" |
502 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
503 |
+ } |
504 |
+ plocale_for_each_locale add_locale_docs |
505 |
+ |
506 |
+ einstalldocs |
507 |
+ find "${ED}" -name *.la -delete || die |
508 |
+ |
509 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
510 |
+ rm "${D%}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
511 |
+ "${D%}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
512 |
+ fi |
513 |
+ |
514 |
+ use abi_x86_32 && pax-mark psmr "${D%}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
515 |
+ use abi_x86_64 && pax-mark psmr "${D%}${MY_PREFIX}"/bin/wine64{,-preloader} |
516 |
+ |
517 |
+ # Avoid double prefix from dosym and make_wrapper |
518 |
+ MY_PREFIX=${MY_PREFIX#${EPREFIX}} |
519 |
+ |
520 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
521 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
522 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
523 |
+ fi |
524 |
+ |
525 |
+ # Failglob for binloops, shouldn't be necessary, but including to stay safe |
526 |
+ eshopts_push -s failglob #615218 |
527 |
+ # Make wrappers for binaries for handling multiple variants |
528 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
529 |
+ local b |
530 |
+ for b in "${ED%}${MY_PREFIX}"/bin/*; do |
531 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
532 |
+ done |
533 |
+ eshopts_pop |
534 |
+} |
535 |
+ |
536 |
+pkg_postinst() { |
537 |
+ eselect wine register ${PN}-${MY_PV} |
538 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
539 |
+ eselect wine register --vanilla ${PN}-${MY_PV} || die |
540 |
+ else |
541 |
+ if use staging; then |
542 |
+ eselect wine register --staging ${PN}-${MY_PV} || die |
543 |
+ fi |
544 |
+ fi |
545 |
+ |
546 |
+ eselect wine update --all --if-unset || die |
547 |
+ |
548 |
+ xdg_desktop_database_update |
549 |
+ |
550 |
+ if ! use gecko; then |
551 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
552 |
+ ewarn "implementation of iexplore. Many older windows applications" |
553 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
554 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
555 |
+ fi |
556 |
+ if ! use mono; then |
557 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
558 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
559 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
560 |
+ ewarn "to install an external one, like via winetricks" |
561 |
+ fi |
562 |
+} |
563 |
+ |
564 |
+pkg_prerm() { |
565 |
+ eselect wine deregister ${PN}-${MY_PV} |
566 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
567 |
+ eselect wine deregister --vanilla ${PN}-${MY_PV} || die |
568 |
+ else |
569 |
+ if use staging; then |
570 |
+ eselect wine deregister --staging ${PN}-${MY_PV}|| die |
571 |
+ fi |
572 |
+ fi |
573 |
+ |
574 |
+ eselect wine update --all --if-unset || die |
575 |
+} |
576 |
+ |
577 |
+pkg_postrm() { |
578 |
+ xdg_desktop_database_update |
579 |
+} |