diff options
Diffstat (limited to 'dev-libs/libucl/libucl-9999.ebuild')
-rw-r--r-- | dev-libs/libucl/libucl-9999.ebuild | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/dev-libs/libucl/libucl-9999.ebuild b/dev-libs/libucl/libucl-9999.ebuild index c4c4911fe043..3c35afc0af65 100644 --- a/dev-libs/libucl/libucl-9999.ebuild +++ b/dev-libs/libucl/libucl-9999.ebuild @@ -1,9 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit autotools +LUA_COMPAT=( lua5-{1..3} ) +inherit lua-single autotools DESCRIPTION="Universal configuration library parser" HOMEPAGE="https://github.com/vstakhov/libucl" @@ -17,14 +18,15 @@ else fi LICENSE="BSD-2" -SLOT="0" - -IUSE="lua +regex sign urls +utils static-libs" +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? ( >=dev-lang/lua-5.1:= ) + lua? ( ${LUA_DEPS} ) urls? ( net-misc/curl ) - sign? ( dev-libs/openssl:0 ) + sign? ( dev-libs/openssl:0= ) " BDEPEND="${DEPEND} virtual/pkgconfig @@ -33,10 +35,12 @@ RDEPEND="${DEPEND}" DOCS=( README.md doc/api.md ) +pkg_setup() { + use lua && lua-single_pkg_setup +} + src_prepare() { default - rm tests/schema/{definitions,ref{,Remote}}.json || die - eautoreconf } @@ -48,12 +52,16 @@ src_configure() { "$(use_enable urls)" "$(use_enable utils)" ) - econf "${myeconfargs}" + use lua && myeconfargs+=( + LUA_INCLUDE="$(lua_get_CFLAGS)" + LIB_LIBS="$(lua_get_LIBS)" + ) + econf "${myeconfargs[@]}" } src_install() { default - DOCS+=( $(usex lua "doc/lua_api.md" "") ) + use lua && DOCS+=( "doc/lua_api.md" ) einstalldocs if ! use static-libs; then find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || \ |