diff --git a/kodi-gbm/.signature b/kodi-gbm/.signature index 161863efe..41ec08984 100644 --- a/kodi-gbm/.signature +++ b/kodi-gbm/.signature @@ -1,9 +1,10 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3zY/cwKuiybXDzo2RjJiS6J8HVj2aOyKQsHScAQs5PHi5Y/w0m+kNkfXN8PXQlHqigdi5b329mYxicP90nR0/g4= -SHA256 (Pkgfile) = 225da430e6e4d41c8b3b9f479a33516e0678426c4202bde97d9a52ab1f88a9bd +RWSagIOpLGJF3z1y4YswsrANrvmwUpT1LQYTVi5+zEiBsZLqaSAqCjGsQHRPNDppLDLLjkut5+zh7AlPerHbes1Z3b/WzE+gxwA= +SHA256 (Pkgfile) = 585ae594b46012e628b52062a7884ed4aa28ae529b4030e41c583b1d71d5cebd SHA256 (.footprint) = e130bcf8d996eeb4e3a3047bfb990ae29c30040cd31abcb3e9d3c0796c949563 SHA256 (xbmc-20.3-Nexus.tar.gz) = 1dbf1d9f4d5eeeb6aa2593813703343a8a377e88a00c68226354e4d67467f64d SHA256 (ffmpeg-4.4.1-Nexus-Alpha1.tar.gz) = abbce62231baffe237e412689c71ffe01bfc83135afd375f1e538caae87729ed SHA256 (kodi-libdvdcss-1.4.3-Next-Nexus-Alpha2-2.tar.gz) = f38c4a4e7a4f4da6d8e83b8852489aa3bb6588a915dc41f5ee89d9aad305a06e SHA256 (kodi-libdvdnav-6.1.1-Next-Nexus-Alpha2-2.tar.gz) = 584f62a3896794408d46368e2ecf2c6217ab9c676ce85921b2d68b8961f49dfc SHA256 (kodi-libdvdread-6.1.3-Next-Nexus-Alpha2-2.tar.gz) = 719130091e3adc9725ba72df808f24a14737a009dca5a4c38c601c0c76449b62 +SHA256 (taglib.patch) = dc77cc0ba8eddef7b75b586b541e00c78db58d002e9928fdde6e9b34e5360cc7 diff --git a/kodi-gbm/Pkgfile b/kodi-gbm/Pkgfile index 85423860f..a99eaba4e 100644 --- a/kodi-gbm/Pkgfile +++ b/kodi-gbm/Pkgfile @@ -6,7 +6,7 @@ name=kodi-gbm version=20.3 -release=1 +release=2 # version variables {{{ _codename=Nexus @@ -20,7 +20,8 @@ source=(https://github.com/xbmc/xbmc/archive/$version-$_codename/xbmc-$version-$ https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version/ffmpeg-$_ffmpeg_version.tar.gz https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version/${name/-gbm/}-libdvdcss-$_libdvdcss_version.tar.gz https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version/${name/-gbm/}-libdvdnav-$_libdvdnav_version.tar.gz - https://github.com/xbmc/libdvdread/archive/$_libdvdread_version/${name/-gbm}-libdvdread-$_libdvdread_version.tar.gz) + https://github.com/xbmc/libdvdread/archive/$_libdvdread_version/${name/-gbm}-libdvdread-$_libdvdread_version.tar.gz + taglib.patch) # }}} # unpack_source() {{{ unpack_source() { @@ -73,6 +74,8 @@ build() { xbmc-$version-$_codename/tools/depends/native/TexturePacker/src/autogen.sh \ xbmc-$version-$_codename/tools/depends/native/JsonSchemaBuilder/src/autogen.sh + patch -Np1 -d xbmc-$version-$_codename -i $SRC/taglib.patch + cmake -S xbmc-$version-$_codename -B build -G Ninja $KODI_EXTRA \ -D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_INSTALL_LIBDIR=lib \ diff --git a/kodi-gbm/taglib.patch b/kodi-gbm/taglib.patch new file mode 100644 index 000000000..49e43315f --- /dev/null +++ b/kodi-gbm/taglib.patch @@ -0,0 +1,337 @@ +diff --git a/xbmc/music/tags/TagLibVFSStream.cpp b/xbmc/music/tags/TagLibVFSStream.cpp +index 1d2b454abbfe3..2008aba187e73 100644 +--- a/xbmc/music/tags/TagLibVFSStream.cpp ++++ b/xbmc/music/tags/TagLibVFSStream.cpp +@@ -11,6 +11,7 @@ + + #include + ++#include + #include + + using namespace XFILE; +@@ -90,7 +91,11 @@ void TagLibVFSStream::writeBlock(const ByteVector &data) + * \note This method is slow since it requires rewriting all of the file + * after the insertion point. + */ ++#if (TAGLIB_MAJOR_VERSION >= 2) ++void TagLibVFSStream::insert(const ByteVector& data, TagLib::offset_t start, size_t replace) ++#else + void TagLibVFSStream::insert(const ByteVector &data, TagLib::ulong start, TagLib::ulong replace) ++#endif + { + if (data.size() == replace) + { +@@ -180,7 +185,11 @@ void TagLibVFSStream::insert(const ByteVector &data, TagLib::ulong start, TagLib + * \note This method is slow since it involves rewriting all of the file + * after the removed portion. + */ ++#if (TAGLIB_MAJOR_VERSION >= 2) ++void TagLibVFSStream::removeBlock(TagLib::offset_t start, size_t length) ++#else + void TagLibVFSStream::removeBlock(TagLib::ulong start, TagLib::ulong length) ++#endif + { + TagLib::ulong bufferLength = bufferSize(); + +diff --git a/xbmc/music/tags/TagLibVFSStream.h b/xbmc/music/tags/TagLibVFSStream.h +index d56705535353c..e0030103a5767 100644 +--- a/xbmc/music/tags/TagLibVFSStream.h ++++ b/xbmc/music/tags/TagLibVFSStream.h +@@ -10,6 +10,7 @@ + + #include "filesystem/File.h" + ++#include + #include + + namespace MUSIC_INFO +@@ -56,7 +57,13 @@ namespace MUSIC_INFO + * \note This method is slow since it requires rewriting all of the file + * after the insertion point. + */ ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ void insert(const TagLib::ByteVector& data, ++ TagLib::offset_t start = 0, ++ size_t replace = 0) override; ++#else + void insert(const TagLib::ByteVector &data, TagLib::ulong start = 0, TagLib::ulong replace = 0) override; ++#endif + + /*! + * Removes a block of the file starting a \a start and continuing for +@@ -65,7 +72,11 @@ namespace MUSIC_INFO + * \note This method is slow since it involves rewriting all of the file + * after the removed portion. + */ ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ void removeBlock(TagLib::offset_t start = 0, size_t length = 0) override; ++#else + void removeBlock(TagLib::ulong start = 0, TagLib::ulong length = 0) override; ++#endif + + /*! + * Returns true if the file is read only (or if the file can not be opened). + diff --git a/xbmc/music/tags/TagLoaderTagLib.cpp b/xbmc/music/tags/TagLoaderTagLib.cpp +index 6eb591a0c4b4f..c1b36318b2e0d 100644 +--- a/xbmc/music/tags/TagLoaderTagLib.cpp ++++ b/xbmc/music/tags/TagLoaderTagLib.cpp +@@ -500,19 +500,19 @@ bool CTagLoaderTagLib::ParseTag(APE::Tag *ape, EmbeddedArt *art, CMusicInfoTag& + for (APE::ItemListMap::ConstIterator it = itemListMap.begin(); it != itemListMap.end(); ++it) + { + if (it->first == "ARTIST") +- SetArtist(tag, StringListToVectorString(it->second.toStringList())); ++ SetArtist(tag, StringListToVectorString(it->second.values())); + else if (it->first == "ARTISTSORT") +- SetArtistSort(tag, StringListToVectorString(it->second.toStringList())); ++ SetArtistSort(tag, StringListToVectorString(it->second.values())); + else if (it->first == "ARTISTS") +- SetArtistHints(tag, StringListToVectorString(it->second.toStringList())); ++ SetArtistHints(tag, StringListToVectorString(it->second.values())); + else if (it->first == "ALBUMARTIST" || it->first == "ALBUM ARTIST") +- SetAlbumArtist(tag, StringListToVectorString(it->second.toStringList())); ++ SetAlbumArtist(tag, StringListToVectorString(it->second.values())); + else if (it->first == "ALBUMARTISTSORT") +- SetAlbumArtistSort(tag, StringListToVectorString(it->second.toStringList())); ++ SetAlbumArtistSort(tag, StringListToVectorString(it->second.values())); + else if (it->first == "ALBUMARTISTS" || it->first == "ALBUM ARTISTS") +- SetAlbumArtistHints(tag, StringListToVectorString(it->second.toStringList())); ++ SetAlbumArtistHints(tag, StringListToVectorString(it->second.values())); + else if (it->first == "COMPOSERSORT") +- SetComposerSort(tag, StringListToVectorString(it->second.toStringList())); ++ SetComposerSort(tag, StringListToVectorString(it->second.values())); + else if (it->first == "ALBUM") + tag.SetAlbum(it->second.toString().to8Bit(true)); + else if (it->first == "TITLE") +@@ -528,7 +528,7 @@ bool CTagLoaderTagLib::ParseTag(APE::Tag *ape, EmbeddedArt *art, CMusicInfoTag& + else if (it->first == "ORIGINALYEAR") + tag.SetOriginalDate(it->second.toString().to8Bit(true)); + else if (it->first == "GENRE") +- SetGenre(tag, StringListToVectorString(it->second.toStringList())); ++ SetGenre(tag, StringListToVectorString(it->second.values())); + else if (it->first == "MOOD") + tag.SetMood(it->second.toString().to8Bit(true)); + else if (it->first == "COMMENT") +@@ -538,32 +538,32 @@ bool CTagLoaderTagLib::ParseTag(APE::Tag *ape, EmbeddedArt *art, CMusicInfoTag& + else if (it->first == "ENCODEDBY") + {} + else if (it->first == "COMPOSER") +- AddArtistRole(tag, "Composer", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Composer", StringListToVectorString(it->second.values())); + else if (it->first == "CONDUCTOR") +- AddArtistRole(tag, "Conductor", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Conductor", StringListToVectorString(it->second.values())); + else if (it->first == "BAND") +- AddArtistRole(tag, "Band", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Band", StringListToVectorString(it->second.values())); + else if (it->first == "ENSEMBLE") +- AddArtistRole(tag, "Ensemble", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Ensemble", StringListToVectorString(it->second.values())); + else if (it->first == "LYRICIST") +- AddArtistRole(tag, "Lyricist", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Lyricist", StringListToVectorString(it->second.values())); + else if (it->first == "WRITER") +- AddArtistRole(tag, "Writer", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Writer", StringListToVectorString(it->second.values())); + else if ((it->first == "MIXARTIST") || (it->first == "REMIXER")) +- AddArtistRole(tag, "Remixer", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Remixer", StringListToVectorString(it->second.values())); + else if (it->first == "ARRANGER") +- AddArtistRole(tag, "Arranger", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Arranger", StringListToVectorString(it->second.values())); + else if (it->first == "ENGINEER") +- AddArtistRole(tag, "Engineer", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Engineer", StringListToVectorString(it->second.values())); + else if (it->first == "PRODUCER") +- AddArtistRole(tag, "Producer", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Producer", StringListToVectorString(it->second.values())); + else if (it->first == "DJMIXER") +- AddArtistRole(tag, "DJMixer", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "DJMixer", StringListToVectorString(it->second.values())); + else if (it->first == "MIXER") +- AddArtistRole(tag, "Mixer", StringListToVectorString(it->second.toStringList())); ++ AddArtistRole(tag, "Mixer", StringListToVectorString(it->second.values())); + else if (it->first == "PERFORMER") + // Picard uses PERFORMER tag as musician credits list formatted "name (instrument)" +- AddArtistInstrument(tag, StringListToVectorString(it->second.toStringList())); ++ AddArtistInstrument(tag, StringListToVectorString(it->second.values())); + else if (it->first == "LABEL") + tag.SetRecordLabel(it->second.toString().to8Bit(true)); + else if (it->first == "COMPILATION") +@@ -579,11 +579,11 @@ bool CTagLoaderTagLib::ParseTag(APE::Tag *ape, EmbeddedArt *art, CMusicInfoTag& + else if (it->first == "REPLAYGAIN_ALBUM_PEAK") + replayGainInfo.ParsePeak(ReplayGain::ALBUM, it->second.toString().toCString(true)); + else if (it->first == "MUSICBRAINZ_ARTISTID") +- tag.SetMusicBrainzArtistID(SplitMBID(StringListToVectorString(it->second.toStringList()))); ++ tag.SetMusicBrainzArtistID(SplitMBID(StringListToVectorString(it->second.values()))); + else if (it->first == "MUSICBRAINZ_ALBUMARTISTID") +- tag.SetMusicBrainzAlbumArtistID(SplitMBID(StringListToVectorString(it->second.toStringList()))); ++ tag.SetMusicBrainzAlbumArtistID(SplitMBID(StringListToVectorString(it->second.values()))); + else if (it->first == "MUSICBRAINZ_ALBUMARTIST") +- SetAlbumArtist(tag, StringListToVectorString(it->second.toStringList())); ++ SetAlbumArtist(tag, StringListToVectorString(it->second.values())); + else if (it->first == "MUSICBRAINZ_ALBUMID") + tag.SetMusicBrainzAlbumID(it->second.toString().to8Bit(true)); + else if (it->first == "MUSICBRAINZ_RELEASEGROUPID") +@@ -591,7 +591,7 @@ bool CTagLoaderTagLib::ParseTag(APE::Tag *ape, EmbeddedArt *art, CMusicInfoTag& + else if (it->first == "MUSICBRAINZ_TRACKID") + tag.SetMusicBrainzTrackID(it->second.toString().to8Bit(true)); + else if (it->first == "MUSICBRAINZ_ALBUMTYPE") +- SetReleaseType(tag, StringListToVectorString(it->second.toStringList())); ++ SetReleaseType(tag, StringListToVectorString(it->second.values())); + else if (it->first == "BPM") + tag.SetBPM(it->second.toString().toInt()); + else if (it->first == "MUSICBRAINZ_ALBUMSTATUS") +diff --git a/xbmc/music/tags/TagLibVFSStream.cpp b/xbmc/music/tags/TagLibVFSStream.cpp +index 2008aba187e73..c5f9c2473fe13 100644 +--- a/xbmc/music/tags/TagLibVFSStream.cpp ++++ b/xbmc/music/tags/TagLibVFSStream.cpp +@@ -58,9 +58,17 @@ FileName TagLibVFSStream::name() const + /*! + * Reads a block of size \a length at the current get pointer. + */ ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ByteVector TagLibVFSStream::readBlock(unsigned long length) ++#else + ByteVector TagLibVFSStream::readBlock(TagLib::ulong length) ++#endif + { ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ ByteVector byteVector(static_cast(length)); ++#else + ByteVector byteVector(static_cast(length)); ++#endif + ssize_t read = m_file.Read(byteVector.data(), length); + if (read > 0) + byteVector.resize(read); +@@ -119,7 +127,11 @@ void TagLibVFSStream::insert(const ByteVector &data, TagLib::ulong start, TagLib + // First, make sure that we're working with a buffer that is longer than + // the *difference* in the tag sizes. We want to avoid overwriting parts + // that aren't yet in memory, so this is necessary. ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ unsigned long bufferLength = bufferSize(); ++#else + TagLib::ulong bufferLength = bufferSize(); ++#endif + + while (data.size() - replace > bufferLength) + bufferLength += bufferSize(); +@@ -128,7 +140,11 @@ void TagLibVFSStream::insert(const ByteVector &data, TagLib::ulong start, TagLib + long readPosition = start + replace; + long writePosition = start; + ByteVector buffer; ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ ByteVector aboutToOverwrite(static_cast(bufferLength)); ++#else + ByteVector aboutToOverwrite(static_cast(bufferLength)); ++#endif + + // This is basically a special case of the loop below. Here we're just + // doing the same steps as below, but since we aren't using the same buffer +@@ -163,7 +179,11 @@ void TagLibVFSStream::insert(const ByteVector &data, TagLib::ulong start, TagLib + + // Check to see if we just read the last block. We need to call clear() + // if we did so that the last write succeeds. ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ if (static_cast(bytesRead) < bufferLength) ++#else + if (TagLib::ulong(bytesRead) < bufferLength) ++#endif + clear(); + + // Seek to the write position and write our buffer. Increment the +@@ -191,14 +211,26 @@ void TagLibVFSStream::removeBlock(TagLib::offset_t start, size_t length) + void TagLibVFSStream::removeBlock(TagLib::ulong start, TagLib::ulong length) + #endif + { ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ unsigned long bufferLength = bufferSize(); ++#else + TagLib::ulong bufferLength = bufferSize(); ++#endif + + long readPosition = start + length; + long writePosition = start; + ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ ByteVector buffer(static_cast(bufferLength)); ++#else + ByteVector buffer(static_cast(bufferLength)); ++#endif + ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ unsigned long bytesRead = 1; ++#else + TagLib::ulong bytesRead = 1; ++#endif + + while(bytesRead != 0) + { +@@ -207,7 +239,11 @@ void TagLibVFSStream::removeBlock(TagLib::ulong start, TagLib::ulong length) + if (read < 0) + return;// explicit error + ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ bytesRead = static_cast(read); ++#else + bytesRead = static_cast(read); ++#endif + readPosition += bytesRead; + + // Check to see if we just read the last block. We need to call clear() +diff --git a/xbmc/music/tags/TagLibVFSStream.h b/xbmc/music/tags/TagLibVFSStream.h +index e0030103a5767..2302c04dd92bd 100644 +--- a/xbmc/music/tags/TagLibVFSStream.h ++++ b/xbmc/music/tags/TagLibVFSStream.h +@@ -37,7 +37,11 @@ namespace MUSIC_INFO + /*! + * Reads a block of size \a length at the current get pointer. + */ ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ TagLib::ByteVector readBlock(unsigned long length) override; ++#else + TagLib::ByteVector readBlock(TagLib::ulong length) override; ++#endif + + /*! + * Attempts to write the block \a data at the current get pointer. If the +@@ -121,7 +125,11 @@ namespace MUSIC_INFO + /*! + * Returns the buffer size that is used for internal buffering. + */ ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ static unsigned int bufferSize() { return 1024; } ++#else + static TagLib::uint bufferSize() { return 1024; } ++#endif + + private: + std::string m_strFileName; +diff --git a/xbmc/music/tags/TagLoaderTagLib.cpp b/xbmc/music/tags/TagLoaderTagLib.cpp +index c1b36318b2e0d..f4f676067a24c 100644 +--- a/xbmc/music/tags/TagLoaderTagLib.cpp ++++ b/xbmc/music/tags/TagLoaderTagLib.cpp +@@ -472,7 +472,11 @@ bool CTagLoaderTagLib::ParseTag(ID3v2::Tag *id3v2, EmbeddedArt *art, MUSIC_INFO: + if (picture) + { + std::string mime = picture->mimeType().to8Bit(true); ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ unsigned int size = picture->picture().size(); ++#else + TagLib::uint size = picture->picture().size(); ++#endif + tag.SetCoverArtInfo(size, mime); + if (art) + art->Set(reinterpret_cast(picture->picture().data()), size, mime); +@@ -789,7 +793,11 @@ bool CTagLoaderTagLib::ParseTag(Ogg::XiphComment *xiph, EmbeddedArt *art, CMusic + std::string mime = pictures[i].mimeType().toCString(); + if (mime.compare(0, 6, "image/") != 0) + continue; ++#if (TAGLIB_MAJOR_VERSION >= 2) ++ unsigned int size = pictures[i].data().size(); ++#else + TagLib::uint size = pictures[i].data().size(); ++#endif + tag.SetCoverArtInfo(size, mime); + if (art) + art->Set(reinterpret_cast(pictures[i].data().data()), size, mime);