Disable libuuid as pointed out by st...@.
Ok to commit now?
cheers
David
Index: Makefile
===================================================================
RCS file: /cvs/ports/telephony/pjsua/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- Makefile 15 Apr 2010 14:58:24 -0000 1.6
+++ Makefile 3 May 2010 13:38:33 -0000
@@ -2,9 +2,9 @@
COMMENT= lightweight sip client
-VERSION= 1.5.5
+VERSION= 1.6
DISTNAME= pjproject-${VERSION}
-PKGNAME= pjsua-${VERSION}p0
+PKGNAME= pjsua-${VERSION}
EXTRACT_SUFX= .tar.bz2
CATEGORIES= telephony
@@ -30,7 +30,8 @@ CONFIGURE_ARGS= --disable-oss \
--with-external-pa \
--with-external-speex
CONFIGURE_ENV+= CFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib"
+ LDFLAGS="-L${LOCALBASE}/lib" \
+ ac_cv_lib_uuid_uuid_generate=no
USE_GMAKE= Yes
NO_REGRESS= Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/telephony/pjsua/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo 2 Apr 2010 11:48:24 -0000 1.2
+++ distinfo 3 May 2010 13:38:33 -0000
@@ -1,5 +1,5 @@
-MD5 (pjproject-1.5.5.tar.bz2) = vK/lRJTgukSULTUrRCuncw==
-RMD160 (pjproject-1.5.5.tar.bz2) = 3ezUJiyC4HXIzo/2+jKNmA63kWQ=
-SHA1 (pjproject-1.5.5.tar.bz2) = z3T1WfnuUuK5gSe6H7cUSazD5c4=
-SHA256 (pjproject-1.5.5.tar.bz2) = p2nU44Eq6eojQvqNkYhB5geX0ahgX9n0amSWzi5hmYw=
-SIZE (pjproject-1.5.5.tar.bz2) = 3697555
+MD5 (pjproject-1.6.tar.bz2) = joBMSTCl7pinoO0mGcCbRA==
+RMD160 (pjproject-1.6.tar.bz2) = SowTQq0oYJg+eFu/vRcEEO3Ct9c=
+SHA1 (pjproject-1.6.tar.bz2) = Y+fNaWMpDPOWAkqDfR+1GUEH21c=
+SHA256 (pjproject-1.6.tar.bz2) = jxPXGX7d0UQtJM8WSzlVgsAOfxkoPzwOnRMV2FVR7Hs=
+SIZE (pjproject-1.6.tar.bz2) = 3716047
Index: patches/patch-aconfigure_ac
===================================================================
RCS file: /cvs/ports/telephony/pjsua/patches/patch-aconfigure_ac,v
retrieving revision 1.1
diff -u -p -r1.1 patch-aconfigure_ac
--- patches/patch-aconfigure_ac 2 Apr 2010 11:48:24 -0000 1.1
+++ patches/patch-aconfigure_ac 3 May 2010 13:38:33 -0000
@@ -1,34 +1,11 @@
-$OpenBSD: patch-aconfigure_ac,v 1.1 2010/04/02 11:48:24 dcoppa Exp $
+$OpenBSD$
use -pthread instead of -lpthread
fix memory alignment detection on sparc64
fix header detection when using external libgsm on OpenBSD
-fixes from upstream:
-fixes in detecting header availability
-enable use of system libraries for gsm, speex and portaudio
-check for libcrypto before libssl
-
---- aconfigure.ac.orig Wed Oct 28 07:09:15 2009
-+++ aconfigure.ac Thu Apr 1 14:41:24 2010
-@@ -1,4 +1,4 @@
--AC_INIT(pjproject,1.0)
-+AC_INIT(pjproject,1.x)
-
- host_orig="$host"
-
-@@ -17,9 +17,9 @@ AC_CONFIG_FILES([build.mak
- pjlib-util/build/os-auto.mak
- pjmedia/build/os-auto.mak
- pjsip/build/os-auto.mak
-- third_party/build/portaudio/os-auto.mak
- third_party/build/os-auto.mak
-- ])
-+ third_party/build/portaudio/os-auto.mak
-+ ])
-
-
- dnl
+--- aconfigure.ac.orig Sat May 1 18:15:27 2010
++++ aconfigure.ac Sat May 1 18:23:28 2010
@@ -48,7 +48,23 @@ case $target in
;;
esac
@@ -63,146 +40,12 @@ check for libcrypto before libssl
AC_DEFINE(PJ_POOL_ALIGNMENT, 8)
AC_MSG_RESULT([8 bytes])
;;
-@@ -146,9 +162,15 @@ AC_CHECK_HEADER(netdb.h,[AC_DEFINE(PJ_HAS_NETDB_H,1)])
- AC_CHECK_HEADER(netinet/in_systm.h,[AC_DEFINE(PJ_HAS_NETINET_IN_SYSTM_H,1)])
- AC_CHECK_HEADER(netinet/in.h,[AC_DEFINE(PJ_HAS_NETINET_IN_H,1)])
- AC_CHECK_HEADER(netinet/ip.h,[AC_DEFINE(PJ_HAS_NETINET_IP_H,1)],[],
-- [#if PJ_HAS_NETINET_IN_SYSTM_H
-+ [#if PJ_HAS_SYS_TYPES_H
-+ # include <sys/types.h>
-+ #endif
-+ #if PJ_HAS_NETINET_IN_SYSTM_H
- # include <netinet/in_systm.h>
- #endif
-+ #if PJ_HAS_NETINET_IN_H
-+ # include <netinet/in.h>
-+ #endif
- ])
- AC_CHECK_HEADER(netinet/tcp.h,[AC_DEFINE(PJ_HAS_NETINET_TCP_H,1)])
- AC_CHECK_HEADER(ifaddrs.h,[AC_DEFINE(PJ_HAS_IFADDRS_H,1)])
-@@ -166,6 +188,8 @@ AC_CHECK_HEADER(sys/socket.h,[AC_DEFINE(PJ_HAS_SYS_SOC
- AC_CHECK_HEADER(sys/time.h,[AC_DEFINE(PJ_HAS_SYS_TIME_H,1)])
- AC_CHECK_HEADER(sys/timeb.h,[AC_DEFINE(PJ_HAS_SYS_TIMEB_H,1)])
- AC_CHECK_HEADER(sys/types.h,[AC_DEFINE(PJ_HAS_SYS_TYPES_H,1)])
-+AC_CHECK_HEADER(sys/filio.h,[AC_DEFINE(PJ_HAS_SYS_FILIO_H,1)])
-+AC_CHECK_HEADER(sys/sockio.h,[AC_DEFINE(PJ_HAS_SYS_SOCKIO_H,1)])
- AC_CHECK_HEADER(time.h,[AC_DEFINE(PJ_HAS_TIME_H,1)])
- AC_CHECK_HEADER(unistd.h,[AC_DEFINE(PJ_HAS_UNISTD_H,1)])
- AC_CHECK_HEADER(winsock.h,[AC_DEFINE(PJ_HAS_WINSOCK_H,1)])
-@@ -180,11 +204,14 @@ AC_CHECK_HEADER(mswsock.h,[AC_DEFINE(PJ_HAS_MSWSOCK_H,
- AC_CHECK_HEADER(ws2tcpip.h,[AC_DEFINE(PJ_HAS_WS2TCPIP_H,1)])
- AC_CHECK_HEADER(uuid/uuid.h,[ac_has_uuid_h=1])
- AC_CHECK_HEADER(net/if.h,[AC_DEFINE(PJ_HAS_NET_IF_H,1)],[],
-- [#if PJ_HAS_SYS_SOCKET_H
-+ [#if PJ_HAS_SYS_TYPES_H
-+ # include <sys/types.h>
-+ #endif
-+ #if PJ_HAS_SYS_SOCKET_H
-+
- # include <sys/socket.h>
- #endif
- ])
--
- AC_MSG_RESULT([Setting PJ_OS_NAME to $target])
- AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"])
-
-@@ -256,7 +283,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/typ
-
- dnl # Determine if socklen_t is available
- AC_MSG_CHECKING([if socklen_t is available])
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-+ #include <sys/socket.h>]],
- [socklen_t xxx = 0;])],
- [AC_DEFINE(PJ_HAS_SOCKLEN_T,1)
- AC_MSG_RESULT(yes)],
-@@ -367,6 +395,52 @@ dnl #
- dnl # PJMEDIA
- dnl #
-
-+dnl # Use external Speex installation
-+AC_SUBST(ac_external_speex,0)
-+AC_ARG_WITH(external-speex,
-+ AC_HELP_STRING([--with-external-speex],
-+ [Use external Speex development files, not the one in
"third_party" directory. When this option is set, make sure that Speex is
accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib
paths)]),
-+ [
-+ if test "x$with_external_speex" != "xno"; then
-+ # Test Speex installation
-+ AC_MSG_CHECKING([if external Speex devkit is installed])
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <speex/speex.h>
-+ #include
<speex/speex_echo.h>
-+ ]],
-+ [speex_echo_state_init(0, 0);
speex_encoder_init(0); ])],
-+ [AC_MSG_RESULT(yes!!)
-+ AC_DEFINE(PJMEDIA_EXTERNAL_SPEEX_CODEC, 1)
-+ ac_external_speex="1"
-+ ],
-+ [AC_MSG_ERROR([Unable to use external Speex
library. If Speex development files are not available in the default locations,
use CFLAGS and LDFLAGS env var to set the include/lib paths])])
-+ fi
-+ ]
-+ )
-+
-+dnl # Use external GSM codec library installation
-+AC_SUBST(ac_external_gsm,0)
-+AC_ARG_WITH(external-gsm,
-+ AC_HELP_STRING([--with-external-gsm],
-+ [Use external GSM codec library, not the one in
"third_party" directory. When this option is set, make sure that the GSM
include/lib files are accessible to use (hint: use CFLAGS and LDFLAGS env var
to set the include/lib paths)]),
-+ [
-+ if test "x$with_external_gsm" != "xno"; then
-+ # Test GSM library installation
-+ AC_MSG_CHECKING([if external GSM devkit is installed])
+@@ -410,7 +426,7 @@ AC_ARG_WITH(external-gsm,
+ if test "x$with_external_gsm" != "xno"; then
+ # Test GSM library installation
+ AC_MSG_CHECKING([if external GSM devkit is installed])
+- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gsm/gsm.h>
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gsm.h>
-+ ]],
-+
[gsm_create(); ])
-+ ],
-+ [AC_MSG_RESULT(yes!!)
-+
AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
-+ ac_external_gsm="1"
-+ ],
-+ [AC_MSG_ERROR([Unable to use external
GSM library. If GSM development files are not available in the default
locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])])
-+ fi
-+ ]
-+ )
-+
-+
-+
- dnl # Sound device backend selection
- AC_SUBST(ac_pjmedia_snd)
- AC_ARG_ENABLE(sound,
-@@ -378,6 +452,26 @@ AC_ARG_ENABLE(sound,
- fi]
- )
-
-+dnl # Use external PortAudio installation
-+AC_SUBST(ac_external_pa,0)
-+AC_ARG_WITH(external-pa,
-+ AC_HELP_STRING([--with-external-pa],
-+ [Use external PortAudio development files, not the one in
"third_party" directory. When this option is set, make sure that PortAudio is
accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib
paths)]),
-+ [
-+ if test "x$with_external_pa" != "xno"; then
-+ # Test PortAudio installation
-+ AC_MSG_CHECKING([if external PortAudio devkit is installed])
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <portaudio.h>
-+ ]],
-+ [Pa_Initialize();])],
-+ [AC_MSG_RESULT(yes!!)
-+ ac_external_pa="1"
-+ ],
-+ [AC_MSG_ERROR([Unable to use PortAudio. If
PortAudio development files are not available in the default locations, use
CFLAGS and LDFLAGS env var to set the include/lib paths])])
-+ fi
-+ ]
-+ )
-+
- AC_SUBST(ac_pa_cflags)
- AC_CHECK_HEADER(sys/soundcard.h,
- [ac_pa_cflags="$ac_pa_cflags -DHAVE_SYS_SOUNDCARD_H"])
-@@ -754,8 +848,8 @@ AC_ARG_ENABLE(ssl,
- AC_SUBST(libssl_present)
- AC_SUBST(libcrypto_present)
- AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
-- AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 &&
LIBS="$LIBS -lssl"])
- AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1
&& LIBS="$LIBS -lcrypto"])
-+ AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 &&
LIBS="$LIBS -lssl"])
- if test "x$openssl_h_present" = "x1" -a "x$libssl_present" =
"x1" -a "x$libcrypto_present" = "x1"; then
- AC_MSG_RESULT([OpenSSL library found, SSL support
enabled])
- # PJSIP_HAS_TLS_TRANSPORT setting follows
PJ_HAS_SSL_SOCK
+ ]],
+
[gsm_create(); ])
+ ],
Index: patches/patch-build_mak_in
===================================================================
RCS file: patches/patch-build_mak_in
diff -N patches/patch-build_mak_in
--- patches/patch-build_mak_in 2 Apr 2010 11:48:24 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,85 +0,0 @@
-$OpenBSD: patch-build_mak_in,v 1.2 2010/04/02 11:48:24 dcoppa Exp $
-
-fix from upstream:
-enable use of system libraries for gsm, speex and portaudio
-
---- build.mak.in.orig Wed Apr 15 16:45:41 2009
-+++ build.mak.in Thu Apr 1 18:52:00 2010
-@@ -7,21 +7,33 @@ export TARGET_NAME := @target@
- export CROSS_COMPILE := @ac_cross_compile@
- export LINUX_POLL := @ac_linux_poll@
-
-+export ac_prefix := @prefix@
-+
- LIB_SUFFIX = $(TARGET_NAME).a
-
- # Determine which party libraries to use
- export APP_THIRD_PARTY_LIBS := -lresample-$(TARGET_NAME)
-lmilenage-$(TARGET_NAME) -lsrtp-$(TARGET_NAME)
-+export APP_THIRD_PARTY_EXT :=
- export APP_THIRD_PARTY_LIB_FILES =
$(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX)
$(PJ_DIR)/third_party/lib/libmilenage-$(LIB_SUFFIX)
$(PJ_DIR)/third_party/lib/libsrtp-$(LIB_SUFFIX)
-
- ifneq (@ac_no_gsm_codec@,1)
-+ifeq (@ac_external_gsm@,1)
-+# External GSM library
-+APP_THIRD_PARTY_EXT += -lgsm
-+else
- APP_THIRD_PARTY_LIBS += -lgsmcodec-$(TARGET_NAME)
- APP_THIRD_PARTY_LIB_FILES +=
$(PJ_DIR)/third_party/lib/libgsmcodec-$(LIB_SUFFIX)
- endif
-+endif
-
- ifneq (@ac_no_speex_codec@,1)
-+ifeq (@ac_external_speex@,1)
-+APP_THIRD_PARTY_EXT += -lspeex -lspeexdsp
-+else
- APP_THIRD_PARTY_LIBS += -lspeex-$(TARGET_NAME)
- APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libspeex-$(LIB_SUFFIX)
- endif
-+endif
-
- ifneq (@ac_no_ilbc_codec@,1)
- APP_THIRD_PARTY_LIBS += -lilbccodec-$(TARGET_NAME)
-@@ -34,9 +46,14 @@ APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib
- endif
-
- ifneq ($(findstring pa,@ac_pjmedia_snd@),)
-+ifeq (@ac_external_pa@,1)
-+# External PA
-+APP_THIRD_PARTY_EXT += -lportaudio
-+else
- APP_THIRD_PARTY_LIBS += -lportaudio-$(TARGET_NAME)
- APP_THIRD_PARTY_LIB_FILES +=
$(PJ_DIR)/third_party/lib/libportaudio-$(LIB_SUFFIX)
- endif
-+endif
-
- # Additional flags
- @ac_build_mak_vars@
-@@ -69,6 +86,7 @@ export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\
- -lpjnath-$(TARGET_NAME)\
- -lpjlib-util-$(TARGET_NAME)\
- $(APP_THIRD_PARTY_LIBS)\
-+ $(APP_THIRD_PARTY_EXT)\
- -lpj-$(TARGET_NAME)\
- @LIBS@
- export APP_LIB_FILES = $(PJ_DIR)/pjsip/lib/libpjsua-$(LIB_SUFFIX) \
-@@ -83,6 +101,8 @@ export APP_LIB_FILES = $(PJ_DIR)/pjsip/lib/libpjsua-$(
- $(APP_THIRD_PARTY_LIB_FILES) \
- $(PJ_DIR)/pjlib/lib/libpj-$(LIB_SUFFIX)
-
-+# Here are the variabels to use if application is using the library
-+# from within the source distribution
- export PJ_DIR := $(PJDIR)
- export PJ_CC := $(APP_CC)
- export PJ_CFLAGS := $(APP_CFLAGS)
-@@ -91,3 +111,11 @@ export PJ_LDFLAGS := $(APP_LDFLAGS)
- export PJ_LDLIBS := $(APP_LDLIBS)
- export PJ_LIB_FILES := $(APP_LIB_FILES)
-
-+# And here are the variables to use if application is using the
-+# library from the install location (i.e. --prefix)
-+export PJ_INSTALL_DIR := @prefix@
-+export PJ_INSTALL_INC_DIR := $(PJ_INSTALL_DIR)/include
-+export PJ_INSTALL_LIB_DIR := $(PJ_INSTALL_DIR)/lib
-+export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 @CFLAGS@
-+export PJ_INSTALL_CXXFLAGS := $(PJ_INSTALL_CFLAGS)
-+export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(APP_LDLIBS)
Index: patches/patch-pjlib-util_src_pjlib-util-test_resolver_test_c
===================================================================
RCS file: patches/patch-pjlib-util_src_pjlib-util-test_resolver_test_c
diff -N patches/patch-pjlib-util_src_pjlib-util-test_resolver_test_c
--- patches/patch-pjlib-util_src_pjlib-util-test_resolver_test_c 2 Apr
2010 11:48:24 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-pjlib-util_src_pjlib-util-test_resolver_test_c,v 1.1
2010/04/02 11:48:24 dcoppa Exp $
-
-fix from upstream:
-fix bug in pjlib-util resolver test on OpenBSD
-
---- pjlib-util/src/pjlib-util-test/resolver_test.c.orig Thu Jan 1
21:56:36 2009
-+++ pjlib-util/src/pjlib-util-test/resolver_test.c Wed Mar 31 10:28:45 2010
-@@ -813,8 +813,8 @@ static int dns_test(void)
- /* Now only server 0 should get packet, since both servers are
- * in STATE_ACTIVE state
- */
-- pj_assert(g_server[0].pkt_count == 1);
-- pj_assert(g_server[1].pkt_count == 0);
-+ pj_assert((g_server[0].pkt_count == 1 && g_server[1].pkt_count == 0) ||
-+ (g_server[1].pkt_count == 1 && g_server[0].pkt_count == 0));
-
- /* Wait to allow probing period to complete */
- PJ_LOG(3,(THIS_FILE, " waiting for active NS to expire (%d sec)",
Index: patches/patch-pjlib_include_pj_compat_os_auto_h_in
===================================================================
RCS file: patches/patch-pjlib_include_pj_compat_os_auto_h_in
diff -N patches/patch-pjlib_include_pj_compat_os_auto_h_in
--- patches/patch-pjlib_include_pj_compat_os_auto_h_in 2 Apr 2010 11:48:24
-0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-pjlib_include_pj_compat_os_auto_h_in,v 1.1 2010/04/02 11:48:24
dcoppa Exp $
-
-fix from upstream:
-fixes in detecting header availability
-
---- pjlib/include/pj/compat/os_auto.h.in.orig Mon Oct 26 16:47:52 2009
-+++ pjlib/include/pj/compat/os_auto.h.in Wed Mar 31 10:28:45 2010
-@@ -71,6 +71,8 @@
- #undef PJ_HAS_SYS_TIME_H
- #undef PJ_HAS_SYS_TIMEB_H
- #undef PJ_HAS_SYS_TYPES_H
-+#undef PJ_HAS_SYS_FILIO_H
-+#undef PJ_HAS_SYS_SOCKIO_H
- #undef PJ_HAS_TIME_H
- #undef PJ_HAS_UNISTD_H
-
Index: patches/patch-pjlib_include_pj_compat_socket_h
===================================================================
RCS file: patches/patch-pjlib_include_pj_compat_socket_h
diff -N patches/patch-pjlib_include_pj_compat_socket_h
--- patches/patch-pjlib_include_pj_compat_socket_h 2 Apr 2010 11:48:24
-0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-$OpenBSD: patch-pjlib_include_pj_compat_socket_h,v 1.2 2010/04/02 11:48:24
dcoppa Exp $
-
-fix from upstream:
-fixes in detecting header availability
-
---- pjlib/include/pj/compat/socket.h.orig Sat Oct 24 02:00:40 2009
-+++ pjlib/include/pj/compat/socket.h Wed Mar 31 10:28:45 2010
-@@ -139,6 +139,14 @@
- # include <unistd.h>
- #endif
-
-+#if defined(PJ_HAS_SYS_FILIO_H) && PJ_HAS_SYS_FILIO_H != 0
-+# include <sys/filio.h>
-+#endif
-+
-+#if defined(PJ_HAS_SYS_SOCKIO_H) && PJ_HAS_SYS_SOCKIO_H != 0
-+# include <sys/sockio.h>
-+#endif
-+
-
- /*
- * Define common errors.
Index: patches/patch-pjlib_src_pj_guid_simple_c
===================================================================
RCS file: patches/patch-pjlib_src_pj_guid_simple_c
diff -N patches/patch-pjlib_src_pj_guid_simple_c
--- patches/patch-pjlib_src_pj_guid_simple_c 2 Apr 2010 11:48:24 -0000
1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-pjlib_src_pj_guid_simple_c,v 1.1 2010/04/02 11:48:24 dcoppa
Exp $
-
-fix from upstream:
-better GUID generation on OpenBSD
-
---- pjlib/src/pj/guid_simple.c.orig Tue Dec 23 18:27:53 2008
-+++ pjlib/src/pj/guid_simple.c Wed Mar 31 10:28:45 2010
-@@ -67,10 +67,12 @@ PJ_DEF(pj_str_t*) pj_generate_unique_string(pj_str_t *
- pj_assert(PJ_GUID_STRING_LENGTH % 2 == 0);
-
- for (p=str->ptr, end=p+PJ_GUID_STRING_LENGTH; p<end; ) {
-- /* Assumes rand() only has 16bit randomness */
-- unsigned short val = pj_rand();
-- *p++ = guid_chars[(val >> 8) & 63];
-- *p++ = guid_chars[(val & 0xFF) & 63];
-+ pj_uint32_t rand_val = pj_rand();
-+ pj_uint32_t rand_idx = RAND_MAX;
-+
-+ for ( ; rand_idx>0 && p<end; rand_idx>>=8, rand_val>>=8, p++) {
-+ *p = guid_chars[(rand_val & 0xFF) & 63];
-+ }
- }
-
- str->slen = PJ_GUID_STRING_LENGTH;
Index: patches/patch-pjlib_src_pj_os_core_unix_c
===================================================================
RCS file: /cvs/ports/telephony/pjsua/patches/patch-pjlib_src_pj_os_core_unix_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-pjlib_src_pj_os_core_unix_c
--- patches/patch-pjlib_src_pj_os_core_unix_c 2 Apr 2010 11:48:24 -0000
1.1
+++ patches/patch-pjlib_src_pj_os_core_unix_c 3 May 2010 13:38:33 -0000
@@ -1,39 +1,27 @@
-$OpenBSD: patch-pjlib_src_pj_os_core_unix_c,v 1.1 2010/04/02 11:48:24 dcoppa
Exp $
+$OpenBSD$
-fix undefined sched_get_priority_max() and sched_get_priority_min()
-on OpenBSD
-protect both functions with #ifdef _POSIX_PRIORITY_SCHEDULING and
-return 0 if __OpenBSD__ macro is declared
+31 is FreeBSD-only. Return 0 for sched_get_priority_max()
---- pjlib/src/pj/os_core_unix.c.orig Wed Aug 5 12:58:02 2009
-+++ pjlib/src/pj/os_core_unix.c Wed Mar 31 10:28:45 2010
-@@ -308,7 +308,14 @@ PJ_DEF(int) pj_thread_get_prio_min(pj_thread_t *thread
- if (rc != 0)
- return -1;
+--- pjlib/src/pj/os_core_unix.c.orig Wed Jan 13 14:09:45 2010
++++ pjlib/src/pj/os_core_unix.c Mon May 3 10:34:25 2010
+@@ -310,7 +310,7 @@ PJ_DEF(int) pj_thread_get_prio_min(pj_thread_t *thread
-+#if defined _POSIX_PRIORITY_SCHEDULING
+ #if defined _POSIX_PRIORITY_SCHEDULING
return sched_get_priority_min(policy);
-+#elif defined __OpenBSD__
-+ return 0;
-+#else
-+ pj_assert("pj_thread_get_prio_min() not supported!");
-+ return 0;
-+#endif
- }
-
+-#elif defined __OpenBSD__
++#elif defined __FreeBSD__ || defined __OpenBSD__
+ return 0;
+ #else
+ pj_assert("pj_thread_get_prio_min() not supported!");
+@@ -334,8 +334,10 @@ PJ_DEF(int) pj_thread_get_prio_max(pj_thread_t *thread
-@@ -325,7 +332,14 @@ PJ_DEF(int) pj_thread_get_prio_max(pj_thread_t *thread
- if (rc != 0)
- return -1;
-
-+#if defined _POSIX_PRIORITY_SCHEDULING
+ #if defined _POSIX_PRIORITY_SCHEDULING
return sched_get_priority_max(policy);
+-#elif defined __OpenBSD__
++#elif defined __FreeBSD__
+ return 31;
+#elif defined __OpenBSD__
+ return 0;
-+#else
-+ pj_assert("pj_thread_get_prio_max() not supported!");
-+ return 0;
-+#endif
- }
-
-
+ #else
+ pj_assert("pj_thread_get_prio_max() not supported!");
+ return 0;
Index: patches/patch-pjlib_src_pjlib-test_activesock_c
===================================================================
RCS file: patches/patch-pjlib_src_pjlib-test_activesock_c
diff -N patches/patch-pjlib_src_pjlib-test_activesock_c
--- patches/patch-pjlib_src_pjlib-test_activesock_c 2 Apr 2010 11:48:24
-0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-$OpenBSD: patch-pjlib_src_pjlib-test_activesock_c,v 1.1 2010/04/02 11:48:24
dcoppa Exp $
-
-fix from upstream:
-reduce the loop in PJLIB activesock test
-
---- pjlib/src/pjlib-test/activesock.c.orig Fri Jan 8 10:53:31 2010
-+++ pjlib/src/pjlib-test/activesock.c Wed Mar 31 10:28:45 2010
-@@ -337,7 +337,7 @@ static pj_bool_t tcp_on_data_sent(pj_activesock_t *aso
-
- static int tcp_perf_test(void)
- {
-- enum { COUNT=100000 };
-+ enum { COUNT=10000 };
- pj_pool_t *pool = NULL;
- pj_ioqueue_t *ioqueue = NULL;
- pj_sock_t sock1=PJ_INVALID_SOCKET, sock2=PJ_INVALID_SOCKET;
-@@ -436,6 +436,15 @@ static int tcp_perf_test(void)
- }
- }
- }
-+
-+#ifndef PJ_SYMBIAN
-+ for (;;) {
-+ pj_time_val timeout = {0, 10};
-+ if (pj_ioqueue_poll(ioqueue, &timeout) < 1)
-+ break;
-+ }
-+#endif
-+
- }
-
- /* Wait until everything has been sent/received */
Index: patches/patch-pjlib_src_pjlib-test_ioq_unreg_c
===================================================================
RCS file: patches/patch-pjlib_src_pjlib-test_ioq_unreg_c
diff -N patches/patch-pjlib_src_pjlib-test_ioq_unreg_c
--- patches/patch-pjlib_src_pjlib-test_ioq_unreg_c 2 Apr 2010 11:48:24
-0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-pjlib_src_pjlib-test_ioq_unreg_c,v 1.1 2010/04/02 11:48:24
dcoppa Exp $
-
-fix from upstream:
-fix bug in ioqueue unregistration test which caused assertion error
-in destroying mutex on OpenBSD
-
---- pjlib/src/pjlib-test/ioq_unreg.c.orig Thu Jul 2 10:24:22 2009
-+++ pjlib/src/pjlib-test/ioq_unreg.c Wed Mar 31 10:28:45 2010
-@@ -93,6 +93,7 @@ static void on_read_complete(pj_ioqueue_key_t *key,
- if (PJ_TIME_VAL_GTE(now, time_to_unregister)) {
- sock_data.unregistered = 1;
- pj_ioqueue_unregister(key);
-+ pj_mutex_unlock(sock_data.mutex);
- return;
- }
- }
Index: patches/patch-pjmedia_build_Makefile
===================================================================
RCS file: patches/patch-pjmedia_build_Makefile
diff -N patches/patch-pjmedia_build_Makefile
--- patches/patch-pjmedia_build_Makefile 2 Apr 2010 11:48:24 -0000
1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-pjmedia_build_Makefile,v 1.1 2010/04/02 11:48:24 dcoppa Exp $
-
-fix from upstream:
-enable use of system libraries for gsm, speex and portaudio
-
---- pjmedia/build/Makefile.orig Tue Nov 10 06:26:37 2009
-+++ pjmedia/build/Makefile Wed Mar 31 10:28:45 2010
-@@ -1,7 +1,6 @@
- include ../../build.mak
-
- THIRD_PARTY:=$(PJDIR)/third_party
--PA_DIR := $(THIRD_PARTY)/build/portaudio/src
-
- SRTP_INC=$(CC_INC)$(THIRD_PARTY)/build/srtp \
- $(CC_INC)$(THIRD_PARTY)/srtp/crypto/include \
-@@ -41,6 +40,7 @@ export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJMEDIA_LI
- $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
- -L$(PJDIR)/third_party/lib \
- $(APP_THIRD_PARTY_LIBS) \
-+ $(APP_THIRD_PARTY_EXT) \
- $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
- $(LDFLAGS)
-
Index: patches/patch-pjmedia_build_os-auto_mak_in
===================================================================
RCS file: patches/patch-pjmedia_build_os-auto_mak_in
diff -N patches/patch-pjmedia_build_os-auto_mak_in
--- patches/patch-pjmedia_build_os-auto_mak_in 2 Apr 2010 11:48:24 -0000
1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-pjmedia_build_os-auto_mak_in,v 1.1 2010/04/02 11:48:24 dcoppa
Exp $
-
-fix from upstream:
-enable use of system libraries for gsm, speex and portaudio
-
---- pjmedia/build/os-auto.mak.in.orig Wed Jun 3 14:29:35 2009
-+++ pjmedia/build/os-auto.mak.in Wed Mar 31 10:28:45 2010
-@@ -86,7 +86,13 @@ endif
- # PortAudio
- #
- ifneq ($(findstring pa,$(AC_PJMEDIA_SND)),)
-+ifeq (@ac_external_pa@,1)
-+# External PA
-+export CFLAGS += -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=1
-+else
-+# Our PA in third_party
- export CFLAGS += -I$(THIRD_PARTY)/build/portaudio
-I$(THIRD_PARTY)/portaudio/include -DPJMEDIA_AUDIO_DEV_HAS_PORTAUDIO=1
-+endif
- endif
-
- #
Index: patches/patch-pjmedia_include_pjmedia-codec_config_auto_h_in
===================================================================
RCS file: patches/patch-pjmedia_include_pjmedia-codec_config_auto_h_in
diff -N patches/patch-pjmedia_include_pjmedia-codec_config_auto_h_in
--- patches/patch-pjmedia_include_pjmedia-codec_config_auto_h_in 2 Apr
2010 11:48:24 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-$OpenBSD: patch-pjmedia_include_pjmedia-codec_config_auto_h_in,v 1.1
2010/04/02 11:48:24 dcoppa Exp $
-
-fix from upstream:
-enable use of system libraries for gsm, speex and portaudio
-
---- pjmedia/include/pjmedia-codec/config_auto.h.in.orig Wed Apr 15
16:45:41 2009
-+++ pjmedia/include/pjmedia-codec/config_auto.h.in Wed Mar 31 10:28:45 2010
-@@ -42,12 +42,14 @@
- #undef PJMEDIA_HAS_GSM_CODEC
- #endif
-
-+#undef PJMEDIA_EXTERNAL_GSM_CODEC
-
- /* Speex codec */
- #ifndef PJMEDIA_HAS_SPEEX_CODEC
- #undef PJMEDIA_HAS_SPEEX_CODEC
- #endif
-
-+#undef PJMEDIA_EXTERNAL_SPEEX_CODEC
-
- /* iLBC codec */
- #ifndef PJMEDIA_HAS_ILBC_CODEC
Index: patches/patch-pjmedia_src_pjmedia-audiodev_pa_dev_c
===================================================================
RCS file: patches/patch-pjmedia_src_pjmedia-audiodev_pa_dev_c
diff -N patches/patch-pjmedia_src_pjmedia-audiodev_pa_dev_c
--- patches/patch-pjmedia_src_pjmedia-audiodev_pa_dev_c 2 Apr 2010 11:48:24
-0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-$OpenBSD: patch-pjmedia_src_pjmedia-audiodev_pa_dev_c,v 1.1 2010/04/02
11:48:24 dcoppa Exp $
-
-fix from upstream:
-fix a bug with PaUtil_SetDebugPrintFunction() and external portaudio
-
---- pjmedia/src/pjmedia-audiodev/pa_dev.c.orig Wed Jun 3 14:29:35 2009
-+++ pjmedia/src/pjmedia-audiodev/pa_dev.c Wed Mar 31 10:28:45 2010
-@@ -30,6 +30,11 @@
- #define THIS_FILE "pa_dev.c"
- #define DRIVER_NAME "PA"
-
-+/* Enable call to PaUtil_SetDebugPrintFunction, but this is not always
-+ * available across all PortAudio versions (?)
-+ */
-+/*#define USE_PA_DEBUG_PRINT */
-+
- struct pa_aud_factory
- {
- pjmedia_aud_dev_factory base;
-@@ -404,6 +409,7 @@ static int PaRecorderPlayerCallback( const void *input
- return rc;
- }
-
-+#ifdef USE_PA_DEBUG_PRINT
- /* Logging callback from PA */
- static void pa_log_cb(const char *log)
- {
-@@ -415,6 +421,7 @@ static void pa_log_cb(const char *log)
- */
- typedef void (*PaUtilLogCallback ) (const char *log);
- void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb);
-+#endif
-
-
- /*
-@@ -442,7 +449,9 @@ static pj_status_t pa_init(pjmedia_aud_dev_factory *f)
-
- PJ_UNUSED_ARG(f);
-
-+#ifdef USE_PA_DEBUG_PRINT
- PaUtil_SetDebugPrintFunction(&pa_log_cb);
-+#endif
-
- err = Pa_Initialize();
-
Index: patches/patch-pjmedia_src_pjmedia-codec_gsm_c
===================================================================
RCS file:
/cvs/ports/telephony/pjsua/patches/patch-pjmedia_src_pjmedia-codec_gsm_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-pjmedia_src_pjmedia-codec_gsm_c
--- patches/patch-pjmedia_src_pjmedia-codec_gsm_c 2 Apr 2010 11:48:24
-0000 1.1
+++ patches/patch-pjmedia_src_pjmedia-codec_gsm_c 3 May 2010 13:38:33
-0000
@@ -1,25 +1,15 @@
-$OpenBSD: patch-pjmedia_src_pjmedia-codec_gsm_c,v 1.1 2010/04/02 11:48:24
dcoppa Exp $
+$OpenBSD$
fix header detection when using external libgsm on OpenBSD
---- pjmedia/src/pjmedia-codec/gsm.c.orig Sat Jun 13 17:28:37 2009
-+++ pjmedia/src/pjmedia-codec/gsm.c Wed Mar 31 16:14:16 2010
-@@ -28,12 +28,17 @@
- #include <pj/pool.h>
- #include <pj/string.h>
- #include <pj/os.h>
--#include "../../third_party/gsm/inc/gsm.h"
-
- /*
- * Only build this file if PJMEDIA_HAS_GSM_CODEC != 0
- */
+--- pjmedia/src/pjmedia-codec/gsm.c.orig Sat May 1 18:44:16 2010
++++ pjmedia/src/pjmedia-codec/gsm.c Sat May 1 18:44:50 2010
+@@ -35,7 +35,7 @@
#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC != 0
-+
-+#if defined(PJMEDIA_EXTERNAL_GSM_CODEC) && PJMEDIA_EXTERNAL_GSM_CODEC
-+# include <gsm.h>
-+#else
-+# include "../../third_party/gsm/inc/gsm.h"
-+#endif
- /* We removed PLC in 0.6 (and re-enabled it again in 0.9!) */
- #define PLC_DISABLED 0
+ #if defined(PJMEDIA_EXTERNAL_GSM_CODEC) && PJMEDIA_EXTERNAL_GSM_CODEC
+-# include <gsm/gsm.h>
++# include <gsm.h>
+ #else
+ # include "../../third_party/gsm/inc/gsm.h"
+ #endif
Index: patches/patch-pjsip_include_pjsua_h
===================================================================
RCS file: patches/patch-pjsip_include_pjsua_h
diff -N patches/patch-pjsip_include_pjsua_h
--- patches/patch-pjsip_include_pjsua_h 2 Apr 2010 11:48:24 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-$OpenBSD: patch-pjsip_include_pjsua_h,v 1.1 2010/04/02 11:48:24 dcoppa Exp $
-
-fix from upstream:
-missing include
-
---- pjsip/include/pjsua.h.orig Wed Mar 31 10:28:45 2010
-+++ pjsip/include/pjsua.h Wed Mar 31 10:28:45 2010
-@@ -0,0 +1 @@
-+#include <pjsua-lib/pjsua.h>
Index: patches/patch-pjsip_src_pjsip_sip_transport_udp_c
===================================================================
RCS file: patches/patch-pjsip_src_pjsip_sip_transport_udp_c
diff -N patches/patch-pjsip_src_pjsip_sip_transport_udp_c
--- patches/patch-pjsip_src_pjsip_sip_transport_udp_c 2 Apr 2010 11:48:24
-0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,63 +0,0 @@
-$OpenBSD: patch-pjsip_src_pjsip_sip_transport_udp_c,v 1.1 2010/04/02 11:48:24
dcoppa Exp $
-
-fix from upstream:
-remove the code that silently set SO_SNDBUF/SO_RCVBUF as it's not
-compatible with all platforms
-
---- pjsip/src/pjsip/sip_transport_udp.c.orig Tue Mar 17 12:25:52 2009
-+++ pjsip/src/pjsip/sip_transport_udp.c Wed Mar 31 10:28:45 2010
-@@ -50,12 +50,19 @@
- *
- * More experiments are needed probably.
- */
-+/* 2010/01/14
-+ * Too many people complained about seeing "Error setting SNDBUF" log,
-+ * so lets just remove this. People who want to have SNDBUF set can
-+ * still do so by declaring these two macros in config_site.h
-+ */
- #ifndef PJSIP_UDP_SO_SNDBUF_SIZE
--# define PJSIP_UDP_SO_SNDBUF_SIZE (24*1024*1024)
-+/*# define PJSIP_UDP_SO_SNDBUF_SIZE (24*1024*1024)*/
-+# define PJSIP_UDP_SO_SNDBUF_SIZE 0
- #endif
-
- #ifndef PJSIP_UDP_SO_RCVBUF_SIZE
--# define PJSIP_UDP_SO_RCVBUF_SIZE (24*1024*1024)
-+/*# define PJSIP_UDP_SO_RCVBUF_SIZE (24*1024*1024)*/
-+# define PJSIP_UDP_SO_RCVBUF_SIZE 0
- #endif
-
-
-@@ -550,10 +557,13 @@ static void udp_set_socket(struct udp_transport *tp,
- pj_sock_t sock,
- const pjsip_host_port *a_name)
- {
-+#if PJSIP_UDP_SO_RCVBUF_SIZE || PJSIP_UDP_SO_SNDBUF_SIZE
- long sobuf_size;
- pj_status_t status;
-+#endif
-
- /* Adjust socket rcvbuf size */
-+#if PJSIP_UDP_SO_RCVBUF_SIZE
- sobuf_size = PJSIP_UDP_SO_RCVBUF_SIZE;
- status = pj_sock_setsockopt(sock, pj_SOL_SOCKET(), pj_SO_RCVBUF(),
- &sobuf_size, sizeof(sobuf_size));
-@@ -563,8 +573,10 @@ static void udp_set_socket(struct udp_transport *tp,
- PJ_LOG(4,(THIS_FILE, "Error setting SO_RCVBUF: %s [%d]", errmsg,
- status));
- }
-+#endif
-
- /* Adjust socket sndbuf size */
-+#if PJSIP_UDP_SO_SNDBUF_SIZE
- sobuf_size = PJSIP_UDP_SO_SNDBUF_SIZE;
- status = pj_sock_setsockopt(sock, pj_SOL_SOCKET(), pj_SO_SNDBUF(),
- &sobuf_size, sizeof(sobuf_size));
-@@ -574,6 +586,7 @@ static void udp_set_socket(struct udp_transport *tp,
- PJ_LOG(4,(THIS_FILE, "Error setting SO_SNDBUF: %s [%d]", errmsg,
- status));
- }
-+#endif
-
- /* Set the socket. */
- tp->sock = sock;
Index: patches/patch-third_party_build_os-auto_mak_in
===================================================================
RCS file: patches/patch-third_party_build_os-auto_mak_in
diff -N patches/patch-third_party_build_os-auto_mak_in
--- patches/patch-third_party_build_os-auto_mak_in 2 Apr 2010 11:48:24
-0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-$OpenBSD: patch-third_party_build_os-auto_mak_in,v 1.1 2010/04/02 11:48:24
dcoppa Exp $
-
-fix from upstream:
-enable use of system libraries for gsm, speex and portaudio
-
---- third_party/build/os-auto.mak.in.orig Wed Apr 15 16:45:41 2009
-+++ third_party/build/os-auto.mak.in Wed Mar 31 10:28:45 2010
-@@ -1,21 +1,33 @@
-
- ifneq (@ac_no_gsm_codec@,1)
-+ifeq (@ac_external_gsm@,1)
-+# External
-+else
- DIRS += gsm
- endif
-+endif
-
- ifneq (@ac_no_ilbc_codec@,1)
- DIRS += ilbc
- endif
-
- ifneq (@ac_no_speex_codec@,1)
-+ifeq (@ac_external_speex@,1)
-+# External speex
-+else
- DIRS += speex
- endif
-+endif
-
- ifneq (@ac_no_g7221_codec@,1)
- DIRS += g7221
- endif
-
- ifneq ($(findstring pa,@ac_pjmedia_snd@),)
-+ifeq (@ac_external_pa@,1)
-+# External PA
-+else
- DIRS += portaudio
-+endif
- endif
-