[34528] trunk/dports/net

reiffert at macports.org reiffert at macports.org
Wed Feb 27 10:38:25 PST 2008


Revision: 34528
          http://trac.macosforge.org/projects/macports/changeset/34528
Author:   reiffert at macports.org
Date:     2008-02-27 10:38:23 -0800 (Wed, 27 Feb 2008)

Log Message:
-----------
Initial commit. Fixing #1663

Added Paths:
-----------
    trunk/dports/net/pwlib/
    trunk/dports/net/pwlib/Portfile
    trunk/dports/net/pwlib/files/
    trunk/dports/net/pwlib/files/patch-all.diff

Added: trunk/dports/net/pwlib/Portfile
===================================================================
--- trunk/dports/net/pwlib/Portfile	                        (rev 0)
+++ trunk/dports/net/pwlib/Portfile	2008-02-27 18:38:23 UTC (rev 34528)
@@ -0,0 +1,67 @@
+# $Id: $
+
+PortSystem        1.0
+
+name              pwlib
+version           1.5.2
+distname           ${name}_${version}
+categories        net
+maintainers       openmaintainer
+description       PWLib libraries for openh323
+long_description  \
+		  libraries for openh323
+homepage          http://www.openh323.org
+master_sites      \
+		  http://www.openh323.org/bin/
+platforms         darwin
+checksums         md5 0fa33ba1b32b254abe0b731a52c0f2f9
+set worksrcdir    pwlib
+patchfiles	patch-all.diff
+configure.args    --mandir=${prefix}/share/man
+configure.env   PWLIBDIR="${worksrcpath}" \
+                CFLAGS="-I${prefix}/include" \
+		LDFLAGS="-L${prefix}/lib" \
+		CPPFLAGS="-I${prefix}/include" \
+		LD_LIBRARY_PATH="${worksrcpath}/lib"
+depends_lib	lib:libldap:openldap \
+		lib:libsdl:libsdl \
+		lib:libexpat:expat \
+		lib:libssl:openssl
+build.target      both
+post-patch {
+		reinplace "s|@@PREFIX@@|${prefix}|g" \
+			src/ptlib/unix/Makefile \
+			make/unix.mak
+}
+destroot {
+	# sigh sigh sigh
+        file mkdir ${destroot}${prefix}/include
+        file mkdir ${destroot}${prefix}/bin
+        file mkdir ${destroot}${prefix}/lib
+        file mkdir ${destroot}${prefix}/share/pwlib
+	system " cd ${worksrcpath} && \
+        chmod a+r lib/*dylib && \
+        cp -R lib/*dylib* ${destroot}${prefix}/lib/ && \
+        cp -R include/ptclib ${destroot}${prefix}/include/ && \
+        cp -R include/ptlib ${destroot}${prefix}/include/ && \
+        cp -R include/ptbuildopts.h ${destroot}${prefix}/include/ && \
+        cp -R include/ptlib.h ${destroot}${prefix}/include/ && \
+        cp tools/asnparser/obj*/asnparser ${destroot}${prefix}/bin/"
+        file mkdir ${destroot}${prefix}/share/pwlib/make/
+	system " cd ${worksrcpath} && \
+        cp -R make/*.mak ${destroot}${prefix}/share/pwlib/make/ && \
+        cp make/ptlib-config ${destroot}${prefix}/bin/ && \
+        rm -rf ${destroot}${prefix}/include/ptlib/CVS/ && \
+        rm -rf ${destroot}${prefix}/include/ptlib/unix/CVS/ && \
+        rm -rf ${destroot}${prefix}/include/ptlib/unix/ptlib/CVS/ && \
+        rm -rf ${destroot}${prefix}/include/ptclib/CVS/ && \
+        cd ${destroot}${prefix}/lib && ln -fs libpt_Darwin_ppc_r.dylib libpt.dylib && cd - && \
+        chmod -R a+r ${destroot}${prefix}/include/ptlib ${destroot}${prefix}/include/ptclib \
+		${destroot}${prefix}/include/ptlib.h \
+		${destroot}${prefix}/share/pwlib ${destroot}${prefix}/include/ptbuildopts.h \
+		${destroot}${prefix}/include/ptlib.h && \
+        chmod a+rx ${destroot}${prefix}/include/ptlib ${destroot}${prefix}/include/ptlib/unix \
+		${destroot}${prefix}/include/ptlib/unix/ptlib ${destroot}${prefix}/include/ptclib \
+		${destroot}${prefix}/bin/ptlib-config ${destroot}${prefix}/share/pwlib/make/ \
+	"
+}

