mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
Qt4 deprecation
2019-03-15 audio/liblastfm: Qt4 has been EOL since december 2015 Approved by: portmgr (implicit)
This commit is contained in:
parent
24972c8b67
commit
3007099e6f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=495973
1
MOVED
1
MOVED
@ -11968,3 +11968,4 @@ x11-toolkits/qwt5-designerplugin||2019-03-16|Has expired: Qt4 has been EOL since
|
||||
x11-toolkits/soqt||2019-03-16|Has expired: Qt4 has been EOL since december 2015
|
||||
x11-wm/qlwm||2019-03-16|Has expired: Qt4 has been EOL since december 2015
|
||||
audio/dream||2019-03-16|Has expired: Qt4 has been EOL since december 2015
|
||||
audio/liblastfm||2019-03-16|Has expired: Qt4 has been EOL since december 2015
|
||||
|
@ -406,7 +406,6 @@
|
||||
SUBDIR += libinstpatch
|
||||
SUBDIR += libkcddb
|
||||
SUBDIR += libkcompactdisc
|
||||
SUBDIR += liblastfm
|
||||
SUBDIR += liblastfm-qt5
|
||||
SUBDIR += liblo
|
||||
SUBDIR += liblscp
|
||||
|
@ -1,61 +0,0 @@
|
||||
# Created by: Matt Tosto <datahead4@gmail.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= liblastfm
|
||||
DISTVERSION= 1.0.9-5
|
||||
DISTVERSIONSUFFIX= -g4433165
|
||||
CATEGORIES= audio
|
||||
PKGNAMESUFFIX= -${SLAVE}
|
||||
|
||||
MAINTAINER= jhale@FreeBSD.org
|
||||
COMMENT= Qt C++ library for the Last.fm webservices
|
||||
|
||||
LICENSE= GPLv3+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
USES= cmake pkgconfig
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= lastfm
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
SLAVE?= qt4
|
||||
.if ${SLAVE} == qt4
|
||||
DEPRECATED= Qt4 has been EOL since december 2015
|
||||
EXPIRATION_DATE= 2019-03-15
|
||||
|
||||
USES+= qt:4
|
||||
USE_QT= corelib dbus network sql xml \
|
||||
moc_build qmake_build rcc_build
|
||||
CMAKE_ON+= BUILD_WITH_QT4
|
||||
.else
|
||||
USES+= compiler:c++11-lang qt:5
|
||||
USE_QT= core dbus network sql xml \
|
||||
buildtools_build qmake_build
|
||||
CMAKE_OFF+= BUILD_WITH_QT4
|
||||
QTVER_SUFFIX= 5
|
||||
.endif
|
||||
|
||||
PLIST_SUB= QTVER_SUFFIX="${QTVER_SUFFIX}"
|
||||
|
||||
OPTIONS_DEFINE= FINGERPRINT TEST
|
||||
OPTIONS_DEFAULT= FINGERPRINT
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
FINGERPRINT_DESC= Build the lastfm-fingerprint library
|
||||
FINGERPRINT_LIB_DEPENDS=libsamplerate.so:audio/libsamplerate \
|
||||
libfftw3f.so:math/fftw3-float
|
||||
FINGERPRINT_CMAKE_BOOL= BUILD_FINGERPRINT
|
||||
# We only need fftw3.h from math/fftw3; no need to install
|
||||
FINGERPRINT_BUILD_DEPENDS= ${NONEXISTENT}:math/fftw3:patch
|
||||
FINGERPRINT_CMAKE_ON= -DLIBFFTW3_INCLUDE_DIR:PATH=`${MAKE} -C ${PORTSDIR}/math/fftw3 -VWRKSRC`/api
|
||||
|
||||
.if ${SLAVE} == qt4
|
||||
TEST_USES= qt:4 qt:5
|
||||
TEST_USE= QT=qtestlib_build
|
||||
.else
|
||||
TEST_USE= QT=testlib_build
|
||||
.endif
|
||||
TEST_CMAKE_BOOL= BUILD_TESTS
|
||||
TEST_TEST_TARGET= test
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,3 +0,0 @@
|
||||
TIMESTAMP = 1524002793
|
||||
SHA256 (lastfm-liblastfm-1.0.9-5-g4433165_GH0.tar.gz) = 8cf1835af3f38f0c7c576e8a01c2d19ee32c7006a44d2d183fb64ed228bc5ca6
|
||||
SIZE (lastfm-liblastfm-1.0.9-5-g4433165_GH0.tar.gz) = 119427
|
@ -1,25 +0,0 @@
|
||||
- Support symbol visibility with Clang
|
||||
- Don't put linker flags in CXXFLAGS
|
||||
|
||||
--- CMakeLists.txt.orig 2014-10-02 14:05:46 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 2.8.6)
|
||||
+cmake_policy(SET CMP0043 OLD)
|
||||
project(liblastfm)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
|
||||
@@ -62,11 +63,11 @@ else()
|
||||
endif()
|
||||
|
||||
|
||||
-if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_definitions("-fno-operator-names -fvisibility-inlines-hidden -fvisibility=hidden")
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined")
|
||||
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
@ -1,123 +0,0 @@
|
||||
url():
|
||||
- Use https scheme to avoid 301 redirects
|
||||
- Override default QUrl::TolerantMode with QUrl::StrictMode for Qt 5.x to
|
||||
prevent overprocessing the already encoded input URL
|
||||
localePath():
|
||||
- New function to return the base path of the localized website
|
||||
host():
|
||||
- Just return www.last.fm since the localized hosts 301 redirect there
|
||||
localize():
|
||||
- Set the path of the url instead of the host since the localized
|
||||
hosts 301 redirect to the main website with a localized path
|
||||
mobilize():
|
||||
- Mobile website 301 redirects to main website, so just return the url as-is
|
||||
|
||||
--- src/UrlBuilder.cpp.orig 2014-10-02 14:05:46 UTC
|
||||
+++ src/UrlBuilder.cpp
|
||||
@@ -32,7 +32,7 @@ class lastfm::UrlBuilderPrivate (public)
|
||||
lastfm::UrlBuilder::UrlBuilder( const QString& base )
|
||||
: d( new UrlBuilderPrivate )
|
||||
{
|
||||
- d->path = '/' + base.toLatin1();
|
||||
+ d->path = localePath().toLatin1() + '/' + base.toLatin1();
|
||||
}
|
||||
|
||||
|
||||
@@ -60,10 +60,10 @@ QUrl
|
||||
lastfm::UrlBuilder::url() const
|
||||
{
|
||||
QUrl url;
|
||||
- url.setScheme( "http" );
|
||||
+ url.setScheme( "https" );
|
||||
url.setHost( host() );
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
- url.setPath( d->path );
|
||||
+ url.setPath( d->path, QUrl::StrictMode );
|
||||
#else
|
||||
url.setEncodedPath( d->path );
|
||||
#endif
|
||||
@@ -85,49 +85,50 @@ lastfm::UrlBuilder::encode( QString s )
|
||||
|
||||
|
||||
QString //static
|
||||
-lastfm::UrlBuilder::host( const QLocale& locale )
|
||||
+lastfm::UrlBuilder::localePath( const QLocale& locale )
|
||||
{
|
||||
switch (locale.language())
|
||||
{
|
||||
- case QLocale::Portuguese: return "www.lastfm.com.br";
|
||||
- case QLocale::Turkish: return "www.lastfm.com.tr";
|
||||
- case QLocale::French: return "www.lastfm.fr";
|
||||
- case QLocale::Italian: return "www.lastfm.it";
|
||||
- case QLocale::German: return "www.lastfm.de";
|
||||
- case QLocale::Spanish: return "www.lastfm.es";
|
||||
- case QLocale::Polish: return "www.lastfm.pl";
|
||||
- case QLocale::Russian: return "www.lastfm.ru";
|
||||
- case QLocale::Japanese: return "www.lastfm.jp";
|
||||
- case QLocale::Swedish: return "www.lastfm.se";
|
||||
- case QLocale::Chinese: return "cn.last.fm";
|
||||
- default: return "www.last.fm";
|
||||
+ case QLocale::Chinese: return "/zh";
|
||||
+ case QLocale::French: return "/fr";
|
||||
+ case QLocale::German: return "/de";
|
||||
+ case QLocale::Italian: return "/it";
|
||||
+ case QLocale::Japanese: return "/ja";
|
||||
+ case QLocale::Polish: return "/pl";
|
||||
+ case QLocale::Portuguese: return "/pt";
|
||||
+ case QLocale::Russian: return "/ru";
|
||||
+ case QLocale::Spanish: return "/es";
|
||||
+ case QLocale::Swedish: return "/sv";
|
||||
+ case QLocale::Turkish: return "/tr";
|
||||
+ default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+QString //static
|
||||
+lastfm::UrlBuilder::host( const QLocale& locale )
|
||||
+{
|
||||
+ return "www.last.fm";
|
||||
+}
|
||||
+
|
||||
+
|
||||
bool // static
|
||||
lastfm::UrlBuilder::isHost( const QUrl& url )
|
||||
{
|
||||
- QStringList hosts = QStringList() << "www.lastfm.com.br"
|
||||
- << "www.lastfm.com.tr"
|
||||
- << "www.lastfm.fr"
|
||||
- << "www.lastfm.it"
|
||||
- << "www.lastfm.de"
|
||||
- << "www.lastfm.es"
|
||||
- << "www.lastfm.pl"
|
||||
- << "www.lastfm.ru"
|
||||
- << "www.lastfm.jp"
|
||||
- << "www.lastfm.se"
|
||||
- << "cn.last.fm"
|
||||
- << "www.last.fm";
|
||||
+ QStringList hosts = QStringList() << "www.last.fm";
|
||||
|
||||
return hosts.contains( url.host() );
|
||||
}
|
||||
|
||||
+
|
||||
QUrl //static
|
||||
lastfm::UrlBuilder::localize( QUrl url)
|
||||
{
|
||||
- url.setHost( url.host().replace( QRegExp("^(www.)?last.fm"), host() ) );
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
+ url.setPath( url.path().prepend( localePath() ), QUrl::DecodedMode );
|
||||
+#else
|
||||
+ url.setPath( url.path().prepend( localePath() ) );
|
||||
+#endif
|
||||
return url;
|
||||
}
|
||||
|
||||
@@ -135,7 +136,6 @@ lastfm::UrlBuilder::localize( QUrl url)
|
||||
QUrl //static
|
||||
lastfm::UrlBuilder::mobilize( QUrl url )
|
||||
{
|
||||
- url.setHost( url.host().replace( QRegExp("^(www.)?last"), "m.last" ) );
|
||||
return url;
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
Add prototype for localePath() and adjust comments to reflect current
|
||||
website layout
|
||||
|
||||
--- src/UrlBuilder.h.orig 2015-02-06 16:49:40 UTC
|
||||
+++ src/UrlBuilder.h
|
||||
@@ -44,10 +44,12 @@ namespace lastfm
|
||||
|
||||
QUrl url() const;
|
||||
|
||||
- /** www.last.fm becomes the local version, eg www.lastfm.de */
|
||||
+ /** www.last.fm becomes the local version, e.g. www.last.fm/de */
|
||||
static QUrl localize( QUrl );
|
||||
- /** www.last.fm becomes m.last.fm, localisation is preserved */
|
||||
- static QUrl mobilize( QUrl );
|
||||
+
|
||||
+ /** DEPRECATED: Returns url as-is since the mobile website redirects
|
||||
+ * to the main website */
|
||||
+ Q_DECL_DEPRECATED static QUrl mobilize( QUrl );
|
||||
|
||||
/** Use this to URL encode any database item (artist, track, album). It
|
||||
* internally calls UrlEncodeSpecialChars to double encode some special
|
||||
@@ -60,7 +62,10 @@ namespace lastfm
|
||||
*/
|
||||
static QByteArray encode( QString );
|
||||
|
||||
- /** returns eg. www.lastfm.de */
|
||||
+ /** returns the base path of the localized website e.g. /de */
|
||||
+ static QString localePath ( const QLocale& = QLocale() );
|
||||
+
|
||||
+ /** returns www.last.fm */
|
||||
static QString host( const QLocale& = QLocale() );
|
||||
|
||||
/** return true if url is a last.fm url */
|
@ -1,15 +0,0 @@
|
||||
Silence warning
|
||||
warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
|
||||
if (!strncmp(head,"ID3",3) == 0) {
|
||||
|
||||
--- src/mbid_mp3.c.orig 2014-10-02 14:05:46 UTC
|
||||
+++ src/mbid_mp3.c
|
||||
@@ -94,7 +94,7 @@ int getMP3_MBID(const char *path, char mbid[MBID_BUFFE
|
||||
|
||||
while (s) {
|
||||
mfile(3,head,fp,&s);
|
||||
- if (!strncmp(head,"ID3",3) == 0) {
|
||||
+ if (!(strncmp(head,"ID3",3) == 0)) {
|
||||
//debug("No ID3v2 tag found: %s\n",path);
|
||||
break;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
http://www.last.fm 301 redirects to https://www.last.fm causing test to fail
|
||||
|
||||
--- tests/TestUrlBuilder.h.orig 2018-03-31 12:04:00 UTC
|
||||
+++ tests/TestUrlBuilder.h
|
||||
@@ -81,7 +81,7 @@ private slots:
|
||||
|
||||
void test404() /** @author <max@last.fm> */
|
||||
{
|
||||
- QCOMPARE( getResponseCode( QUrl("http://www.last.fm/404") ), 404 );
|
||||
+ QCOMPARE( getResponseCode( QUrl("https://www.last.fm/404") ), 404 );
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +0,0 @@
|
||||
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.
|
||||
|
||||
WWW: https://github.com/lastfm/liblastfm
|
@ -1,36 +0,0 @@
|
||||
include/lastfm%%QTVER_SUFFIX%%/AbstractType.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Album.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Artist.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Audioscrobbler.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Auth.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Chart.h
|
||||
%%FINGERPRINT%%include/lastfm%%QTVER_SUFFIX%%/Fingerprint.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/FingerprintId.h
|
||||
%%FINGERPRINT%%include/lastfm%%QTVER_SUFFIX%%/FingerprintableSource.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/InternetConnectionMonitor.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Library.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Mbid.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/NetworkAccessManager.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/NetworkConnectionMonitor.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Playlist.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/RadioStation.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/RadioTuner.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/ScrobbleCache.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/ScrobblePoint.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Tag.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Tasteometer.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Track.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Url.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/UrlBuilder.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/User.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/XmlQuery.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/Xspf.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/global.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/misc.h
|
||||
include/lastfm%%QTVER_SUFFIX%%/ws.h
|
||||
lib/liblastfm%%QTVER_SUFFIX%%.so
|
||||
lib/liblastfm%%QTVER_SUFFIX%%.so.1
|
||||
lib/liblastfm%%QTVER_SUFFIX%%.so.1.1.0
|
||||
%%FINGERPRINT%%lib/liblastfm_fingerprint%%QTVER_SUFFIX%%.so
|
||||
%%FINGERPRINT%%lib/liblastfm_fingerprint%%QTVER_SUFFIX%%.so.1
|
||||
%%FINGERPRINT%%lib/liblastfm_fingerprint%%QTVER_SUFFIX%%.so.1.1.0
|
Loading…
Reference in New Issue
Block a user