diff options
Diffstat (limited to 'textproc/lua-luaexpat')
-rw-r--r-- | textproc/lua-luaexpat/Makefile | 29 | ||||
-rw-r--r-- | textproc/lua-luaexpat/distinfo | 3 | ||||
-rw-r--r-- | textproc/lua-luaexpat/files/patch-Makefile | 19 | ||||
-rw-r--r-- | textproc/lua-luaexpat/pkg-descr | 12 | ||||
-rw-r--r-- | textproc/lua-luaexpat/pkg-plist | 4 |
5 files changed, 67 insertions, 0 deletions
diff --git a/textproc/lua-luaexpat/Makefile b/textproc/lua-luaexpat/Makefile new file mode 100644 index 000000000000..d65adb15d2e1 --- /dev/null +++ b/textproc/lua-luaexpat/Makefile @@ -0,0 +1,29 @@ +PORTNAME= luaexpat +PORTVERSION= 1.5.2 +CATEGORIES= textproc +PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= SAX XML parser based on the Expat library +WWW= https://lunarmodules.github.io/luaexpat/ \ + https://github.com/lunarmodules/luaexpat + +LICENSE= MIT + +LIB_DEPENDS= libexpat.so:textproc/expat2 + +USES= gmake lua:module + +USE_GITHUB= yes +GH_ACCOUNT= lunarmodules + +ALL_TARGET= lib +CFLAGS+= -fPIC +LDFLAGS+= -L${LOCALBASE}/lib +MAKE_ARGS= COMMON_CFLAGS=-Wall +MAKE_ENV= EXPAT_INC=-I${LOCALBASE}/include LUA_CDIR=${LUA_MODLIBDIR} LUA_INC=-I${LUA_INCDIR} LUA_LDIR=${LUA_MODSHAREDIR} LUA_V=${LUA_VER} + +post-install: + ${STRIP_CMD} ${STAGEDIR}${LUA_MODLIBDIR}/lxp.so + +.include <bsd.port.mk> diff --git a/textproc/lua-luaexpat/distinfo b/textproc/lua-luaexpat/distinfo new file mode 100644 index 000000000000..7f504d456eff --- /dev/null +++ b/textproc/lua-luaexpat/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1720022714 +SHA256 (lunarmodules-luaexpat-1.5.2_GH0.tar.gz) = 89d83f2141edec31be576425637216928221918fe95dc3854d1b7fd4c627213f +SIZE (lunarmodules-luaexpat-1.5.2_GH0.tar.gz) = 54072 diff --git a/textproc/lua-luaexpat/files/patch-Makefile b/textproc/lua-luaexpat/files/patch-Makefile new file mode 100644 index 000000000000..42ad927f5d63 --- /dev/null +++ b/textproc/lua-luaexpat/files/patch-Makefile @@ -0,0 +1,19 @@ +--- Makefile.orig 2022-10-03 09:23:43 UTC ++++ Makefile +@@ -27,10 +27,12 @@ src/$(LIBNAME): + $(CC) $(CF) $(RPM_OPT_FLAGS) $(RPM_LD_FLAGS) -o $@ src/$(T)lib.c $(LF) + + install: +- $(INSTALL_PROGRAM) -D src/$(LIBNAME) $(DESTDIR)$(LUA_CDIR)/$(LIBNAME) +- $(INSTALL_DATA) -D src/$T/lom.lua $(DESTDIR)$(LUA_LDIR)/$T/lom.lua +- $(INSTALL_DATA) -D src/$T/totable.lua $(DESTDIR)$(LUA_LDIR)/$T/totable.lua +- $(INSTALL_DATA) -D src/$T/threat.lua $(DESTDIR)$(LUA_LDIR)/$T/threat.lua ++ mkdir -p $(DESTDIR)$(LUA_CDIR) ++ mkdir -p $(DESTDIR)$(LUA_LDIR)/$T ++ $(INSTALL_PROGRAM) src/$(LIBNAME) $(DESTDIR)$(LUA_CDIR)/$(LIBNAME) ++ $(INSTALL_DATA) src/$T/lom.lua $(DESTDIR)$(LUA_LDIR)/$T/lom.lua ++ $(INSTALL_DATA) src/$T/totable.lua $(DESTDIR)$(LUA_LDIR)/$T/totable.lua ++ $(INSTALL_DATA) src/$T/threat.lua $(DESTDIR)$(LUA_LDIR)/$T/threat.lua + + clean: + $(RM) src/$(LIBNAME) $(OBJS) diff --git a/textproc/lua-luaexpat/pkg-descr b/textproc/lua-luaexpat/pkg-descr new file mode 100644 index 000000000000..8109063588e0 --- /dev/null +++ b/textproc/lua-luaexpat/pkg-descr @@ -0,0 +1,12 @@ +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. diff --git a/textproc/lua-luaexpat/pkg-plist b/textproc/lua-luaexpat/pkg-plist new file mode 100644 index 000000000000..0c507687f33a --- /dev/null +++ b/textproc/lua-luaexpat/pkg-plist @@ -0,0 +1,4 @@ +%%LUA_MODLIBDIR%%/lxp.so +%%LUA_MODSHAREDIR%%/lxp/lom.lua +%%LUA_MODSHAREDIR%%/lxp/threat.lua +%%LUA_MODSHAREDIR%%/lxp/totable.lua |