Major update to ptlib-2.10.3.

Some clue from espie@

Needed to work on an Ekiga update.
There are still some rought edges but they'll be worked in-tree.

This and the upcoming VoIP ports commits wouldn't have been possible
without Miod's soft couch ;-)
This commit is contained in:
ajacoutot 2011-10-26 16:59:09 +00:00
parent 3ee843f464
commit a730dfbf59
25 changed files with 268 additions and 278 deletions

View File

@ -1,13 +1,12 @@
# $OpenBSD: Makefile,v 1.9 2011/09/16 09:24:54 espie Exp $
# $OpenBSD: Makefile,v 1.10 2011/10/26 16:59:09 ajacoutot Exp $
SHARED_ONLY= Yes
COMMENT= portable tools library
DISTNAME= ptlib-2.6.7
REVISION= 0
DISTNAME= ptlib-2.10.3
SHARED_LIBS= pt 3.0 # 2.4.2
SHARED_LIBS= pt 4.0 # 2.10.3
EXTRACT_SUFX= .tar.bz2
@ -23,7 +22,8 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c crypto expat m sasl2 sndio ssl lber ldap ldap_r SDL
WANTLIB += SDL c crypto expat lber ldap ldap_r m sasl2 sndio ssl
WANTLIB += stdc++
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=opalvoip/}
@ -33,6 +33,8 @@ BUILD_DEPENDS= devel/bison \
LIB_DEPENDS= databases/openldap \
devel/sdl
ALL_TARGET= default
.include <bsd.own.mk>
.if !${COMPILER_VERSION:L:Mgcc4}
PATCH_LIST = patch-* gcc3-patch-*
@ -41,7 +43,6 @@ PATCH_LIST = patch-* gcc3-patch-*
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--with-plugin-installdir=ptlib \
--enable-appshare \
--enable-plugins \
--enable-bsdvideo \
--enable-sasl \
@ -53,36 +54,43 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--enable-v4l2 \
--enable-sndio \
--enable-openssl \
--disable-lua \
--disable-oss \
--disable-alsa \
--disable-avc \
--disable-dc \
--disable-odbc
--disable-odbc \
--disable-pulse
# XXX needs /proc/net/if_inet6
CONFIGURE_ARGS+=--disable-ipv6
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
OPENSSL_CFLAGS="-I/usr/include" \
OPENSSL_LIBS="-lssl -lcrypto -lm"
AUTOCONF_VERSION= 2.61
AUTOMAKE_VERSION= 1.9
# should be 2.66
AUTOCONF_VERSION= 2.67
AUTOMAKE_VERSION= 1.10
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/plugins
MAKE_FLAGS= MAJOR_VERSION=${LIBpt_VERSION:R} \
MINOR_VERSION=${LIBpt_VERSION:E}
MINOR_VERSION=${LIBpt_VERSION:E} \
LIB_SONAME=libpt.so.${LIBpt_VERSION} \
DEBUG_SONAME=libpt_d.so.${LIBpt_VERSION}
USE_GMAKE= Yes
NO_REGRESS= Yes
ALL_TARGET= optshared
post-patch:
post-extract:
@mkdir ${WRKSRC}/plugins/sound_sndio
@cp ${FILESDIR}/{Makefile,sound_sndio.*} ${WRKSRC}/plugins/sound_sndio
pre-configure:
${SUBST_CMD} ${WRKSRC}/make/common.mak \
${WRKSRC}/src/ptlib/common/pluginmgr.cxx \
${WRKSRC}/include/ptlib/pluginmgr.h
${WRKSRC}/make/unix.mak \
${WRKSRC}/src/ptlib/common/pluginmgr.cxx
cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} aclocal
cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \

View File

@ -1,5 +1,5 @@
MD5 (ptlib-2.6.7.tar.bz2) = NyebXPSqZIkOufOLRQDsbw==
RMD160 (ptlib-2.6.7.tar.bz2) = ufAEgFf1O7GGmXm+hl9brqgoAWI=
SHA1 (ptlib-2.6.7.tar.bz2) = +zdThmWZWCCnFOL+XiaFU5lUdOg=
SHA256 (ptlib-2.6.7.tar.bz2) = fdKCJf7dIRVNNImbIe5LbSfIjrGp+ZMcjmztKOjzuX8=
SIZE (ptlib-2.6.7.tar.bz2) = 3275152
MD5 (ptlib-2.10.3.tar.bz2) = S6j0fLjjAuk0+rZ/0GUELw==
RMD160 (ptlib-2.10.3.tar.bz2) = EKWuPj/0VGqGdxKsdFQUnF/Ffk4=
SHA1 (ptlib-2.10.3.tar.bz2) = 56TZ3EdhSofbA4vpXSiIv6TjbD4=
SHA256 (ptlib-2.10.3.tar.bz2) = iBFmij75ZXTReK4sd2Hb1u5seB4Dfb7qlF2pd5sxnpg=
SIZE (ptlib-2.10.3.tar.bz2) = 4131650

View File

@ -1,6 +1,3 @@
ifndef PWLIBDIR
PWLIBDIR = $(HOME)/pwlib
endif
PLUGIN_NAME = sndio
PLUGIN_FAMILY = device/sound

View File

