Import converters/lua-iconv.
Lua-iconv is POSIX 'iconv' binding for the Lua Programming Language. The iconv library converts a sequence of characters from one codeset into a sequence of corresponding characters in another codeset. The codesets are those specified in the iconv.new() call that returned the conversion descriptor, cd. OK jca@
This commit is contained in:
parent
15153eb682
commit
f8af91f528
43
converters/lua-iconv/Makefile
Normal file
43
converters/lua-iconv/Makefile
Normal file
@ -0,0 +1,43 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2016/11/02 12:30:39 fcambus Exp $
|
||||
|
||||
COMMENT = Lua bindings for the iconv library
|
||||
|
||||
V = 7
|
||||
DISTNAME = lua-iconv-${V}
|
||||
|
||||
GH_ACCOUNT = ittner
|
||||
GH_PROJECT = lua-iconv
|
||||
GH_TAGNAME = lua-iconv-${V}
|
||||
|
||||
CATEGORIES = converters
|
||||
|
||||
MAINTAINER = Frederic Cambus <fcambus@openbsd.org>
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
LIB_DEPENDS = converters/libiconv
|
||||
|
||||
MODULES = lang/lua
|
||||
TEST_DEPENDS += ${BASE_PKGPATH}
|
||||
WANTLIB += ${MODLUA_WANTLIB} iconv
|
||||
|
||||
FLAVORS = lua52 lua53
|
||||
FLAVOR ?=
|
||||
|
||||
CFLAGS += `pkg-config --cflags ${MODLUA_DEP}` -I${LOCALBASE}/include
|
||||
LINK = ${CC} ${CFLAGS} -fPIC -shared -L${LOCALBASE}/lib -o
|
||||
|
||||
do-build:
|
||||
cd ${WRKDIST} && ${LINK} iconv.so luaiconv.c ${MODLUA_LIB} -liconv
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${MODLUA_LIBDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/iconv.so ${MODLUA_LIBDIR}
|
||||
${INSTALL_DATA_DIR} ${MODLUA_DOCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${MODLUA_DOCDIR}
|
||||
|
||||
do-test:
|
||||
cd ${WRKDIST} && ${MODLUA_BIN} test_iconv.lua
|
||||
|
||||
.include <bsd.port.mk>
|
2
converters/lua-iconv/distinfo
Normal file
2
converters/lua-iconv/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (lua-iconv-7.tar.gz) = xwgEE7Pn1H3IAqaN8huz82h/b/csjBDBT/yVg88+Je0=
|
||||
SIZE (lua-iconv-7.tar.gz) = 11568
|
18
converters/lua-iconv/patches/patch-test_iconv_lua
Normal file
18
converters/lua-iconv/patches/patch-test_iconv_lua
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-test_iconv_lua,v 1.1.1.1 2016/11/02 12:30:39 fcambus Exp $
|
||||
|
||||
Fix encoding names and remove test for unsupported encoding
|
||||
|
||||
--- test_iconv.lua.orig Tue Oct 25 21:39:29 2016
|
||||
+++ test_iconv.lua Tue Oct 25 21:39:51 2016
|
||||
@@ -93,9 +93,8 @@ function check_one(to, from, text)
|
||||
end
|
||||
|
||||
check_one(termcs, "iso-8859-1", iso88591)
|
||||
-check_one(termcs, "utf8", utf8)
|
||||
-check_one(termcs, "utf16", utf16)
|
||||
-check_one(termcs, "EBCDIC-CP-ES", ebcdic)
|
||||
+check_one(termcs, "utf-8", utf8)
|
||||
+check_one(termcs, "utf-16", utf16)
|
||||
|
||||
|
||||
-- The library must never crash the interpreter, even if the user tweaks
|
4
converters/lua-iconv/pkg/DESCR
Normal file
4
converters/lua-iconv/pkg/DESCR
Normal file
@ -0,0 +1,4 @@
|
||||
Lua-iconv is POSIX 'iconv' binding for the Lua Programming Language. The iconv
|
||||
library converts a sequence of characters from one codeset into a sequence of
|
||||
corresponding characters in another codeset. The codesets are those specified
|
||||
in the iconv.new() call that returned the conversion descriptor, cd.
|
4
converters/lua-iconv/pkg/PLIST
Normal file
4
converters/lua-iconv/pkg/PLIST
Normal file
@ -0,0 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/11/02 12:30:39 fcambus Exp $
|
||||
lib/lua/${MODLUA_VERSION}/iconv.so
|
||||
share/doc/${FULLPKGNAME}/
|
||||
share/doc/${FULLPKGNAME}/README
|
Loading…
Reference in New Issue
Block a user