kodi-wayland: 20.4 -> 20.5

This commit is contained in:
Tim Biermann 2024-03-03 14:43:33 +01:00
parent 06629c9d72
commit 6499a0bbe7
Signed by: tb
GPG Key ID: 42F8B4E30B673606
3 changed files with 6 additions and 346 deletions

View File

@ -1,11 +1,10 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF35nxLzwzTjRSAiUp3Um0Lf5ZFFtwQjW+0/9Jk4ToFejIlo4CXlKW+ehKQUqoD4HrH2jiuBqNvlmCYTzxmYHdTwQ=
SHA256 (Pkgfile) = 4c2a6462bd339db25deb05bd06d42726ab908b377a598248befcc68637e8ec31
RWSagIOpLGJF31XEte+1ZnKYKTefaza5Ex8VoYsXQdpK84LOIpErjylHB9gU3mrx91oS+24ussqYyTF2i3XZ3ZHDjUmuTAdElA4=
SHA256 (Pkgfile) = 704fe5ab1eed240e32030e698f8dd664c189a358a1b1c792f8f116b8b431aecc
SHA256 (.footprint) = b7344ab259de5a27ce4cae98f25bc6ff4a07609b949d8813bc71eefc64572440
SHA256 (xbmc-20.4-Nexus.tar.gz) = ccb2d3e382b5ae628a89db2325f5e778f1770a2a182f6eaa25645a22ccdffb18
SHA256 (xbmc-20.5-Nexus.tar.gz) = 9bf3257ebf251d20f276b7f90681985a270779150af2fb395d4b593c04002deb
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 (swig-4.2.0.patch) = 27909339dffbf08cc900514fb883291efb7f5b21648fcb09300629a3efd4fadb
SHA256 (taglib.patch) = dc77cc0ba8eddef7b75b586b541e00c78db58d002e9928fdde6e9b34e5360cc7

View File

@ -5,8 +5,8 @@
# Optional: alsa-lib avahi bluez dav1d libmicrohttpd libnfs libva libva-vdpau-driver libxslt mariadb mysql pipewire pulseaudio
name=kodi-wayland
version=20.4
release=2
version=20.5
release=1
# version variables {{{
_codename=Nexus
@ -21,8 +21,7 @@ source=(https://github.com/xbmc/xbmc/archive/$version-$_codename/xbmc-$version-$
https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version/${name/-wayland/}-libdvdcss-$_libdvdcss_version.tar.gz
https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version/${name/-wayland/}-libdvdnav-$_libdvdnav_version.tar.gz
https://github.com/xbmc/libdvdread/archive/$_libdvdread_version/${name/-wayland/}-libdvdread-$_libdvdread_version.tar.gz
swig-4.2.0.patch
taglib.patch)
swig-4.2.0.patch)
# }}}
# unpack_source() {{{
unpack_source() {
@ -73,7 +72,6 @@ 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
patch -Np1 -d xbmc-$version-$_codename -i $SRC/swig-4.2.0.patch
cmake -S xbmc-$version-$_codename -B build -G Ninja $KODI_EXTRA \

View File

@ -1,337 +0,0 @@
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 <limits.h>
+#include <taglib/taglib.h>
#include <taglib/tiostream.h>
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 <taglib/taglib.h>
#include <taglib/tiostream.h>
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<unsigned int>(length));
+#else
ByteVector byteVector(static_cast<TagLib::uint>(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<unsigned int>(bufferLength));
+#else
ByteVector aboutToOverwrite(static_cast<TagLib::uint>(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<unsigned long>(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<unsigned int>(bufferLength));
+#else
ByteVector buffer(static_cast<TagLib::uint>(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<unsigned long>(read);
+#else
bytesRead = static_cast<TagLib::ulong>(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<const uint8_t*>(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<const uint8_t*>(pictures[i].data().data()), size, mime);