diff options
author | nia <nia@pkgsrc.org> | 2020-07-02 17:13:37 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-07-02 17:13:37 +0000 |
commit | 48c68a136bcfa8e0922782a4b3ecadae2939be7e (patch) | |
tree | 4aaa56b729695043b7fe94ee2a2e8f4714173710 | |
parent | ead7d3e00919290999ac8f6353bc7532d3215d54 (diff) | |
download | pkgsrc-48c68a136bcfa8e0922782a4b3ecadae2939be7e.tar.gz |
textproc: Add lua-utf8
This module adds UTF-8 support to Lua. It's compatible with Lua's
own string module, and passes all string and pattern matching tests
in Lua's test suite.
It also adds some useful routines against UTF-8 features:
- a convenient interface to escape Unicode sequences in strings.
- string insert/remove, since UTF-8 substring extract may be expensive.
- calculate Unicode width, useful when implementing e.g. console emulator.
- a useful interface to translate Unicode offsets and byte offsets.
-rw-r--r-- | textproc/Makefile | 3 | ||||
-rw-r--r-- | textproc/lua-utf8/DESCR | 10 | ||||
-rw-r--r-- | textproc/lua-utf8/Makefile | 26 | ||||
-rw-r--r-- | textproc/lua-utf8/PLIST | 2 | ||||
-rw-r--r-- | textproc/lua-utf8/distinfo | 6 | ||||
-rw-r--r-- | textproc/lua-utf8/files/Makefile | 7 |
6 files changed, 53 insertions, 1 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index 9646e1949f4..4de1b94f1f2 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1152 2020/07/02 14:10:04 nia Exp $ +# $NetBSD: Makefile,v 1.1153 2020/07/02 17:13:37 nia Exp $ # COMMENT= Text processing utilities (does not include desktop publishing) @@ -464,6 +464,7 @@ SUBDIR+= lua-expat SUBDIR+= lua-lustache SUBDIR+= lua-markdown SUBDIR+= lua-slnunicode +SUBDIR+= lua-utf8 SUBDIR+= lua-xapian SUBDIR+= lucene++ SUBDIR+= makeindexk diff --git a/textproc/lua-utf8/DESCR b/textproc/lua-utf8/DESCR new file mode 100644 index 00000000000..ab9ba6875d8 --- /dev/null +++ b/textproc/lua-utf8/DESCR @@ -0,0 +1,10 @@ +This module adds UTF-8 support to Lua. It's compatible with Lua's +own string module, and passes all string and pattern matching tests +in Lua's test suite. + +It also adds some useful routines against UTF-8 features: + +- a convenient interface to escape Unicode sequences in strings. +- string insert/remove, since UTF-8 substring extract may be expensive. +- calculate Unicode width, useful when implementing e.g. console emulator. +- a useful interface to translate Unicode offsets and byte offsets. diff --git a/textproc/lua-utf8/Makefile b/textproc/lua-utf8/Makefile new file mode 100644 index 00000000000..db0e622a97d --- /dev/null +++ b/textproc/lua-utf8/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1 2020/07/02 17:13:37 nia Exp $ + +DISTNAME= lua-utf8-0.1.2 +PKGNAME= ${DISTNAME:S/lua-/${LUA_PKGPREFIX}-/1} +CATEGORIES= textproc lua +MASTER_SITES= ${MASTER_SITE_GITHUB:=starwing/} +GITHUB_PROJECT= luautf8 + +MAINTAINER= nia@NetBSD.org +HOMEPAGE= https://github.com/starwing/luautf8 +COMMENT= UTF-8 module for Lua 5.x +LICENSE= mit + +WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${PKGVERSION_NOREV} + +INSTALLATION_DIRS+= ${LUA_CDIR} + +pre-build: + ${CP} -f ${FILESDIR}/Makefile ${WRKSRC}/Makefile + +do-install: + ${INSTALL_LIB} ${WRKSRC}/lua-utf8.so \ + ${DESTDIR}${PREFIX}/${LUA_CDIR}/lua-utf8.so + +.include "../../lang/lua/module.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/textproc/lua-utf8/PLIST b/textproc/lua-utf8/PLIST new file mode 100644 index 00000000000..389515a2e11 --- /dev/null +++ b/textproc/lua-utf8/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1 2020/07/02 17:13:37 nia Exp $ +${LUA_CDIR}/lua-utf8.so diff --git a/textproc/lua-utf8/distinfo b/textproc/lua-utf8/distinfo new file mode 100644 index 00000000000..4cffd9c00c4 --- /dev/null +++ b/textproc/lua-utf8/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2020/07/02 17:13:37 nia Exp $ + +SHA1 (lua-utf8-0.1.2.tar.gz) = 6f3b411cc6d76237fbf9c2427f2c2343d5b99ef8 +RMD160 (lua-utf8-0.1.2.tar.gz) = dcedeafb89c94481872f2040c3f5e713b197c3ef +SHA512 (lua-utf8-0.1.2.tar.gz) = 99d0a9958020175e6d3891603cb0ad9903d8013f8950ef211da6fc946be7f8ed9c0f7c46849aa78e9fa77b7c3fba12078227c1a5823c047ae2f17e559202b71e +Size (lua-utf8-0.1.2.tar.gz) = 41188 bytes diff --git a/textproc/lua-utf8/files/Makefile b/textproc/lua-utf8/files/Makefile new file mode 100644 index 00000000000..559b4fa3f09 --- /dev/null +++ b/textproc/lua-utf8/files/Makefile @@ -0,0 +1,7 @@ +all: lua-utf8.so + +lutf8lib.o: + $(CC) $(CFLAGS) -fPIC -c lutf8lib.c + +lua-utf8.so: lutf8lib.o + $(CC) $(LDFLAGS) -shared -o lua-utf8.so lutf8lib.o |