diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2008-09-12 13:18:26 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2008-09-12 13:18:26 +0000 |
commit | 4acb055a3283ffa58aa75798c5a821fb52fb5b1f (patch) | |
tree | 47dc563ab43c55beb84fac41d7ae472602dd2f03 /devel/ptlib | |
parent | fc9831224f49bdfd925166ea548bf5f6b78fe70b (diff) | |
download | pkgsrc-4acb055a3283ffa58aa75798c5a821fb52fb5b1f.tar.gz |
PTLib is a multi-platform C++ class library. Programs based on PTLib can run
on both Microsoft Windows and Unix/Linux. The library contains both the
"basic" classes (strings, arrays, lists) and the higher-level functionality
(networking, multi-threading).
Diffstat (limited to 'devel/ptlib')
-rw-r--r-- | devel/ptlib/DESCR | 4 | ||||
-rw-r--r-- | devel/ptlib/Makefile | 41 | ||||
-rw-r--r-- | devel/ptlib/PLIST | 188 | ||||
-rw-r--r-- | devel/ptlib/buildlink3.mk | 23 | ||||
-rw-r--r-- | devel/ptlib/distinfo | 17 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-aa | 18 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-ab | 16 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-ac | 13 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-ad | 49 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-ae | 29 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-af | 51 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-ag | 13 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-ah | 136 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-ai | 40 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-ba | 30 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-bb | 13 | ||||
-rw-r--r-- | devel/ptlib/patches/patch-bc | 13 |
17 files changed, 694 insertions, 0 deletions
diff --git a/devel/ptlib/DESCR b/devel/ptlib/DESCR new file mode 100644 index 00000000000..b2965b39c08 --- /dev/null +++ b/devel/ptlib/DESCR @@ -0,0 +1,4 @@ +PTLib is a multi-platform C++ class library. Programs based on PTLib can run +on both Microsoft Windows and Unix/Linux. The library contains both the +"basic" classes (strings, arrays, lists) and the higher-level functionality +(networking, multi-threading). diff --git a/devel/ptlib/Makefile b/devel/ptlib/Makefile new file mode 100644 index 00000000000..4386192928a --- /dev/null +++ b/devel/ptlib/Makefile @@ -0,0 +1,41 @@ +# $NetBSD: Makefile,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +DISTNAME= ptlib-snapshot-20080907 +PKGNAME= ptlib-2.3.0.20080907 +CATEGORIES= devel +MASTER_SITES= http://snapshots.ekiga.net/snapshots/sources/archives/ + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.ekiga.net/ +COMMENT= Portable Windows Libary + +CONFLICTS+= pwlib-[0-9]* + +BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison + +WRKSRC= ${WRKDIR}/ptlib +USE_TOOLS+= gmake tar +BUILD_TARGET= optshared +USE_LANGUAGES= c c++ +USE_LIBTOOL= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --enable-plugins +CONFIGURE_ARGS+= --enable-oss +CONFIGURE_ARGS+= --enable-v4l2 +CONFIGURE_ARGS+= --enable-opal +#CONFIGURE_ARGS+= --enable-samples +CONFIGURE_ARGS+= --disable-bsdvideo +CONFIGURE_ARGS+= --disable-sunaudio +CONFIGURE_ARGS+= --disable-alsa +CONFIGURE_ARGS+= --disable-avc +CONFIGURE_ARGS+= --disable-dc +PTHREAD_OPTS+= require + +post-install: + ${INSTALL_DATA} ${WRKSRC}/version.h ${PREFIX}/share/ptlib + +.include "../../graphics/libv4l/buildlink3.mk" +.include "../../security/openssl/buildlink3.mk" +.include "../../mk/oss.buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/ptlib/PLIST b/devel/ptlib/PLIST new file mode 100644 index 00000000000..3ed2d32f080 --- /dev/null +++ b/devel/ptlib/PLIST @@ -0,0 +1,188 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ +bin/ptlib-config +include/ptbuildopts.h +include/ptclib/asnber.h +include/ptclib/asner.h +include/ptclib/asnper.h +include/ptclib/asnxer.h +include/ptclib/cypher.h +include/ptclib/delaychan.h +include/ptclib/dtmf.h +include/ptclib/enum.h +include/ptclib/ftp.h +include/ptclib/guid.h +include/ptclib/html.h +include/ptclib/http.h +include/ptclib/httpform.h +include/ptclib/httpsvc.h +include/ptclib/inetmail.h +include/ptclib/inetprot.h +include/ptclib/ipacl.h +include/ptclib/memfile.h +include/ptclib/mime.h +include/ptclib/modem.h +include/ptclib/paec.h +include/ptclib/pasn.h +include/ptclib/pdns.h +include/ptclib/pils.h +include/ptclib/pldap.h +include/ptclib/pnat.h +include/ptclib/podbc.h +include/ptclib/psasl.h +include/ptclib/psnmp.h +include/ptclib/psoap.h +include/ptclib/psockbun.h +include/ptclib/pssl.h +include/ptclib/pstun.h +include/ptclib/ptts.h +include/ptclib/pvfiledev.h +include/ptclib/pvidfile.h +include/ptclib/pwavfile.h +include/ptclib/pwavfiledev.h +include/ptclib/pxml.h +include/ptclib/pxmlrpc.h +include/ptclib/pxmlrpcs.h +include/ptclib/qchannel.h +include/ptclib/random.h +include/ptclib/rfc1155.h +include/ptclib/shttpsvc.h +include/ptclib/snmp.h +include/ptclib/sockagg.h +include/ptclib/socks.h +include/ptclib/telnet.h +include/ptclib/url.h +include/ptclib/vsdl.h +include/ptclib/vxml.h +include/ptclib/xmpp.h +include/ptclib/xmpp_c2s.h +include/ptclib/xmpp_muc.h +include/ptclib/xmpp_roster.h +include/ptlib.h +include/ptlib/MacMainIf.h +include/ptlib/args.h +include/ptlib/array.h +include/ptlib/channel.h +include/ptlib/conchan.h +include/ptlib/config.h +include/ptlib/contain.h +include/ptlib/contain.inl +include/ptlib/critsec.h +include/ptlib/devplugin.h +include/ptlib/dict.h +include/ptlib/dynalink.h +include/ptlib/ethsock.h +include/ptlib/file.h +include/ptlib/filepath.h +include/ptlib/icmpsock.h +include/ptlib/indchan.h +include/ptlib/int64.h +include/ptlib/ipdsock.h +include/ptlib/ipsock.h +include/ptlib/ipxsock.h +include/ptlib/lists.h +include/ptlib/mail.h +include/ptlib/mutex.h +include/ptlib/notifier.h +include/ptlib/notifier_ext.h +include/ptlib/object.h +include/ptlib/osutil.inl +include/ptlib/pdirect.h +include/ptlib/pfactory.h +include/ptlib/pipechan.h +include/ptlib/plugin.h +include/ptlib/pluginmgr.h +include/ptlib/pprocess.h +include/ptlib/psharedptr.h +include/ptlib/pstring.h +include/ptlib/psync.h +include/ptlib/ptime.h +include/ptlib/qos.h +include/ptlib/remconn.h +include/ptlib/safecoll.h +include/ptlib/semaphor.h +include/ptlib/serchan.h +include/ptlib/sfile.h +include/ptlib/smartptr.h +include/ptlib/socket.h +include/ptlib/sockets.h +include/ptlib/sound.h +include/ptlib/spxsock.h +include/ptlib/svcproc.h +include/ptlib/syncpoint.h +include/ptlib/syncthrd.h +include/ptlib/tcpsock.h +include/ptlib/textfile.h +include/ptlib/thread.h +include/ptlib/timeint.h +include/ptlib/timer.h +include/ptlib/udpsock.h +include/ptlib/unix/ptlib/beaudio.h +include/ptlib/unix/ptlib/bevideo.h +include/ptlib/unix/ptlib/channel.h +include/ptlib/unix/ptlib/conchan.h +include/ptlib/unix/ptlib/config.h +include/ptlib/unix/ptlib/contain.h +include/ptlib/unix/ptlib/critsec.h +include/ptlib/unix/ptlib/dynalink.h +include/ptlib/unix/ptlib/ethsock.h +include/ptlib/unix/ptlib/file.h +include/ptlib/unix/ptlib/filepath.h +include/ptlib/unix/ptlib/icmpsock.h +include/ptlib/unix/ptlib/ipdsock.h +include/ptlib/unix/ptlib/ipsock.h +include/ptlib/unix/ptlib/maccoreaudio.h +include/ptlib/unix/ptlib/mutex.h +include/ptlib/unix/ptlib/pdirect.h +include/ptlib/unix/ptlib/pipechan.h +include/ptlib/unix/ptlib/pmachdep.h +include/ptlib/unix/ptlib/pprocess.h +include/ptlib/unix/ptlib/ptime.h +include/ptlib/unix/ptlib/ptlib.inl +include/ptlib/unix/ptlib/remconn.h +include/ptlib/unix/ptlib/resampler.h +include/ptlib/unix/ptlib/semaphor.h +include/ptlib/unix/ptlib/serchan.h +include/ptlib/unix/ptlib/sfile.h +include/ptlib/unix/ptlib/shmvideo.h +include/ptlib/unix/ptlib/socket.h +include/ptlib/unix/ptlib/sound.h +include/ptlib/unix/ptlib/svcproc.h +include/ptlib/unix/ptlib/syncpoint.h +include/ptlib/unix/ptlib/tcpsock.h +include/ptlib/unix/ptlib/textfile.h +include/ptlib/unix/ptlib/thread.h +include/ptlib/unix/ptlib/timeint.h +include/ptlib/unix/ptlib/timer.h +include/ptlib/unix/ptlib/udpsock.h +include/ptlib/unix/ptlib/video.h +include/ptlib/unix/ptlib/videoio.h +include/ptlib/vconvert.h +include/ptlib/video.h +include/ptlib/videoio.h +include/ptlib/videoio1394dc.h +lib/libpt.so +lib/libpt.so.2 +lib/libpt.so.2.3 +lib/libpt.so.2.3-beta1 +lib/libpt_s.a +lib/pkgconfig/ptlib.pc +lib/ptlib-2.3.1/devices/sound/oss_pwplugin.so +lib/ptlib-2.3.1/devices/videoinput/v4l2_pwplugin.so +share/ptlib/version.h +share/ptlib/make/common.mak +share/ptlib/make/lib.mak +share/ptlib/make/plugins.mak +share/ptlib/make/ptbuildopts.mak +share/ptlib/make/ptlib-config +share/ptlib/make/ptlib.mak +share/ptlib/make/unix.mak +@dirrm share/ptlib/make +@dirrm share/ptlib +@dirrm lib/ptlib-2.3.1/devices/videoinput +@dirrm lib/ptlib-2.3.1/devices/sound +@dirrm lib/ptlib-2.3.1/devices +@dirrm lib/ptlib-2.3.1 +@dirrm include/ptlib/unix/ptlib +@dirrm include/ptlib/unix +@dirrm include/ptlib +@dirrm include/ptclib diff --git a/devel/ptlib/buildlink3.mk b/devel/ptlib/buildlink3.mk new file mode 100644 index 00000000000..62f8f6bf488 --- /dev/null +++ b/devel/ptlib/buildlink3.mk @@ -0,0 +1,23 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +PTLIB_BUILDLINK3_MK:= ${PTLIB_BUILDLINK3_MK}+ + +.if !empty(BUILDLINK_DEPTH:M+) +BUILDLINK_DEPENDS+= ptlib +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nptlib} +BUILDLINK_PACKAGES+= ptlib +BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}ptlib + +.if !empty(PTLIB_BUILDLINK3_MK:M+) +BUILDLINK_API_DEPENDS.ptlib+= ptlib>=2.3.0 +BUILDLINK_ABI_DEPENDS.ptlib?= ptlib>=2.3.0 +BUILDLINK_PKGSRCDIR.ptlib?= ../../devel/ptlib +.endif # PTLIB_BUILDLINK3_MK + +.include "../../security/openssl/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/devel/ptlib/distinfo b/devel/ptlib/distinfo new file mode 100644 index 00000000000..ca96a061b1e --- /dev/null +++ b/devel/ptlib/distinfo @@ -0,0 +1,17 @@ +$NetBSD: distinfo,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +SHA1 (ptlib-snapshot-20080907.tar.gz) = 60f398886de64efba3d85054bab2e63342265e0e +RMD160 (ptlib-snapshot-20080907.tar.gz) = eac6fde099180239d497c3736fdd169b06efd4dd +Size (ptlib-snapshot-20080907.tar.gz) = 9630016 bytes +SHA1 (patch-aa) = 9fb1f106554314eb5e27a961bc1318945afe6318 +SHA1 (patch-ab) = 379e578421a6d302a700bddd02f6cbb588c425e1 +SHA1 (patch-ac) = b0cb79c86fb0cf3182d08a33ad48a3f9becc9c20 +SHA1 (patch-ad) = 04504e7549709f4936dc2c791b0fbcc425781c08 +SHA1 (patch-ae) = 92d140bd9536837186a03a3d3230bbb207df0ae4 +SHA1 (patch-af) = 468d365c6deeca71a985533fbe6855861551e662 +SHA1 (patch-ag) = 1590773a7cf8448e4e3f5dde1e9853195de75163 +SHA1 (patch-ah) = e2612c09f253af3fe9a66d0624a7524e95f7e2d9 +SHA1 (patch-ai) = 47a7d53e52f5a28b0f25baaf1782a4152e6c6927 +SHA1 (patch-ba) = 056a69dc2358eab34a3e5913a535cf02ce832974 +SHA1 (patch-bb) = 14d6237ffb5003e0e8fde4ad71f0062f2e546720 +SHA1 (patch-bc) = 503faaf484d310d2bed51b211182245eb9542a83 diff --git a/devel/ptlib/patches/patch-aa b/devel/ptlib/patches/patch-aa new file mode 100644 index 00000000000..cd4d1f97b44 --- /dev/null +++ b/devel/ptlib/patches/patch-aa @@ -0,0 +1,18 @@ +$NetBSD: patch-aa,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- plugins/configure.orig 2008-09-02 17:00:35.000000000 -0400 ++++ plugins/configure 2008-09-08 15:29:37.000000000 -0400 +@@ -4449,10 +4449,13 @@ + enable_v4l2=yes + fi + ++OSTYPE="$(uname -s)" + + if test "${enable_v4l2}z" = "yesz" ; then + if test "${OSTYPE}z" = "solaris2.11z"; then + VIDEODEV="sys/videodev2.h" ++ elif test "${OSTYPE}z" = "NetBSDz"; then ++ VIDEODEV="sys/videoio.h" + else + VIDEODEV="linux/videodev2.h" + fi diff --git a/devel/ptlib/patches/patch-ab b/devel/ptlib/patches/patch-ab new file mode 100644 index 00000000000..20405001649 --- /dev/null +++ b/devel/ptlib/patches/patch-ab @@ -0,0 +1,16 @@ +$NetBSD: patch-ab,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- src/ptlib/unix/osutil.cxx.orig 2008-09-08 15:33:05.000000000 -0400 ++++ src/ptlib/unix/osutil.cxx 2008-09-08 15:33:59.000000000 -0400 +@@ -85,6 +85,11 @@ + #include <sys/param.h> + #include <sys/mount.h> + ++#if defined(P_NETBSD) ++#include <sys/statvfs.h> ++#define statfs statvfs ++#endif ++ + #elif defined(P_HPUX9) + #define P_USE_LANGINFO + diff --git a/devel/ptlib/patches/patch-ac b/devel/ptlib/patches/patch-ac new file mode 100644 index 00000000000..d634f26d623 --- /dev/null +++ b/devel/ptlib/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- src/ptlib/unix/tlib.cxx.orig 2008-09-08 15:34:39.000000000 -0400 ++++ src/ptlib/unix/tlib.cxx 2008-09-08 15:34:54.000000000 -0400 +@@ -400,7 +400,7 @@ + { + if (PProcessInstance != NULL) { + PWaitAndSignal m(PProcessInstance->threadMutex); +- PThread & thread = PProcessInstance->activeThreads[(unsigned)id]; ++ PThread & thread = PProcessInstance->activeThreads[(uintptr_t)id]; + return thread.GetThreadName(); + } + return psprintf("%08x", id); diff --git a/devel/ptlib/patches/patch-ad b/devel/ptlib/patches/patch-ad new file mode 100644 index 00000000000..ae4a0ab72a0 --- /dev/null +++ b/devel/ptlib/patches/patch-ad @@ -0,0 +1,49 @@ +$NetBSD: patch-ad,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- src/ptlib/unix/tlibthrd.cxx.orig 2008-09-08 15:35:17.000000000 -0400 ++++ src/ptlib/unix/tlibthrd.cxx 2008-09-08 15:36:17.000000000 -0400 +@@ -216,7 +216,7 @@ + { + PWaitAndSignal m(threadMutex); + +- if (!activeThreads.Contains((unsigned)id)) ++ if (!activeThreads.Contains((uintptr_t)id)) + return PFalse; + + return pthread_kill(id, sig) == 0; +@@ -254,7 +254,7 @@ + #endif + + ((PProcess *)this)->activeThreads.DisallowDeleteObjects(); +- ((PProcess *)this)->activeThreads.SetAt((unsigned)PX_threadId, this); ++ ((PProcess *)this)->activeThreads.SetAt((uintptr_t)PX_threadId, this); + + PX_firstTimeStart = PFalse; + } +@@ -366,7 +366,7 @@ + PAssertPTHREAD(pthread_create, (&PX_threadId, &threadAttr, PX_ThreadStart, this)); + + // put the thread into the thread list +- process.activeThreads.SetAt((unsigned)PX_threadId, this); ++ process.activeThreads.SetAt((uintptr_t)PX_threadId, this); + if (process.activeThreads.GetSize() > highWaterMark) + newHighWaterMark = highWaterMark = process.activeThreads.GetSize(); + +@@ -689,7 +689,7 @@ + { + PProcess & process = PProcess::Current(); + process.threadMutex.Wait(); +- PThread * thread = process.activeThreads.GetAt((unsigned)pthread_self()); ++ PThread * thread = process.activeThreads.GetAt((uintptr_t)pthread_self()); + process.threadMutex.Signal(); + return thread; + } +@@ -830,7 +830,7 @@ + } + + // remove this thread from the active thread list +- process.activeThreads.SetAt((unsigned)id, NULL); ++ process.activeThreads.SetAt((uintptr_t)id, NULL); + + // delete the thread if required, note this is done this way to avoid + // a race condition, the thread ID cannot be zeroed before the if! diff --git a/devel/ptlib/patches/patch-ae b/devel/ptlib/patches/patch-ae new file mode 100644 index 00000000000..f4ca507bc7c --- /dev/null +++ b/devel/ptlib/patches/patch-ae @@ -0,0 +1,29 @@ +$NetBSD: patch-ae,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- src/ptlib/common/osutils.cxx.orig 2008-09-08 15:37:04.000000000 -0400 ++++ src/ptlib/common/osutils.cxx 2008-09-08 15:37:31.000000000 -0400 +@@ -2091,21 +2091,21 @@ + PReadWriteMutex::Nest * PReadWriteMutex::GetNest() const + { + PWaitAndSignal mutex(nestingMutex); +- return nestedThreads.GetAt(POrdinalKey((PINDEX)PThread::GetCurrentThreadId())); ++ return nestedThreads.GetAt(POrdinalKey((INT)PThread::GetCurrentThreadId())); + } + + + void PReadWriteMutex::EndNest() + { + nestingMutex.Wait(); +- nestedThreads.RemoveAt(POrdinalKey((PINDEX)PThread::GetCurrentThreadId())); ++ nestedThreads.RemoveAt(POrdinalKey((INT)PThread::GetCurrentThreadId())); + nestingMutex.Signal(); + } + + + PReadWriteMutex::Nest & PReadWriteMutex::StartNest() + { +- POrdinalKey threadId = (PINDEX)PThread::GetCurrentThreadId(); ++ POrdinalKey threadId = (INT)PThread::GetCurrentThreadId(); + + nestingMutex.Wait(); + diff --git a/devel/ptlib/patches/patch-af b/devel/ptlib/patches/patch-af new file mode 100644 index 00000000000..3419c32da71 --- /dev/null +++ b/devel/ptlib/patches/patch-af @@ -0,0 +1,51 @@ +$NetBSD: patch-af,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- make/unix.mak.orig 2008-09-07 17:00:16.000000000 -0400 ++++ make/unix.mak 2008-09-08 15:40:22.000000000 -0400 +@@ -196,7 +196,7 @@ + ifeq ($(OSTYPE),OpenBSD) + + ifeq ($(MACHTYPE),x86) +-STDCCFLAGS += -m486 ++#STDCCFLAGS += -m486 + endif + + LDLIBS += -lossaudio +@@ -220,6 +220,14 @@ + + STDCCFLAGS += -I$(UNIX_INC_DIR) -I$(PTLIBDIR)/include + ++ifeq ($(MACHTYPE),x86_64) ++STDCCFLAGS += -DP_64BIT ++endif ++ ++ifndef PROG ++STDCCFLAGS += -fPIC -DPIC ++endif # PROG ++ + # enable the USE_PTH line to compile using pth + # enable the USE_NATIVE_THREADS line to compile using native threads + # enable the USE_UNPROVEN_THREADS line to compile using unproven threads +@@ -601,11 +609,11 @@ + LIB_TYPE = + else + LIB_SUFFIX = a +-LIB_TYPE = _s ++LIB_TYPE = + endif # P_SHAREDLIB + + ifndef INSTALL_DIR +-INSTALL_DIR = /usr/local ++INSTALL_DIR = ${PREFIX} + endif + + ifndef INSTALLBIN_DIR +@@ -670,7 +678,7 @@ + ifeq ($(OSTYPE),solaris) + OPTCCFLAGS += -O3 + else +- OPTCCFLAGS += -Os ++ OPTCCFLAGS += + endif + else + OPTCCFLAGS += -O2 diff --git a/devel/ptlib/patches/patch-ag b/devel/ptlib/patches/patch-ag new file mode 100644 index 00000000000..109b6e917a4 --- /dev/null +++ b/devel/ptlib/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- src/ptlib/common/pvidchan.cxx.orig 2008-09-08 15:45:54.000000000 -0400 ++++ src/ptlib/common/pvidchan.cxx 2008-09-08 15:46:09.000000000 -0400 +@@ -70,7 +70,7 @@ + + PString PVideoChannel::GetDefaultDevice(Directions /*dir*/) + { +-#if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) ++#if defined(P_FREEBSD) || defined(P_OPENBSD) + return "/dev/bktr0"; + #endif + diff --git a/devel/ptlib/patches/patch-ah b/devel/ptlib/patches/patch-ah new file mode 100644 index 00000000000..b74d1e8cac4 --- /dev/null +++ b/devel/ptlib/patches/patch-ah @@ -0,0 +1,136 @@ +$NetBSD: patch-ah,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- src/ptlib/unix/socket.cxx.orig 2008-09-12 08:46:26.000000000 -0400 ++++ src/ptlib/unix/socket.cxx 2008-09-12 08:57:49.000000000 -0400 +@@ -67,6 +67,10 @@ + #include <netinet/if_ether.h> + #endif + ++#if defined(P_NETBSD) ++#include <ifaddrs.h> ++#endif ++ + #define ROUNDUP(a) \ + ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) + +@@ -462,6 +466,12 @@ + PBYTEArray buffer; + struct ifconf ifConf; + ++#if defined(P_NETBSD) ++ struct ifaddrs *ifap, *ifa; ++ ++ PAssert(getifaddrs(&ifap) == 0, "getifaddrs failed"); ++ for (ifa = ifap; ifa; ifa = ifa->ifa_next) { ++#else + #ifdef SIOCGIFNUM + int ifNum; + PAssert(::ioctl(sock.GetHandle(), SIOCGIFNUM, &ifNum) >= 0, "could not do ioctl for ifNum"); +@@ -477,8 +487,14 @@ + ifreq * ifName = ifConf.ifc_req; + + while (ifName < ifEndList) { ++#endif + struct ifreq ifReq; ++#if !defined(P_NETBSD) + memcpy(&ifReq, ifName, sizeof(ifreq)); ++#else ++ memset(&ifReq, 0, sizeof(ifReq)); ++ strncpy(ifReq.ifr_name, ifa->ifa_name, sizeof(ifReq.ifr_name) - 1); ++#endif + + if (ioctl(sock.GetHandle(), SIOCGIFFLAGS, &ifReq) >= 0) { + int flags = ifReq.ifr_flags; +@@ -490,14 +506,16 @@ + } + } + +-#if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_VXWORKS) || defined(P_RTEMS) || defined(P_QNX) ++#if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_MACOSX) || defined(P_VXWORKS) || defined(P_RTEMS) || defined(P_QNX) + // move the ifName pointer along to the next ifreq entry + ifName = (struct ifreq *)((char *)ifName + _SIZEOF_ADDR_IFREQ(*ifName)); +-#else ++#elif !defined(P_NETBSD) + ifName++; + #endif + } ++#if !defined(P_NETBSD) + } ++#endif + + return PFalse; + } +@@ -1554,7 +1572,13 @@ + PBYTEArray buffer; + struct ifconf ifConf; + ++#if defined(P_NETBSD) ++ struct ifaddrs *ifap, *ifa; ++ ++ PAssert(getifaddrs(&ifap) == 0, "getifaddrs failed"); + ++ for (ifa = ifap; ifa; ifa = ifa->ifa_next) { ++#else + // HERE + #if defined(SIOCGIFNUM) + int ifNum; +@@ -1570,9 +1594,14 @@ + void * ifEndList = (char *)ifConf.ifc_req + ifConf.ifc_len; + ifreq * ifName = ifConf.ifc_req; + while (ifName < ifEndList) { +- ++#endif + struct ifreq ifReq; ++#if !defined(P_NETBSD) + memcpy(&ifReq, ifName, sizeof(ifreq)); ++#else ++ memset(&ifReq, 0, sizeof(ifReq)); ++ strncpy(ifReq.ifr_name, ifa->ifa_name, sizeof(ifReq.ifr_name) - 1); ++#endif + + if (ioctl(sock.GetHandle(), SIOCGIFFLAGS, &ifReq) >= 0) { + int flags = ifReq.ifr_flags; +@@ -1588,13 +1617,23 @@ + } + #endif + ++#if defined(P_NETBSD) ++ memset(&ifReq, 0, sizeof(ifReq)); ++ strncpy(ifReq.ifr_name, ifa->ifa_name, sizeof(ifReq.ifr_name) - 1); ++#else + memcpy(&ifReq, ifName, sizeof(ifreq)); ++#endif + if (ioctl(sock.GetHandle(), SIOCGIFADDR, &ifReq) >= 0) { + + sockaddr_in * sin = (sockaddr_in *)&ifReq.ifr_addr; + PIPSocket::Address addr = sin->sin_addr; + ++#if defined(P_NETBSD) ++ memset(&ifReq, 0, sizeof(ifReq)); ++ strncpy(ifReq.ifr_name, ifa->ifa_name, sizeof(ifReq.ifr_name) - 1); ++#else + memcpy(&ifReq, ifName, sizeof(ifreq)); ++#endif + if (ioctl(sock.GetHandle(), SIOCGIFNETMASK, &ifReq) >= 0) { + PIPSocket::Address mask = + #ifndef __BEOS__ +@@ -1632,15 +1671,17 @@ + } + } + +-#if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) || defined(P_MACOSX) || defined(P_VXWORKS) || defined(P_RTEMS) || defined(P_QNX) ++#if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_MACOSX) || defined(P_VXWORKS) || defined(P_RTEMS) || defined(P_QNX) + // move the ifName pointer along to the next ifreq entry + ifName = (struct ifreq *)((char *)ifName + _SIZEOF_ADDR_IFREQ(*ifName)); +-#else ++#elif !defined(P_NETBSD) + ifName++; + #endif + + } ++#if !defined(P_NETBSD) + } ++#endif + return PTrue; + } + diff --git a/devel/ptlib/patches/patch-ai b/devel/ptlib/patches/patch-ai new file mode 100644 index 00000000000..b0663f6cf82 --- /dev/null +++ b/devel/ptlib/patches/patch-ai @@ -0,0 +1,40 @@ +$NetBSD: patch-ai,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- ./src/ptclib/pdns.cxx.orig 2008-09-12 09:00:39.000000000 -0400 ++++ ./src/ptclib/pdns.cxx 2008-09-12 09:02:36.000000000 -0400 +@@ -195,13 +195,20 @@ + PDNS_RECORD * results, + void *) + { ++#if defined(P_NETBSD) ++ struct __res_state myRes; ++#endif + if (results == NULL) + return -1; + + *results = NULL; + + #if P_HAS_RES_NINIT ++#if defined(P_NETBSD) ++ res_ninit(&myRes); ++#else + res_ninit(&_res); ++#endif + #else + res_init(); + GetDNSMutex().Wait(); +@@ -213,7 +220,13 @@ + } reply; + + #if P_HAS_RES_NINIT +- int replyLen = res_nsearch(&_res, service, C_IN, requestType, (BYTE *)&reply, sizeof(reply)); ++ int replyLen = res_nsearch( ++#if defined(P_NETBSD) ++ &myRes, ++#else ++ &_res, ++#endif ++ service, C_IN, requestType, (BYTE *)&reply, sizeof(reply)); + #else + int replyLen = res_search(service, C_IN, requestType, (BYTE *)&reply, sizeof(reply)); + GetDNSMutex().Signal(); diff --git a/devel/ptlib/patches/patch-ba b/devel/ptlib/patches/patch-ba new file mode 100644 index 00000000000..82e1cb88eea --- /dev/null +++ b/devel/ptlib/patches/patch-ba @@ -0,0 +1,30 @@ +$NetBSD: patch-ba,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- plugins/vidinput_v4l2/vidinput_v4l2.h.orig 2008-06-04 17:00:30.000000000 -0400 ++++ plugins/vidinput_v4l2/vidinput_v4l2.h 2008-09-08 15:43:23.000000000 -0400 +@@ -31,7 +31,6 @@ + #define _PVIDEOIOV4L2 + + +-#include <sys/mman.h> + #include <sys/time.h> + + #include <ptlib.h> +@@ -39,12 +38,16 @@ + #include <ptlib/vconvert.h> + #include <ptclib/delaychan.h> + +-#ifdef SOLARIS ++#if defined(SOLARIS) + #include <sys/videodev2.h> ++#elif defined(__OpenBSD__) || defined(__NetBSD__) ++#include <sys/videoio.h> + #else + #include <linux/videodev.h> + #endif + ++#include <sys/mman.h> ++ + #ifndef V4L2_PIX_FMT_SBGGR8 + #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ + #endif diff --git a/devel/ptlib/patches/patch-bb b/devel/ptlib/patches/patch-bb new file mode 100644 index 00000000000..4b64484f628 --- /dev/null +++ b/devel/ptlib/patches/patch-bb @@ -0,0 +1,13 @@ +$NetBSD: patch-bb,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- plugins/vidinput_v4l2/vidinput_names.cxx.orig 2008-09-08 17:55:13.000000000 -0400 ++++ plugins/vidinput_v4l2/vidinput_names.cxx 2008-09-08 17:55:33.000000000 -0400 +@@ -36,7 +36,7 @@ + if (!devdir.Open()) + return; + +-#ifdef SOLARIS ++#if defined(SOLARIS) || defined(__NetBSD__) + int devnum = 0; + do { + PString filename = devdir.GetEntryName(); diff --git a/devel/ptlib/patches/patch-bc b/devel/ptlib/patches/patch-bc new file mode 100644 index 00000000000..c1abe536682 --- /dev/null +++ b/devel/ptlib/patches/patch-bc @@ -0,0 +1,13 @@ +$NetBSD: patch-bc,v 1.1.1.1 2008/09/12 13:18:26 jmcneill Exp $ + +--- plugins/sound_oss/sound_oss.cxx.orig 2008-09-08 18:02:28.000000000 -0400 ++++ plugins/sound_oss/sound_oss.cxx 2008-09-08 18:03:34.000000000 -0400 +@@ -145,7 +145,7 @@ + // When adding these to the 'dsp' string array, only the first one + // found is used. + +-#if !defined P_NETBSD || !defined P_OPENBSD ++#if !defined P_NETBSD && !defined P_OPENBSD + // Look for dsp + if (filename == "dsp") { + dsp.SetAt(0, devname); |