ptlib2.6.0 stable port information

Package: ptlib2.6.0
Version: 2.6.0
Revision: 5
Maintainer: The Gnome Core Team
GCC: 4.0
BuildDependsOnly: true
BuildDepends: <<
cyrus-sasl2-dev (>= 2.1.22-1006),
expat1,
fink (>= 0.27.2),
openldap24-dev (>= 2.4.15-1),
openssl098-dev,
pkgconfig (>= 0.23),
sdl (>= 1.2.13-1),
unixodbc2 (>= 2.2.12-1) | unixodbc2-nox (>= 2.2.12-1)
<<
Depends: %N-shlibs (= %v-%r)
Conflicts: pwlib, pwlib1
Replaces: pwlib, pwlib1
Source: mirror:gnome:sources/ptlib/2.6/ptlib-%v.tar.bz2
Source-MD5: 87328d0c072b8a9837531f0ad0e926cf
PatchFile: %n.patch
Patchfile-MD5: 8ad4b4728866c7a4f1eee7c9c88f392b
PatchScript: <<
%{default_script}
perl -pi -e 's/-Wno-long-double//g' configure
<<
CompileScript: <<
#!/bin/sh -ev
./configure %c
make FINKROOT=%p
<<
InstallScript: <<
make install DESTDIR=%d
perl -pi -e 's,-I\$\(PTLIBDIR\)/include,,' %i/bin/ptlib-config %i/lib/pkgconfig/ptlib.pc
<<
DocFiles: ChangeLog* History.txt ReadMe.txt
SplitOff: <<
Package: %N-shlibs
Depends: <<
cyrus-sasl2-shlibs (>= 2.1.22-1006),
expat1-shlibs,
openldap24-shlibs (>= 2.4.15-1),
openssl098-shlibs,
sdl-shlibs (>= 1.2.13-1),
unixodbc2-shlibs (>= 2.2.12-1) | unixodbc2-nox-shlibs (>= 2.2.12-1)
<<
Files: lib/libpt.2.6.0.dylib
Shlibs: %p/lib/libpt.2.6.0.dylib 2.6.0 %n (>= 2.6.0-1)
DocFiles: ChangeLog* History.txt ReadMe.txt
<<
DescPackaging: <<
No clue if interface is at all stable...upstream doesn't
version it, so assume it drifts arbitrarily with each %v

makefile spaghetti puts global flags for external support libs
before ones in local source dirs, hard to fix Right, so just
hack to pass local first in an autoconf variable (to which
makefiles append) and then edit it back out of the intalled
config files.

Check whether _THREAD_SAFE is already defined (which it often
is) before #defining it...silences a ton of warnings about
redefining a token.

pssl.cxx d2i_DHparams_bio game is for openssl<0.9.8, not
platform-dependent. Scrap it, use BuildDepends:openssl098-dev
See: http://bugzilla.gnome.org/show_bug.cgi?id=574992

Gotta define the LIB_FILENAME before basing the soname and
installation targets on it.

configure checks for headers using CPP before declaring that
preprocessor is needed, so some .h presence tests fail
incorrectly. Don't care right now because associated
usability (compiler) test passes and "accepted by the
compiler, rejected by the preprocessor; proceeding with the
compiler's result".
<<
DescPort: <<
Makefile.in patched to use same filename patterns that were
built, based on MacPorts bug-report & patch:
https://trac.macports.org/attachment/ticket/16465/patch-Makefile.in.diff

Also add -install_name to lib.mak to get a public shared lib
that can be linked against even after build dir is deleted.
Also add -compatibility_version to the half-implemented darwin
support.

Import svn changes setpgrp semantics (use direct autoconf test
instead of platform guessing for number of arguments). But
adjust to make sure P_SETPGRP_NOPARM is always defined (avoid
bash syntax-error with null string to = test) and fix setting
of ptbuildopts.h token to be able to test it with #ifdef. See:
https://sourceforge.net/tracker/?func=detail&aid=2787700&group_id=204472&atid=989748
<<
Description: Cross-platform appplication library
DescDetail: <<
PTLib (Portable Tools Library) is a moderately large class library
that has it's genesis many years ago as PWLib (portable Windows
Library), a method to product applications to run on both Microsoft
Windows and Unix systems. It has also been ported to other systems
such as Mac OSX, VxWorks and other embedded systems

Since then the system has grown to include many classes that assist in
writing complete multi-platform applications. Classes for I/O
portability, multi- threading portability, aid in producing unix
daemons and NT services portably and all sorts of internet protocols
were added over the years. So it became a Portable Tools Library and
was renamed to PTLib.
<<
License: OSI-Approved
Homepage: http://openh323.sourceforge.net/

ptlib2.6.0 stable port .patch

