aboutsummaryrefslogtreecommitdiff
path: root/audio/fcplay
diff options
context:
space:
mode:
authorAnders Nordby <anders@FreeBSD.org>2006-06-06 19:42:56 +0000
committerAnders Nordby <anders@FreeBSD.org>2006-06-06 19:42:56 +0000
commitee5a26a838f2540f40c3aaaf796be8d66bcca9a3 (patch)
tree7c7b59dd25704120aed2b9cd9324790e5375c72b /audio/fcplay
parent00f38b60057cb1d58cff24be6b2ca0f0d643c0df (diff)
downloadports-ee5a26a838f2540f40c3aaaf796be8d66bcca9a3.tar.gz
ports-ee5a26a838f2540f40c3aaaf796be8d66bcca9a3.zip
Notes
Diffstat (limited to 'audio/fcplay')
-rw-r--r--audio/fcplay/Makefile2
-rw-r--r--audio/fcplay/files/patch-Dump.h14
-rw-r--r--audio/fcplay/files/patch-Main.cpp62
-rw-r--r--audio/fcplay/files/patch-SmartPtr.h26
4 files changed, 103 insertions, 1 deletions
diff --git a/audio/fcplay/Makefile b/audio/fcplay/Makefile
index 9e2487b08e7d..60983fb3c841 100644
--- a/audio/fcplay/Makefile
+++ b/audio/fcplay/Makefile
@@ -21,7 +21,7 @@ BUILD_DEPENDS= ${LOCALBASE}/include/sidplay/compconf.h:${PORTSDIR}/audio/libsidp
USE_GMAKE= yes
GNU_CONFIGURE= yes
CXXFLAGS+= -I${LOCALBASE}/include
-USE_GCC= 2.95
+USE_GCC= 3.2+
PORTDOCS= ABOUT POINTER
PLIST_FILES= bin/fcplay
diff --git a/audio/fcplay/files/patch-Dump.h b/audio/fcplay/files/patch-Dump.h
new file mode 100644
index 000000000000..743838a73bcd
--- /dev/null
+++ b/audio/fcplay/files/patch-Dump.h
@@ -0,0 +1,14 @@
+--- Dump.h.orig Mon Mar 3 22:47:00 1997
++++ Dump.h Tue Jun 6 20:05:48 2006
+@@ -2,8 +2,9 @@
+ #define DUMP_H
+
+
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
++using namespace std;
+
+ #include "MyTypes.h"
+ #include "SmartPtr.h"
diff --git a/audio/fcplay/files/patch-Main.cpp b/audio/fcplay/files/patch-Main.cpp
new file mode 100644
index 000000000000..81e7437579ca
--- /dev/null
+++ b/audio/fcplay/files/patch-Main.cpp
@@ -0,0 +1,62 @@
+--- Main.cpp.orig Mon Mar 3 22:47:00 1997
++++ Main.cpp Tue Jun 6 21:05:07 2006
+@@ -1,8 +1,11 @@
+-#include <fstream.h>
++#include <fstream>
+ #include <limits.h>
+ #include <signal.h>
+ #include <stdlib.h>
+-#include <string.h>
++#include <cstring>
++#include <iostream>
++using namespace std;
++#include <new>
+
+ #include "FC.h"
+ #include "MyTypes.h"
+@@ -95,11 +98,7 @@
+ streampos fileLen = 0;
+
+ // open binary input file stream at end of file
+-#if defined(HAVE_IOS_BIN)
+- ifstream myIn( argv[inFileArgN], ios::in | ios::bin | ios::ate | ios::nocreate );
+-#else
+- ifstream myIn( argv[inFileArgN], ios::in | ios::binary | ios::ate | ios::nocreate );
+-#endif
++ ifstream myIn( argv[inFileArgN], ios::in | ios::binary | ios::ate );
+ // As a replacement for !is_open(), bad() and the NOT-operator don't seem
+ // to work on all systems.
+ #if defined(DONT_HAVE_IS_OPEN)
+@@ -119,20 +118,20 @@
+ fileLen = (udword)myIn.tellg();
+ #endif
+ fileLen = myIn.tellg();
+- buffer = new ubyte[fileLen+extraFileBufLen];
++ buffer = new(std::nothrow) ubyte[(long int)fileLen+extraFileBufLen];
+
+ myIn.seekg(0,ios::beg);
+ cout << "Loading" << flush;
+ streampos restFileLen = fileLen;
+ while ( restFileLen > INT_MAX )
+ {
+- myIn.read( buffer + (fileLen - restFileLen), INT_MAX );
++ myIn.read( (char*)buffer + (fileLen - restFileLen), INT_MAX );
+ restFileLen -= INT_MAX;
+ cout << "." << flush;
+ }
+ if ( restFileLen > 0 )
+ {
+- myIn.read( buffer + (fileLen - restFileLen), restFileLen );
++ myIn.read( (char*)buffer + (fileLen - restFileLen), restFileLen );
+ cout << "." << flush;
+ }
+ cout << endl << flush;
+@@ -147,7 +146,7 @@
+ extern udword pcmFreq;
+ pcmFreq = 44100;
+
+- ubyte* sampleBuffer = new ubyte[pcmFreq];
++ ubyte* sampleBuffer = new(std::nothrow) ubyte[pcmFreq];
+
+ AudioConfig myAudioCfg;
+ myAudioCfg.frequency = pcmFreq;
diff --git a/audio/fcplay/files/patch-SmartPtr.h b/audio/fcplay/files/patch-SmartPtr.h
new file mode 100644
index 000000000000..adc6549afc34
--- /dev/null
+++ b/audio/fcplay/files/patch-SmartPtr.h
@@ -0,0 +1,26 @@
+--- SmartPtr.h.orig Tue Jun 6 20:00:27 2006
++++ SmartPtr.h Tue Jun 6 20:00:38 2006
+@@ -207,16 +207,16 @@
+ {
+ if ( bufferLen >= 1 )
+ {
+- pBufCurrent = ( bufBegin = buffer );
+- bufEnd = bufBegin + bufferLen;
+- bufLen = bufferLen;
+- status = true;
++ this->pBufCurrent = ( this->bufBegin = buffer );
++ this->bufEnd = this->bufBegin + bufferLen;
++ this->bufLen = bufferLen;
++ this->status = true;
+ }
+ else
+ {
+- pBufCurrent = bufBegin = bufEnd = 0;
+- bufLen = 0;
+- status = false;
++ this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
++ this->bufLen = 0;
++ this->status = false;
+ }
+ }
+ };