[libkcddb] fix build
Rex Dieter
rdieter at fedoraproject.org
Sun Jan 20 06:19:59 UTC 2013
commit e4a720435f0d9e345e7a5a5c95960571e31e6c53
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Sun Jan 20 00:19:38 2013 -0600
fix build
libkcddb-4.9.98-libmusicbrainz5_cflags.patch | 55 ++++++++++++++++++++++++++
libkcddb.spec | 6 +++
2 files changed, 61 insertions(+), 0 deletions(-)
---
diff --git a/libkcddb-4.9.98-libmusicbrainz5_cflags.patch b/libkcddb-4.9.98-libmusicbrainz5_cflags.patch
new file mode 100644
index 0000000..cbdab55
--- /dev/null
+++ b/libkcddb-4.9.98-libmusicbrainz5_cflags.patch
@@ -0,0 +1,55 @@
+diff -up libkcddb-4.9.98/cmake/FindMusicBrainz5.cmake.cflags libkcddb-4.9.98/cmake/FindMusicBrainz5.cmake
+--- libkcddb-4.9.98/cmake/FindMusicBrainz5.cmake.cflags 2012-12-18 02:40:19.000000000 -0600
++++ libkcddb-4.9.98/cmake/FindMusicBrainz5.cmake 2013-01-20 00:14:44.860102865 -0600
+@@ -1,7 +1,7 @@
+ # Module to find the musicbrainz-4 library
+ #
+ # It defines
+-# MUSICBRAINZ5_INCLUDE_DIR - the include dir
++# MUSICBRAINZ5_INCLUDE_DIRS - the include dirs
+ # MUSICBRAINZ5_LIBRARIES - the required libraries
+ # MUSICBRAINZ5_FOUND - true if both of the above have been found
+
+@@ -10,17 +10,23 @@
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+-if(MUSICBRAINZ5_INCLUDE_DIR AND MUSICBRAINZ5_LIBRARIES)
++if(MUSICBRAINZ5_INCLUDE_DIRS AND MUSICBRAINZ5_LIBRARIES)
+ set(MUSICBRAINZ5_FIND_QUIETLY TRUE)
+-endif(MUSICBRAINZ5_INCLUDE_DIR AND MUSICBRAINZ5_LIBRARIES)
++endif(MUSICBRAINZ5_INCLUDE_DIRS AND MUSICBRAINZ5_LIBRARIES)
+
+-FIND_PATH(MUSICBRAINZ5_INCLUDE_DIR musicbrainz5/Disc.h)
+-
+-FIND_LIBRARY( MUSICBRAINZ5_LIBRARIES NAMES musicbrainz5)
++IF (NOT WIN32)
++ # use pkg-config to get the directories and then use these values
++ # in the FIND_PATH() and FIND_LIBRARY() calls
++ find_package(PkgConfig)
++ PKG_SEARCH_MODULE( MUSICBRAINZ5 libmusicbrainz5 )
++ELSE (NOT WIN32)
++ FIND_PATH( MUSICBRAINZ5_INCLUDE_DIRS musicbrainz5/Disc.h )
++ FIND_LIBRARY( MUSICBRAINZ5_LIBRARIES NAMES musicbrainz5 )
++ENDIF (NOT WIN32)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args( MusicBrainz5 DEFAULT_MSG
+- MUSICBRAINZ5_INCLUDE_DIR MUSICBRAINZ5_LIBRARIES)
++ MUSICBRAINZ5_INCLUDE_DIRS MUSICBRAINZ5_LIBRARIES)
+
+-MARK_AS_ADVANCED(MUSICBRAINZ5_INCLUDE_DIR MUSICBRAINZ5_LIBRARIES)
++MARK_AS_ADVANCED(MUSICBRAINZ5_INCLUDE_DIRS MUSICBRAINZ5_LIBRARIES)
+
+diff -up libkcddb-4.9.98/CMakeLists.txt.cflags libkcddb-4.9.98/CMakeLists.txt
+--- libkcddb-4.9.98/CMakeLists.txt.cflags 2012-12-18 02:40:19.000000000 -0600
++++ libkcddb-4.9.98/CMakeLists.txt 2013-01-20 00:15:42.811916101 -0600
+@@ -13,7 +13,7 @@ macro_log_feature(MUSICBRAINZ5_FOUND "Mu
+
+ if(MUSICBRAINZ5_FOUND)
+ set(HAVE_MUSICBRAINZ5 1)
+- include_directories(${MUSICBRAINZ5_INCLUDE_DIR})
++ include_directories(${MUSICBRAINZ5_INCLUDE_DIRS})
+
+ set(libmusicbrainz_SRCS ${libmusicbrainz_SRCS}
+ musicbrainz/musicbrainzlookup.cpp
diff --git a/libkcddb.spec b/libkcddb.spec
index 0462eb6..4e073ea 100644
--- a/libkcddb.spec
+++ b/libkcddb.spec
@@ -13,6 +13,10 @@ URL: http://www.kde.org/
%endif
Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
+## upstreamable patches
+# query/use pkg-config libmusicbrainz5 info
+Patch50: libkcddb-4.9.98-libmusicbrainz5_cflags.patch
+
BuildRequires: kdelibs4-devel >= %{version}
BuildRequires: pkgconfig(libmusicbrainz5)
@@ -37,6 +41,8 @@ Conflicts: kdemultimedia-devel < 6:4.8.80
%prep
%setup -q
+%patch50 -p1 -b .libmusicbrainz5_cflags
+
%build
mkdir -p %{_target_platform}
More information about the scm-commits
mailing list