summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/libofa/README4
-rw-r--r--libraries/libofa/libofa-0.9.3-gcc-4.3.patch35
-rw-r--r--libraries/libofa/libofa-0.9.3-gcc-4.patch39
-rw-r--r--libraries/libofa/libofa.SlackBuild72
-rw-r--r--libraries/libofa/libofa.info8
-rw-r--r--libraries/libofa/slack-desc19
6 files changed, 177 insertions, 0 deletions
diff --git a/libraries/libofa/README b/libraries/libofa/README
new file mode 100644
index 0000000000..17e4a0bdd8
--- /dev/null
+++ b/libraries/libofa/README
@@ -0,0 +1,4 @@
+LibOFA (Library Open Fingerprint Architecture) is an open-source audio
+fingerprint created and provided by MusicIP (http://www.musicip.com)
+
+This requires fftw.
diff --git a/libraries/libofa/libofa-0.9.3-gcc-4.3.patch b/libraries/libofa/libofa-0.9.3-gcc-4.3.patch
new file mode 100644
index 0000000000..f68f42bfb1
--- /dev/null
+++ b/libraries/libofa/libofa-0.9.3-gcc-4.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 <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"
diff --git a/libraries/libofa/libofa-0.9.3-gcc-4.patch b/libraries/libofa/libofa-0.9.3-gcc-4.patch
new file mode 100644
index 0000000000..d1059bafa5
--- /dev/null
+++ b/libraries/libofa/libofa-0.9.3-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 <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 */
diff --git a/libraries/libofa/libofa.SlackBuild b/libraries/libofa/libofa.SlackBuild
new file mode 100644
index 0000000000..fad5bbfef7
--- /dev/null
+++ b/libraries/libofa/libofa.SlackBuild
@@ -0,0 +1,72 @@
+#!/bin/sh
+# Slackware build script for <libofa>
+# Written by Michales Michaloudes korgie@gmail.com
+
+PRGNAM=libofa
+VERSION=${VERSION:-0.9.3}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Thanks, Gentoo guys :-)
+# http://mirrors.usc.edu/pub/linux/distributions/gentoo/media-libs/libofa/files/
+patch -p0 < $CWD/libofa-0.9.3-gcc-4.patch
+patch -p1 < $CWD/libofa-0.9.3-gcc-4.3.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/libraries/libofa/libofa.info b/libraries/libofa/libofa.info
new file mode 100644
index 0000000000..857a8140ce
--- /dev/null
+++ b/libraries/libofa/libofa.info
@@ -0,0 +1,8 @@
+PRGNAM="libofa"
+VERSION="0.9.3"
+HOMEPAGE="http://www.musicip.com"
+DOWNLOAD="http://musicip-libofa.googlecode.com/files/libofa-0.9.3.tar.gz"
+MD5SUM="51507d2c4b432bd2755f48d58471696e"
+MAINTAINER="Michales Michaloudes"
+EMAIL="korgie@gmail.com"
+APPROVED="rworkman"
diff --git a/libraries/libofa/slack-desc b/libraries/libofa/slack-desc
new file mode 100644
index 0000000000..ecbbd53da8
--- /dev/null
+++ b/libraries/libofa/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+libofa: libOFA (Library Open Fingerprint Architecture)
+libofa:
+libofa: libOFA is an open-source audio fingerprint library created and
+libofa: provided by MusicIP (http://www.musicip.com).
+libofa:
+libofa: You can also check out http://www.musicip.com/dns/ for more
+libofa: information surrounding our MusicDNS product, which is where LibOFA
+libofa: originated. Alternatively, visit MusicBrainz, http://musicbrainz.org,
+libofa: who is a MusicIP partner, and uses our fingerprint technology
+libofa: extensively throughout their site and their database.
+libofa: