summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-02-23 20:49:13 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2024-02-23 20:49:25 +0200
commitec23b7da4445658c602805790ce96a7ded17168d (patch)
tree5035c94672223c4d87cea185b806f7a70b7e0a4d
parentdev-libs/log4cpp: add 1.1.4 (diff)
downloadgentoo-ec23b7da4445658c602805790ce96a7ded17168d.tar.gz
gentoo-ec23b7da4445658c602805790ce96a7ded17168d.tar.bz2
gentoo-ec23b7da4445658c602805790ce96a7ded17168d.zip
dev-libs/libucl: add 0.9.0
- Add subslot, since it does have ABI breakage. - Add patch to fix compilation with USE="lua" - Bump EAPI=8 - fix lua pkg_setup Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--dev-libs/libucl/Manifest1
-rw-r--r--dev-libs/libucl/files/libucl-0.9.0-gchar-compile.patch36
-rw-r--r--dev-libs/libucl/libucl-0.9.0.ebuild74
3 files changed, 111 insertions, 0 deletions
diff --git a/dev-libs/libucl/Manifest b/dev-libs/libucl/Manifest
index a4cbed7b873c..e934da0c046a 100644
--- a/dev-libs/libucl/Manifest
+++ b/dev-libs/libucl/Manifest
@@ -1 +1,2 @@
DIST libucl-0.8.1.tar.gz 2028394 BLAKE2B 18fda317b4b4aed3d6b72c599d191f141bf4722d1c08244deda9c5e77300e2bef7de029889a05d9b4573472928d9d49a797123ac392a4cdd3b690ac277ad673d SHA512 36a059561eadb2dd7253ca22ff56f6a0c6cdd28580e28451c0cf47e1aec321a2e1589fc83ccb2033346f2dbca31a7e6afa9666ea544a0c190b7f80ed0e9f45af
+DIST libucl-0.9.0.tar.gz 2043656 BLAKE2B eb2aeb1a818caffbadee9e351d144cc58d149b88e171750e1edfb679c9a42d1c0e8ef2a2dac763445e215370a359791f65364658d3d138e2262a46eba341c0f1 SHA512 a7bcb03dc3b5e3b8e5c141fb3edee0c749e20d63ad69fba4d3c6ca56ef56b1130287b0f497de37bf9789c2263a46121c662fedc7a870354c2849d2e14d90cab5
diff --git a/dev-libs/libucl/files/libucl-0.9.0-gchar-compile.patch b/dev-libs/libucl/files/libucl-0.9.0-gchar-compile.patch
new file mode 100644
index 000000000000..9ec9105276c1
--- /dev/null
+++ b/dev-libs/libucl/files/libucl-0.9.0-gchar-compile.patch
@@ -0,0 +1,36 @@
+Merged as: https://github.com/vstakhov/libucl/commit/708f5e21e3d85f56cdcbcbc418d8725f53bf390b
+From: Vsevolod Stakhov <vsevolod@rspamd.com>
+Date: Tue, 6 Feb 2024 15:59:48 +0000
+Subject: [PATCH] Fix lua compile issues
+
+Issue: #282
+--- a/lua/lua_ucl.c
++++ b/lua/lua_ucl.c
+@@ -406,7 +406,6 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags)
+
+ /* Table iterate */
+ if (is_array) {
+- int i;
+
+ if (!is_implicit) {
+ top = ucl_object_typed_new (UCL_ARRAY);
+@@ -416,7 +415,7 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags)
+ top = NULL;
+ }
+
+- for (i = 1; i <= max; i ++) {
++ for (size_t i = 1; i <= max; i ++) {
+ lua_pushinteger (L, i);
+ lua_gettable (L, idx);
+
+@@ -886,8 +885,8 @@ lua_ucl_parser_parse_text (lua_State *L)
+ t = lua_touserdata (L, 2);
+ }
+ else if (lua_type (L, 2) == LUA_TSTRING) {
+- const gchar *s;
+- gsize len;
++ const char *s;
++ size_t len;
+ static struct _rspamd_lua_text st_t;
+
+ s = lua_tolstring (L, 2, &len);
diff --git a/dev-libs/libucl/libucl-0.9.0.ebuild b/dev-libs/libucl/libucl-0.9.0.ebuild
new file mode 100644
index 000000000000..86d714ebb85a
--- /dev/null
+++ b/dev-libs/libucl/libucl-0.9.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..3} )
+inherit lua-single autotools
+
+DESCRIPTION="Universal configuration library parser"
+HOMEPAGE="https://github.com/vstakhov/libucl"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/vstakhov/libucl.git"
+else
+ SRC_URI="https://github.com/vstakhov/libucl/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="BSD-2"
+SLOT="0/9"
+IUSE="lua +regex sign urls +utils static-libs test"
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+DEPEND="!!dev-libs/ucl
+ lua? ( ${LUA_DEPS} )
+ urls? ( net-misc/curl )
+ sign? ( dev-libs/openssl:0= )
+"
+BDEPEND="${DEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( README.md doc/api.md )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gchar-compile.patch
+)
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ "$(use_enable lua)"
+ "$(use_enable regex)"
+ "$(use_enable sign signatures)"
+ "$(use_enable urls)"
+ "$(use_enable utils)"
+ )
+ use lua && myeconfargs+=(
+ LUA_INCLUDE="$(lua_get_CFLAGS)"
+ LIB_LIBS="$(lua_get_LIBS)"
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ use lua && DOCS+=( "doc/lua_api.md" )
+ einstalldocs
+ if ! use static-libs; then
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || \
+ die "error while deleting static library"
+ fi
+}