community/tinycbor: upgrade to 7.0

https://github.com/intel/tinycbor/releases/tag/v7.0

This commit is a bit more invasive, as cmake is used as build system.

Add -doc subpackage, as this is MIT licensed.
This commit is contained in:
Marian Buschsieweke 2026-04-18 08:59:42 +02:00 committed by omni
parent c2ec82551b
commit 2f534099bd
3 changed files with 29 additions and 67 deletions

View File

@ -1,34 +0,0 @@
Comment out tests failing on at least one arch
--- a/tests/tojson/tst_tojson.cpp
+++ b/tests/tojson/tst_tojson.cpp
@@ -123,8 +123,8 @@
QTest::newRow("2.^53-1") << raw("\xfb\x43\x3f\xff\xff""\xff\xff\xff\xff") << "9007199254740991";
QTest::newRow("2.f^64-epsilon") << raw("\xfa\x5f\x7f\xff\xff") << "18446742974197923840";
QTest::newRow("2.^64-epsilon") << raw("\xfb\x43\xef\xff\xff""\xff\xff\xff\xff") << "18446744073709549568";
- QTest::newRow("2.f^64") << raw("\xfa\x5f\x80\0\0") << "1.8446744073709552e+19";
- QTest::newRow("2.^64") << raw("\xfb\x43\xf0\0\0\0\0\0\0") << "1.8446744073709552e+19";
+ //QTest::newRow("2.f^64") << raw("\xfa\x5f\x80\0\0") << "1.8446744073709552e+19";
+ //QTest::newRow("2.^64") << raw("\xfb\x43\xf0\0\0\0\0\0\0") << "1.8446744073709552e+19";
// infinities and NaN are not supported in JSON, they convert to null
QTest::newRow("nan_f16") << raw("\xf9\x7e\x00") << "null";
@@ -372,8 +372,8 @@
QTest::newRow("2.^53-1") << raw("\xfb\x43\x3f\xff\xff""\xff\xff\xff\xff") << "9007199254740991.";
QTest::newRow("2.f^64-epsilon") << raw("\xfa\x5f\x7f\xff\xff") << "18446742974197923840.f";
QTest::newRow("2.^64-epsilon") << raw("\xfb\x43\xef\xff\xff""\xff\xff\xff\xff") << "18446744073709549568.";
- QTest::newRow("2.f^64") << raw("\xfa\x5f\x80\0\0") << "1.8446744073709552e+19f";
- QTest::newRow("2.^64") << raw("\xfb\x43\xf0\0\0\0\0\0\0") << "1.8446744073709552e+19";
+ //QTest::newRow("2.f^64") << raw("\xfa\x5f\x80\0\0") << "1.8446744073709552e+19f";
+ //QTest::newRow("2.^64") << raw("\xfb\x43\xf0\0\0\0\0\0\0") << "1.8446744073709552e+19";
QTest::newRow("nan_f16") << raw("\xf9\x7e\x00") << "nan";
QTest::newRow("nan_f") << raw("\xfa\x7f\xc0\0\0") << "nan";
@@ -556,7 +556,7 @@
QTest::newRow("emptytextstring") << raw("\x60") << QString();
QTest::newRow("textstring1") << raw("\x61 ") << QString();
QTest::newRow("0.5") << raw("\xfb\x3f\xe0\0\0\0\0\0\0") << QString();
- QTest::newRow("2.^64") << raw("\xfb\x43\xf0\0\0\0\0\0\0") << QString();
+ //QTest::newRow("2.^64") << raw("\xfb\x43\xf0\0\0\0\0\0\0") << QString();
QTest::newRow("false") << raw("\xf4") << QString();
QTest::newRow("true") << raw("\xf5") << QString();
QTest::newRow("null") << raw("\xf6") << QString();

View File

@ -1,42 +1,49 @@
# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=tinycbor
pkgver=0.6.1
pkgver=7.0
pkgrel=0
pkgdesc="Concise Binary Object Representation (CBOR) Library"
url="https://github.com/intel/tinycbor"
checkdepends="qt6-qtbase-dev"
arch="all"
makedepends="
cjson-dev
cmake
qt6-qtbase-dev
samurai
"
# loongarch64, ppc64le: segfault in check(), https://github.com/intel/tinycbor/issues/324
arch="all !loongarch64 !ppc64le"
license="MIT"
subpackages="$pkgname-dev lib$pkgname:libs"
subpackages="
$pkgname-dev
$pkgname-doc
lib$pkgname:libs
"
source="
$pkgname-$pkgver.tar.gz::https://github.com/intel/tinycbor/archive/v$pkgver.tar.gz
0001-disable-failing-tests.patch
recursion.patch
$pkgname-$pkgver.tar.gz::https://github.com/intel/tinycbor/archive/refs/tags/v$pkgver.tar.gz
"
_make() {
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" BUILD_SHARED=1 \
QMAKE=qmake6 prefix=/usr "$@"
}
build() {
_make
cmake -B build -G Ninja -Wno-dev \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TOOLS=ON \
-DBUILD_TESTING=ON \
#
cmake --build build
}
check() {
case "$CARCH" in
# FIXME
ppc64le|loongarch64) export PARSER_NO_MMAP=1 ;;
esac
_make check
ctest --test-dir build
}
package() {
_make DESTDIR="$pkgdir" BUILD_STATIC=0 install
DESTDIR="$pkgdir" cmake --install build
install -Dm0644 -t "$pkgdir"/usr/share/licenses/"$pkgname"/ LICENSE
}
sha512sums="
7c7fff9c1e9a2f04a3bb0247b79723526685b2821df720d0211c8e86b1a516c955926b3668fa6dcdaaf6cb811aff238db39a9add1bc12a4d32f8a51741f3f2ce tinycbor-0.6.1.tar.gz
388dafc40b674d72649e9b687142d75d687bf6f1cf156d160a183abd4b73e175d357d4daede8a530789539e630cef447563483d267c7fd2744de579dcdec4c9f 0001-disable-failing-tests.patch
13317d85a6dff3c737b2e816eb12ea245b4602f968ea3254db81f0045baf57383cc33fc6a86116796f5ba1bf6992014faf4ae0e178b4d9bd976cfdc74c475126 recursion.patch
193f995ecf1098accd04add3271aae834fd08aba94b7360ed0c22f8cc52d212cfe9c708c3cd89accaa27448078e95ae847ae91da661ca2cc4a1029e73b250b57 tinycbor-7.0.tar.gz
"

View File

@ -1,11 +0,0 @@
--- a/tests/parser/parser.pro
+++ b/tests/parser/parser.pro
@@ -2,7 +2,7 @@
CONFIG += testcase parallel_test c++11
QT = core testlib
-DEFINES += CBOR_PARSER_MAX_RECURSIONS=16
+DEFINES += CBOR_PARSER_MAX_RECURSIONS=1024
INCLUDEPATH += ../../src
msvc: POST_TARGETDEPS = ../../lib/tinycbor.lib