Gentoo Archives: gentoo-commits

From: Nick Sarnie <sarnex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-staging/
Date: Sun, 01 Mar 2020 03:26:18
Message-Id: 1583033150.b950fd56acfd32095c5c24013181b63fd56036ce.sarnex@gentoo
1 commit: b950fd56acfd32095c5c24013181b63fd56036ce
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 1 03:25:50 2020 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 1 03:25:50 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b950fd56
7
8 app-emulation/wine-staging: Drop old
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>
12
13 app-emulation/wine-staging/Manifest | 4 -
14 .../wine-staging/wine-staging-4.19.ebuild | 615 ---------------------
15 .../wine-staging/wine-staging-4.20.ebuild | 615 ---------------------
16 3 files changed, 1234 deletions(-)
17
18 diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest
19 index 3157cb5a31f..6873490cd07 100644
20 --- a/app-emulation/wine-staging/Manifest
21 +++ b/app-emulation/wine-staging/Manifest
22 @@ -1,14 +1,10 @@
23 DIST gentoo-wine-patches-20190511.tar.xz 58996 BLAKE2B 571c30d94341f567261893f884345b39eab42adc8b5c306a30d03943fd770055e070ae01e41e5add5b873063d3aaa69641faf81b16ac6039970d8a22b177dd7e SHA512 ccd74d0d6acecc7b24dc89466f93099bd6991d607a4fe89d68637d1fa82e02ebd76b532fe1afd8ab8de8ef3f2d49fe8d71f797796a9434f4b0f7a8183c084969
24 DIST gentoo-wine-patches-20191222.tar.xz 59236 BLAKE2B 1b2c7b3ab69e5603d0f176a88c13b6d532f94f319ad29821faa699e828d90cfbe92c02b6e73b72eb16e565707c49885833fe557809ed16f4a6f0f182de9bb6e6 SHA512 a030fad55be5e1d909bc50e430c9a99846b88d7555f12749e101ba83f04df5af23eeb726b5ed78f847a66d11ac0a838bc69bd5bf8cf53da77ad454d2a2fe65cf
25 -DIST wine-4.19.tar.xz 22283616 BLAKE2B 0d648d931737bc381bca3ad0fa2bfcc089c8324c47c80bdaa85aaddb5a63f5145ef5cc442da299591edbd1723ff1dd49fbf629363ec5e4c6152b7016aed612f3 SHA512 a86bd7ccfb1878445ea946e4ca72769c10b4d966bcc893536a8c3eaa29484ba687dc3a44755ec92a2ad6073e736985b814c0c682bf4f90b5ffe2bca0ebbf4b25
26 -DIST wine-4.20.tar.xz 22314856 BLAKE2B c3734029583bf17929a92475f4ad3ac97df632d967b9f7fc2d9f076a7f8492ec144b41227812271703ee665a6a17e9b1e3eed6697d5f7394824d3783fcd8de5a SHA512 c01af88106b8a808fbceb6ace45882c300656a47913142ba7052283b358d6d5b4379895804e15a2ca1870a4e955ea3ca857ec042a8070ea4ffaefa0c7a84e701
27 DIST wine-4.21.tar.xz 22395844 BLAKE2B 1b9c1fd8f4a1ff0527b4d4a02b1dfffa4f6887f2f261b7d4b5afa12e65a8ea18f544c91397cfc71039db7736d33cd0219aaab82cc4564ecd0cb9c74a2e39d6e5 SHA512 f962e47577db2de4e74022b8d51e81e30a004f98b37d8eee5889334271f013123e3ff53e5ac1416c2dd93ec90bee8a2d300b3842c20124df99ef067ac5c72f53
28 DIST wine-5.0.tar.xz 22469428 BLAKE2B d26938e707545d31ed932c67eaaa9fd137e42daa6facadeaea2897797ec816658edc1b89c649e0cb5c453ca53ebea5d7156fdd188f1afe2a55ca7834e012e276 SHA512 681de951804c3dd3ae8c677a0ea52d172b04cac58594698b191cd972b25899cd2030d01a25fc2ad2eb6b99976a30319d2bd5ba8b7ff98b1a8b43832fa6514b83
29 DIST wine-5.1.tar.xz 22500180 BLAKE2B bf77f24e4be2402afd083c28624e41761d63c1248c314870e0c5a6879fb1393992fe9d99bcafcea0a91599500d745a3ad199e31e857590707f026f1cf740ad31 SHA512 b842b533884f15a8fb71373258671d74aee997d9ed9ee0fb36f945cd2006b494f6cc6c91a8ca47e0ea5b0b39b108f2c4f155918823a7ddf3cd44b4e26ede9171
30 DIST wine-5.2.tar.xz 22837712 BLAKE2B ee9d4d4dd6c0669d1585cc6988d933dbc7aa5277a0f13e965dd9eecb621e475d33a832b316e37f1372a965efe517efafa9f857a38d9bf081026d221db96b7a0d SHA512 57fa66885c3b5f43e51324e24b8524f663ad67ff15b464ac7d58096d5921f523a59ef5f1dc1ea7aa65fa10d64b7cd832f421c1b773c72bc312d8544a61c33f8f
31 DIST wine-5.3.tar.xz 22918612 BLAKE2B dce58aec45f665e1014635eadc9cc00c969e46c87de5d41bc51168237d9fc01011dcfc3fa4c83ed4cbcdfe19a3747e5e32f87946434a6eba2a8547f1929b33f3 SHA512 40528f46ad10c11758308e3bf21ba73c7af133d4dda386d542acec3a5cb31e01be0eb102b94f9d82a2358e45597bf49bd1e82c463e3a26aff8c0827b5a0894b6
32 -DIST wine-staging-4.19.tar.gz 9908545 BLAKE2B 36674228de808ac9d1f3f66e9274fd9de68173a6a1acca405eb08836a8a787e4e78465442ef6769c02f8fd2e20c3f059d59a1408ed3a8add8a91a68efd07b7bc SHA512 a47ae16dd39797b54011f942fe7e722897af7ddc0bed2bf2e39c46aecf60a02769f7287609c63b4c0c3f1c8e40172e0cdf3bdb53562a07d7a2b7ac53e570dbdc
33 -DIST wine-staging-4.20.tar.gz 9899451 BLAKE2B a90a71f8f68874822c7326eb13cd26e66dfce8afc6d8fc60f1cf86a20c1a8074178bbc618b540a4bac5168fb0242a0fe46c9167bab3e587462d78b706eaad15c SHA512 2ce4f6fa83fc275c83bc7f7bbd4b1a4ca65f7e55e16af40958635b8b2efc2b174baa79ed576ed09c4c13b572756fb6262f19281e5b72797c7e0f1f6c4dd1a4ee
34 DIST wine-staging-4.21.tar.gz 9904765 BLAKE2B 43f15cd96c7f5ca9cf5aad120c73a3aa534dce33797a4a4e707bea668cfc93e077ad112055dc428263775a30c6447620eed8650a9828ac487bf36c6490a7b73d SHA512 0c6c32f86d252f827ebb8d5df2b046c4f0a49aa7c0ca47939b33844786e561d5f676db1e199ec3cd9969757985f66b865099061f5e77234c3aabd4fd29d3a063
35 DIST wine-staging-5.0.tar.gz 9942644 BLAKE2B e5d040ae903c6e982c961db1c7c30cfbf7245f00cd0df7c10ceb182c5227f5a555f1a41b24eca982a12b4981edee937cfa5079e6c6fec378d475fca3057cbb7c SHA512 36849fc2c848db9949982619c4544b56468012a1f086cc92eb3e2027377c58c3c24daf508149e0e34a70e6b283edfd80833dc2f346c75f0be69f1fb2c5999cd6
36 DIST wine-staging-5.1.tar.gz 9924758 BLAKE2B 44a5710c126a1ea0a21dbac21826d2513191d79cb96f4a22adc5e6823d28b214d81af8f536914d4434402b5e2b70f89a25e2049cf12cbbde3f31ae2bc3bafab5 SHA512 ebb9bf0a0a3c7f108fff8b32ca79124d1da410fbfb320ad3298f3d92fabeb9ca81de6a4fefac344948a70c49771ffa3f0dc30de2ee6d6f61d158ed87a206a14e
37
38 diff --git a/app-emulation/wine-staging/wine-staging-4.19.ebuild b/app-emulation/wine-staging/wine-staging-4.19.ebuild
39 deleted file mode 100644
40 index bb4fe01b5c3..00000000000
41 --- a/app-emulation/wine-staging/wine-staging-4.19.ebuild
42 +++ /dev/null
43 @@ -1,615 +0,0 @@
44 -# Copyright 1999-2020 Gentoo Authors
45 -# Distributed under the terms of the GNU General Public License v2
46 -
47 -EAPI=6
48 -
49 -PLOCALES="ar ast bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru si sk sl sr_RS@cyrillic sr_RS@latin sv ta te th tr uk wa zh_CN zh_TW"
50 -PLOCALE_BACKUP="en"
51 -
52 -inherit autotools eapi7-ver estack eutils flag-o-matic gnome2-utils l10n ltprune multilib multilib-minimal pax-utils toolchain-funcs virtualx xdg-utils
53 -
54 -MY_PN="${PN%%-*}"
55 -MY_P="${MY_PN}-${PV}"
56 -
57 -if [[ ${PV} == "9999" ]] ; then
58 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
59 - EGIT_BRANCH="master"
60 - inherit git-r3
61 - SRC_URI=""
62 - #KEYWORDS=""
63 -else
64 - MAJOR_V=$(ver_cut 1)
65 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
66 - KEYWORDS="-* ~amd64 ~x86"
67 -fi
68 -S="${WORKDIR}/${MY_P}"
69 -
70 -STAGING_P="wine-staging-${PV}"
71 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
72 -GWP_V="20190511"
73 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
74 -
75 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
76 -HOMEPAGE="https://www.winehq.org/"
77 -SRC_URI="${SRC_URI}
78 - https://dev.gentoo.org/~sarnex/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
79 -"
80 -
81 -if [[ ${PV} == "9999" ]] ; then
82 - STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git"
83 -else
84 - SRC_URI="${SRC_URI}
85 - staging? ( https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
86 -fi
87 -
88 -LICENSE="LGPL-2.1"
89 -SLOT="${PV}"
90 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +faudio +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 pipelight +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi vkd3d vulkan +X +xcomposite xinerama +xml"
91 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
92 - X? ( truetype )
93 - elibc_glibc? ( threads )
94 - osmesa? ( opengl )
95 - pipelight? ( staging )
96 - test? ( abi_x86_32 )
97 - themes? ( staging )
98 - vaapi? ( staging )
99 - vkd3d? ( vulkan )" # osmesa-opengl #286560 # X-truetype #551124
100 -
101 -# FIXME: the test suite is unsuitable for us; many tests require net access
102 -# or fail due to Xvfb's opengl limitations.
103 -RESTRICT="test"
104 -
105 -COMMON_DEPEND="
106 - X? (
107 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
108 - x11-libs/libXext[${MULTILIB_USEDEP}]
109 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
110 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
111 - x11-libs/libXi[${MULTILIB_USEDEP}]
112 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
113 - )
114 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
115 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
116 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
117 - faudio? ( app-emulation/faudio:=[${MULTILIB_USEDEP}] )
118 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
119 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
120 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
121 - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
122 - gstreamer? (
123 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
124 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
125 - )
126 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
127 - kerberos? ( virtual/krb5: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 - sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] )
147 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
148 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
149 - themes? (
150 - dev-libs/glib:2[${MULTILIB_USEDEP}]
151 - x11-libs/cairo[${MULTILIB_USEDEP}]
152 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
153 - )
154 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
155 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
156 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
157 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
158 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
159 - vkd3d? ( app-emulation/vkd3d[${MULTILIB_USEDEP}] )
160 - vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
161 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
162 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
163 - xml? (
164 - dev-libs/libxml2[${MULTILIB_USEDEP}]
165 - dev-libs/libxslt[${MULTILIB_USEDEP}]
166 - )"
167 -
168 -RDEPEND="${COMMON_DEPEND}
169 - app-emulation/wine-desktop-common
170 - >app-eselect/eselect-wine-0.3
171 - !app-emulation/wine:0
172 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
173 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
174 - mono? ( app-emulation/wine-mono:4.9.3 )
175 - perl? (
176 - dev-lang/perl
177 - dev-perl/XML-Simple
178 - )
179 - pulseaudio? (
180 - realtime? ( sys-auth/rtkit )
181 - )
182 - samba? ( >=net-fs/samba-3.0.25[winbind] )
183 - selinux? ( sec-policy/selinux-wine )
184 - udisks? ( sys-fs/udisks:2 )"
185 -
186 -# tools/make_requests requires perl
187 -DEPEND="${COMMON_DEPEND}
188 - sys-devel/flex
189 - >=sys-kernel/linux-headers-2.6
190 - virtual/pkgconfig
191 - virtual/yacc
192 - X? ( x11-base/xorg-proto )
193 - prelink? ( sys-devel/prelink )
194 - staging? (
195 - dev-lang/perl
196 - dev-perl/XML-Simple
197 - )
198 - xinerama? ( x11-base/xorg-proto )"
199 -
200 -# These use a non-standard "Wine" category, which is provided by
201 -# /etc/xdg/applications-merged/wine.menu
202 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
203 -usr/share/applications/wine-notepad.desktop
204 -usr/share/applications/wine-uninstaller.desktop
205 -usr/share/applications/wine-winecfg.desktop"
206 -
207 -PATCHES=(
208 - "${PATCHDIR}/patches/${MY_PN}-4.8-winegcc.patch" #260726
209 - "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615
210 - "${PATCHDIR}/patches/${MY_PN}-4.7-memset-O3.patch" #480508
211 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
212 -)
213 -PATCHES_BIN=()
214 -
215 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
216 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
217 - DEPEND+=" dev-util/patchbin"
218 -fi
219 -
220 -wine_compiler_check() {
221 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
222 -
223 - # GCC-specific bugs
224 - if tc-is-gcc; then
225 - # bug #549768
226 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
227 - ebegin "Checking for gcc-5 ms_abi compiler bug"
228 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
229 - # Run in subshell to prevent "Aborted" message
230 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
231 - if ! eend $?; then
232 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
233 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
234 - eerror "or use gcc-config to select a different compiler version."
235 - eerror "See https://bugs.gentoo.org/549768"
236 - eerror
237 - return 1
238 - fi
239 - fi
240 - # bug #574044
241 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
242 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
243 - # Compile in subshell to prevent "Aborted" message
244 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
245 - if ! eend $?; then
246 - eerror "Wine cannot be built with this version of gcc-5.3"
247 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
248 - eerror "or use gcc-config to select a different compiler version."
249 - eerror "See https://bugs.gentoo.org/574044"
250 - eerror
251 - return 1
252 - fi
253 - fi
254 - fi
255 -
256 - # Ensure compiler support
257 - if use abi_x86_64; then
258 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
259 - # Compile in subshell to prevent "Aborted" message
260 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
261 - if ! eend $?; then
262 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
263 - eerror
264 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
265 - eerror
266 - return 1
267 - fi
268 - fi
269 -}
270 -
271 -wine_build_environment_check() {
272 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
273 -
274 - if use abi_x86_64; then
275 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
276 - eerror "You need gcc-4.4+ to compile 64-bit wine"
277 - die
278 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
279 - eerror "You need clang-3.8+ to compile 64-bit wine"
280 - die
281 - fi
282 - fi
283 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
284 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
285 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
286 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
287 - fi
288 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
289 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
290 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
291 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
292 - ewarn "See package.env in man 5 portage for more information on how to do this."
293 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
294 - fi
295 - fi
296 -
297 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
298 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
299 - eerror "See https://bugs.gentoo.org/487864 for more details."
300 - eerror
301 - return 1
302 - fi
303 -}
304 -
305 -wine_env_vcs_vars() {
306 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
307 - local pn_live_val="${pn_live_var}"
308 - eval pn_live_val='$'${pn_live_val}
309 - if [[ ! -z ${pn_live_val} ]]; then
310 - if use staging; then
311 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
312 - eerror "cannot be used to set the commit. Instead, you may use the"
313 - eerror "environment variables:"
314 - eerror " EGIT_OVERRIDE_COMMIT_WINE"
315 - eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING"
316 - eerror
317 - return 1
318 - fi
319 - fi
320 - if [[ ! -z ${EGIT_COMMIT} ]]; then
321 - eerror "Commits must now be specified using the environment variables:"
322 - eerror " EGIT_OVERRIDE_COMMIT_WINE"
323 - eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING"
324 - eerror
325 - return 1
326 - fi
327 -}
328 -
329 -pkg_pretend() {
330 - wine_build_environment_check || die
331 -
332 - # Verify OSS support
333 - if use oss && ! use kernel_FreeBSD; then
334 - if ! has_version ">=media-sound/oss-4"; then
335 - eerror "You cannot build wine with USE=oss without having support from a"
336 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
337 - eerror
338 - die
339 - fi
340 - fi
341 -}
342 -
343 -pkg_setup() {
344 - wine_build_environment_check || die
345 - wine_env_vcs_vars || die
346 -
347 - WINE_VARIANT="${PN#wine}-${PV}"
348 - WINE_VARIANT="${WINE_VARIANT#-}"
349 -
350 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
351 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
352 - MY_DATADIR="${MY_DATAROOTDIR}"
353 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
354 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
355 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
356 - MY_MANDIR="${MY_DATADIR}/man"
357 -}
358 -
359 -src_unpack() {
360 - if [[ ${PV} == "9999" ]] ; then
361 - EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack
362 - if use staging; then
363 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
364 -
365 - EGIT_CHECKOUT_DIR="${STAGING_DIR}" EGIT_REPO_URI="${STAGING_EGIT_REPO_URI}" git-r3_src_unpack
366 -
367 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
368 -
369 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
370 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
371 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
372 - einfo "Example: EGIT_OVERRIDE_COMMIT_WINE=${COMPAT_WINE_COMMIT} emerge -1 wine"
373 - fi
374 - fi
375 - fi
376 -
377 - default
378 -
379 - l10n_find_plocales_changes "${S}/po" "" ".po"
380 -}
381 -
382 -src_prepare() {
383 -
384 - eapply_bin(){
385 - local patch
386 - for patch in ${PATCHES_BIN[@]}; do
387 - patchbin --nogit < "${patch}" || die
388 - done
389 - }
390 -
391 - local md5="$(md5sum server/protocol.def)"
392 -
393 - if use staging; then
394 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
395 - ewarn "Wine bugzilla should explicitly state that staging was used."
396 -
397 - local STAGING_EXCLUDE=""
398 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
399 -
400 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
401 - ebegin "Running Wine-Staging patch installer"
402 - (
403 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
404 - cd "${STAGING_DIR}/patches"
405 - source "${STAGING_DIR}/patches/patchinstall.sh"
406 - )
407 - eend $? || die "Failed to apply Wine-Staging patches"
408 - fi
409 -
410 - default
411 - eapply_bin
412 - eautoreconf
413 -
414 - # Modification of the server protocol requires regenerating the server requests
415 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
416 - einfo "server/protocol.def was patched; running tools/make_requests"
417 - tools/make_requests || die #432348
418 - fi
419 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
420 - if ! use run-exes; then
421 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
422 - fi
423 -
424 - # Edit wine.desktop to work for specific variant
425 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
426 -
427 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
428 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
429 -
430 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
431 -
432 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
433 -
434 - # Duplicate manpages input files for wine64
435 - local f
436 - for f in loader/*.man.in; do
437 - cp ${f} ${f/wine/wine64} || die
438 - done
439 - # Add wine64 manpages to Makefile
440 - if use abi_x86_64; then
441 - sed -i "/wine.man.in/i \
442 - \\\twine64.man.in \\\\" loader/Makefile.in || die
443 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
444 -\164\2/' loader/Makefile.in || die
445 - fi
446 -
447 - rm_man_file(){
448 - local file="${1}"
449 - loc=${2}
450 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
451 - }
452 -
453 - while read f; do
454 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
455 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
456 -}
457 -
458 -src_configure() {
459 - wine_compiler_check || die
460 -
461 - export LDCONFIG=/bin/true
462 - use custom-cflags || strip-flags
463 -
464 - multilib-minimal_src_configure
465 -}
466 -
467 -multilib_src_configure() {
468 - local myconf=(
469 - --prefix="${MY_PREFIX}"
470 - --datarootdir="${MY_DATAROOTDIR}"
471 - --datadir="${MY_DATADIR}"
472 - --includedir="${MY_INCLUDEDIR}"
473 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
474 - --libexecdir="${MY_LIBEXECDIR}"
475 - --localstatedir="${MY_LOCALSTATEDIR}"
476 - --mandir="${MY_MANDIR}"
477 - --sysconfdir="${EPREFIX}/etc/wine"
478 - $(use_with alsa)
479 - $(use_with capi)
480 - $(use_with lcms cms)
481 - $(use_with cups)
482 - $(use_with ncurses curses)
483 - $(use_with udisks dbus)
484 - $(use_with faudio)
485 - $(use_with fontconfig)
486 - $(use_with ssl gnutls)
487 - $(use_enable gecko mshtml)
488 - $(use_with gphoto2 gphoto)
489 - $(use_with gsm)
490 - $(use_with gssapi)
491 - $(use_with gstreamer)
492 - --without-hal
493 - $(use_with jpeg)
494 - $(use_with kerberos krb5)
495 - $(use_with ldap)
496 - --without-mingw # linux LDFLAGS leak in mingw32: bug #685172
497 - $(use_enable mono mscoree)
498 - $(use_with mp3 mpg123)
499 - $(use_with netapi)
500 - $(use_with nls gettext)
501 - $(use_with openal)
502 - $(use_with opencl)
503 - $(use_with opengl)
504 - $(use_with osmesa)
505 - $(use_with oss)
506 - $(use_with pcap)
507 - $(use_with png)
508 - $(use_with pulseaudio pulse)
509 - $(use_with threads pthread)
510 - $(use_with scanner sane)
511 - $(use_with sdl)
512 - $(use_enable test tests)
513 - $(use_with truetype freetype)
514 - $(use_with udev)
515 - $(use_with v4l v4l2)
516 - $(use_with vkd3d)
517 - $(use_with vulkan)
518 - $(use_with X x)
519 - $(use_with X xfixes)
520 - $(use_with xcomposite)
521 - $(use_with xinerama)
522 - $(use_with xml)
523 - $(use_with xml xslt)
524 - )
525 -
526 - use staging && myconf+=(
527 - --with-xattr
528 - $(use_with themes gtk3)
529 - $(use_with vaapi va)
530 - )
531 -
532 - local PKG_CONFIG AR RANLIB
533 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
534 - # set AR and RANLIB to make QA scripts happy; #483342
535 - tc-export PKG_CONFIG AR RANLIB
536 -
537 - if use amd64; then
538 - if [[ ${ABI} == amd64 ]]; then
539 - myconf+=( --enable-win64 )
540 - else
541 - myconf+=( --disable-win64 )
542 - fi
543 -
544 - # Note: using --with-wine64 results in problems with multilib.eclass
545 - # CC/LD hackery. We're using separate tools instead.
546 - fi
547 -
548 - ECONF_SOURCE=${S} \
549 - econf "${myconf[@]}"
550 - emake depend
551 -}
552 -
553 -multilib_src_test() {
554 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
555 - if [[ ${ABI} == x86 ]]; then
556 - if [[ $(id -u) == 0 ]]; then
557 - ewarn "Skipping tests since they cannot be run under the root user."
558 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
559 - return
560 - fi
561 -
562 - WINEPREFIX="${T}/.wine-${ABI}" \
563 - Xemake test
564 - fi
565 -}
566 -
567 -multilib_src_install_all() {
568 - local DOCS=( ANNOUNCE AUTHORS README )
569 - add_locale_docs() {
570 - local locale_doc="documentation/README.$1"
571 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
572 - }
573 - l10n_for_each_locale_do add_locale_docs
574 -
575 - einstalldocs
576 - prune_libtool_files --all
577 -
578 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
579 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
580 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
581 - fi
582 -
583 - # Remove wineconsole if neither backend is installed #551124
584 - if ! use X && ! use ncurses; then
585 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
586 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
587 - rm_wineconsole() {
588 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
589 - }
590 - multilib_foreach_abi rm_wineconsole
591 - fi
592 -
593 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
594 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
595 -
596 - # Avoid double prefix from dosym and make_wrapper
597 - MY_PREFIX=${MY_PREFIX#${EPREFIX}}
598 -
599 - if use abi_x86_64 && ! use abi_x86_32; then
600 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
601 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
602 - fi
603 -
604 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
605 - eshopts_push -s failglob #615218
606 - # Make wrappers for binaries for handling multiple variants
607 - # Note: wrappers instead of symlinks because some are shell which use basename
608 - local b
609 - for b in "${ED%/}${MY_PREFIX}"/bin/*; do
610 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
611 - done
612 - eshopts_pop
613 -}
614 -
615 -pkg_postinst() {
616 - eselect wine register ${P}
617 - if [[ ${PN} == "wine-vanilla" ]]; then
618 - eselect wine register --vanilla ${P} || die
619 - else
620 - if use staging; then
621 - eselect wine register --staging ${P} || die
622 - fi
623 - fi
624 -
625 - eselect wine update --all --if-unset || die
626 -
627 - xdg_desktop_database_update
628 -
629 - if ! use gecko; then
630 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
631 - ewarn "implementation of iexplore. Many older windows applications"
632 - ewarn "rely upon the existence of an iexplore implementation, so"
633 - ewarn "you will likely need to install an external one, like via winetricks"
634 - fi
635 - if ! use mono; then
636 - ewarn "Without Wine Mono, wine prefixes will not have a default"
637 - ewarn "implementation of .NET. Many windows applications rely upon"
638 - ewarn "the existence of a .NET implementation, so you will likely need"
639 - ewarn "to install an external one, like via winetricks"
640 - fi
641 -}
642 -
643 -pkg_prerm() {
644 - eselect wine deregister ${P}
645 - if [[ ${PN} == "wine-vanilla" ]]; then
646 - eselect wine deregister --vanilla ${P} || die
647 - else
648 - if use staging; then
649 - eselect wine deregister --staging ${P} || die
650 - fi
651 - fi
652 -
653 - eselect wine update --all --if-unset || die
654 -}
655 -
656 -pkg_postrm() {
657 - xdg_desktop_database_update
658 -}
659
660 diff --git a/app-emulation/wine-staging/wine-staging-4.20.ebuild b/app-emulation/wine-staging/wine-staging-4.20.ebuild
661 deleted file mode 100644
662 index 6ba111b452e..00000000000
663 --- a/app-emulation/wine-staging/wine-staging-4.20.ebuild
664 +++ /dev/null
665 @@ -1,615 +0,0 @@
666 -# Copyright 1999-2020 Gentoo Authors
667 -# Distributed under the terms of the GNU General Public License v2
668 -
669 -EAPI=6
670 -
671 -PLOCALES="ar ast bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru si sk sl sr_RS@cyrillic sr_RS@latin sv ta te th tr uk wa zh_CN zh_TW"
672 -PLOCALE_BACKUP="en"
673 -
674 -inherit autotools eapi7-ver estack eutils flag-o-matic gnome2-utils l10n ltprune multilib multilib-minimal pax-utils toolchain-funcs virtualx xdg-utils
675 -
676 -MY_PN="${PN%%-*}"
677 -MY_P="${MY_PN}-${PV}"
678 -
679 -if [[ ${PV} == "9999" ]] ; then
680 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
681 - EGIT_BRANCH="master"
682 - inherit git-r3
683 - SRC_URI=""
684 - #KEYWORDS=""
685 -else
686 - MAJOR_V=$(ver_cut 1)
687 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
688 - KEYWORDS="-* ~amd64 ~x86"
689 -fi
690 -S="${WORKDIR}/${MY_P}"
691 -
692 -STAGING_P="wine-staging-${PV}"
693 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
694 -GWP_V="20190511"
695 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
696 -
697 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
698 -HOMEPAGE="https://www.winehq.org/"
699 -SRC_URI="${SRC_URI}
700 - https://dev.gentoo.org/~sarnex/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
701 -"
702 -
703 -if [[ ${PV} == "9999" ]] ; then
704 - STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git"
705 -else
706 - SRC_URI="${SRC_URI}
707 - staging? ( https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )"
708 -fi
709 -
710 -LICENSE="LGPL-2.1"
711 -SLOT="${PV}"
712 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +faudio +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 pipelight +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test themes +threads +truetype udev +udisks v4l vaapi vkd3d vulkan +X +xcomposite xinerama +xml"
713 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
714 - X? ( truetype )
715 - elibc_glibc? ( threads )
716 - osmesa? ( opengl )
717 - pipelight? ( staging )
718 - test? ( abi_x86_32 )
719 - themes? ( staging )
720 - vaapi? ( staging )
721 - vkd3d? ( vulkan )" # osmesa-opengl #286560 # X-truetype #551124
722 -
723 -# FIXME: the test suite is unsuitable for us; many tests require net access
724 -# or fail due to Xvfb's opengl limitations.
725 -RESTRICT="test"
726 -
727 -COMMON_DEPEND="
728 - X? (
729 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
730 - x11-libs/libXext[${MULTILIB_USEDEP}]
731 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
732 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
733 - x11-libs/libXi[${MULTILIB_USEDEP}]
734 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
735 - )
736 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
737 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
738 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
739 - faudio? ( app-emulation/faudio:=[${MULTILIB_USEDEP}] )
740 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
741 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
742 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
743 - gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
744 - gstreamer? (
745 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
746 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
747 - )
748 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
749 - kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] )
750 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
751 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
752 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
753 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
754 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
755 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
756 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
757 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
758 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
759 - opengl? (
760 - virtual/glu[${MULTILIB_USEDEP}]
761 - virtual/opengl[${MULTILIB_USEDEP}]
762 - )
763 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
764 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
765 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
766 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
767 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
768 - sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] )
769 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
770 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
771 - themes? (
772 - dev-libs/glib:2[${MULTILIB_USEDEP}]
773 - x11-libs/cairo[${MULTILIB_USEDEP}]
774 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
775 - )
776 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
777 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
778 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
779 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
780 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
781 - vkd3d? ( app-emulation/vkd3d[${MULTILIB_USEDEP}] )
782 - vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )
783 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
784 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
785 - xml? (
786 - dev-libs/libxml2[${MULTILIB_USEDEP}]
787 - dev-libs/libxslt[${MULTILIB_USEDEP}]
788 - )"
789 -
790 -RDEPEND="${COMMON_DEPEND}
791 - app-emulation/wine-desktop-common
792 - >app-eselect/eselect-wine-0.3
793 - !app-emulation/wine:0
794 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
795 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
796 - mono? ( app-emulation/wine-mono:4.9.4 )
797 - perl? (
798 - dev-lang/perl
799 - dev-perl/XML-Simple
800 - )
801 - pulseaudio? (
802 - realtime? ( sys-auth/rtkit )
803 - )
804 - samba? ( >=net-fs/samba-3.0.25[winbind] )
805 - selinux? ( sec-policy/selinux-wine )
806 - udisks? ( sys-fs/udisks:2 )"
807 -
808 -# tools/make_requests requires perl
809 -DEPEND="${COMMON_DEPEND}
810 - sys-devel/flex
811 - >=sys-kernel/linux-headers-2.6
812 - virtual/pkgconfig
813 - virtual/yacc
814 - X? ( x11-base/xorg-proto )
815 - prelink? ( sys-devel/prelink )
816 - staging? (
817 - dev-lang/perl
818 - dev-perl/XML-Simple
819 - )
820 - xinerama? ( x11-base/xorg-proto )"
821 -
822 -# These use a non-standard "Wine" category, which is provided by
823 -# /etc/xdg/applications-merged/wine.menu
824 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
825 -usr/share/applications/wine-notepad.desktop
826 -usr/share/applications/wine-uninstaller.desktop
827 -usr/share/applications/wine-winecfg.desktop"
828 -
829 -PATCHES=(
830 - "${PATCHDIR}/patches/${MY_PN}-4.8-winegcc.patch" #260726
831 - "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615
832 - "${PATCHDIR}/patches/${MY_PN}-4.7-memset-O3.patch" #480508
833 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
834 -)
835 -PATCHES_BIN=()
836 -
837 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
838 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
839 - DEPEND+=" dev-util/patchbin"
840 -fi
841 -
842 -wine_compiler_check() {
843 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
844 -
845 - # GCC-specific bugs
846 - if tc-is-gcc; then
847 - # bug #549768
848 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
849 - ebegin "Checking for gcc-5 ms_abi compiler bug"
850 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
851 - # Run in subshell to prevent "Aborted" message
852 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
853 - if ! eend $?; then
854 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
855 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
856 - eerror "or use gcc-config to select a different compiler version."
857 - eerror "See https://bugs.gentoo.org/549768"
858 - eerror
859 - return 1
860 - fi
861 - fi
862 - # bug #574044
863 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
864 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
865 - # Compile in subshell to prevent "Aborted" message
866 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
867 - if ! eend $?; then
868 - eerror "Wine cannot be built with this version of gcc-5.3"
869 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
870 - eerror "or use gcc-config to select a different compiler version."
871 - eerror "See https://bugs.gentoo.org/574044"
872 - eerror
873 - return 1
874 - fi
875 - fi
876 - fi
877 -
878 - # Ensure compiler support
879 - if use abi_x86_64; then
880 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
881 - # Compile in subshell to prevent "Aborted" message
882 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
883 - if ! eend $?; then
884 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
885 - eerror
886 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
887 - eerror
888 - return 1
889 - fi
890 - fi
891 -}
892 -
893 -wine_build_environment_check() {
894 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
895 -
896 - if use abi_x86_64; then
897 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
898 - eerror "You need gcc-4.4+ to compile 64-bit wine"
899 - die
900 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
901 - eerror "You need clang-3.8+ to compile 64-bit wine"
902 - die
903 - fi
904 - fi
905 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
906 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
907 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
908 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
909 - fi
910 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
911 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
912 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
913 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
914 - ewarn "See package.env in man 5 portage for more information on how to do this."
915 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
916 - fi
917 - fi
918 -
919 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
920 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
921 - eerror "See https://bugs.gentoo.org/487864 for more details."
922 - eerror
923 - return 1
924 - fi
925 -}
926 -
927 -wine_env_vcs_vars() {
928 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
929 - local pn_live_val="${pn_live_var}"
930 - eval pn_live_val='$'${pn_live_val}
931 - if [[ ! -z ${pn_live_val} ]]; then
932 - if use staging; then
933 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
934 - eerror "cannot be used to set the commit. Instead, you may use the"
935 - eerror "environment variables:"
936 - eerror " EGIT_OVERRIDE_COMMIT_WINE"
937 - eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING"
938 - eerror
939 - return 1
940 - fi
941 - fi
942 - if [[ ! -z ${EGIT_COMMIT} ]]; then
943 - eerror "Commits must now be specified using the environment variables:"
944 - eerror " EGIT_OVERRIDE_COMMIT_WINE"
945 - eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING"
946 - eerror
947 - return 1
948 - fi
949 -}
950 -
951 -pkg_pretend() {
952 - wine_build_environment_check || die
953 -
954 - # Verify OSS support
955 - if use oss && ! use kernel_FreeBSD; then
956 - if ! has_version ">=media-sound/oss-4"; then
957 - eerror "You cannot build wine with USE=oss without having support from a"
958 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
959 - eerror
960 - die
961 - fi
962 - fi
963 -}
964 -
965 -pkg_setup() {
966 - wine_build_environment_check || die
967 - wine_env_vcs_vars || die
968 -
969 - WINE_VARIANT="${PN#wine}-${PV}"
970 - WINE_VARIANT="${WINE_VARIANT#-}"
971 -
972 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
973 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
974 - MY_DATADIR="${MY_DATAROOTDIR}"
975 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
976 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
977 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
978 - MY_MANDIR="${MY_DATADIR}/man"
979 -}
980 -
981 -src_unpack() {
982 - if [[ ${PV} == "9999" ]] ; then
983 - EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack
984 - if use staging; then
985 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
986 -
987 - EGIT_CHECKOUT_DIR="${STAGING_DIR}" EGIT_REPO_URI="${STAGING_EGIT_REPO_URI}" git-r3_src_unpack
988 -
989 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
990 -
991 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
992 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
993 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
994 - einfo "Example: EGIT_OVERRIDE_COMMIT_WINE=${COMPAT_WINE_COMMIT} emerge -1 wine"
995 - fi
996 - fi
997 - fi
998 -
999 - default
1000 -
1001 - l10n_find_plocales_changes "${S}/po" "" ".po"
1002 -}
1003 -
1004 -src_prepare() {
1005 -
1006 - eapply_bin(){
1007 - local patch
1008 - for patch in ${PATCHES_BIN[@]}; do
1009 - patchbin --nogit < "${patch}" || die
1010 - done
1011 - }
1012 -
1013 - local md5="$(md5sum server/protocol.def)"
1014 -
1015 - if use staging; then
1016 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
1017 - ewarn "Wine bugzilla should explicitly state that staging was used."
1018 -
1019 - local STAGING_EXCLUDE=""
1020 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
1021 -
1022 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
1023 - ebegin "Running Wine-Staging patch installer"
1024 - (
1025 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
1026 - cd "${STAGING_DIR}/patches"
1027 - source "${STAGING_DIR}/patches/patchinstall.sh"
1028 - )
1029 - eend $? || die "Failed to apply Wine-Staging patches"
1030 - fi
1031 -
1032 - default
1033 - eapply_bin
1034 - eautoreconf
1035 -
1036 - # Modification of the server protocol requires regenerating the server requests
1037 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
1038 - einfo "server/protocol.def was patched; running tools/make_requests"
1039 - tools/make_requests || die #432348
1040 - fi
1041 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
1042 - if ! use run-exes; then
1043 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
1044 - fi
1045 -
1046 - # Edit wine.desktop to work for specific variant
1047 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1048 -
1049 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1050 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1051 -
1052 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1053 -
1054 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
1055 -
1056 - # Duplicate manpages input files for wine64
1057 - local f
1058 - for f in loader/*.man.in; do
1059 - cp ${f} ${f/wine/wine64} || die
1060 - done
1061 - # Add wine64 manpages to Makefile
1062 - if use abi_x86_64; then
1063 - sed -i "/wine.man.in/i \
1064 - \\\twine64.man.in \\\\" loader/Makefile.in || die
1065 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
1066 -\164\2/' loader/Makefile.in || die
1067 - fi
1068 -
1069 - rm_man_file(){
1070 - local file="${1}"
1071 - loc=${2}
1072 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
1073 - }
1074 -
1075 - while read f; do
1076 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
1077 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
1078 -}
1079 -
1080 -src_configure() {
1081 - wine_compiler_check || die
1082 -
1083 - export LDCONFIG=/bin/true
1084 - use custom-cflags || strip-flags
1085 -
1086 - multilib-minimal_src_configure
1087 -}
1088 -
1089 -multilib_src_configure() {
1090 - local myconf=(
1091 - --prefix="${MY_PREFIX}"
1092 - --datarootdir="${MY_DATAROOTDIR}"
1093 - --datadir="${MY_DATADIR}"
1094 - --includedir="${MY_INCLUDEDIR}"
1095 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
1096 - --libexecdir="${MY_LIBEXECDIR}"
1097 - --localstatedir="${MY_LOCALSTATEDIR}"
1098 - --mandir="${MY_MANDIR}"
1099 - --sysconfdir="${EPREFIX}/etc/wine"
1100 - $(use_with alsa)
1101 - $(use_with capi)
1102 - $(use_with lcms cms)
1103 - $(use_with cups)
1104 - $(use_with ncurses curses)
1105 - $(use_with udisks dbus)
1106 - $(use_with faudio)
1107 - $(use_with fontconfig)
1108 - $(use_with ssl gnutls)
1109 - $(use_enable gecko mshtml)
1110 - $(use_with gphoto2 gphoto)
1111 - $(use_with gsm)
1112 - $(use_with gssapi)
1113 - $(use_with gstreamer)
1114 - --without-hal
1115 - $(use_with jpeg)
1116 - $(use_with kerberos krb5)
1117 - $(use_with ldap)
1118 - --without-mingw # linux LDFLAGS leak in mingw32: bug #685172
1119 - $(use_enable mono mscoree)
1120 - $(use_with mp3 mpg123)
1121 - $(use_with netapi)
1122 - $(use_with nls gettext)
1123 - $(use_with openal)
1124 - $(use_with opencl)
1125 - $(use_with opengl)
1126 - $(use_with osmesa)
1127 - $(use_with oss)
1128 - $(use_with pcap)
1129 - $(use_with png)
1130 - $(use_with pulseaudio pulse)
1131 - $(use_with threads pthread)
1132 - $(use_with scanner sane)
1133 - $(use_with sdl)
1134 - $(use_enable test tests)
1135 - $(use_with truetype freetype)
1136 - $(use_with udev)
1137 - $(use_with v4l v4l2)
1138 - $(use_with vkd3d)
1139 - $(use_with vulkan)
1140 - $(use_with X x)
1141 - $(use_with X xfixes)
1142 - $(use_with xcomposite)
1143 - $(use_with xinerama)
1144 - $(use_with xml)
1145 - $(use_with xml xslt)
1146 - )
1147 -
1148 - use staging && myconf+=(
1149 - --with-xattr
1150 - $(use_with themes gtk3)
1151 - $(use_with vaapi va)
1152 - )
1153 -
1154 - local PKG_CONFIG AR RANLIB
1155 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
1156 - # set AR and RANLIB to make QA scripts happy; #483342
1157 - tc-export PKG_CONFIG AR RANLIB
1158 -
1159 - if use amd64; then
1160 - if [[ ${ABI} == amd64 ]]; then
1161 - myconf+=( --enable-win64 )
1162 - else
1163 - myconf+=( --disable-win64 )
1164 - fi
1165 -
1166 - # Note: using --with-wine64 results in problems with multilib.eclass
1167 - # CC/LD hackery. We're using separate tools instead.
1168 - fi
1169 -
1170 - ECONF_SOURCE=${S} \
1171 - econf "${myconf[@]}"
1172 - emake depend
1173 -}
1174 -
1175 -multilib_src_test() {
1176 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
1177 - if [[ ${ABI} == x86 ]]; then
1178 - if [[ $(id -u) == 0 ]]; then
1179 - ewarn "Skipping tests since they cannot be run under the root user."
1180 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
1181 - return
1182 - fi
1183 -
1184 - WINEPREFIX="${T}/.wine-${ABI}" \
1185 - Xemake test
1186 - fi
1187 -}
1188 -
1189 -multilib_src_install_all() {
1190 - local DOCS=( ANNOUNCE AUTHORS README )
1191 - add_locale_docs() {
1192 - local locale_doc="documentation/README.$1"
1193 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
1194 - }
1195 - l10n_for_each_locale_do add_locale_docs
1196 -
1197 - einstalldocs
1198 - prune_libtool_files --all
1199 -
1200 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
1201 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
1202 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
1203 - fi
1204 -
1205 - # Remove wineconsole if neither backend is installed #551124
1206 - if ! use X && ! use ncurses; then
1207 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
1208 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
1209 - rm_wineconsole() {
1210 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
1211 - }
1212 - multilib_foreach_abi rm_wineconsole
1213 - fi
1214 -
1215 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
1216 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
1217 -
1218 - # Avoid double prefix from dosym and make_wrapper
1219 - MY_PREFIX=${MY_PREFIX#${EPREFIX}}
1220 -
1221 - if use abi_x86_64 && ! use abi_x86_32; then
1222 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
1223 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
1224 - fi
1225 -
1226 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
1227 - eshopts_push -s failglob #615218
1228 - # Make wrappers for binaries for handling multiple variants
1229 - # Note: wrappers instead of symlinks because some are shell which use basename
1230 - local b
1231 - for b in "${ED%/}${MY_PREFIX}"/bin/*; do
1232 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
1233 - done
1234 - eshopts_pop
1235 -}
1236 -
1237 -pkg_postinst() {
1238 - eselect wine register ${P}
1239 - if [[ ${PN} == "wine-vanilla" ]]; then
1240 - eselect wine register --vanilla ${P} || die
1241 - else
1242 - if use staging; then
1243 - eselect wine register --staging ${P} || die
1244 - fi
1245 - fi
1246 -
1247 - eselect wine update --all --if-unset || die
1248 -
1249 - xdg_desktop_database_update
1250 -
1251 - if ! use gecko; then
1252 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
1253 - ewarn "implementation of iexplore. Many older windows applications"
1254 - ewarn "rely upon the existence of an iexplore implementation, so"
1255 - ewarn "you will likely need to install an external one, like via winetricks"
1256 - fi
1257 - if ! use mono; then
1258 - ewarn "Without Wine Mono, wine prefixes will not have a default"
1259 - ewarn "implementation of .NET. Many windows applications rely upon"
1260 - ewarn "the existence of a .NET implementation, so you will likely need"
1261 - ewarn "to install an external one, like via winetricks"
1262 - fi
1263 -}
1264 -
1265 -pkg_prerm() {
1266 - eselect wine deregister ${P}
1267 - if [[ ${PN} == "wine-vanilla" ]]; then
1268 - eselect wine deregister --vanilla ${P} || die
1269 - else
1270 - if use staging; then
1271 - eselect wine deregister --staging ${P} || die
1272 - fi
1273 - fi
1274 -
1275 - eselect wine update --all --if-unset || die
1276 -}
1277 -
1278 -pkg_postrm() {
1279 - xdg_desktop_database_update
1280 -}