diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2024-10-09 23:01:01 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-10-10 12:53:49 -0700 |
| commit | a3854f6893afb53d896394ddcc26568b25d04d91 (patch) | |
| tree | 1a21b5a0c05ebe0833df7c2644919fd0a1e76cfc | |
| parent | c25df5ad4976ffb196a13c8171db87432bf36f80 (diff) | |
| download | meta-openembedded-a3854f6893afb53d896394ddcc26568b25d04d91.tar.gz | |
jansson: add JSON_INTEGER_IS_LONG_LONG for cmake
This macro is documented, so it should be consistent across
different build systems. It's defined in autotools, but not
cmake. Add it for cmake.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/jansson/jansson/0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch | 51 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/jansson/jansson_2.14.bb | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/jansson/jansson/0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch b/meta-oe/recipes-extended/jansson/jansson/0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch new file mode 100644 index 0000000000..5298cfbefc --- /dev/null +++ b/meta-oe/recipes-extended/jansson/jansson/0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From 521d37abc0ed1178a39298d06d80d8d0e2a43e28 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
| 3 | Date: Tue, 10 Sep 2024 00:48:00 -0700 | ||
| 4 | Subject: [PATCH] add back JSON_INTEGER_IS_LONG_LONG for cmake | ||
| 5 | |||
| 6 | For autotools, JSON_INTEGER_IS_LONG_LONG is defined, but for | ||
| 7 | cmake, it's not. This means such macro, which is also documented, | ||
| 8 | is not consistent across different build systems. This is not | ||
| 9 | good, so add it for cmake. | ||
| 10 | |||
| 11 | This patch refers 8b975abca1055d40637c90b1dc4585af1d7df76c and is | ||
| 12 | part of it. So the upstream-status is marked as 'oe specific'. | ||
| 13 | |||
| 14 | Upstream-Status: Inappropriate [OE Specific] | ||
| 15 | |||
| 16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 17 | --- | ||
| 18 | CMakeLists.txt | 1 + | ||
| 19 | cmake/jansson_config.h.cmake | 4 +--- | ||
| 20 | 2 files changed, 2 insertions(+), 3 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 23 | index 39b9ad3..0e95a94 100644 | ||
| 24 | --- a/CMakeLists.txt | ||
| 25 | +++ b/CMakeLists.txt | ||
| 26 | @@ -193,6 +193,7 @@ endif () | ||
| 27 | # detect what to use for the 64 bit type. | ||
| 28 | # Note: I will prefer long long if I can get it, as that is what the automake system aimed for. | ||
| 29 | if (NOT DEFINED JSON_INT_T) | ||
| 30 | + set (JSON_INTEGER_IS_LONG_LONG 1) | ||
| 31 | if (HAVE_LONG_LONG_INT AND (LONG_LONG_INT EQUAL 8)) | ||
| 32 | set (JSON_INT_T "long long") | ||
| 33 | elseif (HAVE_INT64_T) | ||
| 34 | diff --git a/cmake/jansson_config.h.cmake b/cmake/jansson_config.h.cmake | ||
| 35 | index 2f248cb..bec64da 100644 | ||
| 36 | --- a/cmake/jansson_config.h.cmake | ||
| 37 | +++ b/cmake/jansson_config.h.cmake | ||
| 38 | @@ -21,9 +21,7 @@ | ||
| 39 | #define JANSSON_USING_CMAKE | ||
| 40 | #endif | ||
| 41 | |||
| 42 | -/* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used, | ||
| 43 | - * as we will also check for __int64 etc types. | ||
| 44 | - * (the definition was used in the automake system) */ | ||
| 45 | +#cmakedefine JSON_INTEGER_IS_LONG_LONG 1 | ||
| 46 | |||
| 47 | /* Bring in the cmake-detected defines */ | ||
| 48 | #cmakedefine HAVE_STDINT_H 1 | ||
| 49 | -- | ||
| 50 | 2.42.0 | ||
| 51 | |||
diff --git a/meta-oe/recipes-extended/jansson/jansson_2.14.bb b/meta-oe/recipes-extended/jansson/jansson_2.14.bb index fb42509f36..9f5cdcf4c0 100644 --- a/meta-oe/recipes-extended/jansson/jansson_2.14.bb +++ b/meta-oe/recipes-extended/jansson/jansson_2.14.bb | |||
| @@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=afd92c4cfc08f4896003251b878cc0bf" | |||
| 7 | SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ | 7 | SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ |
| 8 | file://0001-Fix-overwriting-linker-flags.patch \ | 8 | file://0001-Fix-overwriting-linker-flags.patch \ |
| 9 | file://0001-Honour-multilib-paths.patch \ | 9 | file://0001-Honour-multilib-paths.patch \ |
| 10 | file://0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch \ | ||
| 10 | " | 11 | " |
| 11 | SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9" | 12 | SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9" |
| 12 | 13 | ||
