From nobody Wed Feb 16 15:20:46 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F1C5319CA399; Wed, 16 Feb 2022 15:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JzM9B6VJHz3q8R; Wed, 16 Feb 2022 15:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645024846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nsnw9qMHbqMP5pHC1CaYaQkaF5tTaSQqZPU/0hQOXng=; b=HGOP2gIRYV648vn8htMbD4fvqVFJCX0jHFayvjqMko9ezsHb0A/n6gOab2vR7laL625KGR Ukw9yrUULlvQK37z4srLdl9xdZcUmaSnyNGDElGoE4tcFUmZe2kHPSNMiQKxRcJXYUIGzO 7n8ibevku9RruwPeUWuhi+80thnXUrjm5bcIwsCltTMCkLOegPNGPtEI3oiiSWFLEilOve PjqQ/gjUI1thWSfTDylL7F9sNy1LYOyu1gwlPXg8hjV/enCDBEUtBs7NVFdy9HAa3v42PD 9CP9psysqYWfFxVpFU3CjSPF7MLvUdWFqmr+zy5LjMbzZQ9bVh50EQPilXXLyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF44E184EF; Wed, 16 Feb 2022 15:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21GFKkdV043486; Wed, 16 Feb 2022 15:20:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21GFKkgW043485; Wed, 16 Feb 2022 15:20:46 GMT (envelope-from git) Date: Wed, 16 Feb 2022 15:20:46 GMT Message-Id: <202202161520.21GFKkgW043485@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Martin Matuska Subject: git: 654cb5b91266 - main - textproc/lua-icu-utils: New port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 654cb5b91266e40ffe32db8234508b515422dbb4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645024846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nsnw9qMHbqMP5pHC1CaYaQkaF5tTaSQqZPU/0hQOXng=; b=HhyQ35H+MJBrUijPVZs7c4yTKx60RrE6f/Ih0vbtGJPlvfWxEkvcLbkR6wanhYt3xjYkeE WysL+2ysmx6qxk0l9tSXRWMBcp214GXV1cxZGxLXBCy1rUMBJ8Gys2CwL7z7/qKgwOef9W 6Y8lpoBtOqyYSIyXpUb+7hCqRZUF0WwupycMkdUfjRZxt2Ezhp8lZfh27To7fd4IJbChXy /EXQXqoMpWNq2x2alNPCWV6tD9LT3wavyQ2FtJY4VbuUXqoeyvaTjEEAEIC/QNwke+AaFA JOAximVuEvDCwTmUYs0YHI3BDwZ+Kje1SjKhUn2OY2a8QYPxyIcoJx/Oh/tnpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645024846; a=rsa-sha256; cv=none; b=dYzglfAH+xLP1lMgJkZDSV3vQGXeuGS3SwO/DsNOWyr0MWim8Y4Bl/EU8OnlGIcZ7gjWLh 1vWTwaNIYgQglzB+6NwYYJrsFgi4ZTvI6pzlW7y/zfY9rFll25D/9MWkvG9/eE+6bYRtWT 7vV5XUJUbl4Aq4tc5ZLNGglt3a02S1iHI8j6Q34v3PRavYRxAKttzs0eqaX1POJrKNdton X3ZR9oNYGaCCjY4ZZN5sr7TYbI00zm3COTpa9N4lRyzco9k1CGk9LANNdOAklI+e1yD556 k6Ll9xoMrxRfnQyhHi79+L3rGnBVeTfR72FiB2Qz2sbETVpqFOZVBKuCmXc4xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/ports/commit/?id=654cb5b91266e40ffe32db8234508b515422dbb4 commit 654cb5b91266e40ffe32db8234508b515422dbb4 Author: Martin Matuska AuthorDate: 2022-02-16 15:19:10 +0000 Commit: Martin Matuska CommitDate: 2022-02-16 15:19:50 +0000 textproc/lua-icu-utils: New port Lua interface to selected utilities from the ICU project WWW: https://github.com/adam-stanek/lua_icu_utils --- textproc/Makefile | 1 + textproc/lua-icu-utils/Makefile | 40 ++++++++++++++++++++++ textproc/lua-icu-utils/distinfo | 3 ++ .../lua-icu-utils/files/patch-src_convert__case.c | 29 ++++++++++++++++ textproc/lua-icu-utils/pkg-descr | 3 ++ 5 files changed, 76 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index a1986b1ab2f6..ae2c01c9bfbd 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -429,6 +429,7 @@ SUBDIR += lt-hyphen SUBDIR += lttoolbox SUBDIR += ltxml + SUBDIR += lua-icu-utils SUBDIR += lua-lyaml SUBDIR += luaexpat SUBDIR += lucene 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 + +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 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