diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2010-09-14 14:29:19 +0000 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2010-09-14 14:29:19 +0000 |
commit | 09c85666cd4bd89a36283c6de3c8849e7cc46dde (patch) | |
tree | 86680dbe5fdf022d3c49ed4ad784d52f7609b374 /pkgs/development/libraries/libmusicbrainz | |
parent | 359b360fc2e958540d685ae014e66be85948dc60 (diff) |
Add libmusicbrainz 2.x and 3.x
svn path=/nixpkgs/trunk/; revision=23793
Diffstat (limited to 'pkgs/development/libraries/libmusicbrainz')
5 files changed, 154 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libmusicbrainz/2.x.nix b/pkgs/development/libraries/libmusicbrainz/2.x.nix new file mode 100644 index 0000000000000..383cdf3291a5a --- /dev/null +++ b/pkgs/development/libraries/libmusicbrainz/2.x.nix @@ -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"; + }; +} diff --git a/pkgs/development/libraries/libmusicbrainz/default.nix b/pkgs/development/libraries/libmusicbrainz/default.nix new file mode 100644 index 0000000000000..f39a3793eec13 --- /dev/null +++ b/pkgs/development/libraries/libmusicbrainz/default.nix @@ -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"; + }; +} diff --git a/pkgs/development/libraries/libmusicbrainz/find-neon.patch b/pkgs/development/libraries/libmusicbrainz/find-neon.patch new file mode 100644 index 0000000000000..2230c46018e58 --- /dev/null +++ b/pkgs/development/libraries/libmusicbrainz/find-neon.patch @@ -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" diff --git a/pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch b/pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch new file mode 100644 index 0000000000000..f55c4f2cd41b9 --- /dev/null +++ b/pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch @@ -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" diff --git a/pkgs/development/libraries/libmusicbrainz/missing-include.patch b/pkgs/development/libraries/libmusicbrainz/missing-include.patch new file mode 100644 index 0000000000000..2a1d2b38cae73 --- /dev/null +++ b/pkgs/development/libraries/libmusicbrainz/missing-include.patch @@ -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> |