From 972eb171fa8a55fb12e9da26b5ec14b39e3a4b85 Mon Sep 17 00:00:00 2001 From: ponce Date: Wed, 25 Apr 2012 17:08:17 +0200 Subject: libraries/libofa: Patched for gcc47 and curl >=7.24; misc. cleanups Signed-off-by: Robby Workman --- libraries/libofa/libofa-0.9.3-gcc-4.3.patch | 35 ------------------- libraries/libofa/libofa-0.9.3-gcc-4.patch | 39 ---------------------- libraries/libofa/libofa.SlackBuild | 10 ++++-- .../libofa/patches/libofa-0.9.3-gcc-4.3.patch | 35 +++++++++++++++++++ .../libofa/patches/libofa-0.9.3-gcc-4.7.patch | 23 +++++++++++++ libraries/libofa/patches/libofa-0.9.3-gcc-4.patch | 39 ++++++++++++++++++++++ 6 files changed, 104 insertions(+), 77 deletions(-) delete mode 100644 libraries/libofa/libofa-0.9.3-gcc-4.3.patch delete mode 100644 libraries/libofa/libofa-0.9.3-gcc-4.patch create mode 100644 libraries/libofa/patches/libofa-0.9.3-gcc-4.3.patch create mode 100644 libraries/libofa/patches/libofa-0.9.3-gcc-4.7.patch create mode 100644 libraries/libofa/patches/libofa-0.9.3-gcc-4.patch (limited to 'libraries/libofa') diff --git a/libraries/libofa/libofa-0.9.3-gcc-4.3.patch b/libraries/libofa/libofa-0.9.3-gcc-4.3.patch deleted file mode 100644 index 22e8f7616445..000000000000 --- a/libraries/libofa/libofa-0.9.3-gcc-4.3.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -Nur 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 13:05:37.000000000 -0500 -+++ libofa-0.9.3/examples/example.cpp 2010-05-21 00:41:32.566411537 -0500 -@@ -9,6 +9,9 @@ - - #include "protocol.h" - -+#include -+#include -+ - AudioData* loadWaveFile(char *file); - AudioData* loadDataUsingLAME(char *file); - -diff -Nur 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 13:05:42.000000000 -0500 -+++ libofa-0.9.3/examples/protocol.cpp 2010-05-21 00:41:21.948412917 -0500 -@@ -8,6 +8,7 @@ - -------------------------------------------------------------------*/ - #include - #include -+#include - #include - #include - #include -diff -Nur 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 13:01:12.000000000 -0500 -+++ libofa-0.9.3/lib/signal_op.cpp 2010-05-21 00:41:21.948412917 -0500 -@@ -12,6 +12,7 @@ - // DATE CREATED: 1/12/06 - - -+#include - #include - #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 deleted file mode 100644 index d1059bafa55f..000000000000 --- a/libraries/libofa/libofa-0.9.3-gcc-4.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- 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/libraries/libofa/libofa.SlackBuild b/libraries/libofa/libofa.SlackBuild index 5e67f4fc2cc8..8a28d04d4aba 100644 --- a/libraries/libofa/libofa.SlackBuild +++ b/libraries/libofa/libofa.SlackBuild @@ -4,7 +4,7 @@ PRGNAM=libofa VERSION=${VERSION:-0.9.3} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} # Automatically determine the architecture we're building on: @@ -53,8 +53,12 @@ find . \ # 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 +patch -p0 < $CWD/patches/libofa-0.9.3-gcc-4.patch +patch -p1 < $CWD/patches/libofa-0.9.3-gcc-4.3.patch +# Fix for gcc-4.7 +patch -p1 < $CWD/patches/libofa-0.9.3-gcc-4.7.patch +# remove a deprecated curl header +sed -i "s|^#include ||" examples/protocol.cpp CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ diff --git a/libraries/libofa/patches/libofa-0.9.3-gcc-4.3.patch b/libraries/libofa/patches/libofa-0.9.3-gcc-4.3.patch new file mode 100644 index 000000000000..22e8f7616445 --- /dev/null +++ b/libraries/libofa/patches/libofa-0.9.3-gcc-4.3.patch @@ -0,0 +1,35 @@ +diff -Nur 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 13:05:37.000000000 -0500 ++++ libofa-0.9.3/examples/example.cpp 2010-05-21 00:41:32.566411537 -0500 +@@ -9,6 +9,9 @@ + + #include "protocol.h" + ++#include ++#include ++ + AudioData* loadWaveFile(char *file); + AudioData* loadDataUsingLAME(char *file); + +diff -Nur 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 13:05:42.000000000 -0500 ++++ libofa-0.9.3/examples/protocol.cpp 2010-05-21 00:41:21.948412917 -0500 +@@ -8,6 +8,7 @@ + -------------------------------------------------------------------*/ + #include + #include ++#include + #include + #include + #include +diff -Nur 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 13:01:12.000000000 -0500 ++++ libofa-0.9.3/lib/signal_op.cpp 2010-05-21 00:41:21.948412917 -0500 +@@ -12,6 +12,7 @@ + // DATE CREATED: 1/12/06 + + ++#include + #include + #include "signal_op.h" + #include "AFLIB/aflibConverter.h" diff --git a/libraries/libofa/patches/libofa-0.9.3-gcc-4.7.patch b/libraries/libofa/patches/libofa-0.9.3-gcc-4.7.patch new file mode 100644 index 000000000000..6d696b0c5e6c --- /dev/null +++ b/libraries/libofa/patches/libofa-0.9.3-gcc-4.7.patch @@ -0,0 +1,23 @@ +diff -Naur libofa-0.9.3.orig/examples/uselame.cpp libofa-0.9.3/examples/uselame.cpp +--- libofa-0.9.3.orig/examples/uselame.cpp 2006-05-10 20:05:51.000000000 +0200 ++++ libofa-0.9.3/examples/uselame.cpp 2012-03-30 06:19:44.072989020 +0200 +@@ -6,6 +6,8 @@ + No rights reserved. + + -------------------------------------------------------------------*/ ++#include ++#include + #include "protocol.h" + #ifdef WIN32 + #include "windows.h" +diff -Naur libofa-0.9.3.orig/examples/wavefile.cpp libofa-0.9.3/examples/wavefile.cpp +--- libofa-0.9.3.orig/examples/wavefile.cpp 2006-05-10 20:05:56.000000000 +0200 ++++ libofa-0.9.3/examples/wavefile.cpp 2012-03-30 06:20:11.808008983 +0200 +@@ -6,6 +6,7 @@ + No rights reserved. + + -------------------------------------------------------------------*/ ++#include + #include "protocol.h" + #ifdef WIN32 + #include "io.h" diff --git a/libraries/libofa/patches/libofa-0.9.3-gcc-4.patch b/libraries/libofa/patches/libofa-0.9.3-gcc-4.patch new file mode 100644 index 000000000000..d1059bafa55f --- /dev/null +++ b/libraries/libofa/patches/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 ++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 */ -- cgit v1.2.3