Wed Nov 23 08:32:10 2011 UTC ()
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.


(marino)
diff -r1.28 -r1.29 pkgsrc/audio/spiralsynth/Makefile
diff -r1.12 -r1.13 pkgsrc/audio/spiralsynth/distinfo
diff -r1.4 -r1.5 pkgsrc/audio/spiralsynth/patches/patch-ab
diff -r1.1 -r1.2 pkgsrc/audio/spiralsynth/patches/patch-ae
diff -r1.1 -r1.2 pkgsrc/audio/spiralsynth/patches/patch-ar

cvs diff -r1.28 -r1.29 pkgsrc/audio/spiralsynth/Makefile (expand / switch to unified diff)

--- pkgsrc/audio/spiralsynth/Makefile 2011/01/13 13:37:08 1.28
+++ pkgsrc/audio/spiralsynth/Makefile 2011/11/23 08:32:10 1.29
@@ -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
4DISTNAME= SpiralSynth-2.0.0 4DISTNAME= SpiralSynth-2.0.0
5PKGNAME= spiralsynth-2.0.0 5PKGNAME= spiralsynth-2.0.0
6PKGREVISION= 3 6PKGREVISION= 4
7CATEGORIES= audio 7CATEGORIES= audio
8MASTER_SITES= http://www.pawfal.org/Software/SpiralSynth/dload/ 8MASTER_SITES= http://www.pawfal.org/Software/SpiralSynth/dload/
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://www.pawfal.org/Software/SpiralSynth/ 11HOMEPAGE= http://www.pawfal.org/Software/SpiralSynth/
12COMMENT= Polyphonic analogue softsynth 12COMMENT= Polyphonic analogue softsynth
13 13
14# only runs correctly on little-endian machines 14# only runs correctly on little-endian machines
15ONLY_FOR_PLATFORM= *-*-alpha *-*-arc *-*-cobalt *-*-dreamcast \ 15ONLY_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
19PKG_DESTDIR_SUPPORT= user-destdir 19PKG_DESTDIR_SUPPORT= user-destdir
20 20
21USE_LANGUAGES= c c++ 21USE_LANGUAGES= c c++
22USE_TOOLS+= gmake 22USE_TOOLS+= gmake
23GNU_CONFIGURE= yes 23GNU_CONFIGURE= yes
24MAKE_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q} 24MAKE_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q}
25CXXFLAGS+= -DDEVOSSAUDIO="\"${DEVOSSAUDIO}\"" 25CXXFLAGS+= -DDEVOSSAUDIO="\"${DEVOSSAUDIO}\""
26 26
27INSTALLATION_DIRS= bin 27INSTALLATION_DIRS= bin
28 28
29do-install: 29do-install:
30 ${INSTALL_PROGRAM} ${WRKSRC}/SpiralSynth ${DESTDIR}${PREFIX}/bin 30 ${INSTALL_PROGRAM} ${WRKSRC}/SpiralSynth ${DESTDIR}${PREFIX}/bin

cvs diff -r1.12 -r1.13 pkgsrc/audio/spiralsynth/distinfo (expand / switch to unified diff)

