Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/crossover-bin/
Date: Fri, 20 May 2022 19:44:43
Message-Id: 1653075872.aa8c611e6918394ff280381884173de204d1cd9f.pacho@gentoo
1 commit: aa8c611e6918394ff280381884173de204d1cd9f
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 20 19:41:51 2022 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Fri May 20 19:44:32 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa8c611e
7
8 app-emulation/crossover-bin: add 21.2.0
9
10 Closes: https://bugs.gentoo.org/836035
11 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
12
13 app-emulation/crossover-bin/Manifest | 1 +
14 .../crossover-bin/crossover-bin-21.2.0.ebuild | 226 +++++++++++++++++++++
15 2 files changed, 227 insertions(+)
16
17 diff --git a/app-emulation/crossover-bin/Manifest b/app-emulation/crossover-bin/Manifest
18 index 89f1c6d9e826..6ac1bd8e3de5 100644
19 --- a/app-emulation/crossover-bin/Manifest
20 +++ b/app-emulation/crossover-bin/Manifest
21 @@ -1,3 +1,4 @@
22 DIST install-crossover-20.0.4.bin 221436226 BLAKE2B 486494455759d92f8e7e5d35968a603e41a0674cb0752e7d5ba4893d33e77b3e31fea2ebe75d471e2478e7f3cce9be2f712840f1f50bfe790fec5ec936b804a5 SHA512 78252d29f8a72a8742d57a65a60d09a81a70a98517b67468dac96af94ee8af7a313f164af6717f9a9c657095e66466809e08584c7a0fde3bd58c27ff00f41067
23 DIST install-crossover-21.0.0.bin 312441596 BLAKE2B 4431f545e6a8c8bbc1ab5cf0f46d019242b48c61a2edfc7a762e38718d6543ce384ad55b40f3470f11893adcb6801323db5dba846cc0b544d6dab5e5bfb24e2b SHA512 c5567eef346d93af22f996be2a5a0237bc299c54cba3aa9a1345854b0cf601ffd26975536d18175735c170411b572a59d5dadb39674bfe158ca9944595e4deed
24 DIST install-crossover-21.1.0.bin 314014189 BLAKE2B f214d8b76a8809e396509013adb7ccfd5301ce35e8fda802d3601b3c88d1273eaa00f0457fb69897c4cac58f0a779ff18d5eef1708e5315d1173ecbf5967bb70 SHA512 271e67988e2fa4c1b3277e9b089a9ee11b52931fda597d6bf9975fe38b031e526dd6bac4c7a31ca530487380895ec8e94b4439ad7bd85098c87f35f8530c28f3
25 +DIST install-crossover-21.2.0.bin 313966852 BLAKE2B 746b16a1e093adf344fa827e5c6b9a439e690003bf3eb30b32b9a30017f1697c21bc5c9e196736cc25e24daeed3ee3a809b20d44e0005bfd45ab542ede6c2d44 SHA512 a8ba1396e05119122dc0d813bc408fc0a2a3adc5c805ce15aea8e98a6a27d980eabafaf7a727f4cf1c30d68e456e8d82b83438e404cbf41db05d569f8832a9ec
26
27 diff --git a/app-emulation/crossover-bin/crossover-bin-21.2.0.ebuild b/app-emulation/crossover-bin/crossover-bin-21.2.0.ebuild
28 new file mode 100644
29 index 000000000000..271458098dd9
30 --- /dev/null
31 +++ b/app-emulation/crossover-bin/crossover-bin-21.2.0.ebuild
32 @@ -0,0 +1,226 @@
33 +# Copyright 1999-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +
39 +inherit python-single-r1 unpacker
40 +
41 +DESCRIPTION="Commercial version of app-emulation/wine with paid support"
42 +HOMEPAGE="https://www.codeweavers.com/products/"
43 +SRC_URI="https://media.codeweavers.com/pub/crossover/cxlinux/demo/install-crossover-${PV}.bin"
44 +
45 +LICENSE="CROSSOVER-3"
46 +SLOT="0"
47 +KEYWORDS="-* ~amd64 ~x86"
48 +IUSE="+capi +cups doc +gphoto2 +gsm +gstreamer +jpeg +lcms ldap +mp3 +nls osmesa +openal +opencl +opengl +pcap +png +scanner +ssl +v4l +vulkan"
49 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
50 +
51 +RESTRICT="bindist test"
52 +
53 +QA_FLAGS_IGNORED="opt/cxoffice/.*"
54 +QA_PRESTRIPPED="
55 + opt/cxoffice/lib/.*
56 + opt/cxoffice/lib64/.*
57 + opt/cxoffice/bin/cabextract
58 + opt/cxoffice/bin/cxburner
59 + opt/cxoffice/bin/cxntlm_auth
60 + opt/cxoffice/bin/wineserver
61 + opt/cxoffice/bin/wineserver32
62 + opt/cxoffice/bin/wineserver64
63 + opt/cxoffice/bin/wine64-preloader
64 + opt/cxoffice/bin/unrar
65 + opt/cxoffice/bin/wine-preloader
66 + opt/cxoffice/bin/cxdiag
67 + opt/cxoffice/bin/cxdiag64
68 + opt/cxoffice/bin/cxgettext
69 + opt/cxoffice/bin/vkd3d-compiler
70 + opt/cxoffice/bin/wineloader
71 + opt/cxoffice/bin/wineloader64
72 +"
73 +QA_TEXTRELS="
74 + opt/cxoffice/bin/wineserver32
75 + opt/cxoffice/lib/wine/*
76 + opt/cxoffice/lib/libwine.so*
77 +"
78 +
79 +S="${WORKDIR}"
80 +
81 +DEPEND=""
82 +BDEPEND="${PYTHON_DEPS}
83 + app-arch/cpio
84 + app-arch/unzip
85 + dev-lang/perl
86 + dev-util/bbe
87 +"
88 +
89 +RDEPEND="${DEPEND}
90 + ${PYTHON_DEPS}
91 + $(python_gen_cond_dep '
92 + dev-python/dbus-python[${PYTHON_USEDEP}]
93 + dev-python/pygobject:3[${PYTHON_USEDEP}]
94 + ')
95 + !prefix? ( sys-libs/glibc )
96 + capi? ( net-libs/libcapi[abi_x86_32(-)] )
97 + cups? ( net-print/cups[abi_x86_32(-)] )
98 + gsm? ( media-sound/gsm[abi_x86_32(-)] )
99 + jpeg? ( media-libs/libjpeg-turbo:0[abi_x86_32(-)] )
100 + lcms? ( media-libs/lcms:2 )
101 + ldap? ( net-nds/openldap[abi_x86_32(-)] )
102 + gphoto2? ( media-libs/libgphoto2[abi_x86_32(-)] )
103 + gstreamer? (
104 + media-libs/gstreamer:1.0[abi_x86_32(-)]
105 + jpeg? ( media-plugins/gst-plugins-jpeg:1.0[abi_x86_32(-)] )
106 + media-plugins/gst-plugins-meta:1.0[abi_x86_32(-)]
107 + )
108 + mp3? ( >=media-sound/mpg123-1.5.0[abi_x86_32(-)] )
109 + nls? ( sys-devel/gettext[abi_x86_32(-)] )
110 + openal? ( media-libs/openal[abi_x86_32(-)] )
111 + opencl? ( virtual/opencl[abi_x86_32(-)] )
112 + opengl? (
113 + virtual/glu[abi_x86_32(-)]
114 + virtual/opengl[abi_x86_32(-)]
115 + )
116 + pcap? ( net-libs/libpcap[abi_x86_32(-)] )
117 + png? ( media-libs/libpng:0[abi_x86_32(-)] )
118 + scanner? ( media-gfx/sane-backends[abi_x86_32(-)] )
119 + ssl? ( net-libs/gnutls:0/30[abi_x86_32(-)] )
120 + v4l? ( media-libs/libv4l[abi_x86_32(-)] )
121 + vulkan? ( media-libs/vulkan-loader[abi_x86_32(-)] )
122 + dev-libs/glib:2
123 + dev-libs/gobject-introspection
124 + dev-libs/openssl:0
125 + dev-util/desktop-file-utils
126 + media-libs/alsa-lib[abi_x86_32(-)]
127 + media-libs/freetype:2[abi_x86_32(-)]
128 + media-libs/mesa[abi_x86_32(-),osmesa?]
129 + media-libs/tiff:0[abi_x86_32(-)]
130 + sys-auth/nss-mdns[abi_x86_32(-)]
131 + sys-apps/util-linux[abi_x86_32(-)]
132 + sys-libs/libunwind[abi_x86_32(-)]
133 + sys-libs/ncurses-compat:5[abi_x86_32(-)]
134 + sys-libs/zlib[abi_x86_32(-)]
135 + x11-libs/libICE[abi_x86_32(-)]
136 + x11-libs/libSM[abi_x86_32(-)]
137 + x11-libs/libX11[abi_x86_32(-)]
138 + x11-libs/libXau[abi_x86_32(-)]
139 + x11-libs/libXcursor[abi_x86_32(-)]
140 + x11-libs/libXdmcp[abi_x86_32(-)]
141 + x11-libs/libXext[abi_x86_32(-)]
142 + x11-libs/libXi[abi_x86_32(-)]
143 + x11-libs/libXrandr[abi_x86_32(-)]
144 + x11-libs/libXxf86vm[abi_x86_32(-)]
145 + x11-libs/libxcb[abi_x86_32(-)]
146 + x11-libs/gdk-pixbuf:2[introspection]
147 + x11-libs/gtk+:3[introspection]
148 + x11-libs/pango[introspection]
149 + x11-libs/vte:2.91[introspection]
150 + || (
151 + sys-libs/libxcrypt[compat]
152 + sys-libs/glibc[crypt(+)]
153 + )
154 +"
155 +
156 +src_unpack() {
157 + # self unpacking zip archive; unzip warns about the exe stuff
158 + unpack_zip ${A}
159 +}
160 +
161 +src_prepare() {
162 + default
163 +
164 + # Remove unnecessary files, license.txt file kept as it's used by
165 + # multiple files (apart of the menu to show the license)
166 + rm -r guis/ || die "Could not remove files"
167 + use doc || rm -r doc/ || die "Could not remove files"
168 +}
169 +
170 +src_install() {
171 + sed -i \
172 + -e "s:xdg_install_icons(:&\"${ED}\".:" \
173 + -e "s:\"\(.*\)/applications:\"${ED}\1/applications:" \
174 + -e "s:\"\(.*\)/desktop-directories:\"${ED}\1/desktop-directories:" \
175 + "${S}/lib/perl/CXMenuXDG.pm"
176 +
177 + # Install crossover symlink, bug #476314
178 + dosym ../cxoffice/bin/crossover /opt/bin/crossover
179 +
180 + # Install documentation
181 + dodoc README changelog.txt
182 + rm README changelog.txt || die "Could not remove README and changelog.txt"
183 +
184 + # Install files
185 + dodir /opt/cxoffice
186 + #cp -r ./* "${ED}/opt/cxoffice" \
187 + find . | cpio -dumpl "${ED}/opt/cxoffice" 2>/dev/null \
188 + || die "Could not install into ${ED}/opt/cxoffice"
189 +
190 + # Disable auto-update
191 + sed -i -e 's/;;\"AutoUpdate\" = \"1\"/\"AutoUpdate\" = \"0\"/g' share/crossover/data/cxoffice.conf || die
192 +
193 + # Install configuration file
194 + insinto /opt/cxoffice/etc
195 + doins share/crossover/data/cxoffice.conf
196 + dodir /etc/env.d
197 + echo "CONFIG_PROTECT=/opt/cxoffice/etc/cxoffice.conf" >> "${ED}"/etc/env.d/30crossover-bin || die
198 +
199 + # Konqueror in its infinite wisdom decides to try opening things for
200 + # writing, which are sandbox violations. This breaks the install process if
201 + # it is installed, so we ninja edit it to false so it so doesn't run.
202 + sed -i -e 's/cxwhich konqueror/false &/' "${ED}/opt/cxoffice/bin/locate_gui.sh" \
203 + || die "Could not apply workaround for konqueror"
204 +
205 + # Install menus
206 + # XXX: locate_gui.sh automatically detects *-application-merged directories
207 + # This means what we install will vary depending on the contents of
208 + # /etc/xdg, which is a QA violation. It is not clear how to resolve this.
209 + XDG_DATA_HOME="/usr/share" XDG_CONFIG_HOME="/etc/xdg" \
210 + "${ED}/opt/cxoffice/bin/cxmenu" --destdir="${ED}" --crossover --install \
211 + || die "Could not install menus"
212 +
213 + # Revert ninja edit
214 + sed -i -e 's/false \(cxwhich konqueror\)/\1/' "${ED}/opt/cxoffice/bin/locate_gui.sh" \
215 + || die "Could not apply workaround for konqueror"
216 +
217 + # Drop Uninstall menus
218 + rm "${ED}/usr/share/applications/"*"Uninstall"* \
219 + || die "Could not remove uninstall menus"
220 +
221 + # Fix PATHs
222 + sed -i \
223 + -e "s:\"${ED}\".::" \
224 + -e "s:${ED}::" \
225 + "${ED}/opt/cxoffice/lib/perl/CXMenuXDG.pm" \
226 + || die "Could not fix paths in ${ED}/opt/cxoffice/lib/perl/CXMenuXDG.pm"
227 + sed -i -e "s:${ED}:/:" \
228 + "${ED}/usr/share/applications/"*"CrossOver.desktop" \
229 + || die "Could not fix paths of *.desktop files"
230 +
231 + # Workaround missing libs
232 + # https://www.codeweavers.com/support/forums/general/?t=26;mhl=198658;msg=198658
233 + if use gphoto2; then
234 + bbe -e 's/libgphoto2_port.so.10/libgphoto2_port.so.12/' "${ED}/opt/cxoffice/lib/wine/gphoto2.ds.so" >tmp || die
235 + mv tmp "${ED}/opt/cxoffice/lib/wine/gphoto2.ds.so" || die
236 + bbe -e 's/libgphoto2_port.so.10/libgphoto2_port.so.12/' "${ED}/opt/cxoffice/bin/cxdiag" >tmp || die
237 + mv tmp "${ED}/opt/cxoffice/bin/cxdiag" || die
238 + fperms a+x "/opt/cxoffice/bin/cxdiag"
239 + fi
240 + # It tries to load libpcap as packaged in Debian, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657900
241 + # https://bugs.gentoo.org/721108
242 + if use pcap; then
243 + bbe -e 's/libpcap.so.0.8/libpcap.so.1.9.1/' "${ED}/opt/cxoffice/lib/wine/wpcap.dll.so" >tmp || die
244 + bbe -e 's/libpcap.so.0.8/libpcap.so.1.9.1/' "${ED}/opt/cxoffice/lib64/wine/wpcap.dll.so" >tmp64 || die
245 + mv tmp "${ED}/opt/cxoffice/lib/wine/wpcap.dll.so" || die
246 + mv tmp64 "${ED}/opt/cxoffice/lib64/wine/wpcap.dll.so" || die
247 + fi
248 +
249 + # Remove libs that link to openldap
250 + if ! use ldap; then
251 + rm "${ED}"/opt/cxoffice/lib*/wine/wldap32.dll.so || die
252 + fi
253 +
254 + # Remove libs that link to opencl
255 + if ! use opencl; then
256 + rm "${ED}"/opt/cxoffice/lib*/wine/opencl.dll.so || die
257 + fi
258 +}