- Convert to USES+=tcl

- Fix build on all supported versions
This commit is contained in:
Pietro Cerutti 2013-09-24 08:21:47 +00:00
parent e15e0d798b
commit 830f573abc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=328101
5 changed files with 67 additions and 14 deletions

View file

@ -10,7 +10,7 @@ MASTER_SITES= http://ringtail.its.monash.edu.au/pub/midi/PROGRAMS/
MAINTAINER= ports@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 midiget.n midigrep.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}

View file

@ -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;

View file

@ -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

View file

@ -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);

View file

@ -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];
}