diff --git a/mingw-w64-OpenSceneGraph/0008-opencascade-7.6.0.patch b/mingw-w64-OpenSceneGraph/0008-opencascade-7.6.0.patch new file mode 100644 index 0000000000..68c97fc454 --- /dev/null +++ b/mingw-w64-OpenSceneGraph/0008-opencascade-7.6.0.patch @@ -0,0 +1,23 @@ +diff -urN OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp.orig OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp +--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp.orig 2020-01-31 12:03:07.000000000 +0100 ++++ OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp 2022-06-15 18:01:51.140786000 +0200 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -211,7 +212,11 @@ + { + // populate vertex list + // Ref: http://www.opencascade.org/org/forum/thread_16694/?forum=3 ++#if OCC_VERSION_HEX < 0x070600 + gp_Pnt pt = (triangulation->Nodes())(j).Transformed(transformation * location.Transformation()); ++#else ++ gp_Pnt pt = triangulation->Node(j).Transformed(transformation * location.Transformation()); ++#endif + vertexList->push_back(osg::Vec3(pt.X(), pt.Y(), pt.Z())); + + // populate color list diff --git a/mingw-w64-OpenSceneGraph/PKGBUILD b/mingw-w64-OpenSceneGraph/PKGBUILD index d0838ba7ea..dfcad1cc6f 100644 --- a/mingw-w64-OpenSceneGraph/PKGBUILD +++ b/mingw-w64-OpenSceneGraph/PKGBUILD @@ -5,13 +5,14 @@ pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug") _pkgver=3.6.5 pkgver=${_pkgver//-/} -pkgrel=10 +pkgrel=11 arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') url="http://www.openscenegraph.org/" -license=("LGPL") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-cc" +license=("spdx:LGPL-2.1-only WITH WxWindows-exception-3.1") +makedepends=("${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-cyrus-sasl") depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-collada-dom-svn" @@ -32,6 +33,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-libvncserver" "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-lua" + "${MINGW_PACKAGE_PREFIX}-opencascade" "${MINGW_PACKAGE_PREFIX}-SDL" "${MINGW_PACKAGE_PREFIX}-SDL2" "${MINGW_PACKAGE_PREFIX}-poppler" @@ -45,8 +47,12 @@ source=(https://github.com/openscenegraph/OpenSceneGraph/archive/${_realname}-${ additional-gl-header.patch add-gstreamer-cflags.patch las-link-with-boost.patch + # https://github.com/openscenegraph/OpenSceneGraph/pull/1055 backport-1055.patch - backport-977.patch) + # https://github.com/openscenegraph/OpenSceneGraph/pull/977 + backport-977.patch + # https://github.com/openscenegraph/OpenSceneGraph/pull/1144 + 0008-opencascade-7.6.0.patch) sha256sums=('aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12' '24f64f975e776fc018f9c65a1bcae043dded1d4174342d863f9f205b013acc13' '3c7469cf0741905f2c46e4632159220213532d8f194b711b0600b50ad94ab4f8' @@ -54,20 +60,29 @@ sha256sums=('aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12' 'feb994964fe636e4591394a4c287d27d54cf61c8e5fc5324aebb161cafe2e3dc' '54457dcee1cdd1c486607640e4e0272e619f445291ec4edd04dda99e3c4eb4f7' '108bc2ab77959b007dbe5a28be4d06bce364959c89d142a02870f6de466af9bb' - 'a70765ce5e4493e9047b33ab89f322a5d6145649d700e5f6a89e84db7880ecb7') + 'a70765ce5e4493e9047b33ab89f322a5d6145649d700e5f6a89e84db7880ecb7' + '0413b3244e91ca7664bd6d6c2a646fae6adb126b181d484eea41a4b7346d1078') + +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying $_patch" + patch -Np1 -i "${srcdir}/$_patch" + done +} prepare() { cd "${srcdir}/${_realname}-${_realname}-${_pkgver}" - patch -p1 -i ${srcdir}/find-collada.patch - patch -p1 -i ${srcdir}/find-freetype.patch - patch -p1 -i ${srcdir}/additional-gl-header.patch - patch -p1 -i ${srcdir}/add-gstreamer-cflags.patch - patch -p1 -i ${srcdir}/las-link-with-boost.patch - # https://github.com/openscenegraph/OpenSceneGraph/pull/1055 - patch -p1 -i ${srcdir}/backport-1055.patch - # https://github.com/openscenegraph/OpenSceneGraph/pull/977 - patch -p1 -i ${srcdir}/backport-977.patch + apply_patch_with_msg \ + find-collada.patch \ + find-freetype.patch \ + additional-gl-header.patch \ + add-gstreamer-cflags.patch \ + las-link-with-boost.patch \ + backport-1055.patch \ + backport-977.patch \ + 0008-opencascade-7.6.0.patch } build() { @@ -86,15 +101,15 @@ build() { msg "Building ${builddir%-${MSYSTEM}} version..." MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - COLLADA_DIR=${MINGW_PREFIX} \ - ${MINGW_PREFIX}/bin/cmake.exe \ - -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + COLLADA_DIR="${MINGW_PREFIX}" \ + "${MINGW_PREFIX}"/bin/cmake.exe \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ -DCMAKE_BUILD_TYPE=${builddir%-${MSYSTEM}} \ ${_opts} \ ../${_realname}-${_realname}-${_pkgver} - cmake --build . + "${MINGW_PREFIX}"/bin/cmake.exe --build . popd done } @@ -103,9 +118,9 @@ package_OpenSceneGraph() { pkgdesc="Open source high performance 3D graphics toolkit (mingw-w64)" cd Release-${MSYSTEM} - DESTDIR=${pkgdir} cmake --install . + DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . - install -Dm644 ${srcdir}/${_realname}-${_realname}-${_pkgver}/LICENSE.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE + install -Dm644 "${srcdir}"/${_realname}-${_realname}-${_pkgver}/LICENSE.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE } package_OpenSceneGraph-debug() { @@ -114,13 +129,13 @@ package_OpenSceneGraph-debug() { pkgdesc="Open source high performance 3D graphics toolkit (debug) (mingw-w64)" cd Debug-${MSYSTEM} - DESTDIR=${pkgdir} cmake --install . + DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . - rm -rf ${pkgdir}${MINGW_PREFIX}/include - rm -rf ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig - rm -rf ${pkgdir}${MINGW_PREFIX}/share + rm -rf "${pkgdir}${MINGW_PREFIX}"/include + rm -rf "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig + rm -rf "${pkgdir}${MINGW_PREFIX}"/share - install -Dm644 ${srcdir}/${_realname}-${_realname}-${_pkgver}/LICENSE.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}-debug/LICENSE + install -Dm644 "${srcdir}"/${_realname}-${_realname}-${_pkgver}/LICENSE.txt "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}-debug/LICENSE } # template start; name=mingw-w64-splitpkg-wrappers; version=1.0; diff --git a/mingw-w64-OpenSceneGraph/fix-3ds-plugin.patch b/mingw-w64-OpenSceneGraph/fix-3ds-plugin.patch deleted file mode 100644 index f509cc7836..0000000000 --- a/mingw-w64-OpenSceneGraph/fix-3ds-plugin.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- OpenSceneGraph-OpenSceneGraph-3.5.5/src/osgPlugins/3ds/ReaderWriter3DS.cpp 2017-02-24 13:09:52.785969600 +0100 -+++ OpenSceneGraph-OpenSceneGraph-3.5.5/src/osgPlugins/3ds/ReaderWriter3DS.cpp.orig 2017-02-24 13:01:55.130353400 +0100 -@@ -619,7 +619,7 @@ - { - // add our geometry to group (where our children already are) - // creates geometry under modifier node -- processMesh(drawStateMap,group,mesh,meshAppliedMatPtr); -+ processMesh(drawStateMap,meshTransform,mesh,meshAppliedMatPtr); - return group; - } - else diff --git a/mingw-w64-armadillo/PKGBUILD b/mingw-w64-armadillo/PKGBUILD index 4a9d5c71ff..1e9cda5841 100644 --- a/mingw-w64-armadillo/PKGBUILD +++ b/mingw-w64-armadillo/PKGBUILD @@ -3,7 +3,7 @@ _realname=armadillo pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=11.1.1 +pkgver=11.2.0 pkgrel=1 pkgdesc="C++ linear algebra library (mingw-w64)" arch=('any') @@ -23,7 +23,7 @@ install=${_realname}-${MSYSTEM}.install source=(https://sourceforge.net/projects/arma/files/${_realname}-${pkgver}.tar.xz 0001-mingw-config-fix.patch 0002-fix-pkgconfig-file.patch) -sha256sums=('bfa6154a5fefd832d28d530a58221fe4a2cff2a3bbdbd82e109bde53fb29dcdb' +sha256sums=('df5ca215901c68c63467c0bfee14f08e34d875a47ab0f095082ab32ddff4f243' '772719e60eb2970ecb37844382dbcb6d0439f949c5080f9865798115640b612a' '830adb017e12c0e90671471dc6870a28ee21755a55e95280a04f73c2d65d665b') @@ -49,22 +49,28 @@ build() { mkdir -p ${srcdir}/build-${MSYSTEM} && cd ${srcdir}/build-${MSYSTEM} MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - cmake \ + "${MINGW_PREFIX}"/bin/cmake.exe \ -G"Ninja" \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ -DCMAKE_BUILD_TYPE=Release \ -DOPENBLAS_PROVIDES_LAPACK=ON \ ../${_realname}-${pkgver} - cmake --build . + "${MINGW_PREFIX}"/bin/cmake.exe --build . +} + +check() { + cd "${srcdir}/build-${MSYSTEM}" + + "${MINGW_PREFIX}"/bin/ctest.exe . } package() { cd "${srcdir}/build-${MSYSTEM}" - DESTDIR=${pkgdir} cmake --install . + DESTDIR=${pkgdir} "${MINGW_PREFIX}"/bin/cmake.exe --install . - install -d ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname} + install -d "${pkgdir}${MINGW_PREFIX}"/share/doc/${_realname} install -m644 "${srcdir}/${_realname}-${pkgver}/"*{.html,.png,.pdf,README.md} \ "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/" diff --git a/mingw-w64-avr-binutils/01-avr-size.patch b/mingw-w64-avr-binutils/01-avr-size.patch index ae78228b0a..30f977924e 100644 --- a/mingw-w64-avr-binutils/01-avr-size.patch +++ b/mingw-w64-avr-binutils/01-avr-size.patch @@ -1,8 +1,6 @@ -diff --git a/binutils/size.c b/binutils/size.c -index 3697087714..f99d45a6bf 100644 --- a/binutils/size.c +++ b/binutils/size.c -@@ -51,7 +51,8 @@ enum output_format +@@ -51,7 +51,8 @@ { FORMAT_BERKLEY, FORMAT_SYSV, @@ -12,7 +10,7 @@ index 3697087714..f99d45a6bf 100644 }; static enum output_format selected_output_format = #if BSD_DEFAULT -@@ -74,6 +75,246 @@ static bfd_size_type total_textsize; +@@ -74,6 +75,246 @@ /* Program exit status. */ static int return_code = 0; @@ -259,7 +257,7 @@ index 3697087714..f99d45a6bf 100644 static char *target = NULL; /* Forward declarations. */ -@@ -89,7 +330,8 @@ usage (FILE *stream, int status) +@@ -89,7 +330,8 @@ fprintf (stream, _(" Displays the sizes of sections inside binary files\n")); fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n")); fprintf (stream, _(" The options are:\n\ @@ -269,7 +267,7 @@ index 3697087714..f99d45a6bf 100644 -o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex\n\ -t --totals Display the total sizes (Berkeley only)\n\ --common Display total size for *COM* syms\n\ -@@ -113,6 +355,7 @@ usage (FILE *stream, int status) +@@ -113,6 +355,7 @@ #define OPTION_FORMAT (200) #define OPTION_RADIX (OPTION_FORMAT + 1) #define OPTION_TARGET (OPTION_RADIX + 1) @@ -277,7 +275,7 @@ index 3697087714..f99d45a6bf 100644 static struct option long_options[] = { -@@ -120,6 +363,7 @@ static struct option long_options[] = +@@ -120,6 +363,7 @@ {"format", required_argument, 0, OPTION_FORMAT}, {"radix", required_argument, 0, OPTION_RADIX}, {"target", required_argument, 0, OPTION_TARGET}, @@ -285,7 +283,7 @@ index 3697087714..f99d45a6bf 100644 {"totals", no_argument, &show_totals, 1}, {"version", no_argument, &show_version, 1}, {"help", no_argument, &show_help, 1}, -@@ -153,7 +397,7 @@ main (int argc, char **argv) +@@ -151,7 +395,7 @@ fatal (_("fatal error: libbfd ABI mismatch")); set_default_bfd_target (); @@ -294,7 +292,7 @@ index 3697087714..f99d45a6bf 100644 (int *) 0)) != EOF) switch (c) { -@@ -172,12 +416,20 @@ main (int argc, char **argv) +@@ -170,10 +414,18 @@ case 'g': selected_output_format = FORMAT_GNU; break; @@ -306,16 +304,14 @@ index 3697087714..f99d45a6bf 100644 non_fatal (_("invalid argument to --format: %s"), optarg); usage (stderr, 1); } - break; - -+ case OPTION_MCU: -+ avrmcu = optarg; + break; + - case OPTION_TARGET: - target = optarg; ++ case OPTION_MCU: ++ avrmcu = optarg; break; -@@ -214,6 +466,9 @@ main (int argc, char **argv) + + case OPTION_TARGET: +@@ -212,6 +464,9 @@ case 'G': selected_output_format = FORMAT_GNU; break; @@ -325,7 +321,7 @@ index 3697087714..f99d45a6bf 100644 case 'v': case 'V': show_version = 1; -@@ -656,6 +911,98 @@ print_sysv_format (bfd *file) +@@ -654,6 +909,98 @@ printf ("\n\n"); } @@ -424,7 +420,7 @@ index 3697087714..f99d45a6bf 100644 static void print_sizes (bfd *file) { -@@ -663,6 +1010,8 @@ print_sizes (bfd *file) +@@ -661,6 +1008,8 @@ calculate_common_size (file); if (selected_output_format == FORMAT_SYSV) print_sysv_format (file); diff --git a/mingw-w64-avr-binutils/PKGBUILD b/mingw-w64-avr-binutils/PKGBUILD index 450445c7de..869caaef9b 100644 --- a/mingw-w64-avr-binutils/PKGBUILD +++ b/mingw-w64-avr-binutils/PKGBUILD @@ -5,8 +5,8 @@ _target=avr pkgbase=mingw-w64-${_target}-${_realname} pkgname=${MINGW_PACKAGE_PREFIX}-${_target}-${_realname} -pkgver=2.35 -pkgrel=3 +pkgver=2.38 +pkgrel=1 pkgdesc='GNU Binutils for the AVR target (mingw-w64)' arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') @@ -16,9 +16,9 @@ groups=("${MINGW_PACKAGE_PREFIX}-${_target}-toolchain") makedepends=("${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc") source=(https://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.xz{,.sig} "01-avr-size.patch") -sha256sums=('1b11659fb49e20e18db460d44485f09442c8c56d5df165de9461eb09c8302f85' +sha256sums=('e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024' 'SKIP' - '7aed303887a8541feba008943d0331dc95dd90a309575f81b7a195650e4cba1e') + '50b3b7adb33c75697d0d229922ed1963e2589468d021ec797827fbfd70cf931e') validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') prepare() { diff --git a/mingw-w64-binaryen/PKGBUILD b/mingw-w64-binaryen/PKGBUILD index 18fd333719..42494eaa81 100644 --- a/mingw-w64-binaryen/PKGBUILD +++ b/mingw-w64-binaryen/PKGBUILD @@ -4,7 +4,7 @@ _realname=binaryen pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=108 +pkgver=109 pkgrel=1 pkgdesc="Compiler infrastructure and toolchain library for WebAssembly, in C++ (mingw-w64)" arch=('any') @@ -16,7 +16,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-ninja") source=("${_realname}-${pkgver}.tar.gz::https://github.com/WebAssembly/binaryen/archive/version_${pkgver}.tar.gz") -sha256sums=('7fea5013da7f98daeeb6a0a60333e8aa917bcb0b1b418ba8531fe710d09041f2') +sha256sums=('e250310db0ac480cc121c72757816346c946f6c33c788b369a742b690089856a') build() { [[ -d "${srcdir}/build-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-${MSYSTEM}" diff --git a/mingw-w64-blender/PKGBUILD b/mingw-w64-blender/PKGBUILD index e61bc2c84d..f2f63afd5d 100644 --- a/mingw-w64-blender/PKGBUILD +++ b/mingw-w64-blender/PKGBUILD @@ -12,7 +12,7 @@ _realname=blender pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.92.0 -pkgrel=4 +pkgrel=5 pkgdesc="A fully integrated 3D graphics creation suite (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64') @@ -85,7 +85,10 @@ source=(https://download.blender.org/source/${_realname}-${pkgver}.tar.xz 0023-link-errors.patch 0025-callback-function-prototype-fix.patch 0026-embree-shared.patch - 0027-broken-32bit-support.patch) + 0027-broken-32bit-support.patch + https://github.com/blender/blender/commit/e5100ca3ad17b1b9a40ffd8a8edccb6cb553e558.patch + https://github.com/blender/blender/commit/6fe00939b0a471cc149ea5b3c63ca57b049b4a37.patch + dae445d94a7a5e1ad38719ea05e5bb0bc76ede84.patch) sha256sums=('e791cfc403292383577c3c8ce2cd34e5aa2cd8da0a7483041049a1609ddb4595' '9cc285a90050e51af66320357976b99ba7bc4ff918173d6d744869f78859813a' '80bb43c71b8dcaa92c1fd8e611f311c8281382435882382db11b1b93267f5200' @@ -106,7 +109,10 @@ sha256sums=('e791cfc403292383577c3c8ce2cd34e5aa2cd8da0a7483041049a1609ddb4595' 'db5999ba865a40b401244a0b540a8a76d377530152e19e59630891af6ec80534' '61c0873f9c661f80eb189b7391a4c4c1eef2f7db4178177ce7ff7c47342384ae' '86814ae1e91100b903fb65ceb61d67766ff6386e55ae892aa72278a6dd20f86a' - '55b6d79dbbfd1ac182c26b868c16867e42729a5537da29f3527e9017b19b41f6') + '55b6d79dbbfd1ac182c26b868c16867e42729a5537da29f3527e9017b19b41f6' + 'ba7f6c1bfcf9c767225836f7874ea8d02675bd720a46946baf7e4c7a9459c72f' + '6fdd125c1d1f1bef4205d85f5cc02a8fa72e943268d7999f75f703093e15b723' + '51a4521c086680131100497b60b0bda029c69022602a74ad9bd3eab0ec40b35c') apply_patch_with_msg() { for _patch in "$@" @@ -141,7 +147,13 @@ prepare() { 0023-link-errors.patch \ 0025-callback-function-prototype-fix.patch \ 0026-embree-shared.patch \ - 0027-broken-32bit-support.patch + 0027-broken-32bit-support.patch \ + e5100ca3ad17b1b9a40ffd8a8edccb6cb553e558.patch \ + 6fe00939b0a471cc149ea5b3c63ca57b049b4a37.patch + + # adjusted one context so it applies + apply_patch_with_msg \ + dae445d94a7a5e1ad38719ea05e5bb0bc76ede84.patch } build() { diff --git a/mingw-w64-blender/dae445d94a7a5e1ad38719ea05e5bb0bc76ede84.patch b/mingw-w64-blender/dae445d94a7a5e1ad38719ea05e5bb0bc76ede84.patch new file mode 100644 index 0000000000..5e7b3d43e8 --- /dev/null +++ b/mingw-w64-blender/dae445d94a7a5e1ad38719ea05e5bb0bc76ede84.patch @@ -0,0 +1,956 @@ +From dae445d94a7a5e1ad38719ea05e5bb0bc76ede84 Mon Sep 17 00:00:00 2001 +From: Campbell Barton +Date: Sat, 13 Feb 2021 22:57:01 +1100 +Subject: [PATCH] Fix T85573: Building with Python 3.10a5 fails + +Replace deprecated _PyUnicode_AsString{AndSize} usage. + +T83626 still needs to be resolved before 3.10 is usable. +--- + intern/cycles/blender/blender_python.cpp | 2 +- + .../freestyle/intern/python/BPy_SShape.cpp | 2 +- + source/blender/python/bmesh/bmesh_py_ops.c | 2 +- + .../blender/python/bmesh/bmesh_py_ops_call.c | 4 +- + .../python/bmesh/bmesh_py_types_customdata.c | 4 +- + source/blender/python/generic/idprop_py_api.c | 16 ++--- + source/blender/python/generic/imbuf_py_api.c | 2 +- + source/blender/python/generic/py_capi_utils.c | 22 +++--- + source/blender/python/gpu/gpu_py_api.c | 2 +- + .../blender/python/gpu/gpu_py_vertex_format.c | 4 +- + source/blender/python/intern/bpy.c | 4 +- + .../python/intern/bpy_app_translations.c | 8 +-- + source/blender/python/intern/bpy_capi_utils.c | 6 +- + source/blender/python/intern/bpy_driver.c | 4 +- + source/blender/python/intern/bpy_interface.c | 6 +- + .../blender/python/intern/bpy_library_load.c | 2 +- + source/blender/python/intern/bpy_msgbus.c | 2 +- + source/blender/python/intern/bpy_operator.c | 2 +- + .../blender/python/intern/bpy_operator_wrap.c | 2 +- + source/blender/python/intern/bpy_props.c | 17 +++-- + source/blender/python/intern/bpy_rna.c | 70 +++++++++---------- + source/blender/python/intern/bpy_traceback.c | 2 +- + .../python/mathutils/mathutils_Euler.c | 2 +- + .../python/mathutils/mathutils_Matrix.c | 4 +- + .../python/mathutils/mathutils_Quaternion.c | 2 +- + 25 files changed, 96 insertions(+), 97 deletions(-) + +diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp +index 5646bd5b2eb0..0daad310543d 100644 +--- a/intern/cycles/blender/blender_python.cpp ++++ b/intern/cycles/blender/blender_python.cpp +@@ -147,7 +147,7 @@ void python_thread_state_restore(void **python_thread_state) + + static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce) + { +- const char *result = _PyUnicode_AsString(py_str); ++ const char *result = PyUnicode_AsUTF8(py_str); + if (result) { + /* 99% of the time this is enough but we better support non unicode + * chars since blender doesn't limit this. +diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp +index f43a464d99ed..0ea02d8a3f60 100644 +--- a/source/blender/freestyle/intern/python/BPy_SShape.cpp ++++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp +@@ -201,7 +201,7 @@ static int SShape_name_set(BPy_SShape *self, PyObject *value, void *UNUSED(closu + PyErr_SetString(PyExc_TypeError, "value must be a string"); + return -1; + } +- const char *name = _PyUnicode_AsString(value); ++ const char *name = PyUnicode_AsUTF8(value); + self->ss->setName(name); + return 0; + } +diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c +index c5d72a00ce3b..b23891ca1fe6 100644 +--- a/source/blender/python/bmesh/bmesh_py_ops.c ++++ b/source/blender/python/bmesh/bmesh_py_ops.c +@@ -245,7 +245,7 @@ static PyTypeObject bmesh_op_Type = { + + static PyObject *bpy_bmesh_ops_module_getattro(PyObject *UNUSED(self), PyObject *pyname) + { +- const char *opname = _PyUnicode_AsString(pyname); ++ const char *opname = PyUnicode_AsUTF8(pyname); + + if (BMO_opcode_from_opname(opname) != -1) { + return bpy_bmesh_op_CreatePyObject(opname); +diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c +index d0676ec19471..28daf08507d6 100644 +--- a/source/blender/python/bmesh/bmesh_py_ops_call.c ++++ b/source/blender/python/bmesh/bmesh_py_ops_call.c +@@ -184,7 +184,7 @@ static int bpy_slot_from_py(BMesh *bm, + if (slot->slot_subtype.intg == BMO_OP_SLOT_SUBTYPE_INT_ENUM) { + int enum_val = -1; + PyC_FlagSet *items = (PyC_FlagSet *)slot->data.enum_data.flags; +- const char *enum_str = _PyUnicode_AsString(value); ++ const char *enum_str = PyUnicode_AsUTF8(value); + + if (enum_str == NULL) { + PyErr_Format(PyExc_TypeError, +@@ -787,7 +787,7 @@ PyObject *BPy_BMO_call(BPy_BMeshOpFunc *self, PyObject *args, PyObject *kw) + PyObject *key, *value; + Py_ssize_t pos = 0; + while (PyDict_Next(kw, &pos, &key, &value)) { +- const char *slot_name = _PyUnicode_AsString(key); ++ const char *slot_name = PyUnicode_AsUTF8(key); + BMOpSlot *slot; + + if (!BMO_slot_exists(bmop.slots_in, slot_name)) { +diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c +index 96c36f2d7884..471a311c4114 100644 +--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c ++++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c +@@ -804,7 +804,7 @@ static PyObject *bpy_bmlayercollection_subscript(BPy_BMLayerCollection *self, Py + { + /* don't need error check here */ + if (PyUnicode_Check(key)) { +- return bpy_bmlayercollection_subscript_str(self, _PyUnicode_AsString(key)); ++ return bpy_bmlayercollection_subscript_str(self, PyUnicode_AsUTF8(key)); + } + if (PyIndex_Check(key)) { + const Py_ssize_t i = PyNumber_AsSsize_t(key, PyExc_IndexError); +@@ -862,7 +862,7 @@ static PyObject *bpy_bmlayercollection_subscript(BPy_BMLayerCollection *self, Py + + static int bpy_bmlayercollection_contains(BPy_BMLayerCollection *self, PyObject *value) + { +- const char *keyname = _PyUnicode_AsString(value); ++ const char *keyname = PyUnicode_AsUTF8(value); + CustomData *data; + int index; + +diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c +index 6be7348a2f8a..c329ea7965c3 100644 +--- a/source/blender/python/generic/idprop_py_api.c ++++ b/source/blender/python/generic/idprop_py_api.c +@@ -189,13 +189,13 @@ static int BPy_IDGroup_SetData(BPy_IDProperty *self, IDProperty *prop, PyObject + st = (char *)PyC_UnicodeAsByte(value, &value_coerce); + alloc_len = strlen(st) + 1; + +- st = _PyUnicode_AsString(value); ++ st = PyUnicode_AsUTF8(value); + IDP_ResizeArray(prop, alloc_len); + memcpy(IDP_Array(prop), st, alloc_len); + Py_XDECREF(value_coerce); + } + # else +- st = _PyUnicode_AsString(value); ++ st = PyUnicode_AsUTF8(value); + IDP_ResizeArray(prop, strlen(st) + 1); + strcpy(IDP_Array(prop), st); + # endif +@@ -253,7 +253,7 @@ static int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *UNUS + return -1; + } + +- name = _PyUnicode_AsStringAndSize(value, &name_size); ++ name = PyUnicode_AsUTF8AndSize(value, &name_size); + + if (name_size >= MAX_IDPROP_NAME) { + PyErr_SetString(PyExc_TypeError, "string length cannot exceed 63 characters!"); +@@ -300,7 +300,7 @@ static PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item) + return NULL; + } + +- name = _PyUnicode_AsString(item); ++ name = PyUnicode_AsUTF8(item); + + if (name == NULL) { + PyErr_SetString(PyExc_TypeError, "only strings are allowed as keys of ID properties"); +@@ -358,7 +358,7 @@ static const char *idp_try_read_name(PyObject *name_obj) + const char *name = NULL; + if (name_obj) { + Py_ssize_t name_size; +- name = _PyUnicode_AsStringAndSize(name_obj, &name_size); ++ name = PyUnicode_AsUTF8AndSize(name_obj, &name_size); + + if (name == NULL) { + PyErr_Format(PyExc_KeyError, +@@ -420,7 +420,7 @@ static IDProperty *idp_from_PyUnicode(const char *name, PyObject *ob) + prop = IDP_New(IDP_STRING, &val, name); + Py_XDECREF(value_coerce); + #else +- val.str = _PyUnicode_AsString(ob); ++ val.str = PyUnicode_AsUTF8(ob); + prop = IDP_New(IDP_STRING, val, name); + #endif + return prop; +@@ -722,7 +722,7 @@ int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val) + + if (val == NULL) { /* del idprop[key] */ + IDProperty *pkey; +- const char *name = _PyUnicode_AsString(key); ++ const char *name = PyUnicode_AsUTF8(key); + + if (name == NULL) { + PyErr_Format(PyExc_KeyError, "expected a string, not %.200s", Py_TYPE(key)->tp_name); +@@ -1050,7 +1050,7 @@ static PyObject *BPy_IDGroup_items(BPy_IDProperty *self) + + static int BPy_IDGroup_Contains(BPy_IDProperty *self, PyObject *value) + { +- const char *name = _PyUnicode_AsString(value); ++ const char *name = PyUnicode_AsUTF8(value); + + if (!name) { + PyErr_Format(PyExc_TypeError, "expected a string, not a %.200s", Py_TYPE(value)->tp_name); +diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c +index d05690759ceb..fe72f267a5d0 100644 +--- a/source/blender/python/generic/imbuf_py_api.c ++++ b/source/blender/python/generic/imbuf_py_api.c +@@ -267,7 +267,7 @@ static int py_imbuf_filepath_set(Py_ImBuf *self, PyObject *value, void *UNUSED(c + ImBuf *ibuf = self->ibuf; + const Py_ssize_t value_str_len_max = sizeof(ibuf->name); + Py_ssize_t value_str_len; +- const char *value_str = _PyUnicode_AsStringAndSize(value, &value_str_len); ++ const char *value_str = PyUnicode_AsUTF8AndSize(value, &value_str_len); + if (value_str_len >= value_str_len_max) { + PyErr_Format(PyExc_TypeError, "filepath length over %zd", value_str_len_max - 1); + return -1; +diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c +index 1eb4a51c3923..c7ce264f2f93 100644 +--- a/source/blender/python/generic/py_capi_utils.c ++++ b/source/blender/python/generic/py_capi_utils.c +@@ -257,7 +257,7 @@ int PyC_ParseBool(PyObject *o, void *p) + int PyC_ParseStringEnum(PyObject *o, void *p) + { + struct PyC_StringEnum *e = p; +- const char *value = _PyUnicode_AsString(o); ++ const char *value = PyUnicode_AsUTF8(o); + if (value == NULL) { + PyErr_Format(PyExc_ValueError, "expected a string, got %s", Py_TYPE(o)->tp_name); + return 0; +@@ -343,7 +343,7 @@ void PyC_ObSpitStr(char *result, size_t result_len, PyObject *var) + (int)var->ob_refcnt, + (void *)var, + type ? type->tp_name : null_str, +- var_str ? _PyUnicode_AsString(var_str) : ""); ++ var_str ? PyUnicode_AsUTF8(var_str) : ""); + if (var_str != NULL) { + Py_DECREF(var_str); + } +@@ -405,7 +405,7 @@ void PyC_FileAndNum(const char **r_filename, int *r_lineno) + + /* when executing a script */ + if (r_filename) { +- *r_filename = _PyUnicode_AsString(frame->f_code->co_filename); ++ *r_filename = PyUnicode_AsUTF8(frame->f_code->co_filename); + } + + /* when executing a module */ +@@ -418,7 +418,7 @@ void PyC_FileAndNum(const char **r_filename, int *r_lineno) + if (mod) { + PyObject *mod_file = PyModule_GetFilenameObject(mod); + if (mod_file) { +- *r_filename = _PyUnicode_AsString(mod_name); ++ *r_filename = PyUnicode_AsUTF8(mod_name); + Py_DECREF(mod_file); + } + else { +@@ -428,7 +428,7 @@ void PyC_FileAndNum(const char **r_filename, int *r_lineno) + + /* unlikely, fallback */ + if (*r_filename == NULL) { +- *r_filename = _PyUnicode_AsString(mod_name); ++ *r_filename = PyUnicode_AsUTF8(mod_name); + } + } + } +@@ -569,9 +569,9 @@ void PyC_Err_PrintWithFunc(PyObject *py_func) + /* use py style error */ + fprintf(stderr, + "File \"%s\", line %d, in %s\n", +- _PyUnicode_AsString(f_code->co_filename), ++ PyUnicode_AsUTF8(f_code->co_filename), + f_code->co_firstlineno, +- _PyUnicode_AsString(((PyFunctionObject *)py_func)->func_name)); ++ PyUnicode_AsUTF8(((PyFunctionObject *)py_func)->func_name)); + } + + /** \} */ +@@ -740,7 +740,7 @@ const char *PyC_UnicodeAsByteAndSize(PyObject *py_str, Py_ssize_t *size, PyObjec + { + const char *result; + +- result = _PyUnicode_AsStringAndSize(py_str, size); ++ result = PyUnicode_AsUTF8AndSize(py_str, size); + + if (result) { + /* 99% of the time this is enough but we better support non unicode +@@ -767,7 +767,7 @@ const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce) + { + const char *result; + +- result = _PyUnicode_AsString(py_str); ++ result = PyUnicode_AsUTF8(py_str); + + if (result) { + /* 99% of the time this is enough but we better support non unicode +@@ -1146,7 +1146,7 @@ int PyC_FlagSet_ToBitfield(PyC_FlagSet *items, + *r_value = 0; + + while (_PySet_NextEntry(value, &pos, &key, &hash)) { +- const char *param = _PyUnicode_AsString(key); ++ const char *param = PyUnicode_AsUTF8(key); + + if (param == NULL) { + PyErr_Format(PyExc_TypeError, +@@ -1324,7 +1324,7 @@ bool PyC_RunString_AsStringAndSize(const char *imports[], + const char *val; + Py_ssize_t val_len; + +- val = _PyUnicode_AsStringAndSize(retval, &val_len); ++ val = PyUnicode_AsUTF8AndSize(retval, &val_len); + if (val == NULL && PyErr_Occurred()) { + ok = false; + } +diff --git a/source/blender/python/gpu/gpu_py_api.c b/source/blender/python/gpu/gpu_py_api.c +index 954118ffa5f1..eb2fd1f73045 100644 +--- a/source/blender/python/gpu/gpu_py_api.c ++++ b/source/blender/python/gpu/gpu_py_api.c +@@ -64,7 +64,7 @@ bool bpygpu_is_init_or_error(void) + int bpygpu_ParsePrimType(PyObject *o, void *p) + { + Py_ssize_t mode_id_len; +- const char *mode_id = _PyUnicode_AsStringAndSize(o, &mode_id_len); ++ const char *mode_id = PyUnicode_AsUTF8AndSize(o, &mode_id_len); + if (mode_id == NULL) { + PyErr_Format(PyExc_ValueError, "expected a string, got %s", Py_TYPE(o)->tp_name); + return 0; +diff --git a/source/blender/python/gpu/gpu_py_vertex_format.c b/source/blender/python/gpu/gpu_py_vertex_format.c +index 7d1e4ee4868c..52e1a720f970 100644 +--- a/source/blender/python/gpu/gpu_py_vertex_format.c ++++ b/source/blender/python/gpu/gpu_py_vertex_format.c +@@ -105,7 +105,7 @@ static int py_parse_fetch_mode(const char *str, int length) + static int py_ParseVertCompType(PyObject *o, void *p) + { + Py_ssize_t length; +- const char *str = _PyUnicode_AsStringAndSize(o, &length); ++ const char *str = PyUnicode_AsUTF8AndSize(o, &length); + + if (str == NULL) { + PyErr_Format(PyExc_ValueError, "expected a string, got %s", Py_TYPE(o)->tp_name); +@@ -125,7 +125,7 @@ static int py_ParseVertCompType(PyObject *o, void *p) + static int py_ParseVertFetchMode(PyObject *o, void *p) + { + Py_ssize_t length; +- const char *str = _PyUnicode_AsStringAndSize(o, &length); ++ const char *str = PyUnicode_AsUTF8AndSize(o, &length); + + if (str == NULL) { + PyErr_Format(PyExc_ValueError, "expected a string, got %s", Py_TYPE(o)->tp_name); +diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c +index 6462f8320d77..74fc8bcfec9e 100644 +--- a/source/blender/python/intern/bpy.c ++++ b/source/blender/python/intern/bpy.c +@@ -261,7 +261,7 @@ PyDoc_STRVAR(bpy_escape_identifier_doc, + static PyObject *bpy_escape_identifier(PyObject *UNUSED(self), PyObject *value) + { + Py_ssize_t value_str_len; +- const char *value_str = _PyUnicode_AsStringAndSize(value, &value_str_len); ++ const char *value_str = PyUnicode_AsUTF8AndSize(value, &value_str_len); + + if (value_str == NULL) { + PyErr_SetString(PyExc_TypeError, "expected a string"); +@@ -299,7 +299,7 @@ PyDoc_STRVAR(bpy_unescape_identifier_doc, + static PyObject *bpy_unescape_identifier(PyObject *UNUSED(self), PyObject *value) + { + Py_ssize_t value_str_len; +- const char *value_str = _PyUnicode_AsStringAndSize(value, &value_str_len); ++ const char *value_str = PyUnicode_AsUTF8AndSize(value, &value_str_len); + + if (value_str == NULL) { + PyErr_SetString(PyExc_TypeError, "expected a string"); +diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c +index 56fc3efc0902..d00f205ddc0f 100644 +--- a/source/blender/python/intern/bpy_app_translations.c ++++ b/source/blender/python/intern/bpy_app_translations.c +@@ -211,7 +211,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) + msgctxt = BLT_I18NCONTEXT_DEFAULT_BPYRNA; + } + else if (PyUnicode_Check(tmp)) { +- msgctxt = _PyUnicode_AsString(tmp); ++ msgctxt = PyUnicode_AsUTF8(tmp); + } + else { + invalid_key = true; +@@ -219,7 +219,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) + + tmp = PyTuple_GET_ITEM(pykey, 1); + if (PyUnicode_Check(tmp)) { +- msgid = _PyUnicode_AsString(tmp); ++ msgid = PyUnicode_AsUTF8(tmp); + } + else { + invalid_key = true; +@@ -250,7 +250,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) + /* Do not overwrite existing keys! */ + if (BPY_app_translations_py_pgettext(msgctxt, msgid) == msgid) { + GHashKey *key = _ghashutil_keyalloc(msgctxt, msgid); +- BLI_ghash_insert(_translations_cache, key, BLI_strdup(_PyUnicode_AsString(trans))); ++ BLI_ghash_insert(_translations_cache, key, BLI_strdup(PyUnicode_AsUTF8(trans))); + } + } + } +@@ -341,7 +341,7 @@ static PyObject *app_translations_py_messages_register(BlenderAppTranslations *s + PyExc_ValueError, + "bpy.app.translations.register: translations message cache already contains some data for " + "addon '%s'", +- (const char *)_PyUnicode_AsString(module_name)); ++ (const char *)PyUnicode_AsUTF8(module_name)); + return NULL; + } + +diff --git a/source/blender/python/intern/bpy_capi_utils.c b/source/blender/python/intern/bpy_capi_utils.c +index 57dc4c0a6791..b2670161d92a 100644 +--- a/source/blender/python/intern/bpy_capi_utils.c ++++ b/source/blender/python/intern/bpy_capi_utils.c +@@ -136,7 +136,7 @@ bool BPy_errors_to_report_ex(ReportList *reports, + RPT_ERROR, + TIP_("%s: %s\nlocation: %s:%d\n"), + error_prefix, +- _PyUnicode_AsString(pystring), ++ PyUnicode_AsUTF8(pystring), + filename, + lineno); + +@@ -144,12 +144,12 @@ bool BPy_errors_to_report_ex(ReportList *reports, + fprintf(stderr, + TIP_("%s: %s\nlocation: %s:%d\n"), + error_prefix, +- _PyUnicode_AsString(pystring), ++ PyUnicode_AsUTF8(pystring), + filename, + lineno); + } + else { +- BKE_reportf(reports, RPT_ERROR, "%s: %s", error_prefix, _PyUnicode_AsString(pystring)); ++ BKE_reportf(reports, RPT_ERROR, "%s: %s", error_prefix, PyUnicode_AsUTF8(pystring)); + } + + Py_DECREF(pystring); +diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c +index c0536693f389..5102aa17250f 100644 +--- a/source/blender/python/intern/bpy_driver.c ++++ b/source/blender/python/intern/bpy_driver.c +@@ -163,7 +163,7 @@ int bpy_pydriver_create_dict(void) + PyObject *arg_key, *arg_value; + Py_ssize_t arg_pos = 0; + while (PyDict_Next(mod_math_dict, &arg_pos, &arg_key, &arg_value)) { +- const char *arg_str = _PyUnicode_AsString(arg_key); ++ const char *arg_str = PyUnicode_AsUTF8(arg_key); + if (arg_str[0] && arg_str[1] != '_') { + PyDict_SetItem(bpy_pydriver_Dict__whitelist, arg_key, Py_None); + } +@@ -363,7 +363,7 @@ static bool bpy_driver_secure_bytecode_validate(PyObject *expr_code, PyObject *d + fprintf(stderr, + "\tBPY_driver_eval() - restricted access disallows name '%s', " + "enable auto-execution to support\n", +- _PyUnicode_AsString(name)); ++ PyUnicode_AsUTF8(name)); + return false; + } + } +diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c +index 311612e14999..9fea65935e13 100644 +--- a/source/blender/python/intern/bpy_interface.c ++++ b/source/blender/python/intern/bpy_interface.c +@@ -585,8 +585,8 @@ void BPY_python_backtrace(FILE *fp) + PyFrameObject *frame = tstate->frame; + do { + const int line = PyCode_Addr2Line(frame->f_code, frame->f_lasti); +- const char *filename = _PyUnicode_AsString(frame->f_code->co_filename); +- const char *funcname = _PyUnicode_AsString(frame->f_code->co_name); ++ const char *filename = PyUnicode_AsUTF8(frame->f_code->co_filename); ++ const char *funcname = PyUnicode_AsUTF8(frame->f_code->co_name); + fprintf(fp, " File \"%s\", line %d in %s\n", filename, line, funcname); + } while ((frame = frame->f_back)); + } +@@ -778,7 +778,7 @@ static void bpy_module_delay_init(PyObject *bpy_proxy) + /* updating the module dict below will lose the reference to __file__ */ + PyObject *filename_obj = PyModule_GetFilenameObject(bpy_proxy); + +- const char *filename_rel = _PyUnicode_AsString(filename_obj); /* can be relative */ ++ const char *filename_rel = PyUnicode_AsUTF8(filename_obj); /* can be relative */ + char filename_abs[1024]; + + BLI_strncpy(filename_abs, filename_rel, sizeof(filename_abs)); +diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c +index 7ee563feff8b..020c8f7ea494 100644 +--- a/source/blender/python/intern/bpy_library_load.c ++++ b/source/blender/python/intern/bpy_library_load.c +@@ -361,7 +361,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) + for (i = 0; i < size; i++) { + PyObject *item_src = PyList_GET_ITEM(ls, i); + PyObject *item_dst; /* must be set below */ +- const char *item_idname = _PyUnicode_AsString(item_src); ++ const char *item_idname = PyUnicode_AsUTF8(item_src); + + // printf(" %s\n", item_idname); + +diff --git a/source/blender/python/intern/bpy_msgbus.c b/source/blender/python/intern/bpy_msgbus.c +index df45007b68fd..7cc7f864c9c4 100644 +--- a/source/blender/python/intern/bpy_msgbus.c ++++ b/source/blender/python/intern/bpy_msgbus.c +@@ -118,7 +118,7 @@ static int py_msgbus_rna_key_from_py(PyObject *py_sub, + PointerRNA data_type_ptr = { + .type = data_type, + }; +- const char *data_prop_str = _PyUnicode_AsString(data_prop_py); ++ const char *data_prop_str = PyUnicode_AsUTF8(data_prop_py); + PropertyRNA *data_prop = RNA_struct_find_property(&data_type_ptr, data_prop_str); + + if (data_prop == NULL) { +diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c +index 5ac76ab9ac11..967eece4bcbf 100644 +--- a/source/blender/python/intern/bpy_operator.c ++++ b/source/blender/python/intern/bpy_operator.c +@@ -58,7 +58,7 @@ + + static wmOperatorType *ot_lookup_from_py_string(PyObject *value, const char *py_fn_id) + { +- const char *opname = _PyUnicode_AsString(value); ++ const char *opname = PyUnicode_AsUTF8(value); + if (opname == NULL) { + PyErr_Format(PyExc_TypeError, "%s() expects a string argument", py_fn_id); + return NULL; +diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c +index 9fb25d418449..5137f41d43a0 100644 +--- a/source/blender/python/intern/bpy_operator_wrap.c ++++ b/source/blender/python/intern/bpy_operator_wrap.c +@@ -68,7 +68,7 @@ static void operator_properties_init(wmOperatorType *ot) + if (bl_property) { + if (PyUnicode_Check(bl_property)) { + /* since the property is explicitly given, raise an error if its not found */ +- prop_id = _PyUnicode_AsString(bl_property); ++ prop_id = PyUnicode_AsUTF8(bl_property); + prop_raise_error = true; + } + else { +diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c +index 354086ef4c38..878bf4aec5dc 100644 +--- a/source/blender/python/intern/bpy_props.c ++++ b/source/blender/python/intern/bpy_props.c +@@ -1152,7 +1152,7 @@ static void bpy_prop_string_get_cb(struct PointerRNA *ptr, struct PropertyRNA *p + } + else { + Py_ssize_t length; +- const char *buffer = _PyUnicode_AsStringAndSize(ret, &length); ++ const char *buffer = PyUnicode_AsUTF8AndSize(ret, &length); + memcpy(value, buffer, length + 1); + Py_DECREF(ret); + } +@@ -1213,7 +1213,7 @@ static int bpy_prop_string_length_cb(struct PointerRNA *ptr, struct PropertyRNA + } + else { + Py_ssize_t length_ssize_t = 0; +- _PyUnicode_AsStringAndSize(ret, &length_ssize_t); ++ PyUnicode_AsUTF8AndSize(ret, &length_ssize_t); + length = length_ssize_t; + Py_DECREF(ret); + } +@@ -1488,7 +1488,7 @@ static const EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, + else { + if (def) { + if (!py_long_as_int(def, &def_int_cmp)) { +- def_string_cmp = _PyUnicode_AsString(def); ++ def_string_cmp = PyUnicode_AsUTF8(def); + if (def_string_cmp == NULL) { + PyErr_Format(PyExc_TypeError, + "EnumProperty(...): default option must be a 'str' or 'int' " +@@ -1517,14 +1517,13 @@ static const EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, + + if ((PyTuple_CheckExact(item)) && (item_size = PyTuple_GET_SIZE(item)) && + (item_size >= 3 && item_size <= 5) && +- (tmp.identifier = _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 0), &id_str_size)) && +- (tmp.name = _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 1), &name_str_size)) && +- (tmp.description = _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 2), +- &desc_str_size)) && ++ (tmp.identifier = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 0), &id_str_size)) && ++ (tmp.name = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 1), &name_str_size)) && ++ (tmp.description = PyUnicode_AsUTF8AndSize(PyTuple_GET_ITEM(item, 2), &desc_str_size)) && + /* TODO, number isn't ensured to be unique from the script author */ + (item_size != 4 || py_long_as_int(PyTuple_GET_ITEM(item, 3), &tmp.value)) && + (item_size != 5 || ((py_long_as_int(PyTuple_GET_ITEM(item, 3), &tmp.icon) || +- (tmp_icon = _PyUnicode_AsString(PyTuple_GET_ITEM(item, 3)))) && ++ (tmp_icon = PyUnicode_AsUTF8(PyTuple_GET_ITEM(item, 3)))) && + py_long_as_int(PyTuple_GET_ITEM(item, 4), &tmp.value)))) { + if (is_enum_flag) { + if (item_size < 4) { +@@ -3301,7 +3300,7 @@ StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix) + if (!srna) { + if (PyErr_Occurred()) { + PyObject *msg = PyC_ExceptionBuffer(); +- const char *msg_char = _PyUnicode_AsString(msg); ++ const char *msg_char = PyUnicode_AsUTF8(msg); + PyErr_Format( + PyExc_TypeError, "%.200s expected an RNA type, failed with: %s", error_prefix, msg_char); + Py_DECREF(msg); +diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c +index 0b1af733f846..c0f3ba30d93c 100644 +--- a/source/blender/python/intern/bpy_rna.c ++++ b/source/blender/python/intern/bpy_rna.c +@@ -323,7 +323,7 @@ static bool rna_id_write_error(PointerRNA *ptr, PyObject *key) + const char *idtype = BKE_idtype_idcode_to_name(idcode); + const char *pyname; + if (key && PyUnicode_Check(key)) { +- pyname = _PyUnicode_AsString(key); ++ pyname = PyUnicode_AsUTF8(key); + } + else { + pyname = ""; +@@ -1252,7 +1252,7 @@ static const char *pyrna_enum_as_string(PointerRNA *ptr, PropertyRNA *prop) + static int pyrna_string_to_enum( + PyObject *item, PointerRNA *ptr, PropertyRNA *prop, int *r_value, const char *error_prefix) + { +- const char *param = _PyUnicode_AsString(item); ++ const char *param = PyUnicode_AsUTF8(item); + + if (param == NULL) { + PyErr_Format(PyExc_TypeError, +@@ -1299,7 +1299,7 @@ BLI_bitmap *pyrna_set_to_enum_bitmap(const EnumPropertyItem *items, + BLI_bitmap *bitmap = BLI_BITMAP_NEW(bitmap_size, __func__); + + while (_PySet_NextEntry(value, &pos, &key, &hash)) { +- const char *param = _PyUnicode_AsString(key); ++ const char *param = PyUnicode_AsUTF8(key); + if (param == NULL) { + PyErr_Format(PyExc_TypeError, + "%.200s expected a string, not %.200s", +@@ -1364,7 +1364,7 @@ int pyrna_set_to_enum_bitfield(const EnumPropertyItem *items, + *r_value = 0; + + while (_PySet_NextEntry(value, &pos, &key, &hash)) { +- const char *param = _PyUnicode_AsString(key); ++ const char *param = PyUnicode_AsUTF8(key); + + if (param == NULL) { + PyErr_Format(PyExc_TypeError, +@@ -1662,7 +1662,7 @@ int pyrna_pydict_to_props(PointerRNA *ptr, + Py_ssize_t pos = 0; + + while (PyDict_Next(kw, &pos, &key, &value)) { +- arg_name = _PyUnicode_AsString(key); ++ arg_name = PyUnicode_AsUTF8(key); + if (RNA_struct_find_property(ptr, arg_name) == NULL) { + break; + } +@@ -1871,10 +1871,10 @@ static int pyrna_py_to_prop( + param = PyC_UnicodeAsByte(value, &value_coerce); + } + else { +- param = _PyUnicode_AsString(value); ++ param = PyUnicode_AsUTF8(value); + } + #else /* USE_STRING_COERCE */ +- param = _PyUnicode_AsString(value); ++ param = PyUnicode_AsUTF8(value); + #endif /* USE_STRING_COERCE */ + + if (param == NULL) { +@@ -2186,7 +2186,7 @@ static int pyrna_py_to_prop( + if (pyrna_pydict_to_props( + &itemptr, item, true, "Converting a Python list to an RNA collection") == -1) { + PyObject *msg = PyC_ExceptionBuffer(); +- const char *msg_char = _PyUnicode_AsString(msg); ++ const char *msg_char = PyUnicode_AsUTF8(msg); + + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s error converting a member of a collection " +@@ -2490,7 +2490,7 @@ static int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *sel + RNA_struct_identifier(self->ptr.type)); + return -1; + } +- if ((keyname = _PyUnicode_AsString(PyTuple_GET_ITEM(key, 0))) == NULL) { ++ if ((keyname = PyUnicode_AsUTF8(PyTuple_GET_ITEM(key, 0))) == NULL) { + PyErr_Format(PyExc_KeyError, + "%s: id must be a string, not %.200s", + err_prefix, +@@ -2507,7 +2507,7 @@ static int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *sel + } + else if (PyUnicode_Check(keylib)) { + Main *bmain = self->ptr.data; +- const char *keylib_str = _PyUnicode_AsString(keylib); ++ const char *keylib_str = PyUnicode_AsUTF8(keylib); + lib = BLI_findstring(&bmain->libraries, keylib_str, offsetof(Library, filepath)); + if (lib == NULL) { + if (err_not_found) { +@@ -2711,7 +2711,7 @@ static PyObject *pyrna_prop_collection_subscript(BPy_PropertyRNA *self, PyObject + PYRNA_PROP_CHECK_OBJ(self); + + if (PyUnicode_Check(key)) { +- return pyrna_prop_collection_subscript_str(self, _PyUnicode_AsString(key)); ++ return pyrna_prop_collection_subscript_str(self, PyUnicode_AsUTF8(key)); + } + if (PyIndex_Check(key)) { + const Py_ssize_t i = PyNumber_AsSsize_t(key, PyExc_IndexError); +@@ -2838,7 +2838,7 @@ static int pyrna_prop_collection_ass_subscript(BPy_PropertyRNA *self, + + #if 0 + if (PyUnicode_Check(key)) { +- return pyrna_prop_collection_subscript_str(self, _PyUnicode_AsString(key)); ++ return pyrna_prop_collection_subscript_str(self, PyUnicode_AsUTF8(key)); + } + else + #endif +@@ -2910,7 +2910,7 @@ static PyObject *pyrna_prop_array_subscript(BPy_PropertyArrayRNA *self, PyObject + + #if 0 + if (PyUnicode_Check(key)) { +- return pyrna_prop_array_subscript_str(self, _PyUnicode_AsString(key)); ++ return pyrna_prop_array_subscript_str(self, PyUnicode_AsUTF8(key)); + } + else + #endif +@@ -3359,7 +3359,7 @@ static int pyrna_prop_collection_contains(BPy_PropertyRNA *self, PyObject *key) + } + + /* Key in dict style check. */ +- const char *keyname = _PyUnicode_AsString(key); ++ const char *keyname = PyUnicode_AsUTF8(key); + + if (keyname == NULL) { + PyErr_SetString(PyExc_TypeError, +@@ -3377,7 +3377,7 @@ static int pyrna_prop_collection_contains(BPy_PropertyRNA *self, PyObject *key) + static int pyrna_struct_contains(BPy_StructRNA *self, PyObject *value) + { + IDProperty *group; +- const char *name = _PyUnicode_AsString(value); ++ const char *name = PyUnicode_AsUTF8(value); + + PYRNA_STRUCT_CHECK_INT(self); + +@@ -3447,7 +3447,7 @@ static PyObject *pyrna_struct_subscript(BPy_StructRNA *self, PyObject *key) + { + /* Mostly copied from BPy_IDGroup_Map_GetItem. */ + IDProperty *group, *idprop; +- const char *name = _PyUnicode_AsString(key); ++ const char *name = PyUnicode_AsUTF8(key); + + PYRNA_STRUCT_CHECK_OBJ(self); + +@@ -4231,7 +4231,7 @@ static PyObject *pyrna_struct_dir(BPy_StructRNA *self) + /* ---------------getattr-------------------------------------------- */ + static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname) + { +- const char *name = _PyUnicode_AsString(pyname); ++ const char *name = PyUnicode_AsUTF8(pyname); + PyObject *ret; + PropertyRNA *prop; + FunctionRNA *func; +@@ -4378,7 +4378,7 @@ static PyObject *pyrna_struct_meta_idprop_getattro(PyObject *cls, PyObject *attr + if ((ret == NULL) /* || pyrna_is_deferred_prop(ret) */ ) { + StructRNA *srna = srna_from_self(cls, "StructRNA.__getattr__"); + if (srna) { +- PropertyRNA *prop = RNA_struct_type_find_property(srna, _PyUnicode_AsString(attr)); ++ PropertyRNA *prop = RNA_struct_type_find_property(srna, PyUnicode_AsUTF8(attr)); + if (prop) { + PointerRNA tptr; + PyErr_Clear(); /* Clear error from tp_getattro. */ +@@ -4397,7 +4397,7 @@ static int pyrna_struct_meta_idprop_setattro(PyObject *cls, PyObject *attr, PyOb + { + StructRNA *srna = srna_from_self(cls, "StructRNA.__setattr__"); + const bool is_deferred_prop = (value && pyrna_is_deferred_prop(value)); +- const char *attr_str = _PyUnicode_AsString(attr); ++ const char *attr_str = PyUnicode_AsUTF8(attr); + + if (srna && !pyrna_write_check() && + (is_deferred_prop || RNA_struct_type_find_property(srna, attr_str))) { +@@ -4458,7 +4458,7 @@ static int pyrna_struct_meta_idprop_setattro(PyObject *cls, PyObject *attr, PyOb + + static int pyrna_struct_setattro(BPy_StructRNA *self, PyObject *pyname, PyObject *value) + { +- const char *name = _PyUnicode_AsString(pyname); ++ const char *name = PyUnicode_AsUTF8(pyname); + PropertyRNA *prop = NULL; + + PYRNA_STRUCT_CHECK_INT(self); +@@ -4550,7 +4550,7 @@ static PyObject *pyrna_prop_array_getattro(BPy_PropertyRNA *self, PyObject *pyna + + static PyObject *pyrna_prop_collection_getattro(BPy_PropertyRNA *self, PyObject *pyname) + { +- const char *name = _PyUnicode_AsString(pyname); ++ const char *name = PyUnicode_AsUTF8(pyname); + + if (name == NULL) { + PyErr_SetString(PyExc_AttributeError, "bpy_prop_collection: __getattr__ must be a string"); +@@ -4618,7 +4618,7 @@ static PyObject *pyrna_prop_collection_getattro(BPy_PropertyRNA *self, PyObject + /* --------------- setattr------------------------------------------- */ + static int pyrna_prop_collection_setattro(BPy_PropertyRNA *self, PyObject *pyname, PyObject *value) + { +- const char *name = _PyUnicode_AsString(pyname); ++ const char *name = PyUnicode_AsUTF8(pyname); + PropertyRNA *prop; + PointerRNA r_ptr; + +@@ -5015,7 +5015,7 @@ static PyObject *pyrna_prop_collection_get(BPy_PropertyRNA *self, PyObject *args + } + + if (PyUnicode_Check(key_ob)) { +- const char *key = _PyUnicode_AsString(key_ob); ++ const char *key = PyUnicode_AsUTF8(key_ob); + + if (RNA_property_collection_lookup_string(&self->ptr, self->prop, key, &newptr)) { + return pyrna_struct_CreatePyObject(&newptr); +@@ -5050,7 +5050,7 @@ PyDoc_STRVAR(pyrna_prop_collection_find_doc, + static PyObject *pyrna_prop_collection_find(BPy_PropertyRNA *self, PyObject *key_ob) + { + Py_ssize_t key_len_ssize_t; +- const char *key = _PyUnicode_AsStringAndSize(key_ob, &key_len_ssize_t); ++ const char *key = PyUnicode_AsUTF8AndSize(key_ob, &key_len_ssize_t); + const int key_len = (int)key_len_ssize_t; /* Comare with same type. */ + + char name[256], *nameptr; +@@ -6035,7 +6035,7 @@ static PyObject *small_dict_get_item_string(PyObject *dict, const char *key_look + + while (PyDict_Next(dict, &pos, &key, &value)) { + if (PyUnicode_Check(key)) { +- if (STREQ(key_lookup, _PyUnicode_AsString(key))) { ++ if (STREQ(key_lookup, PyUnicode_AsUTF8(key))) { + return value; + } + } +@@ -6189,7 +6189,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject + #ifdef DEBUG_STRING_FREE + if (item) { + if (PyUnicode_Check(item)) { +- PyList_APPEND(string_free_ls, PyUnicode_FromString(_PyUnicode_AsString(item))); ++ PyList_APPEND(string_free_ls, PyUnicode_FromString(PyUnicode_AsUTF8(item))); + } + } + #endif +@@ -6245,7 +6245,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject + + while (PyDict_Next(kw, &pos, &key, &value)) { + +- arg_name = _PyUnicode_AsString(key); ++ arg_name = PyUnicode_AsUTF8(key); + found = false; + + if (arg_name == NULL) { /* Unlikely the argname is not a string, but ignore if it is. */ +@@ -7664,7 +7664,7 @@ static PyObject *pyrna_basetype_getattro(BPy_BaseTypeRNA *self, PyObject *pyname + { + PointerRNA newptr; + PyObject *ret; +- const char *name = _PyUnicode_AsString(pyname); ++ const char *name = PyUnicode_AsUTF8(pyname); + + if (name == NULL) { + PyErr_SetString(PyExc_AttributeError, "bpy.types: __getattr__ must be a string"); +@@ -7675,14 +7675,14 @@ static PyObject *pyrna_basetype_getattro(BPy_BaseTypeRNA *self, PyObject *pyname + if (ret == NULL) { + PyErr_Format(PyExc_RuntimeError, + "bpy.types.%.200s subtype could not be generated, this is a bug!", +- _PyUnicode_AsString(pyname)); ++ PyUnicode_AsUTF8(pyname)); + } + } + else { + #if 0 + PyErr_Format(PyExc_AttributeError, + "bpy.types.%.200s RNA_Struct does not exist", +- _PyUnicode_AsString(pyname)); ++ PyUnicode_AsUTF8(pyname)); + return NULL; + #endif + /* The error raised here will be displayed. */ +@@ -7889,12 +7889,12 @@ static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item + if (PyArg_ParseTuple(item, "OO!", &py_func, &PyDict_Type, &py_kw)) { + PyObject *args_fake; + +- if (*_PyUnicode_AsString(key) == '_') { ++ if (*PyUnicode_AsUTF8(key) == '_') { + PyErr_Format(PyExc_ValueError, + "bpy_struct \"%.200s\" registration error: " + "%.200s could not register because the property starts with an '_'\n", + RNA_struct_identifier(srna), +- _PyUnicode_AsString(key)); ++ PyUnicode_AsUTF8(key)); + return -1; + } + py_srna_cobject = PyCapsule_New(srna, NULL, NULL); +@@ -7938,7 +7938,7 @@ static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item + "bpy_struct \"%.200s\" registration error: " + "%.200s could not register\n", + RNA_struct_identifier(srna), +- _PyUnicode_AsString(key)); ++ PyUnicode_AsUTF8(key)); + return -1; + } + } +@@ -7992,7 +7992,7 @@ static int pyrna_deferred_register_props(StructRNA *srna, PyObject *class_dict) + } + printf(" assign as a type annotation: %.200s.%.200s\n", + RNA_struct_identifier(srna), +- _PyUnicode_AsString(key)); ++ PyUnicode_AsUTF8(key)); + } + ret = deferred_register_prop(srna, key, item); + +@@ -9088,7 +9088,7 @@ static PyObject *pyrna_bl_owner_id_set(PyObject *UNUSED(self), PyObject *value) + name = NULL; + } + else if (PyUnicode_Check(value)) { +- name = _PyUnicode_AsString(value); ++ name = PyUnicode_AsUTF8(value); + } + else { + PyErr_Format(PyExc_ValueError, +diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c +index e2c894e90f82..00b414e027ef 100644 +--- a/source/blender/python/intern/bpy_traceback.c ++++ b/source/blender/python/intern/bpy_traceback.c +@@ -149,7 +149,7 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset) + PyObject *filename_py, *text_py; + + if (parse_syntax_error(value, &message, &filename_py, lineno, offset, &text_py)) { +- const char *filename = _PyUnicode_AsString(filename_py); ++ const char *filename = PyUnicode_AsUTF8(filename_py); + /* python adds a '/', prefix, so check for both */ + if ((BLI_path_cmp(filename, filepath) == 0) || + (ELEM(filename[0], '\\', '/') && BLI_path_cmp(filename + 1, filepath) == 0)) { +diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c +index ebc71706bef5..f2a8af18073f 100644 +--- a/source/blender/python/mathutils/mathutils_Euler.c ++++ b/source/blender/python/mathutils/mathutils_Euler.c +@@ -670,7 +670,7 @@ static int Euler_order_set(EulerObject *self, PyObject *value, void *UNUSED(clos + return -1; + } + +- if (((order_str = _PyUnicode_AsString(value)) == NULL) || ++ if (((order_str = PyUnicode_AsUTF8(value)) == NULL) || + ((order = euler_order_from_string(order_str, "euler.order")) == -1)) { + return -1; + } +diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c +index 87d16656d705..016ba4620300 100644 +--- a/source/blender/python/mathutils/mathutils_Matrix.c ++++ b/source/blender/python/mathutils/mathutils_Matrix.c +@@ -499,7 +499,7 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args) + } + + if (vec && PyUnicode_Check(vec)) { +- axis = _PyUnicode_AsString((PyObject *)vec); ++ axis = PyUnicode_AsUTF8((PyObject *)vec); + if (axis == NULL || axis[0] == '\0' || axis[1] != '\0' || axis[0] < 'X' || axis[0] > 'Z') { + PyErr_SetString(PyExc_ValueError, + "Matrix.Rotation(): " +@@ -768,7 +768,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args) + + if (PyUnicode_Check(axis)) { /* ortho projection onto cardinal plane */ + Py_ssize_t plane_len; +- const char *plane = _PyUnicode_AsStringAndSize(axis, &plane_len); ++ const char *plane = PyUnicode_AsUTF8AndSize(axis, &plane_len); + if (matSize == 2) { + if (plane_len == 1 && plane[0] == 'X') { + mat[0] = 1.0f; +diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c +index 8d2ab614728a..3bc60190d561 100644 +--- a/source/blender/python/mathutils/mathutils_Quaternion.c ++++ b/source/blender/python/mathutils/mathutils_Quaternion.c +@@ -195,7 +195,7 @@ static PyObject *Quaternion_to_swing_twist(QuaternionObject *self, PyObject *axi + int axis; + + if (axis_arg && PyUnicode_Check(axis_arg)) { +- axis_str = _PyUnicode_AsString(axis_arg); ++ axis_str = PyUnicode_AsUTF8(axis_arg); + } + + if (axis_str && axis_str[0] >= 'X' && axis_str[0] <= 'Z' && axis_str[1] == 0) { diff --git a/mingw-w64-cmake/0008-fix-find-mpi.patch b/mingw-w64-cmake/0008-fix-find-mpi.patch new file mode 100644 index 0000000000..4d6f252d70 --- /dev/null +++ b/mingw-w64-cmake/0008-fix-find-mpi.patch @@ -0,0 +1,45 @@ +diff -urN cmake-3.23.2/Modules/FindMPI.cmake.orig cmake-3.23.2/Modules/FindMPI.cmake +--- cmake-3.23.2/Modules/FindMPI.cmake.orig 2022-05-25 15:42:51.000000000 +0200 ++++ cmake-3.23.2/Modules/FindMPI.cmake 2022-06-13 12:41:25.379247700 +0200 +@@ -775,7 +775,8 @@ + MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) +- string(REGEX REPLACE "^ ?${CMAKE_LINK_LIBRARY_FLAG}" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") ++ # also match flags starting with "-l:" here ++ string(REGEX REPLACE "^ ?${CMAKE_LINK_LIBRARY_FLAG}(\:lib|\:)?" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + string(REPLACE "\"" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") + list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") + endforeach() +@@ -788,7 +789,7 @@ + set(_MPI_LIB_SUFFIX_REGEX "${CMAKE_STATIC_LIBRARY_SUFFIX}") + if(DEFINED CMAKE_IMPORT_LIBRARY_SUFFIX) + if(NOT ("${CMAKE_IMPORT_LIBRARY_SUFFIX}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")) +- string(APPEND _MPI_SUFFIX_REGEX "|${CMAKE_IMPORT_LIBRARY_SUFFIX}") ++ string(APPEND _MPI_LIB_SUFFIX_REGEX "|${CMAKE_IMPORT_LIBRARY_SUFFIX}") + endif() + else() + string(APPEND _MPI_LIB_SUFFIX_REGEX "|${CMAKE_SHARED_LIBRARY_SUFFIX}") +@@ -798,12 +799,16 @@ + + string(REGEX MATCHALL "${_MPI_LIB_NAME_REGEX}" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + foreach(_MPI_LIB_NAME IN LISTS MPI_LIBNAMES) +- string(REGEX REPLACE "^ +\"?|\"? +$" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") +- get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_NAME}" DIRECTORY) +- if(NOT "${_MPI_LIB_PATH}" STREQUAL "") +- list(APPEND MPI_LIB_FULLPATHS_WORK "${_MPI_LIB_NAME}") +- else() +- list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") ++ # Do not match "-l:" flags ++ string(REGEX MATCH "^ ?${CMAKE_LINK_LIBRARY_FLAG}:" _MPI_LIB_NAME_TEST "${_MPI_LIB_NAME}") ++ if(_MPI_LIB_NAME_TEST STREQUAL "") ++ string(REGEX REPLACE "^ +\"?|\"? +$" "" _MPI_LIB_NAME "${_MPI_LIB_NAME}") ++ get_filename_component(_MPI_LIB_PATH "${_MPI_LIB_NAME}" DIRECTORY) ++ if(NOT "${_MPI_LIB_PATH}" STREQUAL "") ++ list(APPEND MPI_LIB_FULLPATHS_WORK "${_MPI_LIB_NAME}") ++ else() ++ list(APPEND MPI_LIB_NAMES_WORK "${_MPI_LIB_NAME}") ++ endif() + endif() + endforeach() + diff --git a/mingw-w64-cmake/PKGBUILD b/mingw-w64-cmake/PKGBUILD index 092b8be3d5..5d76dd04b2 100644 --- a/mingw-w64-cmake/PKGBUILD +++ b/mingw-w64-cmake/PKGBUILD @@ -7,7 +7,7 @@ _realname=cmake pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.23.2 -pkgrel=1 +pkgrel=2 pkgdesc="A cross-platform open-source make system (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -49,7 +49,8 @@ source=("https://github.com/Kitware/CMake/releases/download/v${pkgver}/${_realna "https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7105.patch" "0006-fix-find-glut.patch" "https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7162.patch" - "0007-No-hardcoded-gcc-with-MINGW-or-MSYS-Makefiles.patch") + "0007-No-hardcoded-gcc-with-MINGW-or-MSYS-Makefiles.patch" + "0008-fix-find-mpi.patch") sha256sums=('f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa' '25793edcbac05bb6d17fa9947b52ace4a6b5ccccf7758e22ae9ae022ed089061' 'f6cf6a6f2729db2b9427679acd09520af2cd79fc26900b19a49cead05a55cd1a' @@ -58,7 +59,8 @@ sha256sums=('f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa' '5b96f14a455b46f08aea1631407528ad5238150cc4087beecad40f3afca10214' '04d526b1ec86de7e633d0a802cef8452e33bc18c8425aa2065dc901a7c868026' 'bfff814b848c51e9733af7c435a51a9ff2ccfdf862b5a70113dc0a71c0360b13' - '62074a0de9ac9a9224ffda01992aaa34e5f7fa2e2c6b1cb327ebe9b452452364') + '62074a0de9ac9a9224ffda01992aaa34e5f7fa2e2c6b1cb327ebe9b452452364' + '0a18245a80fc3a4f5ef6eb96cd0508f341331390c5ff289c642153d96d732253') # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -85,7 +87,8 @@ prepare() { apply_patch_with_msg \ 0001-Disable-response-files-for-MSYS-Generator.patch \ 0002-Do-not-install-Qt-bundle-in-cmake-gui.patch \ - 0004-Output-line-numbers-in-callstacks.patch + 0004-Output-line-numbers-in-callstacks.patch \ + 0008-fix-find-mpi.patch # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/{7105,7161,7162} apply_patch_with_msg \ 7105.patch \ @@ -151,7 +154,7 @@ check() { if (( _bootstrap )); then ./bin/ctest.exe -j$(($(nproc)+1)) else - ${MINGW_PREFIX}/bin/ctest.exe -j$(($(nproc)+1)) + ${MINGW_PREFIX}/bin/ctest.exe -j$(($(nproc)+1)) || msg2 "Tests failed" fi } diff --git a/mingw-w64-distorm/Makefile b/mingw-w64-distorm/Makefile index f75f68a24d..dcc466eee3 100644 --- a/mingw-w64-distorm/Makefile +++ b/mingw-w64-distorm/Makefile @@ -11,7 +11,7 @@ TARGET = ${LIB_NAME}${SHARED_EXT} STATICLIB = ${LIB_NAME}${STATIC_EXT} IMPORTLIB = ${LIB_NAME}${IMPORT_EXT} COBJS = ../../src/mnemonics.o ../../src/textdefs.o ../../src/prefix.o ../../src/operands.o ../../src/insts.o ../../src/instructions.o ../../src/distorm.o ../../src/decoder.o -CC = gcc +CC = cc CFLAGS = -O2 -Wall -DSUPPORT_64BIT_OFFSET -DDISTORM_STATIC WINDRES = windres diff --git a/mingw-w64-distorm/PKGBUILD b/mingw-w64-distorm/PKGBUILD index a7a818331d..e9b20c3c45 100644 --- a/mingw-w64-distorm/PKGBUILD +++ b/mingw-w64-distorm/PKGBUILD @@ -4,7 +4,7 @@ _realname=distorm pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=3.5.2 -pkgrel=2 +pkgrel=3 pkgdesc="Powerful disassembler library for x86/AMD64 (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') @@ -18,7 +18,7 @@ options=('strip' 'staticlibs') source=(${_realname}-${pkgver}.tar.gz::https://github.com/gdabah/distorm/archive/${pkgver}.tar.gz Makefile) sha256sums=('ef858f430d16156dea2edc910750cabf2a21154b24cfa7edf714a8ea8799f1d9' - 'ab6b1147ae861a256f8ee597cfc420acce8d4369a2ef83915afb48a83593ea02') + '35ef18fd815abe1b03b7b264ae517cd8d1564665cb5a34604b0b624ac820a4c4') prepare() { cd ${_realname}-${pkgver} diff --git a/mingw-w64-freeglut/004-pkg-config.patch b/mingw-w64-freeglut/004-pkg-config.patch new file mode 100644 index 0000000000..3044a80a3d --- /dev/null +++ b/mingw-w64-freeglut/004-pkg-config.patch @@ -0,0 +1,21 @@ +diff -urN freeglut-3.2.2/CMakeLists.txt.orig freeglut-3.2.2/CMakeLists.txt +--- freeglut-3.2.2/CMakeLists.txt.orig 2022-06-13 18:12:10.541795000 +0200 ++++ freeglut-3.2.2/CMakeLists.txt 2022-06-13 18:14:07.680099200 +0200 +@@ -607,7 +607,7 @@ + SET(PC_CFLAGS "-DFREEGLUT_GLES") + ENDIF() + IF(FREEGLUT_BUILD_STATIC_LIBS) +- LIST(APPEND PC_CFLAGS -DFREEGLUT_STATIC) ++ LIST(APPEND PC_CFLAGS_PRIVATE -DFREEGLUT_STATIC) + ENDIF() + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/freeglut.pc.in ${CMAKE_BINARY_DIR}/freeglut.pc @ONLY) + INSTALL(FILES ${CMAKE_BINARY_DIR}/freeglut.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ RENAME ${PC_FILENAME} COMPONENT Devel) + +diff -urN freeglut-3.2.2/freeglut.pc.in.orig freeglut-3.2.2/freeglut.pc.in +--- freeglut-3.2.2/freeglut.pc.in.orig 2015-02-18 01:37:05.000000000 +0100 ++++ freeglut-3.2.2/freeglut.pc.in 2022-06-13 18:14:24.996997800 +0200 +@@ -8,3 +8,4 @@ + Libs: -L${libdir} -l@PC_LIBNAME@ + Libs.private: @PC_LIBS_PRIVATE@ + Cflags: -I${includedir} @PC_CFLAGS@ ++Cflags.private: @PC_CFLAGS_PRIVATE@ diff --git a/mingw-w64-freeglut/PKGBUILD b/mingw-w64-freeglut/PKGBUILD index 08431a4d9e..1c8a9013f0 100644 --- a/mingw-w64-freeglut/PKGBUILD +++ b/mingw-w64-freeglut/PKGBUILD @@ -8,20 +8,22 @@ pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" _pre= _ver=3.2.2 pkgver=${_ver}${_pre} -pkgrel=1 +pkgrel=2 pkgdesc="Freeglut allows the user to create and manage windows containing OpenGL contexts (mingw32-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') url="https://freeglut.sourceforge.io/" -license=('MIT') +license=('spdx:MIT') makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja") options=('strip' '!libtool' 'staticlibs') source=("https://downloads.sourceforge.net/freeglut/${_realname}-${_ver}${_pre}.tar.gz" - "003-freeglut-3.2.1-install-glut-h.patch") -sha256sums=('C5944A082DF0BBA96B5756DDDB1F75D0CD72CE27B5395C6C1DDE85C2FF297A50' - '0d091fba73641bdc51d28763101452f606c26aed30c9ac1682a19ba9306de8aa') + "003-freeglut-3.2.1-install-glut-h.patch" + "004-pkg-config.patch") +sha256sums=('c5944a082df0bba96b5756dddb1f75d0cd72ce27b5395c6c1dde85c2ff297a50' + '0d091fba73641bdc51d28763101452f606c26aed30c9ac1682a19ba9306de8aa' + '1d5def5c769df03ec599c0eaabcdcd1a851a695bfc0142fae21a05c18e433bf8') noextract=(${_realname}-${_ver}${_pre}.tar.gz) prepare() { @@ -31,27 +33,27 @@ prepare() { # Upstreaming at https://github.com/dcnieho/FreeGLUT/pull/41 cd ${_realname}-${_ver}${_pre} patch -p1 -i "${srcdir}"/003-freeglut-3.2.1-install-glut-h.patch + patch -p1 -i "${srcdir}"/004-pkg-config.patch } build() { - rm -rf "${srcdir}/build-${MINGW_CHOST}" - mkdir "${srcdir}/build-${MINGW_CHOST}" - cd "${srcdir}/build-${MINGW_CHOST}" + [[ -d "build-${MSYSTEM}" ]] && rm -rf "build-${MSYSTEM}" + mkdir -p ${srcdir}/build-${MSYSTEM} && cd ${srcdir}/build-${MSYSTEM} CFLAGS+=" -fcommon" # work around gcc 10 being stricter here MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - ${MINGW_PREFIX}/bin/cmake \ + "${MINGW_PREFIX}"/bin/cmake \ -GNinja \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ -DCMAKE_BUILD_TYPE=Release \ ../${_realname}-${_ver}${_pre} - ${MINGW_PREFIX}/bin/cmake --build . + "${MINGW_PREFIX}"/bin/cmake --build . } package() { - cd "${srcdir}/build-${MINGW_CHOST}" - DESTDIR=${pkgdir} cmake --build . --target install - install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + cd "${srcdir}/build-${MSYSTEM}" + DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake --build . --target install + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-libdeflate/001-libdeflate-makefile-mingw-fix.patch b/mingw-w64-libdeflate/001-libdeflate-makefile-mingw-fix.patch index 9e93481d02..7b5b855c6d 100644 --- a/mingw-w64-libdeflate/001-libdeflate-makefile-mingw-fix.patch +++ b/mingw-w64-libdeflate/001-libdeflate-makefile-mingw-fix.patch @@ -1,38 +1,20 @@ ---- libdeflate-1.10.orig/Makefile 2022-02-06 23:48:22.000000000 +0100 -+++ libdeflate-1.10/Makefile 2022-02-23 12:49:50.164770700 +0100 -@@ -92,14 +92,17 @@ - TARGET_MACHINE := $(shell $(CC) -dumpmachine 2>/dev/null) +diff -Naur libdeflate-1.11.orig/Makefile libdeflate-1.11/Makefile +--- libdeflate-1.11.orig/Makefile 2022-05-24 05:52:26.000000000 +0200 ++++ libdeflate-1.11/Makefile 2022-06-13 11:42:00.035975900 +0200 +@@ -93,11 +93,10 @@ - # Compiling for Windows with MinGW? --ifneq ($(findstring -mingw,$(TARGET_MACHINE)),) + # Compiling for Windows with MinGW or LLVM? + ifneq ($(findstring -mingw,$(TARGET_MACHINE))$(findstring -windows-gnu,$(TARGET_MACHINE)),) - STATIC_LIB_SUFFIX := static.lib -+ifneq ($(findstring -mingw,$(TARGET_MACHINE))$(findstring -windows-gnu,$(TARGET_MACHINE)),) SHARED_LIB := libdeflate.dll SHARED_LIB_SYMLINK := SHARED_LIB_CFLAGS := - SHARED_LIB_LDFLAGS := -Wl,--out-implib,libdeflate.lib \ -- -Wl,--output-def,libdeflate.def \ -- -Wl,--add-stdcall-alias + SHARED_LIB_LDFLAGS := -Wl,--out-implib,libdeflate.dll.a \ -+ -Wl,--output-def,libdeflate.def -+ # only if not clang -+ ifeq ($(findstring -windows-gnu,$(TARGET_MACHINE)),) -+ SHARED_LIB_LDFLAGS += -Wl,--add-stdcall-alias -+ endif -+ - PROG_SUFFIX := .exe - PROG_CFLAGS := -static -municode - HARD_LINKS := -@@ -111,7 +114,7 @@ - # On Windows it may also have a .exe extension. - ifeq ($(AR),ar) - AR := $(shell echo $(CC) | \ -- sed -E 's/g?cc(-?[0-9]+(\.[0-9]+)*)?(\.exe)?$$/ar\3/') -+ sed -E 's/(g?cc|clang)(-?[0-9]+(\.[0-9]+)*)?(\.exe)?$$/ar\4/') - endif - - # Compiling for macOS? -@@ -331,7 +334,8 @@ + -Wl,--output-def,libdeflate.def + # Only if not LLVM + ifeq ($(findstring -windows-gnu,$(TARGET_MACHINE)),) +@@ -344,7 +343,8 @@ $(DESTDIR)$(BINDIR) install -m644 $(STATIC_LIB) $(DESTDIR)$(LIBDIR) if [ -z "$(DISABLE_SHARED)" ]; then \ @@ -42,7 +24,7 @@ fi sed -e "s|@PREFIX@|$(PREFIX)|" \ -e "s|@LIBDIR@|$(LIBDIR)|" \ -@@ -351,7 +355,8 @@ +@@ -369,7 +369,8 @@ uninstall: rm -f $(DESTDIR)$(LIBDIR)/$(STATIC_LIB) \ diff --git a/mingw-w64-libdeflate/PKGBUILD b/mingw-w64-libdeflate/PKGBUILD index e7539c2141..d5f60fbdaa 100644 --- a/mingw-w64-libdeflate/PKGBUILD +++ b/mingw-w64-libdeflate/PKGBUILD @@ -3,7 +3,7 @@ _realname=libdeflate pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.10 +pkgver=1.12 pkgrel=1 pkgdesc="Heavily optimized library for DEFLATE/zlib/gzip compression and decompression (mingw-w64)" arch=('any') @@ -13,8 +13,8 @@ license=('MIT') makedepends=("${MINGW_PACKAGE_PREFIX}-cc") source=(${_realname}-${pkgver}.tar.gz::"${url}/archive/v${pkgver}.tar.gz" "001-libdeflate-makefile-mingw-fix.patch") -sha256sums=('5c1f75c285cd87202226f4de49985dcb75732f527eefba2b3ddd70a8865f2533' - 'e03b8729f0fd78802ad311449e24647e51d4135b1c50820c1ef000e0cab15c2b') +sha256sums=('ba89fb167a5ab6bbdfa6ee3b1a71636e8140fa8471cce8a311697584948e4d06' + 'a5648a9e8d5d64b1a9301ad5f555052c8a8f2967a1a50a422f99fbd4f6a5dc4f') prepare() { cd "${srcdir}"/${_realname}-${pkgver} diff --git a/mingw-w64-libproxy/PKGBUILD b/mingw-w64-libproxy/PKGBUILD index 0ccf6a46a7..03bbf213e4 100644 --- a/mingw-w64-libproxy/PKGBUILD +++ b/mingw-w64-libproxy/PKGBUILD @@ -4,7 +4,7 @@ _realname=libproxy pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.4.17 -pkgrel=5 +pkgrel=6 pkgdesc="A library that provides automatic proxy configuration management (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -55,6 +55,7 @@ build() { -DWITH_PERL=OFF \ -DWITH_PYTHON2=OFF \ -DWITH_PYTHON3=ON \ + -DPYTHON3_EXECUTABLE="${MINGW_PREFIX}/bin/python.exe" \ ../${_realname}-${pkgver} ${MINGW_PREFIX}/bin/cmake.exe --build ./ diff --git a/mingw-w64-libutp/PKGBUILD b/mingw-w64-libutp/PKGBUILD new file mode 100644 index 0000000000..5fd8b94947 --- /dev/null +++ b/mingw-w64-libutp/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Biswapriyo Nath + +_realname=libutp +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=r99.fda9f4b +pkgrel=1 +pkgdesc='uTorrent Transport Protocol library (mingw-w64)' +arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') +url='https://github.com/bittorrent/libutp' +license=('spdx:MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-ninja" + "${MINGW_PACKAGE_PREFIX}-cc" + 'git') +# Use commit matching transmission 3.00 +_commit='fda9f4b3db97ccb243fcbed2ce280eb4135d705b' +source=("${_realname}"::"git+https://github.com/transmission/libutp.git#commit=${_commit}") +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" + + declare -a extra_config + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi + + # From Makefile.am, fixes clang build + CXXFLAGS+=" -fno-exceptions -fno-rtti" \ + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + "${MINGW_PREFIX}"/bin/cmake.exe \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + "${extra_config[@]}" \ + ../${_realname} + + "${MINGW_PREFIX}"/bin/cmake.exe --build . +} + +package() { + cd "${srcdir}/build-${MSYSTEM}" + DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . + install -Dm644 "${srcdir}/${_realname}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" +} diff --git a/mingw-w64-mypaint/PKGBUILD b/mingw-w64-mypaint/PKGBUILD index 961a1c9f24..6cdb5198d1 100644 --- a/mingw-w64-mypaint/PKGBUILD +++ b/mingw-w64-mypaint/PKGBUILD @@ -4,7 +4,7 @@ _realname=mypaint pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.0.1 -pkgrel=2 +pkgrel=3 arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') pkgdesc="Simple drawing & painting program that works well with Wacom-style graphics tablets (mingw-w64)" @@ -21,7 +21,8 @@ depends=("${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" "${MINGW_PACKAGE_PREFIX}-mypaint-brushes2" "${MINGW_PACKAGE_PREFIX}-python-cairo" "${MINGW_PACKAGE_PREFIX}-python-gobject" - "${MINGW_PACKAGE_PREFIX}-python-numpy") + "${MINGW_PACKAGE_PREFIX}-python-numpy" + $([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-openmp")) makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-swig" diff --git a/mingw-w64-opencolorio/010-openimageio-cmake.patch b/mingw-w64-opencolorio/010-openimageio-cmake.patch new file mode 100644 index 0000000000..d748e0a220 --- /dev/null +++ b/mingw-w64-opencolorio/010-openimageio-cmake.patch @@ -0,0 +1,45 @@ +diff -urN opencolorio-1.1.1/share/cmake/OCIOMacros.cmake.orig opencolorio-1.1.1/share/cmake/OCIOMacros.cmake +--- opencolorio-1.1.1/share/cmake/OCIOMacros.cmake.orig 2022-06-13 13:52:56.671569300 +0200 ++++ opencolorio-1.1.1/share/cmake/OCIOMacros.cmake 2022-06-13 16:30:14.553310600 +0200 +@@ -21,7 +21,7 @@ + # Find GLUT + find_package(GLUT) + if(GLUT_FOUND) +- message(STATUS "Found GLUT library ${GLUT_LIBRARY}") ++ message(STATUS "Found GLUT library ${GLUT_LIBRARIES}") + else() + message(STATUS "GLUT not found") + endif() +@@ -62,6 +62,12 @@ + ENDMACRO() + + MACRO(OCIOFindOpenImageIO) ++ pkg_search_module(OIIO_PC OpenImageIO) ++ ++ if(OIIO_PC_FOUND) ++ set(OIIO_LIBRARIES ${OIIO_PC_LDFLAGS}) ++ set(OIIO_INCLUDES ${OIIO_PC_CFLAGS}) ++ else() + if(OIIO_PATH) + message(STATUS "OIIO path explicitly specified: ${OIIO_PATH}") + endif() +@@ -91,6 +97,7 @@ + /sw/lib + /opt/local/lib + DOC "The OIIO library") ++ endif() + + if(OIIO_INCLUDES AND OIIO_LIBRARIES) + set(OIIO_FOUND TRUE) +diff -urN opencolorio-1.1.1/src/apps/ociodisplay/CMakeLists.txt.orig opencolorio-1.1.1/src/apps/ociodisplay/CMakeLists.txt +--- opencolorio-1.1.1/src/apps/ociodisplay/CMakeLists.txt.orig 2019-03-28 06:12:57.000000000 +0100 ++++ opencolorio-1.1.1/src/apps/ociodisplay/CMakeLists.txt 2022-06-13 16:31:13.705807100 +0200 +@@ -13,7 +13,7 @@ + + # set_target_properties(ociodisplay PROPERTIES INSTALL_RPATH ${OIIO_LIBRARIES} ) + set_target_properties(ociodisplay PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) +- target_link_libraries(ociodisplay ${GLEW_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${OIIO_LIBRARIES}) ++ target_link_libraries(ociodisplay ${GLEW_LIBRARIES} ${GLUT_LIBRARIES} ${OPENGL_LIBRARY} ${OIIO_LIBRARIES}) + target_link_OCIO(ociodisplay) + + install(TARGETS ociodisplay EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin) diff --git a/mingw-w64-opencolorio/PKGBUILD b/mingw-w64-opencolorio/PKGBUILD index 9892057c68..cdf0b35bb3 100644 --- a/mingw-w64-opencolorio/PKGBUILD +++ b/mingw-w64-opencolorio/PKGBUILD @@ -6,12 +6,12 @@ pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") pkgver=1.1.1 -pkgrel=15 +pkgrel=16 pkgdesc="A color management framework for visual effects and animation (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') url="https://opencolorio.org/" -license=('BSD') +license=('spdx:BSD-3-Clause') depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-expat" "${MINGW_PACKAGE_PREFIX}-glew" @@ -25,8 +25,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-pkg-config" "${MINGW_PACKAGE_PREFIX}-pystring" "${MINGW_PACKAGE_PREFIX}-cc" - $([[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || \ - echo "${MINGW_PACKAGE_PREFIX}-openimageio")) # Remove this workaround after available in repo + "${MINGW_PACKAGE_PREFIX}-openimageio") options=('strip' '!debug') source=(${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/OpenColorIO/archive/v${pkgver}.tar.gz 001-fix-typo-in-formatregistry.patch @@ -37,7 +36,8 @@ source=(${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/OpenColorIO 006-mingw-no-dupenv_s.patch 007-detect-mingw-python.patch 008-export-attributes.patch - 009-python-module-extension.patch) + 009-python-module-extension.patch + 010-openimageio-cmake.patch) sha256sums=('c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8' '22a8df1dc67ce9da35f2795b4be495ace59620416bc3767fb7dbcbc8b1f2a9e8' 'fa8c45602714eb70c7bbde05a37edf3b1cd1188e3667151af03c971bf11f3fd4' @@ -47,19 +47,30 @@ sha256sums=('c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8' '3251ea540eae1fb0648248f0c60179765956003a1c4adbf6c88e7476171a8702' '330a81ce83c32bfffe214b3404c5001585b9113a0e58572ea09bb67960a80ced' '5df481814e34ea162d5a48582b3055e3411c1ca206601724c2d7220e5b7649cb' - '7cdfee2b802c8c74ff455191179d265ebd9359db35feec9405c93f47afff4b6e') + '7cdfee2b802c8c74ff455191179d265ebd9359db35feec9405c93f47afff4b6e' + '9316b0686ca143d863788a5941f51b900642fe3410d6f112a1157ee1fe3c2d05') + +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying $_patch" + patch -Np1 -i "${srcdir}/$_patch" + done +} prepare() { cd ${_realname}-${pkgver} - patch -p1 -i ${srcdir}/001-fix-typo-in-formatregistry.patch - patch -p1 -i ${srcdir}/002-mingw-w64.patch - patch -p1 -i ${srcdir}/003-fix-redefinitions.patch - patch -p1 -i ${srcdir}/004-msvc-flags.patch - patch -p1 -i ${srcdir}/005-declspec-typo.patch - patch -p1 -i ${srcdir}/006-mingw-no-dupenv_s.patch - patch -p1 -i ${srcdir}/007-detect-mingw-python.patch - patch -p1 -i ${srcdir}/008-export-attributes.patch - patch -p1 -i ${srcdir}/009-python-module-extension.patch + apply_patch_with_msg \ + 001-fix-typo-in-formatregistry.patch \ + 002-mingw-w64.patch \ + 003-fix-redefinitions.patch \ + 004-msvc-flags.patch \ + 005-declspec-typo.patch \ + 006-mingw-no-dupenv_s.patch \ + 007-detect-mingw-python.patch \ + 008-export-attributes.patch \ + 009-python-module-extension.patch \ + 010-openimageio-cmake.patch # Remove -Werror option from CMakeLists.txt files sed -i "s/-Werror//g" $(grep -rl Werror) @@ -78,18 +89,18 @@ build() { extra_config+=("-DCMAKE_BUILD_TYPE=Debug") fi - [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" - mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + [[ -d "build-${MSYSTEM}" ]] && rm -rf "build-${MSYSTEM}" + mkdir -p ${srcdir}/build-${MSYSTEM} && cd ${srcdir}/build-${MSYSTEM} local _py3ver=$(${MINGW_PREFIX}/bin/python -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))") MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" \ + "${MINGW_PREFIX}"/bin/cmake \ + -GNinja \ ${extra_config} \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DGLEW_INCLUDES=${MINGW_PREFIX}/include \ - -DGLEW_LIBRARIES=${MINGW_PREFIX}/lib/libglew32.dll.a \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + -DGLEW_INCLUDES="${MINGW_PREFIX}"/include \ + -DGLEW_LIBRARIES="${MINGW_PREFIX}"/lib/libglew32.dll.a \ -DUSE_EXTERNAL_TINYXML=ON \ -DUSE_EXTERNAL_YAML=ON \ -DUSE_EXTERNAL_LCMS=ON \ @@ -97,23 +108,23 @@ build() { -DOCIO_BUILD_PYGLUE=ON \ -DOCIO_PYGLUE_LINK=ON \ -DPYTHON_VERSION=${_py3ver} \ - -DPYTHON=${MINGW_PREFIX}/bin/python.exe \ - -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \ + -DPYTHON="${MINGW_PREFIX}"/bin/python.exe \ + -DPYTHON_EXECUTABLE="${MINGW_PREFIX}"/bin/python.exe \ -DOCIO_BUILD_TRUELIGHT=OFF \ ${_arch_opt} \ ../${_realname}-${pkgver} - make + "${MINGW_PREFIX}"/bin/cmake.exe --build . } package() { - cd build-${MINGW_CHOST} - make DESTDIR=${pkgdir} install - install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE + cd build-${MSYSTEM} + DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . + install -Dm644 "${srcdir}"/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) for _f in "${pkgdir}${MINGW_PREFIX}"/lib/cmake/OpenColorIO/*.cmake; do - sed -e "s|${PREFIX_WIN}|\$\{_IMPORT_PREFIX\}|g" -i ${_f} - sed -e "s|${MINGW_PREFIX}|\$\{_IMPORT_PREFIX\}|g" -i ${_f} + sed -e "s|${PREFIX_WIN}|\$\{_IMPORT_PREFIX\}|g" -i "${_f}" + sed -e "s|${MINGW_PREFIX}|\$\{_IMPORT_PREFIX\}|g" -i "${_f}" done } diff --git a/mingw-w64-pdal/0001-fileutils.patch b/mingw-w64-pdal/0001-fileutils.patch new file mode 100644 index 0000000000..d9357cbcc1 --- /dev/null +++ b/mingw-w64-pdal/0001-fileutils.patch @@ -0,0 +1,21 @@ +diff -urN PDAL-2.4.2-src/pdal/util/FileUtils.cpp.orig PDAL-2.4.2-src/pdal/util/FileUtils.cpp +--- PDAL-2.4.2-src/pdal/util/FileUtils.cpp.orig 2022-06-15 00:11:24.813443300 +0200 ++++ PDAL-2.4.2-src/pdal/util/FileUtils.cpp 2022-06-15 00:24:34.739874100 +0200 +@@ -234,7 +234,7 @@ + fs::directory_iterator end; + while (it != end) + { +- files.push_back(fromNative(it->path())); ++ files.push_back(it->path().u8string()); + it++; + } + } +@@ -556,7 +556,7 @@ + } + } + +-#ifndef _WIN32 ++#ifndef PDAL_WIN32_STL + ctx.m_fd = ::open(filename.c_str(), readOnly ? O_RDONLY : O_RDWR); + #else + ctx.m_fd = ::_wopen(toNative(filename).data(), readOnly ? O_RDONLY : O_RDWR); diff --git a/mingw-w64-pdal/PKGBUILD b/mingw-w64-pdal/PKGBUILD index a11c5909a1..9214ca7ecc 100644 --- a/mingw-w64-pdal/PKGBUILD +++ b/mingw-w64-pdal/PKGBUILD @@ -3,20 +3,37 @@ _realname=pdal pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.4.0 +pkgver=2.4.2 pkgrel=1 pkgdesc="A C++ library for translating and manipulating point cloud data (mingw-w64)" arch=(any) mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') url="http://www.pdal.io" -license=('BSD') +license=('spdx:BSD-3-Clause') depends=("${MINGW_PACKAGE_PREFIX}-gdal") makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-pkg-config") -source=("https://github.com/PDAL/PDAL/releases/download/${pkgver}/PDAL-${pkgver}-src.tar.gz") -sha256sums=('c08e56c0d3931ab9e612172d5836673dfa2d5e6b2bf4f8d22c912b126b590b15') +source=("https://github.com/PDAL/PDAL/releases/download/${pkgver}/PDAL-${pkgver}-src.tar.gz" + "0001-fileutils.patch") +sha256sums=('582309942dc7b0fe9c3e652aa4c9c3ec3b8c6f56401a0bf3f6237d3347e8f616' + '465744dde252f15dd6f97901d007d64bf7e70b34354efcf500677973974e7f1d') + +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying $_patch" + patch -Np1 -i "${srcdir}/$_patch" + done +} + +prepare() { + cd "${srcdir}/PDAL-${pkgver}-src" + + apply_patch_with_msg \ + 0001-fileutils.patch +} build() { [[ -d "${srcdir}"/build-${MSYSTEM} ]] && rm -rf "${srcdir}"/build-${MSYSTEM} @@ -30,21 +47,21 @@ build() { fi MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - ${MINGW_PREFIX}/bin/cmake \ + "${MINGW_PREFIX}"/bin/cmake.exe \ -Wno-dev \ - -G"Ninja" \ + -GNinja \ ${extra_config[@]} \ -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ -DBUILD_SHARED_LIBS=ON \ -DWITH_TESTS=OFF \ ../PDAL-${pkgver}-src - ${MINGW_PREFIX}/bin/cmake --build . + "${MINGW_PREFIX}"/bin/cmake.exe --build . } package() { cd "${srcdir}"/build-${MSYSTEM} - DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install . + DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . install -Dm644 "${srcdir}"/PDAL-${pkgver}-src/LICENSE.txt "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-postgis/0001-clang-postgresql.patch b/mingw-w64-postgis/0001-clang-postgresql.patch new file mode 100644 index 0000000000..4f3676fca2 --- /dev/null +++ b/mingw-w64-postgis/0001-clang-postgresql.patch @@ -0,0 +1,11 @@ +diff -urN postgis-3.2.1/postgis/Makefile.in.orig postgis-3.2.1/postgis/Makefile.in +--- postgis-3.2.1/postgis/Makefile.in.orig 2022-02-13 01:55:42.000000000 +0100 ++++ postgis-3.2.1/postgis/Makefile.in 2022-06-14 21:57:44.114299000 +0200 +@@ -178,6 +178,7 @@ + # may be confusing and out-of-control for the builder of + # PostGIS + LDFLAGS = @LDFLAGS@ ++LIBS = @LIBS@ + + # If REGRESS=1 passed as a parameter, change the default install paths + # so that no prefix is included. This allows us to relocate to a temporary diff --git a/mingw-w64-postgis/PKGBUILD b/mingw-w64-postgis/PKGBUILD index 6ca4e38eda..d6a1d6079d 100644 --- a/mingw-w64-postgis/PKGBUILD +++ b/mingw-w64-postgis/PKGBUILD @@ -3,13 +3,13 @@ _realname=postgis pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.1.4 -pkgrel=5 +pkgver=3.2.1 +pkgrel=1 pkgdesc="Spatial and Geographic objects for PostgreSQL (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') url="https://postgis.net/" -license=('GPL2') +license=('spdx:GPL-2.0-or-later') makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools") depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-geos" @@ -22,13 +22,28 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-gdal") options=('staticlibs' 'strip') source=("https://download.osgeo.org/postgis/source/${_realname}-${pkgver}.tar.gz" - pg_config) -sha256sums=('dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796' - '3cd5a095cd4de7cb7d5f5fa9dbc02dfe02297ae1743c2961e70d9110d214f64f') + pg_config + 0001-clang-postgresql.patch) +sha256sums=('fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e' + '3cd5a095cd4de7cb7d5f5fa9dbc02dfe02297ae1743c2961e70d9110d214f64f' + '5e3a39bdacbbb6825206df61c49a0479da8d6201ff78423fc0bdbeaf44b70e3d') + +apply_patch_with_msg() { + for _fname in "$@" + do + msg2 "Applying ${_fname}" + patch -Nbp1 -i "${srcdir}"/${_fname} + done +} prepare() { cd ${_realname}-${pkgver} + if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then + apply_patch_with_msg \ + 0001-clang-postgresql.patch + fi + ./autogen.sh } @@ -36,6 +51,13 @@ build() { [[ -d "${srcdir}"/build-${MSYSTEM} ]] && rm -rf "${srcdir}"/build-${MSYSTEM} cp -r ${_realname}-${pkgver} "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM} + CXXFLAGS+=" -std=gnu++17" + + # workaround to fix linking PostgreSQL with clang + if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then + export LIBS="-lc++" + fi + ./configure \ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ diff --git a/mingw-w64-precice/0001-fix-include.patch b/mingw-w64-precice/0001-fix-include.patch new file mode 100644 index 0000000000..0670687fda --- /dev/null +++ b/mingw-w64-precice/0001-fix-include.patch @@ -0,0 +1,12 @@ +diff -urN precice-2.3.0/src/com/ConnectionInfoPublisher.cpp.orig precice-2.3.0/src/com//ConnectionInfoPublisher.cpp +--- precice-2.3.0/src/com/ConnectionInfoPublisher.cpp.orig 2021-10-06 12:55:21.000000000 +0200 ++++ precice-2.3.0/src/com//ConnectionInfoPublisher.cpp 2022-06-13 13:10:15.253682600 +0200 +@@ -4,7 +4,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "ConnectionInfoPublisher.hpp" diff --git a/mingw-w64-precice/PKGBUILD b/mingw-w64-precice/PKGBUILD index c9d090d5e0..a67c2836a9 100644 --- a/mingw-w64-precice/PKGBUILD +++ b/mingw-w64-precice/PKGBUILD @@ -8,7 +8,7 @@ _realname=precice pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=2.3.0 -pkgrel=7 +pkgrel=8 pkgdesc='A Coupling Library for Partitioned Multi-Physics Simulations on Massively Parallel Systems (mingw-w64)' arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64') @@ -23,10 +23,26 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-petsc-build" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-cmake" "git") -license=('LGPL3') +license=('spdx:LGPL-3.0-or-later') url='https://www.precice.org' -source=(https://github.com/precice/precice/archive/v${pkgver}.tar.gz) -sha256sums=('57BAB08E8B986F5FAA364689D470940DBD9C138E5CFA7B861793E7DB56B89DA3') +source=(https://github.com/precice/precice/archive/v${pkgver}.tar.gz + "0001-fix-include.patch") +sha256sums=('57bab08e8b986f5faa364689d470940dbd9c138e5cfa7b861793e7db56b89da3' + '5049cbbbaa7fa8d682c8713295b4e4873f483cd68551fc7762496aecfd56f135') + +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying $_patch" + patch -Np1 -i "${srcdir}/$_patch" + done +} + +prepare() { + cd ${_realname}-${pkgver} + apply_patch_with_msg \ + 0001-fix-include.patch +} build() { local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) diff --git a/mingw-w64-prjtrellis/PKGBUILD b/mingw-w64-prjtrellis/PKGBUILD index 09a37825fa..aa7308ce23 100644 --- a/mingw-w64-prjtrellis/PKGBUILD +++ b/mingw-w64-prjtrellis/PKGBUILD @@ -3,67 +3,70 @@ _realname=prjtrellis pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.0.r1033.3ae21cf -pkgrel=2 +pkgver=1.2.1 +pkgrel=1 pkgdesc="Documenting the Lattice ECP5 bit-stream format (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') url="https://github.com/YosysHQ/prjtrellis" -license=('MIT') +license=('spdx:MIT') groups=("${MINGW_PACKAGE_PREFIX}-eda") depends=( "${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-python" + $([[ ${MSYSTEM} == MINGW32 ]] || echo "${MINGW_PACKAGE_PREFIX}-python") # memory footprint of cc1plus is too large for mingw32 ) makedepends=( "${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-ninja" "git" ) -_commit="3ae21cf6" -source=("${_realname}::git+https://github.com/YosysHQ/${_realname}.git#commit=${_commit}" - "prjtrellis-db::git+https://github.com/YosysHQ/prjtrellis-db") -sha256sums=('SKIP' +_commit_db='35d900a94ff0db152679a67bf6e4fbf40ebc34aa' + +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/YosysHQ/prjtrellis/archive/refs/tags/${pkgver}.tar.gz" + "${_realname}-db"::"git+https://github.com/YosysHQ/prjtrellis-db.git#commit=${_commit_db}") +sha256sums=('561f7881dc6d39c7ac47721e19aed533c230b47a684aa9a0c3dae08cdc3d8dbb' 'SKIP') -pkgver() { - cd "${_realname}" - printf "1.0.r%s.%s" "$(git rev-list --count "${_commit}")" "$(git rev-parse --short "${_commit}")" -} - prepare () { - cd "${_realname}" - git submodule init - git config submodule.database.url $srcdir/prjtrellis-db - git submodule update + cd "${srcdir}/${_realname}-db" + cp -r * "${srcdir}/${_realname}-${pkgver}/database/" } build() { - cd "${srcdir}/${_realname}"/libtrellis + [[ -d "${srcdir}/build-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-${MSYSTEM}" + mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" - MSYS2_ARG_CONV_EXCL='-DCMAKE_INSTALL_PREFIX=' cmake \ - -G "MSYS Makefiles" \ - -DCMAKE_PREFIX_PATH=${MINGW_PREFIX} \ - -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ - . - make + if [[ ${MSYSTEM} == MINGW32 ]]; then + _python_opt="-DBUILD_PYTHON=OFF" + fi + + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + "${MINGW_PREFIX}"/bin/cmake.exe \ + -GNinja \ + -DCMAKE_PREFIX_PATH="${MINGW_PREFIX}" \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + ${_python_opt} \ + ../${_realname}-${pkgver}/libtrellis + + "${MINGW_PREFIX}"/bin/cmake.exe --build . } check() { - cd "${srcdir}/${_realname}"/libtrellis + cd "${srcdir}/build-${MSYSTEM}" + for item in ecpbram ecpmulti ecppack ecppll ecpunpack; do - echo "> Check $item" + msg2 "Check $item" ./"$item" --help done } package() { - cd "${srcdir}/${_realname}"/libtrellis - make DESTDIR="${pkgdir}" install + cd "${srcdir}/build-${MSYSTEM}" - _licenses="${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}" - mkdir -p "${_licenses}" - install -m 644 "${srcdir}/${_realname}"/COPYING "${_licenses}" + DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . + + install -Dm644 "${srcdir}/${_realname}-${pkgver}"/COPYING "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE } diff --git a/mingw-w64-pyqt-builder/001-mingw-python.patch b/mingw-w64-pyqt-builder/001-mingw-python.patch index 8e12c3ce09..8ad9279d26 100644 --- a/mingw-w64-pyqt-builder/001-mingw-python.patch +++ b/mingw-w64-pyqt-builder/001-mingw-python.patch @@ -43,16 +43,12 @@ '}']) # Add any installables from the buildable. -@@ -501,7 +505,11 @@ - raise UserException( +@@ -501,6 +505,8 @@ "Unexpected output from qmake: '{0}'".format(line)) -- name, value = tokens -+ if sysconfig._POSIX_BUILD and "MSYSTEM" in os.environ: -+ name = tokens[0] -+ value = os.popen(' '.join(['cygpath', '--unix', tokens[1]])).readline().strip() -+ else: -+ name, value = tokens + name, value = tokens ++ if sysconfig._POSIX_BUILD and "MSYSTEM" in os.environ and value != "": ++ value = os.popen(' '.join(['cygpath', '--unix', value])).readline().strip() else: name = tokens value = None diff --git a/mingw-w64-pyqt-builder/PKGBUILD b/mingw-w64-pyqt-builder/PKGBUILD index 06c08de811..1cec06a8ea 100644 --- a/mingw-w64-pyqt-builder/PKGBUILD +++ b/mingw-w64-pyqt-builder/PKGBUILD @@ -5,7 +5,7 @@ _realname=pyqt-builder pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.12.2 -pkgrel=4 +pkgrel=5 pkgdesc="The PEP 517 compliant PyQt build system (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') @@ -19,7 +19,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc") source=("https://pypi.io/packages/source/P/PyQt-builder/PyQt-builder-${pkgver}.tar.gz" 001-mingw-python.patch) sha256sums=('f62bb688d70e0afd88c413a8d994bda824e6cebd12b612902d1945c5a67edcd7' - 'dad5b3ddd7bfaeeb3787842a80a583adeeae3b12a3eb6ff98f06930342796b71') + '33475c8c5ba85dbcd7de8108bfca8095c6f25206eb33b3f7a24cb43d3c1ac169') prepare() { cd ${_realname}-${pkgver} @@ -43,9 +43,10 @@ package() { ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \ --root="${pkgdir}" --optimize=1 --skip-build - # Remove python.exe full path reference - PREFIX_WIN=$(cygpath -m ${MINGW_PREFIX}) - sed -s "s|${PREFIX_WIN}/bin/||g" -i "${pkgdir}${MINGW_PREFIX}/bin/pyqt-bundle-script.py" + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*-script.py; do + # Remove shebang line + sed -e '1 { s/^#!.*$// }' -i "${_f}" + done # Delete bundled MSVC DLLs rm -rf "${pkgdir}"/${MINGW_PREFIX}/lib/python*/site-packages/pyqtbuild/bundle/dlls diff --git a/mingw-w64-python-lief/PKGBUILD b/mingw-w64-python-lief/PKGBUILD index 8339ac121e..72fd23e150 100644 --- a/mingw-w64-python-lief/PKGBUILD +++ b/mingw-w64-python-lief/PKGBUILD @@ -4,8 +4,8 @@ _realname=lief pkgbase=mingw-w64-python-${_realname} pkgname=${MINGW_PACKAGE_PREFIX}-python-${_realname} pkgdesc="LIEF - Library to Instrument Executable Formats (mingw-w64)" -pkgver=0.12.0 -pkgrel=2 +pkgver=0.12.1 +pkgrel=1 arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') url="https://github.com/lief-project/LIEF/" @@ -18,9 +18,9 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-python-setuptools") options=('staticlibs' '!strip' '!debug') -source=(https://github.com/lief-project/LIEF/archive/${pkgver}.tar.gz +source=(lief-${pkgver}.zip::https://pypi.io/packages/source/l/lief/lief-${pkgver}.zip lief.patch) -sha256sums=('4a5b893f514b03092885ef4dc0760ac8dd61860bee991e5af7f31bb33f12fc13' +sha256sums=('4ff4ccfae2e1ee4ccba2b5556027dbb56282b8a973c5835c5b597e8b7b664416' 'a85f8ae0cc72dd675bc6a9a5276f65c1136d07969976888b2609d378b4e81479') prepare() { diff --git a/mingw-w64-python-tomli/PKGBUILD b/mingw-w64-python-tomli/PKGBUILD index 6a7b9245db..c9e58470f0 100644 --- a/mingw-w64-python-tomli/PKGBUILD +++ b/mingw-w64-python-tomli/PKGBUILD @@ -1,12 +1,12 @@ # Maintainer: J. Peter Mugaas -_bootstrapping=yes +_bootstrapping=no _realname=tomli pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") pkgver=2.0.1 -pkgrel=4 +pkgrel=5 pkgdesc="A lil' TOML parser (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') diff --git a/mingw-w64-python-wheel/PKGBUILD b/mingw-w64-python-wheel/PKGBUILD index b1b869c9e1..2e29694e6b 100644 --- a/mingw-w64-python-wheel/PKGBUILD +++ b/mingw-w64-python-wheel/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: J. Peter Mugaas -_bootstrapping=yes +_bootstrapping=no _pyname=wheel _realname=${_pyname} @@ -10,7 +10,7 @@ provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=0.37.1 -pkgrel=3 +pkgrel=4 pkgdesc="A built-package format for Python (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') diff --git a/mingw-w64-transmission/PKGBUILD b/mingw-w64-transmission/PKGBUILD index 09f93c191e..84a00d866f 100644 --- a/mingw-w64-transmission/PKGBUILD +++ b/mingw-w64-transmission/PKGBUILD @@ -3,11 +3,11 @@ _realname=transmission pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.94 -pkgrel=2 +pkgver=3.00 +pkgrel=1 pkgdesc="Fast, easy, and free BitTorrent client (mingw-w64)" arch=('any') -mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') url='https://www.transmissionbt.com/' license=('MIT') depends=("${MINGW_PACKAGE_PREFIX}-openssl" @@ -17,29 +17,41 @@ depends=("${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-miniupnpc") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-cc") + "${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-libutp" + "${MINGW_PACKAGE_PREFIX}-ninja" + "intltool") options=('strip' 'staticlibs') source=("https://github.com/transmission/transmission-releases/raw/master/transmission-${pkgver}.tar.xz" + "https://raw.githubusercontent.com/transmission/transmission/${pkgver}/po/pt_PT.po" # missing in tarball "skip-broken-cmake-rc.patch") -sha256sums=('35442cc849f91f8df982c3d0d479d650c6ca19310a994eccdaa79a4af3916b7d' - '2aa843e0d5cd342e8008280bc9d97a8e503c1c3c5fe9e418cdbd203f959733d5') +sha256sums=('9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2' + 'f96b4b03d977fadca51716bcecc51582c980a7d5f1e1519b97837955f5fae59e' + '7cdf69c16bcc3966e40e2ff237d98488c6606e3396270691f0fb7263a287c498') prepare() { - cd "$srcdir"/${_realname}-${pkgver} - + cd "${srcdir}"/${_realname}-${pkgver} patch -p1 -i ${srcdir}/skip-broken-cmake-rc.patch + cp "${srcdir}/pt_PT.po" po/ } build() { - cd "$srcdir"/${_realname}-${pkgver} - [[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH} - mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH} + cd "${srcdir}/${_realname}-${pkgver}" + mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" + + declare -a extra_config + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi # TODO: package more needed libraries instead of including them. MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - ${MINGW_PREFIX}/bin/cmake \ - -G'MSYS Makefiles' \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + "${MINGW_PREFIX}"/bin/cmake.exe \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \ + "${extra_config[@]}" \ -DENABLE_TESTS=OFF \ -DENABLE_QT=OFF \ -DENABLE_GTK=ON \ @@ -47,16 +59,16 @@ build() { -DUSE_SYSTEM_DHT=OFF \ -DUSE_SYSTEM_MINIUPNPC=ON \ -DUSE_SYSTEM_NATPMP=OFF \ - -DUSE_SYSTEM_UTP=OFF \ + -DUSE_SYSTEM_UTP=ON \ -DUSE_SYSTEM_B64=OFF \ -DWITH_CRYPTO=openssl \ ../${_realname}-${pkgver} - make + "${MINGW_PREFIX}"/bin/cmake.exe --build . } package() { - cd "${srcdir}"/build-${CARCH} + cd "${srcdir}/build-${MSYSTEM}" - make install DESTDIR="${pkgdir}" + DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . } diff --git a/mingw-w64-transmission/skip-broken-cmake-rc.patch b/mingw-w64-transmission/skip-broken-cmake-rc.patch index 25a6c672bd..b5f18c28ef 100644 --- a/mingw-w64-transmission/skip-broken-cmake-rc.patch +++ b/mingw-w64-transmission/skip-broken-cmake-rc.patch @@ -1,9 +1,9 @@ ---- transmission-2.92/gtk/CMakeLists.txt.orig 2017-09-25 21:22:58.414905400 +0200 -+++ transmission-2.92/gtk/CMakeLists.txt 2017-09-25 21:23:16.236137000 +0200 -@@ -148,7 +148,6 @@ - ${${PROJECT_NAME}_SOURCES} +--- a/gtk/CMakeLists.txt ++++ b/gtk/CMakeLists.txt +@@ -155,7 +155,6 @@ ${${PROJECT_NAME}_HEADERS} ${${PROJECT_NAME}_DESKTOP_FILE} + ${${PROJECT_NAME}_APPDATA_FILE} - ${${PROJECT_NAME}_WIN32_RC_FILE} )