@ -1,11 +1,11 @@
$OpenBSD: gcc3-patch-include_ptlib_safecoll_h,v 1.1 2010/05/11 07:23:23 espie Exp $
$OpenBSD: gcc3-patch-include_ptlib_safecoll_h,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
Make this build on gcc3.
(reversed commit from upstream SVN)
(revert commit from upstream SVN)
--- include/ptlib/safecoll.h.orig Tue May 19 11:49:40 2009
+++ include/ptlib/safecoll.h Mon Jun 22 15:21:19 2009
@@ -761,7 +761,7 @@ template <class T, class BaseClass = PSafePtrBase> cla
--- include/ptlib/safecoll.h.orig Fri May 7 06:42:29 2010
+++ include/ptlib/safecoll.h Sat Jun 26 16:40:52 2010
@@ -767,7 +767,7 @@ template <class T, class BaseClass = PSafePtrBase> cla
*/
PSafePtr & operator=(const PSafeCollection & safeCollection)
{
@ -14,7 +14,7 @@ Make this build on gcc3.
return *this;
}
@@ -797,7 +797,7 @@ template <class T, class BaseClass = PSafePtrBase> cla
@@ -803,7 +803,7 @@ template <class T, class BaseClass = PSafePtrBase> cla
*/
PSafePtr & operator=(PINDEX idx)
{
@ -23,7 +23,7 @@ Make this build on gcc3.
return *this;
}
//@}
@@ -806,15 +806,15 @@ template <class T, class BaseClass = PSafePtrBase> cla
@@ -812,15 +812,15 @@ template <class T, class BaseClass = PSafePtrBase> cla
//@{
/**Return the physical pointer to the object.
*/
@ -42,7 +42,7 @@ Make this build on gcc3.
/**Post-increment the pointer.
This requires that the pointer has been created with a PSafeCollection
@@ -822,8 +822,8 @@ template <class T, class BaseClass = PSafePtrBase> cla
@@ -828,8 +828,8 @@ template <class T, class BaseClass = PSafePtrBase> cla
*/
T * operator++(int)
{
@ -53,7 +53,7 @@ Make this build on gcc3.
return previous;
}
@@ -833,8 +833,8 @@ template <class T, class BaseClass = PSafePtrBase> cla
@@ -839,8 +839,8 @@ template <class T, class BaseClass = PSafePtrBase> cla
*/
T * operator++()
{
@ -64,7 +64,7 @@ Make this build on gcc3.
}
/**Post-decrement the pointer.
@@ -843,8 +843,8 @@ template <class T, class BaseClass = PSafePtrBase> cla
@@ -849,8 +849,8 @@ template <class T, class BaseClass = PSafePtrBase> cla
*/
T * operator--(int)
{
@ -75,7 +75,7 @@ Make this build on gcc3.
return previous;
}
@@ -854,8 +854,8 @@ template <class T, class BaseClass = PSafePtrBase> cla
@@ -860,8 +860,8 @@ template <class T, class BaseClass = PSafePtrBase> cla
*/
T * operator--()
{

View File

@ -1,17 +1,19 @@
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- Makefile.in.orig Tue Sep 22 17:09:47 2009
+++ Makefile.in Tue Sep 22 17:10:26 2009
@@ -92,12 +92,7 @@ install:
$(DESTDIR)$(PREFIX)/share/ptlib/make ; \
do mkdir -p $$dir ; chmod 755 $$dir ; \
$OpenBSD: patch-Makefile_in,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- Makefile.in.orig Wed Oct 26 10:24:43 2011
+++ Makefile.in Wed Oct 26 10:25:11 2011
@@ -119,6 +119,7 @@ install:
$(INSTALL) -m 444 $$lib $(DESTDIR)$(LIBDIR); \
fi ) \
done )
- $(INSTALL) -m 444 $(PT_LIBDIR)/$(LIB_SONAME) $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 444 $(PT_LIBDIR)/lib$(PTLIB_BASE)_s.a $(DESTDIR)$(LIBDIR)
- (cd $(DESTDIR)$(LIBDIR) ; \
- rm -f $(PTLIB_FILE) ; \
- ln -sf $(LIB_SONAME) $(PTLIB_FILE) \
- )
+ $(INSTALL) -m 444 $(PT_LIBDIR)/$(PTLIB_FILE).$(MAJOR_VERSION).$(MINOR_VERSION) $(DESTDIR)$(LIBDIR)
+ifneq ($(OSTYPE),OpenBSD)
( if test -e $(PT_LIBDIR)/$(LIB_SONAME); then \
(cd $(DESTDIR)$(LIBDIR) ; \
rm -f $(PTLIB_FILE) ; \
@@ -131,6 +132,7 @@ install:
ln -sf $(DEBUG_SONAME) $(PTLIB_DEBUG_FILE) \
) \
fi )
+endif
ifeq (1, $(HAS_PLUGINS))
if test -e $(PT_LIBDIR)/device/; then \
cd $(PT_LIBDIR)/device/; \

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure_ac,v 1.2 2010/05/31 05:28:06 ajacoutot Exp $
--- configure.ac.orig Thu May 27 08:35:59 2010
+++ configure.ac Mon May 31 06:53:37 2010
@@ -245,7 +245,7 @@ case "$target_os" in
$OpenBSD: patch-configure_ac,v 1.3 2011/10/26 16:59:09 ajacoutot Exp $
--- configure.ac.orig Fri Oct 14 08:55:01 2011
+++ configure.ac Sat Oct 22 11:17:14 2011
@@ -201,7 +201,7 @@ case "$target_os" in
openbsd* ) OSTYPE=OpenBSD ;
OS_TAG="P_OPENBSD" ;
OSRELEASE="`sysctl -n kern.osrevision`" ;
@ -10,19 +10,21 @@ $OpenBSD: patch-configure_ac,v 1.2 2010/05/31 05:28:06 ajacoutot Exp $
need_pragma=yes ;
AC_DEFINE(P_PTHREADS, 1, "PThreads found")
AC_CHECK_FUNC([swab], [AC_DEFINE([USE_SYSTEM_SWAB], [], [Use system swab()] )] )
@@ -340,7 +340,10 @@ case "$target_cpu" in
LIB64=1 ;
;;
@@ -308,8 +308,12 @@ case "$target_cpu" in
LIB64=1
;;
- sparc|sparc64 ) MACHTYPE=sparc ;
+ sparc ) MACHTYPE=sparc ;
+ ;;
- sparc | sparc64 )
+ sparc )
MACHTYPE=sparc
+ ;;
+
+ sparc64 ) MACHTYPE=sparc ;
P_64BIT=1 ;
LIB64=1 ;
;;
@@ -777,17 +780,17 @@ dnl MSWIN_DEFINE semaphore,P_HAS_SEMAPHORES
+ sparc64 )
+ MACHTYPE=sparc
P_64BIT=1
LIB64=1
;;
@@ -779,17 +783,17 @@ dnl MSWIN_DEFINE semaphore,P_HAS_SEMAPHORES
dnl Linux, Mac OS X use libpthread and -lpthread
dnl FreeBSD uses the -pthread compiler option and uses libc_r
@ -46,7 +48,7 @@ $OpenBSD: patch-configure_ac,v 1.2 2010/05/31 05:28:06 ajacoutot Exp $
if test ${HAS_PTHREADS} != yes -a ${NEEDS_PTHREADS} = yes; then
@@ -1199,7 +1202,8 @@ else
@@ -1264,7 +1268,8 @@ else
if test $HAS_IPV6 = no ; then
AC_MSG_RESULT(no)
else
@ -56,7 +58,7 @@ $OpenBSD: patch-configure_ac,v 1.2 2010/05/31 05:28:06 ajacoutot Exp $
#include <netdb.h>],
[getnameinfo(0, 0, 0, 0, 0, 0, 0);], HAS_IPV6=yes, HAS_IPV6=no)
if test $HAS_IPV6 = no ; then
@@ -1494,7 +1498,7 @@ dnl ##################################################
@@ -1556,7 +1561,7 @@ dnl ##################################################
dnl check for video capture support.
dnl videodev.h on linux
dnl machine/ioctl_meteor on FreeBSD
@ -65,11 +67,11 @@ $OpenBSD: patch-configure_ac,v 1.2 2010/05/31 05:28:06 ajacoutot Exp $
dnl dev/ic/bt8xx on NetBSD
HAS_VIDEO_CAPTURE=
@@ -1540,6 +1544,7 @@ if test "x${HAS_AUDIO}" = "x1" ; then
@@ -1602,6 +1607,7 @@ if test "x${HAS_AUDIO}" = "x1" ; then
dnl these are needed to pass through to the plugin configure program
AC_ARG_ENABLE(alsa, [ --enable-alsa enable ALSA audio support],enable_alsa=$enableval)
AC_ARG_ENABLE(oss, [ --enable-oss enable OSS audio support],enable_oss=$enableval)
AC_ARG_ENABLE(alsa, [ --enable-alsa enable ALSA audio support],enable_alsa=$enableval)
AC_ARG_ENABLE(oss, [ --enable-oss enable OSS audio support],enable_oss=$enableval)
+ AC_ARG_ENABLE(sndio,[ --enable-sndio enable sndio audio support],enable_sndio=$enableval)
AC_ARG_ENABLE(pulse, [ --enable-pulse enable PULSE audio support],enable_pulse=$enableval)
fi

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-include_ptbuildopts_h_in,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- include/ptbuildopts.h.in.orig Wed Jul 8 14:07:05 2009
+++ include/ptbuildopts.h.in Wed Jul 8 14:07:33 2009
@@ -146,7 +146,11 @@
#undef P_HAS_STL_STREAMS
#undef P_HAS_ATOMIC_INT
#undef P_HAS_RECURSIVE_MUTEX
-#undef P_NEEDS_GNU_CXX_NAMESPACE
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define P_NEEDS_GNU_CXX_NAMESPACE 1
+#else
+#define P_NEEDS_GNU_CXX_NAMESPACE 0
+#endif
#undef PMEMORY_CHECK
#undef P_HAS_RECVMSG
#undef P_HAS_UPAD128_T

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-include_ptlib_plugin_h,v 1.1 2011/10/26 16:59:09 ajacoutot Exp $
--- include/ptlib/plugin.h.orig Fri Oct 14 08:54:58 2011
+++ include/ptlib/plugin.h Wed Oct 26 10:31:58 2011
@@ -190,7 +190,7 @@ PPlugin_##serviceType##_##serviceName##_Registration \
#else
-#ifdef USE_GCC
+#ifdef __GNUC__
#define PCREATE_PLUGIN_STATIC(serviceName, serviceType, descriptor) \
static void __attribute__ (( constructor )) PWLIB_StaticLoader_##serviceName##_##serviceType() \
{ PPluginManager::GetPluginManager().RegisterService(#serviceName, #serviceType, descriptor); } \

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-include_ptlib_pluginmgr_h,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- include/ptlib/pluginmgr.h.orig Fri Jan 29 17:13:13 2010
+++ include/ptlib/pluginmgr.h Fri Jan 29 17:13:24 2010
@@ -15,7 +15,7 @@
#ifndef PTLIB_PLUGINMGR_H
#define PTLIB_PLUGINMGR_H
-#define DEFAULT_PLUGINDIR "/usr/lib/pwlib"
+#define DEFAULT_PLUGINDIR "${TRUEPREFIX}/lib/ptlib"
#include <ptlib/plugin.h>

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-include_ptlib_unix_ptlib_contain_h,v 1.1 2011/10/26 16:59:09 ajacoutot Exp $
contain.h:81: error: 'intptr_t' does not name a type
--- include/ptlib/unix/ptlib/contain.h.orig Fri Oct 14 08:54:58 2011
+++ include/ptlib/unix/ptlib/contain.h Wed Oct 26 10:28:14 2011
@@ -32,9 +32,12 @@
*/
#include "pmachdep.h"
+#include <stdint.h>
#include <unistd.h>
#include <ctype.h>
+#ifdef P_OPENBSD
#include <limits.h>
+#endif
///////////////////////////////////////////

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-include_ptlib_unix_ptlib_pmachdep_h,v 1.1 2011/10/26 16:59:09 ajacoutot Exp $
OpenBSD has support for monotonic clock (CLOCK_MONOTONIC), however we
currently don't have most of the _POSIX_* defines in unistd.h (e.g.
_POSIX_MONOTONIC_CLOCK 200112L) and the associated sysconf(3)
_SC_MONOTONIC_CLOCK variable.
--- include/ptlib/unix/ptlib/pmachdep.h.orig Sat Oct 22 18:26:52 2011
+++ include/ptlib/unix/ptlib/pmachdep.h Sat Oct 22 18:27:17 2011
@@ -115,6 +115,7 @@ typedef int socklen_t;
#include <netinet/tcp.h>
#define HAS_IFREQ
+#define _POSIX_MONOTONIC_CLOCK
///////////////////////////////////////////////////////////////////////////////
#elif defined(P_NETBSD)

View File

@ -1,26 +1,23 @@
$OpenBSD: patch-make_common_mak,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- make/common.mak.orig Mon Sep 21 02:25:30 2009
+++ make/common.mak Thu Jan 28 12:46:41 2010
@@ -80,12 +80,12 @@ endif
$OpenBSD: patch-make_common_mak,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- make/common.mak.orig Fri Oct 14 08:54:53 2011
+++ make/common.mak Wed Oct 26 10:37:55 2011
@@ -80,6 +80,7 @@ endif
SOURCES := $(strip $(SOURCES))
-ifeq ($(V)$(VERBOSE),)
-Q_CC = @echo [CC] `echo $< | sed s/$PWD//` ;
-Q_DEP= @echo [DEP] `echo $< | sed s/$PWD//` ;
-Q_AR = @echo [AR] `echo $@ | sed s/$PWD//` ;
-Q_LD = @echo [LD] `echo $@ | sed s/$PWD//` ;
-endif
+#ifeq ($(V)$(VERBOSE),)
+#Q_CC = @echo [CC] `echo $< | sed s/$PWD//` ;
+#Q_DEP= @echo [DEP] `echo $< | sed s/$PWD//` ;
+#Q_AR = @echo [AR] `echo $@ | sed s/$PWD//` ;
+#Q_LD = @echo [LD] `echo $@ | sed s/$PWD//` ;
+#endif
+ifneq ($(OSTYPE),OpenBSD)
ifeq ($(V)$(VERBOSE),)
Q = @
Q_CC = @echo [CC] `echo $< | sed s/$PWD//` ;
@@ -87,6 +88,7 @@ Q_DEP= @echo [DEP] `echo $< | sed s/$PWD//` ;
Q_AR = @echo [AR] `echo $@ | sed s/$PWD//` ;
Q_LD = @echo [LD] `echo $@ | sed s/$PWD//` ;
endif
+endif
#
@@ -163,7 +163,7 @@ TARGET_LIBS = $(PTLIBDIR)/lib_$(PLATFORM_TYPE)/$(PTLIB
@@ -164,7 +166,7 @@ TARGET_LIBS = $(PTLIBDIR)/lib_$(PLATFORM_TYPE)/$(PTLIB
# distinguish betweek building and using pwlib
ifeq (,$(wildcard $(PTLIBDIR)/src))

View File

@ -1,34 +1,36 @@
$OpenBSD: patch-make_lib_mak,v 1.3 2010/03/27 14:32:23 ajacoutot Exp $
--- make/lib.mak.orig Mon Sep 21 02:25:30 2009
+++ make/lib.mak Sat Mar 27 15:21:24 2010
@@ -29,10 +29,14 @@
$OpenBSD: patch-make_lib_mak,v 1.4 2011/10/26 16:59:09 ajacoutot Exp $
--- make/lib.mak.orig Fri Oct 14 08:54:53 2011
+++ make/lib.mak Wed Oct 26 10:49:21 2011
@@ -28,6 +28,13 @@
# $Date: 2011/10/26 16:59:09 $
#
+ifeq ($(OSTYPE),OpenBSD)
+ ifeq ($(BUILD_TYPE),.)
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)
+ else
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)
+ endif
+else
ifeq (,$(findstring $(OSTYPE),Darwin cygwin mingw))
- ifeq ($(BUILD_TYPE),.)
- LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(BUILD_NUMBER)
+ ifeq ($(OSTYPE),OpenBSD)
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)
else
- LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)$(BUILD_NUMBER)
+ ifeq ($(BUILD_TYPE),.)
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(BUILD_NUMBER)
+ else
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)$(BUILD_NUMBER)
+ endif
endif
else
ifeq ($(BUILD_TYPE),.)
@@ -98,7 +102,11 @@ ifeq ($(P_SHAREDLIB),1)
LDSOOPTS += -Wl,--kill-at
else
ifneq ($(OSTYPE),Darwin)
- LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
+ ifneq ($(OSTYPE),OpenBSD)
+ LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
+ else
+ LDSOOPTS += -fPIC
+ endif
LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(BUILD_NUMBER)
@@ -41,6 +48,7 @@ else
LIBNAME_PAT = $(subst .$(LIB_SUFFIX),.$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)$(BUILD_NUMBER).$(LIB_SUFFIX),$(LIB_FILENAME))
endif
endif
+endif
LIB_SONAME = $(LIBNAME_PAT)
@@ -101,6 +109,10 @@ ifeq ($(P_SHAREDLIB),1)
LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
endif
endif
+ endif
+
+ ifeq ($(OSTYPE),OpenBSD)
+ LDSOOPTS += -fPIC
endif
$(LIBDIR)/$(LIB_FILENAME): $(LIBDIR)/$(LIBNAME_PAT)

