From ec7b6ca63f38467601aba2fcf6fa0aa747b49c06 Mon Sep 17 00:00:00 2001
From: Andrew Pantyukhin <sat@FreeBSD.org>
Date: Sat, 14 Jul 2007 17:32:14 +0000
Subject: - Unbreak with gcc42 - Clean up a bit

---
 audio/rat30/Makefile                         | 16 +++++-----------
 audio/rat30/files/patch-Makefile             |  4 ++--
 audio/rat30/files/patch-Makefile_FreeBSD_4   |  4 ++--
 audio/rat30/files/patch-src__codec_encoder.c | 12 ++++++++++++
 mbone/rat30/Makefile                         | 16 +++++-----------
 mbone/rat30/files/patch-Makefile             |  4 ++--
 mbone/rat30/files/patch-Makefile_FreeBSD_4   |  4 ++--
 mbone/rat30/files/patch-src__codec_encoder.c | 12 ++++++++++++
 8 files changed, 42 insertions(+), 30 deletions(-)
 create mode 100644 audio/rat30/files/patch-src__codec_encoder.c
 create mode 100644 mbone/rat30/files/patch-src__codec_encoder.c

diff --git a/audio/rat30/Makefile b/audio/rat30/Makefile
index 945fce6126e6..2eff54020b36 100644
--- a/audio/rat30/Makefile
+++ b/audio/rat30/Makefile
@@ -9,7 +9,8 @@ PORTNAME=	rat
 PORTVERSION=	3.0.35
 PORTREVISION=	2
 CATEGORIES=	mbone audio
-MASTER_SITES=	http://www-mice.cs.ucl.ac.uk/multimedia/software/rat/releases/${PORTVERSION}/
+MASTER_SITES=	http://www-mice.cs.ucl.ac.uk/multimedia/software/rat/releases/${PORTVERSION}/ \
+		CENKES
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	IPv4/v6 Multicast and unicast audio conferencing tool
@@ -20,22 +21,15 @@ WRKSRC=		${WRKDIR}/rat-3.0
 
 USE_GMAKE=	yes
 MAN1=		rat.1
-MANCOMPRESSED=	no
 PLIST_FILES=	bin/rat30
 
 LATEST_LINK=	rat30
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN=		Does not compile with GCC 4.2
-.endif
-
 do-build:
-	(cd ${WRKSRC};${SETENV} ${MAKE_ENV} MAKE=${GMAKE} ${SH} ./Build rat)
+	cd ${WRKSRC};${SETENV} ${MAKE_ENV} MAKE=${GMAKE} ${SH} ./Build rat
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/rat ${PREFIX}/bin/rat30
-	${INSTALL_MAN}  ${WRKSRC}/man/man1/rat.1 ${PREFIX}/man/man1
+	${INSTALL_MAN} ${WRKSRC}/man/man1/rat.1 ${MAN1PREFIX}/man/man1/
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/audio/rat30/files/patch-Makefile b/audio/rat30/files/patch-Makefile
index b244344647c8..58c49275a23d 100644
--- a/audio/rat30/files/patch-Makefile
+++ b/audio/rat30/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig	Tue Sep 14 12:39:00 1999
-+++ Makefile	Sat Mar 17 18:16:04 2007
+--- ./Makefile.orig	1999-09-14 14:39:00.000000000 +0400
++++ ./Makefile	2007-07-14 20:49:46.000000000 +0400
 @@ -10,8 +10,8 @@
  # -DDEBUG_RTP -DREPEAT
  
diff --git a/audio/rat30/files/patch-Makefile_FreeBSD_4 b/audio/rat30/files/patch-Makefile_FreeBSD_4
index e49649bfc175..61d20251f05d 100644
--- a/audio/rat30/files/patch-Makefile_FreeBSD_4
+++ b/audio/rat30/files/patch-Makefile_FreeBSD_4
@@ -1,5 +1,5 @@
---- Makefile_FreeBSD_4.org	Mon May  7 13:07:46 2001
-+++ Makefile_FreeBSD_4	Mon May  7 13:03:51 2001
+--- ./Makefile_FreeBSD_4.orig	2007-07-14 20:49:46.000000000 +0400
++++ ./Makefile_FreeBSD_4	2007-07-14 20:49:46.000000000 +0400
 @@ -0,0 +1,6 @@
 +TCL_INC = ${LOCALBASE}/include/tcl8.2
 +TK_INC  = ${LOCALBASE}/include/tk8.2
