svn commit: r430702 - in head/audio/liblastfm: . files

Jason E. Hale jhale at FreeBSD.org
Fri Jan 6 11:09:19 UTC 2017


Author: jhale
Date: Fri Jan  6 11:09:18 2017
New Revision: 430702
URL: https://svnweb.freebsd.org/changeset/ports/430702

Log:
  - 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

Added:
  head/audio/liblastfm/files/
  head/audio/liblastfm/files/patch-CMakeLists.txt   (contents, props changed)
  head/audio/liblastfm/files/patch-src_mbid__mp3.c   (contents, props changed)
Modified:
  head/audio/liblastfm/Makefile

Modified: head/audio/liblastfm/Makefile
==============================================================================
--- head/audio/liblastfm/Makefile	Fri Jan  6 10:49:03 2017	(r430701)
+++ head/audio/liblastfm/Makefile	Fri Jan  6 11:09:18 2017	(r430702)
@@ -3,24 +3,21 @@
 
 PORTNAME=	liblastfm
 PORTVERSION=	1.0.9
+PORTREVISION=	1
 CATEGORIES=	audio
 
 MAINTAINER=	jhale at 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>

Added: head/audio/liblastfm/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/liblastfm/files/patch-CMakeLists.txt	Fri Jan  6 11:09:18 2017	(r430702)
@@ -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)

Added: head/audio/liblastfm/files/patch-src_mbid__mp3.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/liblastfm/files/patch-src_mbid__mp3.c	Fri Jan  6 11:09:18 2017	(r430702)
@@ -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;
+       }


More information about the svn-ports-head mailing list