Import pwlib-1.10.3

PWLib is a moderately large class library that has its genesis many
years ago as a method to product applications to run on both Microsoft
Windows and Unix X-Window systems.
Since then the system has grown to include many classes that assist in
writing complete multi-platform applications. Classes for I/O
portability, multi-threading portability, aid in producing unix daemons
and NT services portably and all sorts of internet protocols were added
over the years. The library now also supports the open H323 project.

ok jasper@
This commit is contained in:
ajacoutot 2007-04-25 11:12:26 +00:00
parent 9fd891c45e
commit 27d300f747
18 changed files with 778 additions and 0 deletions

93
devel/pwlib/Makefile Normal file
View File

@ -0,0 +1,93 @@
# $OpenBSD: Makefile,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
SHARED_ONLY= Yes
COMMENT= "portable Windows library"
DISTNAME= pwlib-v1_10_3
PKGNAME= pwlib-1.10.3
CATEGORIES= devel
EXTRACT_SUFX= -src-tar.gz
SHARED_LIBS= pt 1.10 # 1.10.3
HOMEPAGE= http://www.voxgratia.org/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# Mozilla Public License
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}/releases/
WANTLIB= crypto expat ossaudio ssl
BUILD_DEPENDS= ::devel/bison
WRKDIST= ${WRKDIR}/${DISTNAME:S/-/_/}
NO_REGRESS= Yes
USE_GMAKE= Yes
ALL_TARGET= optshared
MAKE_ENV+= STDCCFLAGS="${STDCCFLAGS} -I${LOCALBASE}/include" \
CC=${CC} CPLUS=${CXX}
CONFIGURE_STYLE=gnu
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --enable-plugins \
--enable-oss \
--enable-bsdvideo \
--disable-alsa \
--disable-avc \
--disable-dc
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "sparc64"
CFLAGS+= -fPIC
.endif
.if ${MACHINE_ARCH} == "powerpc"
BROKEN= "Compiles on powerpc but it does not work"
.endif
FLAVORS= ldap sasl sdl
FLAVOR?=
.if ${FLAVOR:L:Mldap}
LIB_DEPENDS+= lber.>=9,ldap.>=9,ldap_r.>=9::databases/openldap
CONFIGURE_ARGS+=--enable-openldap
.else
CONFIGURE_ARGS+=--disable-openldap
.endif
.if ${FLAVOR:L:Msasl}
LIB_DEPENDS+= sasl2.>=2::security/cyrus-sasl2
CONFIGURE_ARGS+=--enable-sasl
.else
CONFIGURE_ARGS+=--disable-sasl
.endif
.if ${FLAVOR:L:Msdl}
LIB_DEPENDS+= SDL.>=7::devel/sdl
CONFIGURE_ARGS+=--enable-sdl
.else
CONFIGURE_ARGS+=--disable-sdl
.endif
do-extract:
@tar xzf ${FULLDISTDIR}/${DISTNAME}${EXTRACT_SUFX} -C ${WRKDIR}
pre-configure:
@perl -pi -e 's,MAJOR_VERSION.*,MAJOR_VERSION ${LIBpt_VERSION:R},g;' \
-e 's,MINOR_VERSION.*,MINOR_VERSION ${LIBpt_VERSION:E},g' \
${WRKSRC}/version.h
@perl -pi -e 's,!!PREFIX!!,${PREFIX},g' \
${WRKSRC}/src/ptlib/common/pluginmgr.cxx \
${WRKSRC}/make/ptlib-config.in \
${WRKSRC}/make/unix.mak
.include <bsd.port.mk>

5
devel/pwlib/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (pwlib-v1_10_3-src-tar.gz) = CC61e09S5NSHII3hjYPM+A==
RMD160 (pwlib-v1_10_3-src-tar.gz) = phAw0ISrIyJY1A8EvBF+R4a5f8k=
SHA1 (pwlib-v1_10_3-src-tar.gz) = yPJtB322Bk6AmQ30xtNmqmOHkNs=
SHA256 (pwlib-v1_10_3-src-tar.gz) = undeB5inpUzaC/fuf829K+vhSzKbaro5CL1BAICgvUI=
SIZE (pwlib-v1_10_3-src-tar.gz) = 2079871

