diff --git a/patches/buildroot-2016.02/packages/libglib2/0004-gdbus-codegen-drop-distutils-dependency.patch b/patches/buildroot-2016.02/packages/libglib2/0004-gdbus-codegen-drop-distutils-dependency.patch new file mode 100644 index 00000000..9eda6621 --- /dev/null +++ b/patches/buildroot-2016.02/packages/libglib2/0004-gdbus-codegen-drop-distutils-dependency.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: GitHub Copilot +Date: Sun, 23 Aug 2026 10:05:00 +0000 +Subject: [PATCH] gdbus-codegen: drop distutils dependency + +Python 3.12 removed distutils from the standard library. GLib 2.46 still +imports distutils.version in gdbus-codegen, which breaks host-libglib2 on +modern Linux distributions before the rest of the toolchain can build. + +Replace the LooseVersion-based sort key with a small local parser so the +code generator keeps the same version ordering without relying on any +non-standard Python module. + +Signed-off-by: GitHub Copilot +--- + gio/gdbus-2.0/codegen/utils.py | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 9eaa7f8..f16e92c 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -17,7 +17,7 @@ + # + # Author: David Zeuthen + +-import distutils.version ++import re + + def strip_dots(s): + ret = '' +@@ -81,8 +81,27 @@ def lookup_brief_docs(annotations): + return s + + def version_cmp_key(key): ++ def version_part(part): ++ if part.isdigit(): ++ return (0, int(part)) ++ return (1, part) ++ ++ def version_key(version): ++ parts = [] ++ for part in re.split(r'([0-9]+|[._+-])', version): ++ if not part or part in '._+-': ++ continue ++ parts.append(version_part(part)) ++ return tuple(parts) ++ + # If the 'since' version is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # compare lower than any real version. ++ # ++ # Keep the comparison loose so versions like "2.74.0" and "2.74.0-1" ++ # continue to sort naturally without depending on distutils, which was ++ # removed from Python 3.12. + v = key[0] if key[0] else '0' +- return (distutils.version.LooseVersion(v), key[1]) ++ return (version_key(v), key[1]) +-- +2.43.0 + diff --git a/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch b/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch new file mode 100644 index 00000000..102b19aa --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0001-clapack-xerbla-include-stdio.patch @@ -0,0 +1,10 @@ +diff --git a/BLAS/SRC/xerbla.c b/BLAS/SRC/xerbla.c +--- a/BLAS/SRC/xerbla.c ++++ b/BLAS/SRC/xerbla.c +@@ -13,6 +13,7 @@ + #include "f2c.h" + #include "blaswrap.h" ++#include + + /* Table of constant values */ + diff --git a/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch new file mode 100644 index 00000000..507e6b3d --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0002-clapack-sgees-select-to-selectfn.patch @@ -0,0 +1,29 @@ +diff --git a/SRC/sgees.c b/SRC/sgees.c +--- a/SRC/sgees.c ++++ b/SRC/sgees.c +@@ -18,8 +18,8 @@ + static integer c__1 = 1; + static integer c__0 = 0; + static integer c_n1 = -1; + +-/* Subroutine */ int sgees_(char *jobvs, char *sort, L_fp select, integer *n, ++/* Subroutine */ int sgees_(char *jobvs, char *sort, L_fp selectfn, integer *n, + real *a, integer *lda, integer *sdim, real *wr, real *wi, real *vs, + integer *ldvs, real *work, integer *lwork, logical *bwork, integer * + info) +@@ -388,6 +388,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- bwork[i__] = (*select)(&wr[i__], &wi[i__]); ++ bwork[i__] = (*selectfn)(&wr[i__], &wi[i__]); + /* L10: */ + } + +@@ -504,6 +504,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- cursl = (*select)(&wr[i__], &wi[i__]); ++ cursl = (*selectfn)(&wr[i__], &wi[i__]); + if (wi[i__] == 0.f) { + if (cursl) { + ++(*sdim); diff --git a/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch new file mode 100644 index 00000000..eebf6da3 --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0003-clapack-sgeesx-select-to-selectfn.patch @@ -0,0 +1,30 @@ +diff --git a/SRC/sgeesx.c b/SRC/sgeesx.c +--- a/SRC/sgeesx.c ++++ b/SRC/sgeesx.c +@@ -18,9 +18,9 @@ + static integer c__1 = 1; + static integer c__0 = 0; + static integer c_n1 = -1; + +-/* Subroutine */ int sgeesx_(char *jobvs, char *sort, L_fp select, char * ++/* Subroutine */ int sgeesx_(char *jobvs, char *sort, L_fp selectfn, char * + sense, integer *n, real *a, integer *lda, integer *sdim, real *wr, + real *wi, real *vs, integer *ldvs, real *rconde, real *rcondv, real * + work, integer *lwork, integer *iwork, integer *liwork, logical *bwork, + integer *info) +@@ -458,6 +458,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- bwork[i__] = (*select)(&wr[i__], &wi[i__]); ++ bwork[i__] = (*selectfn)(&wr[i__], &wi[i__]); + /* L10: */ + } + +@@ -594,6 +594,6 @@ + i__1 = *n; + for (i__ = 1; i__ <= i__1; ++i__) { +- cursl = (*select)(&wr[i__], &wi[i__]); ++ cursl = (*selectfn)(&wr[i__], &wi[i__]); + if (wi[i__] == 0.f) { + if (cursl) { + ++(*sdim); diff --git a/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch new file mode 100644 index 00000000..ad0c1b0f --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0004-clapack-sgges-selctg-to-selctgfn.patch @@ -0,0 +1,15 @@ +diff --git a/SRC/sgges.c b/SRC/sgges.c +--- a/SRC/sgges.c ++++ b/SRC/sgges.c +@@ -18,8 +18,8 @@ + static integer c__1 = 1; + static integer c__0 = 0; + static integer c_n1 = -1; + +-/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, L_fp +- selctg, integer *n, real *a, integer *lda, real *b, integer *ldb, ++/* Subroutine */ int sgges_(char *jobvsl, char *jobvsr, char *sort, logical ++ (*selctg)(real *, real *, real *), integer *n, real *a, integer *lda, real *b, integer *ldb, + integer *sdim, real *alphar, real *alphai, real *beta, real *vsl, + integer *ldvsl, real *vsr, integer *ldvsr, real *work, integer *lwork, + logical *bwork, integer *info) diff --git a/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch b/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch new file mode 100644 index 00000000..1c625b40 --- /dev/null +++ b/patches/buildroot-2023.11.3/packages/clapack/0005-clapack-sggesx-selctg-to-selctgfn.patch @@ -0,0 +1,15 @@ +diff --git a/SRC/sggesx.c b/SRC/sggesx.c +--- a/SRC/sggesx.c ++++ b/SRC/sggesx.c +@@ -18,8 +18,8 @@ + static integer c__1 = 1; + static integer c__0 = 0; + static integer c_n1 = -1; + +-/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, L_fp +- selctg, char *sense, integer *n, real *a, integer *lda, real *b, ++/* Subroutine */ int sggesx_(char *jobvsl, char *jobvsr, char *sort, logical ++ (*selctg)(real *, real *, real *), char *sense, integer *n, real *a, integer *lda, real *b, + integer *ldb, integer *sdim, real *alphar, real *alphai, real *beta, + real *vsl, integer *ldvsl, real *vsr, integer *ldvsr, real *rconde, + real *rcondv, real *work, integer *lwork, integer *iwork, integer *