diff mbox series

[meta-python,1/3] python3-inflate64: Upgrade 1.0.0 -> 1.0.1

Message ID 20250106152319.728893-1-leon.anavi@konsulko.com
State Accepted
Headers show
Series [meta-python,1/3] python3-inflate64: Upgrade 1.0.0 -> 1.0.1 | expand

Commit Message

Leon Anavi Jan. 6, 2025, 3:23 p.m. UTC
Upgrade to release 1.0.1:

* Change deflate_tree: base_length[] and length_code[] not to be
  const to avoid C2166 error on windows
* Drop support for python 3.8 and add support for python 3.13

Patch 0001-Do-not-override-const-qualifier.patch has been merged
in the upstream therefore the file is no longer needed.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 ...0001-Do-not-override-const-qualifier.patch | 83 -------------------
 ...64_1.0.0.bb => python3-inflate64_1.0.1.bb} |  3 +-
 2 files changed, 1 insertion(+), 85 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch
 rename meta-python/recipes-devtools/python/{python3-inflate64_1.0.0.bb => python3-inflate64_1.0.1.bb} (72%)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch b/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch
deleted file mode 100644
index 5391a11da0..0000000000
--- a/meta-python/recipes-devtools/python/python3-inflate64/0001-Do-not-override-const-qualifier.patch
+++ /dev/null
@@ -1,83 +0,0 @@ 
-From 7e3a795cbeea94b3324aa926f2b11904cb169acc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Jul 2024 22:02:38 -0700
-Subject: [PATCH] Do not override 'const' qualifier
-
-This has worked so far but with fortified system headers from
-Glibc 2.40+ and clang compiler it ends up in compile errors
-
-| In file included from /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/string.h:548:
-| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:77:66: error: pass_object_size attribute only applies to constant pointer arguments
-|    77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
-|       |                                                                  ^
-| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:86:66: error: pass_object_size attribute only applies to constant pointer arguments
-|    86 | __NTH (stpcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
-|       |                                                                  ^
-| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:96:67: error: pass_object_size attribute only applies to constant pointer arguments
-|    96 | __NTH (strncpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
-|       |                                                                   ^
-| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:107:56: error: pass_object_size attribute only applies to constant pointer arguments
-|   107 | __NTH (stpncpy (__fortify_clang_overload_arg (char *, ,__dest),
-|       |                                                        ^
-| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:136:66: error: pass_object_size attribute only applies to constant pointer arguments
-|   136 | __NTH (strcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
-|       |                                                                  ^
-| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:145:67: error: pass_object_size attribute only applies to constant pointer arguments
-|   145 | __NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest),
-|       |                                                                   ^
-| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/python3-inflate64/1.0.0/recipe-sysroot/usr/include/bits/string_fortified.h:161:67: error: pass_object_size attribute only applies to constant pointer arguments
-|   161 | __NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
-
-Therefore adjust needed places to use const qualifier
-
-Upstream-Status: Submitted [https://codeberg.org/miurahr/inflate64/pulls/13]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/lib/deflate.h          | 2 +-
- src/lib/deflate_tree.c     | 4 ++--
- src/lib/inflate64_config.h | 3 ---
- 3 files changed, 3 insertions(+), 6 deletions(-)
-
-diff --git a/src/lib/deflate.h b/src/lib/deflate.h
-index 72a324f..c780be9 100644
---- a/src/lib/deflate.h
-+++ b/src/lib/deflate.h
-@@ -288,6 +288,6 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, char FAR *buf,
-   extern const unsigned char ZLIB_INTERNAL _dist_code[];
- #endif
- #endif
--extern uch ZLIB_INTERNAL length_code[];
-+extern const uch ZLIB_INTERNAL length_code[];
- 
- #endif /* DEFLATE_H */
-diff --git a/src/lib/deflate_tree.c b/src/lib/deflate_tree.c
-index 5a66139..cdee934 100644
---- a/src/lib/deflate_tree.c
-+++ b/src/lib/deflate_tree.c
-@@ -78,10 +78,10 @@ local const uch bl_order[BL_CODES]
- 
- #define DIST_CODE_LEN  768 /* see definition of array dist_code below */
- 
--local int base_length[LENGTH_CODES];
-+local const int base_length[LENGTH_CODES];
- /* First normalized length for each code (0 = MIN_MATCH) */
- 
--uch length_code[BASE_MATCH-MIN_MATCH+1];
-+const uch length_code[BASE_MATCH-MIN_MATCH+1];
- /* length code for each normalized match length (0 == MIN_MATCH) */
- 
- #if defined(GEN_TREES_H) || !defined(STDC)
-diff --git a/src/lib/inflate64_config.h b/src/lib/inflate64_config.h
-index 16cfd12..ade7300 100644
---- a/src/lib/inflate64_config.h
-+++ b/src/lib/inflate64_config.h
-@@ -53,9 +53,6 @@
- #  define FAR
- #endif
- 
--#ifndef const
--#  define const
--#endif
- #define z_const const
- 
- typedef unsigned char  uch;
diff --git a/meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb b/meta-python/recipes-devtools/python/python3-inflate64_1.0.1.bb
similarity index 72%
rename from meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb
rename to meta-python/recipes-devtools/python/python3-inflate64_1.0.1.bb
index 7804152d94..841c9239a5 100644
--- a/meta-python/recipes-devtools/python/python3-inflate64_1.0.0.bb
+++ b/meta-python/recipes-devtools/python/python3-inflate64_1.0.1.bb
@@ -6,8 +6,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
 inherit python_setuptools_build_meta pypi
 
-SRC_URI += "file://0001-Do-not-override-const-qualifier.patch"
-SRC_URI[sha256sum] = "3278827b803cf006a1df251f3e13374c7d26db779e5a33329cc11789b804bc2d"
+SRC_URI[sha256sum] = "3b1c83c22651b5942b35829df526e89602e494192bf021e0d7d0b600e76c429d"
 
 DEPENDS += "python3-setuptools-scm-native"