diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2007-02-26 21:26:52 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2007-02-26 21:26:52 +0000 |
commit | 986ca89b9c26c04aee72873b9f44f417f24ecabb (patch) | |
tree | 9c26dd11f49663eb19dcddf45f3639d9b56d3b6c /net/ushare | |
parent | 421a95612d7ecc83a99aa6957a774efd2c577d21 (diff) |
Notes
Diffstat (limited to 'net/ushare')
-rw-r--r-- | net/ushare/Makefile | 8 | ||||
-rw-r--r-- | net/ushare/distinfo | 6 | ||||
-rw-r--r-- | net/ushare/files/patch-Makefile.am | 10 | ||||
-rw-r--r-- | net/ushare/files/patch-Makefile.in | 20 | ||||
-rw-r--r-- | net/ushare/files/patch-cfgparser.c | 14 | ||||
-rw-r--r-- | net/ushare/files/patch-getline.c | 35 | ||||
-rw-r--r-- | net/ushare/files/patch-getline.h | 11 | ||||
-rw-r--r-- | net/ushare/files/patch-http.c | 13 | ||||
-rw-r--r-- | net/ushare/files/patch-strndup.c | 16 | ||||
-rw-r--r-- | net/ushare/files/patch-strndup.h | 11 | ||||
-rw-r--r-- | net/ushare/files/patch-ushare | 8 | ||||
-rw-r--r-- | net/ushare/files/patch-ushare.c | 71 |
12 files changed, 10 insertions, 213 deletions
diff --git a/net/ushare/Makefile b/net/ushare/Makefile index f6b961f5666d..a31dff5d2f54 100644 --- a/net/ushare/Makefile +++ b/net/ushare/Makefile @@ -6,8 +6,7 @@ # PORTNAME= ushare -PORTVERSION= 0.9.8 -PORTREVISION= 2 +PORTVERSION= 0.9.9 CATEGORIES= net MASTER_SITES= http://ushare.geexbox.org/releases/ @@ -15,8 +14,7 @@ MAINTAINER= votdev@gmx.de COMMENT= A lightweight UPnP (TM) A/V Media Server LIB_DEPENDS= upnp.2:${PORTSDIR}/devel/upnp -BUILD_DEPENDS= pkg-config:${PORTSDIR}/devel/pkg-config \ - iconv:${PORTSDIR}/converters/libiconv +BUILD_DEPENDS= iconv:${PORTSDIR}/converters/libiconv PLIST_FILES= bin/${PORTNAME} etc/${PORTNAME}.conf.sample etc/rc.d/${PORTNAME} MAN1= ${PORTNAME}.1 @@ -24,7 +22,7 @@ MAN1= ${PORTNAME}.1 USE_BZIP2= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-libiconv-prefix=${LOCALBASE}/lib --with-libintl-prefix=${LOCALBASE}/lib --mandir=${LOCALBASE}/man - +USE_GNOME= pkgconfig do-install: ${INSTALL_SCRIPT} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin ${CP} ${WRKSRC}/scripts/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample diff --git a/net/ushare/distinfo b/net/ushare/distinfo index d99b2a4da9b7..9a14d0b7d757 100644 --- a/net/ushare/distinfo +++ b/net/ushare/distinfo @@ -1,3 +1,3 @@ -MD5 (ushare-0.9.8.tar.bz2) = dec4c12d97d476c9a3a0347621d64e27 -SHA256 (ushare-0.9.8.tar.bz2) = 4419a3fdb894fbdbdbf19706065fb2df00528c2087e53819c28a353c5d33bde9 -SIZE (ushare-0.9.8.tar.bz2) = 162404 +MD5 (ushare-0.9.9.tar.bz2) = 48d0d70f0fe81d471c3cb46ae56e4103 +SHA256 (ushare-0.9.9.tar.bz2) = c3e1ac4d94ebcd1e085be75f8290a2159a72652db8579cbc22abdf2fd3a35bc7 +SIZE (ushare-0.9.9.tar.bz2) = 178005 diff --git a/net/ushare/files/patch-Makefile.am b/net/ushare/files/patch-Makefile.am deleted file mode 100644 index abb8c52a6fa7..000000000000 --- a/net/ushare/files/patch-Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ ---- src/Makefile.am.orig Thu Nov 2 22:24:08 2006 -+++ src/Makefile.am Sat Dec 23 03:44:42 2006 -@@ -1,5 +1,7 @@ - bin_PROGRAMS=ushare - ushare_SOURCES= \ -+ strndup.h strndup.c \ -+ getline.h getline.c \ - cds.h cds.c \ - cms.h cms.c \ - msr.h msr.c \ diff --git a/net/ushare/files/patch-Makefile.in b/net/ushare/files/patch-Makefile.in deleted file mode 100644 index 474a69239374..000000000000 --- a/net/ushare/files/patch-Makefile.in +++ /dev/null @@ -1,20 +0,0 @@ ---- src/Makefile.in.orig Sun Dec 10 18:39:08 2006 -+++ src/Makefile.in Sat Dec 23 13:32:07 2006 -@@ -59,7 +59,7 @@ - http.$(OBJEXT) presentation.$(OBJEXT) metadata.$(OBJEXT) \ - mime.$(OBJEXT) services.$(OBJEXT) buffer.$(OBJEXT) \ - util_iconv.$(OBJEXT) content.$(OBJEXT) cfgparser.$(OBJEXT) \ -- trace.$(OBJEXT) ushare.$(OBJEXT) -+ trace.$(OBJEXT) ushare.$(OBJEXT) getline.$(OBJEXT) strndup.$(OBJEXT) - ushare_OBJECTS = $(am_ushare_OBJECTS) - ushare_LDADD = $(LDADD) - DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -@@ -182,6 +182,8 @@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ - ushare_SOURCES = \ -+ strndup.h strndup.c \ -+ getline.h getline.c \ - cds.h cds.c \ - cms.h cms.c \ - msr.h msr.c \ diff --git a/net/ushare/files/patch-cfgparser.c b/net/ushare/files/patch-cfgparser.c deleted file mode 100644 index 71bb1ef497f6..000000000000 --- a/net/ushare/files/patch-cfgparser.c +++ /dev/null @@ -1,14 +0,0 @@ ---- src/cfgparser.c.orig Sun Nov 12 13:40:35 2006 -+++ src/cfgparser.c Sat Dec 23 03:33:22 2006 -@@ -36,6 +36,11 @@ - #include "ushare.h" - #include "trace.h" - -+#if defined(__FreeBSD__) -+#include "strndup.h" -+#include "getline.h" -+#endif -+ - #define USHARE_DIR_DELIM "," - - static bool diff --git a/net/ushare/files/patch-getline.c b/net/ushare/files/patch-getline.c deleted file mode 100644 index eca56d7c253c..000000000000 --- a/net/ushare/files/patch-getline.c +++ /dev/null @@ -1,35 +0,0 @@ ---- src/getline.c.orig Sat Dec 23 02:49:09 2006 -+++ src/getline.c Sat Dec 23 13:26:42 2006 -@@ -0,0 +1,32 @@ -+#include <sys/types.h> -+#include <stdio.h> -+#include <string.h> -+#include <stdlib.h> -+#include "getline.h" -+ -+ssize_t getline(char **lineptr, size_t *n, FILE *stream) { -+ static char line[256]; -+ char *ptr; -+ unsigned int len; -+ if(lineptr == NULL || n == NULL) { -+ return -1; -+ } -+ if(ferror(stream)) -+ return -1; -+ if(feof(stream)) -+ return -1; -+ fgets(line,256,stream); -+ ptr = strchr(line,'\n'); -+ if(ptr) -+ *ptr = '\0'; -+ len = strlen(line); -+ if((len+1) < 256) { -+ ptr = realloc(*lineptr, 256); -+ if(ptr == NULL) -+ return(-1); -+ *lineptr = ptr; -+ *n = 256; -+ } -+ strcpy(*lineptr,line); -+ return(len); -+} diff --git a/net/ushare/files/patch-getline.h b/net/ushare/files/patch-getline.h deleted file mode 100644 index 4510fef82ea6..000000000000 --- a/net/ushare/files/patch-getline.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/getline.h.orig Sat Dec 23 02:49:13 2006 -+++ src/getline.h Sat Dec 23 13:24:11 2006 -@@ -0,0 +1,8 @@ -+#ifndef _GETLINE_H_ -+#define _GETLINE_H_ -+ -+#if defined(__FreeBSD__) || defined(__OpenBSD__) -+ssize_t getline(char **lineptr, size_t *n, FILE *stream); -+#endif -+ -+#endif /* _GETLINE_H_ */ diff --git a/net/ushare/files/patch-http.c b/net/ushare/files/patch-http.c deleted file mode 100644 index f7075bdfa215..000000000000 --- a/net/ushare/files/patch-http.c +++ /dev/null @@ -1,13 +0,0 @@ ---- src/http.c.orig Sun Nov 12 13:40:35 2006 -+++ src/http.c Sat Dec 23 02:47:10 2006 -@@ -47,6 +47,10 @@ - #include "trace.h" - #include "presentation.h" - -+#if defined(__FreeBSD__) -+#include "strndup.h" -+#endif -+ - struct web_file_t { - char *fullpath; - size_t pos; diff --git a/net/ushare/files/patch-strndup.c b/net/ushare/files/patch-strndup.c deleted file mode 100644 index 29471085d84b..000000000000 --- a/net/ushare/files/patch-strndup.c +++ /dev/null @@ -1,16 +0,0 @@ ---- src/strndup.c.orig Sat Dec 23 02:49:09 2006 -+++ src/strndup.c Sat Dec 23 13:36:14 2006 -@@ -0,0 +1,13 @@ -+#include <sys/types.h> -+#include <stdlib.h> -+#include <string.h> -+#include "strndup.h" -+ -+char *strndup(const char *s, size_t n) { -+ char *dup = (char *)malloc(n+1); -+ if(dup) { -+ strncpy(dup,s,n); -+ dup[n]= '\0'; -+ } -+ return dup; -+} diff --git a/net/ushare/files/patch-strndup.h b/net/ushare/files/patch-strndup.h deleted file mode 100644 index 8239f5baaa4d..000000000000 --- a/net/ushare/files/patch-strndup.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/strndup.h.orig Sat Dec 23 02:49:13 2006 -+++ src/strndup.h Sat Dec 23 13:24:04 2006 -@@ -0,0 +1,8 @@ -+#ifndef _STRNDUP_H_ -+#define _STRNDUP_H_ -+ -+#if defined(__FreeBSD__) || defined(__OpenBSD__) -+char *strndup(const char *s, size_t n); -+#endif -+ -+#endif /* _STRNDUP_H_ */ diff --git a/net/ushare/files/patch-ushare b/net/ushare/files/patch-ushare index 461fc0d81d8c..5fb4752713b1 100644 --- a/net/ushare/files/patch-ushare +++ b/net/ushare/files/patch-ushare @@ -1,5 +1,5 @@ ---- scripts/ushare.orig Sat Dec 9 13:55:38 2006 -+++ scripts/ushare Thu Dec 14 09:24:40 2006 +--- scripts/ushare.orig Sun Feb 25 16:43:51 2007 ++++ scripts/ushare Sun Feb 25 20:34:06 2007 @@ -1,74 +1,29 @@ -#!/bin/sh -e -### BEGIN INIT INFO @@ -65,7 +65,7 @@ - ;; - restart) - $0 stop -- $1 start +- $0 start - ;; - *) - N=/etc/init.d/$NAME @@ -75,7 +75,7 @@ -esac +#!/bin/sh +# -+# ushare.sh for rc.d usage (c) 2006 Volker Theile. ++# ushare.sh for rc.d usage (c) 2007 Volker Theile <votdev@gmx.de>. +# + +# PROVIDE: ushare diff --git a/net/ushare/files/patch-ushare.c b/net/ushare/files/patch-ushare.c deleted file mode 100644 index 0a48a4d975ba..000000000000 --- a/net/ushare/files/patch-ushare.c +++ /dev/null @@ -1,71 +0,0 @@ ---- src/ushare.c.orig Sun Nov 12 13:40:35 2006 -+++ src/ushare.c Sat Dec 23 02:11:43 2006 -@@ -33,6 +33,11 @@ - #include <unistd.h> - #include <errno.h> - #include <getopt.h> -+#if defined(__FreeBSD__) -+#include <sys/socket.h> -+#include <sys/sysctl.h> -+#include <net/if_dl.h> -+#endif - #include <net/if.h> - #include <sys/ioctl.h> - #include <sys/types.h> -@@ -346,6 +351,48 @@ - static char * - create_udn (char *interface) - { -+#if defined(__FreeBSD__) -+ int mib[6], len; -+ char *buf; -+ unsigned char *ptr; -+ struct if_msghdr *ifm; -+ struct sockaddr_dl *sdl; -+ -+ mib[0] = CTL_NET; -+ mib[1] = AF_ROUTE; -+ mib[2] = 0; -+ mib[3] = AF_LINK; -+ mib[4] = NET_RT_IFLIST; -+ if((mib[5] = if_nametoindex(interface)) == 0) { -+ perror("if_nametoindex error"); -+ exit(2); -+ } -+ -+ if(sysctl(mib, 6, NULL, &len, NULL, 0) < 0) { -+ perror("sysctl 1 error"); -+ exit(3); -+ } -+ -+ if((buf = malloc(len)) == NULL) { -+ perror("malloc error"); -+ exit(4); -+ } -+ -+ if(sysctl(mib, 6, buf, &len, NULL, 0) < 0) { -+ perror("sysctl 2 error"); -+ exit(5); -+ } -+ -+ ifm = (struct if_msghdr *)buf; -+ sdl = (struct sockaddr_dl *)(ifm + 1); -+ ptr = (unsigned char *)LLADDR(sdl); -+ -+ snprintf(buf, 64, "%02X%02X%02X%02X%02X%02X", -+ (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377), -+ (ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)); -+ -+ return buf; -+#else - int sock; - struct ifreq ifr; - char *buf; -@@ -382,6 +429,7 @@ - close (sock); - - return buf; -+#endif - } - - static char * |