View File

@ -1,16 +1,7 @@
$OpenBSD: patch-make_unix_mak,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- make/unix.mak.orig Mon Sep 21 02:25:30 2009
+++ make/unix.mak Tue Sep 22 17:20:24 2009
@@ -159,7 +159,7 @@ endif # P_SHAREDLIB
STATIC_LIBS := libstdc++.a libg++.a libm.a libc.a
-SYSLIBDIR := $(shell $(PTLIBDIR)/make/ptlib-config --libdir)
+SYSLIBDIR := $(shell ${PREFIX}/bin/ptlib-config --libdir)
endif # linux
@@ -198,12 +198,18 @@ ifeq ($(MACHTYPE),x86)
$OpenBSD: patch-make_unix_mak,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- make/unix.mak.orig Fri Oct 14 08:54:53 2011
+++ make/unix.mak Wed Oct 26 08:58:01 2011
@@ -200,11 +200,19 @@ ifeq ($(MACHTYPE),x86)
#STDCCFLAGS += -m486
endif
@ -25,18 +16,20 @@ $OpenBSD: patch-make_unix_mak,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
+
P_USE_RANLIB := 1
#STDCCFLAGS += -DP_USE_PRAGMA # migrated to configure
+STDCCFLAGS += -fPIC
+STDCCFLAGS += -fPIC -DPIC
+SYSLIBDIR := $(shell $(PTLIBDIR)/make/ptlib-config --libdir)
-
endif # OpenBSD
@@ -656,7 +662,7 @@ ifneq ($(OSTYPE),Darwin)
@@ -659,7 +667,9 @@ ifneq ($(OSTYPE),Darwin)
STDCCFLAGS += -xO3
endif
else
- STDCCFLAGS += -Os
+ STDCCFLAGS +=
+ ifneq ($(OSTYPE),OpenBSD)
+ STDCCFLAGS += -Os
+ endif
endif
else
STDCCFLAGS += -O2

