aboutsummaryrefslogtreecommitdiff
path: root/security/luasec
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-07-20 16:53:17 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-07-20 16:53:17 +0000
commit9881b5c681c11cab6c74fc019aca5028117daf66 (patch)
treee3d30dcfebc4f38894f5140bcc77ff254f52e168 /security/luasec
parent78ea9f2fb16c605f04a39697689c8ba1f2ef4171 (diff)
downloadports-9881b5c681c11cab6c74fc019aca5028117daf66.tar.gz
ports-9881b5c681c11cab6c74fc019aca5028117daf66.zip
Notes
Diffstat (limited to 'security/luasec')
-rw-r--r--security/luasec/Makefile14
-rw-r--r--security/luasec/files/patch-Makefile11
-rw-r--r--security/luasec/files/patch-src-Makefile27
-rw-r--r--security/luasec/files/patch-src-ssl.c26
4 files changed, 77 insertions, 1 deletions
diff --git a/security/luasec/Makefile b/security/luasec/Makefile
index e3813d7e0b67..11f6fb505ac7 100644
--- a/security/luasec/Makefile
+++ b/security/luasec/Makefile
@@ -7,6 +7,7 @@
PORTNAME= luasec
PORTVERSION= 0.3.2
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://luaforge.net/frs/download.php/4059/
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
@@ -18,8 +19,19 @@ RUN_DEPENDS+= ${LUA_MODLIBDIR}/socket/core.so:${PORTSDIR}/net/luasocket
ALL_TARGET= bsd
LIBDIR= -L${LUA_LIBDIR}
-MAKE_ENV+= INCDIR=-I${LUA_INCDIR}
+MAKE_ENV+= INCDIR=-I${LUA_INCDIR} LUAPATH=${LUA_MODSHAREDIR} \
+ CPATH=${LUA_MODLIBDIR}
USE_LUA= 5.1
WANT_LUA_VER= 5.1
+USE_OPENSSL= yes
+
+.include <bsd.port.options.mk>
+
+# NOTE: OSVERSION is already defined here, and USE_OPENSSL_PORT
+# should be defined before pre.mk, that's why options.mk is used
+
+.if ${OSVERSION} < 700024
+USE_OPENSSL_PORT=yes
+.endif
.include <bsd.port.mk>
diff --git a/security/luasec/files/patch-Makefile b/security/luasec/files/patch-Makefile
new file mode 100644
index 000000000000..7b1c16da45b1
--- /dev/null
+++ b/security/luasec/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig 2009-05-09 19:11:47.000000000 +0400
++++ Makefile 2009-07-16 22:01:50.000000000 +0400
+@@ -1,6 +1,6 @@
+ # Inform the location to intall the modules
+-LUAPATH=/usr/local/share/lua/5.1
+-CPATH=/usr/local/lib/lua/5.1
++LUAPATH?=/usr/local/share/lua/5.1
++CPATH?=/usr/local/lib/lua/5.1
+
+ # Edit the lines below to inform new path, if necessary
+ #
diff --git a/security/luasec/files/patch-src-Makefile b/security/luasec/files/patch-src-Makefile
new file mode 100644
index 000000000000..3553b6bc40af
--- /dev/null
+++ b/security/luasec/files/patch-src-Makefile
@@ -0,0 +1,27 @@
+--- src/Makefile.orig 2009-05-09 19:11:47.000000000 +0400
++++ src/Makefile 2009-07-16 21:43:41.000000000 +0400
+@@ -13,8 +13,8 @@
+
+ WARN=-Wall -pedantic
+
+-BSD_CFLAGS=-O2 -fpic $(WARN) $(INCDIR) $(DEFS)
+-BSD_LDFLAGS=-O -shared -fpic $(LIBDIR)
++BSD_CFLAGS=-fpic $(WARN) $(INCDIR) $(DEFS)
++BSD_LDFLAGS=-shared -fpic $(LIBDIR)
+
+ LNX_CFLAGS=-O2 -fpic $(WARN) $(INCDIR) $(DEFS)
+ LNX_LDFLAGS=-O -shared -fpic $(LIBDIR)
+@@ -24,10 +24,10 @@
+ MAC_LDFLAGS=-bundle -undefined dynamic_lookup $(LIBDIR)
+
+ CP=cp
+-CC=gcc
++CC?=gcc
+ LD=$(MYENV) gcc
+-CFLAGS=$(MYCFLAGS)
+-LDFLAGS=$(MYLDFLAGS)
++CFLAGS+=$(MYCFLAGS)
++LDFLAGS+=$(MYLDFLAGS)
+
+ .PHONY: all clean install none linux bsd macosx
+
diff --git a/security/luasec/files/patch-src-ssl.c b/security/luasec/files/patch-src-ssl.c
new file mode 100644
index 000000000000..4afd4d8c5cf8
--- /dev/null
+++ b/security/luasec/files/patch-src-ssl.c
@@ -0,0 +1,26 @@
+--- src/ssl.c.orig 2009-05-09 19:11:47.000000000 +0400
++++ src/ssl.c 2009-07-16 21:44:52.000000000 +0400
+@@ -67,6 +67,7 @@
+ if (ssl->state == ST_SSL_CLOSED)
+ return IO_CLOSED;
+ for ( ; ; ) {
++ ERR_clear_error();
+ int err = SSL_do_handshake(ssl->ssl);
+ ssl->error = SSL_get_error(ssl->ssl, err);
+ switch(ssl->error) {
+@@ -109,6 +110,7 @@
+ return IO_CLOSED;
+ *sent = 0;
+ for ( ; ; ) {
++ ERR_clear_error();
+ int err = SSL_write(ssl->ssl, data, (int) count);
+ ssl->error = SSL_get_error(ssl->ssl, err);
+ switch(ssl->error) {
+@@ -151,6 +153,7 @@
+ return IO_CLOSED;
+ *got = 0;
+ for ( ; ; ) {
++ ERR_clear_error();
+ int err = SSL_read(ssl->ssl, data, (int) count);
+ ssl->error = SSL_get_error(ssl->ssl, err);
+ switch(ssl->error) {