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