From 1b69d5fe64611fbcb31f7ae6b167432ea424fd11 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 1 Sep 2009 00:16:22 +0000 Subject: [PATCH] - Update to 2.6.4 - While here, fix build WITH_SDL (should be submitted upstream as well) PR: 138309 Submitted by: "Alexander V. Chernikov" (maintainer) --- devel/ptlib26/Makefile | 12 +-- devel/ptlib26/distinfo | 6 +- devel/ptlib26/files/patch-critsec.h | 23 ------ .../ptlib26/files/patch-include_ptclib_vsdl.h | 11 --- .../patch-src__ptlib__common__osutils.cxx | 27 ------- .../files/patch-src__ptlib__unix__svcproc.cxx | 26 ------- devel/ptlib26/files/patch-src_ptclib_vsdl.cxx | 11 --- devel/ptlib26/files/patch-threads | 73 ++++++++++--------- devel/ptlib26/files/patch-unix_config.cxx | 4 +- devel/ptlib26/pkg-plist | 16 ++-- 10 files changed, 59 insertions(+), 150 deletions(-) delete mode 100644 devel/ptlib26/files/patch-critsec.h delete mode 100644 devel/ptlib26/files/patch-include_ptclib_vsdl.h delete mode 100644 devel/ptlib26/files/patch-src__ptlib__common__osutils.cxx delete mode 100644 devel/ptlib26/files/patch-src__ptlib__unix__svcproc.cxx delete mode 100644 devel/ptlib26/files/patch-src_ptclib_vsdl.cxx diff --git a/devel/ptlib26/Makefile b/devel/ptlib26/Makefile index 4394ef1da428..69570ecc101e 100644 --- a/devel/ptlib26/Makefile +++ b/devel/ptlib26/Makefile @@ -6,7 +6,7 @@ # PORTNAME= ptlib -PORTVERSION= 2.6.1 +PORTVERSION= 2.6.4 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/ptlib/2.6 @@ -41,10 +41,10 @@ ALL_TARGET= optshared # if explicitely asked for, depend upon it .if defined(WITH_SDL) USE_SDL+= sdl -CONFIGURE_ENV+= SDL_CFLAGS="`sdl-config --cflags`" \ - SDL_LIBS="`sdl-config --libs`" -MAKE_ENV+= SDL_CFLAGS="`sdl-config --cflags`" \ - SDL_LIBS="`sdl-config --libs`" +CONFIGURE_ENV+= SDL_CFLAGS="`${SDL_CONFIG} --cflags`" \ + SDL_LIBS="`${SDL_CONFIG} --libs`" +MAKE_ENV+= SDL_CFLAGS="`${SDL_CONFIG} --cflags`" \ + SDL_LIBS="`${SDL_CONFIG} --libs`" .endif .if defined(WITH_ODBC) @@ -135,6 +135,8 @@ PLIST_SUB+= V4L="@comment " .endif post-patch: + @${REINPLACE_CMD} -e 's|SDL11/|SDL/|' ${WRKSRC}/src/ptclib/vsdl.cxx \ + ${WRKSRC}/include/ptclib/vsdl.h .if ${ARCH} == sparc64 && ${OSVERSION} <= 700003 @${REINPLACE_CMD} -e 's|P_PTHREADS_XPG6|0|' ${WRKSRC}/src/ptlib/unix/tlibthrd.cxx .endif diff --git a/devel/ptlib26/distinfo b/devel/ptlib26/distinfo index 8a3f2298d6ab..520ab710fdba 100644 --- a/devel/ptlib26/distinfo +++ b/devel/ptlib26/distinfo @@ -1,3 +1,3 @@ -MD5 (ptlib-2.6.1.tar.gz) = 7b61aa08f7bc98cdf5bbe7a909f7eed2 -SHA256 (ptlib-2.6.1.tar.gz) = f90f7296e3c26ca389038d54f7ede1ef33b85f1a0f622e97afeddada6593a1d9 -SIZE (ptlib-2.6.1.tar.gz) = 4858229 +MD5 (ptlib-2.6.4.tar.gz) = 1fda52b3f3e899ff13481cc40d58f673 +SHA256 (ptlib-2.6.4.tar.gz) = 4136dba647faa976decee7201ef310b8a5806c9f191cceffb4955a218bd4ff43 +SIZE (ptlib-2.6.4.tar.gz) = 4858735 diff --git a/devel/ptlib26/files/patch-critsec.h b/devel/ptlib26/files/patch-critsec.h deleted file mode 100644 index 8cc0a2685ecf..000000000000 --- a/devel/ptlib26/files/patch-critsec.h +++ /dev/null @@ -1,23 +0,0 @@ ---- include/ptlib/critsec.h.orig 2009-04-25 15:01:31.000000000 +0400 -+++ include/ptlib/critsec.h 2009-04-25 15:02:45.000000000 +0400 -@@ -249,13 +249,13 @@ - __inline PAtomicInteger::IntegerType PAtomicInteger::operator--(int) { return EXCHANGE_AND_ADD(&m_value, -1); } - __inline void PAtomicInteger::SetValue(IntegerType value) { m_value = value; } - #else --__inline PAtomicInteger::PAtomicInteger(IntegerType value) : m_value(value) { pthread_mutex_init(&mutex, NULL); } --__inline PAtomicInteger::~PAtomicInteger() { pthread_mutex_destroy(&mutex); } --__inline PAtomicInteger::IntegerType PAtomicInteger::operator++() { pthread_mutex_lock(&mutex); int retval = ++m_value; pthread_mutex_unlock(&mutex); return retval; } --__inline PAtomicInteger::IntegerType PAtomicInteger::operator++(int) { pthread_mutex_lock(&mutex); int retval = m_value++; pthread_mutex_unlock(&mutex); return retval; } --__inline PAtomicInteger::IntegerType PAtomicInteger::operator--() { pthread_mutex_lock(&mutex); int retval = --m_value; pthread_mutex_unlock(&mutex); return retval; } --__inline PAtomicInteger::IntegerType PAtomicInteger::operator--(int) { pthread_mutex_lock(&mutex); int retval = m_value--; pthread_mutex_unlock(&mutex); return retval; } --__inline void PAtomicInteger::SetValue(IntegerType v) { pthread_mutex_lock(&mutex); m_value = v; pthread_mutex_unlock(&mutex); } -+__inline PAtomicInteger::PAtomicInteger(IntegerType value) : m_value(value) { pthread_mutex_init(&m_mutex, NULL); } -+__inline PAtomicInteger::~PAtomicInteger() { pthread_mutex_destroy(&m_mutex); } -+__inline PAtomicInteger::IntegerType PAtomicInteger::operator++() { pthread_mutex_lock(&m_mutex); int retval = ++m_value; pthread_mutex_unlock(&m_mutex); return retval; } -+__inline PAtomicInteger::IntegerType PAtomicInteger::operator++(int) { pthread_mutex_lock(&m_mutex); int retval = m_value++; pthread_mutex_unlock(&m_mutex); return retval; } -+__inline PAtomicInteger::IntegerType PAtomicInteger::operator--() { pthread_mutex_lock(&m_mutex); int retval = --m_value; pthread_mutex_unlock(&m_mutex); return retval; } -+__inline PAtomicInteger::IntegerType PAtomicInteger::operator--(int) { pthread_mutex_lock(&m_mutex); int retval = m_value--; pthread_mutex_unlock(&m_mutex); return retval; } -+__inline void PAtomicInteger::SetValue(IntegerType v) { pthread_mutex_lock(&m_mutex); m_value = v; pthread_mutex_unlock(&m_mutex); } - #endif - - diff --git a/devel/ptlib26/files/patch-include_ptclib_vsdl.h b/devel/ptlib26/files/patch-include_ptclib_vsdl.h deleted file mode 100644 index 9a375b4df972..000000000000 --- a/devel/ptlib26/files/patch-include_ptclib_vsdl.h +++ /dev/null @@ -1,11 +0,0 @@ ---- include/ptclib/vsdl.h.orig 2008-09-25 14:51:15.000000000 +0800 -+++ include/ptclib/vsdl.h 2008-09-25 14:52:15.000000000 +0800 -@@ -33,7 +33,7 @@ - - #include - #if defined(P_FREEBSD) --#include -+#include - #else - #include - #endif diff --git a/devel/ptlib26/files/patch-src__ptlib__common__osutils.cxx b/devel/ptlib26/files/patch-src__ptlib__common__osutils.cxx deleted file mode 100644 index 742e7d8b2fe1..000000000000 --- a/devel/ptlib26/files/patch-src__ptlib__common__osutils.cxx +++ /dev/null @@ -1,27 +0,0 @@ ---- ./src/ptlib/common/osutils.cxx.orig 2009-02-14 22:04:50.000000000 +0100 -+++ ./src/ptlib/common/osutils.cxx 2009-02-14 22:04:55.000000000 +0100 -@@ -2152,21 +2152,21 @@ - PReadWriteMutex::Nest * PReadWriteMutex::GetNest() const - { - PWaitAndSignal mutex(nestingMutex); -- return nestedThreads.GetAt(POrdinalKey((PINDEX)PThread::GetCurrentThreadId())); -+ return nestedThreads.GetAt(POrdinalKey((unsigned long)PThread::GetCurrentThreadId())); - } - - - void PReadWriteMutex::EndNest() - { - nestingMutex.Wait(); -- nestedThreads.RemoveAt(POrdinalKey((PINDEX)PThread::GetCurrentThreadId())); -+ nestedThreads.RemoveAt(POrdinalKey((unsigned long)PThread::GetCurrentThreadId())); - nestingMutex.Signal(); - } - - - PReadWriteMutex::Nest & PReadWriteMutex::StartNest() - { -- POrdinalKey threadId = (PINDEX)PThread::GetCurrentThreadId(); -+ POrdinalKey threadId = (unsigned long)PThread::GetCurrentThreadId(); - - nestingMutex.Wait(); - diff --git a/devel/ptlib26/files/patch-src__ptlib__unix__svcproc.cxx b/devel/ptlib26/files/patch-src__ptlib__unix__svcproc.cxx deleted file mode 100644 index 6fe5f399d6b0..000000000000 --- a/devel/ptlib26/files/patch-src__ptlib__unix__svcproc.cxx +++ /dev/null @@ -1,26 +0,0 @@ ---- ./src/ptlib/unix/svcproc.cxx.orig 2009-02-14 22:03:27.000000000 +0100 -+++ ./src/ptlib/unix/svcproc.cxx 2009-02-14 22:03:32.000000000 +0100 -@@ -165,7 +165,7 @@ - #elif defined(BE_THREADS) - thread_id tid = ::find_thread(NULL); - #else -- unsigned tid = (unsigned) pthread_self(); -+ unsigned long tid = (unsigned long)pthread_self(); - #endif - *out << "ThreadID=0x" - << setfill('0') << ::hex -@@ -719,12 +719,12 @@ - #elif defined(BE_THREADS) - thread_id tid = ::find_thread(NULL); - #else -- unsigned tid = (unsigned) pthread_self(); -+ unsigned long tid = (unsigned long)pthread_self(); - #endif - PThread * thread_ptr = activeThreads.GetAt(tid); - - char msg[200]; -- sprintf(msg, "\nCaught %s, thread_id=%u", sigmsg, tid); -+ sprintf(msg, "\nCaught %s, thread_id=%lu", sigmsg, tid); - - if (thread_ptr != NULL) { - PString thread_name = thread_ptr->GetThreadName(); diff --git a/devel/ptlib26/files/patch-src_ptclib_vsdl.cxx b/devel/ptlib26/files/patch-src_ptclib_vsdl.cxx deleted file mode 100644 index 5485f017ae53..000000000000 --- a/devel/ptlib26/files/patch-src_ptclib_vsdl.cxx +++ /dev/null @@ -1,11 +0,0 @@ ---- src/ptclib/vsdl.cxx.orig 2008-09-25 14:50:57.000000000 +0800 -+++ src/ptclib/vsdl.cxx 2008-09-25 14:51:48.000000000 +0800 -@@ -44,7 +44,7 @@ - extern "C" { - - #if defined(P_FREEBSD) --#include -+#include - #else - #include - #endif diff --git a/devel/ptlib26/files/patch-threads b/devel/ptlib26/files/patch-threads index 6af06d959653..bda36756566d 100644 --- a/devel/ptlib26/files/patch-threads +++ b/devel/ptlib26/files/patch-threads @@ -1,5 +1,5 @@ ---- include/ptlib/unix/ptlib/contain.h.orig 2009-04-25 21:59:44.000000000 +0400 -+++ include/ptlib/unix/ptlib/contain.h 2009-04-25 22:01:14.000000000 +0400 +--- include/ptlib/unix/ptlib/contain.h.orig 2009-08-29 14:52:29.000000000 +0400 ++++ include/ptlib/unix/ptlib/contain.h 2009-08-29 14:52:33.000000000 +0400 @@ -81,9 +81,11 @@ #ifdef P_64BIT typedef long INT; @@ -12,20 +12,20 @@ #endif // Create "Windows" style definitions. ---- src/ptlib/unix/tlib.cxx 2009-03-18 06:43:30.000000000 +0300 -+++ src/ptlib/unix/tlib.cxx 2009-04-25 22:03:56.000000000 +0400 -@@ -400,7 +404,7 @@ +--- src/ptlib/unix/tlib.cxx.orig 2009-08-29 15:51:42.000000000 +0400 ++++ src/ptlib/unix/tlib.cxx 2009-08-29 15:51:45.000000000 +0400 +@@ -400,7 +400,7 @@ { if (PProcessInstance != NULL) { PWaitAndSignal m(PProcessInstance->activeThreadMutex); -- PThread & thread = PProcessInstance->activeThreads[(unsigned)id]; +- PThread & thread = PProcessInstance->activeThreads[(uintptr_t)id]; + PThread & thread = PProcessInstance->activeThreads[_hptr(id)]; return thread.GetThreadName(); } return psprintf("%08x", id); ---- src/ptlib/unix/tlibthrd.cxx 2009-03-18 06:43:30.000000000 +0300 -+++ src/ptlib/unix/tlibthrd.cxx 2009-04-25 22:03:45.000000000 +0400 -@@ -240,7 +240,7 @@ +--- src/ptlib/unix/tlibthrd.cxx.orig 2009-08-29 14:54:22.000000000 +0400 ++++ src/ptlib/unix/tlibthrd.cxx 2009-08-29 15:41:14.000000000 +0400 +@@ -250,7 +250,7 @@ { PWaitAndSignal m(activeThreadMutex); @@ -34,7 +34,7 @@ return PFalse; return pthread_kill(id, sig) == 0; -@@ -249,8 +249,8 @@ +@@ -259,8 +259,8 @@ void PProcess::PXSetThread(pthread_t id, PThread * thread) { activeThreadMutex.Wait(); @@ -45,32 +45,39 @@ activeThreadMutex.Signal(); if (currentThread != NULL) -@@ -891,7 +891,7 @@ - } +@@ -393,7 +393,7 @@ + if (id != 0) { + process.activeThreadMutex.Wait(); + pthread_detach(id); +- process.activeThreads.SetAt((unsigned)id, NULL); ++ process.activeThreads.SetAt(_hptr(id), NULL); + process.activeThreadMutex.Signal(); + } - // remove this thread from the active thread list -- process.activeThreads.SetAt((unsigned)id, NULL); -+ process.activeThreads.SetAt(_hptr(id), NULL); - - bool deleteThread = thread->autoDelete; // Get flag before releasing lock - ---- src/ptlib/common/osutils.cxx 2009-03-18 06:43:33.000000000 +0300 -+++ src/ptlib/common/osutils.cxx 2009-04-25 22:03:35.000000000 +0400 -@@ -1548,7 +1551,7 @@ - , m_library(false) +--- src/ptlib/common/osutils.cxx.orig 2009-08-29 15:55:29.000000000 +0400 ++++ src/ptlib/common/osutils.cxx 2009-08-29 15:55:32.000000000 +0400 +@@ -2208,21 +2208,21 @@ + PReadWriteMutex::Nest * PReadWriteMutex::GetNest() const { - activeThreads.DisallowDeleteObjects(); -- activeThreads.SetAt((PINDEX)GetCurrentThreadId(), this); -+ activeThreads.SetAt(_hptr(GetCurrentThreadId()), this); + PWaitAndSignal mutex(nestingMutex); +- return nestedThreads.GetAt(POrdinalKey((INT)PThread::GetCurrentThreadId())); ++ return nestedThreads.GetAt(POrdinalKey(_hptr(PThread::GetCurrentThreadId()))); + } - PProcessInstance = this; -@@ -1912,7 +1915,7 @@ - PProcess & process = PProcess::Current(); + void PReadWriteMutex::EndNest() + { + nestingMutex.Wait(); +- nestedThreads.RemoveAt(POrdinalKey((INT)PThread::GetCurrentThreadId())); ++ nestedThreads.RemoveAt(POrdinalKey(_hptr(PThread::GetCurrentThreadId()))); + nestingMutex.Signal(); + } - process.activeThreadMutex.Wait(); -- PThread * thread = process.activeThreads.GetAt((unsigned)GetCurrentThreadId()); -+ PThread * thread = process.activeThreads.GetAt(_hptr(GetCurrentThreadId())); - process.activeThreadMutex.Signal(); - if (thread == NULL) + PReadWriteMutex::Nest & PReadWriteMutex::StartNest() + { +- POrdinalKey threadId = (INT)PThread::GetCurrentThreadId(); ++ POrdinalKey threadId = _hptr(PThread::GetCurrentThreadId()); + + nestingMutex.Wait(); + diff --git a/devel/ptlib26/files/patch-unix_config.cxx b/devel/ptlib26/files/patch-unix_config.cxx index ede8a128fe8a..9b425933e7d9 100644 --- a/devel/ptlib26/files/patch-unix_config.cxx +++ b/devel/ptlib26/files/patch-unix_config.cxx @@ -4,8 +4,8 @@ #define EXTENSION ".ini" #define ENVIRONMENT_CONFIG_STR "/\~~environment~~\/" --#ifdef P_MACOSX -+#if defined(P_MACOSX) || defined(P_FREEBSD) +-#if defined(P_MACOSX) || defined(P_SOLARIS) ++#if defined(P_MACOSX) || defined(P_SOLARIS) || defined(P_FREEBSD) #define environ (NULL) #endif diff --git a/devel/ptlib26/pkg-plist b/devel/ptlib26/pkg-plist index 87f38c8da0be..7e6960a0b693 100644 --- a/devel/ptlib26/pkg-plist +++ b/devel/ptlib26/pkg-plist @@ -47,9 +47,9 @@ include/ptclib/random.h include/ptclib/rfc1155.h include/ptclib/shttpsvc.h include/ptclib/snmp.h -include/ptclib/sockagg.h include/ptclib/socks.h include/ptclib/telnet.h +include/ptclib/threadpool.h include/ptclib/url.h include/ptclib/vsdl.h include/ptclib/vxml.h @@ -77,7 +77,6 @@ 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 @@ -105,7 +104,6 @@ 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 @@ -161,8 +159,8 @@ include/ptlib/videoio1394dc.h lib/libpt.so lib/libpt.so.2 lib/libpt_s.a -lib/ptlib-2.6.1/devices/sound/oss_pwplugin.so -lib/ptlib-2.6.1/devices/videoinput/bsdvideo_pwplugin.so +lib/ptlib-2.6.4/devices/sound/oss_pwplugin.so +%%BSDVIDEO%%lib/ptlib-2.6.4/devices/videoinput/bsdvideo_pwplugin.so libdata/pkgconfig/ptlib.pc %%DATADIR%%/make/common.mak %%DATADIR%%/make/lib.mak @@ -173,10 +171,10 @@ libdata/pkgconfig/ptlib.pc %%DATADIR%%/make/unix.mak @dirrm %%DATADIR%%/make @dirrm %%DATADIR%% -@dirrm lib/ptlib-2.6.1/devices/videoinput -@dirrm lib/ptlib-2.6.1/devices/sound -@dirrm lib/ptlib-2.6.1/devices -@dirrm lib/ptlib-2.6.1 +%%BSDVIDEO%%@dirrm lib/ptlib-2.6.4/devices/videoinput +@dirrm lib/ptlib-2.6.4/devices/sound +@dirrm lib/ptlib-2.6.4/devices +@dirrm lib/ptlib-2.6.4 @dirrm include/ptlib/unix/ptlib @dirrm include/ptlib/unix @dirrm include/ptlib