libofa: pull debian patches to fix build with new gcc
This commit is contained in:
@@ -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 <map>
|
|
||||||
#include <expat.h>
|
|
||||||
#include <curl/curl.h>
|
|
||||||
- #include <curl/types.h>
|
|
||||||
#include <curl/easy.h>
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
--- 12,17 ----
|
|
||||||
@@ -1,17 +1,24 @@
|
|||||||
{ stdenv, fetchurl, expat, curl, fftw }:
|
{ stdenv, fetchurl, expat, curl, fftw }:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "0.9.3";
|
||||||
|
deb_patch = "5";
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libofa-0.9.3";
|
name = "libofa-${version}";
|
||||||
|
|
||||||
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 ];
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://musicip-libofa.googlecode.com/files/${name}.tar.gz";
|
url = "http://musicip-libofa.googlecode.com/files/${name}.tar.gz";
|
||||||
sha256 = "184ham039l7lwhfgg0xr2vch2xnw1lwh7sid432mh879adhlc5h2";
|
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 = {
|
meta = {
|
||||||
homepage = http://code.google.com/musicip-libofa/;
|
homepage = http://code.google.com/musicip-libofa/;
|
||||||
description = "LibOFA - Library Open Fingerprint Architecture";
|
description = "LibOFA - Library Open Fingerprint Architecture";
|
||||||
|
|||||||
@@ -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 <string.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
|
|
||||||
AudioData* loadWaveFile(char *file);
|
|
||||||
AudioData* loadDataUsingLAME(char *file);
|
|
||||||
@@ -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 <string.h>
|
|
||||||
+
|
|
||||||
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 <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
+#include <cstring>
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
#include <expat.h>
|
|
||||||
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 <cstdlib>
|
|
||||||
#include <math.h>
|
|
||||||
#include "signal_op.h"
|
|
||||||
#include "AFLIB/aflibConverter.h"
|
|
||||||
@@ -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 <class Real>
|
|
||||||
+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 <class Real>
|
|
||||||
Real hypot(const Real &a, const Real &b)
|
|
||||||
{
|
|
||||||
@@ -56,15 +65,6 @@
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
-/**
|
|
||||||
- @returns the absolute value of a real (no-complex) scalar.
|
|
||||||
-*/
|
|
||||||
-template <class Real>
|
|
||||||
-Real abs(const Real &a)
|
|
||||||
-{
|
|
||||||
- return (a > 0 ? a : -a);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/* MATH_UTILS_H */
|
|
||||||
Reference in New Issue
Block a user