diff --git a/audio/rat30/files/patch-src__codec_encoder.c b/audio/rat30/files/patch-src__codec_encoder.c
new file mode 100644
index 000000000000..7f940d8cafcb
--- /dev/null
+++ b/audio/rat30/files/patch-src__codec_encoder.c
@@ -0,0 +1,12 @@
+--- ./src/codec_encoder.c.orig	2007-07-14 20:50:06.000000000 +0400
++++ ./src/codec_encoder.c	2007-07-14 20:53:12.000000000 +0400
+@@ -48,7 +48,8 @@
+   	int i;
+ 	sample *d;
+ 
+-	d = (sample *)c->data = (sample *)block_alloc(SAMPLES_PER_UNIT * BYTES_PER_SAMPLE);
++	c->data = (sample *)block_alloc(SAMPLES_PER_UNIT * BYTES_PER_SAMPLE);
++	d = (sample *)c->data;
+ 	c->data_len = SAMPLES_PER_UNIT * BYTES_PER_SAMPLE;
+   	for (i=0; i < SAMPLES_PER_UNIT; i++) {
+ 		*d++ = htons(*data);
diff --git a/mbone/rat30/Makefile b/mbone/rat30/Makefile
index 945fce6126e6..2eff54020b36 100644
--- a/mbone/rat30/Makefile
+++ b/mbone/rat30/Makefile
@@ -9,7 +9,8 @@ PORTNAME=	rat
 PORTVERSION=	3.0.35
 PORTREVISION=	2
 CATEGORIES=	mbone audio
-MASTER_SITES=	http://www-mice.cs.ucl.ac.uk/multimedia/software/rat/releases/${PORTVERSION}/
+MASTER_SITES=	http://www-mice.cs.ucl.ac.uk/multimedia/software/rat/releases/${PORTVERSION}/ \
+		CENKES
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	IPv4/v6 Multicast and unicast audio conferencing tool
@@ -20,22 +21,15 @@ WRKSRC=		${WRKDIR}/rat-3.0
 
 USE_GMAKE=	yes
 MAN1=		rat.1
-MANCOMPRESSED=	no
 PLIST_FILES=	bin/rat30
 
 LATEST_LINK=	rat30
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN=		Does not compile with GCC 4.2
-.endif
-
 do-build:
-	(cd ${WRKSRC};${SETENV} ${MAKE_ENV} MAKE=${GMAKE} ${SH} ./Build rat)
+	cd ${WRKSRC};${SETENV} ${MAKE_ENV} MAKE=${GMAKE} ${SH} ./Build rat
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/rat ${PREFIX}/bin/rat30
-	${INSTALL_MAN}  ${WRKSRC}/man/man1/rat.1 ${PREFIX}/man/man1
+	${INSTALL_MAN} ${WRKSRC}/man/man1/rat.1 ${MAN1PREFIX}/man/man1/
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/mbone/rat30/files/patch-Makefile b/mbone/rat30/files/patch-Makefile
index b244344647c8..58c49275a23d 100644
--- a/mbone/rat30/files/patch-Makefile
+++ b/mbone/rat30/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig	Tue Sep 14 12:39:00 1999
-+++ Makefile	Sat Mar 17 18:16:04 2007
+--- ./Makefile.orig	1999-09-14 14:39:00.000000000 +0400
++++ ./Makefile	2007-07-14 20:49:46.000000000 +0400
 @@ -10,8 +10,8 @@
  # -DDEBUG_RTP -DREPEAT
  
diff --git a/mbone/rat30/files/patch-Makefile_FreeBSD_4 b/mbone/rat30/files/patch-Makefile_FreeBSD_4
index e49649bfc175..61d20251f05d 100644
--- a/mbone/rat30/files/patch-Makefile_FreeBSD_4
+++ b/mbone/rat30/files/patch-Makefile_FreeBSD_4
@@ -1,5 +1,5 @@
---- Makefile_FreeBSD_4.org	Mon May  7 13:07:46 2001
-+++ Makefile_FreeBSD_4	Mon May  7 13:03:51 2001
+--- ./Makefile_FreeBSD_4.orig	2007-07-14 20:49:46.000000000 +0400
++++ ./Makefile_FreeBSD_4	2007-07-14 20:49:46.000000000 +0400
 @@ -0,0 +1,6 @@
 +TCL_INC = ${LOCALBASE}/include/tcl8.2
 +TK_INC  = ${LOCALBASE}/include/tk8.2
diff --git a/mbone/rat30/files/patch-src__codec_encoder.c b/mbone/rat30/files/patch-src__codec_encoder.c
new file mode 100644
index 000000000000..7f940d8cafcb
--- /dev/null
+++ b/mbone/rat30/files/patch-src__codec_encoder.c
@@ -0,0 +1,12 @@
+--- ./src/codec_encoder.c.orig	2007-07-14 20:50:06.000000000 +0400
++++ ./src/codec_encoder.c	2007-07-14 20:53:12.000000000 +0400
+@@ -48,7 +48,8 @@
+   	int i;
+ 	sample *d;
+ 
+-	d = (sample *)c->data = (sample *)block_alloc(SAMPLES_PER_UNIT * BYTES_PER_SAMPLE);
++	c->data = (sample *)block_alloc(SAMPLES_PER_UNIT * BYTES_PER_SAMPLE);
++	d = (sample *)c->data;
+ 	c->data_len = SAMPLES_PER_UNIT * BYTES_PER_SAMPLE;
+   	for (i=0; i < SAMPLES_PER_UNIT; i++) {
+ 		*d++ = htons(*data);
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0