- Update luasocket to 2.0.2, set luasocket port to lua 5.1

- Add lua 5.0 compatible slave port

PR:		ports/117168
Submitted by:	Andrew Turner <andrew+ports@fubar.geek.nz> (maintainer)
This commit is contained in:
Pav Lucistnik 2007-10-28 19:43:49 +00:00
parent 34710baf1b
commit 2a3d311fcd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=202228
8 changed files with 52 additions and 57 deletions

View file

@ -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}

View file

@ -308,6 +308,7 @@
SUBDIR += liveMedia
SUBDIR += lla
SUBDIR += ltm
SUBDIR += lua50-luasocket
SUBDIR += luasocket
SUBDIR += lyntin
SUBDIR += mDNSResponder

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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}
#------

View file

@ -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