File stk-4.4.2-2.patch of Package stk
diff -urB stk-4.4.2-1/configure.ac stk-4.4.2-2/configure.ac
--- stk-4.4.2-1/configure.ac 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/configure.ac 2011-02-11 16:57:46.515846823 +0000
@@ -51,7 +51,7 @@
AC_ARG_ENABLE(debug,
[ --enable-debug = enable various debug output],
[AC_SUBST( cppflag, ["-D_STK_DEBUG_ -D__RTAUDIO_DEBUG__ -D__RTMIDI_DEBUG__"] ) AC_SUBST( cxxflag, ["-g"] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
- [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [-O3] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
+ [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
# Checks for functions
if test $realtime = yes; then
@@ -63,7 +63,7 @@
CPPFLAGS="$CPPFLAGS $cppflag"
# For debugging and optimization ... overwrite default because it has both -g and -O2
-CXXFLAGS="$cxxflag"
++CXXFLAGS="$CXXFLAGS $cxxflag"
# Check compiler and use -Wall if gnu.
if [test $GXX = "yes" ;] then
diff -urB stk-4.4.2-1/projects/demo/Banded stk-4.4.2-2/projects/demo/Banded
--- stk-4.4.2-1/projects/demo/Banded 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/projects/demo/Banded 2011-02-11 17:21:29.917846903 +0000
@@ -1 +1 @@
-wish < tcl/Banded.tcl | demo BandedWG -or -ip
\ No newline at end of file
+wish < tcl/Banded.tcl | ./demo BandedWG -or -ip
diff -urB stk-4.4.2-1/projects/demo/demo.cpp stk-4.4.2-2/projects/demo/demo.cpp
--- stk-4.4.2-1/projects/demo/demo.cpp 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/projects/demo/demo.cpp 2011-02-11 17:00:44.450845451 +0000
@@ -19,7 +19,7 @@
// functions are defined in utilites.cpp ... specific to this program.
#include "utilities.h"
-#include <signal.h>
+#include <csignal>
#include <iostream>
#include <algorithm>
#include <cmath>
diff -urB stk-4.4.2-1/projects/demo/Md2Skini.cpp stk-4.4.2-2/projects/demo/Md2Skini.cpp
--- stk-4.4.2-1/projects/demo/Md2Skini.cpp 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/projects/demo/Md2Skini.cpp 2011-02-11 17:00:03.859845358 +0000
@@ -13,7 +13,9 @@
#include "RtMidi.h"
#include "SKINI.msg"
#include <iostream>
-#include <stdlib.h>
+#include <cstdlib>
+#include <cstring>
+#include <cstdio>
void usage(void) {
std::cout << "\nuseage: Md2Skini <flag(s)>\n\n";
@@ -28,7 +30,7 @@
exit(0);
}
-#include <signal.h>
+#include <csignal>
static void finish( int ignore ){ std::cout << "Type 'Exit' to quit." << std::endl; }
bool parseSkiniControl = true;
diff -urB stk-4.4.2-1/projects/demo/utilities.cpp stk-4.4.2-2/projects/demo/utilities.cpp
--- stk-4.4.2-1/projects/demo/utilities.cpp 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/projects/demo/utilities.cpp 2011-02-11 17:01:23.681972283 +0000
@@ -2,8 +2,8 @@
//
// Gary P. Scavone, 1999.
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include "utilities.h"
// STK Instrument Classes
diff -urB stk-4.4.2-1/projects/effects/effects.cpp stk-4.4.2-2/projects/effects/effects.cpp
--- stk-4.4.2-1/projects/effects/effects.cpp 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/projects/effects/effects.cpp 2011-02-11 17:02:12.920971307 +0000
@@ -13,7 +13,7 @@
#include "Messager.h"
#include "RtAudio.h"
-#include <signal.h>
+#include <csignal>
#include <cstring>
#include <iostream>
#include <algorithm>
diff -urB stk-4.4.2-1/projects/examples/controlbee.cpp stk-4.4.2-2/projects/examples/controlbee.cpp
--- stk-4.4.2-1/projects/examples/controlbee.cpp 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/projects/examples/controlbee.cpp 2011-02-11 17:02:52.354969971 +0000
@@ -4,7 +4,7 @@
#include "RtAudio.h"
#include "Messager.h"
#include "SKINI.msg"
-#include <math.h>
+#include <cmath>
#include <algorithm>
using std::min;
diff -urB stk-4.4.2-1/projects/examples/play.cpp stk-4.4.2-2/projects/examples/play.cpp
--- stk-4.4.2-1/projects/examples/play.cpp 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/projects/examples/play.cpp 2011-02-11 17:03:13.691846514 +0000
@@ -16,7 +16,7 @@
#include "FileWvIn.h"
#include "RtAudio.h"
-#include <signal.h>
+#include <csignal>
#include <iostream>
#include <cstdlib>
diff -urB stk-4.4.2-1/projects/examples/playsmf.cpp stk-4.4.2-2/projects/examples/playsmf.cpp
--- stk-4.4.2-1/projects/examples/playsmf.cpp 2010-02-04 20:52:39.000000000 +0000
+++ stk-4.4.2-2/projects/examples/playsmf.cpp 2011-02-11 17:03:39.101844783 +0000
@@ -7,7 +7,7 @@
#include "MidiFileIn.h"
#include "RtMidi.h"
-#include <signal.h>
+#include <csignal>
#include <cstdlib>
bool done = false;
diff -urB stk-4.4.2-1/projects/ragamatic/ragamat.cpp stk-4.4.2-2/projects/ragamatic/ragamat.cpp
--- stk-4.4.2-1/projects/ragamatic/ragamat.cpp 2010-02-04 20:52:40.000000000 +0000
+++ stk-4.4.2-2/projects/ragamatic/ragamat.cpp 2011-02-09 15:56:52.123926530 +0000
@@ -10,7 +10,7 @@
#include "Messager.h"
#include "RtAudio.h"
-#include <signal.h>
+#include <csignal>
#include <cstring>
#include <iostream>
#include <algorithm>
Only in stk-4.4.2-2/src: Makefile.diff
diff -urB stk-4.4.2-1/src/Makefile.in stk-4.4.2-2/src/Makefile.in
--- stk-4.4.2-1/src/Makefile.in 2010-02-04 20:52:40.000000000 +0000
+++ stk-4.4.2-2/src/Makefile.in 2011-02-13 16:08:57.087576908 +0000
@@ -3,7 +3,7 @@
LIBRARY = libstk.a
SHAREDLIB = libstk.so
-MAJOR = 4
+MAJOR = 0
RELEASE = 4.4.2
AR = ar -rsc
@@ -64,18 +64,17 @@
%.o : ../src/include/%.cpp
$(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@
-all : $(LIBRARY)
+all : $(LIBRARY) $(SHAREDLIB).$(MAJOR).$(RELEASE)
$(LIBRARY) : $(OBJECTS)
$(RM) -f $(LIBRARY)
$(AR) $(LIBRARY) $(OBJECT_PATH)/*.o
-$(SHAREDLIB).$(RELEASE) : $(OBJECTS)
+$(SHAREDLIB).$(MAJOR).$(RELEASE) : $(OBJECTS)
$(RM) -f $(@) $(SHAREDLIB).$(MAJOR) $(SHAREDLIB)
- $(CC) $(LDFLAGS) -fPIC -shared -o $(@) $(OBJECT_PATH)/*.o $(LIBS)
- $(LN) -s $(SHAREDLIB).$(RELEASE) $(SHAREDLIB).$(MAJOR)
- $(LN) -s $(SHAREDLIB).$(RELEASE) $(SHAREDLIB)
-# $(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname,$(SHAREDLIB).$(MAJOR) -o $(@) $(OBJECT_PATH)/*.o $(LIBS)
+ $(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname,$(SHAREDLIB).$(MAJOR) -o $(@) $(OBJECT_PATH)/*.o $(LIBS)
+ $(LN) -s $(SHAREDLIB).$(MAJOR).$(RELEASE) $(SHAREDLIB).$(MAJOR)
+ $(LN) -s $(SHAREDLIB).$(MAJOR).$(RELEASE) $(SHAREDLIB)
$(OBJECTS) : Stk.h
@@ -87,4 +86,4 @@
$(RM) -fR *.dSYM
distclean: clean
- $(RM) Makefile
\ No newline at end of file
+ $(RM) Makefile
diff -urB stk-4.4.2-1/src/Messager.cpp stk-4.4.2-2/src/Messager.cpp
--- stk-4.4.2-1/src/Messager.cpp 2010-02-04 20:52:40.000000000 +0000
+++ stk-4.4.2-2/src/Messager.cpp 2011-02-11 17:05:50.760970739 +0000
@@ -302,7 +302,7 @@
#if (defined(__OS_IRIX__) || defined(__OS_LINUX__) || defined(__OS_MACOSX__))
#include <sys/time.h>
- #include <errno.h>
+ #include <cerrno>
#endif
THREAD_RETURN THREAD_TYPE socketHandler(void *ptr)
diff -urB stk-4.4.2-1/src/Noise.cpp stk-4.4.2-2/src/Noise.cpp
--- stk-4.4.2-1/src/Noise.cpp 2010-02-04 20:52:40.000000000 +0000
+++ stk-4.4.2-2/src/Noise.cpp 2011-02-11 17:06:19.065846462 +0000
@@ -11,7 +11,7 @@
/***************************************************/
#include "Noise.h"
-#include <time.h>
+#include <ctime>
namespace stk {
diff -urB stk-4.4.2-1/src/RtAudio.cpp stk-4.4.2-2/src/RtAudio.cpp
--- stk-4.4.2-1/src/RtAudio.cpp 2010-02-04 20:52:40.000000000 +0000
+++ stk-4.4.2-2/src/RtAudio.cpp 2011-02-11 17:08:46.241970077 +0000
@@ -45,6 +45,7 @@
#include <cstdlib>
#include <cstring>
#include <climits>
+#include <cstdio>
// Static variable definitions.
const unsigned int RtApi::MAX_SAMPLE_RATES = 14;
@@ -6298,12 +6299,11 @@
#if defined(__LINUX_OSS__)
#include <unistd.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
+#include <sys/ioctl.h>.
#include <fcntl.h>
#include "soundcard.h"
-#include <errno.h>
-#include <math.h>
+#include <cerrno>
+#include <cmath>
extern "C" void *ossCallbackHandler(void * ptr);
diff -urB stk-4.4.2-1/src/Stk.cpp stk-4.4.2-2/src/Stk.cpp
--- stk-4.4.2-1/src/Stk.cpp 2010-02-04 20:52:40.000000000 +0000
+++ stk-4.4.2-2/src/Stk.cpp 2011-02-11 17:09:10.762970030 +0000
@@ -51,7 +51,8 @@
/***************************************************/
#include "Stk.h"
-
+#include <cstdlib>
+
namespace stk {
StkFloat Stk :: srate_ = (StkFloat) SRATE;