Initial import of lua-expat from pkgsrc-wip, packaged by pancake.

LuaExpat is a XML parser based on the Expat XML parser.
It allows Lua programs to:

- Process a XML document incrementally , thus being able to handle
  huge documents without memory penalties;

- Register handler functions wich are called by the parser during
  the processing of the document, handling the document elements or text.
This commit is contained in:
xtraeme 2004-04-05 13:57:53 +00:00
parent 84acda723e
commit e8d4952ea3
7 changed files with 101 additions and 0 deletions

8
textproc/lua-expat/DESCR Normal file
View file

@ -0,0 +1,8 @@
LuaExpat is a XML parser based on the Expat XML parser.
It allows Lua programs to:
- Process a XML document incrementally , thus being able to handle
huge documents without memory penalties;
- Register handler functions wich are called by the parser during
the processing of the document, handling the document elements or text.

View file

@ -0,0 +1,13 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2004/04/05 13:57:53 xtraeme Exp $
To use luaexpat in your lua programs you must set this environment
variable:
LUA_INIT = "loadlib('${PREFIX}/lib/liblualxp.so','luaopen_lxp')();"
Examples were installed on:
${PREFIX}/share/examples/lua
===========================================================================

View file

@ -0,0 +1,24 @@
# $NetBSD: Makefile,v 1.1.1.1 2004/04/05 13:57:53 xtraeme Exp $
#
DISTNAME= luaexpat-1.0a
PKGNAME= ${DISTNAME:S/lua/lua-/}
CATEGORIES= textproc
MASTER_SITES= http://www.keplerproject.org/luaexpat/
MAINTAINER= pancake@phreaker.net
HOMEPAGE= http://www.tecgraf.puc-rio.br/~diego/luasocket/new/
COMMENT= XML parser for LUA based on expat
USE_GNU_TOOLS+= make
USE_BUILDLINK3= yes
MAKEFILE= makefile
do-install:
${INSTALL_DATA} ${WRKSRC}/liblxp.so ${PREFIX}/lib/liblualxp.so
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/lua
${INSTALL_DATA} ${WRKSRC}/test.lua ${PREFIX}/share/examples/lua/lxp.lua
.include "../../textproc/expat/buildlink3.mk"
.include "../../lang/lua/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

3
textproc/lua-expat/PLIST Normal file
View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2004/04/05 13:57:53 xtraeme Exp $
lib/liblualxp.so
share/examples/lua/lxp.lua

View file

@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2004/04/05 13:57:53 xtraeme Exp $
SHA1 (luaexpat-1.0a.tar.gz) = f9393bf4cc1f41b34336b4f2e14fdbf7adf06c55
Size (luaexpat-1.0a.tar.gz) = 16460 bytes
SHA1 (patch-aa) = 6c7d49c6d153170b6475b4fcbfedc67cd8e34cd7
SHA1 (patch-ab) = 3e083f15ef99fc6e0931416f092093ed821f4927

View file

@ -0,0 +1,34 @@
$NetBSD: patch-aa,v 1.1.1.1 2004/04/05 13:57:53 xtraeme Exp $
--- makefile.orig 2004-01-29 22:54:22.000000000 +0000
+++ makefile 2004-01-29 22:58:13.000000000 +0000
@@ -1,5 +1,5 @@
# Compilation parameters
-CC = gcc
+#CC= gcc
CWARNS = -Wall -pedantic \
-Waggregate-return \
-Wcast-align \
@@ -11,8 +11,8 @@
-Wwrite-strings
-CFLAGS = $(CONFIG) $(CWARNS) -ansi -g -O2 -I/usr/local/include/lua5 \
- -L./expat/xmlparse
+CFLAGS+= $(CONFIG) -O2 -I${PREFIX}/include \
+ -L${PREFIX}/lib
VERSION= 1.0a
PKG = luaexpat-$(VERSION)
@@ -23,9 +23,10 @@
test.lua \
index.html manual.html lua.png
+all: liblxp.so
liblxp.so : lxplib.o
- ld -o liblxp.so -shared lxplib.o -lexpat
+ ld -o liblxp.so -L${PREFIX}/lib -Wl,${RPATH_FLAG}${PREFIX}/lib -shared lxplib.o -lexpat
liblxp.dylib : lxplib.o
gcc -o liblxp.dylib -dynamiclib lxplib.o -lexpat -llua.5.0 -llualib.5.0

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ab,v 1.1.1.1 2004/04/05 13:57:53 xtraeme Exp $
--- lxplib.c.orig 2004-01-29 22:56:49.000000000 +0000
+++ lxplib.c 2004-01-29 22:56:56.000000000 +0000
@@ -9,7 +9,7 @@
#include <stdlib.h>
#include <string.h>
-#include <xmlparse.h>
+#include <expat.h>
#include <lua.h>
#include <lauxlib.h>