diff --git a/media-libs/liblastfm/liblastfm-1.1.0.recipe b/media-libs/liblastfm/liblastfm-1.1.0.recipe new file mode 100644 index 000000000..f0f70fc19 --- /dev/null +++ b/media-libs/liblastfm/liblastfm-1.1.0.recipe @@ -0,0 +1,83 @@ +SUMMARY="A Qt C++ library for the Last.fm webservices" +DESCRIPTION="liblastfm is a collection of libraries to help you integrate Last.fm services into \ +your rich desktop software. It is officially supported software developed by Last.fm staff." +HOMEPAGE="https://github.com/lastfm/liblastfm" +COPYRIGHT="2009-2015 lastfm contributors" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/lastfm/liblastfm/archive/refs/tags/$portVersion.tar.gz" +CHECKSUM_SHA256="f61f0daa384e081a8f2bd2f7a2148babff22696e5b72ecdac86940a10100b1c8" +PATCHES="fix_gcc11_ftbfs.patch" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%.*}" + +PROVIDES=" + liblastfm$secondaryArchSuffix = $portVersion + lib:liblastfm5$secondaryArchSuffix = $libVersionCompat + lib:liblastfm_fingerprint5$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libfftw3$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5DBus$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix + lib:libsamplerate$secondaryArchSuffix + " + +PROVIDES_devel=" + liblastfm${secondaryArchSuffix}_devel = $portVersion + devel:liblastfm5$secondaryArchSuffix = $libVersionCompat + devel:liblastfm_fingerprint5$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + liblastfm$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libfftw3$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix + devel:libsamplerate$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:qdbuscpp2xml$secondaryArchSuffix >= 5 + " + +defineDebugInfoPackage liblastfm$secondaryArchSuffix \ + $libDir/liblastfm5.so.$libVersion + +BUILD() +{ + cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \ + $cmakeDirArgs \ + -DBUILD_WITH_QT4:BOOL=OFF -Wno-dev + make -Cbuild $jobArgs +} + +INSTALL() +{ + make -Cbuild install + + prepareInstalledDevelLibs \ + liblastfm5 \ + liblastfm_fingerprint5 + + packageEntries devel \ + $developDir +} + +TEST() +{ + # 50% tests passed, 1 tests failed out of 2 (compared values are not the same) + ctest --test-dir build --output-on-failure +} diff --git a/media-libs/liblastfm/patches/fix_gcc11_ftbfs.patch b/media-libs/liblastfm/patches/fix_gcc11_ftbfs.patch new file mode 100644 index 000000000..7147d1ee7 --- /dev/null +++ b/media-libs/liblastfm/patches/fix_gcc11_ftbfs.patch @@ -0,0 +1,49 @@ +Description: Fix GCC-11 build issue +Author: Xeonacid +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984114 +Bug-Upstream: https://github.com/lastfm/liblastfm/issues/39 +Origin: upstream, https://github.com/lastfm/liblastfm/pull/41/commits/d51ad3e759331d7d79c6675c5d22541280bf9a70 +Index: liblastfm-1.0.9/src/fingerprint/Fingerprint.cpp +=================================================================== +--- liblastfm-1.0.9.orig/src/fingerprint/Fingerprint.cpp ++++ liblastfm-1.0.9/src/fingerprint/Fingerprint.cpp +@@ -94,7 +94,7 @@ lastfm::Fingerprint::data() const + + + void +-lastfm::Fingerprint::generate( FingerprintableSource* ms ) throw( Error ) ++lastfm::Fingerprint::generate( FingerprintableSource* ms ) + { + //TODO throw if we can't get required metadata from the track object + +@@ -306,7 +306,7 @@ lastfm::Fingerprint::submit() const + + + void +-lastfm::Fingerprint::decode( QNetworkReply* reply, bool* complete_fingerprint_requested ) throw( Error ) ++lastfm::Fingerprint::decode( QNetworkReply* reply, bool* complete_fingerprint_requested ) + { + // The response data will consist of a number and a string. + // The number is the fpid and the string is either FOUND or NEW +Index: liblastfm-1.0.9/src/fingerprint/Fingerprint.h +=================================================================== +--- liblastfm-1.0.9.orig/src/fingerprint/Fingerprint.h ++++ liblastfm-1.0.9/src/fingerprint/Fingerprint.h +@@ -71,7 +71,7 @@ namespace lastfm + }; + + /** This is CPU intensive, do it in a thread in your GUI application */ +- void generate( FingerprintableSource* ) throw( Error ); ++ void generate( FingerprintableSource* ); + + /** Submits the fingerprint data to Last.fm in order to get a FingerprintId + * back. You need to wait for the QNetworkReply to finish before you can +@@ -82,7 +82,7 @@ namespace lastfm + * will be valid. Otherwise we will throw. You always get a valid id + * or a throw. + */ +- void decode( QNetworkReply*, bool* lastfm_needs_a_complete_fingerprint = 0 ) throw( Error ); ++ void decode( QNetworkReply*, bool* lastfm_needs_a_complete_fingerprint = 0 ); + }; + +