diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2009-07-21 00:53:17 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2009-07-21 00:53:17 +0800 |
commit | 22ae9b641898ed1c261932d54e8340e25a7c696d (patch) | |
tree | de28d299bd5ae42087daa7a6c58e8a08fe92b269 /security | |
parent | 17b86cfc53415bd691fa037dd4de45901eb98206 (diff) | |
download | freebsd-ports-gnome-22ae9b641898ed1c261932d54e8340e25a7c696d.tar.gz freebsd-ports-gnome-22ae9b641898ed1c261932d54e8340e25a7c696d.tar.zst freebsd-ports-gnome-22ae9b641898ed1c261932d54e8340e25a7c696d.zip |
- Respect CC/CFLAGS
- Use openssl from ports for older FreeBSD versions
- Add a patch to handle openssl errors properly
- While here, fix building with custom PREFIX/LOCALBASE
PR: 136793
Submitted by: Andrew Lewis <freeghb@gmail.com> (maintainer)
Diffstat (limited to 'security')
-rw-r--r-- | security/luasec/Makefile | 14 | ||||
-rw-r--r-- | security/luasec/files/patch-Makefile | 11 | ||||
-rw-r--r-- | security/luasec/files/patch-src-Makefile | 27 | ||||
-rw-r--r-- | security/luasec/files/patch-src-ssl.c | 26 |
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) { |