From c3bc61051d7f12b4c682efa7a5460bbc8815649e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 7 Jan 2022 22:48:01 +0000 Subject: gentoo resync : 07.01.2022 --- dev-lang/jsonnet/Manifest | 3 + .../jsonnet/files/jsonnet-0.18.0-unbundle.patch | 75 +++++++++++++++ dev-lang/jsonnet/jsonnet-0.18.0-r1.ebuild | 105 +++++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 dev-lang/jsonnet/files/jsonnet-0.18.0-unbundle.patch create mode 100644 dev-lang/jsonnet/jsonnet-0.18.0-r1.ebuild (limited to 'dev-lang/jsonnet') diff --git a/dev-lang/jsonnet/Manifest b/dev-lang/jsonnet/Manifest index 401615595caf..d88efec96f56 100644 --- a/dev-lang/jsonnet/Manifest +++ b/dev-lang/jsonnet/Manifest @@ -2,11 +2,14 @@ AUX jsonnet-0.12.1-dont-call-make-from-setuppy.patch 387 BLAKE2B 8c0223b10cf1b61 AUX jsonnet-0.14.0-makefile.patch 752 BLAKE2B 5acf8e07cd0f1b9af658015e6ee560f31a25b4b17402e0516bc8a861db4f31d9cb23e86943389d36f0885f4afc179b433764a331aea7a0164368e3561490da61 SHA512 18230b761ec3d3d106e06d02680b54229eb20c681b7591209dbb7d5ee138edc3a5015d1e53d3238dd9c86753bcc3f5ef3352a733e9a950fca4b37af8d83c9888 AUX jsonnet-0.16.0-cp-var.patch 824 BLAKE2B 111fff8e8b897864e14defa677c1a9b8589ef6a859b2344b24e16a940d90cdeff1affde6cd53c0a1a443a82553ee90d554990160f07c49e98c15a5fc7ea3e03a SHA512 96ecfb8a6b49d31e6a827ed401566b5eef39deb8a3542a6f1b3a5df148bfd93479038468585dc47a76fbb9e7953bf9a6c7161abc7acaff7b81cb8dffe3de2f6d AUX jsonnet-0.16.0-libdir.patch 963 BLAKE2B c4b71c01230710bf81fca03b1411bbd21ee02d9957b12997f629c9b4c8e543889658308868d48fe20e0bb9647848bd1b1fa2100c58426785bab1c9bfbbaa8bcb SHA512 9a85c5b8d80f6975ddd3e3c369adb44f6f49382a1e50e9848129c53f81846e69f60a44f401a8a1042657a03f94daaaeb5747632414fa7cb0dc9e2f014ec17a1d +AUX jsonnet-0.18.0-unbundle.patch 2564 BLAKE2B 8945b6b17af162a99b7d561a68a48c218d0d939ba74784f35eaa8f8dbafe568e9b4db258d45cf9ce5d87504e3d265697f074d4202c8210e878daf07b56514ef5 SHA512 5bae8d02062ecd29d9650c2b623631e7f7a172148be052620a47ef42788ee272f795011ecc98df9d2000947f0ced4c76776e09f5143058b030cc61a54355bbbf DIST jsonnet-0.15.0.tar.gz 21826038 BLAKE2B 722a844c00ec31b662d932a4481a71197adad680181c6a56a49dfa3e9b63696d29320c5278024d44c0ab3d7d80569514792f815ac7fa3a3cc08c7756fb6f08ad SHA512 b63c1bf82e4fc9ba3f1009ed4e4ba1010e3e7f81bd816a234e48d35607eae3cba95cab57813d35daa9f024e316bae5256340a6f8d6d884f9136cdbf062a2b351 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 EBUILD jsonnet-0.15.0.ebuild 1351 BLAKE2B 70adc1ac64534dcf8d7ed647d81942b5918ab661061c88cc25dbe8c9c6c63478b96caa02a090695a66c120d826de5f34afc904c8c51aa37ff1a4b1dc5cb45397 SHA512 e5c234dd38eb5f13eebfa4842c214219a80e14bbc337fc4309dcef873cc4c37e326ea7867f60a68143849f7fc5e42dd98e9280c24e023ae0a6f71b1a9cc3b2e3 EBUILD jsonnet-0.16.0-r2.ebuild 1601 BLAKE2B 2de253f42358c8258f7f38b53b6fb8f6ed9127b5407375b8f69306701c884efa3ce280713411eaba899a972441eb92ed404ca02575a611dfd997dda99adb8ba1 SHA512 264866ca79d21d8f5870db27f14993d8d86fec27b44190ce69acab8d597417004edfd4a018b9100a289ad49e0aac7d670c568196b604d0e4107220bfd91a1012 EBUILD jsonnet-0.16.0.ebuild 1375 BLAKE2B 4990a4e9754dd0fbc96ce2d6b557b4f9d2325f705ead68db7c768a6942c77a2d235f2a7db961c41263c629a90c4d56633b07d66f26f610c1252a8613ebe9bbdc SHA512 34012d168676b6ad7b519c580085166e7c290e760bb3362003fffb509917d3496d4424f1beb067350d0da6f3a4197aeb87bcfcf84008c6937db63704249e2e16 EBUILD jsonnet-0.17.0-r1.ebuild 1752 BLAKE2B 93381b8c8546fefefdda73e2940a95bcd8b7c5de6ea8f09b53c6012027f4a4c01903af0f27a48f086dcfc471ec848905c572529332d07e2a7ff43dd5c57daf60 SHA512 befcf6b7ec73933ca127413ecea98169f55aec5346bfa94d0bfce4c1303f582ed3625467f744e791da7521f085705f6636c95cfffd3f4de17a0f2d08e7174402 +EBUILD jsonnet-0.18.0-r1.ebuild 2080 BLAKE2B 4853d9918b2f908ed052ee64c43566ef9de4156b1ebd6c1b32d84db20d16ad65fa86b4ed1f9e41ed5f73f61936c32420e0f8b6e024630c68cd44ea73761fdf2c SHA512 bfee3fae79d5b234d0242b257eae9f8a42038639a1c397e930d217c343daffd91331d02395101c8f8f75a04f350ed32260ee532262b44e9e1551fedcc1285942 MISC metadata.xml 636 BLAKE2B b4f30bead9e90492366ba9d8fd393cfa6610efcb1dbe7cf11307445f2b7aa596585b576e550aa0df3bcfd14c7a8b068d09040ea94dc815db76d6d15e0f09fccb SHA512 a106617bce041fc24e1fab61d08add74f450742e7c1be14633cd49b5137c86cf52bd5baf9ea8f5f2f51a90619c7dfad7e6bf749894d8e4df8063857f29a0492a diff --git a/dev-lang/jsonnet/files/jsonnet-0.18.0-unbundle.patch b/dev-lang/jsonnet/files/jsonnet-0.18.0-unbundle.patch new file mode 100644 index 000000000000..7c19e8893f12 --- /dev/null +++ b/dev-lang/jsonnet/files/jsonnet-0.18.0-unbundle.patch @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5df20ca..9e60fae 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -121,7 +121,6 @@ endif() + add_subdirectory(include) + add_subdirectory(stdlib) + add_subdirectory(third_party/md5) +-add_subdirectory(third_party/rapidyaml/rapidyaml ryml) + add_subdirectory(core) + add_subdirectory(cpp) + add_subdirectory(cmd) +diff --git a/core/vm.cpp b/core/vm.cpp +index 4617363..e328df5 100644 +--- a/core/vm.cpp ++++ b/core/vm.cpp +@@ -23,7 +23,7 @@ limitations under the License. + + #include "desugarer.h" + #include "json.h" +-#include "json.hpp" ++#include "nlohmann/json.hpp" + #include "md5.h" + #include "parser.h" + #include "ryml_std.hpp" // include this before any other ryml header +diff --git a/setup.py b/setup.py +index 0a2748a..356915d 100644 +--- a/setup.py ++++ b/setup.py +@@ -13,6 +13,7 @@ + # limitations under the License. + + import os ++import sys + from setuptools import setup + from setuptools import Extension + from setuptools.command.build_ext import build_ext as BuildExt +@@ -22,28 +23,6 @@ DIR = os.path.abspath(os.path.dirname(__file__)) + # NOTE: If you are editing the array below then you probably also need + # to change MANIFEST.in. + LIB_OBJECTS = [ +- 'core/desugarer.o', +- 'core/formatter.o', +- 'core/libjsonnet.o', +- 'core/lexer.o', +- 'core/parser.o', +- 'core/pass.o', +- 'core/static_analysis.o', +- 'core/string_utils.o', +- 'core/vm.o', +- 'third_party/md5/md5.o', +- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/char_traits.o', +- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/base64.o', +- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/language.o', +- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/memory_util.o', +- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/format.o', +- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/time.o', +- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/memory_resource.o', +- 'third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/error.o', +- 'third_party/rapidyaml/rapidyaml/src/c4/yml/parse.o', +- 'third_party/rapidyaml/rapidyaml/src/c4/yml/preprocess.o', +- 'third_party/rapidyaml/rapidyaml/src/c4/yml/common.o', +- 'third_party/rapidyaml/rapidyaml/src/c4/yml/tree.o', + ] + + MODULE_SOURCES = ['python/_jsonnet.c'] +@@ -72,6 +51,8 @@ jsonnet_ext = Extension( + '_jsonnet', + sources=MODULE_SOURCES, + extra_objects=LIB_OBJECTS, ++ libraries = ['md5', 'jsonnet', 'ryml'], ++ library_dirs = [os.environ.get('CMAKE_BUILD_DIR')], + include_dirs = ['include'], + language='c++' + ) diff --git a/dev-lang/jsonnet/jsonnet-0.18.0-r1.ebuild b/dev-lang/jsonnet/jsonnet-0.18.0-r1.ebuild new file mode 100644 index 000000000000..e089beab3200 --- /dev/null +++ b/dev-lang/jsonnet/jsonnet-0.18.0-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( pypy3 python3_{7..10} ) + +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 +} -- cgit v1.2.3