summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2022-10-27 08:57:35 -0700
committerPatrick McLean <chutzpah@gentoo.org>2022-10-27 09:01:01 -0700
commitf7a016e577e9a3a17a0d0c76cc54d636b83bedea (patch)
tree34f4a299add9760c3a7d9701d9296db76e7c7ad8 /dev-lang/jsonnet
parentsci-libs/scikit-image: enable py3.11 (diff)
downloadgentoo-f7a016e577e9a3a17a0d0c76cc54d636b83bedea.tar.gz
gentoo-f7a016e577e9a3a17a0d0c76cc54d636b83bedea.tar.bz2
gentoo-f7a016e577e9a3a17a0d0c76cc54d636b83bedea.zip
dev-lang/jsonnet: add 0.19.0
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-lang/jsonnet')
-rw-r--r--dev-lang/jsonnet/Manifest1
-rw-r--r--dev-lang/jsonnet/jsonnet-0.19.0.ebuild106
2 files changed, 107 insertions, 0 deletions
diff --git a/dev-lang/jsonnet/Manifest b/dev-lang/jsonnet/Manifest
index 1ebf61717120..efa0206c98ad 100644
--- a/dev-lang/jsonnet/Manifest
+++ b/dev-lang/jsonnet/Manifest
@@ -2,3 +2,4 @@ DIST jsonnet-0.15.0.tar.gz 21826038 BLAKE2B 722a844c00ec31b662d932a4481a71197ada
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.18.0.tar.gz 22472162 BLAKE2B 4f931a44b0cbeea0dc7705c28ca49817e2b3abe19ba4fdcd550d5df1ce9ad6b06b1b740a9306d36caa3970c88df9d31700373e4997dd52c6c2219cdd9bf125c1 SHA512 08a64a4b132df1519292378cef93deb3c60d21636b2a71bce6c13e29cfd93cab465cad77e11f000fb984c5c75a4ca1c92504654fd2e5201343df767ea0e610d1
+DIST jsonnet-0.19.0.tar.gz 22478380 BLAKE2B 0a1612ca0525342763099e70921181578fcf7ab25c2a3811ffede944953e4ce114f1949642038d6147c96d52193cf701473fab8581d50c3e74036139fbd5c19a SHA512 f4e30d977df7840a4f13c7ba75614badd964a5c4484fb264d7b05d6de04aa2a2d3c4c5161523d6fa6559460ea94b94562b07ea6590a34876545c529474c4b9fa
diff --git a/dev-lang/jsonnet/jsonnet-0.19.0.ebuild b/dev-lang/jsonnet/jsonnet-0.19.0.ebuild
new file mode 100644
index 000000000000..b03481b1e773
--- /dev/null
+++ b/dev-lang/jsonnet/jsonnet-0.19.0.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2022 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_{8..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 x86"
+RDEPEND="
+ dev-cpp/rapidyaml:=
+ dev-cpp/nlohmann_json:=
+ python? ( ${PYTHON_DEPS} )
+"
+
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+
+BDEPEND="
+ python? (
+ ${PYTHON_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
+}