audio/spiralsynth: 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 needed it too. Allow package to build on all x86_64 architectures.diff -r1.28 -r1.29 pkgsrc/audio/spiralsynth/Makefile
(marino)
@@ -1,30 +1,30 @@ | @@ -1,30 +1,30 @@ | |||
1 | # $NetBSD: Makefile,v 1.28 2011/01/13 13:37:08 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.29 2011/11/23 08:32:10 marino Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= SpiralSynth-2.0.0 | 4 | DISTNAME= SpiralSynth-2.0.0 | |
5 | PKGNAME= spiralsynth-2.0.0 | 5 | PKGNAME= spiralsynth-2.0.0 | |
6 | PKGREVISION= 3 | 6 | PKGREVISION= 4 | |
7 | CATEGORIES= audio | 7 | CATEGORIES= audio | |
8 | MASTER_SITES= http://www.pawfal.org/Software/SpiralSynth/dload/ | 8 | MASTER_SITES= http://www.pawfal.org/Software/SpiralSynth/dload/ | |
9 | 9 | |||
10 | MAINTAINER= pkgsrc-users@NetBSD.org | 10 | MAINTAINER= pkgsrc-users@NetBSD.org | |
11 | HOMEPAGE= http://www.pawfal.org/Software/SpiralSynth/ | 11 | HOMEPAGE= http://www.pawfal.org/Software/SpiralSynth/ | |
12 | COMMENT= Polyphonic analogue softsynth | 12 | COMMENT= Polyphonic analogue softsynth | |
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 | 26 | |||
27 | INSTALLATION_DIRS= bin | 27 | INSTALLATION_DIRS= bin | |
28 | 28 | |||
29 | do-install: | 29 | do-install: | |
30 | ${INSTALL_PROGRAM} ${WRKSRC}/SpiralSynth ${DESTDIR}${PREFIX}/bin | 30 | ${INSTALL_PROGRAM} ${WRKSRC}/SpiralSynth ${DESTDIR}${PREFIX}/bin |
@@ -1,20 +1,20 @@ | @@ -1,20 +1,20 @@ | |||
1 | $NetBSD: distinfo,v 1.12 2007/09/29 11:40:46 rillig Exp $ | 1 | $NetBSD: distinfo,v 1.13 2011/11/23 08:32:10 marino Exp $ | |
2 | 2 | |||
3 | SHA1 (SpiralSynth-2.0.0.tar.gz) = ea42c5b7710237139f5281cf0c4ca155c184c4cd | 3 | SHA1 (SpiralSynth-2.0.0.tar.gz) = ea42c5b7710237139f5281cf0c4ca155c184c4cd | |
4 | RMD160 (SpiralSynth-2.0.0.tar.gz) = c05f38a9ae8b8b87f520c11854631e6dfa00c034 | 4 | RMD160 (SpiralSynth-2.0.0.tar.gz) = c05f38a9ae8b8b87f520c11854631e6dfa00c034 | |
5 | Size (SpiralSynth-2.0.0.tar.gz) = 66263 bytes | 5 | Size (SpiralSynth-2.0.0.tar.gz) = 66263 bytes | |
6 | SHA1 (patch-aa) = 01e4f4348761ca5c3e7e7c9dce0e13fa0b2b986f | 6 | SHA1 (patch-aa) = 01e4f4348761ca5c3e7e7c9dce0e13fa0b2b986f | |
7 | SHA1 (patch-ab) = 49ea69a000b68c3c6ec07fefa9f1e2a415abb0f0 | 7 | SHA1 (patch-ab) = 1be8a26fbfcdcde6d775c55586fbff24f55b212f | |
8 | SHA1 (patch-ad) = 235afa6618c5ec5aef2ca3448388f11757918832 | 8 | SHA1 (patch-ad) = 235afa6618c5ec5aef2ca3448388f11757918832 | |
9 | SHA1 (patch-ae) = b0c36c839504ecef6c781609ebd9fef266249645 | 9 | SHA1 (patch-ae) = decad0d1a4b2894a4dd9b9bc6bac9e4984b63357 | |
10 | SHA1 (patch-af) = 88d1a457ad82184a1d5f34e3f56de2d8fb7daf89 | 10 | SHA1 (patch-af) = 88d1a457ad82184a1d5f34e3f56de2d8fb7daf89 | |
11 | SHA1 (patch-ag) = fab78772ee8b451f60b69597c9844e7c6aae465c | 11 | SHA1 (patch-ag) = fab78772ee8b451f60b69597c9844e7c6aae465c | |
12 | SHA1 (patch-ah) = d2ff3c4ddd4da9c96a74c3f898aa3429dcc51bb9 | 12 | SHA1 (patch-ah) = d2ff3c4ddd4da9c96a74c3f898aa3429dcc51bb9 | |
13 | SHA1 (patch-ai) = e21a111e3e52fc3c24433f248fa1bfdf566e72dd | 13 | SHA1 (patch-ai) = e21a111e3e52fc3c24433f248fa1bfdf566e72dd | |
14 | SHA1 (patch-aj) = 7e3e29fbfd38428d68f195db8a7f5007c1417c88 | 14 | SHA1 (patch-aj) = 7e3e29fbfd38428d68f195db8a7f5007c1417c88 | |
15 | SHA1 (patch-ak) = 67643c5abea0498f8ea046c5abd52f2d328a5538 | 15 | SHA1 (patch-ak) = 67643c5abea0498f8ea046c5abd52f2d328a5538 | |
16 | SHA1 (patch-al) = 7436bce933cbddcd4f869ab2cbbe27762d4273e5 | 16 | SHA1 (patch-al) = 7436bce933cbddcd4f869ab2cbbe27762d4273e5 | |
17 | SHA1 (patch-am) = 4899c78015028a6e8047e5527362646e40a10708 | 17 | SHA1 (patch-am) = 4899c78015028a6e8047e5527362646e40a10708 | |
18 | SHA1 (patch-an) = 2bafb1a9a959816af43a858fdb4a9df5586a91e9 | 18 | SHA1 (patch-an) = 2bafb1a9a959816af43a858fdb4a9df5586a91e9 | |
19 | SHA1 (patch-ao) = 138f58bd7fae0226690747efcb8daf472e3a5337 | 19 | SHA1 (patch-ao) = 138f58bd7fae0226690747efcb8daf472e3a5337 | |
20 | SHA1 (patch-ar) = 65ca1e3f86bbd76821ff0faecb9320bb356b0ec4 | 20 | SHA1 (patch-ar) = 44ab335b5a7831080d58a952f3cc13e5795a3f0e |
@@ -1,18 +1,26 @@ | @@ -1,18 +1,26 @@ | |||
1 | $NetBSD: patch-ab,v 1.4 2004/11/25 17:24:27 ben Exp $ | 1 | $NetBSD: patch-ab,v 1.5 2011/11/23 08:32:10 marino Exp $ | |
2 | 2 | |||
3 | --- SpiralInfo.C.orig Sun Jun 2 08:44:31 2002 | 3 | --- SpiralInfo.C.orig 2002-06-02 15:44:31.000000000 +0000 | |
4 | +++ SpiralInfo.C | 4 | +++ 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 "SpiralSound/SpiralInfo.h" | 15 | #include "SpiralSound/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 | } | |
14 | @@ -42,7 +42,7 @@ int SpiralInfo::SAMPLERATE = 44100; | 22 | @@ -42,7 +42,7 @@ int SpiralInfo::SAMPLERATE = 44100; | |
15 | float SpiralInfo::MAXSAMPLE = 1.0f; | 23 | float SpiralInfo::MAXSAMPLE = 1.0f; | |
16 | bool SpiralInfo::WANTMIDI = true; | 24 | bool SpiralInfo::WANTMIDI = true; | |
17 | int SpiralInfo::FILTERGRAN = 50; | 25 | int SpiralInfo::FILTERGRAN = 50; | |
18 | -string SpiralInfo::OUTPUTFILE = "/dev/dsp"; | 26 | -string SpiralInfo::OUTPUTFILE = "/dev/dsp"; |
@@ -1,13 +1,15 @@ | @@ -1,13 +1,15 @@ | |||
1 | $NetBSD: patch-ae,v 1.1 2003/12/19 16:48:06 ben Exp $ | 1 | $NetBSD: patch-ae,v 1.2 2011/11/23 08:32:10 marino Exp $ | |
2 | 2 | |||
3 | --- SpiralSound/SpiralInfo.h.orig 2000-11-26 07:52:46.000000000 -0800 | 3 | --- SpiralSound/SpiralInfo.h.orig 2002-06-02 15:44:45.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 |
@@ -1,42 +1,48 @@ | @@ -1,42 +1,48 @@ | |||
1 | $NetBSD: patch-ar,v 1.1 2007/09/29 11:40:46 rillig Exp $ | 1 | $NetBSD: patch-ar,v 1.2 2011/11/23 08:32:10 marino Exp $ | |
2 | 2 | |||
3 | g++ 4 enforces cleaner code. | 3 | --- SpiralSound/Sample.h.orig 2002-06-02 10:28:26.000000000 +0000 | |
4 | 4 | +++ SpiralSound/Sample.h | ||
5 | --- SpiralSound/Sample.h.orig 2002-06-02 12:28:26.000000000 +0200 | 5 | @@ -22,6 +22,7 @@ | |
6 | +++ SpiralSound/Sample.h 2007-09-29 13:39:21.000000000 +0200 | 6 | #include <assert.h> | |
7 | @@ -66,7 +66,7 @@ public: | 7 | #include <limits.h> | |
8 | #include <iostream> | |||
9 | +#include <string.h> | |||
10 | #include "SpiralInfo.h" | |||
11 | ||||
12 | //#define DEBUG | |||
13 | @@ -66,7 +67,7 @@ public: | |||
8 | void CropTo(int NewLength); | 14 | void CropTo(int NewLength); | |
9 | bool IsEmpty() const { return m_IsEmpty; } | 15 | bool IsEmpty() const { return m_IsEmpty; } | |
10 | 16 | |||
11 | - inline float &Sample::operator[](int i) const | 17 | - inline float &Sample::operator[](int i) const | |
12 | + inline float &operator[](int i) const | 18 | + inline float &operator[](int i) const | |
13 | { | 19 | { | |
14 | #ifdef DEBUG | 20 | #ifdef DEBUG | |
15 | assert(i>=0 && i<m_Length); | 21 | assert(i>=0 && i<m_Length); | |
16 | @@ -75,7 +75,7 @@ public: | 22 | @@ -75,7 +76,7 @@ public: | |
17 | } | 23 | } | |
18 | 24 | |||
19 | // Linear interpolated | 25 | // Linear interpolated | |
20 | - inline float Sample::operator[](float i) const | 26 | - inline float Sample::operator[](float i) const | |
21 | + inline float operator[](float i) const | 27 | + inline float operator[](float i) const | |
22 | { | 28 | { | |
23 | int ii=(int)i; | 29 | int ii=(int)i; | |
24 | 30 | |||
25 | @@ -89,7 +89,7 @@ public: | 31 | @@ -89,7 +90,7 @@ public: | |
26 | } | 32 | } | |
27 | 33 | |||
28 | 34 | |||
29 | - inline void Sample::Set(int i, float v) | 35 | - inline void Sample::Set(int i, float v) | |
30 | + inline void Set(int i, float v) | 36 | + inline void Set(int i, float v) | |
31 | { | 37 | { | |
32 | m_IsEmpty=false; | 38 | m_IsEmpty=false; | |
33 | #ifdef DEBUG | 39 | #ifdef DEBUG | |
34 | @@ -98,7 +98,7 @@ public: | 40 | @@ -98,7 +99,7 @@ public: | |
35 | m_Data[i]=v; | 41 | m_Data[i]=v; | |
36 | } | 42 | } | |
37 | 43 | |||
38 | - inline Sample &Sample::operator=(const Sample &rhs) | 44 | - inline Sample &Sample::operator=(const Sample &rhs) | |
39 | + inline Sample &operator=(const Sample &rhs) | 45 | + inline Sample &operator=(const Sample &rhs) | |
40 | { | 46 | { | |
41 | Allocate(rhs.GetLength()); | 47 | Allocate(rhs.GetLength()); | |
42 | memcpy(m_Data,rhs.GetBuffer(),GetLengthInBytes()); | 48 | memcpy(m_Data,rhs.GetBuffer(),GetLengthInBytes()); |