summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/jsonnet')
-rw-r--r--dev-lang/jsonnet/Manifest6
-rw-r--r--dev-lang/jsonnet/files/jsonnet-0.14.0-makefile.patch16
-rw-r--r--dev-lang/jsonnet/files/jsonnet-0.18.0-unbundle.patch75
-rw-r--r--dev-lang/jsonnet/jsonnet-0.15.0.ebuild63
-rw-r--r--dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild77
-rw-r--r--dev-lang/jsonnet/jsonnet-0.16.0.ebuild70
-rw-r--r--dev-lang/jsonnet/jsonnet-0.19.0-r1.ebuild (renamed from dev-lang/jsonnet/jsonnet-0.17.0-r1.ebuild)65
-rw-r--r--dev-lang/jsonnet/jsonnet-0.19.1.ebuild107
-rw-r--r--dev-lang/jsonnet/jsonnet-0.20.0-r1.ebuild109
-rw-r--r--dev-lang/jsonnet/metadata.xml4
10 files changed, 341 insertions, 251 deletions
diff --git a/dev-lang/jsonnet/Manifest b/dev-lang/jsonnet/Manifest
index 125cb3172b14..afb7dfa85f82 100644
--- a/dev-lang/jsonnet/Manifest
+++ b/dev-lang/jsonnet/Manifest
@@ -1,3 +1,3 @@
-DIST jsonnet-0.15.0.tar.gz 21826038 BLAKE2B 722a844c00ec31b662d932a4481a71197adad680181c6a56a49dfa3e9b63696d29320c5278024d44c0ab3d7d80569514792f815ac7fa3a3cc08c7756fb6f08ad SHA512 b63c1bf82e4fc9ba3f1009ed4e4ba1010e3e7f81bd816a234e48d35607eae3cba95cab57813d35daa9f024e316bae5256340a6f8d6d884f9136cdbf062a2b351
-DIST jsonnet-0.16.0.tar.gz 21828911 BLAKE2B d6e9648e259b94513507ba5a6e305f705541904d7755dc5521b7fc2940b761f413bfaba39521af54eb428337be2e75f07d12038edcf7e8a5ba95feccc8dd4a02 SHA512 80e0403ec8008cbacff8d9e8fe0e2b5d3bfa306d92c2c11d472e5721015ce4c11be745df10d25715f22f8d8594df69fabf2fe617bdded462ffc5b21f8923606f
-DIST jsonnet-0.17.0.tar.gz 21854054 BLAKE2B 91561f2cffb5c711d4ba58aceef90bbcd654997872936bcf475d397a7b831b833d349c828271e58795cca10c915ab4ec0a517dc0fc2f563673ba7a6e74cfea3f SHA512 d3ee6947163d8abced504ff37ecf365c0311164cbf243d4c635d34944f0831ca9fce2470acf00eb9a218f82a2e553b3f885db9bd21bb9dcefbd707fa0202925d
+DIST jsonnet-0.19.0.tar.gz 22478380 BLAKE2B 0a1612ca0525342763099e70921181578fcf7ab25c2a3811ffede944953e4ce114f1949642038d6147c96d52193cf701473fab8581d50c3e74036139fbd5c19a SHA512 f4e30d977df7840a4f13c7ba75614badd964a5c4484fb264d7b05d6de04aa2a2d3c4c5161523d6fa6559460ea94b94562b07ea6590a34876545c529474c4b9fa
+DIST jsonnet-0.19.1.tar.gz 22480685 BLAKE2B 7d86bc963f5ced622e91adf015c250b8cae2e817b6af5d60820d8731e04caecc1b2b8142d320414d253ef1fa3558d61aeb1b59480eab0823915d2b15c5d87aab SHA512 21312de71f63f4a74005f563290d67fcc2d220f043291a123af2fc834f4118f8bbc311ea8acc5dd52b13eff8c32f026a5ce6bfe3d88b4c6c770e585dd1f0b688
+DIST jsonnet-0.20.0.tar.gz 22481277 BLAKE2B 65d6a45a903d6f494bbb79fb92c484b2a5167fc5fc379f4acb131778e1779aa580fd249baf3309fd00fa9b2a3b129360bf9d2cb0a3a738bd03c5fcec7dc6bd32 SHA512 d46d2521d4389d05f91a16ecd9f181be1853f674a9264e9fac23e413f1084dee947e80682af59603e15e443061a0beb50a30c14c858853e10ed1ae7187d09730
diff --git a/dev-lang/jsonnet/files/jsonnet-0.14.0-makefile.patch b/dev-lang/jsonnet/files/jsonnet-0.14.0-makefile.patch
deleted file mode 100644
index a6107a4e10cd..000000000000
--- a/dev-lang/jsonnet/files/jsonnet-0.14.0-makefile.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 474655c..89c396c 100644
---- a/Makefile
-+++ b/Makefile
-@@ -31,9 +31,9 @@ OPT ?= -O3
-
- PREFIX ?= /usr/local
-
--CXXFLAGS ?= -g $(OPT) -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC
-+CXXFLAGS += -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC
- CXXFLAGS += -Iinclude -Ithird_party/md5 -Ithird_party/json
--CFLAGS ?= -g $(OPT) -Wall -Wextra -pedantic -std=c99 -fPIC
-+CFLAGS += -Wall -Wextra -pedantic -std=c99 -fPIC
- CFLAGS += -Iinclude
- MAKEDEPENDFLAGS += -Iinclude -Ithird_party/md5 -Ithird_party/json
- EMCXXFLAGS = $(CXXFLAGS) -g0 -Os --memory-init-file 0 -s DISABLE_EXCEPTION_CATCHING=0 -s OUTLINING_LIMIT=10000 -s RESERVED_FUNCTION_POINTERS=20 -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1
diff --git a/dev-lang/jsonnet/files/jsonnet-0.18.0-unbundle.patch b/dev-lang/jsonnet/files/jsonnet-0.18.0-unbundle.patch
new file mode 100644
index 000000000000..7c19e8893f12
--- /dev/null
+++ b/dev-lang/jsonnet/files/jsonnet-0.18.0-unbundle.patch
@@ -0,0 +1,75 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5df20ca..9e60fae 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -121,7 +121,6 @@ endif()
+ add_subdirectory(include)
+ add_subdirectory(stdlib)
+ add_subdirectory(third_party/md5)
+-add_subdirectory(third_party/rapidyaml/rapidyaml ryml)
+ add_subdirectory(core)
+ add_subdirectory(cpp)
+ add_subdirectory(cmd)
+diff --git a/core/vm.cpp b/core/vm.cpp
+index 4617363..e328df5 100644
+--- a/core/vm.cpp
++++ b/core/vm.cpp
+@@ -23,7 +23,7 @@ limitations under the License.
+
+ #include "desugarer.h"
+ #include "json.h"
+-#include "json.hpp"
++#include "nlohmann/json.hpp"
+ #include "md5.h"
+ #include "parser.h"
+ #include "ryml_std.hpp" // include this before any other ryml header
+diff --git a/setup.py b/setup.py
+index 0a2748a..356915d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -13,6 +13,7 @@
+ # limitations under the License.
+
+ import os
++import sys
+ from setuptools import setup
+ from setuptools import Extension
+ from setuptools.command.build_ext import build_ext as BuildExt
+@@ -22,28 +23,6 @@ DIR = os.path.abspath(os.path.dirname(__file__))
+ # NOTE: If you are editing the array below then you probably also need
+ # to change MANIFEST.in.
+ LIB_OBJECTS = [
+- 'core/desugarer.o',
+- 'core/formatter.o',
+- 'core/libjsonnet.o',
+- 'core/lexer.o',
+- 'core/parser.o',
+- 'core/pass.o',
+- 'core/static_analysis.o',
+- 'core/string_utils.o',
+- 'core/vm.o',
+- 'third_party/md5/md5.o',
+- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/char_traits.o',
+- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/base64.o',
+- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/language.o',
+- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/memory_util.o',
+- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/format.o',
+- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/time.o',
+- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/memory_resource.o',
+- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/error.o',
+- 'third_party/rapidyaml/rapidyaml/src/c4/yml/parse.o',
+- 'third_party/rapidyaml/rapidyaml/src/c4/yml/preprocess.o',
+- 'third_party/rapidyaml/rapidyaml/src/c4/yml/common.o',
+- 'third_party/rapidyaml/rapidyaml/src/c4/yml/tree.o',
+ ]
+
+ MODULE_SOURCES = ['python/_jsonnet.c']
+@@ -72,6 +51,8 @@ jsonnet_ext = Extension(
+ '_jsonnet',
+ sources=MODULE_SOURCES,
+ extra_objects=LIB_OBJECTS,
++ libraries = ['md5', 'jsonnet', 'ryml'],
++ library_dirs = [os.environ.get('CMAKE_BUILD_DIR')],
+ include_dirs = ['include'],
+ language='c++'
+ )
diff --git a/dev-lang/jsonnet/jsonnet-0.15.0.ebuild b/dev-lang/jsonnet/jsonnet-0.15.0.ebuild
deleted file mode 100644
index 376e4e886d5c..000000000000
--- a/dev-lang/jsonnet/jsonnet-0.15.0.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_6 python3_{7,8} )
-
-inherit toolchain-funcs flag-o-matic distutils-r1
-
-DESCRIPTION="A data templating language for app and tool developers "
-HOMEPAGE="https://jsonnet.org/"
-SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-IUSE="custom-optimization python"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-DEPEND="python? ( ${PYTHON_DEPS} )"
-RDEPEND="python? ( ${PYTHON_DEPS} )"
-BDEPEND="python? ( ${PYTHON_DEPS}
- dev-python/setuptools[${PYTHON_USEDEP}]
- )"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
- "${FILESDIR}/jsonnet-0.14.0-makefile.patch"
- "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch"
-)
-
-distutils_enable_tests setup.py
-
-src_prepare() {
- default
- use python && distutils-r1_src_prepare
-}
-
-src_configure() {
- use custom-optimization || replace-flags '-O*' -O3
- default
-}
-
-src_compile() {
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
- jsonnet \
- libjsonnet.so \
- libjsonnet++.so
-
- use python && distutils-r1_src_compile
-}
-
-src_test() {
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" test
- use python && distutils-r1_src_test
-}
-
-src_install() {
- dolib.so libjsonnet*.so
- dobin jsonnet
-
- use python && distutils-r1_src_install
-}
diff --git a/dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild b/dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild
deleted file mode 100644
index d4d1373fa872..000000000000
--- a/dev-lang/jsonnet/jsonnet-0.16.0-r2.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( pypy3 python3_{6..9} )
-
-inherit toolchain-funcs flag-o-matic distutils-r1
-
-DESCRIPTION="A data templating language for app and tool developers "
-HOMEPAGE="https://jsonnet.org/"
-SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-IUSE="custom-optimization doc examples python"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 arm64 ppc64 x86"
-DEPEND="
- python? ( ${PYTHON_DEPS} )
-"
-RDEPEND="
- python? ( ${PYTHON_DEPS} )
-"
-BDEPEND="
- python? (
- ${PYTHON_DEPS}
- dev-python/setuptools[${PYTHON_USEDEP}]
- )
-"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
- "${FILESDIR}/jsonnet-0.14.0-makefile.patch"
- "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch"
- "${FILESDIR}/jsonnet-0.16.0-libdir.patch"
- "${FILESDIR}/jsonnet-0.16.0-cp-var.patch"
-)
-
-distutils_enable_tests setup.py
-
-src_prepare() {
- default
- use python && distutils-r1_src_prepare
-}
-
-src_configure() {
- use custom-optimization || replace-flags '-O*' -O3
- tc-export CC CXX
- default
-}
-
-src_compile() {
- emake bins libs
- use python && distutils-r1_src_compile
-}
-
-src_test() {
- emake test
- use python && distutils-r1_src_test
-}
-
-src_install() {
- emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" \
- CP="cp -d" LIBDIR="$(get_libdir)" install
- use python && distutils-r1_src_install
- if use doc; then
- find doc -name '.gitignore' -delete || die
- docinto html
- dodoc -r doc/.
- fi
- if use examples; then
- docinto examples
- dodoc -r examples/.
- fi
-}
diff --git a/dev-lang/jsonnet/jsonnet-0.16.0.ebuild b/dev-lang/jsonnet/jsonnet-0.16.0.ebuild
deleted file mode 100644
index 54be993393d9..000000000000
--- a/dev-lang/jsonnet/jsonnet-0.16.0.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit toolchain-funcs flag-o-matic distutils-r1
-
-DESCRIPTION="A data templating language for app and tool developers "
-HOMEPAGE="https://jsonnet.org/"
-SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-IUSE="custom-optimization python"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
-DEPEND="
- python? ( ${PYTHON_DEPS} )
-"
-RDEPEND="
- python? ( ${PYTHON_DEPS} )
-"
-BDEPEND="
- python? (
- ${PYTHON_DEPS}
- dev-python/setuptools[${PYTHON_USEDEP}]
- )
-"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
- "${FILESDIR}/jsonnet-0.14.0-makefile.patch"
- "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch"
-)
-
-distutils_enable_tests setup.py
-
-src_prepare() {
- default
- use python && distutils-r1_src_prepare
-}
-
-src_configure() {
- use custom-optimization || replace-flags '-O*' -O3
- default
-}
-
-src_compile() {
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
- jsonnet \
- libjsonnet.so \
- libjsonnet++.so
-
- use python && distutils-r1_src_compile
-}
-
-src_test() {
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" test
- use python && distutils-r1_src_test
-}
-
-src_install() {
- dolib.so libjsonnet*.so
- dobin jsonnet
-
- use python && distutils-r1_src_install
-}
diff --git a/dev-lang/jsonnet/jsonnet-0.17.0-r1.ebuild b/dev-lang/jsonnet/jsonnet-0.19.0-r1.ebuild
index 3faabad2b33b..71ae56d81023 100644
--- a/dev-lang/jsonnet/jsonnet-0.17.0-r1.ebuild
+++ b/dev-lang/jsonnet/jsonnet-0.19.0-r1.ebuild
@@ -1,75 +1,100 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( pypy3 python3_{6..9} )
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{9..11} )
-inherit toolchain-funcs flag-o-matic distutils-r1
+inherit cmake toolchain-funcs flag-o-matic distutils-r1
-DESCRIPTION="A data templating language for app and tool developers "
+DESCRIPTION="A data templating language for app and tool developers"
HOMEPAGE="https://jsonnet.org/"
SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-IUSE="custom-optimization doc examples python"
+IUSE="custom-optimization doc examples python test"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
-DEPEND="
- python? ( ${PYTHON_DEPS} )
-"
+KEYWORDS="amd64 arm64 ppc64 x86"
RDEPEND="
+ dev-cpp/rapidyaml:=
+ dev-cpp/nlohmann_json:=
python? ( ${PYTHON_DEPS} )
"
+
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+
BDEPEND="
python? (
${PYTHON_DEPS}
+ ${DISTUTILS_DEPS}
dev-python/setuptools[${PYTHON_USEDEP}]
)
"
+RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
PATCHES=(
- "${FILESDIR}/jsonnet-0.14.0-makefile.patch"
"${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch"
"${FILESDIR}/jsonnet-0.16.0-libdir.patch"
"${FILESDIR}/jsonnet-0.16.0-cp-var.patch"
+ "${FILESDIR}/jsonnet-0.18.0-unbundle.patch"
)
distutils_enable_tests unittest
src_prepare() {
- default
+ cmake_src_prepare
use python && distutils-r1_src_prepare
}
src_configure() {
use custom-optimization || replace-flags '-O*' -O3
tc-export CC CXX
- default
+
+ local mycmakeargs=(
+ -DUSE_SYSTEM_JSON=ON
+ -DBUILD_STATIC_LIBS=OFF
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DBUILD_TESTS=ON
+ -DUSE_SYSTEM_GTEST=ON
+ )
+ else
+ mycmakeargs+=(
+ -DBUILD_TESTS=OFF
+ )
+ fi
+
+ cmake_src_configure
}
src_compile() {
- emake bins libs
- use python && distutils-r1_src_compile
+ cmake_src_compile
+ use python && CMAKE_BUILD_DIR="${BUILD_DIR}" distutils-r1_src_compile
}
src_test() {
- emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" test
- use python && distutils-r1_src_test
+ cmake_src_test
+ use python && CMAKE_BUILD_DIR="${BUILD_DIR}" distutils-r1_src_test
}
python_test() {
- "${EPYTHON}" -m unittest python._jsonnet_test -v \
+ LD_LIBRARY_PATH="${CMAKE_BUILD_DIR}" "${EPYTHON}" -m unittest python._jsonnet_test -v \
|| die "Tests failed with ${EPYTHON}"
}
src_install() {
- emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" \
- CP="cp -d" LIBDIR="$(get_libdir)" install
+ cmake_src_install
use python && distutils-r1_src_install
+
if use doc; then
find doc -name '.gitignore' -delete || die
docinto html
diff --git a/dev-lang/jsonnet/jsonnet-0.19.1.ebuild b/dev-lang/jsonnet/jsonnet-0.19.1.ebuild
new file mode 100644
index 000000000000..8e5c294e6207
--- /dev/null
+++ b/dev-lang/jsonnet/jsonnet-0.19.1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{9..11} )
+
+inherit cmake toolchain-funcs flag-o-matic distutils-r1
+
+DESCRIPTION="A data templating language for app and tool developers"
+HOMEPAGE="https://jsonnet.org/"
+SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+IUSE="custom-optimization doc examples python test"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+RDEPEND="
+ dev-cpp/rapidyaml:=
+ dev-cpp/nlohmann_json:=
+ python? ( ${PYTHON_DEPS} )
+"
+
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+
+BDEPEND="
+ python? (
+ ${PYTHON_DEPS}
+ ${DISTUTILS_DEPS}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch"
+ "${FILESDIR}/jsonnet-0.16.0-libdir.patch"
+ "${FILESDIR}/jsonnet-0.16.0-cp-var.patch"
+ "${FILESDIR}/jsonnet-0.18.0-unbundle.patch"
+)
+
+distutils_enable_tests unittest
+
+src_prepare() {
+ cmake_src_prepare
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ use custom-optimization || replace-flags '-O*' -O3
+ tc-export CC CXX
+
+ local mycmakeargs=(
+ -DUSE_SYSTEM_JSON=ON
+ -DBUILD_STATIC_LIBS=OFF
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DBUILD_TESTS=ON
+ -DUSE_SYSTEM_GTEST=ON
+ )
+ else
+ mycmakeargs+=(
+ -DBUILD_TESTS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ use python && CMAKE_BUILD_DIR="${BUILD_DIR}" distutils-r1_src_compile
+}
+
+src_test() {
+ cmake_src_test
+ use python && CMAKE_BUILD_DIR="${BUILD_DIR}" distutils-r1_src_test
+}
+
+python_test() {
+ LD_LIBRARY_PATH="${CMAKE_BUILD_DIR}" "${EPYTHON}" -m unittest python._jsonnet_test -v \
+ || die "Tests failed with ${EPYTHON}"
+}
+
+src_install() {
+ cmake_src_install
+ use python && distutils-r1_src_install
+
+ if use doc; then
+ find doc -name '.gitignore' -delete || die
+ docinto html
+ dodoc -r doc/.
+ fi
+ if use examples; then
+ docinto examples
+ dodoc -r examples/.
+ fi
+}
diff --git a/dev-lang/jsonnet/jsonnet-0.20.0-r1.ebuild b/dev-lang/jsonnet/jsonnet-0.20.0-r1.ebuild
new file mode 100644
index 000000000000..d3e555a11be7
--- /dev/null
+++ b/dev-lang/jsonnet/jsonnet-0.20.0-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_EXT=1
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+
+inherit cmake toolchain-funcs flag-o-matic distutils-r1
+
+DESCRIPTION="A data templating language for app and tool developers"
+HOMEPAGE="https://jsonnet.org/"
+SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 arm64 ppc64 ~riscv x86"
+IUSE="custom-optimization doc examples python test"
+
+RDEPEND="
+ dev-cpp/rapidyaml:=
+ dev-cpp/nlohmann_json:=
+ python? ( ${PYTHON_DEPS} )
+"
+
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+
+BDEPEND="
+ python? (
+ ${PYTHON_DEPS}
+ ${DISTUTILS_DEPS}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch"
+ "${FILESDIR}/jsonnet-0.16.0-libdir.patch"
+ "${FILESDIR}/jsonnet-0.16.0-cp-var.patch"
+ "${FILESDIR}/jsonnet-0.18.0-unbundle.patch"
+)
+
+distutils_enable_tests unittest
+
+src_prepare() {
+ cmake_src_prepare
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ use custom-optimization || replace-flags '-O*' -O3
+ tc-export CC CXX
+
+ local mycmakeargs=(
+ -DUSE_SYSTEM_JSON=ON
+ -DBUILD_STATIC_LIBS=OFF
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ -DBUILD_TESTS=ON
+ -DUSE_SYSTEM_GTEST=ON
+ )
+ else
+ mycmakeargs+=(
+ -DBUILD_TESTS=OFF
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ use python && CMAKE_BUILD_DIR="${BUILD_DIR}" distutils-r1_src_compile
+}
+
+src_test() {
+ cmake_src_test
+ use python && CMAKE_BUILD_DIR="${BUILD_DIR}" distutils-r1_src_test
+}
+
+python_test() {
+ LD_LIBRARY_PATH="${CMAKE_BUILD_DIR}" "${EPYTHON}" -m unittest python._jsonnet_test -v \
+ || die "Tests failed with ${EPYTHON}"
+}
+
+src_install() {
+ cmake_src_install
+ use python && distutils-r1_src_install
+
+ if use doc; then
+ find doc -name '.gitignore' -delete || die
+ docinto html
+ dodoc -r doc/.
+ fi
+ if use examples; then
+ docinto examples
+ dodoc -r examples/.
+ fi
+}
diff --git a/dev-lang/jsonnet/metadata.xml b/dev-lang/jsonnet/metadata.xml
index 6a3ebc349696..b5ee83413972 100644
--- a/dev-lang/jsonnet/metadata.xml
+++ b/dev-lang/jsonnet/metadata.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
+ <maintainer type="person" proxied="yes">
<email>coles.david@gmail.com</email>
<name>David Coles</name>
</maintainer>