View File

@ -0,0 +1,38 @@
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
--- Makefile.in.orig Wed Apr 6 12:10:54 2005
+++ Makefile.in Tue Apr 24 13:05:07 2007
@@ -254,23 +254,7 @@ install:
$(DESTDIR)$(PREFIX)/share/pwlib/make ; \
do mkdir -p $$dir ; chmod 755 $$dir ; \
done )
- $(INSTALL) -m 444 lib/$(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@ $(DESTDIR)$(LIBDIR)
- (cd $(DESTDIR)$(LIBDIR) ; \
- rm -f $(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@ ; \
- ln -sf $(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@ $(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@ \
- )
- (cd $(DESTDIR)$(LIBDIR) ; \
- rm -f $(PTLIB_FILE).@MAJOR_VERSION@ ; \
- ln -sf $(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@ $(PTLIB_FILE).@MAJOR_VERSION@ \
- )
- (cd $(DESTDIR)$(LIBDIR) ; \
- rm -f $(PTLIB_FILE) ; \
- ln -sf $(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@.@BUILD_NUMBER@ $(PTLIB_FILE) \
- )
- (cd $(DESTDIR)$(LIBDIR); \
- rm -f libpt.@SHAREDLIBEXT@ ; \
- ln -sf $(PTLIB_FILE) libpt.@SHAREDLIBEXT@ \
- )
+ $(INSTALL) -m 444 lib/$(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@ $(DESTDIR)$(LIBDIR)
ifeq (1, $(HAS_PLUGINS))
cd plugins/pwlib/device/ ; \
( for dir in ./* ;\
@@ -295,8 +279,7 @@ endif
(for fn in make/*.mak ; \
do $(INSTALL) -m 444 $$fn $(DESTDIR)$(PREFIX)/share/pwlib/make; \
done)
- $(INSTALL) -m 755 make/ptlib-config $(DESTDIR)$(PREFIX)/share/pwlib/make/
- (cd $(DESTDIR)$(PREFIX)/bin; rm -f ptlib-config ; ln -snf ../share/pwlib/make/ptlib-config ptlib-config)
+ $(INSTALL) -m 755 make/ptlib-config $(DESTDIR)$(PREFIX)/bin/
uninstall:
rm -rf $(DESTDIR)$(PREFIX)/include/ptlib \

View File

@ -0,0 +1,36 @@
$OpenBSD: patch-configure,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
--- configure.orig Wed Feb 22 12:53:28 2006
+++ configure Mon Apr 23 16:59:26 2007
@@ -1951,7 +1951,7 @@ LIBDIR=${libdir}
MAJOR_VERSION=`cat ${PWLIBDIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
MINOR_VERSION=`cat ${PWLIBDIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
BUILD_NUMBER=`cat ${PWLIBDIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
-PWLIB_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}"
+PWLIB_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}"
@@ -4567,8 +4567,12 @@ else
fi
if test ${HAS_PTHREADS} = yes ; then
- ENDLDLIBS="$ENDLDLIBS -lpthread"
- STDCCFLAGS="$STDCCFLAGS -D_REENTRANT"
+ if test ${OSTYPE} = OpenBSD ; then
+ ENDLDLIBS="$ENDLDLIBS -pthread"
+ else
+ ENDLDLIBS="$ENDLDLIBS -lpthread"
+ fi
+ STDCCFLAGS="$STDCCFLAGS -D_REENTRANT"
else
if test ${OSTYPE} = FreeBSD ; then
HAS_PTHREADS=yes
@@ -4789,7 +4793,7 @@ cat >>conftest.$ac_ext <<_ACEOF
int
main ()
{
-pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+pthread_mutexattr_t attr; pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
;
return 0;
}

View File

@ -0,0 +1,60 @@
$OpenBSD: patch-make_lib_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
--- make/lib.mak.orig Sun Sep 25 12:51:23 2005
+++ make/lib.mak Mon Apr 23 14:35:56 2007
@@ -131,6 +131,9 @@ ifneq ($(OSTYPE),Darwin)
LIBNAME_MIN = $(LIBNAME_MAJ).$(MINOR_VERSION)
ifeq ($(BUILD_TYPE),.)
LIBNAME_PAT = $(LIBNAME_MIN).$(BUILD_NUMBER)
+ ifeq ($(OSTYPE),OpenBSD)
+ LIBNAME_PAT = $(LIBNAME_MIN)
+ endif
else
LIBNAME_PAT = $(LIBNAME_MIN)-$(BUILD_TYPE)$(BUILD_NUMBER)
endif
@@ -151,7 +154,7 @@ CLEAN_FILES += $(LIBDIR)/$(LIBNAME_PAT) $(LIBDIR)/$(LI
ifneq ($(P_SHAREDLIB),1)
STATIC_LIB_FILE = $(LIBDIR)/$(LIB_FILENAME)
else
- STATIC_LIB_FILE = $(LIBDIR)/$(subst .$(LIB_SUFFIX),_s.$(STATICLIBEXT),$(LIB_FILENAME))
+ STATIC_LIB_FILE = $(LIBDIR)/$(subst .$(LIB_SUFFIX),.$(STATICLIBEXT),$(LIB_FILENAME))
endif
$(LIBDIR)/$(LIB_FILENAME) : $(TARGETLIB)
@@ -178,7 +181,7 @@ ifeq ($(P_SHAREDLIB),1)
endif
ifneq ($(OSTYPE), QNX)
- ifneq (,$(findstring $(OSTYPE),FreeBSD OpenBSDs))
+ ifneq (,$(findstring $(OSTYPE),FreeBSD OpenBSD))
ifdef P_PTHREADS
EXTLIBS += -pthread
endif
@@ -207,10 +210,16 @@ ifeq ($(P_SHAREDLIB),1)
LD = $(CPLUS)
endif
+ ifeq ($(MACHTYPE),x86_64)
+ LDSOOPTS += -fPIC
+ endif
+
$(LIBDIR)/$(LIB_FILENAME): $(LIBDIR)/$(LIBNAME_PAT)
+ifneq ($(OSTYPE),OpenBSD)
cd $(LIBDIR) ; rm -f $(LIB_FILENAME) ; ln -sf $(LIBNAME_PAT) $(LIB_FILENAME)
cd $(LIBDIR) ; rm -f $(LIBNAME_MAJ) ; ln -sf $(LIBNAME_PAT) $(LIBNAME_MAJ)
cd $(LIBDIR) ; rm -f $(LIBNAME_MIN) ; ln -sf $(LIBNAME_PAT) $(LIBNAME_MIN)
+endif
$(LIBDIR)/$(LIBNAME_PAT): $(STATIC_LIB_FILE)
@echo EXTLIBS = $(EXTLIBS)
@@ -220,9 +229,11 @@ ifeq ($(P_SHAREDLIB),1)
install: $(LIBDIR)/$(LIBNAME_PAT)
$(INSTALL) $(LIBDIR)/$(LIBNAME_PAT) $(INSTALLLIB_DIR)/$(LIBNAME_PAT)
+ifneq ($(OSTYPE),OpenBSD)
ln -sf $(LIBNAME_PAT) $(INSTALLLIB_DIR)/$(LIB_FILENAME)
ln -sf $(LIBNAME_PAT) $(INSTALLLIB_DIR)/$(LIBNAME_MAJ)
ln -sf $(LIBNAME_PAT) $(INSTALLLIB_DIR)/$(LIBNAME_MIN)
+endif
endif # P_SHAREDLIB

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-make_ptbuildopts_mak_in,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
--- make/ptbuildopts.mak.in.orig Tue Apr 10 15:12:28 2007
+++ make/ptbuildopts.mak.in Tue Apr 10 15:12:57 2007
@@ -13,7 +13,7 @@ MACHTYPE = @MACHTYPE@
OSTYPE = @OSTYPE@
OSRELEASE = @OSRELEASE@
-STDCCFLAGS += @STDCCFLAGS@
+STDCCFLAGS += @STDCCFLAGS@ -I@INSTALLPREFIX@/include
STDCXXFLAGS += @STDCXXFLAGS@
OPTSTDCCFLAGS += @OPTSTDCCFLAGS@
LDFLAGS += @LDFLAGS@

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-make_ptlib-config_in,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
--- make/ptlib-config.in.orig Sun Sep 18 13:05:36 2005
+++ make/ptlib-config.in Wed Apr 11 18:13:29 2007
@@ -5,10 +5,10 @@
#
VERSION="@PWLIB_VERSION@"
-CCFLAGS="@STDCCFLAGS@"
+CCFLAGS="@STDCCFLAGS@ -I@INSTALLPREFIX@/include"
LDFLAGS="@LDFLAGS@"
LIBS="@ENDLDLIBS@ -lpt"
-LIBDIR="@LIBDIR@"
+LIBDIR="!!PREFIX!!/lib"
PWINSTDIR="@INSTALLPREFIX@/share/pwlib"
MACHTYPE="@MACHTYPE@"
OSTYPE="@OSTYPE@"

View File

@ -0,0 +1,65 @@
$OpenBSD: patch-make_unix_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
--- make/unix.mak.orig Tue Jan 17 19:57:17 2006
+++ make/unix.mak Mon Apr 16 20:52:38 2007
@@ -443,7 +443,7 @@ endif # P_SHAREDLIB
STATIC_LIBS := libstdc++.a libg++.a libm.a libc.a
-SYSLIBDIR := $(shell $(PWLIBDIR)/make/ptlib-config --libdir)
+SYSLIBDIR := $(shell !!PREFIX!!/bin/ptlib-config --libdir)
endif # linux
@@ -470,7 +470,7 @@ endif # FreeBSD
ifeq ($(OSTYPE),OpenBSD)
ifeq ($(MACHTYPE),x86)
-STDCCFLAGS += -m486
+#STDCCFLAGS += -m486
endif
LDLIBS += -lossaudio
@@ -492,7 +492,7 @@ endif
LDLIBS += -lossaudio
-STDCCFLAGS += -I$(UNIX_INC_DIR) -I$(PWLIBDIR)/include
+STDCCFLAGS += -I$(PWLIBDIR)/include
# enable the USE_PTH line to compile using pth
# enable the USE_NATIVE_THREADS line to compile using native threads
@@ -897,11 +897,11 @@ LIB_SUFFIX = $(SHAREDLIBEXT)
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
@@ -939,8 +939,10 @@ endif
PW_LIBDIR = $(PWLIBDIR)/lib
# set name of the PT library
-PTLIB_BASE = pt_$(PLATFORM_TYPE)_$(OBJ_SUFFIX)
+PTLIB_BASE = pt
+ifndef PTLIB_FILE
PTLIB_FILE = lib$(PTLIB_BASE)$(LIB_TYPE).$(LIB_SUFFIX)
+endif
PT_OBJBASE = obj_$(PLATFORM_TYPE)_$(OBJDIR_SUFFIX)
PT_OBJDIR = $(PW_LIBDIR)/$(PT_OBJBASE)
@@ -970,7 +972,7 @@ ifneq ($(OSTYPE),Darwin)
ifeq ($(OSTYPE),solaris)
OPTCCFLAGS += -xO3
else
- OPTCCFLAGS += -Os
+ OPTCCFLAGS +=
endif
else
OPTCCFLAGS += -O2

View File

@ -0,0 +1,65 @@
$OpenBSD: patch-plugins_configure,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
--- plugins/configure.orig Fri Jan 27 04:43:25 2006
+++ plugins/configure Mon Apr 9 09:48:02 2007
@@ -3300,7 +3300,7 @@ echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5
-echo $ECHO_N "checking sys/soundcard.h usability... $ECHO_C" >&6
+echo $ECHO_N "checking soundcard.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3308,7 +3308,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <sys/soundcard.h>
+#include <soundcard.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -3343,18 +3343,18 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
-echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5
-echo $ECHO_N "checking sys/soundcard.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking soundcard.h presence" >&5
+echo $ECHO_N "checking soundcard.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/soundcard.h>
+#include <soundcard.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -3415,7 +3415,7 @@ _ASBOX
;;
esac
echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5
-echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6
+echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6
if test "${ac_cv_header_sys_soundcard_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -4304,8 +4304,8 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <dev/ic/bt8xx.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-plugins_sound_oss_sound_oss_cxx,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
--- plugins/sound_oss/sound_oss.cxx.orig Mon Apr 16 20:35:31 2007
+++ plugins/sound_oss/sound_oss.cxx Mon Apr 16 20:37:28 2007
@@ -383,7 +383,7 @@ static void CollectSoundDevices(PDirectory devdir, POr
// When adding these to the 'dsp' string array, only the first one
// found is used.
-#ifndef P_NETBSD
+#ifndef P_OPENBSD
// Look for dsp
if (filename == "dsp") {
dsp.SetAt(0, devname);

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-plugins_vidinput_bsd_vidinput_bsd_cxx,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
--- plugins/vidinput_bsd/vidinput_bsd.cxx.orig Tue Aug 9 11:08:09 2005
+++ plugins/vidinput_bsd/vidinput_bsd.cxx Thu Apr 12 14:37:30 2007
@@ -122,12 +122,11 @@
#pragma implementation "vidinput_bsd.h"
#include "vidinput_bsd.h"
-#include <sys/mman.h>
PCREATE_VIDINPUT_PLUGIN(BSDCAPTURE);
///////////////////////////////////////////////////////////////////////////////
-// PVideoInputDevice_BSDCAPTURE
+// PVideoInputBSDCAPTURE
PVideoInputDevice_BSDCAPTURE::PVideoInputDevice_BSDCAPTURE()
{
@@ -142,6 +141,7 @@ PVideoInputDevice_BSDCAPTURE::~PVideoInputDevice_BSDCA
BOOL PVideoInputDevice_BSDCAPTURE::Open(const PString & devName, BOOL startImmediate)
{
+ if (IsOpen())
Close();
deviceName = devName;
@@ -235,10 +235,14 @@ PStringList PVideoInputDevice_BSDCAPTURE::GetInputDevi
{
PStringList list;
- list.AppendString("/dev/bktr0");
- list.AppendString("/dev/bktr1");
- list.AppendString("/dev/meteor0");
- list.AppendString("/dev/meteor1");
+ if (PFile::Exists("/dev/bktr0"))
+ list.AppendString("/dev/bktr0");
+ if (PFile::Exists("/dev/bktr1"))
+ list.AppendString("/dev/bktr1");
+ if (PFile::Exists("/dev/meteor0"))
+ list.AppendString("/dev/meteor0");
+ if (PFile::Exists("/dev/meteor1"))
+ list.AppendString("/dev/meteor1");
return list;
}

View File

@ -0,0 +1,91 @@
$OpenBSD: patch-plugins_vidinput_bsd_vidinput_bsd_h,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
--- plugins/vidinput_bsd/vidinput_bsd.h.orig Tue Aug 9 11:08:09 2005
+++ plugins/vidinput_bsd/vidinput_bsd.h Thu Apr 12 15:13:32 2007
@@ -2,6 +2,14 @@
//#include <sys/mman.h>
//#include <sys/time.h>
+#ifndef _PVIDEOIOBSDCAPTURE
+
+#define _PVIDEOIOBSDCAPTURE
+
+#ifdef __GNUC__
+#pragma interface
+#endif
+
#include <ptlib.h>
#include <ptlib/videoio.h>
#include <ptlib/vconvert.h>
@@ -10,6 +18,8 @@
#include <machine/ioctl_meteor.h>
#endif
+#include <sys/mman.h>
+
#if defined(P_OPENBSD) || defined(P_NETBSD)
#if P_OPENBSD >= 200105
#include <dev/ic/bt8xx.h>
@@ -20,20 +30,25 @@
#endif
#endif
-class PVideoInputDevice_BSDCAPTURE: public PVideoInputDevice
+#if !P_USE_INLINES
+#include <ptlib/contain.inl>
+#endif
+
+
+class PVideoInputDevice_BSDCAPTURE : public PVideoInputDevice
{
+ PCLASSINFO(PVideoInputDevice_BSDCAPTURE, PVideoInputDevice);
+
public:
PVideoInputDevice_BSDCAPTURE();
~PVideoInputDevice_BSDCAPTURE();
- static PStringList GetInputDeviceNames();
+ BOOL Open(
+ const PString &deviceName,
+ BOOL startImmediate = TRUE
+ );
- PStringList GetDeviceNames() const
- { return GetInputDeviceNames(); }
-
- BOOL Open(const PString &deviceName, BOOL startImmediate);
-
BOOL IsOpen();
BOOL Close();
@@ -43,11 +58,21 @@ class PVideoInputDevice_BSDCAPTURE: public PVideoInput
BOOL IsCapturing();
+ static PStringList GetInputDeviceNames();
+
+ PStringList GetDeviceNames() const
+ { return GetInputDeviceNames(); }
+
PINDEX GetMaxFrameBytes();
- BOOL GetFrame(PBYTEArray & frame);
- BOOL GetFrameData(BYTE*, PINDEX*);
- BOOL GetFrameDataNoDelay(BYTE*, PINDEX*);
+ BOOL GetFrameData(
+ BYTE * buffer,
+ PINDEX * bytesReturned = NULL
+ );
+ BOOL GetFrameDataNoDelay(
+ BYTE * buffer,
+ PINDEX * bytesReturned = NULL
+ );
BOOL GetFrameSizeLimits(unsigned int&, unsigned int&,
unsigned int&, unsigned int&);
@@ -99,3 +124,5 @@ class PVideoInputDevice_BSDCAPTURE: public PVideoInput
int mmap_size;
};
+
+#endif

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_ptclib_pssl_cxx,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
--- src/ptclib/pssl.cxx.orig Wed Nov 30 13:47:41 2005
+++ src/ptclib/pssl.cxx Mon Apr 9 11:36:16 2007
@@ -769,7 +769,7 @@ PSSLDiffieHellman::~PSSLDiffieHellman()
DH_free(dh);
}
-#ifdef __BEOS__
+#if defined(__BEOS__) || (defined(__OpenBSD__) && !defined(__PPC__))
// 2/21/04 Yuri Kiryanov - fix for compiler choke on BeOS for usage of
// SSL function d2i_DHparams_bio below in PSSLDiffieHellman::Load
#undef d2i_DHparams_bio

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_ptlib_common_pluginmgr_cxx,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
--- src/ptlib/common/pluginmgr.cxx.orig Wed Apr 11 15:07:18 2007
+++ src/ptlib/common/pluginmgr.cxx Wed Apr 11 15:07:44 2007
@@ -120,7 +120,7 @@
# ifdef _WIN32
# define P_DEFAULT_PLUGIN_DIR ".;C:\\PWLIB_PLUGINS"
# else
-# define P_DEFAULT_PLUGIN_DIR ".:/usr/lib/pwlib"
+# define P_DEFAULT_PLUGIN_DIR ".:!!PREFIX!!/lib/pwlib"
# endif
#endif

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_ptlib_unix_ossaix_cxx,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
--- src/ptlib/unix/ossaix.cxx.orig Mon Apr 16 20:37:38 2007
+++ src/ptlib/unix/ossaix.cxx Mon Apr 16 20:38:01 2007
@@ -281,7 +281,7 @@ PStringArray PSoundChannel::GetDeviceNames(Directions
PString PSoundChannel::GetDefaultDevice(Directions /*dir*/)
{
- return "/dev/dsp";
+ return "/dev/audio";
}

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_ptlib_unix_tlibthrd_cxx,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
--- src/ptlib/unix/tlibthrd.cxx.orig Wed Apr 18 17:23:12 2007
+++ src/ptlib/unix/tlibthrd.cxx Wed Apr 18 17:23:51 2007
@@ -1739,7 +1739,7 @@ PTimedMutex::PTimedMutex()
#if P_HAS_RECURSIVE_MUTEX
pthread_mutexattr_t attr;
PAssertPTHREAD(pthread_mutexattr_init, (&attr));
- PAssertPTHREAD(pthread_mutexattr_settype, (&attr, PTHREAD_MUTEX_RECURSIVE_NP));
+ PAssertPTHREAD(pthread_mutexattr_settype, (&attr, PTHREAD_MUTEX_RECURSIVE));
PAssertPTHREAD(pthread_mutex_init, (&mutex, &attr));
PAssertPTHREAD(pthread_mutexattr_destroy, (&attr));
#else
@@ -1754,7 +1754,7 @@ PTimedMutex::PTimedMutex(const PTimedMutex & /*mut*/)
#if P_HAS_RECURSIVE_MUTEX
pthread_mutexattr_t attr;
PAssertPTHREAD(pthread_mutexattr_init, (&attr));
- PAssertPTHREAD(pthread_mutexattr_settype, (&attr, PTHREAD_MUTEX_RECURSIVE_NP));
+ PAssertPTHREAD(pthread_mutexattr_settype, (&attr, PTHREAD_MUTEX_RECURSIVE));
PAssertPTHREAD(pthread_mutex_init, (&mutex, &attr));
PAssertPTHREAD(pthread_mutexattr_destroy, (&attr));
#else

8
devel/pwlib/pkg/DESCR Normal file
View File

@ -0,0 +1,8 @@
PWLib is a moderately large class library that has its genesis many
years ago as a method to product applications to run on both Microsoft
Windows and Unix X-Window systems.
Since then the system has grown to include many classes that assist in
writing complete multi-platform applications. Classes for I/O
portability, multi-threading portability, aid in producing unix daemons
and NT services portably and all sorts of internet protocols were added
over the years. The library now also supports the open H323 project.

176
devel/pwlib/pkg/PLIST Normal file
View File

@ -0,0 +1,176 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
bin/ptlib-config
include/ptbuildopts.h
include/ptclib/
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/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/pasn.h
include/ptclib/pdns.h
include/ptclib/pils.h
include/ptclib/pldap.h
include/ptclib/pnat.h
include/ptclib/psasl.h
include/ptclib/psnmp.h
include/ptclib/psoap.h
include/ptclib/pssl.h
include/ptclib/pstun.h
include/ptclib/ptts.h
include/ptclib/pwavfile.h
include/ptclib/pxml.h
include/ptclib/pxmlrpc.h
include/ptclib/pxmlrpcs.h
include/ptclib/qchannel.h
include/ptclib/random.h
include/ptclib/shttpsvc.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/
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/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/
include/ptlib/unix/ptlib/
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/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 lib/libpt.so.${LIBpt_VERSION}
lib/pwlib/
lib/pwlib/devices/
lib/pwlib/devices/sound/
lib/pwlib/devices/sound/oss_pwplugin.so
lib/pwlib/devices/videoinput/
lib/pwlib/devices/videoinput/bsdvideo_pwplugin.so
share/pwlib/
share/pwlib/make/
share/pwlib/make/common.mak
share/pwlib/make/defaultgui.mak
share/pwlib/make/gui.mak
share/pwlib/make/lib.mak
share/pwlib/make/motif.mak
share/pwlib/make/plugins.mak
share/pwlib/make/ptbuildopts.mak
share/pwlib/make/ptlib.mak
share/pwlib/make/pwlib.mak
share/pwlib/make/qt.mak
share/pwlib/make/unix.mak
share/pwlib/make/xlib.mak