View File

@ -1,19 +1,20 @@
$OpenBSD: patch-plugins_Makefile_in,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- plugins/Makefile.in.orig Sat Nov 7 17:06:25 2009
+++ plugins/Makefile.in Sat Nov 7 17:06:58 2009
@@ -31,6 +31,15 @@ DEFAULT_SOUND = sound_esd
$OpenBSD: patch-plugins_Makefile_in,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- plugins/Makefile.in.orig Fri May 7 06:42:24 2010
+++ plugins/Makefile.in Sat Jun 26 16:45:04 2010
@@ -51,6 +51,16 @@ DEFAULT_SOUND = sound_esd
endif
endif
+HAS_SNDIO = @HAS_SNDIO@
+###################################SNDIO
+HAS_SNDIO = @HAS_SNDIO@
+
+ifeq (1,$(HAS_SNDIO))
+SUBDIRS += sound_sndio
+ifeq (,$(DEFAULT_SOUND))
+DEFAULT_SOUND = sound_sndio
+DEFAULT_SOUND = sound_sndio
+endif
+endif
+
#################################SundAudio
HAS_SUNAUDIO = @HAS_SUNAUDIO@
ifeq (1,$(HAS_SUNAUDIO))

View File

@ -1,23 +1,7 @@
$OpenBSD: patch-plugins_configure_in,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- plugins/configure.in.orig Mon Sep 15 01:26:48 2008
+++ plugins/configure.in Mon Nov 3 07:59:23 2008
@@ -78,7 +78,14 @@ dnl ##################################################
AC_ARG_ENABLE(oss, [ --enable-oss enable OSS audio support],,enable_oss=no)
if test "${enable_oss}z" = "yesz" ; then
- AC_CHECK_HEADER(sys/soundcard.h, SNDCARDHDR=1)
+ case "$target_os" in
+ openbsd*)
+ AC_CHECK_HEADER(soundcard.h, SNDCARDHDR=1)
+ ;;
+ *)
+ AC_CHECK_HEADER(sys/soundcard.h, SNDCARDHDR=1)
+ ;;
+ esac
AC_MSG_CHECKING(for OSS sound support)
if test "${SNDCARDHDR}z" != "z"; then
AC_SUBST(HAS_OSS, 1)
@@ -89,6 +96,23 @@ if test "${enable_oss}z" = "yesz" ; then
$OpenBSD: patch-plugins_configure_in,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- plugins/configure.in.orig Fri Oct 14 08:54:54 2011
+++ plugins/configure.in Wed Oct 26 10:43:03 2011
@@ -107,6 +107,23 @@ if test "${enable_pulse}z" = "yesz" ; then
fi
dnl #########################################################################
@ -41,7 +25,7 @@ $OpenBSD: patch-plugins_configure_in,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp
dnl check for sunaudio sound support
dnl ########################################################################
@@ -140,7 +164,7 @@ AC_ARG_ENABLE(v4l2, [ --enable-v4l2 enable
@@ -176,7 +193,7 @@ AC_ARG_ENABLE(v4l2, [ --enable-v4l2 enable
if test "${enable_v4l2}z" = "yesz" ; then
case "$target_os" in
solaris* | sunos* ) V4L2_HEADER="sys/videodev2.h" ; ;;
@ -50,44 +34,30 @@ $OpenBSD: patch-plugins_configure_in,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp
* ) V4L2_HEADER="linux/videodev2.h" ; ;;
esac
@@ -152,17 +176,18 @@ if test "${enable_v4l2}z" = "yesz" ; then
# method to do this more cleanly ?
AC_MSG_CHECKING([for $V4L2_HEADER with sys/types.h])
AC_TRY_COMPILE([
- #ifdef __linux__
- #include <sys/types.h>
- #include <linux/types.h>
+ #if defined(__linux__)
+ # include <sys/types.h>
+ # include <linux/types.h>
+ #elif defined(__sun)
+ # include <sys/types.h>
+ # include <sys/time.h>
+ #elif defined(__OpenBSD__)
+ # include <sys/types.h>
+ # include <sys/ioctl.h>
@@ -196,9 +213,14 @@ if test "${enable_v4l2}z" = "yesz" ; then
#include <sys/types.h>
#include <sys/time.h>
#else
- #ifdef __sun
- #include <sys/types.h>
- #include <sys/time.h>
- #else
- #error "not supported"
+ # error "not supported"
+ #ifdef __OpenBSD__
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #else
#error "not supported"
#endif
- #endif
#endif
+ #endif
#include "$V4L2_HEADER"
],
[
@@ -178,8 +203,11 @@ if test "${enable_v4l2}z" = "yesz" ; then
])
],
@@ -216,6 +238,11 @@ if test "${enable_v4l2}z" = "yesz" ; then
[
- #ifdef __linux__
+ #if defined(__linux__)
#ifdef __linux__
#include <linux/types.h>
+ #elif defined(__OpenBSD__)
+ #else
+ #ifdef __OpenBSD__
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #endif
#endif
])
AC_MSG_CHECKING(for V4L2 video support)

