- major upgrade to pwlib-1.12.0

- rework the way we handle shared_libs versus ptlib version so it stays
compatible with upstream
- install version.h
- dtmf decoder patch from FreeBSD
This commit is contained in:
ajacoutot 2008-03-15 17:38:07 +00:00
parent 3cea14cecc
commit 7de7eeae8e
18 changed files with 221 additions and 262 deletions

View File

@ -1,28 +1,29 @@
# $OpenBSD: Makefile,v 1.5 2007/09/16 02:53:11 merdely Exp $
# $OpenBSD: Makefile,v 1.6 2008/03/15 17:38:07 ajacoutot Exp $
SHARED_ONLY= Yes
COMMENT= portable Windows library
DISTNAME= pwlib-v1_10_3
PKGNAME= pwlib-1.10.3p1
V= 1_12_0
DISTNAME= ptlib-v${V}
PKGNAME= pwlib-${V:S/_/./g}
CATEGORIES= devel
EXTRACT_SUFX= -src-tar.gz
EXTRACT_SUFX= -src.tar.gz
SHARED_LIBS= pt 1.10 # 1.10.3
SHARED_LIBS= pt 2.0 # 1.12.0
HOMEPAGE= http://www.voxgratia.org/
HOMEPAGE= http://www.h323plus.org/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# Mozilla Public License
# MPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}/releases/
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=h323plus/}
WANTLIB= crypto expat ossaudio ssl
@ -36,6 +37,8 @@ ALL_TARGET= optshared
MAKE_ENV+= STDCCFLAGS="${STDCCFLAGS} -I${X11BASE}/include \
-I${LOCALBASE}/include" \
CC=${CC} CPLUS=${CXX}
MAKE_FLAGS= LIB_MAJOR_VERSION=${LIBpt_VERSION:R} \
LIB_MINOR_VERSION=${LIBpt_VERSION:E}
CONFIGURE_STYLE=gnu
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
@ -43,9 +46,11 @@ CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
CONFIGURE_ARGS= --enable-plugins \
--enable-oss \
--enable-bsdvideo \
--disable-sunaudio \
--disable-alsa \
--disable-avc \
--disable-dc
--disable-dc \
--disable-odbc
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "sparc64"
CFLAGS+= -fPIC
@ -79,16 +84,13 @@ CONFIGURE_ARGS+=--enable-sdl
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
post-install:
${INSTALL_DATA} ${WRKSRC}/version.h ${PREFIX}/share/pwlib
.include <bsd.port.mk>

View File

@ -1,5 +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
MD5 (ptlib-v1_12_0-src.tar.gz) = Z13Jy+PzTJrtB+yGUP7P1Q==
RMD160 (ptlib-v1_12_0-src.tar.gz) = jLrVnV9H09CZQSzQXYWZzY64mzU=
SHA1 (ptlib-v1_12_0-src.tar.gz) = wBdfB8iK4rRvzSkYAmCfm2stmhk=
SHA256 (ptlib-v1_12_0-src.tar.gz) = 4VD4RgtkusPJqQcD24HCarPkAtGeXNe568nZdqjwU18=
SIZE (ptlib-v1_12_0-src.tar.gz) = 4316808

View File

