net-im/skypeforlinux: Bump version to 8.51.0.86
[gentoo.git] / net-im / skypeforlinux / skypeforlinux-8.50.0.38.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 MULTILIB_COMPAT=( abi_x86_64 )
7
8 inherit desktop pax-utils rpm multilib-build xdg
9
10 DESCRIPTION="Instant messaging client, with support for audio and video"
11 HOMEPAGE="https://www.skype.com/"
12 SRC_URI="https://repo.skype.com/rpm/stable/${PN}_${PV}-1.x86_64.rpm"
13
14 LICENSE="Skype-TOS MIT MIT-with-advertising BSD-1 BSD-2 BSD Apache-2.0 Boost-1.0 ISC CC-BY-SA-3.0 CC0-1.0 openssl ZLIB APSL-2 icu Artistic-2 LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="-* ~amd64"
17 IUSE="pax_kernel"
18
19 S="${WORKDIR}"
20 QA_PREBUILT="*"
21 RESTRICT="mirror bindist strip" #299368
22
23 RDEPEND="
24         || (
25                 sys-auth/elogind
26                 sys-apps/systemd
27         )
28         app-crypt/libsecret[${MULTILIB_USEDEP}]
29         dev-libs/atk[${MULTILIB_USEDEP}]
30         dev-libs/expat[${MULTILIB_USEDEP}]
31         dev-libs/glib:2[${MULTILIB_USEDEP}]
32         dev-libs/nspr[${MULTILIB_USEDEP}]
33         dev-libs/nss[${MULTILIB_USEDEP}]
34         media-libs/alsa-lib[${MULTILIB_USEDEP}]
35         media-libs/fontconfig:1.0[${MULTILIB_USEDEP}]
36         media-libs/freetype:2[${MULTILIB_USEDEP}]
37         media-libs/libv4l[${MULTILIB_USEDEP}]
38         net-print/cups[${MULTILIB_USEDEP}]
39         sys-apps/dbus[${MULTILIB_USEDEP}]
40         sys-devel/gcc[cxx]
41         virtual/ttf-fonts
42         x11-libs/cairo[${MULTILIB_USEDEP}]
43         x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}]
44         x11-libs/gtk+:3[${MULTILIB_USEDEP}]
45         x11-libs/libX11[${MULTILIB_USEDEP}]
46         x11-libs/libXScrnSaver[${MULTILIB_USEDEP}]
47         x11-libs/libXcomposite[${MULTILIB_USEDEP}]
48         x11-libs/libXcursor[${MULTILIB_USEDEP}]
49         x11-libs/libXdamage[${MULTILIB_USEDEP}]
50         x11-libs/libXext[${MULTILIB_USEDEP}]
51         x11-libs/libXfixes[${MULTILIB_USEDEP}]
52         x11-libs/libXi[${MULTILIB_USEDEP}]
53         x11-libs/libXrandr[${MULTILIB_USEDEP}]
54         x11-libs/libXrender[${MULTILIB_USEDEP}]
55         x11-libs/libXtst[${MULTILIB_USEDEP}]
56         x11-libs/libxcb[${MULTILIB_USEDEP}]
57         x11-libs/libxkbfile[${MULTILIB_USEDEP}]
58         x11-libs/pango[${MULTILIB_USEDEP}]"
59
60 src_unpack() {
61         rpm_src_unpack ${A}
62 }
63
64 src_prepare() {
65         default
66         sed -e "s!^SKYPE_PATH=.*!SKYPE_PATH=${EPREFIX}/opt/skypeforlinux/skypeforlinux!" \
67                 -i usr/bin/skypeforlinux || die
68         sed -e "s!^Categories=.*!Categories=Network;InstantMessaging;Telephony;!" \
69                 -e "/^OnlyShowIn=/d" \
70                 -i usr/share/applications/skypeforlinux.desktop || die
71 }
72
73 src_install() {
74         dodir /opt
75         cp -a usr/share/skypeforlinux "${D}"/opt || die
76
77         dobin usr/bin/skypeforlinux
78
79         dodoc usr/share/skypeforlinux/*.html
80         dodoc -r usr/share/doc/skypeforlinux/.
81         # symlink required for the "Help->3rd Party Notes" menu entry  (otherwise frozen skype -> xdg-open)
82         dosym ${PF} usr/share/doc/skypeforlinux
83
84         doicon usr/share/pixmaps/skypeforlinux.png
85
86         local res
87         for res in 16 32 256 512; do
88                 newicon -s ${res} usr/share/icons/hicolor/${res}x${res}/apps/skypeforlinux.png skypeforlinux.png
89         done
90
91         domenu usr/share/applications/skypeforlinux.desktop
92
93         if use pax_kernel; then
94                 pax-mark -m "${ED}"/opt/skypeforlinux/skypeforlinux
95                 pax-mark -m "${ED}"/opt/skypeforlinux/resources/app.asar.unpacked/node_modules/slimcore/bin/slimcore.node
96                 ewarn "You have set USE=pax_kernel meaning that you intend to run"
97                 ewarn "${PN} under a PaX enabled kernel. To do so, we must modify"
98                 ewarn "the ${PN} binary itself and this *may* lead to breakage! If"
99                 ewarn "you suspect that ${PN} is being broken by this modification,"
100                 ewarn "please open a bug."
101         fi
102 }