diff options
author | Martin Matuska <mm@FreeBSD.org> | 2022-02-16 15:19:10 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2022-02-16 15:19:50 +0000 |
commit | 654cb5b91266e40ffe32db8234508b515422dbb4 (patch) | |
tree | b7ae60da1eabdb02989ceceb67d2bcc7de7e789e /textproc/lua-icu-utils | |
parent | 76d8d035f5b9e17f62720fb1cb02c13a59d44622 (diff) | |
download | ports-654cb5b91266e40ffe32db8234508b515422dbb4.tar.gz ports-654cb5b91266e40ffe32db8234508b515422dbb4.zip |
textproc/lua-icu-utils: New port
Lua interface to selected utilities from the ICU project
WWW: https://github.com/adam-stanek/lua_icu_utils
Diffstat (limited to 'textproc/lua-icu-utils')
-rw-r--r-- | textproc/lua-icu-utils/Makefile | 40 | ||||
-rw-r--r-- | textproc/lua-icu-utils/distinfo | 3 | ||||
-rw-r--r-- | textproc/lua-icu-utils/files/patch-src_convert__case.c | 29 | ||||
-rw-r--r-- | textproc/lua-icu-utils/pkg-descr | 3 |
4 files changed, 75 insertions, 0 deletions
diff --git a/textproc/lua-icu-utils/Makefile b/textproc/lua-icu-utils/Makefile new file mode 100644 index 000000000000..ca646aa4861b --- /dev/null +++ b/textproc/lua-icu-utils/Makefile @@ -0,0 +1,40 @@ +# Created by: Martin Matuska <mm@FreeBSD.org> + +PORTNAME= icu-utils +DISTVERSION= 0.0-20160816 +CATEGORIES= textproc +PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX} + +MAINTAINER= mm@FreeBSD.org +COMMENT= Lua interface to selected ICU utilities + +LICENSE= MIT + +LIB_DEPENDS= libicui18n.so:devel/icu + +USES= gmake lua:module + +USE_GITHUB= yes +GH_ACCOUNT= adam-stanek +GH_PROJECT= lua_icu_utils +GH_TAGNAME= df830c0 + +CFLAGS+= -fPIC -I${LOCALBASE}/include +MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="-shared -L${LOCALBASE}/lib" LUA_INCDIR="${LUA_INCDIR}" + +PLIST_FILES= ${LUA_MODLIBDIR}/icu_utils.so +PORTDOCS= README.md + +DOCSDIR= ${PREFIX}/share/doc/lua${LUA_VER_STR}/${PORTNAME} + +OPTIONS_DEFINE= DOCS + +do-install: + ${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR} + ${INSTALL_LIB} ${WRKSRC}/icu_utils.so ${STAGEDIR}${LUA_MODLIBDIR} + +do-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.mk> diff --git a/textproc/lua-icu-utils/distinfo b/textproc/lua-icu-utils/distinfo new file mode 100644 index 000000000000..6a75857d3ea8 --- /dev/null +++ b/textproc/lua-icu-utils/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1645023714 +SHA256 (adam-stanek-lua_icu_utils-0.0-20160816-df830c0_GH0.tar.gz) = 52f964db41cbdad5baac755805a9310b27d8d0dc7a7f429cddd81dea948f4348 +SIZE (adam-stanek-lua_icu_utils-0.0-20160816-df830c0_GH0.tar.gz) = 5799 diff --git a/textproc/lua-icu-utils/files/patch-src_convert__case.c b/textproc/lua-icu-utils/files/patch-src_convert__case.c new file mode 100644 index 000000000000..eba62824f6fe --- /dev/null +++ b/textproc/lua-icu-utils/files/patch-src_convert__case.c @@ -0,0 +1,29 @@ +--- src/convert_case.c.orig 2022-02-16 14:49:42 UTC ++++ src/convert_case.c +@@ -45,7 +45,7 @@ int strtolower(lua_State *l) { + int32_t out_len = u_strToLower(dest, str_len, str, str_len, "", &status); + if(U_FAILURE(status)) { + // Allocate more memory if necessary +- if(status = U_BUFFER_OVERFLOW_ERROR) { ++ if(status == U_BUFFER_OVERFLOW_ERROR) { + free(dest); + dest = malloc(sizeof(UChar) * (out_len + 1)); + if(!dest) { +@@ -109,7 +109,7 @@ int strtoupper(lua_State *l) { + int32_t out_len = u_strToUpper(dest, str_len, str, str_len, "", &status); + if(U_FAILURE(status)) { + // Allocate more memory if necessary +- if(status = U_BUFFER_OVERFLOW_ERROR) { ++ if(status == U_BUFFER_OVERFLOW_ERROR) { + free(dest); + dest = malloc(sizeof(UChar) * (out_len + 1)); + if(!dest) { +@@ -173,7 +173,7 @@ int strtotitle(lua_State *l) { + int32_t out_len = u_strToTitle(dest, str_len, str, str_len, NULL, "", &status); + if(U_FAILURE(status)) { + // Allocate more memory if necessary +- if(status = U_BUFFER_OVERFLOW_ERROR) { ++ if(status == U_BUFFER_OVERFLOW_ERROR) { + free(dest); + dest = malloc(sizeof(UChar) * (out_len + 1)); + if(!dest) { diff --git a/textproc/lua-icu-utils/pkg-descr b/textproc/lua-icu-utils/pkg-descr new file mode 100644 index 000000000000..bd0094f0105a --- /dev/null +++ b/textproc/lua-icu-utils/pkg-descr @@ -0,0 +1,3 @@ +Lua interface to selected utilities from the ICU project + +WWW: https://github.com/adam-stanek/lua_icu_utils |