From nobody@FreeBSD.org  Wed Apr 19 20:00:52 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 11E0416A403
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Apr 2006 20:00:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B7B0443D45
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Apr 2006 20:00:51 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k3JK0pKD047638
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Apr 2006 20:00:51 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k3JK0pQ9047637;
	Wed, 19 Apr 2006 20:00:51 GMT
	(envelope-from nobody)
Message-Id: <200604192000.k3JK0pQ9047637@www.freebsd.org>
Date: Wed, 19 Apr 2006 20:00:51 GMT
From: Andrew Turner <andrew+ports@fubar.geek.nz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Maintainer Update: devel/lua50-compat51
X-Send-Pr-Version: www-2.3

>Number:         96068
>Category:       ports
>Synopsis:       Maintainer Update: devel/lua50-compat51
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 19 20:10:14 GMT 2006
>Closed-Date:    Thu Apr 20 08:45:42 GMT 2006
>Last-Modified:  Thu Apr 20 08:45:42 GMT 2006
>Originator:     Andrew Turner
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
none
>Environment:
System: FreeBSD hermies.int.fubar.geek.nz 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #2: Sun Mar 12 21:30:28 NZDT 2006 root@hermies.int.fubar.geek.nz:/usr/obj/srctrees/RELENG_6/sys/GENERIC i386
>Description:
The attached patch, port-devel-lua50-compat51-2.diff, updates devel/lua50-compat51 to add correct CONFLICTS line to stop it over writing share/lua/5.0/compat-5.1.lua from net/luasocket.

The second file, patch-compat-51, is to be placed in the port's files directory to fix a bug where modules would stop working when they used some features of this port.

The lib/liblua-compat-5.1.a and lib/liblua-compat-5.1_p.a filea are no longer needed as they only contained one object file. The C file is now obtained from this port by any other port that requires it as the static libraries never worked the way I intended them to.

ports/95846 can be closed as this pr (and another I am about to submit) fix the problem.
>How-To-Repeat:

>Fix:
1. Apply port-devel-lua50-compat51-2.diff
2. Add patch-compat-51 to the ports files directory

--- port-devel-lua50-compat51-2.diff begins here ---
Index: Makefile
===================================================================
RCS file: /cvsroot/ports/devel/lua50-compat51/Makefile,v
retrieving revision 1.1
diff -u -3 -p -r1.1 Makefile
--- Makefile	15 Apr 2006 16:54:48 -0000	1.1
+++ Makefile	16 Apr 2006 23:41:15 -0000
@@ -16,6 +16,8 @@ COMMENT=	Lua 5.1 package compatibility l
 
 BUILD_DEPENDS=	${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua
 
+CONFLICTS=	luasocket-2.0
+
 # Update these values when there is a new release
 CVER=		5.1
 CREV=		r5
@@ -26,7 +28,7 @@ LIBDIR=		${PREFIX}/lib
 post-extract:
 	@${CP} ${FILESDIR}/Makefile ${WRKSRC}
 
-post-install:
+do-install:
 	${MKDIR} ${PREFIX}/share/lua/5.0
 	${INSTALL_DATA} ${WRKSRC}/compat-5.1.lua ${PREFIX}/share/lua/5.0
 
Index: pkg-plist
===================================================================
RCS file: /cvsroot/ports/devel/lua50-compat51/pkg-plist,v
retrieving revision 1.1
diff -u -3 -p -r1.1 pkg-plist
--- pkg-plist	15 Apr 2006 16:54:48 -0000	1.1
+++ pkg-plist	16 Apr 2006 23:30:59 -0000
@@ -1,5 +1,3 @@
-lib/liblua-compat-5.1.a
-lib/liblua-compat-5.1_p.a
 share/lua/5.0/compat-5.1.lua
 @dirrmtry share/lua/5.0
 @dirrmtry share/lua
--- port-devel-lua50-compat51-2.diff ends here ---

--- patch-compat-51 begins here ---
--- compat-5.1.lua.orig	Fri Apr 14 19:13:01 2006
+++ compat-5.1.lua	Fri Apr 14 19:14:21 2006
@@ -260,6 +260,7 @@
 		ns._M = ns
 		ns._PACKAGE = gsub (modname, "[^.]*$", "")
 	end
+	setmetatable(ns, {__index = _G})
 	setfenv (2, ns)
 	for i, f in ipairs (arg) do
 		f (ns)
--- patch-compat-51 ends here ---
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: erwin 
State-Changed-When: Thu Apr 20 08:45:36 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96068 
>Unformatted:
