1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00

New port: SDK for UPnP Devices

This is Linux SDK for UPnP Devices 1.0, an Open Source
Universal Plug and Play Development Kit.

PR: ports/41294
Submitted by: Yen-Ming Lee <leeym@utopia.leeym.com>
This commit is contained in:
Clive Lin 2002-08-04 07:31:27 +00:00
parent f1b3108e15
commit 2711126f9a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=63952
25 changed files with 417 additions and 0 deletions

View File

@ -761,6 +761,7 @@
SUBDIR += uml
SUBDIR += understand_ada
SUBDIR += understand_c
SUBDIR += upnp
SUBDIR += ups-debug
SUBDIR += varconf
SUBDIR += vb2c

38
devel/upnp/Makefile Normal file
View File

@ -0,0 +1,38 @@
# New ports collection makefile for: upnp
# Date created: 02 August 2002
# Whom: Yen-Ming Lee <leeym@leeym.com>
#
# $FreeBSD$
#
PORTNAME= upnp
PORTVERSION= 1.0.4
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PORTNAME}sdk-${PORTVERSION}
MAINTAINER= leeym@leeym.com
LIB_DEPENDS= uuid.1:${PORTSDIR}/sysutils/e2fsprogs
USE_GMAKE= yes
USE_REINPLACE= yes
MAKEFILE= makefile
MAKE_ENV= PTHREAD_LIBS=${PTHREAD_LIBS}
INSTALLS_SHLIB= yes
post-patch:
@cd ${WRKSRC} && ${REINPLACE_CMD} -e 's,MAKE = make,MAKE = ${GMAKE},' \
src/genlib/makefile src/makefile
@cd ${WRKSRC} && ${REINPLACE_CMD} -e 's,malloc.h,stdlib.h,' \
src/inc/genlib/client_table/client_table.h \
src/inc/genlib/http_client/http_client.h \
src/inc/genlib/service_table/service_table.h \
src/inc/genlib/timer_thread/timer_thread.h \
src/upnpdom/domCif.cpp
@cd ${WRKSRC} && ${REINPLACE_CMD} -e 's,MSG_NOSIGNAL,0,' \
src/genlib/http_client/http_client.c \
src/genlib/net/http/readwrite.cpp
.include <bsd.port.mk>

1
devel/upnp/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (upnpsdk-1.0.4.tar.gz) = d4ebd84d0c809d90ae36c37e5a2d213c

View File

@ -0,0 +1,45 @@
--- makefile.orig Thu Aug 16 02:20:11 2001
+++ makefile Sat Aug 3 17:22:35 2002
@@ -29,11 +29,11 @@
##
###########################################################################
-MAKE = make
+MAKE = gmake
UPNP = bin/libupnp.so
SUBDIRS = src
-VERSION=1.0.4
+VERSION=1
ifeq ($(DEBUG),1)
STRIPU =
@@ -102,17 +102,17 @@
@if [ -f "doc/upnpsdk.aux" ]; then rm doc/upnpsdk.aux; fi
install: upnp
- @install -d /usr/include/upnp
- @install -d /usr/include/upnp/upnpdom
- @install -d /usr/include/upnp/tools
- @install bin/libupnp.so /usr/lib/libupnp.so.$(VERSION)
- ln -s /usr/lib/libupnp.so.$(VERSION) /usr/lib/libupnp.so
- @install inc/*.h /usr/include/upnp
- @install inc/upnpdom/*.h /usr/include/upnp/upnpdom
- @install inc/tools/*.h /usr/include/upnp/tools
+ @install -d ${PREFIX}/include/upnp
+ @install -d ${PREFIX}/include/upnp/upnpdom
+ @install -d ${PREFIX}/include/upnp/tools
+ @install bin/libupnp.so ${PREFIX}/lib/libupnp.so.$(VERSION)
+ ln -fs ${PREFIX}/lib/libupnp.so.$(VERSION) ${PREFIX}/lib/libupnp.so
+ @install inc/*.h ${PREFIX}/include/upnp
+ @install inc/upnpdom/*.h ${PREFIX}/include/upnp/upnpdom
+ @install inc/tools/*.h ${PREFIX}/include/upnp/tools
uninstall:
- @if [ -d /usr/include/upnp ]; then rm -rf /usr/include/upnp; fi
- @if [ -f /usr/lib/libupnp.so ]; then rm /usr/lib/libupnp.so; fi
- @if [ -f /usr/lib/libupnp.so.$(VERSION) ]; then rm /usr/lib/libupnp.so.$(VERSION); fi
+ @if [ -d ${PREFIX}/include/upnp ]; then rm -rf ${PREFIX}/include/upnp; fi
+ @if [ -f ${PREFIX}/lib/libupnp.so ]; then rm ${PREFIX}/lib/libupnp.so; fi
+ @if [ -f ${PREFIX}/lib/libupnp.so.$(VERSION) ]; then rm ${PREFIX}/lib/libupnp.so.$(VERSION); fi

View File

@ -0,0 +1,22 @@
--- src/api/makefile.orig Fri Jun 15 08:21:33 2001
+++ src/api/makefile Sat Aug 3 16:29:38 2002
@@ -34,15 +34,15 @@
CC = gcc
CFLAGS = -Wall -fpic $(DEFS)
C2FLAGS = -Wall $(DEFS) -shared -Wl,-soname,libupnp.so
-INCLUDES = -I ../inc -I ../../inc -I ../../inc/upnpdom -I ../inc/tools
-LIBS = -lpthread -luuid
+INCLUDES = -I ../inc -I ../../inc -I ../../inc/upnpdom -I ../inc/tools -I $(PREFIX)/include
+LIBS = ${PTHREAD_LIBS} -luuid -L$(PREFIX)/lib
ifeq ($(DEBUG),1)
CFLAGS += -g -O -DDEBUG
C2FLAGS += -g -O -DDEBUG
else
-CFLAGS += -O2
-C2FLAGS += -O2
+CFLAGS += -g -ggdb
+C2FLAGS += -g -ggdb
endif
objects = upnpapi.o config.o ../lib/ssdp.o ../lib/soap.o \

View File

@ -0,0 +1,11 @@
--- src/api/upnpapi.c.orig Fri Jun 15 08:22:15 2001
+++ src/api/upnpapi.c Sat Aug 3 16:29:38 2002
@@ -44,7 +44,7 @@
#include<string.h>
#include <sys/ioctl.h>
-#include <linux/if.h>
+#include <net/if.h>
#include <sys/utsname.h>
#include <sys/socket.h>
#include <netinet/in.h>

View File

@ -0,0 +1,11 @@
--- src/gena/Makefile.orig Fri Jun 15 08:21:33 2001
+++ src/gena/Makefile Sat Aug 3 16:29:39 2002
@@ -61,7 +61,7 @@
TARGET = $(upnp_lib_dir)/gena.o
-CFLAGS = -I$(upnp_inc_dir) -I$(upnp_src_inc_dir) -fpic -Wall -c -D_REENTRANT
+CFLAGS = -I$(upnp_inc_dir) -I$(upnp_src_inc_dir) -I$(PREFIX)/include -fpic -Wall -c -D_REENTRANT
ifeq ($(DEBUG),1)
CFLAGS += -g -O -DDEBUG

View File

@ -0,0 +1,11 @@
--- src/genlib/tpool/interrupts.cpp.orig Fri Jun 15 08:22:16 2001
+++ src/genlib/tpool/interrupts.cpp Sat Aug 3 16:29:39 2002
@@ -82,7 +82,7 @@
int code;
newset.sa_handler = signal_handler_alpha;
- newset.sa_flags = SA_NOMASK;
+ newset.sa_flags = SA_NODEFER;
code = sigaction( signalNum, &newset, &g_OldAction );
if ( code < 0 )
{

View File

@ -0,0 +1,20 @@
--- src/genlib/util/gmtdate.cpp.orig Fri Jun 15 08:22:16 2001
+++ src/genlib/util/gmtdate.cpp Sat Aug 3 16:29:39 2002
@@ -41,7 +41,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
-#include <values.h>
+#include <machine/limits.h>
#include <genlib/util/gmtdate.h>
#include <genlib/util/miscexceptions.h>
@@ -254,7 +254,7 @@
val = (int)strtol( str, &endptr, 10 );
- if ( val < 0 || val == MAXINT )
+ if ( val < 0 || val == INT_MAX )
{
return -1;
}

View File

@ -0,0 +1,11 @@
--- src/ssdp/ssdplib.c.orig Thu Aug 16 02:17:31 2001
+++ src/ssdp/ssdplib.c Sat Aug 3 16:29:39 2002
@@ -403,7 +403,7 @@
bzero((char *)&SelfAddr, sizeof(struct sockaddr_in));
SelfAddr.sin_family = AF_INET;
- SelfAddr.sin_addr.s_addr = inet_addr(SSDP_IP);
+ SelfAddr.sin_addr.s_addr = htonl(INADDR_ANY);
SelfAddr.sin_port = htons(SSDP_PORT);
if (bind( SsdpSock, (struct sockaddr *) &SelfAddr, sizeof(SelfAddr)) != 0)
{

1
devel/upnp/pkg-comment Normal file
View File

@ -0,0 +1 @@
Universal Plug and Play Software Development Kit for Linux and FreeBSD

18
devel/upnp/pkg-descr Normal file
View File

@ -0,0 +1,18 @@
The Universal Plug and Play (UPnP) Software Development Kit (SDK) v1.0 for
Linux is an SDK for development of UPnP device and control point applications
for Linux. It consists of the core UPnP protocols along with a UPnP-specific
eXtensible Markup Language (XML) parser supporting the Document Object Model
(DOM) Level 1 API and an optional, integrated mini web server for serving UPnP
related documents.
Intel is not providing support for the UPnP SDK for Linux. Two mailing lists
for the UPnP SDK for Linux are available here:
WWW: http://upnp.sourceforge.net/
Questions and problems should be addressed on the appropriate mailing list.
If you find this SDK useful, please send an email to upnp@intel.com and let
us know.
* Other brands, names, and trademarks are the property of their respective
owners.

19
devel/upnp/pkg-plist Normal file
View File

@ -0,0 +1,19 @@
include/upnp/tools/config.h
include/upnp/tools/upnptools.h
include/upnp/upnp.h
include/upnp/upnpdom/Attr.h
include/upnp/upnpdom/DOMException.h
include/upnp/upnpdom/Document.h
include/upnp/upnpdom/Element.h
include/upnp/upnpdom/NamedNodeMap.h
include/upnp/upnpdom/Node.h
include/upnp/upnpdom/NodeAct.h
include/upnp/upnpdom/NodeList.h
include/upnp/upnpdom/Parser.h
include/upnp/upnpdom/all.h
include/upnp/upnpdom/domCif.h
lib/libupnp.so
lib/libupnp.so.1
@dirrm include/upnp/upnpdom
@dirrm include/upnp/tools
@dirrm include/upnp

38
devel/upnp104/Makefile Normal file
View File

@ -0,0 +1,38 @@
# New ports collection makefile for: upnp
# Date created: 02 August 2002
# Whom: Yen-Ming Lee <leeym@leeym.com>
#
# $FreeBSD$
#
PORTNAME= upnp
PORTVERSION= 1.0.4
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PORTNAME}sdk-${PORTVERSION}
MAINTAINER= leeym@leeym.com
LIB_DEPENDS= uuid.1:${PORTSDIR}/sysutils/e2fsprogs
USE_GMAKE= yes
USE_REINPLACE= yes
MAKEFILE= makefile
MAKE_ENV= PTHREAD_LIBS=${PTHREAD_LIBS}
INSTALLS_SHLIB= yes
post-patch:
@cd ${WRKSRC} && ${REINPLACE_CMD} -e 's,MAKE = make,MAKE = ${GMAKE},' \
src/genlib/makefile src/makefile
@cd ${WRKSRC} && ${REINPLACE_CMD} -e 's,malloc.h,stdlib.h,' \
src/inc/genlib/client_table/client_table.h \
src/inc/genlib/http_client/http_client.h \
src/inc/genlib/service_table/service_table.h \
src/inc/genlib/timer_thread/timer_thread.h \
src/upnpdom/domCif.cpp
@cd ${WRKSRC} && ${REINPLACE_CMD} -e 's,MSG_NOSIGNAL,0,' \
src/genlib/http_client/http_client.c \
src/genlib/net/http/readwrite.cpp
.include <bsd.port.mk>

1
devel/upnp104/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (upnpsdk-1.0.4.tar.gz) = d4ebd84d0c809d90ae36c37e5a2d213c

View File

@ -0,0 +1,45 @@
--- makefile.orig Thu Aug 16 02:20:11 2001
+++ makefile Sat Aug 3 17:22:35 2002
@@ -29,11 +29,11 @@
##
###########################################################################
-MAKE = make
+MAKE = gmake
UPNP = bin/libupnp.so
SUBDIRS = src
-VERSION=1.0.4
+VERSION=1
ifeq ($(DEBUG),1)
STRIPU =
@@ -102,17 +102,17 @@
@if [ -f "doc/upnpsdk.aux" ]; then rm doc/upnpsdk.aux; fi
install: upnp
- @install -d /usr/include/upnp
- @install -d /usr/include/upnp/upnpdom
- @install -d /usr/include/upnp/tools
- @install bin/libupnp.so /usr/lib/libupnp.so.$(VERSION)
- ln -s /usr/lib/libupnp.so.$(VERSION) /usr/lib/libupnp.so
- @install inc/*.h /usr/include/upnp
- @install inc/upnpdom/*.h /usr/include/upnp/upnpdom
- @install inc/tools/*.h /usr/include/upnp/tools
+ @install -d ${PREFIX}/include/upnp
+ @install -d ${PREFIX}/include/upnp/upnpdom
+ @install -d ${PREFIX}/include/upnp/tools
+ @install bin/libupnp.so ${PREFIX}/lib/libupnp.so.$(VERSION)
+ ln -fs ${PREFIX}/lib/libupnp.so.$(VERSION) ${PREFIX}/lib/libupnp.so
+ @install inc/*.h ${PREFIX}/include/upnp
+ @install inc/upnpdom/*.h ${PREFIX}/include/upnp/upnpdom
+ @install inc/tools/*.h ${PREFIX}/include/upnp/tools
uninstall:
- @if [ -d /usr/include/upnp ]; then rm -rf /usr/include/upnp; fi
- @if [ -f /usr/lib/libupnp.so ]; then rm /usr/lib/libupnp.so; fi
- @if [ -f /usr/lib/libupnp.so.$(VERSION) ]; then rm /usr/lib/libupnp.so.$(VERSION); fi
+ @if [ -d ${PREFIX}/include/upnp ]; then rm -rf ${PREFIX}/include/upnp; fi
+ @if [ -f ${PREFIX}/lib/libupnp.so ]; then rm ${PREFIX}/lib/libupnp.so; fi
+ @if [ -f ${PREFIX}/lib/libupnp.so.$(VERSION) ]; then rm ${PREFIX}/lib/libupnp.so.$(VERSION); fi

View File

@ -0,0 +1,22 @@
--- src/api/makefile.orig Fri Jun 15 08:21:33 2001
+++ src/api/makefile Sat Aug 3 16:29:38 2002
@@ -34,15 +34,15 @@
CC = gcc
CFLAGS = -Wall -fpic $(DEFS)
C2FLAGS = -Wall $(DEFS) -shared -Wl,-soname,libupnp.so
-INCLUDES = -I ../inc -I ../../inc -I ../../inc/upnpdom -I ../inc/tools
-LIBS = -lpthread -luuid
+INCLUDES = -I ../inc -I ../../inc -I ../../inc/upnpdom -I ../inc/tools -I $(PREFIX)/include
+LIBS = ${PTHREAD_LIBS} -luuid -L$(PREFIX)/lib
ifeq ($(DEBUG),1)
CFLAGS += -g -O -DDEBUG
C2FLAGS += -g -O -DDEBUG
else
-CFLAGS += -O2
-C2FLAGS += -O2
+CFLAGS += -g -ggdb
+C2FLAGS += -g -ggdb
endif
objects = upnpapi.o config.o ../lib/ssdp.o ../lib/soap.o \

View File

@ -0,0 +1,11 @@
--- src/api/upnpapi.c.orig Fri Jun 15 08:22:15 2001
+++ src/api/upnpapi.c Sat Aug 3 16:29:38 2002
@@ -44,7 +44,7 @@
#include<string.h>
#include <sys/ioctl.h>
-#include <linux/if.h>
+#include <net/if.h>
#include <sys/utsname.h>
#include <sys/socket.h>
#include <netinet/in.h>

View File

@ -0,0 +1,11 @@
--- src/gena/Makefile.orig Fri Jun 15 08:21:33 2001
+++ src/gena/Makefile Sat Aug 3 16:29:39 2002
@@ -61,7 +61,7 @@
TARGET = $(upnp_lib_dir)/gena.o
-CFLAGS = -I$(upnp_inc_dir) -I$(upnp_src_inc_dir) -fpic -Wall -c -D_REENTRANT
+CFLAGS = -I$(upnp_inc_dir) -I$(upnp_src_inc_dir) -I$(PREFIX)/include -fpic -Wall -c -D_REENTRANT
ifeq ($(DEBUG),1)
CFLAGS += -g -O -DDEBUG

View File

@ -0,0 +1,11 @@
--- src/genlib/tpool/interrupts.cpp.orig Fri Jun 15 08:22:16 2001
+++ src/genlib/tpool/interrupts.cpp Sat Aug 3 16:29:39 2002
@@ -82,7 +82,7 @@
int code;
newset.sa_handler = signal_handler_alpha;
- newset.sa_flags = SA_NOMASK;
+ newset.sa_flags = SA_NODEFER;
code = sigaction( signalNum, &newset, &g_OldAction );
if ( code < 0 )
{

View File

@ -0,0 +1,20 @@
--- src/genlib/util/gmtdate.cpp.orig Fri Jun 15 08:22:16 2001
+++ src/genlib/util/gmtdate.cpp Sat Aug 3 16:29:39 2002
@@ -41,7 +41,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
-#include <values.h>
+#include <machine/limits.h>
#include <genlib/util/gmtdate.h>
#include <genlib/util/miscexceptions.h>
@@ -254,7 +254,7 @@
val = (int)strtol( str, &endptr, 10 );
- if ( val < 0 || val == MAXINT )
+ if ( val < 0 || val == INT_MAX )
{
return -1;
}

View File

@ -0,0 +1,11 @@
--- src/ssdp/ssdplib.c.orig Thu Aug 16 02:17:31 2001
+++ src/ssdp/ssdplib.c Sat Aug 3 16:29:39 2002
@@ -403,7 +403,7 @@
bzero((char *)&SelfAddr, sizeof(struct sockaddr_in));
SelfAddr.sin_family = AF_INET;
- SelfAddr.sin_addr.s_addr = inet_addr(SSDP_IP);
+ SelfAddr.sin_addr.s_addr = htonl(INADDR_ANY);
SelfAddr.sin_port = htons(SSDP_PORT);
if (bind( SsdpSock, (struct sockaddr *) &SelfAddr, sizeof(SelfAddr)) != 0)
{

View File

@ -0,0 +1 @@
Universal Plug and Play Software Development Kit for Linux and FreeBSD

18
devel/upnp104/pkg-descr Normal file
View File

@ -0,0 +1,18 @@
The Universal Plug and Play (UPnP) Software Development Kit (SDK) v1.0 for
Linux is an SDK for development of UPnP device and control point applications
for Linux. It consists of the core UPnP protocols along with a UPnP-specific
eXtensible Markup Language (XML) parser supporting the Document Object Model
(DOM) Level 1 API and an optional, integrated mini web server for serving UPnP
related documents.
Intel is not providing support for the UPnP SDK for Linux. Two mailing lists
for the UPnP SDK for Linux are available here:
WWW: http://upnp.sourceforge.net/
Questions and problems should be addressed on the appropriate mailing list.
If you find this SDK useful, please send an email to upnp@intel.com and let
us know.
* Other brands, names, and trademarks are the property of their respective
owners.

19
devel/upnp104/pkg-plist Normal file
View File

@ -0,0 +1,19 @@
include/upnp/tools/config.h
include/upnp/tools/upnptools.h
include/upnp/upnp.h
include/upnp/upnpdom/Attr.h
include/upnp/upnpdom/DOMException.h
include/upnp/upnpdom/Document.h
include/upnp/upnpdom/Element.h
include/upnp/upnpdom/NamedNodeMap.h
include/upnp/upnpdom/Node.h
include/upnp/upnpdom/NodeAct.h
include/upnp/upnpdom/NodeList.h
include/upnp/upnpdom/Parser.h
include/upnp/upnpdom/all.h
include/upnp/upnpdom/domCif.h
lib/libupnp.so
lib/libupnp.so.1
@dirrm include/upnp/upnpdom
@dirrm include/upnp/tools
@dirrm include/upnp