summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMihkel Tõnnov2024-02-04 14:11:11 +0100
committerMihkel Tõnnov2024-02-04 14:19:29 +0100
commitf3d14e115601ecdfa06f9ad533684e892f7e4a72 (patch)
treeae903bc2f2caba94dbdfb972a5e02fae5c88fd17
parent3480c2e50f3ef55cf0331077b45c0c55f9d48a38 (diff)
downloadaur-f3d14e115601ecdfa06f9ad533684e892f7e4a72.tar.gz
Fix build with TagLib 2
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD58
-rw-r--r--taglib2.diff189
3 files changed, 241 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5914b875b543..990698da2191 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = amarok-git
pkgdesc = The powerful music player for KDE
- pkgver = 2.9.71.r309.g26fed89
- pkgrel = 1
+ pkgver = 2.9.71.r319.b592705a6c
+ pkgrel = 2
url = http://amarok.kde.org
arch = i686
arch = x86_64
@@ -11,28 +11,41 @@ pkgbase = amarok-git
makedepends = git
makedepends = extra-cmake-modules
makedepends = kdoctools5
+ makedepends = gdk-pixbuf2
+ makedepends = knotifyconfig5
+ makedepends = libmtp
+ makedepends = libgpod
+ makedepends = loudmouth
+ makedepends = libmygpo-qt5
depends = threadweaver5
depends = qt5-webengine
depends = phonon-qt5
depends = qt5-declarative
+ depends = qt5-script
depends = kcmutils5
depends = knewstuff5
depends = ktexteditor5
depends = kdnssd5
+ depends = kirigami2
+ depends = mariadb
depends = libmariadbclient
depends = fftw
depends = liblastfm-qt5
depends = ffmpeg
- depends = kirigami2
- optdepends = libgpod: support for Apple iPod audio devices
+ depends = taglib
+ depends = libofa
optdepends = libmtp: support for portable media devices
+ optdepends = ifuse: support for Apple iPod Touch and iPhone
+ optdepends = libgpod: support for Apple iPod audio devices
optdepends = loudmouth: backend needed by mp3tunes for syncing
optdepends = libmygpo-qt5: gpodder.net Internet Service
optdepends = gmock: tests
- optdepends = taglib-extras: Additional taglib functionality
provides = amarok
conflicts = amarok
+ conflicts = taglib-extras
source = git+https://invent.kde.org/multimedia/amarok.git
+ source = taglib2.diff
sha512sums = SKIP
+ sha512sums = 8f57e97c334e09c490b2c38c6ecbeda2fbf05d109098a10e924fa72ab13768425c9b89f5ecf47ba197169854f9e19dd626c4454d7500ea36d72805555b852f8e
pkgname = amarok-git
diff --git a/PKGBUILD b/PKGBUILD
index 4a7f77f832b2..14277208248f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,48 +1,58 @@
-# Maintainer: Rhinoceros <https://aur.archlinux.org/account/rhinoceros>
+# Maintainer: Mihkel Tõnnov <mihhkel-at-gmail-dot-com>
+# Contributor: Rhinoceros <https://aur.archlinux.org/account/rhinoceros>
# Contributor: Evert Vorster <evorster-at-gmail-dot-com>
# Contributor: Luca Weiss <luca (at) z3ntu (dot) xyz>
# Contributor: Jakub Schmidtke <sjakub-at-gmail-dot-com>
# Contributor: Maël Kerbiriou <mael.kerbiriou-at-free-dot-fr>
pkgname=amarok-git
-pkgver=2.9.71.r309.g26fed89
-pkgrel=1
+pkgver=2.9.71.r319.b592705a6c
+pkgrel=2
pkgdesc="The powerful music player for KDE"
arch=("i686" "x86_64")
url="http://amarok.kde.org"
-license=('GPL2' 'LGPL2.1' 'FDL')
-depends=('threadweaver5' 'qt5-webengine' 'phonon-qt5' 'qt5-declarative'
- 'kcmutils5' 'knewstuff5' 'ktexteditor5' 'kdnssd5'
- 'libmariadbclient' 'fftw'
- 'liblastfm-qt5' 'ffmpeg' 'kirigami2')
-makedepends=('git' 'extra-cmake-modules' 'kdoctools5')
-optdepends=("libgpod: support for Apple iPod audio devices"
- "libmtp: support for portable media devices"
+license=("GPL2" "LGPL2.1" "FDL")
+depends=("threadweaver5" "qt5-webengine" "phonon-qt5" "qt5-declarative" "qt5-script"
+ "kcmutils5" "knewstuff5" "ktexteditor5" "kdnssd5" "kirigami2"
+ "mariadb" "libmariadbclient" "fftw" "liblastfm-qt5" "ffmpeg" "taglib" "libofa")
+makedepends=("git" "extra-cmake-modules" "kdoctools5" "gdk-pixbuf2" "knotifyconfig5"
+ "libmtp" "libgpod" "loudmouth" "libmygpo-qt5")
+optdepends=("libmtp: support for portable media devices"
+ "ifuse: support for Apple iPod Touch and iPhone"
+ "libgpod: support for Apple iPod audio devices"
"loudmouth: backend needed by mp3tunes for syncing"
"libmygpo-qt5: gpodder.net Internet Service"
- "gmock: tests"
- "taglib-extras: Additional taglib functionality")
-conflicts=('amarok')
-provides=('amarok')
-source=(git+https://invent.kde.org/multimedia/amarok.git)
-sha512sums=('SKIP')
+ "gmock: tests")
+conflicts=("amarok" "taglib-extras")
+provides=("amarok")
+source=("git+https://invent.kde.org/multimedia/amarok.git"
+ "taglib2.diff")
+sha512sums=("SKIP"
+ "8f57e97c334e09c490b2c38c6ecbeda2fbf05d109098a10e924fa72ab13768425c9b89f5ecf47ba197169854f9e19dd626c4454d7500ea36d72805555b852f8e")
pkgver() {
- cd amarok
- git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+ cd "$srcdir/amarok"
+ set -o pipefail
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${srcdir}/amarok"
+ patch -Np1 -i "${srcdir}/taglib2.diff"
+ mkdir -p "${srcdir}/build"
}
build() {
- mkdir build
- cd build
- cmake ../amarok \
+ cd "${srcdir}/build"
+ cmake "${srcdir}/amarok" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release
make
}
package(){
- cd build
+ cd "${srcdir}/build"
make "DESTDIR=${pkgdir}" install
-}
+} \ No newline at end of file
diff --git a/taglib2.diff b/taglib2.diff
new file mode 100644
index 000000000000..c5e593118fff
--- /dev/null
+++ b/taglib2.diff
@@ -0,0 +1,189 @@
+diff --git a/shared/tag_helpers/APETagHelper.cpp b/shared/tag_helpers/APETagHelper.cpp
+index eee34e05a3..66e8510a53 100644
+--- a/shared/tag_helpers/APETagHelper.cpp
++++ b/shared/tag_helpers/APETagHelper.cpp
+@@ -84,7 +84,7 @@ APETagHelper::setTags( const Meta::FieldHash &changes )
+ QVariant value = changes.value( key );
+ TagLib::String field = fieldName( key );
+
+- if( !field.isNull() && !field.isEmpty() )
++ if( !field.isEmpty() )
+ {
+ if( key == Meta::valRating )
+ m_tag->addValue( field, Qt4QStringToTString( QString::number( value.toFloat() / 10.0 ) ) );
+diff --git a/shared/tag_helpers/ASFTagHelper.cpp b/shared/tag_helpers/ASFTagHelper.cpp
+index 241e93d714..772728b58f 100644
+--- a/shared/tag_helpers/ASFTagHelper.cpp
++++ b/shared/tag_helpers/ASFTagHelper.cpp
+@@ -107,7 +107,7 @@ ASFTagHelper::setTags( const Meta::FieldHash &changes )
+ QVariant value = changes.value( key );
+ TagLib::String field = fieldName( key );
+
+- if( !field.isNull() && !field.isEmpty() )
++ if( !field.isEmpty() )
+ {
+ if( key == Meta::valHasCover )
+ continue;
+diff --git a/shared/tag_helpers/ID3v2TagHelper.cpp b/shared/tag_helpers/ID3v2TagHelper.cpp
+index ea9281dc30..7dd98062bc 100644
+--- a/shared/tag_helpers/ID3v2TagHelper.cpp
++++ b/shared/tag_helpers/ID3v2TagHelper.cpp
+@@ -187,7 +187,7 @@ ID3v2TagHelper::setTags( const Meta::FieldHash &changes )
+ QVariant value = changes.value( key );
+ TagLib::ByteVector field( fieldName( key ).toCString() );
+
+- if( !field.isNull() && !field.isEmpty() )
++ if( !field.isEmpty() )
+ {
+ if( key == Meta::valHasCover )
+ continue;
+diff --git a/shared/tag_helpers/MP4TagHelper.cpp b/shared/tag_helpers/MP4TagHelper.cpp
+index 7a28b4473c..21f586146e 100644
+--- a/shared/tag_helpers/MP4TagHelper.cpp
++++ b/shared/tag_helpers/MP4TagHelper.cpp
+@@ -53,8 +53,8 @@ MP4TagHelper::tags() const
+ {
+ Meta::FieldHash data = TagHelper::tags();
+
+- TagLib::MP4::ItemListMap map = m_tag->itemListMap();
+- for( TagLib::MP4::ItemListMap::ConstIterator it = map.begin(); it != map.end(); ++it )
++ TagLib::MP4::ItemMap map = m_tag->itemMap();
++ for( TagLib::MP4::ItemMap::ConstIterator it = map.begin(); it != map.end(); ++it )
+ {
+ qint64 field;
+ QString value = TStringToQString( it->second.toStringList().toString( '\n' ) );
+@@ -106,21 +106,21 @@ MP4TagHelper::setTags( const Meta::FieldHash &changes )
+ QVariant value = changes.value( key );
+ TagLib::String field = fieldName( key );
+
+- if( !field.isNull() && !field.isEmpty() )
++ if( !field.isEmpty() )
+ {
+ // http://gitorious.org/~jefferai/xdg-specs/jefferais-xdg-specs/blobs/mediaspecs/specifications/FMPSpecs/specification.txt sais that mp4 tags should be saved as strings
+ if( key == Meta::valHasCover )
+ continue;
+ else if( key == Meta::valRating )
+- m_tag->itemListMap()[field] = TagLib::StringList( Qt4QStringToTString( QString::number( value.toFloat() / 10.0 ) ) );
++ m_tag->setItem(field, TagLib::StringList( Qt4QStringToTString( QString::number( value.toFloat() / 10.0 ) ) ));
+ else if( key == Meta::valScore )
+- m_tag->itemListMap()[field] = TagLib::StringList( Qt4QStringToTString( QString::number( value.toFloat() / 100.0 ) ) );
++ m_tag->setItem(field, TagLib::StringList( Qt4QStringToTString( QString::number( value.toFloat() / 100.0 ) ) ));
+ else if( key == Meta::valBpm || key == Meta::valDiscNr )
+- m_tag->itemListMap()[field] = TagLib::MP4::Item( value.toInt(), 0 );
++ m_tag->setItem(field, TagLib::MP4::Item( value.toInt(), 0 ));
+ else if( key == Meta::valCompilation )
+- m_tag->itemListMap()[field] = TagLib::MP4::Item( value.toBool() );
++ m_tag->setItem(field, TagLib::MP4::Item( value.toBool() ));
+ else
+- m_tag->itemListMap()[field] = TagLib::StringList( Qt4QStringToTString( value.toString() ) );
++ m_tag->setItem(field, TagLib::StringList( Qt4QStringToTString( value.toString() ) ));
+
+ modified = true;
+ }
+@@ -130,7 +130,7 @@ MP4TagHelper::setTags( const Meta::FieldHash &changes )
+ if( uidPair.first == UIDInvalid )
+ continue;
+
+- m_tag->itemListMap()[uidFieldName( uidPair.first )] = TagLib::StringList( Qt4QStringToTString( uidPair.second ) );
++ m_tag->setItem(uidFieldName( uidPair.first ), TagLib::StringList( Qt4QStringToTString( uidPair.second ) ));
+ modified = true;
+ }
+ }
+@@ -141,9 +141,9 @@ MP4TagHelper::setTags( const Meta::FieldHash &changes )
+ bool
+ MP4TagHelper::hasEmbeddedCover() const
+ {
+- TagLib::MP4::ItemListMap map = m_tag->itemListMap();
++ TagLib::MP4::ItemMap map = m_tag->itemMap();
+ TagLib::String name = fieldName( Meta::valHasCover );
+- for( TagLib::MP4::ItemListMap::ConstIterator it = map.begin(); it != map.end(); ++it )
++ for( TagLib::MP4::ItemMap::ConstIterator it = map.begin(); it != map.end(); ++it )
+ {
+ if( it->first == name )
+ {
+@@ -162,9 +162,9 @@ MP4TagHelper::hasEmbeddedCover() const
+ QImage
+ MP4TagHelper::embeddedCover() const
+ {
+- TagLib::MP4::ItemListMap map = m_tag->itemListMap();
++ TagLib::MP4::ItemMap map = m_tag->itemMap();
+ TagLib::String name = fieldName( Meta::valHasCover );
+- for( TagLib::MP4::ItemListMap::ConstIterator it = map.begin(); it != map.end(); ++it )
++ for( TagLib::MP4::ItemMap::ConstIterator it = map.begin(); it != map.end(); ++it )
+ {
+ if( it->first == name )
+ {
+@@ -200,7 +200,7 @@ MP4TagHelper::setEmbeddedCover( const QImage &cover )
+
+ covers.append( TagLib::MP4::CoverArt( TagLib::MP4::CoverArt::JPEG, TagLib::ByteVector( bytes.data(), bytes.count() ) ) );
+
+- m_tag->itemListMap()[fieldName( Meta::valHasCover )] = TagLib::MP4::Item( covers );
++ m_tag->setItem(fieldName( Meta::valHasCover ), TagLib::MP4::Item( covers ));
+
+ return true;
+ }
+diff --git a/shared/tag_helpers/StringHelper.cpp b/shared/tag_helpers/StringHelper.cpp
+index fd7e49b432..a8d2aa3e97 100644
+--- a/shared/tag_helpers/StringHelper.cpp
++++ b/shared/tag_helpers/StringHelper.cpp
+@@ -36,7 +36,7 @@ Meta::Tag::Qt4QStringToTString( const QString &str )
+ {
+ // Declare new var to prevent double call of trimmed func
+ QString val = str.trimmed();
+- return val.isEmpty() ? TagLib::String::null : TagLib::String( val.toUtf8().data(), TagLib::String::UTF8 );
++ return val.isEmpty() ? TagLib::String() : TagLib::String( val.toUtf8().data(), TagLib::String::UTF8 );
+ }
+
+ QString
+diff --git a/shared/tag_helpers/TagHelper.cpp b/shared/tag_helpers/TagHelper.cpp
+index 5a3b30009e..2607e53fe2 100644
+--- a/shared/tag_helpers/TagHelper.cpp
++++ b/shared/tag_helpers/TagHelper.cpp
+@@ -331,7 +331,7 @@ Meta::Tag::selectHelper( const TagLib::FileRef &fileref, bool forceCreation )
+ else if( TagLib::RIFF::WAV::File *file = dynamic_cast< TagLib::RIFF::WAV::File * >( fileref.file() ) )
+ {
+ if( file->tag() )
+- tagHelper = new ID3v2TagHelper( fileref.tag(), file->tag(), Amarok::Wav );
++ tagHelper = new ID3v2TagHelper( fileref.tag(), file->ID3v2Tag(), Amarok::Wav );
+ }
+ else if( TagLib::ASF::File *file = dynamic_cast< TagLib::ASF::File * >( fileref.file() ) )
+ {
+diff --git a/shared/tag_helpers/VorbisCommentTagHelper.cpp b/shared/tag_helpers/VorbisCommentTagHelper.cpp
+index f3ff542db6..95dc041d8a 100644
+--- a/shared/tag_helpers/VorbisCommentTagHelper.cpp
++++ b/shared/tag_helpers/VorbisCommentTagHelper.cpp
+@@ -151,7 +151,7 @@ VorbisCommentTagHelper::setTags( const Meta::FieldHash &changes )
+ QVariant value = changes.value( key );
+ TagLib::String field = fieldName( key );
+
+- if( !field.isNull() && !field.isEmpty() )
++ if( !field.isEmpty() )
+ {
+ if( key == Meta::valHasCover )
+ continue;
+diff --git a/utilities/afttagger/AFTTagger.cpp b/utilities/afttagger/AFTTagger.cpp
+index ae653e7beb..dace0b3305 100644
+--- a/utilities/afttagger/AFTTagger.cpp
++++ b/utilities/afttagger/AFTTagger.cpp
+@@ -467,7 +467,7 @@ AFTTagger::handleXiphComment( TagLib::Ogg::XiphComment *comment, TagLib::File *f
+ }
+ }
+ for( TagLib::StringList::ConstIterator iter = toRemove.begin(); iter != toRemove.end(); ++iter )
+- comment->removeField( *iter );
++ comment->removeFields( *iter );
+ }
+ if( newUid || ( nothingfound && !m_delete ) )
+ {
+@@ -611,10 +611,10 @@ AFTTagger::handleMP4( TagLib::MP4::File *file )
+ if( m_verbose )
+ m_textStream << tr( "INFO: File is a MP4 file, opening..." ) << Qt::endl;
+
+- TagLib::MP4::ItemListMap &itemsMap = file->tag()->itemListMap();
++ TagLib::MP4::ItemMap itemsMap = file->tag()->itemMap();
+ if( !itemsMap.isEmpty() )
+ {
+- for( TagLib::MP4::ItemListMap::Iterator it = itemsMap.begin(); it != itemsMap.end(); ++it )
++ for( TagLib::MP4::ItemMap::Iterator it = itemsMap.begin(); it != itemsMap.end(); ++it )
+ {
+ TagLib::String key = it->first;
+ const QString qkey = TStringToQString( key ).toUpper();