kodi: updated to version 20.5

This commit is contained in:
Matt Housh 2024-03-04 16:31:44 -06:00
parent d313802348
commit e7ffd915ee
Signed by: jaeger
GPG Key ID: F9DE89ED1BFADFD7
3 changed files with 31 additions and 370 deletions

View File

@ -1,8 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF39HKQfvE9EV0+ByOQ6kVIfnfN9TgLy9ECsfEIT49lSj6XSXm4w4kgfQTZA9lgd5NszJ525LX6TP4olpDKLNfvgI=
SHA256 (Pkgfile) = 8d526e5f57f9b41235d51abc3ff8e7f073bdf16770c0300aef9d1741ae33eb75
RWSagIOpLGJF34cPj3WTa9xo0ZwcVQt/A3U63mQSuxL/bIYI76tPzoVH9bK8HbW25R0XcW4vVeWN5w5FpzNztNK9kzXdKrheEg0=
SHA256 (Pkgfile) = b232955e325627a2d5c53bc942bdf37ccb6aa9c28e6fb594f8a4bb73458a8d65
SHA256 (.footprint) = 0a92bc1aa49557700a76f8e88a91666e11d107b6c35134a4939f3f1fae16afbf
SHA256 (kodi-20.4.tar.gz) = ccb2d3e382b5ae628a89db2325f5e778f1770a2a182f6eaa25645a22ccdffb18
SHA256 (kodi-20.5.tar.gz) = 9bf3257ebf251d20f276b7f90681985a270779150af2fb395d4b593c04002deb
SHA256 (gl-headers.patch) = 6fa089625184b2b47bea7a3dcb349931e9b39681df9d84fd690a1ba848460168
SHA256 (taglib.patch) = dc77cc0ba8eddef7b75b586b541e00c78db58d002e9928fdde6e9b34e5360cc7
SHA256 (swig-4.2.0.patch) = 27909339dffbf08cc900514fb883291efb7f5b21648fcb09300629a3efd4fadb

View File

@ -4,41 +4,40 @@
# Depends on: cmake fmt ghostscript giflib glu openjdk17-jdk libass libcdio libmicrohttpd mariadb samba swig taglib tinyxml spdlog libva libvdpau libdvdnav xkeyboard-config
name=kodi
version=20.4
version=20.5
release=1
source=(https://github.com/xbmc/xbmc/archive/$version-Nexus/$name-$version.tar.gz gl-headers.patch \
taglib.patch swig-4.2.0.patch)
swig-4.2.0.patch)
build() {
export PATH="/usr/lib/java/openjdk17-jdk/bin:$PATH"
export PATH="/usr/lib/java/openjdk17-jdk/bin:$PATH"
[[ -e /usr/lib/ccache ]] && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
[[ -e /usr/lib/ccache ]] && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
patch -d xbmc-$version-Nexus -p1 -i $SRC/gl-headers.patch
patch -d xbmc-$version-Nexus -p1 -i $SRC/taglib.patch
patch -d xbmc-$version-Nexus -p1 -i $SRC/swig-4.2.0.patch
patch -d xbmc-$version-Nexus -p1 -i $SRC/gl-headers.patch
patch -d xbmc-$version-Nexus -p1 -i $SRC/swig-4.2.0.patch
cmake -Bbuild \
-DVERBOSE=ON \
-DAPP_RENDER_SYSTEM=gl \
-DCORE_PLATFORM_NAME=x11 \
-DENABLE_DVDCSS=ON \
-DENABLE_OPTICAL=ON \
-DENABLE_PYTHON=ON \
-DENABLE_INTERNAL_FFMPEG=ON \
-DENABLE_INTERNAL_FLATBUFFERS=ON \
-DENABLE_INTERNAL_FSTRCMP=ON \
-DENABLE_INTERNAL_RapidJSON=ON \
-DENABLE_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
-Wno-dev \
xbmc-$version-Nexus
cmake --build build
DESTDIR=$PKG cmake --install build
cmake -Bbuild \
-DVERBOSE=ON \
-DAPP_RENDER_SYSTEM=gl \
-DCORE_PLATFORM_NAME=x11 \
-DENABLE_DVDCSS=ON \
-DENABLE_OPTICAL=ON \
-DENABLE_PYTHON=ON \
-DENABLE_INTERNAL_FFMPEG=ON \
-DENABLE_INTERNAL_FLATBUFFERS=ON \
-DENABLE_INTERNAL_FSTRCMP=ON \
-DENABLE_INTERNAL_RapidJSON=ON \
-DENABLE_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
-Wno-dev \
xbmc-$version-Nexus
cmake --build build
DESTDIR=$PKG cmake --install build
find $PKG -name "README*" -delete
find $PKG -name "README*" -delete
}

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);