Added: trunk/dports/net/pwlib/files/patch-all.diff
===================================================================
--- trunk/dports/net/pwlib/files/patch-all.diff	                        (rev 0)
+++ trunk/dports/net/pwlib/files/patch-all.diff	2008-02-27 18:38:23 UTC (rev 34528)
@@ -0,0 +1,195 @@
+diff -Naur ../pwlib/include/ptlib/unix/ptlib/pmachdep.h ./include/ptlib/unix/ptlib/pmachdep.h
+--- ../pwlib/include/ptlib/unix/ptlib/pmachdep.h	2003-05-06 08:59:12.000000000 +0200
++++ ./include/ptlib/unix/ptlib/pmachdep.h	2008-02-27 16:27:25.000000000 +0100
+@@ -445,7 +445,7 @@
+ #include <netinet/tcp.h>
+ #include <sys/ioctl.h>
+  
+-typedef int socklen_t;
++//typedef int socklen_t;
+  
+ #define HAS_IFREQ
+  
+diff -Naur ../pwlib/make/unix.mak ./make/unix.mak
+--- ../pwlib/make/unix.mak	2003-07-25 00:01:42.000000000 +0200
++++ ./make/unix.mak	2008-02-27 16:53:37.000000000 +0100
+@@ -634,7 +634,7 @@
+ 
+ CFLAGS		+= -fno-common -dynamic
+ LDFLAGS		+= -multiply_defined suppress
+-ENDLDLIBS	+= -framework AudioToolbox -framework CoreAudio
++ENDLDLIBS	+= -framework AudioToolbox -framework CoreAudio -lresolv
+ 
+ #HAS_QUICKTIMEX := 1
+ #STDCCFLAGS     += -DHAS_QUICKTIMEX
+@@ -668,7 +668,7 @@
+ # stupid Projct Builder compiler
+ STDCCFLAGS	+= -DNO_LONG_DOUBLE
+ # 
+-LDLIBS		+= -prebind -framework CoreServices -framework QuickTime -framework Carbon
++LDLIBS		+= -prebind -framework CoreServices -framework QuickTime -framework Carbon -lresolv
+   
+ P_SHAREDLIB	:= 0 
+ P_USE_RANLIB	:= 1
+@@ -966,7 +966,7 @@
+ #STDCCFLAGS     += -fno-implement-inlines
+ 
+ # add OS directory to include path
+-STDCCFLAGS	+= -I$(UNIX_INC_DIR) -I/usr/include/pwlib
++STDCCFLAGS	+= -I$(UNIX_INC_DIR) -I/usr/include/pwlib -I@@PREFIX@@/include
+ 
+ 
+ # add library directory to library path and include the library
+diff -Naur ../pwlib/src/ptclib/pdns.cxx ./src/ptclib/pdns.cxx
+--- ../pwlib/src/ptclib/pdns.cxx	2003-04-29 01:57:40.000000000 +0200
++++ ./src/ptclib/pdns.cxx	2008-02-27 16:37:47.000000000 +0100
+@@ -72,6 +72,7 @@
+ #if P_HAS_RESOLVER
+ #include <arpa/nameser.h>
+ #include <resolv.h>
++#include <nameser8_compat.h>
+ #endif
+ 
+ #endif
+diff -Naur ../pwlib/src/ptclib/pssl.cxx ./src/ptclib/pssl.cxx
+--- ../pwlib/src/ptclib/pssl.cxx	2003-04-16 10:00:19.000000000 +0200
++++ ./src/ptclib/pssl.cxx	2008-02-27 16:40:44.000000000 +0100
+@@ -285,14 +285,14 @@
+ 
+ PSSLPrivateKey::PSSLPrivateKey(const BYTE * keyData, PINDEX keySize)
+ {
+-  key = d2i_AutoPrivateKey(NULL, (BYTE **)&keyData, keySize);
++  key = d2i_AutoPrivateKey(NULL, (const unsigned char** )&keyData, keySize);
+ }
+ 
+ 
+ PSSLPrivateKey::PSSLPrivateKey(const PBYTEArray & keyData)
+ {
+   const BYTE * keyPtr = keyData;
+-  key = d2i_AutoPrivateKey(NULL, (BYTE **)&keyPtr, keyData.GetSize());
++  key = d2i_AutoPrivateKey(NULL, (const unsigned char** )&keyPtr, keyData.GetSize());
+ }
+ 
+ 
+@@ -460,14 +460,14 @@
+ 
+ PSSLCertificate::PSSLCertificate(const BYTE * certData, PINDEX certSize)
+ {
+-  certificate = d2i_X509(NULL, (unsigned char **)&certData, certSize);
++  certificate = d2i_X509(NULL, (const unsigned char **)&certData, certSize);
+ }
+ 
+ 
+ PSSLCertificate::PSSLCertificate(const PBYTEArray & certData)
+ {
+   const BYTE * certPtr = certData;
+-  certificate = d2i_X509(NULL, (unsigned char **)&certPtr, certData.GetSize());
++  certificate = d2i_X509(NULL, (const unsigned char **)&certPtr, certData.GetSize());
+ }
+ 
+ 
+@@ -477,7 +477,7 @@
+   PBase64::Decode(certStr, certData);
+   if (certData.GetSize() > 0) {
+     const BYTE * certPtr = certData;
+-    certificate = d2i_X509(NULL, (unsigned char **)&certPtr, certData.GetSize());
++    certificate = d2i_X509(NULL, (const unsigned char **)&certPtr, certData.GetSize());
+   }
+   else
+     certificate = NULL;
+diff -Naur ../pwlib/src/ptclib/udp.cxx ./src/ptclib/udp.cxx
+--- ../pwlib/src/ptclib/udp.cxx	2003-06-23 18:23:57.000000000 +0200
++++ ./src/ptclib/udp.cxx	2008-02-27 16:34:10.000000000 +0100
+@@ -226,7 +226,7 @@
+                    *len,
+                    0,
+                    (struct sockaddr *)&from,
+-                   &fromLen);
++                   (socklen_t *)&fromLen);
+ 
+    if ( *len == SOCKET_ERROR )
+    {
+diff -Naur ../pwlib/src/ptlib/unix/Makefile ./src/ptlib/unix/Makefile
+--- ../pwlib/src/ptlib/unix/Makefile	2003-07-28 20:44:01.000000000 +0200
++++ ./src/ptlib/unix/Makefile	2008-02-27 16:22:12.000000000 +0100
+@@ -394,7 +394,7 @@
+ VPATH_CXX		:= $(COMMON_SRC_DIR) $(COMPONENT_SRC_DIR)
+ 
+ 
+-CFLAGS += -DPTRACING=1
++CFLAGS += -DPTRACING=1 -I@@PREFIX@@/include
+ 
+ 
+ # try and keep the order of modules in reverse order of usage so any
+diff -Naur ../pwlib/src/ptlib/unix/udll.cxx ./src/ptlib/unix/udll.cxx
+--- ../pwlib/src/ptlib/unix/udll.cxx	2003-07-09 13:37:13.000000000 +0200
++++ ./src/ptlib/unix/udll.cxx	2008-02-27 16:49:26.000000000 +0100
+@@ -196,9 +196,9 @@
+ 			  if (!make_private_module_public)
+ 			  {
+ 			    _dyld_func_lookup("__dyld_NSMakePrivateModulePublic", 
+-				(unsigned long *)&make_private_module_public);
++				(void **)&make_private_module_public);
+ 			  }
+-			  make_private_module_public(module);
++			  make_private_module_public((__NSModule*)module);
+ 			}
+ 			break;
+ 		case NSObjectFileImageInappropriateFile:
+@@ -233,7 +233,7 @@
+ 		/* Global context, use NSLookupAndBindSymbol */
+ 		if (NSIsSymbolNameDefined(symbol))
+ 		{
+-			nssym = NSLookupAndBindSymbol(symbol);
++			nssym = (__NSSymbol**)NSLookupAndBindSymbol(symbol);
+ 		}
+ 
+ 	}
+@@ -247,7 +247,7 @@
+ 		{
+ 			if (NSIsSymbolNameDefinedInImage((struct mach_header *)handle, symbol))
+ 			{
+-				nssym = NSLookupSymbolInImage((struct mach_header *)handle,
++				nssym = (__NSSymbol**)NSLookupSymbolInImage((struct mach_header *)handle,
+ 											  symbol,
+ 											  NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
+ 											  | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR);
+@@ -256,7 +256,7 @@
+ 		}
+ 		else
+ 		{
+-			nssym = NSLookupSymbolInModule(handle, symbol);
++			nssym = (__NSSymbol**)NSLookupSymbolInModule((__NSModule*)handle, symbol);
+ 		}
+ 	}
+ 	if (!nssym)
+@@ -264,7 +264,7 @@
+ 		error(0, "Symbol \"%s\" Not found", symbol);
+ 		return NULL;
+ 	}
+-	return NSAddressOfSymbol(nssym);
++	return NSAddressOfSymbol((__NSSymbol*)nssym);
+ }
+ 
+ static const char *dlerror(void)
+@@ -280,9 +280,9 @@
+ 		error(0, "Can't remove dynamic libraries on darwin");
+ 		return 0;
+ 	}
+-	if (!NSUnLinkModule(handle, 0))
++	if (!NSUnLinkModule((__NSModule*)handle, 0))
+ 	{
+-		error(0, "unable to unlink module %s", NSNameOfModule(handle));
++		error(0, "unable to unlink module %s", NSNameOfModule((__NSModule*)handle));
+ 		return 1;
+ 	}
+ 	return 0;
+@@ -304,7 +304,7 @@
+ 	}
+ 	else
+ 	{
+-		malloc_sym = malloc(sym_len + 2);
++		malloc_sym = (char*)malloc(sym_len + 2);
+ 		if (malloc_sym)
+ 		{
+ 			sprintf(malloc_sym, "_%s", symbol);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080227/bb489edf/attachment.html 


More information about the macports-changes mailing list