View File

@ -1,11 +1,13 @@
$OpenBSD: patch-plugins_vidinput_bsd_vidinput_bsd_h,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- plugins/vidinput_bsd/vidinput_bsd.h.orig Mon Nov 3 15:46:07 2008
+++ plugins/vidinput_bsd/vidinput_bsd.h Mon Nov 3 15:50:32 2008
@@ -6,6 +6,7 @@
$OpenBSD: patch-plugins_vidinput_bsd_vidinput_bsd_h,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- plugins/vidinput_bsd/vidinput_bsd.h.orig Fri Oct 14 08:54:54 2011
+++ plugins/vidinput_bsd/vidinput_bsd.h Wed Oct 26 10:28:10 2011
@@ -6,6 +6,9 @@
#pragma interface
#endif
+#ifdef P_OPENBSD
+#include <sys/types.h>
+#endif
#include <sys/mman.h>
#include <ptlib.h>

View File

@ -1,11 +1,13 @@
$OpenBSD: patch-plugins_vidinput_v4l2_vidinput_v4l2_h,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- plugins/vidinput_v4l2/vidinput_v4l2.h.orig Mon Nov 3 15:44:04 2008
+++ plugins/vidinput_v4l2/vidinput_v4l2.h Mon Nov 3 15:45:27 2008
@@ -31,6 +31,7 @@
$OpenBSD: patch-plugins_vidinput_v4l2_vidinput_v4l2_h,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- plugins/vidinput_v4l2/vidinput_v4l2.h.orig Fri Oct 14 08:54:54 2011
+++ plugins/vidinput_v4l2/vidinput_v4l2.h Wed Oct 26 10:30:06 2011
@@ -31,6 +31,9 @@
#define _PVIDEOIOV4L2
+#ifdef P_OPENBSD
+#include <sys/types.h>
+#endif
#include <sys/mman.h>
#include <sys/time.h>

