From 5554533b4aefaf0fb02299a67feb28ec2681a444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 1 Jul 2013 09:20:05 +0200 Subject: [PATCH] libofa: pull debian patches to fix build with new gcc --- .../libraries/libofa/curl-types.patch | 13 ------- pkgs/development/libraries/libofa/default.nix | 17 +++++--- .../libraries/libofa/gcc-4.x.patch | 12 ------ .../libofa/libofa-0.9.3-gcc-4.3.patch | 36 ----------------- .../libraries/libofa/libofa-0.9.3-gcc-4.patch | 39 ------------------- 5 files changed, 12 insertions(+), 105 deletions(-) delete mode 100644 pkgs/development/libraries/libofa/curl-types.patch delete mode 100644 pkgs/development/libraries/libofa/gcc-4.x.patch delete mode 100644 pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.3.patch delete mode 100644 pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.patch diff --git a/pkgs/development/libraries/libofa/curl-types.patch b/pkgs/development/libraries/libofa/curl-types.patch deleted file mode 100644 index acd8d9aeabb8..000000000000 --- a/pkgs/development/libraries/libofa/curl-types.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -rc libofa-0.9.3/examples/protocol.cpp libofa-0.9.3-new/examples/protocol.cpp -*** libofa-0.9.3/examples/protocol.cpp 2006-05-10 14:05:42.000000000 -0400 ---- libofa-0.9.3-new/examples/protocol.cpp 2011-11-06 09:24:05.653283203 -0500 -*************** -*** 12,18 **** - #include - #include - #include -- #include - #include - - using namespace std; ---- 12,17 ---- diff --git a/pkgs/development/libraries/libofa/default.nix b/pkgs/development/libraries/libofa/default.nix index 6b1ceee40f1c..2e2640e86362 100644 --- a/pkgs/development/libraries/libofa/default.nix +++ b/pkgs/development/libraries/libofa/default.nix @@ -1,17 +1,24 @@ { stdenv, fetchurl, expat, curl, fftw }: +let + version = "0.9.3"; + deb_patch = "5"; +in stdenv.mkDerivation rec { - name = "libofa-0.9.3"; - - propagatedBuildInputs = [ expat curl fftw ]; - - patches = [ ./libofa-0.9.3-gcc-4.patch ./libofa-0.9.3-gcc-4.3.patch ./gcc-4.x.patch ./curl-types.patch ]; + name = "libofa-${version}"; src = fetchurl { url = "http://musicip-libofa.googlecode.com/files/${name}.tar.gz"; sha256 = "184ham039l7lwhfgg0xr2vch2xnw1lwh7sid432mh879adhlc5h2"; }; + patches = fetchurl { + url = "mirror://debian/pool/main/libo/libofa/libofa_${version}-${deb_patch}.debian.tar.gz"; + sha256 = "1rfkyz13cm8izm90c1xflp4rvsa24aqs6qpbbbqqcbmvzsj6j9yn"; + }; + + propagatedBuildInputs = [ expat curl fftw ]; + meta = { homepage = http://code.google.com/musicip-libofa/; description = "LibOFA - Library Open Fingerprint Architecture"; diff --git a/pkgs/development/libraries/libofa/gcc-4.x.patch b/pkgs/development/libraries/libofa/gcc-4.x.patch deleted file mode 100644 index 50f72bb428c6..000000000000 --- a/pkgs/development/libraries/libofa/gcc-4.x.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/examples/example.cpp b/examples/example.cpp -index ef978d5..7d58a0f 100644 ---- a/examples/example.cpp -+++ b/examples/example.cpp -@@ -10,6 +10,7 @@ - #include "protocol.h" - - #include -+#include - - AudioData* loadWaveFile(char *file); - AudioData* loadDataUsingLAME(char *file); diff --git a/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.3.patch b/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.3.patch deleted file mode 100644 index 7682e3710514..000000000000 --- a/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.3.patch +++ /dev/null @@ -1,36 +0,0 @@ -Fix build with gcc >=4.3 -diff -ur libofa-0.9.3.orig/examples/example.cpp libofa-0.9.3/examples/example.cpp ---- libofa-0.9.3.orig/examples/example.cpp 2006-05-10 21:05:37.000000000 +0300 -+++ libofa-0.9.3/examples/example.cpp 2008-04-16 15:51:49.000000000 +0300 -@@ -9,6 +9,8 @@ - - #include "protocol.h" - -+#include -+ - AudioData* loadWaveFile(char *file); - AudioData* loadDataUsingLAME(char *file); - -Vain hakemistossa libofa-0.9.3/examples: example.cpp.orig -diff -ur libofa-0.9.3.orig/examples/protocol.cpp libofa-0.9.3/examples/protocol.cpp ---- libofa-0.9.3.orig/examples/protocol.cpp 2006-05-10 21:05:42.000000000 +0300 -+++ libofa-0.9.3/examples/protocol.cpp 2008-04-16 15:51:49.000000000 +0300 -@@ -8,6 +8,7 @@ - -------------------------------------------------------------------*/ - #include - #include -+#include - #include - #include - #include -diff -ur libofa-0.9.3.orig/lib/signal_op.cpp libofa-0.9.3/lib/signal_op.cpp ---- libofa-0.9.3.orig/lib/signal_op.cpp 2006-05-10 21:01:12.000000000 +0300 -+++ libofa-0.9.3/lib/signal_op.cpp 2008-04-16 15:51:49.000000000 +0300 -@@ -12,6 +12,7 @@ - // DATE CREATED: 1/12/06 - - -+#include - #include - #include "signal_op.h" - #include "AFLIB/aflibConverter.h" diff --git a/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.patch b/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.patch deleted file mode 100644 index 920c383c657b..000000000000 --- a/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/lib/JAMA/tnt_math_utils.h 2006-06-17 01:46:22.000000000 +0300 -+++ b/lib/JAMA/tnt_math_utils.h 2006-06-17 01:47:02.000000000 +0300 -@@ -20,11 +20,20 @@ - namespace TNT - { - /** -+ @returns the absolute value of a real (no-complex) scalar. -+*/ -+template -+Real abs(const Real &a) -+{ -+ return (a > 0 ? a : -a); -+} -+/** - @returns hypotenuse of real (non-complex) scalars a and b by - avoiding underflow/overflow - using (a * sqrt( 1 + (b/a) * (b/a))), rather than - sqrt(a*a + b*b). - */ -+ - template - Real hypot(const Real &a, const Real &b) - { -@@ -56,15 +65,6 @@ - } - */ - --/** -- @returns the absolute value of a real (no-complex) scalar. --*/ --template --Real abs(const Real &a) --{ -- return (a > 0 ? a : -a); --} -- - } - #endif - /* MATH_UTILS_H */