public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/jsonnet/
Date: Wed, 19 Apr 2023 00:14:00 +0000 (UTC)	[thread overview]
Message-ID: <1681863236.e57a59052869d81ef6a169dbca07c9519a28f28b.chutzpah@gentoo> (raw)

commit:     e57a59052869d81ef6a169dbca07c9519a28f28b
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 19 00:13:34 2023 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Apr 19 00:13:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e57a5905

dev-lang/jsonnet: add 0.20.0

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-lang/jsonnet/Manifest              |   1 +
 dev-lang/jsonnet/jsonnet-0.20.0.ebuild | 107 +++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)

diff --git a/dev-lang/jsonnet/Manifest b/dev-lang/jsonnet/Manifest
index 75e5c69186cb..afb7dfa85f82 100644
--- a/dev-lang/jsonnet/Manifest
+++ b/dev-lang/jsonnet/Manifest
@@ -1,2 +1,3 @@
 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/jsonnet-0.20.0.ebuild b/dev-lang/jsonnet/jsonnet-0.20.0.ebuild
new file mode 100644
index 000000000000..8e5c294e6207
--- /dev/null
+++ b/dev-lang/jsonnet/jsonnet-0.20.0.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
+}


             reply	other threads:[~2023-04-19  0:14 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19  0:14 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-28 12:29 [gentoo-commits] repo/gentoo:master commit in: dev-lang/jsonnet/ Michał Górny
2024-04-23 22:44 Patrick McLean
2024-04-23 22:43 Patrick McLean
2023-02-21  6:07 Ionen Wolkens
2022-10-28 16:31 Patrick McLean
2022-10-27 17:32 Patrick McLean
2022-10-27 16:01 Patrick McLean
2022-10-27 16:01 Patrick McLean
2022-10-27 16:01 Patrick McLean
2022-06-07  8:26 Jakov Smolić
2022-06-07  8:26 Jakov Smolić
2022-06-07  8:24 Jakov Smolić
2022-06-07  8:24 Jakov Smolić
2022-01-06 21:23 Georgy Yakovlev
2022-01-06 20:59 Georgy Yakovlev
2022-01-06 20:02 Patrick McLean
2021-02-21 21:30 Conrad Kostecki
2020-11-28 21:43 Patrick McLean
2020-11-25  5:58 Patrick McLean
2020-11-03  7:34 Sam James
2020-10-26 23:49 Sergei Trofimovich
2020-10-25 23:10 Sam James
2020-10-25  0:14 Georgy Yakovlev
2020-10-25  0:14 Georgy Yakovlev
2020-10-25  0:14 Georgy Yakovlev
2020-06-29 23:11 Patrick McLean
2020-05-28 17:31 Patrick McLean
2020-02-10 19:34 Patrick McLean
2020-02-10 19:34 Patrick McLean
2019-12-03  2:29 Patrick McLean
2019-12-03  2:29 Patrick McLean
2019-06-03 18:57 Patrick McLean
2019-05-29  4:14 Aaron Bauman
2019-05-03 17:25 Patrick McLean
2019-05-03 17:05 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1681863236.e57a59052869d81ef6a169dbca07c9519a28f28b.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox