Add libmusicbrainz 2.x and 3.x
svn path=/nixpkgs/trunk/; revision=23793
This commit is contained in:
parent
359b360fc2
commit
09c85666cd
6 changed files with 160 additions and 0 deletions
16
pkgs/development/libraries/libmusicbrainz/2.x.nix
Normal file
16
pkgs/development/libraries/libmusicbrainz/2.x.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ stdenv, fetchurl, expat }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libmusicbrainz-2.1.5";
|
||||
|
||||
configureFlags = "--enable-cpp-headers";
|
||||
|
||||
buildInputs = [ expat ];
|
||||
|
||||
patches = [ ./gcc-4.x.patch ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.musicbrainz.org/pub/musicbrainz/${name}.tar.gz";
|
||||
sha256 = "183i4c109r5qx3mk4r986sx5xw4n5mdhdz4yz3rrv3s2xm5rqqn6";
|
||||
};
|
||||
}
|
14
pkgs/development/libraries/libmusicbrainz/default.nix
Normal file
14
pkgs/development/libraries/libmusicbrainz/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ stdenv, fetchurl, cmake, neon, libdiscid }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libmusicbrainz-3.0.2";
|
||||
|
||||
buildInputs = [ cmake neon libdiscid ];
|
||||
|
||||
patches = [ ./find-neon.patch ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.musicbrainz.org/pub/musicbrainz/${name}.tar.gz";
|
||||
sha256 = "1nhyl9kalvcn0r86y3kps6id84y3rc43226g67bssfb2h9b5x8xr";
|
||||
};
|
||||
}
|
52
pkgs/development/libraries/libmusicbrainz/find-neon.patch
Normal file
52
pkgs/development/libraries/libmusicbrainz/find-neon.patch
Normal file
|
@ -0,0 +1,52 @@
|
|||
diff --git a/cmake/modules/FindNeon.cmake b/cmake/modules/FindNeon.cmake
|
||||
index 0a6b300..dbd6194 100644
|
||||
--- a/cmake/modules/FindNeon.cmake
|
||||
+++ b/cmake/modules/FindNeon.cmake
|
||||
@@ -1,10 +1,10 @@
|
||||
INCLUDE(UsePkgConfig)
|
||||
PKGCONFIG(neon _NeonIncDir _NeonLinkDir _NeonLinkFlags _NeonCflags)
|
||||
|
||||
-FIND_PATH(NEON_INCLUDE_DIR ne_request.h
|
||||
+FIND_PATH(NEON_INCLUDE_DIR neon/ne_request.h
|
||||
${_NeonIncDir}
|
||||
- /usr/include/neon
|
||||
- /usr/local/include/neon
|
||||
+ /usr/include
|
||||
+ /usr/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(NEON_LIBRARIES neon
|
||||
diff --git a/src/utils_private.cpp b/src/utils_private.cpp
|
||||
index 751b4a7..5a06eca 100644
|
||||
--- a/src/utils_private.cpp
|
||||
+++ b/src/utils_private.cpp
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <cstdarg>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
-#include <ne_uri.h>
|
||||
+#include <neon/ne_uri.h>
|
||||
#include "utils_private.h"
|
||||
|
||||
using namespace std;
|
||||
diff --git a/src/webservice.cpp b/src/webservice.cpp
|
||||
index cd483f9..483f486 100644
|
||||
--- a/src/webservice.cpp
|
||||
+++ b/src/webservice.cpp
|
||||
@@ -26,11 +26,11 @@
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <ne_session.h>
|
||||
-#include <ne_request.h>
|
||||
-#include <ne_utils.h>
|
||||
-#include <ne_auth.h>
|
||||
-#include <ne_uri.h>
|
||||
+#include <neon/ne_session.h>
|
||||
+#include <neon/ne_request.h>
|
||||
+#include <neon/ne_utils.h>
|
||||
+#include <neon/ne_auth.h>
|
||||
+#include <neon/ne_uri.h>
|
||||
#include <musicbrainz3/webservice.h>
|
||||
#include <musicbrainz3/artist.h>
|
||||
#include "utils_private.h"
|
60
pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch
Normal file
60
pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch
Normal file
|
@ -0,0 +1,60 @@
|
|||
diff --git a/lib/c_wrapper.cpp b/lib/c_wrapper.cpp
|
||||
index deae11d..ebc7854 100644
|
||||
--- a/lib/c_wrapper.cpp
|
||||
+++ b/lib/c_wrapper.cpp
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "musicbrainz.h"
|
||||
#include "trm.h"
|
||||
#include "mb_c.h"
|
||||
+#include <string.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
diff --git a/lib/comhttpsocket.cpp b/lib/comhttpsocket.cpp
|
||||
index 067313b..4371772 100644
|
||||
--- a/lib/comhttpsocket.cpp
|
||||
+++ b/lib/comhttpsocket.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
+#include <string.h>
|
||||
|
||||
const char* g_strCOMVer = "libmusicbrainz/"VERSION;
|
||||
|
||||
diff --git a/lib/comsocket.cpp b/lib/comsocket.cpp
|
||||
index 01a94be..7bfc4dd 100644
|
||||
--- a/lib/comsocket.cpp
|
||||
+++ b/lib/comsocket.cpp
|
||||
@@ -44,6 +44,7 @@ ____________________________________________________________________________*/
|
||||
#include <net/if.h>
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
+#include <string.h>
|
||||
|
||||
#define mb_socklen_t ACCEPT_ARG3
|
||||
|
||||
diff --git a/lib/http.cpp b/lib/http.cpp
|
||||
index 85390a3..e63713c 100644
|
||||
--- a/lib/http.cpp
|
||||
+++ b/lib/http.cpp
|
||||
@@ -67,6 +67,7 @@
|
||||
#ifdef __QNX__
|
||||
#include <strings.h>
|
||||
#endif
|
||||
+#include <string.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
diff --git a/lib/sigclient.cpp b/lib/sigclient.cpp
|
||||
index 9f76008..4bbbaae 100644
|
||||
--- a/lib/sigclient.cpp
|
||||
+++ b/lib/sigclient.cpp
|
||||
@@ -32,6 +32,7 @@ email : ijr@relatable.com
|
||||
#ifdef WIN32
|
||||
#pragma warning(disable:4786)
|
||||
#endif
|
||||
+#include <string.h>
|
||||
|
||||
#include "sigclient.h"
|
||||
#include "comhttpsocket.h"
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/src/utils_private.cpp b/src/utils_private.cpp
|
||||
index 2abe857..751b4a7 100644
|
||||
--- a/src/utils_private.cpp
|
||||
+++ b/src/utils_private.cpp
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
+#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cstdarg>
|
||||
#include <iostream>
|
|
@ -3299,6 +3299,12 @@ let
|
|||
|
||||
libmusclecard = callPackage ../development/libraries/libmusclecard { };
|
||||
|
||||
libmusicbrainz2 = callPackage ../development/libraries/libmusicbrainz/2.x.nix { };
|
||||
|
||||
libmusicbrainz3 = callPackage ../development/libraries/libmusicbrainz { };
|
||||
|
||||
libmusicbrainz = libmusicbrainz3;
|
||||
|
||||
libnih = callPackage ../development/libraries/libnih { };
|
||||
|
||||
libnova = callPackage ../development/libraries/libnova { };
|
||||
|
|
Loading…
Reference in a new issue