Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/jsonnet/
Date: Sun, 25 Oct 2020 00:14:21
Message-Id: 1603584803.4ad0a3b530fd0f9a4df1dcadf747f8db8f09f6a0.gyakovlev@gentoo
1 commit: 4ad0a3b530fd0f9a4df1dcadf747f8db8f09f6a0
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 25 00:01:28 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 25 00:13:23 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ad0a3b5
7
8 dev-lang/jsonnet: revbump, fix many issues
9
10 It was installing broken soname symlinks and no libs at all.
11 Now we install both c and c++ libs
12 Also install jsonnetfmt and public headers.
13
14 Add doc and examples useflag, all files are pre-rendered.
15 Declare python3_9 and pypy3 support.
16
17 Closes: https://bugs.gentoo.org/723058
18 Package-Manager: Portage-3.0.8, Repoman-3.0.2
19 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
20
21 dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild | 75 +++++++++++++++++++++++++++++++
22 1 file changed, 75 insertions(+)
23
24 diff --git a/dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild b/dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild
25 new file mode 100644
26 index 00000000000..7987e965555
27 --- /dev/null
28 +++ b/dev-lang/jsonnet/jsonnet-0.16.0-r1.ebuild
29 @@ -0,0 +1,75 @@
30 +# Copyright 1999-2020 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +DISTUTILS_OPTIONAL=1
36 +PYTHON_COMPAT=( pypy3 python3_{6..9} )
37 +
38 +inherit toolchain-funcs flag-o-matic distutils-r1
39 +
40 +DESCRIPTION="A data templating language for app and tool developers "
41 +HOMEPAGE="https://jsonnet.org/"
42 +SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
43 +IUSE="custom-optimization doc examples python"
44 +
45 +LICENSE="Apache-2.0"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
48 +DEPEND="
49 + python? ( ${PYTHON_DEPS} )
50 +"
51 +RDEPEND="
52 + python? ( ${PYTHON_DEPS} )
53 +"
54 +BDEPEND="
55 + python? (
56 + ${PYTHON_DEPS}
57 + dev-python/setuptools[${PYTHON_USEDEP}]
58 + )
59 +"
60 +
61 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
62 +
63 +PATCHES=(
64 + "${FILESDIR}/jsonnet-0.14.0-makefile.patch"
65 + "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch"
66 +)
67 +
68 +distutils_enable_tests setup.py
69 +
70 +src_prepare() {
71 + default
72 + use python && distutils-r1_src_prepare
73 + sed -i "s@\(PREFIX\)/lib@\(PREFIX\)/$(get_libdir)@g" Makefile || die
74 +}
75 +
76 +src_configure() {
77 + use custom-optimization || replace-flags '-O*' -O3
78 + tc-export CC CXX
79 + default
80 +}
81 +
82 +src_compile() {
83 + emake bins libs
84 + use python && distutils-r1_src_compile
85 +}
86 +
87 +src_test() {
88 + emake test
89 + use python && distutils-r1_src_test
90 +}
91 +
92 +src_install() {
93 + emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install
94 + use python && distutils-r1_src_install
95 + if use doc; then
96 + find doc -name '.gitignore' -delete || die
97 + docinto html
98 + dodoc -r doc/.
99 + fi
100 + if use examples; then
101 + docinto examples
102 + dodoc -r examples/.
103 + fi
104 +}