audio/spiralloops: Fix iostream / Fix DragonFly / amd64 Replace <iostream.h> and <fstream.h> with their c++ counterparts. Addition of <string.h> was originally under a DragonFly macro, but this was removed when it was shown NetBSD 5.99 x86_64 needed it too. Allow package to build on all x86_64 architectures.diff -r1.31 -r1.32 pkgsrc/audio/spiralloops/Makefile
(marino)
@@ -1,30 +1,30 @@ | @@ -1,30 +1,30 @@ | |||
1 | # $NetBSD: Makefile,v 1.31 2011/01/13 13:37:08 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.32 2011/11/23 08:20:38 marino Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= SpiralLoops-2.0.0 | 4 | DISTNAME= SpiralLoops-2.0.0 | |
5 | PKGNAME= spiralloops-2.0.0 | 5 | PKGNAME= spiralloops-2.0.0 | |
6 | PKGREVISION= 5 | 6 | PKGREVISION= 6 | |
7 | CATEGORIES= audio | 7 | CATEGORIES= audio | |
8 | MASTER_SITES= http://www.pawfal.org/Software/SpiralLoops/dload/ | 8 | MASTER_SITES= http://www.pawfal.org/Software/SpiralLoops/dload/ | |
9 | 9 | |||
10 | MAINTAINER= pkgsrc-users@NetBSD.org | 10 | MAINTAINER= pkgsrc-users@NetBSD.org | |
11 | HOMEPAGE= http://www.pawfal.org/Software/SpiralLoops/ | 11 | HOMEPAGE= http://www.pawfal.org/Software/SpiralLoops/ | |
12 | COMMENT= Loop based sampler | 12 | COMMENT= Loop based sampler | |
13 | 13 | |||
14 | # only runs correctly on little-endian machines | 14 | # only runs correctly on little-endian machines | |
15 | ONLY_FOR_PLATFORM= *-*-alpha *-*-arc *-*-cobalt *-*-dreamcast \ | 15 | ONLY_FOR_PLATFORM= *-*-alpha *-*-arc *-*-cobalt *-*-dreamcast \ | |
16 | *-*-hpcmips *-*-hpcsh *-*-i386 *-*-pc532 *-*-pmax \ | 16 | *-*-hpcmips *-*-hpcsh *-*-i386 *-*-pc532 *-*-pmax \ | |
17 | *-*-vax | 17 | *-*-vax *-*-x86_64 | |
18 | 18 | |||
19 | PKG_DESTDIR_SUPPORT= user-destdir | 19 | PKG_DESTDIR_SUPPORT= user-destdir | |
20 | 20 | |||
21 | USE_LANGUAGES= c c++ | 21 | USE_LANGUAGES= c c++ | |
22 | USE_TOOLS+= gmake | 22 | USE_TOOLS+= gmake | |
23 | GNU_CONFIGURE= yes | 23 | GNU_CONFIGURE= yes | |
24 | MAKE_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q} | 24 | MAKE_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q} | |
25 | CXXFLAGS+= -DDEVOSSAUDIO="\"${DEVOSSAUDIO}\"" | 25 | CXXFLAGS+= -DDEVOSSAUDIO="\"${DEVOSSAUDIO}\"" | |
26 | CXXFLAGS+= -DFLTK_1_0_COMPAT | 26 | CXXFLAGS+= -DFLTK_1_0_COMPAT | |
27 | 27 | |||
28 | INSTALLATION_DIRS= bin | 28 | INSTALLATION_DIRS= bin | |
29 | 29 | |||
30 | do-install: | 30 | do-install: |
@@ -1,23 +1,25 @@ | @@ -1,23 +1,25 @@ | |||
1 | $NetBSD: distinfo,v 1.10 2007/09/29 11:38:22 rillig Exp $ | 1 | $NetBSD: distinfo,v 1.11 2011/11/23 08:20:38 marino Exp $ | |
2 | 2 | |||
3 | SHA1 (SpiralLoops-2.0.0.tar.gz) = 47d9caa17f20827abef7708bff212bb3fad58a72 | 3 | SHA1 (SpiralLoops-2.0.0.tar.gz) = 47d9caa17f20827abef7708bff212bb3fad58a72 | |
4 | RMD160 (SpiralLoops-2.0.0.tar.gz) = b164bacf6d18128111959dbca079883b7fde8d85 | 4 | RMD160 (SpiralLoops-2.0.0.tar.gz) = b164bacf6d18128111959dbca079883b7fde8d85 | |
5 | Size (SpiralLoops-2.0.0.tar.gz) = 85458 bytes | 5 | Size (SpiralLoops-2.0.0.tar.gz) = 85458 bytes | |
6 | SHA1 (patch-aa) = 6dcc532e44e03a7f4d9b2d1f3e2062308b2854be | 6 | SHA1 (patch-aa) = 6dcc532e44e03a7f4d9b2d1f3e2062308b2854be | |
7 | SHA1 (patch-ab) = 9b276f356d2da5eda3b0ed49e58f1bde6cc87de6 | 7 | SHA1 (patch-ab) = 9b276f356d2da5eda3b0ed49e58f1bde6cc87de6 | |
8 | SHA1 (patch-ac) = 04946ad637a6e0a371e604ffaadd15c119f796da | 8 | SHA1 (patch-ac) = 04946ad637a6e0a371e604ffaadd15c119f796da | |
9 | SHA1 (patch-ad) = 09c1734e875335dae92afef7bbbd4fdc6821eb1f | 9 | SHA1 (patch-ad) = 09c1734e875335dae92afef7bbbd4fdc6821eb1f | |
10 | SHA1 (patch-ae) = 757ca5ca1c4f50a7848c947962efbc0148f1ccdc | 10 | SHA1 (patch-ae) = 757ca5ca1c4f50a7848c947962efbc0148f1ccdc | |
11 | SHA1 (patch-af) = 188cbce0dfad25fe617811000487821950f78d54 | 11 | SHA1 (patch-af) = 0bfe36fc2fe19182ade1f4a0f0cf79436bf21a0d | |
12 | SHA1 (patch-ag) = 1ad208ec5e7eeeee91ab1e5acb359f24858c4d39 | 12 | SHA1 (patch-ag) = 86736dde352931cd0dc89cb4b5560ef7ef84305f | |
13 | SHA1 (patch-ah) = f57d79b3467df16b4e6e0776f3457f97e5570210 | 13 | SHA1 (patch-ah) = 13266cbc1dc1e6961478052c4de32490cea5833e | |
14 | SHA1 (patch-ai) = 6329de61c54ee353540a48b5b5d7e6bdc5b6e44b | 14 | SHA1 (patch-ai) = 6329de61c54ee353540a48b5b5d7e6bdc5b6e44b | |
15 | SHA1 (patch-aj) = 19c1d640a0c9ec3f6f873cd203c9c61e89eb824a | 15 | SHA1 (patch-aj) = afdff301be5b84d5f2a2332ab315a13f3f09211c | |
16 | SHA1 (patch-ak) = 94e4650bc10a7073718a83b27ab47e217cf15f85 | 16 | SHA1 (patch-ak) = 94e4650bc10a7073718a83b27ab47e217cf15f85 | |
17 | SHA1 (patch-al) = 2189bef16fa9099497667fdfd7b5e54c4fc4bb48 | 17 | SHA1 (patch-al) = 2189bef16fa9099497667fdfd7b5e54c4fc4bb48 | |
18 | SHA1 (patch-am) = 25fdb4422dd007d7ebee50a3fb2e2accc72b275b | 18 | SHA1 (patch-am) = 25fdb4422dd007d7ebee50a3fb2e2accc72b275b | |
19 | SHA1 (patch-an) = f86cb89933e7c1a57d696283e398a40a579c04f1 | 19 | SHA1 (patch-an) = 0c45e0959591c066afb3c98c1a076b57d028b8f4 | |
20 | SHA1 (patch-ao) = fb30e505afb754536a07f0537109ceaeb343a5e4 | 20 | SHA1 (patch-ao) = fb30e505afb754536a07f0537109ceaeb343a5e4 | |
21 | SHA1 (patch-ap) = adde17445fa15afa122dc1addf0c06f6504bef0c | 21 | SHA1 (patch-ap) = ae40c9c49c5cea53d9f72d5258becda13c580c08 | |
22 | SHA1 (patch-aq) = 3f21e84fcbc911ebaf3bb60009f7f0b4b60c801a | 22 | SHA1 (patch-aq) = 3f21e84fcbc911ebaf3bb60009f7f0b4b60c801a | |
23 | SHA1 (patch-ar) = 39e110d78bac2d704ef6f2e6d27f3f36058d46bf | 23 | SHA1 (patch-ar) = 63b1db77bf55825618e5e1c0f65f69c0e36e19f6 | |
24 | SHA1 (patch-as) = 5198351e7d8ad641fef6eb4ba73ff86803b50a09 | |||
25 | SHA1 (patch-at) = dcd9bbf940a6433b4cfc175a6d4a0d6ee167b3ea |
@@ -1,13 +1,15 @@ | @@ -1,13 +1,15 @@ | |||
1 | $NetBSD: patch-af,v 1.1 2003/12/19 16:37:54 ben Exp $ | 1 | $NetBSD: patch-af,v 1.2 2011/11/23 08:20:38 marino Exp $ | |
2 | 2 | |||
3 | --- SpiralSound/SpiralInfo.h.orig 2001-04-19 13:48:12.000000000 -0700 | 3 | --- SpiralSound/SpiralInfo.h.orig 2001-04-19 20:48:12.000000000 +0000 | |
4 | +++ SpiralSound/SpiralInfo.h | 4 | +++ SpiralSound/SpiralInfo.h | |
5 | @@ -16,6 +16,8 @@ | 5 | @@ -16,7 +16,9 @@ | |
6 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 6 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
7 | */ | 7 | */ | |
8 | 8 | |||
9 | -#include <iostream.h> | |||
9 | +using namespace std; | 10 | +using namespace std; | |
10 | + | 11 | + | |
11 | #include <iostream.h> | 12 | +#include <iostream> | |
12 | #include <string> | 13 | #include <string> | |
13 | #include <stdlib.h> | 14 | #include <stdlib.h> | |
15 | #include "Sample.h" |
@@ -1,13 +1,16 @@ | @@ -1,13 +1,16 @@ | |||
1 | $NetBSD: patch-ag,v 1.1 2003/12/19 16:37:54 ben Exp $ | 1 | $NetBSD: patch-ag,v 1.2 2011/11/23 08:20:38 marino Exp $ | |
2 | 2 | |||
3 | --- SpiralSound/Sample.C.orig 2001-04-19 13:48:13.000000000 -0700 | 3 | --- SpiralSound/Sample.C.orig 2001-04-19 20:48:13.000000000 +0000 | |
4 | +++ SpiralSound/Sample.C | 4 | +++ SpiralSound/Sample.C | |
5 | @@ -20,7 +20,7 @@ | 5 | @@ -18,9 +18,9 @@ | |
6 | ||||
7 | #include <string.h> | |||
6 | #include "Sample.h" | 8 | #include "Sample.h" | |
7 | #include "iostream.h" | 9 | -#include "iostream.h" | |
10 | +#include <iostream> | |||
8 | 11 | |||
9 | -Sample::Sample(int Len=0) : | 12 | -Sample::Sample(int Len=0) : | |
10 | +Sample::Sample(int Len) : | 13 | +Sample::Sample(int Len) : | |
11 | m_Data(NULL), | 14 | m_Data(NULL), | |
12 | m_Length(0) | 15 | m_Length(0) | |
13 | { | 16 | { |
@@ -1,13 +1,21 @@ | @@ -1,13 +1,21 @@ | |||
1 | $NetBSD: patch-ah,v 1.1 2003/12/19 16:37:54 ben Exp $ | 1 | $NetBSD: patch-ah,v 1.2 2011/11/23 08:20:38 marino Exp $ | |
2 | 2 | |||
3 | --- SpiralSound/SpiralInfo.C.orig 2001-04-19 13:48:13.000000000 -0700 | 3 | --- SpiralSound/SpiralInfo.C.orig 2001-04-19 20:48:13.000000000 +0000 | |
4 | +++ SpiralSound/SpiralInfo.C | 4 | +++ SpiralSound/SpiralInfo.C | |
5 | @@ -22,7 +22,7 @@ | 5 | @@ -16,13 +16,13 @@ | |
6 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
7 | */ | |||
8 | ||||
9 | -#include <iostream.h> | |||
10 | -#include <fstream.h> | |||
11 | +#include <iostream> | |||
12 | +#include <fstream> | |||
13 | #include <stdlib.h> | |||
6 | 14 | |||
7 | #include "SpiralInfo.h" | 15 | #include "SpiralInfo.h" | |
8 | 16 | |||
9 | -float RandFloat(float s=0.0f, float e=1.0f) | 17 | -float RandFloat(float s=0.0f, float e=1.0f) | |
10 | +float RandFloat(float s, float e) | 18 | +float RandFloat(float s, float e) | |
11 | { | 19 | { | |
12 | return s+((rand()%10000/10000.0)*(e-s)); | 20 | return s+((rand()%10000/10000.0)*(e-s)); | |
13 | } | 21 | } |
@@ -1,13 +1,22 @@ | @@ -1,13 +1,22 @@ | |||
1 | $NetBSD: patch-aj,v 1.1 2003/12/19 16:37:54 ben Exp $ | 1 | $NetBSD: patch-aj,v 1.2 2011/11/23 08:20:38 marino Exp $ | |
2 | 2 | |||
3 | --- SpiralSound/RiffWav.C.orig 2001-04-19 13:48:12.000000000 -0700 | 3 | --- SpiralSound/RiffWav.C.orig 2001-04-19 20:48:12.000000000 +0000 | |
4 | +++ SpiralSound/RiffWav.C | 4 | +++ SpiralSound/RiffWav.C | |
5 | @@ -16,7 +16,7 @@ | |||
6 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |||
7 | */ | |||
8 | ||||
9 | -#include <iostream.h> | |||
10 | +#include <iostream> | |||
11 | #include <fstream> | |||
12 | #include <stdio.h> | |||
13 | #include <stdlib.h> | |||
5 | @@ -55,7 +55,7 @@ WavFile::HeaderInfo::HeaderInfo() : Riff | 14 | @@ -55,7 +55,7 @@ WavFile::HeaderInfo::HeaderInfo() : Riff | |
6 | #endif | 15 | #endif | |
7 | } | 16 | } | |
8 | 17 | |||
9 | -int WavFile::Open(string FileName, Mode mode, Channels channels=MONO) | 18 | -int WavFile::Open(string FileName, Mode mode, Channels channels=MONO) | |
10 | +int WavFile::Open(string FileName, Mode mode, Channels channels) | 19 | +int WavFile::Open(string FileName, Mode mode, Channels channels) | |
11 | { | 20 | { | |
12 | if (m_Stream!=NULL) | 21 | if (m_Stream!=NULL) | |
13 | { | 22 | { |
@@ -1,13 +1,22 @@ | @@ -1,13 +1,22 @@ | |||
1 | $NetBSD: patch-an,v 1.1 2003/12/19 16:37:54 ben Exp $ | 1 | $NetBSD: patch-an,v 1.2 2011/11/23 08:20:38 marino Exp $ | |
2 | 2 | |||
3 | --- GUI/Widgets/Fl_Loop.C.orig 2001-04-19 13:48:10.000000000 -0700 | 3 | --- GUI/Widgets/Fl_Loop.C.orig 2001-04-19 20:48:10.000000000 +0000 | |
4 | +++ GUI/Widgets/Fl_Loop.C | 4 | +++ GUI/Widgets/Fl_Loop.C | |
5 | @@ -17,7 +17,7 @@ | |||
6 | */ | |||
7 | ||||
8 | #include "Fl_Loop.h" | |||
9 | -#include <iostream.h> | |||
10 | +#include <iostream> | |||
11 | #include <FL/fl_draw.H> | |||
12 | #include <FL/x.H> | |||
13 | #include <math.h> | |||
5 | @@ -30,7 +30,7 @@ static const float RADCONV = 0.017453292 | 14 | @@ -30,7 +30,7 @@ static const float RADCONV = 0.017453292 | |
6 | static const int INDW = 3; // indicator width | 15 | static const int INDW = 3; // indicator width | |
7 | static const int UPDATECYCLES = 4; | 16 | static const int UPDATECYCLES = 4; | |
8 | 17 | |||
9 | -Fl_Loop::Fl_Loop(int x, int y, int w, int h, const char* label=0) : | 18 | -Fl_Loop::Fl_Loop(int x, int y, int w, int h, const char* label=0) : | |
10 | +Fl_Loop::Fl_Loop(int x, int y, int w, int h, const char* label) : | 19 | +Fl_Loop::Fl_Loop(int x, int y, int w, int h, const char* label) : | |
11 | Fl_Double_Window(x,y,w,h,label), | 20 | Fl_Double_Window(x,y,w,h,label), | |
12 | m_data(NULL), | 21 | m_data(NULL), | |
13 | m_MainWin(NULL), | 22 | m_MainWin(NULL), |
@@ -1,13 +1,22 @@ | @@ -1,13 +1,22 @@ | |||
1 | $NetBSD: patch-ap,v 1.1 2003/12/19 16:37:54 ben Exp $ | 1 | $NetBSD: patch-ap,v 1.2 2011/11/23 08:20:38 marino Exp $ | |
2 | 2 | |||
3 | --- GUI/Widgets/Fl_Trigger.C.orig 2001-05-07 13:43:34.000000000 -0700 | 3 | --- GUI/Widgets/Fl_Trigger.C.orig 2001-05-07 20:43:34.000000000 +0000 | |
4 | +++ GUI/Widgets/Fl_Trigger.C | 4 | +++ GUI/Widgets/Fl_Trigger.C | |
5 | @@ -17,7 +17,7 @@ | |||
6 | */ | |||
7 | ||||
8 | #include "Fl_Trigger.h" | |||
9 | -#include <iostream.h> | |||
10 | +#include <iostream> | |||
11 | #include <FL/fl_draw.H> | |||
12 | #include <math.h> | |||
13 | #include <stdio.h> | |||
5 | @@ -27,7 +27,7 @@ | 14 | @@ -27,7 +27,7 @@ | |
6 | 15 | |||
7 | static const float RADCONV = 0.017453292; | 16 | static const float RADCONV = 0.017453292; | |
8 | 17 | |||
9 | -Fl_Trigger::Fl_Trigger(int x, int y, int w, int h, const char* label=0) : | 18 | -Fl_Trigger::Fl_Trigger(int x, int y, int w, int h, const char* label=0) : | |
10 | +Fl_Trigger::Fl_Trigger(int x, int y, int w, int h, const char* label) : | 19 | +Fl_Trigger::Fl_Trigger(int x, int y, int w, int h, const char* label) : | |
11 | Fl_Widget(x,y,w,h,label), | 20 | Fl_Widget(x,y,w,h,label), | |
12 | m_CentreX(0), | 21 | m_CentreX(0), | |
13 | m_CentreY(0), | 22 | m_CentreY(0), |
@@ -1,31 +1,37 @@ | @@ -1,31 +1,37 @@ | |||
1 | $NetBSD: patch-ar,v 1.1 2007/09/29 11:38:22 rillig Exp $ | 1 | $NetBSD: patch-ar,v 1.2 2011/11/23 08:20:38 marino Exp $ | |
2 | 2 | |||
3 | g++ 4 enforces cleaner code. | 3 | --- SpiralSound/Sample.h.orig 2001-04-19 20:48:13.000000000 +0000 | |
4 | 4 | +++ SpiralSound/Sample.h | ||
5 | --- SpiralSound/Sample.h.orig 2001-04-19 22:48:13.000000000 +0200 | 5 | @@ -21,6 +21,7 @@ | |
6 | +++ SpiralSound/Sample.h 2007-09-29 13:36:09.000000000 +0200 | 6 | ||
7 | @@ -63,13 +63,13 @@ public: | 7 | #include <assert.h> | |
8 | #include <iostream> | |||
9 | +#include <string.h> | |||
10 | #include "SpiralInfo.h" | |||
11 | ||||
12 | static const unsigned short UMAX_LEV = 65535; | |||
13 | @@ -63,13 +64,13 @@ public: | |||
8 | void Shrink(int Length); | 14 | void Shrink(int Length); | |
9 | void CropTo(int NewLength); | 15 | void CropTo(int NewLength); | |
10 | 16 | |||
11 | - inline short &Sample::operator[](int i) const | 17 | - inline short &Sample::operator[](int i) const | |
12 | + inline short &operator[](int i) const | 18 | + inline short &operator[](int i) const | |
13 | { | 19 | { | |
14 | assert(i>=0 && i<m_Length); | 20 | assert(i>=0 && i<m_Length); | |
15 | return m_Data[i]; | 21 | return m_Data[i]; | |
16 | } | 22 | } | |
17 | 23 | |||
18 | - inline void Sample::Set(int i, long int v) | 24 | - inline void Sample::Set(int i, long int v) | |
19 | + inline void Set(int i, long int v) | 25 | + inline void Set(int i, long int v) | |
20 | { | 26 | { | |
21 | assert(i>=0 && i<m_Length); | 27 | assert(i>=0 && i<m_Length); | |
22 | // clip | 28 | // clip | |
23 | @@ -79,7 +79,7 @@ public: | 29 | @@ -79,7 +80,7 @@ public: | |
24 | m_Data[i]=(short)v; | 30 | m_Data[i]=(short)v; | |
25 | } | 31 | } | |
26 | 32 | |||
27 | - inline Sample &Sample::operator=(const Sample &rhs) | 33 | - inline Sample &Sample::operator=(const Sample &rhs) | |
28 | + inline Sample &operator=(const Sample &rhs) | 34 | + inline Sample &operator=(const Sample &rhs) | |
29 | { | 35 | { | |
30 | Allocate(rhs.GetLength()); | 36 | Allocate(rhs.GetLength()); | |
31 | memcpy(m_Data,rhs.GetBuffer(),GetLengthInBytes()); | 37 | memcpy(m_Data,rhs.GetBuffer(),GetLengthInBytes()); |
$NetBSD: patch-as,v 1.1 2011/11/23 08:20:38 marino Exp $
--- GUI/Widgets/Fl_Loop.h.orig 2001-04-19 20:48:10.000000000 +0000
+++ GUI/Widgets/Fl_Loop.h
@@ -18,7 +18,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
-#include <iostream.h>
+#include <iostream>
#ifndef LOOPWIDGET
#define LOOPWIDGET
$NetBSD: patch-at,v 1.1 2011/11/23 08:20:38 marino Exp $
--- GUI/Widgets/Fl_Trigger.h.orig 2001-04-19 20:48:10.000000000 +0000
+++ GUI/Widgets/Fl_Trigger.h
@@ -19,7 +19,9 @@
#include <FL/Fl.H>
#include <FL/Fl_Widget.H>
-#include <iostream.h>
+#include <iostream>
+using std::istream;
+using std::ostream;
#ifndef TRIGGERWIDGET
#define TRIGGERWIDGET