Subject: pkg/24219: Lua5 must install bin2c (to compile external modules)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <pancake@phreaker.net>
List: netbsd-bugs
Date: 01/24/2004 20:46:09
>Number:         24219
>Category:       pkg
>Synopsis:       Lua5 does not builds/installs the bin2c program
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 24 20:52:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6ZH
>Organization:
	
>Environment:
	
	
System: NetBSD pl2 1.6ZH NetBSD 1.6ZH (pancake-laptop) #7: Sun Jan 18 18:44:52 CET 2004 root@panser:/usr/src/sys/arch/i386/compile/PANCAKE_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
	lua5 does not builds/installs the etc/bin2c.c program, this program
	is needed for building other modules for lua5 (for example:
	luasocket that gives socket features to lua5).
	
>How-To-Repeat:
	download and install luasocket :) it's impossible. "bin2c" not found.
	I want to make this pkg. and upload to wip.
	
>Fix:

Just add this patches to the pkgsrc: lang/lua/
--- Makefile.orig	2004-01-24 20:33:00.000000000 +0000
+++ Makefile	2004-01-24 20:39:26.000000000 +0000
@@ -30,7 +30,11 @@
 	${CP} ${WRKSRC}/doc/lua.1 ${BUILD_DIRS}/lua
 	${CP} ${WRKSRC}/doc/luac.1 ${BUILD_DIRS}/luac
 
+post-build:
+	${CC} ${WRKSRC}/etc/bin2c.c -o ${WRKSRC}/etc/bin2c
+
 post-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/etc/bin2c ${PREFIX}/bin/bin2c
 	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/lua
 	cd ${WRKSRC}; ${INSTALL_DATA} README COPYRIGHT	\
 		HISTORY ${PREFIX}/share/doc/lua



--- PLIST.orig	2004-01-24 20:40:29.000000000 +0000
+++ PLIST	2004-01-24 20:40:43.000000000 +0000
@@ -1,6 +1,7 @@
 @comment $NetBSD: PLIST,v 1.3 2003/04/29 23:33:56 jtb Exp $
 bin/lua
 bin/luac
+bin/bin2c
 include/lauxlib.h
 include/lua.h
 include/lualib.h

	
>Release-Note:
>Audit-Trail:
>Unformatted: