1 |
commit: dda498c8aa4face18f47e637d1888f681f44ae6a |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 10 04:17:12 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 10 09:47:14 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dda498c8 |
7 |
|
8 |
app-emulation/wine-vanilla: add 7.17 using new ebuild |
9 |
|
10 |
See wine-vanilla-7.0-r3's commit for details |
11 |
|
12 |
Bug: https://bugs.gentoo.org/744829 |
13 |
Bug: https://bugs.gentoo.org/746338 |
14 |
Bug: https://bugs.gentoo.org/753698 |
15 |
Bug: https://bugs.gentoo.org/867097 |
16 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
17 |
|
18 |
app-emulation/wine-vanilla/Manifest | 1 + |
19 |
.../wine-vanilla/wine-vanilla-7.17.ebuild | 316 +++++++++++++++++++++ |
20 |
2 files changed, 317 insertions(+) |
21 |
|
22 |
diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest |
23 |
index a8dc30f99a7e..586238ffeec3 100644 |
24 |
--- a/app-emulation/wine-vanilla/Manifest |
25 |
+++ b/app-emulation/wine-vanilla/Manifest |
26 |
@@ -4,3 +4,4 @@ DIST wine-7.13.tar.xz 28237664 BLAKE2B f65f6ab2ec159d0a25b44e6bcbc83db2c5ada6b0c |
27 |
DIST wine-7.14.tar.xz 28274396 BLAKE2B 632c4c77a5b93597b8b217a04e34a4867d9e34497322cbcdf89d3bd2c98ee2ce27983582e1aa6737ec6bf5e080f64bcb4813f3e5c83b67cebd36895251a07e2f SHA512 6727be4a23b1911b36c44ac8d347be1c98bb53e67101355d6ae829d14a3a0867ba83f77a52f4dbc02a35c3b513291dd4800148a31d28f50069d199fdee04b6e9 |
28 |
DIST wine-7.15.tar.xz 28324772 BLAKE2B 2ae7f693acfa3477c5b925cb6bfc6e2c3094cf56049aae9a310206dce3ef26d32af74ab414f06020dc0e9cf782b8e3cf6b65739ae10b71e783415498b7339618 SHA512 9edf9f6169c26fd829255d323ebdda4fd606f9cf9dfebae2c0823c32a2ca40741e10acba6938e0d49a99dd15276795506887ab582fed296beb0202f77b2db1b4 |
29 |
DIST wine-7.16.tar.xz 28345428 BLAKE2B 6540dd196639c5b3e01af801439e4ca8d3d17ce6b9832c3ab7d0263909e0a963a5901b8baad00537242c32599af92d04ad58c9f51660583e28693b4ec1bdd803 SHA512 5085c7c1b0e762c508f33775f7f0aa41e94cb75805bb649093addad25f90f7f57d5101ba96227f58a6f18b3ae228bd004df11ec1c033692ad130e9b5279ea19e |
30 |
+DIST wine-7.17.tar.xz 28379876 BLAKE2B 536af8f1ac9c4dd8bae2d16cba226c99c45cd64f0a9a2569022baefee61556801d3ee15f480fd18445baecb6c78dd7950f98542dc88a3282ee5d457d0e4ddfb1 SHA512 fd8017e6174db0047a3957db3045b2ad9024e07b1e2f81800521f0b7e7f7660add6a08e09bc60e3d140816cec70aae8324fe15643bd05e541f22f66ffda52508 |
31 |
|
32 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.17.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.17.ebuild |
33 |
new file mode 100644 |
34 |
index 000000000000..a04742503154 |
35 |
--- /dev/null |
36 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-7.17.ebuild |
37 |
@@ -0,0 +1,316 @@ |
38 |
+# Copyright 2022 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=8 |
42 |
+ |
43 |
+MULTILIB_COMPAT=( abi_x86_{32,64} ) |
44 |
+inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper |
45 |
+ |
46 |
+WINE_GECKO=2.47.3 |
47 |
+WINE_MONO=7.3.0 |
48 |
+ |
49 |
+if [[ ${PV} == *9999 ]]; then |
50 |
+ inherit git-r3 |
51 |
+ EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git" |
52 |
+else |
53 |
+ (( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0 |
54 |
+ SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz" |
55 |
+ S="${WORKDIR}/wine-${PV}" |
56 |
+ KEYWORDS="-* ~amd64 ~x86" |
57 |
+fi |
58 |
+ |
59 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
60 |
+HOMEPAGE="https://www.winehq.org/" |
61 |
+ |
62 |
+LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff" |
63 |
+SLOT="${PV}" |
64 |
+IUSE=" |
65 |
+ +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos |
66 |
+ llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2 |
67 |
+ +gstreamer kerberos ldap +mingw +mono netapi nls odbc openal |
68 |
+ opencl +opengl osmesa pcap perl pulseaudio samba scanner +sdl |
69 |
+ selinux +ssl +truetype udev udisks +unwind usb v4l +vulkan |
70 |
+ +xcomposite xinerama" |
71 |
+REQUIRED_USE=" |
72 |
+ X? ( truetype ) |
73 |
+ crossdev-mingw? ( mingw )" # bug #551124 for truetype |
74 |
+ |
75 |
+# tests are non-trivial to run, can hang easily, don't play well with |
76 |
+# sandbox, and several need real opengl/vulkan or network access |
77 |
+RESTRICT="test" |
78 |
+ |
79 |
+# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked |
80 |
+WINE_DLOPEN_DEPEND=" |
81 |
+ X? ( |
82 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
83 |
+ x11-libs/libXfixes[${MULTILIB_USEDEP}] |
84 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
85 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
86 |
+ x11-libs/libXrender[${MULTILIB_USEDEP}] |
87 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
88 |
+ opengl? ( |
89 |
+ media-libs/libglvnd[X,${MULTILIB_USEDEP}] |
90 |
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
91 |
+ ) |
92 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
93 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
94 |
+ ) |
95 |
+ cups? ( net-print/cups[${MULTILIB_USEDEP}] ) |
96 |
+ fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) |
97 |
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
98 |
+ netapi? ( net-fs/samba[${MULTILIB_USEDEP}] ) |
99 |
+ odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] ) |
100 |
+ sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] ) |
101 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
102 |
+ truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] ) |
103 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
104 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
105 |
+ vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )" |
106 |
+WINE_COMMON_DEPEND=" |
107 |
+ ${WINE_DLOPEN_DEPEND} |
108 |
+ X? ( |
109 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
110 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
111 |
+ ) |
112 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
113 |
+ capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] ) |
114 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
115 |
+ gstreamer? ( |
116 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
117 |
+ media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] |
118 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
119 |
+ ) |
120 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
121 |
+ openal? ( media-libs/openal[${MULTILIB_USEDEP}] ) |
122 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
123 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
124 |
+ pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) |
125 |
+ scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] ) |
126 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
127 |
+ unwind? ( |
128 |
+ llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] ) |
129 |
+ !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) |
130 |
+ ) |
131 |
+ usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )" |
132 |
+RDEPEND=" |
133 |
+ ${WINE_COMMON_DEPEND} |
134 |
+ app-emulation/wine-desktop-common |
135 |
+ dos? ( games-emulation/dosbox ) |
136 |
+ gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] ) |
137 |
+ gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] ) |
138 |
+ mono? ( app-emulation/wine-mono:${WINE_MONO} ) |
139 |
+ perl? ( |
140 |
+ dev-lang/perl |
141 |
+ dev-perl/XML-LibXML |
142 |
+ ) |
143 |
+ samba? ( net-fs/samba[winbind] ) |
144 |
+ selinux? ( sec-policy/selinux-wine ) |
145 |
+ udisks? ( sys-fs/udisks:2 )" |
146 |
+DEPEND=" |
147 |
+ ${WINE_COMMON_DEPEND} |
148 |
+ sys-kernel/linux-headers |
149 |
+ X? ( x11-base/xorg-proto )" |
150 |
+BDEPEND=" |
151 |
+ dev-lang/perl |
152 |
+ sys-devel/bison |
153 |
+ sys-devel/flex |
154 |
+ virtual/pkgconfig |
155 |
+ mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) ) |
156 |
+ nls? ( sys-devel/gettext )" |
157 |
+IDEPEND="app-eselect/eselect-wine" |
158 |
+ |
159 |
+QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext |
160 |
+ |
161 |
+PATCHES=( |
162 |
+ "${FILESDIR}"/${PN}-7.0-llvm-libunwind.patch |
163 |
+ "${FILESDIR}"/${PN}-7.0-noexecstack.patch |
164 |
+) |
165 |
+ |
166 |
+pkg_pretend() { |
167 |
+ [[ ${MERGE_TYPE} == binary ]] && return |
168 |
+ |
169 |
+ if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then |
170 |
+ local mingw=-w64-mingw32 |
171 |
+ for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do |
172 |
+ if ! type -P ${mingw}-gcc >/dev/null; then |
173 |
+ eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" |
174 |
+ eerror "yourself by installing sys-devel/crossdev then running:" |
175 |
+ eerror |
176 |
+ eerror " crossdev --target ${mingw}" |
177 |
+ eerror |
178 |
+ eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" |
179 |
+ die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" |
180 |
+ fi |
181 |
+ done |
182 |
+ fi |
183 |
+} |
184 |
+ |
185 |
+src_prepare() { |
186 |
+ # sanity check, bumping these has a history of oversights |
187 |
+ local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \ |
188 |
+ dlls/appwiz.cpl/addons.c || die) |
189 |
+ if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then |
190 |
+ local gmfatal= |
191 |
+ [[ ${PV} == *9999 ]] && gmfatal=nonfatal |
192 |
+ ${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)" |
193 |
+ fi |
194 |
+ |
195 |
+ default |
196 |
+ |
197 |
+ # ensure .desktop calls this variant + slot |
198 |
+ sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die |
199 |
+ |
200 |
+ # always update for patches (including user's wrt #432348) |
201 |
+ eautoreconf |
202 |
+ tools/make_requests || die # perl |
203 |
+} |
204 |
+ |
205 |
+src_configure() { |
206 |
+ WINE_PREFIX=/usr/lib/${P} |
207 |
+ WINE_DATADIR=/usr/share/${P} |
208 |
+ |
209 |
+ local conf=( |
210 |
+ --prefix="${EPREFIX}"${WINE_PREFIX} |
211 |
+ --datadir="${EPREFIX}"${WINE_DATADIR} |
212 |
+ --includedir="${EPREFIX}"/usr/include/${P} |
213 |
+ --libdir="${EPREFIX}"${WINE_PREFIX} |
214 |
+ --mandir="${EPREFIX}"${WINE_DATADIR}/man |
215 |
+ $(use_enable gecko mshtml) |
216 |
+ $(use_enable mono mscoree) |
217 |
+ --disable-tests |
218 |
+ $(use_with X x) |
219 |
+ $(use_with alsa) |
220 |
+ $(use_with capi) |
221 |
+ $(use_with cups) |
222 |
+ $(use_with fontconfig) |
223 |
+ $(use_with gphoto2 gphoto) |
224 |
+ $(use_with gstreamer) |
225 |
+ $(use_with kerberos gssapi) |
226 |
+ $(use_with kerberos krb5) |
227 |
+ $(use_with ldap) |
228 |
+ $(use_with mingw) |
229 |
+ $(use_with netapi) |
230 |
+ $(use_with nls gettext) |
231 |
+ $(use_with openal) |
232 |
+ $(use_with opencl) |
233 |
+ $(use_with opengl) |
234 |
+ $(use_with osmesa) |
235 |
+ --without-oss # media-sound/oss is not packaged (OSSv4) |
236 |
+ $(use_with pcap) |
237 |
+ $(use_with pulseaudio pulse) |
238 |
+ $(use_with scanner sane) |
239 |
+ $(use_with sdl) |
240 |
+ $(use_with ssl gnutls) |
241 |
+ $(use_with truetype freetype) |
242 |
+ $(use_with udev) |
243 |
+ $(use_with udisks dbus) # dbus is only used for udisks |
244 |
+ $(use_with unwind) |
245 |
+ $(use_with usb) |
246 |
+ $(use_with v4l v4l2) |
247 |
+ $(use_with vulkan) |
248 |
+ $(use_with xcomposite) |
249 |
+ $(use_with xinerama) |
250 |
+ $(usev !odbc ac_cv_lib_soname_odbc=) |
251 |
+ ) |
252 |
+ |
253 |
+ tc-ld-force-bfd #867097 |
254 |
+ use custom-cflags || strip-flags # can break in obscure ways, also no lto |
255 |
+ use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
256 |
+ |
257 |
+ # build using upstream's way (--with-wine64) |
258 |
+ # order matters: configure+compile 64->32, install 32->64 |
259 |
+ local -i bits |
260 |
+ for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do |
261 |
+ ( |
262 |
+ einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..." |
263 |
+ |
264 |
+ mkdir ../build${bits} || die |
265 |
+ cd ../build${bits} || die |
266 |
+ |
267 |
+ # CROSSCC_amd64/x86 are unused by Wine, but recognized here for users |
268 |
+ if (( bits == 64 )); then |
269 |
+ : "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}" |
270 |
+ conf+=( --enable-win64 ) |
271 |
+ elif use amd64; then |
272 |
+ conf+=( |
273 |
+ $(usev abi_x86_64 --with-wine64=../build64) |
274 |
+ TARGETFLAGS=-m32 # for widl |
275 |
+ ) |
276 |
+ # _setup is optional, but use over Wine's auto-detect (+#472038) |
277 |
+ multilib_toolchain_setup x86 |
278 |
+ fi |
279 |
+ : "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}" |
280 |
+ |
281 |
+ # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) |
282 |
+ if use mingw; then |
283 |
+ : "${CROSSCFLAGS:=$(CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" |
284 |
+ : "${CROSSLDFLAGS:=$( |
285 |
+ filter-flags '-fuse-ld=*' |
286 |
+ CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}" |
287 |
+ export CROSS{CC,{C,LD}FLAGS} |
288 |
+ fi |
289 |
+ |
290 |
+ ECONF_SOURCE=${S} econf "${conf[@]}" |
291 |
+ ) |
292 |
+ done |
293 |
+} |
294 |
+ |
295 |
+src_compile() { |
296 |
+ use abi_x86_64 && emake -C ../build64 # do first |
297 |
+ use abi_x86_32 && emake -C ../build32 |
298 |
+} |
299 |
+ |
300 |
+src_install() { |
301 |
+ use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install |
302 |
+ use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last |
303 |
+ |
304 |
+ # symlink for plain 'wine' and install its man pages if 64bit-only #404331 |
305 |
+ if use abi_x86_64 && use !abi_x86_32; then |
306 |
+ dosym wine64 ${WINE_PREFIX}/bin/wine |
307 |
+ dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader |
308 |
+ local man |
309 |
+ for man in ../build64/loader/wine.*man; do |
310 |
+ : "${man##*/wine}" |
311 |
+ : "${_%.*}" |
312 |
+ insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 |
313 |
+ newins ${man} wine.1 |
314 |
+ done |
315 |
+ fi |
316 |
+ |
317 |
+ use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \ |
318 |
+ "${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die |
319 |
+ |
320 |
+ # create variant wrappers for eselect-wine |
321 |
+ local bin |
322 |
+ for bin in "${ED}"${WINE_PREFIX}/bin/*; do |
323 |
+ make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}" |
324 |
+ done |
325 |
+ |
326 |
+ # don't let portage try to strip PE files with the wrong |
327 |
+ # strip executable and instead handle it here (saves ~120MB) |
328 |
+ if use mingw; then |
329 |
+ dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows |
330 |
+ use debug || |
331 |
+ find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \ |
332 |
+ -exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die |
333 |
+ fi |
334 |
+ |
335 |
+ dodoc ANNOUNCE AUTHORS README* documentation/README* |
336 |
+} |
337 |
+ |
338 |
+wine-eselect() { |
339 |
+ ebegin "${1^}ing ${P} using eselect-wine" |
340 |
+ eselect wine ${1} ${P} && |
341 |
+ eselect wine ${1} --${PN#wine-} ${P} && |
342 |
+ eselect wine update --if-unset && |
343 |
+ eselect wine update --${PN#wine-} --if-unset |
344 |
+ eend ${?} || die -n "eselect failed, may need to manually handle ${P}" |
345 |
+} |
346 |
+ |
347 |
+pkg_postinst() { |
348 |
+ wine-eselect register |
349 |
+} |
350 |
+ |
351 |
+pkg_prerm() { |
352 |
+ nonfatal wine-eselect deregister |
353 |
+} |