--- pkgsrc/audio/spiralsynth/distinfo 2007/09/29 11:40:46 1.12
+++ pkgsrc/audio/spiralsynth/distinfo 2011/11/23 08:32:10 1.13
@@ -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
3SHA1 (SpiralSynth-2.0.0.tar.gz) = ea42c5b7710237139f5281cf0c4ca155c184c4cd 3SHA1 (SpiralSynth-2.0.0.tar.gz) = ea42c5b7710237139f5281cf0c4ca155c184c4cd
4RMD160 (SpiralSynth-2.0.0.tar.gz) = c05f38a9ae8b8b87f520c11854631e6dfa00c034 4RMD160 (SpiralSynth-2.0.0.tar.gz) = c05f38a9ae8b8b87f520c11854631e6dfa00c034
5Size (SpiralSynth-2.0.0.tar.gz) = 66263 bytes 5Size (SpiralSynth-2.0.0.tar.gz) = 66263 bytes
6SHA1 (patch-aa) = 01e4f4348761ca5c3e7e7c9dce0e13fa0b2b986f 6SHA1 (patch-aa) = 01e4f4348761ca5c3e7e7c9dce0e13fa0b2b986f
7SHA1 (patch-ab) = 49ea69a000b68c3c6ec07fefa9f1e2a415abb0f0 7SHA1 (patch-ab) = 1be8a26fbfcdcde6d775c55586fbff24f55b212f
8SHA1 (patch-ad) = 235afa6618c5ec5aef2ca3448388f11757918832 8SHA1 (patch-ad) = 235afa6618c5ec5aef2ca3448388f11757918832
9SHA1 (patch-ae) = b0c36c839504ecef6c781609ebd9fef266249645 9SHA1 (patch-ae) = decad0d1a4b2894a4dd9b9bc6bac9e4984b63357
10SHA1 (patch-af) = 88d1a457ad82184a1d5f34e3f56de2d8fb7daf89 10SHA1 (patch-af) = 88d1a457ad82184a1d5f34e3f56de2d8fb7daf89
11SHA1 (patch-ag) = fab78772ee8b451f60b69597c9844e7c6aae465c 11SHA1 (patch-ag) = fab78772ee8b451f60b69597c9844e7c6aae465c
12SHA1 (patch-ah) = d2ff3c4ddd4da9c96a74c3f898aa3429dcc51bb9 12SHA1 (patch-ah) = d2ff3c4ddd4da9c96a74c3f898aa3429dcc51bb9
13SHA1 (patch-ai) = e21a111e3e52fc3c24433f248fa1bfdf566e72dd 13SHA1 (patch-ai) = e21a111e3e52fc3c24433f248fa1bfdf566e72dd
14SHA1 (patch-aj) = 7e3e29fbfd38428d68f195db8a7f5007c1417c88 14SHA1 (patch-aj) = 7e3e29fbfd38428d68f195db8a7f5007c1417c88
15SHA1 (patch-ak) = 67643c5abea0498f8ea046c5abd52f2d328a5538 15SHA1 (patch-ak) = 67643c5abea0498f8ea046c5abd52f2d328a5538
16SHA1 (patch-al) = 7436bce933cbddcd4f869ab2cbbe27762d4273e5 16SHA1 (patch-al) = 7436bce933cbddcd4f869ab2cbbe27762d4273e5
17SHA1 (patch-am) = 4899c78015028a6e8047e5527362646e40a10708 17SHA1 (patch-am) = 4899c78015028a6e8047e5527362646e40a10708
18SHA1 (patch-an) = 2bafb1a9a959816af43a858fdb4a9df5586a91e9 18SHA1 (patch-an) = 2bafb1a9a959816af43a858fdb4a9df5586a91e9
19SHA1 (patch-ao) = 138f58bd7fae0226690747efcb8daf472e3a5337 19SHA1 (patch-ao) = 138f58bd7fae0226690747efcb8daf472e3a5337
20SHA1 (patch-ar) = 65ca1e3f86bbd76821ff0faecb9320bb356b0ec4 20SHA1 (patch-ar) = 44ab335b5a7831080d58a952f3cc13e5795a3f0e

cvs diff -r1.4 -r1.5 pkgsrc/audio/spiralsynth/patches/patch-ab (expand / switch to unified diff)

--- pkgsrc/audio/spiralsynth/patches/patch-ab 2004/11/25 17:24:27 1.4
+++ pkgsrc/audio/spiralsynth/patches/patch-ab 2011/11/23 08:32:10 1.5
@@ -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";

cvs diff -r1.1 -r1.2 pkgsrc/audio/spiralsynth/patches/patch-ae (expand / switch to unified diff)

--- pkgsrc/audio/spiralsynth/patches/patch-ae 2003/12/19 16:48:06 1.1
+++ pkgsrc/audio/spiralsynth/patches/patch-ae 2011/11/23 08:32:10 1.2
@@ -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

cvs diff -r1.1 -r1.2 pkgsrc/audio/spiralsynth/patches/patch-ar (expand / switch to unified diff)

--- pkgsrc/audio/spiralsynth/patches/patch-ar 2007/09/29 11:40:46 1.1
+++ pkgsrc/audio/spiralsynth/patches/patch-ar 2011/11/23 08:32:10 1.2
@@ -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
3g++ 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());