Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/jsonnet/files/, dev-lang/jsonnet/
Date: Mon, 16 Sep 2019 20:45:41
Message-Id: 1568666715.dc06613429117fd6d81059278541956af85ea692.chutzpah@gentoo
1 commit: dc06613429117fd6d81059278541956af85ea692
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Mon Sep 16 20:45:15 2019 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 16 20:45:15 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc066134
7
8 dev-lang/jsonnet: Version bump to 0.14.0
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.76, Repoman-2.3.17
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 dev-lang/jsonnet/Manifest | 1 +
15 .../jsonnet/files/jsonnet-0.14.0-makefile.patch | 16 ++++++
16 dev-lang/jsonnet/jsonnet-0.14.0.ebuild | 65 ++++++++++++++++++++++
17 dev-lang/jsonnet/metadata.xml | 4 ++
18 4 files changed, 86 insertions(+)
19
20 diff --git a/dev-lang/jsonnet/Manifest b/dev-lang/jsonnet/Manifest
21 index dc57a4ec785..16e59487bbd 100644
22 --- a/dev-lang/jsonnet/Manifest
23 +++ b/dev-lang/jsonnet/Manifest
24 @@ -1,2 +1,3 @@
25 DIST jsonnet-0.12.1.tar.gz 21839349 BLAKE2B 8601a35263003723b435d0075fe60f5301a49bddf63cdd55958df3eb7474569c28dbf54e0ba9d07fb6ade395af725193d1432b2c43fb2b271531af179e850df4 SHA512 25523dd19b4209a5ca39275ab3d3726b934442dd83a965ab0b79f0c67bd8ae85c438b2a63990b8eec921b137f908f946696be331b08cef92f15b6b8fa548cb0d
26 DIST jsonnet-0.13.0.tar.gz 21850449 BLAKE2B fa0665d63b09dfc01a7454268d6edd467524cdfdb5d53e838665f046f1f08608c493503a88d7af7e26c3dc07e0ae4323753affab90c5ac41c27ebe8b7b39a4a0 SHA512 d19e5398763e37b79b0ef02368f6bd6215d2df234b5ff7a6d98e2306a0d47290600061c9f868c0c262570b4f0ee9eee6c309bcc93937b12f6c14f8d12339a7d5
27 +DIST jsonnet-0.14.0.tar.gz 21857157 BLAKE2B 93de74fa07efa300097ccb9503b41543beb749d5aff130ad9a6139a3ceb0a07b404aa50877d4cbacd9eb26b2194d8cd9bf578521f17f84a3480655b179525663 SHA512 e09fb27202a34e88134d98d59fdccd4f1ee777e7c8090c3687cb5c11b9ada3bfe7b878322e0274743694ff77457215484470ccf90d03d9d36159288e5a18ab0b
28
29 diff --git a/dev-lang/jsonnet/files/jsonnet-0.14.0-makefile.patch b/dev-lang/jsonnet/files/jsonnet-0.14.0-makefile.patch
30 new file mode 100644
31 index 00000000000..a6107a4e10c
32 --- /dev/null
33 +++ b/dev-lang/jsonnet/files/jsonnet-0.14.0-makefile.patch
34 @@ -0,0 +1,16 @@
35 +diff --git a/Makefile b/Makefile
36 +index 474655c..89c396c 100644
37 +--- a/Makefile
38 ++++ b/Makefile
39 +@@ -31,9 +31,9 @@ OPT ?= -O3
40 +
41 + PREFIX ?= /usr/local
42 +
43 +-CXXFLAGS ?= -g $(OPT) -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC
44 ++CXXFLAGS += -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++0x -fPIC
45 + CXXFLAGS += -Iinclude -Ithird_party/md5 -Ithird_party/json
46 +-CFLAGS ?= -g $(OPT) -Wall -Wextra -pedantic -std=c99 -fPIC
47 ++CFLAGS += -Wall -Wextra -pedantic -std=c99 -fPIC
48 + CFLAGS += -Iinclude
49 + MAKEDEPENDFLAGS += -Iinclude -Ithird_party/md5 -Ithird_party/json
50 + 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
51
52 diff --git a/dev-lang/jsonnet/jsonnet-0.14.0.ebuild b/dev-lang/jsonnet/jsonnet-0.14.0.ebuild
53 new file mode 100644
54 index 00000000000..6c941fab092
55 --- /dev/null
56 +++ b/dev-lang/jsonnet/jsonnet-0.14.0.ebuild
57 @@ -0,0 +1,65 @@
58 +# Copyright 1999-2019 Gentoo Authors
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI=7
62 +
63 +DISTUTILS_OPTIONAL=1
64 +PYTHON_COMPAT=( python3_6 python3_7 )
65 +
66 +inherit toolchain-funcs flag-o-matic distutils-r1
67 +
68 +DESCRIPTION="A data templating language for app and tool developers "
69 +HOMEPAGE="https://jsonnet.org/"
70 +SRC_URI="https://github.com/google/jsonnet/archive/v${PV}.tar.gz -> ${P}.tar.gz"
71 +IUSE="custom-optimization python"
72 +
73 +LICENSE="Apache-2.0"
74 +SLOT="0"
75 +KEYWORDS="~amd64 ~x86"
76 +DEPEND="python? ( ${PYTHON_DEPS} )"
77 +RDEPEND="python? ( ${PYTHON_DEPS} )"
78 +BDEPEND="python? ( ${PYTHON_DEPS}
79 + dev-python/setuptools[${PYTHON_USEDEP}]
80 + )"
81 +
82 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
83 +
84 +PATCHES=(
85 + "${FILESDIR}/jsonnet-0.14.0-makefile.patch"
86 + "${FILESDIR}/jsonnet-0.12.1-dont-call-make-from-setuppy.patch"
87 +)
88 +
89 +src_prepare() {
90 + default
91 + use python && distutils-r1_src_prepare
92 +}
93 +
94 +src_configure() {
95 + use custom-optimization || replace-flags '-O*' -O3
96 + default
97 +}
98 +
99 +src_compile() {
100 + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
101 + jsonnet \
102 + libjsonnet.so \
103 + libjsonnet++.so
104 +
105 + use python && distutils-r1_src_compile
106 +}
107 +
108 +src_test() {
109 + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" test
110 + use python && distutils-r1_src_test
111 +}
112 +
113 +python_test() {
114 + esetup.py test || die
115 +}
116 +
117 +src_install() {
118 + dolib.so libjsonnet*.so
119 + dobin jsonnet
120 +
121 + use python && distutils-r1_src_install
122 +}
123
124 diff --git a/dev-lang/jsonnet/metadata.xml b/dev-lang/jsonnet/metadata.xml
125 index 9c2644baf91..6a3ebc34969 100644
126 --- a/dev-lang/jsonnet/metadata.xml
127 +++ b/dev-lang/jsonnet/metadata.xml
128 @@ -12,4 +12,8 @@
129 <upstream>
130 <remote-id type="github">google/jsonnet</remote-id>
131 </upstream>
132 + <use>
133 + <flag name="custom-optimization">Build with user-specified compiler optimizations
134 + (-Os, -O0, -O1, -O2, -O3) from CFLAGS (unsupported)</flag>
135 + </use>
136 </pkgmetadata>