diff options
Diffstat (limited to 'media-sound/cantata')
-rw-r--r-- | media-sound/cantata/Manifest | 2 | ||||
-rw-r--r-- | media-sound/cantata/cantata-2.5.0-r3.ebuild | 117 | ||||
-rw-r--r-- | media-sound/cantata/files/cantata-2.5.0-fix-build-taglib2.patch | 42 |
3 files changed, 161 insertions, 0 deletions
diff --git a/media-sound/cantata/Manifest b/media-sound/cantata/Manifest index a4bcbd3f7e04..13a130e1ee15 100644 --- a/media-sound/cantata/Manifest +++ b/media-sound/cantata/Manifest @@ -1,4 +1,6 @@ AUX cantata-2.2.0-headers.patch 1345 BLAKE2B b11ef0fa85f0e851a812ba2b106a854f7c429ac9f757bb0b33edeab9db8f05779815ca22918811852ba895529eb7e38466057215c124c3889b97a55752ad6428 SHA512 e9c1a3fc756bd3ed37bd8729433d48d4bb652d3fd7d95b3a6024b4b1d6cda72205d1326214b283377a1ee0b376fe1199c351006e8e640ed6ca9ed98f74c1b7df +AUX cantata-2.5.0-fix-build-taglib2.patch 2182 BLAKE2B 053d5e8e2a111b0944732e8cc5240f78763b8bdeec0544e5e806ec10876eef608875f77264837cc83a6418fa2a397d46e4396f8bee8fd94c3e080594c963a68b SHA512 bb5c2a712c3bf5cdb1e274470b184b66e243debf768f7286d636b9556991a973c718e8cda693ae8a308d95c0d006dbffbfc13f34a6e8b83f25282aae150dff1b DIST cantata-2.5.0.tar.bz2 2487031 BLAKE2B ad77987aae205695393a4fc782dc442a467ca392ce60251efdc68d12d29b3d2f24270f462a0dbfe0c375905f9356b8c649ff139021629ba58fd7de80819fdba0 SHA512 42f28321d01e0bc3a315030066b738dead8f8f8caed8c1115729a3d370d68d9d845f00576fc81ddba694bba6a4ae57c3f7de714b2e39874458548c3e5bb8b2d2 EBUILD cantata-2.5.0-r2.ebuild 3027 BLAKE2B 991603af35e393ce1c18cd05ae56877eb5427892ca5c32df9c4de59e9d53f7c3b92ac9eea482bc56096d8e37071896434f54d855613194581ad186d88ed2f650 SHA512 8c5d32d685400a295cbd290e142197f73b9471d44a2a8451a91736094227df6a66468016a6aa709a271006091cfebe6bde49976b88fd97d1819b1a62b5758d2b +EBUILD cantata-2.5.0-r3.ebuild 3029 BLAKE2B b602e63e269cf030e5530e8dc1b7d9d8fe55174918b2f23ce2cadf5cd588b9ccaa0f9342eeed20e07a3a35e72279e23947d6e870d948e7f8893e87a46ae59f39 SHA512 77bc72e443b67c56a88da45df3baf7641a6ed99b159a617c763ee02eb8488ab92086d756e784675178a22647a744963d1b82527d2e3d00e87aa01bace9ceeaac MISC metadata.xml 740 BLAKE2B 20184d3cb15c328f809d6d182cd2a9c93df568e0cdcdd74aec83e0a2d66424da412d7b1432212e70857af62c49da2ca390070b452d34e50ecf7f91d2ab782582 SHA512 f9d6d49ab1977f21a8014acc34cab6334c9e3e7d9524d021f821ee20ad38d55dc47274986759f458d1f495b91b4dce0a95e6ff4b23ddf8375514e8b7e8e0165c diff --git a/media-sound/cantata/cantata-2.5.0-r3.ebuild b/media-sound/cantata/cantata-2.5.0-r3.ebuild new file mode 100644 index 000000000000..139eb5c102bd --- /dev/null +++ b/media-sound/cantata/cantata-2.5.0-r3.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PLOCALES="cs da de en_GB es fi fr hu it ja ko nl pl pt_BR ru zh_CN" +inherit cmake plocale xdg + +DESCRIPTION="Featureful and configurable Qt client for the music player daemon (MPD)" +HOMEPAGE="https://github.com/CDrummond/cantata" +SRC_URI="https://github.com/CDrummond/${PN}/releases/download/v${PV}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="cdda cddb cdio http-server mtp musicbrainz replaygain streaming taglib udisks zeroconf" +REQUIRED_USE=" + ?? ( cdda cdio ) + cdda? ( udisks || ( cddb musicbrainz ) ) + cddb? ( || ( cdio cdda ) taglib ) + cdio? ( udisks || ( cddb musicbrainz ) ) + mtp? ( taglib udisks ) + musicbrainz? ( || ( cdio cdda ) taglib ) + replaygain? ( taglib ) +" +# cantata has no tests +RESTRICT="test" + +COMMON_DEPEND=" + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtsql:5[sqlite] + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + sys-libs/zlib + virtual/libudev:= + cdda? ( media-sound/cdparanoia ) + cddb? ( media-libs/libcddb ) + cdio? ( dev-libs/libcdio-paranoia:= ) + mtp? ( media-libs/libmtp:= ) + musicbrainz? ( media-libs/musicbrainz:5= ) + replaygain? ( + media-libs/libebur128:= + media-sound/mpg123 + media-video/ffmpeg:0= + ) + streaming? ( dev-qt/qtmultimedia:5 ) + taglib? ( + media-libs/taglib:=[asf(+),mp4(+)] + udisks? ( sys-fs/udisks:2 ) + ) + zeroconf? ( net-dns/avahi ) +" +RDEPEND="${COMMON_DEPEND} + dev-lang/perl[perl_features_ithreads] + || ( kde-frameworks/breeze-icons:* kde-frameworks/oxygen-icons:* ) +" +DEPEND="${COMMON_DEPEND} + dev-qt/qtconcurrent:5 +" +BDEPEND="dev-qt/linguist-tools:5" + +PATCHES=( + "${FILESDIR}/${PN}-2.2.0-headers.patch" + "${FILESDIR}/${PN}-2.5.0-fix-build-taglib2.patch" +) + +src_prepare() { + remove_locale() { + rm "translations/${PN}_${1}".ts || die + } + + cmake_src_prepare + + # Unbundle 3rd party libs + rm -r 3rdparty/{ebur128,qtsingleapplication} || die + + plocale_find_changes "translations" "${PN}_" ".ts" + plocale_for_each_disabled_locale remove_locale +} + +src_configure() { + local mycmakeargs=( + -DCANTATA_HELPERS_LIB_DIR="$(get_libdir)" + -DENABLE_CDPARANOIA=$(usex cdda) + -DENABLE_CDDB=$(usex cddb) + -DENABLE_CDIOPARANOIA=$(usex cdio) + -DENABLE_HTTP_SERVER=$(usex http-server) + -DENABLE_MTP=$(usex mtp) + -DENABLE_MUSICBRAINZ=$(usex musicbrainz) + -DENABLE_FFMPEG=$(usex replaygain) + -DENABLE_MPG123=$(usex replaygain) + -DENABLE_HTTP_STREAM_PLAYBACK=$(usex streaming) + -DENABLE_TAGLIB=$(usex taglib) + -DENABLE_DEVICES_SUPPORT=$(usex udisks) + -DENABLE_AVAHI=$(usex zeroconf) + -DENABLE_REMOTE_DEVICES=OFF + -DENABLE_UDISKS2=ON + ) + + cmake_src_configure +} + +pkg_postinst() { + xdg_pkg_postinst + + has_version media-sound/mpd || \ + elog "An instance of media-sound/mpd, local or remote, is required to set up Cantata." + + if ! has_version app-misc/media-player-info; then + elog "Install app-misc/media-player-info to enable identification" + elog "and querying of portable media players" + fi +} diff --git a/media-sound/cantata/files/cantata-2.5.0-fix-build-taglib2.patch b/media-sound/cantata/files/cantata-2.5.0-fix-build-taglib2.patch new file mode 100644 index 000000000000..c0cc7490b18d --- /dev/null +++ b/media-sound/cantata/files/cantata-2.5.0-fix-build-taglib2.patch @@ -0,0 +1,42 @@ +patch from fork as official is archived +https://github.com/nullobsi/cantata/commit/45bac9eb3e99ed75b6539f92418556dac1c0193d.patch +diff --git a/tags/tags.cpp b/tags/tags.cpp +index ce86a1e8..5817dc1b 100644 +--- a/tags/tags.cpp ++++ b/tags/tags.cpp +@@ -619,7 +619,7 @@ static void readAPETags(TagLib::APE::Tag *tag, Song *song, ReplayGain *rg, QImag + if (map.contains("COVER ART (FRONT)")) { + const TagLib::ByteVector nullStringTerminator(1, 0); + +- TagLib::ByteVector item = map["COVER ART (FRONT)"].value(); ++ TagLib::ByteVector item = map["COVER ART (FRONT)"].binaryData(); + int pos = item.find(nullStringTerminator); // Skip the filename + + if (++pos > 0) { +@@ -1301,7 +1301,7 @@ static void readTags(const TagLib::FileRef fileref, Song *song, ReplayGain *rg, + } + } else if (TagLib::RIFF::WAV::File *file = dynamic_cast< TagLib::RIFF::WAV::File * >(fileref.file())) { + if (file->tag()) { +- readID3v2Tags(file->tag(), song, rg, img, lyrics, rating); ++ readID3v2Tags(file->ID3v2Tag(), song, rg, img, lyrics, rating); + } + #ifdef TAGLIB_ASF_FOUND + } else if (TagLib::ASF::File *file = dynamic_cast< TagLib::ASF::File * >(fileref.file())) { +@@ -1419,7 +1419,7 @@ static bool writeTags(const TagLib::FileRef fileref, const Song &from, const Son + } + } else if (TagLib::RIFF::WAV::File *file = dynamic_cast< TagLib::RIFF::WAV::File * >(fileref.file())) { + if (file->tag()) { +- changed=writeID3v2Tags(file->tag(), from, to, rg, img, rating) || changed; ++ changed=writeID3v2Tags(file->ID3v2Tag(), from, to, rg, img, rating) || changed; + } + #ifdef TAGLIB_ASF_FOUND + } else if (TagLib::ASF::File *file = dynamic_cast< TagLib::ASF::File * >(fileref.file())) { +@@ -1455,7 +1455,7 @@ Song read(const QString &fileName) + + readTags(fileref, &song, nullptr, nullptr, nullptr, nullptr); + song.file=fileName; +- song.time=fileref.audioProperties() ? fileref.audioProperties()->length() : 0; ++ song.time=fileref.audioProperties() ? fileref.audioProperties()->lengthInSeconds() : 0; + return song; + } + |