LuaExpat is a SAX XML parser based on the Expat library. SAX is the Simple API

for XML and allows programs to:

* process a XML document incrementally, thus being able to handle huge
  documents without memory penalties;
* register handler functions which are called by the parser during the
  processing of the document, handling the document elements or text.

With an event-based API like SAX the XML document can be fed to the parser in
chunks, and the parsing begins as soon as the parser receives the first
document chunk. LuaExpat reports parsing events (such as the start and end of
elements) directly to the application through callbacks. The parsing of huge
documents can benefit from this piecemeal operation.

WWW: http://www.keplerproject.org/luaexpat

PR:		ports/136265
Submitted by:	Andrew Lewis <dru at silenceisdefeat.net>
This commit is contained in:
Philip M. Gollucci 2009-07-14 06:02:55 +00:00
parent 37715c63a8
commit e271fb5d9f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=237757
7 changed files with 106 additions and 0 deletions

View file

@ -339,6 +339,7 @@
SUBDIR += localize
SUBDIR += lt-aspell
SUBDIR += ltxml
SUBDIR += luaexpat
SUBDIR += lucene
SUBDIR += lv-aspell
SUBDIR += m17n-contrib

View file

@ -0,0 +1,32 @@
# New ports collection makefile for: luaexpat
# Date created: 25 June 2009
# Whom: Andrew Lewis <dru@silenceisdefeat.net>
#
# $FreeBSD$
#
PORTNAME= luaexpat
PORTVERSION= 1.1
CATEGORIES= textproc
MASTER_SITES= http://luaforge.net/frs/download.php/2469/
PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
MAINTAINER= dru@silenceisdefeat.net
COMMENT= LuaExpat is a SAX XML parser based on the Expat library
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2
ONLY_FOR_ARCHS= i386
MAKEFILE= makefile
ALL_TARGET= lib
USE_LUA= 5.0-5.1
WANT_LUA_VER= 5.1
CFLAGS+= -fPIC
.if ${USE_LUA} == 5.0
BUILD_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:build
.endif
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
MD5 (luaexpat-1.1.tar.gz) = 6ecb895ccf5cff1e7f2facd438b1f8d0
SHA256 (luaexpat-1.1.tar.gz) = 9d709ddc606630f9b9dc3f3aafcb2a7c1fcb2675000c09978d8a37974e74effd
SIZE (luaexpat-1.1.tar.gz) = 27907

View file

@ -0,0 +1,32 @@
--- config.orig 2006-06-08 20:41:48.000000000 +0000
+++ config 2009-07-03 03:00:20.000000000 +0000
@@ -1,15 +1,15 @@
# Installation directories
# System's libraries directory (where binary libraries are installed)
-LUA_LIBDIR= /usr/local/lib/lua/5.0
+LUA_LIBDIR= ${LUA_MODLIBDIR}
# System's lua directory (where Lua libraries are installed)
-LUA_DIR= /usr/local/share/lua/5.0
+LUA_DIR= ${LUA_MODSHAREDIR}
# Lua includes directory
-LUA_INC= /usr/local/include
+LUA_INC= ${LUA_INCDIR}
# Expat includes directory
-EXPAT_INC= /usr/local/include
+EXPAT_INC= ${LOCALBASE}/include
# OS dependent
-LIB_OPTION= -shared #for Linux
+LIB_OPTION= -L${LOCALBASE}/lib -shared #for Linux
#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X
LIBNAME= $T.so.$V
@@ -18,7 +18,7 @@
# first version digit * 100 + second version digit
# e.g. Lua 5.0.2 => 500, Lua 5.1 => 501, Lua 5.1.1 => 501)
LUA_VERSION_NUM= 500
-COMPAT_DIR= ../compat/src
+COMPAT_DIR= ${LUA_MODLIBDIR}
# Compilation parameters
CWARNS = -Wall -pedantic \

View file

@ -0,0 +1,19 @@
--- makefile.orig 2009-06-25 06:07:16.000000000 +0000
+++ makefile 2009-06-25 06:23:06.000000000 +0000
@@ -4,15 +4,11 @@
include $(CONFIG)
-ifeq "$(LUA_VERSION_NUM)" "500"
-COMPAT_O= $(COMPAT_DIR)/compat-5.1.o
-endif
-
OBJS= src/lxplib.o $(COMPAT_O)
lib: src/$(LIBNAME)
src/$(LIBNAME) : $(OBJS)
- export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) -o src/$(LIBNAME) $(LIB_OPTION) $(OBJS) -lexpat
+ export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) -o src/$(LIBNAME) $(LIB_OPTION) lxplib.o $(COMPAT_O) -lexpat
$(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c
$(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c

View file

@ -0,0 +1,15 @@
LuaExpat is a SAX XML parser based on the Expat library. SAX is the Simple API
for XML and allows programs to:
* process a XML document incrementally, thus being able to handle huge
documents without memory penalties;
* register handler functions which are called by the parser during the
processing of the document, handling the document elements or text.
With an event-based API like SAX the XML document can be fed to the parser in
chunks, and the parsing begins as soon as the parser receives the first
document chunk. LuaExpat reports parsing events (such as the start and end of
elements) directly to the application through callbacks. The parsing of huge
documents can benefit from this piecemeal operation.
WWW: http://www.keplerproject.org/luaexpat

View file

@ -0,0 +1,4 @@
%%LUA_MODLIBDIR%%/lxp.so
%%LUA_MODLIBDIR%%/lxp.so.1.1.0
%%LUA_MODSHAREDIR%%/lxp/lom.lua
@dirrm share/lua/5.1/lxp