diff --git a/audio/liblastfm/Makefile b/audio/liblastfm/Makefile index 64b95179337e..82b08d1eb999 100644 --- a/audio/liblastfm/Makefile +++ b/audio/liblastfm/Makefile @@ -3,24 +3,21 @@ PORTNAME= liblastfm PORTVERSION= 1.0.9 +PORTREVISION= 1 CATEGORIES= audio MAINTAINER= jhale@FreeBSD.org COMMENT= Qt C++ library for the Last.fm webservices -LICENSE= GPLv3 +LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -LIB_DEPENDS= libfftw3.so:math/fftw3 \ - libfftw3f.so:math/fftw3-float \ - libsamplerate.so:audio/libsamplerate - +USE_GITHUB= yes GH_ACCOUNT= lastfm USES= cmake pkgconfig -USE_GITHUB= yes USE_LDCONFIG= yes -USE_QT4= dbus network qtestlib sql xml \ +USE_QT4= corelib dbus network sql xml \ moc_build qmake_build rcc_build CMAKE_ARGS= -DBUILD_WITH_QT4:BOOL=ON @@ -28,10 +25,17 @@ CMAKE_ARGS= -DBUILD_WITH_QT4:BOOL=ON OPTIONS_DEFINE= FINGERPRINT TEST OPTIONS_DEFAULT= FINGERPRINT OPTIONS_SUB= yes + FINGERPRINT_DESC= Build the lastfm-fingerprint library -FINGERPRINT_CMAKE_ON= -DBUILD_FINGERPRINT:BOOL=ON -FINGERPRINT_CMAKE_OFF= -DBUILD_FINGERPRINT:BOOL=OFF -TEST_CMAKE_ON= -DBUILD_TESTS:BOOL=ON -TEST_CMAKE_OFF= -DBUILD_TESTS:BOOL=OFF +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 + +TEST_USE= QT4=qtestlib_build +TEST_CMAKE_BOOL= BUILD_TESTS +TEST_TARGET= test .include diff --git a/audio/liblastfm/files/patch-CMakeLists.txt b/audio/liblastfm/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..d783371d4780 --- /dev/null +++ b/audio/liblastfm/files/patch-CMakeLists.txt @@ -0,0 +1,25 @@ +- 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) diff --git a/audio/liblastfm/files/patch-src_mbid__mp3.c b/audio/liblastfm/files/patch-src_mbid__mp3.c new file mode 100644 index 000000000000..50a5dd1c091e --- /dev/null +++ b/audio/liblastfm/files/patch-src_mbid__mp3.c @@ -0,0 +1,15 @@ +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 m + + 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; + }