summaryrefslogtreecommitdiff
path: root/dev-lang/jsonnet/jsonnet-0.14.0.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-25 19:33:39 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-25 19:33:39 +0100
commita5b65c81168c90928784a1e92cda84ed5d6b9eb3 (patch)
tree4aa7483cd0ad7de54338afc8e7971417abe1dd81 /dev-lang/jsonnet/jsonnet-0.14.0.ebuild
parente8f81810baa21f490d6910e8e2d424546b72a333 (diff)
gentoo resync : 25.09.2019
Diffstat (limited to 'dev-lang/jsonnet/jsonnet-0.14.0.ebuild')
-rw-r--r--dev-lang/jsonnet/jsonnet-0.14.0.ebuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/dev-lang/jsonnet/jsonnet-0.14.0.ebuild b/dev-lang/jsonnet/jsonnet-0.14.0.ebuild
new file mode 100644
index 000000000000..6c941fab0926
--- /dev/null
+++ b/dev-lang/jsonnet/jsonnet-0.14.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_6 python3_7 )
+
+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"
+)
+
+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
+}
+
+python_test() {
+ esetup.py test || die
+}
+
+src_install() {
+ dolib.so libjsonnet*.so
+ dobin jsonnet
+
+ use python && distutils-r1_src_install
+}