ports/106347: Maintainer update of devel/lua50-pty
Andrew Turner
andrew+ports at fubar.geek.nz
Mon Dec 4 21:02:51 UTC 2006
>Number: 106347
>Category: ports
>Synopsis: Maintainer update of devel/lua50-pty
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 04 21:00:24 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Andrew Turner
>Release: FreeBSD 5.5-RC1 i386
>Organization:
>Environment:
System: FreeBSD serv.int.fubar.geek.nz 5.5-RC1 FreeBSD 5.5-RC1 #0: Mon May 15 14:09:18 NZST 2006 root at serv.int.fubar.geek.nz:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Maintainer update of devel/lua50-pty to support both lua 5.1 and 5.0. Also updates bsd.lua.mk
>How-To-Repeat:
>Fix:
1. Repocopy devel/lua50-pty to devel/lua-pty
2. Remove the contents of devel/lua50-pty/files
3. Add patch-pty.c and patch-pty.lua to devel/lua-pty/files
4. Apply the patch lua-pty.diff
--- lua-pty.diff begins here ---
Index: Mk/bsd.lua.mk
===================================================================
RCS file: /cvsroot/ports/Mk/bsd.lua.mk,v
retrieving revision 1.5
diff -u -r1.5 bsd.lua.mk
--- Mk/bsd.lua.mk 30 Nov 2006 21:51:05 -0000 1.5
+++ Mk/bsd.lua.mk 1 Dec 2006 08:58:15 -0000
@@ -165,6 +165,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
.for comp in ${_LUA_COMPS_ALL}
_LUA_COMP= ${comp}
Index: devel/lua-pty/Makefile
===================================================================
RCS file: /cvsroot/ports/devel/lua50-pty/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- devel/lua-pty/Makefile 18 Sep 2006 02:49:18 -0000 1.6
+++ devel/lua-pty/Makefile 1 Dec 2006 09:08:42 -0000
@@ -14,15 +14,16 @@
DISTFILES= pty.lua?rev=1.2 pty.c?rev=1.25
MAINTAINER= andrew+ports at fubar.geek.nz
-COMMENT= Pty (pseudo-terminal) bindings for Lua 5.0.x
+COMMENT= Pty (pseudo-terminal) bindings for Lua 5
-BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
-
-USE_LUA= 5.0
-LUA_COMPS= lua compat51
+USE_LUA?= 5.1
+.if ${USE_LUA} == 5.0
+LUA_COMPS= compat51 lua
+BUILD_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
COMPAT_SRC= `(cd ${PORTSDIR}/devel/lua50-compat51 && ${MAKE} -V WRKSRC)`
MAKE_ENV= COMPATDIR="${COMPAT_SRC}"
+.endif
PLIST_FILES= %%LUA_MODSHAREDIR%%/pty.lua \
%%LUA_MODLIBDIR%%/lpty.so
Index: devel/lua-pty/files/Makefile
===================================================================
RCS file: /cvsroot/ports/devel/lua50-pty/files/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- devel/lua-pty/files/Makefile 15 Sep 2006 08:17:07 -0000 1.3
+++ devel/lua-pty/files/Makefile 16 Sep 2006 10:47:20 -0000
@@ -3,7 +3,10 @@
SHLIB= pty
SHLIB_NAME= lpty.so
-SRCS= pty.c ${COMPATDIR}/compat-5.1.c
+SRCS= pty.c
+.if defined(COMPATDIR)
+SRCS+= ${COMPATDIR}/compat-5.1.c
+.endif
CFLAGS+= -I${LUA_INCDIR}
LDFLAGS+= -L/usr/lib -lutil
Index: devel/lua50-pty/Makefile
===================================================================
RCS file: /cvsroot/ports/devel/lua50-pty/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- devel/lua50-pty/Makefile 18 Sep 2006 02:49:18 -0000 1.6
+++ devel/lua50-pty/Makefile 1 Dec 2006 09:14:28 -0000
@@ -5,37 +5,8 @@
# $FreeBSD: ports/devel/lua50-pty/Makefile,v 1.6 2006/09/18 02:49:18 linimon Exp $
#
-PORTNAME= pty
-PORTVERSION= 1.25
-CATEGORIES= devel
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= philip
-PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
-DISTFILES= pty.lua?rev=1.2 pty.c?rev=1.25
-
-MAINTAINER= andrew+ports at fubar.geek.nz
-COMMENT= Pty (pseudo-terminal) bindings for Lua 5.0.x
-
-BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
-
USE_LUA= 5.0
-LUA_COMPS= lua compat51
-
-COMPAT_SRC= `(cd ${PORTSDIR}/devel/lua50-compat51 && ${MAKE} -V WRKSRC)`
-MAKE_ENV= COMPATDIR="${COMPAT_SRC}"
-
-PLIST_FILES= %%LUA_MODSHAREDIR%%/pty.lua \
- %%LUA_MODLIBDIR%%/lpty.so
-
-do-extract:
- @${MKDIR} ${WRKSRC}
-.for file in ${DISTFILES}
- @${CP} ${DISTDIR}/${file} ${WRKSRC}/${file:C/\?.*$//}
-.endfor
- @${CP} ${FILESDIR}/Makefile ${WRKSRC}
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/lpty.so ${LUA_MODLIBDIR}
- ${INSTALL_DATA} ${WRKSRC}/pty.lua ${LUA_MODSHAREDIR}
+MASTERDIR= ${.CURDIR}/../lua-pty
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile"
--- lua-pty.diff ends here ---
--- patch-pty.c begins here ---
--- pty.c.orig Wed Nov 29 21:26:24 2006
+++ pty.c Wed Nov 29 21:29:38 2006
@@ -66,6 +66,15 @@
#define WEXIT_TYPE union wait
#endif
+#ifndef lua_boxpointer
+#define lua_boxpointer(L,u) \
+ (*(void **)(lua_newuserdata(L, sizeof(void *))) = (u))
+#endif
+
+#ifndef lua_unboxpointer
+#define lua_unboxpointer(L,i) (*(void **)(lua_touserdata(L, i)))
+#endif
+
struct lua_pty {
FILE *stream;
pid_t child;
--- patch-pty.c ends here ---
--- patch-pty.lua begins here ---
--- pty.lua.orig Wed Nov 29 22:38:08 2006
+++ pty.lua Wed Nov 29 22:39:00 2006
@@ -1,9 +1,8 @@
-- $Id: pty.lua,v 1.2 2005/08/13 20:00:40 cpressey Exp $
-- Lua wrapper functions for Lua 5.0.x Pty (pseudo-terminal) binding.
+local Pty = require("lpty")
module("pty")
-
-Pty = require("lpty")
--[[------------]]--
--[[ Pty.Logged ]]--
--- patch-pty.lua ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list