From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- extra/libofa/PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++ extra/libofa/gcc-4.patch | 39 +++++++++++++++++++++++++++++++++++++++ extra/libofa/gcc4.3.patch | 35 +++++++++++++++++++++++++++++++++++ extra/libofa/gcc4.5.patch | 10 ++++++++++ 4 files changed, 122 insertions(+) create mode 100644 extra/libofa/PKGBUILD create mode 100644 extra/libofa/gcc-4.patch create mode 100644 extra/libofa/gcc4.3.patch create mode 100644 extra/libofa/gcc4.5.patch (limited to 'extra/libofa') diff --git a/extra/libofa/PKGBUILD b/extra/libofa/PKGBUILD new file mode 100644 index 000000000..c58f98794 --- /dev/null +++ b/extra/libofa/PKGBUILD @@ -0,0 +1,38 @@ +# $Id: PKGBUILD 80563 2010-05-19 16:11:07Z andrea $ +# Maintainer: Andrea Scarpino +# Contributor: Tobias Powalowski + +pkgname=libofa +pkgver=0.9.3 +pkgrel=2 +pkgdesc="Open Fingerprint Architecture" +arch=(i686 x86_64) +url="http://code.google.com/p/musicip-libofa/" +license=('GPL2' 'custom') +depends=('expat' 'curl' 'fftw' 'gcc-libs') +makedepends=('pkgconfig') +options=('!libtool') +source=("http://musicip-libofa.googlecode.com/files/$pkgname-$pkgver.tar.gz" + 'gcc-4.patch' + 'gcc4.3.patch' + 'gcc4.5.patch') +sha1sums=('3dec8e1dcea937f74b4165e9ffd4d4f355e4594a' + 'cb19377d0634c03d2a49cfc61915cec918c341f7' + 'cae08bdc12de923d5e032696702a0530ae6eafc1' + '754d69d66ab46219035ccafeeb3ff62433cca4f2') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + patch -Np0 -i ${srcdir}/gcc-4.patch || return 1 + patch -Np1 -i ${srcdir}/gcc4.3.patch || return 1 + patch -Np1 -i ${srcdir}/gcc4.5.patch || return 1 + ./configure --prefix=/usr || return 1 + make || return 1 +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install || return 1 + + install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} diff --git a/extra/libofa/gcc-4.patch b/extra/libofa/gcc-4.patch new file mode 100644 index 000000000..d1059bafa --- /dev/null +++ b/extra/libofa/gcc-4.patch @@ -0,0 +1,39 @@ +--- lib/JAMA/tnt_math_utils.h.orig 2006-06-17 01:46:22.000000000 +0300 ++++ 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 */ diff --git a/extra/libofa/gcc4.3.patch b/extra/libofa/gcc4.3.patch new file mode 100644 index 000000000..f68f42bfb --- /dev/null +++ b/extra/libofa/gcc4.3.patch @@ -0,0 +1,35 @@ +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/extra/libofa/gcc4.5.patch b/extra/libofa/gcc4.5.patch new file mode 100644 index 000000000..44f437d5b --- /dev/null +++ b/extra/libofa/gcc4.5.patch @@ -0,0 +1,10 @@ +--- libofa-0.9.3/examples/example.cpp~ 2010-05-19 18:07:19.517650317 +0200 ++++ libofa-0.9.3/examples/example.cpp 2010-05-19 18:07:31.754317472 +0200 +@@ -6,6 +6,7 @@ + No rights reserved. + + -------------------------------------------------------------------*/ ++#include + + #include "protocol.h" + -- cgit v1.2.3-54-g00ecf