aboutsummaryrefslogtreecommitdiff
path: root/mbone/udpcast
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2009-02-18 17:03:44 +0000
committerPav Lucistnik <pav@FreeBSD.org>2009-02-18 17:03:44 +0000
commit2aa187699bec7db75024022ec06d264fb3bf70cd (patch)
tree94d0053b2fde78c06073f0863693de01981e2a30 /mbone/udpcast
parent330cf77babece723251d4b3765de4d8cd6130331 (diff)
downloadports-2aa187699bec7db75024022ec06d264fb3bf70cd.tar.gz
ports-2aa187699bec7db75024022ec06d264fb3bf70cd.zip
Notes
Diffstat (limited to 'mbone/udpcast')
-rw-r--r--mbone/udpcast/Makefile22
-rw-r--r--mbone/udpcast/distinfo6
-rw-r--r--mbone/udpcast/files/patch-libbb_udpcast.h13
-rw-r--r--mbone/udpcast/files/patch-participants.h13
-rw-r--r--mbone/udpcast/files/patch-rateGovernor.c28
-rw-r--r--mbone/udpcast/files/patch-socklib.c58
-rw-r--r--mbone/udpcast/files/patch-statistics.c11
-rw-r--r--mbone/udpcast/files/patch-udpr-negotiate.c59
8 files changed, 105 insertions, 105 deletions
diff --git a/mbone/udpcast/Makefile b/mbone/udpcast/Makefile
index 2e6584fc6961..1c33f6320ea4 100644
--- a/mbone/udpcast/Makefile
+++ b/mbone/udpcast/Makefile
@@ -8,7 +8,7 @@
PORTNAME= udpcast
PORTVERSION= 0.${RELEASE_DATE}
CATEGORIES= mbone sysutils
-MASTER_SITES= http://udpcast.linux.lu/current/
+MASTER_SITES= http://udpcast.linux.lu/download/
DISTNAME= ${PORTNAME}-${RELEASE_DATE}
MAINTAINER= ports@FreeBSD.org
@@ -16,9 +16,9 @@ COMMENT= A file transfer tool using ethernet's multicast
USE_GMAKE= yes
USE_PERL5_BUILD= yes
-WRKSRC= ${WRKDIR}/${PORTNAME}
+WRKSRC= ${WRKDIR}/${PORTNAME}-${RELEASE_DATE}
-RELEASE_DATE= 20040531
+RELEASE_DATE= 20081213
PROGRAM_SBIN_FILES= udp-receiver udp-sender
@@ -28,19 +28,9 @@ PORTDOCS= Changelog.txt cmd.html
MAN1= udp-receiver.1 udp-sender.1
-post-patch:
- @${REINPLACE_CMD} -E \
- -e 's|<malloc.h>|<stdlib.h>|' \
- ${WRKSRC}/libbb_udpcast.h
-
-do-configure:
-# C{C,FLAGS}, PTHREAD_* safeness
- @${REINPLACE_CMD} -E \
- -e 's|gcc|${CC}|' \
- -e 's|^(CFLAGS[[:space:]]*=.+)$$|\1 ${CFLAGS} ${CPPFLAGS} ${PTHREAD_CFLAGS}|' \
- -e 's|^(LDFLAGS[[:space:]]*=.+)$$|\1 ${LDFLAGS}|' \
- -e 's|-lpthread|${PTHREAD_LIBS}|g' \
- ${BUILD_WRKSRC}/${MAKEFILE}
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+ LIBS="-L${LOCALBASE}/lib"
do-install:
.ifndef(NOPORTDOCS)
diff --git a/mbone/udpcast/distinfo b/mbone/udpcast/distinfo
index e8c6a0660840..66ccd2a93184 100644
--- a/mbone/udpcast/distinfo
+++ b/mbone/udpcast/distinfo
@@ -1,3 +1,3 @@
-MD5 (udpcast-20040531.tar.gz) = e965fae35ae7450098c29984d3997344
-SHA256 (udpcast-20040531.tar.gz) = 47893ef09431abfc436f3e86703619587c7fad33b5fd16f3217650a003c8ba1d
-SIZE (udpcast-20040531.tar.gz) = 67213
+MD5 (udpcast-20081213.tar.gz) = 23f3371cb60a1f66f6be12fa98d4d5ca
+SHA256 (udpcast-20081213.tar.gz) = 73adac6869e7653ad33a3b92498080a2a0398c60ac78c50a701057325f612d57
+SIZE (udpcast-20081213.tar.gz) = 160550
diff --git a/mbone/udpcast/files/patch-libbb_udpcast.h b/mbone/udpcast/files/patch-libbb_udpcast.h
new file mode 100644
index 000000000000..1f2289b163ae
--- /dev/null
+++ b/mbone/udpcast/files/patch-libbb_udpcast.h
@@ -0,0 +1,13 @@
+--- libbb_udpcast.h.orig 2009-02-10 10:07:40.000000000 +0100
++++ libbb_udpcast.h 2009-02-10 10:06:51.000000000 +0100
+@@ -24,6 +24,10 @@
+ #include <malloc.h>
+ #endif
+
++#ifdef HAVE_STDLIB_H
++ #include <stdlib.h>
++#endif
++
+ #define xmalloc malloc
+
+ #endif /* BB_VER */
diff --git a/mbone/udpcast/files/patch-participants.h b/mbone/udpcast/files/patch-participants.h
index f09b1aa4c62b..6e7ef8da3d7f 100644
--- a/mbone/udpcast/files/patch-participants.h
+++ b/mbone/udpcast/files/patch-participants.h
@@ -1,10 +1,13 @@
---- participants.h.orig Tue Jul 20 13:49:28 2004
-+++ participants.h Tue Jul 20 13:49:40 2004
-@@ -3,6 +3,7 @@
+--- participants.h.orig 2005-12-22 23:59:18.000000000 +0100
++++ participants.h 2009-02-05 12:18:19.000000000 +0100
+@@ -3,6 +3,10 @@
#define MAX_CLIENTS 1024
+#include <sys/types.h>
- #include <sys/socket.h>
-
++#include <sys/socket.h>
++
++
typedef struct participantsDb *participantsDb_t;
+
+ #define isParticipantValid udpc_isParticipantValid
diff --git a/mbone/udpcast/files/patch-rateGovernor.c b/mbone/udpcast/files/patch-rateGovernor.c
new file mode 100644
index 000000000000..14de493ebb02
--- /dev/null
+++ b/mbone/udpcast/files/patch-rateGovernor.c
@@ -0,0 +1,28 @@
+--- rateGovernor.c.orig 2008-09-20 09:07:29.000000000 +0200
++++ rateGovernor.c 2009-02-09 08:20:17.000000000 +0100
+@@ -23,6 +23,25 @@
+ #define DL_RATE_GOVERNOR
+ #endif
+
++
++#ifdef __FreeBSD__
++char *
++strndup(const char *str, size_t n)
++{
++ size_t len;
++ char *copy;
++
++ for (len = 0; len < n && str[len]; len++)
++ continue;
++
++ if ((copy = malloc(len + 1)) == NULL)
++ return (NULL);
++ memcpy(copy, str, len);
++ copy[len] = '\0';
++ return (copy);
++}
++#endif
++
+ void *rgInitGovernor(struct net_config *cfg, struct rateGovernor_t *gov)
+ {
+ if(cfg->nrGovernors == MAX_GOVERNORS) {
diff --git a/mbone/udpcast/files/patch-socklib.c b/mbone/udpcast/files/patch-socklib.c
index 03d62095cdad..974921257f31 100644
--- a/mbone/udpcast/files/patch-socklib.c
+++ b/mbone/udpcast/files/patch-socklib.c
@@ -1,38 +1,46 @@
---- socklib.c.orig Sat Feb 21 13:58:37 2004
-+++ socklib.c Tue Jul 20 17:58:51 2004
-@@ -16,6 +16,8 @@
- #include "log.h"
- #include "socklib.h"
+--- socklib.c.orig 2008-09-18 22:43:15.000000000 +0200
++++ socklib.c 2009-02-10 10:01:40.000000000 +0100
+@@ -18,6 +18,7 @@
+ #endif
+
+ #ifdef HAVE_NET_IF_H
++# include <sys/socket.h>
+ # include <net/if.h>
+ #endif
+
+@@ -66,6 +67,8 @@
+ # define DEBUG 0
+ #endif
+#undef SIOCGIFINDEX
+
#ifdef LOSSTEST
/**
* Packet loss/swap testing...
-@@ -289,7 +291,7 @@
+@@ -353,7 +356,7 @@
int setTtl(int sock, int ttl) {
/* set the socket to broadcast */
-- return setsockopt(sock, SOL_IP, IP_MULTICAST_TTL, &ttl, sizeof(int));
-+ return setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(int));
+- return setsockopt(sock, SOL_IP, IP_MULTICAST_TTL, (char*)&ttl, sizeof(int));
++ return setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, (char*)&ttl, sizeof(int));
}
- #ifdef SIOCGIFINDEX
-@@ -334,7 +336,7 @@
- int r;
-
- fillMreq(sock, ifname, addr, &mreq);
-- r = setsockopt(sock, SOL_IP, code, &mreq, sizeof(mreq));
-+ r = setsockopt(sock, IPPROTO_IP, code, &mreq, sizeof(mreq));
- if(r < 0) {
- perror(message);
- exit(1);
-@@ -366,7 +368,7 @@
-
-
- int setMcastDestination(int sock, char *ifname, struct sockaddr *addr) {
--#ifdef __CYGWIN__
-+#if defined(__CYGWIN__) || defined(__FreeBSD__)
+ #ifdef HAVE_STRUCT_IP_MREQN_IMR_IFINDEX
+@@ -422,7 +425,7 @@
+
+
+ int setMcastDestination(int sock, net_if_t *net_if, struct sockaddr_in *addr) {
+-#ifdef WINDOWS
++#if defined(WINDOWS) || defined(__FreeBSD__)
int r;
- struct sockaddr interface_addr;
+ struct sockaddr_in interface_addr;
struct in_addr if_addr;
+@@ -720,7 +723,7 @@
+
+ net_if->name = strdup(chosen->ifr_name);
+
+-#ifdef HAVE_STRUCT_IP_MREQN_IMR_IFINDEX
++#ifdef HAVE_STRUCT_IP_MREQN_IMR_IFINDEX__TODO
+ /* Index for multicast subscriptions */
+ if(ioctl(s, SIOCGIFINDEX, chosen) < 0)
+ udpc_fatal(-1, "Error getting index for %s: %s", net_if->name,
diff --git a/mbone/udpcast/files/patch-statistics.c b/mbone/udpcast/files/patch-statistics.c
deleted file mode 100644
index 176e5136b246..000000000000
--- a/mbone/udpcast/files/patch-statistics.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- statistics.c.orig Tue Jul 20 10:46:11 2004
-+++ statistics.c Tue Jul 20 12:00:59 2004
-@@ -37,7 +37,7 @@
- static void printFilePosition(int fd) {
- #ifndef __CYGWIN__
- if(fd != -1) {
-- loff_t offset = lseek64(fd, 0, SEEK_CUR);
-+ off_t offset = lseek(fd, 0, SEEK_CUR);
- printLongNum(offset);
- }
- #endif
diff --git a/mbone/udpcast/files/patch-udpr-negotiate.c b/mbone/udpcast/files/patch-udpr-negotiate.c
index db9f50ba147d..c1a1fddbd386 100644
--- a/mbone/udpcast/files/patch-udpr-negotiate.c
+++ b/mbone/udpcast/files/patch-udpr-negotiate.c
@@ -1,8 +1,8 @@
---- udpr-negotiate.c.orig Sat Feb 21 14:08:49 2004
-+++ udpr-negotiate.c Tue Jul 20 13:44:05 2004
-@@ -2,6 +2,10 @@
- #include <unistd.h>
+--- udpr-negotiate.c.orig 2007-05-25 12:01:59.000000000 +0200
++++ udpr-negotiate.c 2009-02-06 08:18:02.000000000 +0100
+@@ -3,6 +3,10 @@
#include <errno.h>
+ #include <sys/stat.h>
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
@@ -11,50 +11,19 @@
#include "log.h"
#include "socklib.h"
#include "udpcast.h"
-@@ -16,6 +20,10 @@
- # define O_BINARY 0
- #endif
-
-+#ifdef __FreeBSD__
-+struct client_config client_config_on_exit_hack;
-+#endif
-+
- static int sendConnectReq(struct client_config *client_config,
- struct net_config *net_config,
- int haveServerAddress) {
-@@ -48,6 +56,12 @@
- sendDisconnect(exitStatus, (struct client_config *) args);
- }
-
-+#ifdef __FreeBSD__
-+static void sendDisconnectWrapper_on_exit_handler() {
-+ sendDisconnectWrapper(0, &client_config_on_exit_hack);
-+}
-+#endif
-+
- void sendDisconnect(int exitStatus,
- struct client_config *client_config) {
- int endianness = client_config->endianness;
-@@ -144,7 +158,7 @@
+@@ -82,13 +86,13 @@
if(disk_config->fileName != NULL) {
int oflags = O_CREAT | O_WRONLY;
- if(!(disk_config->flags & FLAG_NOSYNC)) {
+ if((disk_config->flags & FLAG_SYNC)) {
- oflags |= O_SYNC;
+ oflags |= O_FSYNC;
+ } else if( !(disk_config->flags & FLAG_NOSYNC)) {
+ struct stat buf;
+ if(stat(disk_config->fileName, &buf) == 0) {
+ /* If target is device, open it synchronously */
+ if(S_ISCHR(buf.st_mode) || S_ISBLK(buf.st_mode))
+- oflags |= O_SYNC;
++ oflags |= O_FSYNC;
+ }
}
outFile = open(disk_config->fileName, oflags | O_BINARY, 0644);
- if(outFile < 0) {
-@@ -333,7 +347,13 @@
- pipedOutFile = openPipe(client_config.toServer, outFile, disk_config,
- &pipePid);
- #ifndef __CYGWIN__
-+# ifdef __FreeBSD__
-+ client_config_on_exit_hack = client_config;
-+
-+ atexit(sendDisconnectWrapper_on_exit_handler);
-+# else
- on_exit(sendDisconnectWrapper, &client_config);
-+# endif
- #endif
- {
- struct fifo fifo;