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