aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mk/bsd.lua.mk5
-rw-r--r--net/Makefile1
-rw-r--r--net/lua50-luasocket/Makefile12
-rw-r--r--net/luasocket/Makefile20
-rw-r--r--net/luasocket/distinfo6
-rw-r--r--net/luasocket/files/patch-Makefile10
-rw-r--r--net/luasocket/files/patch-config53
-rw-r--r--net/luasocket/pkg-plist2
8 files changed, 52 insertions, 57 deletions
diff --git a/Mk/bsd.lua.mk b/Mk/bsd.lua.mk
index 306a878a0ede..f0d00735479a 100644
--- a/Mk/bsd.lua.mk
+++ b/Mk/bsd.lua.mk
@@ -38,7 +38,7 @@
# Other components (modules):
# 5.0 - app, compat51, dfui, filename, gettext,
# posix, pty, socket.
-# 5.1 - filename, gettext, posix, pty.
+# 5.1 - filename, gettext, posix, pty, socket.
# The available dependency types are:
# build - Requires component for building.
# lib - Requires component for building and running.
@@ -159,7 +159,7 @@ _LUA_PORT_filename_5.0= devel/lua50-filename
_LUA_PORT_gettext_5.0= devel/lua50-gettext
_LUA_PORT_posix_5.0= devel/lua50-posix
_LUA_PORT_pty_5.0= devel/lua50-pty
-_LUA_PORT_socket_5.0= net/luasocket
+_LUA_PORT_socket_5.0= net/lua50-luasocket
_LUA_PORT_lua_5.1= lang/lua
_LUA_DEPTYPE_lua_5.1= build
@@ -168,6 +168,7 @@ _LUA_PORT_filename_5.1= devel/lua-filename
_LUA_PORT_gettext_5.1= devel/lua-gettext
_LUA_PORT_posix_5.1= devel/lua-posix
_LUA_PORT_pty_5.1= devel/lua-pty
+_LUA_PORT_socket_5.1= net/luasocket
. for comp in ${_LUA_COMPS_ALL}
_LUA_COMP= ${comp}
diff --git a/net/Makefile b/net/Makefile
index 133a4976d304..2c6637ade511 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -308,6 +308,7 @@
SUBDIR += liveMedia
SUBDIR += lla
SUBDIR += ltm
+ SUBDIR += lua50-luasocket
SUBDIR += luasocket
SUBDIR += lyntin
SUBDIR += mDNSResponder
diff --git a/net/lua50-luasocket/Makefile b/net/lua50-luasocket/Makefile
new file mode 100644
index 000000000000..82f6337e03e5
--- /dev/null
+++ b/net/lua50-luasocket/Makefile
@@ -0,0 +1,12 @@
+# New ports collection makefile for: lua50-socket
+# Date created: 14 October 2007
+# Whom: Andrew Turner <andrew+ports@fubar.geek.nz>
+#
+# $FreeBSD$
+#
+
+USE_LUA= 5.0
+
+MASTERDIR= ${.CURDIR}/../luasocket
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/luasocket/Makefile b/net/luasocket/Makefile
index f0121466738e..069384aefdff 100644
--- a/net/luasocket/Makefile
+++ b/net/luasocket/Makefile
@@ -6,22 +6,26 @@
#
PORTNAME= luasocket
-PORTVERSION= 2.0
-PORTREVISION= 1
+PORTVERSION= 2.0.2
CATEGORIES= net
-MASTER_SITES= http://luaforge.net/frs/download.php/1097/
+MASTER_SITES= http://luaforge.net/frs/download.php/2664/
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= IPv4 Sockets support for the Lua language
-BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
-
USE_GMAKE= yes
-USE_LUA= 5.0
-LUA_COMPS= lua compat51
+USE_LUA?= 5.1
+LUA_COMPS= lua
+
+.if ${USE_LUA} == 5.0
+LUA_COMPS+= compat51
+BUILD_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:build
COMPAT_SRC= `(cd ${PORTSDIR}/devel/lua50-compat51 && ${MAKE} -V WRKSRC)`
-MAKE_ENV= COMPATDIR="${COMPAT_SRC}"
+MAKE_ENV= COMPATDIR="${COMPAT_SRC}" \
+ COMPAT_OBJ="${COMPAT_SRC}/compat-5.1.o"
+.endif
post-extract:
@${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile
diff --git a/net/luasocket/distinfo b/net/luasocket/distinfo
index 0ede5be80abe..5d82cf33ee01 100644
--- a/net/luasocket/distinfo
+++ b/net/luasocket/distinfo
@@ -1,3 +1,3 @@
-MD5 (luasocket-2.0.tar.gz) = 64bddf8bbab296d1c1da7f34f3c2b5b5
-SHA256 (luasocket-2.0.tar.gz) = f626ad8df249791d3ad2bd2efcd1411aaa5d1f35c61812d18d2f70b51b098752
-SIZE (luasocket-2.0.tar.gz) = 120394
+MD5 (luasocket-2.0.2.tar.gz) = 41445b138deb7bcfe97bff957503da8e
+SHA256 (luasocket-2.0.2.tar.gz) = 4fd9c775cfd98841299851e29b30176caf289370fea1ff1e00bb67c2d6842ca6
+SIZE (luasocket-2.0.2.tar.gz) = 115443
diff --git a/net/luasocket/files/patch-Makefile b/net/luasocket/files/patch-Makefile
deleted file mode 100644
index 8114a8536516..000000000000
--- a/net/luasocket/files/patch-Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
---- Makefile.orig Mon Apr 17 11:33:50 2006
-+++ Makefile Mon Apr 17 11:33:57 2006
-@@ -25,7 +25,6 @@
- smtp.lua
-
- TO_TOP_SHARE:= \
-- $(COMPAT)/compat-5.1.lua \
- ltn12.lua \
- socket.lua \
- mime.lua
diff --git a/net/luasocket/files/patch-config b/net/luasocket/files/patch-config
index 28ccac908120..c087faf8d9ee 100644
--- a/net/luasocket/files/patch-config
+++ b/net/luasocket/files/patch-config
@@ -1,26 +1,25 @@
---- config.orig Thu Nov 24 17:29:38 2005
-+++ config Mon Aug 7 13:36:23 2006
-@@ -15,42 +15,42 @@
- #------
- # Lua includes and libraries
- #
--LUAINC=-Ilua-5.0.2/include
--LUALIB=-Llua-5.0.2/lib
+--- config.orig Sun Oct 14 12:44:03 2007
++++ config Sun Oct 14 13:54:39 2007
+@@ -18,11 +18,13 @@
+ #LUAINC=-I/usr/local/include/lua50
+ #LUAINC=-I/usr/local/include/lua5.1
+ #LUAINC=-Ilua-5.1.1/src
+LUAINC=-I$(LUA_INCDIR)
-+LUALIB=-L$(LUA_LIBDIR)
#------
# Compat-5.1 directory
#
--COMPAT=compat-5.1r4
+ #COMPAT=compat-5.1r5
+COMPAT=${COMPATDIR}
#------
# Top of your Lua installation
- # Relative paths will be inside the src tree
+@@ -30,11 +32,11 @@
#
--INSTALL_TOP_SHARE=share
--INSTALL_TOP_LIB=lib
+ #INSTALL_TOP_SHARE=/usr/local/share/lua/5.0
+ #INSTALL_TOP_LIB=/usr/local/lib/lua/5.0
+-INSTALL_TOP_SHARE=/usr/local/share/lua/5.1
+-INSTALL_TOP_LIB=/usr/local/lib/lua/5.1
+INSTALL_TOP_SHARE=${LUA_MODSHAREDIR}
+INSTALL_TOP_LIB=${LUA_MODLIBDIR}
@@ -31,30 +30,18 @@
#------
# Compiler and linker settings
- # for Mac OS X
- #
--CC=gcc
--DEF=-DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN
--CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common
--LDFLAGS=-bundle -undefined dynamic_lookup
--LD=export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
-+#CC=gcc
-+#DEF=-DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN
-+#CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common
-+#LDFLAGS=-bundle -undefined dynamic_lookup
-+#LD=export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
-
+@@ -49,11 +51,11 @@
#------
# Compiler and linker settings
# for Linux
--#CC=gcc
+-CC=gcc
+CC?=gcc
- #DEF=-DLUASOCKET_DEBUG
--#CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic
--#LDFLAGS=-O -shared
--#LD=gcc
-+CFLAGS+= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -fpic
-+LDFLAGS=-O -shared
+ DEF=-DLUASOCKET_DEBUG
+-CFLAGS= $(LUAINC) $(DEF) -pedantic -Wall -O2 -fpic
+-LDFLAGS=-O -shared -fpic
+-LD=gcc
++CFLAGS+= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic
++LDFLAGS+=-O -shared -fpic
+LD=${CC}
#------
diff --git a/net/luasocket/pkg-plist b/net/luasocket/pkg-plist
index bd812f8bf4fd..bb38770ab1cd 100644
--- a/net/luasocket/pkg-plist
+++ b/net/luasocket/pkg-plist
@@ -10,8 +10,8 @@
%%LUA_MODLIBDIR%%/mime/core.so
%%PORTDOCS%%%%DOCSDIR%%/dns.html
%%PORTDOCS%%%%DOCSDIR%%/ftp.html
-%%PORTDOCS%%%%DOCSDIR%%/home.html
%%PORTDOCS%%%%DOCSDIR%%/http.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
%%PORTDOCS%%%%DOCSDIR%%/installation.html
%%PORTDOCS%%%%DOCSDIR%%/introduction.html
%%PORTDOCS%%%%DOCSDIR%%/ltn12.html