diff options
-rw-r--r-- | devel/mad-flute/DESCR | 20 | ||||
-rw-r--r-- | devel/mad-flute/Makefile | 26 | ||||
-rw-r--r-- | devel/mad-flute/PLIST | 3 | ||||
-rw-r--r-- | devel/mad-flute/distinfo | 18 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-aa | 150 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-ab | 23 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-ac | 61 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-ad | 15 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-ae | 16 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-af | 15 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-ag | 42 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-ah | 146 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-ai | 43 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-aj | 50 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-ak | 59 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-al | 33 | ||||
-rw-r--r-- | devel/mad-flute/patches/patch-am | 28 |
17 files changed, 748 insertions, 0 deletions
diff --git a/devel/mad-flute/DESCR b/devel/mad-flute/DESCR new file mode 100644 index 00000000000..6fe5038d4fc --- /dev/null +++ b/devel/mad-flute/DESCR @@ -0,0 +1,20 @@ +MAD project implemented two protocols designed for reliable content +delivery. File Delivery over Unidirectional Transport (FLUTE) is a +protocol for the unidirectional delivery of files over the Internet, +which is particularly suited to multicast networks. FLUTE builds on +Asyncronous Layered Coding (ALC), the base protocol designed for +massively scalable multicast distribution. Asynchronous Layered +Coding combines the Layered Coding Transport (LCT) building block, a +multiple rate congestion control building block and the Forward Error +Correction (FEC) building block to provide congestion controlled +reliable asynchronous delivery of content to an unlimited number of +concurrent receivers from a single sender. + +MAD-ALCLIB library is an implementation of the ALC/LCT protocol, along +with the RLC congestion control protocol and Compact No-Code, Simple +XOR and Reed-Solomon FEC schemes. Session Description Protocol (SDP) +can be used to describe FLUTE sessions. MAD-SDPLIB library is an +implementation of "SDP Descriptors for FLUTE" Internet-Draft. +MAD-FLUTELIB is an implementation of the FLUTE protocol, and it builds +on MAD-ALCLIB and MAD-SDPLIB libraries. MAD-FLUTE is a multicast file +transfer tool build on the above mentioned libraries. diff --git a/devel/mad-flute/Makefile b/devel/mad-flute/Makefile new file mode 100644 index 00000000000..96876cdcc82 --- /dev/null +++ b/devel/mad-flute/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +DISTNAME= mad_fcl_v1.7_src +PKGNAME= mad-flute-1.7 +CATEGORIES= devel +MASTER_SITES= http://mad.cs.tut.fi/download/ + +MAINTAINER= agc@NetBSD.org +HOMEPAGE= http://mad.cs.tut.fi/ +COMMENT= Reliable Multicast Layering +LICENSE= gnu-gpl-v2 + +PKG_DESTDIR_SUPPORT= user-destdir + +USE_TOOLS+= gmake + +INSTALLATION_DIRS+= bin + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/bin/flute ${DESTDIR}${PREFIX}/bin/flute + ${INSTALL_PROGRAM} ${WRKSRC}/bin/multis_flute ${DESTDIR}${PREFIX}/bin/multis_flute + +.include "../../textproc/expat/buildlink3.mk" +.include "../../www/curl/buildlink3.mk" + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/mad-flute/PLIST b/devel/mad-flute/PLIST new file mode 100644 index 00000000000..b9ece29e9e3 --- /dev/null +++ b/devel/mad-flute/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ +bin/flute +bin/multis_flute diff --git a/devel/mad-flute/distinfo b/devel/mad-flute/distinfo new file mode 100644 index 00000000000..734575a9c72 --- /dev/null +++ b/devel/mad-flute/distinfo @@ -0,0 +1,18 @@ +$NetBSD: distinfo,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +SHA1 (mad_fcl_v1.7_src.tar.gz) = e2157b42e1006167224fbaea7bec46d438e6a41c +RMD160 (mad_fcl_v1.7_src.tar.gz) = 6aeaf046f16818fc591702371feeab11c02d4ce7 +Size (mad_fcl_v1.7_src.tar.gz) = 208408 bytes +SHA1 (patch-aa) = 6aed24b852f6bdb39f51f71ce8d504aff4a5d958 +SHA1 (patch-ab) = 4cfd145d94d3009929a1a466779725b1be5eb1cc +SHA1 (patch-ac) = f0a7f04b539cdae439d4ebd82d4a65a9c645d88b +SHA1 (patch-ad) = fad10b4db89122ec9e78590237215eea55ecc7a9 +SHA1 (patch-ae) = ccc0c001ce736d4334ecd973ee812513c52de986 +SHA1 (patch-af) = 184b7525b8b6a5fc502e30617e997bbb6e237d4e +SHA1 (patch-ag) = f58f72293758372de7851c090c2886e5f1c6f945 +SHA1 (patch-ah) = 118390da353bca29e6b21c31b68bfbad440692de +SHA1 (patch-ai) = aab30f8acf1e6766c08812405e5469b1e512f6d7 +SHA1 (patch-aj) = ba74bc1ab51c19449953c5a4e4837223d3859054 +SHA1 (patch-ak) = 845bcf4cad65fbb73b8ad847f7fccbd385858a16 +SHA1 (patch-al) = 757ff7f015b9b60edae79d1372227553621590f3 +SHA1 (patch-am) = 198d7ec12fcbe1328408d8928d13710cb380dff2 diff --git a/devel/mad-flute/patches/patch-aa b/devel/mad-flute/patches/patch-aa new file mode 100644 index 00000000000..bcc5aedcd6d --- /dev/null +++ b/devel/mad-flute/patches/patch-aa @@ -0,0 +1,150 @@ +$NetBSD: patch-aa,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +Use gmake +get rid of dos line endings + +--- Makefile 2011/12/21 16:28:33 1.1 ++++ Makefile 2011/12/21 16:29:27 +@@ -1,71 +1,71 @@ +-all : alclib sdplib flutelib flute multis_flute flute_unittest
+-
+-alclib ::
+- @echo "-------------------"
+- @echo "*** ALC library ***"
+- @echo "-------------------"
+- mkdir lib; cd alclib; make clean; make
+- @echo "done"
+-
+-sdplib ::
+- @echo "-------------------"
+- @echo "*** SDP library ***"
+- @echo "-------------------"
+- mkdir lib; cd sdplib; make clean; make
+- @echo "done"
+-
+-flutelib ::
+- @echo "---------------------"
+- @echo "*** FLUTE library ***"
+- @echo "---------------------"
+- mkdir lib; cd flutelib; make clean; make
+- @echo "done"
+-
+-flute ::
+- @echo "-------------------------"
+- @echo "*** FLUTE application ***"
+- @echo "-------------------------"
+- mkdir bin; cd flute; make clean; make
+- @echo "done"
+-
+-multis_flute ::
+- @echo "----------------------------------------------"
+- @echo "*** Example multisession FLUTE application ***"
+- @echo "----------------------------------------------"
+- mkdir bin; cd multis_flute; make clean; make
+- @echo "done"
+-
+-flute_unittest ::
+- @echo "------------------------"
+- @echo "*** FLUTE unit test ***"
+- @echo "------------------------"
+- mkdir bin; cd UnitTest; make clean; make
+- @echo "done"
+-
+-clean :
+- @echo "----------------------------"
+- @echo "*** Cleaning ALC library ***"
+- @echo "----------------------------"
+- cd alclib; make clean
+- @echo "----------------------------"
+- @echo "*** Cleaning SDP library ***"
+- @echo "----------------------------"
+- cd sdplib; make clean
+- @echo "------------------------------"
+- @echo "*** Cleaning FLUTE library ***"
+- @echo "------------------------------"
+- cd flutelib; make clean
+- @echo "----------------------------------"
+- @echo "*** Cleaning FLUTE application ***"
+- @echo "----------------------------------"
+- cd flute; make clean
+- @echo "-------------------------------------------------------"
+- @echo "*** Cleaning example multisession FLUTE application ***"
+- @echo "-------------------------------------------------------"
+- cd multis_flute; make clean
+- @echo "--------------------------------"
+- @echo "*** Cleaning FLUTE unit test ***"
+- @echo "--------------------------------"
+- cd UnitTest; make clean
+- @echo "done"
+-
++all : alclib sdplib flutelib flute multis_flute ++ ++alclib :: ++ @echo "-------------------" ++ @echo "*** ALC library ***" ++ @echo "-------------------" ++ mkdir lib; cd alclib; ${MAKE} clean; ${MAKE} ++ @echo "done" ++ ++sdplib :: ++ @echo "-------------------" ++ @echo "*** SDP library ***" ++ @echo "-------------------" ++ mkdir lib; cd sdplib; ${MAKE} clean; ${MAKE} ++ @echo "done" ++ ++flutelib :: ++ @echo "---------------------" ++ @echo "*** FLUTE library ***" ++ @echo "---------------------" ++ mkdir lib; cd flutelib; ${MAKE} clean; ${MAKE} ++ @echo "done" ++ ++flute :: ++ @echo "-------------------------" ++ @echo "*** FLUTE application ***" ++ @echo "-------------------------" ++ mkdir bin; cd flute; ${MAKE} clean; ${MAKE} ++ @echo "done" ++ ++multis_flute :: ++ @echo "----------------------------------------------" ++ @echo "*** Example multisession FLUTE application ***" ++ @echo "----------------------------------------------" ++ mkdir bin; cd multis_flute; ${MAKE} clean; ${MAKE} ++ @echo "done" ++ ++flute_unittest :: ++ @echo "------------------------" ++ @echo "*** FLUTE unit test ***" ++ @echo "------------------------" ++ mkdir bin; cd UnitTest; ${MAKE} clean; ${MAKE} ++ @echo "done" ++ ++clean : ++ @echo "----------------------------" ++ @echo "*** Cleaning ALC library ***" ++ @echo "----------------------------" ++ cd alclib; ${MAKE} clean ++ @echo "----------------------------" ++ @echo "*** Cleaning SDP library ***" ++ @echo "----------------------------" ++ cd sdplib; ${MAKE} clean ++ @echo "------------------------------" ++ @echo "*** Cleaning FLUTE library ***" ++ @echo "------------------------------" ++ cd flutelib; ${MAKE} clean ++ @echo "----------------------------------" ++ @echo "*** Cleaning FLUTE application ***" ++ @echo "----------------------------------" ++ cd flute; ${MAKE} clean ++ @echo "-------------------------------------------------------" ++ @echo "*** Cleaning example multisession FLUTE application ***" ++ @echo "-------------------------------------------------------" ++ cd multis_flute; ${MAKE} clean ++ @echo "--------------------------------" ++ @echo "*** Cleaning FLUTE unit test ***" ++ @echo "--------------------------------" ++ cd UnitTest; ${MAKE} clean ++ @echo "done" ++ diff --git a/devel/mad-flute/patches/patch-ab b/devel/mad-flute/patches/patch-ab new file mode 100644 index 00000000000..1aafc1babbc --- /dev/null +++ b/devel/mad-flute/patches/patch-ab @@ -0,0 +1,23 @@ +$NetBSD: patch-ab,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +portability fixes + +--- alclib/transport.h 2011/12/21 16:31:23 1.1 ++++ alclib/transport.h 2011/12/21 16:33:10 +@@ -35,6 +35,7 @@ + #define _TRANSPORT_H_
+
+ #include <sys/types.h>
++#include <sys/param.h>
+
+ #ifdef LINUX
+ #include <unistd.h>
+@@ -63,6 +64,8 @@ +
+ #ifdef _MSC_VER
+ __int64 offset; /**< data symbol offset in the temporary file */
++#elif (defined(BSD) && BSD >= 199506) ++ off_t offset; /**< data symbol offset in the temporaryfile */
+ #else
+ off64_t offset; /**< data symbol offset in the temporaryfile */
+ #endif
diff --git a/devel/mad-flute/patches/patch-ac b/devel/mad-flute/patches/patch-ac new file mode 100644 index 00000000000..0b5cad79d49 --- /dev/null +++ b/devel/mad-flute/patches/patch-ac @@ -0,0 +1,61 @@ +$NetBSD: patch-ac,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +get rid of some lunixisms + +--- alclib/alc_rx.c 2011/12/21 16:34:42 1.1 ++++ alclib/alc_rx.c 2011/12/21 17:02:30 +@@ -39,6 +39,7 @@ + #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/param.h>
+ #include <math.h>
+ #include <assert.h>
+
+@@ -690,6 +691,9 @@ + #ifdef _MSC_VER
+ if((trans_obj->fd = open((const char*)trans_obj->tmp_filename,
+ _O_WRONLY | _O_CREAT | _O_BINARY | _O_TRUNC , _S_IWRITE)) < 0) {
++#elif (defined(BSD) && BSD >= 199506) ++ if((trans_obj->fd = open((const char*)trans_obj->tmp_filename,
++ O_WRONLY | O_CREAT | O_TRUNC , S_IRWXU)) < 0) {
+ #else
+ if((trans_obj->fd = open64(trans_obj->tmp_filename,
+ O_WRONLY | O_CREAT | O_TRUNC , S_IRWXU)) < 0) {
+@@ -720,6 +724,9 @@ + #ifdef _MSC_VER
+ if((trans_obj->fd_st = open((const char*)trans_obj->tmp_st_filename,
+ _O_RDWR | _O_CREAT | _O_BINARY | _O_TRUNC , _S_IREAD | _S_IWRITE)) < 0) {
++#elif (defined(BSD) && BSD >= 199506) ++ if((trans_obj->fd_st = open(trans_obj->tmp_st_filename, ++ O_RDWR | O_CREAT | O_TRUNC , S_IRWXU)) < 0) { + #else
+ if((trans_obj->fd_st = open64(trans_obj->tmp_st_filename,
+ O_RDWR | O_CREAT | O_TRUNC , S_IRWXU)) < 0) {
+@@ -817,6 +824,8 @@ +
+ #ifdef _MSC_VER
+ trans_unit->offset = _lseeki64(trans_obj->fd_st, 0, SEEK_END);
++#elif (defined(BSD) && BSD >= 199506) ++ trans_unit->offset = lseek(trans_obj->fd_st, 0, SEEK_END); + #else
+ trans_unit->offset = lseek64(trans_obj->fd_st, 0, SEEK_END);
+ #endif
+@@ -901,6 +910,8 @@ +
+ #ifdef _MSC_VER
+ if(_lseeki64(trans_obj->fd_st, tu->offset, SEEK_SET) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if (lseek(trans_obj->fd_st, tu->offset, SEEK_SET) == -1) {
+ #else
+ if(lseek64(trans_obj->fd_st, tu->offset, SEEK_SET) == -1) {
+ #endif
+@@ -978,6 +989,8 @@ +
+ #ifdef _MSC_VER
+ if(_lseeki64(trans_obj->fd, pos, SEEK_SET) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if (lseek(trans_obj->fd, pos, SEEK_SET) == -1) { + #else
+ if(lseek64(trans_obj->fd, pos, SEEK_SET) == -1) {
+ #endif
diff --git a/devel/mad-flute/patches/patch-ad b/devel/mad-flute/patches/patch-ad new file mode 100644 index 00000000000..ad90ded41b4 --- /dev/null +++ b/devel/mad-flute/patches/patch-ad @@ -0,0 +1,15 @@ +$NetBSD: patch-ad,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +Remove an incorrect definition - kills compilation on BSDs + +--- alclib/Makefile 2011/12/21 18:38:36 1.1 ++++ alclib/Makefile 2011/12/21 18:39:26 +@@ -1,7 +1,7 @@ + CC = gcc + + CFLAGS += -Wall -O3 -g -fPIC -DLINUX -D_LARGE_FILE_API -D_LARGEFILE64_SOURCE \ +- -D_ISOC99_SOURCE -D_XOPEN_SOURCE=500 ++ -D_ISOC99_SOURCE #-D_XOPEN_SOURCE=500 + + SOURCES = alc_channel.c alc_hdr.c alc_rx.c alc_session.c alc_socket.c alc_tx.c \ + lct_hdr.c mad.c transport.c blocking_alg.c null_fec.c xor_fec.c fec.c rs_fec.c \ diff --git a/devel/mad-flute/patches/patch-ae b/devel/mad-flute/patches/patch-ae new file mode 100644 index 00000000000..5644a790a59 --- /dev/null +++ b/devel/mad-flute/patches/patch-ae @@ -0,0 +1,16 @@ +$NetBSD: patch-ae,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +we don't have one of the headers they want + +--- flutelib/http_file_repair.h 2011/12/21 18:54:28 1.1 ++++ flutelib/http_file_repair.h 2011/12/21 18:55:20 +@@ -40,7 +40,9 @@ + #ifdef USE_FILE_REPAIR
+
+ #include <curl/curl.h>
++#ifdef __linux__ + #include <curl/types.h>
++#endif + #include <curl/easy.h>
+
+ #ifdef __cplusplus
diff --git a/devel/mad-flute/patches/patch-af b/devel/mad-flute/patches/patch-af new file mode 100644 index 00000000000..d679d08b48e --- /dev/null +++ b/devel/mad-flute/patches/patch-af @@ -0,0 +1,15 @@ +$NetBSD: patch-af,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +get the right header file paths + +--- flutelib/Makefile 2011/12/21 18:53:07 1.1 ++++ flutelib/Makefile 2011/12/21 18:56:38 +@@ -1,7 +1,7 @@ + CC = gcc + + CFLAGS += -Wall -O3 -g -fPIC -DLINUX -D_LARGE_FILE_API -D_LARGEFILE64_SOURCE -D_ISOC99_SOURCE -D_XOPEN_SOURCE=500 \ +- -I/usr/local/ssl/include ++ -I${PREFIX}/ssl/include -I${PREFIX}/include/curl + + SOURCES = flute.c sender.c receiver.c fdt.c fdt_gen.c mad_md5.c uri.c getdnsname.c mad_zlib.c \ + padding_encoding.c parse_args.c mad_utf8.c http_file_repair.c flute_file_repair.c apd.c \ diff --git a/devel/mad-flute/patches/patch-ag b/devel/mad-flute/patches/patch-ag new file mode 100644 index 00000000000..183c04d1f4a --- /dev/null +++ b/devel/mad-flute/patches/patch-ag @@ -0,0 +1,42 @@ +$NetBSD: patch-ag,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +portability patches + +--- flutelib/sender.c 2011/12/21 18:58:00 1.1 ++++ flutelib/sender.c 2011/12/21 19:01:17 +@@ -31,6 +31,8 @@ + */
+
+ #include <stdlib.h>
++#include <sys/types.h>
++#include <sys/param.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+ #include <time.h>
+@@ -197,6 +199,8 @@ +
+ #ifdef _MSC_VER
+ struct __stat64 file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat file_stats;
+ #else
+ struct stat64 file_stats;
+ #endif
+@@ -217,6 +221,8 @@ +
+ #ifdef _MSC_VER
+ if(_stat64(tx_file, &file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(tx_file, &file_stats) == -1) {
+ #else
+ if(stat64(tx_file, &file_stats) == -1) {
+ #endif
+@@ -258,6 +264,8 @@ + /* File to send */
+ #ifdef _MSC_VER
+ if((fp = fopen(tx_file, "rb")) == NULL) {
++#elif (defined(BSD) && BSD >= 199506) ++ if((fp = fopen(tx_file, "rb")) == NULL) {
+ #else
+ if((fp = fopen64(tx_file, "rb")) == NULL) {
+ #endif
diff --git a/devel/mad-flute/patches/patch-ah b/devel/mad-flute/patches/patch-ah new file mode 100644 index 00000000000..985e19dc323 --- /dev/null +++ b/devel/mad-flute/patches/patch-ah @@ -0,0 +1,146 @@ +$NetBSD: patch-ah,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +portability patches + +--- flutelib/fdt_gen.c 2011/12/21 19:05:12 1.1 ++++ flutelib/fdt_gen.c 2011/12/21 19:09:05 +@@ -35,6 +35,7 @@ + #include <sys/stat.h>
+ #include <string.h>
+ #include <sys/types.h>
++#include <sys/param.h>
+
+ #ifdef _MSC_VER
+ #include <windows.h>
+@@ -142,6 +143,8 @@ +
+ #ifdef _MSC_VER
+ struct __stat64 file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat file_stats;
+ #else
+ struct stat64 file_stats;
+ #endif
+@@ -159,6 +162,8 @@ +
+ #ifdef _MSC_VER
+ struct __stat64 enc_file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat enc_file_stats;
+ #else
+ struct stat64 enc_file_stats;
+ #endif
+@@ -200,6 +205,8 @@ +
+ #ifdef _MSC_VER
+ if(_stat64(fullpath, &file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(fullpath, &file_stats) == -1) {
+ #else
+ if(stat64(fullpath, &file_stats) == -1) {
+ #endif
+@@ -307,6 +314,8 @@ + strcat(enc_fullpath, GZ_SUFFIX);
+ #ifdef _MSC_VER
+ if(_stat64(enc_fullpath, &enc_file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(enc_fullpath, &enc_file_stats) == -1) {
+ #else
+ if(stat64(enc_fullpath, &enc_file_stats) == -1) {
+ #endif
+@@ -439,6 +448,8 @@ +
+ #ifdef _MSC_VER
+ struct __stat64 file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat file_stats;
+ #else
+ struct stat64 file_stats;
+ #endif
+@@ -453,6 +464,8 @@ + char enc_fullpath[MAX_PATH_LENGTH];
+ #ifdef _MSC_VER
+ struct __stat64 enc_file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat enc_file_stats;
+ #else
+ struct stat64 enc_file_stats;
+ #endif
+@@ -549,6 +562,8 @@ +
+ #ifdef _MSC_VER
+ if(_stat64(fullpath, &file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(fullpath, &file_stats) == -1) {
+ #else
+ if(stat64(fullpath, &file_stats) == -1) {
+ #endif
+@@ -632,6 +647,8 @@ + strcat(enc_fullpath, GZ_SUFFIX);
+ #ifdef _MSC_VER
+ if(_stat64(enc_fullpath, &enc_file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(enc_fullpath, &enc_file_stats) == -1) {
+ #else
+ if(stat64(enc_fullpath, &enc_file_stats) == -1) {
+ #endif
+@@ -765,6 +782,8 @@ +
+ #ifdef _MSC_VER
+ if(_stat64(fullpath, &file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(fullpath, &file_stats) == -1) {
+ #else
+ if(stat64(fullpath, &file_stats) == -1) {
+ #endif
+@@ -831,6 +850,8 @@ +
+ #ifdef _MSC_VER
+ if(_stat64(enc_fullpath, &enc_file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(enc_fullpath, &enc_file_stats) == -1) {
+ #else
+ if(stat64(enc_fullpath, &enc_file_stats) == -1) {
+ #endif
+@@ -973,7 +994,11 @@ +
+ strcat(fullpath, fullname);
+
++#if (defined(BSD) && BSD >= 199506) ++ if(stat(fullpath, &file_stats) == -1) {
++#else + if(stat64(fullpath, &file_stats) == -1) {
++#endif + printf("Error: %s is not valid file name\n", fullpath);
+ fflush(stdout);
+ entry = readdir(dirptr);
+@@ -1046,7 +1071,11 @@ + strcpy(enc_fullpath, fullpath);
+ strcat(enc_fullpath, GZ_SUFFIX);
+
++#if (defined(BSD) && BSD >= 199506) ++ if(stat(enc_fullpath, &enc_file_stats) == -1) {
++#else + if(stat64(enc_fullpath, &enc_file_stats) == -1) {
++#endif + printf("Error: %s is not valid file name\n", enc_fullpath);
+ fflush(stdout);
+ entry = readdir(dirptr);
+@@ -1158,6 +1187,8 @@ +
+ #ifdef _MSC_VER
+ struct __stat64 file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat file_stats;
+ #else
+ struct stat64 file_stats;
+ #endif
+@@ -1263,6 +1294,8 @@ + strcat(fullpath, token);
+ #ifdef _MSC_VER
+ if(_stat64(fullpath, &file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(fullpath, &file_stats) == -1) {
+ #else
+ if(stat64(fullpath, &file_stats) == -1) {
+ #endif
diff --git a/devel/mad-flute/patches/patch-ai b/devel/mad-flute/patches/patch-ai new file mode 100644 index 00000000000..92fa2e3a890 --- /dev/null +++ b/devel/mad-flute/patches/patch-ai @@ -0,0 +1,43 @@ +$NetBSD: patch-ai,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +portability improvements + +--- flutelib/mad_md5.c 2011/12/21 19:10:18 1.1 ++++ flutelib/mad_md5.c 2011/12/21 19:11:36 +@@ -33,7 +33,9 @@ + #include <stdio.h>
+ #include <memory.h>
+ #include <string.h>
++#include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/param.h>
+ #include <errno.h>
+
+ #include "mad_md5.h"
+@@ -48,6 +50,8 @@ +
+ #ifdef _MSC_VER
+ struct __stat64 file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat file_stats;
+ #else
+ struct stat64 file_stats;
+ #endif
+@@ -71,6 +75,8 @@ +
+ #ifdef _MSC_VER
+ fp = fopen(filename, "rb");
++#elif (defined(BSD) && BSD >= 199506) ++ fp = fopen(filename, "rb");
+ #else
+ fp = fopen64(filename, "rb");
+ #endif
+@@ -83,6 +89,8 @@ +
+ #ifdef _MSC_VER
+ if(_stat64(filename, &file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(filename, &file_stats) == -1) {
+ #else
+ if(stat64(filename, &file_stats) == -1) {
+ #endif
diff --git a/devel/mad-flute/patches/patch-aj b/devel/mad-flute/patches/patch-aj new file mode 100644 index 00000000000..345f70b527a --- /dev/null +++ b/devel/mad-flute/patches/patch-aj @@ -0,0 +1,50 @@ +$NetBSD: patch-aj,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +portability patches + +--- flutelib/padding_encoding.c 2011/12/21 19:12:31 1.1 ++++ flutelib/padding_encoding.c 2011/12/21 19:13:59 +@@ -36,6 +36,7 @@ + #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/param.h>
+ #include <fcntl.h>
+
+ #ifdef _MSC_VER
+@@ -69,6 +70,8 @@ +
+ #ifdef _MSC_VER
+ struct __stat64 file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat file_stats;
+ #else
+ struct stat64 file_stats;
+ #endif
+@@ -85,6 +88,8 @@ +
+ #ifdef _MSC_VER
+ fp_in = open((const char*)file_name_in, _O_RDWR | _O_CREAT | _O_BINARY, _S_IREAD | _S_IWRITE);
++#elif (defined(BSD) && BSD >= 199506) ++ fp_in = open(file_name_in, O_RDWR | O_CREAT, S_IRWXU);
+ #else
+ fp_in = open64(file_name_in, O_RDWR | O_CREAT, S_IRWXU);
+ #endif
+@@ -96,6 +101,8 @@ +
+ #ifdef _MSC_VER
+ _fstat64(fp_in, &file_stats);
++#elif (defined(BSD) && BSD >= 199506) ++ fstat(fp_in, &file_stats);
+ #else
+ fstat64(fp_in, &file_stats);
+ #endif
+@@ -105,6 +112,8 @@ + if(f_size > content_length) {
+ #ifdef _MSC_VER
+ retval = _chsize(fp_in, (long)content_length); /* TODO: 64 bits, how ??? */
++#elif (defined(BSD) && BSD >= 199506) ++ retval = ftruncate(fp_in, content_length);
+ #else
+ retval = ftruncate64(fp_in, content_length);
+ #endif
diff --git a/devel/mad-flute/patches/patch-ak b/devel/mad-flute/patches/patch-ak new file mode 100644 index 00000000000..f60a2fac884 --- /dev/null +++ b/devel/mad-flute/patches/patch-ak @@ -0,0 +1,59 @@ +$NetBSD: patch-ak,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +portability patches + +--- flutelib/http_file_repair.c 2011/12/21 21:33:02 1.1 ++++ flutelib/http_file_repair.c 2011/12/21 21:35:06 +@@ -34,6 +34,7 @@ + #include <stdlib.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/param.h>
+ #include <fcntl.h>
+ #include <string.h>
+ #include <ctype.h>
+@@ -107,6 +108,8 @@ + #ifdef USE_ZLIB
+ #ifdef _MSC_VER
+ struct __stat64 file_stats;
++#elif (defined(BSD) && BSD >= 199506) ++ struct stat file_stats;
+ #else
+ struct stat64 file_stats;
+ #endif
+@@ -244,6 +247,8 @@ +
+ #ifdef _MSC_VER
+ unit->offset = _lseeki64(obj->fd_st, 0, SEEK_END);
++#elif (defined(BSD) && BSD >= 199506) ++ unit->offset = lseek(obj->fd_st, 0, SEEK_END);
+ #else
+ unit->offset = lseek64(obj->fd_st, 0, SEEK_END);
+ #endif
+@@ -292,6 +297,8 @@ + }
+ #ifdef _MSC_VER
+ if(_lseeki64(obj->fd_st, tu->offset, SEEK_SET) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(lseek(obj->fd_st, tu->offset, SEEK_SET) == -1) {
+ #else
+ if(lseek64(obj->fd_st, tu->offset, SEEK_SET) == -1) {
+ #endif
+@@ -365,6 +372,8 @@ +
+ #ifdef _MSC_VER
+ if(_lseeki64(obj->fd, pos, SEEK_SET) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(lseek(obj->fd, pos, SEEK_SET) == -1) {
+ #else
+ if(lseek64(obj->fd, pos, SEEK_SET) == -1) {
+ #endif
+@@ -444,6 +453,8 @@ +
+ #ifdef _MSC_VER
+ if(_stat64(obj->tmp_filename, &file_stats) == -1) {
++#elif (defined(BSD) && BSD >= 199506) ++ if(stat(obj->tmp_filename, &file_stats) == -1) {
+ #else
+ if(stat64(obj->tmp_filename, &file_stats) == -1) {
+ #endif
diff --git a/devel/mad-flute/patches/patch-al b/devel/mad-flute/patches/patch-al new file mode 100644 index 00000000000..4a3c68c6247 --- /dev/null +++ b/devel/mad-flute/patches/patch-al @@ -0,0 +1,33 @@ +$NetBSD: patch-al,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +ftime() is deprecated, just use time(). + +--- alclib/alc_session.c 2011/12/21 21:41:34 1.1 ++++ alclib/alc_session.c 2011/12/21 21:45:03 +@@ -44,7 +44,7 @@ + #include <pthread.h>
+ #endif
+
+-#include <sys/timeb.h>
++#include <time.h>
+
+ #include "alc_session.h"
+ #include "mad_rlc.h"
+@@ -103,7 +103,6 @@ + alc_session_t *s;
+ int i;
+ int retval;
+- struct timeb timeb_current_time;
+
+ #if ABSOLUTE_PATH
+ char fullpath[MAX_PATH_LENGTH];
+@@ -158,8 +157,7 @@ +
+ if(s->mode == SENDER) {
+
+- ftime(&timeb_current_time);
+- s->ftimestarttime = timeb_current_time.time+timeb_current_time.millitm/1000.0;
++ s->ftimestarttime = time(NULL); +
+ memcpy(s->base_dir, a->base_dir, strlen(a->base_dir));
+
diff --git a/devel/mad-flute/patches/patch-am b/devel/mad-flute/patches/patch-am new file mode 100644 index 00000000000..2cb371d16bc --- /dev/null +++ b/devel/mad-flute/patches/patch-am @@ -0,0 +1,28 @@ +$NetBSD: patch-am,v 1.1.1.1 2012/05/02 04:43:11 agc Exp $ + +ftime() is deprectaed, just use time(3). + +--- alclib/alc_tx.c 2011/12/21 21:46:10 1.1 ++++ alclib/alc_tx.c 2011/12/21 21:46:49 +@@ -37,7 +37,7 @@ + #include <string.h>
+ #include <errno.h>
+ #include <assert.h>
+-#include <sys/timeb.h>
++#include <time.h>
+
+ #ifdef _MSC_VER
+ #include <process.h>
+@@ -580,11 +580,8 @@ +
+ double curr_time;
+ float actual_kbit_rate = (float)s->def_tx_rate;
+- struct timeb timeb_current_time;
+
+- ftime(&timeb_current_time);
+-
+- curr_time = timeb_current_time.time+timeb_current_time.millitm/1000.0;
++ curr_time = time(NULL); +
+ if(s->sent_bytes > 0 && curr_time > s->ftimestarttime) {
+ actual_kbit_rate = (float)((s->sent_bytes*8/1024.0) / (curr_time - s->ftimestarttime));
|