Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/cantata/, media-sound/cantata/files/
Date: Sun, 17 Feb 2019 16:19:18
Message-Id: 1550419979.564cb54b235260ec1550e33bc2e4750cafc2226f.asturm@gentoo
1 commit: 564cb54b235260ec1550e33bc2e4750cafc2226f
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 17 16:11:25 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 17 16:12:59 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=564cb54b
7
8 media-sound/cantata: Fix bundled solid-lite static linking
9
10 Thanks-to: Bigos <wielkiegie <AT> gmail.com>
11 Closes: https://bugs.gentoo.org/678228
12 Package-Manager: Portage-2.3.60, Repoman-2.3.12
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 media-sound/cantata/cantata-2.3.3-r1.ebuild | 122 +++++++++++++++++++++
16 .../files/cantata-2.3.3-solidlite-static.patch | 29 +++++
17 2 files changed, 151 insertions(+)
18
19 diff --git a/media-sound/cantata/cantata-2.3.3-r1.ebuild b/media-sound/cantata/cantata-2.3.3-r1.ebuild
20 new file mode 100644
21 index 00000000000..0e490d59668
22 --- /dev/null
23 +++ b/media-sound/cantata/cantata-2.3.3-r1.ebuild
24 @@ -0,0 +1,122 @@
25 +# Copyright 1999-2019 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +PLOCALES="cs da de en_GB es fr hu it ja ko pl pt_BR ru zh_CN"
31 +inherit cmake-utils l10n qmake-utils xdg
32 +
33 +DESCRIPTION="Featureful and configurable Qt client for the music player daemon (MPD)"
34 +HOMEPAGE="https://github.com/CDrummond/cantata"
35 +SRC_URI="https://github.com/CDrummond/${PN}/releases/download/v${PV}/${P}.tar.bz2"
36 +
37 +LICENSE="GPL-2"
38 +SLOT="0"
39 +KEYWORDS="~amd64 x86"
40 +IUSE="cdda cddb cdio http-server libav mtp musicbrainz replaygain streaming taglib udisks zeroconf"
41 +REQUIRED_USE="
42 + ?? ( cdda cdio )
43 + cdda? ( udisks || ( cddb musicbrainz ) )
44 + cddb? ( || ( cdio cdda ) taglib )
45 + cdio? ( udisks || ( cddb musicbrainz ) )
46 + mtp? ( taglib udisks )
47 + musicbrainz? ( || ( cdio cdda ) taglib )
48 + replaygain? ( taglib )
49 +"
50 +
51 +BDEPEND="
52 + dev-qt/linguist-tools:5
53 +"
54 +COMMON_DEPEND="
55 + dev-qt/qtcore:5
56 + dev-qt/qtdbus:5
57 + dev-qt/qtgui:5
58 + dev-qt/qtnetwork:5
59 + dev-qt/qtsql:5[sqlite]
60 + dev-qt/qtsvg:5
61 + dev-qt/qtwidgets:5
62 + dev-qt/qtxml:5
63 + sys-libs/zlib
64 + virtual/libudev:=
65 + cdda? ( media-sound/cdparanoia )
66 + cddb? ( media-libs/libcddb )
67 + cdio? ( dev-libs/libcdio-paranoia )
68 + mtp? ( media-libs/libmtp )
69 + musicbrainz? ( media-libs/musicbrainz:5= )
70 + replaygain? (
71 + media-libs/libebur128
72 + media-sound/mpg123
73 + libav? ( media-video/libav:= )
74 + !libav? ( media-video/ffmpeg:0= )
75 + )
76 + streaming? ( dev-qt/qtmultimedia:5 )
77 + taglib? (
78 + media-libs/taglib[asf(+),mp4(+)]
79 + udisks? ( sys-fs/udisks:2 )
80 + )
81 + zeroconf? ( net-dns/avahi )
82 +"
83 +RDEPEND="${COMMON_DEPEND}
84 + dev-lang/perl[ithreads]
85 + || ( kde-frameworks/breeze-icons:5 kde-frameworks/oxygen-icons:* )
86 +"
87 +DEPEND="${COMMON_DEPEND}
88 + dev-qt/qtconcurrent:5
89 +"
90 +
91 +# cantata has no tests
92 +RESTRICT="test"
93 +
94 +PATCHES=(
95 + "${FILESDIR}/${PN}-2.2.0-headers.patch"
96 + "${FILESDIR}/${P}-solidlite-static.patch" # bug 678228
97 +)
98 +
99 +src_prepare() {
100 + remove_locale() {
101 + rm "translations/${PN}_${1}".ts || die
102 + }
103 +
104 + cmake-utils_src_prepare
105 +
106 + # Unbundle 3rd party libs
107 + rm -r 3rdparty/{ebur128,qtsingleapplication} || die
108 +
109 + l10n_find_plocales_changes "translations" "${PN}_" ".ts"
110 + l10n_for_each_disabled_locale_do remove_locale
111 +}
112 +
113 +src_configure() {
114 + local mycmakeargs=(
115 + -DCANTATA_HELPERS_LIB_DIR="$(get_libdir)"
116 + -DENABLE_CDPARANOIA=$(usex cdda)
117 + -DENABLE_CDDB=$(usex cddb)
118 + -DENABLE_CDIOPARANOIA=$(usex cdio)
119 + -DENABLE_HTTP_SERVER=$(usex http-server)
120 + -DENABLE_MTP=$(usex mtp)
121 + -DENABLE_MUSICBRAINZ=$(usex musicbrainz)
122 + -DLRELEASE_EXECUTABLE="$(qt5_get_bindir)/lrelease"
123 + -DENABLE_FFMPEG=$(usex replaygain)
124 + -DENABLE_MPG123=$(usex replaygain)
125 + -DENABLE_HTTP_STREAM_PLAYBACK=$(usex streaming)
126 + -DENABLE_TAGLIB=$(usex taglib)
127 + -DENABLE_DEVICES_SUPPORT=$(usex udisks)
128 + -DENABLE_AVAHI=$(usex zeroconf)
129 + -DENABLE_REMOTE_DEVICES=OFF
130 + -DENABLE_UDISKS2=ON
131 + )
132 +
133 + cmake-utils_src_configure
134 +}
135 +
136 +pkg_postinst() {
137 + xdg_pkg_postinst
138 +
139 + has_version media-sound/mpd || \
140 + elog "An instance of media-sound/mpd, local or remote, is required to set up Cantata."
141 +
142 + if ! has_version app-misc/media-player-info; then
143 + elog "Install app-misc/media-player-info to enable identification"
144 + elog "and querying of portable media players"
145 + fi
146 +}
147
148 diff --git a/media-sound/cantata/files/cantata-2.3.3-solidlite-static.patch b/media-sound/cantata/files/cantata-2.3.3-solidlite-static.patch
149 new file mode 100644
150 index 00000000000..891917eebcb
151 --- /dev/null
152 +++ b/media-sound/cantata/files/cantata-2.3.3-solidlite-static.patch
153 @@ -0,0 +1,29 @@
154 +From aa35362aa2835e9e2903f5f785f10402a6abd3a1 Mon Sep 17 00:00:00 2001
155 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
156 +Date: Sun, 17 Feb 2019 16:58:48 +0100
157 +Subject: [PATCH] Fix solid-lite static linking
158 +
159 +If BUILD_SHARED_LIBS is part of standard system cmake args:
160 +
161 + cantata: error while loading shared libraries: libsolidlite.so:
162 + cannot open shared object file: No such file or directory
163 +---
164 + 3rdparty/solid-lite/CMakeLists.txt | 2 +-
165 + 1 file changed, 1 insertion(+), 1 deletion(-)
166 +
167 +diff --git a/3rdparty/solid-lite/CMakeLists.txt b/3rdparty/solid-lite/CMakeLists.txt
168 +index 4ae51aab..86e37189 100644
169 +--- a/3rdparty/solid-lite/CMakeLists.txt
170 ++++ b/3rdparty/solid-lite/CMakeLists.txt
171 +@@ -202,7 +202,7 @@ if(APPLE)
172 + set(solidlite_OPTIONAL_LIBS ${IOKIT_LIBRARY})
173 + endif()
174 +
175 +-add_library(solidlite ${solidlite_LIB_SRCS})
176 ++add_library(solidlite STATIC ${solidlite_LIB_SRCS})
177 +
178 + if ( UDEV_FOUND )
179 + set(solidlite_OPTIONAL_LIBS ${solidlite_OPTIONAL_LIBS} ${UDEV_LIBS})
180 +--
181 +2.20.1
182 +