1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

- Fix LICENSE

- Pare down dependencies to the options that require them
- Add TEST_TARGET to actually run the tests
- Support symbol visibility with clang
- Silence a few warnings
This commit is contained in:
Jason E. Hale 2017-01-06 11:09:18 +00:00
parent a9128250b1
commit 19cdda7e62
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=430702
3 changed files with 55 additions and 11 deletions

View File

@ -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 <bsd.port.mk>

View File

@ -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)

View File

@ -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;
}