Bug 117168 - Maintainer Update of net/luasocket
Summary: Maintainer Update of net/luasocket
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-14 03:10 UTC by Andrew Turner
Modified: 2007-10-28 19:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Turner 2007-10-14 03:10:02 UTC
	The attached patch:
	 * Updates net/luasocket to 2.0.2
	 * Makes net/luasocket a Master port
	 * Sets the Lua version for net/luasocket to 5.1
	 * Adds a slave port for Lua 5.0
	 * Updates bsd.lua.mk for the new port locations

Fix: 

# 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" 
--- Makefile ends here -----wiJTuKxipserlgAiTBPQrSrTA5jMgapHve1NTA2WAdhbPyKc
Content-Type: text/plain; name="luasocket-2.0.2.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="luasocket-2.0.2.diff"

Index: Mk/bsd.lua.mk
===================================================================
RCS file: /cvsroot/ports/Mk/bsd.lua.mk,v
retrieving revision 1.13
diff -u -r1.13 bsd.lua.mk
--- Mk/bsd.lua.mk	11 Apr 2007 03:22:34 -0000	1.13
+++ Mk/bsd.lua.mk	14 Oct 2007 01:12:34 -0000
@@ -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_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_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}
Index: net/luasocket/Makefile
===================================================================
RCS file: /cvsroot/ports/net/luasocket/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- net/luasocket/Makefile	15 Sep 2006 10:58:52 -0000	1.8
+++ net/luasocket/Makefile	14 Oct 2007 01:20:52 -0000
@@ -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/2657/
+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
Index: net/luasocket/distinfo
===================================================================
RCS file: /cvsroot/ports/net/luasocket/distinfo,v
retrieving revision 1.4
diff -u -r1.4 distinfo
--- net/luasocket/distinfo	26 Mar 2006 13:43:34 -0000	1.4
+++ net/luasocket/distinfo	14 Oct 2007 00:13:51 -0000
@@ -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) = f253be3b94287a6cba8df5a0affdb7d1
+SHA256 (luasocket-2.0.2.tar.gz) = ed6a153e95e1728775f04a5003ffd345c971b86f4d20550bb82351a79d8fe511
+SIZE (luasocket-2.0.2.tar.gz) = 115480
Index: net/luasocket/pkg-plist
===================================================================
RCS file: /cvsroot/ports/net/luasocket/pkg-plist,v
retrieving revision 1.4
diff -u -r1.4 pkg-plist
--- net/luasocket/pkg-plist	15 Sep 2006 10:58:52 -0000	1.4
+++ net/luasocket/pkg-plist	14 Oct 2007 01:14:38 -0000
@@ -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
Index: net/luasocket/files/patch-config
===================================================================
RCS file: /cvsroot/ports/net/luasocket/files/patch-config,v
retrieving revision 1.2
diff -u -r1.2 patch-config
--- net/luasocket/files/patch-config	15 Sep 2006 10:58:52 -0000	1.2
+++ net/luasocket/files/patch-config	14 Oct 2007 00:55:08 -0000
@@ -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}
  
  #------
How-To-Repeat: 	1. Apply the patch
	2. Remove net/luasocket/patch-Makefile
	3. Copy the attached Makefile to net/lua50-luasocket
Comment 1 Andrew Turner 2007-10-16 20:27:30 UTC
Don't commit yet as the distfile's location and checksum have changed.
Also the patches need to be fixed for the new distfile.

I'll send an updated patch.
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2007-10-25 20:38:26 UTC
State Changed
From-To: open->feedback

Any progress with the updated patch? 


Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2007-10-25 20:38:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Track
Comment 4 Andrew Turner 2007-10-28 09:24:33 UTC
The updates are (after applying the above patches):
 - Change MASTER_SITES to "http://luaforge.net/frs/download.php/2664/"
 - Change the distinfo file to contain:
MD5 (luasocket-2.0.2.tar.gz) = 41445b138deb7bcfe97bff957503da8e
SHA256 (luasocket-2.0.2.tar.gz) = 4fd9c775cfd98841299851e29b30176caf289370fea1ff1e00bb67c2d6842ca6
SIZE (luasocket-2.0.2.tar.gz) = 115443

With these two changes the port builds correctly.

Andrew
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2007-10-28 19:36:19 UTC
State Changed
From-To: feedback->closed

Committed, thanks!
Comment 6 dfilter service freebsd_committer freebsd_triage 2007-10-28 19:43:56 UTC
pav         2007-10-28 19:43:50 UTC

  FreeBSD ports repository

  Modified files:
    Mk                   bsd.lua.mk 
    net                  Makefile 
    net/luasocket        Makefile distinfo pkg-plist 
    net/luasocket/files  patch-config 
  Added files:
    net/lua50-luasocket  Makefile 
  Removed files:
    net/luasocket/files  patch-Makefile 
  Log:
  - 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)
  
  Revision  Changes    Path
  1.14      +4 -3      ports/Mk/bsd.lua.mk
  1.1937    +1 -0      ports/net/Makefile
  1.1       +12 -0     ports/net/lua50-luasocket/Makefile (new)
  1.9       +12 -8     ports/net/luasocket/Makefile
  1.5       +3 -3      ports/net/luasocket/distinfo
  1.2       +0 -10     ports/net/luasocket/files/patch-Makefile (dead)
  1.3       +20 -33    ports/net/luasocket/files/patch-config
  1.5       +1 -1      ports/net/luasocket/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"