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