1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
6 PYTHON_REQ_USE="threads"
8 inherit python-single-r1 unpacker
10 DESCRIPTION="Commercial version of app-emulation/wine with paid support"
11 HOMEPAGE="https://www.codeweavers.com/products/"
12 SRC_URI="install-crossover-${PV}.bin"
16 KEYWORDS="-* ~amd64 ~x86"
17 IUSE="+capi +cups doc +gphoto2 +gsm +jpeg +lcms +ldap +mp3 +nls +openal +opengl +png +scanner +ssl +v4l"
18 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
19 RESTRICT="bindist fetch test"
21 QA_FLAGS_IGNORED="opt/cxoffice/.*"
22 QA_PRESTRIPPED="opt/cxoffice/lib/.*
23 opt/cxoffice/bin/cxburner
24 opt/cxoffice/bin/cxntlm_auth
25 opt/cxoffice/bin/wineserver
26 opt/cxoffice/bin/unrar
27 opt/cxoffice/bin/wine-preloader
28 opt/cxoffice/bin/cxdiag
29 opt/cxoffice/bin/cxgettext
30 opt/cxoffice/bin/wineloader
39 !prefix? ( sys-libs/glibc )
40 $(python_gen_cond_dep '
41 >=dev-python/pygtk-2.10[${PYTHON_MULTI_USEDEP}]
42 dev-python/dbus-python[${PYTHON_MULTI_USEDEP}]
44 dev-util/desktop-file-utils
45 !app-emulation/crossover-office-pro-bin
46 !app-emulation/crossover-office-bin
47 capi? ( net-libs/libcapi[abi_x86_32(-)] )
48 cups? ( net-print/cups[abi_x86_32(-)] )
49 gsm? ( media-sound/gsm[abi_x86_32(-)] )
50 jpeg? ( virtual/jpeg[abi_x86_32(-)] )
51 lcms? ( media-libs/lcms:2 )
52 ldap? ( net-nds/openldap[abi_x86_32(-)] )
53 gphoto2? ( media-libs/libgphoto2[abi_x86_32(-)] )
54 mp3? ( >=media-sound/mpg123-1.5.0[abi_x86_32(-)] )
55 nls? ( sys-devel/gettext[abi_x86_32(-)] )
56 openal? ( media-libs/openal[abi_x86_32(-)] )
58 virtual/glu[abi_x86_32(-)]
59 virtual/opengl[abi_x86_32(-)]
61 png? ( media-libs/libpng:0[abi_x86_32(-)] )
62 scanner? ( media-gfx/sane-backends[abi_x86_32(-)] )
63 ssl? ( dev-libs/openssl:0[abi_x86_32(-)] )
64 v4l? ( media-libs/libv4l[abi_x86_32(-)] )
65 media-libs/alsa-lib[abi_x86_32(-)]
66 >=media-libs/freetype-2.0.0[abi_x86_32(-)]
67 media-libs/mesa[abi_x86_32(-)]
68 sys-apps/util-linux[abi_x86_32(-)]
69 sys-libs/ncurses-compat:5[abi_x86_32(-)]
70 sys-libs/zlib[abi_x86_32(-)]
71 x11-libs/libICE[abi_x86_32(-)]
72 x11-libs/libSM[abi_x86_32(-)]
73 x11-libs/libX11[abi_x86_32(-)]
74 x11-libs/libXau[abi_x86_32(-)]
75 x11-libs/libXdmcp[abi_x86_32(-)]
76 x11-libs/libXext[abi_x86_32(-)]
77 x11-libs/libXi[abi_x86_32(-)]
78 x11-libs/libXrandr[abi_x86_32(-)]
79 x11-libs/libXxf86vm[abi_x86_32(-)]
80 x11-libs/libxcb[abi_x86_32(-)]"
83 einfo "Please visit ${HOMEPAGE}"
84 einfo "and place ${A} into your DISTDIR directory"
88 # self unpacking zip archive; unzip warns about the exe stuff
94 sed -e 's:/usr/local/etc/xdg /etc/xdg::' -i "${WORKDIR}/bin/locate_gui.sh" \
95 || die "Could not patch ${WORKDIR}/bin/locate_gui.sh"
97 # Remove unnecessary files
98 rm -r license.txt guis/ || die "Could not remove files"
99 use doc || rm -r doc/ || die "Could not remove files"
103 # Install crossover symlink, bug #476314
104 dosym ../cxoffice/bin/crossover /opt/bin/crossover
106 # Install documentation
107 dodoc README changelog.txt
108 rm README changelog.txt || die "Could not remove README and changelog.txt"
112 cp -r ./* "${ED}opt/cxoffice" \
113 || die "Could not install into ${ED}opt/cxoffice"
115 # Install configuration file
116 insinto /opt/cxoffice/etc
117 doins share/crossover/data/cxoffice.conf
119 # Install requisite directories for menus
120 dodir "/usr/share/applications"
121 dodir "/etc/xdg/menus/applications-merged"
124 XDG_CONFIG_DIRS="${ED}etc/xdg" \
125 XDG_DATA_DIRS="${ED}usr/share" \
126 "${ED}opt/cxoffice/bin/cxmenu" --crossover --install \
127 || die "Could not install menus"
130 sed -e "s:${ED}:/:" -i "${ED}usr/share/applications/"* \
131 || die "Could not fix menus"