View File

@ -1,13 +1,15 @@
$OpenBSD: patch-ptlib_m4,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- ptlib.m4.orig Mon Nov 3 07:24:34 2008
+++ ptlib.m4 Mon Nov 3 07:26:52 2008
@@ -375,6 +375,9 @@ AC_DEFUN([PTLIB_FIND_OPENLDAP],
$OpenBSD: patch-ptlib_m4,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- ptlib.m4.orig Fri Oct 14 08:55:01 2011
+++ ptlib.m4 Wed Oct 26 10:28:46 2011
@@ -363,7 +363,10 @@ AC_DEFUN([PTLIB_FIND_OPENLDAP],
dnl posix4 is required by libldap_r on Solaris
ptlib_openldap_libs="-lposix4"
;;
- * )
+ openbsd*)
+ ptlib_openldap_libs="-llber -lldap_r -pthread"
+ ;;
* )
+ * )
ptlib_openldap_libs="-llber -lldap_r"
esac

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_ptclib_pssl_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- src/ptclib/pssl.cxx.orig Mon Sep 21 02:25:25 2009
+++ src/ptclib/pssl.cxx Wed Jan 27 14:12:54 2010
@@ -658,7 +658,7 @@ PSSLDiffieHellman::~PSSLDiffieHellman()
DH_free(dh);
}
-#if defined(__BEOS__) || (defined(__APPLE__) && P_MACOSX < 900) || defined(__OpenBSD__)
+#if defined(__BEOS__) || (defined(__APPLE__) && P_MACOSX < 900)
// 2/21/04 Yuri Kiryanov - fix for compiler choke on BeOS for usage of
// SSL function d2i_DHparams_bio below in PSSLDiffieHellman::Load
// 5/26/06 Hannes Friederich - Mac OS X seems to need that fix too...

