diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2008-10-07 06:12:21 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2008-10-07 06:12:21 +0000 |
commit | a6d9a56ebef574775f6905778916a0f7fca3260a (patch) | |
tree | 484e4370b8b538ea8e28688998f1b6465a6b142c /net/spserver | |
parent | a5aecefe87cd17892d47854cf5b810b0e3615e9b (diff) | |
download | ports-a6d9a56ebef574775f6905778916a0f7fca3260a.tar.gz ports-a6d9a56ebef574775f6905778916a0f7fca3260a.zip |
Notes
Diffstat (limited to 'net/spserver')
-rw-r--r-- | net/spserver/Makefile | 57 | ||||
-rw-r--r-- | net/spserver/files/patch-Makefile | 22 | ||||
-rw-r--r-- | net/spserver/files/patch-gnutls_Makefile | 23 | ||||
-rw-r--r-- | net/spserver/files/patch-matrixssl_Makefile | 35 | ||||
-rw-r--r-- | net/spserver/files/patch-matrixssl_sslSocket.h | 11 | ||||
-rw-r--r-- | net/spserver/files/patch-xyssl_Makefile | 23 | ||||
-rw-r--r-- | net/spserver/pkg-plist | 9 |
7 files changed, 171 insertions, 9 deletions
diff --git a/net/spserver/Makefile b/net/spserver/Makefile index 314cce9b3e6b..54979dabcb78 100644 --- a/net/spserver/Makefile +++ b/net/spserver/Makefile @@ -7,7 +7,7 @@ PORTNAME= spserver PORTVERSION= 0.9.3 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} DISTNAME= ${PORTNAME}-${PORTVERSION}.src @@ -20,11 +20,44 @@ LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} USE_LDCONFIG= yes USE_GMAKE= yes -ALL_TARGET= all ssl +ALL_TARGET= all build_openssl + +OPTIONS= GNUTLS "Enable gnutls support" off +# MATRIXSSL "Enable matrixssl support" off \ +# XYSSL "Enable xyssl support" off + +.include <bsd.port.pre.mk> + +.if defined(WITH_MATRIXSSL) +BUILD_DEPENDS= ${PREFIX}/lib/libmatrixsslstatic.a:${PORTSDIR}/security/matrixssl +ALL_TARGET+= build_matrixssl +PLIST_SUB+= WITH_MATRIXSSL="" +.else +PLIST_SUB+= WITH_MATRIXSSL="@comment " +.endif + +.if defined(WITH_GNUTLS) +LIB_DEPENDS+= gnutls.26:${PORTSDIR}/security/gnutls +ALL_TARGET+= build_gnutls +PLIST_SUB+= WITH_GNUTLS="" +.else +PLIST_SUB+= WITH_GNUTLS="@comment " +.endif + +.if defined(WITH_XYSSL) +BUILD_DEPENDS= ${PREFIX}/lib/libxyssl.a:${PORTSDIR}/security/xyssl +ALL_TARGET+= build_xyssl +PLIST_SUB+= WITH_XYSSL="" +.else +PLIST_SUB+= WITH_XYSSL="@comment " +.endif post-patch: ${SED} -i -E 's,%PREFIX%,${PREFIX},g' ${WRKSRC}/spserver/Makefile + ${SED} -i -E 's,%PREFIX%,${PREFIX},g' ${WRKSRC}/gnutls/Makefile + ${SED} -i -E 's,%PREFIX%,${PREFIX},g' ${WRKSRC}/matrixssl/Makefile ${SED} -i -E 's,%PREFIX%,${PREFIX},g' ${WRKSRC}/openssl/Makefile + ${SED} -i -E 's,%PREFIX%,${PREFIX},g' ${WRKSRC}/xyssl/Makefile do-install: @${MKDIR} ${PREFIX}/include/spserver @@ -35,4 +68,22 @@ do-install: @${INSTALL} ${WRKSRC}/openssl/libspopenssl.so ${PREFIX}/lib/libspopenssl.so.1 @${LN} -s ${PREFIX}/lib/libspopenssl.so.1 ${PREFIX}/lib/libspopenssl.so -.include <bsd.port.mk> +.if defined (WITH_GNUTLS) + @${INSTALL} ${WRKSRC}/gnutls/spgnutls.hpp ${PREFIX}/include/spserver + @${INSTALL} ${WRKSRC}/gnutls/libspgnutls.so ${PREFIX}/lib/libspgnutls.so.1 + @${LN} -s ${PREFIX}/lib/libspgnutls.so.1 ${PREFIX}/lib/libspgnutls.so +.endif + +.if defined (WITH_MATRIXSSL) + @${INSTALL} ${WRKSRC}/matrixssl/spmatrixssl.hpp ${PREFIX}/include/spserver + @${INSTALL} ${WRKSRC}/matrixssl/libspmatrixssl.so ${PREFIX}/lib/libspmatrixssl.so.1 + @${LN} -s ${PREFIX}/lib/libspmatrixssl.so.1 ${PREFIX}/lib/libspmatrixssl.so +.endif + +.if defined (WITH_XYSSL) + @${INSTALL} ${WRKSRC}/xyssl/spxyssl.hpp ${PREFIX}/include/spserver + @${INSTALL} ${WRKSRC}/xyssl/libspxyssl.so ${PREFIX}/lib/libspxyssl.so.1 + @${LN} -s ${PREFIX}/lib/libspxyssl.so.1 ${PREFIX}/lib/libspxyssl.so +.endif + +.include <bsd.port.post.mk> diff --git a/net/spserver/files/patch-Makefile b/net/spserver/files/patch-Makefile index 3b6c36303c3d..a227866ecd9e 100644 --- a/net/spserver/files/patch-Makefile +++ b/net/spserver/files/patch-Makefile @@ -1,19 +1,29 @@ ---- Makefile.orig Fri Aug 24 15:38:46 2007 -+++ Makefile Fri Aug 24 15:39:05 2007 -@@ -8,10 +8,10 @@ +--- Makefile.orig 2008-08-30 23:08:56.000000000 +0800 ++++ Makefile 2008-10-04 23:22:08.000000000 +0800 +@@ -8,10 +8,19 @@ #-------------------------------------------------------------------- all: - @( cd spserver; make ) + @( cd spserver; gmake ) - ssl: +-ssl: - @( cd openssl; make ) ++build_openssl: + @( cd openssl; gmake ) ++ ++build_matrixssl: ++ @( cd matrixssl; gmake ) ++ ++build_gnutls: ++ @( cd gnutls; gmake ) ++ ++build_xyssl: ++ @( cd xyssl; gmake ) dist: clean spserver-$(version).src.tar.gz -@@ -22,7 +22,7 @@ +@@ -22,7 +31,7 @@ @(cd ..; rm spserver-$(version)) clean: @@ -21,4 +31,4 @@ + @( cd spserver; gmake clean ) @( cd openssl; make clean ) @( cd matrixssl; make clean ) - @( cd sptunnel; make clean ) + @( cd gnutls; make clean ) diff --git a/net/spserver/files/patch-gnutls_Makefile b/net/spserver/files/patch-gnutls_Makefile new file mode 100644 index 000000000000..8985633f0f80 --- /dev/null +++ b/net/spserver/files/patch-gnutls_Makefile @@ -0,0 +1,23 @@ +--- gnutls/Makefile.orig 2008-10-06 11:34:04.000000000 +0800 ++++ gnutls/Makefile 2008-10-06 11:34:35.000000000 +0800 +@@ -5,16 +5,16 @@ + AR = ar cru + CFLAGS = -Wall -D_REENTRANT -D_GNU_SOURCE -g -fPIC + SOFLAGS = -shared +-LDFLAGS = -lstdc++ -lpthread -lresolv ++LDFLAGS = -lstdc++ -lpthread + + LINKER = $(CC) + LINT = lint -c + RM = /bin/rm -f + +-GNUTLS_INCL = -I/usr/local/include/ +-GNUTLS_LIB = -L/usr/local/lib -lgcrypt -lgpg-error -lgnutls -lgnutls-extra -lstdc++ ++GNUTLS_INCL = -I%PREFIX%/include/ ++GNUTLS_LIB = -L%PREFIX%/lib -lgcrypt -lgpg-error -lgnutls -lgnutls-extra -lstdc++ + +-LIBEVENT_LIB = -L$(HOME)/libevent -levent ++LIBEVENT_LIB = -L%PREFIX%/libevent -levent + + SPSERVER_INCL = -I../spserver + SPSERVER_LIB = -L../spserver -lspserver diff --git a/net/spserver/files/patch-matrixssl_Makefile b/net/spserver/files/patch-matrixssl_Makefile new file mode 100644 index 000000000000..ca7e69f7f9ff --- /dev/null +++ b/net/spserver/files/patch-matrixssl_Makefile @@ -0,0 +1,35 @@ +--- matrixssl/Makefile.orig 2008-06-27 23:18:00.000000000 +0800 ++++ matrixssl/Makefile 2008-10-06 11:21:47.000000000 +0800 +@@ -3,18 +3,18 @@ + + CC = gcc + AR = ar cru +-CFLAGS = -Wall -D_REENTRANT -D_GNU_SOURCE -g -fPIC ++CFLAGS = -Wall -D_REENTRANT -D_GNU_SOURCE -g -fPIC -Dlinux + SOFLAGS = -shared +-LDFLAGS = -lstdc++ -lpthread -lresolv ++LDFLAGS = -lstdc++ -lpthread + + LINKER = $(CC) + LINT = lint -c + RM = /bin/rm -f + +-MASSL_INCL = -I$(HOME)/matrixssl-1-8-3-open/ +-MASSL_LIB = -L$(HOME)/matrixssl-1-8-3-open/src -lmatrixssl ++MASSL_INCL = -I/usr/local/include ++MASSL_LIB = -L/usr/local/lib -lmatrixsslstatic + +-LIBEVENT_LIB = -L$(HOME)/libevent -levent ++LIBEVENT_LIB = -L/usr/local/lib -levent + + SPSERVER_INCL = -I../spserver + SPSERVER_LIB = -L../spserver -lspserver +@@ -37,7 +37,7 @@ + $(LINKER) $(SOFLAGS) $^ -o $@ + + testechos: testechos.o +- $(LINKER) $(LDFLAGS) $^ -L. -lspmatrixssl -o $@ ++ $(LINKER) $(LDFLAGS) $^ -L. -lspmatrixssl -lmatrixsslstatic -o $@ + + clean: + @( $(RM) *.o vgcore.* core core.* $(TARGET) ) diff --git a/net/spserver/files/patch-matrixssl_sslSocket.h b/net/spserver/files/patch-matrixssl_sslSocket.h new file mode 100644 index 000000000000..6f4b2db40ef2 --- /dev/null +++ b/net/spserver/files/patch-matrixssl_sslSocket.h @@ -0,0 +1,11 @@ +--- matrixssl/sslSocket.h.orig 2008-10-06 11:22:38.000000000 +0800 ++++ matrixssl/sslSocket.h 2008-10-06 11:22:48.000000000 +0800 +@@ -48,7 +48,7 @@ + #define MSG_NOSIGNAL 0 + #define WOULD_BLOCK WSAEWOULDBLOCK + #define getSocketError() WSAGetLastError() +-#elif linux ++#elif linux || FreeBSD + #include <sys/socket.h> + #include <netinet/in.h> + #include <netinet/tcp.h> diff --git a/net/spserver/files/patch-xyssl_Makefile b/net/spserver/files/patch-xyssl_Makefile new file mode 100644 index 000000000000..79950b6d3c5d --- /dev/null +++ b/net/spserver/files/patch-xyssl_Makefile @@ -0,0 +1,23 @@ +--- xyssl/Makefile.orig 2008-10-04 23:25:56.000000000 +0800 ++++ xyssl/Makefile 2008-10-04 23:27:00.000000000 +0800 +@@ -5,16 +5,16 @@ + AR = ar cru + CFLAGS = -Wall -D_REENTRANT -D_GNU_SOURCE -g -fPIC + SOFLAGS = -shared +-LDFLAGS = -lstdc++ -lpthread -lresolv ++LDFLAGS = -lstdc++ -lpthread + + LINKER = $(CC) + LINT = lint -c + RM = /bin/rm -f + +-XYSSL_INCL = -I$(HOME)/xyssl-0.9/include +-XYSSL_LIB = -L$(HOME)/xyssl-0.9/library -lxyssl ++XYSSL_INCL = -I%PREFIX%/include ++XYSSL_LIB = -L%PREFIX%/lib -lxyssl + +-LIBEVENT_LIB = -L$(HOME)/libevent -levent ++LIBEVENT_LIB = -L%PREFIX%/lib -levent + + SPSERVER_INCL = -I../spserver + SPSERVER_LIB = -L../spserver -lspserver diff --git a/net/spserver/pkg-plist b/net/spserver/pkg-plist index 1f369ead515a..77de514a1b52 100644 --- a/net/spserver/pkg-plist +++ b/net/spserver/pkg-plist @@ -2,6 +2,7 @@ include/spserver/spbuffer.hpp include/spserver/spdispatcher.hpp include/spserver/speventcb.hpp include/spserver/spexecutor.hpp +%%WITH_GNUTLS%%include/spserver/spgnutls.hpp include/spserver/sphandler.hpp include/spserver/sphttp.hpp include/spserver/sphttpmsg.hpp @@ -12,6 +13,7 @@ include/spserver/spiocplfserver.hpp include/spserver/spiocpserver.hpp include/spserver/spioutils.hpp include/spserver/splfserver.hpp +%%WITH_MATRIXSSL%%include/spserver/spmatrixssl.hpp include/spserver/spmsgblock.hpp include/spserver/spmsgdecoder.hpp include/spserver/spopenssl.hpp @@ -26,8 +28,15 @@ include/spserver/sputils.hpp include/spserver/spwin32buffer.hpp include/spserver/spwin32iocp.hpp include/spserver/spwin32port.hpp +%%WITH_XYSSL%%include/spserver/spxyssl.hpp +%%WITH_GNUTLS%%lib/libspgnutls.so +%%WITH_GNUTLS%%lib/libspgnutls.so.1 +%%WITH_MATRIXSSL%%lib/libspmatrixssl.so +%%WITH_MATRIXSSL%%lib/libspmatrixssl.so.1 lib/libspopenssl.so lib/libspopenssl.so.1 lib/libspserver.so lib/libspserver.so.1 +%%WITH_XYSSL%%lib/libspxyssl.so +%%WITH_XYSSL%%lib/libspxyssl.so.1 @dirrm include/spserver |