[77376] trunk/dports/devel/libsockets
ryandesign at macports.org
ryandesign at macports.org
Mon Mar 28 23:36:19 PDT 2011
Revision: 77376
http://trac.macports.org/changeset/77376
Author: ryandesign at macports.org
Date: 2011-03-28 23:36:17 -0700 (Mon, 28 Mar 2011)
Log Message:
-----------
libsockets: update to 2.3.9.5; see #28596
Modified Paths:
--------------
trunk/dports/devel/libsockets/Portfile
trunk/dports/devel/libsockets/files/patch-Makefile.diff
trunk/dports/devel/libsockets/files/patch-TcpSocket.diff
Added Paths:
-----------
trunk/dports/devel/libsockets/files/patch-HttpRequest.cpp.diff
Modified: trunk/dports/devel/libsockets/Portfile
===================================================================
--- trunk/dports/devel/libsockets/Portfile 2011-03-29 04:21:31 UTC (rev 77375)
+++ trunk/dports/devel/libsockets/Portfile 2011-03-29 06:36:17 UTC (rev 77376)
@@ -3,8 +3,7 @@
PortSystem 1.0
name libsockets
-version 2.3.3
-revision 1
+version 2.3.9.5
categories devel net
platforms darwin
maintainers mww
@@ -12,21 +11,22 @@
long_description ${description}
homepage http://www.alhem.net/Sockets/
-master_sites ${homepage}:tar \
- http://www.die.net/doc/linux/include/uuid/:header
-distfiles uuid.h:header \
- Sockets-${version}.tar.gz:tar
-checksums uuid.h sha1 c466612c98aea27d92423589018e1a69d480c793 \
- Sockets-${version}.tar.gz sha1 1344dcfcfd3cac4f28f041c9d8a0bcf5f4c3bab9
-patchfiles patch-Makefile.diff patch-Makefile.Defines.macosx.diff patch-TcpSocket.diff
+master_sites ${homepage}
+checksums sha1 44ada63bdae7d58fab4904a73b9caaaadbb06912 \
+ rmd160 5d05997c0560568a7105838f9d9de62b76695672
+
+patchfiles patch-HttpRequest.cpp.diff \
+ patch-Makefile.diff \
+ patch-Makefile.Defines.macosx.diff \
+ patch-TcpSocket.diff \
+ patch-create-dylib.sh.diff
+
depends_lib port:openssl
-worksrcdir Sockets-${version}
+distname Sockets-${version}
-extract.only Sockets-${version}.tar.gz
post-extract {
- file copy ${distpath}/uuid.h ${worksrcpath}
xinstall -m 755 ${filespath}/configure ${worksrcpath}
xinstall -m 755 ${filespath}/create-dylib.sh ${worksrcpath}
}
Added: trunk/dports/devel/libsockets/files/patch-HttpRequest.cpp.diff
===================================================================
--- trunk/dports/devel/libsockets/files/patch-HttpRequest.cpp.diff (rev 0)
+++ trunk/dports/devel/libsockets/files/patch-HttpRequest.cpp.diff 2011-03-29 06:36:17 UTC (rev 77376)
@@ -0,0 +1,25 @@
+HttpRequest.cpp: In constructor 'HttpRequest::HttpRequest(FILE*)':
+HttpRequest.cpp:74: error: 'environ' was not declared in this scope
+
+Undefined symbols:
+ "_environ", referenced from:
+ HttpRequest::HttpRequest(__sFILE*)in HttpRequest.o
+ HttpRequest::HttpRequest(__sFILE*)in HttpRequest.o
+ld: symbol(s) not found
+
+http://wiki.finkproject.org/index.php/Fink:Porting_Notes#The__environ_symbol
+--- HttpRequest.cpp.orig 2011-01-22 03:19:51.000000000 -0600
++++ HttpRequest.cpp 2011-03-29 01:32:20.000000000 -0500
+@@ -63,6 +63,12 @@
+
+ // --------------------------------------------------------------------------------------
+ #ifndef _WIN32
++#ifdef __APPLE__
++#include <crt_externs.h>
++#define environ (*_NSGetEnviron())
++#else
++extern char **environ;
++#endif
+ HttpRequest::HttpRequest(FILE *fil) : HttpTransaction()
+ , m_server_port(0)
+ , m_is_ssl(false)
Modified: trunk/dports/devel/libsockets/files/patch-Makefile.diff
===================================================================
--- trunk/dports/devel/libsockets/files/patch-Makefile.diff 2011-03-29 04:21:31 UTC (rev 77375)
+++ trunk/dports/devel/libsockets/files/patch-Makefile.diff 2011-03-29 06:36:17 UTC (rev 77376)
@@ -1,29 +1,29 @@
---- Makefile 2008-10-07 19:12:46.000000000 +0200
-+++ Makefile 2008-11-01 21:07:04.000000000 +0100
-@@ -13,6 +13,7 @@
- # include paths
- INCLUDE = -I/usr/include/libxml2
+--- Makefile.orig 2010-02-21 02:57:49.000000000 -0600
++++ Makefile 2011-03-29 01:24:39.000000000 -0500
+@@ -38,6 +38,7 @@
+ INCLUDE = -I/usr/include/libxml2
+ # CXX, CFLAGS, LIBS, LDFLAGS, LDFLAGSSO
+include Makefile.macports
- include Makefile.version
+ include Makefile.Defines.$(PLATFORM)
- # CXX, CFLAGS, LIBS
-@@ -39,6 +40,9 @@
- Sockets-config: Sockets-config.o
- $(CXX) -o $@ $^
+ # uncomment these lines if the library should be in its own namespace
+@@ -74,6 +75,9 @@
+ sed -e "s/%VERSION%/$(VERSION)/g"| \
+ sed -e "s/%NAME%/$(NAME)/g" > pkgconfig/libSockets.pc
+libSockets.dylib: libSockets.a
+ CC="$(CXX)" LDFLAGS="$(LDFLAGS) $(LIBS)" ./create-dylib.sh libSockets.a 1.0.0 $(PREFIX)/lib
+
clean:
- rm -f *.o *~ slask *.d $(PROGS) *.a */*~
+ rm -f *.o *~ slask *.d $(PROGS) *.a *.so *.so.* */*~
-@@ -57,7 +61,7 @@
+@@ -92,7 +96,7 @@
@mkdir -p $(DESTDIR)/$(PREFIX)/lib
- cp libSockets.a $(DESTDIR)/$(PREFIX)/lib
- @mkdir -p $(DESTDIR)/$(PREFIX)/include/Sockets
-- cp -a *.h $(DESTDIR)/$(PREFIX)/include/Sockets
-+ cp -Rp *.h $(DESTDIR)/$(PREFIX)/include/Sockets
- @rm -f $(DESTDIR)/$(PREFIX)/include/Sockets/SSLSocket.*
- @rm -f $(DESTDIR)/$(PREFIX)/include/Sockets/HttpsGetSocket.*
- @rm -f $(DESTDIR)/$(PREFIX)/include/Sockets/HttpsSocket.*
+ cp $(LIBNAME) $(DESTDIR)/$(PREFIX)/lib
+ @mkdir -p $(DESTDIR)/$(PREFIX)/include/$(NAME)
+- cp -a *.h $(DESTDIR)/$(PREFIX)/include/$(NAME)
++ cp -Rp *.h $(DESTDIR)/$(PREFIX)/include/$(NAME)
+ @rm -f $(DESTDIR)/$(PREFIX)/include/$(NAME)/SSLSocket.*
+ @rm -f $(DESTDIR)/$(PREFIX)/include/$(NAME)/HttpsGetSocket.*
+ @rm -f $(DESTDIR)/$(PREFIX)/include/$(NAME)/HttpsSocket.*
Modified: trunk/dports/devel/libsockets/files/patch-TcpSocket.diff
===================================================================
--- trunk/dports/devel/libsockets/files/patch-TcpSocket.diff 2011-03-29 04:21:31 UTC (rev 77375)
+++ trunk/dports/devel/libsockets/files/patch-TcpSocket.diff 2011-03-29 06:36:17 UTC (rev 77376)
@@ -1,48 +1,20 @@
---- TcpSocket.cpp.orig
-+++ TcpSocket.cpp
-@@ -1234,14 +1234,14 @@ void TcpSocket::InitSSLServer()
- }
-
-
--void TcpSocket::InitializeContext(const std::string& context, SSL_METHOD *meth_in)
-+void TcpSocket::InitializeContext(const std::string& context, const SSL_METHOD *meth_in)
- {
- static Mutex mutex;
- Lock lock(mutex);
+--- TcpSocket.cpp.orig 2010-07-21 02:01:59.000000000 -0500
++++ TcpSocket.cpp 2011-03-29 01:12:40.000000000 -0500
+@@ -1297,7 +1297,7 @@
/* Create our context*/
- if (m_client_contexts.find(context) == m_client_contexts.end())
- {
-- SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method();
-+ const SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method();
- m_ssl_ctx = m_client_contexts[context] = SSL_CTX_new(meth);
- SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY);
- }
-@@ -1258,7 +1258,7 @@ void TcpSocket::InitializeContext(const std::string& context,const std::string&
- /* Create our context*/
if (m_server_contexts.find(context) == m_server_contexts.end())
{
-- SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method();
-+ const SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method();
+- SSL_METHOD *meth = meth_in ? const_cast<SSL_METHOD *>(meth_in) : SSLv3_method();
++ SSL_METHOD *meth = meth_in ? const_cast<SSL_METHOD *>(meth_in) : const_cast<SSL_METHOD *>(SSLv3_method());
m_ssl_ctx = m_server_contexts[context] = SSL_CTX_new(meth);
- SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY);
+ SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY|SSL_MODE_ENABLE_PARTIAL_WRITE);
// session id
-@@ -1294,7 +1294,7 @@ void TcpSocket::InitializeContext(const std::string& context,const std::string&
+@@ -1333,7 +1333,7 @@
/* Create our context*/
if (m_server_contexts.find(context) == m_server_contexts.end())
{
-- SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method();
-+ const SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method();
+- SSL_METHOD *meth = meth_in ? const_cast<SSL_METHOD *>(meth_in) : SSLv3_method();
++ SSL_METHOD *meth = meth_in ? const_cast<SSL_METHOD *>(meth_in) : const_cast<SSL_METHOD *>(SSLv3_method());
m_ssl_ctx = m_server_contexts[context] = SSL_CTX_new(meth);
- SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY);
+ SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY|SSL_MODE_ENABLE_PARTIAL_WRITE);
// session id
---- TcpSocket.h.orig
-+++ TcpSocket.h
-@@ -271,7 +271,7 @@ protected:
- #ifdef HAVE_OPENSSL
- /** SSL; Initialize ssl context for a client socket.
- \param meth_in SSL method */
-- void InitializeContext(const std::string& context, SSL_METHOD *meth_in = NULL);
-+ void InitializeContext(const std::string& context, const SSL_METHOD *meth_in = NULL);
- /** SSL; Initialize ssl context for a server socket.
- \param keyfile Combined private key/certificate file
- \param password Password for private key
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110328/7d830f12/attachment-0001.html>
More information about the macports-changes
mailing list