diff -Nurd -x'*~' ptlib-2.6.0.orig/Makefile.in ptlib-2.6.0/Makefile.in
--- ptlib-2.6.0.orig/Makefile.in 2009-02-23 22:22:03.000000000 -0500
+++ ptlib-2.6.0/Makefile.in 2009-03-06 04:56:46.000000000 -0500
@@ -42,6 +42,8 @@
TARGETDIR=@TARGETDIR@

include make/ptlib.mak
+include make/common.mak
+include make/lib.mak

SUBDIRS := src
ifeq (1, $(HAS_PLUGINS))
@@ -85,11 +87,11 @@
$(DESTDIR)$(PREFIX)/share/ptlib/make ; \
do mkdir -p $$dir ; chmod 755 $$dir ; \
done )
- $(INSTALL) -m 444 $(PT_LIBDIR)/$(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@@BUILD_TYPE@@BUILD_NUMBER@ $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 444 $(PT_LIBDIR)/$(LIBNAME_PAT) $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 444 $(PT_LIBDIR)/lib$(PTLIB_BASE)_s.a $(DESTDIR)$(LIBDIR)
(cd $(DESTDIR)$(LIBDIR) ; \
rm -f $(PTLIB_FILE) ; \
- ln -sf $(PTLIB_FILE).@MAJOR_VERSION@.@MINOR_VERSION@@BUILD_TYPE@@BUILD_NUMBER@ $(PTLIB_FILE) \
+ ln -sf $(LIBNAME_PAT) $(PTLIB_FILE) \
)
ifeq (1, $(HAS_PLUGINS))
if test -e $(PT_LIBDIR)/device/; then \
diff -Nurd -x'*~' ptlib-2.6.0.orig/configure ptlib-2.6.0/configure
--- ptlib-2.6.0.orig/configure 2009-02-23 22:22:03.000000000 -0500
+++ ptlib-2.6.0/configure 2009-05-04 01:33:10.000000000 -0400
@@ -7668,6 +7668,64 @@



+P_SETPGRP_SYSTEMV=0
+{ echo "$as_me:$LINENO: checking if setpgrp takes no paramaters" >&5
+echo $ECHO_N "checking if setpgrp takes no paramaters... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+pid_t p = setpgrp();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ P_SETPGRP_NOPARM=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ P_SETPGRP_NOPARM=0
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if test ${P_SETPGRP_NOPARM} = 1 ; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define P_SETPGRP_NOPARM 1
+_ACEOF
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+


for ac_header in regex.h
@@ -14812,6 +14870,7 @@

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

+STDCCFLAGS="-I\$(PTLIBDIR)/include ${STDCCFLAGS}"

ac_config_files="$ac_config_files make/ptbuildopts.mak"

diff -Nurd -x'*~' ptlib-2.6.0.orig/include/ptbuildopts.h.in ptlib-2.6.0/include/ptbuildopts.h.in
--- ptlib-2.6.0.orig/include/ptbuildopts.h.in 2009-02-23 22:22:02.000000000 -0500
+++ ptlib-2.6.0/include/ptbuildopts.h.in 2009-05-04 00:40:31.000000000 -0400
@@ -151,6 +151,7 @@
#undef P_HAS_RECVMSG
#undef P_HAS_UPAD128_T
#undef P_HAS_INET_NTOP
+#undef P_SETPGRP_NOPARM


/////////////////////////////////////////////////
diff -Nurd -x'*~' ptlib-2.6.0.orig/include/ptlib/unix/ptlib/pmachdep.h ptlib-2.6.0/include/ptlib/unix/ptlib/pmachdep.h
--- ptlib-2.6.0.orig/include/ptlib/unix/ptlib/pmachdep.h 2009-02-23 22:22:02.000000000 -0500
+++ ptlib-2.6.0/include/ptlib/unix/ptlib/pmachdep.h 2009-05-04 00:43:28.000000000 -0400
@@ -50,7 +50,6 @@
#include

#define HAS_IFREQ
-#define PSETPGRP() setpgrp()

#if __GNU_LIBRARY__ < 6
#define P_LINUX_LIB_OLD
@@ -92,8 +91,6 @@

#define HAS_IFREQ

-#define PSETPGRP() setpgrp(0, 0)
-
///////////////////////////////////////////////////////////////////////////////
#elif defined(P_OPENBSD)

@@ -119,8 +116,6 @@

#define HAS_IFREQ

-#define PSETPGRP() setpgrp(0, 0)
-
///////////////////////////////////////////////////////////////////////////////
#elif defined(P_NETBSD)

@@ -148,8 +143,6 @@

#define HAS_IFREQ

-#define PSETPGRP() setpgrp(0, 0)
-
///////////////////////////////////////////////////////////////////////////////
#elif defined(P_SOLARIS)

@@ -181,8 +174,6 @@
} upad128_t;
#endif

-#define PSETPGRP() setpgrp()
-
#define INADDR_NONE -1
#if P_SOLARIS < 7
typedef int socklen_t;
@@ -212,7 +203,6 @@
#include

#define HAS_IFREQ
-#define PSETPGRP() setpgrp(0, 0)
#define raise(s) kill(getpid(),s)

extern "C" {
@@ -290,7 +280,6 @@
#include

#define wait3(s, o, r) waitpid(-1, s, o)
-#define PSETPGRP() setpgid(0,0)
int seteuid(uid_t euid);
int setegid(gid_t gid);

@@ -305,7 +294,9 @@
#elif defined (P_MACOSX) || defined(P_MACOS)

#if defined(P_PTHREADS)
+# ifndef _THREAD_SAFE
# define _THREAD_SAFE
+# endif
# define P_THREAD_SAFE_CLIB
# include
#endif
@@ -343,12 +334,6 @@

#define HAS_IFREQ

-// hf, 2008-12-25: apparently, earlier versions of 10.5.x needed a version
-// without parameters. however, something changed such that the 'old' version
-// is required again. (OS X 10.5.6)
-#define PSETPGRP() setpgrp(0, 0)
-
-
///////////////////////////////////////////////////////////////////////////////
#elif defined (P_AIX)

@@ -374,8 +359,6 @@

#define HAS_IFREQ

-#define PSETPGRP() setpgrp()
-
///////////////////////////////////////////////////////////////////////////////
#elif defined (P_IRIX)

@@ -402,8 +385,6 @@

typedef int socklen_t;

-#define PSETPGRP() setpgrp()
-
///////////////////////////////////////////////////////////////////////////////
#elif defined (P_VXWORKS)

@@ -504,7 +485,6 @@
#include

#define HAS_IFREQ
-#define PSETPGRP() setpgrp()

///////////////////////////////////////////////////////////////////////////////
#elif defined(P_CYGWIN)
@@ -541,6 +521,14 @@

typedef int SOCKET;

+#ifndef PSETPGRP
+#ifdef P_SETPGRP_NOPARM
+#define PSETPGRP() setpgrp()
+#else
+#define PSETPGRP() setpgrp(0, 0)
+#endif
+#endif
+
#ifdef P_PTHREADS

#include
diff -Nurd -x'*~' ptlib-2.6.0.orig/make/lib.mak ptlib-2.6.0/make/lib.mak
--- ptlib-2.6.0.orig/make/lib.mak 2009-02-23 22:21:57.000000000 -0500
+++ ptlib-2.6.0/make/lib.mak 2009-03-06 15:55:25.000000000 -0500
@@ -28,6 +28,8 @@
# $Date: 2008-10-03 11:41:08 +0000 (Fri, 03 Oct 2008) $
#

+LIB_FILENAME=libpt.$(SHAREDLIBEXT)
+
ifneq ($(OSTYPE),Darwin)
ifeq ($(BUILD_TYPE),.)
LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(BUILD_NUMBER)
@@ -97,7 +99,9 @@
ifeq ($(OSTYPE),mingw)
LDSOOPTS += -Wl,--kill-at
else
- ifneq ($(OSTYPE),Darwin)
+ ifeq ($(OSTYPE),Darwin)
+ LDSOOPTS += -install_name $(FINKROOT)/lib/$(LIB_SONAME) -compatibility_version $(MAJOR_VERSION).$(MINOR_VERSION).$(BUILD_NUMBER)
+ else
LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
endif
endif
diff -Nurd -x'*~' ptlib-2.6.0.orig/src/ptclib/pssl.cxx ptlib-2.6.0/src/ptclib/pssl.cxx
--- ptlib-2.6.0.orig/src/ptclib/pssl.cxx 2009-02-23 22:21:56.000000000 -0500
+++ ptlib-2.6.0/src/ptclib/pssl.cxx 2009-03-06 03:00:20.000000000 -0500
@@ -658,7 +658,7 @@
DH_free(dh);
}

-#if defined(__BEOS__) || (defined(__APPLE__) && P_MACOSX < 900) || defined(__OpenBSD__)
+#if 0
// 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...
diff -Nurd -x'*~' ptlib-2.6.0.orig/src/ptlib/unix/maccoreaudio.cxx ptlib-2.6.0/src/ptlib/unix/maccoreaudio.cxx
--- ptlib-2.6.0.orig/src/ptlib/unix/maccoreaudio.cxx 2009-02-23 22:21:55.000000000 -0500
+++ ptlib-2.6.0/src/ptlib/unix/maccoreaudio.cxx 2012-01-26 12:16:06.000000000 -0500
@@ -23,6 +23,7 @@
#include
#include // used for Volume Listener

+#include


PCREATE_SOUND_PLUGIN(CoreAudio, PSoundChannelCoreAudio);

ptlib2.6.0 _unstable_ port .patch