From ce5f52914303b06146b4cd0e9df5841f1c43fc52 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Fri, 3 Apr 2009 08:52:54 +0000 Subject: [PATCH] - Fix build with GCC 4.x PR: 133310 Submitted by: Ports Fury --- audio/tse3/Makefile | 29 +------------------ audio/tse3/files/patch-OSS.cpp | 24 ++++++++++----- audio/tse3/files/patch-size_t | 27 ----------------- ...ch-src__examples__recording__recording.cpp | 10 +++++++ .../tse3/files/patch-src__tse3__MidiFile.cpp | 10 +++++++ .../files/patch-src__tse3__Serializable.h | 10 +++++++ audio/tse3/files/patch-src__tse3__TSE2MDL.cpp | 10 +++++++ .../tse3/files/patch-src__tse3__cmd__Phrase.h | 10 +++++++ .../patch-src__tse3__file__MidiFilter.cpp | 9 ++++++ .../tse3/files/patch-src__tse3__file__XML.cpp | 9 ++++++ audio/tse3/files/patch-src__tse3__file__XML.h | 9 ++++++ .../files/patch-src__tse3play__tse3play.cpp | 10 +++++++ 12 files changed, 104 insertions(+), 63 deletions(-) delete mode 100644 audio/tse3/files/patch-size_t create mode 100644 audio/tse3/files/patch-src__examples__recording__recording.cpp create mode 100644 audio/tse3/files/patch-src__tse3__MidiFile.cpp create mode 100644 audio/tse3/files/patch-src__tse3__Serializable.h create mode 100644 audio/tse3/files/patch-src__tse3__TSE2MDL.cpp create mode 100644 audio/tse3/files/patch-src__tse3__cmd__Phrase.h create mode 100644 audio/tse3/files/patch-src__tse3__file__MidiFilter.cpp create mode 100644 audio/tse3/files/patch-src__tse3__file__XML.cpp create mode 100644 audio/tse3/files/patch-src__tse3__file__XML.h create mode 100644 audio/tse3/files/patch-src__tse3play__tse3play.cpp diff --git a/audio/tse3/Makefile b/audio/tse3/Makefile index bebc8e347c47..ff75a5eb8d25 100644 --- a/audio/tse3/Makefile +++ b/audio/tse3/Makefile @@ -8,8 +8,7 @@ PORTNAME= tse3 PORTVERSION= 0.3.1 PORTREVISION= 1 CATEGORIES= audio -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} +MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= A MIDI library @@ -25,38 +24,12 @@ MAN3= tse3.3 .include -.if ${OSVERSION} >= 700042 -BROKEN= Does not compile with GCC 4.2 -.endif - .if defined(WITH_ARTS) LIB_DEPENDS+= artsmidi:${PORTSDIR}/multimedia/kdemultimedia3 .else CONFIGURE_ARGS+= --without-aRts .endif -pre-everything:: - @${ECHO_MSG} - @${ECHO_MSG} -n "checking for SNDCTL_SEQ_GETTIME in sys/soundcard.h... " - @if ${GREP} -q SNDCTL_SEQ_GETTIME /usr/include/sys/soundcard.h; then\ - ${ECHO_MSG} "yes";\ - ${ECHO_MSG};\ - else\ - ${ECHO_MSG} "no";\ - ${ECHO_MSG};\ - ${ECHO_MSG} "********************************************************************************";\ - ${ECHO_MSG} "* This port requires: *";\ - ${ECHO_MSG} "* *";\ - ${ECHO_MSG} "* FreeBSD-CURRENT newer than Nov 22 03:27:09 2003 UTC (or FreeBSD 5.3-Release) *";\ - ${ECHO_MSG} "* *";\ - ${ECHO_MSG} "* OR *";\ - ${ECHO_MSG} "* *";\ - ${ECHO_MSG} "* FreeBSD-STABLE newer than Jul 20 13:49:30 2004 UTC (or FreeBSD 4.11-Release) *";\ - ${ECHO_MSG} "********************************************************************************";\ - ${ECHO_MSG};\ - ${ECHO_MSG} "Aborting."; exit 1;\ - fi - post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} diff --git a/audio/tse3/files/patch-OSS.cpp b/audio/tse3/files/patch-OSS.cpp index 3c9d4a746d52..a30a611e97d9 100644 --- a/audio/tse3/files/patch-OSS.cpp +++ b/audio/tse3/files/patch-OSS.cpp @@ -1,6 +1,15 @@ -diff -r -c tse3-0.2.7.old/src/tse3/plt/OSS.cpp tse3-0.2.7/src/tse3/plt/OSS.cpp -*** src/tse3/plt/OSS.cpp.orig Tue Oct 22 09:29:29 2002 ---- src/tse3/plt/OSS.cpp Wed Nov 12 16:13:39 2003 +*** src/tse3/plt/OSS.cpp.orig 2005-07-25 20:22:56.000000000 +0900 +--- src/tse3/plt/OSS.cpp 2009-04-02 21:20:35.000000000 +0900 +*************** +*** 25,30 **** +--- 25,31 ---- + #include + #include + #include ++ #include + + // These #includes are linux specific and I need to do some autoconf + // magic to work out how to conditionally include them *************** *** 1484,1494 **** #ifdef TSE3_WITH_OSS @@ -14,7 +23,7 @@ diff -r -c tse3-0.2.7.old/src/tse3/plt/OSS.cpp tse3-0.2.7/src/tse3/plt/OSS.cpp seqbuf_dump(); #endif } ---- 1484,1495 ---- +--- 1485,1496 ---- #ifdef TSE3_WITH_OSS // Happily, if you switch -pedantic on in gcc these macros will always // throw up warnings. Marvel at the beauty of awe_voice.h for reasons why. @@ -36,7 +45,7 @@ diff -r -c tse3-0.2.7.old/src/tse3/plt/OSS.cpp tse3-0.2.7/src/tse3/plt/OSS.cpp rate = 0; ioctl(seqfd, SNDCTL_SEQ_CTRLRATE, &rate); if (rate == -1 || rate <= 0) rate = 100; ---- 1997,2004 ---- +--- 1998,2005 ---- // there is no soundcard throw TSE3::MidiSchedulerError(TSE3::MidiSchedulerCreateErr); } @@ -47,7 +56,7 @@ diff -r -c tse3-0.2.7.old/src/tse3/plt/OSS.cpp tse3-0.2.7/src/tse3/plt/OSS.cpp if (rate == -1 || rate <= 0) rate = 100; *************** *** 2044,2049 **** ---- 2046,2059 ---- +--- 2047,2060 ---- } std::cout << ")\n"; } @@ -64,7 +73,7 @@ diff -r -c tse3-0.2.7.old/src/tse3/plt/OSS.cpp tse3-0.2.7/src/tse3/plt/OSS.cpp { *************** *** 2100,2105 **** ---- 2110,2116 ---- +--- 2111,2117 ---- } } @@ -72,4 +81,3 @@ diff -r -c tse3-0.2.7.old/src/tse3/plt/OSS.cpp tse3-0.2.7/src/tse3/plt/OSS.cpp // Now let the public API know about these devices for (unsigned int n = 0; n < nodevices; ++n) { -Only in tse3-0.2.7/src/tse3/plt: OSS.cpp.orig diff --git a/audio/tse3/files/patch-size_t b/audio/tse3/files/patch-size_t deleted file mode 100644 index b3a91568cdbe..000000000000 --- a/audio/tse3/files/patch-size_t +++ /dev/null @@ -1,27 +0,0 @@ ---- src/tse3/file/XML.h Tue Aug 23 08:37:53 2005 -+++ src/tse3/file/XML.h Sun Sep 11 20:29:45 2005 -@@ -154,5 +154,5 @@ - void element(const std::string &name, const char *value); - void element(const std::string &name, int value); -- void element(const std::string &name, unsigned int value); -+ void element(const std::string &name, size_t value); - void element(const std::string &name, bool value); - ---- src/tse3/file/XML.cpp Tue Aug 23 08:32:53 2005 -+++ src/tse3/file/XML.cpp Sun Sep 11 20:29:22 2005 -@@ -111,5 +111,5 @@ - - --void TSE3::File::XmlFileWriter::element(const std::string &name, unsigned int value) -+void TSE3::File::XmlFileWriter::element(const std::string &name, size_t value) - { - indent(out); ---- src/tse3/file/MidiFilter.cpp Tue Aug 23 08:32:31 2005 -+++ src/tse3/file/MidiFilter.cpp Sun Sep 11 20:33:13 2005 -@@ -11,5 +11,5 @@ - - writer.element("Status", mf.status()); -- unsigned int c_filter = 0, p_filter = 0; -+ size_t c_filter = 0, p_filter = 0; - for (int n = 0; n < 16; n++) if (mf.channelFilter(n)) c_filter |= (1< ++#include + + // Used in step 1 + #include "tse3/Metronome.h" diff --git a/audio/tse3/files/patch-src__tse3__MidiFile.cpp b/audio/tse3/files/patch-src__tse3__MidiFile.cpp new file mode 100644 index 000000000000..15b6060c9860 --- /dev/null +++ b/audio/tse3/files/patch-src__tse3__MidiFile.cpp @@ -0,0 +1,10 @@ +--- src/tse3/MidiFile.cpp.orig 2005-07-25 20:23:00.000000000 +0900 ++++ src/tse3/MidiFile.cpp 2009-04-02 13:01:31.000000000 +0900 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + using namespace TSE3; + diff --git a/audio/tse3/files/patch-src__tse3__Serializable.h b/audio/tse3/files/patch-src__tse3__Serializable.h new file mode 100644 index 000000000000..43f9c581c198 --- /dev/null +++ b/audio/tse3/files/patch-src__tse3__Serializable.h @@ -0,0 +1,10 @@ +--- src/tse3/Serializable.h.orig 2005-07-25 20:23:00.000000000 +0900 ++++ src/tse3/Serializable.h 2009-04-02 13:01:31.000000000 +0900 +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + namespace TSE3 + { diff --git a/audio/tse3/files/patch-src__tse3__TSE2MDL.cpp b/audio/tse3/files/patch-src__tse3__TSE2MDL.cpp new file mode 100644 index 000000000000..a7ce5718054d --- /dev/null +++ b/audio/tse3/files/patch-src__tse3__TSE2MDL.cpp @@ -0,0 +1,10 @@ +--- src/tse3/TSE2MDL.cpp.orig 2005-07-25 20:23:00.000000000 +0900 ++++ src/tse3/TSE2MDL.cpp 2009-04-02 13:01:31.000000000 +0900 +@@ -38,6 +38,7 @@ + #include "tse3/Progress.h" + + #include ++#include + + using namespace TSE3; + diff --git a/audio/tse3/files/patch-src__tse3__cmd__Phrase.h b/audio/tse3/files/patch-src__tse3__cmd__Phrase.h new file mode 100644 index 000000000000..5cd236343507 --- /dev/null +++ b/audio/tse3/files/patch-src__tse3__cmd__Phrase.h @@ -0,0 +1,10 @@ +--- src/tse3/cmd/Phrase.h.orig 2005-07-25 20:22:38.000000000 +0900 ++++ src/tse3/cmd/Phrase.h 2009-04-02 13:01:31.000000000 +0900 +@@ -29,6 +29,7 @@ + class Phrase; + class Song; + class Part; ++ class PhraseEdit; + + namespace Cmd + { diff --git a/audio/tse3/files/patch-src__tse3__file__MidiFilter.cpp b/audio/tse3/files/patch-src__tse3__file__MidiFilter.cpp new file mode 100644 index 000000000000..b1be7df520b8 --- /dev/null +++ b/audio/tse3/files/patch-src__tse3__file__MidiFilter.cpp @@ -0,0 +1,9 @@ +--- src/tse3/file/MidiFilter.cpp Tue Aug 23 08:32:31 2005 ++++ src/tse3/file/MidiFilter.cpp Sun Sep 11 20:33:13 2005 +@@ -11,5 +11,5 @@ + + writer.element("Status", mf.status()); +- unsigned int c_filter = 0, p_filter = 0; ++ size_t c_filter = 0, p_filter = 0; + for (int n = 0; n < 16; n++) if (mf.channelFilter(n)) c_filter |= (1< ++#include + + #ifdef HAVE_CONFIG_H + #include "config.h"