Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-vanilla/
Date: Tue, 08 Nov 2022 20:06:24
Message-Id: 1667937926.763ebc7030ff51b6a249678f6a4751e978b425e7.ionen@gentoo
1 commit: 763ebc7030ff51b6a249678f6a4751e978b425e7
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 8 18:35:08 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 8 20:05:26 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=763ebc70
7
8 app-emulation/wine-vanilla: add 7.0.1
9
10 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
11
12 app-emulation/wine-vanilla/Manifest | 1 +
13 .../wine-vanilla/wine-vanilla-7.0.1.ebuild | 322 +++++++++++++++++++++
14 2 files changed, 323 insertions(+)
15
16 diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest
17 index 7520a5ca709a..5525b6e92fe3 100644
18 --- a/app-emulation/wine-vanilla/Manifest
19 +++ b/app-emulation/wine-vanilla/Manifest
20 @@ -1,3 +1,4 @@
21 +DIST wine-7.0.1.tar.xz 27167768 BLAKE2B 9bf74e7077fe4b77611f8195feeb53fc6475bdaeac97dab5221942115d6108d8786f93d4a96745bad72afb074b15129fec9b0b2f10261d91c9a9b57bd2240ded SHA512 5a5258132fe30bfb5313454598b85e7d97a74d1e0c7ca7af16aa8c486e316ad34ab74a25fd9a403c98ad1f3280385232f7d159bb824f713e920a4a0dae62c944
22 DIST wine-7.0.tar.xz 27120912 BLAKE2B 84bfeb28d56f0f40bb93b1b5bf8954c8be2fd90fde5a61608e7c35f48addcce7a4d660e63c3caa3ca2c365d1e83b55a1c3485872b2d6bfa8941e2bce44c4aca6 SHA512 eec17b046ed5447eb540f421c9b2748d9419ce087496c2743a9914fd27bbe5ff9da0cfe47d3cd76fa97323bd1188a1d82b1eef4968d86ed1957dc1a95e28529c
23 DIST wine-7.17.tar.xz 28379876 BLAKE2B 536af8f1ac9c4dd8bae2d16cba226c99c45cd64f0a9a2569022baefee61556801d3ee15f480fd18445baecb6c78dd7950f98542dc88a3282ee5d457d0e4ddfb1 SHA512 fd8017e6174db0047a3957db3045b2ad9024e07b1e2f81800521f0b7e7f7660add6a08e09bc60e3d140816cec70aae8324fe15643bd05e541f22f66ffda52508
24 DIST wine-7.18.tar.xz 28412876 BLAKE2B 1f25c8669a2afbead142923a39913b3f21df641e446a6136e7ecd282f6c31bc70578036e83f3dd28d22516d987ddca179198f76effb5c9aca089f4755ffa873e SHA512 e651b18cef73b4619e953b746d0c207c0220279003560aaf195c2569a22308af129e1460651a246e6a87dcfbcfcff08f52f970734035eb55ab45d8970fd56a02
25
26 diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.0.1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.0.1.ebuild
27 new file mode 100644
28 index 000000000000..18188f1ea195
29 --- /dev/null
30 +++ b/app-emulation/wine-vanilla/wine-vanilla-7.0.1.ebuild
31 @@ -0,0 +1,322 @@
32 +# Copyright 2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +MULTILIB_COMPAT=( abi_x86_{32,64} )
38 +inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper
39 +
40 +WINE_GECKO=2.47.2
41 +WINE_MONO=7.0.0
42 +
43 +if [[ ${PV} == *9999 ]]; then
44 + inherit git-r3
45 + EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
46 +else
47 + (( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
48 + SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
49 + S="${WORKDIR}/wine-${PV}"
50 + KEYWORDS="-* ~amd64 ~x86"
51 +fi
52 +
53 +DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
54 +HOMEPAGE="https://www.winehq.org/"
55 +
56 +LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff"
57 +SLOT="${PV}"
58 +IUSE="
59 + +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
60 + llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2
61 + +gstreamer kerberos ldap +mingw +mono netapi nls odbc openal
62 + opencl +opengl osmesa pcap perl pulseaudio samba scanner +sdl
63 + selinux +ssl +truetype udev udisks +unwind usb v4l +vkd3d +vulkan
64 + +xcomposite xinerama"
65 +REQUIRED_USE="
66 + X? ( truetype )
67 + crossdev-mingw? ( mingw )" # bug #551124 for truetype
68 +
69 +# tests are non-trivial to run, can hang easily, don't play well with
70 +# sandbox, and several need real opengl/vulkan or network access
71 +RESTRICT="test"
72 +
73 +# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
74 +WINE_DLOPEN_DEPEND="
75 + X? (
76 + x11-libs/libXcursor[${MULTILIB_USEDEP}]
77 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
78 + x11-libs/libXi[${MULTILIB_USEDEP}]
79 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
80 + x11-libs/libXrender[${MULTILIB_USEDEP}]
81 + x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
82 + opengl? (
83 + media-libs/libglvnd[X,${MULTILIB_USEDEP}]
84 + osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
85 + )
86 + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
87 + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
88 + )
89 + cups? ( net-print/cups[${MULTILIB_USEDEP}] )
90 + fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
91 + kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
92 + netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
93 + odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
94 + sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
95 + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
96 + truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
97 + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
98 + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
99 + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )"
100 +WINE_COMMON_DEPEND="
101 + ${WINE_DLOPEN_DEPEND}
102 + X? (
103 + x11-libs/libX11[${MULTILIB_USEDEP}]
104 + x11-libs/libXext[${MULTILIB_USEDEP}]
105 + )
106 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
107 + capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
108 + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
109 + gstreamer? (
110 + dev-libs/glib:2[${MULTILIB_USEDEP}]
111 + media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
112 + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
113 + )
114 + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
115 + openal? ( media-libs/openal[${MULTILIB_USEDEP}] )
116 + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
117 + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
118 + pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
119 + scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
120 + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
121 + unwind? (
122 + llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
123 + !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
124 + )
125 + usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )
126 + vkd3d? ( >=app-emulation/vkd3d-1.2[${MULTILIB_USEDEP}] )"
127 +RDEPEND="
128 + ${WINE_COMMON_DEPEND}
129 + app-emulation/wine-desktop-common
130 + dos? ( games-emulation/dosbox )
131 + gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] )
132 + gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
133 + mono? ( app-emulation/wine-mono:${WINE_MONO} )
134 + perl? (
135 + dev-lang/perl
136 + dev-perl/XML-LibXML
137 + )
138 + samba? ( net-fs/samba[winbind] )
139 + selinux? ( sec-policy/selinux-wine )
140 + udisks? ( sys-fs/udisks:2 )"
141 +DEPEND="
142 + ${WINE_COMMON_DEPEND}
143 + sys-kernel/linux-headers
144 + X? ( x11-base/xorg-proto )"
145 +BDEPEND="
146 + dev-lang/perl
147 + sys-devel/bison
148 + sys-devel/flex
149 + virtual/pkgconfig
150 + mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) )
151 + nls? ( sys-devel/gettext )"
152 +IDEPEND="app-eselect/eselect-wine"
153 +
154 +QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
155 +
156 +PATCHES=(
157 + "${FILESDIR}"/${PN}-7.0-noexecstack.patch
158 + "${FILESDIR}"/${PN}-7.0-unwind.patch
159 +)
160 +
161 +pkg_pretend() {
162 + [[ ${MERGE_TYPE} == binary ]] && return
163 +
164 + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
165 + local mingw=-w64-mingw32
166 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
167 + if ! type -P ${mingw}-gcc >/dev/null; then
168 + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
169 + eerror "yourself by installing sys-devel/crossdev then running:"
170 + eerror
171 + eerror " crossdev --target ${mingw}"
172 + eerror
173 + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
174 + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
175 + fi
176 + done
177 + fi
178 +}
179 +
180 +src_prepare() {
181 + # sanity check, bumping these has a history of oversights
182 + local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
183 + dlls/appwiz.cpl/addons.c || die)
184 + if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
185 + local gmfatal=
186 + [[ ${PV} == *9999 ]] && gmfatal=nonfatal
187 + ${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
188 + fi
189 +
190 + default
191 +
192 + # ensure .desktop calls this variant + slot
193 + sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
194 +
195 + # always update for patches (including user's wrt #432348)
196 + eautoreconf
197 + tools/make_requests || die # perl
198 +}
199 +
200 +src_configure() {
201 + WINE_PREFIX=/usr/lib/${P}
202 + WINE_DATADIR=/usr/share/${P}
203 +
204 + local conf=(
205 + --prefix="${EPREFIX}"${WINE_PREFIX}
206 + --datadir="${EPREFIX}"${WINE_DATADIR}
207 + --includedir="${EPREFIX}"/usr/include/${P}
208 + --libdir="${EPREFIX}"${WINE_PREFIX}
209 + --mandir="${EPREFIX}"${WINE_DATADIR}/man
210 + $(use_enable gecko mshtml)
211 + $(use_enable mono mscoree)
212 + --disable-tests
213 + $(use_with X x)
214 + $(use_with alsa)
215 + $(use_with capi)
216 + $(use_with cups)
217 + $(use_with fontconfig)
218 + $(use_with gphoto2 gphoto)
219 + $(use_with gstreamer)
220 + $(use_with kerberos gssapi)
221 + $(use_with kerberos krb5)
222 + $(use_with ldap)
223 + $(use_with mingw)
224 + $(use_with netapi)
225 + $(use_with nls gettext)
226 + $(use_with openal)
227 + $(use_with opencl)
228 + $(use_with opengl)
229 + $(use_with osmesa)
230 + --without-oss # media-sound/oss is not packaged (OSSv4)
231 + $(use_with pcap)
232 + $(use_with pulseaudio pulse)
233 + $(use_with scanner sane)
234 + $(use_with sdl)
235 + $(use_with ssl gnutls)
236 + $(use_with truetype freetype)
237 + $(use_with udev)
238 + $(use_with udisks dbus) # dbus is only used for udisks
239 + $(use_with unwind)
240 + $(use_with usb)
241 + $(use_with v4l v4l2)
242 + $(use_with vkd3d)
243 + $(use_with vulkan)
244 + $(use_with xcomposite)
245 + $(use_with xinerama)
246 + $(usev !odbc ac_cv_lib_soname_odbc=)
247 + )
248 +
249 + tc-ld-force-bfd #867097
250 + use custom-cflags || strip-flags # can break in obscure ways, also no lto
251 + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
252 +
253 + # build using upstream's way (--with-wine64)
254 + # order matters: configure+compile 64->32, install 32->64
255 + local -i bits
256 + for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
257 + (
258 + einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
259 +
260 + mkdir ../build${bits} || die
261 + cd ../build${bits} || die
262 +
263 + # CROSSCC_amd64/x86 are unused by Wine, but recognized here for users
264 + if (( bits == 64 )); then
265 + : "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}"
266 + conf+=( --enable-win64 )
267 + elif use amd64; then
268 + conf+=(
269 + $(usev abi_x86_64 --with-wine64=../build64)
270 + TARGETFLAGS=-m32 # for widl
271 + )
272 + # _setup is optional, but use over Wine's auto-detect (+#472038)
273 + multilib_toolchain_setup x86
274 + fi
275 + : "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}"
276 +
277 + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu)
278 + if use mingw; then
279 + : "${CROSSCFLAGS:=$(
280 + filter-flags '-fstack-clash-protection' #758914
281 + filter-flags '-fstack-protector*' #870136
282 + filter-flags '-mfunction-return=thunk*' #878849
283 + 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 +}