Gentoo Archives: gentoo-commits

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/spotify/
Date: Sat, 05 Sep 2020 19:35:30
Message-Id: 1599334518.436356dd7fceeeb6127c2294ab9bdad61e8155b0.prometheanfire@gentoo
1 commit: 436356dd7fceeeb6127c2294ab9bdad61e8155b0
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 5 19:26:09 2020 +0000
4 Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 5 19:35:18 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=436356dd
7
8 media-sound/spotify: fix missing x11 deps
9
10 Closes: https://bugs.gentoo.org/740526
11 Package-Manager: Portage-3.0.4, Repoman-3.0.1
12 Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
13
14 media-sound/spotify/spotify-1.1.26-r2.ebuild | 109 +++++++++++++++++++++++++++
15 1 file changed, 109 insertions(+)
16
17 diff --git a/media-sound/spotify/spotify-1.1.26-r2.ebuild b/media-sound/spotify/spotify-1.1.26-r2.ebuild
18 new file mode 100644
19 index 00000000000..6c28565a405
20 --- /dev/null
21 +++ b/media-sound/spotify/spotify-1.1.26-r2.ebuild
22 @@ -0,0 +1,109 @@
23 +# Copyright 1999-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +inherit desktop pax-utils unpacker xdg
28 +
29 +DESCRIPTION="Spotify is a social music platform"
30 +HOMEPAGE="https://www.spotify.com/ch-de/download/previews/"
31 +SRC_BASE="http://repository.spotify.com/pool/non-free/s/${PN}-client/"
32 +BUILD_ID_AMD64="501.gbe11e53b-15"
33 +SRC_URI="${SRC_BASE}${PN}-client_${PV}.${BUILD_ID_AMD64}_amd64.deb"
34 +LICENSE="Spotify"
35 +SLOT="0"
36 +KEYWORDS="~amd64"
37 +IUSE="libnotify libressl systray pax_kernel pulseaudio"
38 +RESTRICT="mirror strip"
39 +
40 +BDEPEND=">=dev-util/patchelf-0.10"
41 +RDEPEND="
42 + dev-libs/nss
43 + dev-python/dbus-python
44 + dev-python/pygobject:3
45 + libnotify? ( x11-libs/libnotify )
46 + !libressl? ( dev-libs/openssl:0= )
47 + libressl? ( dev-libs/libressl:0= )
48 + media-libs/alsa-lib
49 + media-libs/fontconfig
50 + media-libs/harfbuzz
51 + media-libs/mesa[X(+)]
52 + net-misc/curl[ssl]
53 + net-print/cups[ssl]
54 + pulseaudio? ( media-sound/pulseaudio )
55 + !pulseaudio? ( media-sound/apulse )
56 + systray? ( gnome-extra/gnome-integration-spotify )
57 + x11-libs/gtk+:2
58 + app-accessibility/at-spi2-atk
59 + x11-libs/libXScrnSaver
60 + x11-libs/libXtst
61 + x11-libs/libSM
62 + x11-libs/libICE
63 +"
64 + #sys-libs/glibc
65 +
66 +S=${WORKDIR}/
67 +
68 +QA_PREBUILT="opt/spotify/spotify-client/spotify"
69 +
70 +src_prepare() {
71 + # Fix desktop entry to launch spotify-dbus.py for systray integration
72 + if use systray ; then
73 + sed -i \
74 + -e 's/spotify \%U/spotify-dbus.py \%U/g' \
75 + usr/share/spotify/spotify.desktop || die "sed failed"
76 + fi
77 + default
78 +
79 + # Spotify links against libcurl-gnutls.so.4, which does not exist in Gentoo.
80 + patchelf --replace-needed libcurl-gnutls.so.4 libcurl.so.4 usr/bin/spotify \
81 + || die "failed to patch libcurl library dependency"
82 +}
83 +
84 +src_install() {
85 + gunzip usr/share/doc/spotify-client/changelog.gz || die
86 + dodoc usr/share/doc/spotify-client/changelog
87 +
88 + SPOTIFY_PKG_HOME=usr/share/spotify
89 + insinto /usr/share/pixmaps
90 + doins ${SPOTIFY_PKG_HOME}/icons/*.png
91 +
92 + # install in /opt/spotify
93 + SPOTIFY_HOME=/opt/spotify/spotify-client
94 + insinto ${SPOTIFY_HOME}
95 + doins -r ${SPOTIFY_PKG_HOME}/*
96 + fperms +x ${SPOTIFY_HOME}/spotify
97 +
98 + dodir /usr/bin
99 + cat <<-EOF >"${D}"/usr/bin/spotify || die
100 + #! /bin/sh
101 + LD_LIBRARY_PATH="/usr/$(get_libdir)/apulse" \\
102 + exec ${SPOTIFY_HOME}/spotify "\$@"
103 + EOF
104 + fperms +x /usr/bin/spotify
105 +
106 + local size
107 + for size in 16 22 24 32 48 64 128 256 512; do
108 + newicon -s ${size} "${S}${SPOTIFY_PKG_HOME}/icons/spotify-linux-${size}.png" \
109 + "spotify-client.png"
110 + done
111 + domenu "${S}${SPOTIFY_PKG_HOME}/spotify.desktop"
112 + if use pax_kernel; then
113 + #create the headers, reset them to default, then paxmark -m them
114 + pax-mark C "${ED}${SPOTIFY_HOME}/${PN}" || die
115 + pax-mark z "${ED}${SPOTIFY_HOME}/${PN}" || die
116 + pax-mark m "${ED}${SPOTIFY_HOME}/${PN}" || die
117 + eqawarn "You have set USE=pax_kernel meaning that you intend to run"
118 + eqawarn "${PN} under a PaX enabled kernel. To do so, we must modify"
119 + eqawarn "the ${PN} binary itself and this *may* lead to breakage! If"
120 + eqawarn "you suspect that ${PN} is being broken by this modification,"
121 + eqawarn "please open a bug."
122 + fi
123 +}
124 +
125 +pkg_postinst() {
126 + xdg_pkg_postinst
127 +
128 + ewarn "If Spotify crashes after an upgrade its cache may be corrupt."
129 + ewarn "To remove the cache:"
130 + ewarn "rm -rf ~/.cache/spotify"
131 +}