svn commit: r328101 - in head/audio/tclmidi: . files
Pietro Cerutti
gahr at FreeBSD.org
Tue Sep 24 08:21:49 UTC 2013
Author: gahr
Date: Tue Sep 24 08:21:47 2013
New Revision: 328101
URL: http://svnweb.freebsd.org/changeset/ports/328101
Log:
- Convert to USES+=tcl
- Fix build on all supported versions
Added:
head/audio/tclmidi/files/patch-smf_SMFHead.cxx (contents, props changed)
head/audio/tclmidi/files/patch-smf_SMFHead.h (contents, props changed)
head/audio/tclmidi/files/patch-tclmUtil.cxx (contents, props changed)
Modified:
head/audio/tclmidi/Makefile
head/audio/tclmidi/files/patch-ac
Modified: head/audio/tclmidi/Makefile
==============================================================================
--- head/audio/tclmidi/Makefile Tue Sep 24 07:58:22 2013 (r328100)
+++ head/audio/tclmidi/Makefile Tue Sep 24 08:21:47 2013 (r328101)
@@ -10,7 +10,7 @@ MASTER_SITES= http://ringtail.its.monash
MAINTAINER= ports at FreeBSD.org
COMMENT= Language designed for creating and editing standard MIDI files
-USE_TCL= 84+
+USES+= tcl
NO_STAGE= yes
MAKE_ENV= TCL_INCLUDEDIR="${TCL_INCLUDEDIR}" TCL_LIBDIR="${TCL_LIBDIR}"
MAKE_ENV+= TCLSH=${TCLSH} FILESDIR="${FILESDIR}" MAN="${MAN1} ${MANN}"
@@ -26,6 +26,10 @@ MANN= midiconf.n midievnt.n midifree.n
miditrck.n mididev.n miditime.n midifeat.n
MANCOMPRESSED= maybe
+post-patch:
+ ${FIND} ${WRKSRC} -type f | ${XARGS} \
+ ${REINPLACE_CMD} -e 's|iostream.h|iostream|g; s|iomanip.h|iomanip|g'
+
post-build:
cd ${WRKSRC} && echo pkg_mkIndex . tclmidi31.so | ${TCLSH}
Modified: head/audio/tclmidi/files/patch-ac
==============================================================================
--- head/audio/tclmidi/files/patch-ac Tue Sep 24 07:58:22 2013 (r328100)
+++ head/audio/tclmidi/files/patch-ac Tue Sep 24 08:21:47 2013 (r328101)
@@ -1,20 +1,11 @@
---- smf/SMFTrack.cxx.orig Mon Aug 5 05:47:36 1996
-+++ smf/SMFTrack.cxx Wed May 14 03:51:51 2003
-@@ -352,10 +352,17 @@
- return (1);
- }
-
-+#include <sys/param.h>
+--- smf/SMFTrack.cxx.orig 1996-08-05 05:47:36.000000000 +0200
++++ smf/SMFTrack.cxx 2013-09-24 09:53:53.000000000 +0200
+@@ -355,7 +355,8 @@
ostream &
operator<<(ostream &os, const SMFTrack &t)
{
- long i, prev_flags;
-+#if __FreeBSD_version < 500000
-+ long
-+#else
-+ std::_Ios_Fmtflags
-+#endif
-+ prev_flags;
++ std::ios_base::fmtflags prev_flags;
+ long i;
int prev_width;
unsigned char *ptr;
Added: head/audio/tclmidi/files/patch-smf_SMFHead.cxx
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/tclmidi/files/patch-smf_SMFHead.cxx Tue Sep 24 08:21:47 2013 (r328101)
@@ -0,0 +1,13 @@
+--- smf/SMFHead.cxx.orig 2013-09-24 09:16:20.000000000 +0200
++++ smf/SMFHead.cxx 2013-09-24 09:16:53.000000000 +0200
+@@ -160,8 +160,8 @@
+ return (1);
+ }
+
+-ostream &
+-operator<<(ostream &os, const SMFHead &h)
++std::ostream &
++operator<<(std::ostream &os, const SMFHead &h)
+ {
+
+ os << "Format: " << h.format << " Num. Tracks: " << h.num_tracks
Added: head/audio/tclmidi/files/patch-smf_SMFHead.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/tclmidi/files/patch-smf_SMFHead.h Tue Sep 24 08:21:47 2013 (r328101)
@@ -0,0 +1,15 @@
+--- smf/SMFHead.h.orig 2013-09-24 09:15:40.000000000 +0200
++++ smf/SMFHead.h 2013-09-24 09:15:50.000000000 +0200
+@@ -34,10 +34,10 @@
+ extern "C" {
+ #include <tcl.h>
+ }
+-#include <iostream.h>
++#include <iostream>
+
+ class SMFHead {
+- friend ostream &operator<<(ostream &os, const SMFHead &h);
++ friend std::ostream &operator<<(std::ostream &os, const SMFHead &h);
+ public:
+ SMFHead();
+ SMFHead(short form, short num, short div);
Added: head/audio/tclmidi/files/patch-tclmUtil.cxx
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/tclmidi/files/patch-tclmUtil.cxx Tue Sep 24 08:21:47 2013 (r328101)
@@ -0,0 +1,30 @@
+--- tclmUtil.cxx.orig 2013-09-24 09:20:50.000000000 +0200
++++ tclmUtil.cxx 2013-09-24 09:22:32.000000000 +0200
+@@ -31,8 +31,8 @@
+ extern "C" {
+ #include <tcl.h>
+ }
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <string.h>
+@@ -99,12 +99,12 @@
+ }
+
+ void
+-Tclm_PrintData(ostream &buf, const unsigned char *data, long length)
++Tclm_PrintData(std::ostream &buf, const unsigned char *data, long length)
+ {
+ long i;
+
+- buf.setf(ios::showbase | ios::internal);
+- buf << hex << setw(4) << setfill('0') << (int)data[0];
++ buf.setf(std::ios::showbase | std::ios::internal);
++ buf << std::hex << std::setw(4) << std::setfill('0') << (int)data[0];
+ for (i = 1; i < length; i++)
+- buf << " " << hex << setw(4) << setfill('0') << (int)data[i];
++ buf << " " << std::hex << std::setw(4) << std::setfill('0') << (int)data[i];
+ }
More information about the svn-ports-head
mailing list