diff mbox series

[053/114] python3-cffi: upgrade 1.17.1 -> 2.0.0

Message ID 20251222200739.2278706-53-alex.kanavin@gmail.com
State New
Headers show
Series [001/114] build-appliance-image: do not inherit setuptools | expand

Commit Message

Alexander Kanavin Dec. 22, 2025, 8:06 p.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

License-Update: MIT -> MIT no attribution variant
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...ize_t-to-avoid-c-11-narrowing-warnin.patch | 34 -------------------
 ...3-cffi_1.17.1.bb => python3-cffi_2.0.0.bb} |  9 +++--
 2 files changed, 4 insertions(+), 39 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python3-cffi/0001-Cast-offset-to-size_t-to-avoid-c-11-narrowing-warnin.patch
 rename meta/recipes-devtools/python/{python3-cffi_1.17.1.bb => python3-cffi_2.0.0.bb} (74%)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-cffi/0001-Cast-offset-to-size_t-to-avoid-c-11-narrowing-warnin.patch b/meta/recipes-devtools/python/python3-cffi/0001-Cast-offset-to-size_t-to-avoid-c-11-narrowing-warnin.patch
deleted file mode 100644
index a919f4f6fb..0000000000
--- a/meta/recipes-devtools/python/python3-cffi/0001-Cast-offset-to-size_t-to-avoid-c-11-narrowing-warnin.patch
+++ /dev/null
@@ -1,34 +0,0 @@ 
-From 2ac63f8765e62f1492ef3ee06791636700bc6cfb Mon Sep 17 00:00:00 2001
-From: triallax <triallax@tutanota.com>
-Date: Sat, 29 Jun 2024 15:25:24 +0100
-Subject: [PATCH] Cast offset to size_t to avoid c++11-narrowing warning (#92)
-
-e.g. with clang 18 on chimera linux:
-
-_CFFI_test_verify_anonymous_struct_with_star_typedef.cpp:583:10: error: non-constant-expression cannot be narrowed from type 'long' to 'size_t' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
-  583 |   { "a", ((char *)&((foo_t)4096)->a) - (char *)4096,
-      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-_CFFI_test_verify_anonymous_struct_with_star_typedef.cpp:583:10: note: insert an explicit cast to silence this issue
-  583 |   { "a", ((char *)&((foo_t)4096)->a) - (char *)4096,
-      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      |          static_cast<size_t>(                      )
-
-Upstream-Status: Backport [https://github.com/python-cffi/cffi/pull/92]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/cffi/recompiler.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/cffi/recompiler.py b/src/cffi/recompiler.py
-index ac6c163e..14d578ee 100644
---- a/src/cffi/recompiler.py
-+++ b/src/cffi/recompiler.py
-@@ -953,7 +953,7 @@ class Recompiler:
-                 if cname is None or fbitsize >= 0:
-                     offset = '(size_t)-1'
-                 elif named_ptr is not None:
--                    offset = '((char *)&((%s)4096)->%s) - (char *)4096' % (
-+                    offset = '(size_t)(((char *)&((%s)4096)->%s) - (char *)4096)' % (
-                         named_ptr.name, fldname)
-                 else:
-                     offset = 'offsetof(%s, %s)' % (tp.get_c_name(''), fldname)
diff --git a/meta/recipes-devtools/python/python3-cffi_1.17.1.bb b/meta/recipes-devtools/python/python3-cffi_2.0.0.bb
similarity index 74%
rename from meta/recipes-devtools/python/python3-cffi_1.17.1.bb
rename to meta/recipes-devtools/python/python3-cffi_2.0.0.bb
index 5a3af03d9f..9bfc430dde 100644
--- a/meta/recipes-devtools/python/python3-cffi_1.17.1.bb
+++ b/meta/recipes-devtools/python/python3-cffi_2.0.0.bb
@@ -1,13 +1,12 @@ 
 SUMMARY = "Foreign Function Interface for Python calling C code"
 HOMEPAGE = "http://cffi.readthedocs.org/"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=5677e2fdbf7cdda61d6dd2b57df547bf"
+LICENSE = "MIT-0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c0158ab9b75875f3bb7fea081d388818"
 DEPENDS += "libffi python3-pycparser"
 
-SRC_URI[sha256sum] = "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"
+SRC_URI[sha256sum] = "44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529"
 
-SRC_URI += "file://run-ptest \
-            file://0001-Cast-offset-to-size_t-to-avoid-c-11-narrowing-warnin.patch"
+SRC_URI += "file://run-ptest"
 
 inherit pypi python_setuptools_build_meta ptest pkgconfig