View File

@ -1,12 +1,13 @@
$OpenBSD: patch-src_ptlib_common_osutils_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- src/ptlib/common/osutils.cxx.orig Mon Jun 22 15:27:25 2009
+++ src/ptlib/common/osutils.cxx Mon Jun 22 15:27:50 2009
@@ -36,6 +36,8 @@
$OpenBSD: patch-src_ptlib_common_osutils_cxx,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- src/ptlib/common/osutils.cxx.orig Fri Oct 14 08:54:51 2011
+++ src/ptlib/common/osutils.cxx Wed Oct 26 10:29:39 2011
@@ -35,6 +35,9 @@
#include <vector>
#include <map>
#include <fstream>
+#ifdef P_OPENBSD
+#include <stdint.h>
+
+#endif
#include <ctype.h>
#include <ptlib/pfactory.h>
#include <ptlib/pprocess.h>

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_ptlib_common_pluginmgr_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
$OpenBSD: patch-src_ptlib_common_pluginmgr_cxx,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- src/ptlib/common/pluginmgr.cxx.orig Fri Jan 29 13:42:56 2010
+++ src/ptlib/common/pluginmgr.cxx Fri Jan 29 13:43:47 2010
@@ -26,7 +26,7 @@
@ -6,7 +6,7 @@ $OpenBSD: patch-src_ptlib_common_pluginmgr_cxx,v 1.1.1.1 2010/03/23 21:10:17 aja
# define P_DEFAULT_PLUGIN_DIR ".;C:\\Program Files\\PTLib Plug Ins;C:\\PTLIB_PLUGINS;C:\\PWLIB_PLUGINS"
# else
-# define P_DEFAULT_PLUGIN_DIR ".:/usr/lib/ptlib:/usr/lib/pwlib"
+# define P_DEFAULT_PLUGIN_DIR ".:${TRUEPREFIX}/lib/ptlib:${TRUEPREFIX}/lib/pwlib"
+# define P_DEFAULT_PLUGIN_DIR ".:${TRUEPREFIX}/lib/ptlib:${LOCALBASE}/lib/pwlib"
# endif
#endif

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_ptlib_unix_config_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- src/ptlib/unix/config.cxx.orig Tue Jul 7 09:36:01 2009
+++ src/ptlib/unix/config.cxx Tue Jul 7 09:36:20 2009
@@ -53,7 +53,7 @@
#define environ (NULL)
#endif
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
extern char **environ;
#endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_ptlib_unix_socket_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
--- src/ptlib/unix/socket.cxx.orig Wed Jan 27 10:34:44 2010
+++ src/ptlib/unix/socket.cxx Wed Jan 27 10:38:07 2010
@@ -67,7 +67,7 @@
$OpenBSD: patch-src_ptlib_unix_socket_cxx,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- src/ptlib/unix/socket.cxx.orig Fri Oct 14 08:54:51 2011
+++ src/ptlib/unix/socket.cxx Sat Oct 22 12:41:24 2011
@@ -69,7 +69,7 @@
#include <netinet/if_ether.h>
#endif
@ -10,16 +10,20 @@ $OpenBSD: patch-src_ptlib_unix_socket_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacouto
#include <ifaddrs.h>
#endif
@@ -475,7 +475,7 @@ PBoolean PIPSocket::IsLocalHost(const PString & hostna
@@ -484,9 +484,11 @@ PBoolean PIPSocket::IsLocalHost(const PString & hostna
PUDPSocket sock;
PBYTEArray buffer;
+#if !defined(P_NETBSD) && !defined(P_OPENBSD)
struct ifconf ifConf;
+#endif
-#if defined(P_NETBSD)
+#if defined(P_NETBSD) || defined(P_OPENBSD)
struct ifaddrs *ifap, *ifa;
PAssert(getifaddrs(&ifap) == 0, "getifaddrs failed");
@@ -498,7 +498,7 @@ PBoolean PIPSocket::IsLocalHost(const PString & hostna
@@ -509,7 +511,7 @@ PBoolean PIPSocket::IsLocalHost(const PString & hostna
while (ifName < ifEndList) {
#endif
struct ifreq ifReq;
@ -28,7 +32,7 @@ $OpenBSD: patch-src_ptlib_unix_socket_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacouto
memcpy(&ifReq, ifName, sizeof(ifreq));
#else
memset(&ifReq, 0, sizeof(ifReq));
@@ -515,14 +515,14 @@ PBoolean PIPSocket::IsLocalHost(const PString & hostna
@@ -526,14 +528,14 @@ PBoolean PIPSocket::IsLocalHost(const PString & hostna
}
}
@ -46,26 +50,30 @@ $OpenBSD: patch-src_ptlib_unix_socket_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacouto
}
#endif
@@ -1592,7 +1592,7 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
@@ -1875,9 +1877,11 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
PUDPSocket sock;
PBYTEArray buffer;
+#if !defined(P_NETBSD) && !defined(P_OPENBSD)
struct ifconf ifConf;
+#endif
-#if defined(P_NETBSD)
+#if defined(P_NETBSD) || defined(P_OPENBSD)
struct ifaddrs *ifap, *ifa;
PAssert(getifaddrs(&ifap) == 0, "getifaddrs failed");
@@ -1616,7 +1616,7 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
@@ -1901,7 +1905,7 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
while (ifName < ifEndList) {
#endif
struct ifreq ifReq;
-#if !defined(P_NETBSD)
+#if !defined(P_NETBSD) && !defined(P_OPENBSD)
memcpy(&ifReq, ifName, sizeof(ifreq));
memcpy(&ifReq, ifName, sizeof(ifreq));
#else
memset(&ifReq, 0, sizeof(ifReq));
@@ -1637,7 +1637,7 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
}
memset(&ifReq, 0, sizeof(ifReq));
@@ -1920,7 +1924,7 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
macAddr = PEthSocket::Address((BYTE *)ifReq.ifr_macaddr);
#endif
-#if !defined(P_NETBSD)
@ -73,7 +81,7 @@ $OpenBSD: patch-src_ptlib_unix_socket_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacouto
memcpy(&ifReq, ifName, sizeof(ifreq));
#else
memset(&ifReq, 0, sizeof(ifReq));
@@ -1649,7 +1649,7 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
@@ -1932,7 +1936,7 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
sockaddr_in * sin = (sockaddr_in *)&ifReq.ifr_addr;
PIPSocket::Address addr = sin->sin_addr;
@ -82,7 +90,7 @@ $OpenBSD: patch-src_ptlib_unix_socket_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacouto
memcpy(&ifReq, ifName, sizeof(ifreq));
#else
memset(&ifReq, 0, sizeof(ifReq));
@@ -1693,15 +1693,15 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
@@ -1966,15 +1970,15 @@ PBoolean PIPSocket::GetInterfaceTable(InterfaceTable &
}
}
@ -100,4 +108,4 @@ $OpenBSD: patch-src_ptlib_unix_socket_cxx,v 1.1.1.1 2010/03/23 21:10:17 ajacouto
+#if !defined(P_NETBSD) && !defined(P_OPENBSD)
}
#endif
return PTrue;

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
@conflict pwlib-*
@pkgpath devel/pwlib
@pkgpath devel/pwlib,ldap
@ -14,6 +14,7 @@ include/ptclib/asnber.h
include/ptclib/asner.h
include/ptclib/asnper.h
include/ptclib/asnxer.h
include/ptclib/cli.h
include/ptclib/cypher.h
include/ptclib/delaychan.h
include/ptclib/dtmf.h
@ -27,6 +28,7 @@ include/ptclib/httpsvc.h
include/ptclib/inetmail.h
include/ptclib/inetprot.h
include/ptclib/ipacl.h
include/ptclib/lua.h
include/ptclib/memfile.h
include/ptclib/mime.h
include/ptclib/modem.h
@ -61,6 +63,7 @@ include/ptclib/socks.h
include/ptclib/telnet.h
include/ptclib/threadpool.h
include/ptclib/url.h
include/ptclib/vcard.h
include/ptclib/vsdl.h
include/ptclib/vxml.h
include/ptclib/xmpp.h
@ -118,6 +121,7 @@ include/ptlib/sound.h
include/ptlib/svcproc.h
include/ptlib/syncpoint.h
include/ptlib/syncthrd.h
include/ptlib/syslog.h
include/ptlib/tcpsock.h
include/ptlib/textfile.h
include/ptlib/thread.h
@ -141,6 +145,7 @@ 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/mail.h
include/ptlib/unix/ptlib/mutex.h
include/ptlib/unix/ptlib/pdirect.h
include/ptlib/unix/ptlib/pipechan.h
@ -169,7 +174,9 @@ include/ptlib/vconvert.h
include/ptlib/video.h
include/ptlib/videoio.h
include/ptlib/videoio1394dc.h
include/ptlib/wxstring.h
@lib lib/libpt.so.${LIBpt_VERSION}
lib/libpt_s.a
lib/pkgconfig/ptlib.pc
lib/ptlib/
lib/ptlib/devices/