From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Dec 4 21:02:51 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E7B316A956 for ; Mon, 4 Dec 2006 21:02:51 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FE8843FBF for ; Mon, 4 Dec 2006 20:59:56 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kB4L0UPr009147 for ; Mon, 4 Dec 2006 21:00:30 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kB4L0UFX009145; Mon, 4 Dec 2006 21:00:30 GMT (envelope-from gnats) Resent-Date: Mon, 4 Dec 2006 21:00:30 GMT Resent-Message-Id: <200612042100.kB4L0UFX009145@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrew Turner Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A159416A549 for ; Mon, 4 Dec 2006 20:56:48 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep05.xtra.co.nz (fep05.xtra.co.nz [210.54.141.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 458904409A for ; Mon, 4 Dec 2006 20:37:46 +0000 (GMT) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.176.24]) by fep05.xtra.co.nz with ESMTP id <20061204203802.LRRL27418.fep05.xtra.co.nz@serv.int.fubar.geek.nz> for ; Tue, 5 Dec 2006 09:38:02 +1300 Received: by serv.int.fubar.geek.nz (Postfix, from userid 1001) id 3EDE56175; Tue, 5 Dec 2006 09:38:02 +1300 (NZDT) Message-Id: <20061204203802.3EDE56175@serv.int.fubar.geek.nz> Date: Tue, 5 Dec 2006 09:38:02 +1300 (NZDT) From: Andrew Turner To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: andrew@fubar.geek.nz Subject: ports/106347: Maintainer update of devel/lua50-pty X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andrew Turner List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2006 21:02:51 -0000 >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@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@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@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 +.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: