diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/pyopencl/files | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pyopencl/files')
| -rw-r--r-- | dev-python/pyopencl/files/pyopencl-2025.1-nanobind-flags.patch | 21 | ||||
| -rw-r--r-- | dev-python/pyopencl/files/pyopencl-2025.1-numpy-build.patch | 50 |
2 files changed, 71 insertions, 0 deletions
diff --git a/dev-python/pyopencl/files/pyopencl-2025.1-nanobind-flags.patch b/dev-python/pyopencl/files/pyopencl-2025.1-nanobind-flags.patch new file mode 100644 index 000000000000..6f7c7cff1462 --- /dev/null +++ b/dev-python/pyopencl/files/pyopencl-2025.1-nanobind-flags.patch @@ -0,0 +1,21 @@ +nanobind defaults to adding -Os and friends: https://github.com/wjakob/nanobind/blob/b0136fe6ac1967cb2399456adc346a1af06a3b88/docs/api_cmake.rst#L80. + +... and LTO should be user defined via cflags. + +--- a/CMakeLists.txt +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4557bd8a..0f4a731c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -167,8 +167,9 @@ find_package(OpenCL REQUIRED) + nanobind_add_module( + _cl + NB_STATIC # Build static libnanobind (the extension module itself remains a shared library) +- LTO ++ PROTECT_STACK + NOMINSIZE ++ NOSTRIP + src/wrap_constants.cpp + src/wrap_cl.cpp + src/wrap_cl_part_1.cpp + diff --git a/dev-python/pyopencl/files/pyopencl-2025.1-numpy-build.patch b/dev-python/pyopencl/files/pyopencl-2025.1-numpy-build.patch new file mode 100644 index 000000000000..1d912ba4b7dc --- /dev/null +++ b/dev-python/pyopencl/files/pyopencl-2025.1-numpy-build.patch @@ -0,0 +1,50 @@ +https://bugs.gentoo.org/957615 +https://github.com/inducer/pyopencl/commit/a56381055c6b4a75d69f62be82a4b72ee6d1d7ab + +From a56381055c6b4a75d69f62be82a4b72ee6d1d7ab Mon Sep 17 00:00:00 2001 +From: Thomas A Caswell <tcaswell@bnl.gov> +Date: Wed, 12 Feb 2025 16:52:52 -0500 +Subject: [PATCH] MNT: stop using deprecated numpy macros + +These were deprecated in np1.7 and will be removed in np2.3 (currently removed +on numpy main branch). + +xref https://github.com/numpy/numpy/pull/28254/ +--- + src/wrap_cl.hpp | 4 ++-- + src/wrap_helpers.hpp | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp +index 5b225d3cd..d61f3d546 100644 +--- a/src/wrap_cl.hpp ++++ b/src/wrap_cl.hpp +@@ -5893,9 +5893,9 @@ namespace pyopencl + + int ary_flags = 0; + if (order == NPY_FORTRANORDER) +- ary_flags |= NPY_FARRAY; ++ ary_flags |= NPY_ARRAY_FARRAY; + else if (order == NPY_CORDER) +- ary_flags |= NPY_CARRAY; ++ ary_flags |= NPY_ARRAY_CARRAY; + else + throw std::runtime_error("unrecognized order specifier"); + +diff --git a/src/wrap_helpers.hpp b/src/wrap_helpers.hpp +index 367749535..041065930 100644 +--- a/src/wrap_helpers.hpp ++++ b/src/wrap_helpers.hpp +@@ -142,9 +142,9 @@ namespace py = nanobind; + \ + int ary_flags = 0; \ + if (order == NPY_FORTRANORDER) \ +- ary_flags |= NPY_FARRAY; \ ++ ary_flags |= NPY_ARRAY_FARRAY; \ + else if (order == NPY_CORDER) \ +- ary_flags |= NPY_CARRAY; \ ++ ary_flags |= NPY_ARRAY_CARRAY; \ + else \ + throw std::runtime_error("unrecognized order specifier"); \ + \ + |
