diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-12-14 13:26:14 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-12-14 13:26:14 +0000 |
commit | 6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (patch) | |
tree | 25413d1cb3a0cbfe36029db32398c0f333609215 /dev-libs/jansson | |
parent | 9c417bacd51da6d8b57fa9f37425161d30d4b95b (diff) |
gentoo resync : 14.12.2020
Diffstat (limited to 'dev-libs/jansson')
-rw-r--r-- | dev-libs/jansson/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/jansson/files/jansson-2.13.1-sphinx3.patch | 269 | ||||
-rw-r--r-- | dev-libs/jansson/jansson-2.13.1-r1.ebuild | 41 |
3 files changed, 312 insertions, 0 deletions
diff --git a/dev-libs/jansson/Manifest b/dev-libs/jansson/Manifest index 845ca266beb1..7df7a3cbcb6e 100644 --- a/dev-libs/jansson/Manifest +++ b/dev-libs/jansson/Manifest @@ -1,5 +1,7 @@ +AUX jansson-2.13.1-sphinx3.patch 10268 BLAKE2B 97fd3c0faec1201f703d93bdc049eac24be5639493f434fc3931d7fe81e1f3ba28113d98be5f91e602c344e741a2be9b618717dd638dd5c887a5272baf9cdd4f SHA512 bf31c72f4f612b53621cfcda21c358c75f18ba0d9a8b1dc1059232f655788cd05b4deb5c5fc77c36fc2620d49ff97c92a19596829b76aed56fffa53040e01ac7 DIST jansson-2.12.tar.gz 489154 BLAKE2B cf6bc6d03daba921ec5e033bf57ff0055741cc935adb14d5d4a5f04056fa93c292bf88367db071ef7bb32fbc5d2d6f5f2ce658815a17939bd38ed5c0676ad091 SHA512 e40bdafdfa1fa663f71e00c06d7bfc98cff4ed3581a147894e5272e50fa5f9b9a7af6aaca41ff423a2ddd2554a192b36efcc32f6a3c98c727e9f819b955357cb DIST jansson-2.13.1.tar.gz 531924 BLAKE2B e627bd2ba69bf01b053ff13dee903056db86999f774d6863517e67cef7dc9ddcaa747f2edca9de86bd83f37940a394ac9907f7d58069607ee529af08d8514d57 SHA512 e32be6665e41cf1763608c2f1ac4ce0824d4d7ffa5f4a5824cefde279250fdd399d49ba93d8894e16a473731f629b846554654347f027ca9a0a96ed047f10192 EBUILD jansson-2.12.ebuild 817 BLAKE2B e517e55debf4bd3971c2d93b906a1081baa510222deff3e2c8e09388e28af1891c3d0d43b6800abdbc33b6380bdf5627a8409f6da21d2356c146fb6c2155427f SHA512 500d974d2708280e1ae4a157e39034bab3b73ba56e4aad3ed7ed6e9942165b31500fb92fafcf0b94328fa863ef2c01308069fa1f6f13cb32dcd6287913fc3b2e +EBUILD jansson-2.13.1-r1.ebuild 941 BLAKE2B c4415794d498b4c805b33084d58a3aa985e287632fe364eb21cb4a35d1bea38eba94ecc87f7827654420083429cb4cfe10a5f74362e2b2016bd41aecfad864c4 SHA512 55a7703ca6a653613983eddcdbe866720cced62bf971f037c5400938b7da472354c09da69199453f7c4b2a9e922759bb03959baf87ffdb20b37d7931a90f4b6b EBUILD jansson-2.13.1.ebuild 900 BLAKE2B 474ff8e775505791709913bd732e51b66a501a63486ef1ec13f6badece49f5a1fe6a7a333ba6b363ae5e029d8a64532ed6ef147a82a3a3e5b8b4f694585de602 SHA512 703c4fc7e791daedd3a2922c8b5e1b89a487ef033cfbcb12df13472a22c3315e5ca370c14f75e6de4ee6ca562d377c905297f45e8f17cb5c54704704160328d8 MISC metadata.xml 364 BLAKE2B 98019538f02d8e12711b7e2f72036ad32a2f2b8c2b821a2ba4a0fe113653eb565ac7d447a5d2331d22c13f3bb5bff7484e89438ba82abd9b1d226ea1e8288ecf SHA512 414d6b7630f823690c293214be138c5b6f9748e2d80dda57022404d710b0a9ed78c5c9da4a57e2058368caf7caa8a698eacc9ded1cec5577d0799b21b338de59 diff --git a/dev-libs/jansson/files/jansson-2.13.1-sphinx3.patch b/dev-libs/jansson/files/jansson-2.13.1-sphinx3.patch new file mode 100644 index 000000000000..e611896e9c4e --- /dev/null +++ b/dev-libs/jansson/files/jansson-2.13.1-sphinx3.patch @@ -0,0 +1,269 @@ +Rebase pull request #543 onto v2.13.1 + +Allows jansson documentation to compile with Sphinx-3.0 + +Squashed commit messages below: + + +pick 798d40c doc: convert refcounting directive to a class + +Directive functions are no longer supported in Sphinx-3.0 +but directive classes have been supported since early 1.x + + +pick 9431889 doc: do not use references for standard C types or file names + +Use double-backtick quoting instead. It has the same effect +(because these links had nowhere to link to) but it does not +result in loud warnings about broken references by default with Sphinx-3.x. + + +pick c329fd7 doc: add return types for function-like macros + +The Sphinx-3.0 c:function:: directive requires the return type. + +Sphinx-3.0 also adds function-like macro support to the c:macro:: +directive, which Sphinx-1.x and Sphinx-2.x do not support, but it +is probably a good idea to keep compatibility with slightly older +Sphinx for now. + +diff --git a/CHANGES b/CHANGES +index a374a86..256fde1 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -8,7 +8,7 @@ Released 2020-05-07 + - Include `jansson_version_str()` and `jansson_version_cmp()` in + shared library. (#534) + +- - Include `scripts/` in tarball. (#535) ++ - Include ``scripts/`` in tarball. (#535) + + + Version 2.13 +@@ -127,7 +127,7 @@ Released 2018-02-09 + + - Work around gcc's -Wimplicit-fallthrough. + +- - Fix CMake detection of `sys/types.h` header (#375). ++ - Fix CMake detection of ``sys/types.h`` header (#375). + + - Fix `jansson.pc` generated by CMake to be more consistent with the one + generated using GNU Autotools (#368). +diff --git a/doc/apiref.rst b/doc/apiref.rst +index c3a814f..94c5726 100644 +--- a/doc/apiref.rst ++++ b/doc/apiref.rst +@@ -145,33 +145,33 @@ Type + .. function:: int json_typeof(const json_t *json) + + Return the type of the JSON value (a :type:`json_type` cast to +- :type:`int`). *json* MUST NOT be *NULL*. This function is actually ++ ``int``). *json* MUST NOT be *NULL*. This function is actually + implemented as a macro for speed. + +-.. function:: json_is_object(const json_t *json) +- json_is_array(const json_t *json) +- json_is_string(const json_t *json) +- json_is_integer(const json_t *json) +- json_is_real(const json_t *json) +- json_is_true(const json_t *json) +- json_is_false(const json_t *json) +- json_is_null(const json_t *json) ++.. function:: int json_is_object(const json_t *json) ++ int json_is_array(const json_t *json) ++ int json_is_string(const json_t *json) ++ int json_is_integer(const json_t *json) ++ int json_is_real(const json_t *json) ++ int json_is_true(const json_t *json) ++ int json_is_false(const json_t *json) ++ int json_is_null(const json_t *json) + + These functions (actually macros) return true (non-zero) for values + of the given type, and false (zero) for values of other types and + for *NULL*. + +-.. function:: json_is_number(const json_t *json) ++.. function:: int json_is_number(const json_t *json) + + Returns true for values of types ``JSON_INTEGER`` and + ``JSON_REAL``, and false for other types and for *NULL*. + +-.. function:: json_is_boolean(const json_t *json) ++.. function:: int json_is_boolean(const json_t *json) + + Returns true for types ``JSON_TRUE`` and ``JSON_FALSE``, and false + for values of other types and for *NULL*. + +-.. function:: json_boolean_value(const json_t *json) ++.. function:: int json_boolean_value(const json_t *json) + + Alias of :func:`json_is_true()`, i.e. returns 1 for ``JSON_TRUE`` + and 0 otherwise. +@@ -594,7 +594,7 @@ A JSON array is an ordered collection of other JSON values. + Appends all elements in *other_array* to the end of *array*. + Returns 0 on success and -1 on error. + +-.. function:: json_array_foreach(array, index, value) ++.. function:: void json_array_foreach(array, index, value) + + Iterate over every element of ``array``, running the block + of code that follows each time with the proper values set to +@@ -732,11 +732,11 @@ allowed in object keys. + recursively merged with the corresponding values in *object* if they are also + objects, instead of overwriting them. Returns 0 on success or -1 on error. + +-.. function:: json_object_foreach(object, key, value) ++.. function:: void json_object_foreach(object, key, value) + + Iterate over every key-value pair of ``object``, running the block + of code that follows each time with the proper values set to +- variables ``key`` and ``value``, of types :type:`const char *` and ++ variables ``key`` and ``value``, of types ``const char *`` and + :type:`json_t *` respectively. Example:: + + /* obj is a JSON object */ +@@ -764,7 +764,7 @@ allowed in object keys. + .. versionadded:: 2.3 + + +-.. function:: json_object_foreach_safe(object, tmp, key, value) ++.. function:: void json_object_foreach_safe(object, tmp, key, value) + + Like :func:`json_object_foreach()`, but it's safe to call + ``json_object_del(object, key)`` during iteration. You need to pass +@@ -1488,17 +1488,17 @@ arguments. + Output a JSON null value. No argument is consumed. + + ``b`` (boolean) [int] +- Convert a C :type:`int` to JSON boolean value. Zero is converted ++ Convert a C ``int`` to JSON boolean value. Zero is converted + to ``false`` and non-zero to ``true``. + + ``i`` (integer) [int] +- Convert a C :type:`int` to JSON integer. ++ Convert a C ``int`` to JSON integer. + + ``I`` (integer) [json_int_t] + Convert a C :type:`json_int_t` to JSON integer. + + ``f`` (real) [double] +- Convert a C :type:`double` to JSON real. ++ Convert a C ``double`` to JSON real. + + ``o`` (any value) [json_t \*] + Output any given JSON value as-is. If the value is added to an +@@ -1625,20 +1625,20 @@ type whose address should be passed. + Expect a JSON null value. Nothing is extracted. + + ``b`` (boolean) [int] +- Convert a JSON boolean value to a C :type:`int`, so that ``true`` ++ Convert a JSON boolean value to a C ``int``, so that ``true`` + is converted to 1 and ``false`` to 0. + + ``i`` (integer) [int] +- Convert a JSON integer to C :type:`int`. ++ Convert a JSON integer to C ``int``. + + ``I`` (integer) [json_int_t] + Convert a JSON integer to C :type:`json_int_t`. + + ``f`` (real) [double] +- Convert a JSON real to C :type:`double`. ++ Convert a JSON real to C ``double``. + + ``F`` (integer or real) [double] +- Convert a JSON number (integer or real) to C :type:`double`. ++ Convert a JSON number (integer or real) to C ``double``. + + ``o`` (any value) [json_t \*] + Store a JSON value with no conversion to a :type:`json_t` pointer. +diff --git a/doc/ext/refcounting.py b/doc/ext/refcounting.py +index bba2684..e72c481 100644 +--- a/doc/ext/refcounting.py ++++ b/doc/ext/refcounting.py +@@ -24,8 +24,8 @@ + """ + + from docutils import nodes ++from docutils.parsers.rst import Directive + +-class refcounting(nodes.emphasis): pass + + def visit(self, node): + self.visit_emphasis(node) +@@ -40,16 +40,25 @@ def html_depart(self, node): + self.body.append('</em>') + + +-def refcounting_directive(name, arguments, options, content, lineno, +- content_offset, block_text, state, state_machine): +- if arguments[0] == 'borrow': +- text = 'Return value: Borrowed reference.' +- elif arguments[0] == 'new': +- text = 'Return value: New reference.' +- else: +- raise Error('Valid arguments: new, borrow') ++class refcounting(nodes.emphasis): ++ pass ++ ++class refcounting_directive(Directive): ++ has_content = False ++ required_arguments = 1 ++ optional_arguments = 0 ++ final_argument_whitespace = False ++ ++ def run(self): ++ if self.arguments[0] == 'borrow': ++ text = 'Return value: Borrowed reference.' ++ elif self.arguments[0] == 'new': ++ text = 'Return value: New reference.' ++ else: ++ raise Error('Valid arguments: new, borrow') ++ ++ return [refcounting(text, text)] + +- return [refcounting(text, text)] + + def setup(app): + app.add_node(refcounting, +@@ -57,4 +66,4 @@ def setup(app): + latex=(visit, depart), + text=(visit, depart), + man=(visit, depart)) +- app.add_directive('refcounting', refcounting_directive, 0, (1, 0, 0)) ++ app.add_directive('refcounting', refcounting_directive) +diff --git a/doc/upgrading.rst b/doc/upgrading.rst +index 9b49046..94ff7de 100644 +--- a/doc/upgrading.rst ++++ b/doc/upgrading.rst +@@ -47,13 +47,13 @@ List of Incompatible Changes + + **Underlying type of JSON integers** + The underlying C type of JSON integers has been changed from +- :type:`int` to the widest available signed integer type, i.e. +- :type:`long long` or :type:`long`, depending on whether +- :type:`long long` is supported on your system or not. This makes ++ ``int`` to the widest available signed integer type, i.e. ++ ``long long`` or ``long``, depending on whether ++ ``long long`` is supported on your system or not. This makes + the whole 64-bit integer range available on most modern systems. + + ``jansson.h`` has a typedef :type:`json_int_t` to the underlying +- integer type. :type:`int` should still be used in most cases when ++ integer type. ``int`` should still be used in most cases when + dealing with smallish JSON integers, as the compiler handles + implicit type coercion. Only when the full 64-bit range is needed, + :type:`json_int_t` should be explicitly used. +@@ -69,8 +69,8 @@ List of Incompatible Changes + + **Unsigned integers in API functions** + Version 2.0 unifies unsigned integer usage in the API. All uses of +- :type:`unsigned int` and :type:`unsigned long` have been replaced +- with :type:`size_t`. This includes flags, container sizes, etc. ++ ``unsigned int`` and ``unsigned long`` have been replaced ++ with ``size_t``. This includes flags, container sizes, etc. + This should not require source code changes, as both +- :type:`unsigned int` and :type:`unsigned long` are usually +- compatible with :type:`size_t`. ++ ``unsigned int`` and ``unsigned long`` are usually ++ compatible with ``size_t``. diff --git a/dev-libs/jansson/jansson-2.13.1-r1.ebuild b/dev-libs/jansson/jansson-2.13.1-r1.ebuild new file mode 100644 index 000000000000..1f926f3cbf18 --- /dev/null +++ b/dev-libs/jansson/jansson-2.13.1-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-minimal + +DESCRIPTION="C library for encoding, decoding and manipulating JSON data" +HOMEPAGE="https://www.digip.org/jansson/" +SRC_URI="https://www.digip.org/jansson/releases/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-macos" +IUSE="doc static-libs" + +BDEPEND="doc? ( dev-python/sphinx )" + +PATCHES=( + # dev-libs/jansson-2.13.1[doc]: fails to build with >=sphinx-3.0, #731668 + "${FILESDIR}/${P}-sphinx3.patch" +) + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf $(use_enable static-libs static) +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use doc ; then + emake html + HTML_DOCS=( "${BUILD_DIR}"/doc/_build/html/. ) + fi +} + +multilib_src_install() { + default + + find "${D}" -name '*.la' -delete || die +} |