@ -1,7 +1,7 @@
$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:
$OpenBSD: patch-Makefile_in,v 1.2 2008/03/15 17:38:07 ajacoutot Exp $
--- Makefile.in.orig Fri Oct 19 08:22:39 2007
+++ Makefile.in Fri Jan 4 14:04:44 2008
@@ -257,23 +257,7 @@ install:
$(DESTDIR)$(PREFIX)/share/pwlib/make ; \
do mkdir -p $$dir ; chmod 755 $$dir ; \
done )
@ -22,11 +22,11 @@ $OpenBSD: patch-Makefile_in,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
- rm -f libpt.@SHAREDLIBEXT@ ; \
- ln -sf $(PTLIB_FILE) libpt.@SHAREDLIBEXT@ \
- )
+ $(INSTALL) -m 444 lib/$(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@ $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 444 lib/$(PTLIB_FILE).$(LIB_MAJOR_VERSION).$(LIB_MINOR_VERSION) $(DESTDIR)$(LIBDIR)
ifeq (1, $(HAS_PLUGINS))
cd plugins/pwlib/device/ ; \
( for dir in ./* ;\
@@ -295,8 +279,7 @@ endif
@@ -298,8 +282,7 @@ endif
(for fn in make/*.mak ; \
do $(INSTALL) -m 444 $$fn $(DESTDIR)$(PREFIX)/share/pwlib/make; \
done)

View File

@ -1,16 +1,28 @@
$OpenBSD: patch-configure,v 1.2 2007/04/27 13:38:09 ajacoutot Exp $
--- configure.orig Wed Feb 22 12:53:28 2006
+++ configure Fri Apr 27 15:28:49 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}"
$OpenBSD: patch-configure,v 1.3 2008/03/15 17:38:07 ajacoutot Exp $
--- configure.orig Fri Oct 19 08:22:39 2007
+++ configure Mon Mar 3 12:14:54 2008
@@ -2163,7 +2163,7 @@ case "$target_cpu" in
x86 | i686 | i586 | i486 | i386 ) MACHTYPE=x86
;;
- x86_64) MACHTYPE=x86_64 ;
+ x86_64|amd64) MACHTYPE=x86_64 ;
P_64BIT=1 ;
LIB64=1 ;
;;
@@ -2175,6 +2175,11 @@ case "$target_cpu" in
sparc ) MACHTYPE=sparc ;
;;
+ sparc64 ) MACHTYPE=sparc ;
+ P_64BIT=1 ;
+ LIB64=1 ;
+ ;;
+
powerpc ) MACHTYPE=ppc ;
;;
@@ -4567,8 +4567,12 @@ else
@@ -4754,8 +4759,12 @@ else
fi
if test ${HAS_PTHREADS} = yes ; then
@ -25,16 +37,7 @@ $OpenBSD: patch-configure,v 1.2 2007/04/27 13:38:09 ajacoutot Exp $
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;
}
@@ -5495,19 +5499,9 @@ fi
@@ -5691,19 +5700,9 @@ fi

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-include_ptclib_dtmf_h,v 1.1 2008/03/15 17:38:07 ajacoutot Exp $
--- include/ptclib/dtmf.h.orig Mon Mar 3 16:37:36 2008
+++ include/ptclib/dtmf.h Mon Mar 3 16:38:25 2008
@@ -69,6 +69,7 @@ class PDTMFDecoder : public PObject
public:
PDTMFDecoder();
PString Decode(const short * sampleData, PINDEX numSamples);
+ PString Decode(const void * buf, PINDEX bytes);
protected:
enum {

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-make_common_mak,v 1.1 2008/03/15 17:38:07 ajacoutot Exp $
--- make/common.mak.orig Wed Mar 5 09:34:59 2008
+++ make/common.mak Wed Mar 5 09:35:13 2008
@@ -384,7 +384,7 @@ TARGET_LIBS = $(PWLIBDIR)/lib/$(PTLIB_FILE)
# distinguish betweek building and using pwlib
ifeq (,$(wildcard $(PWLIBDIR)/src))
-TARGET_LIBS = $(SYSLIBDIR)/$(PTLIB_FILE)
+TARGET_LIBS = # empty
endif
$(TARGET): $(OBJS) $(TARGET_LIBS)

View File

@ -1,8 +1,23 @@
$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)
$OpenBSD: patch-make_lib_mak,v 1.2 2008/03/15 17:38:07 ajacoutot Exp $
--- make/lib.mak.orig Fri Oct 19 08:22:33 2007
+++ make/lib.mak Mon Mar 3 14:23:51 2008
@@ -126,11 +126,22 @@
# Added copyright notice
#
+ifndef (LIB_MAJOR_VERSION)
+ LIB_MAJOR_VERSION = $(MAJOR_VERSION)
+endif
+
+ifndef (LIB_MINOR_VERSION)
+ LIB_MINOR_VERSION = $(MINOR_VERSION)
+endif
+
ifneq ($(OSTYPE),Darwin)
- LIBNAME_MAJ = $(LIB_FILENAME).$(MAJOR_VERSION)
- LIBNAME_MIN = $(LIBNAME_MAJ).$(MINOR_VERSION)
+ LIBNAME_MAJ = $(LIB_FILENAME).$(LIB_MAJOR_VERSION)
+ LIBNAME_MIN = $(LIBNAME_MAJ).$(LIB_MINOR_VERSION)
ifeq ($(BUILD_TYPE),.)
LIBNAME_PAT = $(LIBNAME_MIN).$(BUILD_NUMBER)
+ ifeq ($(OSTYPE),OpenBSD)
@ -11,7 +26,7 @@ $OpenBSD: patch-make_lib_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
else
LIBNAME_PAT = $(LIBNAME_MIN)-$(BUILD_TYPE)$(BUILD_NUMBER)
endif
@@ -151,7 +154,7 @@ CLEAN_FILES += $(LIBDIR)/$(LIBNAME_PAT) $(LIBDIR)/$(LI
@@ -151,7 +162,7 @@ CLEAN_FILES += $(LIBDIR)/$(LIBNAME_PAT) $(LIBDIR)/$(LI
ifneq ($(P_SHAREDLIB),1)
STATIC_LIB_FILE = $(LIBDIR)/$(LIB_FILENAME)
else
@ -20,7 +35,7 @@ $OpenBSD: patch-make_lib_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
endif
$(LIBDIR)/$(LIB_FILENAME) : $(TARGETLIB)
@@ -178,7 +181,7 @@ ifeq ($(P_SHAREDLIB),1)
@@ -178,7 +189,7 @@ ifeq ($(P_SHAREDLIB),1)
endif
ifneq ($(OSTYPE), QNX)
@ -29,7 +44,7 @@ $OpenBSD: patch-make_lib_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
ifdef P_PTHREADS
EXTLIBS += -pthread
endif
@@ -207,10 +210,16 @@ ifeq ($(P_SHAREDLIB),1)
@@ -207,10 +218,16 @@ ifeq ($(P_SHAREDLIB),1)
LD = $(CPLUS)
endif
@ -46,7 +61,7 @@ $OpenBSD: patch-make_lib_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
$(LIBDIR)/$(LIBNAME_PAT): $(STATIC_LIB_FILE)
@echo EXTLIBS = $(EXTLIBS)
@@ -220,9 +229,11 @@ ifeq ($(P_SHAREDLIB),1)
@@ -220,9 +237,11 @@ ifeq ($(P_SHAREDLIB),1)
install: $(LIBDIR)/$(LIBNAME_PAT)
$(INSTALL) $(LIBDIR)/$(LIBNAME_PAT) $(INSTALLLIB_DIR)/$(LIBNAME_PAT)

View File

@ -1,12 +0,0 @@
$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

@ -1,7 +1,7 @@
$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
$OpenBSD: patch-make_unix_mak,v 1.2 2008/03/15 17:38:07 ajacoutot Exp $
--- make/unix.mak.orig Fri Oct 19 08:22:33 2007
+++ make/unix.mak Fri Jan 4 14:04:44 2008
@@ -454,7 +454,7 @@ endif # P_SHAREDLIB
STATIC_LIBS := libstdc++.a libg++.a libm.a libc.a
@ -10,7 +10,7 @@ $OpenBSD: patch-make_unix_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
endif # linux
@@ -470,7 +470,7 @@ endif # FreeBSD
@@ -481,7 +481,7 @@ endif # FreeBSD
ifeq ($(OSTYPE),OpenBSD)
ifeq ($(MACHTYPE),x86)
@ -19,7 +19,7 @@ $OpenBSD: patch-make_unix_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
endif
LDLIBS += -lossaudio
@@ -492,7 +492,7 @@ endif
@@ -503,7 +503,7 @@ endif
LDLIBS += -lossaudio
@ -28,7 +28,7 @@ $OpenBSD: patch-make_unix_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
# 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)
@@ -908,11 +908,11 @@ LIB_SUFFIX = $(SHAREDLIBEXT)
LIB_TYPE =
else
LIB_SUFFIX = a
@ -42,7 +42,7 @@ $OpenBSD: patch-make_unix_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
endif
ifndef INSTALLBIN_DIR
@@ -939,8 +939,10 @@ endif
@@ -950,8 +950,10 @@ endif
PW_LIBDIR = $(PWLIBDIR)/lib
# set name of the PT library
@ -54,9 +54,9 @@ $OpenBSD: patch-make_unix_mak,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
PT_OBJBASE = obj_$(PLATFORM_TYPE)_$(OBJDIR_SUFFIX)
PT_OBJDIR = $(PW_LIBDIR)/$(PT_OBJBASE)
@@ -970,7 +972,7 @@ ifneq ($(OSTYPE),Darwin)
@@ -983,7 +985,7 @@ ifneq ($(OSTYPE),Darwin)
ifeq ($(OSTYPE),solaris)
OPTCCFLAGS += -xO3
OPTCCFLAGS += -O3
else
- OPTCCFLAGS += -Os
+ OPTCCFLAGS +=

View File

@ -1,7 +1,7 @@
$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
$OpenBSD: patch-plugins_configure,v 1.2 2008/03/15 17:38:07 ajacoutot Exp $
--- plugins/configure.orig Fri Oct 19 08:22:33 2007
+++ plugins/configure Fri Jan 4 14:04:45 2008
@@ -3479,7 +3479,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
@ -10,7 +10,7 @@ $OpenBSD: patch-plugins_configure,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3308,7 +3308,7 @@ cat confdefs.h >>conftest.$ac_ext
@@ -3487,7 +3487,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -19,7 +19,7 @@ $OpenBSD: patch-plugins_configure,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
_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
@@ -3523,18 +3523,18 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
@ -43,7 +43,7 @@ $OpenBSD: patch-plugins_configure,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -3415,7 +3415,7 @@ _ASBOX
@@ -3595,7 +3595,7 @@ _ASBOX
;;
esac
echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5
@ -52,7 +52,7 @@ $OpenBSD: patch-plugins_configure,v 1.1.1.1 2007/04/25 11:12:27 ajacoutot Exp $
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
@@ -4485,8 +4485,8 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <dev/ic/bt8xx.h>
_ACEOF

View File

@ -1,12 +0,0 @@
$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

@ -1,44 +0,0 @@
$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

@ -1,91 +1,21 @@
$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>
$OpenBSD: patch-plugins_vidinput_bsd_vidinput_bsd_h,v 1.2 2008/03/15 17:38:07 ajacoutot Exp $
--- plugins/vidinput_bsd/vidinput_bsd.h.orig Fri Jan 4 16:04:11 2008
+++ plugins/vidinput_bsd/vidinput_bsd.h Fri Jan 4 16:04:20 2008
@@ -6,8 +6,6 @@
#pragma interface
#endif
+#ifndef _PVIDEOIOBSDCAPTURE
+
+#define _PVIDEOIOBSDCAPTURE
+
+#ifdef __GNUC__
+#pragma interface
+#endif
+
-#include <sys/mman.h>
-
#include <ptlib.h>
#include <ptlib/videoio.h>
#include <ptlib/vconvert.h>
@@ -10,6 +18,8 @@
@@ -21,6 +19,8 @@
#include <machine/ioctl_meteor.h>
# endif
#endif
+#include <sys/mman.h>
+
+#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,69 @@
$OpenBSD: patch-src_ptclib_dtmf_cxx,v 1.1 2008/03/15 17:38:07 ajacoutot Exp $
--- src/ptclib/dtmf.cxx.orig Fri Oct 19 08:22:33 2007
+++ src/ptclib/dtmf.cxx Tue Mar 4 11:01:18 2008
@@ -121,6 +121,65 @@ PDTMFDecoder::PDTMFDecoder()
}
+/* From FreeBSD ports */
+PString PDTMFDecoder::Decode(const void *buf, PINDEX bytes)
+{
+ int x;
+ int s, kk;
+ int c, d, f, n;
+ short *buffer = (short *)buf;
+
+ PINDEX numSamples = bytes >> 1;
+
+ PString keyString;
+
+ PINDEX pos;
+ for (pos = 0; pos < numSamples; pos++) {
+
+ /* Read (and scale) the next 16 bit sample */
+ x = ((int)(*buffer++)) / (32768/FSC);
+
+ /* Input amplitude */
+ if (x > 0)
+ ia += (x - ia) / 128;
+ else
+ ia += (-x - ia) / 128;
+
+ /* For each tone */
+ s = 0;
+ for(kk = 0; kk < 8; kk++) {
+
+ /* Turn the crank */
+ c = (P2 * (x - k[kk])) / FSC;
+ d = x + c;
+ f = (p1[kk] * (d - h[kk])) / FSC;
+ n = x - k[kk] - c;
+ k[kk] = h[kk] + f;
+ h[kk] = f + d;
+
+ /* Detect and Average */
+ if (n > 0)
+ y[kk] += (n - y[kk]) / 64;
+ else
+ y[kk] += (-n - y[kk]) / 64;
+
+ /* Threshold */
+ if (y[kk] > FSC/10 && y[kk] > ia)
+ s |= 1 << kk;
+ }
+
+ /* Hysteresis and noise supressor */
+ if (s != so) {
+ nn = 0;
+ so = s;
+ } else if (nn++ == 520 && s < 256 && key[s] != '?') {
+ PTRACE(3,"DTMF\tDetected '" << key[s] << "' in PCM-16 stream");
+ keyString += key[s];
+ }
+ }
+ return keyString;
+}
+
PString PDTMFDecoder::Decode(const short * sampleData, PINDEX numSamples)
{
int x;

View File

@ -1,12 +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()
$OpenBSD: patch-src_ptclib_pssl_cxx,v 1.2 2008/03/15 17:38:07 ajacoutot Exp $
--- src/ptclib/pssl.cxx.orig Fri Jan 4 14:17:19 2008
+++ src/ptclib/pssl.cxx Fri Jan 4 14:17:32 2008
@@ -794,7 +794,7 @@ PSSLDiffieHellman::~PSSLDiffieHellman()
DH_free(dh);
}
-#ifdef __BEOS__
+#if defined(__BEOS__) || (defined(__OpenBSD__) && !defined(__PPC__))
-#if defined(__BEOS__) || defined(__APPLE__) || defined(__OpenBSD__)
+#if defined(__BEOS__) || defined(__APPLE__) || (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
// 5/26/06 Hannes Friederich - Mac OS X seems to need that fix too...

View File

@ -1,7 +1,7 @@
$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 @@
$OpenBSD: patch-src_ptlib_common_pluginmgr_cxx,v 1.2 2008/03/15 17:38:07 ajacoutot Exp $
--- src/ptlib/common/pluginmgr.cxx.orig Fri Oct 19 08:22:32 2007
+++ src/ptlib/common/pluginmgr.cxx Fri Jan 4 14:04:45 2008
@@ -168,7 +168,7 @@
# ifdef _WIN32
# define P_DEFAULT_PLUGIN_DIR ".;C:\\PWLIB_PLUGINS"
# else

View File

@ -1,21 +0,0 @@
$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

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/04/25 11:12:26 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.2 2008/03/15 17:38:07 ajacoutot Exp $
bin/ptlib-config
include/ptbuildopts.h
include/ptclib/
@ -11,6 +11,7 @@ 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
@ -21,24 +22,32 @@ 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
@ -60,6 +69,7 @@ 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
@ -137,6 +147,7 @@ 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
@ -163,14 +174,9 @@ 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
share/pwlib/version.h