summaryrefslogtreecommitdiff
path: root/media-libs/liblastfm
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/liblastfm')
-rw-r--r--media-libs/liblastfm/Manifest5
-rw-r--r--media-libs/liblastfm/files/liblastfm-1.1.0_pre20241124-strict-flags.patch363
-rw-r--r--media-libs/liblastfm/liblastfm-1.1.0_pre20241124.ebuild42
-rw-r--r--media-libs/liblastfm/metadata.xml1
4 files changed, 410 insertions, 1 deletions
diff --git a/media-libs/liblastfm/Manifest b/media-libs/liblastfm/Manifest
index 2e52c9c13940..fa4d761a36a5 100644
--- a/media-libs/liblastfm/Manifest
+++ b/media-libs/liblastfm/Manifest
@@ -1,4 +1,7 @@
AUX liblastfm-1.1.0_pre20190625-missing-dep.patch 766 BLAKE2B 87172764568e132717a88d42ce66f2c33453a2c506a1fcfa4200172d8ad88f353fa2d625397c38589fb6ee83674b4b45d64c78532e3513a3c738fd7dc7c89cf5 SHA512 d983704f7c4e10135b8399e0786f9f69974f44e0a3b5035d2b482cd2154ebfa066d4b2c874fd65c6a25b91a218518498f36aea54928603467a95c95bc5fc10c9
+AUX liblastfm-1.1.0_pre20241124-strict-flags.patch 13186 BLAKE2B a0f54cf5657c8266a22ec6ef6377d051bfeb3205521b6d057c2b6414d71d9aa167afd572a1c1e0e41dcbff932e5392255c0e00f3229a97126e80ffeb66800900 SHA512 0e2b788e37e6c7d48144f5279024cb0c8ecde9980bc7c5384b770a61a37701eab3d0f0d42c37431e0dea8069f9e9b4ad8095588b1e5eaf95b20506aade1e03d4
DIST liblastfm-1.1.0_pre20190625.tar.gz 119348 BLAKE2B d4755d6dfe6dc8bb4c21e1f4ed94fd96165313111a553271e518ad57f08aab45980239a51416d6e99d87a86f7859c7ea04ba81fb06f6dfa61b2aa7f554935589 SHA512 ee36cc31e1f7b345e2de29ff4151acb7bbe30960bbf2528bf8eb5214a47272955efe3bd1c6e20af8dd22a4fbc510de34befdcd6c728683ae300bd45e578e5ebb
+DIST liblastfm-1.1.0_pre20241124.tar.gz 119092 BLAKE2B bfcd2763d31969c17fa4ce091e11764288655c153a66e46732409f59bf6d44724cd933787e76cc2bb809de6f248370ee8131b6fe452ab5c17da257eb359cd251 SHA512 e45ef91320114f662cb213720732372c02524b03d64b36711fa981bc7097117edd59e1b48deb56f2acdc4847db51d03e2cf392edbd3fa87bd055c33c5dc72639
EBUILD liblastfm-1.1.0_pre20190625.ebuild 1161 BLAKE2B 52ebbe5592dcf6c3f5b8ed93615b34496bd7e7b9cb7775ff7816828709da019069d66953c961e2b24c77fb652e4eb33d702b191036f62b46748293e2b9f14eee SHA512 35786e5ea33546c911dcc51eedbb625783e6341a30a099397b0718263bd0ec3fe3224ae1bda606a0cb76d6a63cc33e75627ac0fc9a811ed447d86757313fe637
-MISC metadata.xml 417 BLAKE2B d02f8d2305babfbdc41537f51c8176c9173d5c184f764ecc230518fe5b9aa11e42de0e0ea1bc0d530ad114ae2f06686a125253a9f821c89a52c16c70c7c4072c SHA512 feca1c5f940f532651510388f4fe66a95ee5c77322b584e82c5f5b62a32870591c95f34651259064b66b9218c1c46858f98327597d42f57ac771cff765f0118c
+EBUILD liblastfm-1.1.0_pre20241124.ebuild 1090 BLAKE2B 3cb543d81f5adf05a1fe0b43fcd85f6e2c4d2bc0a287bff56ce9da28321bf8627df37de1f86cacfb35e9cb9e50e68739d4793da13b456e39293a4791a92b64d2 SHA512 ba789e15e6a5cf515a37fbf67572a9659af3d2a135b4f258e125bb9d7f6d05e70daa66d3fb61a7e1241681c10646376d00a55e8e7d1ef34c1f2785667a96c38f
+MISC metadata.xml 476 BLAKE2B 6b67e2c6a76b5452a7773a10864e83b019d3bd0f14d934e19f3f6b96503f99f1498a016894f6058b68c8b75b0a29f64bd2ecc0920bb96d5047ad32ef469833e5 SHA512 0861faaf2ec463910258e9b0ed06b28afd46bf83fda62cd9aff63e866b7fccdf56bd7c6903e38d1b1df080f275616236a8f9336218f5a617170ca65926aa547a
diff --git a/media-libs/liblastfm/files/liblastfm-1.1.0_pre20241124-strict-flags.patch b/media-libs/liblastfm/files/liblastfm-1.1.0_pre20241124-strict-flags.patch
new file mode 100644
index 000000000000..7d64f1a9d9e2
--- /dev/null
+++ b/media-libs/liblastfm/files/liblastfm-1.1.0_pre20241124-strict-flags.patch
@@ -0,0 +1,363 @@
+From f3e5d9a3cd2c885bfc35b6299dbc4e5d152b8754 Mon Sep 17 00:00:00 2001
+From: Tuomas Nurmi <tuomas@norsumanageri.org>
+Date: Mon, 8 Jul 2024 19:03:59 +0300
+Subject: [PATCH] Make work with stricter compilation flags
+
+QT_NO_CAST_[FROM/TO]_ASCII and signals -> Q_SIGNALS, slots -> Q_SLOTS
+Needed e.g. when included in default settings compilation of KDE Frameworks 5.85+
+software.
+---
+ demos/demo1.cpp | 2 +-
+ demos/demo2.cpp | 2 +-
+ demos/demo3.cpp | 2 +-
+ src/Album.h | 4 ++--
+ src/Artist.h | 4 ++--
+ src/Audioscrobbler.h | 6 +++---
+ src/InternetConnectionMonitor.h | 4 ++--
+ src/Mbid.h | 2 +-
+ src/NetworkAccessManager.h | 2 +-
+ src/NetworkConnectionMonitor.h | 2 +-
+ src/RadioTuner.cpp | 2 +-
+ src/RadioTuner.h | 4 ++--
+ src/Track.cpp | 4 ++--
+ src/Track.h | 4 ++--
+ src/User.h | 2 +-
+ src/Xspf.h | 4 ++--
+ src/global.h.in | 2 +-
+ src/linux/LNetworkConnectionMonitor.h | 2 +-
+ src/mac/MNetworkConnectionMonitor.h | 2 +-
+ tests/TestTrack.h | 2 +-
+ tests/TestUrlBuilder.h | 2 +-
+ 21 files changed, 30 insertions(+), 30 deletions(-)
+
+diff --git a/demos/demo1.cpp b/demos/demo1.cpp
+index f3f4b44fb..c5fb52a7b 100644
+--- a/demos/demo1.cpp
++++ b/demos/demo1.cpp
+@@ -41,7 +41,7 @@ class ArtistList : public QListWidget
+ connect( reply, SIGNAL(finished()), SLOT(onGotSimilar()) );
+ }
+
+-private slots:
++private Q_SLOTS:
+ void onGotSimilar()
+ {
+ QNetworkReply* r = static_cast<QNetworkReply*>(sender());
+diff --git a/demos/demo2.cpp b/demos/demo2.cpp
+index 27d1b116e..0800b7975 100644
+--- a/demos/demo2.cpp
++++ b/demos/demo2.cpp
+@@ -20,7 +20,7 @@ struct MyCoreApp : QCoreApplication
+ MyCoreApp( int& argc, char**& argv ) : QCoreApplication( argc, argv )
+ {}
+
+-private slots:
++private Q_SLOTS:
+ void onWsError( lastfm::ws::Error e )
+ {
+ // QNetworkReply will invoke this slot on application level errors
+diff --git a/demos/demo3.cpp b/demos/demo3.cpp
+index 4d8546ae5..8eb8fe0ef 100644
+--- a/demos/demo3.cpp
++++ b/demos/demo3.cpp
+@@ -21,7 +21,7 @@ struct MyCoreApp : QCoreApplication
+ MyCoreApp( int& argc, char** argv ) : QCoreApplication( argc, argv )
+ {}
+
+-public slots:
++public Q_SLOTS:
+ void onStatus( int status )
+ {
+ qDebug() << lastfm::Audioscrobbler::Status(status);
+diff --git a/src/Album.h b/src/Album.h
+index 2770c21d7..0dd93539e 100644
+--- a/src/Album.h
++++ b/src/Album.h
+@@ -57,8 +57,8 @@ namespace lastfm
+ bool isNull() const;
+
+ /** Album.getInfo WebService */
+- QNetworkReply* getInfo( const QString& username = "" ) const;
+- QNetworkReply* share( const QStringList& recipients, const QString& message = "", bool isPublic = true ) const;
++ QNetworkReply* getInfo( const QString& username = QStringLiteral("") ) const;
++ QNetworkReply* share( const QStringList& recipients, const QString& message = QStringLiteral(""), bool isPublic = true ) const;
+
+ /** use Tag::list to get the tag list out of the finished reply */
+ QNetworkReply* getTags() const;
+diff --git a/src/Artist.h b/src/Artist.h
+index 8e658a935..941e9c396 100644
+--- a/src/Artist.h
++++ b/src/Artist.h
+@@ -67,10 +67,10 @@ namespace lastfm
+
+ QDomElement toDomElement( QDomDocument& ) const;
+
+- QNetworkReply* share( const QStringList& recipients, const QString& message = "", bool isPublic = true ) const;
++ QNetworkReply* share( const QStringList& recipients, const QString& message = QStringLiteral(""), bool isPublic = true ) const;
+
+ QNetworkReply* getEvents(int limit = 0) const;
+- QNetworkReply* getInfo( const QString& username = "" ) const;
++ QNetworkReply* getInfo( const QString& username = QStringLiteral("") ) const;
+ static Artist getInfo( QNetworkReply* );
+
+ QNetworkReply* getSimilar( int limit = -1 ) const;
+diff --git a/src/Audioscrobbler.h b/src/Audioscrobbler.h
+index f74af3bec..394c5243d 100644
+--- a/src/Audioscrobbler.h
++++ b/src/Audioscrobbler.h
+@@ -43,14 +43,14 @@ namespace lastfm
+ Audioscrobbler( const QString& clientId );
+ ~Audioscrobbler();
+
+- signals:
++ Q_SIGNALS:
+ void scrobblesCached( const QList<lastfm::Track>& tracks );
+ /* Note that this is emitted after we tried to submit the scrobbles
+ It could just be that they have an error code */
+ void scrobblesSubmitted( const QList<lastfm::Track>& tracks );
+ void nowPlayingError( int code, QString message );
+
+- public slots:
++ public Q_SLOTS:
+ /** will ask Last.fm to update the now playing information for the
+ * authenticated user */
+ void nowPlaying( const Track& );
+@@ -62,7 +62,7 @@ namespace lastfm
+ /** will submit the submission cache for this user */
+ void submit();
+
+- private slots:
++ private Q_SLOTS:
+ void onNowPlayingReturn();
+ void onTrackScrobbleReturn();
+
+diff --git a/src/InternetConnectionMonitor.h b/src/InternetConnectionMonitor.h
+index 92525b2eb..3e6268317 100644
+--- a/src/InternetConnectionMonitor.h
++++ b/src/InternetConnectionMonitor.h
+@@ -45,7 +45,7 @@ class LASTFM_DLLEXPORT InternetConnectionMonitor : public QObject
+
+ NetworkConnectionMonitor* createNetworkConnectionMonitor();
+
+-signals:
++Q_SIGNALS:
+ /** yay! internet has returned */
+ void up( const QString& connectionName = "" );
+
+@@ -56,7 +56,7 @@ class LASTFM_DLLEXPORT InternetConnectionMonitor : public QObject
+ /** emitted after the above */
+ void connectivityChanged( bool );
+
+-private slots:
++private Q_SLOTS:
+ void onFinished( QNetworkReply* reply );
+ void onNetworkUp();
+ void onNetworkDown();
+diff --git a/src/Mbid.h b/src/Mbid.h
+index a4f0edad3..1da1d3930 100644
+--- a/src/Mbid.h
++++ b/src/Mbid.h
+@@ -27,7 +27,7 @@ namespace lastfm
+ class LASTFM_DLLEXPORT Mbid
+ {
+ public:
+- explicit Mbid( const QString& p = "" );
++ explicit Mbid( const QString& p = QStringLiteral("") );
+ Mbid( const Mbid& that );
+ ~Mbid();
+
+diff --git a/src/NetworkAccessManager.h b/src/NetworkAccessManager.h
+index 5a7187977..c2d33cdec 100644
+--- a/src/NetworkAccessManager.h
++++ b/src/NetworkAccessManager.h
+@@ -53,7 +53,7 @@ class LASTFM_DLLEXPORT NetworkAccessManager : public QNetworkAccessManager
+ protected:
+ virtual QNetworkReply* createRequest( Operation, const QNetworkRequest&, QIODevice* outgoingdata = 0 );
+
+-private slots:
++private Q_SLOTS:
+ void onConnectivityChanged( bool );
+
+ private:
+diff --git a/src/NetworkConnectionMonitor.h b/src/NetworkConnectionMonitor.h
+index 1319c4d0f..7b638f1f4 100644
+--- a/src/NetworkConnectionMonitor.h
++++ b/src/NetworkConnectionMonitor.h
+@@ -35,7 +35,7 @@ class LASTFM_DLLEXPORT NetworkConnectionMonitor : public QObject
+ ~NetworkConnectionMonitor();
+ bool isConnected() const;
+
+-signals:
++Q_SIGNALS:
+ void networkUp();
+ void networkDown();
+
+diff --git a/src/RadioTuner.cpp b/src/RadioTuner.cpp
+index 948ce660f..3deac1790 100644
+--- a/src/RadioTuner.cpp
++++ b/src/RadioTuner.cpp
+@@ -65,7 +65,7 @@ class lastfm::RadioTunerPrivate : public QObject
+ */
+ void fetchFiveMoreTracks();
+
+- private slots:
++ private Q_SLOTS:
+ void onTwoSecondTimeout();
+ };
+
+diff --git a/src/RadioTuner.h b/src/RadioTuner.h
+index 0db08c739..b45c36a3f 100644
+--- a/src/RadioTuner.h
++++ b/src/RadioTuner.h
+@@ -48,13 +48,13 @@ namespace lastfm
+
+ void queueTrack( lastfm::Track& track );
+
+- signals:
++ Q_SIGNALS:
+ void title( const QString& );
+ void supportsDisco( bool supportsDisco );
+ void trackAvailable();
+ void error( lastfm::ws::Error, const QString& message );
+
+- private slots:
++ private Q_SLOTS:
+ void onTuneReturn();
+ void onGetPlaylistReturn();
+ // no-op
+diff --git a/src/Track.cpp b/src/Track.cpp
+index 203c30bf3..9fd9ac50f 100644
+--- a/src/Track.cpp
++++ b/src/Track.cpp
+@@ -112,12 +112,12 @@ class TrackObject : public QObject
+ void forceScrobbleStatusChanged();
+ void forceCorrected( QString correction );
+
+-private slots:
++private Q_SLOTS:
+ void onLoveFinished();
+ void onUnloveFinished();
+ void onGotInfo();
+
+-signals:
++Q_SIGNALS:
+ void loveToggled( bool love );
+ void scrobbleStatusChanged( short scrobbleStatus );
+ void corrected( QString correction );
+diff --git a/src/Track.h b/src/Track.h
+index fbde4a3f7..b35399ed3 100644
+--- a/src/Track.h
++++ b/src/Track.h
+@@ -193,7 +193,7 @@ class LASTFM_DLLEXPORT Track : public AbstractType
+ //////////// lastfm::Ws
+
+ /** See last.fm/api Track section */
+- QNetworkReply* share( const QStringList& recipients, const QString& message = "", bool isPublic = true ) const;
++ QNetworkReply* share( const QStringList& recipients, const QString& message = QStringLiteral(""), bool isPublic = true ) const;
+
+ QNetworkReply* getSimilar( int limit = -1 ) const;
+ /** The match percentage is returned from last.fm as a 4 significant
+@@ -211,7 +211,7 @@ class LASTFM_DLLEXPORT Track : public AbstractType
+ /** method should be a method name of reciever that takes a QByteArray
+ If that fails it will try invoking method with no arguments.
+ */
+- void getInfo( QObject* receiver, const char * method, const QString& username = "" ) const;
++ void getInfo( QObject* receiver, const char * method, const QString& username = QStringLiteral("") ) const;
+ QNetworkReply* getBuyLinks( const QString& country ) const;
+
+ static QNetworkReply* playlinks( const QList<Track>& tracks );
+diff --git a/src/User.h b/src/User.h
+index f2666780b..662ce5110 100644
+--- a/src/User.h
++++ b/src/User.h
+@@ -121,7 +121,7 @@ namespace lastfm
+
+ QNetworkReply* getLovedTracks( int limit = 50, int page = 1 ) const;
+ QNetworkReply* getPlaylists() const;
+- QNetworkReply* getTopArtists( QString period = "overall", int limit = 50, int page = 1 ) const;
++ QNetworkReply* getTopArtists( QString period = QStringLiteral("overall"), int limit = 50, int page = 1 ) const;
+ QNetworkReply* getRecentTracks( int limit = 50, int page = 1 ) const;
+ QNetworkReply* getRecentArtists() const;
+ QNetworkReply* getRecentStations( int limit = 10, int page = 1 ) const;
+diff --git a/src/Xspf.h b/src/Xspf.h
+index f392ae236..ee8276ba4 100644
+--- a/src/Xspf.h
++++ b/src/Xspf.h
+@@ -40,10 +40,10 @@ namespace lastfm
+
+ QList<Track> tracks() const;
+
+- signals:
++ Q_SIGNALS:
+ Q_DECL_DEPRECATED void expired();
+
+- private slots:
++ private Q_SLOTS:
+ Q_DECL_DEPRECATED void onExpired();
+
+ private:
+diff --git a/src/global.h.in b/src/global.h.in
+index fc479b221..d96659c0d 100644
+--- a/src/global.h.in
++++ b/src/global.h.in
+@@ -62,7 +62,7 @@ namespace lastfm
+ for (int i=0; i < meta.enumeratorCount(); ++i)
+ {
+ QMetaEnum m = meta.enumerator(i);
+- if (m.name() == QLatin1String(enum_name))
++ if (QLatin1String(m.name()) == QLatin1String(enum_name))
+ return QLatin1String(m.valueToKey(enum_value));
+ }
+ return QString("Unknown enum value for \"%1\": %2").arg( enum_name ).arg( enum_value );
+diff --git a/src/linux/LNetworkConnectionMonitor.h b/src/linux/LNetworkConnectionMonitor.h
+index b59fdc023..d65e825d7 100644
+--- a/src/linux/LNetworkConnectionMonitor.h
++++ b/src/linux/LNetworkConnectionMonitor.h
+@@ -49,7 +49,7 @@ class LNetworkConnectionMonitor : public NetworkConnectionMonitor
+ public:
+ LNetworkConnectionMonitor( QObject* parent = 0 );
+ ~LNetworkConnectionMonitor();
+-private slots:
++private Q_SLOTS:
+ void onStateChange( uint newState );
+ private:
+ QDBusInterface* m_nmInterface;
+diff --git a/src/mac/MNetworkConnectionMonitor.h b/src/mac/MNetworkConnectionMonitor.h
+index 3c03c47fa..8c051e3d7 100644
+--- a/src/mac/MNetworkConnectionMonitor.h
++++ b/src/mac/MNetworkConnectionMonitor.h
+@@ -39,7 +39,7 @@ class MNetworkConnectionMonitor : public NetworkConnectionMonitor
+ public:
+ MNetworkConnectionMonitor( QObject* parent = 0 );
+ ~MNetworkConnectionMonitor();
+-private slots:
++private Q_SLOTS:
+
+ private:
+ #ifdef Q_OS_MAC
+diff --git a/tests/TestTrack.h b/tests/TestTrack.h
+index 5dbd547ad..42f20ee8b 100644
+--- a/tests/TestTrack.h
++++ b/tests/TestTrack.h
+@@ -26,7 +26,7 @@ class TestTrack : public QObject
+ return t;
+ }
+
+-private slots:
++private Q_SLOTS:
+ void testClone()
+ {
+ Track original = example();
+diff --git a/tests/TestUrlBuilder.h b/tests/TestUrlBuilder.h
+index 7001e92e2..ac07aebf1 100644
+--- a/tests/TestUrlBuilder.h
++++ b/tests/TestUrlBuilder.h
+@@ -37,7 +37,7 @@ class TestUrlBuilder : public QObject
+ {
+ Q_OBJECT
+
+-private slots:
++private Q_SLOTS:
+ void encode() /** @author <jono@last.fm> */
+ {
+ QFETCH( QString, input );
diff --git a/media-libs/liblastfm/liblastfm-1.1.0_pre20241124.ebuild b/media-libs/liblastfm/liblastfm-1.1.0_pre20241124.ebuild
new file mode 100644
index 000000000000..99c9a6939ce0
--- /dev/null
+++ b/media-libs/liblastfm/liblastfm-1.1.0_pre20241124.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+COMMIT=2e8e40d78a331d8e39fe39113bcb7571a7b1d4d6
+inherit cmake
+
+DESCRIPTION="Collection of libraries to integrate Last.fm services"
+HOMEPAGE="https://github.com/lastfm/liblastfm https://github.com/drfiemost/liblastfm"
+SRC_URI="https://github.com/lastfm/liblastfm/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-qt/qtbase:6[dbus,network,ssl,xml]"
+DEPEND="${RDEPEND}"
+
+# Pending: https://github.com/drfiemost/liblastfm/pull/9
+PATCHES=( "${FILESDIR}/${P}-strict-flags.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_DEMOS=OFF # demos not working
+ -DBUILD_WITH_QT5=OFF
+ -DBUILD_FINGERPRINT=OFF # https://github.com/lastfm/liblastfm/issues/43
+ -DBUILD_TESTS=$(usex test)
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ local CMAKE_SKIP_TESTS=(
+ UrlBuilderTest # fails without network access
+ )
+ cmake_src_test
+}
diff --git a/media-libs/liblastfm/metadata.xml b/media-libs/liblastfm/metadata.xml
index ab5f9b1a3346..778cacec8f64 100644
--- a/media-libs/liblastfm/metadata.xml
+++ b/media-libs/liblastfm/metadata.xml
@@ -10,5 +10,6 @@
</use>
<upstream>
<remote-id type="github">lastfm/liblastfm</remote-id>
+ <remote-id type="github">drfiemost/liblastfm</remote-id>
</upstream>
</pkgmetadata>