diff options
author | rh <rh> | 2007-06-19 01:40:13 +0000 |
---|---|---|
committer | rh <rh> | 2007-06-19 01:40:13 +0000 |
commit | 8c41e9cd55dfb59a05cb87b454449defe6783743 (patch) | |
tree | 2af7f60ddc86e5b601788863fc3c8723953bddd9 | |
parent | 34b86fc9a977597e5924227618f030b04bd3f2c0 (diff) | |
download | pkgsrc-8c41e9cd55dfb59a05cb87b454449defe6783743.tar.gz |
Update libupnp to 1.6.0 (currently a leaf package). Changes are mainly
bugfixes, including a couple of serious bugs that prevented the library
from working on NetBSD and Darwin (for anything other than trivial tests).
Add a buildlink3.mk while at it.
-rw-r--r-- | net/libupnp/Makefile | 20 | ||||
-rw-r--r-- | net/libupnp/PLIST | 3 | ||||
-rw-r--r-- | net/libupnp/buildlink3.mk | 23 | ||||
-rw-r--r-- | net/libupnp/distinfo | 15 | ||||
-rw-r--r-- | net/libupnp/patches/patch-aa | 14 | ||||
-rw-r--r-- | net/libupnp/patches/patch-ab | 42 | ||||
-rw-r--r-- | net/libupnp/patches/patch-ac | 44 | ||||
-rw-r--r-- | net/libupnp/patches/patch-ad | 12 | ||||
-rw-r--r-- | net/libupnp/patches/patch-ae | 13 | ||||
-rw-r--r-- | net/libupnp/patches/patch-af | 21 | ||||
-rw-r--r-- | net/libupnp/patches/patch-ag | 12 |
11 files changed, 34 insertions, 185 deletions
diff --git a/net/libupnp/Makefile b/net/libupnp/Makefile index 8d091175593..1bf30424e03 100644 --- a/net/libupnp/Makefile +++ b/net/libupnp/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.4 2007/06/07 08:08:16 rh Exp $ +# $NetBSD: Makefile,v 1.5 2007/06/19 01:40:13 rh Exp $ # -DISTNAME= libupnp-1.4.6 +DISTNAME= libupnp-1.6.0-rc1 +PKGNAME= ${DISTNAME:S/-rc1/rc1/} CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pupnp/} EXTRACT_SUFX= .tar.bz2 @@ -10,6 +11,7 @@ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://pupnp.sourceforge.net/ COMMENT= Portable Universal Plug and Play (UPnP) SDK +WRKSRC= ${WRKDIR}/${DISTNAME:S/-rc1//} USE_LANGUAGES= c c++ USE_TOOLS+= pkg-config USE_PKGLOCALEDIR= yes @@ -18,20 +20,8 @@ GNU_CONFIGURE= yes PKGCONFIG_OVERRIDE+= libupnp.pc.in -pre-configure: -.if !exists(/usr/include/malloc.h) - ${LN} -s /usr/include/stdlib.h ${BUILDLINK_DIR}/include/malloc.h -.endif -.if !exists(/usr/include/sys/sysinfo.h) - ${MKDIR} -p ${BUILDLINK_DIR}/include/sys - ${TOUCH} ${BUILDLINK_DIR}/include/sys/sysinfo.h -.endif -.if !exists(/usr/include/linux/if.h) - ${MKDIR} -p ${BUILDLINK_DIR}/include/linux - ${LN} -s /usr/include/net/if.h ${BUILDLINK_DIR}/include/linux/if.h -.endif - post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/${PKGNAME_NOREV} .for doc in IXML_Programming_Guide UPnP_Programming_Guide ${INSTALL_DATA} ${WRKSRC}/docs/dist/${doc}.pdf \ ${PREFIX}/share/doc/${PKGNAME_NOREV} diff --git a/net/libupnp/PLIST b/net/libupnp/PLIST index b6f9018392f..fe9ed8ce89c 100644 --- a/net/libupnp/PLIST +++ b/net/libupnp/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2007/06/07 08:08:16 rh Exp $ +@comment $NetBSD: PLIST,v 1.3 2007/06/19 01:40:13 rh Exp $ include/upnp/FreeList.h include/upnp/LinkedList.h include/upnp/ThreadPool.h @@ -8,6 +8,7 @@ include/upnp/ithread.h include/upnp/ixml.h include/upnp/upnp.h include/upnp/upnpconfig.h +include/upnp/upnpdebug.h include/upnp/upnptools.h lib/libixml.la lib/libthreadutil.la diff --git a/net/libupnp/buildlink3.mk b/net/libupnp/buildlink3.mk new file mode 100644 index 00000000000..aa1141569dd --- /dev/null +++ b/net/libupnp/buildlink3.mk @@ -0,0 +1,23 @@ +# $NetBSD: buildlink3.mk,v 1.1 2007/06/19 01:40:13 rh Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +LIBUPNP_BUILDLINK3_MK:= ${LIBUPNP_BUILDLINK3_MK}+ + +.if ${BUILDLINK_DEPTH} == "+" +BUILDLINK_DEPENDS+= libupnp +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibupnp} +BUILDLINK_PACKAGES+= libupnp +BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libupnp + +.if ${LIBUPNP_BUILDLINK3_MK} == "+" +BUILDLINK_API_DEPENDS.libupnp+= libupnp>1.4.6 +BUILDLINK_PKGSRCDIR.libupnp?= ../../net/libupnp + +PRINT_PLIST_AWK+= /^@dirrm include\/upnp$$/ { print "@comment in net/libupnp: " $$0; next; } +PRINT_PLIST_AWK+= /^@exec \$${MKDIR} %D\/include\/upnp$$/ { next; } + +.endif # LIBUPNP_BUILDLINK3_MK + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/net/libupnp/distinfo b/net/libupnp/distinfo index 47b8ee1c38e..86a594a3953 100644 --- a/net/libupnp/distinfo +++ b/net/libupnp/distinfo @@ -1,13 +1,6 @@ -$NetBSD: distinfo,v 1.4 2007/06/12 21:59:32 joerg Exp $ +$NetBSD: distinfo,v 1.5 2007/06/19 01:40:14 rh Exp $ -SHA1 (libupnp-1.4.6.tar.bz2) = eb7d8c725f9813bcaff0eb6a8bc18e43f3c4bc77 -RMD160 (libupnp-1.4.6.tar.bz2) = 022f867a7f4466dcaf1954a4643b7a32c4a7a95e -Size (libupnp-1.4.6.tar.bz2) = 1100044 bytes -SHA1 (patch-aa) = 9b15b84ff8594582cd655d2411e68d27a374c0b7 -SHA1 (patch-ab) = 6a55cd8a7695078bbaca07707b09be996537e032 -SHA1 (patch-ac) = 20ed0e2ec39b0b562961f720eb1b1c3232232506 -SHA1 (patch-ad) = 48cf5476743acd415996dc3b065cc7d3cf9b4dbb -SHA1 (patch-ae) = e60148122ddd01f8c1020235c58ec7fa3cf7b179 -SHA1 (patch-af) = 323bf256f9c7e0949897e07860dfa890ed5b60f3 -SHA1 (patch-ag) = e13203b590bb671ddf98564cefdb260cccb6bcb9 +SHA1 (libupnp-1.6.0-rc1.tar.bz2) = 9c8133d0a4364c73f0fba2bbfb763e019875c747 +RMD160 (libupnp-1.6.0-rc1.tar.bz2) = be3bb874b20859de80a6104d235a8f93f929b559 +Size (libupnp-1.6.0-rc1.tar.bz2) = 1135997 bytes SHA1 (patch-ah) = bfe8b269cd7e8ee0f7e4ab0685fe70524960a365 diff --git a/net/libupnp/patches/patch-aa b/net/libupnp/patches/patch-aa deleted file mode 100644 index 3d9760d0730..00000000000 --- a/net/libupnp/patches/patch-aa +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-aa,v 1.2 2007/06/07 08:08:16 rh Exp $ - ---- upnp/inc/upnp.h.orig 2007-03-04 00:58:24.000000000 +1000 -+++ upnp/inc/upnp.h -@@ -45,7 +45,8 @@ - #endif - - #include <stdio.h> --#ifdef __FreeBSD__ -+#include <sys/param.h> -+#if (defined(BSD) && BSD >= 199306) - #include <time.h> - #endif - #include "ixml.h" diff --git a/net/libupnp/patches/patch-ab b/net/libupnp/patches/patch-ab deleted file mode 100644 index f63c8792e8b..00000000000 --- a/net/libupnp/patches/patch-ab +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-ab,v 1.2 2007/06/07 08:08:16 rh Exp $ - ---- upnp/src/genlib/net/sock.c.orig 2006-10-05 16:19:25.000000000 +1000 -+++ upnp/src/genlib/net/sock.c -@@ -231,6 +231,15 @@ sock_read_write( IN SOCKINFO * info, - } - } - -+#ifdef SO_NOSIGPIPE -+ { -+ int old; -+ int set = 1; -+ socklen_t olen = sizeof(old); -+ getsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &old, &olen); -+ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(set)); -+#endif -+ - if( bRead ) { - // read data - numBytes = recv( sockfd, buffer, bufsize,MSG_NOSIGNAL); -@@ -243,6 +252,9 @@ sock_read_write( IN SOCKINFO * info, - send( sockfd, buffer + bytes_sent, byte_left, - MSG_DONTROUTE|MSG_NOSIGNAL); - if( num_written == -1 ) { -+#ifdef SO_NOSIGPIPE -+ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &old, olen); -+#endif - return num_written; - } - -@@ -253,6 +265,11 @@ sock_read_write( IN SOCKINFO * info, - numBytes = bytes_sent; - } - -+#ifdef SO_NOSIGPIPE -+ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &old, olen); -+ } -+#endif -+ - if( numBytes < 0 ) { - return UPNP_E_SOCKET_ERROR; - } diff --git a/net/libupnp/patches/patch-ac b/net/libupnp/patches/patch-ac deleted file mode 100644 index af7c6413dfe..00000000000 --- a/net/libupnp/patches/patch-ac +++ /dev/null @@ -1,44 +0,0 @@ -$NetBSD: patch-ac,v 1.2 2007/06/07 08:08:16 rh Exp $ - ---- upnp/src/genlib/net/uri/uri.c.orig 2007-04-28 22:02:33.000000000 +1000 -+++ upnp/src/genlib/net/uri/uri.c -@@ -631,11 +631,38 @@ parse_hostport( const char *in, - if ( h == NULL ) { - errCode = 1; - } --#else -+#elif defined(__linux__) - errCode = gethostbyname_r( temp_host_name, - &h_buf, - temp_hostbyname_buff, - BUFFER_SIZE, &h, &errcode ); -+#else -+{ -+ struct addrinfo hints, *res, *res0; -+ -+ h = NULL; -+ memset(&hints, 0, sizeof(hints)); -+ hints.ai_family = PF_INET; -+ hints.ai_socktype = SOCK_STREAM; -+ errCode = getaddrinfo(temp_host_name, "http", &hints, &res0); -+ -+ if (!errCode) { -+ for (res = res0; res; res = res->ai_next) { -+ if (res->ai_family == PF_INET && -+ res->ai_addr->sa_family == AF_INET) -+ { -+ h = &h_buf; -+ h->h_addrtype = res->ai_addr->sa_family; -+ h->h_length = 4; -+ h->h_addr = (void *) temp_hostbyname_buff; -+ *(struct in_addr *)h->h_addr = -+ ((struct sockaddr_in *)res->ai_addr)->sin_addr; -+ break; -+ } -+ } -+ freeaddrinfo(res0); -+ } -+} - #endif - - if( errCode == 0 ) { diff --git a/net/libupnp/patches/patch-ad b/net/libupnp/patches/patch-ad deleted file mode 100644 index aa671a2c3e2..00000000000 --- a/net/libupnp/patches/patch-ad +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ad,v 1.1.1.1 2006/06/03 23:29:24 rh Exp $ - ---- upnp/src/inc/upnpapi.h.orig 2006-02-18 23:50:55.000000000 +1000 -+++ upnp/src/inc/upnpapi.h -@@ -160,7 +160,6 @@ void UpnpThreadDistribution(struct UpnpN - void AutoAdvertise(void *input); - int getlocalhostname(char *out); - --virtualDirList *pVirtualDirList; - extern WebServerState bWebServerState; - - #endif diff --git a/net/libupnp/patches/patch-ae b/net/libupnp/patches/patch-ae deleted file mode 100644 index f640d70e78e..00000000000 --- a/net/libupnp/patches/patch-ae +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ae,v 1.1.1.1 2006/06/03 23:29:24 rh Exp $ - ---- upnp/src/api/upnpapi.c.orig 2006-03-01 08:27:59.000000000 +1000 -+++ upnp/src/api/upnpapi.c -@@ -68,6 +68,8 @@ - /* - ****************** */ - -+virtualDirList *pVirtualDirList; -+ - //Mutex to synchronize the subscription handling at the client side - CLIENTONLY( ithread_mutex_t GlobalClientSubscribeMutex; - ) diff --git a/net/libupnp/patches/patch-af b/net/libupnp/patches/patch-af deleted file mode 100644 index 187c77ae24b..00000000000 --- a/net/libupnp/patches/patch-af +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-af,v 1.2 2007/06/07 08:08:16 rh Exp $ - ---- threadutil/src/ThreadPool.c.orig 2007-03-13 13:19:24.000000000 +1000 -+++ threadutil/src/ThreadPool.c -@@ -354,8 +354,15 @@ tp->stats.totalJobsLQ++; tp->stats.total - srand( ( unsigned int )t.millitm + (unsigned int)ithread_get_current_thread_id( ).p ); - #elif defined(__FreeBSD__) - srand( ( unsigned int )t.millitm + (unsigned int)ithread_get_current_thread_id( ) ); --#else -+#elif defined(__linux__) - srand( ( unsigned int )t.millitm + ithread_get_current_thread_id( ) ); -+#else -+ { -+ volatile union { volatile pthread_t tid; volatile unsigned i; } idu; -+ -+ idu.tid = ithread_get_current_thread_id(); -+ srand( ( unsigned int )t.millitm + idu.i ); -+ } - #endif - } - diff --git a/net/libupnp/patches/patch-ag b/net/libupnp/patches/patch-ag deleted file mode 100644 index 46848dcbdbd..00000000000 --- a/net/libupnp/patches/patch-ag +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ag,v 1.2 2007/06/07 08:08:16 rh Exp $ - ---- upnp/src/urlconfig/urlconfig.c.orig 2006-12-24 07:13:15.000000000 +1000 -+++ upnp/src/urlconfig/urlconfig.c -@@ -32,6 +32,7 @@ - #include "config.h" - #include <assert.h> - #ifndef WIN32 -+ #include <sys/types.h> - #include <sys/socket.h> - #include <netinet/in.h> - #include <arpa/inet.h> |