Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Remove 3rdparty folder

Dmitry Kazakove902d4f541ea
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
deleted file mode 100644
index 785dc6a0b7..0000000000
--- a/3rdparty/CMakeLists.txt
+++ /dev/null
@@ -1,728 +0,0 @@
-project (krita-and-all-its-deps)
-
-if (POLICY CMP0135)
- cmake_policy(SET CMP0135 OLD)
-endif()
-
-#
-# Build all dependencies for Krita and finally Krita itself.
-# Parameters: EXTERNALS_DOWNLOAD_DIR place to download all packages
-# INSTALL_ROOT place to install everything to
-# MXE_TOOLCHAIN: the toolchain file to cross-compile using MXE
-#
-# Example usage: cmake ..\kritadeposx -DEXTERNALS_DOWNLOAD_DIR=/dev2/d -DINSTALL_ROOT=/dev2/i -DWIN64_BUILD=TRUE -DBOOST_LIBRARYDIR=/dev2/i/lib -G "Visual Studio 11 Win64"
-
-if(APPLE)
- execute_process(COMMAND sysctl -n hw.optional.arm64 OUTPUT_VARIABLE apple_has_arm64_optional)
- if(apple_has_arm64_optional)
- message(STATUS "Building on macos arm")
- cmake_minimum_required(VERSION 3.19.3)
- else()
- cmake_minimum_required(VERSION 3.7.2)
- endif()
-else(APPLE)
- cmake_minimum_required(VERSION 3.7.0 FATAL_ERROR)
-endif()
-
-if(POLICY CMP0135)
- cmake_policy(SET CMP0135 NEW)
-endif()
-
-#
-# If you add a new dependency into 3rdparty folder, do **not** overide
-# BUILD_COMMAND and INSTALL_COMMAND with their '-j${SUBMAKE_JOBS}' equivalents,
-# unless you need a really custom command for this dep. CMake will pass the
-# correct threading option to make/ninja automatically. The variable below is
-# Used **only** by custom builds, like sip and boost.
-#
-
-if (NOT SUBMAKE_JOBS)
- include(ProcessorCount)
- ProcessorCount(NUM_CORES)
- if (NOT NUM_CORES EQUAL 0)
- if (NUM_CORES GREATER 2)
- # be nice...
- MATH( EXPR NUM_CORES "${NUM_CORES} - 2" )
- endif()
- set(SUBMAKE_JOBS ${NUM_CORES})
- else()
- set(SUBMAKE_JOBS 1)
- endif()
-endif()
-
-MESSAGE("SUBMAKE_JOBS: " ${SUBMAKE_JOBS})
-
-if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
- message(FATAL_ERROR "Compiling in the source directory is not supported. Use for example 'mkdir build; cd build; cmake ..'.")
-endif (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
-
-# Tools must be obtained to work with:
-include (ExternalProject)
-
-LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake/kde_macro")
-LIST (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
-include (KritaToNativePath)
-include (KritaExternalProject)
-
-# allow specification of a directory with pre-downloaded
-# requirements
-if(DEFINED ENV{EXTERNALS_DOWNLOAD_DIR})
- set(EXTERNALS_DOWNLOAD_DIR $ENV{EXTERNALS_DOWNLOAD_DIR})
-endif()
-
-if(NOT IS_DIRECTORY ${EXTERNALS_DOWNLOAD_DIR})
- message(FATAL_ERROR "No externals download dir set. Use -DEXTERNALS_DOWNLOAD_DIR")
-else()
- file(TO_CMAKE_PATH "${EXTERNALS_DOWNLOAD_DIR}" EXTERNALS_DOWNLOAD_DIR)
-endif()
-
-if(NOT IS_DIRECTORY ${INSTALL_ROOT})
- message(FATAL_ERROR "No install dir set. Use -DINSTALL_ROOT")
-else()
- file(TO_CMAKE_PATH "${INSTALL_ROOT}" INSTALL_ROOT)
-endif()
-
-set(TOP_INST_DIR ${INSTALL_ROOT})
-set(EXTPREFIX "${TOP_INST_DIR}")
-set(CMAKE_PREFIX_PATH "${EXTPREFIX}")
-
-if (${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64")
- SET(GLOBAL_PROFILE
- -DCMAKE_MODULE_LINKER_FLAGS=/machine:x64
- -DCMAKE_EXE_LINKER_FLAGS=/machine:x64
- -DCMAKE_SHARED_LINKER_FLAGS=/machine:x64
- -DCMAKE_STATIC_LINKER_FLAGS=/machine:x64
- )
-endif ()
-
-message( STATUS "CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
-message( STATUS "CMAKE_CL_64: ${CMAKE_CL_64}")
-
-set(GLOBAL_BUILD_TYPE RelWithDebInfo)
-set(GLOBAL_PROFILE ${GLOBAL_PROFILE} -DBUILD_TESTING=false)
-
-if (UNIX AND NOT APPLE)
- set(LINUX true)
- set(PATCH_COMMAND patch)
-endif ()
-
-if (WIN32 OR LINUX)
-option(QT_ENABLE_DEBUG_INFO "Build Qt with full debug info included" OFF)
-option(QT_ENABLE_ASAN "Build Qt with ASAN" OFF)
-endif()
-
-include(FeatureSummary)
-
-if (WIN32)
- set(_is_perl_required)
- set(_perl_type OPTIONAL)
-else()
- set(_is_perl_required REQUIRED)
- set(_perl_type REQUIRED)
-endif()
-find_package(Perl ${_is_perl_required})
-set_package_properties(Perl PROPERTIES
- URL "https://www.perl.org/"
- DESCRIPTION "Perl is a highly capable, feature-rich programming language with over 30 years of development."
- TYPE ${_perl_type}
- PURPOSE "Needed for building Qt from source."
-)
-
-if (WIN32)
- option(ENABLE_MSYS2_FIXES "Enable patches that are needed for MSYS2+Clang Krita build" OFF)
-
- if(ENABLE_MSYS2_FIXES)
- find_package(ZLIB)
- find_package(Iconv)
- find_package(EXPAT)
- find_package(Gettext)
- find_package(OpenSSL)
- endif()
-
- if (NOT ZLIB_FOUND)
- set (ZLIB_DEP ext_zlib)
- endif()
-
- if (NOT Iconv_FOUND)
- set (ICONV_DEP ext_iconv)
- endif()
-
- if (NOT EXPAT_FOUND)
- set (EXPAT_DEP ext_expat)
- endif()
-
- if (NOT Gettext_FOUND)
- set (GETTEXT_DEP ext_gettext)
- endif()
-
- if (NOT OpenSSL_FOUND)
- set (OPENSSL_DEP ext_openssl)
- endif()
-elseif (APPLE OR ANDROID)
- set (ZLIB_DEP ext_zlib)
- set (ICONV_DEP ext_iconv)
- set (GETTEXT_DEP ext_gettext)
-else()
- # In Linux we require system versions for compatibility reasons.
- find_package(ZLIB REQUIRED)
- set_package_properties(ZLIB PROPERTIES
- DESCRIPTION "Compression library"
- URL "https://www.zlib.net/"
- TYPE REQUIRED
- PURPOSE "Needed for building libpng from source.")
- find_package(Iconv REQUIRED)
- set_package_properties(Iconv PROPERTIES
- URL "https://www.gnu.org/software/libiconv/"
- DESCRIPTION "Conversion library"
- TYPE REQUIRED
- PURPOSE "Needed for building exiv2 and gettext from source."
- )
-endif (WIN32)
-
-set(SECURITY_EXE_LINKER_FLAGS "")
-set(SECURITY_SHARED_LINKER_FLAGS "")
-set(SECURITY_MODULE_LINKER_FLAGS "")
-if (MINGW)
- option(USE_MINGW_HARDENING_LINKER "Enable DEP (NX), ASLR and high-entropy ASLR linker flags (mingw-w64)" ON)
- if (USE_MINGW_HARDENING_LINKER)
- set(SECURITY_EXE_LINKER_FLAGS "-Wl,--dynamicbase -Wl,--nxcompat -Wl,--disable-auto-image-base")
- set(SECURITY_SHARED_LINKER_FLAGS "-Wl,--dynamicbase -Wl,--nxcompat -Wl,--disable-auto-image-base")
- set(SECURITY_MODULE_LINKER_FLAGS "-Wl,--dynamicbase -Wl,--nxcompat -Wl,--disable-auto-image-base")
- # Enable high-entropy ASLR for 64-bit
- # The image base has to be >4GB for HEASLR to be enabled.
- # The values used here are kind of arbitrary.
- set(SECURITY_EXE_LINKER_FLAGS "${SECURITY_EXE_LINKER_FLAGS} -Wl,--high-entropy-va -Wl,--image-base,0x140000000")
- set(SECURITY_SHARED_LINKER_FLAGS "${SECURITY_SHARED_LINKER_FLAGS} -Wl,--high-entropy-va -Wl,--image-base,0x180000000")
- set(SECURITY_MODULE_LINKER_FLAGS "${SECURITY_MODULE_LINKER_FLAGS} -Wl,--high-entropy-va -Wl,--image-base,0x180000000")
- set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
- -DCMAKE_EXE_LINKER_FLAGS=${SECURITY_EXE_LINKER_FLAGS}
- -DCMAKE_SHARED_LINKER_FLAGS=${SECURITY_SHARED_LINKER_FLAGS}
- -DCMAKE_MODULE_LINKER_FLAGS=${SECURITY_MODULE_LINKER_FLAGS}
- )
- else ()
- message(WARNING "Linker Security Flags not enabled!")
- endif ()
-
- # Generate reduced debug info
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g1")
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g1")
-
- # Clang does not generate DWARF aranges data by default, which makes
- # DrMingw not able to parse the DWARF debug symbols. Add -gdwarf-aranges
- # explicitly.
- # See: https://github.com/jrfonseca/drmingw/issues/42#issuecomment-516614561
- #
- # `-fdebug-info-for-profiling` is needed for proper C++ function signatures
- # when using Clang with `-g1`.
- if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -gdwarf-aranges -fdebug-info-for-profiling")
- endif ()
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -gdwarf-aranges -fdebug-info-for-profiling")
- endif ()
-
- set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
- -DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_C_FLAGS_RELWITHDEBINFO}
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
- )
-elseif (MSVC)
- set(SECURITY_C_FLAGS "")
- set(SECURITY_CXX_FLAGS "")
- # Increase the stack size to match MinGW's. Prevents crashes with GMic.
- set(SECURITY_EXE_LINKER_FLAGS "/STACK:4194304")
- set(SECURITY_SHARED_LINKER_FLAGS "/STACK:4194304")
- set(SECURITY_MODULE_LINKER_FLAGS "/STACK:4194304")
- option(USE_CONTROL_FLOW_GUARD "Enable Control Flow Guard hardening (MSVC)" ON)
- if (USE_CONTROL_FLOW_GUARD)
- set(SECURITY_C_FLAGS "/guard:cf")
- set(SECURITY_CXX_FLAGS "/guard:cf")
- set(SECURITY_EXE_LINKER_FLAGS "/GUARD:CF")
- set(SECURITY_SHARED_LINKER_FLAGS "/GUARD:CF")
- set(SECURITY_MODULE_LINKER_FLAGS "/GUARD:CF")
- endif (USE_CONTROL_FLOW_GUARD)
- set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
- -DCMAKE_C_FLAGS=${SECURITY_C_FLAGS}
- -DCMAKE_CXX_FLAGS=${SECURITY_CXX_FLAGS}
- -DCMAKE_EXE_LINKER_FLAGS=${SECURITY_EXE_LINKER_FLAGS}
- -DCMAKE_SHARED_LINKER_FLAGS=${SECURITY_SHARED_LINKER_FLAGS}
- -DCMAKE_MODULE_LINKER_FLAGS=${SECURITY_MODULE_LINKER_FLAGS}
- )
-endif ()
-
-if (DEFINED EP_PREFIX)
- set_directory_properties(PROPERTIES EP_PREFIX ${EP_PREFIX})
-endif ()
-
-if (WIN32)
- set(PATCH_COMMAND patch)
-endif()
-
-if (MSYS)
- set(PATCH_COMMAND patch)
- set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
- -DCMAKE_TOOLCHAIN_FILE=${MXE_TOOLCHAIN}
- -DCMAKE_FIND_PREFIX_PATH=${CMAKE_PREFIX_PATH}
- -DCMAKE_SYSTEM_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
- -DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
- -DCMAKE_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib
- -DZLIB_ROOT=${CMAKE_PREFIX_PATH}
- )
- set(GLOBAL_AUTOMAKE_PROFILE --host=i686-pc-mingw32 )
-endif()
-
-if (APPLE)
- set(PARENT_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
- string(REPLACE ";" "$<SEMICOLON>" CMAKE_OSX_ARCHITECTURES_ESCAPED "${CMAKE_OSX_ARCHITECTURES}")
- set(GLOBAL_PROFILE ${GLOBAL_PROFILE}
- -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
- -DCMAKE_INCLUDE_PATH:PATH=${CMAKE_PREFIX_PATH}/include
- -DCMAKE_LIBRARY_PATH:PATH=${CMAKE_PREFIX_PATH}/lib
- -DCMAKE_MACOSX_RPATH=ON
- -DKDE_SKIP_RPATH_SETTINGS=ON
- -DBUILD_WITH_INSTALL_RPATH=ON
- -DAPPLE_SUPPRESS_X11_WARNING=ON
- -DCMAKE_FIND_FRAMEWORK=LAST
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES_ESCAPED}
- )
-
- list(LENGTH CMAKE_OSX_ARCHITECTURES MACOS_ARCHS)
- list(JOIN CMAKE_OSX_ARCHITECTURES " " CMAKE_OSX_ARCHITECTURES_STR)
-
- foreach(arch ${CMAKE_OSX_ARCHITECTURES})
- string(APPEND MACOS_ARCH_FLAGS "-arch ${arch} ")
- endforeach()
- string(STRIP "${MACOS_ARCH_FLAGS}" MACOS_ARCH_FLAGS)
-
- # its recommended to set ld_classic as our target is below macOS 12
- if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
- set(XCODE15_FLAGS "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types -Xlinker -ld_classic")
- endif()
-
- set(GLOBAL_AUTOMAKE_PROFILE
- "CFLAGS=${MACOS_ARCH_FLAGS} ${XCODE15_FLAGS}"
- "CXXFLAGS=${MACOS_ARCH_FLAGS} ${XCODE15_FLAGS}"
- )
-
- set(PATCH_COMMAND patch)
-
-endif ()
-
-if (ANDROID)
- # Increase the stack size to match MinGW's. Prevents crashes with GMic.
- set(SECURITY_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,stack-size=4194304")
- set(SECURITY_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,stack-size=4194304")
- set(SECURITY_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,stack-size=4194304")
-
- string(REPLACE ";" "$<SEMICOLON>" _escape_find_root_path "${CMAKE_FIND_ROOT_PATH}")
- # stl must be consistent: https://github.com/android/ndk/issues/1441
- set (GLOBAL_PROFILE ${GLOBAL_PROFILE}
- -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
- -DANDROID_PLATFORM=${ANDROID_PLATFORM}
- -DANDROID_ABI=${ANDROID_ABI}
- -DANDROID_STL=${ANDROID_STL}
- -DCMAKE_FIND_ROOT_PATH=${_escape_find_root_path}
- -DCMAKE_EXE_LINKER_FLAGS=${SECURITY_EXE_LINKER_FLAGS}
- -DCMAKE_SHARED_LINKER_FLAGS=${SECURITY_SHARED_LINKER_FLAGS}
- -DCMAKE_MODULE_LINKER_FLAGS=${SECURITY_MODULE_LINKER_FLAGS})
-endif()
-
-function(TestCompileLinkPythonLibs OUTPUT_VARNAME)
- include(CheckCXXSourceCompiles)
- set(CMAKE_REQUIRED_INCLUDES ${Python_INCLUDE_DIRS})
- set(CMAKE_REQUIRED_LIBRARIES ${Python_LIBRARIES})
- if (MINGW)
- set(CMAKE_REQUIRED_DEFINITIONS -D_hypot=hypot)
- endif ()
- unset(${OUTPUT_VARNAME} CACHE)
- CHECK_CXX_SOURCE_COMPILES("
-// https://bugs.python.org/issue22411
-#if defined(_MSC_VER)
-# ifdef _DEBUG
-# undef _DEBUG
-# endif /* _DEBUG */
-#endif /* _MSC_VER */
-#include <Python.h>
-int main(int argc, char *argv[]) {
- Py_InitializeEx(0);
-}" ${OUTPUT_VARNAME})
-endfunction()
-
-function(DumpSitePackages PYTHONPATH)
- if (WIN32)
- krita_to_native_path("${${PYTHONPATH}}" _krita_pythonpath)
- string(TOLOWER "${_krita_pythonpath}" _krita_pythonpath)
- else()
- set(_krita_pythonpath ${${PYTHONPATH}})
- endif()
- execute_process(COMMAND ${CMAKE_COMMAND}
- -E env PYTHONPATH=${_krita_pythonpath}
- ${Python_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_paths());"
- OUTPUT_VARIABLE __sysconfig)
- message(STATUS "Python's system directories: ${__sysconfig}")
- execute_process(COMMAND ${CMAKE_COMMAND}
- -E env PYTHONPATH=${_krita_pythonpath}
- ${Python_EXECUTABLE} -c "from setuptools.command import easy_install; print(easy_install.get_site_dirs())"
- OUTPUT_VARIABLE __setuptools)
- message(STATUS "Python's setuptools directories: ${__setuptools}")
-endfunction()
-
-if (WIN32)
- option(ENABLE_PYTHON_DEPS "Enable Python deps (sip, pyqt)" ON)
- if (ENABLE_PYTHON_DEPS)
- set(KRITA_PYTHONPATH "${INSTALL_ROOT}/lib/site-packages;$ENV{PYTHONPATH}")
- message(STATUS "Krita's PEP-0250 root: ${KRITA_PYTHONPATH}")
- set(Python_FIND_STRATEGY LOCATION)
- find_package(Python 3.8 COMPONENTS Development Interpreter)
- if (Python_FOUND)
- message(STATUS "Python requirements met.")
- TestCompileLinkPythonLibs(CAN_USE_PYTHON_LIBS)
- DumpSitePackages(KRITA_PYTHONPATH)
- if (NOT CAN_USE_PYTHON_LIBS)
- file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log ERROR_LOG)
- string(REPLACE "\n" "\n " ERROR_LOG "${ERROR_LOG}")
- message(FATAL_ERROR "Compiling with Python library failed, please check whether the architecture is correct!\nCMakeError.log:\n ${ERROR_LOG}\n\n")
- endif ()
- else ()
- message(FATAL_ERROR "Python requirements not met. To disable Python deps, set ENABLE_PYTHON_DEPS to OFF.")
- endif ()
- endif ()
-elseif(UNIX)
- set(PYTHON_VERSION "3.10")
-
- set(KRITA_PYTHONPATH "${INSTALL_ROOT}/lib/python${PYTHON_VERSION}/site-packages")
- message(STATUS "Krita's PEP-0250 root: ${KRITA_PYTHONPATH}")
-endif ()
-
-# Prepare meson-compatible environment variables
-if (WIN32)
- krita_to_native_path("${KRITA_PYTHONPATH}" _krita_pythonpath)
- string(TOLOWER ${_krita_pythonpath} _krita_pythonpath)
- krita_to_native_environment_path_list("${_krita_pythonpath}" _krita_pythonpath)
-else()
- set(_krita_pythonpath ${KRITA_PYTHONPATH})
-endif()
-
-message(STATUS "Python environment for Krita: ${_krita_pythonpath}")
-
-macro(mesonify VAR DEST)
- set(${DEST} "${${VAR}}")
- separate_arguments(${DEST})
- if (MSVC) # Fix compiler flags
- list(TRANSFORM ${DEST} REPLACE "^\/" "-")
- endif()
- list(TRANSFORM ${DEST} REPLACE "(.+)" "\'\\1\'")
- list(FILTER ${DEST} EXCLUDE REGEX "^$")
- list(JOIN ${DEST} "," ${DEST})
- set(${DEST} "[${${DEST}}]")
-endmacro()
-
-if (ANDROID OR (CMAKE_CROSSCOMPILING AND NOT APPLE))
- set(CROSS_COMPILE_FLAGS "--sysroot=${CMAKE_SYSROOT}")
- set(CROSS_LINKER_FLAGS "--sysroot=${CMAKE_SYSROOT}")
-elseif (APPLE)
- set(CROSS_COMPILE_FLAGS "-isysroot ${CMAKE_OSX_SYSROOT}")
- set(CROSS_LINKER_FLAGS "-isysroot ${CMAKE_OSX_SYSROOT}")
-endif()
-
-if (ANDROID OR CMAKE_CROSSCOMPILING)
- set(CROSS_COMPILE_FLAGS "${CROSS_COMPILE_FLAGS} --target=${CMAKE_C_COMPILER_TARGET}")
- set(CROSS_LINKER_FLAGS "${CROSS_EXE_LINKER_FLAGS} --target=${CMAKE_C_COMPILER_TARGET}")
-endif()
-
-if (ANDROID)
-# Meson injects -D_FILE_OFFSET_BITS=64 which triggers off_t functions.
-# Alternatively, increase API level to 24.
- set(CROSS_COMPILE_FLAGS "${CROSS_COMPILE_FLAGS} -D_LIBCPP_HAS_NO_OFF_T_FUNCTIONS")
-endif()
-
-if (CMAKE_OSX_ARCHITECTURES)
- foreach(arch ${CMAKE_OSX_ARCHITECTURES})
- string(APPEND CROSS_COMPILE_FLAGS_${arch} "${CROSS_COMPILE_FLAGS} -arch ${arch}")
- endforeach()
-endif()
-
-mesonify(SECURITY_C_FLAGS _security_c_flags)
-mesonify(SECURITY_CXX_FLAGS _security_cxx_flags)
-mesonify(SECURITY_EXE_LINKER_FLAGS _security_exe_linker_flags)
-mesonify(CROSS_COMPILE_FLAGS _cross_compile_flags)
-mesonify(CROSS_LINKER_FLAGS _cross_linker_flags)
-
-# Block any libraries not coming from our PATH when crosscompiling
-if (UNIX AND CMAKE_CROSSCOMPILING)
- set(_pkg_config_libdir "pkg_config_libdir = ''")
-else()
- # In Windows either we pick up the MSYS2 pkg-config
- # or we ship our own, both use the correct architecture.
- # Linux also uses the correct architecture.
- set(_pkg_config_libdir)
-endif()
-
-include(TestBigEndian)
-test_big_endian(IS_ENDIAN)
-set(CROSSCOMPILING REQUIRED)
-
-if (IS_ENDIAN)
- set(_endian "big")
-else()
- set(_endian "little")
-endif()
-
-string(TOLOWER ${CMAKE_SYSTEM_NAME} _system_name)
-
-if (ANDROID OR CMAKE_CROSSCOMPILING)
- set(EXTRA_MESON_FLAGS
- --cross-file=${CMAKE_CURRENT_BINARY_DIR}/meson-compiler.ini
- --cross-file=${CMAKE_CURRENT_BINARY_DIR}/meson-host.ini
- )
- set(CROSSCOMPILING REQUIRED)
-else()
- set(EXTRA_MESON_FLAGS
- --native-file=${CMAKE_CURRENT_BINARY_DIR}/meson-compiler.ini
- )
- set(CROSSCOMPILING)
-endif()
-
-if (MSVC)
- set(_c_ld "c_ld = ['${CMAKE_LINKER}'] + cross_link_args")
- set(_cpp_ld "cpp_ld = ['${CMAKE_LINKER}'] + cross_link_args")
-endif()
-
-if (CMAKE_CROSSCOMPILING AND NOT APPLE)
-find_package(Python 3.0 COMPONENTS Interpreter REQUIRED)
-set_package_properties(Python PROPERTIES
- DESCRIPTION "Python Library"
- URL "https://www.python.org"
- TYPE REQUIRED
- PURPOSE "Required to run Meson when crosscompiling")
-endif()
-find_program(MESON_BINARY_PATH meson)
-find_program(NINJA_BINARY_PATH ninja)
-find_package(PkgConfig QUIET ${CROSSCOMPILING})
-
-if (NOT Python_EXECUTABLE)
- set(Python_EXECUTABLE ${EXTPREFIX}/bin/python3)
- if(NOT EXISTS "${Python_EXECUTABLE}")
- message("WARNING: using system python3!")
- SET(Python_EXECUTABLE python3)
- endif()
-
- set(PYTHON_DEP ext_python)
-endif()
-
-# python needs openssl
-if (NOT WIN32 OR OPENSSL_DEP)
- add_subdirectory( ext_openssl )
-endif()
-
-# Meson needs the sitecustomize.py to set the site-packages root
-add_subdirectory( ext_python )
-
-if (NOT NINJA_BINARY_PATH)
- set(NINJA_DEP ext_ninja)
- message(STATUS "Ninja not available, building 3rdparty version.")
- add_subdirectory(ext_ninja)
-endif()
-
-if (NOT MESON_BINARY_PATH)
- set(MESON_DEP ext_meson)
- set(MESON_BINARY_PATH ${EXTPREFIX}/bin/meson)
- message(STATUS "Meson not available, building 3rdparty version.")
- add_subdirectory(ext_meson)
-endif()
-
-set(MESON_NASM_PATH "${EXTPREFIX}/bin/nasm${CMAKE_EXECUTABLE_SUFFIX}")
-
-if (NOT PKG_CONFIG_FOUND OR WIN32)
- set(PKG_CONFIG_DEP ext_pkgconfig)
- if (NOT WIN32)
- set(ENV{PKG_CONFIG} ${EXTPREFIX}/bin/pkg-config)
- else()
- set(ENV{PKG_CONFIG} ${EXTPREFIX}/bin/pkgconf)
- endif()
- # meson currently reads from the variable directly
- set(PKG_CONFIG_EXECUTABLE $ENV{PKG_CONFIG})
- message(STATUS "pkg-config not available, building 3rdparty version.")
- message(STATUS "$PKG_CONFIG is set to $ENV{PKG_CONFIG}")
- add_subdirectory(ext_pkgconfig)
-endif()
-
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/meson-compiler.ini.in
- ${CMAKE_CURRENT_BINARY_DIR}/meson-compiler.ini
-)
-
-# Meson's CPU family is a bit different from what
-# Android SDK exports as CMAKE_SYSTEM_PROCESSOR
-set (MESON_CPU_FAMILY ${CMAKE_SYSTEM_PROCESSOR})
-if (${MESON_CPU_FAMILY} STREQUAL "armv7-a")
- set(MESON_CPU_FAMILY "arm")
-elseif (${MESON_CPU_FAMILY} STREQUAL "i686")
- set(MESON_CPU_FAMILY "x86")
-endif()
-
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/meson-host.ini.in
- ${CMAKE_CURRENT_BINARY_DIR}/meson-host.ini
-)
-
-# Prepare file for crosscompile multiple archs
-if (CMAKE_OSX_ARCHITECTURES)
- foreach(arch ${CMAKE_OSX_ARCHITECTURES})
- mesonify(CROSS_COMPILE_FLAGS_${arch} _cross_compile_flags)
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/meson-compiler.ini.in
- ${CMAKE_CURRENT_BINARY_DIR}/meson-compiler_${arch}.ini
- )
- endforeach()
-endif()
-
-LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake/modules/avcodecs")
-
-include(FeatureSummary)
-
-# ======================== AUDIO ===========================
-
-find_package(FLAC 1.3.3 QUIET)
-set_package_properties(FLAC PROPERTIES
- DESCRIPTION "libFLAC flac audio codec"
- URL "https://xiph.org/flac/"
-)
-if (NOT FLAC_FOUND)
- message(STATUS "FLAC not available, building 3rdparty version.")
- set(FLAC_DEP ext_flac)
-endif()
-
-find_package(Ogg 1.3.2 QUIET)
-set_package_properties(Ogg PROPERTIES
- DESCRIPTION "ogg is a library for manipulating ogg bitstreams"
- URL "https://xiph.org/vorbis/"
-)
-if (NOT Ogg_FOUND)
- message(STATUS "libogg not available, building 3rdparty version.")
- set(OGG_DEP ext_libogg)
-endif()
-
-find_package(Opus 1.3.1 QUIET)
-set_package_properties(Opus PROPERTIES
- DESCRIPTION "Opus IETF audio codec"
- URL "https://opus-codec.org/"
-)
-if (NOT Opus_FOUND)
- message(STATUS "Opus not available, building 3rdparty version.")
- set(OPUS_DEP ext_opus)
-endif()
-
-# ======================== VIDEO ===========================
-
-find_package(VPX 1.7.0 QUIET)
-set_package_properties(VPX PROPERTIES
- DESCRIPTION "libvpx vp8/vp9 video encoder."
- URL "https://www.webmproject.org/"
-)
-if (NOT VPX_FOUND AND NOT WIN32)
- message(STATUS "libvpx not available, building 3rdparty version.")
- set(VPX_DEP ext_vpx)
-endif()
-
-find_package(SDL 2.24.0 QUIET)
-set_package_properties(SDL PROPERTIES
- DESCRIPTION "Low-level access to audio, keyboard, mouse, joystick, and graphics"
- URL "https://www.libsdl.org/"
-)
-if (NOT SDL_FOUND)
- message(STATUS "SDL not available, building 3rdparty version.")
- set(SDL_DEP ext_sdl2)
-endif()
-
-set(QT_DEP "ext_qt")
-# ================== END OF FFMPEG DEPS =====================
-
-# this list must be dependency-ordered
-if (WIN32)
- add_subdirectory( ext_patch )
-endif ()
-add_subdirectory( ext_lzma )
-
-if (NOT WIN32 OR ICONV_DEP)
- add_subdirectory( ext_iconv )
-endif()
-
-if (NOT WIN32 OR GETTEXT_DEP)
- add_subdirectory( ext_gettext )
-endif()
-
-if (NOT WIN32 OR ZLIB_DEP)
- add_subdirectory( ext_zlib )
-endif()
-
-add_subdirectory( ext_boost )
-add_subdirectory( ext_jpeg )
-add_subdirectory( ext_tiff )
-add_subdirectory( ext_png )
-if (WIN32)
- add_subdirectory( ext_icoutils )
-endif ()
-add_subdirectory( ext_eigen3 )
-
-if (NOT WIN32 OR EXPAT_DEP)
- add_subdirectory( ext_expat ) # for exiv2
-endif()
-
-add_subdirectory( ext_exiv2 )
-add_subdirectory( ext_lcms2 )
-add_subdirectory( ext_openexr )
-add_subdirectory( ext_gsl )
-add_subdirectory( ext_fftw3 )
-add_subdirectory( ext_ocio )
-add_subdirectory( ext_openjpeg )
-
-if(WIN32)
- add_subdirectory(ext_googleangle)
-endif()
-
-if (WIN32 AND NOT PERL_FOUND)
- add_subdirectory( ext_perl )
-endif()
-
-add_subdirectory(ext_icu)
-add_subdirectory( ext_qt )
-if (ANDROID)
- # gettext replacement
- add_subdirectory(ext_libintl-lite)
- add_subdirectory(ext_libunwindstack-ndk)
-endif()
-add_subdirectory( ext_frameworks )
-add_subdirectory( ext_libraw )
-if (ENABLE_PYTHON_DEPS OR NOT MINGW)
- add_subdirectory( ext_sip )
- add_subdirectory( ext_pyqt )
-endif ()
-
-if (WIN32)
- add_subdirectory( ext_drmingw )
-endif ()
-
-add_subdirectory( ext_lager )
-add_subdirectory( ext_heif )
-add_subdirectory(ext_giflib)
-add_subdirectory(ext_quazip)
-add_subdirectory(ext_seexpr)
-add_subdirectory(ext_json_c)
-add_subdirectory(ext_mypaint)
-
-if (UNIX AND NOT APPLE)
- add_subdirectory(ext_fcitx-qt)
-endif()
-
-add_subdirectory(ext_webp)
-add_subdirectory(ext_jpegxl)
-add_subdirectory(ext_xsimd)
-
-add_subdirectory(ext_freetype)
-add_subdirectory(ext_fontconfig)
-add_subdirectory(ext_poppler)
-add_subdirectory(ext_fribidi)
-add_subdirectory(ext_unibreak)
-
-add_subdirectory(ext_ffmpeg)
-add_subdirectory(ext_mlt)
diff --git a/3rdparty/KritaExternalProject.cmake b/3rdparty/KritaExternalProject.cmake
deleted file mode 100644
index eacd34486d..0000000000
--- a/3rdparty/KritaExternalProject.cmake
+++ /dev/null
@@ -1,245 +0,0 @@
-# SPDX-FileCopyrightText: 2023 Ivan Santa Maria <[email protected]>
-# SPDX-License-Ref: BSD-3-Clause
-
-include(ExternalProject)
-
-set(KRITA_MACOS_EXTERNAL_PACKAGE_NAME "package_build_fat.tar.gz")
-# used always for stepped universal or non universal builds.
-set(PARENT_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
-set(KRITA_MACOS_CONSOLIDATE_SCRIPT ${PARENT_CMAKE_SOURCE_DIR}/tools/macos_consolidate.sh)
-
-set(kis_ONE_VALUE_ARGS URL URL_HASH DOWNLOAD_DIR WORKING_DIRECTORY
- GIT_REPOSITORY GIT_TAG GIT_REMOTE_UPDATE_STRATEGY GIT_SUBMODULES_RECURSE GIT_PROGRESS
- INSTALL_DIR
- )
-set(kis_MULTI_VALUE_ARGS PATCH_COMMAND CONFIGURE_ARGS CMAKE_ARGS DEPENDS
- GIT_SUBMODULES
- CONFIGURE_COMMAND BUILD_COMMAND INSTALL_COMMAND UPDATE_COMMAND
- )
-
-
-# If APPLE call the muti build arch macro
-# in other case pass args to ExternalProject_Add
-# or if MESON given, make use of kis_ExternalProject_Add_meson
-macro(kis_ExternalProject_Add_with_separate_builds_apple)
-
- if(APPLE)
- kis_ExternalProject_Add_macos(${ARGN})
- else()
- set(options MESON AUTOMAKE)
- cmake_parse_arguments(EXT "${options}" "" "" ${ARGN})
-
- if(${EXT_MESON})
- kis_ExternalProject_Add_meson(${EXT_UNPARSED_ARGUMENTS})
- else()
- # parsed arguments will not pass to child macro
- set(oneValueArgs WORKING_DIRECTORY)
- set(multiValueArgs CONFIGURE_ARGS)
- cmake_parse_arguments(EXT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
- ExternalProject_Add(${EXT_UNPARSED_ARGUMENTS})
- endif()
- endif()
-endmacro()
-
-
-# Convenience macro to set all common MESON configuration
-macro(kis_ExternalProject_Add_meson EXT_NAME)
- set(onValueArgs "${kis_ONE_VALUE_ARGS}")
- set(multiValueArgs "${kis_MULTI_VALUE_ARGS}")
- cmake_parse_arguments(EXT "${options}" "${onValueArgs}" "${multiValueArgs}" ${ARGN})
-
- ExternalProject_Add(
- ${EXT_NAME}
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL ${EXT_URL}
- URL_HASH ${EXT_URL_HASH}
- GIT_REPOSITORY ${EXT_GIT_REPOSITORY}
- GIT_TAG ${EXT_GIT_TAG}
-
- PATCH_COMMAND ${EXT_PATCH_COMMAND}
-
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
- ${MESON_BINARY_PATH} setup <BINARY_DIR> <SOURCE_DIR>
- --libdir=lib
- -Dbuildtype=$<IF:$<CONFIG:Debug>,debug,debugoptimized>
- ${EXT_CONFIGURE_ARGS}
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${MESON_BINARY_PATH} compile -C <BINARY_DIR> -j${SUBMAKE_JOBS}
-
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${MESON_BINARY_PATH} install -C <BINARY_DIR>
-
- UPDATE_COMMAND ""
-
- DEPENDS ${EXT_DEPENDS}
- )
-endmacro()
-
-
-# simplifies double arch compile con macos for external libraries not
-# supporting one step universal build
-# only define CONFIGURE, BUILD, INSTALL for custom build steps
-macro(kis_ExternalProject_Add_macos EXT_NAME)
- set(options MESON AUTOMAKE)
- set(onValueArgs URL URL_HASH DOWNLOAD_DIR WORKING_DIRECTORY
- GIT_REPOSITORY GIT_TAG GIT_REMOTE_UPDATE_STRATEGY GIT_SUBMODULES_RECURSE GIT_PROGRESS
- INSTALL_DIR
- )
- set(multiValueArgs PATCH_COMMAND CONFIGURE_ARGS CMAKE_ARGS DEPENDS
- GIT_SUBMODULES
- CONFIGURE_COMMAND BUILD_COMMAND INSTALL_COMMAND UPDATE_COMMAND
- )
- cmake_parse_arguments(EXT "${options}" "${onValueArgs}" "${multiValueArgs}" ${ARGN})
-
-
- macro(compile_arch ARCH DEPENDEES EXT_MESON)
- # Some packages need special configure to set architecture
- string(REPLACE "@ARCH@" ${ARCH} EXT_CONFIGURE_COMMAND_ARCH "${EXT_CONFIGURE_COMMAND}")
- string(REPLACE "@ARCH@" ${ARCH} EXT_WORKING_DIRECTORY_ARCH "${EXT_WORKING_DIRECTORY}")
-
- if(NOT EXT_WORKING_DIRECTORY_ARCH)
- set(EXT_WORKING_DIRECTORY_ARCH <BINARY_DIR>)
- endif()
-
- # CMake variant
- set(MAC_CONFIGURE_COMMAND
- arch -${ARCH} ${CMAKE_COMMAND} -S <SOURCE_DIR> -B <BINARY_DIR>-${ARCH}
- ${EXT_CONFIGURE_ARGS}
- ${EXT_CMAKE_ARGS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${ARCH}
- )
- set(MAC_BUILD_COMMAND
- arch -${ARCH} ${CMAKE_COMMAND} --build <BINARY_DIR>-${ARCH} -j${SUBMAKE_JOBS}
- )
- set(MAC_INSTALL_COMMAND
- DESTDIR=<TMP_DIR>/build-${ARCH} ${CMAKE_COMMAND} --install <BINARY_DIR>-${ARCH}
- )
- # Meson variant
- if(${EXT_MESON})
- set(MAC_CONFIGURE_COMMAND
- ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
- arch -${ARCH} ${MESON_BINARY_PATH} setup <BINARY_DIR>-${ARCH} <SOURCE_DIR>
- --libdir=lib
- -Dbuildtype=$<IF:$<CONFIG:Debug>,debug,debugoptimized>
- ${EXT_CONFIGURE_ARGS}
- ${EXT_CMAKE_ARGS}
- --native-file=${CMAKE_CURRENT_BINARY_DIR}/../meson-compiler_${ARCH}.ini
- )
- set(MAC_BUILD_COMMAND
- ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- arch -${ARCH} ${MESON_BINARY_PATH} compile -C <BINARY_DIR>-${ARCH} -j${SUBMAKE_JOBS}
- )
- set(MAC_INSTALL_COMMAND
- ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- DESTDIR=<TMP_DIR>/build-${ARCH}
- ${MESON_BINARY_PATH} install -C <BINARY_DIR>-${ARCH}
- )
- endif()
-
- if(${EXT_AUTOMAKE} OR EXT_BUILD_COMMAND)
- set(MAC_CONFIGURE_COMMAND
- arch -${ARCH}
- -e "CFLAGS+=-arch ${ARCH}" -e "CXXFLAGS+=-arch ${ARCH}"
- <SOURCE_DIR>/configure
- ${EXT_CONFIGURE_ARGS}
- ${EXT_CMAKE_ARGS}
- )
- set(MAC_BUILD_COMMAND
- make clean COMMAND arch -${ARCH} make -j${SUBMAKE_JOBS}
- )
- set(MAC_INSTALL_COMMAND
- make install DESTDIR=<TMP_DIR>/build-${ARCH} INSTALL_ROOT=<TMP_DIR>/build-${ARCH}
- )
- endif()
-
- if(EXT_CONFIGURE_COMMAND AND NOT EXT_CONFIGURE_ARGS)
- set(MAC_CONFIGURE_COMMAND arch -${ARCH} ${EXT_CONFIGURE_COMMAND_ARCH})
- endif()
- if(EXT_BUILD_COMMAND)
- set(MAC_BUILD_COMMAND arch -${ARCH} ${EXT_BUILD_COMMAND})
- endif()
- if(EXT_INSTALL_COMMAND)
- # HACK: be over paranoid about DESTDIR
- set(MAC_INSTALL_COMMAND arch -${ARCH} -e DESTDIR=<TMP_DIR>/build-${ARCH}
- -e INSTALL_ROOT=<TMP_DIR>/build-${ARCH}
- ${EXT_INSTALL_COMMAND}
- DESTDIR=<TMP_DIR>/build-${ARCH} INSTALL_ROOT=<TMP_DIR>/build-${ARCH}
- )
- endif()
-
- ExternalProject_Add_Step( ${EXT_NAME} build-${ARCH}
- # newline space is important
- COMMENT "Building ${EXT_NAME} ${ARCH}"
-
- WORKING_DIRECTORY ${EXT_WORKING_DIRECTORY_ARCH}
- # Configure arch variant
- COMMAND ${MAC_CONFIGURE_COMMAND}
- # build
- COMMAND ${MAC_BUILD_COMMAND}
- # install in tmp creating fat-bin
- COMMAND ${MAC_INSTALL_COMMAND}
-
- DEPENDEES ${DEPENDEES}
- DEPENDERS build
- )
- endmacro()
-
- if(NOT EXT_GIT_REPOSITORY)
- ExternalProject_Add( ${EXT_NAME}
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL ${EXT_URL}
- URL_HASH ${EXT_URL_HASH}
-
- PATCH_COMMAND ${EXT_PATCH_COMMAND}
-
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ${CMAKE_COMMAND} -E env ${KRITA_MACOS_CONSOLIDATE_SCRIPT} <TMP_DIR>
- INSTALL_COMMAND tar -xzf <TMP_DIR>/${KRITA_MACOS_EXTERNAL_PACKAGE_NAME} -C "/"
- UPDATE_COMMAND ""
-
- DEPENDS ${EXT_DEPENDS}
- )
- else()
- ExternalProject_Add( ${EXT_NAME}
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY ${EXT_GIT_REPOSITORY}
- GIT_TAG ${EXT_GIT_TAG}
- GIT_SUBMODULES ${EXT_GIT_SUBMODULES}
- GIT_SUBMODULES_RECURSE ${EXT_GIT_SUBMODULES_RECURSE}
- GIT_PROGRESS ${EXT_GIT_PROGRESS}
- GIT_REMOTE_UPDATE_STRATEGY ${EXT_GIT_REMOTE_UPDATE_STRATEGY}
-
- PATCH_COMMAND ${EXT_PATCH_COMMAND}
-
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ${CMAKE_COMMAND} -E env ${KRITA_MACOS_CONSOLIDATE_SCRIPT} <TMP_DIR>
- INSTALL_COMMAND tar -xzf <TMP_DIR>/${KRITA_MACOS_EXTERNAL_PACKAGE_NAME} -C "/"
- UPDATE_COMMAND ""
-
- DEPENDS ${EXT_DEPENDS}
- )
- endif()
-
- set(step_depend configure)
- foreach(ARCH ${CMAKE_OSX_ARCHITECTURES})
- compile_arch(${ARCH} ${step_depend} ${EXT_MESON})
- set(step_depend build-${ARCH})
- endforeach()
-endmacro()
-
-macro(mkdir_build_arch_dir ARCH)
-ExternalProject_Add_Step(ext_qt mkdir-build-${ARCH}
- COMMAND ${CMAKE_COMMAND} -E make_directory <BINARY_DIR>-${ARCH}
- DEPENDERS configure
-)
-endmacro()
\ No newline at end of file
diff --git a/3rdparty/PYTHON.md b/3rdparty/PYTHON.md
deleted file mode 100644
index 0060ad9d43..0000000000
--- a/3rdparty/PYTHON.md
+++ /dev/null
@@ -1,9 +0,0 @@
-Notes About Python And Windows
-
-On Windows, we need two Pythons. One to configure Qt and build sip and PyQt5 against, one to package together with Krita, PyQt, sip and PyKrita. These Pythons need to be exactly the same version, and that version is specified in many places:
-
-
-krita\CMakeLists.txt (find_package(PythonLibrary 3.8))
-krita\3rdparty\ext_python\CMakeLists.txt (URL https://www.python.org/ftp/python/3.8.1/python-3.8.1-embed-amd64.zip)
-krita\plugins\extensions\pykrita\plugin\utilities.cpp (paths.append(pythonDir.absoluteFilePath("python38.zip"));)
-
diff --git a/3rdparty/README-MSYS-USERS.md b/3rdparty/README-MSYS-USERS.md
deleted file mode 100644
index 165c3db4cd..0000000000
--- a/3rdparty/README-MSYS-USERS.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# Building Krita with MSYS2
-
-**Please note that this is an unsupported, best-effort configuration.
-Use it at your own risk.**
-
-## Requirements
-
-Use the MINGW64, CLANG64 or UCRT64 flavors. Install the following components
-(change the `x86_64` architecture to your own):
-
-- Your flavor's compiler:
- - `pacman -S mingw-w64-x86_64-toolchain`
- - `pacman -S mingw-w64-clang-x86_64-toolchain`
- - `pacman -S mingw-w64-ucrt-x86_64-toolchain`
-
-- CMake:
- - `pacman -S mingw-w64-x86_64-cmake`
- - `pacman -S mingw-w64-clang-x86_64-cmake`
- - `pacman -S mingw-w64-ucrt-x86_64-cmake`
-
-If using the CLANG64 flavor, set the `CC` and `CXX` environment variables:
-
-```
-set CC=x86_64-w64-mingw32-cc
-set CXX=x86_64-w64-mingw32-c++
-```
-
-If you want AVIF/HEIF support, before continuing, install:
- - Rust:
- - **Stock Rust is not recommended with UCRT64 and CLANG64. Use the MSYS2-provided binaries.**
- - `pacman -S mingw-w64-x86_64-rust`
- - `pacman -S mingw-w64-clang-x86_64-cmake`
- - `pacman -S mingw-w64-ucrt-x86_64-cmake`
- - Meson and Ninja:
- - Issue `pip install -U meson setuptools ninja` on your Python installation, **not** on your MSYS2 shell.
- - For more information, see the README.md in this directory, section "Prerequisites", item 4.
-
-Now follow the README.md document, Prerequisites section, item 4 onwards.
-Alternatively, run the `build-tools\windows\build.cmd` script from a command
-line that can use the MSYS2 tools.
diff --git a/3rdparty/README.md b/3rdparty/README.md
index c51259c0b1..461c0a7427 100644
--- a/3rdparty/README.md
+++ b/3rdparty/README.md
@@ -1,285 +1,7 @@
-# CMake external projects to build krita's dependencies on Linux, Windows or OSX
+Content Moved
+=============
-If you need to build Krita's dependencies for the following reasons:
+The code that manages Krita dependencies has been moved to a separate
+repository:
-* you develop on Windows and aren't using build-tools/windows/build.cmd
-* you develop on OSX and aren't using the scripts in krita/packaging/osx or Homebrew
-* you want to build a generic, distro-agnostic version of Krita for Linux and aren't using the scripts in packaging/linux/appimage
-* you develop on Linux, but some dependencies aren't available for your distribution and aren't using the scripts in packaging/linux/appimage
-
-and you know what you're doing, you can use the following guide to build
-the dependencies that Krita needs.
-
-Using the scripts mentioned above is strongly preferred because that's what
-the Krita team uses to build the binaries on the binary factory
-(https://binary-factory.kde.org/).
-
-If you develop on Linux and your distribution has all dependencies available,
-
-YOU DO NOT NEED THIS GUIDE AND YOU SHOULD STOP READING NOW
-
-Otherwise you risk major confusion.
-
-**Important**: This document is not updated consistently. It may contain
-outdated information and missing steps. For clearer information on building
-Krita with the build scripts, check:
-https://docs.krita.org/en/untranslatable_pages/building_krita.html.
-
-## Prerequisites
-
-Note: on all operating systems the entire procedure is done in a terminal window.
-
-1. git: https://git-scm.com/downloads. Make sure git is in your path
-2. CMake 3.3.2 or later: https://cmake.org/download/. Make sure cmake is in your path.
- * CMake 3.9 does not build Krita properly at the moment, please use 3.8 or 3.10 instead.
-3. Make sure you have a compiler:
- * Linux: gcc, minimum version 4.8
- * OSX: clang, you need to install xcode for this
- * Windows: LLVM MinGW (20220323 LLVM 14.0): https://github.com/mstorsjo/llvm-mingw/releases/download/20220323/llvm-mingw-20220323-ucrt-x86_64.zip
- * Install to something like C:\llvm-mingw; the full path must not contain any spaces.
- * Make sure the `bin` folder and the `x86_64-w64-mingw32\bin` folder
- are in your path. It might be a good idea to create a batch file
- which sets the path and start cmd.
- * If you want to use MSVC, check the script in `build-tools/windows`.
-
-4. On Windows, you will also need a release of Python 3.8 (not 3.7, probably not 3.9): https://www.python.org. Make sure to have that version of python.exe in your path. This version of Python will be used for two things: to configure Qt and to build the Python scripting module. Make sure that this version of Python comes first in your path. Do not set PYTHONHOME or PYTHONPATH.
- * Make sure that your Python will have the correct architecture for the version you are trying to build. If building for 32-bit target, you need the 32-bit release of Python.
-
-5. On Windows, if you want to compile Qt with ANGLE support, you will need to install Windows 10 SDK and have 2 environment variables set:
- * `WindowsSdkDir` (typically set to `C:\Program Files (x86)\Windows Kits\10`)
- * `WindowsSdkVerBinPath` (typically set to `C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0`) where 10.0.18362.0 is the version of the Window 10 SDK.
-
- * Example:
- set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
- set "WindowsSdkVerBinPath=%ProgramFiles(x86)%\Windows Kits\10\bin\10.0.18362.0"
-
-## Setup your environment
-
-
-## Prepare your directory layout
-
-1. Make a toplevel build directory, say $HOME/dev or c:\dev. We'll refer to this directory as BUILDROOT. You can use a variable for this, on WINDOWS %BUILDROOT%, on OSX and Linux $BUILDROOT. You will have to replace a bare BUILDROOT with $BUILDROOT or %BUILDROOT% whenever you copy and paste a command, depending on your operating system.
-
-2. Checkout krita in BUILDROOT
- ```
- cd BUILDROOT
- git clone git://anongit.kde.org/krita.git
- ```
-3. Create the build directory
- ```
- mkdir BUILDROOT/b
- ```
-4. Create the downloads directory
- ```
- mkdir BUILDROOT/d
- ```
-5. Create the install directory
- ```
- mkdir BUILDROOT/i
- ```
-
-## Prepare the externals build
-
-1. Enter the BUILDROOT/b directory
-
-2. Run cmake:
-
- * Linux:
- ```
- export PATH=$BUILDROOT/i/bin:$PATH
- export PYTHONHOME=$BUILDROOT/i (only if you want to build your own python)
- cmake ../krita/3rdparty \
- -DINSTALL_ROOT=$BUILDROOT/i \
- -DEXTERNALS_DOWNLOAD_DIR=$BUILDROOT/d \
- -DCMAKE_INSTALL_PREFIX=BUILDROOT/i
- ```
-
- * OSX:
- ```
- export PATH=$BUILDROOT/i/bin:$PATH
- export PYTHONHOME=$BUILDROOT/i (only if you want to build your own python)
- cmake ../krita/3rdparty/ \
- -DCMAKE_INSTALL_PREFIX=$BUILDROOT/i \
- -DEXTERNALS_DOWNLOAD_DIR=$BUILDROOT/d \
- -DINSTALL_ROOT=$BUILDROOT/i
- ```
-
- * Windows 32-bit / 64-bit:
-
- Note that the cmake command needs to point to your BUILDROOT like /dev/d, not c:\dev\d.
- ```
- set PATH=%BUILDROOT%\i\bin\;%BUILDROOT%\i\lib;%PATH%
- cmake ..\krita\3rdparty -DEXTERNALS_DOWNLOAD_DIR=/dev/d -DINSTALL_ROOT=/dev/i -G "MinGW Makefiles"
- ```
-
- - If you want to build Qt and some other dependencies with parallel jobs, add
- `-DSUBMAKE_JOBS=<n>` to this cmake command where <n> is the number of jobs to
- run (if your PC has 4 CPU cores, you might want to set it to 5). For other jobs,
- you might need to manually add a -- -j N option, where N is the number of jobs.
-
- - If you don't have Windows 10 SDK and don't want to build Qt with ANGLE, add
- `-DQT_ENABLE_DYNAMIC_OPENGL=OFF` to the CMake command line args.
-
-3. Build the packages:
-
- On Windows:
- ```
- cmake --build . --config RelWithDebInfo --target ext_patch
- cmake --build . --config RelWithDebInfo --target ext_icoutils
- ```
-
- On OSX and Windows:
- ```
- cmake --build . --config RelWithDebInfo --target ext_gettext
- cmake --build . --config RelWithDebInfo --target ext_openssl
- ```
-
- On all operating systems:
- ```
- cmake --build . --config RelWithDebInfo --target ext_qt
- cmake --build . --config RelWithDebInfo --target ext_zlib
- cmake --build . --config RelWithDebInfo --target ext_boost
-
- Note about boost: check if the headers are installed into i/include/boost, but not into i/include/boost-1.61/boost
-
- cmake --build . --config RelWithDebInfo --target ext_eigen3
- cmake --build . --config RelWithDebInfo --target ext_exiv2
- cmake --build . --config RelWithDebInfo --target ext_fftw3
- cmake --build . --config RelWithDebInfo --target ext_jpeg
- cmake --build . --config RelWithDebInfo --target ext_lcms2
- cmake --build . --config RelWithDebInfo --target ext_ocio
- cmake --build . --config RelWithDebInfo --target ext_openexr
- ```
-
- OSX Note: You need to first build openexr; that will fail; then you need to set the rpath for the two utilities correctly, then try to build openexr again.
- ```
- install_name_tool -add_rpath $BUILD_ROOT/i/lib $BUILD_ROOT/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./b44ExpLogTable
- install_name_tool -add_rpath $BUILD_ROOT/i/lib $BUILD_ROOT/b/ext_openexr/ext_openexr-prefix/src/ext_openexr-build/IlmImf/./dwaLookups
- ```
-
- On All operating systems
- ```
- cmake --build . --config RelWithDebInfo --target ext_png
- cmake --build . --config RelWithDebInfo --target ext_tiff
- cmake --build . --config RelWithDebInfo --target ext_gsl
- cmake --build . --config RelWithDebInfo --target ext_vc
- cmake --build . --config RelWithDebInfo --target ext_libraw
- cmake --build . --config RelWithDebInfo --target ext_giflib
- cmake --build . --config RelWithDebInfo --target ext_openjpeg
- cmake --build . --config RelWithDebInfo --target ext_quazip
- ```
-
- On Linux (if you want to build your own SIP and PyQt instead of the system one)
- ```
- cmake --build . --config RelWithDebInfo --target ext_sip
- cmake --build . --config RelWithDebInfo --target ext_pyqt
- ```
-
- On Windows
- ```
- cmake --build . --config RelWithDebInfo --target ext_freetype
- cmake --build . --config RelWithDebInfo --target ext_poppler
- ```
-
- On Linux
- ```
- cmake --build . --config RelWithDebInfo --target ext_kcrash
- ```
-
- On Windows (if you want to include DrMingw for dumping backtrace on crash)
- ```
- cmake --build . --config RelWithDebInfo --target ext_drmingw
- ```
-
- On Windows (if you want to include Python scripting)
- ```
- cmake --build . --config RelWithDebInfo --target ext_python
- cmake --build . --config RelWithDebInfo --target ext_sip
- cmake --build . --config RelWithDebInfo --target ext_pyqt
- ```
-
- Troubleshooting: if you have problems with 'install' step
- of ext_sip or ext_pyqt, make sure you install it in single
- thread only (`mingw32-make -j1 install`). Otherwise, a
- race condition may happen in the post-install script and
- metadata generation will be started before actual libraries
- are installed.
-
- Linux Note: poppler should be buildable on Linux as well with a home-built freetype
- and fontconfig, but I don't know how to make fontconfig find freetype, and on
- Linux, fontconfig is needed for poppler. Poppler is needed for PDF import.
-
- OSX Note: In order to build fontconfig on macOS, you need to have pkg-config installed.
- You probably need homebrew for that... See http://macappstore.org/pkg-config/ .
- archives from: files.kde.org/krita/build/dependencies:
-
- On Windows and OSX
- ```
- cmake --build . --config RelWithDebInfo --target ext_kwindowsystem
- ```
-
-
-## Build Krita
-
-1. Make a krita build directory:
- mkdir BUILDROOT/build
-2. Enter the BUILDROOT/build
-3. Configure the build:
-
- On Windows
- ```
- cmake ..\krita -G "MinGW Makefiles" -DBoost_DEBUG=OFF -DBOOST_INCLUDEDIR=c:\dev\i\include -DBOOST_DEBUG=ON -DBOOST_ROOT=c:\dev\i -DBOOST_LIBRARYDIR=c:\dev\i\lib -DCMAKE_INSTALL_PREFIX=c:\dev\i -DCMAKE_PREFIX_PATH=c:\dev\i -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DHAVE_MEMORY_LEAK_TRACKER=OFF -Wno-dev -DDEFINE_NO_DEPRECATED=1
- ```
-
- On Linux
- ```
- cmake ../krita -DCMAKE_INSTALL_PREFIX=BUILDROOT/i -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo
-
- # Troubleshooting: if you built your own SIP and CMake fails to find it, please set
- # the following environment variable to the SIP installation directory:
- export PYTHONPATH=$BUILDROOT/i/sip/
-
- # If you also have KIO installed in the system, don't forget to disable it by bassing to cmake:
- # cmake -DCMAKE_DISABLE_FIND_PACKAGE_KF5KIO=true .
- ```
-
- On OSX
- ```
- cmake ../krita -DCMAKE_INSTALL_PREFIX=$BUILDROOT/i -DDEFINE_NO_DEPRECATED=1 -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DBUNDLE_INSTALL_DIR=$BUILDROOT/i/bin -DCMAKE_BUILD_TYPE=RelWithDebInfo
- ```
-
-4. Run the build:
-
- On Linux and OSX
- ```
- make
- make install
- ```
-
- On Windows (replace 4 with the number of jobs to run in parallel)
- ```
- cmake --build . --target install -- -j4
- ```
-
-6. Run krita:
-
- On Linux
- ```
- BUILDROOT/i/bin/krita
- ```
-
- On Windows
- ```
- BUILDROOT\i\bin\krita.exe
- ```
-
- On OSX
- ```
- BUILDROOT/i/bin/krita.app/Contents/MacOS/krita
- ```
-
-## Packaging a Windows Build
-
-If you want to create a stripped down version of Krita to distribute, after building everything just run the packaging/windows/package-complete.cmd script.
-
-That script will copy the necessary files into the specified folder and leave out developer related files. After the script runs there will be two new ZIP files that contain a small portable version of Krita and a separate portable debug version.
+https://invent.kde.org/dkazakov/krita-deps-management
\ No newline at end of file
diff --git a/3rdparty/ext_boost/0001-Fix-Krita-builds-with-Clang.patch b/3rdparty/ext_boost/0001-Fix-Krita-builds-with-Clang.patch
deleted file mode 100644
index 4ecc68c180..0000000000
--- a/3rdparty/ext_boost/0001-Fix-Krita-builds-with-Clang.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/tools/build/src/engine/guess_toolset.bat b/tools/build/src/engine/guess_toolset.bat
-index 7093327116..8465770641 100644
---- a/tools/build/src/engine/guess_toolset.bat
-+++ b/tools/build/src/engine/guess_toolset.bat
-@@ -24,11 +24,27 @@ call :Clear_Error
- setlocal
- set test=%~$PATH:1
- endlocal
--if not errorlevel 1 set FOUND_PATH=%~dp$PATH:1
-+if not "%test%" == "" set FOUND_PATH=%~dp$PATH:1
- goto :eof
-
-
- :Guess
-+call :Test_Path bcc32c.exe
-+if not "%FOUND_PATH%" == "" (
-+ set "B2_TOOLSET=borland"
-+ set "B2_TOOLSET_ROOT=%FOUND_PATH%..\"
-+ echo %FOUND_PATH%
-+ exit /b 0)
-+call :Test_Path icl.exe
-+if not "%FOUND_PATH%" == "" (
-+ set "B2_TOOLSET=intel-win32"
-+ set "B2_TOOLSET_ROOT=%FOUND_PATH%..\"
-+ exit /b 0)
-+call :Test_Path gcc.exe
-+if not "%FOUND_PATH%" == "" (
-+ set "B2_TOOLSET=gcc"
-+ set "B2_TOOLSET_ROOT=%FOUND_PATH%..\"
-+ exit /b 0)
- REM Let vswhere tell us where msvc is at, if available.
- call :Clear_Error
- call vswhere_usability_wrapper.cmd
-@@ -85,19 +101,5 @@ if not errorlevel 1 (
- call "%FOUND_PATH%VCVARS32.BAT"
- set "B2_TOOLSET_ROOT=%MSVCDir%\"
- exit /b 0)
--call :Test_Path bcc32c.exe
--if not errorlevel 1 (
-- set "B2_TOOLSET=borland"
-- set "B2_TOOLSET_ROOT=%FOUND_PATH%..\"
-- exit /b 0)
--call :Test_Path icl.exe
--if not errorlevel 1 (
-- set "B2_TOOLSET=intel-win32"
-- set "B2_TOOLSET_ROOT=%FOUND_PATH%..\"
-- exit /b 0)
--if EXIST "C:\MinGW\bin\gcc.exe" (
-- set "B2_TOOLSET=mingw"
-- set "B2_TOOLSET_ROOT=C:\MinGW\"
-- exit /b 0)
- REM Could not find a suitable toolset
- exit /b 1
diff --git a/3rdparty/ext_boost/0001-Fix-building-Boost.Build-with-a-chosen-toolset.patch b/3rdparty/ext_boost/0001-Fix-building-Boost.Build-with-a-chosen-toolset.patch
deleted file mode 100644
index 00ba0edee2..0000000000
--- a/3rdparty/ext_boost/0001-Fix-building-Boost.Build-with-a-chosen-toolset.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 460261c63622ece9406071d1616cdef0d1ebd4ad Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Sun, 12 Sep 2021 11:30:51 +0300
-Subject: [PATCH] Fix building Boost.Build with a chosen toolset
-
----
- bootstrap.bat | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bootstrap.bat b/bootstrap.bat
-index 03c98ff..5e9d605 100644
---- a/bootstrap.bat
-+++ b/bootstrap.bat
-@@ -12,7 +12,7 @@ ECHO Building Boost.Build engine
- if exist ".\tools\build\src\engine\b2.exe" del tools\build\src\engine\b2.exe
- pushd tools\build\src\engine
-
--call .\build.bat
-+call .\build.bat %1
- @ECHO OFF
-
- popd
---
-2.20.1.windows.1
-
diff --git a/3rdparty/ext_boost/0001-Fix-compilation-with-clang-15.patch b/3rdparty/ext_boost/0001-Fix-compilation-with-clang-15.patch
deleted file mode 100644
index 999a9139ef..0000000000
--- a/3rdparty/ext_boost/0001-Fix-compilation-with-clang-15.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 92edc5c8089196c36bc19d09376dc38eca71b3fe Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Thu, 16 Feb 2023 14:24:08 +0300
-Subject: [PATCH] Fix compilation with clang-15
-
-std::unary_function and std::binary_function are removed from the
-standard.
----
- boost/functional.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boost/functional.hpp b/boost/functional.hpp
-index 644307847..27d36710e 100644
---- a/boost/functional.hpp
-+++ b/boost/functional.hpp
-@@ -21,7 +21,7 @@ namespace boost
- namespace functional
- {
- namespace detail {
--#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC
-+#if (defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC) || defined(BOOST_NO_CXX98_FUNCTION_BASE)
- // std::unary_function and std::binary_function were both removed
- // in C++17.
-
---
-2.38.1.windows.1
-
diff --git a/3rdparty/ext_boost/0001-Support-Android-NDK-r22b.patch b/3rdparty/ext_boost/0001-Support-Android-NDK-r22b.patch
deleted file mode 100644
index 5b14e77ef4..0000000000
--- a/3rdparty/ext_boost/0001-Support-Android-NDK-r22b.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1e7bc9d8d907a78c96d8b52d22e36348327fd643 Mon Sep 17 00:00:00 2001
-From: Sharaf Zaman <[email protected]>
-Date: Fri, 30 Sep 2022 08:03:02 +0000
-Subject: [PATCH] Support Android NDK r22b
-
----
- build-android.sh | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/build-android.sh b/build-android.sh
-index ae5a4fd..d302d1b 100755
---- a/build-android.sh
-+++ b/build-android.sh
-@@ -398,7 +398,7 @@ case "$NDK_RN" in
- TOOLSET=clang
- CONFIG_VARIANT=ndk19
- ;;
-- "23.0"|"23.1"|"25.0"|"25.1")
-+ "22.1"|"23.0"|"23.1"|"25.0"|"25.1")
- TOOLCHAIN=${TOOLCHAIN:-llvm}
- CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/clang++
- TOOLSET=clang
-@@ -419,7 +419,7 @@ if [ -z "${ARCHLIST}" ]; then
-
- case "$NDK_RN" in
- # NDK 17+: Support for ARMv5 (armeabi), MIPS, and MIPS64 has been removed.
-- "17.1"|"17.2"|"18.0"|"18.1"|"19.0"|"19.1"|"19.2"|"20.0"|"20.1"|"21.0"|"21.1"|"21.2"|"21.3"|"21.4"|"23.0"|"23.1"|"25.0"|"25.1")
-+ "17.1"|"17.2"|"18.0"|"18.1"|"19.0"|"19.1"|"19.2"|"20.0"|"20.1"|"21.0"|"21.1"|"21.2"|"21.3"|"21.4"|"22.1"|"23.0"|"23.1"|"25.0"|"25.1")
- ARCHLIST="arm64-v8a armeabi-v7a x86 x86_64"
- ;;
- *)
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_boost/CMakeLists.txt b/3rdparty/ext_boost/CMakeLists.txt
deleted file mode 100644
index 70abb05263..0000000000
--- a/3rdparty/ext_boost/CMakeLists.txt
+++ /dev/null
@@ -1,131 +0,0 @@
-SET(PREFIX_ext_boost "${EXTPREFIX}" )
-if(WIN32)
- if(MINGW)
-
- string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1"
- KRITA_boost_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION})
-
- ExternalProject_Add(
- ext_boost
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
-
- URL https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz
- URL_HASH SHA256=4b2136f98bdd1f5857f1c3dea9ac2018effe65286cf251534b6ae20cc45e1847
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-Krita-builds-with-Clang.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-building-Boost.Build-with-a-chosen-toolset.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-compilation-with-clang-15.patch
-
- CONFIGURE_COMMAND <SOURCE_DIR>/bootstrap.bat gcc --prefix=${PREFIX_ext_boost}
- BUILD_COMMAND <SOURCE_DIR>/b2.exe -j${SUBMAKE_JOBS} linkflags=${SECURITY_SHARED_LINKER_FLAGS} --with-system --build-dir=build-dir --prefix=${PREFIX_ext_boost} toolset=gcc variant=release link=shared threading=multi architecture=x86 address-model=64 install
- INSTALL_COMMAND ""
- INSTALL_DIR ${PREFIX_ext_boost}
-
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE 1
- )
- ExternalProject_Add_Step(
- ext_boost
- post_install
- COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_boost}/lib/libboost_system-mgw${KRITA_boost_COMPILER_VERSION}-mt-x64-1_80.dll ${PREFIX_ext_boost}/bin/
- DEPENDEES install
- )
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- message(STATUS "Applying Clang override to Boost...")
- set(_user_config "using gcc : : ${CMAKE_CXX_COMPILER} ;")
- file(WRITE
- ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam
- "${_user_config}"
- )
- ExternalProject_Add_Step(
- ext_boost
- configure_clang_mingw
- COMMAND ${CMAKE_COMMAND} -E rm <SOURCE_DIR>/project-config.jam
- DEPENDEES configure
- DEPENDERS build
- )
- ExternalProject_Add_Step(
- ext_boost
- patch_clang_mingw
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam <SOURCE_DIR>/tools/build/src/user-config.jam
- DEPENDEES patch
- DEPENDERS configure
- )
- endif()
- else()
- # Boost.Build cannot append arbitrary flags to MSVC from the command line.
- # It becomes unable to detect the target architecture or defaults to x86 only.
- # On top of that, parameterizing the linkflags flag breaks the MinGW build.
- ExternalProject_Add(
- ext_boost
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
-
- URL https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz
- URL_HASH SHA256=4b2136f98bdd1f5857f1c3dea9ac2018effe65286cf251534b6ae20cc45e1847
-
- CONFIGURE_COMMAND <SOURCE_DIR>/bootstrap.bat msvc --prefix=${PREFIX_ext_boost}
- BUILD_COMMAND <SOURCE_DIR>/b2.exe -j${SUBMAKE_JOBS} --with-system --build-dir=build-dir --prefix=${PREFIX_ext_boost} toolset=msvc variant=release link=shared threading=multi architecture=x86 install
- INSTALL_COMMAND ""
- INSTALL_DIR ${EXTPREFIX_boost}
-
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE 1
- )
- if (NOT DEFINED MSVC_TOOLSET_VERSION)
- string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" KRITA_boost_COMPILER ${CMAKE_CXX_COMPILER})
- string(REGEX REPLACE "^([0-9]+)\\.([0-9]).+$" "\\1\\2"
- KRITA_boost_COMPILER_VERSION ${KRITA_boost_COMPILER})
- else()
- set(KRITA_boost_COMPILER_VERSION ${MSVC_TOOLSET_VERSION})
- endif()
- ExternalProject_Add_Step(
- ext_boost
- post_install
- COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_boost}/lib/boost_system-vc${KRITA_boost_COMPILER_VERSION}-mt-x32-1_80.dll ${PREFIX_ext_boost}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_boost}/lib/boost_system-vc${KRITA_boost_COMPILER_VERSION}-mt-x64-1_80.dll ${PREFIX_ext_boost}/bin/
- DEPENDEES install
- )
- endif()
-elseif(ANDROID)
- ExternalProject_Add( ext_boost
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/moritz-wundke/Boost-for-Android/archive/4067aed71278e292d1b78d8a13431f01f80012f1.tar.gz
- URL_HASH SHA256=e43f43b33e79741c393cb84c277ff0a5fdb38e775f082d576c62938ef08fb3b3
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Support-Android-NDK-r22b.patch
-
- CONFIGURE_COMMAND ""
- BUILD_COMMAND <SOURCE_DIR>/build-android.sh --prefix=${PREFIX_ext_boost} --with-libraries=system --boost=1.80.0 --arch=${ANDROID_ABI} ${CMAKE_ANDROID_NDK}
- INSTALL_COMMAND ""
- INSTALL_DIR ${PREFIX_ext_boost}
-
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE 1
- )
- ExternalProject_Add_Step(
- ext_boost
- post_install
- COMMAND sh -c "cp ${PREFIX_ext_boost}/${ANDROID_ABI}/lib/libboost_system-*-1_80.a ${PREFIX_ext_boost}/${ANDROID_ABI}/lib/libboost_system.a"
- DEPENDEES install
- )
-else()
- if(APPLE)
- set(MACOS_BOOST_ARGS architecture=arm+x86 cxxflags=${MACOS_ARCH_FLAGS})
- endif()
- ExternalProject_Add( ext_boost
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz
- URL_HASH SHA256=4b2136f98bdd1f5857f1c3dea9ac2018effe65286cf251534b6ae20cc45e1847
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-compilation-with-clang-15.patch
-
- CONFIGURE_COMMAND <SOURCE_DIR>/bootstrap.sh --prefix=${PREFIX_ext_boost} --with-libraries=system
- BUILD_COMMAND <SOURCE_DIR>/b2 ${MACOS_BOOST_ARGS} -j${SUBMAKE_JOBS} install
- INSTALL_COMMAND ""
- INSTALL_DIR ${PREFIX_ext_boost}
-
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE 1
-)
-endif()
diff --git a/3rdparty/ext_drmingw/CMakeLists.txt b/3rdparty/ext_drmingw/CMakeLists.txt
deleted file mode 100644
index c269bd3d3f..0000000000
--- a/3rdparty/ext_drmingw/CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-SET (PREFIX_ext_drmingw "${EXTPREFIX}")
-if (MINGW)
- ExternalProject_Add(ext_drmingw
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/amyspark/drmingw/releases/download/0.9.7.1/drmingw-0.9.7.1-patched.tar.gz
- URL_HASH SHA256=998848da2f490bfea455f804ccc3f08bc5d5d0fee7813b406c658451ce6da532
-
- INSTALL_DIR ${PREFIX_ext_drmingw}
- CMAKE_ARGS -DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=1 -DCMAKE_DISABLE_FIND_PACKAGE_WinDbg=1 -DPOSIX_THREADS=1 -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_drmingw} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- )
- ExternalProject_Add(ext_drmingw_deps
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/jrfonseca/drmingw/releases/download/0.9.7/drmingw-0.9.7-win64.7z
- URL_HASH SHA256=ff1a62ebc9e0662c7ba7f30141efa047e6ee43a5f1a613f671b0971ba772d597
-
- INSTALL_DIR ${PREFIX_ext_drmingw}
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying Dr. MinGW 64-bit dependencies
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/dbghelp.dll ${PREFIX_ext_drmingw}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/dbgcore.dll ${PREFIX_ext_drmingw}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/symsrv.dll ${PREFIX_ext_drmingw}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/symsrv.yes ${PREFIX_ext_drmingw}/bin/
-
- UPDATE_COMMAND ""
- )
-
- add_dependencies(ext_drmingw ext_drmingw_deps)
-elseif(MSVC)
- ExternalProject_Add(ext_drmingw
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/jrfonseca/drmingw/releases/download/0.9.7/drmingw-0.9.7-win64.7z
- URL_HASH SHA256=ff1a62ebc9e0662c7ba7f30141efa047e6ee43a5f1a613f671b0971ba772d597
-
- INSTALL_DIR ${PREFIX_ext_drmingw}
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying Dr. MinGW 64-bit dependencies (MSVC)
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/dbghelp.dll ${PREFIX_ext_drmingw}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/dbgcore.dll ${PREFIX_ext_drmingw}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/symsrv.dll ${PREFIX_ext_drmingw}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/symsrv.yes ${PREFIX_ext_drmingw}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/exchndl.dll ${PREFIX_ext_drmingw}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/mgwhelp.dll ${PREFIX_ext_drmingw}/bin/
-
- UPDATE_COMMAND ""
- )
-endif (MINGW)
diff --git a/3rdparty/ext_eigen3/CMakeLists.txt b/3rdparty/ext_eigen3/CMakeLists.txt
deleted file mode 100644
index b21a6ac65e..0000000000
--- a/3rdparty/ext_eigen3/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(EXTPREFIX_eigen3 "${EXTPREFIX}" )
-ExternalProject_Add( ext_eigen3
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
- URL_HASH SHA256=8586084f71f9bde545ee7fa6d00288b264a2b7ac3607b974e54d13e7162c1c72
-
- INSTALL_DIR ${EXTPREFIX_eigen3}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_eigen3} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_exiv2/0001-Fix-building-exiv2-with-TDMGCC-10.3.0.patch b/3rdparty/ext_exiv2/0001-Fix-building-exiv2-with-TDMGCC-10.3.0.patch
deleted file mode 100644
index 0a2fdd0f27..0000000000
--- a/3rdparty/ext_exiv2/0001-Fix-building-exiv2-with-TDMGCC-10.3.0.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 676a717734dbfe888016aaffcda492148978e1cd Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Sun, 15 Aug 2021 15:30:29 +0300
-Subject: [PATCH] Fix building exiv2 with TDMGCC 10.3.0
-
----
- xmpsdk/include/XMP_Environment.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/xmpsdk/include/XMP_Environment.h b/xmpsdk/include/XMP_Environment.h
-index 2d04a5c..404640f 100644
---- a/xmpsdk/include/XMP_Environment.h
-+++ b/xmpsdk/include/XMP_Environment.h
-@@ -38,7 +38,7 @@
- # define _WIN64 1
- #endif
-
--#if defined WIN32
-+#if defined WIN32 | defined _WIN32
- # define WIN_ENV 1
- /* Todo: How to correctly recognize a Mac platform? */
- #elif defined macintosh || defined MACOS_CLASSIC || defined MACOS_X_UNIX || defined MACOS_X || defined MACOS || defined(__APPLE__)
---
-2.20.1.windows.1
-
diff --git a/3rdparty/ext_exiv2/01_fpermissive_error.patch b/3rdparty/ext_exiv2/01_fpermissive_error.patch
deleted file mode 100644
index c9fe10cc22..0000000000
--- a/3rdparty/ext_exiv2/01_fpermissive_error.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/src/convert.cpp b/src/convert.cpp
-index ef83a23..89c3ae1 100644
---- a/src/convert.cpp
-+++ b/src/convert.cpp
-@@ -1540,13 +1540,15 @@ namespace {
- }
- std::string outstr;
- EXV_ICONV_CONST char* inptr = const_cast<char*>(str.c_str());
-+ const char** inptr_const = const_cast<const char**>(&inptr);
-+
- size_t inbytesleft = str.length();
- while (inbytesleft) {
- char outbuf[256];
- char* outptr = outbuf;
- size_t outbytesleft = sizeof(outbuf);
- size_t rc = iconv(cd,
-- &inptr,
-+ inptr_const,
- &inbytesleft,
- &outptr,
- &outbytesleft);
diff --git a/3rdparty/ext_exiv2/CMakeLists.txt b/3rdparty/ext_exiv2/CMakeLists.txt
deleted file mode 100644
index eeafa0777b..0000000000
--- a/3rdparty/ext_exiv2/CMakeLists.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-SET(PREFIX_ext_exiv2 "${EXTPREFIX}" )
-
-# Note: We explicitly set CMAKE_CXX_STANDARD=14 when compiling exiv2 because
-# it uses `auto_ptr`, which has been removed in c++17. Clang 16 switches to
-# using -std=c++17 by default, and that causes build failures with libc++.
-
-# FIXME: Remove this setting when exiv2 has been updated to remove usage of
-# `auto_ptr`, and also remove the workaround in `FindLibExiv2.cmake`.
-
-if (ANDROID)
- ExternalProject_Add( ext_exiv2
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/Exiv2/exiv2/releases/download/v0.27.5/exiv2-0.27.5-Source.tar.gz
- URL_HASH SHA256=35a58618ab236a901ca4928b0ad8b31007ebdc0386d904409d825024e45ea6e2
-
- INSTALL_DIR ${PREFIX_ext_exiv2}
- CMAKE_ARGS -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_exiv2} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DEXIV2_BUILD_SAMPLES=OFF -DICONV_LIBRARY=${PREFIX_ext_exiv2}/lib -DEXIV2_ENABLE_NLS=OFF -DICONV_INCLUDE_DIR=${PREFIX_ext_exiv2}/include -DEXPAT_LIBRARY=$ENV{BUILD_ROOT}/i/lib/libexpat.so -DEXPAT_INCLUDE_DIR=$ENV{BUILD_ROOT}/i/include -DEXIV2_BUILD_EXIV2_COMMAND=OFF
- UPDATE_COMMAND ""
- DEPENDS ext_expat
- )
-
-elseif(WIN32)
-
- set(WINDOWS_PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-building-exiv2-with-TDMGCC-10.3.0.patch)
-
- if (ICONV_DEP)
- # our internal ext_iconv has a bit different API
-
- set(WINDOWS_PATCH_COMMAND
- ${WINDOWS_PATCH_COMMAND}
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01_fpermissive_error.patch)
- endif()
-
-
- ExternalProject_Add( ext_exiv2
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/Exiv2/exiv2/releases/download/v0.27.5/exiv2-0.27.5-Source.tar.gz
- URL_HASH SHA256=35a58618ab236a901ca4928b0ad8b31007ebdc0386d904409d825024e45ea6e2
-
- PATCH_COMMAND ${WINDOWS_PATCH_COMMAND}
-
- INSTALL_DIR ${PREFIX_ext_exiv2}
- CMAKE_ARGS -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_exiv2} -DCMAKE_LIBRARY_PATH=${PREFIX_ext_exiv2}/lib -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DEXIV2_BUILD_SAMPLES=OFF -DIconv_INCLUDE_DIR=${PREFIX_ext_exiv2}/include -DEXIV2_ENABLE_NLS=OFF -DEXIV2_BUILD_EXIV2_COMMAND=OFF
-
- UPDATE_COMMAND ""
- DEPENDS ${ICONV_DEP} ${EXPAT_DEP} ${ZLIB_DEP}
- )
-else()
- ExternalProject_Add( ext_exiv2
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/Exiv2/exiv2/releases/download/v0.27.5/exiv2-0.27.5-Source.tar.gz
- URL_HASH SHA256=35a58618ab236a901ca4928b0ad8b31007ebdc0386d904409d825024e45ea6e2
-
- INSTALL_DIR ${PREFIX_ext_exiv2}
- CMAKE_ARGS -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_exiv2} -DCMAKE_LIBRARY_PATH=${PREFIX_ext_exiv2}/lib -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DEXIV2_BUILD_SAMPLES=OFF -DIconv_INCLUDE_DIR=${PREFIX_ext_exiv2}/include -DEXIV2_ENABLE_NLS=OFF -DEXIV2_BUILD_EXIV2_COMMAND=OFF
-
- UPDATE_COMMAND ""
- DEPENDS ${ICONV_DEP} ext_expat
- )
-
-endif()
diff --git a/3rdparty/ext_expat/CMakeLists.txt b/3rdparty/ext_expat/CMakeLists.txt
deleted file mode 100644
index 42b1cd5e93..0000000000
--- a/3rdparty/ext_expat/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PREFIX_ext_expat "${EXTPREFIX}" )
-
-ExternalProject_Add( ext_expat
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.xz
- URL_HASH SHA256=f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25
-
- INSTALL_DIR ${PREFIX_ext_expat}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_expat} -DBUILD_tests=OFF -DBUILD_examples=OFF -DBUILD_tools=OFF -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} <SOURCE_DIR>/expat
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_fcitx-qt/CMakeLists.txt b/3rdparty/ext_fcitx-qt/CMakeLists.txt
deleted file mode 100644
index d0843f641d..0000000000
--- a/3rdparty/ext_fcitx-qt/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-SET(EXTPREFIX_fcitx5-qt "${EXTPREFIX}" )
-
-ExternalProject_Add(
- ext_fcitx5-qt
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME fcitx5-qt-5.1.3.tar.gz
- URL https://github.com/fcitx/fcitx5-qt/archive/refs/tags/5.1.3.tar.gz
- URL_HASH SHA256=fbf5060e94632cdb80cbe8352c217821ebf7bb961b057ab34153f5e53290109e
-
- SOURCE_DIR fcitx5-qt-5.1.3
- INSTALL_DIR ${EXTPREFIX_fcitx5-qt}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_fcitx5-qt} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DENABLE_QT4=OFF -DENABLE_QT5=ON -DENABLE_QT6=OFF -DBUILD_ONLY_PLUGIN=ON
-
- DEPENDS ${QT_DEP}
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_ffmpeg/0001-Copy-over-some-macros-from-libavutil-version.h.patch b/3rdparty/ext_ffmpeg/0001-Copy-over-some-macros-from-libavutil-version.h.patch
deleted file mode 100644
index ac8849b074..0000000000
--- a/3rdparty/ext_ffmpeg/0001-Copy-over-some-macros-from-libavutil-version.h.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 147d4245a0255813bf2d941763f5b3b51fab40af Mon Sep 17 00:00:00 2001
-From: Sharaf Zaman <[email protected]>
-Date: Wed, 12 Jul 2023 13:33:18 +1000
-Subject: [PATCH 1/2] Copy over some macros from libavutil/version.h
-
-Wihtout these the structure included in libraries other than libavutil
-is binary incompatible with the one in libavutil. This causes crashes.
----
- libavutil/version.h.in | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/libavutil/version.h.in b/libavutil/version.h.in
-index 99c6af6732..c7ad155c30 100644
---- a/libavutil/version.h.in
-+++ b/libavutil/version.h.in
-@@ -129,6 +129,18 @@
- #ifndef FF_API_PSEUDOPAL
- #define FF_API_PSEUDOPAL (LIBAVUTIL_VERSION_MAJOR < 57)
- #endif
-+#ifndef FF_API_CHILD_CLASS_NEXT
-+#define FF_API_CHILD_CLASS_NEXT (LIBAVUTIL_VERSION_MAJOR < 57)
-+#endif
-+#ifndef FF_API_BUFFER_SIZE_T
-+#define FF_API_BUFFER_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 57)
-+#endif
-+#ifndef FF_API_D2STR
-+#define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58)
-+#endif
-+#ifndef FF_API_DECLARE_ALIGNED
-+#define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58)
-+#endif
-
-
- /**
---
-2.40.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-Disable-ebp_available-on-android.patch b/3rdparty/ext_ffmpeg/0001-Disable-ebp_available-on-android.patch
deleted file mode 100644
index 4253edc33d..0000000000
--- a/3rdparty/ext_ffmpeg/0001-Disable-ebp_available-on-android.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 2a71fe6ea8de5e412bd45d942cc1634b65ec4f78 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Tue, 30 May 2023 21:52:58 +0300
-Subject: [PATCH] Disable ebp_available on android
-
----
- meson.build | 22 ++++++++++++++--------
- 1 file changed, 14 insertions(+), 8 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index b3f1877346..9942b2d120 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1922,13 +1922,19 @@ if conf.get('x86') == 1
- endif
- endif
-
-- ebp_available = cc.run('''
-- int main() {
-- volatile int i=0;
-- __asm__ volatile ("xorl %%ebp, %%ebp" ::: "%ebp");
-- return i;
-- }
-- ''', name: 'if_ebp_available_this_should_crash')
-+ ebp_available = false
-+
-+ if host_machine.system() != 'android'
-+ ebp_available_test = cc.run('''
-+ int main() {
-+ volatile int i=0;
-+ __asm__ volatile ("xorl %%ebp, %%ebp" ::: "%ebp");
-+ return i;
-+ }
-+ ''', name: 'if_ebp_available_this_should_crash')
-+
-+ ebp_available = ebp_available_test.compiled() and ebp_available_test.returncode() != 0
-+ endif
-
- # FFmpeg upstream doesn't know that EBP is always unavailable
- # under Clang if stack realignment is used. This is probably
-@@ -1938,7 +1944,7 @@ if conf.get('x86') == 1
- # See:
- # - https://github.com/android/ndk/issues/693
- # - https://bugs.llvm.org/show_bug.cgi?id=37542
-- conf.set10('ebp_available', conf.get('aligned_stack') == 1 and ebp_available.compiled() and ebp_available.returncode() != 0)
-+ conf.set10('ebp_available', conf.get('aligned_stack') == 1 and ebp_available)
-
- asm_inline_checks += [
- ['""::"b"(0)', 'ebx_available_1'],
---
-2.25.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-ffmpeg-Add-an-option-to-disable-UB-in-av_uninit.patch b/3rdparty/ext_ffmpeg/0001-ffmpeg-Add-an-option-to-disable-UB-in-av_uninit.patch
deleted file mode 100644
index 65742f8054..0000000000
--- a/3rdparty/ext_ffmpeg/0001-ffmpeg-Add-an-option-to-disable-UB-in-av_uninit.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 5921c6afaeb3c244d5e50d5c73ab2efe62a03e57 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Tue, 11 Apr 2023 10:32:47 +0200
-Subject: [PATCH 1/3] Add an option to disable UB in av_uninit
-
-Usage:
-meson configure -Dno_uninit_ub=true
----
- libavutil/attributes.h | 4 +++-
- meson.build | 5 +++++
- meson_options.txt | 1 +
- 3 files changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/libavutil/attributes.h b/libavutil/attributes.h
-index 5cb9fe3452..d2c75f881c 100644
---- a/libavutil/attributes.h
-+++ b/libavutil/attributes.h
-@@ -150,7 +150,9 @@
- # define av_alias
- #endif
-
--#if (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
-+#if defined(DISABLE_AV_UNINIT_UB)
-+# define av_uninit(x) x=0
-+#elif (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER)
- # define av_uninit(x) x=x
- #else
- # define av_uninit(x) x
-diff --git a/meson.build b/meson.build
-index b3f1877346..a14241eb45 100644
---- a/meson.build
-+++ b/meson.build
-@@ -464,6 +464,11 @@ types_list = [
- 'struct_v4l2_frmivalenum_discrete',
- ]
-
-+if get_option('no_uninit_ub')
-+ add_global_arguments('-DDISABLE_AV_UNINIT_UB=1', language : 'c')
-+ add_global_arguments('-DDISABLE_AV_UNINIT_UB=1', language : 'cpp')
-+endif
-+
- conf.set('runtime_cpudetect', 1)
- asm = get_option('asm')
- inline_asm = get_option('inline_asm')
-diff --git a/meson_options.txt b/meson_options.txt
-index 7608c084e2..d02877e76c 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -2202,3 +2202,4 @@ option('inline_asm', type: 'feature', value: 'enabled', description: 'Enable inl
- # cli is disabled by default to speed up the build since it links statically
- option('cli', type: 'feature', value: 'disabled')
- option('tests', type : 'feature', value : 'auto', description : 'Build tests', yield : true)
-+option('no_uninit_ub', type: 'boolean', value: false, description: 'Disable UB in av_uninit optimization')
---
-2.40.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-ffmpeg-Be-more-forceful-when-setting-PIC-on-x86_32.patch b/3rdparty/ext_ffmpeg/0001-ffmpeg-Be-more-forceful-when-setting-PIC-on-x86_32.patch
deleted file mode 100644
index b68d82b0c1..0000000000
--- a/3rdparty/ext_ffmpeg/0001-ffmpeg-Be-more-forceful-when-setting-PIC-on-x86_32.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 1cd87709f9ed56c5b3a51fb95b7fd3230629c7bd Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Wed, 31 May 2023 16:00:54 +0300
-Subject: [PATCH] [ffmpeg] Be more forceful when setting PIC on x86_32
-
----
- meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/meson.build b/meson.build
-index 9942b2d120..a75ef4deb0 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1506,6 +1506,7 @@ if cpu == 'x86'
- conf.set('x86', 1)
- conf.set('i686', 1)
- conf.set('x86_32', 1)
-+ conf.set10('pic', true)
- elif cpu == 'x86_64'
- arch = 'x86'
- conf.set('x86', 1)
---
-2.25.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-lame-macos-universal.patch b/3rdparty/ext_ffmpeg/0001-lame-macos-universal.patch
deleted file mode 100644
index 59ace14b72..0000000000
--- a/3rdparty/ext_ffmpeg/0001-lame-macos-universal.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git a/include/libmp3lame.sym b/include/libmp3lame.sym
-index ff7d318..fd120f5 100644
---- a/include/libmp3lame.sym
-+++ b/include/libmp3lame.sym
-@@ -1,5 +1,4 @@
- lame_init
--lame_init_old
- lame_set_num_samples
- lame_get_num_samples
- lame_set_in_samplerate
diff --git a/3rdparty/ext_ffmpeg/0001-libavutil-Don-t-disable-PIC-on-x86_32.patch b/3rdparty/ext_ffmpeg/0001-libavutil-Don-t-disable-PIC-on-x86_32.patch
deleted file mode 100644
index d8021af613..0000000000
--- a/3rdparty/ext_ffmpeg/0001-libavutil-Don-t-disable-PIC-on-x86_32.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From f9ced16fd33db383713cf2baa665446a743d8654 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Wed, 31 May 2023 15:28:17 +0300
-Subject: [PATCH] [libavutil] Don't disable PIC on x86_32
-
----
- libavutil/x86/x86inc.asm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
-index 01c35e3a4b..69d816b377 100644
---- a/libavutil/x86/x86inc.asm
-+++ b/libavutil/x86/x86inc.asm
-@@ -105,7 +105,7 @@
- ; x86_32 doesn't require PIC.
- ; Some distros prefer shared objects to be PIC, but nothing breaks if
- ; the code contains a few textrels, so we'll skip that complexity.
-- %undef PIC
-+; %undef PIC
- %endif
- %ifdef PIC
- default rel
---
-2.25.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-libogg-Fix-library-filename-on-Windows.patch b/3rdparty/ext_ffmpeg/0001-libogg-Fix-library-filename-on-Windows.patch
deleted file mode 100644
index a816d4702d..0000000000
--- a/3rdparty/ext_ffmpeg/0001-libogg-Fix-library-filename-on-Windows.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From a200efdbd105bf1c03b04e037d59faac70b83b4e Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Fri, 7 Apr 2023 13:50:12 +0200
-Subject: [PATCH] Fix library filename on Windows
-
----
- win32/ogg.def | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/win32/ogg.def b/win32/ogg.def
-index 030b644..614031b 100644
---- a/win32/ogg.def
-+++ b/win32/ogg.def
-@@ -2,7 +2,6 @@
- ; ogg.def
- ; List of exported functions for Windows builds.
- ;
--LIBRARY ogg
- EXPORTS
- ;
- oggpack_writeinit
---
-2.38.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-libopenh264-Enable-PIC-for-the-assembler-code-on-x86.patch b/3rdparty/ext_ffmpeg/0001-libopenh264-Enable-PIC-for-the-assembler-code-on-x86.patch
deleted file mode 100644
index b0aa94a9fe..0000000000
--- a/3rdparty/ext_ffmpeg/0001-libopenh264-Enable-PIC-for-the-assembler-code-on-x86.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 1848b3307da99d078754280eb1957f1c317079df Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Wed, 31 May 2023 11:10:48 +0300
-Subject: [PATCH] [libopenh264] Enable PIC for the assembler code on x86
-
----
- meson.build | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 4e1102f..00a54e3 100644
---- a/meson.build
-+++ b/meson.build
-@@ -66,9 +66,9 @@ if ['linux', 'android', 'ios', 'darwin'].contains(system)
- endif
- if cpu_family == 'x86'
- asm_format = asm_format32
-- asm_args += ['-DX86_32', '-DHAVE_AVX2']
-+ asm_args += ['-DX86_32', '-DHAVE_AVX2', '-DX86_32_PICASM']
- add_project_arguments('-DHAVE_AVX2', language: 'cpp')
-- add_project_arguments('-DHAVE_AVX2', '-DX86_ASM', '-DX86_32_ASM', language: 'c')
-+ add_project_arguments('-DHAVE_AVX2', '-DX86_ASM', '-DX86_32_ASM', '-DX86_32_PICASM', language: 'c')
- asm_inc = join_paths(meson.current_source_dir(), 'codec', 'common', 'x86', '')
- elif cpu_family == 'x86_64'
- asm_format = asm_format64
-@@ -106,7 +106,7 @@ if ['linux', 'android', 'ios', 'darwin'].contains(system)
- elif system == 'windows'
- if cpu_family == 'x86'
- asm_format = 'win32'
-- asm_args += ['-DPREFIX', '-DX86_32']
-+ asm_args += ['-DPREFIX', '-DX86_32', '-DX86_32_PICASM']
- asm_inc = join_paths(meson.current_source_dir(), 'codec', 'common', 'x86', '')
- elif cpu_family == 'x86_64'
- asm_format = 'win64'
---
-2.25.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-libtheora-Fix-build-on-android-x86.patch b/3rdparty/ext_ffmpeg/0001-libtheora-Fix-build-on-android-x86.patch
deleted file mode 100644
index cfd130cb35..0000000000
--- a/3rdparty/ext_ffmpeg/0001-libtheora-Fix-build-on-android-x86.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0b115a65c37ae75c8110e8f93b3f158bee8f506a Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Tue, 30 May 2023 22:39:57 +0300
-Subject: [PATCH] [libtheora] Fix build on android-x86
-
----
- lib/meson.build | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/lib/meson.build b/lib/meson.build
-index da89dba..c196ceb 100644
---- a/lib/meson.build
-+++ b/lib/meson.build
-@@ -72,6 +72,8 @@ if asm
- 'x86/mmxfrag.c',
- 'x86/mmxidct.c',
- 'x86/mmxstate.c',
-+ 'x86/sse2idct.c',
-+ 'x86/x86cpu.c',
- 'x86/x86state.c',
- )
- encoder_sources += files(
---
-2.25.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-libvorbis-Fix-empty-LIBRARY-tag-in-.def-files.patch b/3rdparty/ext_ffmpeg/0001-libvorbis-Fix-empty-LIBRARY-tag-in-.def-files.patch
deleted file mode 100644
index bb1e9f5eaf..0000000000
--- a/3rdparty/ext_ffmpeg/0001-libvorbis-Fix-empty-LIBRARY-tag-in-.def-files.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From d79b30bc28138225280844727d46656f9b080289 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Fri, 7 Apr 2023 13:58:31 +0200
-Subject: [PATCH] Fix empty LIBRARY tag in .def files
-
----
- win32/vorbis.def | 1 -
- win32/vorbisenc.def | 2 --
- win32/vorbisfile.def | 1 -
- 3 files changed, 4 deletions(-)
-
-diff --git a/win32/vorbis.def b/win32/vorbis.def
-index 884f8f0..0af396a 100644
---- a/win32/vorbis.def
-+++ b/win32/vorbis.def
-@@ -1,6 +1,5 @@
- ; vorbis.def
- ;
--LIBRARY
- EXPORTS
- _floor_P
- _mapping_P
-diff --git a/win32/vorbisenc.def b/win32/vorbisenc.def
-index 79af064..5d7b102 100644
---- a/win32/vorbisenc.def
-+++ b/win32/vorbisenc.def
-@@ -1,7 +1,5 @@
- ; vorbisenc.def
- ;
--LIBRARY
--
- EXPORTS
- vorbis_encode_init
- vorbis_encode_setup_managed
-diff --git a/win32/vorbisfile.def b/win32/vorbisfile.def
-index 4dc5549..243795d 100644
---- a/win32/vorbisfile.def
-+++ b/win32/vorbisfile.def
-@@ -1,6 +1,5 @@
- ; vorbisfile.def
- ;
--LIBRARY
- EXPORTS
- ov_clear
- ov_open
---
-2.38.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/0001-meson-Fix-library-detection-in-prefixed-builds.patch b/3rdparty/ext_ffmpeg/0001-meson-Fix-library-detection-in-prefixed-builds.patch
deleted file mode 100644
index 153f2c3ec8..0000000000
--- a/3rdparty/ext_ffmpeg/0001-meson-Fix-library-detection-in-prefixed-builds.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 6df3e16836d91d2befaf4a6405038b6a17f78b9e Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Thu, 24 Nov 2022 12:47:22 -0300
-Subject: [PATCH] meson: Fix library detection in prefixed builds
-
----
- meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index f812bb1f70..71c2ce7034 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1643,7 +1643,7 @@ foreach check : all_checks
- else
- req = false
- endif
-- dep = cc.find_library(link_with, required : req)
-+ dep = cc.find_library(link_with, required : req, dirs: [join_paths(get_option('prefix'), get_option('libdir'))])
- found = found and dep.found()
- extra_deps += dep
- endforeach
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/0002-ffmpeg-Fix-crashes-in-ff_seek_frame_binary-if-built-with-la.patch b/3rdparty/ext_ffmpeg/0002-ffmpeg-Fix-crashes-in-ff_seek_frame_binary-if-built-with-la.patch
deleted file mode 100644
index 7fe2e7ff86..0000000000
--- a/3rdparty/ext_ffmpeg/0002-ffmpeg-Fix-crashes-in-ff_seek_frame_binary-if-built-with-la.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From eb3a284b4cebfa56eaa11523ebd943fb131b7ea1 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Tue, 11 Apr 2023 11:02:21 +0200
-Subject: [PATCH 2/3] -Fix crashes in ff_seek_frame_binary if built with latest
- Clang 14
-
-Passing an uninitialized variable as argument to a function is
-undefined behaviour (UB). The compiler can assume that UB does not
-happen.
-
-Hence, the compiler can assume that the variables are never
-uninitialized when passed as argument, which means that the codepaths
-that initializes them must be taken.
-
-In ff_seek_frame_binary, this means that the compiler can assume
-that the codepaths that initialize pos_min and pos_max are taken,
-which means that the conditions "if (sti->index_entries)" and
-"if (index >= 0)" can be optimized out.
-
-Current Clang git versions (upcoming Clang 14) enabled an optimization
-that does this, which broke the current version of this function
-(which intentionally left the variables uninitialized, but silencing
-warnings about being uninitialized). See [1] for discussion on
-the matter.
-
-[1] https://reviews.llvm.org/D105169#3069555
-
-Original commit:
-
-https://github.com/FFmpeg/FFmpeg/commit/ab792634197e364ca1bb194f9abe36836e42f12d
-
----
- libavformat/utils.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/utils.c b/libavformat/utils.c
-index b2d011a0db..d79a13ca7a 100644
---- a/libavformat/utils.c
-+++ b/libavformat/utils.c
-@@ -2146,7 +2146,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index,
- int64_t target_ts, int flags)
- {
- const AVInputFormat *avif = s->iformat;
-- int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit;
-+ int64_t pos_min = 0, pos_max = 0, pos, pos_limit;
- int64_t ts_min, ts_max, ts;
- int index;
- int64_t ret;
---
-2.40.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/0002-lame-Install-pkg-config-file.patch b/3rdparty/ext_ffmpeg/0002-lame-Install-pkg-config-file.patch
deleted file mode 100644
index a5e68e69f6..0000000000
--- a/3rdparty/ext_ffmpeg/0002-lame-Install-pkg-config-file.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3908e72cc6b7600f9645e71c795cdff0024ebd88 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Thu, 24 Nov 2022 01:20:53 +0000
-Subject: [PATCH 2/3] lame: Install pkg-config file
-
----
- meson.build | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/meson.build b/meson.build
-index c29d68e..798048f 100644
---- a/meson.build
-+++ b/meson.build
-@@ -246,3 +246,12 @@ subdir('libmp3lame')
- if curses_dep.found()
- subdir('frontend')
- endif
-+
-+pkg = import('pkgconfig')
-+
-+pkg.generate(
-+ lamelib,
-+ name: meson.project_name(),
-+ description: 'LAME is a high quality MPEG Audio Layer III (MP3) encoder',
-+ url: 'http://lame.sourceforge.net/'
-+)
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/0003-ffmpeg-Add-options-for-SSP-and-CFGuard.patch b/3rdparty/ext_ffmpeg/0003-ffmpeg-Add-options-for-SSP-and-CFGuard.patch
deleted file mode 100644
index 1923c96afd..0000000000
--- a/3rdparty/ext_ffmpeg/0003-ffmpeg-Add-options-for-SSP-and-CFGuard.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 7aa8faf667f47e3679928fd415aac91f9a1b4e71 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Tue, 11 Apr 2023 14:55:10 +0200
-Subject: [PATCH 3/3] Add options for SSP and CFGuard
-
----
- meson.build | 13 +++++++++++++
- meson_options.txt | 2 ++
- 2 files changed, 15 insertions(+)
-
-diff --git a/meson.build b/meson.build
-index a14241eb45..8e0d2fa713 100644
---- a/meson.build
-+++ b/meson.build
-@@ -464,6 +464,19 @@ types_list = [
- 'struct_v4l2_frmivalenum_discrete',
- ]
-
-+option_cfguard = get_option('enable-cfguard').require(cc.has_argument('-mguard=cf'), error_message : 'Compiler does not support cfguard')
-+if option_cfguard.allowed()
-+ add_global_arguments('-mguard=cf', language : ['c', 'cpp'])
-+ add_global_link_arguments('-mguard=cf', language : ['c', 'cpp'])
-+ message('Enabled CFGuard')
-+endif
-+
-+if get_option('enable-ssp').require(cc.has_argument('-fstack-protector-strong'), error_message : 'Compiler does not support -fstack-protector-strong').allowed()
-+ add_global_arguments('-fstack-protector-strong', language : ['c', 'cpp'])
-+ add_global_link_arguments('-fstack-protector-strong', language : ['c', 'cpp'])
-+ message('Enabled SSP')
-+endif
-+
- if get_option('no_uninit_ub')
- add_global_arguments('-DDISABLE_AV_UNINIT_UB=1', language : 'c')
- add_global_arguments('-DDISABLE_AV_UNINIT_UB=1', language : 'cpp')
-diff --git a/meson_options.txt b/meson_options.txt
-index d02877e76c..4452ddce72 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -2203,3 +2203,5 @@ option('inline_asm', type: 'feature', value: 'enabled', description: 'Enable inl
- option('cli', type: 'feature', value: 'disabled')
- option('tests', type : 'feature', value : 'auto', description : 'Build tests', yield : true)
- option('no_uninit_ub', type: 'boolean', value: false, description: 'Disable UB in av_uninit optimization')
-+option('enable-ssp', type: 'feature', value: 'enabled', description: 'Enable -fstack-protector-strong')
-+option('enable-cfguard', type: 'feature', value: 'auto', description: 'Enable control flow guard')
---
-2.40.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/0010-theora-Update-to-1.2.0.patch b/3rdparty/ext_ffmpeg/0010-theora-Update-to-1.2.0.patch
deleted file mode 100644
index 262a3b6373..0000000000
--- a/3rdparty/ext_ffmpeg/0010-theora-Update-to-1.2.0.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From 6e49ef502d2eeb7793f35dc336d3a86e1a3525eb Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Fri, 2 Dec 2022 15:59:05 +0000
-Subject: [PATCH 10/11] theora: Update to 1.2.0
-
----
- examples/meson.build | 17 +++++++++++++++++
- lib/meson.build | 13 +++++++++++++
- meson.build | 18 +++++++++++++-----
- 3 files changed, 43 insertions(+), 5 deletions(-)
-
-diff --git a/examples/meson.build b/examples/meson.build
-index fc78b86..0c8c982 100644
---- a/examples/meson.build
-+++ b/examples/meson.build
-@@ -48,6 +48,14 @@ dump_psnr = executable(
- dependencies: [m_dep, getopt_dep] + theoradec_libs,
- )
-
-+libtheora_info_sources = files('libtheora_info.c')
-+
-+libtheora_info = executable(
-+ 'libtheora_info',
-+ libtheora_info_sources,
-+ dependencies: [config_dep] + theoraenc_libs,
-+)
-+
- player_example_sources = files('player_example.c')
-
- player_example = executable(
-@@ -78,3 +86,12 @@ png2theora = executable(
- dependencies: [ogg_dep, libpng_dep, unistd_dep, m_dep, getopt_dep, config_dep] +
- theoraenc_libs,
- )
-+
-+tiff2theora_sources = files('tiff2theora.c')
-+
-+tiff2theora = executable(
-+ 'tiff2theora',
-+ tiff2theora_sources,
-+ dependencies: [ogg_dep, tiff_dep, unistd_dep, m_dep, getopt_dep, config_dep] +
-+ theoraenc_libs,
-+)
-diff --git a/lib/meson.build b/lib/meson.build
-index e5cfca7..5f15375 100644
---- a/lib/meson.build
-+++ b/lib/meson.build
-@@ -47,14 +47,20 @@ if asm
- 'x86/mmxfrag.c',
- 'x86/mmxidct.c',
- 'x86/mmxstate.c',
-+ 'x86/sse2encfrag.c',
- 'x86/sse2fdct.c',
-+ 'x86/sse2idct.c',
-+ 'x86/x86cpu.c',
- 'x86/x86enc.c',
-+ 'x86/x86enquant.c',
- 'x86/x86state.c',
- )
- decoder_sources += files(
- 'x86/mmxfrag.c',
- 'x86/mmxidct.c',
- 'x86/mmxstate.c',
-+ 'x86/sse2idct.c',
-+ 'x86/x86cpu.c',
- 'x86/x86state.c',
- )
- endif
-@@ -72,8 +78,13 @@ if asm
- 'x86/mmxfrag.c',
- 'x86/mmxidct.c',
- 'x86/mmxstate.c',
-+ 'x86/sse2encfrag.c',
-+ 'x86/sse2idct.c',
-+ 'x86/x86cpu.c',
- 'x86/x86enc.c',
-+ 'x86/x86enquant.c',
- 'x86/x86state.c',
-+
- )
- else
- encoder_sources += files(
-@@ -82,6 +93,7 @@ if asm
- 'x86_vc/mmxfrag.c',
- 'x86_vc/mmxidct.c',
- 'x86_vc/mmxstate.c',
-+ 'x86_vc/x86cpu.c',
- 'x86_vc/x86enc.c',
- 'x86_vc/x86state.c',
- )
-@@ -89,6 +101,7 @@ if asm
- 'x86_vc/mmxfrag.c',
- 'x86_vc/mmxidct.c',
- 'x86_vc/mmxstate.c',
-+ 'x86_vc/x86cpu.c',
- 'x86_vc/x86state.c',
- )
- endif
-diff --git a/meson.build b/meson.build
-index e317a92..e9152c3 100644
---- a/meson.build
-+++ b/meson.build
-@@ -2,7 +2,7 @@ project(
- 'theora',
- 'c',
- 'cpp',
-- version: '1.1.1',
-+ version: '1.2.0',
- meson_version: '>= 0.49.0',
- license: 'BSD-3-Clause',
- default_options: ['c_std=c11'],
-@@ -95,7 +95,18 @@ else
- unistd_dep = disabler()
- endif
-
-+tiff_dep = dependency('tiff', required: false, disabler: true)
-+
-+if tiff_dep.found() and not cc.has_header_symbol(
-+ 'tiffio.h',
-+ 'TIFFReadRGBAImage',
-+ dependencies: tiff_dep
-+ )
-+ tiff_dep = disabler()
-+endif
-+
- cairo_dep = dependency('cairo', required: get_option('telemetry'))
-+
- if cairo_dep.found()
- conf.set('HAVE_CAIRO', true)
- endif
-@@ -216,10 +227,7 @@ if spec.auto() or spec.enabled()
- tex_pkg_ok = false
- endif
-
-- if tex_pkg_ok and meson.project_version() > '1.2.0alpha1'
-- # libtheora <= 1.2.0alpha1 has a tex file which is incompatible
-- # with TeX distributions < 2015 at the least.
-- # See commit fbb275803696085225c310773474ef4dcf8a4528.
-+ if tex_pkg_ok
- subdir('doc/spec')
- else
- message('*** Format Specification will not be built.')
---
-2.40.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/0011-theora-Add-Arm-support.patch b/3rdparty/ext_ffmpeg/0011-theora-Add-Arm-support.patch
deleted file mode 100644
index 9ced08ce23..0000000000
--- a/3rdparty/ext_ffmpeg/0011-theora-Add-Arm-support.patch
+++ /dev/null
@@ -1,214 +0,0 @@
-From cc2af79c5c19555dadf337f309b1a400c5ba476e Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Fri, 2 Dec 2022 15:59:17 +0000
-Subject: [PATCH 11/11] theora: Add Arm support
-
----
- lib/arm/arm2gnu-wrapper.py | 13 +++++++++
- lib/meson.build | 51 +++++++++++++++++++++++++++++---
- meson.build | 59 ++++++++++++++++++++++++++++++++++++++
- meson_options.txt | 1 +
- 4 files changed, 120 insertions(+), 4 deletions(-)
- create mode 100644 lib/arm/arm2gnu-wrapper.py
-
-diff --git a/lib/arm/arm2gnu-wrapper.py b/lib/arm/arm2gnu-wrapper.py
-new file mode 100644
-index 0000000..bb4ca25
---- /dev/null
-+++ b/lib/arm/arm2gnu-wrapper.py
-@@ -0,0 +1,13 @@
-+#!/usr/bin/env python3
-+
-+from argparse import ArgumentParser
-+from pathlib import Path
-+from subprocess import run
-+
-+if __name__ == '__main__':
-+ parser = ArgumentParser(description='Wraps around the Perl script to pipe input and output')
-+ parser.add_argument('--program', help="Line to feed to subprocess.run as program")
-+ parser.add_argument('infile', type=Path, help='Source file')
-+ args = parser.parse_args()
-+
-+ run(args.program.split(), stdin=args.infile.open(), check=True)
-diff --git a/lib/meson.build b/lib/meson.build
-index 5f15375..da89dba 100644
---- a/lib/meson.build
-+++ b/lib/meson.build
-@@ -38,6 +38,8 @@ decoder_sources = files(
- 'state.c',
- )
-
-+common_arm_sources = files()
-+
- if asm
- if conf.get('CPU_x86_64', false)
- if cc.get_argument_syntax() != 'msvc'
-@@ -105,6 +107,47 @@ if asm
- 'x86_vc/x86state.c',
- )
- endif
-+ elif cc.get_id() == 'gcc' and conf.get('CPU_arm', false)
-+ # The Arm bits require the Arm -> GNU conversion script
-+
-+ arm2gnu_pl = find_program('arm/arm2gnu.pl', required: true)
-+ arm2gnu_py = find_program('arm/arm2gnu-wrapper.py', required: true)
-+
-+ arm2gnu_gen = generator(
-+ arm2gnu_py,
-+ arguments: ['--program', arm2gnu_pl.full_path(), '@INPUT@'],
-+ capture: true,
-+ output: '@[email protected]',
-+ )
-+
-+ arm_opts_s = configure_file(
-+ input: 'arm/armopts.s.in',
-+ configuration: conf,
-+ output: 'armopts.S',
-+ )
-+
-+ common_arm_sources += arm2gnu_gen.process(
-+ files('arm/armbits.s', 'arm/armfrag.s', 'arm/armidct.s', 'arm/armloop.s'),
-+ arm_opts_s,
-+ )
-+
-+ encoder_sources += arm2gnu_gen.process(
-+ files(
-+ 'arm/armencfrag.s',
-+ 'arm/armenquant.s',
-+ ),
-+ )
-+
-+ encoder_sources += files(
-+ 'arm/armcpu.c',
-+ 'arm/armenc.c',
-+ 'arm/armstate.c',
-+ )
-+
-+ decoder_sources += files(
-+ 'arm/armcpu.c',
-+ 'arm/armstate.c',
-+ )
- endif
- endif
-
-@@ -177,7 +220,7 @@ endif
-
- libtheoradec = library(
- 'theoradec',
-- decoder_sources + decoder_res,
-+ decoder_sources + common_arm_sources + decoder_res,
- dependencies: [m_dep, libpng_dep, ogg_dep, cairo_dep, config_dep],
- include_directories: incdir,
- vs_module_defs: '../win32/xmingw32/libtheoradec-all.def',
-@@ -202,8 +245,8 @@ theoradec_dep = declare_dependency(
-
- libtheoraenc = library(
- 'theoraenc',
-- encoder_sources + encoder_res,
-- dependencies: [m_dep, libpng_dep, ogg_dep, config_dep],
-+ encoder_sources + common_arm_sources + encoder_res,
-+ dependencies: [m_dep, ogg_dep, config_dep],
- include_directories: incdir,
- vs_module_defs: '../win32/xmingw32/libtheoraenc-all.def',
- c_args: compile_args,
-@@ -232,7 +275,7 @@ theoraenc_dep = declare_dependency(
-
- libtheora = library(
- 'theora',
-- encoder_sources + decoder_sources,
-+ encoder_sources + common_arm_sources + decoder_sources,
- dependencies: [m_dep, libpng_dep, ogg_dep, config_dep],
- include_directories: incdir,
- c_args: compile_args,
-diff --git a/meson.build b/meson.build
-index e9152c3..d9e3414 100644
---- a/meson.build
-+++ b/meson.build
-@@ -118,6 +118,7 @@ if mem_constraint.enabled()
- endif
-
- asm = not get_option('asm').disabled()
-+enable_asflag_probe = not get_option('asflag-probe').disabled()
- if asm
- if host_machine.cpu_family() == 'x86_64'
- conf.set('CPU_x86_64', true)
-@@ -128,6 +129,64 @@ if asm
- elif host_machine.cpu_family() == 'x86'
- conf.set('CPU_x86_32', true)
- conf.set('OC_X86_ASM', true)
-+ elif host_machine.cpu_family() == 'arm' or host_machine.cpu_family() == 'aarch64'
-+ conf.set('CPU_arm', true)
-+ if cc.get_id() == 'gcc'
-+ conf.set('OC_ARM_ASM', true)
-+ endif
-+ endif
-+
-+ if cc.get_id() == 'gcc' and conf.get('CPU_arm', false)
-+ # The following checks were only designed for GNU AS.
-+ # Perl is needed for the arm2gnu reformatter.
-+ perl_exe = find_program('perl', required: false, disabler: true)
-+
-+ if not perl_exe.found()
-+ warning('*** ARM assembly requires perl -- disabling optimizations')
-+ endif
-+
-+ if enable_asflag_probe and perl_exe.found()
-+ assembler_checks = [
-+ [
-+ ['HAVE_ARM_ASM_NEON', 'OC_ARM_ASM_NEON'],
-+ '''.file "configure"
-+ vorr d0,d0,d0
-+ ''',
-+ ['-mfpu=neon', '-march=armv7-a'],
-+ 'assembler supports NEON instructions on ARM'
-+ ],
-+ [
-+ ['HAVE_ARM_ASM_MEDIA', 'OC_ARM_ASM_MEDIA'],
-+ '''.file "configure"
-+ shadd8 r3,r3,r3
-+ ''',
-+ ['-march=armv6j'],
-+ 'assembler supports ARMv6 media instructions on ARM'],
-+ [
-+ ['HAVE_ARM_ASM_EDSP', 'OC_ARM_ASM_EDSP'],
-+ '''.file "configure"
-+ qadd r3,r3,r3
-+ ''',
-+ ['-march=armv5e'],
-+ 'assembler supports EDSP instructions on ARM'
-+ ]
-+ ]
-+
-+ foreach check : assembler_checks
-+ pass = cc.compiles(check[1],
-+ args: ['-x', 'assembler'],
-+ name: check[3]
-+ ) or cc.compiles(check[1],
-+ args: ['-x', 'assembler'] + check[2],
-+ name: check[3]
-+ )
-+
-+ foreach define : check[0]
-+ conf.set(define, pass)
-+ conf.set(define, pass)
-+ endforeach
-+ endforeach
-+ endif
- endif
- endif
-
-diff --git a/meson_options.txt b/meson_options.txt
-index b791623..cf2f628 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -2,6 +2,7 @@ option('doc', type: 'feature', value: 'auto', description: 'Build API documentat
- option('spec', type: 'feature', value: 'auto', description: 'Build the specification')
- option('valgrind-testing', type: 'feature', value: 'disabled', description: 'Enable running of tests inside Valgrind')
- option('asm', type: 'feature', value: 'enabled', description: 'Enable assembly optimizations')
-+option('asflag-probe', type: 'feature', value: 'enabled', description: 'Enable instructions not supported by the default assembler flags (Arm only).')
- option('telemetry', type: 'feature', value: 'disabled', description: 'Enable debugging output controls')
- option('mem-constraint', type: 'feature', value: 'disabled', description: 'Abort if size exceeds 16384x16384 (for fuzzing only)')
- option('examples', type: 'feature', value: 'disabled', description: 'Enable examples')
---
-2.40.1.windows.1
-
diff --git a/3rdparty/ext_ffmpeg/CMakeLists.txt b/3rdparty/ext_ffmpeg/CMakeLists.txt
deleted file mode 100644
index 4d2d221dc7..0000000000
--- a/3rdparty/ext_ffmpeg/CMakeLists.txt
+++ /dev/null
@@ -1,332 +0,0 @@
-SET(PREFIX_ext_ffmpeg "${EXTPREFIX}")
-
-# ======================== AUDIO ===========================
-
-ExternalProject_Add(
- ext_libogg
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://downloads.xiph.org/releases/ogg/libogg-1.3.5.tar.gz
- URL_HASH SHA256=0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-libogg-Fix-library-filename-on-Windows.patch
-
- CMAKE_ARGS ${LIBOGG_EXTRA_CMAKE_ARGS} -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_ffmpeg} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-
-ExternalProject_Add(
- ext_libvorbis
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.xz
- URL_HASH SHA256=b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-libvorbis-Fix-empty-LIBRARY-tag-in-.def-files.patch
-
- CMAKE_ARGS ${LIBVORBIS_EXTRA_CMAKE_ARGS} -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_ffmpeg} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-
- DEPENDS ${OGG_DEP}
-)
-
-ExternalProject_Add(
- ext_libtheora_meson
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://wrapdb.mesonbuild.com/v2/theora_1.1.1-4/get_patch
- URL_HASH SHA256=210af99fbc5a1b34d0f32270c25ecfb6fae7e76c1ae9dc6971b063317c97a826
-
- DOWNLOAD_NAME "theora_1.1.1-4_patch.zip"
-
- BUILD_COMMAND ""
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ""
- UPDATE_COMMAND ""
-
- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/theora_meson"
-)
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_libtheora
- MESON
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://gitlab.xiph.org/xiph/theora.git
- # gitlab-ci: Add scons build. Latest commit as of Nov 26, 2022
- GIT_TAG 7180717276af1ebc7da15c83162d6c5d6203aabf
-
- PATCH_COMMAND ${CMAKE_COMMAND} -E echo Deploying Meson wrap
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${CMAKE_CURRENT_BINARY_DIR}/theora_meson
- <SOURCE_DIR>
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0010-theora-Update-to-1.2.0.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0011-theora-Add-Arm-support.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-libtheora-Fix-build-on-android-x86.patch
-
- CONFIGURE_ARGS --prefix=${PREFIX_ext_ffmpeg}
- -Ddoc=disabled
- -Dspec=disabled
- ${EXTRA_MESON_FLAGS}
-
- UPDATE_COMMAND ""
-
- DEPENDS ${MESON_DEP} ${PKG_CONFIG_DEP} ${OGG_DEP} ext_png ext_libvorbis ext_libtheora_meson
-)
-
-
-ExternalProject_Add(
- ext_flac
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- # the official .tar.xz cannot be unpacked by CMake on macOS due to usage
- # of UTF-8 internationalized filenames in
- # test/flac-to-flac-metadata-test-files.
- GIT_REPOSITORY https://github.com/xiph/flac.git
- GIT_TAG 1.4.2
-
- # Emmet: if you need metaflac, please add:
- # -DIconv_IS_BUILT_IN=TRUE
- # -DBUILD_PROGRAMS=FALSE
- # and add ${ICONV_DEP} to DEPENDS.
- # otherwise CMake's FindIconv gets confused due to libiconv having
- # its headers in the include path
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_ffmpeg}
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- -DBUILD_SHARED_LIBS=TRUE
- -DBUILD_PROGRAMS=FALSE
- -DBUILD_EXAMPLES=FALSE
- -DBUILD_TESTING=FALSE
- -DBUILD_DOCS=FALSE
- -DINSTALL_MANPAGES=FALSE
- ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-
- DEPENDS ${OGG_DEP}
-)
-
-ExternalProject_Add(
- ext_opus
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- # Official tarball has a missing opus_buildtype.cmake
- # The Git tag is complete
- GIT_REPOSITORY https://gitlab.xiph.org/xiph/opus.git
- GIT_TAG v1.3.1
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_ffmpeg}
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- -DBUILD_SHARED_LIBS=TRUE
- -DOPUS_STACK_PROTECTOR=OFF
- ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-
-# ======================== VIDEO ===========================
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_libopenh264
- MESON
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME openh264-v2.3.1.tar.gz
- URL https://github.com/cisco/openh264/archive/v2.3.1.tar.gz
- URL_HASH SHA256=453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-libopenh264-Enable-PIC-for-the-assembler-code-on-x86.patch
-
- CONFIGURE_ARGS --prefix=${PREFIX_ext_ffmpeg}
- -Dtests=disabled
- ${EXTRA_MESON_FLAGS}
-
- DEPENDS ext_nasm ${MESON_DEP} ${PKG_CONFIG_DEP}
-)
-
-
-ExternalProject_Add(
- ext_libmp3lame_meson
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://wrapdb.mesonbuild.com/v2/lame_3.100-9/get_patch
- URL_HASH SHA256=bedda639a621b2046fb04110a51870d6c9640f2f4282b5d877bc452e9943c22e
-
- DOWNLOAD_NAME "lame_3.100-9_patch.zip"
-
- BUILD_COMMAND ""
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ""
- UPDATE_COMMAND ""
-
- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/lame_meson"
-)
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_libmp3lame
- MESON
-
- URL https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz
- URL_HASH SHA256=ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e
-
- PATCH_COMMAND ${CMAKE_COMMAND} -E echo Deploying Meson wrap
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${CMAKE_CURRENT_BINARY_DIR}/lame_meson
- <SOURCE_DIR>
- COMMAND ${CMAKE_COMMAND} -E echo Deploying patches
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-lame-Install-pkg-config-file.patch
-
- CONFIGURE_ARGS --prefix=${PREFIX_ext_ffmpeg}
- -Dtools=disabled
- ${EXTRA_MESON_FLAGS}
-
- DEPENDS ${MESON_DEP} ${PKG_CONFIG_DEP} ext_libmp3lame_meson
-)
-
-if (ANDROID)
- ExternalProject_Add(
- ext_sdl2
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://github.com/sh-zam/SDL-android-glue.git
- GIT_TAG 8babf290ece99a58a5354d52775bf79063cf7cf5
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_ffmpeg}
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- -DBUILD_SHARED_LIBS=TRUE -DSDL_ANDROID_AUDIO_STRIPPED=ON -DSDL_HAPTIC=OFF
- -DSDL_JOYSTICK=OFF -DSDL_VIDEO=OFF -DSDL_SENSOR=OFF -DSDL_MISC=OFF -DSDL_POWER=OFF
- -DSDL_LOCALE=OFF -DSDL_FILESYSTEM=OFF -DINSTALL_JARS_PATH=${PREFIX_ext_ffmpeg}/jar
- -DANDROID_SDK=${ANDROID_SDK_ROOT} -DANDROID_JAVA_PLATFORM_API=${ANDROID_SDK_COMPILE_API}
- ${GLOBAL_PROFILE}
-
-
- UPDATE_COMMAND ""
- )
-else()
- ExternalProject_Add(
- ext_sdl2
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/libsdl-org/SDL/releases/download/release-2.26.0/SDL2-2.26.0.tar.gz
- URL_HASH SHA256=8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_ffmpeg}
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- -DBUILD_SHARED_LIBS=TRUE
- ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- )
-endif()
-
-
-if (ANDROID AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686")
- set (_extra_meson_flags_orig ${EXTRA_MESON_FLAGS})
- set (EXTRA_MESON_FLAGS -Dmultithread=disabled "${EXTRA_MESON_FLAGS}")
-endif()
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_vpx
- MESON
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://github.com/dimula73/libvpx.git
- GIT_TAG meson
-
- WORKING_DIRECTORY <BINARY_DIR>
-
- CONFIGURE_ARGS --prefix=${PREFIX_ext_ffmpeg}
- -Ddefault_library=shared
- -Dunit_tests=disabled
- -Dtools=disabled
- -Ddocs=disabled
- ${EXTRA_MESON_FLAGS}
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_nasm ${MESON_DEP} ${PKG_CONFIG_DEP}
-)
-
-if (ANDROID AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686")
- set (EXTRA_MESON_FLAGS ${_extra_meson_flags_orig})
- set(DISABLE_ASM_ON_ANDROID_x86_32 "-Dasm=disabled" "-Dinline_asm=disabled")
-endif()
-# IMPORTANT:
-# OpenSUSE's list of whitelisted encoders: https://build.opensuse.org/package/view_file/openSUSE:Factory/ffmpeg-5/enable_encoders
-# OpenSUSE's list of whitelisted decoders: https://build.opensuse.org/package/view_file/openSUSE:Factory/ffmpeg-5/enable_decoders
-# Above are the lists of codecs that have been approved for use by OpenSUSE's legal department.
-# Anything not enabled (missing or commented out) in these lists is considered unsafe and should NOT be used!
-# While unlikely, it's possible that these lists could change, so it's worth occasionally cross-referencing.
-
-if (NOT MSVC)
- set(_stack_guard_flag "-Denable-ssp=enabled")
-endif()
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_ffmpeg
- MESON
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg.git
- GIT_TAG meson-4.4
-
- # Workaround https://github.com/mesonbuild/meson/issues/11113
- # See https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg/-/issues/31
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-meson-Fix-library-detection-in-prefixed-builds.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-ffmpeg-Add-an-option-to-disable-UB-in-av_uninit.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-ffmpeg-Fix-crashes-in-ff_seek_frame_binary-if-built-with-la.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-ffmpeg-Add-options-for-SSP-and-CFGuard.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Disable-ebp_available-on-android.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-libavutil-Don-t-disable-PIC-on-x86_32.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-ffmpeg-Be-more-forceful-when-setting-PIC-on-x86_32.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Copy-over-some-macros-from-libavutil-version.h.patch
-
- CONFIGURE_ARGS --prefix=${PREFIX_ext_ffmpeg}
- --libdir=lib
- -Dno_uninit_ub=true
- ${_stack_guard_flag}
- -Denable-cfguard=disabled # TODO: change to 'auto' when Krita enabled cfguard internally
- -Dbuildtype=$<IF:$<CONFIG:Debug>,debug,debugoptimized>
- -Ddefault_library=shared
- ${DISABLE_ASM_ON_ANDROID_x86_32}
- -Dcli=enabled
- -Dtests=disabled
- -Dffprobe=enabled
- -Dffplay=disabled
- -Davdevice=disabled
- -Davcodec=enabled
- -Davformat=enabled
- -Davutil=enabled
- -Davresample=enabled
- -Dswresample=enabled
- -Dswscale=enabled
- -Dpostproc=disabled
- -Dsdl2=enabled
- -Dlibaom=enabled
- -Dzlib=enabled
- -Dimage2_demuxer=enabled
- -Dimage2_alias_pix_demuxer=enabled
- -Dimage2_brender_pix_demuxer=enabled
- # ===================== Container Formats
- -Dwebm_muxer=enabled
- -Dmatroska_muxer=enabled
- -Dogg_muxer=enabled
- -Dapng_muxer=enabled
- # ===================== Image Formats
- -Dlibwebp=enabled
- -Dpng_encoder=enabled
- -Dpng_decoder=enabled
- -Dapng_encoder=enabled
- -Dapng_decoder=enabled
- # ===================== Video Codecs
- -Dlibaom_av1_encoder=enabled
- -Dlibvpx_vp9_encoder=auto
- -Dlibvpx_vp8_encoder=auto
- -Dlibopenh264=enabled
- -Dlibtheora=enabled
- # ===================== Audio Codecs
- -Dflac_encoder=enabled
- -Daac_encoder=enabled
- -Dlibmp3lame=enabled
- -Dlibopus=enabled
- -Dlibvorbis=enabled
- ${EXTRA_MESON_FLAGS}
-
- UPDATE_COMMAND ""
-
- DEPENDS ${FLAC_DEP} ${OPUS_DEP} ${SDL_DEP} ${VPX_DEP} ext_libvorbis ext_libtheora ext_libopenh264 ext_libmp3lame ext_libaom ext_webp ext_png ext_jpeg ${MESON_DEP} ${PKG_CONFIG_DEP}
-)
diff --git a/3rdparty/ext_fftw3/CMakeLists.txt b/3rdparty/ext_fftw3/CMakeLists.txt
deleted file mode 100644
index a2a0235c25..0000000000
--- a/3rdparty/ext_fftw3/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-SET(PREFIX_ext_fftw3 "${EXTPREFIX}" )
-
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i?86.*|x86.*|x86_64.*|amd64.*|AMD64.*)")
- set(SSE_OPTIMIZATIONS_STRING "-DENABLE_SSE=ON" "-DENABLE_SSE2=ON")
-else()
- set(SSE_OPTIMIZATIONS_STRING "")
-endif()
-
-if (WIN32)
-ExternalProject_Add( ext_fftw3
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://fftw.org/fftw-3.3.10.tar.gz
- URL_HASH SHA256=56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
-
- INSTALL_DIR ${PREFIX_ext_fftw3}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_fftw3} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} ${SSE_OPTIMIZATIONS_STRING} -DBUILD_TESTS=OFF -DWITH_COMBINED_THREADS=ON
-
- UPDATE_COMMAND ""
-)
-else()
-ExternalProject_Add( ext_fftw3
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://fftw.org/fftw-3.3.10.tar.gz
- URL_HASH SHA256=56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
-
- INSTALL_DIR ${PREFIX_ext_fftw3}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_fftw3} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} ${SSE_OPTIMIZATIONS_STRING} -DBUILD_TESTS=OFF -DENABLE_THREADS=ON
-
- UPDATE_COMMAND ""
-)
-endif()
diff --git a/3rdparty/ext_fftw3/patch_mingw.patch b/3rdparty/ext_fftw3/patch_mingw.patch
deleted file mode 100644
index 256e2be25e..0000000000
--- a/3rdparty/ext_fftw3/patch_mingw.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/kernel/kalloc.c b/kernel/kalloc.c
---- a/kernel/kalloc.c
-+++ b/kernel/kalloc.c
-@@ -125,6 +125,11 @@ void *X(kernel_malloc)(size_t n)
- # undef real_free
- # define real_free MPFree
-
-+# elif defined(__MINGW32__) || defined(__MINGW64__)
-+ p = (void *) __mingw_aligned_malloc(n, MIN_ALIGNMENT);
-+# undef real_free
-+# define real_free __mingw_aligned_free
-+
- # else
- /* Add your machine here and send a patch to [email protected]
- or (e.g. for Windows) configure --with-our-malloc */
diff --git a/3rdparty/ext_fontconfig/0001-Always-find-files-when-using-DESTDIR.patch b/3rdparty/ext_fontconfig/0001-Always-find-files-when-using-DESTDIR.patch
deleted file mode 100644
index 8a646cabac..0000000000
--- a/3rdparty/ext_fontconfig/0001-Always-find-files-when-using-DESTDIR.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From b69cd1370d7b18b239c7f36ac6035fddd840f3f7 Mon Sep 17 00:00:00 2001
-From: Ivan Yossi <[email protected]>
-Date: Mon, 17 Apr 2023 15:53:42 -0600
-Subject: [PATCH] Always find files when using DESTDIR
-
----
- conf.d/link_confs.py | 25 ++++++++++++++++---------
- 1 file changed, 16 insertions(+), 9 deletions(-)
-
-diff --git a/conf.d/link_confs.py b/conf.d/link_confs.py
-index 03608c6..4e11bc8 100644
---- a/conf.d/link_confs.py
-+++ b/conf.d/link_confs.py
-@@ -6,6 +6,19 @@ import argparse
- import platform
- import shutil
-
-+def fix_path(path):
-+ if os.path.isabs(path):
-+ destdir = os.environ.get('DESTDIR')
-+ if destdir:
-+ outpath = os.path.join(destdir, path[1:])
-+ else:
-+ outpath = path
-+ else:
-+ outpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], path)
-+
-+ return outpath
-+
-+
- if __name__=='__main__':
- parser = argparse.ArgumentParser()
- parser.add_argument('availpath')
-@@ -13,20 +26,14 @@ if __name__=='__main__':
- parser.add_argument('links', nargs='+')
- args = parser.parse_args()
-
-- if os.path.isabs(args.confpath):
-- destdir = os.environ.get('DESTDIR')
-- if destdir:
-- confpath = os.path.join(destdir, args.confpath[1:])
-- else:
-- confpath = args.confpath
-- else:
-- confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
-+ confpath = fix_path(args.confpath)
-+ availpath = fix_path(args.availpath)
-
- if not os.path.exists(confpath):
- os.makedirs(confpath)
-
- for link in args.links:
-- src = os.path.join(args.availpath, link)
-+ src = os.path.join(availpath, link)
- dst = os.path.join(confpath, link)
- try:
- os.remove(dst)
---
-2.37.1 (Apple Git-137.1)
-
diff --git a/3rdparty/ext_fontconfig/0001-fontconfig-Do-not-create-symlinks-microsoft-23735.patch b/3rdparty/ext_fontconfig/0001-fontconfig-Do-not-create-symlinks-microsoft-23735.patch
deleted file mode 100644
index b3fcd0bf82..0000000000
--- a/3rdparty/ext_fontconfig/0001-fontconfig-Do-not-create-symlinks-microsoft-23735.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e5972ccd998a39efc562af6edb0a107b2b26ff37 Mon Sep 17 00:00:00 2001
-From: Alonso Schaich <[email protected]>
-Date: Thu, 24 Mar 2022 21:03:32 +0000
-Subject: [PATCH 1/2] [fontconfig] Do not create symlinks (microsoft#23735)
-
----
- conf.d/link_confs.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/conf.d/link_confs.py b/conf.d/link_confs.py
-index 52b8093..03608c6 100644
---- a/conf.d/link_confs.py
-+++ b/conf.d/link_confs.py
-@@ -4,6 +4,7 @@ import os
- import sys
- import argparse
- import platform
-+import shutil
-
- if __name__=='__main__':
- parser = argparse.ArgumentParser()
-@@ -32,7 +33,7 @@ if __name__=='__main__':
- except FileNotFoundError:
- pass
- try:
-- os.symlink(src, dst)
-+ shutil.copyfile(src, dst)
- except NotImplementedError:
- # Not supported on this version of Windows
- break
---
-2.32.0.windows.2
-
diff --git a/3rdparty/ext_fontconfig/0002-fontconfig-Enable-tool-CLI-option-handling-24553.patch b/3rdparty/ext_fontconfig/0002-fontconfig-Enable-tool-CLI-option-handling-24553.patch
deleted file mode 100644
index 8a6aad5a5e..0000000000
--- a/3rdparty/ext_fontconfig/0002-fontconfig-Enable-tool-CLI-option-handling-24553.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-From 6c91a8a164eeda98f828e1e9bc9f01f12edbf575 Mon Sep 17 00:00:00 2001
-From: Alonso Schaich <[email protected]>
-Date: Mon, 9 May 2022 21:34:42 +0000
-Subject: [PATCH 2/2] [fontconfig] Enable tool CLI option handling (#24553)
-
-Co-Authored-By: L. E. Segovia <[email protected]>
----
- fc-cache/meson.build | 1 +
- fc-cat/meson.build | 1 +
- fc-conflist/meson.build | 1 +
- fc-list/meson.build | 1 +
- fc-match/meson.build | 1 +
- fc-pattern/meson.build | 1 +
- fc-query/meson.build | 2 +-
- fc-scan/meson.build | 2 +-
- fc-validate/meson.build | 2 +-
- meson.build | 22 +++++++++++++++++++---
- 10 files changed, 28 insertions(+), 6 deletions(-)
-
-diff --git a/fc-cache/meson.build b/fc-cache/meson.build
-index 5e40fac..3c3e46b 100644
---- a/fc-cache/meson.build
-+++ b/fc-cache/meson.build
-@@ -1,6 +1,7 @@
- fccache = executable('fc-cache', ['fc-cache.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-+ dependencies: [getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/fc-cat/meson.build b/fc-cat/meson.build
-index f26e4b8..476c0f9 100644
---- a/fc-cat/meson.build
-+++ b/fc-cat/meson.build
-@@ -1,6 +1,7 @@
- fccat = executable('fc-cat', ['fc-cat.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-+ dependencies: [getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/fc-conflist/meson.build b/fc-conflist/meson.build
-index f543cf9..f06640b 100644
---- a/fc-conflist/meson.build
-+++ b/fc-conflist/meson.build
-@@ -1,6 +1,7 @@
- fcconflist = executable('fc-conflist', ['fc-conflist.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-+ dependencies: [getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/fc-list/meson.build b/fc-list/meson.build
-index 2f679d5..4b0fb62 100644
---- a/fc-list/meson.build
-+++ b/fc-list/meson.build
-@@ -1,6 +1,7 @@
- fclist = executable('fc-list', ['fc-list.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-+ dependencies: [getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/fc-match/meson.build b/fc-match/meson.build
-index aca8bc8..cab4f09 100644
---- a/fc-match/meson.build
-+++ b/fc-match/meson.build
-@@ -1,6 +1,7 @@
- fcmatch = executable('fc-match', ['fc-match.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-+ dependencies: [getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/fc-pattern/meson.build b/fc-pattern/meson.build
-index 07de245..b957c67 100644
---- a/fc-pattern/meson.build
-+++ b/fc-pattern/meson.build
-@@ -1,6 +1,7 @@
- fcpattern = executable('fc-pattern', ['fc-pattern.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-+ dependencies: [getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/fc-query/meson.build b/fc-query/meson.build
-index d0f2dd4..940b021 100644
---- a/fc-query/meson.build
-+++ b/fc-query/meson.build
-@@ -1,7 +1,7 @@
- fcquery = executable('fc-query', ['fc-query.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-- dependencies: [freetype_dep],
-+ dependencies: [freetype_dep, getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/fc-scan/meson.build b/fc-scan/meson.build
-index 4de2134..c5b2b67 100644
---- a/fc-scan/meson.build
-+++ b/fc-scan/meson.build
-@@ -1,7 +1,7 @@
- fcscan = executable('fc-scan', ['fc-scan.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-- dependencies: [freetype_dep],
-+ dependencies: [freetype_dep, getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/fc-validate/meson.build b/fc-validate/meson.build
-index e2b956e..8902d59 100644
---- a/fc-validate/meson.build
-+++ b/fc-validate/meson.build
-@@ -1,7 +1,7 @@
- fcvalidate = executable('fc-validate', ['fc-validate.c', fcstdint_h, alias_headers, ft_alias_headers],
- include_directories: [incbase, incsrc],
- link_with: [libfontconfig],
-- dependencies: [freetype_dep],
-+ dependencies: [freetype_dep, getopt_dep],
- c_args: c_args,
- install: true,
- )
-diff --git a/meson.build b/meson.build
-index f616600..081cd7e 100644
---- a/meson.build
-+++ b/meson.build
-@@ -202,6 +202,23 @@ if cc.links(files('meson-cc-tests/solaris-atomic-operations.c'), name: 'Solaris
- conf.set('HAVE_SOLARIS_ATOMIC_OPS', 1)
- endif
-
-+if host_machine.system() == 'windows'
-+ if cc.has_function('getopt', prefix : '#include <getopt.h>')
-+ conf.set('HAVE_GETOPT', 1)
-+ endif
-+ if cc.has_function('getopt_long', prefix : '#include <getopt.h>')
-+ conf.set('HAVE_GETOPT_LONG', 1)
-+ endif
-+ is_msvc_like = ['msvc', 'clang-cl'].contains(cc.get_id())
-+ if is_msvc_like
-+ getopt_dep = cc.find_library('getopt', required: false)
-+ else
-+ getopt_dep = dependency('', required: false)
-+ endif
-+else
-+ getopt_dep = dependency('', required: false)
-+endif
-+
-
- prefix = get_option('prefix')
-
-@@ -258,9 +275,8 @@ gperf = find_program('gperf')
-
- sh = find_program('sh', required : false)
-
--if not sh.found() # host_machine.system() == 'windows' or not sh.found()
-- # TODO: This is not always correct
-- if cc.get_id() == 'msvc'
-+if not sh.found()
-+ if host_machine.system() == 'windows'
- gperf_len_type = 'size_t'
- else
- gperf_len_type = 'unsigned'
---
-2.32.0.windows.2
-
diff --git a/3rdparty/ext_fontconfig/0003-Add-default-fonts-path-for-Android.patch b/3rdparty/ext_fontconfig/0003-Add-default-fonts-path-for-Android.patch
deleted file mode 100644
index c46ad85b07..0000000000
--- a/3rdparty/ext_fontconfig/0003-Add-default-fonts-path-for-Android.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 7b3fcbeede94be6892a87877527ffbe39c1ef20a Mon Sep 17 00:00:00 2001
-From: Sharaf Zaman <[email protected]>
-Date: Fri, 25 Nov 2022 13:10:06 +0000
-Subject: [PATCH 3/3] Add default fonts path for Android
-
----
- meson.build | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/meson.build b/meson.build
-index 081cd7e..9e0264b 100644
---- a/meson.build
-+++ b/meson.build
-@@ -230,6 +230,8 @@ if host_machine.system() == 'windows'
- else
- if host_machine.system() == 'darwin'
- fc_fonts_path = ['/System/Library/Fonts', '/Library/Fonts', '~/Library/Fonts', '/System/Library/Assets/com_apple_MobileAsset_Font3', '/System/Library/Assets/com_apple_MobileAsset_Font4']
-+ elif host_machine.system() == 'android'
-+ fc_fonts_path = ['/system/fonts']
- else
- fc_fonts_path = ['/usr/share/fonts', '/usr/local/share/fonts']
- endif
---
-2.38.1
-
diff --git a/3rdparty/ext_fontconfig/CMakeLists.txt b/3rdparty/ext_fontconfig/CMakeLists.txt
deleted file mode 100644
index 35b2083636..0000000000
--- a/3rdparty/ext_fontconfig/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-SET(PREFIX_ext_fontconfig "${EXTPREFIX}" )
-
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_fontconfig
- MESON
- URL https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.14.0.tar.gz
- URL_HASH SHA256=b8f607d556e8257da2f3616b4d704be30fd73bd71e367355ca78963f9a7f0434
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-fontconfig-Do-not-create-symlinks-microsoft-23735.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-fontconfig-Enable-tool-CLI-option-handling-24553.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Add-default-fonts-path-for-Android.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Always-find-files-when-using-DESTDIR.patch
-
- CONFIGURE_ARGS --prefix=${PREFIX_ext_fontconfig}
- -Ddoc=disabled
- -Dcache-build=disabled
- -Dtests=disabled
- ${EXTRA_MESON_FLAGS}
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_freetype ${GETTEXT_DEP} ${MESON_DEP} ${PKG_CONFIG_DEP}
-)
diff --git a/3rdparty/ext_frameworks/0001-ANDROID-Find-dependencies-of-manually-specified-libr.patch b/3rdparty/ext_frameworks/0001-ANDROID-Find-dependencies-of-manually-specified-libr.patch
deleted file mode 100644
index 674176b681..0000000000
--- a/3rdparty/ext_frameworks/0001-ANDROID-Find-dependencies-of-manually-specified-libr.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From a321bbe597e6b26fbdc46c392fe31d74af16a38a Mon Sep 17 00:00:00 2001
-From: Sharaf Zaman <[email protected]>
-Date: Sun, 21 May 2023 22:42:27 +1000
-Subject: [PATCH] :ANDROID]: Find dependencies of manually specified libraries
-
----
- toolchain/specifydependencies.cmake | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake
-index 93ea2635..23704e2b 100644
---- a/toolchain/specifydependencies.cmake
-+++ b/toolchain/specifydependencies.cmake
-@@ -57,6 +57,8 @@ if (ANDROID_EXTRA_LIBS)
- else()
- message(STATUS "manually specified extra library: " ${extralib})
- list(APPEND extralibs ${extralib})
-+ # Now, find dependencies of manually added library.
-+ list_dependencies(${extralib} extralibs)
- endif()
- endforeach()
- endif()
---
-2.39.2
-
diff --git a/3rdparty/ext_frameworks/0001-Android-Fix-a-bug-where-new-file-wouldn-t-be-created.patch b/3rdparty/ext_frameworks/0001-Android-Fix-a-bug-where-new-file-wouldn-t-be-created.patch
deleted file mode 100644
index e8c5a69703..0000000000
--- a/3rdparty/ext_frameworks/0001-Android-Fix-a-bug-where-new-file-wouldn-t-be-created.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 40ff273f7170036137c999610331528d53255113 Mon Sep 17 00:00:00 2001
-From: Sharaf Zaman <[email protected]>
-Date: Tue, 10 Jan 2023 15:09:10 +0000
-Subject: [PATCH] Android: Fix a bug where new file wouldn't be created
-
-for cases where the config path is a content:// Uri. One can only save
-to them through direct write, so this is important.
-
-Relevant code: https://invent.kde.org/qt/qt/qtbase/-/blob/dev/src/corelib/io/qsavefile.cpp#L218
-
-Corresponding bug report: https://krita-artists.org/t/cannot-save-input-profile-does-not-persist-on-startup-on-android/55693
----
- src/core/kconfigini.cpp | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/src/core/kconfigini.cpp b/src/core/kconfigini.cpp
-index d1bd2a0a..b1ed53b1 100644
---- a/src/core/kconfigini.cpp
-+++ b/src/core/kconfigini.cpp
-@@ -476,7 +476,18 @@ bool KConfigIniBackend::writeConfig(const QByteArray &locale, KEntryMap &entryMa
- if (createNew) {
- QSaveFile file(filePath());
- if (!file.open(QIODevice::WriteOnly)) {
-+#ifdef Q_OS_ANDROID
-+ // HACK: when we are dealing with content:// URIs, QSaveFile has to rely on DirectWrite.
-+ // Otherwise this method returns a false and we're done.
-+ file.setDirectWriteFallback(true);
-+ if (!file.open(QIODevice::WriteOnly)) {
-+ qWarning(KCONFIG_CORE_LOG) << "Couldn't create a new file:" << filePath() << ". Error:" << file.errorString();
-+ return false;
-+ }
-+#else
-+ qWarning(KCONFIG_CORE_LOG) << "Couldn't create a new file:" << filePath() << ". Error:" << file.errorString();
- return false;
-+#endif
- }
-
- file.setTextModeEnabled(true); // to get eol translation
---
-2.39.0
-
diff --git a/3rdparty/ext_frameworks/0001-Android-Skip-setting-up-fastlane.patch b/3rdparty/ext_frameworks/0001-Android-Skip-setting-up-fastlane.patch
deleted file mode 100644
index 94a99eb8c9..0000000000
--- a/3rdparty/ext_frameworks/0001-Android-Skip-setting-up-fastlane.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 922c22474a4d918b311407b4e0d221c973bc784e Mon Sep 17 00:00:00 2001
-From: Sharaf Zaman <[email protected]>
-Date: Mon, 5 Dec 2022 11:16:30 +0000
-Subject: [PATCH 1/2] Android: Skip setting up fastlane
-
----
- toolchain/ECMAndroidDeployQt.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/toolchain/ECMAndroidDeployQt.cmake b/toolchain/ECMAndroidDeployQt.cmake
-index 6986f12d..1ddb8b47 100644
---- a/toolchain/ECMAndroidDeployQt.cmake
-+++ b/toolchain/ECMAndroidDeployQt.cmake
-@@ -125,5 +125,5 @@ function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_
- COMMAND adb install -r "${ANDROID_APK_OUTPUT_DIR}/${QTANDROID_EXPORTED_TARGET}-${CMAKE_ANDROID_ARCH_ABI}.apk"
- )
- add_dependencies(create-apk ${CREATEAPK_TARGET_NAME})
-- add_dependencies(${CREATEAPK_TARGET_NAME} create-fastlane)
-+ # add_dependencies(${CREATEAPK_TARGET_NAME} create-fastlane)
- endfunction()
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/0001-Patch-kconfig-to-save-the-config-to-AppConfigLocatio.patch b/3rdparty/ext_frameworks/0001-Patch-kconfig-to-save-the-config-to-AppConfigLocatio.patch
deleted file mode 100644
index 85a0f906c0..0000000000
--- a/3rdparty/ext_frameworks/0001-Patch-kconfig-to-save-the-config-to-AppConfigLocatio.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 4622cea47c248db71b423e1662ec3f01a3c0802f Mon Sep 17 00:00:00 2001
-From: Boudewijn Rempt <[email protected]>
-Date: Thu, 12 May 2016 20:15:40 +0200
-Subject: [PATCH 1/2] Patch kconfig to save the config to AppConfigLocation
-
-I don't know why anyone would want an application to save its
-configuration to GenericConfigLocation, after all, we're an
-application, not a system level component. But this seems the
-only way to fix kconfig to do the sane thing.
----
- docs/options.md | 2 +-
- src/core/kdesktopfile.cpp | 8 +++++---
- src/kconf_update/kconf_update.cpp | 6 +++---
- 3 files changed, 9 insertions(+), 7 deletions(-)
-
-diff --git a/docs/options.md b/docs/options.md
-index b57713de..404a3238 100644
---- a/docs/options.md
-+++ b/docs/options.md
-@@ -93,4 +93,4 @@ They are:
-
- * `$QT_CACHE_HOME` - QStandardPaths::GenericCacheLocation
- * `$QT_CONFIG_HOME` - QStandardPaths::GenericConfigLocation
--* `$QT_DATA_HOME` - QStandardPaths::GenericDataLocation
-+* `$QT_DATA_HOME` - QStandardPaths::AppDataLocation
-diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp
-index 95645a63..50048e5f 100644
---- a/src/core/kdesktopfile.cpp
-+++ b/src/core/kdesktopfile.cpp
-@@ -71,13 +71,14 @@ QString KDesktopFile::locateLocal(const QString &path)
- static const QLatin1Char slash('/');
-
- // Relative to config? (e.g. for autostart)
-- const QStringList genericConfig = QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation);
-+ const QStringList genericConfig =
-+ QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
- // Iterate from the last item since some items may be subfolders of others.
- auto it = std::find_if(genericConfig.crbegin(), genericConfig.crend(), [&path](const QString &dir) {
- return path.startsWith(dir + slash);
- });
- if (it != genericConfig.crend()) {
-- return QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + slash + QStringView(path).mid(it->size() + 1);
-+ return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + slash + QStringView(path).mid(it->size() + 1);
- }
-
- QString relativePath;
-@@ -132,7 +133,8 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString &path)
- }
-
- const QString servicesDir = QStringLiteral("kservices5/"); // KGlobal::dirs()->xdgDataRelativePath("services")
-- const QStringList genericData = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
-+ const QStringList genericData =
-+ QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
- auto genericIt = std::find_if(genericData.cbegin(), genericData.cend(), [&realPath, &servicesDir, sensitivity](const QString &xdgDataPrefix) {
- QFileInfo info(xdgDataPrefix);
- if (info.exists() && info.isDir()) {
-diff --git a/src/kconf_update/kconf_update.cpp b/src/kconf_update/kconf_update.cpp
-index 18692e3a..5ba9f531 100644
---- a/src/kconf_update/kconf_update.cpp
-+++ b/src/kconf_update/kconf_update.cpp
-@@ -146,7 +146,7 @@ KonfUpdate::KonfUpdate(QCommandLineParser *parser)
- if (parser->isSet(QStringLiteral("check"))) {
- m_bUseConfigInfo = true;
- const QString file =
-- QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String{"kconf_update/"} + parser->value(QStringLiteral("check")));
-+ QStandardPaths::locate(QStandardPaths::AppDataLocation, QLatin1String{"kconf_update/"} + parser->value(QStringLiteral("check")));
- if (file.isEmpty()) {
- qWarning("File '%s' not found.", parser->value(QStringLiteral("check")).toLocal8Bit().data());
- qCDebug(KCONF_UPDATE_LOG) << "File" << parser->value(QStringLiteral("check")) << "passed on command line not found";
-@@ -192,7 +192,7 @@ QStringList KonfUpdate::findUpdateFiles(bool dirtyOnly)
- {
- QStringList result;
-
-- const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("kconf_update"), QStandardPaths::LocateDirectory);
-+ const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::AppDataLocation, QStringLiteral("kconf_update"), QStandardPaths::LocateDirectory);
- for (const QString &d : dirs) {
- const QDir dir(d);
-
-@@ -762,7 +762,7 @@ void KonfUpdate::gotScript(const QString &_script)
- return;
- }
-
-- QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kconf_update/") + script);
-+ QString path = QStandardPaths::locate(QStandardPaths::AppDataLocation, QLatin1String("kconf_update/") + script);
- if (path.isEmpty()) {
- if (interpreter.isEmpty()) {
- path = QLatin1String{CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/kconf_update_bin/"} + script;
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/0001-comment-out-jxl-0.9.0-API-change.patch b/3rdparty/ext_frameworks/0001-comment-out-jxl-0.9.0-API-change.patch
deleted file mode 100644
index c6ab90be1e..0000000000
--- a/3rdparty/ext_frameworks/0001-comment-out-jxl-0.9.0-API-change.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 2188bbc57adb02bf320cecf493885d16e294e33d Mon Sep 17 00:00:00 2001
-From: Ivan Yossi <[email protected]>
-Date: Mon, 15 Jan 2024 14:14:28 -0600
-Subject: [PATCH] comment out jxl 0.9.0 API change
-
----
- src/imageformats/jxl.cpp | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/src/imageformats/jxl.cpp b/src/imageformats/jxl.cpp
-index 2501086..ee2b751 100644
---- a/src/imageformats/jxl.cpp
-+++ b/src/imageformats/jxl.cpp
-@@ -269,18 +269,30 @@ bool QJpegXLHandler::countALLFrames()
- }
- }
-
-- status = JxlDecoderGetColorAsEncodedProfile(m_decoder, &m_input_pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &color_encoding);
-+ status = JxlDecoderGetColorAsEncodedProfile(m_decoder,
-+#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
-+ &m_input_pixel_format,
-+#endif
-+ JXL_COLOR_PROFILE_TARGET_DATA,
-+ &color_encoding);
-
- if (status == JXL_DEC_SUCCESS && color_encoding.color_space == JXL_COLOR_SPACE_RGB && color_encoding.white_point == JXL_WHITE_POINT_D65
- && color_encoding.primaries == JXL_PRIMARIES_SRGB && color_encoding.transfer_function == JXL_TRANSFER_FUNCTION_SRGB) {
- m_colorspace = QColorSpace(QColorSpace::SRgb);
- } else {
- size_t icc_size = 0;
-- if (JxlDecoderGetICCProfileSize(m_decoder, &m_input_pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &icc_size) == JXL_DEC_SUCCESS) {
-+ if (JxlDecoderGetICCProfileSize(m_decoder,
-+#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
-+ &m_input_pixel_format,
-+#endif
-+ JXL_COLOR_PROFILE_TARGET_DATA,
-+ &icc_size) == JXL_DEC_SUCCESS) {
- if (icc_size > 0) {
- QByteArray icc_data(icc_size, 0);
- if (JxlDecoderGetColorAsICCProfile(m_decoder,
-- &m_input_pixel_format,
-+#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
-+ &m_input_pixel_format,
-+#endif
- JXL_COLOR_PROFILE_TARGET_DATA,
- reinterpret_cast<uint8_t *>(icc_data.data()),
- icc_data.size())
---
-2.39.3 (Apple Git-145)
-
diff --git a/3rdparty/ext_frameworks/0001-geo-scheme-handler-Don-t-make-it-into-a-bundle-i.patch b/3rdparty/ext_frameworks/0001-geo-scheme-handler-Don-t-make-it-into-a-bundle-i.patch
deleted file mode 100644
index be59946135..0000000000
--- a/3rdparty/ext_frameworks/0001-geo-scheme-handler-Don-t-make-it-into-a-bundle-i.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 45123b3f8f7381dec6f35bce4de6419b14cb001c Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Thu, 12 Jan 2023 13:25:51 -0300
-Subject: [PATCH] geo-scheme-handler: Don't make it into a bundle in macOS
-
----
- src/geo-scheme-handler/CMakeLists.txt | 3 +++
- src/geo-scheme-handler/main.cpp | 4 ++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/src/geo-scheme-handler/CMakeLists.txt b/src/geo-scheme-handler/CMakeLists.txt
-index a2b76f6..145fecc 100644
---- a/src/geo-scheme-handler/CMakeLists.txt
-+++ b/src/geo-scheme-handler/CMakeLists.txt
-@@ -1,6 +1,8 @@
- # SPDX-FileCopyrightText: 2021 Volker Krause <[email protected]>
- # SPDX-License-Identifier: BSD-2-Clause
-
-+include(ECMMarkNonGuiExecutable)
-+
- add_executable(kde-geo-uri-handler
- kgeourihandler.cpp
- kgeourihandler_p.h
-@@ -8,6 +10,7 @@ add_executable(kde-geo-uri-handler
- )
- target_include_directories(kde-geo-uri-handler PRIVATE ${CMAKE_BINARY_DIR}) # for kguiaddons_version.h
- target_link_libraries(kde-geo-uri-handler PRIVATE Qt${QT_MAJOR_VERSION}::Gui)
-+ecm_mark_nongui_executable(kde-geo-uri-handler)
-
- install(TARGETS kde-geo-uri-handler ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
- install(
-diff --git a/src/geo-scheme-handler/main.cpp b/src/geo-scheme-handler/main.cpp
-index 05cd256..f9f4bd2 100644
---- a/src/geo-scheme-handler/main.cpp
-+++ b/src/geo-scheme-handler/main.cpp
-@@ -7,8 +7,8 @@
- #include <kguiaddons_version.h>
-
- #include <QCommandLineParser>
-+#include <QCoreApplication>
- #include <QDesktopServices>
--#include <QGuiApplication>
- #include <QUrl>
-
- int main(int argc, char **argv)
-@@ -18,7 +18,7 @@ int main(int argc, char **argv)
- QCoreApplication::setOrganizationDomain(QStringLiteral("kde.org"));
- QCoreApplication::setApplicationVersion(QStringLiteral(KGUIADDONS_VERSION_STRING));
-
-- QGuiApplication app(argc, argv);
-+ QCoreApplication app(argc, argv);
-
- QCommandLineParser parser;
- QCommandLineOption coordTmplOpt(QStringLiteral("coordinate-template"),
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/0001-ki18n-fix-loading-catalogs-with-patched-gettext.patch b/3rdparty/ext_frameworks/0001-ki18n-fix-loading-catalogs-with-patched-gettext.patch
deleted file mode 100644
index 77c64f5003..0000000000
--- a/3rdparty/ext_frameworks/0001-ki18n-fix-loading-catalogs-with-patched-gettext.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e23fa45015f7df6ed2e2f830dfb36aaffee2432a Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Tue, 15 Jun 2021 16:43:02 +0000
-Subject: [PATCH 1/3] ki18n: fix loading catalogs with patched gettext
-
----
- src/i18n/kcatalog.cpp | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/i18n/kcatalog.cpp b/src/i18n/kcatalog.cpp
-index 2bd9432..6bd728b 100644
---- a/src/i18n/kcatalog.cpp
-+++ b/src/i18n/kcatalog.cpp
-@@ -143,8 +143,15 @@ KCatalog::KCatalog(const QByteArray &domain, const QString &language_)
- : d(new KCatalogPrivate)
- {
- d->domain = domain;
-+#if defined(_WIN32) && defined(__WIN32_USE_UTF8)
-+ // Krita uses Microsoft's patched version of gettext to support UTF-8 paths.
-+ // Convert the paths to UTF-8 prior to sending.
-+ d->language = language_.toUtf8();
-+ d->localeDir = catalogLocaleDir(domain, language_).toUtf8();
-+#else
- d->language = QFile::encodeName(language_);
- d->localeDir = QFile::encodeName(catalogLocaleDir(domain, language_));
-+#endif
-
- if (!d->localeDir.isEmpty()) {
- // Always get translations in UTF-8, regardless of user's environment.
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/0002-Android-Recursively-find-dependency-of-dependencies.patch b/3rdparty/ext_frameworks/0002-Android-Recursively-find-dependency-of-dependencies.patch
deleted file mode 100644
index ce4b4033d6..0000000000
--- a/3rdparty/ext_frameworks/0002-Android-Recursively-find-dependency-of-dependencies.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From f5f548479894a801738a8cdd109ca3cf310ef40c Mon Sep 17 00:00:00 2001
-From: Sharaf Zaman <[email protected]>
-Date: Tue, 6 Dec 2022 12:21:50 +0000
-Subject: [PATCH 2/2] Android: Recursively find dependency of dependencies.
-
----
- toolchain/specifydependencies.cmake | 70 ++++++++++++++++-------------
- 1 file changed, 39 insertions(+), 31 deletions(-)
-
-diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake
-index fac7c71d..b5cdc898 100644
---- a/toolchain/specifydependencies.cmake
-+++ b/toolchain/specifydependencies.cmake
-@@ -1,37 +1,10 @@
-+set(indexed_libraries "")
-
--function(list_dependencies target libs)
-- execute_process(COMMAND readelf --wide --dynamic ${target} ERROR_VARIABLE readelf_errors OUTPUT_VARIABLE out RESULT_VARIABLE result)
--
-- if (NOT result EQUAL 0)
-- message(FATAL_ERROR "readelf failed on ${target} exit(${result}): ${readelf_errors}")
-- endif()
--
-- string(REPLACE "\n" ";" lines "${out}")
-- set(extralibs ${${libs}})
-- foreach(line ${lines})
-- string(REGEX MATCH ".*\\(NEEDED\\) +Shared library: +\\[(.+)\\]$" matched ${line})
-- set(currentLib ${CMAKE_MATCH_1})
--
-- if(NOT ${currentLib} MATCHES "libQt5.*" AND matched)
-- find_file(ourlib-${currentLib} ${currentLib} HINTS ${OUTPUT_DIR} ${EXPORT_DIR} ${ECM_ADDITIONAL_FIND_ROOT_PATH} NO_DEFAULT_PATH PATH_SUFFIXES lib)
--
-- if(ourlib-${currentLib})
-- list(APPEND extralibs "${ourlib-${currentLib}}")
-- else()
-- message(STATUS "could not find ${currentLib} in ${OUTPUT_DIR} ${EXPORT_DIR} ${ECM_ADDITIONAL_FIND_ROOT_PATH}")
-- endif()
-- endif()
-- endforeach()
-- set(${libs} ${extralibs} PARENT_SCOPE)
--endfunction()
--
--list_dependencies(${TARGET} extralibs)
--
--function(contains_library libpath IS_EQUAL)
-+function(contains_library libraries libpath IS_EQUAL)
- get_filename_component (name ${libpath} NAME)
- unset (IS_EQUAL PARENT_SCOPE)
-
-- foreach (extralib ${extralibs})
-+ foreach (extralib ${libraries})
- get_filename_component (extralibname ${extralib} NAME)
- if (${extralibname} STREQUAL ${name})
- set (IS_EQUAL TRUE PARENT_SCOPE)
-@@ -40,9 +13,44 @@ function(contains_library libpath IS_EQUAL)
- endforeach()
- endfunction()
-
-+macro(list_dependencies target libs)
-+ contains_library("${indexed_libraries}" ${target} IS_EQUAL)
-+ if(NOT IS_EQUAL)
-+ list(APPEND indexed_libraries ${target})
-+
-+ execute_process(COMMAND readelf --wide --dynamic ${target} ERROR_VARIABLE readelf_errors OUTPUT_VARIABLE out RESULT_VARIABLE result)
-+
-+ if (NOT result EQUAL 0)
-+ message(FATAL_ERROR "readelf failed on ${target} exit(${result}): ${readelf_errors}")
-+ endif()
-+
-+ string(REPLACE "\n" ";" lines "${out}")
-+ set(extralibs ${${libs}})
-+ foreach(line ${lines})
-+ string(REGEX MATCH ".*\\(NEEDED\\) +Shared library: +\\[(.+)\\]$" matched ${line})
-+ set(currentLib ${CMAKE_MATCH_1})
-+
-+ if(NOT ${currentLib} MATCHES "libQt5.*" AND matched)
-+ find_file(ourlib-${currentLib} ${currentLib} HINTS ${OUTPUT_DIR} ${EXPORT_DIR} ${ECM_ADDITIONAL_FIND_ROOT_PATH} NO_DEFAULT_PATH PATH_SUFFIXES lib)
-+
-+ if(ourlib-${currentLib})
-+ set(_found_lib ${ourlib-${currentLib}})
-+ list(APPEND extralibs "${_found_lib}")
-+ list_dependencies(${_found_lib} extralibs)
-+ else()
-+ message(STATUS "could not find ${currentLib} in ${OUTPUT_DIR} ${EXPORT_DIR}/lib/ ${ECM_ADDITIONAL_FIND_ROOT_PATH}")
-+ endif()
-+ endif()
-+ endforeach()
-+ set(${libs} ${extralibs})
-+ endif()
-+endmacro()
-+
-+list_dependencies(${TARGET} extralibs)
-+
- if (ANDROID_EXTRA_LIBS)
- foreach (extralib ${ANDROID_EXTRA_LIBS})
-- contains_library(${extralib} IS_EQUAL)
-+ contains_library("${extralibs}" ${extralib} IS_EQUAL)
-
- if (IS_EQUAL)
- message (STATUS "found duplicate, skipping: " ${extralib})
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/0002-Ensure-langenv-string-is-null-terminated.patch b/3rdparty/ext_frameworks/0002-Ensure-langenv-string-is-null-terminated.patch
deleted file mode 100644
index 423e6d0a65..0000000000
--- a/3rdparty/ext_frameworks/0002-Ensure-langenv-string-is-null-terminated.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 410e2c11ec505d1ca562a319ec971bc104c6c0e4 Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Sat, 30 Oct 2021 22:04:02 +0800
-Subject: [PATCH 2/3] Ensure `langenv` string is null-terminated
-
-See: https://bugs.kde.org/show_bug.cgi?id=444614
----
- src/i18n/kcatalog.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/i18n/kcatalog.cpp b/src/i18n/kcatalog.cpp
-index 6bd728b..3bc605f 100644
---- a/src/i18n/kcatalog.cpp
-+++ b/src/i18n/kcatalog.cpp
-@@ -166,6 +166,7 @@ KCatalog::KCatalog(const QByteArray &domain, const QString &language_)
- // This doesn't work on Windows though, so there we need putenv calls on every change
- s_langenv = new char[s_langenvMaxlen];
- copyToLangArr(qgetenv("LANGUAGE"));
-+ s_langenv[s_langenvMaxlen - 1] = '\0';
- putenv(s_langenv);
- }
- }
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/0002-Work-around-CMake-multi-config-generators.patch b/3rdparty/ext_frameworks/0002-Work-around-CMake-multi-config-generators.patch
deleted file mode 100644
index 30f34ca7f8..0000000000
--- a/3rdparty/ext_frameworks/0002-Work-around-CMake-multi-config-generators.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 275dac5fd2d664a0f988fb76669d025ab52bcbca Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Fri, 2 Apr 2021 16:49:18 +0000
-Subject: [PATCH 2/2] Work around CMake multi-config generators
-
-Mixing generator expressions and CMAKE_CURRENT_BINARY_DIR results in all
-configurations trying to write to the same file.
-
-https://gitlab.kitware.com/cmake/cmake/-/issues/20682
-
-Workaround based on:
-https://codereview.qt-project.org/c/qt/qtbase/+/299372
-
-(cherry picked from commit 3343c1d2a1143421dc6433649f22aab021778530)
----
- src/kconf_update/CMakeLists.txt | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/src/kconf_update/CMakeLists.txt b/src/kconf_update/CMakeLists.txt
-index 91fb92ef..1a40aac1 100644
---- a/src/kconf_update/CMakeLists.txt
-+++ b/src/kconf_update/CMakeLists.txt
-@@ -19,10 +19,27 @@ target_link_libraries(kconf_update Qt${QT_MAJOR_VERSION}::Core KF5::ConfigCore)
- include(ECMMarkNonGuiExecutable)
- ecm_mark_nongui_executable(kconf_update)
-
-+# https://gitlab.kitware.com/cmake/cmake/-/issues/20682
-+# https://codereview.qt-project.org/c/qt/qtbase/+/299372
-+if(GENERATOR_IS_MULTI_CONFIG OR CMAKE_GENERATOR MATCHES "^Visual Studio")
-+file(
-+ GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kconf-exec-$<CONFIG>.h
-+ CONTENT "#define KCONF_UPDATE_EXECUTABLE \"$<TARGET_FILE:kconf_update>\""
-+)
-+add_custom_target(kconf-exec.h
-+ DEPENDS
-+ ${CMAKE_CURRENT_BINARY_DIR}/kconf-exec-$<CONFIG>.h
-+ COMMAND ${CMAKE_COMMAND} -E copy
-+ ${CMAKE_CURRENT_BINARY_DIR}/kconf-exec-$<CONFIG>.h
-+ ${CMAKE_CURRENT_BINARY_DIR}/kconf-exec.h
-+)
-+add_dependencies(kconf_update kconf-exec.h)
-+else()
- file(
- GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kconf-exec.h
- CONTENT "#define KCONF_UPDATE_EXECUTABLE \"$<TARGET_FILE:kconf_update>\""
- )
-+endif()
- configure_file(config-kconf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kconf.h )
-
- # Although this is mostly an internal binary (hence installing it in
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/0003-Patch-the-location-where-ki18n-looks-for-catalogs.patch b/3rdparty/ext_frameworks/0003-Patch-the-location-where-ki18n-looks-for-catalogs.patch
deleted file mode 100644
index 392cd7eaa0..0000000000
--- a/3rdparty/ext_frameworks/0003-Patch-the-location-where-ki18n-looks-for-catalogs.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 8c636ea4383595caddcf51fda73c23e3ea5a59ea Mon Sep 17 00:00:00 2001
-From: Boudewijn Rempt <[email protected]>
-Date: Wed, 9 May 2018 15:14:00 +0200
-Subject: [PATCH 3/3] Patch the location where ki18n looks for catalogs
-
-Because GenericDataLocation is wrong for appimages, windows
-and macOS.
-
-(cherry-picked from commit 2996aaf9f1bf85ac5d3005294c458a826670d448)
----
- docs/programmers-guide.md | 2 +-
- src/i18n/kcatalog.cpp | 4 ++--
- src/i18n/klocalizedstring.cpp | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/docs/programmers-guide.md b/docs/programmers-guide.md
-index 9831b08..61038fb 100644
---- a/docs/programmers-guide.md
-+++ b/docs/programmers-guide.md
-@@ -2243,7 +2243,7 @@ then a call to
-
- ~~~
- QString splashPath = QStandardPaths::locate(
-- QStandardPaths::GenericDataLocation, "splash.png");
-+ QStandardPaths::AppDataLocation, "splash.png");
- splashPath = KLocalizedString::localizedFilePath(splashPath);
- ~~~
-
-diff --git a/src/i18n/kcatalog.cpp b/src/i18n/kcatalog.cpp
-index 3bc605f..1f46e5e 100644
---- a/src/i18n/kcatalog.cpp
-+++ b/src/i18n/kcatalog.cpp
-@@ -236,7 +236,7 @@ QString KCatalog::catalogLocaleDir(const QByteArray &domain, const QString &lang
- return assetPath;
-
- #else
-- QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("locale/") + relpath);
-+ QString file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("locale/") + relpath);
- #ifdef Q_OS_WIN
- // QStandardPaths fails on Windows for executables that aren't properly deployed yet, such as unit tests
- if (file.isEmpty()) {
-@@ -259,7 +259,7 @@ QString KCatalog::catalogLocaleDir(const QByteArray &domain, const QString &lang
- QSet<QString> KCatalog::availableCatalogLanguages(const QByteArray &domain_)
- {
- QString domain = QFile::decodeName(domain_);
-- QStringList localeDirPaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("locale"), QStandardPaths::LocateDirectory);
-+ QStringList localeDirPaths = QStandardPaths::locateAll(QStandardPaths::AppDataLocation, QStringLiteral("locale"), QStandardPaths::LocateDirectory);
- #ifdef Q_OS_WIN
- // QStandardPaths fails on Windows for executables that aren't properly deployed yet, such as unit tests
- localeDirPaths += QLatin1String(INSTALLED_LOCALE_PREFIX) + QLatin1String("/bin/data/locale/");
-diff --git a/src/i18n/klocalizedstring.cpp b/src/i18n/klocalizedstring.cpp
-index f6e14b8..641895b 100644
---- a/src/i18n/klocalizedstring.cpp
-+++ b/src/i18n/klocalizedstring.cpp
-@@ -1277,7 +1277,7 @@ void KLocalizedStringPrivate::locateScriptingModule(const QByteArray &domain, co
- QMutexLocker lock(&s->klspMutex);
-
- QString modapath =
-- QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("locale/%1/%2/%3/%3.js").arg(language, s->scriptDir, QLatin1String{domain}));
-+ QStandardPaths::locate(QStandardPaths::AppDataLocation, QLatin1String("locale/%1/%2/%3/%3.js").arg(language, s->scriptDir, QLatin1String{domain}));
-
- // If the module exists and hasn't been already included.
- if (!modapath.isEmpty() && !s->scriptModules[language].contains(domain)) {
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/0003-Revert-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-W.patch b/3rdparty/ext_frameworks/0003-Revert-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-W.patch
deleted file mode 100644
index 2fac36b353..0000000000
--- a/3rdparty/ext_frameworks/0003-Revert-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-W.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 70a6e521d497ff38c08f1f41bca93aab8e4f9303 Mon Sep 17 00:00:00 2001
-From: Halla Rempt <[email protected]>
-Date: Wed, 18 Jan 2023 15:24:50 -0300
-Subject: [PATCH 3/3] Revert "Use "${BIN_INSTALL_DIR}/data" for DATAROOTDIR on
- Windows."
-
-This reverts commit 2503481e4537b88d76b4a596f519cb3311e1ca2a.
----
- kde-modules/KDEInstallDirsCommon.cmake | 12 +++---------
- 1 file changed, 3 insertions(+), 9 deletions(-)
-
-diff --git a/kde-modules/KDEInstallDirsCommon.cmake b/kde-modules/KDEInstallDirsCommon.cmake
-index d1b2cc0e..6465a239 100644
---- a/kde-modules/KDEInstallDirsCommon.cmake
-+++ b/kde-modules/KDEInstallDirsCommon.cmake
-@@ -267,15 +267,9 @@ _define_absolute(LOCALSTATEDIR "var"
- _define_absolute(SHAREDSTATEDIR "com"
- "modifiable architecture-independent data")
-
--if (WIN32)
-- _define_relative(DATAROOTDIR BINDIR "data"
-- "read-only architecture-independent data root"
-- SHARE_INSTALL_PREFIX)
--else()
-- _define_absolute(DATAROOTDIR "share"
-- "read-only architecture-independent data root"
-- SHARE_INSTALL_PREFIX)
--endif()
-+_define_absolute(DATAROOTDIR "share"
-+ "read-only architecture-independent data root"
-+ SHARE_INSTALL_PREFIX)
-
- _define_relative(DATADIR DATAROOTDIR ""
- "read-only architecture-independent data"
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_frameworks/CMakeLists.txt b/3rdparty/ext_frameworks/CMakeLists.txt
deleted file mode 100644
index 4cd6d9a30a..0000000000
--- a/3rdparty/ext_frameworks/CMakeLists.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-SET(EXTPREFIX_frameworks "${EXTPREFIX}" )
-#
-# All needed frameworks:
-#
-# Config
-# WidgetsAddons
-# Completion
-# CoreAddons
-# GuiAddons
-# I18n
-# ItemModels
-# ItemViews
-# WindowSystem
-# kimageformats
-# On Linux:
-# KCrash
-
-ExternalProject_Add(
- ext_extra_cmake_modules
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/extra-cmake-modules-5.101.0.tar.xz
- URL_HASH SHA256=8c4c561310db587d390a6c84afc97e1addbaddd73b9d7a4c7309c5da9b9bc8f2
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Android-Skip-setting-up-fastlane.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Android-Recursively-find-dependency-of-dependencies.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Revert-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-W.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-ANDROID-Find-dependencies-of-manually-specified-libr.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-
- DEPENDS ${QT_DEP}
-)
-
-ExternalProject_Add(
- ext_kconfig
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kconfig-5.101.0.tar.xz
- URL_HASH SHA256=ca747e485756e6d65e4eed85d1187c80b7facc958f379a68fbe862f068cb5383
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Patch-kconfig-to-save-the-config-to-AppConfigLocatio.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Work-around-CMake-multi-config-generators.patch
- # TODO: remove when bumped to 5.102
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Android-Fix-a-bug-where-new-file-wouldn-t-be-created.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF -DKCONFIG_USE_DBUS=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_extra_cmake_modules
-)
-
-set (_karchive_extra_flags "")
-if (ANDROID)
- set(_karchive_extra_flags "-DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=1")
-endif()
-
-ExternalProject_Add(
- ext_karchive
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/karchive-5.101.0.tar.xz
- URL_HASH SHA256=58bcb6c61bc4a3fe48a0cbeaf392d42b6b8d33e1bc4c51faf24db0912ecfa9b0
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE} ${_karchive_extra_flags}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_extra_cmake_modules
-)
-
-ExternalProject_Add(
- ext_kwidgetsaddons
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kwidgetsaddons-5.101.0.tar.xz
- URL_HASH SHA256=78913d3303e94329db964bf072b9e565bd582fbbd026310dce6e994c8d083823
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_kconfig
-)
-
-ExternalProject_Add(
- ext_kcompletion
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kcompletion-5.101.0.tar.xz
- URL_HASH SHA256=d80f6fbe23285f9f914ed67ffd2a825d36850c086121666bbb62257126553f30
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_kwidgetsaddons
-)
-
-ExternalProject_Add(
- ext_kcoreaddons
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kcoreaddons-5.101.0.tar.xz
- URL_HASH SHA256=77b64fc17f7ebbbd53bbb3614b4c3c73a0a9b21607e96e6abb2823ef1972b72a
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_kcompletion
-)
-
-
-ExternalProject_Add(
- ext_kguiaddons
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kguiaddons-5.101.0.tar.xz
- URL_HASH SHA256=9894e4193b3cb7b4ed5e3a591cf12043fb87683b09db77e465aa4453c7c757b7
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-geo-scheme-handler-Don-t-make-it-into-a-bundle-i.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF -DWITH_WAYLAND=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_kcoreaddons
-)
-
-if (ANDROID)
- set (KI18N_DEP ext_libintl-lite)
-elseif (APPLE)
- set (KI18N_DEP ${GETTEXT_DEP})
-endif()
-
-ExternalProject_Add(
- ext_ki18n
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/ki18n-5.101.0.tar.xz
- URL_HASH SHA256=bf1530be9279d476c0531988eeb1c032e208f6010c8f00880bb5d694229fef65
- INSTALL_DIR ${EXTPREFIX_frameworks}
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-ki18n-fix-loading-catalogs-with-patched-gettext.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Ensure-langenv-string-is-null-terminated.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Patch-the-location-where-ki18n-looks-for-catalogs.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_kguiaddons ${KI18N_DEP}
-)
-
-ExternalProject_Add(
- ext_kitemmodels
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kitemmodels-5.101.0.tar.xz
- URL_HASH SHA256=5aaee068a8d0c85dfc50c5ade2c5eb913c5936f68e902c302c36bbc2ac70f426
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_ki18n
-)
-
-ExternalProject_Add(
- ext_kitemviews
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kitemviews-5.101.0.tar.xz
- URL_HASH SHA256=aca259eeff2dde1434cdf3ff3d979e9b17dd55bad15dd7341f92700cf8418fb1
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_kitemmodels
-)
-
-ExternalProject_Add(
- ext_kimageformats
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kimageformats-5.101.0.tar.xz
- URL_HASH SHA256=ae19b07141fdf977035e6decc50fa45855c0e635f57333a2443d3c24464c625f
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-comment-out-jxl-0.9.0-API-change.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE} -DKIMAGEFORMATS_JXL=OFF
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_karchive ext_kitemviews
-)
-
-ExternalProject_Add(
- ext_kwindowsystem
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kwindowsystem-5.101.0.tar.xz
- URL_HASH SHA256=ef6b9e733e320be63a4557da0453b1a8ea81519e01c1737eff69b66401302eb8
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_kimageformats
-)
-
-ExternalProject_Add(
- ext_kcrash
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/frameworks/5.101/kcrash-5.101.0.tar.xz
- URL_HASH SHA256=6dd10951db01918681a8ce6e9e3a99d3f8b5170d2c5a0b5212007e68db0c937a
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_kwindowsystem
-)
diff --git a/3rdparty/ext_freetype/0001-patch-msvc.patch b/3rdparty/ext_freetype/0001-patch-msvc.patch
deleted file mode 100644
index 4d37417d7a..0000000000
--- a/3rdparty/ext_freetype/0001-patch-msvc.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 604fe807078ce41d0ac7742547e90b17c066709f Mon Sep 17 00:00:00 2001
-From: Eli Schwartz <[email protected]>
-Date: Tue, 8 Nov 2022 16:24:08 -0500
-Subject: [PATCH] meson: fix regression in detecting freetype2/icu-uc when
- explicitly disabled
-
-In #3811 / commit 53a194aa3f5f7de0b40e879e41fcbe0de6e9fefe a broken and
-half-implemented approach to kind of sort of handling the detection of
-both pkg-config and cmake names for dependencies, was implemented. It
-just checked for both versions with required: false, but when the build
-was configured with *disabled* options, it was still found because it
-was treated as auto.
-
-Really, the problem here is trying to outsmart Meson, which handles a
-lot of edge cases correctly. But it's possible, albeit very wordy, to
-manually implement Meson's internal logic via if/else fallbacks. Do so
-here.
----
- meson.build | 79 +++++++++++++++++++++++++++++++++++++----------------
- 1 file changed, 56 insertions(+), 23 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index b80679d3aa..86b5b0169f 100644
---- a/meson.build
-+++ b/meson.build
-@@ -83,20 +83,35 @@ check_funcs = [
-
- m_dep = cpp.find_library('m', required: false)
-
--
--# Try pkgconfig name
--freetype_dep = dependency('freetype2', required: false)
--if not freetype_dep.found()
-- # Try cmake name
-- freetype_dep = dependency('freetype', required: false)
--endif
--if not freetype_dep.found()
-- # Subproject fallback, `allow_fallback: true` means the fallback will be
-- # tried even if the freetype option is set to `auto`.
-- freetype_dep = dependency('freetype2',
-+if meson.version().version_compare('>=0.60.0')
-+ # pkg-config: freetype2, cmake: Freetype
-+ freetype_dep = dependency('freetype2', 'Freetype',
- required: get_option('freetype'),
- default_options: ['harfbuzz=disabled'],
- allow_fallback: true)
-+else
-+ # painful hack to handle multiple dependencies but also respect options
-+ freetype_opt = get_option('freetype')
-+ # we want to handle enabled manually after fallbacks, but also handle disabled normally
-+ if freetype_opt.enabled()
-+ freetype_opt = false
-+ endif
-+ # try pkg-config name
-+ freetype_dep = dependency('freetype2', method: 'pkg-config', required: freetype_opt)
-+ # when disabled, leave it not-found
-+ if not freetype_dep.found() and not get_option('freetype').disabled()
-+ # Try cmake name
-+ freetype_dep = dependency('Freetype', method: 'cmake', required: false)
-+ # Subproject fallback, `allow_fallback: true` means the fallback will be
-+ # tried even if the freetype option is set to `auto`.
-+ if not freetype_dep.found()
-+ freetype_dep = dependency('freetype2',
-+ method: 'pkg-config',
-+ required: get_option('freetype'),
-+ default_options: ['harfbuzz=disabled'],
-+ allow_fallback: true)
-+ endif
-+ endif
- endif
-
- glib_dep = dependency('glib-2.0', required: get_option('glib'))
-@@ -104,18 +119,36 @@ gobject_dep = dependency('gobject-2.0', required: get_option('gobject'))
- graphite2_dep = dependency('graphite2', required: get_option('graphite2'))
- graphite_dep = dependency('graphite2', required: get_option('graphite'))
-
--# Try pkgconfig name
--icu_dep = dependency('icu-uc', required: false)
--if not icu_dep.found()
-- # Try cmake name
-- icu_dep = dependency('ICU',
-- required: false,
-- components: 'uc',
-- method: 'cmake')
--endif
--if not icu_dep.found()
-- # Subproject fallback if icu option is enabled
-- icu_dep = dependency('icu-uc', required: get_option('icu'))
-+if meson.version().version_compare('>=0.60.0')
-+ # pkg-config: icu-uc, cmake: ICU but with components
-+ icu_dep = dependency('icu-uc', 'ICU',
-+ components: 'uc',
-+ required: get_option('icu'),
-+ default_options: ['harfbuzz=disabled'],
-+ allow_fallback: true)
-+else
-+ # painful hack to handle multiple dependencies but also respect options
-+ icu_opt = get_option('icu')
-+ # we want to handle enabled manually after fallbacks, but also handle disabled normally
-+ if icu_opt.enabled()
-+ icu_opt = false
-+ endif
-+ # try pkg-config name
-+ icu_dep = dependency('icu-uc', method: 'pkg-config', required: icu_opt)
-+ # when disabled, leave it not-found
-+ if not icu_dep.found() and not get_option('icu').disabled()
-+ # Try cmake name
-+ icu_dep = dependency('ICU', method: 'cmake', components: 'uc', required: false)
-+ # Try again with subproject fallback. `allow_fallback: true` means the
-+ # fallback will be tried even if the icu option is set to `auto`, but
-+ # we cannot pass this option until Meson 0.59.0, because no wrap file
-+ # is checked into git.
-+ if not icu_dep.found()
-+ icu_dep = dependency('icu-uc',
-+ method: 'pkg-config',
-+ required: get_option('icu'))
-+ endif
-+ endif
- endif
-
- if icu_dep.found() and icu_dep.type_name() == 'pkgconfig'
diff --git a/3rdparty/ext_freetype/CMakeLists.txt b/3rdparty/ext_freetype/CMakeLists.txt
deleted file mode 100644
index 2d3d80261d..0000000000
--- a/3rdparty/ext_freetype/CMakeLists.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-SET(PREFIX_ext_freetype "${EXTPREFIX}" )
-SET(EXTPREFIX_harfbuzz "${EXTPREFIX}" )
-
-if (POLICY CMP0114)
- cmake_policy(SET CMP0114 NEW)
-endif()
-
-set(FREETYPE_URL https://downloads.sourceforge.net/project/freetype/freetype2/2.12.1/freetype-2.12.1.tar.xz)
-set(FREETYPE_SHA256 4766f20157cc4cf0cd292f80bf917f92d1c439b243ac3018debf6b9140c41a7f)
-
-set(FREETYPE_SOURCE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/freetype_src")
-file(MAKE_DIRECTORY ${FREETYPE_SOURCE_DIRECTORY})
-file(WRITE ${FREETYPE_SOURCE_DIRECTORY}/foobar "yet-to-be-deleted-and-repopulated-at-build-stage")
-
-ExternalProject_Add(
- ext_freetype_src
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
-
- URL ${FREETYPE_URL}
- URL_HASH SHA256=${FREETYPE_SHA256}
-
- SOURCE_DIR ${FREETYPE_SOURCE_DIRECTORY}
-
- BUILD_COMMAND ""
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ""
- UPDATE_COMMAND ""
-)
-
-ExternalProject_Add(ext_freetype_bootstrap
- SOURCE_DIR ${FREETYPE_SOURCE_DIRECTORY}
-
- INSTALL_DIR ${PREFIX_ext_freetype}
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_freetype}
- -DFT_DISABLE_BZIP2=ON
- -DFT_DISABLE_BROTLI=ON
- -DFT_REQUIRE_PNG=ON
- -DFT_DISABLE_HARFBUZZ=ON
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- -DBUILD_SHARED_LIBS=TRUE
- ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_png ext_freetype_src
-)
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_harfbuzz
- MESON
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/harfbuzz/harfbuzz/releases/download/5.3.1/harfbuzz-5.3.1.tar.xz
- URL_HASH SHA256=4a6ce097b75a8121facc4ba83b5b083bfec657f45b003cd5a3424f2ae6b4434d
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/harfbuzz-clang16-fix.patch
-
- CONFIGURE_ARGS --prefix=${EXTPREFIX_harfbuzz}
- -Dglib=disabled
- -Dgobject=disabled
- -Dtests=disabled
- -Dfreetype=enabled
- ${EXTRA_MESON_FLAGS}
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_freetype_bootstrap
-)
-
-# Amyspark: just run roughshod!
-ExternalProject_Add( ext_freetype
- SOURCE_DIR ${FREETYPE_SOURCE_DIRECTORY}
-
- INSTALL_DIR ${PREFIX_ext_freetype}
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- -DFT_DISABLE_BZIP2=ON
- -DFT_DISABLE_BROTLI=ON
- -DFT_REQUIRE_HARFBUZZ=ON
- -DFT_REQUIRE_PNG=ON
- -DBUILD_SHARED_LIBS=TRUE
- ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ext_harfbuzz ext_png ext_freetype_src
-)
diff --git a/3rdparty/ext_freetype/harfbuzz-clang16-fix.patch b/3rdparty/ext_freetype/harfbuzz-clang16-fix.patch
deleted file mode 100644
index 81dd7a6a7e..0000000000
--- a/3rdparty/ext_freetype/harfbuzz-clang16-fix.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From d88269c827895b38f99f7cf741fa60210d4d5169 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <[email protected]>
-Date: Fri, 28 Oct 2022 22:17:15 +0300
-Subject: [PATCH] freetype: Fix function signatures to match without casts
-
-Clang 16 has got a new stricter warning for casts of function types
-(see https://github.com/llvm/llvm-project/commit/1aad641c793090b4d036c03e737df2ebe2c32c57).
-
-This new warning gets included as part of the existing error
-diagnostic setting of -Wcast-function-type.
-
-This fixes errors like these:
-
-../src/hb-ft.cc:1011:34: error: cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to 'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
- ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----
- src/hb-ft.cc | 30 ++++++++++++++++++------------
- 1 file changed, 18 insertions(+), 12 deletions(-)
-
-diff --git a/src/hb-ft.cc b/src/hb-ft.cc
-index bcc1dd080f5..1626b9a1500 100644
---- a/src/hb-ft.cc
-+++ b/src/hb-ft.cc
-@@ -732,16 +732,18 @@ hb_ft_get_font_h_extents (hb_font_t *font HB_UNUSED,
-
- static int
- _hb_ft_move_to (const FT_Vector *to,
-- hb_draw_session_t *drawing)
-+ void *arg)
- {
-+ hb_draw_session_t *drawing = (hb_draw_session_t *) arg;
- drawing->move_to (to->x, to->y);
- return FT_Err_Ok;
- }
-
- static int
- _hb_ft_line_to (const FT_Vector *to,
-- hb_draw_session_t *drawing)
-+ void *arg)
- {
-+ hb_draw_session_t *drawing = (hb_draw_session_t *) arg;
- drawing->line_to (to->x, to->y);
- return FT_Err_Ok;
- }
-@@ -749,8 +751,9 @@ _hb_ft_line_to (const FT_Vector *to,
- static int
- _hb_ft_conic_to (const FT_Vector *control,
- const FT_Vector *to,
-- hb_draw_session_t *drawing)
-+ void *arg)
- {
-+ hb_draw_session_t *drawing = (hb_draw_session_t *) arg;
- drawing->quadratic_to (control->x, control->y,
- to->x, to->y);
- return FT_Err_Ok;
-@@ -760,8 +763,9 @@ static int
- _hb_ft_cubic_to (const FT_Vector *control1,
- const FT_Vector *control2,
- const FT_Vector *to,
-- hb_draw_session_t *drawing)
-+ void *arg)
- {
-+ hb_draw_session_t *drawing = (hb_draw_session_t *) arg;
- drawing->cubic_to (control1->x, control1->y,
- control2->x, control2->y,
- to->x, to->y);
-@@ -787,10 +791,10 @@ hb_ft_get_glyph_shape (hb_font_t *font HB_UNUSED,
- return;
-
- const FT_Outline_Funcs outline_funcs = {
-- (FT_Outline_MoveToFunc) _hb_ft_move_to,
-- (FT_Outline_LineToFunc) _hb_ft_line_to,
-- (FT_Outline_ConicToFunc) _hb_ft_conic_to,
-- (FT_Outline_CubicToFunc) _hb_ft_cubic_to,
-+ _hb_ft_move_to,
-+ _hb_ft_line_to,
-+ _hb_ft_conic_to,
-+ _hb_ft_cubic_to,
- 0, /* shift */
- 0, /* delta */
- };
-@@ -975,8 +979,9 @@ hb_ft_face_create_referenced (FT_Face ft_face)
- }
-
- static void
--hb_ft_face_finalize (FT_Face ft_face)
-+hb_ft_face_finalize (void *arg)
- {
-+ FT_Face ft_face = (FT_Face) arg;
- hb_face_destroy ((hb_face_t *) ft_face->generic.data);
- }
-
-@@ -1008,7 +1013,7 @@ hb_ft_face_create_cached (FT_Face ft_face)
- ft_face->generic.finalizer (ft_face);
-
- ft_face->generic.data = hb_ft_face_create (ft_face, nullptr);
-- ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
-+ ft_face->generic.finalizer = hb_ft_face_finalize;
- }
-
- return hb_face_reference ((hb_face_t *) ft_face->generic.data);
-@@ -1217,8 +1222,9 @@ get_ft_library ()
- }
-
- static void
--_release_blob (FT_Face ft_face)
-+_release_blob (void *arg)
- {
-+ FT_Face ft_face = (FT_Face) arg;
- hb_blob_destroy ((hb_blob_t *) ft_face->generic.data);
- }
-
-@@ -1271,7 +1277,7 @@ hb_ft_font_set_funcs (hb_font_t *font)
-
-
- ft_face->generic.data = blob;
-- ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
-+ ft_face->generic.finalizer = _release_blob;
-
- _hb_ft_font_set_funcs (font, ft_face, true);
- hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING);
diff --git a/3rdparty/ext_fribidi/CMakeLists.txt b/3rdparty/ext_fribidi/CMakeLists.txt
deleted file mode 100644
index 6b4ebac3a9..0000000000
--- a/3rdparty/ext_fribidi/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-SET(EXTPREFIX_fribidi "${EXTPREFIX}" )
-
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_fribidi
- MESON
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/fribidi/fribidi/releases/download/v1.0.11/fribidi-1.0.11.tar.xz
- URL_HASH SHA256=30f93e9c63ee627d1a2cedcf59ac34d45bf30240982f99e44c6e015466b4e73d
-
- CONFIGURE_ARGS --prefix=${EXTPREFIX_fribidi}
- ${EXTRA_MESON_FLAGS}
-
- DEPENDS ${MESON_DEP} ${PKG_CONFIG_DEP}
-)
diff --git a/3rdparty/ext_gettext/0001-Fix-libgettextpo-linking-on-macOS.patch b/3rdparty/ext_gettext/0001-Fix-libgettextpo-linking-on-macOS.patch
deleted file mode 100644
index 6ecbd74d52..0000000000
--- a/3rdparty/ext_gettext/0001-Fix-libgettextpo-linking-on-macOS.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/gettext-tools/libgettextpo/Makefile.am 2020-07-26 20:31:02.000000000 +0000
-+++ b/gettext-tools/libgettextpo/Makefile.am 2020-07-26 20:31:02.000000000 +0000
-@@ -107,7 +107,25 @@
- # How to build libgettextpo.la.
- # Don't make it depend on libgettextsrc.la or libgettextlib.la, since they
- # define an uncontrolled amount of symbols.
--libgettextpo_la_LIBADD = libgnu.la $(WOE32_LIBADD) $(LTLIBUNISTRING)
-+# Amyspark: Need @LTLIBTEXTSTYLE@ because in macOS the linker will complain:
-+# Undefined symbols for architecture x86_64:
-+# "_file_ostream_create", referenced from:
-+# _msgdomain_list_print in write-catalog.o
-+# "_ostream_free", referenced from:
-+# _msgdomain_list_print in write-catalog.o
-+# "_ostream_write_mem", referenced from:
-+# _message_print_comment in write-po.o
-+# _wrap in write-po.o
-+# "_ostream_write_str", referenced from:
-+# _message_print_comment in write-po.o
-+# _message_print_comment_dot in write-po.o
-+# _message_print_comment_filepos in write-po.o
-+# _message_print_comment_flags in write-po.o
-+# _msgdomain_list_print_po in write-po.o
-+# _wrap in write-po.o
-+# ld: symbol(s) not found for architecture x86_64
-+# clang: error: linker command failed with exit code 1 (use -v to see invocation)
-+libgettextpo_la_LIBADD = libgnu.la ../../libtextstyle/lib/libtextstyle.la $(WOE32_LIBADD) $(LTLIBUNISTRING)
- libgettextpo_la_LDFLAGS = \
- -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
- -rpath $(libdir) \
---- a/gettext-tools/libgettextpo/Makefile.in 2020-07-26 21:04:58.000000000 +0000
-+++ b/gettext-tools/libgettextpo/Makefile.in 2020-07-26 21:04:58.000000000 +0000
-@@ -557,7 +555,8 @@
- LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
- @WOE32_TRUE@am__DEPENDENCIES_1 = libgettextpo.res.lo
- am__DEPENDENCIES_2 =
--libgettextpo_la_DEPENDENCIES = libgnu.la $(am__DEPENDENCIES_1) \
-+libgettextpo_la_DEPENDENCIES = libgnu.la \
-+ ../../libtextstyle/lib/libtextstyle.la $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_2)
- am__libgettextpo_la_SOURCES_DIST = gettext-po.c ../src/str-list.c \
- ../src/dir-list.c ../src/message.c ../src/msgl-ascii.c \
-@@ -2545,7 +2544,25 @@
- # How to build libgettextpo.la.
- # Don't make it depend on libgettextsrc.la or libgettextlib.la, since they
- # define an uncontrolled amount of symbols.
--libgettextpo_la_LIBADD = libgnu.la $(WOE32_LIBADD) $(LTLIBUNISTRING)
-+# Amyspark: Need @LTLIBTEXTSTYLE@ because in macOS the linker will complain:
-+# Undefined symbols for architecture x86_64:
-+# "_file_ostream_create", referenced from:
-+# _msgdomain_list_print in write-catalog.o
-+# "_ostream_free", referenced from:
-+# _msgdomain_list_print in write-catalog.o
-+# "_ostream_write_mem", referenced from:
-+# _message_print_comment in write-po.o
-+# _wrap in write-po.o
-+# "_ostream_write_str", referenced from:
-+# _message_print_comment in write-po.o
-+# _message_print_comment_dot in write-po.o
-+# _message_print_comment_filepos in write-po.o
-+# _message_print_comment_flags in write-po.o
-+# _msgdomain_list_print_po in write-po.o
-+# _wrap in write-po.o
-+# ld: symbol(s) not found for architecture x86_64
-+# clang: error: linker command failed with exit code 1 (use -v to see invocation)
-+libgettextpo_la_LIBADD = libgnu.la ../../libtextstyle/lib/libtextstyle.la $(WOE32_LIBADD) $(LTLIBUNISTRING)
- libgettextpo_la_LDFLAGS = -version-info \
- $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) -rpath $(libdir) \
- @LTLIBINTL@ @LTLIBICONV@ -lc -no-undefined $(am__append_2) \
diff --git a/3rdparty/ext_gettext/0001-Fix-macro-definitions.patch b/3rdparty/ext_gettext/0001-Fix-macro-definitions.patch
deleted file mode 100644
index 8fc676f7ad..0000000000
--- a/3rdparty/ext_gettext/0001-Fix-macro-definitions.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 328ffbf205a23164c7528a9a5f3feb684dd4c11c Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sat, 20 Feb 2021 20:03:28 +0000
-Subject: [PATCH 1/4] Fix macro definitions
-
-https://github.com/microsoft/vcpkg/tree/c84dfe7ddd6f3ba14ec9f4b1f2c577365175128b/ports/gettext
----
- gettext-runtime/intl/xsize.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/gettext-runtime/intl/xsize.h b/gettext-runtime/intl/xsize.h
-index 9b9840f..3007228 100644
---- a/gettext-runtime/intl/xsize.h
-+++ b/gettext-runtime/intl/xsize.h
-@@ -29,6 +29,11 @@
-
- /* Get ATTRIBUTE_PURE. */
- #include "attribute.h"
-+#if defined _WIN32
-+# define _GL_INLINE_HEADER_BEGIN
-+# define _GL_INLINE_HEADER_END
-+# define _GL_INLINE static inline
-+#endif
-
- #ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
---
-2.31.1.windows.1
-
diff --git a/3rdparty/ext_gettext/0002-Fix-uwp-build.patch b/3rdparty/ext_gettext/0002-Fix-uwp-build.patch
deleted file mode 100644
index 69502bda94..0000000000
--- a/3rdparty/ext_gettext/0002-Fix-uwp-build.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 01bc26c9b77c54544fc25184b1b229894f83d9fc Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sat, 20 Feb 2021 20:04:21 +0000
-Subject: [PATCH 2/4] Fix uwp build
-
----
- gettext-runtime/intl/langprefs.c | 10 ++++++++--
- gettext-runtime/intl/localcharset.c | 14 ++++++++++++--
- gettext-runtime/intl/localename.c | 10 ++++++++--
- 3 files changed, 28 insertions(+), 6 deletions(-)
-
-diff --git a/gettext-runtime/intl/langprefs.c b/gettext-runtime/intl/langprefs.c
-index f774ba2..498933a 100644
---- a/gettext-runtime/intl/langprefs.c
-+++ b/gettext-runtime/intl/langprefs.c
-@@ -36,8 +36,14 @@
- extern void _nl_locale_name_canonicalize (char *name);
- #endif
-
--#if defined _WIN32
--# define WIN32_NATIVE
-+#if defined _WIN32 || defined __WIN32__
-+# if !defined(WINAPI_FAMILY)
-+# define WIN32_NATIVE
-+# else
-+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
-+# define WIN32_NATIVE
-+# endif
-+# endif
- #endif
-
- #ifdef WIN32_NATIVE
-diff --git a/gettext-runtime/intl/localcharset.c b/gettext-runtime/intl/localcharset.c
-index ec75427..3028bc2 100644
---- a/gettext-runtime/intl/localcharset.c
-+++ b/gettext-runtime/intl/localcharset.c
-@@ -36,6 +36,16 @@
- # include <locale.h>
- #endif
-
-+#if defined _WIN32 || defined __WIN32__
-+# if !defined(WINAPI_FAMILY)
-+# define HAVE_ACP
-+# else
-+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
-+# define HAVE_ACP
-+# endif
-+# endif
-+#endif
-+
- #if defined __EMX__
- /* Assume EMX program runs on OS/2, even if compiled under DOS. */
- # ifndef OS2
-@@ -830,7 +840,7 @@ STATIC
- const char *
- locale_charset (void)
- {
-- const char *codeset;
-+ const char *codeset = NULL;
-
- /* This function must be multithread-safe. To achieve this without using
- thread-local storage, we use a simple strcpy or memcpy to fill this static
-@@ -912,7 +922,7 @@ locale_charset (void)
- /* The canonical name cannot be determined. */
- codeset = "";
-
--# elif defined WINDOWS_NATIVE
-+# elif defined WINDOWS_NATIVE && defined HAVE_ACP
-
- char buf[2 + 10 + 1];
- static char resultbuf[2 + 10 + 1];
-diff --git a/gettext-runtime/intl/localename.c b/gettext-runtime/intl/localename.c
-index 6458f75..a3845a4 100644
---- a/gettext-runtime/intl/localename.c
-+++ b/gettext-runtime/intl/localename.c
-@@ -72,8 +72,14 @@ extern char * getlocalename_l(int, locale_t);
- # include <CoreFoundation/CFPreferences.h>
- #endif
-
--#if defined _WIN32 && !defined __CYGWIN__
--# define WINDOWS_NATIVE
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+# if !defined(WINAPI_FAMILY)
-+# define WINDOWS_NATIVE
-+# else
-+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
-+# define WINDOWS_NATIVE
-+# endif
-+# endif
- # if !defined IN_LIBINTL
- # include "glthread/lock.h"
- # endif
---
-2.31.1.windows.1
-
diff --git a/3rdparty/ext_gettext/0003-Fix-win-unicode-paths.patch b/3rdparty/ext_gettext/0003-Fix-win-unicode-paths.patch
deleted file mode 100644
index 9473c37476..0000000000
--- a/3rdparty/ext_gettext/0003-Fix-win-unicode-paths.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From bceab06e99595db3ff6d84cf18af3f6b576a1e5b Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sat, 20 Feb 2021 20:05:25 +0000
-Subject: [PATCH 3/4] Fix win unicode paths
-
----
- gettext-runtime/intl/libgnuintl.in.h | 4 +++
- gettext-runtime/intl/loadmsgcat.c | 49 ++++++++++++++++++++++++++++
- 2 files changed, 53 insertions(+)
-
-diff --git a/gettext-runtime/intl/libgnuintl.in.h b/gettext-runtime/intl/libgnuintl.in.h
-index 6fb1920..93cd4b5 100644
---- a/gettext-runtime/intl/libgnuintl.in.h
-+++ b/gettext-runtime/intl/libgnuintl.in.h
-@@ -37,6 +37,10 @@
- implementation of gettext. */
- #define __USE_GNU_GETTEXT 1
-
-+/* We define an additional symbol to signal that this version of
-+ gettext is patched to use UTF-8 paths on Windows. */
-+#define __WIN32_USE_UTF8 1
-+
- /* Provide information about the supported file formats. Returns the
- maximum minor revision number supported for a given major revision. */
- #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
-diff --git a/gettext-runtime/intl/loadmsgcat.c b/gettext-runtime/intl/loadmsgcat.c
-index 016fe57..030b861 100644
---- a/gettext-runtime/intl/loadmsgcat.c
-+++ b/gettext-runtime/intl/loadmsgcat.c
-@@ -388,6 +388,55 @@ char *alloca ();
- # define munmap(addr, len) __munmap (addr, len)
- #endif
-
-+#ifdef _WIN32
-+/* Provide wrapper of "open" for Windows that supports UTF-8 filenames. */
-+# ifndef WIN32_LEAN_AND_MEAN
-+# define WIN32_LEAN_AND_MEAN
-+# endif
-+# ifndef WIN32_EXTRA_LEAN
-+# define WIN32_EXTRA_LEAN
-+# endif
-+# undef NOMINMAX
-+# define NOMINMAX
-+# include <windows.h> // For: MultiByteToWideChar
-+# include <io.h>
-+# include <wchar.h>
-+
-+int _open_utf8_windows_wrapper(
-+ const char *filename,
-+ int flags
-+)
-+{
-+ int wstr_len = -1;
-+ wchar_t* pUtf16FileName = NULL;
-+ int fh = -1;
-+
-+ // on Windows, convert the filename from UTF-8 to UTF-16
-+ wstr_len = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
-+ if (wstr_len <= 0)
-+ {
-+ // MultiByteToWideChar failed
-+ errno = ENOENT;
-+ return -1;
-+ }
-+ pUtf16FileName = malloc(wstr_len * sizeof(wchar_t));
-+ if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, pUtf16FileName, wstr_len) == 0)
-+ {
-+ // MultiByteToWideChar failed
-+ free(pUtf16FileName);
-+ errno = ENOENT;
-+ return -1;
-+ }
-+
-+ // and call _wopen
-+ fh = _wopen(pUtf16FileName, flags);
-+
-+ free(pUtf16FileName);
-+ return fh;
-+}
-+# define open(name, flags) _open_utf8_windows_wrapper(name, flags)
-+#endif // #ifdef _WIN32
-+
- /* For those losing systems which don't have `alloca' we have to add
- some additional code emulating it. */
- #ifdef HAVE_ALLOCA
---
-2.31.1.windows.1
-
diff --git a/3rdparty/ext_gettext/0004-vcpkg-CMake-toolchain.patch b/3rdparty/ext_gettext/0004-vcpkg-CMake-toolchain.patch
deleted file mode 100644
index 63a9dc7de8..0000000000
--- a/3rdparty/ext_gettext/0004-vcpkg-CMake-toolchain.patch
+++ /dev/null
@@ -1,2635 +0,0 @@
-From a0dcf18117183c5bb58358c1f0ebad112ef8fd8b Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sun, 21 Feb 2021 11:49:39 +0000
-Subject: [PATCH 4/4] vcpkg CMake toolchain
-
-Adapted from https://github.com/microsoft/vcpkg/tree/c84dfe7ddd6f3ba14ec9f4b1f2c577365175128b/ports/gettext
----
- CMakeLists.txt | 13 +
- gettext-runtime/CMakeLists.txt | 159 ++++
- gettext-runtime/config.unix.h.in | 1009 +++++++++++++++++++++++
- gettext-runtime/config.win32.h | 835 +++++++++++++++++++
- gettext-runtime/intl/libgnuintl.win32.h | 467 +++++++++++
- gettext-runtime/intl/libintl.rc | 38 -
- gettext-runtime/intl/libintl.rc.in | 38 +
- 7 files changed, 2521 insertions(+), 38 deletions(-)
- create mode 100644 CMakeLists.txt
- create mode 100644 gettext-runtime/CMakeLists.txt
- create mode 100644 gettext-runtime/config.unix.h.in
- create mode 100644 gettext-runtime/config.win32.h
- create mode 100644 gettext-runtime/intl/libgnuintl.win32.h
- delete mode 100644 gettext-runtime/intl/libintl.rc
- create mode 100644 gettext-runtime/intl/libintl.rc.in
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..340296a
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,18 @@
-+cmake_minimum_required(VERSION 3.5)
-+
-+project(gettext)
-+
-+set(PACKAGE_VERSION_MAJOR 0)
-+set(PACKAGE_VERSION_MINOR 19)
-+set(PACKAGE_VERSION_SUBMINOR 0)
-+
-+set(PACKAGE_VERSION_STRING "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
-+
-+add_definitions(-DPACKAGE_VERSION_MAJOR=${PACKAGE_VERSION_MAJOR} -DPACKAGE_VERSION_MINOR=${PACKAGE_VERSION_MINOR} -DPACKAGE_VERSION_SUBMINOR=${PACKAGE_VERSION_SUBMINOR} -DPACKAGE_VERSION_STRING="${PACKAGE_VERSION_STRING}")
-+
-+find_package(iconv REQUIRED)
-+include_directories(${Iconv_INCLUDE_DIRS})
-+get_filename_component(Iconv_LIB_PATH ${Iconv_LIBRARY} DIRECTORY)
-+link_directories(${Iconv_LIB_PATH})
-+
-+add_subdirectory(gettext-runtime)
-diff --git a/gettext-runtime/CMakeLists.txt b/gettext-runtime/CMakeLists.txt
-new file mode 100644
-index 0000000..8c6d22e
---- /dev/null
-+++ b/gettext-runtime/CMakeLists.txt
-@@ -0,0 +1,162 @@
-+cmake_minimum_required(VERSION 3.5)
-+project(gettext-runtime C)
-+
-+find_package(iconv REQUIRED)
-+
-+set(CMAKE_STATIC_LIBRARY_PREFIX)
-+set(CMAKE_SHARED_LIBRARY_PREFIX)
-+
-+if(WIN32)
-+ set(HAVE_POSIX_PRINTF 0)
-+ set(HAVE_SNPRINTF 0)
-+ set(HAVE_ASPRINTF 0)
-+ set(HAVE_WPRINTF 0)
-+ set(HAVE_NAMELESS_LOCALES 0)
-+ set(REPLACE_NEWLOCALE 0)
-+ set(REPLACE_DUPLOCALE 0)
-+ set(REPLACE_FREELOCALE 0)
-+ set(HAVE_NEWLOCALE 0)
-+ set(ICONV_CONST "")
-+ include(CheckTypeSize)
-+ check_type_size("long long int" HAVE_LONG_LONG_INT)
-+
-+ configure_file(intl/libgnuintl.win32.h config/libgnuintl.h @ONLY)
-+ configure_file(config.win32.h config/config.h @ONLY)
-+else()
-+ set(HAVE_POSIX_PRINTF 1)
-+ set(HAVE_SNPRINTF 1)
-+ set(HAVE_ASPRINTF 1)
-+ set(HAVE_WPRINTF 1)
-+ if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
-+ set(HAVE_NAMELESS_LOCALES 1)
-+ set(REPLACE_NEWLOCALE 1)
-+ set(REPLACE_DUPLOCALE 1)
-+ set(REPLACE_FREELOCALE 1)
-+ else()
-+ set(HAVE_NAMELESS_LOCALES 0)
-+ set(REPLACE_NEWLOCALE 0)
-+ set(REPLACE_DUPLOCALE 0)
-+ set(REPLACE_FREELOCALE 0)
-+ endif()
-+ set(HAVE_NEWLOCALE 1)
-+ if(NOT APPLE)
-+ set(ICONV_CONST const)
-+ else()
-+ set(ICONV_CONST "")
-+ endif()
-+ add_definitions(-DHAVE_NEWLOCALE=1)
-+
-+ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
-+ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
-+ find_package(Threads REQUIRED)
-+ if(NOT CMAKE_USE_PTHREADS_INIT)
-+ message(FATAL_ERROR "Error: Only pthreads is currently supported.")
-+ endif()
-+
-+ include(CheckFunctionExists)
-+ include(CheckIncludeFiles)
-+
-+ if(APPLE)
-+ set(HAVE_CFLOCALECOPYCURRENT 1)
-+ set(HAVE_CFPREFERENCESCOPYAPPVALUE 1)
-+ endif()
-+ check_function_exists(dcgettext HAVE_DCGETTEXT)
-+ check_include_files(features.h HAVE_FEATURES_H)
-+ check_function_exists(gettext HAVE_GETTEXT)
-+ check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
-+ check_function_exists(mempcpy HAVE_MEMPCPY)
-+ check_include_files(xlocale.h HAVE_XLOCALE_H)
-+
-+ configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY)
-+ configure_file(config.unix.h.in config/config.h @ONLY)
-+endif()
-+
-+if(NOT DISABLE_INSTALL_HEADERS)
-+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/config/libgnuintl.h" DESTINATION include RENAME libintl.h)
-+endif()
-+
-+file(READ "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" _contents)
-+if(NOT WIN32)
-+ string(REPLACE "/* #undef HAVE_STPCPY */" "#define HAVE_STPCPY 1" _contents "${_contents}")
-+endif()
-+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" "${_contents}")
-+
-+configure_file(intl/libintl.rc.in intl/libintl.rc @ONLY)
-+
-+FILE(GLOB SOURCES
-+ "intl/bindtextdom.c"
-+ "intl/dcgettext.c"
-+ "intl/dcigettext.c"
-+ "intl/dcngettext.c"
-+ "intl/dgettext.c"
-+ "intl/dngettext.c"
-+ "intl/explodename.c"
-+ "intl/finddomain.c"
-+ "intl/gettext.c"
-+ "intl/hash-string.c"
-+ "intl/intl-compat.c"
-+ "intl/l10nflist.c"
-+ "intl/langprefs.c"
-+ "intl/loadmsgcat.c"
-+ "intl/localealias.c"
-+ "intl/localename.c"
-+ "intl/lock.c"
-+ "intl/log.c"
-+ "intl/ngettext.c"
-+ "intl/osdep.c"
-+ "intl/plural-exp.c"
-+ "intl/plural.c"
-+ "intl/printf.c"
-+ "intl/relocatable.c"
-+ "intl/textdomain.c"
-+ "intl/version.c"
-+ if (MSVC)
-+ "intl/localcharset.c"
-+ endif()
-+ "${CMAKE_CURRENT_BINARY_DIR}/intl/libintl.rc"
-+)
-+if(NOT WIN32)
-+ list(APPEND SOURCES "intl/setlocale.c")
-+endif()
-+
-+add_definitions(-DLOCALEDIR=\"${CMAKE_INSTALL_PREFIX}\")
-+add_definitions(-DLOCALE_ALIAS_PATH=\"${CMAKE_INSTALL_PREFIX}\")
-+add_definitions(-DLIBDIR=\"${CMAKE_INSTALL_PREFIX}\")
-+add_definitions(-DINSTALLDIR=\"${CMAKE_INSTALL_PREFIX}\")
-+if(BUILD_SHARED_LIBS)
-+ add_definitions(-DBUILDING_DLL)
-+endif()
-+add_definitions("-DBUILDING_LIBINTL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY")
-+
-+add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DHAVE_ICONV -DHAVE_ICONV_H -D_CRT_SECURE_NO_WARNINGS")
-+
-+add_library(intl SHARED ${SOURCES})
-+set_target_properties(intl PROPERTIES DEFINE_SYMBOL "libintl_EXPORTS")
-+target_link_libraries(intl PUBLIC iconv)
-+
-+if(MSVC)
-+set_target_properties(intl PROPERTIES OUTPUT_NAME "libintl")
-+endif(MSVC)
-+
-+target_include_directories(intl PUBLIC
-+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/config>
-+ $<INSTALL_INTERFACE:include>
-+ ${ICONV_INCLUDE_DIR}
-+)
-+
-+if(APPLE)
-+ find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)
-+ target_link_libraries(intl PRIVATE ${COREFOUNDATION_LIBRARY})
-+endif()
-+if(NOT WIN32)
-+ target_link_libraries(intl PRIVATE Threads::Threads)
-+endif()
-+if (WIN32)
-+ target_link_libraries(intl PRIVATE kernel32.lib Advapi32.lib)
-+endif()
-+
-+install(TARGETS intl
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+)
-diff --git a/gettext-runtime/config.unix.h.in b/gettext-runtime/config.unix.h.in
-new file mode 100644
-index 0000000..51e5cf6
---- /dev/null
-+++ b/gettext-runtime/config.unix.h.in
-@@ -0,0 +1,1009 @@
-+/* config.h. Generated from config.h.in by configure. */
-+/* config.h.in. Generated from configure.ac by autoheader. */
-+
-+/* Define to the number of bits in type 'ptrdiff_t'. */
-+#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t)
-+
-+/* Define to the number of bits in type 'sig_atomic_t'. */
-+#define BITSIZEOF_SIG_ATOMIC_T 32
-+
-+/* Define to the number of bits in type 'size_t'. */
-+#define BITSIZEOF_SIZE_T sizeof(size_t)
-+
-+/* Define to the number of bits in type 'wchar_t'. */
-+#define BITSIZEOF_WCHAR_T 32
-+
-+/* Define to the number of bits in type 'wint_t'. */
-+#define BITSIZEOF_WINT_T 32
-+
-+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-+ systems. This function is required for `alloca.c' support on those systems.
-+ */
-+/* #undef CRAY_STACKSEG_END */
-+
-+/* Define if mono is the preferred C# implementation. */
-+/* #undef CSHARP_CHOICE_MONO */
-+
-+/* Define if pnet is the preferred C# implementation. */
-+/* #undef CSHARP_CHOICE_PNET */
-+
-+/* Define to 1 if using `alloca.c'. */
-+/* #undef C_ALLOCA */
-+
-+/* Define to 1 if // is a file system root distinct from /. */
-+/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */
-+
-+/* Define to 1 if translation of program messages to the user's native
-+ language is requested. */
-+#define ENABLE_NLS 1
-+
-+/* Define to 1 if the package shall run at any location in the file system. */
-+#define ENABLE_RELOCATABLE 1
-+
-+/* Define to 1 if realpath() can malloc memory, always gives an absolute path,
-+ and handles trailing slash correctly. */
-+/* #undef FUNC_REALPATH_WORKS */
-+
-+/* Define if gettimeofday clobbers the localtime buffer. */
-+/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */
-+
-+/* Define this to 'void' or 'struct timezone' to match the system's
-+ declaration of the second argument to gettimeofday. */
-+#define GETTIMEOFDAY_TIMEZONE void
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module canonicalize-lgpl shall be considered present. */
-+#define GNULIB_CANONICALIZE_LGPL 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module fscanf shall be considered present. */
-+#define GNULIB_FSCANF 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module fwriteerror shall be considered present. */
-+#define GNULIB_FWRITEERROR 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module lock shall be considered present. */
-+#define GNULIB_LOCK 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module scanf shall be considered present. */
-+#define GNULIB_SCANF 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module sigpipe shall be considered present. */
-+#define GNULIB_SIGPIPE 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module strerror shall be considered present. */
-+#define GNULIB_STRERROR 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module unistr/u8-mbtoucr shall be considered present. */
-+#define GNULIB_UNISTR_U8_MBTOUCR 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module unistr/u8-uctomb shall be considered present. */
-+#define GNULIB_UNISTR_U8_UCTOMB 1
-+
-+/* Define to 1 if you have `alloca', as a function or macro. */
-+#define HAVE_ALLOCA 1
-+
-+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-+ */
-+#define HAVE_ALLOCA_H 1
-+
-+/* Define to 1 if you have the `argz_count' function. */
-+/* #undef HAVE_ARGZ_COUNT */
-+
-+/* Define to 1 if you have the <argz.h> header file. */
-+/* #undef HAVE_ARGZ_H */
-+
-+/* Define to 1 if you have the `argz_next' function. */
-+/* #undef HAVE_ARGZ_NEXT */
-+
-+/* Define to 1 if you have the `argz_stringify' function. */
-+/* #undef HAVE_ARGZ_STRINGIFY */
-+
-+/* Define to 1 if you have the `asprintf' function. */
-+#define HAVE_ASPRINTF 1
-+
-+/* Define to 1 if you have the `atexit' function. */
-+#define HAVE_ATEXIT 1
-+
-+/* Define to 1 if you have the <bp-sym.h> header file. */
-+/* #undef HAVE_BP_SYM_H */
-+
-+/* Define to 1 if the compiler understands __builtin_expect. */
-+#define HAVE_BUILTIN_EXPECT 1
-+
-+/* Define to 1 if you have the `canonicalize_file_name' function. */
-+/* #undef HAVE_CANONICALIZE_FILE_NAME */
-+
-+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
-+ CoreFoundation framework. */
-+#cmakedefine HAVE_CFLOCALECOPYCURRENT 1
-+
-+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
-+ the CoreFoundation framework. */
-+#cmakedefine HAVE_CFPREFERENCESCOPYAPPVALUE 1
-+
-+/* Define if the GNU dcgettext() function is already present or preinstalled.
-+ */
-+#cmakedefine HAVE_DCGETTEXT 1
-+
-+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_CLEARERR_UNLOCKED 1
-+
-+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_FEOF_UNLOCKED 1
-+
-+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FERROR_UNLOCKED 1
-+
-+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FFLUSH_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FGETS_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FPUTC_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FPUTS_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FREAD_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FWRITE_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_GETCHAR_UNLOCKED 1
-+
-+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_GETC_UNLOCKED 1
-+
-+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
-+ */
-+#define HAVE_DECL_GETENV 1
-+
-+/* Define to 1 if you have the declaration of `iswblank', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_ISWBLANK 1
-+
-+/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you
-+ don't. */
-+/* #undef HAVE_DECL_MBRTOWC */
-+
-+/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you
-+ don't. */
-+/* #undef HAVE_DECL_MBSINIT */
-+
-+/* Define to 1 if you have the declaration of `program_invocation_name', and
-+ to 0 if you don't. */
-+#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
-+
-+/* Define to 1 if you have the declaration of `program_invocation_short_name',
-+ and to 0 if you don't. */
-+#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0
-+
-+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_PUTCHAR_UNLOCKED 1
-+
-+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_PUTC_UNLOCKED 1
-+
-+/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't.
-+ */
-+#define HAVE_DECL_SETENV 1
-+
-+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_STRERROR_R 1
-+
-+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_STRNLEN 1
-+
-+/* Define to 1 if you have the declaration of `towlower', and to 0 if you
-+ don't. */
-+/* #undef HAVE_DECL_TOWLOWER */
-+
-+/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_WCWIDTH 1
-+
-+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
-+ don't. */
-+#define HAVE_DECL__SNPRINTF 0
-+
-+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
-+ don't. */
-+#define HAVE_DECL__SNWPRINTF 0
-+
-+/* Define to 1 if you have the <dlfcn.h> header file. */
-+#define HAVE_DLFCN_H 1
-+
-+/* Define if you have the declaration of environ. */
-+/* #undef HAVE_ENVIRON_DECL */
-+
-+/* Define to 1 if you have the <features.h> header file. */
-+#cmakedefine HAVE_FEATURES_H 1
-+
-+/* Define to 1 if you have the `fwprintf' function. */
-+#define HAVE_FWPRINTF 1
-+
-+/* Define to 1 if you have the `getcwd' function. */
-+#define HAVE_GETCWD 1
-+
-+/* Define to 1 if you have the `getegid' function. */
-+#define HAVE_GETEGID 1
-+
-+/* Define to 1 if you have the `geteuid' function. */
-+#define HAVE_GETEUID 1
-+
-+/* Define to 1 if you have the `getgid' function. */
-+#define HAVE_GETGID 1
-+
-+/* Define to 1 if you have the <getopt.h> header file. */
-+#define HAVE_GETOPT_H 1
-+
-+/* Define to 1 if you have the `getopt_long_only' function. */
-+#define HAVE_GETOPT_LONG_ONLY 1
-+
-+/* Define to 1 if you have the `getpagesize' function. */
-+#define HAVE_GETPAGESIZE 1
-+
-+/* Define if the GNU gettext() function is already present or preinstalled. */
-+#cmakedefine HAVE_GETTEXT 1
-+
-+/* Define to 1 if you have the `gettimeofday' function. */
-+#define HAVE_GETTIMEOFDAY 1
-+
-+/* Define to 1 if you have the `getuid' function. */
-+#define HAVE_GETUID 1
-+
-+/* Define if you have the iconv() function and it works. */
-+#define HAVE_ICONV 1
-+
-+/* Define to 1 if you have the <iconv.h> header file. */
-+#define HAVE_ICONV_H 1
-+
-+/* Define to 1 if the compiler supports one of the keywords 'inline',
-+ '__inline__', '__inline' and effectively inlines functions marked as such.
-+ */
-+#define HAVE_INLINE 1
-+
-+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
-+#define HAVE_INTMAX_T 1
-+
-+/* Define to 1 if you have the <inttypes.h> header file. */
-+#define HAVE_INTTYPES_H 1
-+
-+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
-+ declares uintmax_t. */
-+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
-+
-+/* Define to 1 if you have the `iswblank' function. */
-+#define HAVE_ISWBLANK 1
-+
-+/* Define to 1 if you have the `iswcntrl' function. */
-+#define HAVE_ISWCNTRL 1
-+
-+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
-+#define HAVE_LANGINFO_CODESET 1
-+
-+/* Define if your <locale.h> file defines LC_MESSAGES. */
-+#define HAVE_LC_MESSAGES 1
-+
-+/* Define to 1 if you have the <limits.h> header file. */
-+#define HAVE_LIMITS_H 1
-+
-+/* Define to 1 if the system has the type 'long long int'. */
-+#define HAVE_LONG_LONG_INT 1
-+
-+/* Define to 1 if you have the `lstat' function. */
-+#define HAVE_LSTAT 1
-+
-+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
-+#cmakedefine HAVE_MACH_O_DYLD_H 1
-+
-+/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
-+ config.h and <sys/mman.h>. */
-+#define HAVE_MAP_ANONYMOUS 1
-+
-+/* Define to 1 if you have the `mbrtowc' function. */
-+#define HAVE_MBRTOWC 1
-+
-+/* Define to 1 if you have the `mbsinit' function. */
-+#define HAVE_MBSINIT 1
-+
-+/* Define to 1 if you have the `mbslen' function. */
-+/* #undef HAVE_MBSLEN */
-+
-+/* Define to 1 if <wchar.h> declares mbstate_t. */
-+#define HAVE_MBSTATE_T 1
-+
-+/* Define to 1 if you have the `memmove' function. */
-+#define HAVE_MEMMOVE 1
-+
-+/* Define to 1 if you have the <memory.h> header file. */
-+#define HAVE_MEMORY_H 1
-+
-+/* Define to 1 if you have the `mempcpy' function. */
-+#cmakedefine HAVE_MEMPCPY 1
-+
-+/* Define to 1 if you have a working `mmap' system call. */
-+#define HAVE_MMAP 1
-+
-+/* Define to 1 if you have the `mprotect' function. */
-+#define HAVE_MPROTECT 1
-+
-+/* Define to 1 on MSVC platforms that have the "invalid parameter handler"
-+ concept. */
-+/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */
-+
-+/* Define to 1 if you have the `munmap' function. */
-+#define HAVE_MUNMAP 1
-+
-+/* Define to 1 if you have the `newlocale' function. */
-+#cmakedefine HAVE_NEWLOCALE 1
-+
-+/* Define if your printf() function supports format strings with positions. */
-+#define HAVE_POSIX_PRINTF 1
-+
-+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
-+#define HAVE_PTHREAD_MUTEX_RECURSIVE 1
-+
-+/* Define if the POSIX multithreading library has read/write locks. */
-+#define HAVE_PTHREAD_RWLOCK 1
-+
-+/* Define to 1 if you have the `putenv' function. */
-+#define HAVE_PUTENV 1
-+
-+/* Define to 1 if you have the `raise' function. */
-+#define HAVE_RAISE 1
-+
-+/* Define to 1 if you have the `readlink' function. */
-+#define HAVE_READLINK 1
-+
-+/* Define to 1 if you have the `readlinkat' function. */
-+#define HAVE_READLINKAT 1
-+
-+/* Define to 1 if you have the `realpath' function. */
-+#define HAVE_REALPATH 1
-+
-+/* Define to 1 if you have the <search.h> header file. */
-+#define HAVE_SEARCH_H 1
-+
-+/* Define to 1 if you have the `setenv' function. */
-+#define HAVE_SETENV 1
-+
-+/* Define to 1 if you have the `setlocale' function. */
-+#define HAVE_SETLOCALE 1
-+
-+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
-+/* #undef HAVE_SIGNED_SIG_ATOMIC_T */
-+
-+/* Define to 1 if 'wchar_t' is a signed integer type. */
-+/* #undef HAVE_SIGNED_WCHAR_T */
-+
-+/* Define to 1 if 'wint_t' is a signed integer type. */
-+/* #undef HAVE_SIGNED_WINT_T */
-+
-+/* Define to 1 if the system has the type `sigset_t'. */
-+#define HAVE_SIGSET_T 1
-+
-+/* Define to 1 if you have the `snprintf' function. */
-+#define HAVE_SNPRINTF 1
-+
-+/* Define to 1 if you have the <stddef.h> header file. */
-+#define HAVE_STDDEF_H 1
-+
-+/* Define to 1 if you have the <stdint.h> header file. */
-+#define HAVE_STDINT_H 1
-+
-+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
-+ uintmax_t. */
-+#define HAVE_STDINT_H_WITH_UINTMAX 1
-+
-+/* Define to 1 if you have the <stdlib.h> header file. */
-+#define HAVE_STDLIB_H 1
-+
-+/* Define to 1 if you have the `stpcpy' function. */
-+#define HAVE_STPCPY 1
-+
-+/* Define to 1 if you have the `strcasecmp' function. */
-+#define HAVE_STRCASECMP 1
-+
-+/* Define to 1 if you have the `strdup' function. */
-+#define HAVE_STRDUP 1
-+
-+/* Define to 1 if you have the `strerror_r' function. */
-+#define HAVE_STRERROR_R 1
-+
-+/* Define to 1 if you have the <strings.h> header file. */
-+#define HAVE_STRINGS_H 1
-+
-+/* Define to 1 if you have the <string.h> header file. */
-+#define HAVE_STRING_H 1
-+
-+/* Define to 1 if you have the `strnlen' function. */
-+#define HAVE_STRNLEN 1
-+
-+/* Define to 1 if you have the `strtoul' function. */
-+#define HAVE_STRTOUL 1
-+
-+/* Define to 1 if you have the `symlink' function. */
-+#define HAVE_SYMLINK 1
-+
-+/* Define to 1 if you have the <sys/bitypes.h> header file. */
-+/* #undef HAVE_SYS_BITYPES_H */
-+
-+/* Define to 1 if you have the <sys/inttypes.h> header file. */
-+/* #undef HAVE_SYS_INTTYPES_H */
-+
-+/* Define to 1 if you have the <sys/mman.h> header file. */
-+#define HAVE_SYS_MMAN_H 1
-+
-+/* Define to 1 if you have the <sys/param.h> header file. */
-+#define HAVE_SYS_PARAM_H 1
-+
-+/* Define to 1 if you have the <sys/socket.h> header file. */
-+#define HAVE_SYS_SOCKET_H 1
-+
-+/* Define to 1 if you have the <sys/stat.h> header file. */
-+#define HAVE_SYS_STAT_H 1
-+
-+/* Define to 1 if you have the <sys/timeb.h> header file. */
-+/* #undef HAVE_SYS_TIMEB_H */
-+
-+/* Define to 1 if you have the <sys/time.h> header file. */
-+#define HAVE_SYS_TIME_H 1
-+
-+/* Define to 1 if you have the <sys/types.h> header file. */
-+#define HAVE_SYS_TYPES_H 1
-+
-+/* Define to 1 if you have the `towlower' function. */
-+#define HAVE_TOWLOWER 1
-+
-+/* Define to 1 if you have the `tsearch' function. */
-+#define HAVE_TSEARCH 1
-+
-+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
-+#define HAVE_UINTMAX_T 1
-+
-+/* Define to 1 if you have the <unistd.h> header file. */
-+#define HAVE_UNISTD_H 1
-+
-+/* Define to 1 if the system has the type 'unsigned long long int'. */
-+#define HAVE_UNSIGNED_LONG_LONG_INT 1
-+
-+/* Define to 1 if you have the `uselocale' function. */
-+#define HAVE_USELOCALE 1
-+
-+/* Define to 1 or 0, depending whether the compiler supports simple visibility
-+ declarations. */
-+#define HAVE_VISIBILITY 1
-+
-+/* Define to 1 if you have the <wchar.h> header file. */
-+#define HAVE_WCHAR_H 1
-+
-+/* Define if you have the 'wchar_t' type. */
-+#define HAVE_WCHAR_T 1
-+
-+/* Define to 1 if you have the `wcrtomb' function. */
-+#define HAVE_WCRTOMB 1
-+
-+/* Define to 1 if you have the `wcslen' function. */
-+#define HAVE_WCSLEN 1
-+
-+/* Define to 1 if you have the `wcsnlen' function. */
-+#define HAVE_WCSNLEN 1
-+
-+/* Define to 1 if you have the <wctype.h> header file. */
-+#define HAVE_WCTYPE_H 1
-+
-+/* Define to 1 if you have the `wcwidth' function. */
-+#define HAVE_WCWIDTH 1
-+
-+/* Define to 1 if you have the <winsock2.h> header file. */
-+/* #undef HAVE_WINSOCK2_H */
-+
-+/* Define if you have the 'wint_t' type. */
-+#define HAVE_WINT_T 1
-+
-+/* Define to 1 if O_NOATIME works. */
-+#define HAVE_WORKING_O_NOATIME 0
-+
-+/* Define to 1 if O_NOFOLLOW works. */
-+#define HAVE_WORKING_O_NOFOLLOW 1
-+
-+/* Define to 1 if you have the <xlocale.h> header file. */
-+#cmakedefine HAVE_XLOCALE_H 1
-+
-+/* Define to 1 if the system has the type `_Bool'. */
-+#define HAVE__BOOL 1
-+
-+/* Define to 1 if you have the `_ftime' function. */
-+/* #undef HAVE__FTIME */
-+
-+/* Define to 1 if you have the `_NSGetExecutablePath' function. */
-+/* #undef HAVE__NSGETEXECUTABLEPATH */
-+
-+/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */
-+/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */
-+
-+/* Define to 1 if you have the `__fsetlocking' function. */
-+/* #undef HAVE___FSETLOCKING */
-+
-+/* Define as const if the declaration of iconv() needs const. */
-+#define ICONV_CONST @ICONV_CONST@
-+
-+/* Define to a symbolic name denoting the flavor of iconv_open()
-+ implementation. */
-+/* #undef ICONV_FLAVOR */
-+
-+/* Define to the value of ${prefix}, as a string. */
-+/* #define INSTALLPREFIX "/usr/local" */
-+
-+/* Define if integer division by zero raises signal SIGFPE. */
-+#define INTDIV0_RAISES_SIGFPE 0
-+
-+/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing
-+ slash. */
-+/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
-+
-+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
-+#define MALLOC_0_IS_NONNULL 1
-+
-+/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
-+/* #undef MAP_ANONYMOUS */
-+
-+/* Define if the mbrtowc function has the NULL pwc argument bug. */
-+/* #undef MBRTOWC_NULL_ARG1_BUG */
-+
-+/* Define if the mbrtowc function has the NULL string argument bug. */
-+/* #undef MBRTOWC_NULL_ARG2_BUG */
-+
-+/* Define if the mbrtowc function does not return 0 for a NUL character. */
-+/* #undef MBRTOWC_NUL_RETVAL_BUG */
-+
-+/* Define if the mbrtowc function returns a wrong return value. */
-+/* #undef MBRTOWC_RETVAL_BUG */
-+
-+/* Name of package */
-+#define PACKAGE "gettext-runtime"
-+
-+/* Define to the address where bug reports for this package should be sent. */
-+#define PACKAGE_BUGREPORT ""
-+
-+/* Define to the full name of this package. */
-+#define PACKAGE_NAME "gettext-runtime"
-+
-+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "gettext-runtime 0.19"
-+
-+/* Define to the one symbol short name of this package. */
-+#define PACKAGE_TARNAME "gettext-runtime"
-+
-+/* Define to the home page for this package. */
-+#define PACKAGE_URL ""
-+
-+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "0.19"
-+
-+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
-+/* #undef PRI_MACROS_BROKEN */
-+
-+/* Define if the pthread_in_use() detection is hard. */
-+/* #undef PTHREAD_IN_USE_DETECTION_HARD */
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'ptrdiff_t'. */
-+#define PTRDIFF_T_SUFFIX
-+
-+/* Define to 1 if readlink fails to recognize a trailing slash. */
-+/* #undef READLINK_TRAILING_SLASH_BUG */
-+
-+/* Define to 1 if stat needs help when passed a directory name with a trailing
-+ slash */
-+/* #undef REPLACE_FUNC_STAT_DIR */
-+
-+/* Define to 1 if stat needs help when passed a file name with a trailing
-+ slash */
-+/* #undef REPLACE_FUNC_STAT_FILE */
-+
-+/* Define to 1 if strerror(0) does not return a message implying success. */
-+/* #undef REPLACE_STRERROR_0 */
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'sig_atomic_t'. */
-+#define SIG_ATOMIC_T_SUFFIX
-+
-+/* Define as the maximum value of type 'size_t', if the system doesn't define
-+ it. */
-+#ifndef SIZE_MAX
-+/* # undef SIZE_MAX */
-+#endif
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'size_t'. */
-+#define SIZE_T_SUFFIX ul
-+
-+/* If using the C implementation of alloca, define if you know the
-+ direction of stack growth for your system; otherwise it will be
-+ automatically deduced at runtime.
-+ STACK_DIRECTION > 0 => grows toward higher addresses
-+ STACK_DIRECTION < 0 => grows toward lower addresses
-+ STACK_DIRECTION = 0 => direction of growth unknown */
-+/* #undef STACK_DIRECTION */
-+
-+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-+/* #undef STAT_MACROS_BROKEN */
-+
-+/* Define to 1 if you have the ANSI C header files. */
-+#define STDC_HEADERS 1
-+
-+/* Define to 1 if strerror_r returns char *. */
-+/* #undef STRERROR_R_CHAR_P */
-+
-+/* Define to the prefix of C symbols at the assembler and linker level, either
-+ an underscore or empty. */
-+#define USER_LABEL_PREFIX
-+
-+/* Define if the POSIX multithreading library can be used. */
-+#define USE_POSIX_THREADS 1
-+
-+/* Define if references to the POSIX multithreading library should be made
-+ weak. */
-+/* #undef USE_POSIX_THREADS_WEAK */
-+
-+/* Define if the GNU Pth multithreading library can be used. */
-+/* #undef USE_PTH_THREADS */
-+
-+/* Define if references to the GNU Pth multithreading library should be made
-+ weak. */
-+/* #undef USE_PTH_THREADS_WEAK */
-+
-+/* Define if the old Solaris multithreading library can be used. */
-+/* #undef USE_SOLARIS_THREADS */
-+
-+/* Define if references to the old Solaris multithreading library should be
-+ made weak. */
-+/* #undef USE_SOLARIS_THREADS_WEAK */
-+
-+/* Enable extensions on AIX 3, Interix. */
-+#ifndef _ALL_SOURCE
-+# define _ALL_SOURCE 1
-+#endif
-+/* Enable general extensions on OS X. */
-+#ifndef _DARWIN_C_SOURCE
-+# define _DARWIN_C_SOURCE 1
-+#endif
-+/* Enable GNU extensions on systems that have them. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-+/* Enable threading extensions on Solaris. */
-+#ifndef _POSIX_PTHREAD_SEMANTICS
-+# define _POSIX_PTHREAD_SEMANTICS 1
-+#endif
-+/* Enable extensions on HP NonStop. */
-+#ifndef _TANDEM_SOURCE
-+# define _TANDEM_SOURCE 1
-+#endif
-+/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
-+ mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
-+ whether compiling with -Ae or -D_HPUX_SOURCE=1. */
-+#ifndef _XOPEN_SOURCE
-+/* # undef _XOPEN_SOURCE */
-+#endif
-+/* Enable general extensions on Solaris. */
-+#ifndef __EXTENSIONS__
-+# define __EXTENSIONS__ 1
-+#endif
-+
-+
-+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
-+ Unlocked I/O can improve performance in unithreaded apps, but it is not
-+ safe for multithreaded apps. */
-+#define USE_UNLOCKED_IO 1
-+
-+/* Define if the native Windows multithreading API can be used. */
-+/* #undef USE_WINDOWS_THREADS */
-+
-+/* Version number of package */
-+#define VERSION "0.19"
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'wchar_t'. */
-+#define WCHAR_T_SUFFIX
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'wint_t'. */
-+#define WINT_T_SUFFIX
-+
-+/* Define when --enable-shared is used on mingw or Cygwin. */
-+/* #undef WOE32DLL */
-+
-+/* Enable large inode numbers on Mac OS X 10.5. */
-+#define _DARWIN_USE_64_BIT_INODE 1
-+
-+/* Number of bits in a file offset, on hosts where this is settable. */
-+/* #undef _FILE_OFFSET_BITS */
-+
-+/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct
-+ stat.st_size becomes 64-bit. */
-+/* #undef _GL_WINDOWS_64_BIT_ST_SIZE */
-+
-+/* Define for large files, on AIX-style hosts. */
-+/* #undef _LARGE_FILES */
-+
-+/* Define to 1 on Solaris. */
-+/* #undef _LCONV_C99 */
-+
-+/* Define to 1 if on MINIX. */
-+/* #undef _MINIX */
-+
-+/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
-+/* #undef _NETBSD_SOURCE */
-+
-+/* The _Noreturn keyword of C11. */
-+#if ! (defined _Noreturn \
-+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
-+ || 0x5110 <= __SUNPRO_C)
-+# define _Noreturn __attribute__ ((__noreturn__))
-+# elif defined _MSC_VER && 1200 <= _MSC_VER
-+# define _Noreturn __declspec (noreturn)
-+# else
-+# define _Noreturn
-+# endif
-+#endif
-+
-+
-+/* Define to 2 if the system does not provide POSIX.1 features except with
-+ this defined. */
-+/* #undef _POSIX_1_SOURCE */
-+
-+/* Define to 1 if you need to in order for 'stat' and other things to work. */
-+/* #undef _POSIX_SOURCE */
-+
-+/* Define to rpl_ if the getopt replacement functions and variables should be
-+ used. */
-+#define __GETOPT_PREFIX rpl_
-+
-+/* Please see the Gnulib manual for how to use these macros.
-+
-+ Suppress extern inline with HP-UX cc, as it appears to be broken; see
-+ <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
-+
-+ Suppress extern inline with Sun C in standards-conformance mode, as it
-+ mishandles inline functions that call each other. E.g., for 'inline void f
-+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
-+ 'reference to static identifier "f" in extern inline function'.
-+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
-+
-+ Suppress the use of extern inline on problematic Apple configurations.
-+ OS X 10.8 and earlier mishandle it; see, e.g.,
-+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
-+ OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
-+ for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
-+ Perhaps Apple will fix this some day. */
-+#if (defined __APPLE__ \
-+ && (defined __header_inline \
-+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
-+ && ! defined __clang__) \
-+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
-+ && (defined __GNUC__ || defined __cplusplus)) \
-+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
-+ && defined __GNUC__ && ! defined __cplusplus))))
-+# define _GL_EXTERN_INLINE_APPLE_BUG
-+#endif
-+#if ((__GNUC__ \
-+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
-+ : (199901L <= __STDC_VERSION__ \
-+ && !defined __HP_cc \
-+ && !(defined __SUNPRO_C && __STDC__))) \
-+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
-+# define _GL_INLINE inline
-+# define _GL_EXTERN_INLINE extern inline
-+# define _GL_EXTERN_INLINE_IN_USE
-+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
-+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
-+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
-+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
-+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
-+# else
-+# define _GL_INLINE extern inline
-+# endif
-+# define _GL_EXTERN_INLINE extern
-+# define _GL_EXTERN_INLINE_IN_USE
-+#else
-+# define _GL_INLINE static _GL_UNUSED
-+# define _GL_EXTERN_INLINE static _GL_UNUSED
-+#endif
-+
-+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
-+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
-+# define _GL_INLINE_HEADER_CONST_PRAGMA
-+# else
-+# define _GL_INLINE_HEADER_CONST_PRAGMA \
-+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
-+# endif
-+ /* Suppress GCC's bogus "no previous prototype for 'FOO'"
-+ and "no previous declaration for 'FOO'" diagnostics,
-+ when FOO is an inline function in the header; see
-+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */
-+# define _GL_INLINE_HEADER_BEGIN \
-+ _Pragma ("GCC diagnostic push") \
-+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
-+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
-+ _GL_INLINE_HEADER_CONST_PRAGMA
-+# define _GL_INLINE_HEADER_END \
-+ _Pragma ("GCC diagnostic pop")
-+#else
-+# define _GL_INLINE_HEADER_BEGIN
-+# define _GL_INLINE_HEADER_END
-+#endif
-+
-+/* Define to `int' if <sys/types.h> doesn't define. */
-+/* #undef gid_t */
-+
-+/* Define to `__inline__' or `__inline' if that's what the C compiler
-+ calls it, or to nothing if 'inline' is not supported under any name. */
-+#ifndef __cplusplus
-+/* #undef inline */
-+#endif
-+
-+/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
-+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
-+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-+ __APPLE__ && __MACH__ test for Mac OS X.
-+ __APPLE_CC__ tests for the Apple compiler and its version.
-+ __STDC_VERSION__ tests for the C99 mode. */
-+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
-+# define __GNUC_STDC_INLINE__ 1
-+#endif
-+
-+/* Define to a type if <wchar.h> does not define. */
-+/* #undef mbstate_t */
-+
-+/* Define to `int' if <sys/types.h> does not define. */
-+/* #undef mode_t */
-+
-+/* Define to the type of st_nlink in struct stat, or a supertype. */
-+/* #undef nlink_t */
-+
-+/* Define to `int' if <sys/types.h> does not define. */
-+/* #undef pid_t */
-+
-+/* Define as the type of the result of subtracting two pointers, if the system
-+ doesn't define it. */
-+/* #undef ptrdiff_t */
-+
-+/* Define to the equivalent of the C99 'restrict' keyword, or to
-+ nothing if this is not supported. Do not define if restrict is
-+ supported directly. */
-+#define restrict __restrict
-+/* Work around a bug in Sun C++: it does not support _Restrict or
-+ __restrict__, even though the corresponding Sun C compiler ends up with
-+ "#define restrict _Restrict" or "#define restrict __restrict__" in the
-+ previous line. Perhaps some future version of Sun C++ will work with
-+ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
-+#if defined __SUNPRO_CC && !defined __RESTRICT
-+# define _Restrict
-+# define __restrict__
-+#endif
-+
-+/* Define to `unsigned int' if <sys/types.h> does not define. */
-+/* #undef size_t */
-+
-+/* Define as a signed type of the same size as size_t. */
-+/* #undef ssize_t */
-+
-+/* Define to `int' if <sys/types.h> doesn't define. */
-+/* #undef uid_t */
-+
-+/* Define to unsigned long or unsigned long long if <stdint.h> and
-+ <inttypes.h> don't define. */
-+/* #undef uintmax_t */
-+
-+/* Define as a marker that can be attached to declarations that might not
-+ be used. This helps to reduce warnings, such as from
-+ GCC -Wunused-parameter. */
-+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-+# define _GL_UNUSED __attribute__ ((__unused__))
-+#else
-+# define _GL_UNUSED
-+#endif
-+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
-+ is a misnomer outside of parameter lists. */
-+#define _UNUSED_PARAMETER_ _GL_UNUSED
-+
-+/* The __pure__ attribute was added in gcc 2.96. */
-+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-+#else
-+# define _GL_ATTRIBUTE_PURE /* empty */
-+#endif
-+
-+/* The __const__ attribute was added in gcc 2.95. */
-+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-+#else
-+# define _GL_ATTRIBUTE_CONST /* empty */
-+#endif
-+
-+
-+
-+#define __libc_lock_t gl_lock_t
-+#define __libc_lock_define gl_lock_define
-+#define __libc_lock_define_initialized gl_lock_define_initialized
-+#define __libc_lock_init gl_lock_init
-+#define __libc_lock_lock gl_lock_lock
-+#define __libc_lock_unlock gl_lock_unlock
-+#define __libc_lock_recursive_t gl_recursive_lock_t
-+#define __libc_lock_define_recursive gl_recursive_lock_define
-+#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
-+#define __libc_lock_init_recursive gl_recursive_lock_init
-+#define __libc_lock_lock_recursive gl_recursive_lock_lock
-+#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
-+#define glthread_in_use libintl_thread_in_use
-+#define glthread_lock_init_func libintl_lock_init_func
-+#define glthread_lock_lock_func libintl_lock_lock_func
-+#define glthread_lock_unlock_func libintl_lock_unlock_func
-+#define glthread_lock_destroy_func libintl_lock_destroy_func
-+#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded
-+#define glthread_rwlock_init_func libintl_rwlock_init_func
-+#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded
-+#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func
-+#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded
-+#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func
-+#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded
-+#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func
-+#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded
-+#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func
-+#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded
-+#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func
-+#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded
-+#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func
-+#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded
-+#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func
-+#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded
-+#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func
-+#define glthread_once_func libintl_once_func
-+#define glthread_once_singlethreaded libintl_once_singlethreaded
-+#define glthread_once_multithreaded libintl_once_multithreaded
-+
-+
-+
-+/* On Windows, variables that may be in a DLL must be marked specially. */
-+#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER
-+# define DLL_VARIABLE __declspec (dllimport)
-+#else
-+# define DLL_VARIABLE
-+#endif
-+
-+/* Extra OS/2 (emx+gcc) defines. */
-+#ifdef __EMX__
-+# include "intl/os2compat.h"
-+#endif
-+
-diff --git a/gettext-runtime/config.win32.h b/gettext-runtime/config.win32.h
-new file mode 100644
-index 0000000..1093a7f
---- /dev/null
-+++ b/gettext-runtime/config.win32.h
-@@ -0,0 +1,835 @@
-+/* config.h. Generated from config.h.in by configure. */
-+/* config.h.in. Generated from configure.ac by autoheader. */
-+
-+# define _GL_INLINE_HEADER_BEGIN
-+# define _GL_INLINE_HEADER_END
-+# define _GL_INLINE static inline
-+
-+/* Disable function deprecated warnings */
-+#define _CRT_NONSTDC_NO_WARNINGS
-+
-+/* Define to the number of bits in type 'ptrdiff_t'. */
-+#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t)
-+
-+/* Define to the number of bits in type 'sig_atomic_t'. */
-+#define BITSIZEOF_SIG_ATOMIC_T 32
-+
-+/* Define to the number of bits in type 'size_t'. */
-+#define BITSIZEOF_SIZE_T sizeof(size_t)
-+
-+/* Define to the number of bits in type 'wchar_t'. */
-+#define BITSIZEOF_WCHAR_T 16
-+
-+/* Define to the number of bits in type 'wint_t'. */
-+#define BITSIZEOF_WINT_T 16
-+
-+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-+ systems. This function is required for `alloca.c' support on those systems.
-+ */
-+/* #undef CRAY_STACKSEG_END */
-+
-+/* Define if mono is the preferred C# implementation. */
-+/* #undef CSHARP_CHOICE_MONO */
-+
-+/* Define if pnet is the preferred C# implementation. */
-+/* #undef CSHARP_CHOICE_PNET */
-+
-+/* Define to 1 if using `alloca.c'. */
-+/* #undef C_ALLOCA */
-+
-+/* Define to 1 if translation of program messages to the user's native
-+ language is requested. */
-+#define ENABLE_NLS 1
-+
-+/* Define to 1 if the package shall run at any location in the filesystem. */
-+#define ENABLE_RELOCATABLE 1
-+
-+/* Define to 1 when using the gnulib module fwriteerror. */
-+#define GNULIB_FWRITEERROR 1
-+
-+/* Define to 1 if you have `alloca', as a function or macro. */
-+#define HAVE_ALLOCA 1
-+
-+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-+ */
-+/* #undef HAVE_ALLOCA_H */
-+
-+/* Define to 1 if you have the `argz_count' function. */
-+/* #undef HAVE_ARGZ_COUNT */
-+
-+/* Define to 1 if you have the <argz.h> header file. */
-+/* #undef HAVE_ARGZ_H */
-+
-+/* Define to 1 if you have the `argz_next' function. */
-+/* #undef HAVE_ARGZ_NEXT */
-+
-+/* Define to 1 if you have the `argz_stringify' function. */
-+/* #undef HAVE_ARGZ_STRINGIFY */
-+
-+/* Define to 1 if you have the `asprintf' function. */
-+/* #undef HAVE_ASPRINTF */
-+
-+/* Define to 1 if you have the `atexit' function. */
-+#define HAVE_ATEXIT 1
-+
-+/* Define to 1 if you have the <bp-sym.h> header file. */
-+/* #undef HAVE_BP_SYM_H */
-+
-+/* Define to 1 if the compiler understands __builtin_expect. */
-+/* #undef HAVE_BUILTIN_EXPECT */
-+
-+/* Define to 1 if you have the `canonicalize_file_name' function. */
-+/* #undef HAVE_CANONICALIZE_FILE_NAME */
-+
-+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
-+ CoreFoundation framework. */
-+/* #undef HAVE_CFLOCALECOPYCURRENT */
-+
-+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
-+ the CoreFoundation framework. */
-+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
-+
-+/* Define if the GNU dcgettext() function is already present or preinstalled.
-+ */
-+/* #undef HAVE_DCGETTEXT */
-+
-+/* Define to 1 if you have the declaration of `canonicalize_file_name', and to
-+ 0 if you don't. */
-+#define HAVE_DECL_CANONICALIZE_FILE_NAME 0
-+
-+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_CLEARERR_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_FEOF_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FERROR_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FFLUSH_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FGETS_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FPUTC_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FPUTS_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FREAD_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_FWRITE_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_GETCHAR_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_GETC_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
-+ */
-+#define HAVE_DECL_GETENV 1
-+
-+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
-+ you don't. */
-+#define HAVE_DECL_PUTCHAR_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_PUTC_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
-+ */
-+#define HAVE_DECL_STRDUP 1
-+
-+/* Define to 1 if you have the declaration of `strerror', and to 0 if you
-+ don't. */
-+/* #undef HAVE_DECL_STRERROR */
-+
-+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_STRERROR_R 0
-+
-+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_STRNLEN 0
-+
-+/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_WCWIDTH 0
-+
-+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
-+ don't. */
-+#define HAVE_DECL__SNPRINTF 1
-+
-+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
-+ don't. */
-+#define HAVE_DECL__SNWPRINTF 1
-+
-+/* Define to 1 if you have the <dlfcn.h> header file. */
-+/* #undef HAVE_DLFCN_H */
-+
-+/* Define if you have the declaration of environ. */
-+#define HAVE_ENVIRON_DECL 1
-+
-+/* Define to 1 if you have the `fwprintf' function. */
-+#define HAVE_FWPRINTF 1
-+
-+/* Define to 1 if you have the `getcwd' function. */
-+#define HAVE_GETCWD 1
-+
-+/* Define to 1 if you have the `getegid' function. */
-+/* #undef HAVE_GETEGID */
-+
-+/* Define to 1 if you have the `geteuid' function. */
-+/* #undef HAVE_GETEUID */
-+
-+/* Define to 1 if you have the `getgid' function. */
-+/* #undef HAVE_GETGID */
-+
-+/* Define to 1 if you have the <getopt.h> header file. */
-+/* #undef HAVE_GETOPT_H */
-+
-+/* Define to 1 if you have the `getopt_long_only' function. */
-+/* #undef HAVE_GETOPT_LONG_ONLY */
-+
-+/* Define to 1 if you have the `getpagesize' function. */
-+/* #undef HAVE_GETPAGESIZE */
-+
-+/* Define if the GNU gettext() function is already present or preinstalled. */
-+/* #undef HAVE_GETTEXT */
-+
-+/* Define to 1 if you have the `getuid' function. */
-+/* #undef HAVE_GETUID */
-+
-+/* Define if you have the iconv() function and it works. */
-+/* #undef HAVE_ICONV */
-+
-+/* Define to 1 if you have the <iconv.h> header file. */
-+/* #undef HAVE_ICONV_H */
-+
-+/* Define if your compiler supports the #include_next directive. */
-+/* #undef HAVE_INCLUDE_NEXT */
-+
-+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
-+#define HAVE_INTMAX_T 1
-+
-+/* Define to 1 if you have the <inttypes.h> header file. */
-+/* #undef HAVE_INTTYPES_H */
-+
-+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
-+ declares uintmax_t. */
-+/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */
-+
-+/* Define to 1 if you have the `iswcntrl' function. */
-+#define HAVE_ISWCNTRL 1
-+
-+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
-+/* #undef HAVE_LANGINFO_CODESET */
-+
-+/* Define if your <locale.h> file defines LC_MESSAGES. */
-+/* #undef HAVE_LC_MESSAGES */
-+
-+/* Define to 1 if you have the <limits.h> header file. */
-+#define HAVE_LIMITS_H 1
-+
-+/* Define to 1 if the system has the type `long long int'. */
-+#cmakedefine HAVE_LONG_LONG_INT 1
-+
-+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
-+/* #undef HAVE_MACH_O_DYLD_H */
-+
-+/* Define if the 'malloc' function is POSIX compliant. */
-+/* #undef HAVE_MALLOC_POSIX */
-+
-+/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
-+/* #undef HAVE_MBRTOWC */
-+
-+/* Define to 1 if <wchar.h> declares mbstate_t. */
-+#define HAVE_MBSTATE_T 1
-+
-+/* Define to 1 if you have the `memchr' function. */
-+#define HAVE_MEMCHR 1
-+
-+/* Define to 1 if you have the `memmove' function. */
-+#define HAVE_MEMMOVE 1
-+
-+/* Define to 1 if you have the <memory.h> header file. */
-+#define HAVE_MEMORY_H 1
-+
-+/* Define to 1 if you have the `mempcpy' function. */
-+#ifdef __GNUC__
-+#define HAVE_MEMPCPY 1
-+#endif
-+
-+/* Define to 1 if you have a working `mmap' system call. */
-+/* #undef HAVE_MMAP */
-+
-+/* Define to 1 if you have the `munmap' function. */
-+/* #undef HAVE_MUNMAP */
-+
-+/* Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if
-+ _GNU_SOURCE is defined. */
-+/* #undef HAVE_NL_LOCALE_NAME */
-+
-+/* Define if your printf() function supports format strings with positions. */
-+/* #undef HAVE_POSIX_PRINTF */
-+
-+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
-+/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */
-+
-+/* Define if the POSIX multithreading library has read/write locks. */
-+/* #undef HAVE_PTHREAD_RWLOCK */
-+
-+/* Define to 1 if you have the `putenv' function. */
-+#define HAVE_PUTENV 1
-+
-+/* Define to 1 if you have the `readlink' function. */
-+/* #undef HAVE_READLINK */
-+
-+/* Define to 1 if you have the <search.h> header file. */
-+#define HAVE_SEARCH_H 1
-+
-+/* Define to 1 if you have the `setenv' function. */
-+/* #undef HAVE_SETENV */
-+
-+/* Define to 1 if you have the `setlocale' function. */
-+#define HAVE_SETLOCALE 1
-+
-+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
-+#define HAVE_SIGNED_SIG_ATOMIC_T 1
-+
-+/* Define to 1 if 'wchar_t' is a signed integer type. */
-+/* #undef HAVE_SIGNED_WCHAR_T */
-+
-+/* Define to 1 if 'wint_t' is a signed integer type. */
-+/* #undef HAVE_SIGNED_WINT_T */
-+
-+/* Define to 1 if you have the `snprintf' function. */
-+/* #undef HAVE_SNPRINTF */
-+
-+/* Define to 1 if stdbool.h conforms to C99. */
-+/* #undef HAVE_STDBOOL_H */
-+
-+/* Define to 1 if you have the <stddef.h> header file. */
-+#define HAVE_STDDEF_H 1
-+
-+/* Define to 1 if you have the <stdint.h> header file. */
-+#define HAVE_STDINT_H 1
-+
-+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
-+ uintmax_t. */
-+#define HAVE_STDINT_H_WITH_UINTMAX 1
-+
-+/* Define to 1 if you have the <stdlib.h> header file. */
-+#define HAVE_STDLIB_H 1
-+
-+/* Define to 1 if you have the `stpcpy' function. */
-+/* #undef HAVE_STPCPY */
-+
-+/* Define to 1 if you have the `strcasecmp' function. */
-+/* #undef HAVE_STRCASECMP */
-+
-+/* Define to 1 if you have the `strdup' function. */
-+#define HAVE_STRDUP 1
-+
-+/* Define to 1 if you have the `strerror_r' function. */
-+/* #undef HAVE_STRERROR_R */
-+
-+/* Define to 1 if you have the <strings.h> header file. */
-+/* #undef HAVE_STRINGS_H */
-+
-+/* Define to 1 if you have the <string.h> header file. */
-+#define HAVE_STRING_H 1
-+
-+/* Define to 1 if you have the `strtol' function. */
-+#define HAVE_STRTOL 1
-+
-+/* Define to 1 if you have the `strtoul' function. */
-+#define HAVE_STRTOUL 1
-+
-+/* Define to 1 if you have the <sys/bitypes.h> header file. */
-+/* #undef HAVE_SYS_BITYPES_H */
-+
-+/* Define to 1 if you have the <sys/inttypes.h> header file. */
-+/* #undef HAVE_SYS_INTTYPES_H */
-+
-+/* Define to 1 if you have the <sys/param.h> header file. */
-+/* #undef HAVE_SYS_PARAM_H */
-+
-+/* Define to 1 if you have the <sys/stat.h> header file. */
-+#define HAVE_SYS_STAT_H 1
-+
-+/* Define to 1 if you have the <sys/types.h> header file. */
-+#define HAVE_SYS_TYPES_H 1
-+
-+/* Define to 1 if you have the `tsearch' function. */
-+/* #undef HAVE_TSEARCH */
-+
-+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
-+#define HAVE_UINTMAX_T 1
-+
-+/* Define to 1 if you have the <unistd.h> header file. */
-+/* #undef HAVE_UNISTD_H */
-+
-+/* Define to 1 if the system has the type `unsigned long long int'. */
-+/* #undef HAVE_UNSIGNED_LONG_LONG_INT */
-+
-+/* Define to 1 or 0, depending whether the compiler supports simple visibility
-+ declarations. */
-+#define HAVE_VISIBILITY 0
-+
-+/* Define to 1 if you have the <wchar.h> header file. */
-+#define HAVE_WCHAR_H 1
-+
-+/* Define if you have the 'wchar_t' type. */
-+#define HAVE_WCHAR_T 1
-+
-+/* Define to 1 if you have the `wcslen' function. */
-+#define HAVE_WCSLEN 1
-+
-+/* Define to 1 if you have the <wctype.h> header file. */
-+#define HAVE_WCTYPE_H 1
-+
-+/* Define to 1 if you have the `wcwidth' function. */
-+/* #undef HAVE_WCWIDTH */
-+
-+/* Define if you have the 'wint_t' type. */
-+#define HAVE_WINT_T 1
-+
-+/* Define to 1 if the system has the type `_Bool'. */
-+/* #undef HAVE__BOOL */
-+
-+/* Define to 1 if you have the `_NSGetExecutablePath' function. */
-+/* #undef HAVE__NSGETEXECUTABLEPATH */
-+
-+/* Define to 1 if you have the `__fsetlocking' function. */
-+/* #undef HAVE___FSETLOCKING */
-+
-+/* Define as const if the declaration of iconv() needs const. */
-+#define ICONV_CONST @ICONV_CONST@
-+
-+/* Define to a symbolic name denoting the flavor of iconv_open()
-+ implementation. */
-+/* #undef ICONV_FLAVOR */
-+
-+/* Define to the value of ${prefix}, as a string. */
-+/* #define INSTALLPREFIX "/usr/local" */
-+
-+/* Define if integer division by zero raises signal SIGFPE. */
-+#define INTDIV0_RAISES_SIGFPE 0
-+
-+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
-+#define MALLOC_0_IS_NONNULL 1
-+
-+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-+#define NO_MINUS_C_MINUS_O 1
-+
-+/* Name of package */
-+#define PACKAGE "gettext-runtime"
-+
-+/* Define to the address where bug reports for this package should be sent. */
-+#define PACKAGE_BUGREPORT ""
-+
-+/* Define to the full name of this package. */
-+#define PACKAGE_NAME ""
-+
-+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING ""
-+
-+/* Define to the one symbol short name of this package. */
-+#define PACKAGE_TARNAME ""
-+
-+/* Define to the version of this package. */
-+#define PACKAGE_VERSION ""
-+
-+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
-+/* #undef PRI_MACROS_BROKEN */
-+
-+/* Define if the pthread_in_use() detection is hard. */
-+/* #undef PTHREAD_IN_USE_DETECTION_HARD */
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'ptrdiff_t'. */
-+#define PTRDIFF_T_SUFFIX
-+
-+/* Define this to 1 if strerror is broken. */
-+/* #undef REPLACE_STRERROR */
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'sig_atomic_t'. */
-+#define SIG_ATOMIC_T_SUFFIX
-+
-+/* Define as the maximum value of type 'size_t', if the system doesn't define
-+ it. */
-+#if defined(_WIN32)
-+#define SIZE_MAX (((1UL << 31) - 1) * 2 + 1)
-+#endif
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'size_t'. */
-+#define SIZE_T_SUFFIX u
-+
-+/* If using the C implementation of alloca, define if you know the
-+ direction of stack growth for your system; otherwise it will be
-+ automatically deduced at runtime.
-+ STACK_DIRECTION > 0 => grows toward higher addresses
-+ STACK_DIRECTION < 0 => grows toward lower addresses
-+ STACK_DIRECTION = 0 => direction of growth unknown */
-+/* #undef STACK_DIRECTION */
-+
-+/* Define to 1 if you have the ANSI C header files. */
-+#define STDC_HEADERS 1
-+
-+/* Define to 1 if strerror_r returns char *. */
-+/* #undef STRERROR_R_CHAR_P */
-+
-+/* Define if the POSIX multithreading library can be used. */
-+/* #undef USE_POSIX_THREADS */
-+
-+/* Define if references to the POSIX multithreading library should be made
-+ weak. */
-+/* #undef USE_POSIX_THREADS_WEAK */
-+
-+/* Define if the GNU Pth multithreading library can be used. */
-+/* #undef USE_PTH_THREADS */
-+
-+/* Define if references to the GNU Pth multithreading library should be made
-+ weak. */
-+/* #undef USE_PTH_THREADS_WEAK */
-+
-+/* Define if the old Solaris multithreading library can be used. */
-+/* #undef USE_SOLARIS_THREADS */
-+
-+/* Define if references to the old Solaris multithreading library should be
-+ made weak. */
-+/* #undef USE_SOLARIS_THREADS_WEAK */
-+
-+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
-+ Unlocked I/O can improve performance in unithreaded apps, but it is not
-+ safe for multithreaded apps. */
-+#define USE_UNLOCKED_IO 0
-+
-+/* Define if the Win32 multithreading API can be used. */
-+#define USE_WIN32_THREADS 1
-+
-+/* Version number of package */
-+#define VERSION "0.17"
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'wchar_t'. */
-+#define WCHAR_T_SUFFIX
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'wint_t'. */
-+#define WINT_T_SUFFIX
-+
-+/* Enable GNU extensions on systems that have them. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-+
-+/* Define to 1 if on MINIX. */
-+/* #undef _MINIX */
-+
-+/* Define to 2 if the system does not provide POSIX.1 features except with
-+ this defined. */
-+/* #undef _POSIX_1_SOURCE */
-+
-+/* Define to 1 if you need to in order for `stat' and other things to work. */
-+/* #undef _POSIX_SOURCE */
-+
-+/* Enable extensions on AIX 3, Interix. */
-+#ifndef _ALL_SOURCE
-+# define _ALL_SOURCE 1
-+#endif
-+/* Enable GNU extensions on systems that have them. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-+/* Enable threading extensions on Solaris. */
-+#ifndef _POSIX_PTHREAD_SEMANTICS
-+# define _POSIX_PTHREAD_SEMANTICS 1
-+#endif
-+/* Enable extensions on HP NonStop. */
-+#ifndef _TANDEM_SOURCE
-+# define _TANDEM_SOURCE 1
-+#endif
-+/* Enable general extensions on Solaris. */
-+#ifndef __EXTENSIONS__
-+# define __EXTENSIONS__ 1
-+#endif
-+
-+/* Define to rpl_ if the getopt replacement functions and variables should be
-+ used. */
-+#define __GETOPT_PREFIX rpl_
-+
-+/* Define to `__inline__' or `__inline' if that's what the C compiler
-+ calls it, or to nothing if 'inline' is not supported under any name. */
-+#ifndef __cplusplus
-+#define inline __inline
-+#endif
-+
-+/* Attributes. */
-+#ifdef __has_attribute
-+# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
-+#else
-+# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (alloc_size)
-+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
-+#else
-+# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (always_inline)
-+# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
-+#else
-+# define _GL_ATTRIBUTE_ALWAYS_INLINE
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (artificial)
-+# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
-+#else
-+# define _GL_ATTRIBUTE_ARTIFICIAL
-+#endif
-+
-+/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
-+ <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */
-+#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
-+# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
-+#else
-+# define _GL_ATTRIBUTE_COLD
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (const)
-+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-+#else
-+# define _GL_ATTRIBUTE_CONST
-+#endif
-+
-+#if 201710L < __STDC_VERSION__
-+# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
-+#elif _GL_HAS_ATTRIBUTE (deprecated)
-+# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-+#else
-+# define _GL_ATTRIBUTE_DEPRECATED
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (error)
-+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
-+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
-+#else
-+# define _GL_ATTRIBUTE_ERROR(msg)
-+# define _GL_ATTRIBUTE_WARNING(msg)
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (externally_visible)
-+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
-+#else
-+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
-+#endif
-+
-+/* FALLTHROUGH is special, because it always expands to something. */
-+#if 201710L < __STDC_VERSION__
-+# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
-+#elif _GL_HAS_ATTRIBUTE (fallthrough)
-+# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
-+#else
-+# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (format)
-+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-+#else
-+# define _GL_ATTRIBUTE_FORMAT(spec)
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (leaf)
-+# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
-+#else
-+# define _GL_ATTRIBUTE_LEAF
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (may_alias)
-+# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
-+#else
-+# define _GL_ATTRIBUTE_MAY_ALIAS
-+#endif
-+
-+#if 201710L < __STDC_VERSION__
-+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
-+#elif _GL_HAS_ATTRIBUTE (unused)
-+# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__))
-+#else
-+# define _GL_ATTRIBUTE_MAYBE_UNUSED
-+#endif
-+/* Earlier spellings of this macro. */
-+#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
-+#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
-+
-+#if _GL_HAS_ATTRIBUTE (malloc)
-+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-+#else
-+# define _GL_ATTRIBUTE_MALLOC
-+#endif
-+
-+#if 201710L < __STDC_VERSION__
-+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
-+#elif _GL_HAS_ATTRIBUTE (warn_unused_result)
-+# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
-+#else
-+# define _GL_ATTRIBUTE_NODISCARD
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (noinline)
-+# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
-+#else
-+# define _GL_ATTRIBUTE_NOINLINE
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (nonnull)
-+# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
-+#else
-+# define _GL_ATTRIBUTE_NONNULL(args)
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (nonstring)
-+# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
-+#else
-+# define _GL_ATTRIBUTE_NONSTRING
-+#endif
-+
-+/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */
-+
-+#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
-+# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
-+#else
-+# define _GL_ATTRIBUTE_NOTHROW
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (packed)
-+# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
-+#else
-+# define _GL_ATTRIBUTE_PACKED
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (pure)
-+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-+#else
-+# define _GL_ATTRIBUTE_PURE
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (returns_nonnull)
-+# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
-+#else
-+# define _GL_ATTRIBUTE_RETURNS_NONNULL
-+#endif
-+
-+#if _GL_HAS_ATTRIBUTE (sentinel)
-+# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
-+#else
-+# define _GL_ATTRIBUTE_SENTINEL(pos)
-+#endif
-+
-+/* Define to a type if <wchar.h> does not define. */
-+/* #undef mbstate_t */
-+
-+/* Define as the type of the result of subtracting two pointers, if the system
-+ doesn't define it. */
-+/* #undef ptrdiff_t */
-+
-+/* Define to a replacement function name for realpath(). */
-+#define realpath rpl_realpath
-+
-+/* Define to the equivalent of the C99 'restrict' keyword, or to
-+ nothing if this is not supported. Do not define if restrict is
-+ supported directly. */
-+#define restrict
-+/* Work around a bug in Sun C++: it does not support _Restrict, even
-+ though the corresponding Sun C compiler does, which causes
-+ "#define restrict _Restrict" in the previous line. Perhaps some future
-+ version of Sun C++ will work with _Restrict; if so, it'll probably
-+ define __RESTRICT, just as Sun C does. */
-+#if defined __SUNPRO_CC && !defined __RESTRICT
-+# define _Restrict
-+#endif
-+
-+/* Define to `unsigned int' if <sys/types.h> does not define. */
-+/* #undef size_t */
-+
-+/* Define as a signed type of the same size as size_t. */
-+#ifdef _WIN64
-+#define ssize_t __int64
-+#elif _WIN32
-+#define ssize_t __int32
-+#endif
-+
-+/* Define to rpl_strnlen if the replacement function should be used. */
-+#define strnlen rpl_strnlen
-+
-+/* Define to unsigned long or unsigned long long if <stdint.h> and
-+ <inttypes.h> don't define. */
-+/* #undef uintmax_t */
-+
-+#define __libc_lock_t gl_lock_t
-+#define __libc_lock_define gl_lock_define
-+#define __libc_lock_define_initialized gl_lock_define_initialized
-+#define __libc_lock_init gl_lock_init
-+#define __libc_lock_lock gl_lock_lock
-+#define __libc_lock_unlock gl_lock_unlock
-+#define __libc_lock_recursive_t gl_recursive_lock_t
-+#define __libc_lock_define_recursive gl_recursive_lock_define
-+#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
-+#define __libc_lock_init_recursive gl_recursive_lock_init
-+#define __libc_lock_lock_recursive gl_recursive_lock_lock
-+#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
-+#if 0
-+#define glthread_in_use libintl_thread_in_use
-+#define glthread_lock_init libintl_lock_init
-+#define glthread_lock_lock libintl_lock_lock
-+#define glthread_lock_unlock libintl_lock_unlock
-+#define glthread_lock_destroy libintl_lock_destroy
-+#define glthread_rwlock_init libintl_rwlock_init
-+#define glthread_rwlock_rdlock libintl_rwlock_rdlock
-+#define glthread_rwlock_wrlock libintl_rwlock_wrlock
-+#define glthread_rwlock_unlock libintl_rwlock_unlock
-+#define glthread_rwlock_destroy libintl_rwlock_destroy
-+#define glthread_recursive_lock_init libintl_recursive_lock_init
-+#define glthread_recursive_lock_lock libintl_recursive_lock_lock
-+#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock
-+#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy
-+#define glthread_once libintl_once
-+#define glthread_once_call libintl_once_call
-+#define glthread_once_singlethreaded libintl_once_singlethreaded
-+#endif
-+
-+
-+/* On Windows, variables that may be in a DLL must be marked specially. */
-+#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER
-+# define DLL_VARIABLE __declspec (dllimport)
-+#else
-+# define DLL_VARIABLE
-+#endif
-+
-+/* Extra OS/2 (emx+gcc) defines. */
-+#ifdef __EMX__
-+# include "intl/os2compat.h"
-+#endif
-+
-diff --git a/gettext-runtime/intl/libgnuintl.win32.h b/gettext-runtime/intl/libgnuintl.win32.h
-new file mode 100644
-index 0000000..8ffb22f
---- /dev/null
-+++ b/gettext-runtime/intl/libgnuintl.win32.h
-@@ -0,0 +1,467 @@
-+/* Message catalogs for internationalization.
-+ Copyright (C) 1995-1997, 2000-2016, 2018-2020 Free Software Foundation, Inc.
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU Lesser General Public License as published by
-+ the Free Software Foundation; either version 2.1 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public License
-+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
-+
-+#ifndef _LIBINTL_H
-+#define _LIBINTL_H 1
-+
-+#if defined(_WIN32) && defined(libintl_EXPORTS)
-+#define LIBINTL_DLL_EXPORTED __declspec(dllexport)
-+#else
-+#define LIBINTL_DLL_EXPORTED
-+#endif
-+
-+#include <locale.h>
-+#if (defined __APPLE__ && defined __MACH__) && @HAVE_NEWLOCALE@
-+#include <xlocale.h>
-+#endif
-+
-+/* The LC_MESSAGES locale category is the category used by the functions
-+ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
-+ On systems that don't define it, use an arbitrary value instead.
-+ On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
-+ then includes <libintl.h> (i.e. this file!) and then only defines
-+ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
-+ in this case. */
-+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
-+#define LC_MESSAGES 1729
-+#endif
-+
-+/* We define an additional symbol to signal that we use the GNU
-+ implementation of gettext. */
-+#define __USE_GNU_GETTEXT 1
-+
-+/* We define an additional symbol to signal that this version of
-+ gettext is patched to use UTF-8 paths on Windows. */
-+#define __WIN32_USE_UTF8 1
-+
-+/* Provide information about the supported file formats. Returns the
-+ maximum minor revision number supported for a given major revision. */
-+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 || (major) == 1 ? 1 : -1)
-+
-+/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
-+ precedence over _conio_gettext. */
-+#ifdef __DJGPP__
-+#undef gettext
-+#endif
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/* Version number: (major<<16) + (minor<<8) + subminor */
-+#define LIBINTL_VERSION 0x001500
-+extern LIBINTL_DLL_EXPORTED int libintl_version;
-+
-+/* We redirect the functions to those prefixed with "libintl_". This is
-+ necessary, because some systems define gettext/textdomain/... in the C
-+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
-+ If we used the unprefixed names, there would be cases where the
-+ definition in the C library would override the one in the libintl.so
-+ shared library. Recall that on ELF systems, the symbols are looked
-+ up in the following order:
-+ 1. in the executable,
-+ 2. in the shared libraries specified on the link command line, in order,
-+ 3. in the dependencies of the shared libraries specified on the link
-+ command line,
-+ 4. in the dlopen()ed shared libraries, in the order in which they were
-+ dlopen()ed.
-+ The definition in the C library would override the one in libintl.so if
-+ either
-+ * -lc is given on the link command line and -lintl isn't, or
-+ * -lc is given on the link command line before -lintl, or
-+ * libintl.so is a dependency of a dlopen()ed shared library but not
-+ linked to the executable at link time.
-+ Since Solaris gettext() behaves differently than GNU gettext(), this
-+ would be unacceptable.
-+
-+ The redirection happens by default through macros in C, so that &gettext
-+ is independent of the compilation unit, but through inline functions in
-+ C++, in order not to interfere with the name mangling of class fields or
-+ class methods called 'gettext'. */
-+
-+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
-+ If he doesn't, we choose the method. A third possible method is
-+ _INTL_REDIRECT_ASM, supported only by GCC. */
-+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
-+#if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
-+#define _INTL_REDIRECT_ASM
-+#else
-+#ifdef __cplusplus
-+#define _INTL_REDIRECT_INLINE
-+#else
-+#define _INTL_REDIRECT_MACROS
-+#endif
-+#endif
-+#endif
-+/* Auxiliary macros. */
-+#ifdef _INTL_REDIRECT_ASM
-+#define _INTL_ASM(cname) __asm__(_INTL_ASMNAME(__USER_LABEL_PREFIX__, #cname))
-+#define _INTL_ASMNAME(prefix, cnamestring) _INTL_STRINGIFY(prefix) cnamestring
-+#define _INTL_STRINGIFY(prefix) #prefix
-+#else
-+#define _INTL_ASM(cname)
-+#endif
-+
-+/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
-+ its n-th argument literally. This enables GCC to warn for example about
-+ printf (gettext ("foo %y")). */
-+#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus)
-+#define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__((__format_arg__(n)))
-+#else
-+#define _INTL_MAY_RETURN_STRING_ARG(n)
-+#endif
-+
-+/* Look up MSGID in the current default message catalog for the current
-+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
-+ text). */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_gettext(const char *__msgid) _INTL_MAY_RETURN_STRING_ARG(1);
-+static inline _INTL_MAY_RETURN_STRING_ARG(1) char *gettext(const char *__msgid)
-+{
-+ return libintl_gettext(__msgid);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define gettext libintl_gettext
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *gettext(const char *__msgid) _INTL_ASM(libintl_gettext) _INTL_MAY_RETURN_STRING_ARG(1);
-+#endif
-+
-+/* Look up MSGID in the DOMAINNAME message catalog for the current
-+ LC_MESSAGES locale. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_dgettext(const char *__domainname, const char *__msgid) _INTL_MAY_RETURN_STRING_ARG(2);
-+static inline _INTL_MAY_RETURN_STRING_ARG(2) char *dgettext(const char *__domainname, const char *__msgid)
-+{
-+ return libintl_dgettext(__domainname, __msgid);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define dgettext libintl_dgettext
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *dgettext(const char *__domainname, const char *__msgid) _INTL_ASM(libintl_dgettext) _INTL_MAY_RETURN_STRING_ARG(2);
-+#endif
-+
-+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
-+ locale. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_dcgettext(const char *__domainname, const char *__msgid, int __category) _INTL_MAY_RETURN_STRING_ARG(2);
-+static inline _INTL_MAY_RETURN_STRING_ARG(2) char *dcgettext(const char *__domainname, const char *__msgid, int __category)
-+{
-+ return libintl_dcgettext(__domainname, __msgid, __category);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define dcgettext libintl_dcgettext
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *dcgettext(const char *__domainname, const char *__msgid, int __category) _INTL_ASM(libintl_dcgettext) _INTL_MAY_RETURN_STRING_ARG(2);
-+#endif
-+
-+/* Similar to 'gettext' but select the plural form corresponding to the
-+ number N. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_ngettext(const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2);
-+static inline _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2) char *ngettext(const char *__msgid1, const char *__msgid2, unsigned long int __n)
-+{
-+ return libintl_ngettext(__msgid1, __msgid2, __n);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define ngettext libintl_ngettext
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *ngettext(const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM(libintl_ngettext) _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2);
-+#endif
-+
-+/* Similar to 'dgettext' but select the plural form corresponding to the
-+ number N. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_dngettext(const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3);
-+static inline _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3) char *dngettext(const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n)
-+{
-+ return libintl_dngettext(__domainname, __msgid1, __msgid2, __n);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define dngettext libintl_dngettext
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *dngettext(const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM(libintl_dngettext) _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3);
-+#endif
-+
-+/* Similar to 'dcgettext' but select the plural form corresponding to the
-+ number N. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_dcngettext(const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3);
-+static inline _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3) char *dcngettext(const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category)
-+{
-+ return libintl_dcngettext(__domainname, __msgid1, __msgid2, __n, __category);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define dcngettext libintl_dcngettext
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *dcngettext(const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_ASM(libintl_dcngettext) _INTL_MAY_RETURN_STRING_ARG(2)
-+ _INTL_MAY_RETURN_STRING_ARG(3);
-+#endif
-+
-+#ifndef IN_LIBGLOCALE
-+
-+/* Set the current default message catalog to DOMAINNAME.
-+ If DOMAINNAME is null, return the current default.
-+ If DOMAINNAME is "", reset to the default of "messages". */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_textdomain(const char *__domainname);
-+static inline char *textdomain(const char *__domainname)
-+{
-+ return libintl_textdomain(__domainname);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define textdomain libintl_textdomain
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *textdomain(const char *__domainname) _INTL_ASM(libintl_textdomain);
-+#endif
-+
-+/* Specify that the DOMAINNAME message catalog will be found
-+ in DIRNAME rather than in the system locale data base. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain(const char *__domainname, const char *__dirname);
-+static inline char *bindtextdomain(const char *__domainname, const char *__dirname)
-+{
-+ return libintl_bindtextdomain(__domainname, __dirname);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define bindtextdomain libintl_bindtextdomain
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *bindtextdomain(const char *__domainname, const char *__dirname) _INTL_ASM(libintl_bindtextdomain);
-+#endif
-+
-+#if defined _WIN32 && !defined __CYGWIN__
-+/* Specify that the DOMAINNAME message catalog will be found
-+ in WDIRNAME rather than in the system locale data base. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED wchar_t *libintl_wbindtextdomain(const char *__domainname, const wchar_t *__wdirname);
-+static inline wchar_t *wbindtextdomain(const char *__domainname, const wchar_t *__wdirname)
-+{
-+ return libintl_wbindtextdomain(__domainname, __wdirname);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define wbindtextdomain libintl_wbindtextdomain
-+#endif
-+extern LIBINTL_DLL_EXPORTED wchar_t *wbindtextdomain(const char *__domainname, const wchar_t *__wdirname) _INTL_ASM(libintl_wbindtextdomain);
-+#endif
-+#endif
-+
-+/* Specify the character encoding in which the messages from the
-+ DOMAINNAME message catalog will be returned. */
-+#ifdef _INTL_REDIRECT_INLINE
-+extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset(const char *__domainname, const char *__codeset);
-+static inline char *bind_textdomain_codeset(const char *__domainname, const char *__codeset)
-+{
-+ return libintl_bind_textdomain_codeset(__domainname, __codeset);
-+}
-+#else
-+#ifdef _INTL_REDIRECT_MACROS
-+#define bind_textdomain_codeset libintl_bind_textdomain_codeset
-+#endif
-+extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset(const char *__domainname, const char *__codeset) _INTL_ASM(libintl_bind_textdomain_codeset);
-+#endif
-+
-+#endif /* IN_LIBGLOCALE */
-+
-+/* Support for format strings with positions in *printf(), following the
-+ POSIX/XSI specification.
-+ Note: These replacements for the *printf() functions are visible only
-+ in source files that #include <libintl.h> or #include "gettext.h".
-+ Packages that use *printf() in source files that don't refer to _()
-+ or gettext() but for which the format string could be the return value
-+ of _() or gettext() need to add this #include. Oh well. */
-+
-+#if !@HAVE_POSIX_PRINTF@
-+
-+#include <stddef.h>
-+#include <stdio.h>
-+
-+/* Get va_list. */
-+#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
-+#include <stdarg.h>
-+#else
-+#include <varargs.h>
-+#endif
-+
-+#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef fprintf
-+#define fprintf libintl_fprintf
-+extern LIBINTL_DLL_EXPORTED int fprintf(FILE *, const char *, ...);
-+#endif
-+#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef vfprintf
-+#define vfprintf libintl_vfprintf
-+extern LIBINTL_DLL_EXPORTED int vfprintf(FILE *, const char *, va_list);
-+#endif
-+
-+#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef printf
-+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
-+/* Don't break __attribute__((format(printf,M,N))).
-+ This redefinition is only possible because the libc in NetBSD, Cygwin,
-+ mingw does not have a function __printf__.
-+ Alternatively, we could have done this redirection only when compiling with
-+ __GNUC__, together with a symbol redirection:
-+ extern LIBINTL_DLL_EXPORTED int printf (const char *, ...)
-+ __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
-+ But doing it now would introduce a binary incompatibility with already
-+ distributed versions of libintl on these systems. */
-+#define libintl_printf __printf__
-+#endif
-+#define printf libintl_printf
-+extern LIBINTL_DLL_EXPORTED int printf(const char *, ...);
-+#endif
-+#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef vprintf
-+#define vprintf libintl_vprintf
-+extern LIBINTL_DLL_EXPORTED int vprintf(const char *, va_list);
-+#endif
-+
-+#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef sprintf
-+#define sprintf libintl_sprintf
-+extern LIBINTL_DLL_EXPORTED int sprintf(char *, const char *, ...);
-+#endif
-+#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef vsprintf
-+#define vsprintf libintl_vsprintf
-+extern LIBINTL_DLL_EXPORTED int vsprintf(char *, const char *, va_list);
-+#endif
-+
-+#if @HAVE_SNPRINTF@
-+
-+#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef snprintf
-+#define snprintf libintl_snprintf
-+extern LIBINTL_DLL_EXPORTED int snprintf(char *, size_t, const char *, ...);
-+#endif
-+#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef vsnprintf
-+#define vsnprintf libintl_vsnprintf
-+extern LIBINTL_DLL_EXPORTED int vsnprintf(char *, size_t, const char *, va_list);
-+#endif
-+
-+#endif
-+
-+#if @HAVE_ASPRINTF@
-+
-+#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef asprintf
-+#define asprintf libintl_asprintf
-+extern LIBINTL_DLL_EXPORTED int asprintf(char **, const char *, ...);
-+#endif
-+#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */
-+#undef vasprintf
-+#define vasprintf libintl_vasprintf
-+extern LIBINTL_DLL_EXPORTED int vasprintf(char **, const char *, va_list);
-+#endif
-+
-+#endif
-+
-+#if @HAVE_WPRINTF@
-+
-+#undef fwprintf
-+#define fwprintf libintl_fwprintf
-+extern LIBINTL_DLL_EXPORTED int fwprintf(FILE *, const wchar_t *, ...);
-+#undef vfwprintf
-+#define vfwprintf libintl_vfwprintf
-+extern LIBINTL_DLL_EXPORTED int vfwprintf(FILE *, const wchar_t *, va_list);
-+
-+#undef wprintf
-+#define wprintf libintl_wprintf
-+extern LIBINTL_DLL_EXPORTED int wprintf(const wchar_t *, ...);
-+#undef vwprintf
-+#define vwprintf libintl_vwprintf
-+extern LIBINTL_DLL_EXPORTED int vwprintf(const wchar_t *, va_list);
-+
-+#undef swprintf
-+#define swprintf libintl_swprintf
-+extern LIBINTL_DLL_EXPORTED int swprintf(wchar_t *, size_t, const wchar_t *, ...);
-+#undef vswprintf
-+#define vswprintf libintl_vswprintf
-+extern LIBINTL_DLL_EXPORTED int vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
-+
-+#endif
-+
-+#endif
-+
-+/* Support for retrieving the name of a locale_t object. */
-+#if @HAVE_NAMELESS_LOCALES@
-+
-+#ifndef GNULIB_defined_newlocale /* don't override gnulib */
-+#undef newlocale
-+#define newlocale libintl_newlocale
-+extern locale_t newlocale(int, const char *, locale_t);
-+#endif
-+
-+#ifndef GNULIB_defined_duplocale /* don't override gnulib */
-+#undef duplocale
-+#define duplocale libintl_duplocale
-+extern locale_t duplocale(locale_t);
-+#endif
-+
-+#ifndef GNULIB_defined_freelocale /* don't override gnulib */
-+#undef freelocale
-+#define freelocale libintl_freelocale
-+extern void freelocale(locale_t);
-+#endif
-+
-+#endif
-+
-+/* Support for the locale chosen by the user. */
-+#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
-+
-+#ifndef GNULIB_defined_setlocale /* don't override gnulib */
-+#undef setlocale
-+#define setlocale libintl_setlocale
-+extern LIBINTL_DLL_EXPORTED char *setlocale(int, const char *);
-+#endif
-+
-+#if @HAVE_NEWLOCALE@
-+
-+#undef newlocale
-+#define newlocale libintl_newlocale
-+/* Declare newlocale() only if the system headers define the 'locale_t' type. */
-+#if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
-+extern locale_t newlocale(int, const char *, locale_t);
-+#endif
-+
-+#endif
-+
-+#endif
-+
-+/* Support for relocatable packages. */
-+
-+/* Sets the original and the current installation prefix of the package.
-+ Relocation simply replaces a pathname starting with the original prefix
-+ by the corresponding pathname with the current prefix instead. Both
-+ prefixes should be directory names without trailing slash (i.e. use ""
-+ instead of "/"). */
-+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
-+extern LIBINTL_DLL_EXPORTED void libintl_set_relocation_prefix(const char *orig_prefix, const char *curr_prefix);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* libintl.h */
-diff --git a/gettext-runtime/intl/libintl.rc b/gettext-runtime/intl/libintl.rc
-deleted file mode 100644
-index 2522418..0000000
---- a/gettext-runtime/intl/libintl.rc
-+++ /dev/null
-@@ -1,38 +0,0 @@
--/* Resources for intl.dll */
--
--#include <winver.h>
--
--VS_VERSION_INFO VERSIONINFO
-- FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
-- PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
-- FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
--#ifdef _DEBUG
-- FILEFLAGS 0x1L /* VS_FF_DEBUG */
--#else
-- FILEFLAGS 0x0L
--#endif
-- FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */
-- FILETYPE 0x2L /* VFT_DLL */
-- FILESUBTYPE 0x0L /* VFT2_UNKNOWN */
--BEGIN
-- BLOCK "StringFileInfo"
-- BEGIN
-- BLOCK "04090000" /* Lang = US English, Charset = ASCII */
-- BEGIN
-- VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see <https://www.gnu.org/licenses/>.\0"
-- VALUE "CompanyName", "Free Software Foundation\0"
-- VALUE "FileDescription", "LGPLed libintl for Windows\0"
-- VALUE "FileVersion", PACKAGE_VERSION_STRING "\0"
-- VALUE "InternalName", "intl.dll\0"
-- VALUE "LegalCopyright", "Copyright (C) 1995-2019\0"
-- VALUE "LegalTrademarks", "\0"
-- VALUE "OriginalFilename", "intl.dll\0"
-- VALUE "ProductName", "GNU libintl: accessing NLS message catalogs\0"
-- VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0"
-- END
-- END
-- BLOCK "VarFileInfo"
-- BEGIN
-- VALUE "Translation", 0x0409, 0 /* US English, ASCII */
-- END
--END
-diff --git a/gettext-runtime/intl/libintl.rc.in b/gettext-runtime/intl/libintl.rc.in
-new file mode 100644
-index 0000000..f213dc6
---- /dev/null
-+++ b/gettext-runtime/intl/libintl.rc.in
-@@ -0,0 +1,38 @@
-+/* Resources for intl.dll */
-+
-+#include <winver.h>
-+
-+VS_VERSION_INFO VERSIONINFO
-+ FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
-+ PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0
-+ FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */
-+#ifdef _DEBUG
-+ FILEFLAGS 0x1L /* VS_FF_DEBUG */
-+#else
-+ FILEFLAGS 0x0L
-+#endif
-+ FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */
-+ FILETYPE 0x2L /* VFT_DLL */
-+ FILESUBTYPE 0x0L /* VFT2_UNKNOWN */
-+BEGIN
-+ BLOCK "StringFileInfo"
-+ BEGIN
-+ BLOCK "04090000" /* Lang = US English, Charset = ASCII */
-+ BEGIN
-+ VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see <https://www.gnu.org/licenses/>.\0"
-+ VALUE "CompanyName", "Free Software Foundation\0"
-+ VALUE "FileDescription", "LGPLed libintl for Windows\0"
-+ VALUE "FileVersion", "@PACKAGE_VERSION_STRING@\0"
-+ VALUE "InternalName", "intl.dll\0"
-+ VALUE "LegalCopyright", "Copyright (C) 1995-2019\0"
-+ VALUE "LegalTrademarks", "\0"
-+ VALUE "OriginalFilename", "intl.dll\0"
-+ VALUE "ProductName", "GNU libintl: accessing NLS message catalogs\0"
-+ VALUE "ProductVersion", "@PACKAGE_VERSION_STRING@\0"
-+ END
-+ END
-+ BLOCK "VarFileInfo"
-+ BEGIN
-+ VALUE "Translation", 0x0409, 0 /* US English, ASCII */
-+ END
-+END
---
-2.31.1.windows.1
-
diff --git a/3rdparty/ext_gettext/0005-win-Fix-missing-declarations-from-wchar.h.patch b/3rdparty/ext_gettext/0005-win-Fix-missing-declarations-from-wchar.h.patch
deleted file mode 100644
index 4c98350104..0000000000
--- a/3rdparty/ext_gettext/0005-win-Fix-missing-declarations-from-wchar.h.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 5d4d0937bc75646237952447fdb4cfdb2e8a5137 Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Wed, 7 Sep 2022 19:00:22 +0800
-Subject: [PATCH] win: Fix missing declarations from wchar.h
-
----
- gettext-runtime/intl/gettextP.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h
-index 1efeb192c..b05c20bf3 100644
---- a/gettext-runtime/intl/gettextP.h
-+++ b/gettext-runtime/intl/gettextP.h
-@@ -36,6 +36,10 @@
- # include "lock.h"
- #endif
-
-+#if defined _WIN32 && !defined __CYGWIN__
-+# include <wchar.h>
-+#endif
-+
- #ifdef _LIBC
- struct loaded_domain;
- extern char *__gettext (const char *__msgid);
---
-2.37.1
-
diff --git a/3rdparty/ext_gettext/CMakeLists.txt b/3rdparty/ext_gettext/CMakeLists.txt
deleted file mode 100644
index 00b7c9a906..0000000000
--- a/3rdparty/ext_gettext/CMakeLists.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-SET(PREFIX_ext_gettext "${EXTPREFIX}" )
-if (WIN32)
- ExternalProject_Add(ext_gettext_bin
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-static-64.zip
- URL_HASH SHA256=721395c2e057eeed321f0c793311732e57cb4fa30d5708672a13902a69a77d43
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying gettext 64-bit dependencies
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR> ${PREFIX_ext_gettext}
-
- UPDATE_COMMAND ""
- )
- ExternalProject_Add (
- ext_gettext_lib
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://files.kde.org/krita/build/dependencies/gettext-0.21.tar.xz
- URL_MD5 40996bbaf7d1356d3c22e33a8b255b31
-
- PATCH_COMMAND ${PATCH_COMMAND} --binary -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-macro-definitions.patch
- COMMAND ${PATCH_COMMAND} --binary -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Fix-uwp-build.patch
- COMMAND ${PATCH_COMMAND} --binary -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Fix-win-unicode-paths.patch
- COMMAND ${PATCH_COMMAND} --binary -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0004-vcpkg-CMake-toolchain.patch
- COMMAND ${PATCH_COMMAND} --binary -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0005-win-Fix-missing-declarations-from-wchar.h.patch
- INSTALL_DIR ${PREFIX_ext_gettext}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_gettext} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
- UPDATE_COMMAND ""
- DEPENDS ext_patch DEPENDS ${ICONV_DEP}
- )
- add_custom_target(ext_gettext)
- add_dependencies(ext_gettext ext_gettext_bin ext_gettext_lib)
-else ()
-ExternalProject_Add( ext_gettext
- DOWNLOAD_EXTRACT_TIMESTAMP TRUE
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://files.kde.org/krita/build/dependencies/gettext-0.21.tar.xz
- URL_MD5 40996bbaf7d1356d3c22e33a8b255b31
- PATCH_COMMAND ${PATCH_COMMAND} -Z -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-libgettextpo-linking-on-macOS.patch
-
- INSTALL_DIR ${PREFIX_ext_gettext}
- CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PREFIX_ext_gettext} --disable-java ${GLOBAL_AUTOMAKE_PROFILE} --disable-native-java
-
- UPDATE_COMMAND ""
- DEPENDS ${ICONV_DEP}
-)
-endif ()
diff --git a/3rdparty/ext_giflib/0001-Add-vcpkg-CMake-toolchain.patch b/3rdparty/ext_giflib/0001-Add-vcpkg-CMake-toolchain.patch
deleted file mode 100644
index 147579a1a9..0000000000
--- a/3rdparty/ext_giflib/0001-Add-vcpkg-CMake-toolchain.patch
+++ /dev/null
@@ -1,493 +0,0 @@
-From 0305bbffa2e736c735f4482fed30c973e47456bd Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Fri, 26 Feb 2021 15:41:10 +0000
-Subject: [PATCH] Add vcpkg CMake toolchain
-
----
- CMakeLists.txt | 126 +++++++++++++++++++++++++++++++++++++++++++++++++
- dgif_lib.c | 4 +-
- egif_lib.c | 8 ++--
- gif_font.c | 6 +++
- gif_hash.h | 5 ++
- gif_lib.h | 126 ++++++++++++++++++++++++++++---------------------
- giftool.c | 2 +
- 7 files changed, 216 insertions(+), 61 deletions(-)
- create mode 100644 CMakeLists.txt
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..b877947
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,126 @@
-+# SPDX-FileCopyrightText: 2010,2013 Patrick Spendrin <[email protected]>
-+# SPDX-FileCopyrightText: 2019 Ivan Yossi <[email protected]>
-+# SPDX-FileCopyrightText: 2021 L. E. Segovia <[email protected]>
-+#
-+# SPDX-License-Identifier: BSD-2-Clause
-+
-+cmake_minimum_required(VERSION 3.4)
-+
-+project(giflib LANGUAGES C VERSION 5.2.1)
-+
-+if (APPLE)
-+ set(APPLE_SUPPRESS_X11_WARNING TRUE)
-+ set(CMAKE_MACOSX_RPATH 1)
-+ set(BUILD_WITH_INSTALL_RPATH 1)
-+ add_definitions(-mmacosx-version-min=10.13 -Wno-macro-redefined -Wno-deprecated-register)
-+endif()
-+
-+option(BUILD_utils "build also some small helper executables to transform gif files into other formats" OFF)
-+option(BUILD_TESTS "build some unittest files" OFF)
-+
-+include(CheckIncludeFile)
-+
-+check_include_file("fcntl.h" HAVE_FCNTL_H)
-+check_include_file("io.h" HAVE_IO_H)
-+check_include_file("stdarg.h" HAVE_STDARG_H)
-+check_include_file("inttypes.h" HAVE_INTTYPES_H)
-+check_include_file("limits.h" HAVE_MEMORY_H)
-+check_include_file("memory.h" HAVE_MEMORY_H)
-+check_include_file("stdint.h" HAVE_STDINT_H)
-+check_include_file("stdlib.h" HAVE_STDLIB_H)
-+check_include_file("strings.h" HAVE_STRINGS_H)
-+check_include_file("string.h" HAVE_STRING_H)
-+check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
-+check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
-+check_include_file("unistd.h" HAVE_UNISTD_H)
-+
-+include(CheckSymbolExists)
-+check_symbol_exists(strtok_r string.h HAVE_STRTOK_R)
-+
-+add_definitions(-DHAVE_CONFIG_H)
-+if(MSVC)
-+ add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
-+endif(MSVC)
-+
-+set(GIFLIB_HEADERS
-+ gif_lib.h
-+)
-+
-+set(GIFLIB_SOURCES
-+ dgif_lib.c
-+ egif_lib.c
-+ gif_err.c
-+ gif_font.c
-+ gif_hash.c
-+ gifalloc.c
-+ openbsd-reallocarray.c
-+ quantize.c
-+)
-+
-+set(libgif_USSRCS
-+ gif_err.c
-+ quantize.c
-+ qprintf.c
-+ getarg.c
-+ )
-+
-+add_library(gif SHARED ${GIFLIB_SOURCES})
-+
-+if(ANDROID)
-+ add_definitions (-DSIZE_MAX=0xffffffff -DS_IREAD=S_IRUSR -DS_IWRITE=S_IWUSR -DS_IEXEC=S_IXUSR)
-+endif(ANDROID)
-+
-+if (NOT GIFLIB_SKIP_HEADERS)
-+ install(FILES ${GIFLIB_HEADERS} DESTINATION include)
-+endif ()
-+
-+install(TARGETS gif
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+)
-+
-+if(BUILD_utils)
-+ add_library(util STATIC ${libgif_USSRCS})
-+
-+macro(compileUtils)
-+foreach(srcfile ${ARGN})
-+ add_executable(${srcfile} ${srcfile}.c)
-+ target_link_libraries(${srcfile} gif util)
-+ install(TARGETS ${srcfile} RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib)
-+endforeach(srcfile ${ARGN})
-+endmacro(compileUtils)
-+
-+compileUtils(
-+ gif2rgb
-+ gifbuild
-+ giffix
-+ giftext
-+ giftool
-+ gifclrmp
-+ gifbg
-+ gifcolor
-+ giffilter
-+ gifhisto
-+ gifinto
-+ gifsponge
-+ gifwedge
-+)
-+
-+if(BUILD_TESTS)
-+ foreach(srcfile gifbg gifcolor giffilter gifhisto gifsponge gifwedge)
-+ add_executable(${srcfile} ${srcfile}.c)
-+ target_link_libraries(${srcfile} gif util)
-+ endforeach(srcfile gifbg gifcolor giffilter gifhisto gifsponge gifwedge)
-+endif(BUILD_TESTS)
-+
-+if(NOT WIN32)
-+ target_link_libraries(gifclrmp m)
-+endif(NOT WIN32)
-+
-+endif(BUILD_utils)
-+
-+# documentation
-+#add_subdirectory(doc)
-diff --git a/dgif_lib.c b/dgif_lib.c
-index 82fc097..b624a50 100644
---- a/dgif_lib.c
-+++ b/dgif_lib.c
-@@ -17,11 +17,11 @@ SPDX-License-Identifier: MIT
- #include <stdio.h>
- #include <string.h>
-
--#ifdef _WIN32
-+#ifdef _MSC_VER
- #include <io.h>
- #else
- #include <unistd.h>
--#endif /* _WIN32 */
-+#endif /* _MSC_VER */
-
- #include "gif_lib.h"
- #include "gif_lib_private.h"
-diff --git a/egif_lib.c b/egif_lib.c
-index 6219af0..1bc1493 100644
---- a/egif_lib.c
-+++ b/egif_lib.c
-@@ -16,12 +16,12 @@ SPDX-License-Identifier: MIT
- #include <string.h>
- #include <fcntl.h>
-
--#ifdef _WIN32
-+#ifdef _MSC_VER
- #include <io.h>
- #else
- #include <unistd.h>
- #include <sys/types.h>
--#endif /* _WIN32 */
-+#endif /* _MSC_VER */
- #include <sys/stat.h>
-
- #include "gif_lib.h"
-@@ -37,8 +37,8 @@ static const GifPixelType CodeMask[] = {
- static int EGifPutWord(int Word, GifFileType * GifFile);
- static int EGifSetupCompress(GifFileType * GifFile);
- static int EGifCompressLine(GifFileType * GifFile, GifPixelType * Line,
-- int LineLen);
--static int EGifCompressOutput(GifFileType * GifFile, int Code);
-+ const int LineLen);
-+static int EGifCompressOutput(GifFileType * GifFile, const int Code);
- static int EGifBufferedOutput(GifFileType * GifFile, GifByteType * Buf,
- int c);
-
-diff --git a/gif_font.c b/gif_font.c
-index d90783c..a31ad40 100644
---- a/gif_font.c
-+++ b/gif_font.c
-@@ -9,6 +9,12 @@ SPDX-License-Identifier: MIT
- #include <string.h>
- #include <stdlib.h>
-
-+#ifdef _WIN32
-+#ifndef HAVE_STRTOK_R
-+#define strtok_r strtok_s
-+#endif
-+#endif
-+
- #include "gif_lib.h"
-
- /*****************************************************************************
-diff --git a/gif_hash.h b/gif_hash.h
-index 6a1b585..d11576d 100644
---- a/gif_hash.h
-+++ b/gif_hash.h
-@@ -9,7 +9,12 @@ SPDX-License-Identifier: MIT
- #ifndef _GIF_HASH_H_
- #define _GIF_HASH_H_
-
-+#ifdef _MSC_VER
-+#include <io.h>
-+#else
-+#include <sys/types.h>
- #include <unistd.h>
-+#endif /* _MSC_VER */
- #include <stdint.h>
-
- #define HT_SIZE 8192 /* 12bits = 4096 or twice as big! */
-diff --git a/gif_lib.h b/gif_lib.h
-index ebdbd3c..aa3a844 100644
---- a/gif_lib.h
-+++ b/gif_lib.h
-@@ -11,6 +11,10 @@ SPDX-License-Identifier: MIT
-
- #ifdef __cplusplus
- extern "C" {
-+#elif !defined(_STDBOOL_H)
-+#include <stdbool.h>
-+#else
-+//typedef int bool;
- #endif /* __cplusplus */
-
- #define GIFLIB_MAJOR 5
-@@ -21,7 +25,6 @@ extern "C" {
- #define GIF_OK 1
-
- #include <stddef.h>
--#include <stdbool.h>
-
- #define GIF_STAMP "GIFVER" /* First chars in file - GIF stamp. */
- #define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1
-@@ -120,18 +123,31 @@ typedef struct GraphicsControlBlock {
- #define NO_TRANSPARENT_COLOR -1
- } GraphicsControlBlock;
-
-+/******************************************************************************
-+ Windows exports
-+******************************************************************************/
-+#if !defined(gif_STATIC) && defined(_WIN32) || defined(_WIN64)
-+# ifdef gif_EXPORTS
-+# define GIF_EXPORT __declspec(dllexport)
-+# else
-+# define GIF_EXPORT __declspec(dllimport)
-+# endif
-+#else
-+# define GIF_EXPORT
-+#endif
-+
- /******************************************************************************
- GIF encoding routines
- ******************************************************************************/
-
- /* Main entry points */
--GifFileType *EGifOpenFileName(const char *GifFileName,
-+GIF_EXPORT GifFileType *EGifOpenFileName(const char *GifFileName,
- const bool GifTestExistence, int *Error);
--GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error);
--GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error);
--int EGifSpew(GifFileType * GifFile);
--const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */
--int EGifCloseFile(GifFileType *GifFile, int *ErrorCode);
-+GIF_EXPORT GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error);
-+GIF_EXPORT GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error);
-+GIF_EXPORT int EGifSpew(GifFileType * GifFile);
-+GIF_EXPORT const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */
-+GIF_EXPORT int EGifCloseFile(GifFileType *GifFile, int *ErrorCode);
-
- #define E_GIF_SUCCEEDED 0
- #define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */
-@@ -146,31 +162,31 @@ int EGifCloseFile(GifFileType *GifFile, int *ErrorCode);
- #define E_GIF_ERR_NOT_WRITEABLE 10
-
- /* These are legacy. You probably do not want to call them directly */
--int EGifPutScreenDesc(GifFileType *GifFile,
-+GIF_EXPORT int EGifPutScreenDesc(GifFileType *GifFile,
- const int GifWidth, const int GifHeight,
- const int GifColorRes,
- const int GifBackGround,
- const ColorMapObject *GifColorMap);
--int EGifPutImageDesc(GifFileType *GifFile,
-+GIF_EXPORT int EGifPutImageDesc(GifFileType *GifFile,
- const int GifLeft, const int GifTop,
- const int GifWidth, const int GifHeight,
- const bool GifInterlace,
- const ColorMapObject *GifColorMap);
--void EGifSetGifVersion(GifFileType *GifFile, const bool gif89);
--int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine,
-+GIF_EXPORT void EGifSetGifVersion(GifFileType *GifFile, const bool gif89);
-+GIF_EXPORT int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine,
- int GifLineLen);
--int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel);
--int EGifPutComment(GifFileType *GifFile, const char *GifComment);
--int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode);
--int EGifPutExtensionBlock(GifFileType *GifFile,
-+GIF_EXPORT int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel);
-+GIF_EXPORT int EGifPutComment(GifFileType *GifFile, const char *GifComment);
-+GIF_EXPORT int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode);
-+GIF_EXPORT int EGifPutExtensionBlock(GifFileType *GifFile,
- const int GifExtLen, const void *GifExtension);
--int EGifPutExtensionTrailer(GifFileType *GifFile);
--int EGifPutExtension(GifFileType *GifFile, const int GifExtCode,
-+GIF_EXPORT int EGifPutExtensionTrailer(GifFileType *GifFile);
-+GIF_EXPORT int EGifPutExtension(GifFileType *GifFile, const int GifExtCode,
- const int GifExtLen,
- const void *GifExtension);
--int EGifPutCode(GifFileType *GifFile, int GifCodeSize,
-+GIF_EXPORT int EGifPutCode(GifFileType *GifFile, int GifCodeSize,
- const GifByteType *GifCodeBlock);
--int EGifPutCodeNext(GifFileType *GifFile,
-+GIF_EXPORT int EGifPutCodeNext(GifFileType *GifFile,
- const GifByteType *GifCodeBlock);
-
- /******************************************************************************
-@@ -178,11 +194,11 @@ int EGifPutCodeNext(GifFileType *GifFile,
- ******************************************************************************/
-
- /* Main entry points */
--GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
--GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error);
--int DGifSlurp(GifFileType * GifFile);
--GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */
-- int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
-+GIF_EXPORT GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
-+GIF_EXPORT GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error);
-+GIF_EXPORT int DGifSlurp(GifFileType * GifFile);
-+GIF_EXPORT GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */
-+ GIF_EXPORT int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
-
- #define D_GIF_SUCCEEDED 0
- #define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */
-@@ -200,26 +216,26 @@ GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new
- #define D_GIF_ERR_EOF_TOO_SOON 113
-
- /* These are legacy. You probably do not want to call them directly */
--int DGifGetScreenDesc(GifFileType *GifFile);
--int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType);
--int DGifGetImageHeader(GifFileType *GifFile);
--int DGifGetImageDesc(GifFileType *GifFile);
--int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen);
--int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel);
--int DGifGetExtension(GifFileType *GifFile, int *GifExtCode,
-+GIF_EXPORT int DGifGetScreenDesc(GifFileType *GifFile);
-+GIF_EXPORT int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType);
-+GIF_EXPORT int DGifGetImageHeader(GifFileType *GifFile);
-+GIF_EXPORT int DGifGetImageDesc(GifFileType *GifFile);
-+GIF_EXPORT int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen);
-+GIF_EXPORT int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel);
-+GIF_EXPORT int DGifGetExtension(GifFileType *GifFile, int *GifExtCode,
- GifByteType **GifExtension);
--int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension);
--int DGifGetCode(GifFileType *GifFile, int *GifCodeSize,
-+GIF_EXPORT int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension);
-+GIF_EXPORT int DGifGetCode(GifFileType *GifFile, int *GifCodeSize,
- GifByteType **GifCodeBlock);
--int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock);
--int DGifGetLZCodes(GifFileType *GifFile, int *GifCode);
--const char *DGifGetGifVersion(GifFileType *GifFile);
-+GIF_EXPORT int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock);
-+GIF_EXPORT int DGifGetLZCodes(GifFileType *GifFile, int *GifCode);
-+GIF_EXPORT const char *DGifGetGifVersion(GifFileType *GifFile);
-
-
- /******************************************************************************
- Error handling and reporting.
- ******************************************************************************/
--extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */
-+GIF_EXPORT extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */
-
- /*****************************************************************************
- Everything below this point is new after version 1.2, supporting `slurp
-@@ -230,43 +246,43 @@ extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */
- Color map handling from gif_alloc.c
- ******************************************************************************/
-
--extern ColorMapObject *GifMakeMapObject(int ColorCount,
-+GIF_EXPORT extern ColorMapObject *GifMakeMapObject(int ColorCount,
- const GifColorType *ColorMap);
--extern void GifFreeMapObject(ColorMapObject *Object);
--extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1,
-+GIF_EXPORT extern void GifFreeMapObject(ColorMapObject *Object);
-+GIF_EXPORT extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1,
- const ColorMapObject *ColorIn2,
- GifPixelType ColorTransIn2[]);
--extern int GifBitSize(int n);
-+GIF_EXPORT extern int GifBitSize(int n);
-
- /******************************************************************************
- Support for the in-core structures allocation (slurp mode).
- ******************************************************************************/
-
--extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]);
--extern int GifAddExtensionBlock(int *ExtensionBlock_Count,
-+GIF_EXPORT extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]);
-+GIF_EXPORT extern int GifAddExtensionBlock(int *ExtensionBlock_Count,
- ExtensionBlock **ExtensionBlocks,
- int Function,
- unsigned int Len, unsigned char ExtData[]);
--extern void GifFreeExtensions(int *ExtensionBlock_Count,
-+GIF_EXPORT extern void GifFreeExtensions(int *ExtensionBlock_Count,
- ExtensionBlock **ExtensionBlocks);
--extern SavedImage *GifMakeSavedImage(GifFileType *GifFile,
-+GIF_EXPORT extern SavedImage *GifMakeSavedImage(GifFileType *GifFile,
- const SavedImage *CopyFrom);
--extern void GifFreeSavedImages(GifFileType *GifFile);
-+GIF_EXPORT extern void GifFreeSavedImages(GifFileType *GifFile);
-
- /******************************************************************************
- 5.x functions for GIF89 graphics control blocks
- ******************************************************************************/
-
--int DGifExtensionToGCB(const size_t GifExtensionLength,
-+GIF_EXPORT int DGifExtensionToGCB(const size_t GifExtensionLength,
- const GifByteType *GifExtension,
- GraphicsControlBlock *GCB);
--size_t EGifGCBToExtension(const GraphicsControlBlock *GCB,
-+GIF_EXPORT size_t EGifGCBToExtension(const GraphicsControlBlock *GCB,
- GifByteType *GifExtension);
-
--int DGifSavedExtensionToGCB(GifFileType *GifFile,
-+GIF_EXPORT int DGifSavedExtensionToGCB(GifFileType *GifFile,
- int ImageIndex,
- GraphicsControlBlock *GCB);
--int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB,
-+GIF_EXPORT int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB,
- GifFileType *GifFile,
- int ImageIndex);
-
-@@ -276,21 +292,21 @@ int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB,
-
- #define GIF_FONT_WIDTH 8
- #define GIF_FONT_HEIGHT 8
--extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH];
-+GIF_EXPORT extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH];
-
--extern void GifDrawText8x8(SavedImage *Image,
-+GIF_EXPORT extern void GifDrawText8x8(SavedImage *Image,
- const int x, const int y,
- const char *legend, const int color);
-
--extern void GifDrawBox(SavedImage *Image,
-+GIF_EXPORT extern void GifDrawBox(SavedImage *Image,
- const int x, const int y,
- const int w, const int d, const int color);
-
--extern void GifDrawRectangle(SavedImage *Image,
-+GIF_EXPORT extern void GifDrawRectangle(SavedImage *Image,
- const int x, const int y,
- const int w, const int d, const int color);
-
--extern void GifDrawBoxedText8x8(SavedImage *Image,
-+GIF_EXPORT extern void GifDrawBoxedText8x8(SavedImage *Image,
- const int x, const int y,
- const char *legend,
- const int border, const int bg, const int fg);
-diff --git a/giftool.c b/giftool.c
-index 77c75c0..a96cf27 100644
---- a/giftool.c
-+++ b/giftool.c
-@@ -12,7 +12,9 @@ SPDX-License-Identifier: MIT
- #include <fcntl.h>
- #include <stdbool.h>
-
-+#ifndef _WIN32
- #include "getopt.h"
-+#endif
- #include "gif_lib.h"
- #include "getarg.h"
-
---
-2.31.1.windows.1
-
diff --git a/3rdparty/ext_giflib/CMakeLists.txt b/3rdparty/ext_giflib/CMakeLists.txt
deleted file mode 100644
index 567c8ff8dd..0000000000
--- a/3rdparty/ext_giflib/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-SET(PREFIX_ext_giflib "${EXTPREFIX}" )
-ExternalProject_Add(
- ext_giflib
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://downloads.sourceforge.net/project/giflib/giflib-5.2.1.tar.gz
- URL_MD5 6f03aee4ebe54ac2cc1ab3e4b0a049e5
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Add-vcpkg-CMake-toolchain.patch
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_giflib} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_utils=OFF
-
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_googleangle/0001-D3D-Initialize-storage-after-generating-mipmap-image.patch b/3rdparty/ext_googleangle/0001-D3D-Initialize-storage-after-generating-mipmap-image.patch
deleted file mode 100644
index 55ffb9cf05..0000000000
--- a/3rdparty/ext_googleangle/0001-D3D-Initialize-storage-after-generating-mipmap-image.patch
+++ /dev/null
@@ -1,438 +0,0 @@
-From 459c367ed5a524ce0aad1877c1e39e82126f2707 Mon Sep 17 00:00:00 2001
-From: Geoff Lang <[email protected]>
-Date: Fri, 21 Jan 2022 10:02:33 -0500
-Subject: [PATCH] D3D: Initialize storage after generating mipmap images.
-
-When TextureD3D generates mipmaps without a storage present, it
-initializes all the images and then generates mipmaps on the CPU.
-Attempt to generate a storage after initializing all the mip images
-so that the mipmap generation can be done on the GPU.
-
-Fix several edge cases where texture storage was not copied back
-to images when redefining for mipmap generation. This resulted in
-the newly generated mipmaps not using the correct data.
-
-Bug: chromium:1256340
-Change-Id: I76122d36385450d973bf00f7d07402a1f975492c
-Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3406643
-Reviewed-by: Kenneth Russell <[email protected]>
-Commit-Queue: Geoff Lang <[email protected]>
-Reviewed-by: Jamie Madill <[email protected]>
----
- src/libANGLE/renderer/d3d/TextureD3D.cpp | 147 +++++++++++++++++------
- src/libANGLE/renderer/d3d/TextureD3D.h | 3 +-
- src/tests/gl_tests/TextureTest.cpp | 29 +++--
- 3 files changed, 129 insertions(+), 50 deletions(-)
-
-diff --git a/src/libANGLE/renderer/d3d/TextureD3D.cpp b/src/libANGLE/renderer/d3d/TextureD3D.cpp
-index 32a398bd3..098b17393 100644
---- a/src/libANGLE/renderer/d3d/TextureD3D.cpp
-+++ b/src/libANGLE/renderer/d3d/TextureD3D.cpp
-@@ -521,6 +521,10 @@ angle::Result TextureD3D::generateMipmapUsingImages(const gl::Context *context,
- // CPU-side mipmap generation, or something else.
- bool renderableStorage = (mTexStorage && mTexStorage->isRenderTarget() &&
- !(mRenderer->getFeatures().zeroMaxLodWorkaround.enabled));
-+ if (renderableStorage)
-+ {
-+ ANGLE_TRY(updateStorage(context));
-+ }
-
- for (GLint layer = 0; layer < layerCount; ++layer)
- {
-@@ -691,7 +695,7 @@ angle::Result TextureD3D::setBaseLevel(const gl::Context *context, GLuint baseLe
- }
- }
-
-- ANGLE_TRY(releaseTexStorage(context));
-+ ANGLE_TRY(releaseTexStorage(context, gl::TexLevelMask()));
- }
-
- return angle::Result::Continue;
-@@ -713,13 +717,37 @@ angle::Result TextureD3D::syncState(const gl::Context *context,
- return angle::Result::Continue;
- }
-
--angle::Result TextureD3D::releaseTexStorage(const gl::Context *context)
-+angle::Result TextureD3D::releaseTexStorage(const gl::Context *context,
-+ const gl::TexLevelMask &copyStorageToImagesMask)
- {
- if (!mTexStorage)
- {
- return angle::Result::Continue;
- }
-
-+ if (mTexStorage->isRenderTarget())
-+ {
-+ const GLenum storageFormat = getBaseLevelInternalFormat();
-+ const size_t storageLevels = mTexStorage->getLevelCount();
-+
-+ gl::ImageIndexIterator iterator = imageIterator();
-+ while (iterator.hasNext())
-+ {
-+ const gl::ImageIndex index = iterator.next();
-+ ImageD3D *image = getImage(index);
-+ const int storageWidth = std::max(1, getLevelZeroWidth() >> index.getLevelIndex());
-+ const int storageHeight = std::max(1, getLevelZeroHeight() >> index.getLevelIndex());
-+ if (image && isImageComplete(index) && image->getWidth() == storageWidth &&
-+ image->getHeight() == storageHeight &&
-+ image->getInternalFormat() == storageFormat &&
-+ index.getLevelIndex() < static_cast<int>(storageLevels) &&
-+ copyStorageToImagesMask[index.getLevelIndex()])
-+ {
-+ ANGLE_TRY(image->copyFromTexStorage(context, index, mTexStorage));
-+ }
-+ }
-+ }
-+
- onStateChange(angle::SubjectMessage::StorageReleased);
-
- auto err = mTexStorage->onDestroy(context);
-@@ -729,7 +757,7 @@ angle::Result TextureD3D::releaseTexStorage(const gl::Context *context)
-
- void TextureD3D::onDestroy(const gl::Context *context)
- {
-- (void)releaseTexStorage(context);
-+ (void)releaseTexStorage(context, gl::TexLevelMask());
- }
-
- angle::Result TextureD3D::initializeContents(const gl::Context *context,
-@@ -1340,7 +1368,7 @@ angle::Result TextureD3D_2D::bindTexImage(const gl::Context *context, egl::Surfa
- gl::Extents size(surface->getWidth(), surface->getHeight(), 1);
- ANGLE_TRY(redefineImage(context, 0, internalformat, size, true));
-
-- ANGLE_TRY(releaseTexStorage(context));
-+ ANGLE_TRY(releaseTexStorage(context, gl::TexLevelMask()));
-
- SurfaceD3D *surfaceD3D = GetImplAs<SurfaceD3D>(surface);
- ASSERT(surfaceD3D);
-@@ -1358,7 +1386,7 @@ angle::Result TextureD3D_2D::releaseTexImage(const gl::Context *context)
- {
- if (mTexStorage)
- {
-- ANGLE_TRY(releaseTexStorage(context));
-+ ANGLE_TRY(releaseTexStorage(context, gl::TexLevelMask()));
- }
-
- for (int i = 0; i < gl::IMPLEMENTATION_MAX_TEXTURE_LEVELS; i++)
-@@ -1386,7 +1414,7 @@ angle::Result TextureD3D_2D::setEGLImageTarget(const gl::Context *context,
- ANGLE_TRY(redefineImage(context, level, GL_NONE, gl::Extents(0, 0, 1), true));
- }
-
-- ANGLE_TRY(releaseTexStorage(context));
-+ ANGLE_TRY(releaseTexStorage(context, gl::TexLevelMask()));
- mImageArray[0]->markClean();
-
- // Pass in the RenderTargetD3D here: createTextureStorage can't generate an error.
-@@ -1413,6 +1441,10 @@ angle::Result TextureD3D_2D::initMipmapImages(const gl::Context *context)
-
- ANGLE_TRY(redefineImage(context, level, getBaseLevelInternalFormat(), levelSize, false));
- }
-+
-+ // We should be mip-complete now so generate the storage.
-+ ANGLE_TRY(initializeStorage(context, true));
-+
- return angle::Result::Continue;
- }
-
-@@ -1559,7 +1591,10 @@ angle::Result TextureD3D_2D::setCompleteTexStorage(const gl::Context *context,
- }
- }
-
-- ANGLE_TRY(releaseTexStorage(context));
-+ gl::TexLevelMask copyImageMask;
-+ copyImageMask.set();
-+
-+ ANGLE_TRY(releaseTexStorage(context, copyImageMask));
- mTexStorage = newCompleteTexStorage;
- mTexStorageObserverBinding.bind(mTexStorage);
-
-@@ -1617,9 +1652,6 @@ angle::Result TextureD3D_2D::redefineImage(const gl::Context *context,
- const int storageHeight = std::max(1, getLevelZeroHeight() >> level);
- const GLenum storageFormat = getBaseLevelInternalFormat();
-
-- mImageArray[level]->redefine(gl::TextureType::_2D, internalformat, size, forceRelease);
-- mDirtyImages = mDirtyImages || mImageArray[level]->isDirty();
--
- if (mTexStorage)
- {
- const size_t storageLevels = mTexStorage->getLevelCount();
-@@ -1636,11 +1668,18 @@ angle::Result TextureD3D_2D::redefineImage(const gl::Context *context,
- size.height != storageHeight || internalformat != storageFormat ||
- mEGLImageTarget) // Discard mismatched storage
- {
-- ANGLE_TRY(releaseTexStorage(context));
-+ gl::TexLevelMask copyImageMask;
-+ copyImageMask.set();
-+ copyImageMask.set(level, false);
-+
-+ ANGLE_TRY(releaseTexStorage(context, copyImageMask));
- markAllImagesDirty();
- }
- }
-
-+ mImageArray[level]->redefine(gl::TextureType::_2D, internalformat, size, forceRelease);
-+ mDirtyImages = mDirtyImages || mImageArray[level]->isDirty();
-+
- // Can't be an EGL image target after being redefined
- mEGLImageTarget = false;
-
-@@ -2132,6 +2171,10 @@ angle::Result TextureD3D_Cube::initMipmapImages(const gl::Context *context)
- gl::Extents(faceLevelSize, faceLevelSize, 1), false));
- }
- }
-+
-+ // We should be mip-complete now so generate the storage.
-+ ANGLE_TRY(initializeStorage(context, true));
-+
- return angle::Result::Continue;
- }
-
-@@ -2231,7 +2274,10 @@ angle::Result TextureD3D_Cube::setCompleteTexStorage(const gl::Context *context,
- }
- }
-
-- ANGLE_TRY(releaseTexStorage(context));
-+ gl::TexLevelMask copyImageMask;
-+ copyImageMask.set();
-+
-+ ANGLE_TRY(releaseTexStorage(context, copyImageMask));
- mTexStorage = newCompleteTexStorage;
- mTexStorageObserverBinding.bind(mTexStorage);
-
-@@ -2343,10 +2389,6 @@ angle::Result TextureD3D_Cube::redefineImage(const gl::Context *context,
- const int storageHeight = std::max(1, getLevelZeroHeight() >> level);
- const GLenum storageFormat = getBaseLevelInternalFormat();
-
-- mImageArray[faceIndex][level]->redefine(gl::TextureType::CubeMap, internalformat, size,
-- forceRelease);
-- mDirtyImages = mDirtyImages || mImageArray[faceIndex][level]->isDirty();
--
- if (mTexStorage)
- {
- const int storageLevels = mTexStorage->getLevelCount();
-@@ -2356,10 +2398,19 @@ angle::Result TextureD3D_Cube::redefineImage(const gl::Context *context,
- internalformat != storageFormat) // Discard mismatched storage
- {
- markAllImagesDirty();
-- ANGLE_TRY(releaseTexStorage(context));
-+
-+ gl::TexLevelMask copyImageMask;
-+ copyImageMask.set();
-+ copyImageMask.set(level, false);
-+
-+ ANGLE_TRY(releaseTexStorage(context, copyImageMask));
- }
- }
-
-+ mImageArray[faceIndex][level]->redefine(gl::TextureType::CubeMap, internalformat, size,
-+ forceRelease);
-+ mDirtyImages = mDirtyImages || mImageArray[faceIndex][level]->isDirty();
-+
- return angle::Result::Continue;
- }
-
-@@ -2820,6 +2871,9 @@ angle::Result TextureD3D_3D::initMipmapImages(const gl::Context *context)
- ANGLE_TRY(redefineImage(context, level, getBaseLevelInternalFormat(), levelSize, false));
- }
-
-+ // We should be mip-complete now so generate the storage.
-+ ANGLE_TRY(initializeStorage(context, true));
-+
- return angle::Result::Continue;
- }
-
-@@ -2899,7 +2953,10 @@ angle::Result TextureD3D_3D::createCompleteStorage(const gl::Context *context,
- angle::Result TextureD3D_3D::setCompleteTexStorage(const gl::Context *context,
- TextureStorage *newCompleteTexStorage)
- {
-- ANGLE_TRY(releaseTexStorage(context));
-+ gl::TexLevelMask copyImageMask;
-+ copyImageMask.set();
-+
-+ ANGLE_TRY(releaseTexStorage(context, copyImageMask));
- mTexStorage = newCompleteTexStorage;
- mTexStorageObserverBinding.bind(mTexStorage);
- mDirtyImages = true;
-@@ -3018,9 +3075,6 @@ angle::Result TextureD3D_3D::redefineImage(const gl::Context *context,
- const int storageDepth = std::max(1, getLevelZeroDepth() >> level);
- const GLenum storageFormat = getBaseLevelInternalFormat();
-
-- mImageArray[level]->redefine(gl::TextureType::_3D, internalformat, size, forceRelease);
-- mDirtyImages = mDirtyImages || mImageArray[level]->isDirty();
--
- if (mTexStorage)
- {
- const int storageLevels = mTexStorage->getLevelCount();
-@@ -3030,10 +3084,18 @@ angle::Result TextureD3D_3D::redefineImage(const gl::Context *context,
- internalformat != storageFormat) // Discard mismatched storage
- {
- markAllImagesDirty();
-- ANGLE_TRY(releaseTexStorage(context));
-+
-+ gl::TexLevelMask copyImageMask;
-+ copyImageMask.set();
-+ copyImageMask.set(level, false);
-+
-+ ANGLE_TRY(releaseTexStorage(context, copyImageMask));
- }
- }
-
-+ mImageArray[level]->redefine(gl::TextureType::_3D, internalformat, size, forceRelease);
-+ mDirtyImages = mDirtyImages || mImageArray[level]->isDirty();
-+
- return angle::Result::Continue;
- }
-
-@@ -3560,6 +3622,9 @@ angle::Result TextureD3D_2DArray::initMipmapImages(const gl::Context *context)
- ANGLE_TRY(redefineImage(context, level, baseFormat, levelLayerSize, false));
- }
-
-+ // We should be mip-complete now so generate the storage.
-+ ANGLE_TRY(initializeStorage(context, true));
-+
- return angle::Result::Continue;
- }
-
-@@ -3629,7 +3694,10 @@ angle::Result TextureD3D_2DArray::createCompleteStorage(const gl::Context *conte
- angle::Result TextureD3D_2DArray::setCompleteTexStorage(const gl::Context *context,
- TextureStorage *newCompleteTexStorage)
- {
-- ANGLE_TRY(releaseTexStorage(context));
-+ gl::TexLevelMask copyImageMask;
-+ copyImageMask.set();
-+
-+ ANGLE_TRY(releaseTexStorage(context, copyImageMask));
- mTexStorage = newCompleteTexStorage;
- mTexStorageObserverBinding.bind(mTexStorage);
- mDirtyImages = true;
-@@ -3796,17 +3864,6 @@ angle::Result TextureD3D_2DArray::redefineImage(const gl::Context *context,
- }
- }
-
-- if (size.depth > 0)
-- {
-- for (int layer = 0; layer < mLayerCounts[level]; layer++)
-- {
-- mImageArray[level][layer]->redefine(gl::TextureType::_2DArray, internalformat,
-- gl::Extents(size.width, size.height, 1),
-- forceRelease);
-- mDirtyImages = mDirtyImages || mImageArray[level][layer]->isDirty();
-- }
-- }
--
- if (mTexStorage)
- {
- const int storageLevels = mTexStorage->getLevelCount();
-@@ -3816,7 +3873,23 @@ angle::Result TextureD3D_2DArray::redefineImage(const gl::Context *context,
- internalformat != storageFormat) // Discard mismatched storage
- {
- markAllImagesDirty();
-- ANGLE_TRY(releaseTexStorage(context));
-+
-+ gl::TexLevelMask copyImageMask;
-+ copyImageMask.set();
-+ copyImageMask.set(level, false);
-+
-+ ANGLE_TRY(releaseTexStorage(context, copyImageMask));
-+ }
-+ }
-+
-+ if (size.depth > 0)
-+ {
-+ for (int layer = 0; layer < mLayerCounts[level]; layer++)
-+ {
-+ mImageArray[level][layer]->redefine(gl::TextureType::_2DArray, internalformat,
-+ gl::Extents(size.width, size.height, 1),
-+ forceRelease);
-+ mDirtyImages = mDirtyImages || mImageArray[level][layer]->isDirty();
- }
- }
-
-@@ -3978,7 +4051,7 @@ angle::Result TextureD3D_External::setImageExternal(const gl::Context *context,
- {
- ASSERT(type == gl::TextureType::External);
-
-- ANGLE_TRY(releaseTexStorage(context));
-+ ANGLE_TRY(releaseTexStorage(context, gl::TexLevelMask()));
-
- // If the stream is null, the external image is unbound and we release the storage
- if (stream != nullptr)
-@@ -3999,7 +4072,7 @@ angle::Result TextureD3D_External::setEGLImageTarget(const gl::Context *context,
- RenderTargetD3D *renderTargetD3D = nullptr;
- ANGLE_TRY(eglImaged3d->getRenderTarget(context, &renderTargetD3D));
-
-- ANGLE_TRY(releaseTexStorage(context));
-+ ANGLE_TRY(releaseTexStorage(context, gl::TexLevelMask()));
- mTexStorage =
- mRenderer->createTextureStorageEGLImage(eglImaged3d, renderTargetD3D, mState.getLabel());
-
-diff --git a/src/libANGLE/renderer/d3d/TextureD3D.h b/src/libANGLE/renderer/d3d/TextureD3D.h
-index 4db8dfab8..3b4cf3da4 100644
---- a/src/libANGLE/renderer/d3d/TextureD3D.h
-+++ b/src/libANGLE/renderer/d3d/TextureD3D.h
-@@ -186,7 +186,8 @@ class TextureD3D : public TextureImpl, public angle::ObserverInterface
- const gl::ImageIndex &index,
- const gl::Box &region);
-
-- angle::Result releaseTexStorage(const gl::Context *context);
-+ angle::Result releaseTexStorage(const gl::Context *context,
-+ const gl::TexLevelMask &copyStorageToImagesMask);
-
- GLuint getBaseLevel() const { return mBaseLevel; }
-
-diff --git a/src/tests/gl_tests/TextureTest.cpp b/src/tests/gl_tests/TextureTest.cpp
-index d84f2c4ca..5aa4b5090 100644
---- a/src/tests/gl_tests/TextureTest.cpp
-+++ b/src/tests/gl_tests/TextureTest.cpp
-@@ -2058,6 +2058,11 @@ TEST_P(Texture2DTestWithDrawScale, MipmapsTwice)
- pixelsBlue.data());
- glGenerateMipmap(GL_TEXTURE_2D);
-
-+ drawQuad(mProgram, "position", 0.5f);
-+
-+ EXPECT_GL_NO_ERROR();
-+ EXPECT_PIXEL_COLOR_EQ(px, py, GLColor::blue);
-+
- std::vector<GLColor> pixelsGreen(16u * 16u, GLColor::green);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE,
-@@ -4208,24 +4213,24 @@ void Texture2DBaseMaxTestES3::testGenerateMipmapAfterRebase(bool immutable)
- drawQuad(mProgram, essl3_shaders::PositionAttrib(), 0.5f);
- if (lod == 0)
- {
-- EXPECT_PIXEL_COLOR_EQ(0, 0, kMipColors[lod]);
-- EXPECT_PIXEL_COLOR_EQ(w, 0, kMipColors[lod]);
-- EXPECT_PIXEL_COLOR_EQ(0, h, kMipColors[lod]);
-- EXPECT_PIXEL_COLOR_EQ(w, h, kMipColors[lod]);
-+ EXPECT_PIXEL_COLOR_EQ(0, 0, kMipColors[lod]) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(w, 0, kMipColors[lod]) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(0, h, kMipColors[lod]) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(w, h, kMipColors[lod]) << "lod " << lod;
- }
- else if (lod == kMipCount - 1)
- {
-- EXPECT_PIXEL_COLOR_EQ(0, 0, kMipColors[lod]);
-- EXPECT_PIXEL_COLOR_EQ(w, 0, kMipColors[lod]);
-- EXPECT_PIXEL_COLOR_EQ(0, h, kMipColors[lod]);
-- EXPECT_PIXEL_COLOR_EQ(w, h, kMipColors[lod]);
-+ EXPECT_PIXEL_COLOR_EQ(0, 0, kMipColors[lod]) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(w, 0, kMipColors[lod]) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(0, h, kMipColors[lod]) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(w, h, kMipColors[lod]) << "lod " << lod;
- }
- else
- {
-- EXPECT_PIXEL_COLOR_EQ(0, 0, kNewMipColor);
-- EXPECT_PIXEL_COLOR_EQ(w, 0, kNewMipColor);
-- EXPECT_PIXEL_COLOR_EQ(0, h, kNewMipColor);
-- EXPECT_PIXEL_COLOR_EQ(w, h, kNewMipColor);
-+ EXPECT_PIXEL_COLOR_EQ(0, 0, kNewMipColor) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(w, 0, kNewMipColor) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(0, h, kNewMipColor) << "lod " << lod;
-+ EXPECT_PIXEL_COLOR_EQ(w, h, kNewMipColor) << "lod " << lod;
- }
- }
- }
---
-2.23.0.windows.1
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0001-ANGLE-Use-pixel-sizes-in-the-XAML-swap-chain.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0001-ANGLE-Use-pixel-sizes-in-the-XAML-swap-chain.patch
deleted file mode 100644
index 40315be8ea..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0001-ANGLE-Use-pixel-sizes-in-the-XAML-swap-chain.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From 2dc3f1bd5ba301af2de5066ff3d09ccc9b8cbdd2 Mon Sep 17 00:00:00 2001
-From: Oliver Wolff <[email protected]>
-Date: Wed, 22 Aug 2018 09:21:04 +0200
-Subject: [PATCH 01/17] ANGLE: Use pixel sizes in the XAML swap chain
-
-This is necessary for Qt applications, as they render to GL in physical
-pixels. This is consistent with the CoreWindow swap chain behavior.
-
-In order to achieve proper scaling, the scale factor has to be initialized
-properly in InspectableNativeWindow.
-
-This change only affects Windows Runtime targets.
-
-Change-Id: I92a365f33752ed49c960e390bbf89cc33ccc8004
----
- .../d3d11/winrt/CoreWindowNativeWindow.cpp | 25 ------------------
- .../d3d/d3d11/winrt/CoreWindowNativeWindow.h | 1 -
- .../d3d11/winrt/InspectableNativeWindow.cpp | 26 ++++++++++++++++---
- .../d3d/d3d11/winrt/InspectableNativeWindow.h | 7 ++++-
- 4 files changed, 29 insertions(+), 30 deletions(-)
-
-diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
-index 7d3f078d6..22e3c65a7 100644
---- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
-@@ -210,29 +210,4 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWind
-
- return result;
- }
--
--static float GetLogicalDpi()
--{
-- ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties;
--
-- if (SUCCEEDED(GetActivationFactory(
-- HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(),
-- displayProperties.GetAddressOf())))
-- {
-- float dpi = 96.0f;
-- if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi)))
-- {
-- return dpi;
-- }
-- }
--
-- // Return 96 dpi as a default if display properties cannot be obtained.
-- return 96.0f;
--}
--
--float ConvertDipsToPixels(float dips)
--{
-- static const float dipsPerInch = 96.0f;
-- return dips * GetLogicalDpi() / dipsPerInch;
--}
- } // namespace rx
-diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
-index 044f3d3b6..4e418b985 100644
---- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
-+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h
-@@ -21,7 +21,6 @@ typedef ABI::Windows::Foundation::
-
- namespace rx
- {
--float ConvertDipsToPixels(float dips);
-
- class CoreWindowNativeWindow : public InspectableNativeWindow,
- public std::enable_shared_from_this<CoreWindowNativeWindow>
-diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.cpp
-index 0317120b7..e4ef5eca9 100644
---- a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.cpp
-@@ -290,8 +290,28 @@ HRESULT GetOptionalSinglePropertyValue(
-
- RECT InspectableNativeWindow::clientRect(const Size &size)
- {
-- // We don't have to check if a swapchain scale was specified here; the default value is 1.0f
-- // which will have no effect.
-- return {0, 0, lround(size.Width * mSwapChainScale), lround(size.Height * mSwapChainScale)};
-+ return {0, 0, static_cast<long>(ConvertDipsToPixels(size.Width)),
-+ static_cast<long>(ConvertDipsToPixels(size.Height))};
-+}
-+
-+float GetLogicalDpi()
-+{
-+ ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties;
-+ float dpi = 96.0f;
-+
-+ if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), displayProperties.GetAddressOf())))
-+ {
-+ if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi)))
-+ {
-+ return dpi;
-+ }
-+ }
-+ return dpi;
-+}
-+
-+float ConvertDipsToPixels(float dips)
-+{
-+ static const float dipsPerInch = 96.0f;
-+ return lround((dips * GetLogicalDpi() / dipsPerInch));
- }
- } // namespace rx
-diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
-index 64016b08f..e6e037a86 100644
---- a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
-+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h
-@@ -31,6 +31,9 @@ using namespace ABI::Windows::Foundation::Collections;
-
- namespace rx
- {
-+float ConvertDipsToPixels(float dips);
-+float GetLogicalDpi();
-+
- class InspectableNativeWindow
- {
- public:
-@@ -38,12 +41,14 @@ class InspectableNativeWindow
- : mSupportsSwapChainResize(true),
- mSwapChainSizeSpecified(false),
- mSwapChainScaleSpecified(false),
-- mSwapChainScale(1.0f),
- mClientRectChanged(false),
- mClientRect({0, 0, 0, 0}),
- mNewClientRect({0, 0, 0, 0})
- {
- mSizeChangedEventToken.value = 0;
-+ mSwapChainScale = 96.0f / GetLogicalDpi();
-+ if (mSwapChainScale != 1.0f)
-+ mSwapChainScaleSpecified = true;
- }
- virtual ~InspectableNativeWindow() {}
-
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0002-ANGLE-Add-support-for-querying-platform-device.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0002-ANGLE-Add-support-for-querying-platform-device.patch
deleted file mode 100644
index a40221ab04..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0002-ANGLE-Add-support-for-querying-platform-device.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 16ce00cdd735a4f369abfb71908c280b6cc3ab14 Mon Sep 17 00:00:00 2001
-From: Oliver Wolff <[email protected]>
-Date: Wed, 22 Aug 2018 12:58:13 +0200
-Subject: [PATCH 02/17] ANGLE: Add support for querying platform device
-
-The EGL_EXT_device_base extension allows for querying the platform
-device of the graphics hardware via eglQueryDisplayAttribEXT().
-As that extension is not supported by ANGLE, this patch adds similar
-functionality to the existing eglQuerySurfacePointerANGLE API. When
-EGL_DEVICE_EXT is passed as the queried attribute, the underlying
-D3D/DXGI device pointer is passed back to the caller via the value
-argument.
-
-The D3D device is needed for the IDXGIDevice3::Trim() calls required by the Windows Store.
-
-Change-Id: Ib3dfd3edc47dbcc02b07f71980ba785508f2ee57
----
- src/libANGLE/renderer/d3d/SurfaceD3D.cpp | 4 ++++
- src/libANGLE/renderer/d3d/SwapChainD3D.h | 1 +
- src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp | 5 +++++
- src/libANGLE/renderer/d3d/d3d11/SwapChain11.h | 2 ++
- 4 files changed, 12 insertions(+)
-
-diff --git a/src/libANGLE/renderer/d3d/SurfaceD3D.cpp b/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
-index 6e0e2b37e..6fc42139a 100644
---- a/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
-+++ b/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
-@@ -429,6 +429,10 @@ egl::Error SurfaceD3D::querySurfacePointerANGLE(EGLint attribute, void **value)
- {
- *value = mSwapChain->getKeyedMutex();
- }
-+ else if (attribute == EGL_DEVICE_EXT)
-+ {
-+ *value = mSwapChain->getDevice();
-+ }
- else
- UNREACHABLE();
-
-diff --git a/src/libANGLE/renderer/d3d/SwapChainD3D.h b/src/libANGLE/renderer/d3d/SwapChainD3D.h
-index fcbab95c8..8e4750a6d 100644
---- a/src/libANGLE/renderer/d3d/SwapChainD3D.h
-+++ b/src/libANGLE/renderer/d3d/SwapChainD3D.h
-@@ -59,6 +59,7 @@ class SwapChainD3D : angle::NonCopyable
- EGLint width,
- EGLint height) = 0;
- virtual void recreate() = 0;
-+ virtual void *getDevice() { return nullptr; }
-
- virtual RenderTargetD3D *getColorRenderTarget() = 0;
- virtual RenderTargetD3D *getDepthStencilRenderTarget() = 0;
-diff --git a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-index 39a1f8b1f..a82b77b33 100644
---- a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-@@ -1049,6 +1049,11 @@ void SwapChain11::recreate()
- // possibly should use this method instead of reset
- }
-
-+void *rx::SwapChain11::getDevice()
-+{
-+ return mRenderer->getDevice();
-+}
-+
- RenderTargetD3D *SwapChain11::getColorRenderTarget()
- {
- return &mColorRenderTarget;
-diff --git a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
-index ada35b99b..9dd98462c 100644
---- a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
-+++ b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
-@@ -59,6 +59,8 @@ class SwapChain11 final : public SwapChainD3D
- void *getKeyedMutex() override;
- EGLint getSamples() const { return mEGLSamples; }
-
-+ void *getDevice() override;
-+
- egl::Error getSyncValues(EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc) override;
-
- private:
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0003-ANGLE-Fix-Windows-Store-D3D-Trim-and-Level-9-require.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0003-ANGLE-Fix-Windows-Store-D3D-Trim-and-Level-9-require.patch
deleted file mode 100644
index 622721be9e..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0003-ANGLE-Fix-Windows-Store-D3D-Trim-and-Level-9-require.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From b98d9a624776e7ba0d0480a42e5cc5653953c532 Mon Sep 17 00:00:00 2001
-From: Oliver Wolff <[email protected]>
-Date: Wed, 22 Aug 2018 13:01:10 +0200
-Subject: [PATCH 03/17] ANGLE: Fix Windows Store D3D Trim and Level 9
- requirements
-
-Due to additional validation not covered in previous patches, the Windows
-Store certification compatibility had regressed. These changes ensure that
-the required D3D behaviors are met.
-
-Change-Id: If8bc2f8cd4b2f84e1d92a1627951da2537212125
----
- src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-index e71891ed3..a29a807fd 100644
---- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-@@ -489,7 +489,20 @@ Renderer11::Renderer11(egl::Display *display)
-
- if (requestedMajorVersion == 9 && requestedMinorVersion == 3)
- {
-- mAvailableFeatureLevels.push_back(D3D_FEATURE_LEVEL_9_3);
-+ if (requestedMinorVersion == EGL_DONT_CARE || requestedMinorVersion >= 3)
-+ {
-+ mAvailableFeatureLevels.push_back(D3D_FEATURE_LEVEL_9_3);
-+ }
-+#if defined(ANGLE_ENABLE_WINDOWS_UWP)
-+ if (requestedMinorVersion == EGL_DONT_CARE || requestedMinorVersion >= 2)
-+ {
-+ mAvailableFeatureLevels.push_back(D3D_FEATURE_LEVEL_9_2);
-+ }
-+ if (requestedMinorVersion == EGL_DONT_CARE || requestedMinorVersion >= 1)
-+ {
-+ mAvailableFeatureLevels.push_back(D3D_FEATURE_LEVEL_9_1);
-+ }
-+#endif
- }
-
- EGLint requestedDeviceType = static_cast<EGLint>(attributes.get(
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0004-ANGLE-fix-usage-of-shared-handles-for-WinRT-applicat.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0004-ANGLE-fix-usage-of-shared-handles-for-WinRT-applicat.patch
deleted file mode 100644
index 48996b4223..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0004-ANGLE-fix-usage-of-shared-handles-for-WinRT-applicat.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From a9cd3c30f0fe36756cf112878ba72a7ef3b7a84c Mon Sep 17 00:00:00 2001
-From: Oliver Wolff <[email protected]>
-Date: Wed, 22 Aug 2018 13:08:19 +0200
-Subject: [PATCH 04/17] ANGLE: fix usage of shared handles for WinRT
- applications
-
-The check is not relevant in Qt's context and was skipped before but
-it sneaked back in with the latest ANGLE update.
-
-Change-Id: Ic44de5468a3254afd76ef4804d97d245676daeb1
----
- src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-index a29a807fd..74110f04c 100644
---- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-@@ -2398,6 +2398,8 @@ bool Renderer11::getShareHandleSupport() const
- return false;
- }
-
-+ // Qt: we don't care about the 9_3 limitation
-+#if 0
- // Also disable share handles on Feature Level 9_3, since it doesn't support share handles on
- // RGBA8 textures/swapchains.
- if (mRenderer11DeviceCaps.featureLevel <= D3D_FEATURE_LEVEL_9_3)
-@@ -2405,6 +2407,7 @@ bool Renderer11::getShareHandleSupport() const
- mSupportsShareHandles = false;
- return false;
- }
-+#endif
-
- // Find out which type of D3D11 device the Renderer11 is using
- d3d11::ANGLED3D11DeviceType deviceType = getDeviceType();
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0005-ANGLE-Fix-initialization-of-zero-sized-window.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0005-ANGLE-Fix-initialization-of-zero-sized-window.patch
deleted file mode 100644
index 55ecacec14..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0005-ANGLE-Fix-initialization-of-zero-sized-window.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 046441f9645f6c0d68a7f62522c84298bd9ff7dc Mon Sep 17 00:00:00 2001
-From: Oliver Wolff <[email protected]>
-Date: Wed, 22 Aug 2018 13:12:07 +0200
-Subject: [PATCH 05/17] ANGLE: Fix initialization of zero-sized window
-
-The clientRect might be empty when creating a window of zero size. The
-side effect of a division by zero is that matrix transformation fails
-and hence the swapchain gets into an invalid state.
-
-Change-Id: Idbaed72deadb7b87052ac27e194a40d1810e6f7a
----
- .../renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
-index a90f0bc7a..09194992b 100644
---- a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp
-@@ -325,8 +325,8 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device,
-
- HRESULT SwapChainPanelNativeWindow::scaleSwapChain(const Size &windowSize, const RECT &clientRect)
- {
-- Size renderScale = {windowSize.Width / (float)clientRect.right,
-- windowSize.Height / (float)clientRect.bottom};
-+ Size renderScale = {windowSize.Width / std::max(LONG(1), clientRect.right),
-+ windowSize.Height / std::max(LONG(1), clientRect.bottom)};
- // Setup a scale matrix for the swap chain
- DXGI_MATRIX_3X2_F scaleMatrix = {};
- scaleMatrix._11 = renderScale.Width;
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0006-ANGLE-winrt-Do-full-screen-update-if-the-the-window-.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0006-ANGLE-winrt-Do-full-screen-update-if-the-the-window-.patch
deleted file mode 100644
index 5c4a03e5d8..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0006-ANGLE-winrt-Do-full-screen-update-if-the-the-window-.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 1b7c692e24f8e0f224a75db8e8f1556d8d367054 Mon Sep 17 00:00:00 2001
-From: Oliver Wolff <[email protected]>
-Date: Wed, 22 Aug 2018 15:17:52 +0200
-Subject: [PATCH 06/17] ANGLE: winrt: Do full screen update if the the window
- size is reduced
-
-We cannot do partial updates if the window size is reduced as this will
-result in a "pDstBox is not a valid box for the destination subresource."
-error.
-
-Change-Id: I9a8d91bca961f52e1aab1bec5321922cfc842fb3
----
- src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp b/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
-index fa1adda79..e49968c2a 100644
---- a/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/TextureStorage11.cpp
-@@ -764,9 +764,14 @@ angle::Result TextureStorage11::setData(const gl::Context *context,
-
- Context11 *context11 = GetImplAs<Context11>(context);
-
-- const int width = destBox ? destBox->width : static_cast<int>(image->getWidth());
-- const int height = destBox ? destBox->height : static_cast<int>(image->getHeight());
-- const int depth = destBox ? destBox->depth : static_cast<int>(image->getDepth());
-+ const int imageWidth = static_cast<int>(image->getWidth());
-+ const int width = destBox ? destBox->width : imageWidth;
-+ const int imageHeight = static_cast<int>(image->getHeight());
-+ const int height = destBox ? destBox->height : imageHeight;
-+ const int imageDepth = static_cast<int>(image->getDepth());
-+ const int depth = destBox ? destBox->depth : imageDepth;
-+ if (imageWidth < width || imageHeight < height || imageDepth < depth)
-+ fullUpdate = true;
- GLuint srcRowPitch = 0;
- ANGLE_CHECK_GL_MATH(context11,
- internalFormatInfo.computeRowPitch(type, width, unpack.alignment,
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0007-Revert-Fix-scanForWantedComponents-not-ignoring-attr.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0007-Revert-Fix-scanForWantedComponents-not-ignoring-attr.patch
deleted file mode 100644
index 4e5a467178..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0007-Revert-Fix-scanForWantedComponents-not-ignoring-attr.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 7e512e1e8cf3c0c6b8d4f75d31988e02185e0c64 Mon Sep 17 00:00:00 2001
-From: Andre de la Rocha <[email protected]>
-Date: Tue, 11 Sep 2018 12:52:28 +0200
-Subject: [PATCH 07/17] Revert "Fix scanForWantedComponents not ignoring
- attribute values of 0."
-
-This patch reverts commit 2648d9297f25a0d1fa2837f020975a45d4e8a8b9 as a
-workaround for the "banding" artifacts we were seeing in Qt. Angle
-returns a list of supported graphic formats or configurations, sorting
-it in a way that the first one should be the one that fits better the
-requested format. In Qt we use the first thing we receive in the list.
-In the current Angle version, however, a fix has changed the way in
-which the list is sorted. In the old version the first element would be
-a 32-bit graphic format, while now it's a 16-bit one, resulting in the
-"banding" artifacts. The workaround reverts back to the previous sorting
-behavior.
----
- src/libANGLE/Config.cpp | 29 +++++++++++++++++------------
- 1 file changed, 17 insertions(+), 12 deletions(-)
-
-diff --git a/src/libANGLE/Config.cpp b/src/libANGLE/Config.cpp
-index 127480db1..3daef6b57 100644
---- a/src/libANGLE/Config.cpp
-+++ b/src/libANGLE/Config.cpp
-@@ -183,22 +183,27 @@ class ConfigSorter
- }
-
- private:
-- static bool wantsComponent(const AttributeMap &attributeMap, EGLAttrib component)
-+ void scanForWantedComponents(const AttributeMap &attributeMap)
- {
- // [EGL 1.5] section 3.4.1.2 page 30
- // Sorting rule #3: by larger total number of color bits, not considering
- // components that are 0 or don't-care.
-- EGLAttrib value = attributeMap.get(component, 0);
-- return value != 0 && value != EGL_DONT_CARE;
-- }
--
-- void scanForWantedComponents(const AttributeMap &attributeMap)
-- {
-- mWantRed = wantsComponent(attributeMap, EGL_RED_SIZE);
-- mWantGreen = wantsComponent(attributeMap, EGL_GREEN_SIZE);
-- mWantBlue = wantsComponent(attributeMap, EGL_BLUE_SIZE);
-- mWantAlpha = wantsComponent(attributeMap, EGL_ALPHA_SIZE);
-- mWantLuminance = wantsComponent(attributeMap, EGL_LUMINANCE_SIZE);
-+ for (auto attribIter = attributeMap.begin(); attribIter != attributeMap.end(); attribIter++)
-+ {
-+ EGLAttrib attributeKey = attribIter->first;
-+ EGLAttrib attributeValue = attribIter->second;
-+ if (attributeKey != 0 && attributeValue != EGL_DONT_CARE)
-+ {
-+ switch (attributeKey)
-+ {
-+ case EGL_RED_SIZE: mWantRed = true; break;
-+ case EGL_GREEN_SIZE: mWantGreen = true; break;
-+ case EGL_BLUE_SIZE: mWantBlue = true; break;
-+ case EGL_ALPHA_SIZE: mWantAlpha = true; break;
-+ case EGL_LUMINANCE_SIZE: mWantLuminance = true; break;
-+ }
-+ }
-+ }
- }
-
- EGLint wantedComponentsSize(const Config &config) const
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0008-ANGLE-Disable-multisampling-to-avoid-crash-in-Qt-app.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0008-ANGLE-Disable-multisampling-to-avoid-crash-in-Qt-app.patch
deleted file mode 100644
index 8370bfb925..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0008-ANGLE-Disable-multisampling-to-avoid-crash-in-Qt-app.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From e09677662ee7e75a2ce0dd6f0716d9a03fd225e2 Mon Sep 17 00:00:00 2001
-From: Andre de la Rocha <[email protected]>
-Date: Tue, 11 Sep 2018 12:57:23 +0200
-Subject: [PATCH 08/17] ANGLE: Disable multisampling to avoid crash in Qt
- applications
-
-This patch adds a workaround for the crash that occurs with multisampling
-enabled in some Qt applications (e.g., the 2dpainting example). The old
-Angle release we were using lacked support for multisampling, so it was
-ignored when requested. This current version seems to support it, but is
-causing a crash in the D3D11 shaders, so this workaround disables that
-support.
----
- src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-index 74110f04c..e89719966 100644
---- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-@@ -1121,6 +1121,8 @@ gl::SupportedSampleSet Renderer11::generateSampleSetForEGLConfig(
- {
- gl::SupportedSampleSet sampleCounts;
-
-+#if 0 // Qt: Disabling support for multisampling as it is causing a crash in the D3D11 shaders.
-+
- // Generate a new set from the set intersection of sample counts between the color and depth
- // format caps.
- std::set_intersection(colorBufferFormatCaps.sampleCounts.begin(),
-@@ -1141,6 +1143,8 @@ gl::SupportedSampleSet Renderer11::generateSampleSetForEGLConfig(
- sampleCounts = depthStencilBufferFormatCaps.sampleCounts;
- }
-
-+#endif
-+
- // Always support 0 samples
- sampleCounts.insert(0);
-
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0009-ANGLE-Dynamically-load-D3D-compiler-from-a-list.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0009-ANGLE-Dynamically-load-D3D-compiler-from-a-list.patch
deleted file mode 100644
index fbcb044748..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0009-ANGLE-Dynamically-load-D3D-compiler-from-a-list.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 97ecbd358af7a06713b03ba418359dbeeddb9d6a Mon Sep 17 00:00:00 2001
-From: Oliver Wolff <[email protected]>
-Date: Mon, 10 Dec 2018 08:33:14 +0100
-Subject: [PATCH 09/17] ANGLE: Dynamically load D3D compiler from a list
-
-If the default compiler cannot be found, load it from a list of DLL names,
-including a non-versioned proxy DLL provided by Qt. On Desktop Windows,
-the default compiler can also be specified by an environment variable,
-QT_D3DCOMPILER_DLL.
----
- src/libANGLE/renderer/d3d/HLSLCompiler.cpp | 25 ++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/src/libANGLE/renderer/d3d/HLSLCompiler.cpp b/src/libANGLE/renderer/d3d/HLSLCompiler.cpp
-index 38e52eae0..8e8c9fc56 100644
---- a/src/libANGLE/renderer/d3d/HLSLCompiler.cpp
-+++ b/src/libANGLE/renderer/d3d/HLSLCompiler.cpp
-@@ -16,6 +16,10 @@
- #include "libANGLE/renderer/d3d/ContextD3D.h"
- #include "libANGLE/trace.h"
-
-+#ifndef QT_D3DCOMPILER_DLL
-+#define QT_D3DCOMPILER_DLL D3DCOMPILER_DLL_W
-+#endif
-+
- namespace
- {
- #if ANGLE_APPEND_ASSEMBLY_TO_SHADER_DEBUG_INFO == ANGLE_ENABLED
-@@ -136,6 +140,27 @@ angle::Result HLSLCompiler::ensureInitialized(d3d::Context *context)
- }
- # endif // ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES
-
-+ // Load the compiler DLL specified by the environment, or default to QT_D3DCOMPILER_DLL
-+ const wchar_t *defaultCompiler = _wgetenv(L"QT_D3DCOMPILER_DLL");
-+ if (!defaultCompiler)
-+ defaultCompiler = QT_D3DCOMPILER_DLL;
-+
-+ const wchar_t *compilerDlls[] = {
-+ defaultCompiler,
-+ L"d3dcompiler_47.dll",
-+ L"d3dcompiler_46.dll",
-+ L"d3dcompiler_43.dll",
-+ 0
-+ };
-+
-+ // Load the first available known compiler DLL
-+ for (int i = 0; compilerDlls[i]; ++i)
-+ {
-+ mD3DCompilerModule = LoadLibraryW(compilerDlls[i]);
-+ if (mD3DCompilerModule)
-+ break;
-+ }
-+
- if (!mD3DCompilerModule)
- {
- // Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0010-ANGLE-clean-up-displays-on-dll-unload.patch b/3rdparty/ext_googleangle/01-patches_qt5.12.12/0010-ANGLE-clean-up-displays-on-dll-unload.patch
deleted file mode 100644
index 7cc55f7df1..0000000000
--- a/3rdparty/ext_googleangle/01-patches_qt5.12.12/0010-ANGLE-clean-up-displays-on-dll-unload.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 4ed2b4de1f58dc22773b1a75487f47cb92f80c34 Mon Sep 17 00:00:00 2001
-From: Oliver Wolff <[email protected]>
-Date: Tue, 16 Apr 2019 10:19:27 +0200
-Subject: [PATCH 10/17] ANGLE: clean up displays on dll unload
-
-If the displays are not cleaned up on dll unloading, profilers might
-report memory leaks.
-
-Change-Id: I04cbc3c2448bfb450f7d840e216827f86856e963
----
- src/libANGLE/Display.cpp | 17 +++++++++++++++++
- src/libANGLE/Display.h | 1 +
- src/libGLESv2/global_state.cpp | 2 ++
- 3 files changed, 20 insertions(+)
-
-diff --git a/src/libANGLE/Display.cpp b/src/libANGLE/Display.cpp
-index bd2bd59d7..8772b2fe1 100644
---- a/src/libANGLE/Display.cpp
-+++ b/src/libANGLE/Display.cpp
-@@ -827,6 +827,23 @@ Display::EglDisplaySet Display::GetEglDisplaySet()
- return displays;
- }
-
-+//static
-+void Display::CleanupDisplays()
-+{
-+ // ~Display takes care of removing the entry from the according map
-+ {
-+ ANGLEPlatformDisplayMap *displays = GetANGLEPlatformDisplayMap();
-+ while (!displays->empty())
-+ delete displays->begin()->second;
-+ }
-+
-+ {
-+ DevicePlatformDisplayMap *displays = GetDevicePlatformDisplayMap();
-+ while (!displays->empty())
-+ delete displays->begin()->second;
-+ }
-+}
-+
- Display::Display(EGLenum platform, EGLNativeDisplayType displayId, Device *eglDevice)
- : mState(displayId),
- mImplementation(nullptr),
-diff --git a/src/libANGLE/Display.h b/src/libANGLE/Display.h
-index 7e7abb695..d5235046b 100644
---- a/src/libANGLE/Display.h
-+++ b/src/libANGLE/Display.h
-@@ -156,6 +156,7 @@ class Display final : public LabeledObject,
-
- using EglDisplaySet = std::set<Display *>;
- static EglDisplaySet GetEglDisplaySet();
-+ static void CleanupDisplays();
-
- static const ClientExtensions &GetClientExtensions();
- static const std::string &GetClientExtensionString();
-diff --git a/src/libGLESv2/global_state.cpp b/src/libGLESv2/global_state.cpp
-index 276c694c2..f29b0b6c8 100644
---- a/src/libGLESv2/global_state.cpp
-+++ b/src/libGLESv2/global_state.cpp
-@@ -13,6 +13,7 @@
- #include "common/system_utils.h"
- #include "libANGLE/ErrorStrings.h"
- #include "libANGLE/Thread.h"
-+#include "libANGLE/Display.h"
- #include "libGLESv2/resource.h"
-
- #include <atomic>
-@@ -353,6 +354,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID)
- break;
-
- case DLL_PROCESS_DETACH:
-+ egl::Display::CleanupDisplays();
- egl::TerminateProcess();
- break;
- }
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/02-patches_krita/0011-Fix-MinGW-build.patch b/3rdparty/ext_googleangle/02-patches_krita/0011-Fix-MinGW-build.patch
deleted file mode 100644
index f9330f5b51..0000000000
--- a/3rdparty/ext_googleangle/02-patches_krita/0011-Fix-MinGW-build.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From a0d2c402d6d122132b10e65e667af0f93feec7d2 Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Thu, 10 Mar 2022 16:25:34 +0800
-Subject: [PATCH 11/17] Fix MinGW build
-
----
- src/common/mathutil.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/common/mathutil.h b/src/common/mathutil.h
-index 85243bc4a..1ac3b6b49 100644
---- a/src/common/mathutil.h
-+++ b/src/common/mathutil.h
-@@ -1106,7 +1106,7 @@ inline int BitCount(uint64_t bits)
- # endif // defined(_M_IX86) || defined(_M_X64)
- #endif // defined(_MSC_VER) && !defined(__clang__)
-
--#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__)
-+#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__GNUC__)
- inline int BitCount(uint32_t bits)
- {
- return __builtin_popcount(bits);
-@@ -1116,7 +1116,7 @@ inline int BitCount(uint64_t bits)
- {
- return __builtin_popcountll(bits);
- }
--#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__)
-+#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__GNUC__)
-
- inline int BitCount(uint8_t bits)
- {
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/02-patches_krita/0012-Fix-Clang-MinGW-target-build.patch b/3rdparty/ext_googleangle/02-patches_krita/0012-Fix-Clang-MinGW-target-build.patch
deleted file mode 100644
index 25be649dc9..0000000000
--- a/3rdparty/ext_googleangle/02-patches_krita/0012-Fix-Clang-MinGW-target-build.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From aeddd16fcd39e78d8208c78c17f06d24632b7560 Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Thu, 10 Mar 2022 16:26:23 +0800
-Subject: [PATCH 12/17] Fix Clang MinGW target build
-
----
- src/libANGLE/CLRefPointer.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/libANGLE/CLRefPointer.h b/src/libANGLE/CLRefPointer.h
-index 6ea46978f..9ec024ac4 100644
---- a/src/libANGLE/CLRefPointer.h
-+++ b/src/libANGLE/CLRefPointer.h
-@@ -104,25 +104,25 @@ void swap(RefPointer<T> &left, RefPointer<T> &right)
- }
-
- template <typename T>
--bool operator==(const RefPointer<T> &ptr, nullptr_t) noexcept
-+bool operator==(const RefPointer<T> &ptr, std::nullptr_t) noexcept
- {
- return ptr.get() == nullptr;
- }
-
- template <typename T>
--bool operator==(nullptr_t, const RefPointer<T> &ptr) noexcept
-+bool operator==(std::nullptr_t, const RefPointer<T> &ptr) noexcept
- {
- return ptr.get() == nullptr;
- }
-
- template <typename T>
--bool operator!=(const RefPointer<T> &ptr, nullptr_t) noexcept
-+bool operator!=(const RefPointer<T> &ptr, std::nullptr_t) noexcept
- {
- return ptr.get() != nullptr;
- }
-
- template <typename T>
--bool operator!=(nullptr_t, const RefPointer<T> &ptr) noexcept
-+bool operator!=(std::nullptr_t, const RefPointer<T> &ptr) noexcept
- {
- return ptr.get() != nullptr;
- }
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/02-patches_krita/0013-Add-CMake-build-file.patch b/3rdparty/ext_googleangle/02-patches_krita/0013-Add-CMake-build-file.patch
deleted file mode 100644
index 1100cd4152..0000000000
--- a/3rdparty/ext_googleangle/02-patches_krita/0013-Add-CMake-build-file.patch
+++ /dev/null
@@ -1,771 +0,0 @@
-From 8da04fbbdfc84236c1701e21a1f031e1d6b06a5c Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Thu, 10 Mar 2022 17:19:40 +0800
-Subject: [PATCH 13/17] Add CMake build file
-
-The CMakeLists.txt is taken from vcpkg [1] and modified to work with
-this version of ANGLE.
-
-[1]: https://github.com/microsoft/vcpkg/blob/5a8a1dfff8e2dffd4c8cc2d1fc0da379ffd18b25/ports/angle/CMakeLists.txt
----
- CMakeLists.txt | 748 +++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 748 insertions(+)
- create mode 100644 CMakeLists.txt
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 000000000..08fcc235c
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,748 @@
-+#
-+# SPDX-FileCopyrightText: Copyright (c) Microsoft Corporation
-+# SPDX-License-Identifier: MIT
-+#
-+# Taken from https://github.com/microsoft/vcpkg/blob/5a8a1dfff8e2dffd4c8cc2d1fc0da379ffd18b25/ports/angle/CMakeLists.txt
-+# and modified.
-+
-+cmake_minimum_required(VERSION 3.8)
-+project(angle CXX C)
-+
-+if(WIN32 AND NOT WINDOWS_STORE)
-+ set(WINDOWS_DESKTOP 1)
-+else()
-+ set(WINDOWS_DESKTOP 0)
-+endif()
-+
-+if(UNIX AND NOT APPLE)
-+ set(LINUX 1)
-+else()
-+ set(LINUX 0)
-+endif()
-+
-+if(MSVC)
-+ add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive /bigobj)
-+endif()
-+set(CMAKE_CXX_STANDARD 17)
-+set(CMAKE_CXX_STANDARD_REQUIRED ON)
-+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-+
-+
-+if (APPLE)
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework IOSurface -framework QuartzCore -framework CoreGraphics")
-+endif()
-+set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
-+set(CMAKE_STATIC_LIBRARY_PREFIX "")
-+
-+if (WINDOWS_STORE)
-+ set(WINRT_DEFINES -DANGLE_ENABLE_WINDOWS_UWP -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP)
-+else()
-+ set(WINRT_DEFINES)
-+endif()
-+add_definitions(
-+ -D_CRT_SECURE_NO_DEPRECATE
-+ -D_SCL_SECURE_NO_WARNINGS
-+ -DGL_SILENCE_DEPRECATION
-+ -D_HAS_EXCEPTIONS=0
-+ -DNOMINMAX
-+ -DANGLE_STANDALONE_BUILD
-+ ${WINRT_DEFINES}
-+)
-+add_compile_options("$<$<CONFIG:DEBUG>:-DANGLE_ENABLE_DEBUG_ANNOTATIONS>")
-+if(WIN32)
-+ add_definitions(-DANGLE_IS_WIN)
-+endif()
-+if(LINUX)
-+ add_definitions(-DANGLE_IS_LINUX)
-+endif()
-+if(ANGLE_IS_64_BIT_CPU)
-+ add_definitions(-DANGLE_IS_64_BIT_CPU)
-+elseif(ANGLE_IS_32_BIT_CPU)
-+ add_definitions(-DANGLE_IS_32_BIT_CPU)
-+endif()
-+
-+configure_file(angle_commit.h include/id/commit.h COPYONLY)
-+#include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include)
-+include_directories("$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")
-+##########
-+# angle::common
-+if(WINDOWS_DESKTOP)
-+ set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_apple|_mac|_ios|_posix|_winuwp")
-+elseif(WINDOWS_STORE)
-+ set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_apple|_mac|_ios|_posix|_win32")
-+elseif(LINUX)
-+ set(ANGLE_COMMON_PLATFORM_FILTER "_win|_apple|_mac|_ios")
-+elseif(APPLE)
-+ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") # macOS
-+ set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win|_ios")
-+ else() # other Apple platforms (iOS, etc)
-+ set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win|_mac")
-+ endif()
-+endif()
-+file(GLOB ANGLE_COMMON_SOURCES
-+ "src/common/*.h"
-+ "src/common/*.inc"
-+ "src/common/*.cpp"
-+ "src/common/third_party/base/anglebase/*.h"
-+ "src/common/third_party/base/anglebase/*.cc"
-+ "src/common/third_party/base/anglebase/containers/*.h"
-+ "src/common/third_party/base/anglebase/numerics/*.h"
-+ "src/common/third_party/base/anglebase/numerics/*.cc"
-+ "src/common/third_party/xxhash/*.h"
-+ "src/common/third_party/xxhash/*.c"
-+ "src/common/third_party/smhasher/src/*.h"
-+ "src/common/third_party/smhasher/src/*.cpp")
-+list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}")
-+add_library(angle_common OBJECT ${ANGLE_COMMON_SOURCES})
-+target_include_directories(angle_common PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/common/third_party/base>")
-+add_library(angle::common ALIAS angle_common)
-+
-+##########
-+# angle::compression
-+file(GLOB ANGLE_COMPRESSION_UTILS_SOURCES "third_party/zlib/google/compression_utils_portable.*")
-+find_package(ZLIB REQUIRED)
-+add_library(angle_compression_utils OBJECT ${ANGLE_COMPRESSION_UTILS_SOURCES})
-+target_link_libraries(angle_compression_utils PUBLIC ZLIB::ZLIB)
-+target_compile_definitions(angle_compression_utils PRIVATE
-+ -DUSE_SYSTEM_ZLIB
-+)
-+target_include_directories(angle_compression_utils INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib/google>")
-+add_library(angle::compression ALIAS angle_compression_utils)
-+
-+##########
-+# angle::image_util
-+file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inc" "src/image_util/*.cpp")
-+add_library(angle_image_util OBJECT ${ANGLE_IMAGE_UTIL_SOURCES})
-+target_link_libraries(angle_image_util PRIVATE angle::common)
-+add_library(angle::image_util ALIAS angle_image_util)
-+
-+##########
-+# angle::translator
-+file(GLOB TRANSLATOR_SOURCES
-+ "src/compiler/translator/BaseTypes.cpp"
-+ "src/compiler/translator/BaseTypes.h"
-+ "src/compiler/translator/BuiltInFunctionEmulator.cpp"
-+ "src/compiler/translator/BuiltInFunctionEmulator.h"
-+ "src/compiler/translator/CallDAG.cpp"
-+ "src/compiler/translator/CallDAG.h"
-+ "src/compiler/translator/CodeGen.cpp"
-+ "src/compiler/translator/CollectVariables.cpp"
-+ "src/compiler/translator/CollectVariables.h"
-+ "src/compiler/translator/Common.h"
-+ "src/compiler/translator/Compiler.cpp"
-+ "src/compiler/translator/Compiler.h"
-+ "src/compiler/translator/ConstantUnion.cpp"
-+ "src/compiler/translator/ConstantUnion.h"
-+ "src/compiler/translator/Declarator.cpp"
-+ "src/compiler/translator/Declarator.h"
-+ "src/compiler/translator/Diagnostics.cpp"
-+ "src/compiler/translator/Diagnostics.h"
-+ "src/compiler/translator/DirectiveHandler.cpp"
-+ "src/compiler/translator/DirectiveHandler.h"
-+ "src/compiler/translator/ExtensionBehavior.cpp"
-+ "src/compiler/translator/ExtensionBehavior.h"
-+ "src/compiler/translator/FlagStd140Structs.cpp"
-+ "src/compiler/translator/FlagStd140Structs.h"
-+ "src/compiler/translator/FunctionLookup.cpp"
-+ "src/compiler/translator/FunctionLookup.h"
-+ "src/compiler/translator/HashNames.cpp"
-+ "src/compiler/translator/HashNames.h"
-+ "src/compiler/translator/ImmutableString.h"
-+ "src/compiler/translator/ImmutableStringBuilder.cpp"
-+ "src/compiler/translator/ImmutableStringBuilder.h"
-+ "src/compiler/translator/InfoSink.cpp"
-+ "src/compiler/translator/InfoSink.h"
-+ "src/compiler/translator/Initialize.cpp"
-+ "src/compiler/translator/Initialize.h"
-+ "src/compiler/translator/InitializeDll.cpp"
-+ "src/compiler/translator/InitializeDll.h"
-+ "src/compiler/translator/InitializeGlobals.h"
-+ "src/compiler/translator/IntermNode.cpp"
-+ "src/compiler/translator/IntermNode.h"
-+ "src/compiler/translator/IsASTDepthBelowLimit.cpp"
-+ "src/compiler/translator/IsASTDepthBelowLimit.h"
-+ "src/compiler/translator/Operator.cpp"
-+ "src/compiler/translator/Operator.h"
-+ "src/compiler/translator/OutputTree.cpp"
-+ "src/compiler/translator/OutputTree.h"
-+ "src/compiler/translator/ParseContext.cpp"
-+ "src/compiler/translator/ParseContext.h"
-+ "src/compiler/translator/ParseContext_ESSL_autogen.h"
-+ "src/compiler/translator/ParseContext_complete_autogen.h"
-+ "src/compiler/translator/ParseContext_interm.h"
-+ "src/compiler/translator/PoolAlloc.cpp"
-+ "src/compiler/translator/PoolAlloc.h"
-+ "src/compiler/translator/Pragma.h"
-+ "src/compiler/translator/QualifierTypes.cpp"
-+ "src/compiler/translator/QualifierTypes.h"
-+ "src/compiler/translator/Severity.h"
-+ "src/compiler/translator/ShaderLang.cpp"
-+ "src/compiler/translator/ShaderVars.cpp"
-+ "src/compiler/translator/StaticType.h"
-+ "src/compiler/translator/Symbol.cpp"
-+ "src/compiler/translator/Symbol.h"
-+ "src/compiler/translator/SymbolTable.cpp"
-+ "src/compiler/translator/SymbolTable.h"
-+ "src/compiler/translator/SymbolTable_autogen.h"
-+ "src/compiler/translator/SymbolUniqueId.cpp"
-+ "src/compiler/translator/SymbolUniqueId.h"
-+ "src/compiler/translator/TranslatorESSL.h"
-+ "src/compiler/translator/TranslatorGLSL.h"
-+ "src/compiler/translator/TranslatorHLSL.h"
-+ "src/compiler/translator/TranslatorMetal.h"
-+ "src/compiler/translator/TranslatorVulkan.h"
-+ "src/compiler/translator/Types.cpp"
-+ "src/compiler/translator/Types.h"
-+ "src/compiler/translator/ValidateAST.cpp"
-+ "src/compiler/translator/ValidateAST.h"
-+ "src/compiler/translator/ValidateBarrierFunctionCall.cpp"
-+ "src/compiler/translator/ValidateBarrierFunctionCall.h"
-+ "src/compiler/translator/ValidateClipCullDistance.cpp"
-+ "src/compiler/translator/ValidateClipCullDistance.h"
-+ "src/compiler/translator/ValidateGlobalInitializer.cpp"
-+ "src/compiler/translator/ValidateGlobalInitializer.h"
-+ "src/compiler/translator/ValidateLimitations.cpp"
-+ "src/compiler/translator/ValidateLimitations.h"
-+ "src/compiler/translator/ValidateMaxParameters.cpp"
-+ "src/compiler/translator/ValidateMaxParameters.h"
-+ "src/compiler/translator/ValidateOutputs.cpp"
-+ "src/compiler/translator/ValidateOutputs.h"
-+ "src/compiler/translator/ValidateSwitch.cpp"
-+ "src/compiler/translator/ValidateSwitch.h"
-+ "src/compiler/translator/ValidateTypeSizeLimitations.cpp"
-+ "src/compiler/translator/ValidateTypeSizeLimitations.h"
-+ "src/compiler/translator/ValidateVaryingLocations.cpp"
-+ "src/compiler/translator/ValidateVaryingLocations.h"
-+ "src/compiler/translator/VariablePacker.cpp"
-+ "src/compiler/translator/VariablePacker.h"
-+ "src/compiler/translator/blocklayout.cpp"
-+ "src/compiler/translator/glslang.h"
-+ "src/compiler/translator/glslang_lex_autogen.cpp"
-+ "src/compiler/translator/glslang_tab_autogen.cpp"
-+ "src/compiler/translator/glslang_tab_autogen.h"
-+ "src/compiler/translator/glslang_wrapper.h"
-+ "src/compiler/translator/length_limits.h"
-+ "src/compiler/translator/tree_ops/*.cpp"
-+ "src/compiler/translator/tree_ops/*.h"
-+ "src/compiler/translator/tree_ops/gl/ClampFragDepth.h"
-+ "src/compiler/translator/tree_ops/gl/RegenerateStructNames.h"
-+ "src/compiler/translator/tree_ops/gl/RewriteRepeatedAssignToSwizzled.h"
-+ "src/compiler/translator/tree_ops/gl/UseInterfaceBlockFields.h"
-+ "src/compiler/translator/tree_ops/gl/VectorizeVectorScalarArithmetic.h"
-+ "src/compiler/translator/tree_ops/gl/mac/AddAndTrueToLoopCondition.h"
-+ "src/compiler/translator/tree_ops/gl/mac/RewriteDoWhile.h"
-+ "src/compiler/translator/tree_ops/gl/mac/UnfoldShortCircuitAST.h"
-+ "src/compiler/translator/tree_ops/vulkan/EarlyFragmentTestsOptimization.h"
-+ "src/compiler/translator/tree_util/*.h"
-+ "src/compiler/translator/tree_util/*.cpp"
-+ "src/compiler/translator/util.cpp"
-+ "src/compiler/translator/util.h"
-+ "src/third_party/compiler/ArrayBoundsClamper.cpp"
-+ "src/third_party/compiler/ArrayBoundsClamper.h"
-+)
-+list(FILTER TRANSLATOR_SOURCES EXCLUDE REGEX "_unittest")
-+file(GLOB TRANSLATOR_GLSL_BASE_SOURCES
-+ "src/compiler/translator/OutputGLSLBase.cpp"
-+ "src/compiler/translator/OutputGLSLBase.h"
-+)
-+file(GLOB TRANSLATOR_GLSL_AND_VULKAN_BASE_SOURCES
-+ "src/compiler/translator/BuiltinsWorkaroundGLSL.cpp"
-+ "src/compiler/translator/BuiltinsWorkaroundGLSL.h"
-+ "src/compiler/translator/OutputGLSL.cpp"
-+ "src/compiler/translator/OutputGLSL.h"
-+)
-+file(GLOB TRANSLATOR_ESSL_SOURCES
-+ "src/compiler/translator/OutputESSL.cpp"
-+ "src/compiler/translator/OutputESSL.h"
-+ "src/compiler/translator/TranslatorESSL.cpp"
-+ "src/compiler/translator/tree_ops/gl/RecordConstantPrecision.cpp"
-+ "src/compiler/translator/tree_ops/gl/RecordConstantPrecision.h"
-+)
-+file(GLOB TRANSLATOR_GLSL_SOURCES
-+ "src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp"
-+ "src/compiler/translator/BuiltInFunctionEmulatorGLSL.h"
-+ "src/compiler/translator/ExtensionGLSL.cpp"
-+ "src/compiler/translator/ExtensionGLSL.h"
-+ "src/compiler/translator/TranslatorGLSL.cpp"
-+ "src/compiler/translator/VersionGLSL.cpp"
-+ "src/compiler/translator/VersionGLSL.h"
-+ "src/compiler/translator/tree_ops/gl/ClampFragDepth.cpp"
-+ "src/compiler/translator/tree_ops/gl/RegenerateStructNames.cpp"
-+ "src/compiler/translator/tree_ops/gl/RewriteRepeatedAssignToSwizzled.cpp"
-+ "src/compiler/translator/tree_ops/gl/UseInterfaceBlockFields.cpp"
-+ "src/compiler/translator/tree_ops/gl/VectorizeVectorScalarArithmetic.cpp"
-+ "src/compiler/translator/tree_ops/gl/mac/RewriteRowMajorMatrices.h"
-+ "src/compiler/translator/tree_ops/gl/mac/RewriteUnaryMinusOperatorFloat.h"
-+)
-+file(GLOB TRANSLATOR_GLSL_MAC_SOURCES
-+ "src/compiler/translator/tree_ops/gl/mac/AddAndTrueToLoopCondition.cpp"
-+ "src/compiler/translator/tree_ops/gl/mac/RewriteDoWhile.cpp"
-+ "src/compiler/translator/tree_ops/gl/mac/RewriteRowMajorMatrices.cpp"
-+ "src/compiler/translator/tree_ops/gl/mac/RewriteUnaryMinusOperatorFloat.cpp"
-+ "src/compiler/translator/tree_ops/gl/mac/UnfoldShortCircuitAST.cpp"
-+)
-+file(GLOB TRANSLATOR_HLSL_SOURCES
-+ "src/compiler/translator/*HLSL.h"
-+ "src/compiler/translator/*HLSL.cpp"
-+ "src/compiler/translator/emulated_builtin_functions_hlsl_autogen.cpp"
-+ "src/compiler/translator/tree_ops/d3d/*.cpp"
-+ "src/compiler/translator/tree_ops/d3d/*.h"
-+)
-+if(ANDROID)
-+ list(APPEND TRANSLATOR_SOURCES "src/compiler/translator/ImmutableString_ESSL_autogen.cpp" "src/compiler/translator/SymbolTable_ESSL_autogen.cpp")
-+else()
-+ list(APPEND TRANSLATOR_SOURCES "src/compiler/translator/ImmutableString_autogen.cpp" "src/compiler/translator/SymbolTable_autogen.cpp")
-+endif()
-+set(ANGLE_ENABLE_ESSL TRUE)
-+set(ANGLE_ENABLE_GLSL TRUE)
-+set(ANGLE_ENABLE_HLSL TRUE)
-+set(_needs_glsl_base FALSE)
-+set(_needs_glsl_and_vulkan_base FALSE)
-+add_library(angle_translator OBJECT ${TRANSLATOR_SOURCES})
-+if(ANGLE_ENABLE_ESSL)
-+ set(_needs_glsl_base TRUE)
-+ target_sources(angle_translator PRIVATE ${TRANSLATOR_ESSL_SOURCES})
-+ target_compile_definitions(angle_translator PUBLIC -DANGLE_ENABLE_ESSL)
-+endif()
-+if(ANGLE_ENABLE_GLSL)
-+ set(_needs_glsl_base TRUE)
-+ set(_needs_glsl_and_vulkan_base TRUE)
-+ target_sources(angle_translator PRIVATE ${TRANSLATOR_GLSL_SOURCES})
-+ if(APPLE)
-+ target_sources(angle_translator PRIVATE ${TRANSLATOR_GLSL_MAC_SOURCES})
-+ endif()
-+ target_compile_definitions(angle_translator PUBLIC -DANGLE_ENABLE_GLSL)
-+endif()
-+if(ANGLE_ENABLE_HLSL)
-+ target_sources(angle_translator PRIVATE ${TRANSLATOR_HLSL_SOURCES})
-+ target_compile_definitions(angle_translator PUBLIC -DANGLE_ENABLE_HLSL)
-+endif()
-+if(_needs_glsl_base)
-+ target_sources(angle_translator PRIVATE ${TRANSLATOR_GLSL_BASE_SOURCES})
-+endif()
-+if(_needs_glsl_and_vulkan_base)
-+ target_sources(angle_translator PRIVATE ${TRANSLATOR_GLSL_AND_VULKAN_BASE_SOURCES})
-+endif()
-+target_link_libraries(angle_translator PRIVATE angle::common)
-+add_library(angle::translator ALIAS angle_translator)
-+
-+##########
-+# angle::preprocessor
-+file(GLOB PREPROCESSOR_SOURCES
-+ "src/compiler/preprocessor/*.h"
-+ "src/compiler/preprocessor/*.cpp"
-+)
-+add_library(angle_preprocessor OBJECT ${PREPROCESSOR_SOURCES})
-+target_link_libraries(angle_preprocessor PRIVATE angle::common)
-+add_library(angle::preprocessor ALIAS angle_preprocessor)
-+
-+##########
-+# libANGLE
-+
-+## OpenGL Renderer
-+if(WINDOWS_DESKTOP OR LINUX OR APPLE)
-+ if(WINDOWS_DESKTOP)
-+ set(ANGLE_RENDERER_OPENGL_PLATFORM
-+ "src/libANGLE/renderer/gl/wgl/*.cpp"
-+ "src/libANGLE/renderer/gl/wgl/*.h"
-+ )
-+ elseif(APPLE)
-+ set(ANGLE_RENDERER_OPENGL_PLATFORM
-+ "src/libANGLE/renderer/gl/cgl/*.mm"
-+ "src/libANGLE/renderer/gl/cgl/*.cpp"
-+ "src/libANGLE/renderer/gl/cgl/*.h"
-+ "gpu_info_util/SystemInfo_macos.mm"
-+ )
-+ elseif(LINUX)
-+ set(ANGLE_RENDERER_OPENGL_PLATFORM
-+ "src/libANGLE/renderer/gl/glx/*.cpp"
-+ "src/libANGLE/renderer/gl/glx/*.h"
-+ "src/libANGLE/renderer/gl/egl/*.cpp"
-+ "src/libANGLE/renderer/gl/egl/*.h"
-+ )
-+ endif()
-+
-+ file(GLOB LIBANGLE_GL_SOURCES
-+ "src/libANGLE/renderer/gl/*.cpp"
-+ "src/libANGLE/renderer/gl/*.inc"
-+ "src/libANGLE/renderer/gl/*.h"
-+
-+ ${ANGLE_RENDERER_OPENGL_PLATFORM}
-+ )
-+ list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest")
-+ add_library(angle_renderer_opengl INTERFACE)
-+ target_sources(angle_renderer_opengl INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_GL_SOURCES}>")
-+ target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL -DANGLE_ENABLE_OPENGL_DESKTOP)
-+ add_library(angle::renderer::opengl ALIAS angle_renderer_opengl)
-+endif()
-+
-+# D3D Renderers
-+if(WIN32)
-+ ## All D3D Sources
-+ file(GLOB_RECURSE LIBANGLE_D3D_SOURCES
-+ "src/libANGLE/renderer/d3d/*.cpp"
-+ "src/libANGLE/renderer/d3d/*.inc"
-+ "src/libANGLE/renderer/d3d/*.h"
-+ )
-+ list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest")
-+ if(MINGW)
-+ list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "CompositorNativeWindow11")
-+ endif()
-+
-+ ## WinRT D3D Renderer
-+ if(WINDOWS_STORE)
-+ set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES})
-+ list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt")
-+ add_library(angle_renderer_winrt INTERFACE)
-+ target_sources(angle_renderer_winrt INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_D3D_WINRT_SOURCES}>")
-+ add_library(angle::renderer::winrt ALIAS angle_renderer_winrt)
-+ endif()
-+
-+ ## Win32/d3d9 D3D Renderer
-+ if(WINDOWS_DESKTOP)
-+ set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES})
-+ list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32")
-+ find_library(D3D9_LIB NAMES d3d9)
-+ add_library(angle_renderer_win32 INTERFACE)
-+ target_sources(angle_renderer_win32 INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_D3D_DESKTOP_SOURCES}>")
-+ target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9)
-+ target_link_libraries(angle_renderer_win32 INTERFACE d3d9)
-+ add_library(angle::renderer::win32 ALIAS angle_renderer_win32)
-+ endif()
-+
-+ ## D3D11 Base renderer
-+ list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32")
-+ find_library(DXGUID_LIB NAMES dxguid)
-+ find_library(D3D11_LIB NAMES d3d11)
-+ add_library(angle_renderer_d3d INTERFACE)
-+ target_sources(angle_renderer_d3d INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_D3D_SOURCES}>")
-+ target_compile_definitions(angle_renderer_d3d INTERFACE
-+ -DANGLE_ENABLE_D3D11
-+ "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }"
-+ )
-+ if(NOT MINGW)
-+ target_compile_definitions(angle_renderer_d3d INTERFACE
-+ -DANGLE_ENABLE_D3D11_COMPOSITOR_NATIVE_WINDOW
-+ )
-+ endif()
-+ target_link_libraries(angle_renderer_d3d INTERFACE d3d11 dxguid)
-+ add_library(angle::renderer::d3d ALIAS angle_renderer_d3d)
-+endif()
-+
-+## angle::gpu_info_util
-+file(GLOB ANGLE_GPU_INFO_UTIL_SOURCES
-+ "src/gpu_info_util/SystemInfo.h"
-+ "src/gpu_info_util/SystemInfo_internal.h"
-+ "src/gpu_info_util/SystemInfo.cpp"
-+)
-+add_library(angle_gpu_info_util OBJECT ${ANGLE_GPU_INFO_UTIL_SOURCES})
-+if(WIN32)
-+ target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp")
-+ target_link_libraries(angle_gpu_info_util PRIVATE setupapi.lib dxgi.lib)
-+elseif(APPLE)
-+ target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_apple.mm")
-+ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") # macOS
-+ target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_macos.mm")
-+ endif()
-+ find_library(IOKit IOKit)
-+ find_library(CoreFoundation CoreFoundation)
-+ find_library(CoreGraphics CoreGraphics)
-+ target_link_libraries(angle_gpu_info_util PRIVATE ${IOKit} ${CoreFoundation} ${CoreGraphics})
-+elseif(LINUX)
-+ target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_linux.cpp" "src/gpu_info_util/SystemInfo_x11.cpp")
-+ target_compile_definitions(angle_gpu_info_util PRIVATE GPU_INFO_USE_X11)
-+ target_link_libraries(angle_gpu_info_util PRIVATE X11 Xi Xext)
-+elseif(ANDROID)
-+ target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_android.cpp")
-+endif()
-+target_link_libraries(angle_gpu_info_util PRIVATE angle::common)
-+add_library(angle::gpu_info_util ALIAS angle_gpu_info_util)
-+
-+## Core libANGLE library
-+if(WIN32)
-+ if(NOT WINDOWS_STORE)
-+ set(LIBANGLE_SOURCES_PLATFORM
-+ "src/third_party/systeminfo/SystemInfo.cpp"
-+ )
-+ endif()
-+elseif(APPLE)
-+ file(GLOB LIBANGLE_SOURCES_PLATFORM
-+ "src/libANGLE/renderer/*.mm"
-+ )
-+else()
-+ set(LIBANGLE_SOURCES_PLATFORM)
-+endif()
-+
-+file(GLOB LIBANGLE_SOURCES
-+ "src/common/third_party/murmurhash/MurmurHash3.cpp"
-+ "src/common/event_tracer.cpp"
-+
-+ "src/libANGLE/*.cpp"
-+ "src/libANGLE/*.inc"
-+ "src/libANGLE/*.h"
-+
-+ "src/libANGLE/renderer/*.cpp"
-+ "src/libANGLE/renderer/*.h"
-+
-+ "src/libANGLE/renderer/null/*.cpp"
-+ "src/libANGLE/renderer/null/*.h"
-+
-+ # The frame capture headers are always visible to libANGLE.
-+ "src/libANGLE/capture/*.h"
-+
-+ # angle_frame_capture_disabled
-+ "src/libANGLE/capture/FrameCapture_mock.cpp"
-+ "src/libANGLE/capture/frame_capture_utils_mock.cpp"
-+
-+ # angle_gl_enum_utils
-+ "src/libANGLE/capture/gl_enum_utils.cpp"
-+ "src/libANGLE/capture/gl_enum_utils_autogen.cpp"
-+
-+ ${LIBANGLE_SOURCES_PLATFORM}
-+)
-+list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest|glslang_wrapper|dxgi_|d3d_format")
-+if(WIN32)
-+ set(LIBANGLE_D3D_FORMAT_TABLES_SOURCES_PLATFORM)
-+ if(NOT WINDOWS_STORE)
-+ list(APPEND LIBANGLE_D3D_FORMAT_TABLES_SOURCES_PLATFORM
-+ "src/libANGLE/renderer/d3d_format.cpp"
-+ "src/libANGLE/renderer/d3d_format.h"
-+ )
-+ endif()
-+ file(GLOB LIBANGLE_D3D_FORMAT_TABLES_SOURCES
-+ "src/libANGLE/renderer/dxgi_format_map.h"
-+ "src/libANGLE/renderer/dxgi_format_map_autogen.cpp"
-+ "src/libANGLE/renderer/dxgi_support_table.h"
-+ "src/libANGLE/renderer/dxgi_support_table_autogen.cpp"
-+
-+ ${LIBANGLE_D3D_FORMAT_TABLES_SOURCES_PLATFORM}
-+ )
-+ list(APPEND LIBANGLE_SOURCES "${LIBANGLE_D3D_FORMAT_TABLES_SOURCES}")
-+endif()
-+
-+if(LINUX OR APPLE)
-+ set(LIBANGLE_RENDERER_PLATFORM
-+ angle::renderer::opengl
-+ )
-+elseif(WINDOWS_STORE)
-+ set(LIBANGLE_RENDERER_PLATFORM
-+ angle::renderer::d3d
-+ angle::renderer::winrt
-+ )
-+elseif(WINDOWS_DESKTOP)
-+ set(LIBANGLE_RENDERER_PLATFORM
-+ angle::renderer::d3d
-+ angle::renderer::win32
-+ angle::renderer::opengl
-+ gdi32
-+ dxgi
-+ )
-+else()
-+ set(LIBANGLE_RENDERER_PLATFORM )
-+endif()
-+
-+if(LINUX)
-+ find_package(X11)
-+ include_directories(${X11_INCLUDE_DIR})
-+ list(APPEND LIBANGLE_RENDERER_PLATFORM ${X11_LIBRARIES})
-+ set(LIBANGLE_RENDERER_COMPILEDEF
-+ -DANGLE_USE_X11
-+ )
-+else()
-+ set(LIBANGLE_RENDERER_COMPILEDEF )
-+endif()
-+
-+add_library(libANGLE STATIC ${LIBANGLE_SOURCES})
-+target_link_libraries(libANGLE PRIVATE
-+ angle::common
-+ angle::compression
-+ angle::image_util
-+ angle::gpu_info_util
-+ angle::translator
-+ angle::preprocessor
-+ ${LIBANGLE_RENDERER_PLATFORM}
-+)
-+target_include_directories(libANGLE PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/khronos>")
-+target_compile_definitions(libANGLE
-+ PRIVATE -DANGLE_ENABLE_NULL
-+ PUBLIC
-+ -DLIBANGLE_IMPLEMENTATION
-+ ${LIBANGLE_RENDERER_COMPILEDEF}
-+ -DANGLE_EXPORT=
-+ -DANGLE_UTIL_EXPORT=
-+ -DEGLAPI=
-+ -DGL_APICALL=
-+ -DGL_API=
-+ -DANGLE_CAPTURE_ENABLED=0
-+)
-+add_library(angle::libANGLE ALIAS libANGLE)
-+if(BUILD_SHARED_LIBS)
-+ target_compile_definitions(libANGLE
-+ PRIVATE -DLIBANGLE_UTIL_IMPLEMENTATION
-+ )
-+endif()
-+
-+##########
-+# libGLESv2
-+# Modified according to the file src/libGLESv2.gni
-+list(APPEND LIBGLESV2_SOURCES
-+ "src/libGLESv2/egl_ext_stubs.cpp"
-+ "src/libGLESv2/egl_ext_stubs_autogen.h"
-+ "src/libGLESv2/egl_stubs.cpp"
-+ "src/libGLESv2/egl_stubs_autogen.h"
-+ "src/libGLESv2/entry_points_egl_autogen.cpp"
-+ "src/libGLESv2/entry_points_egl_autogen.h"
-+ "src/libGLESv2/entry_points_egl_ext_autogen.cpp"
-+ "src/libGLESv2/entry_points_egl_ext_autogen.h"
-+ "src/libGLESv2/entry_points_gles_1_0_autogen.cpp"
-+ "src/libGLESv2/entry_points_gles_1_0_autogen.h"
-+ "src/libGLESv2/entry_points_gles_2_0_autogen.cpp"
-+ "src/libGLESv2/entry_points_gles_2_0_autogen.h"
-+ "src/libGLESv2/entry_points_gles_3_0_autogen.cpp"
-+ "src/libGLESv2/entry_points_gles_3_0_autogen.h"
-+ "src/libGLESv2/entry_points_gles_3_1_autogen.cpp"
-+ "src/libGLESv2/entry_points_gles_3_1_autogen.h"
-+ "src/libGLESv2/entry_points_gles_3_2_autogen.cpp"
-+ "src/libGLESv2/entry_points_gles_3_2_autogen.h"
-+ "src/libGLESv2/entry_points_gles_ext_autogen.cpp"
-+ "src/libGLESv2/entry_points_gles_ext_autogen.h"
-+ "src/libGLESv2/global_state.cpp"
-+ "src/libGLESv2/global_state.h"
-+ "src/libGLESv2/libGLESv2_autogen.cpp"
-+ "src/libGLESv2/proc_table_egl.h"
-+ "src/libGLESv2/proc_table_egl_autogen.cpp"
-+ "src/libGLESv2/resource.h"
-+ "src/libGLESv2/libGLESv2_autogen.def"
-+)
-+add_library(libGLESv2 ${LIBGLESV2_SOURCES})
-+target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE)
-+target_compile_definitions(libGLESv2
-+ PRIVATE -DLIBGLESV2_IMPLEMENTATION
-+ PUBLIC
-+ "-DGL_GLES_PROTOTYPES=1"
-+ "-DGL_GLEXT_PROTOTYPES"
-+ "-DEGL_EGL_PROTOTYPES=1"
-+ "-DEGL_EGLEXT_PROTOTYPES"
-+)
-+if(BUILD_SHARED_LIBS)
-+else()
-+ if(WIN32)
-+ target_compile_definitions(libGLESv2 PRIVATE
-+ "-DGL_API="
-+ "-DGL_APICALL="
-+ "-DEGLAPI="
-+ )
-+ else()
-+ target_compile_definitions(libGLESv2 PRIVATE
-+ "-DGL_API=__attribute__((visibility(\"default\")))"
-+ "-DGL_APICALL=__attribute__((visibility(\"default\")))"
-+ "-DEGLAPI=__attribute__((visibility(\"default\")))"
-+ )
-+ endif()
-+endif()
-+
-+target_include_directories(libGLESv2 PUBLIC "$<INSTALL_INTERFACE:include>")
-+
-+##########
-+# libEGL
-+if(WIN32)
-+ set(libEGL_def
-+ "src/libEGL/libEGL_autogen.def"
-+ )
-+endif()
-+add_library(libEGL
-+ "src/libEGL/egl_loader_autogen.h"
-+ "src/libEGL/libEGL_autogen.cpp"
-+ "src/libEGL/resource.h"
-+ "src/libGLESv2/entry_points_egl_autogen.h"
-+ "src/libGLESv2/entry_points_egl_ext_autogen.h"
-+ ${libEGL_def}
-+)
-+
-+target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2)
-+target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
-+target_compile_definitions(libEGL
-+ PRIVATE
-+ "-DLIBEGL_IMPLEMENTATION"
-+ PUBLIC
-+ "-DGL_GLES_PROTOTYPES=1"
-+ "-DGL_GLEXT_PROTOTYPES"
-+ "-DEGL_EGL_PROTOTYPES=1"
-+ "-DEGL_EGLEXT_PROTOTYPES"
-+)
-+add_library(GL_VISIBILITY INTERFACE)
-+if(WIN32)
-+ target_compile_definitions(GL_VISIBILITY INTERFACE
-+ "-DGL_API="
-+ "-DGL_APICALL=")
-+else()
-+ target_compile_definitions(GL_VISIBILITY INTERFACE
-+ "-DGL_API=__attribute__((visibility(\"default\")))"
-+ "-DGL_APICALL=__attribute__((visibility(\"default\")))")
-+endif()
-+target_link_libraries(libEGL PRIVATE GL_VISIBILITY)
-+target_link_libraries(libGLESv2 PRIVATE GL_VISIBILITY)
-+
-+if(WIN32)
-+ target_compile_definitions(libEGL PRIVATE
-+ "-DEGLAPI="
-+ )
-+else()
-+ target_compile_definitions(libEGL PRIVATE
-+ "-DEGLAPI=__attribute__((visibility(\"default\")))"
-+ )
-+endif()
-+
-+if(NOT BUILD_SHARED_LIBS)
-+ add_definitions("-DANGLE_EXPORT=" "-DANGLE_UTIL_EXPORT=" "-DEGLAPI=" "-DGL_APICALL=" "-DGL_API=")
-+endif()
-+
-+set_target_properties(libANGLE PROPERTIES PREFIX "")
-+set_target_properties(libGLESv2 PROPERTIES PREFIX "" IMPORT_PREFIX "")
-+set_target_properties(libEGL PROPERTIES PREFIX "" IMPORT_PREFIX "")
-+
-+install(TARGETS libEGL libGLESv2 libANGLE angle_common angle_compression_utils angle_image_util angle_gpu_info_util angle_translator angle_preprocessor GL_VISIBILITY EXPORT ANGLEExport
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+)
-+
-+if(WINDOWS_DESKTOP)
-+ install(TARGETS angle_renderer_d3d angle_renderer_win32 angle_renderer_opengl EXPORT ANGLEExport
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+ )
-+elseif(WINDOWS_STORE)
-+ install(TARGETS angle_renderer_d3d angle_renderer_winrt EXPORT ANGLEExport
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+ )
-+else()
-+ install(TARGETS angle_renderer_opengl EXPORT ANGLEExport
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+ )
-+endif()
-+
-+install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle)
-+
-+if(NOT DISABLE_INSTALL_HEADERS)
-+ install(
-+ DIRECTORY include/
-+ DESTINATION include
-+ FILES_MATCHING
-+ PATTERN "*.h"
-+ PATTERN "*.inc"
-+ PATTERN "CL" EXCLUDE
-+ PATTERN "GLSLANG" EXCLUDE
-+ PATTERN "egl.h" EXCLUDE
-+ PATTERN "eglext.h" EXCLUDE
-+ PATTERN "eglplatform.h" EXCLUDE
-+ PATTERN "KHR" EXCLUDE
-+ PATTERN "WGL" EXCLUDE
-+ PATTERN "export.h" EXCLUDE
-+ )
-+endif()
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/02-patches_krita/0014-CMake-Do-not-exclude-EGL-headers.patch b/3rdparty/ext_googleangle/02-patches_krita/0014-CMake-Do-not-exclude-EGL-headers.patch
deleted file mode 100644
index 6d306d9af5..0000000000
--- a/3rdparty/ext_googleangle/02-patches_krita/0014-CMake-Do-not-exclude-EGL-headers.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 500117153b23d2b7b7052bf34580d4c734bcb087 Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Sat, 12 Mar 2022 21:19:11 +0800
-Subject: [PATCH 14/17] CMake: Do not exclude EGL headers
-
----
- CMakeLists.txt | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 08fcc235c..e62471e07 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -737,11 +737,11 @@ if(NOT DISABLE_INSTALL_HEADERS)
- PATTERN "*.h"
- PATTERN "*.inc"
- PATTERN "CL" EXCLUDE
-- PATTERN "GLSLANG" EXCLUDE
-- PATTERN "egl.h" EXCLUDE
-- PATTERN "eglext.h" EXCLUDE
-- PATTERN "eglplatform.h" EXCLUDE
-- PATTERN "KHR" EXCLUDE
-+ #PATTERN "GLSLANG" EXCLUDE
-+ #PATTERN "egl.h" EXCLUDE
-+ #PATTERN "eglext.h" EXCLUDE
-+ #PATTERN "eglplatform.h" EXCLUDE
-+ #PATTERN "KHR" EXCLUDE
- PATTERN "WGL" EXCLUDE
- PATTERN "export.h" EXCLUDE
- )
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/02-patches_krita/0015-Implement-openGL-surface-color-space-selection-in-An.patch b/3rdparty/ext_googleangle/02-patches_krita/0015-Implement-openGL-surface-color-space-selection-in-An.patch
deleted file mode 100644
index b802be80ab..0000000000
--- a/3rdparty/ext_googleangle/02-patches_krita/0015-Implement-openGL-surface-color-space-selection-in-An.patch
+++ /dev/null
@@ -1,510 +0,0 @@
-From 0fb8bddb74a58b51bad12a6188f24d13cba2c7f4 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Sat, 8 Dec 2018 15:35:43 +0300
-Subject: [PATCH 15/17] Implement openGL surface color space selection in Angle
-
-WARNING: this patch actually means that the library must be build on
- the system with at least DXGI 1.4 (DirectX 12 API) present
- in SDK. Mingw64 7.3 supports that.
-
-1) D3D11 implementation of angle now supports GL_RGB10_A2 format
-
-2) Technically, Angle's EGL implementation now supports the following
- display extensions:
- * EGL_KHR_gl_colorspace
- * EGL_EXT_gl_colorspace_scrgb_linear
- * EGL_EXT_gl_colorspace_bt2020_pq
-
-3) D3D11 implementation of angle now supports GL_COLOR_SPACE attribute,
- which allows selection one of four color modes:
- * Linear --- just pass-through data to GPU
- * sRGB --- p709-g22 color space. WARNING: in 8-bit mode the system
- becomes clever and automatically converts linear framebuffer
- attachments to sRGB space, as per EGL_KHR_gl_colorspace definition.
- It is not possible to select sRGB without this extra "feature".
- * scRGB --- p709-g10 color space. This mode is the only mode
- supported in f16-bit mode (and it is also not supported in other
- bit depths).
- * bt2020-pq --- p2020-pq color space. Supported only in 10-bit mode.
-
-5) SwapChain is now created in DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL mode:
- * because non-flip mode is considered deprecated and HDR is not
- supported in it;
- * because in flip-discard mode partial updates from
- SwapChain11::present() are not supported and return an error,
- which is never checked :)
-
-6) As a fallback, SwapChain uses old DXGI_SWAP_EFFECT_DISCARD, because
- flip modes are not available on Windows 7 and such old systems.
-
-Notes:
-
-eglCreatePixmapSurface() is not implemented in Angle, so the support is
-not added.
-
-eglCreatePlatformWindowSurface() and eglCreatePlatformPixmapSurface()
-do not have support for color spaces according to the extension wording
-(and they are also not supported by Angle :) )
-
-Change-Id: I68204a5db6bbd7066a83a8d1d021ce76cd1cf6f6
----
- src/libANGLE/Caps.cpp | 1 +
- src/libANGLE/Caps.h | 3 +
- src/libANGLE/formatutils.h | 1 +
- src/libANGLE/renderer/d3d/RendererD3D.h | 3 +-
- src/libANGLE/renderer/d3d/SurfaceD3D.cpp | 26 +++++-
- src/libANGLE/renderer/d3d/SurfaceD3D.h | 1 +
- .../renderer/d3d/d3d11/Renderer11.cpp | 16 +++-
- src/libANGLE/renderer/d3d/d3d11/Renderer11.h | 4 +-
- .../renderer/d3d/d3d11/SwapChain11.cpp | 90 ++++++++++++++++++-
- src/libANGLE/renderer/d3d/d3d11/SwapChain11.h | 4 +-
- .../d3d/d3d11/win32/NativeWindow11Win32.cpp | 19 +++-
- src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp | 4 +-
- src/libANGLE/renderer/d3d/d3d9/Renderer9.h | 3 +-
- src/libANGLE/validationEGL.cpp | 8 ++
- 14 files changed, 170 insertions(+), 13 deletions(-)
-
-diff --git a/src/libANGLE/Caps.cpp b/src/libANGLE/Caps.cpp
-index f4c1beed2..a6e80b102 100644
---- a/src/libANGLE/Caps.cpp
-+++ b/src/libANGLE/Caps.cpp
-@@ -1245,6 +1245,7 @@ std::vector<std::string> DisplayExtensions::getStrings() const
- InsertExtensionString("EGL_EXT_gl_colorspace_display_p3", glColorspaceDisplayP3, &extensionStrings);
- InsertExtensionString("EGL_EXT_gl_colorspace_display_p3_linear", glColorspaceDisplayP3Linear, &extensionStrings);
- InsertExtensionString("EGL_EXT_gl_colorspace_display_p3_passthrough", glColorspaceDisplayP3Passthrough, &extensionStrings);
-+ InsertExtensionString("EGL_EXT_gl_colorspace_bt2020_pq", glColorspaceBt2020PQ, &extensionStrings);
- InsertExtensionString("EGL_KHR_gl_texture_2D_image", glTexture2DImage, &extensionStrings);
- InsertExtensionString("EGL_KHR_gl_texture_cubemap_image", glTextureCubemapImage, &extensionStrings);
- InsertExtensionString("EGL_KHR_gl_texture_3D_image", glTexture3DImage, &extensionStrings);
-diff --git a/src/libANGLE/Caps.h b/src/libANGLE/Caps.h
-index 13429ac2d..c104491f6 100644
---- a/src/libANGLE/Caps.h
-+++ b/src/libANGLE/Caps.h
-@@ -602,6 +602,9 @@ struct DisplayExtensions
- // EGL_EXT_gl_colorspace_display_p3_passthrough
- bool glColorspaceDisplayP3Passthrough = false;
-
-+ // EGL_EXT_gl_colorspace_bt2020_pq
-+ bool glColorspaceBt2020PQ = false;
-+
- // EGL_ANDROID_framebuffer_target
- bool framebufferTargetANDROID = false;
-
-diff --git a/src/libANGLE/formatutils.h b/src/libANGLE/formatutils.h
-index c53a25151..cd411bae8 100644
---- a/src/libANGLE/formatutils.h
-+++ b/src/libANGLE/formatutils.h
-@@ -87,6 +87,7 @@ ANGLE_INLINE bool ColorspaceFormatOverride(const EGLenum colorspace, GLenum *ren
- case EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT: // App, not the HW, will specify the
- // transfer function
- case EGL_GL_COLORSPACE_SCRGB_EXT: // App, not the HW, will specify the transfer function
-+ case EGL_GL_COLORSPACE_BT2020_PQ_EXT: // App, not the HW, will specify the transfer function
- // No translation
- return true;
- case EGL_GL_COLORSPACE_SRGB_KHR:
-diff --git a/src/libANGLE/renderer/d3d/RendererD3D.h b/src/libANGLE/renderer/d3d/RendererD3D.h
-index d681e5b7e..f2874242e 100644
---- a/src/libANGLE/renderer/d3d/RendererD3D.h
-+++ b/src/libANGLE/renderer/d3d/RendererD3D.h
-@@ -182,7 +182,8 @@ class RendererD3D : public BufferFactoryD3D
- GLenum backBufferFormat,
- GLenum depthBufferFormat,
- EGLint orientation,
-- EGLint samples) = 0;
-+ EGLint samples,
-+ EGLint colorSpace) = 0;
- virtual egl::Error getD3DTextureInfo(const egl::Config *configuration,
- IUnknown *d3dTexture,
- const egl::AttributeMap &attribs,
-diff --git a/src/libANGLE/renderer/d3d/SurfaceD3D.cpp b/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
-index 6fc42139a..a9950ab14 100644
---- a/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
-+++ b/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
-@@ -24,6 +24,27 @@
- namespace rx
- {
-
-+GLenum renderTargetFormatFromColorSpace(egl::Display *display, GLenum baseFormat, EGLint colorSpace)
-+{
-+ GLenum result = baseFormat;
-+
-+ /**
-+ * If sRGB extension is supported, we should change the surface format
-+ * to a specific one that does support automated gamma conversion.
-+ *
-+ * TODO: openGL doesn't support BGRA-sRGB texture format, so creation of
-+ * textures in this format technically is not supported!
-+ */
-+ if (display->getExtensions().glColorspace &&
-+ baseFormat == GL_RGBA8_OES &&
-+ colorSpace == EGL_GL_COLORSPACE_SRGB_KHR)
-+ {
-+ result = GL_SRGB8_ALPHA8;
-+ }
-+
-+ return result;
-+}
-+
- SurfaceD3D::SurfaceD3D(const egl::SurfaceState &state,
- RendererD3D *renderer,
- egl::Display *display,
-@@ -38,7 +59,8 @@ SurfaceD3D::SurfaceD3D(const egl::SurfaceState &state,
- mFixedWidth(0),
- mFixedHeight(0),
- mOrientation(static_cast<EGLint>(attribs.get(EGL_SURFACE_ORIENTATION_ANGLE, 0))),
-- mRenderTargetFormat(state.config->renderTargetFormat),
-+ mColorSpace(static_cast<EGLint>(attribs.get(EGL_GL_COLORSPACE, EGL_GL_COLORSPACE_LINEAR))),
-+ mRenderTargetFormat(renderTargetFormatFromColorSpace(display, state.config->renderTargetFormat, mColorSpace)),
- mDepthStencilFormat(state.config->depthStencilFormat),
- mColorFormat(nullptr),
- mSwapChain(nullptr),
-@@ -203,7 +225,7 @@ egl::Error SurfaceD3D::resetSwapChain(const egl::Display *display)
-
- mSwapChain =
- mRenderer->createSwapChain(mNativeWindow, mShareHandle, mD3DTexture, mRenderTargetFormat,
-- mDepthStencilFormat, mOrientation, mState.config->samples);
-+ mDepthStencilFormat, mOrientation, mState.config->samples, mColorSpace);
- if (!mSwapChain)
- {
- return egl::EglBadAlloc();
-diff --git a/src/libANGLE/renderer/d3d/SurfaceD3D.h b/src/libANGLE/renderer/d3d/SurfaceD3D.h
-index c48c8eb49..f0ecb67e7 100644
---- a/src/libANGLE/renderer/d3d/SurfaceD3D.h
-+++ b/src/libANGLE/renderer/d3d/SurfaceD3D.h
-@@ -93,6 +93,7 @@ class SurfaceD3D : public SurfaceImpl
- GLint mFixedWidth;
- GLint mFixedHeight;
- GLint mOrientation;
-+ EGLint mColorSpace;
-
- GLenum mRenderTargetFormat;
- GLenum mDepthStencilFormat;
-diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-index e89719966..c340b4971 100644
---- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
-@@ -429,6 +429,7 @@ Renderer11::Renderer11(egl::Display *display)
- mRenderer11DeviceCaps.supportsConstantBufferOffsets = false;
- mRenderer11DeviceCaps.supportsVpRtIndexWriteFromVertexShader = false;
- mRenderer11DeviceCaps.supportsDXGI1_2 = false;
-+ mRenderer11DeviceCaps.supportsDXGI1_4 = false;
- mRenderer11DeviceCaps.allowES3OnFL10_0 = false;
- mRenderer11DeviceCaps.B5G6R5support = 0;
- mRenderer11DeviceCaps.B4G4R4A4support = 0;
-@@ -1024,6 +1025,7 @@ egl::Error Renderer11::initializeDevice()
-
- // Gather stats on DXGI and D3D feature level
- ANGLE_HISTOGRAM_BOOLEAN("GPU.ANGLE.SupportsDXGI1_2", mRenderer11DeviceCaps.supportsDXGI1_2);
-+ ANGLE_HISTOGRAM_BOOLEAN("GPU.ANGLE.SupportsDXGI1_4", mRenderer11DeviceCaps.supportsDXGI1_4);
-
- ANGLEFeatureLevel angleFeatureLevel = GetANGLEFeatureLevel(mRenderer11DeviceCaps.featureLevel);
-
-@@ -1113,6 +1115,10 @@ void Renderer11::populateRenderer11DeviceCaps()
- IDXGIAdapter2 *dxgiAdapter2 = d3d11::DynamicCastComObject<IDXGIAdapter2>(mDxgiAdapter);
- mRenderer11DeviceCaps.supportsDXGI1_2 = (dxgiAdapter2 != nullptr);
- SafeRelease(dxgiAdapter2);
-+
-+ IDXGIAdapter3 *dxgiAdapter3 = d3d11::DynamicCastComObject<IDXGIAdapter3>(mDxgiAdapter);
-+ mRenderer11DeviceCaps.supportsDXGI1_4 = (dxgiAdapter3 != nullptr);
-+ SafeRelease(dxgiAdapter3);
- }
-
- gl::SupportedSampleSet Renderer11::generateSampleSetForEGLConfig(
-@@ -1358,6 +1364,11 @@ void Renderer11::generateDisplayExtensions(egl::DisplayExtensions *outExtensions
- outExtensions->windowsUIComposition = true;
- }
- #endif
-+
-+ // color space selection supported in DXGI 1.4 only
-+ outExtensions->glColorspace = mRenderer11DeviceCaps.supportsDXGI1_4;
-+ outExtensions->glColorspaceScrgbLinear = mRenderer11DeviceCaps.supportsDXGI1_4;
-+ outExtensions->glColorspaceBt2020PQ = mRenderer11DeviceCaps.supportsDXGI1_4;
- }
-
- angle::Result Renderer11::flush(Context11 *context11)
-@@ -1708,10 +1719,11 @@ SwapChainD3D *Renderer11::createSwapChain(NativeWindowD3D *nativeWindow,
- GLenum backBufferFormat,
- GLenum depthBufferFormat,
- EGLint orientation,
-- EGLint samples)
-+ EGLint samples,
-+ EGLint colorSpace)
- {
- return new SwapChain11(this, GetAs<NativeWindow11>(nativeWindow), shareHandle, d3dTexture,
-- backBufferFormat, depthBufferFormat, orientation, samples);
-+ backBufferFormat, depthBufferFormat, orientation, samples, colorSpace);
- }
-
- void *Renderer11::getD3DDevice()
-diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.h b/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
-index 04821c43a..9d8d8fdfd 100644
---- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
-+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
-@@ -49,6 +49,7 @@ struct Renderer11DeviceCaps
-
- D3D_FEATURE_LEVEL featureLevel;
- bool supportsDXGI1_2; // Support for DXGI 1.2
-+ bool supportsDXGI1_4; // Support for DXGI 1.4
- bool supportsClearView; // Support for ID3D11DeviceContext1::ClearView
- bool supportsConstantBufferOffsets; // Support for Constant buffer offset
- bool supportsVpRtIndexWriteFromVertexShader; // VP/RT can be selected in the Vertex Shader
-@@ -101,7 +102,8 @@ class Renderer11 : public RendererD3D
- GLenum backBufferFormat,
- GLenum depthBufferFormat,
- EGLint orientation,
-- EGLint samples) override;
-+ EGLint samples,
-+ EGLint colorSpace) override;
- egl::Error getD3DTextureInfo(const egl::Config *configuration,
- IUnknown *d3dTexture,
- const egl::AttributeMap &attribs,
-diff --git a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-index a82b77b33..c69d84eb5 100644
---- a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-@@ -19,6 +19,11 @@
- #include "libANGLE/renderer/d3d/d3d11/texture_format_table.h"
- #include "libANGLE/trace.h"
-
-+#if 0
-+// used only for HDR metadata configuration options
-+#include <dxgi1_5.h>
-+#endif
-+
- // Precompiled shaders
- #include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h"
- #include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d11ps.h"
-@@ -58,12 +63,14 @@ SwapChain11::SwapChain11(Renderer11 *renderer,
- GLenum backBufferFormat,
- GLenum depthBufferFormat,
- EGLint orientation,
-- EGLint samples)
-+ EGLint samples,
-+ EGLint colorSpace)
- : SwapChainD3D(shareHandle, d3dTexture, backBufferFormat, depthBufferFormat),
- mRenderer(renderer),
- mWidth(-1),
- mHeight(-1),
- mOrientation(orientation),
-+ mColorSpace(colorSpace),
- mAppCreatedShareHandle(mShareHandle != nullptr),
- mSwapInterval(0),
- mPassThroughResourcesInit(false),
-@@ -655,10 +662,91 @@ EGLint SwapChain11::reset(DisplayD3D *displayD3D,
- mSwapChain1 = d3d11::DynamicCastComObject<IDXGISwapChain1>(mSwapChain);
- }
-
-+ if (mRenderer->getRenderer11DeviceCaps().supportsDXGI1_4)
-+ {
-+ IDXGISwapChain3 *swapChain3 = d3d11::DynamicCastComObject<IDXGISwapChain3>(mSwapChain);
-+
-+ // printf("*** EGL colorSpace: 0x%X\n", mColorSpace);
-+ // printf("*** EGL format: 0x%X\n", mOffscreenRenderTargetFormat);
-+ // printf("*** Native format: 0x%X\n", getSwapChainNativeFormat());
-+
-+ if (mColorSpace != EGL_GL_COLORSPACE_LINEAR_KHR) {
-+ DXGI_COLOR_SPACE_TYPE nativeColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
-+ switch (mColorSpace)
-+ {
-+ case EGL_GL_COLORSPACE_SRGB_KHR:
-+ nativeColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
-+ break;
-+ case EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT:
-+ nativeColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709;
-+ break;
-+ case EGL_GL_COLORSPACE_BT2020_PQ_EXT:
-+ nativeColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020;
-+ break;
-+ default:
-+ ASSERT(0 && "Unsupported colorspace requested");
-+ }
-+
-+ // printf("*** Native colorSpace: 0x%X\n", nativeColorSpace);
-+
-+ UINT supported = 0;
-+ hr = swapChain3->CheckColorSpaceSupport(nativeColorSpace, &supported);
-+ ASSERT(SUCCEEDED(hr));
-+ if (!(supported & DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT)) {
-+ SafeRelease(swapChain3);
-+ return EGL_BAD_MATCH;
-+ }
-+
-+ hr = swapChain3->SetColorSpace1(nativeColorSpace);
-+ ASSERT(SUCCEEDED(hr));
-+ }
-+
-+ SafeRelease(swapChain3);
-+
-+#if 0
-+
-+ IDXGISwapChain4 *swapChain4 = d3d11::DynamicCastComObject<IDXGISwapChain4>(mSwapChain);
-+
-+ DXGI_HDR_METADATA_HDR10 md;
-+ md.RedPrimary[0] = 0.680 * 50000;
-+ md.RedPrimary[1] = 0.320 * 50000;
-+ md.GreenPrimary[0] = 0.265 * 50000;
-+ md.GreenPrimary[1] = 0.690 * 50000;
-+ md.BluePrimary[0] = 0.150 * 50000;
-+ md.BluePrimary[1] = 0.060 * 50000;
-+ md.WhitePoint[0] = 0.3127 * 50000;
-+ md.WhitePoint[1] = 0.3290 * 50000;
-+ md.MaxMasteringLuminance = 1000 * 10000;
-+ md.MinMasteringLuminance = 0.001 * 10000;
-+ md.MaxContentLightLevel = 1000;
-+ md.MaxFrameAverageLightLevel = 200;
-+ result = swapChain4->SetHDRMetaData(DXGI_HDR_METADATA_TYPE_HDR10, sizeof(md), &md);
-+ // printf("*** Result hdr 0x%X\n", result);
-+ SafeRelease(swapChain4);
-+#endif
-+ }
-+
- ID3D11Texture2D *backbufferTex = nullptr;
- hr = mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D),
- reinterpret_cast<LPVOID *>(&backbufferTex));
- ASSERT(SUCCEEDED(hr));
-+
-+ // TODO: recover rendering to sRGB
-+ //
-+ // D3D11_RENDER_TARGET_VIEW_DESC offscreenRTVDesc;
-+ // offscreenRTVDesc.Format = getSwapChainNativeFormat();
-+ //
-+ // if (mColorSpace == EGL_GL_COLORSPACE_SRGB_KHR) {
-+ // if (offscreenRTVDesc.Format == DXGI_FORMAT_R8G8B8A8_UNORM) {
-+ // offscreenRTVDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
-+ // }
-+ //
-+ // if (offscreenRTVDesc.Format == DXGI_FORMAT_B8G8R8A8_UNORM) {
-+ // offscreenRTVDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;
-+ // }
-+ // }
-+ //
-+ // printf("*** Render target format: 0x%X\n", offscreenRTVDesc.Format);
- const auto &format =
- d3d11::Format::Get(mOffscreenRenderTargetFormat, mRenderer->getRenderer11DeviceCaps());
- mBackBufferTexture.set(backbufferTex, format);
-diff --git a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
-index 9dd98462c..a42a941c2 100644
---- a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
-+++ b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
-@@ -28,7 +28,8 @@ class SwapChain11 final : public SwapChainD3D
- GLenum backBufferFormat,
- GLenum depthBufferFormat,
- EGLint orientation,
-- EGLint samples);
-+ EGLint samples,
-+ EGLint colorSpace);
- ~SwapChain11() override;
-
- EGLint resize(DisplayD3D *displayD3D, EGLint backbufferWidth, EGLint backbufferHeight) override;
-@@ -91,6 +92,7 @@ class SwapChain11 final : public SwapChainD3D
- EGLint mWidth;
- EGLint mHeight;
- const EGLint mOrientation;
-+ EGLint mColorSpace;
- bool mAppCreatedShareHandle;
- unsigned int mSwapInterval;
- bool mPassThroughResourcesInit;
-diff --git a/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp b/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
-index 722510a48..10462a970 100644
---- a/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
-@@ -147,6 +147,9 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
-
- // Use IDXGIFactory2::CreateSwapChainForHwnd if DXGI 1.2 is available to create a
- // DXGI_SWAP_EFFECT_SEQUENTIAL swap chain.
-+ //
-+ // NOTE: in non-flip mode HDR rendering is not supported, so use it
-+ // by default
- IDXGIFactory2 *factory2 = d3d11::DynamicCastComObject<IDXGIFactory2>(factory);
- if (factory2 != nullptr)
- {
-@@ -159,9 +162,9 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
- swapChainDesc.SampleDesc.Quality = 0;
- swapChainDesc.BufferUsage =
- DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_BACK_BUFFER;
-- swapChainDesc.BufferCount = 1;
-+ swapChainDesc.BufferCount = 2;
- swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
-- swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
-+ swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
- swapChainDesc.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED;
- swapChainDesc.Flags = 0;
- IDXGISwapChain1 *swapChain1 = nullptr;
-@@ -177,7 +180,7 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
- }
-
- DXGI_SWAP_CHAIN_DESC swapChainDesc = {};
-- swapChainDesc.BufferCount = 1;
-+ swapChainDesc.BufferCount = 2;
- swapChainDesc.BufferDesc.Format = format;
- swapChainDesc.BufferDesc.Width = width;
- swapChainDesc.BufferDesc.Height = height;
-@@ -192,6 +195,16 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
- swapChainDesc.SampleDesc.Count = samples;
- swapChainDesc.SampleDesc.Quality = 0;
- swapChainDesc.Windowed = TRUE;
-+
-+ /**
-+ * NOTE1: in discard mode the swap chain doesn't support partial
-+ * presentatiopn with Present1() call. Though it is not a big
-+ * problem, because in case DXGI 1.2 is supported this code is
-+ * unreachable.
-+ *
-+ * NOTE2: Flip modes are not supported on Windows 7 and the like,
-+ * so use a legacy mode as a fallback
-+ */
- swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
-
- HRESULT result = factory->CreateSwapChain(device, &swapChainDesc, swapChain);
-diff --git a/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp b/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
-index 42932bd84..19f43422d 100644
---- a/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
-@@ -721,8 +721,10 @@ SwapChainD3D *Renderer9::createSwapChain(NativeWindowD3D *nativeWindow,
- GLenum backBufferFormat,
- GLenum depthBufferFormat,
- EGLint orientation,
-- EGLint samples)
-+ EGLint samples,
-+ EGLint colorSpace)
- {
-+ ANGLE_UNUSED_VARIABLE(colorSpace);
- return new SwapChain9(this, GetAs<NativeWindow9>(nativeWindow), shareHandle, d3dTexture,
- backBufferFormat, depthBufferFormat, orientation);
- }
-diff --git a/src/libANGLE/renderer/d3d/d3d9/Renderer9.h b/src/libANGLE/renderer/d3d/d3d9/Renderer9.h
-index 8a306a026..bd0fd4932 100644
---- a/src/libANGLE/renderer/d3d/d3d9/Renderer9.h
-+++ b/src/libANGLE/renderer/d3d/d3d9/Renderer9.h
-@@ -73,7 +73,8 @@ class Renderer9 : public RendererD3D
- GLenum backBufferFormat,
- GLenum depthBufferFormat,
- EGLint orientation,
-- EGLint samples) override;
-+ EGLint samples,
-+ EGLint colorSpace) override;
- egl::Error getD3DTextureInfo(const egl::Config *configuration,
- IUnknown *d3dTexture,
- const egl::AttributeMap &attribs,
-diff --git a/src/libANGLE/validationEGL.cpp b/src/libANGLE/validationEGL.cpp
-index 472405d5b..d897beb34 100644
---- a/src/libANGLE/validationEGL.cpp
-+++ b/src/libANGLE/validationEGL.cpp
-@@ -461,6 +461,14 @@ bool ValidateColorspaceAttribute(const ValidationContext *val,
- return false;
- }
- break;
-+ case EGL_GL_COLORSPACE_BT2020_PQ_EXT:
-+ if (!displayExtensions.glColorspaceBt2020PQ)
-+ {
-+ val->setError(EGL_BAD_ATTRIBUTE,
-+ "EGL_EXT_gl_colorspace_bt2020_pq is not available.");
-+ return false;
-+ }
-+ break;
- default:
- val->setError(EGL_BAD_ATTRIBUTE);
- return false;
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/02-patches_krita/0016-Reduce-flickering-when-resizing-window.patch b/3rdparty/ext_googleangle/02-patches_krita/0016-Reduce-flickering-when-resizing-window.patch
deleted file mode 100644
index 07fffd1c83..0000000000
--- a/3rdparty/ext_googleangle/02-patches_krita/0016-Reduce-flickering-when-resizing-window.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From fdd6f9cd842a57529be1452eaaa0153c68a5c82a Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Thu, 17 Mar 2022 16:12:08 +0800
-Subject: [PATCH 16/17] Reduce flickering when resizing window
-
-* Do not swap buffers when resizing swapchain, because it may cause
- visual artifacts when resizing the window.
-* Do not stretch buffer with DXGI 1.2 swap chain. This stops the window
- content from being stretched when resizing the window.
----
- src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp | 5 -----
- .../renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp | 2 +-
- 2 files changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-index c69d84eb5..2fe62a162 100644
---- a/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
-@@ -375,11 +375,6 @@ EGLint SwapChain11::resetOffscreenColorBuffer(DisplayD3D *displayD3D,
- const int yoffset = std::max(backbufferHeight - previousHeight, 0);
- deviceContext->CopySubresourceRegion(mOffscreenTexture.get(), 0, 0, yoffset, 0,
- previousOffscreenTexture.get(), 0, &sourceBox);
--
-- if (mSwapChain)
-- {
-- swapRect(displayD3D, 0, 0, backbufferWidth, backbufferHeight);
-- }
- }
-
- return EGL_SUCCESS;
-diff --git a/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp b/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
-index 10462a970..d30f888d3 100644
---- a/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
-+++ b/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow11Win32.cpp
-@@ -163,7 +163,7 @@ HRESULT NativeWindow11Win32::createSwapChain(ID3D11Device *device,
- swapChainDesc.BufferUsage =
- DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_BACK_BUFFER;
- swapChainDesc.BufferCount = 2;
-- swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
-+ swapChainDesc.Scaling = DXGI_SCALING_NONE;
- swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
- swapChainDesc.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED;
- swapChainDesc.Flags = 0;
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/02-patches_krita/0017-Replace-extern-thread_local-to-avoid-GCC-mingw-w64-b.patch b/3rdparty/ext_googleangle/02-patches_krita/0017-Replace-extern-thread_local-to-avoid-GCC-mingw-w64-b.patch
deleted file mode 100644
index 644181164b..0000000000
--- a/3rdparty/ext_googleangle/02-patches_krita/0017-Replace-extern-thread_local-to-avoid-GCC-mingw-w64-b.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-From 3cba1bd283e2174049c3871070e19a7325875598 Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Fri, 25 Mar 2022 16:36:39 +0800
-Subject: [PATCH 17/17] Replace `extern thread_local` to avoid GCC mingw-w64
- bug
-
-GCC generates broken code for mingw-w64 target when accessing `extern
-thread_local` variables from another compilation unit.
-
-GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104862
----
- src/libANGLE/Context.cpp | 14 +++++++++-----
- src/libANGLE/Context.h | 4 ----
- src/libGLESv2/global_state.cpp | 30 +++++++++---------------------
- src/libGLESv2/global_state.h | 12 ------------
- 4 files changed, 18 insertions(+), 42 deletions(-)
-
-diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
-index bd9e3cd6a..fd5e51cfb 100644
---- a/src/libANGLE/Context.cpp
-+++ b/src/libANGLE/Context.cpp
-@@ -387,7 +387,15 @@ void SetCurrentValidContextTLS(Context *context)
- SetTLSValue(CurrentValidContextIndex, context);
- }
- #else
--thread_local Context *gCurrentValidContext = nullptr;
-+static thread_local Context *gCurrentValidContext = nullptr;
-+Context *GetCurrentValidContextTLS()
-+{
-+ return gCurrentValidContext;
-+}
-+void SetCurrentValidContextTLS(Context *context)
-+{
-+ gCurrentValidContext = context;
-+}
- #endif
-
- Context::Context(egl::Display *display,
-@@ -2907,11 +2915,7 @@ void Context::setContextLost()
- mSkipValidation = false;
-
- // Make sure we update TLS.
--#if defined(ANGLE_PLATFORM_APPLE)
- SetCurrentValidContextTLS(nullptr);
--#else
-- gCurrentValidContext = nullptr;
--#endif
- }
-
- GLenum Context::getGraphicsResetStatus()
-diff --git a/src/libANGLE/Context.h b/src/libANGLE/Context.h
-index 42cfde7c0..c6fda14ba 100644
---- a/src/libANGLE/Context.h
-+++ b/src/libANGLE/Context.h
-@@ -855,12 +855,8 @@ class ANGLE_NO_DISCARD ScopedContextRef
- };
-
- // Thread-local current valid context bound to the thread.
--#if defined(ANGLE_PLATFORM_APPLE)
- extern Context *GetCurrentValidContextTLS();
- extern void SetCurrentValidContextTLS(Context *context);
--#else
--extern thread_local Context *gCurrentValidContext;
--#endif
-
- } // namespace gl
-
-diff --git a/src/libGLESv2/global_state.cpp b/src/libGLESv2/global_state.cpp
-index f29b0b6c8..e7e3bf5c4 100644
---- a/src/libGLESv2/global_state.cpp
-+++ b/src/libGLESv2/global_state.cpp
-@@ -52,21 +52,13 @@ Thread *AllocateCurrentThread()
- // Global thread intentionally leaked
- ANGLE_SCOPED_DISABLE_LSAN();
- thread = new Thread();
--#if defined(ANGLE_PLATFORM_APPLE)
- SetCurrentThreadTLS(thread);
--#else
-- gCurrentThread = thread;
--#endif
- }
-
- // Initialize fast TLS slot
- SetContextToAndroidOpenGLTLSSlot(nullptr);
-
--#if defined(ANGLE_PLATFORM_APPLE)
- gl::SetCurrentValidContextTLS(nullptr);
--#else
-- gl::gCurrentValidContext = nullptr;
--#endif
-
- #if defined(ANGLE_PLATFORM_ANDROID)
- static pthread_once_t keyOnce = PTHREAD_ONCE_INIT;
-@@ -142,7 +134,15 @@ void SetCurrentThreadTLS(Thread *thread)
- SetTLSValue(CurrentThreadIndex, thread);
- }
- #else
--thread_local Thread *gCurrentThread = nullptr;
-+static thread_local Thread *gCurrentThread = nullptr;
-+Thread *GetCurrentThreadTLS()
-+{
-+ return gCurrentThread;
-+}
-+void SetCurrentThreadTLS(Thread *thread)
-+{
-+ gCurrentThread = thread;
-+}
- #endif
-
- angle::GlobalMutex &GetGlobalMutex()
-@@ -171,30 +171,18 @@ void SetGlobalLastContext(gl::Context *context)
- // It also causes a flaky false positive in TSAN. http://crbug.com/1223970
- ANGLE_NO_SANITIZE_MEMORY ANGLE_NO_SANITIZE_THREAD Thread *GetCurrentThread()
- {
--#if defined(ANGLE_PLATFORM_APPLE)
- Thread *current = GetCurrentThreadTLS();
--#else
-- Thread *current = gCurrentThread;
--#endif
- return (current ? current : AllocateCurrentThread());
- }
-
- void SetContextCurrent(Thread *thread, gl::Context *context)
- {
--#if defined(ANGLE_PLATFORM_APPLE)
- Thread *currentThread = GetCurrentThreadTLS();
--#else
-- Thread *currentThread = gCurrentThread;
--#endif
- ASSERT(currentThread);
- currentThread->setCurrent(context);
- SetContextToAndroidOpenGLTLSSlot(context);
-
--#if defined(ANGLE_PLATFORM_APPLE)
- gl::SetCurrentValidContextTLS(context);
--#else
-- gl::gCurrentValidContext = context;
--#endif
-
- #if defined(ANGLE_FORCE_CONTEXT_CHECK_EVERY_CALL)
- DirtyContextIfNeeded(context);
-diff --git a/src/libGLESv2/global_state.h b/src/libGLESv2/global_state.h
-index 41d7db82c..b410c8f3c 100644
---- a/src/libGLESv2/global_state.h
-+++ b/src/libGLESv2/global_state.h
-@@ -93,12 +93,8 @@ namespace egl
- class Debug;
- class Thread;
-
--#if defined(ANGLE_PLATFORM_APPLE)
- extern Thread *GetCurrentThreadTLS();
- extern void SetCurrentThreadTLS(Thread *thread);
--#else
--extern thread_local Thread *gCurrentThread;
--#endif
-
- angle::GlobalMutex &GetGlobalMutex();
- angle::GlobalMutex &GetGlobalSurfaceMutex();
-@@ -141,11 +137,7 @@ ANGLE_INLINE Context *GetGlobalContext()
- }
- #endif
-
--#if defined(ANGLE_PLATFORM_APPLE)
- egl::Thread *currentThread = egl::GetCurrentThreadTLS();
--#else
-- egl::Thread *currentThread = egl::gCurrentThread;
--#endif
- ASSERT(currentThread);
- return currentThread->getContext();
- }
-@@ -165,11 +157,7 @@ ANGLE_INLINE Context *GetValidGlobalContext()
- }
- #endif
-
--#if defined(ANGLE_PLATFORM_APPLE)
- return GetCurrentValidContextTLS();
--#else
-- return gCurrentValidContext;
--#endif
- }
-
- // Generate a context lost error on the context if it is non-null and lost.
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_googleangle/02-patches_krita/0019-Add-resource-files-for-DLL-identification.patch b/3rdparty/ext_googleangle/02-patches_krita/0019-Add-resource-files-for-DLL-identification.patch
deleted file mode 100644
index 2714074765..0000000000
--- a/3rdparty/ext_googleangle/02-patches_krita/0019-Add-resource-files-for-DLL-identification.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From b9d7063a6edb93ac4e0fa3783d1600fb193bc772 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Tue, 10 Jan 2023 21:01:34 -0300
-Subject: [PATCH 19/19] Add resource files for DLL version information
-
----
- CMakeLists.txt | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ea7894442..7d9ec7322 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -612,8 +612,13 @@ list(APPEND LIBGLESV2_SOURCES
- "src/libGLESv2/proc_table_egl.h"
- "src/libGLESv2/proc_table_egl_autogen.cpp"
- "src/libGLESv2/resource.h"
-- "src/libGLESv2/libGLESv2_autogen.def"
- )
-+if (WIN32)
-+ list(APPEND LIBGLESV2_SOURCES
-+ "src/libGLESv2/libGLESv2_autogen.def"
-+ "src/libGLESv2/libGLESv2.rc"
-+ )
-+endif()
- add_library(libGLESv2 ${LIBGLESV2_SOURCES})
- target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE)
- target_compile_definitions(libGLESv2
-@@ -647,6 +652,7 @@ target_include_directories(libGLESv2 PUBLIC "$<INSTALL_INTERFACE:include>")
- # libEGL
- if(WIN32)
- set(libEGL_def
-+ "src/libEGL/libEGL.rc"
- "src/libEGL/libEGL_autogen.def"
- )
- endif()
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_googleangle/CMakeLists.txt b/3rdparty/ext_googleangle/CMakeLists.txt
deleted file mode 100644
index d9089e2ce8..0000000000
--- a/3rdparty/ext_googleangle/CMakeLists.txt
+++ /dev/null
@@ -1,141 +0,0 @@
-set(EXTPREFIX_googleangle "${EXTPREFIX}")
-
-#[[
-
-ANGLE Versioning:
-
-A branch in the format `chromium/<BUILD>` is created in the git repo of ANGLE.
-This build number correspond to the build number of Chromium releases. This
-can be tracked on OmahaProxy [1]. The latest release regardless of branch
-will likely use the latest commit of ANGLE on the corresponding branch.
-
-As of writing (2022-03-16) the latest Beta of Chromium is 100.0.4896.46.
-On my end it says in `chrome://gpu` that the ANGLE commit id is `faa96536d88a`.
-At the same time, the `chromium/4896` branch is at `b0f33007113d`, which is
-actually one commit ahead.
-
-How to update ANGLE:
-
-1. Clone the git repo of ANGLE [2] or fetch updates if already cloned, then
- checkout the current base commit.
-2. Apply patches on top of it:
- - `git am path/to/01-patches_qt5.12.12/* path/to/02-patches_krita/*`
- - Check below for actual filenames of the patches.
-3. Check the current latest Chromium Beta or Stable build number [1] to decide
- the new branch to use as base.
-4. Fetch the latest commit of that branch:
- - `git fetch origin chromium/xxxx`
-5. Rebase onto that branch:
- - `git rebase -i --onto origin/chromium/xxxx current_base_commit`
- - Note: Substitute `current_base_commit` with the base commit you started with.
-6. Generate new patches:
- - `git format-patch origin/chromium/xxxx -o path/to/output/`
- - `unix2dos path/to/output/*`
- - Then move the updated patches into the corresponding patches dir.
-7. Update the details below with the new base commit.
-8. Check the `DEPS` file for the latest commit for `third_party/zlib`, then
- update the details for the target `ext_googleangle_zlib` below.
-
-[1]: https://omahaproxy.appspot.com/
-[2]: https://chromium.googlesource.com/angle/angle
-
-]]
-
-# ANGLE Revision Information:
-#
-# Last updated: 2022-05-12
-# ANGLE branch: chromium/5005
-# ANGLE commit: f2280c0c5f935dccbaf528343d474c8fcdebe63a
-# Used by Chromium version: Beta 102.0.5005.49
-
-set(GOOGLE_ANGLE_BASE_COMMIT "f2280c0c5f935dccbaf528343d474c8fcdebe63a")
-set(ANGLE_COMMIT_DATE "2022-05-03")
-
-ExternalProject_Add(
- ext_googleangle
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME angle-${GOOGLE_ANGLE_BASE_COMMIT}.tar.gz
- # URL https://chromium.googlesource.com/angle/angle/+archive/${GOOGLE_ANGLE_BASE_COMMIT}.tar.gz
- # Note: Don't use the archive from googlesource, they don't use deterministic
- # timestamps so the file changes every time.
- URL https://github.com/google/angle/archive/${GOOGLE_ANGLE_BASE_COMMIT}.tar.gz
- URL_HASH SHA256=9d3ff60560b953dae7d7613b69dda643aef62390574114fdb1c9d4eada672049
-
- PATCH_COMMAND ${CMAKE_COMMAND} -E echo Patching ANGLE
- # backported fixes from upstream
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-D3D-Initialize-storage-after-generating-mipmap-image.patch
- # Patches from Qt 5.12.12:
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0001-ANGLE-Use-pixel-sizes-in-the-XAML-swap-chain.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0002-ANGLE-Add-support-for-querying-platform-device.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0003-ANGLE-Fix-Windows-Store-D3D-Trim-and-Level-9-require.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0004-ANGLE-fix-usage-of-shared-handles-for-WinRT-applicat.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0005-ANGLE-Fix-initialization-of-zero-sized-window.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0006-ANGLE-winrt-Do-full-screen-update-if-the-the-window-.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0007-Revert-Fix-scanForWantedComponents-not-ignoring-attr.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0008-ANGLE-Disable-multisampling-to-avoid-crash-in-Qt-app.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0009-ANGLE-Dynamically-load-D3D-compiler-from-a-list.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/01-patches_qt5.12.12/0010-ANGLE-clean-up-displays-on-dll-unload.patch
- # Patches for building with CMake, with CMakeLists.txt referenced from vcpkg and modified:
- # https://github.com/microsoft/vcpkg/blob/5a8a1dfff8e2dffd4c8cc2d1fc0da379ffd18b25/ports/angle/CMakeLists.txt
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0011-Fix-MinGW-build.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0012-Fix-Clang-MinGW-target-build.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0013-Add-CMake-build-file.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0014-CMake-Do-not-exclude-EGL-headers.patch
- # Patches for supporting HDR output on Windows:
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0015-Implement-openGL-surface-color-space-selection-in-An.patch
- # Miscellaneous fixes:
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0016-Reduce-flickering-when-resizing-window.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0017-Replace-extern-thread_local-to-avoid-GCC-mingw-w64-b.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/02-patches_krita/0019-Add-resource-files-for-DLL-identification.patch
- # Copy headers:
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/angle_commit.h ./
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/angle_commit.h ./src/common/
- # Copy third_party/zlib:
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/src-chromium_zlib ${CMAKE_CURRENT_BINARY_DIR}/src/third_party/zlib
-
- INSTALL_DIR ${EXTPREFIX_googleangle}
- CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_googleangle} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
- UPDATE_COMMAND ""
-
- SOURCE_DIR src
- BINARY_DIR build
- STAMP_DIR stamps
- DEPENDS ext_patch
-)
-
-# ANGLE requires `third_party/zlib` to be pulled separately. The git commit
-# that it expects can be found in the `DEPS` file at the root of the ANGLE
-# source tree.
-set(GOOGLE_ANGLE_THIRDPARTY_ZLIB_COMMIT "a6d209ab932df0f1c9d5b7dc67cfa74e8a3272c0")
-ExternalProject_Add(
- ext_googleangle_zlib
-
- # DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- # DOWNLOAD_NAME angle-zlib-${GOOGLE_ANGLE_THIRDPARTY_ZLIB_COMMIT}.tar.gz
- # URL https://chromium.googlesource.com/chromium/src/third_party/zlib/+archive/${GOOGLE_ANGLE_THIRDPARTY_ZLIB_COMMIT}.tar.gz
- # URL_HASH SHA256=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- # Note: Don't use the archive from googlesource, they don't use deterministic
- # timestamps so the file changes every time.
- GIT_REPOSITORY https://chromium.googlesource.com/chromium/src/third_party/zlib
- GIT_TAG ${GOOGLE_ANGLE_THIRDPARTY_ZLIB_COMMIT}
-
- UPDATE_COMMAND ""
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
-
- SOURCE_DIR src-chromium_zlib
- STAMP_DIR stamps
-
- STEP_TARGETS download
-)
-
-# This ensures that ANGLE's third_party/zlib will be downloaded before patching ANGLE.
-ExternalProject_Add_StepDependencies(ext_googleangle patch ext_googleangle_zlib-download)
-
-# Generate `angle_commit.h`
-string(SUBSTRING "${GOOGLE_ANGLE_BASE_COMMIT}" 0 12 ANGLE_COMMIT_HASH)
-set(ANGLE_COMMIT_HASH "${ANGLE_COMMIT_HASH}+krita_qt5")
-string(LENGTH "${ANGLE_COMMIT_HASH}" ANGLE_COMMIT_HASH_SIZE)
-configure_file(angle_commit.h.in ${CMAKE_CURRENT_BINARY_DIR}/angle_commit.h)
diff --git a/3rdparty/ext_googleangle/angle_commit.h.in b/3rdparty/ext_googleangle/angle_commit.h.in
deleted file mode 100644
index 62d52003fe..0000000000
--- a/3rdparty/ext_googleangle/angle_commit.h.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#define ANGLE_COMMIT_POSITION 0
-#cmakedefine ANGLE_COMMIT_HASH "@ANGLE_COMMIT_HASH@"
-#cmakedefine ANGLE_COMMIT_HASH_SIZE @ANGLE_COMMIT_HASH_SIZE@
-#cmakedefine ANGLE_COMMIT_DATE "@ANGLE_COMMIT_DATE@"
diff --git a/3rdparty/ext_gsl/CMakeLists.txt b/3rdparty/ext_gsl/CMakeLists.txt
deleted file mode 100644
index 4dddde3a3b..0000000000
--- a/3rdparty/ext_gsl/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# From https://github.com/ampl/gsl. which adds CMake support to gsl
-#
-if (UNIX)
-SET(EXTPREFIX_gsl "${EXTPREFIX}" )
-ExternalProject_Add( ext_gsl
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/ampl/gsl/archive/8eac3b0b5cffb90004a729f0675011e718f41379.zip
- URL_HASH SHA256=124bf79bfd2c3cb07df02a2b0e80e13d29a94cab8acae1c2c1e086474381a6c2
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gsl-android.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gsl-2.3_clang12.patch
- INSTALL_DIR ${EXTPREFIX_gsl}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_gsl} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DNO_AMPL_BINDINGS=ON
- UPDATE_COMMAND ""
-)
-else()
-SET(EXTPREFIX_gsl "${EXTPREFIX}" )
-ExternalProject_Add( ext_gsl
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/ampl/gsl/archive/8eac3b0b5cffb90004a729f0675011e718f41379.zip
- URL_HASH SHA256=124bf79bfd2c3cb07df02a2b0e80e13d29a94cab8acae1c2c1e086474381a6c2
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/windows-no-fPIC.patch
-
- INSTALL_DIR ${EXTPREFIX_gsl}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_gsl} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_TESTING=OFF -DNO_AMPL_BINDINGS=ON
- UPDATE_COMMAND ""
-)
-
-endif()
diff --git a/3rdparty/ext_gsl/gsl-2.3_clang12.patch b/3rdparty/ext_gsl/gsl-2.3_clang12.patch
deleted file mode 100644
index f13483b8eb..0000000000
--- a/3rdparty/ext_gsl/gsl-2.3_clang12.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff --git a/matrix/test_complex_source.c b/matrix/test_complex_source.c
-index 5f480ff..a3958e3 100644
---- a/matrix/test_complex_source.c
-+++ b/matrix/test_complex_source.c
-@@ -17,6 +17,8 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#include <unistd.h>
-+
- void FUNCTION (test, func) (const size_t M, const size_t N);
- void FUNCTION (test, ops) (const size_t P, const size_t Q);
- void FUNCTION (test, trap) (const size_t M, const size_t N);
-diff --git a/matrix/test_source.c b/matrix/test_source.c
-index 5f5f26d..dd1b727 100644
---- a/matrix/test_source.c
-+++ b/matrix/test_source.c
-@@ -17,6 +17,8 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#include <unistd.h>
-+
- void FUNCTION (test, func) (const size_t M, const size_t N);
- void FUNCTION (test, ops) (const size_t M, const size_t N);
- void FUNCTION (test, trap) (const size_t M, const size_t N);
-diff --git a/spmatrix/test.c b/spmatrix/test.c
-index 08e0f67..3d7811e 100644
---- a/spmatrix/test.c
-+++ b/spmatrix/test.c
-@@ -17,6 +17,7 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#include <unistd.h>
- #include <config.h>
- #include <stdlib.h>
- #include <math.h>
-diff --git a/vector/test_complex_source.c b/vector/test_complex_source.c
-index c48d631..79a8fda 100644
---- a/vector/test_complex_source.c
-+++ b/vector/test_complex_source.c
-@@ -17,6 +17,8 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#include <unistd.h>
-+
- void FUNCTION (test, func) (size_t stride, size_t N);
- void FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N);
- void FUNCTION (test, file) (size_t stride, size_t N);
-diff --git a/vector/test_source.c b/vector/test_source.c
-index 2a80266..03fc46a 100644
---- a/vector/test_source.c
-+++ b/vector/test_source.c
-@@ -17,6 +17,8 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#include <unistd.h>
-+
- void FUNCTION (test, func) (size_t stride, size_t N);
- void FUNCTION (test, ops) (size_t stride1, size_t stride2, size_t N);
- void FUNCTION (test, file) (size_t stride, size_t N);
diff --git a/3rdparty/ext_gsl/gsl-android.patch b/3rdparty/ext_gsl/gsl-android.patch
deleted file mode 100644
index 23abb79f00..0000000000
--- a/3rdparty/ext_gsl/gsl-android.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -386,6 +386,7 @@
- # Compiles the source code, runs the program and sets ${VAR} to 1 if the
- # return value is equal to ${RESULT}.
- macro(check_run_result SRC RESULT VAR)
-+ if (NOT ANDROID)
- set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c)
- file(WRITE ${SRC_FILE} "${SRC}")
- try_run(RUN_RESULT COMPILE_RESULT ${CMAKE_BINARY_DIR} ${SRC_FILE}
-@@ -393,6 +394,9 @@
- if (RUN_RESULT EQUAL ${RESULT})
- set(${VAR} 1)
- endif ()
-+ else()
-+ set(${VAR} 1)
-+ endif()
- endmacro()
-
- # Check IEEE comparisons, whether "x != x" is true for NaNs.
diff --git a/3rdparty/ext_gsl/windows-no-fPIC.patch b/3rdparty/ext_gsl/windows-no-fPIC.patch
deleted file mode 100644
index 3fc26f27b2..0000000000
--- a/3rdparty/ext_gsl/windows-no-fPIC.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index baf3946..c3f3ea4 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -698,7 +698,7 @@ endforeach ()
- if (BUILD_SHARED_LIBS)
- include(CheckCCompilerFlag)
- check_c_compiler_flag(-fPIC HAVE_FPIC)
-- if (HAVE_FPIC)
-+ if (HAVE_FPIC AND NOT WIN32)
- add_definitions(-fPIC)
- endif ()
- if (WIN32)
-@@ -791,7 +791,7 @@ if (GSL_INSTALL OR NOT DEFINED GSL_INSTALL)
- DESTINATION
- lib/cmake/${PACKAGE_NAME}-${PACKAGE_VERSION} )
- endif ()
--if(NOT MSVC)
-+if(NOT WIN32)
- target_compile_options(gsl PRIVATE -fPIC)
- target_compile_options(gslcblas PRIVATE -fPIC)
- endif()
diff --git a/3rdparty/ext_heif/0001-Quick-check-for-SSE-support.patch b/3rdparty/ext_heif/0001-Quick-check-for-SSE-support.patch
deleted file mode 100644
index 86bffa2a6c..0000000000
--- a/3rdparty/ext_heif/0001-Quick-check-for-SSE-support.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 92e4e078782bdb2a375631a1c7b28cbaec31cac6 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Wed, 17 Feb 2021 17:33:52 +0000
-Subject: [PATCH] Quick check for SSE support
-
----
- libde265/CMakeLists.txt | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/libde265/CMakeLists.txt b/libde265/CMakeLists.txt
-index 749c7fb..13aec57 100644
---- a/libde265/CMakeLists.txt
-+++ b/libde265/CMakeLists.txt
-@@ -88,6 +88,25 @@ add_definitions(-DLIBDE265_EXPORTS)
-
- add_subdirectory (encoder)
-
-+include(CheckCXXSourceCompiles)
-+check_cxx_source_compiles ("
-+ #include <immintrin.h>
-+ int main ()
-+ {
-+ __m128d a, b;
-+ double vals[2] = {0};
-+ a = _mm_loadu_pd (vals);
-+ b = _mm_add_pd (a,a);
-+ _mm_storeu_pd (vals,b);
-+ return (0);
-+ }"
-+ HAVE_SSE2)
-+
-+if (NOT HAVE_SSE2)
-+ message(STATUS "Disabling SSE optimizations, as the target doesn't support them")
-+ set(DISABLE_SSE TRUE)
-+endif()
-+
- if(NOT DISABLE_SSE)
- if (MSVC)
- set(SUPPORTS_SSE2 1)
---
-2.29.2.windows.1
-
diff --git a/3rdparty/ext_heif/0001-Silence-nasm-2.15-warnings.patch b/3rdparty/ext_heif/0001-Silence-nasm-2.15-warnings.patch
deleted file mode 100644
index 365818cf0e..0000000000
--- a/3rdparty/ext_heif/0001-Silence-nasm-2.15-warnings.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 0ad48d528f7fa187b493efd03f100e39f9651025 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Mon, 22 Feb 2021 12:42:32 +0000
-Subject: [PATCH 1/3] Silence nasm 2.15 warnings
-
-https://bitbucket.org/multicoreware/x265_git/issues/559/warnings-when-assembling-with-nasm-215
----
- source/cmake/CMakeASM_NASMInformation.cmake | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/source/cmake/CMakeASM_NASMInformation.cmake b/source/cmake/CMakeASM_NASMInformation.cmake
-index 45c0ad1..62767c2 100644
---- a/source/cmake/CMakeASM_NASMInformation.cmake
-+++ b/source/cmake/CMakeASM_NASMInformation.cmake
-@@ -40,6 +40,8 @@ else()
- list(APPEND ASM_FLAGS -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -DX265_NS=${X265_NS})
- endif()
-
-+list(APPEND ASM_FLAGS -w-macro-params-legacy)
-+
- list(APPEND ASM_FLAGS "${CMAKE_ASM_NASM_FLAGS}")
-
- if(CMAKE_BUILD_TYPE MATCHES Release)
---
-2.30.1.windows.1
-
diff --git a/3rdparty/ext_heif/0001-cdef-Disable-MSVC-optimizations-for-filter_block.patch b/3rdparty/ext_heif/0001-cdef-Disable-MSVC-optimizations-for-filter_block.patch
deleted file mode 100644
index b4c8e6b18d..0000000000
--- a/3rdparty/ext_heif/0001-cdef-Disable-MSVC-optimizations-for-filter_block.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From ad8c7acc1ab3cf784a19a808dc86627c2ef94cfc Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sat, 22 Apr 2023 22:47:03 -0300
-Subject: [PATCH] cdef: Disable MSVC optimizations for filter_block
-
-This brings build time to 1m44s in my Ryzen 7 2700x, from >15m per file.
-
-BUG: aomedia:3395
-Change-Id: Ie53dc51dfe1f8823fc36ee8656b2d6038c7c98ab
-(cherry picked from commit b07a503eeaac1b1567ba9509b0c15c84f1ee8463)
----
- av1/common/cdef_block_simd.h | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/av1/common/cdef_block_simd.h b/av1/common/cdef_block_simd.h
-index df6787177..c736c9009 100644
---- a/av1/common/cdef_block_simd.h
-+++ b/av1/common/cdef_block_simd.h
-@@ -270,6 +270,12 @@ SIMD_INLINE v256 get_max_secondary(const int is_lowbd, v256 *tap, v256 max,
- return max;
- }
-
-+// MSVC takes far too much time optimizing these.
-+// https://bugs.chromium.org/p/aomedia/issues/detail?id=3395
-+#if defined(_MSC_VER) && !defined(__clang__)
-+#pragma optimize("", off)
-+#endif
-+
- CDEF_INLINE void filter_block_4x4(const int is_lowbd, void *dest, int dstride,
- const uint16_t *in, int pri_strength,
- int sec_strength, int dir, int pri_damping,
-@@ -617,6 +623,10 @@ CDEF_INLINE void filter_block_8x8(const int is_lowbd, void *dest, int dstride,
- }
- }
-
-+#if defined(_MSC_VER) && !defined(__clang__)
-+#pragma optimize("", on)
-+#endif
-+
- SIMD_INLINE void copy_block_4xh(const int is_lowbd, void *dest, int dstride,
- const uint16_t *in, int height) {
- uint8_t *dst8 = (uint8_t *)dest;
---
-2.40.1.windows.1
-
diff --git a/3rdparty/ext_heif/0001-ext_heif-Make-sure-that-pthreads-are-not-linked-it-o.patch b/3rdparty/ext_heif/0001-ext_heif-Make-sure-that-pthreads-are-not-linked-it-o.patch
deleted file mode 100644
index e36e85bb6c..0000000000
--- a/3rdparty/ext_heif/0001-ext_heif-Make-sure-that-pthreads-are-not-linked-it-o.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 628d705280068a9ebecc666acf1265315e7a3dfb Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Mon, 11 Mar 2024 12:58:32 +0100
-Subject: [PATCH] [ext_heif] Make sure that pthreads are not linked it on
- Android
-
----
- source/CMakeLists.txt | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
-index fbc17f0..75c2414 100755
---- a/source/CMakeLists.txt
-+++ b/source/CMakeLists.txt
-@@ -94,7 +94,9 @@ else()
- endif()
-
- if(UNIX)
-- list(APPEND PLATFORM_LIBS pthread)
-+ if(NOT ANDROID)
-+ list(APPEND PLATFORM_LIBS pthread)
-+ endif()
- find_library(LIBRT rt)
- if(LIBRT)
- list(APPEND PLATFORM_LIBS rt)
---
-2.25.1
-
diff --git a/3rdparty/ext_heif/0003-Skip-PDB-in-MinGW.patch b/3rdparty/ext_heif/0003-Skip-PDB-in-MinGW.patch
deleted file mode 100644
index d409273894..0000000000
--- a/3rdparty/ext_heif/0003-Skip-PDB-in-MinGW.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 92eb7b933de20a47d69ac99d22983a8ee8376f55 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Mon, 22 Feb 2021 13:59:19 +0000
-Subject: [PATCH 3/3] Skip PDB in MinGW
-
----
- source/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
-index 95218f5..6de921d 100644
---- a/source/CMakeLists.txt
-+++ b/source/CMakeLists.txt
-@@ -599,7 +599,7 @@ if(SVTHEVC_FOUND)
- endif()
-
- install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
--if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
-+if((WIN32 AND NOT MINGW AND ENABLE_CLI) OR (WIN32 AND NOT MINGW AND ENABLE_SHARED))
- if(MSVC_IDE)
- install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
- install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
---
-2.30.1.windows.1
-
diff --git a/3rdparty/ext_heif/0003-arm-asm-primitives.patch b/3rdparty/ext_heif/0003-arm-asm-primitives.patch
deleted file mode 100644
index e500443429..0000000000
--- a/3rdparty/ext_heif/0003-arm-asm-primitives.patch
+++ /dev/null
@@ -1,354 +0,0 @@
-Fixes "arm assembly fail to compile on 1.8"
-
-Downloaded from upstream bug report:
-https://bitbucket.org/multicoreware/x265/issues/406
-
-Signed-off-by: Bernd Kuhls <[email protected]>
-
---- ./source/common/arm/asm-primitives.cpp.orig 2018-05-21 02:33:10.000000000 -0600
-+++ ./source/common/arm/asm-primitives.cpp 2018-05-28 20:38:37.302378303 -0600
-@@ -48,77 +48,77 @@ void setupAssemblyPrimitives(EncoderPrim
- p.ssim_4x4x2_core = PFX(ssim_4x4x2_core_neon);
-
- // addAvg
-- p.pu[LUMA_4x4].addAvg = PFX(addAvg_4x4_neon);
-- p.pu[LUMA_4x8].addAvg = PFX(addAvg_4x8_neon);
-- p.pu[LUMA_4x16].addAvg = PFX(addAvg_4x16_neon);
-- p.pu[LUMA_8x4].addAvg = PFX(addAvg_8x4_neon);
-- p.pu[LUMA_8x8].addAvg = PFX(addAvg_8x8_neon);
-- p.pu[LUMA_8x16].addAvg = PFX(addAvg_8x16_neon);
-- p.pu[LUMA_8x32].addAvg = PFX(addAvg_8x32_neon);
-- p.pu[LUMA_12x16].addAvg = PFX(addAvg_12x16_neon);
-- p.pu[LUMA_16x4].addAvg = PFX(addAvg_16x4_neon);
-- p.pu[LUMA_16x8].addAvg = PFX(addAvg_16x8_neon);
-- p.pu[LUMA_16x12].addAvg = PFX(addAvg_16x12_neon);
-- p.pu[LUMA_16x16].addAvg = PFX(addAvg_16x16_neon);
-- p.pu[LUMA_16x32].addAvg = PFX(addAvg_16x32_neon);
-- p.pu[LUMA_16x64].addAvg = PFX(addAvg_16x64_neon);
-- p.pu[LUMA_24x32].addAvg = PFX(addAvg_24x32_neon);
-- p.pu[LUMA_32x8].addAvg = PFX(addAvg_32x8_neon);
-- p.pu[LUMA_32x16].addAvg = PFX(addAvg_32x16_neon);
-- p.pu[LUMA_32x24].addAvg = PFX(addAvg_32x24_neon);
-- p.pu[LUMA_32x32].addAvg = PFX(addAvg_32x32_neon);
-- p.pu[LUMA_32x64].addAvg = PFX(addAvg_32x64_neon);
-- p.pu[LUMA_48x64].addAvg = PFX(addAvg_48x64_neon);
-- p.pu[LUMA_64x16].addAvg = PFX(addAvg_64x16_neon);
-- p.pu[LUMA_64x32].addAvg = PFX(addAvg_64x32_neon);
-- p.pu[LUMA_64x48].addAvg = PFX(addAvg_64x48_neon);
-- p.pu[LUMA_64x64].addAvg = PFX(addAvg_64x64_neon);
-+ p.pu[LUMA_4x4].addAvg[ALIGNED] = PFX(addAvg_4x4_neon);
-+ p.pu[LUMA_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon);
-+ p.pu[LUMA_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon);
-+ p.pu[LUMA_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon);
-+ p.pu[LUMA_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon);
-+ p.pu[LUMA_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon);
-+ p.pu[LUMA_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon);
-+ p.pu[LUMA_12x16].addAvg[ALIGNED] = PFX(addAvg_12x16_neon);
-+ p.pu[LUMA_16x4].addAvg[ALIGNED] = PFX(addAvg_16x4_neon);
-+ p.pu[LUMA_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon);
-+ p.pu[LUMA_16x12].addAvg[ALIGNED] = PFX(addAvg_16x12_neon);
-+ p.pu[LUMA_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon);
-+ p.pu[LUMA_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon);
-+ p.pu[LUMA_16x64].addAvg[ALIGNED] = PFX(addAvg_16x64_neon);
-+ p.pu[LUMA_24x32].addAvg[ALIGNED] = PFX(addAvg_24x32_neon);
-+ p.pu[LUMA_32x8].addAvg[ALIGNED] = PFX(addAvg_32x8_neon);
-+ p.pu[LUMA_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon);
-+ p.pu[LUMA_32x24].addAvg[ALIGNED] = PFX(addAvg_32x24_neon);
-+ p.pu[LUMA_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon);
-+ p.pu[LUMA_32x64].addAvg[ALIGNED] = PFX(addAvg_32x64_neon);
-+ p.pu[LUMA_48x64].addAvg[ALIGNED] = PFX(addAvg_48x64_neon);
-+ p.pu[LUMA_64x16].addAvg[ALIGNED] = PFX(addAvg_64x16_neon);
-+ p.pu[LUMA_64x32].addAvg[ALIGNED] = PFX(addAvg_64x32_neon);
-+ p.pu[LUMA_64x48].addAvg[ALIGNED] = PFX(addAvg_64x48_neon);
-+ p.pu[LUMA_64x64].addAvg[ALIGNED] = PFX(addAvg_64x64_neon);
-
- // chroma addAvg
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x2].addAvg = PFX(addAvg_4x2_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].addAvg = PFX(addAvg_4x4_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x8].addAvg = PFX(addAvg_4x8_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_4x16].addAvg = PFX(addAvg_4x16_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_6x8].addAvg = PFX(addAvg_6x8_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x2].addAvg = PFX(addAvg_8x2_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].addAvg = PFX(addAvg_8x4_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x6].addAvg = PFX(addAvg_8x6_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x8].addAvg = PFX(addAvg_8x8_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x16].addAvg = PFX(addAvg_8x16_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_8x32].addAvg = PFX(addAvg_8x32_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].addAvg = PFX(addAvg_12x16_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].addAvg = PFX(addAvg_16x4_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x8].addAvg = PFX(addAvg_16x8_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].addAvg = PFX(addAvg_16x12_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x16].addAvg = PFX(addAvg_16x16_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].addAvg = PFX(addAvg_16x32_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].addAvg = PFX(addAvg_24x32_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].addAvg = PFX(addAvg_32x8_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x16].addAvg = PFX(addAvg_32x16_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].addAvg = PFX(addAvg_32x24_neon);
-- p.chroma[X265_CSP_I420].pu[CHROMA_420_32x32].addAvg = PFX(addAvg_32x32_neon);
--
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x8].addAvg = PFX(addAvg_4x8_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x16].addAvg = PFX(addAvg_4x16_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_4x32].addAvg = PFX(addAvg_4x32_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_6x16].addAvg = PFX(addAvg_6x16_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x4].addAvg = PFX(addAvg_8x4_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x8].addAvg = PFX(addAvg_8x8_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x12].addAvg = PFX(addAvg_8x12_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x16].addAvg = PFX(addAvg_8x16_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x32].addAvg = PFX(addAvg_8x32_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_8x64].addAvg = PFX(addAvg_8x64_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].addAvg = PFX(addAvg_12x32_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x8].addAvg = PFX(addAvg_16x8_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x16].addAvg = PFX(addAvg_16x16_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x24].addAvg = PFX(addAvg_16x24_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x32].addAvg = PFX(addAvg_16x32_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_16x64].addAvg = PFX(addAvg_16x64_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_24x64].addAvg = PFX(addAvg_24x64_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x16].addAvg = PFX(addAvg_32x16_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x32].addAvg = PFX(addAvg_32x32_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].addAvg = PFX(addAvg_32x48_neon);
-- p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].addAvg = PFX(addAvg_32x64_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x2].addAvg[ALIGNED] = PFX(addAvg_4x2_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].addAvg[ALIGNED] = PFX(addAvg_4x4_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_6x8].addAvg[ALIGNED] = PFX(addAvg_6x8_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x2].addAvg[ALIGNED] = PFX(addAvg_8x2_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x6].addAvg[ALIGNED] = PFX(addAvg_8x6_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].addAvg[ALIGNED] = PFX(addAvg_12x16_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].addAvg[ALIGNED] = PFX(addAvg_16x4_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].addAvg[ALIGNED] = PFX(addAvg_16x12_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].addAvg[ALIGNED] = PFX(addAvg_24x32_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].addAvg[ALIGNED] = PFX(addAvg_32x8_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].addAvg[ALIGNED] = PFX(addAvg_32x24_neon);
-+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon);
-+
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x8].addAvg[ALIGNED] = PFX(addAvg_4x8_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x16].addAvg[ALIGNED] = PFX(addAvg_4x16_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_4x32].addAvg[ALIGNED] = PFX(addAvg_4x32_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_6x16].addAvg[ALIGNED] = PFX(addAvg_6x16_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x4].addAvg[ALIGNED] = PFX(addAvg_8x4_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x8].addAvg[ALIGNED] = PFX(addAvg_8x8_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x12].addAvg[ALIGNED] = PFX(addAvg_8x12_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x16].addAvg[ALIGNED] = PFX(addAvg_8x16_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x32].addAvg[ALIGNED] = PFX(addAvg_8x32_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_8x64].addAvg[ALIGNED] = PFX(addAvg_8x64_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].addAvg[ALIGNED] = PFX(addAvg_12x32_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x8].addAvg[ALIGNED] = PFX(addAvg_16x8_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x16].addAvg[ALIGNED] = PFX(addAvg_16x16_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x24].addAvg[ALIGNED] = PFX(addAvg_16x24_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x32].addAvg[ALIGNED] = PFX(addAvg_16x32_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_16x64].addAvg[ALIGNED] = PFX(addAvg_16x64_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_24x64].addAvg[ALIGNED] = PFX(addAvg_24x64_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x16].addAvg[ALIGNED] = PFX(addAvg_32x16_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x32].addAvg[ALIGNED] = PFX(addAvg_32x32_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].addAvg[ALIGNED] = PFX(addAvg_32x48_neon);
-+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].addAvg[ALIGNED] = PFX(addAvg_32x64_neon);
-
- // quant
- p.quant = PFX(quant_neon);
-@@ -402,7 +402,7 @@ void setupAssemblyPrimitives(EncoderPrim
- p.scale2D_64to32 = PFX(scale2D_64to32_neon);
-
- // scale1D_128to64
-- p.scale1D_128to64 = PFX(scale1D_128to64_neon);
-+ p.scale1D_128to64[ALIGNED] = PFX(scale1D_128to64_neon);
-
- // copy_count
- p.cu[BLOCK_4x4].copy_cnt = PFX(copy_cnt_4_neon);
-@@ -411,37 +411,37 @@ void setupAssemblyPrimitives(EncoderPrim
- p.cu[BLOCK_32x32].copy_cnt = PFX(copy_cnt_32_neon);
-
- // filterPixelToShort
-- p.pu[LUMA_4x4].convert_p2s = PFX(filterPixelToShort_4x4_neon);
-- p.pu[LUMA_4x8].convert_p2s = PFX(filterPixelToShort_4x8_neon);
-- p.pu[LUMA_4x16].convert_p2s = PFX(filterPixelToShort_4x16_neon);
-- p.pu[LUMA_8x4].convert_p2s = PFX(filterPixelToShort_8x4_neon);
-- p.pu[LUMA_8x8].convert_p2s = PFX(filterPixelToShort_8x8_neon);
-- p.pu[LUMA_8x16].convert_p2s = PFX(filterPixelToShort_8x16_neon);
-- p.pu[LUMA_8x32].convert_p2s = PFX(filterPixelToShort_8x32_neon);
-- p.pu[LUMA_12x16].convert_p2s = PFX(filterPixelToShort_12x16_neon);
-- p.pu[LUMA_16x4].convert_p2s = PFX(filterPixelToShort_16x4_neon);
-- p.pu[LUMA_16x8].convert_p2s = PFX(filterPixelToShort_16x8_neon);
-- p.pu[LUMA_16x12].convert_p2s = PFX(filterPixelToShort_16x12_neon);
-- p.pu[LUMA_16x16].convert_p2s = PFX(filterPixelToShort_16x16_neon);
-- p.pu[LUMA_16x32].convert_p2s = PFX(filterPixelToShort_16x32_neon);
-- p.pu[LUMA_16x64].convert_p2s = PFX(filterPixelToShort_16x64_neon);
-- p.pu[LUMA_24x32].convert_p2s = PFX(filterPixelToShort_24x32_neon);
-- p.pu[LUMA_32x8].convert_p2s = PFX(filterPixelToShort_32x8_neon);
-- p.pu[LUMA_32x16].convert_p2s = PFX(filterPixelToShort_32x16_neon);
-- p.pu[LUMA_32x24].convert_p2s = PFX(filterPixelToShort_32x24_neon);
-- p.pu[LUMA_32x32].convert_p2s = PFX(filterPixelToShort_32x32_neon);
-- p.pu[LUMA_32x64].convert_p2s = PFX(filterPixelToShort_32x64_neon);
-- p.pu[LUMA_48x64].convert_p2s = PFX(filterPixelToShort_48x64_neon);
-- p.pu[LUMA_64x16].convert_p2s = PFX(filterPixelToShort_64x16_neon);
-- p.pu[LUMA_64x32].convert_p2s = PFX(filterPixelToShort_64x32_neon);
-- p.pu[LUMA_64x48].convert_p2s = PFX(filterPixelToShort_64x48_neon);
-- p.pu[LUMA_64x64].convert_p2s = PFX(filterPixelToShort_64x64_neon);
-+ p.pu[LUMA_4x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x4_neon);
-+ p.pu[LUMA_4x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x8_neon);
-+ p.pu[LUMA_4x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_4x16_neon);
-+ p.pu[LUMA_8x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x4_neon);
-+ p.pu[LUMA_8x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x8_neon);
-+ p.pu[LUMA_8x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x16_neon);
-+ p.pu[LUMA_8x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_8x32_neon);
-+ p.pu[LUMA_12x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_12x16_neon);
-+ p.pu[LUMA_16x4].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x4_neon);
-+ p.pu[LUMA_16x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x8_neon);
-+ p.pu[LUMA_16x12].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x12_neon);
-+ p.pu[LUMA_16x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x16_neon);
-+ p.pu[LUMA_16x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x32_neon);
-+ p.pu[LUMA_16x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_16x64_neon);
-+ p.pu[LUMA_24x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_24x32_neon);
-+ p.pu[LUMA_32x8].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x8_neon);
-+ p.pu[LUMA_32x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x16_neon);
-+ p.pu[LUMA_32x24].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x24_neon);
-+ p.pu[LUMA_32x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x32_neon);
-+ p.pu[LUMA_32x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_32x64_neon);
-+ p.pu[LUMA_48x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_48x64_neon);
-+ p.pu[LUMA_64x16].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x16_neon);
-+ p.pu[LUMA_64x32].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x32_neon);
-+ p.pu[LUMA_64x48].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x48_neon);
-+ p.pu[LUMA_64x64].convert_p2s[ALIGNED] = PFX(filterPixelToShort_64x64_neon);
-
- // Block_fill
-- p.cu[BLOCK_4x4].blockfill_s = PFX(blockfill_s_4x4_neon);
-- p.cu[BLOCK_8x8].blockfill_s = PFX(blockfill_s_8x8_neon);
-- p.cu[BLOCK_16x16].blockfill_s = PFX(blockfill_s_16x16_neon);
-- p.cu[BLOCK_32x32].blockfill_s = PFX(blockfill_s_32x32_neon);
-+ p.cu[BLOCK_4x4].blockfill_s[ALIGNED] = PFX(blockfill_s_4x4_neon);
-+ p.cu[BLOCK_8x8].blockfill_s[ALIGNED] = PFX(blockfill_s_8x8_neon);
-+ p.cu[BLOCK_16x16].blockfill_s[ALIGNED] = PFX(blockfill_s_16x16_neon);
-+ p.cu[BLOCK_32x32].blockfill_s[ALIGNED] = PFX(blockfill_s_32x32_neon);
-
- // Blockcopy_ss
- p.cu[BLOCK_4x4].copy_ss = PFX(blockcopy_ss_4x4_neon);
-@@ -495,21 +495,21 @@ void setupAssemblyPrimitives(EncoderPrim
- p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].copy_sp = PFX(blockcopy_sp_32x64_neon);
-
- // pixel_add_ps
-- p.cu[BLOCK_4x4].add_ps = PFX(pixel_add_ps_4x4_neon);
-- p.cu[BLOCK_8x8].add_ps = PFX(pixel_add_ps_8x8_neon);
-- p.cu[BLOCK_16x16].add_ps = PFX(pixel_add_ps_16x16_neon);
-- p.cu[BLOCK_32x32].add_ps = PFX(pixel_add_ps_32x32_neon);
-- p.cu[BLOCK_64x64].add_ps = PFX(pixel_add_ps_64x64_neon);
-+ p.cu[BLOCK_4x4].add_ps[ALIGNED] = PFX(pixel_add_ps_4x4_neon);
-+ p.cu[BLOCK_8x8].add_ps[ALIGNED] = PFX(pixel_add_ps_8x8_neon);
-+ p.cu[BLOCK_16x16].add_ps[ALIGNED] = PFX(pixel_add_ps_16x16_neon);
-+ p.cu[BLOCK_32x32].add_ps[ALIGNED] = PFX(pixel_add_ps_32x32_neon);
-+ p.cu[BLOCK_64x64].add_ps[ALIGNED] = PFX(pixel_add_ps_64x64_neon);
-
- // chroma add_ps
-- p.chroma[X265_CSP_I420].cu[BLOCK_420_4x4].add_ps = PFX(pixel_add_ps_4x4_neon);
-- p.chroma[X265_CSP_I420].cu[BLOCK_420_8x8].add_ps = PFX(pixel_add_ps_8x8_neon);
-- p.chroma[X265_CSP_I420].cu[BLOCK_420_16x16].add_ps = PFX(pixel_add_ps_16x16_neon);
-- p.chroma[X265_CSP_I420].cu[BLOCK_420_32x32].add_ps = PFX(pixel_add_ps_32x32_neon);
-- p.chroma[X265_CSP_I422].cu[BLOCK_422_4x8].add_ps = PFX(pixel_add_ps_4x8_neon);
-- p.chroma[X265_CSP_I422].cu[BLOCK_422_8x16].add_ps = PFX(pixel_add_ps_8x16_neon);
-- p.chroma[X265_CSP_I422].cu[BLOCK_422_16x32].add_ps = PFX(pixel_add_ps_16x32_neon);
-- p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].add_ps = PFX(pixel_add_ps_32x64_neon);
-+ p.chroma[X265_CSP_I420].cu[BLOCK_420_4x4].add_ps[ALIGNED] = PFX(pixel_add_ps_4x4_neon);
-+ p.chroma[X265_CSP_I420].cu[BLOCK_420_8x8].add_ps[ALIGNED] = PFX(pixel_add_ps_8x8_neon);
-+ p.chroma[X265_CSP_I420].cu[BLOCK_420_16x16].add_ps[ALIGNED] = PFX(pixel_add_ps_16x16_neon);
-+ p.chroma[X265_CSP_I420].cu[BLOCK_420_32x32].add_ps[ALIGNED] = PFX(pixel_add_ps_32x32_neon);
-+ p.chroma[X265_CSP_I422].cu[BLOCK_422_4x8].add_ps[ALIGNED] = PFX(pixel_add_ps_4x8_neon);
-+ p.chroma[X265_CSP_I422].cu[BLOCK_422_8x16].add_ps[ALIGNED] = PFX(pixel_add_ps_8x16_neon);
-+ p.chroma[X265_CSP_I422].cu[BLOCK_422_16x32].add_ps[ALIGNED] = PFX(pixel_add_ps_16x32_neon);
-+ p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].add_ps[ALIGNED] = PFX(pixel_add_ps_32x64_neon);
-
- // cpy2Dto1D_shr
- p.cu[BLOCK_4x4].cpy2Dto1D_shr = PFX(cpy2Dto1D_shr_4x4_neon);
-@@ -518,10 +518,10 @@ void setupAssemblyPrimitives(EncoderPrim
- p.cu[BLOCK_32x32].cpy2Dto1D_shr = PFX(cpy2Dto1D_shr_32x32_neon);
-
- // ssd_s
-- p.cu[BLOCK_4x4].ssd_s = PFX(pixel_ssd_s_4x4_neon);
-- p.cu[BLOCK_8x8].ssd_s = PFX(pixel_ssd_s_8x8_neon);
-- p.cu[BLOCK_16x16].ssd_s = PFX(pixel_ssd_s_16x16_neon);
-- p.cu[BLOCK_32x32].ssd_s = PFX(pixel_ssd_s_32x32_neon);
-+ p.cu[BLOCK_4x4].ssd_s[ALIGNED] = PFX(pixel_ssd_s_4x4_neon);
-+ p.cu[BLOCK_8x8].ssd_s[ALIGNED] = PFX(pixel_ssd_s_8x8_neon);
-+ p.cu[BLOCK_16x16].ssd_s[ALIGNED] = PFX(pixel_ssd_s_16x16_neon);
-+ p.cu[BLOCK_32x32].ssd_s[ALIGNED] = PFX(pixel_ssd_s_32x32_neon);
-
- // sse_ss
- p.cu[BLOCK_4x4].sse_ss = PFX(pixel_sse_ss_4x4_neon);
-@@ -548,10 +548,10 @@ void setupAssemblyPrimitives(EncoderPrim
- p.chroma[X265_CSP_I422].cu[BLOCK_422_32x64].sub_ps = PFX(pixel_sub_ps_32x64_neon);
-
- // calc_Residual
-- p.cu[BLOCK_4x4].calcresidual = PFX(getResidual4_neon);
-- p.cu[BLOCK_8x8].calcresidual = PFX(getResidual8_neon);
-- p.cu[BLOCK_16x16].calcresidual = PFX(getResidual16_neon);
-- p.cu[BLOCK_32x32].calcresidual = PFX(getResidual32_neon);
-+ p.cu[BLOCK_4x4].calcresidual[ALIGNED] = PFX(getResidual4_neon);
-+ p.cu[BLOCK_8x8].calcresidual[ALIGNED] = PFX(getResidual8_neon);
-+ p.cu[BLOCK_16x16].calcresidual[ALIGNED] = PFX(getResidual16_neon);
-+ p.cu[BLOCK_32x32].calcresidual[ALIGNED] = PFX(getResidual32_neon);
-
- // sse_pp
- p.cu[BLOCK_4x4].sse_pp = PFX(pixel_sse_pp_4x4_neon);
-@@ -722,31 +722,31 @@ void setupAssemblyPrimitives(EncoderPrim
- p.pu[LUMA_64x64].sad_x4 = PFX(sad_x4_64x64_neon);
-
- // pixel_avg_pp
-- p.pu[LUMA_4x4].pixelavg_pp = PFX(pixel_avg_pp_4x4_neon);
-- p.pu[LUMA_4x8].pixelavg_pp = PFX(pixel_avg_pp_4x8_neon);
-- p.pu[LUMA_4x16].pixelavg_pp = PFX(pixel_avg_pp_4x16_neon);
-- p.pu[LUMA_8x4].pixelavg_pp = PFX(pixel_avg_pp_8x4_neon);
-- p.pu[LUMA_8x8].pixelavg_pp = PFX(pixel_avg_pp_8x8_neon);
-- p.pu[LUMA_8x16].pixelavg_pp = PFX(pixel_avg_pp_8x16_neon);
-- p.pu[LUMA_8x32].pixelavg_pp = PFX(pixel_avg_pp_8x32_neon);
-- p.pu[LUMA_12x16].pixelavg_pp = PFX(pixel_avg_pp_12x16_neon);
-- p.pu[LUMA_16x4].pixelavg_pp = PFX(pixel_avg_pp_16x4_neon);
-- p.pu[LUMA_16x8].pixelavg_pp = PFX(pixel_avg_pp_16x8_neon);
-- p.pu[LUMA_16x12].pixelavg_pp = PFX(pixel_avg_pp_16x12_neon);
-- p.pu[LUMA_16x16].pixelavg_pp = PFX(pixel_avg_pp_16x16_neon);
-- p.pu[LUMA_16x32].pixelavg_pp = PFX(pixel_avg_pp_16x32_neon);
-- p.pu[LUMA_16x64].pixelavg_pp = PFX(pixel_avg_pp_16x64_neon);
-- p.pu[LUMA_24x32].pixelavg_pp = PFX(pixel_avg_pp_24x32_neon);
-- p.pu[LUMA_32x8].pixelavg_pp = PFX(pixel_avg_pp_32x8_neon);
-- p.pu[LUMA_32x16].pixelavg_pp = PFX(pixel_avg_pp_32x16_neon);
-- p.pu[LUMA_32x24].pixelavg_pp = PFX(pixel_avg_pp_32x24_neon);
-- p.pu[LUMA_32x32].pixelavg_pp = PFX(pixel_avg_pp_32x32_neon);
-- p.pu[LUMA_32x64].pixelavg_pp = PFX(pixel_avg_pp_32x64_neon);
-- p.pu[LUMA_48x64].pixelavg_pp = PFX(pixel_avg_pp_48x64_neon);
-- p.pu[LUMA_64x16].pixelavg_pp = PFX(pixel_avg_pp_64x16_neon);
-- p.pu[LUMA_64x32].pixelavg_pp = PFX(pixel_avg_pp_64x32_neon);
-- p.pu[LUMA_64x48].pixelavg_pp = PFX(pixel_avg_pp_64x48_neon);
-- p.pu[LUMA_64x64].pixelavg_pp = PFX(pixel_avg_pp_64x64_neon);
-+ p.pu[LUMA_4x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x4_neon);
-+ p.pu[LUMA_4x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x8_neon);
-+ p.pu[LUMA_4x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_4x16_neon);
-+ p.pu[LUMA_8x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x4_neon);
-+ p.pu[LUMA_8x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x8_neon);
-+ p.pu[LUMA_8x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x16_neon);
-+ p.pu[LUMA_8x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_8x32_neon);
-+ p.pu[LUMA_12x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_12x16_neon);
-+ p.pu[LUMA_16x4].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x4_neon);
-+ p.pu[LUMA_16x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x8_neon);
-+ p.pu[LUMA_16x12].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x12_neon);
-+ p.pu[LUMA_16x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x16_neon);
-+ p.pu[LUMA_16x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x32_neon);
-+ p.pu[LUMA_16x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_16x64_neon);
-+ p.pu[LUMA_24x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_24x32_neon);
-+ p.pu[LUMA_32x8].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x8_neon);
-+ p.pu[LUMA_32x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x16_neon);
-+ p.pu[LUMA_32x24].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x24_neon);
-+ p.pu[LUMA_32x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x32_neon);
-+ p.pu[LUMA_32x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_32x64_neon);
-+ p.pu[LUMA_48x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_48x64_neon);
-+ p.pu[LUMA_64x16].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x16_neon);
-+ p.pu[LUMA_64x32].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x32_neon);
-+ p.pu[LUMA_64x48].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x48_neon);
-+ p.pu[LUMA_64x64].pixelavg_pp[ALIGNED] = PFX(pixel_avg_pp_64x64_neon);
-
- // planecopy
- p.planecopy_cp = PFX(pixel_planecopy_cp_neon);
diff --git a/3rdparty/ext_heif/A01-build-fix.patch b/3rdparty/ext_heif/A01-build-fix.patch
deleted file mode 100644
index 38b2702053..0000000000
--- a/3rdparty/ext_heif/A01-build-fix.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
-index 60031df63..7120f9414 100755
---- a/source/CMakeLists.txt
-+++ b/source/CMakeLists.txt
-@@ -260,7 +260,13 @@ if(GCC)
- endif()
- endif()
- if(ARM64 OR CROSS_COMPILE_ARM64)
-- set(ARM_ARGS -fPIC -flax-vector-conversions)
-+ if (MINGW)
-+ set(ARM_ARGS -flax-vector-conversions)
-+ elseif(APPLE)
-+ set(ARM_ARGS -fPIC -flax-vector-conversions -arch ${CMAKE_OSX_ARCHITECTURES})
-+ else()
-+ set(ARM_ARGS -fPIC -flax-vector-conversions)
-+ endif()
- find_package(Neon)
- if(CPU_HAS_NEON)
- add_definitions(-DHAVE_NEON)
diff --git a/3rdparty/ext_heif/A02-threads-priority.patch b/3rdparty/ext_heif/A02-threads-priority.patch
deleted file mode 100644
index 1dedf86bb2..0000000000
--- a/3rdparty/ext_heif/A02-threads-priority.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp
-index 2db7a146b..4ed534d6b 100644
---- a/source/common/threadpool.cpp
-+++ b/source/common/threadpool.cpp
-@@ -115,12 +115,6 @@ void WorkerThread::threadMain()
- {
- THREAD_NAME("Worker", m_id);
-
--#if _WIN32
-- SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
--#else
-- __attribute__((unused)) int val = nice(10);
--#endif
--
- m_pool.setCurrentThreadAffinity();
-
- sleepbitmap_t idBit = (sleepbitmap_t)1 << m_id;
-
diff --git a/3rdparty/ext_heif/A03-threads-pool-adjustments.patch b/3rdparty/ext_heif/A03-threads-pool-adjustments.patch
deleted file mode 100644
index e429e8b53e..0000000000
--- a/3rdparty/ext_heif/A03-threads-pool-adjustments.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp
-index 4ed534d..f67f752 100644
---- a/source/common/threadpool.cpp
-+++ b/source/common/threadpool.cpp
-@@ -661,9 +661,17 @@ void ThreadPool::getFrameThreadsCount(x265_param* p, int cpuCount)
- else if (cpuCount >= 32)
- p->frameNumThreads = (p->sourceHeight > 2000) ? 6 : 5;
- else if (cpuCount >= 16)
-- p->frameNumThreads = 4;
-+#if MACOS && X265_ARCH_ARM64
-+ p->frameNumThreads = 16;
-+#else
-+ p->frameNumThreads = 4;
-+#endif
- else if (cpuCount >= 8)
-+#if MACOS && X265_ARCH_ARM64
-+ p->frameNumThreads = 8;
-+#else
- p->frameNumThreads = 3;
-+#endif
- else if (cpuCount >= 4)
- p->frameNumThreads = 2;
- else
diff --git a/3rdparty/ext_heif/A04-64-bit_for_aarch64.patch b/3rdparty/ext_heif/A04-64-bit_for_aarch64.patch
deleted file mode 100644
index 3dab453ded..0000000000
--- a/3rdparty/ext_heif/A04-64-bit_for_aarch64.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 1a8e353e4e4d0120c85df6c3505738d0f1ba03cd Mon Sep 17 00:00:00 2001
-From: Nomis101 <[email protected]>
-Date: Fri, 10 Jun 2022 23:11:25 +0200
-Subject: [x265] [PATCH] correctly define 64-bit for aarch64
-
-Signed-off-by: Nomis101 <[email protected]>
----
- source/common/version.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/source/common/version.cpp b/source/common/version.cpp
-index 42a6b1d86..618ff4276 100644
---- a/source/common/version.cpp
-+++ b/source/common/version.cpp
-@@ -71,7 +71,7 @@
- #define ONOS "[Unk-OS]"
- #endif
-
--#if X86_64
-+#if X86_64 || defined(__aarch64__)
- #define BITS "[64 bit]"
- #else
- #define BITS "[32 bit]"
---
-2.32.0 (Apple Git-132)
diff --git a/3rdparty/ext_heif/A05-disable-scanPosLast-aarch64-asm.patch b/3rdparty/ext_heif/A05-disable-scanPosLast-aarch64-asm.patch
deleted file mode 100644
index 8069dfb07c..0000000000
--- a/3rdparty/ext_heif/A05-disable-scanPosLast-aarch64-asm.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 17d8878491e6f634d85b95aca971d62718823e17 Mon Sep 17 00:00:00 2001
-From: Damiano galassi <[email protected]>
-Date: Sat, 9 Jul 2022 10:02:05 +0200
-Subject: [PATCH] Disable scanPosLast aarch64 asm because it can led to a crash
- on Apple Silicon.
-
----
- source/common/aarch64/asm-primitives.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/source/common/aarch64/asm-primitives.cpp b/source/common/aarch64/asm-primitives.cpp
-index 0e10dae2f..ae0f0a9ec 100644
---- a/source/common/aarch64/asm-primitives.cpp
-+++ b/source/common/aarch64/asm-primitives.cpp
-@@ -663,7 +663,7 @@ void setupAssemblyPrimitives(EncoderPrimitives &p, int cpuMask)
- p.cu[BLOCK_4x4].psy_cost_pp = PFX(psyCost_4x4_neon);
-
- p.weight_pp = PFX(weight_pp_neon);
-- p.scanPosLast = PFX(scanPosLast_neon);
-+ //p.scanPosLast = PFX(scanPosLast_neon);
- #endif
-
- // quant
---
-2.32.1 (Apple Git-133)
-
diff --git a/3rdparty/ext_heif/A06-common-threading.patch b/3rdparty/ext_heif/A06-common-threading.patch
deleted file mode 100644
index 0fb9bc355e..0000000000
--- a/3rdparty/ext_heif/A06-common-threading.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/source/common/threading.h 2022-09-24 23:13:02.251953004 -0400
-+++ b/source/common/threading.h 2022-09-24 23:13:36.912210668 -0400
-@@ -37,6 +37,7 @@
- #include <semaphore.h>
- #include <errno.h>
- #include <fcntl.h>
-+#include <sys/stat.h>
- #endif
-
- #if MACOS
diff --git a/3rdparty/ext_heif/CMakeLists.txt b/3rdparty/ext_heif/CMakeLists.txt
deleted file mode 100644
index 286c69cb7b..0000000000
--- a/3rdparty/ext_heif/CMakeLists.txt
+++ /dev/null
@@ -1,182 +0,0 @@
-SET(EXTPREFIX_heif "${EXTPREFIX}" )
-
-ExternalProject_Add(
- ext_libde265
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/strukturag/libde265/releases/download/v1.0.8/libde265-1.0.8.tar.gz
- URL_HASH SHA1=db8fa137a4681ec092e7546d9155bbaa95938e5e
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Quick-check-for-SSE-support.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-
-if (WIN32)
- ExternalProject_Add(
- ext_nasm
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip
- URL_HASH SHA256=f5c93c146f52b4f1664fa3ce6579f961a910e869ab0dae431bd871bdd2584ef2
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying nasm 64-bit dependencies
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/rdoff ${EXTPREFIX_heif}/bin/rdoff
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/nasm.exe ${EXTPREFIX_heif}/bin/nasm.exe
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/ndisasm.exe ${EXTPREFIX_heif}/bin/ndisasm.exe
-
- UPDATE_COMMAND ""
- )
-else (WIN32)
-ExternalProject_Add(
- ext_nasm
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.gz
- URL_HASH SHA256=9182a118244b058651c576baa9d0366ee05983c4d4ae1d9ddd3236a9f2304997
-
- CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXTPREFIX_heif} ${GLOBAL_AUTOMAKE_PROFILE}
-
- UPDATE_COMMAND ""
-
- # automake has an issue when tryin gto build outside of the course tree
- # 'sh: 0: Can't open autogen.sh'
- BUILD_IN_SOURCE ON
-)
-endif(WIN32)
-
-
-set(EXTRA_AVIF_DEPS "")
-
-if (WIN32 AND NOT PERL_FOUND) # Implies strawberry perl
- set(LIBAOM_STRAWBERRYPERL_DEP ext_strawberryperl)
-endif()
-
-if(WIN32 AND PERL_EXECUTABLE)
- set(LIBAOM_EXTRA_CMAKE_ARGS -DPERL_EXECUTABLE=${PERL_EXECUTABLE})
-elseif (NOT WIN32)
- set(LIBAOM_EXTRA_CMAKE_ARGS -DCONFIG_PIC=1)
-endif()
-
-if(PERL_FOUND OR USE_STRAWBERRYPERL)
- message(STATUS "Building AVIF support using libaom.")
-
- kis_ExternalProject_Add_with_separate_builds_apple(
- ext_libaom
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
-
- URL https://storage.googleapis.com/aom-releases/libaom-3.6.1.tar.gz
- URL_HASH SHA256=42b862f58b3d00bd3902d2dc469526574f5b012e5b178e6a9652845a113d6887
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-cdef-Disable-MSVC-optimizations-for-filter_block.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/android-cpu-features.patch
-
- # Static library is needed because ffmpeg accesses aom_codec_av1_dx_algo
- # which is not exported in Windows compilers.
- #
- # All boolean libaom-specific 'CONFIG_*' options should have value 0 or 1, because
- # they are passed straight to asm files. We cannot use CMake's ON/OFF for them
- CMAKE_ARGS ${LIBAOM_EXTRA_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_SHARED_LIBS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_TESTDATA=OFF -DENABLE_TESTS=OFF -DENABLE_TOOLS=OFF ${GLOBAL_PROFILE} -DCONFIG_RUNTIME_CPU_DETECT=1
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_nasm ${LIBAOM_STRAWBERRYPERL_DEP}
- )
-
- set(EXTRA_AVIF_DEPS ext_libaom)
-else()
- message(WARNING "Perl not available, disabling AVIF support.")
-endif()
-
-# Incorporate Handbrake's extensions for building x265
-# Multicoreware added detection of SSE2/3/4.1, so we can freely enable them now
-# Also ship their patch for Apple silicon
-if (MSVC)
- set(x265_LIBDIR "$<CONFIG>/")
- set(x265_LIBRARY x265-static.lib)
- set(x265_10bit_LIBRARY x265_main10-static.lib)
- set(x265_12bit_LIBRARY x265_main12-static.lib)
- set(x265_EXTRA_LINK_FLAGS /LIBPATH:${EXTPREFIX_heif}/lib)
-else()
- set(x265_LIBDIR "")
- set(x265_LIBRARY libx265.a)
- set(x265_10bit_LIBRARY libx265_main10.a)
- set(x265_12bit_LIBRARY libx265_main12.a)
- set(x265_EXTRA_LINK_FLAGS -L${EXTPREFIX_heif}/lib)
-endif()
-
-set(LIBX265_SOURCE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/libx265_src")
-file(MAKE_DIRECTORY ${LIBX265_SOURCE_DIRECTORY})
-file(WRITE ${LIBX265_SOURCE_DIRECTORY}/foobar "yet-to-be-deleted-and-repopulated-at-build-stage")
-
-ExternalProject_Add(
- ext_libx265_src
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
-
- URL https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/x265-snapshot-20220709-12716.tar.gz
- URL_HASH SHA256=19ef8b21301f13d795601184884859e9f4a2f87fcda83757bd7dcd588056e926
-
- SOURCE_DIR ${LIBX265_SOURCE_DIRECTORY}
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/A01-build-fix.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/A02-threads-priority.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/A03-threads-pool-adjustments.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/A04-64-bit_for_aarch64.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/A05-disable-scanPosLast-aarch64-asm.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/A06-common-threading.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Silence-nasm-2.15-warnings.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Skip-PDB-in-MinGW.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-ext_heif-Make-sure-that-pthreads-are-not-linked-it-o.patch
-
- BUILD_COMMAND ""
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ""
- UPDATE_COMMAND ""
-)
-
-ExternalProject_Add(ext_libx265_10bit
- SOURCE_DIR ${LIBX265_SOURCE_DIRECTORY}
- SOURCE_SUBDIR source
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DHIGH_BIT_DEPTH=TRUE -DEXPORT_C_API=FALSE -DENABLE_CLI=FALSE -DENABLE_SHARED=FALSE
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${x265_LIBDIR}${x265_LIBRARY} ${EXTPREFIX_heif}/lib/${x265_10bit_LIBRARY}
- UPDATE_COMMAND ""
-
- DEPENDS ext_nasm ext_libx265_src
-)
-
-ExternalProject_Add(ext_libx265_12bit
- SOURCE_DIR ${LIBX265_SOURCE_DIRECTORY}
- SOURCE_SUBDIR source
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
- -DHIGH_BIT_DEPTH=TRUE -DMAIN12=TRUE -DEXPORT_C_API=FALSE -DENABLE_CLI=FALSE -DENABLE_SHARED=FALSE
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${x265_LIBDIR}${x265_LIBRARY} ${EXTPREFIX_heif}/lib/${x265_12bit_LIBRARY}
- UPDATE_COMMAND ""
-
- DEPENDS ext_nasm ext_libx265_10bit ext_libx265_src
-)
-ExternalProject_Add(ext_libx265
- SOURCE_DIR ${LIBX265_SOURCE_DIRECTORY}
- SOURCE_SUBDIR source
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DENABLE_SHARED=TRUE -DENABLE_HDR10_PLUS=TRUE -DEXTRA_LIB:String=${x265_10bit_LIBRARY}$<SEMICOLON>${x265_12bit_LIBRARY} -DEXTRA_LINK_FLAGS:String=${x265_EXTRA_LINK_FLAGS} -DLINKED_10BIT=TRUE -DLINKED_12BIT=TRUE
- UPDATE_COMMAND ""
-
- DEPENDS ext_nasm ext_libx265_12bit ext_libx265_src
-)
-
-ExternalProject_Add(
- ext_libheif
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
-
- URL https://github.com/strukturag/libheif/releases/download/v1.13.0/libheif-1.13.0.tar.gz
- URL_HASH SHA256=c20ae01bace39e89298f6352f1ff4a54b415b33b9743902da798e8a1e51d7ca1
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/clang-aom-link-pthread.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DWITH_EXAMPLES=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${EXTRA_AVIF_DEPS} ext_libde265 ext_libx265
-)
diff --git a/3rdparty/ext_heif/android-cpu-features.patch b/3rdparty/ext_heif/android-cpu-features.patch
deleted file mode 100644
index b415df4e69..0000000000
--- a/3rdparty/ext_heif/android-cpu-features.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/CMakeLists.txt 2023-05-26 23:00:57.037430105 +1000
-+++ b/CMakeLists.txt 2023-05-31 01:43:29.529977035 +1000
-@@ -212,6 +212,7 @@
-
- if(CONFIG_RUNTIME_CPU_DETECT AND ANDROID_NDK)
- include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
-+ list(APPEND AOM_SOURCES ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
- endif()
-
- # Targets
diff --git a/3rdparty/ext_heif/clang-aom-link-pthread.patch b/3rdparty/ext_heif/clang-aom-link-pthread.patch
deleted file mode 100644
index ac3a8f3a2b..0000000000
--- a/3rdparty/ext_heif/clang-aom-link-pthread.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/libheif/CMakeLists.txt b/libheif/CMakeLists.txt
-index 59b4719..8fad622 100644
---- a/libheif/CMakeLists.txt
-+++ b/libheif/CMakeLists.txt
-@@ -107,6 +107,11 @@ if(AOM_ENCODER_FOUND OR AOM_DECODER_FOUND)
-
- include_directories(SYSTEM ${AOM_INCLUDE_DIR})
- target_link_libraries(heif PRIVATE ${AOM_LIBRARIES} ${AOM_LINKDIR})
-+
-+ find_package(Threads)
-+ if (Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
-+ target_link_libraries(heif PRIVATE Threads::Threads)
-+ endif()
- endif()
- if(AOM_ENCODER_FOUND)
- target_compile_definitions(heif PRIVATE HAVE_AOM_ENCODER=1)
diff --git a/3rdparty/ext_iconv/CMakeLists.txt b/3rdparty/ext_iconv/CMakeLists.txt
deleted file mode 100644
index 984baefc98..0000000000
--- a/3rdparty/ext_iconv/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-SET(PREFIX_ext_iconv "${EXTPREFIX}" )
-if (WIN32)
-ExternalProject_Add( ext_iconv
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME win-iconv-v0.0.8.tar.gz
- URL https://github.com/win-iconv/win-iconv/archive/v0.0.8.tar.gz
- URL_MD5 e4574721c2d9667af32283175c828833
-
- INSTALL_DIR ${PREFIX_ext_iconv}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_iconv} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-else ()
-ExternalProject_Add( ext_iconv
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://ftp.gnu.org/gnu/libiconv/libiconv-1.17.tar.gz
- URL_HASH SHA256=8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313
-
- INSTALL_DIR ${PREFIX_ext_iconv}
- CONFIGURE_COMMAND ./configure --prefix=${PREFIX_ext_iconv} ${GLOBAL_AUTOMAKE_PROFILE}
-
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE 1
-)
-
-endif ()
diff --git a/3rdparty/ext_icoutils/0001-Really-do-not-include-libintl.h.patch b/3rdparty/ext_icoutils/0001-Really-do-not-include-libintl.h.patch
deleted file mode 100644
index a4fb79807c..0000000000
--- a/3rdparty/ext_icoutils/0001-Really-do-not-include-libintl.h.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From be3b6d63f630478cdf3f2b00cf8ce936bf94a8ef Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Tue, 1 Jun 2021 19:06:42 +0800
-Subject: [PATCH 1/2] Really do not include libintl.h
-
----
- lib/error.c | 4 +++-
- lib/getopt.c | 4 +++-
- lib/gettext.h | 4 +++-
- 3 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/lib/error.c b/lib/error.c
-index 81788c7..89ca69f 100644
---- a/lib/error.c
-+++ b/lib/error.c
-@@ -34,7 +34,9 @@
- #endif
-
- #ifdef _LIBC
--# include <libintl.h>
-+# if ENABLE_NLS
-+# include <libintl.h>
-+# endif
- # include <stdbool.h>
- # include <stdint.h>
- # include <wchar.h>
-diff --git a/lib/getopt.c b/lib/getopt.c
-index 55375cc..c9d4699 100644
---- a/lib/getopt.c
-+++ b/lib/getopt.c
-@@ -36,7 +36,9 @@
- functions in the "user namespace" related to stdio locking.
- Finally, it must use glibc's internal message translation so that
- the messages are looked up in the proper text domain. */
--# include <libintl.h>
-+# if ENABLE_NLS
-+# include <libintl.h>
-+# endif
- # define fprintf __fxprintf_nocancel
- # define flockfile(fp) _IO_flockfile (fp)
- # define funlockfile(fp) _IO_funlockfile (fp)
-diff --git a/lib/gettext.h b/lib/gettext.h
-index f2d7458..da2ebcb 100644
---- a/lib/gettext.h
-+++ b/lib/gettext.h
-@@ -55,7 +55,9 @@
- #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
- # include <cstdlib>
- # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
--# include <libintl.h>
-+# if ENABLE_NLS
-+# include <libintl.h>
-+# endif
- # endif
- #endif
-
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icoutils/0002-CMake-to-build-icotool.exe.patch b/3rdparty/ext_icoutils/0002-CMake-to-build-icotool.exe.patch
deleted file mode 100644
index bab4833ff8..0000000000
--- a/3rdparty/ext_icoutils/0002-CMake-to-build-icotool.exe.patch
+++ /dev/null
@@ -1,1747 +0,0 @@
-From fbc7e4331acf48e41a65181992138d48d841d831 Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Wed, 2 Jun 2021 13:01:51 +0800
-Subject: [PATCH 2/2] CMake to build icotool.exe
-
----
- CMakeLists.txt | 37 +
- common/CMakeLists.txt | 24 +
- common/string-utils.c | 2 +
- config.h | 1511 +++++++++++++++++++++++++++++++++++++++++
- icotool/main.c | 2 +-
- lib/CMakeLists.txt | 37 +
- lib/byteswap.h | 45 ++
- lib/error.c | 2 +
- 8 files changed, 1659 insertions(+), 1 deletion(-)
- create mode 100644 CMakeLists.txt
- create mode 100644 common/CMakeLists.txt
- create mode 100644 config.h
- create mode 100644 lib/CMakeLists.txt
- create mode 100644 lib/byteswap.h
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..0e492bb
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,37 @@
-+project(icotool)
-+
-+cmake_minimum_required(VERSION 3.7)
-+
-+
-+add_definitions(-DHAVE_CONFIG_H)
-+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration -Werror")
-+
-+add_subdirectory(lib)
-+add_subdirectory(common)
-+
-+
-+find_package(PNG REQUIRED)
-+
-+add_definitions(${PNG_DEFINITIONS})
-+
-+set(CONFIG_H config.h)
-+
-+set(ICOTOOL_SRCS
-+ icotool/create.c
-+ icotool/extract.c
-+ icotool/icotool.h
-+ icotool/main.c
-+ icotool/palette.c
-+ icotool/win32-endian.c
-+ icotool/win32-endian.h
-+ icotool/win32.h
-+ ${CONFIG_SRCS}
-+)
-+
-+add_executable(icotool ${ICOTOOL_SRCS})
-+target_include_directories(icotool PRIVATE ./ lib/)
-+target_include_directories(icotool PRIVATE ${PNG_INCLUDE_DIRS})
-+target_link_libraries(icotool ${PNG_LIBRARIES})
-+target_link_libraries(icotool gnulib common)
-+
-+install(TARGETS icotool RUNTIME DESTINATION bin)
-diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
-new file mode 100644
-index 0000000..4bca2d4
---- /dev/null
-+++ b/common/CMakeLists.txt
-@@ -0,0 +1,24 @@
-+set(common_SRCS
-+ common.h
-+ comparison.h
-+ error.c
-+ error.h
-+ hmap.c
-+ hmap.h
-+ io-utils.c
-+ io-utils.h
-+ intutil.c
-+ intutil.h
-+ llist.c
-+ llist.h
-+ strbuf.c
-+ strbuf.h
-+ string-utils.c
-+ string-utils.h
-+ tmap.c
-+ tmap.h
-+)
-+
-+add_library(common STATIC ${common_SRCS})
-+target_include_directories(common PRIVATE ./ ../ ../lib)
-+target_link_libraries(common gnulib)
-diff --git a/common/string-utils.c b/common/string-utils.c
-index 551eafb..680b8c7 100644
---- a/common/string-utils.c
-+++ b/common/string-utils.c
-@@ -30,6 +30,8 @@
- #include "error.h" /* common */
- #include "string-utils.h" /* common */
-
-+#define strndup(a, b) __builtin_strndup(a, b)
-+
- /**
- * Return a zero-based of a character in a string.
- */
-diff --git a/config.h b/config.h
-new file mode 100644
-index 0000000..84e426e
---- /dev/null
-+++ b/config.h
-@@ -0,0 +1,1511 @@
-+/* config.h. Generated from config.h.in by configure. */
-+/* config.h.in. Generated from configure.ac by autoheader. */
-+
-+/* CPU and C ABI indicator */
-+#ifndef __i386__
-+/* #undef __i386__ */
-+#endif
-+#ifndef __x86_64_x32__
-+/* #undef __x86_64_x32__ */
-+#endif
-+#ifndef __x86_64__
-+#define __x86_64__ 1
-+#endif
-+#ifndef __alpha__
-+/* #undef __alpha__ */
-+#endif
-+#ifndef __arm__
-+/* #undef __arm__ */
-+#endif
-+#ifndef __armhf__
-+/* #undef __armhf__ */
-+#endif
-+#ifndef __arm64_ilp32__
-+/* #undef __arm64_ilp32__ */
-+#endif
-+#ifndef __arm64__
-+/* #undef __arm64__ */
-+#endif
-+#ifndef __hppa__
-+/* #undef __hppa__ */
-+#endif
-+#ifndef __hppa64__
-+/* #undef __hppa64__ */
-+#endif
-+#ifndef __ia64_ilp32__
-+/* #undef __ia64_ilp32__ */
-+#endif
-+#ifndef __ia64__
-+/* #undef __ia64__ */
-+#endif
-+#ifndef __m68k__
-+/* #undef __m68k__ */
-+#endif
-+#ifndef __mips__
-+/* #undef __mips__ */
-+#endif
-+#ifndef __mipsn32__
-+/* #undef __mipsn32__ */
-+#endif
-+#ifndef __mips64__
-+/* #undef __mips64__ */
-+#endif
-+#ifndef __powerpc__
-+/* #undef __powerpc__ */
-+#endif
-+#ifndef __powerpc64__
-+/* #undef __powerpc64__ */
-+#endif
-+#ifndef __powerpc64_elfv2__
-+/* #undef __powerpc64_elfv2__ */
-+#endif
-+#ifndef __s390__
-+/* #undef __s390__ */
-+#endif
-+#ifndef __s390x__
-+/* #undef __s390x__ */
-+#endif
-+#ifndef __sh__
-+/* #undef __sh__ */
-+#endif
-+#ifndef __sparc__
-+/* #undef __sparc__ */
-+#endif
-+#ifndef __sparc64__
-+/* #undef __sparc64__ */
-+#endif
-+
-+
-+/* Define if building universal (internal helper macro) */
-+/* #undef AC_APPLE_UNIVERSAL_BUILD */
-+
-+/* Define to the number of bits in type 'ptrdiff_t'. */
-+/* #undef BITSIZEOF_PTRDIFF_T */
-+
-+/* Define to the number of bits in type 'sig_atomic_t'. */
-+/* #undef BITSIZEOF_SIG_ATOMIC_T */
-+
-+/* Define to the number of bits in type 'size_t'. */
-+/* #undef BITSIZEOF_SIZE_T */
-+
-+/* Define to the number of bits in type 'wchar_t'. */
-+/* #undef BITSIZEOF_WCHAR_T */
-+
-+/* Define to the number of bits in type 'wint_t'. */
-+/* #undef BITSIZEOF_WINT_T */
-+
-+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-+ systems. This function is required for `alloca.c' support on those systems.
-+ */
-+/* #undef CRAY_STACKSEG_END */
-+
-+/* Define to 1 if using `alloca.c'. */
-+/* #undef C_ALLOCA */
-+
-+/* Define as the bit index in the word where to find bit 0 of the exponent of
-+ 'double'. */
-+#define DBL_EXPBIT0_BIT 20
-+
-+/* Define as the word index where to find the exponent of 'double'. */
-+#define DBL_EXPBIT0_WORD 1
-+
-+/* Define to 1 if // is a file system root distinct from /. */
-+#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1
-+
-+/* Define to 1 if translation of program messages to the user's native
-+ language is requested. */
-+/* #undef ENABLE_NLS */
-+
-+/* Define if gettimeofday clobbers the localtime buffer. */
-+/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */
-+
-+/* Define this to 'void' or 'struct timezone' to match the system's
-+ declaration of the second argument to gettimeofday. */
-+#define GETTIMEOFDAY_TIMEZONE void
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module dirname shall be considered present. */
-+#define GNULIB_DIRNAME 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module fscanf shall be considered present. */
-+#define GNULIB_FSCANF 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module malloc-gnu shall be considered present. */
-+#define GNULIB_MALLOC_GNU 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module msvc-nothrow shall be considered present. */
-+#define GNULIB_MSVC_NOTHROW 1
-+
-+/* Define to 1 if printf and friends should be labeled with attribute
-+ "__gnu_printf__" instead of "__printf__" */
-+//#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module scanf shall be considered present. */
-+#define GNULIB_SCANF 1
-+
-+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-+ whether the gnulib module strerror shall be considered present. */
-+#define GNULIB_STRERROR 1
-+
-+/* Define to 1 when the gnulib module dup2 should be tested. */
-+#define GNULIB_TEST_DUP2 1
-+
-+/* Define to 1 when the gnulib module getdelim should be tested. */
-+#define GNULIB_TEST_GETDELIM 1
-+
-+/* Define to 1 when the gnulib module getline should be tested. */
-+#define GNULIB_TEST_GETLINE 1
-+
-+/* Define to 1 when the gnulib module gettimeofday should be tested. */
-+#define GNULIB_TEST_GETTIMEOFDAY 1
-+
-+/* Define to 1 when the gnulib module lstat should be tested. */
-+#define GNULIB_TEST_LSTAT 1
-+
-+/* Define to 1 when the gnulib module malloc-posix should be tested. */
-+#define GNULIB_TEST_MALLOC_POSIX 1
-+
-+/* Define to 1 when the gnulib module memchr should be tested. */
-+#define GNULIB_TEST_MEMCHR 1
-+
-+/* Define to 1 when the gnulib module stat should be tested. */
-+#define GNULIB_TEST_STAT 1
-+
-+/* Define to 1 when the gnulib module strdup should be tested. */
-+#define GNULIB_TEST_STRDUP 1
-+
-+/* Define to 1 when the gnulib module strerror should be tested. */
-+#define GNULIB_TEST_STRERROR 1
-+
-+/* Define to 1 when the gnulib module strndup should be tested. */
-+#define GNULIB_TEST_STRNDUP 1
-+
-+/* Define to 1 when the gnulib module strnlen should be tested. */
-+#define GNULIB_TEST_STRNLEN 1
-+
-+/* Define to 1 when the gnulib module strstr should be tested. */
-+#define GNULIB_TEST_STRSTR 1
-+
-+/* Define to 1 when the gnulib module vasprintf should be tested. */
-+#define GNULIB_TEST_VASPRINTF 1
-+
-+/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
-+ may be supplied by this distribution. */
-+#define HAVE_ALLOCA 1
-+
-+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-+ */
-+/* #undef HAVE_ALLOCA_H */
-+
-+/* Define to 1 if you have the <bp-sym.h> header file. */
-+/* #undef HAVE_BP_SYM_H */
-+
-+/* Define to 1 if you have the <byteswap.h> header file. */
-+/* #undef HAVE_BYTESWAP_H */
-+
-+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
-+ CoreFoundation framework. */
-+/* #undef HAVE_CFLOCALECOPYCURRENT */
-+
-+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
-+ the CoreFoundation framework. */
-+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
-+
-+/* Define to 1 if the system has the type `comparison_fn_t'. */
-+/* #undef HAVE_COMPARISON_FN_T */
-+
-+/* Define to 1 if you have the <crtdefs.h> header file. */
-+#define HAVE_CRTDEFS_H 1
-+
-+/* Define if the GNU dcgettext() function is already present or preinstalled.
-+ */
-+/* #undef HAVE_DCGETTEXT */
-+
-+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_GETC_UNLOCKED 0
-+
-+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_GETDELIM 0
-+
-+/* Define to 1 if you have the declaration of `getline', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_GETLINE 0
-+
-+/* Define to 1 if you have the declaration of `program_invocation_name', and
-+ to 0 if you don't. */
-+#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
-+
-+/* Define to 1 if you have the declaration of `program_invocation_short_name',
-+ and to 0 if you don't. */
-+#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0
-+
-+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
-+ */
-+#define HAVE_DECL_STRDUP 1
-+
-+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_STRERROR_R 0
-+
-+/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_STRNCASECMP 1
-+
-+/* Define to 1 if you have the declaration of `strndup', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_STRNDUP 0
-+
-+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
-+ don't. */
-+#define HAVE_DECL_STRNLEN 1
-+
-+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
-+ don't. */
-+#define HAVE_DECL__SNPRINTF 1
-+
-+/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't.
-+ */
-+#define HAVE_DECL___ARGV 1
-+
-+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
-+ */
-+#define HAVE_DIRENT_H 1
-+
-+/* Define to 1 if you have the 'dup2' function. */
-+#define HAVE_DUP2 1
-+
-+/* Define to 1 if you have the <features.h> header file. */
-+/* #undef HAVE_FEATURES_H */
-+
-+/* Define to 1 if you have the `flockfile' function. */
-+/* #undef HAVE_FLOCKFILE */
-+
-+/* Define to 1 if you have the `fork' function. */
-+/* #undef HAVE_FORK */
-+
-+/* Define to 1 if you have the `funlockfile' function. */
-+/* #undef HAVE_FUNLOCKFILE */
-+
-+/* Define to 1 if you have the 'getdelim' function. */
-+/* #undef HAVE_GETDELIM */
-+
-+/* Define to 1 if you have the 'getexecname' function. */
-+/* #undef HAVE_GETEXECNAME */
-+
-+/* Define to 1 if you have the <getopt.h> header file. */
-+#define HAVE_GETOPT_H 1
-+
-+/* Define to 1 if you have the `getopt_long_only' function. */
-+#define HAVE_GETOPT_LONG_ONLY 1
-+
-+/* Define to 1 if you have the 'getprogname' function. */
-+/* #undef HAVE_GETPROGNAME */
-+
-+/* Define if the GNU gettext() function is already present or preinstalled. */
-+/* #undef HAVE_GETTEXT */
-+
-+/* Define to 1 if you have the 'gettimeofday' function. */
-+#define HAVE_GETTIMEOFDAY 1
-+
-+/* Define if you have the iconv() function and it works. */
-+/* #undef HAVE_ICONV */
-+
-+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
-+#define HAVE_INTMAX_T 1
-+
-+/* Define to 1 if you have the <inttypes.h> header file. */
-+#define HAVE_INTTYPES_H 1
-+
-+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
-+ declares uintmax_t. */
-+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
-+
-+/* Define to 1 if you have the <libpng10/png.h> header file. */
-+/* #undef HAVE_LIBPNG10_PNG_H */
-+
-+/* Define to 1 if you have the <libpng12/png.h> header file. */
-+/* #undef HAVE_LIBPNG12_PNG_H */
-+
-+/* Define to 1 if you have the <libpng/png.h> header file. */
-+/* #undef HAVE_LIBPNG_PNG_H */
-+
-+/* Define to 1 if you have the <limits.h> header file. */
-+#define HAVE_LIMITS_H 1
-+
-+/* Define to 1 if you have the <locale.h> header file. */
-+#define HAVE_LOCALE_H 1
-+
-+/* Define to 1 if the system has the type 'long long int'. */
-+#define HAVE_LONG_LONG_INT 1
-+
-+/* Define to 1 if you have the 'lstat' function. */
-+/* #undef HAVE_LSTAT */
-+
-+/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and
-+ to 0 otherwise. */
-+#define HAVE_MALLOC_GNU 1
-+
-+/* Define if the 'malloc' function is POSIX compliant. */
-+/* #undef HAVE_MALLOC_POSIX */
-+
-+/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
-+ config.h and <sys/mman.h>. */
-+/* #undef HAVE_MAP_ANONYMOUS */
-+
-+/* Define to 1 if you have the `mbrtowc' function. */
-+#define HAVE_MBRTOWC 1
-+
-+/* Define to 1 if you have the <memory.h> header file. */
-+#define HAVE_MEMORY_H 1
-+
-+/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
-+/* #undef HAVE_MINMAX_IN_LIMITS_H */
-+
-+/* Define to 1 if <sys/param.h> defines the MIN and MAX macros. */
-+/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */
-+
-+/* Define to 1 if you have the 'mprotect' function. */
-+#define HAVE_MPROTECT 1
-+
-+/* Define to 1 on MSVC platforms that have the "invalid parameter handler"
-+ concept. */
-+#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1
-+
-+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-+/* #undef HAVE_NDIR_H */
-+
-+/* Define to 1 if you have the <png.h> header file. */
-+#define HAVE_PNG_H 1
-+
-+/* Define to 1 if you have the `pow' function. */
-+#define HAVE_POW 1
-+
-+/* Define to 1 if atoll is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_ATOLL 1
-+
-+/* Define to 1 if btowc is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_BTOWC 1
-+
-+/* Define to 1 if canonicalize_file_name is declared even after undefining
-+ macros. */
-+/* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */
-+
-+/* Define to 1 if chdir is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_CHDIR 1
-+
-+/* Define to 1 if chown is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_CHOWN */
-+
-+/* Define to 1 if dprintf is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_DPRINTF */
-+
-+/* Define to 1 if dup is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_DUP 1
-+
-+/* Define to 1 if dup2 is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_DUP2 1
-+
-+/* Define to 1 if dup3 is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_DUP3 */
-+
-+/* Define to 1 if endusershell is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_ENDUSERSHELL */
-+
-+/* Define to 1 if environ is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_ENVIRON */
-+
-+/* Define to 1 if euidaccess is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_EUIDACCESS */
-+
-+/* Define to 1 if faccessat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FACCESSAT */
-+
-+/* Define to 1 if fchdir is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FCHDIR */
-+
-+/* Define to 1 if fchmodat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FCHMODAT */
-+
-+/* Define to 1 if fchownat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FCHOWNAT */
-+
-+/* Define to 1 if fdatasync is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FDATASYNC */
-+
-+/* Define to 1 if ffs is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FFS */
-+
-+/* Define to 1 if ffsl is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FFSL */
-+
-+/* Define to 1 if ffsll is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FFSLL */
-+
-+/* Define to 1 if fpurge is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FPURGE */
-+
-+/* Define to 1 if fseeko is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_FSEEKO 1
-+
-+/* Define to 1 if fstat is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_FSTAT 1
-+
-+/* Define to 1 if fstatat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FSTATAT */
-+
-+/* Define to 1 if fsync is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FSYNC */
-+
-+/* Define to 1 if ftello is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_FTELLO 1
-+
-+/* Define to 1 if ftruncate is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_FTRUNCATE 1
-+
-+/* Define to 1 if futimens is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_FUTIMENS */
-+
-+/* Define to 1 if getcwd is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_GETCWD 1
-+
-+/* Define to 1 if getdelim is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETDELIM */
-+
-+/* Define to 1 if getdomainname is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETDOMAINNAME */
-+
-+/* Define to 1 if getdtablesize is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETDTABLESIZE */
-+
-+/* Define to 1 if getgroups is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETGROUPS */
-+
-+/* Define to 1 if gethostname is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETHOSTNAME */
-+
-+/* Define to 1 if getline is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETLINE */
-+
-+/* Define to 1 if getloadavg is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETLOADAVG */
-+
-+/* Define to 1 if getlogin is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETLOGIN */
-+
-+/* Define to 1 if getlogin_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETLOGIN_R */
-+
-+/* Define to 1 if getpagesize is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETPAGESIZE */
-+
-+/* Define to 1 if gets is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_GETS 1
-+
-+/* Define to 1 if getsubopt is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETSUBOPT */
-+
-+/* Define to 1 if gettimeofday is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_GETTIMEOFDAY 1
-+
-+/* Define to 1 if getusershell is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GETUSERSHELL */
-+
-+/* Define to 1 if grantpt is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GRANTPT */
-+
-+/* Define to 1 if group_member is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_GROUP_MEMBER */
-+
-+/* Define to 1 if initstate is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_INITSTATE */
-+
-+/* Define to 1 if initstate_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_INITSTATE_R */
-+
-+/* Define to 1 if isatty is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_ISATTY 1
-+
-+/* Define to 1 if lchmod is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_LCHMOD */
-+
-+/* Define to 1 if lchown is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_LCHOWN */
-+
-+/* Define to 1 if link is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_LINK */
-+
-+/* Define to 1 if linkat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_LINKAT */
-+
-+/* Define to 1 if lseek is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_LSEEK 1
-+
-+/* Define to 1 if lstat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_LSTAT */
-+
-+/* Define to 1 if mbrlen is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_MBRLEN 1
-+
-+/* Define to 1 if mbrtowc is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_MBRTOWC 1
-+
-+/* Define to 1 if mbsinit is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_MBSINIT 1
-+
-+/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MBSNRTOWCS */
-+
-+/* Define to 1 if mbsrtowcs is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_MBSRTOWCS 1
-+
-+/* Define to 1 if memmem is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MEMMEM */
-+
-+/* Define to 1 if mempcpy is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_MEMPCPY 1
-+
-+/* Define to 1 if memrchr is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MEMRCHR */
-+
-+/* Define to 1 if mkdirat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKDIRAT */
-+
-+/* Define to 1 if mkdtemp is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKDTEMP */
-+
-+/* Define to 1 if mkfifo is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKFIFO */
-+
-+/* Define to 1 if mkfifoat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKFIFOAT */
-+
-+/* Define to 1 if mknod is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKNOD */
-+
-+/* Define to 1 if mknodat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKNODAT */
-+
-+/* Define to 1 if mkostemp is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKOSTEMP */
-+
-+/* Define to 1 if mkostemps is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKOSTEMPS */
-+
-+/* Define to 1 if mkstemp is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_MKSTEMP 1
-+
-+/* Define to 1 if mkstemps is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_MKSTEMPS */
-+
-+/* Define to 1 if pclose is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_PCLOSE */
-+
-+/* Define to 1 if pipe is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_PIPE */
-+
-+/* Define to 1 if pipe2 is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_PIPE2 */
-+
-+/* Define to 1 if popen is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_POPEN */
-+
-+/* Define to 1 if posix_openpt is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_POSIX_OPENPT */
-+
-+/* Define to 1 if pread is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_PREAD */
-+
-+/* Define to 1 if ptsname is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_PTSNAME */
-+
-+/* Define to 1 if ptsname_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_PTSNAME_R */
-+
-+/* Define to 1 if pwrite is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_PWRITE */
-+
-+/* Define to 1 if qsort_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_QSORT_R */
-+
-+/* Define to 1 if random is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_RANDOM */
-+
-+/* Define to 1 if random_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_RANDOM_R */
-+
-+/* Define to 1 if rawmemchr is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_RAWMEMCHR */
-+
-+/* Define to 1 if readlink is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_READLINK */
-+
-+/* Define to 1 if readlinkat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_READLINKAT */
-+
-+/* Define to 1 if reallocarray is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_REALLOCARRAY */
-+
-+/* Define to 1 if realpath is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_REALPATH */
-+
-+/* Define to 1 if renameat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_RENAMEAT */
-+
-+/* Define to 1 if rmdir is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_RMDIR 1
-+
-+/* Define to 1 if rpmatch is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_RPMATCH */
-+
-+/* Define to 1 if secure_getenv is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SECURE_GETENV */
-+
-+/* Define to 1 if setenv is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SETENV */
-+
-+/* Define to 1 if sethostname is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SETHOSTNAME */
-+
-+/* Define to 1 if setstate is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SETSTATE */
-+
-+/* Define to 1 if setstate_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SETSTATE_R */
-+
-+/* Define to 1 if setusershell is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SETUSERSHELL */
-+
-+/* Define to 1 if sleep is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_SLEEP 1
-+
-+/* Define to 1 if snprintf is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_SNPRINTF 1
-+
-+/* Define to 1 if srandom is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SRANDOM */
-+
-+/* Define to 1 if srandom_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SRANDOM_R */
-+
-+/* Define to 1 if stat is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STAT 1
-+
-+/* Define to 1 if stpcpy is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STPCPY */
-+
-+/* Define to 1 if stpncpy is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STPNCPY */
-+
-+/* Define to 1 if strcasecmp is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRCASECMP 1
-+
-+/* Define to 1 if strcasestr is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STRCASESTR */
-+
-+/* Define to 1 if strchrnul is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STRCHRNUL */
-+
-+/* Define to 1 if strdup is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRDUP 1
-+
-+/* Define to 1 if strerror_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STRERROR_R */
-+
-+/* Define to 1 if strncasecmp is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRNCASECMP 1
-+
-+/* Define to 1 if strncat is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRNCAT 1
-+
-+/* Define to 1 if strndup is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STRNDUP */
-+
-+/* Define to 1 if strnlen is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRNLEN 1
-+
-+/* Define to 1 if strpbrk is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRPBRK 1
-+
-+/* Define to 1 if strsep is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STRSEP */
-+
-+/* Define to 1 if strsignal is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STRSIGNAL */
-+
-+/* Define to 1 if strtod is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRTOD 1
-+
-+/* Define to 1 if strtok_r is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRTOK_R 1
-+
-+/* Define to 1 if strtoll is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRTOLL 1
-+
-+/* Define to 1 if strtoull is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_STRTOULL 1
-+
-+/* Define to 1 if strverscmp is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_STRVERSCMP */
-+
-+/* Define to 1 if symlink is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SYMLINK */
-+
-+/* Define to 1 if symlinkat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_SYMLINKAT */
-+
-+/* Define to 1 if tmpfile is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_TMPFILE 1
-+
-+/* Define to 1 if truncate is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_TRUNCATE 1
-+
-+/* Define to 1 if ttyname_r is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_TTYNAME_R */
-+
-+/* Define to 1 if unlink is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_UNLINK 1
-+
-+/* Define to 1 if unlinkat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_UNLINKAT */
-+
-+/* Define to 1 if unlockpt is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_UNLOCKPT */
-+
-+/* Define to 1 if unsetenv is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_UNSETENV */
-+
-+/* Define to 1 if usleep is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_USLEEP 1
-+
-+/* Define to 1 if utimensat is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_UTIMENSAT */
-+
-+/* Define to 1 if vdprintf is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_VDPRINTF */
-+
-+/* Define to 1 if vsnprintf is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_VSNPRINTF 1
-+
-+/* Define to 1 if wcpcpy is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_WCPCPY */
-+
-+/* Define to 1 if wcpncpy is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_WCPNCPY */
-+
-+/* Define to 1 if wcrtomb is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCRTOMB 1
-+
-+/* Define to 1 if wcscasecmp is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_WCSCASECMP */
-+
-+/* Define to 1 if wcscat is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSCAT 1
-+
-+/* Define to 1 if wcschr is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSCHR 1
-+
-+/* Define to 1 if wcscmp is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSCMP 1
-+
-+/* Define to 1 if wcscoll is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSCOLL 1
-+
-+/* Define to 1 if wcscpy is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSCPY 1
-+
-+/* Define to 1 if wcscspn is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSCSPN 1
-+
-+/* Define to 1 if wcsdup is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSDUP 1
-+
-+/* Define to 1 if wcsftime is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSFTIME 1
-+
-+/* Define to 1 if wcslen is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSLEN 1
-+
-+/* Define to 1 if wcsncasecmp is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_WCSNCASECMP */
-+
-+/* Define to 1 if wcsncat is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSNCAT 1
-+
-+/* Define to 1 if wcsncmp is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSNCMP 1
-+
-+/* Define to 1 if wcsncpy is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSNCPY 1
-+
-+/* Define to 1 if wcsnlen is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSNLEN 1
-+
-+/* Define to 1 if wcsnrtombs is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_WCSNRTOMBS */
-+
-+/* Define to 1 if wcspbrk is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSPBRK 1
-+
-+/* Define to 1 if wcsrchr is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSRCHR 1
-+
-+/* Define to 1 if wcsrtombs is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSRTOMBS 1
-+
-+/* Define to 1 if wcsspn is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSSPN 1
-+
-+/* Define to 1 if wcsstr is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSSTR 1
-+
-+/* Define to 1 if wcstok is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSTOK 1
-+
-+/* Define to 1 if wcswidth is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_WCSWIDTH */
-+
-+/* Define to 1 if wcsxfrm is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCSXFRM 1
-+
-+/* Define to 1 if wctob is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WCTOB 1
-+
-+/* Define to 1 if wcwidth is declared even after undefining macros. */
-+/* #undef HAVE_RAW_DECL_WCWIDTH */
-+
-+/* Define to 1 if wmemchr is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WMEMCHR 1
-+
-+/* Define to 1 if wmemcmp is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WMEMCMP 1
-+
-+/* Define to 1 if wmemcpy is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WMEMCPY 1
-+
-+/* Define to 1 if wmemmove is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WMEMMOVE 1
-+
-+/* Define to 1 if wmemset is declared even after undefining macros. */
-+#define HAVE_RAW_DECL_WMEMSET 1
-+
-+/* Define to 1 if _Exit is declared even after undefining macros. */
-+#define HAVE_RAW_DECL__EXIT 1
-+
-+/* Define to 1 if you have the `setdtablesize' function. */
-+/* #undef HAVE_SETDTABLESIZE */
-+
-+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
-+/* #undef HAVE_SIGNED_SIG_ATOMIC_T */
-+
-+/* Define to 1 if 'wchar_t' is a signed integer type. */
-+/* #undef HAVE_SIGNED_WCHAR_T */
-+
-+/* Define to 1 if 'wint_t' is a signed integer type. */
-+/* #undef HAVE_SIGNED_WINT_T */
-+
-+/* Define to 1 if you have the 'snprintf' function. */
-+#define HAVE_SNPRINTF 1
-+
-+/* Define if the return value of the snprintf function is the number of of
-+ bytes (excluding the terminating NUL) that would have been produced if the
-+ buffer had been large enough. */
-+/* #undef HAVE_SNPRINTF_RETVAL_C99 */
-+
-+/* Define to 1 if you have the <stdint.h> header file. */
-+#define HAVE_STDINT_H 1
-+
-+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
-+ uintmax_t. */
-+#define HAVE_STDINT_H_WITH_UINTMAX 1
-+
-+/* Define to 1 if you have the <stdlib.h> header file. */
-+#define HAVE_STDLIB_H 1
-+
-+/* Define to 1 if you have the `strcasecmp' function. */
-+#define HAVE_STRCASECMP 1
-+
-+/* Define to 1 if you have the 'strdup' function. */
-+#define HAVE_STRDUP 1
-+
-+/* Define to 1 if you have the `strerror_r' function. */
-+/* #undef HAVE_STRERROR_R */
-+
-+/* Define to 1 if you have the <strings.h> header file. */
-+#define HAVE_STRINGS_H 1
-+
-+/* Define to 1 if you have the <string.h> header file. */
-+#define HAVE_STRING_H 1
-+
-+/* Define to 1 if you have the `strncasecmp' function. */
-+#define HAVE_STRNCASECMP 1
-+
-+/* Define to 1 if you have the 'strndup' function. */
-+/* #undef HAVE_STRNDUP */
-+
-+/* Define to 1 if you have the `strnlen' function. */
-+#define HAVE_STRNLEN 1
-+
-+/* Define to 1 if `st_atimensec' is a member of `struct stat'. */
-+/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */
-+
-+/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */
-+/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */
-+
-+/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */
-+/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */
-+
-+/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */
-+/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */
-+
-+/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */
-+/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */
-+
-+/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */
-+/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */
-+
-+/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */
-+/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */
-+
-+/* Define to 1 if you have the <sys/bitypes.h> header file. */
-+/* #undef HAVE_SYS_BITYPES_H */
-+
-+/* Define to 1 if you have the <sys/cdefs.h> header file. */
-+#define HAVE_SYS_CDEFS_H 1
-+
-+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
-+ */
-+/* #undef HAVE_SYS_DIR_H */
-+
-+/* Define to 1 if you have the <sys/inttypes.h> header file. */
-+/* #undef HAVE_SYS_INTTYPES_H */
-+
-+/* Define to 1 if you have the <sys/mman.h> header file. */
-+/* #undef HAVE_SYS_MMAN_H */
-+
-+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
-+ */
-+/* #undef HAVE_SYS_NDIR_H */
-+
-+/* Define to 1 if you have the <sys/param.h> header file. */
-+#define HAVE_SYS_PARAM_H 1
-+
-+/* Define to 1 if you have the <sys/socket.h> header file. */
-+/* #undef HAVE_SYS_SOCKET_H */
-+
-+/* Define to 1 if you have the <sys/stat.h> header file. */
-+#define HAVE_SYS_STAT_H 1
-+
-+/* Define to 1 if you have the <sys/time.h> header file. */
-+#define HAVE_SYS_TIME_H 1
-+
-+/* Define to 1 if you have the <sys/types.h> header file. */
-+#define HAVE_SYS_TYPES_H 1
-+
-+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-+/* #undef HAVE_SYS_WAIT_H */
-+
-+/* Define to 1 if you have the <unistd.h> header file. */
-+#define HAVE_UNISTD_H 1
-+
-+/* Define to 1 if the system has the type 'unsigned long long int'. */
-+#define HAVE_UNSIGNED_LONG_LONG_INT 1
-+
-+/* Define if you have a global __progname variable */
-+/* #undef HAVE_VAR___PROGNAME */
-+
-+/* Define to 1 if you have the 'vasnprintf' function. */
-+/* #undef HAVE_VASNPRINTF */
-+
-+/* Define to 1 if you have the `vasprintf' function. */
-+#define HAVE_VASPRINTF 1
-+
-+/* Define to 1 if you have the `vfork' function. */
-+/* #undef HAVE_VFORK */
-+
-+/* Define to 1 if you have the <vfork.h> header file. */
-+/* #undef HAVE_VFORK_H */
-+
-+/* Define to 1 if you have the <wchar.h> header file. */
-+#define HAVE_WCHAR_H 1
-+
-+/* Define if you have the 'wchar_t' type. */
-+#define HAVE_WCHAR_T 1
-+
-+/* Define to 1 if you have the `wcrtomb' function. */
-+#define HAVE_WCRTOMB 1
-+
-+/* Define to 1 if you have the `wcslen' function. */
-+#define HAVE_WCSLEN 1
-+
-+/* Define to 1 if you have the `wcsnlen' function. */
-+#define HAVE_WCSNLEN 1
-+
-+/* Define to 1 if you have the <winsock2.h> header file. */
-+#define HAVE_WINSOCK2_H 1
-+
-+/* Define if you have the 'wint_t' type. */
-+#define HAVE_WINT_T 1
-+
-+/* Define to 1 if `fork' works. */
-+/* #undef HAVE_WORKING_FORK */
-+
-+/* Define to 1 if `vfork' works. */
-+/* #undef HAVE_WORKING_VFORK */
-+
-+/* Define to 1 if the system has the type `_Bool'. */
-+#define HAVE__BOOL 1
-+
-+/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */
-+#define HAVE__SET_INVALID_PARAMETER_HANDLER 1
-+
-+/* Define to 1 if the compiler supports __builtin_expect,
-+ and to 2 if <builtins.h> does. */
-+#define HAVE___BUILTIN_EXPECT 1
-+#ifndef HAVE___BUILTIN_EXPECT
-+# define __builtin_expect(e, c) (e)
-+#elif HAVE___BUILTIN_EXPECT == 2
-+# include <builtins.h>
-+#endif
-+
-+
-+/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing
-+ slash. */
-+/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
-+
-+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
-+#define MALLOC_0_IS_NONNULL 1
-+
-+/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
-+/* #undef MAP_ANONYMOUS */
-+
-+/* Use GNU style printf and scanf. */
-+#ifndef __USE_MINGW_ANSI_STDIO
-+# define __USE_MINGW_ANSI_STDIO 1
-+#endif
-+
-+
-+/* Name of package */
-+#define PACKAGE "icoutils"
-+
-+/* Define to the address where bug reports for this package should be sent. */
-+#define PACKAGE_BUGREPORT "[email protected]"
-+
-+/* Define to the full name of this package. */
-+#define PACKAGE_NAME "icoutils"
-+
-+/* String identifying the packager of this software */
-+/* #undef PACKAGE_PACKAGER */
-+
-+/* Packager info for bug reports (URL/e-mail/...) */
-+/* #undef PACKAGE_PACKAGER_BUG_REPORTS */
-+
-+/* Packager-specific version information */
-+/* #undef PACKAGE_PACKAGER_VERSION */
-+
-+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "icoutils 0.32.3"
-+
-+/* Define to the one symbol short name of this package. */
-+#define PACKAGE_TARNAME "icoutils"
-+
-+/* Define to the home page for this package. */
-+#define PACKAGE_URL ""
-+
-+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "0.32.3"
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'ptrdiff_t'. */
-+/* #undef PTRDIFF_T_SUFFIX */
-+
-+/* Define to 1 if stat needs help when passed a file name with a trailing
-+ slash */
-+/* #undef REPLACE_FUNC_STAT_FILE */
-+
-+/* Define to 1 if strerror(0) does not return a message implying success. */
-+/* #undef REPLACE_STRERROR_0 */
-+
-+/* Define if vasnprintf exists but is overridden by gnulib. */
-+/* #undef REPLACE_VASNPRINTF */
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'sig_atomic_t'. */
-+/* #undef SIG_ATOMIC_T_SUFFIX */
-+
-+/* Define as the maximum value of type 'size_t', if the system doesn't define
-+ it. */
-+#ifndef SIZE_MAX
-+/* # undef SIZE_MAX */
-+#endif
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'size_t'. */
-+/* #undef SIZE_T_SUFFIX */
-+
-+/* If using the C implementation of alloca, define if you know the
-+ direction of stack growth for your system; otherwise it will be
-+ automatically deduced at runtime.
-+ STACK_DIRECTION > 0 => grows toward higher addresses
-+ STACK_DIRECTION < 0 => grows toward lower addresses
-+ STACK_DIRECTION = 0 => direction of growth unknown */
-+/* #undef STACK_DIRECTION */
-+
-+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-+/* #undef STAT_MACROS_BROKEN */
-+
-+/* Define to 1 if you have the ANSI C header files. */
-+#define STDC_HEADERS 1
-+
-+/* Define to 1 if strerror_r returns char *. */
-+/* #undef STRERROR_R_CHAR_P */
-+
-+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-+#define TIME_WITH_SYS_TIME 1
-+
-+/* Define to 1 if the type of the st_atim member of a struct stat is struct
-+ timespec. */
-+/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */
-+
-+/* Enable extensions on AIX 3, Interix. */
-+#ifndef _ALL_SOURCE
-+# define _ALL_SOURCE 1
-+#endif
-+/* Enable general extensions on macOS. */
-+#ifndef _DARWIN_C_SOURCE
-+# define _DARWIN_C_SOURCE 1
-+#endif
-+/* Enable GNU extensions on systems that have them. */
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE 1
-+#endif
-+/* Enable NetBSD extensions on NetBSD. */
-+#ifndef _NETBSD_SOURCE
-+# define _NETBSD_SOURCE 1
-+#endif
-+/* Enable OpenBSD extensions on NetBSD. */
-+#ifndef _OPENBSD_SOURCE
-+# define _OPENBSD_SOURCE 1
-+#endif
-+/* Enable threading extensions on Solaris. */
-+#ifndef _POSIX_PTHREAD_SEMANTICS
-+# define _POSIX_PTHREAD_SEMANTICS 1
-+#endif
-+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
-+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
-+# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
-+#endif
-+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
-+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
-+# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
-+#endif
-+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
-+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
-+# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
-+#endif
-+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
-+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
-+# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
-+#endif
-+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
-+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
-+# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
-+#endif
-+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
-+#ifndef __STDC_WANT_LIB_EXT2__
-+# define __STDC_WANT_LIB_EXT2__ 1
-+#endif
-+/* Enable extensions specified by ISO/IEC 24747:2009. */
-+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
-+# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
-+#endif
-+/* Enable extensions on HP NonStop. */
-+#ifndef _TANDEM_SOURCE
-+# define _TANDEM_SOURCE 1
-+#endif
-+/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
-+ mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
-+ whether compiling with -Ae or -D_HPUX_SOURCE=1. */
-+#ifndef _XOPEN_SOURCE
-+/* # undef _XOPEN_SOURCE */
-+#endif
-+/* Enable X/Open compliant socket functions that do not require linking
-+ with -lxnet on HP-UX 11.11. */
-+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
-+# define _HPUX_ALT_XOPEN_SOCKET_API 1
-+#endif
-+/* Enable general extensions on Solaris. */
-+#ifndef __EXTENSIONS__
-+# define __EXTENSIONS__ 1
-+#endif
-+
-+
-+/* Version number of package */
-+#define VERSION "0.32.3"
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'wchar_t'. */
-+/* #undef WCHAR_T_SUFFIX */
-+
-+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
-+ 'wint_t'. */
-+/* #undef WINT_T_SUFFIX */
-+
-+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-+ significant byte first (like Motorola and SPARC, unlike Intel). */
-+#if defined AC_APPLE_UNIVERSAL_BUILD
-+# if defined __BIG_ENDIAN__
-+# define WORDS_BIGENDIAN 1
-+# endif
-+#else
-+# ifndef WORDS_BIGENDIAN
-+/* # undef WORDS_BIGENDIAN */
-+# endif
-+#endif
-+
-+/* Enable large inode numbers on Mac OS X 10.5. */
-+#define _DARWIN_USE_64_BIT_INODE 1
-+
-+/* Number of bits in a file offset, on hosts where this is settable. */
-+#define _FILE_OFFSET_BITS 64
-+
-+/* Define for large files, on AIX-style hosts. */
-+/* #undef _LARGE_FILES */
-+
-+/* Define to 1 if on MINIX. */
-+/* #undef _MINIX */
-+
-+/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
-+#define _NETBSD_SOURCE 1
-+
-+/* The _Noreturn keyword of C11. */
-+#if ! (defined _Noreturn \
-+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
-+ || 0x5110 <= __SUNPRO_C)
-+# define _Noreturn __attribute__ ((__noreturn__))
-+# elif defined _MSC_VER && 1200 <= _MSC_VER
-+# define _Noreturn __declspec (noreturn)
-+# else
-+# define _Noreturn
-+# endif
-+#endif
-+
-+
-+/* Define to 2 if the system does not provide POSIX.1 features except with
-+ this defined. */
-+/* #undef _POSIX_1_SOURCE */
-+
-+/* Define to 1 if you need to in order for 'stat' and other things to work. */
-+/* #undef _POSIX_SOURCE */
-+
-+/* For standard stat data types on VMS. */
-+#define _USE_STD_STAT 1
-+
-+/* Define to rpl_ if the getopt replacement functions and variables should be
-+ used. */
-+/* #undef __GETOPT_PREFIX */
-+
-+/* Define to 1 if the system <stdint.h> predates C++11. */
-+/* #undef __STDC_CONSTANT_MACROS */
-+
-+/* Define to 1 if the system <stdint.h> predates C++11. */
-+/* #undef __STDC_LIMIT_MACROS */
-+
-+/* Define to empty if `const' does not conform to ANSI C. */
-+/* #undef const */
-+
-+/* Please see the Gnulib manual for how to use these macros.
-+
-+ Suppress extern inline with HP-UX cc, as it appears to be broken; see
-+ <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
-+
-+ Suppress extern inline with Sun C in standards-conformance mode, as it
-+ mishandles inline functions that call each other. E.g., for 'inline void f
-+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
-+ 'reference to static identifier "f" in extern inline function'.
-+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
-+
-+ Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
-+ on configurations that mistakenly use 'static inline' to implement
-+ functions or macros in standard C headers like <ctype.h>. For example,
-+ if isdigit is mistakenly implemented via a static inline function,
-+ a program containing an extern inline function that calls isdigit
-+ may not work since the C standard prohibits extern inline functions
-+ from calling static functions. This bug is known to occur on:
-+
-+ OS X 10.8 and earlier; see:
-+ https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
-+
-+ DragonFly; see
-+ http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
-+
-+ FreeBSD; see:
-+ https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
-+
-+ OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
-+ for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
-+ Assume DragonFly and FreeBSD will be similar. */
-+#if (((defined __APPLE__ && defined __MACH__) \
-+ || defined __DragonFly__ || defined __FreeBSD__) \
-+ && (defined __header_inline \
-+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
-+ && ! defined __clang__) \
-+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
-+ && (defined __GNUC__ || defined __cplusplus)) \
-+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
-+ && defined __GNUC__ && ! defined __cplusplus))))
-+# define _GL_EXTERN_INLINE_STDHEADER_BUG
-+#endif
-+#if ((__GNUC__ \
-+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
-+ : (199901L <= __STDC_VERSION__ \
-+ && !defined __HP_cc \
-+ && !defined __PGI \
-+ && !(defined __SUNPRO_C && __STDC__))) \
-+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
-+# define _GL_INLINE inline
-+# define _GL_EXTERN_INLINE extern inline
-+# define _GL_EXTERN_INLINE_IN_USE
-+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
-+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
-+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
-+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
-+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
-+# else
-+# define _GL_INLINE extern inline
-+# endif
-+# define _GL_EXTERN_INLINE extern
-+# define _GL_EXTERN_INLINE_IN_USE
-+#else
-+# define _GL_INLINE static _GL_UNUSED
-+# define _GL_EXTERN_INLINE static _GL_UNUSED
-+#endif
-+
-+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
-+ suppress bogus "no previous prototype for 'FOO'"
-+ and "no previous declaration for 'FOO'" diagnostics,
-+ when FOO is an inline function in the header; see
-+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
-+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
-+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
-+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
-+# define _GL_INLINE_HEADER_CONST_PRAGMA
-+# else
-+# define _GL_INLINE_HEADER_CONST_PRAGMA \
-+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
-+# endif
-+# define _GL_INLINE_HEADER_BEGIN \
-+ _Pragma ("GCC diagnostic push") \
-+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
-+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
-+ _GL_INLINE_HEADER_CONST_PRAGMA
-+# define _GL_INLINE_HEADER_END \
-+ _Pragma ("GCC diagnostic pop")
-+#else
-+# define _GL_INLINE_HEADER_BEGIN
-+# define _GL_INLINE_HEADER_END
-+#endif
-+
-+/* A replacement for va_copy, if needed. */
-+#define gl_va_copy(a,b) ((a) = (b))
-+
-+/* Define to `__inline__' or `__inline' if that's what the C compiler
-+ calls it, or to nothing if 'inline' is not supported under any name. */
-+#ifndef __cplusplus
-+/* #undef inline */
-+#endif
-+
-+/* Define to long or long long if <stdint.h> and <inttypes.h> don't define. */
-+/* #undef intmax_t */
-+
-+/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
-+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
-+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
-+ __APPLE__ && __MACH__ test for Mac OS X.
-+ __APPLE_CC__ tests for the Apple compiler and its version.
-+ __STDC_VERSION__ tests for the C99 mode. */
-+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
-+# define __GNUC_STDC_INLINE__ 1
-+#endif
-+
-+/* Define to `int' if <sys/types.h> does not define. */
-+/* #undef mode_t */
-+
-+/* Define to the type of st_nlink in struct stat, or a supertype. */
-+#define nlink_t int
-+
-+/* Define to `int' if <sys/types.h> does not define. */
-+/* #undef pid_t */
-+
-+/* Define as the type of the result of subtracting two pointers, if the system
-+ doesn't define it. */
-+/* #undef ptrdiff_t */
-+
-+/* Define to the equivalent of the C99 'restrict' keyword, or to
-+ nothing if this is not supported. Do not define if restrict is
-+ supported directly. */
-+#define restrict __restrict
-+/* Work around a bug in Sun C++: it does not support _Restrict or
-+ __restrict__, even though the corresponding Sun C compiler ends up with
-+ "#define restrict _Restrict" or "#define restrict __restrict__" in the
-+ previous line. Perhaps some future version of Sun C++ will work with
-+ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
-+#if defined __SUNPRO_CC && !defined __RESTRICT
-+# define _Restrict
-+# define __restrict__
-+#endif
-+
-+/* Define to `unsigned int' if <sys/types.h> does not define. */
-+/* #undef size_t */
-+
-+/* Define as a signed type of the same size as size_t. */
-+/* #undef ssize_t */
-+
-+/* Define as a marker that can be attached to declarations that might not
-+ be used. This helps to reduce warnings, such as from
-+ GCC -Wunused-parameter. */
-+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-+# define _GL_UNUSED __attribute__ ((__unused__))
-+#else
-+# define _GL_UNUSED
-+#endif
-+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
-+ is a misnomer outside of parameter lists. */
-+#define _UNUSED_PARAMETER_ _GL_UNUSED
-+
-+/* gcc supports the "unused" attribute on possibly unused labels, and
-+ g++ has since version 4.5. Note to support C++ as well as C,
-+ _GL_UNUSED_LABEL should be used with a trailing ; */
-+#if !defined __cplusplus || __GNUC__ > 4 \
-+ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-+# define _GL_UNUSED_LABEL _GL_UNUSED
-+#else
-+# define _GL_UNUSED_LABEL
-+#endif
-+
-+/* The __pure__ attribute was added in gcc 2.96. */
-+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-+#else
-+# define _GL_ATTRIBUTE_PURE /* empty */
-+#endif
-+
-+/* The __const__ attribute was added in gcc 2.95. */
-+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-+#else
-+# define _GL_ATTRIBUTE_CONST /* empty */
-+#endif
-+
-+
-+/* Define as a macro for copying va_list variables. */
-+/* #undef va_copy */
-+
-+/* Define as `fork' if `vfork' does not work. */
-+#define vfork fork
-diff --git a/icotool/main.c b/icotool/main.c
-index b227282..c43a0b5 100644
---- a/icotool/main.c
-+++ b/icotool/main.c
-@@ -27,7 +27,7 @@
- # include <locale.h> /* Solaris */
- #endif
- #include "gettext.h"
--#include "configmake.h"
-+// #include "configmake.h"
- #define _(s) gettext(s)
- #define N_(s) gettext_noop(s)
- #include "progname.h" /* Gnulib */
-diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-new file mode 100644
-index 0000000..543f4af
---- /dev/null
-+++ b/lib/CMakeLists.txt
-@@ -0,0 +1,37 @@
-+set(gnulib_SRCS
-+ basename-lgpl.c
-+ byteswap.h
-+ dirname.c
-+ dirname.h
-+ dirname.h
-+ dosname.h
-+ error.c
-+ error.h
-+ exitfail.c
-+ exitfail.h
-+ getprogname.c
-+ getprogname.h
-+ gettext.h
-+ minmax.h
-+ msvc-inval.c
-+ msvc-inval.h
-+ msvc-nothrow.c
-+ msvc-nothrow.h
-+ progname.c
-+ progname.h
-+ strndup.c
-+ version-etc.c
-+ version-etc.h
-+ xalloc-oversized.h
-+ xalloc.h
-+ xalloc-die.c
-+ xasprintf.c
-+ xmalloc.c
-+ xsize.c
-+ xsize.h
-+ xvasprintf.h
-+ xvasprintf.c
-+)
-+
-+add_library(gnulib STATIC ${gnulib_SRCS})
-+target_include_directories(gnulib PRIVATE ./ ../)
-diff --git a/lib/byteswap.h b/lib/byteswap.h
-new file mode 100644
-index 0000000..5dce96e
---- /dev/null
-+++ b/lib/byteswap.h
-@@ -0,0 +1,45 @@
-+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-+/* byteswap.h - Byte swapping
-+ Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
-+ Written by Oskar Liljeblad <[email protected]>, 2005.
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
-+
-+#ifndef _GL_BYTESWAP_H
-+#define _GL_BYTESWAP_H
-+
-+/* Given an unsigned 16-bit argument X, return the value corresponding to
-+ X with reversed byte order. */
-+#define bswap_16(x) ((((x) & 0x00FF) << 8) | \
-+ (((x) & 0xFF00) >> 8))
-+
-+/* Given an unsigned 32-bit argument X, return the value corresponding to
-+ X with reversed byte order. */
-+#define bswap_32(x) ((((x) & 0x000000FF) << 24) | \
-+ (((x) & 0x0000FF00) << 8) | \
-+ (((x) & 0x00FF0000) >> 8) | \
-+ (((x) & 0xFF000000) >> 24))
-+
-+/* Given an unsigned 64-bit argument X, return the value corresponding to
-+ X with reversed byte order. */
-+#define bswap_64(x) ((((x) & 0x00000000000000FFULL) << 56) | \
-+ (((x) & 0x000000000000FF00ULL) << 40) | \
-+ (((x) & 0x0000000000FF0000ULL) << 24) | \
-+ (((x) & 0x00000000FF000000ULL) << 8) | \
-+ (((x) & 0x000000FF00000000ULL) >> 8) | \
-+ (((x) & 0x0000FF0000000000ULL) >> 24) | \
-+ (((x) & 0x00FF000000000000ULL) >> 40) | \
-+ (((x) & 0xFF00000000000000ULL) >> 56))
-+
-+#endif /* _GL_BYTESWAP_H */
-diff --git a/lib/error.c b/lib/error.c
-index 89ca69f..ce5e494 100644
---- a/lib/error.c
-+++ b/lib/error.c
-@@ -45,6 +45,8 @@
- # define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
- # define _GL_ARG_NONNULL(a)
- #else
-+# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
-+# define _GL_ARG_NONNULL(a)
- # include "getprogname.h"
- #endif
-
---
-2.31.1.windows.1
-
diff --git a/3rdparty/ext_icoutils/0003-Add-prototype-args-to-function-pointer.patch b/3rdparty/ext_icoutils/0003-Add-prototype-args-to-function-pointer.patch
deleted file mode 100644
index 0fa32e81a6..0000000000
--- a/3rdparty/ext_icoutils/0003-Add-prototype-args-to-function-pointer.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From d5134c36447cf9f22198fbfa5af9278ef7bec94e Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Wed, 7 Sep 2022 20:30:32 +0800
-Subject: [PATCH] Add prototype args to function pointer
-
----
- common/hmap.c | 4 ++--
- common/hmap.h | 4 ++--
- common/llist.c | 2 +-
- common/llist.h | 2 +-
- common/tmap.c | 8 ++++----
- common/tmap.h | 4 ++--
- 6 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/common/hmap.c b/common/hmap.c
-index 9c5d657..8b77205 100644
---- a/common/hmap.c
-+++ b/common/hmap.c
-@@ -363,7 +363,7 @@ hmap_iterator(HMap *map, HMapIterator *it)
- * function. But no other entry.
- */
- void
--hmap_foreach_value(HMap *map, void (*iterator)())
-+hmap_foreach_value(HMap *map, void (*iterator)(void *))
- {
- uint32_t c;
-
-@@ -378,7 +378,7 @@ hmap_foreach_value(HMap *map, void (*iterator)())
- }
-
- void
--hmap_foreach_key(HMap *map, void (*iterator)())
-+hmap_foreach_key(HMap *map, void (*iterator)(void *))
- {
- uint32_t c;
-
-diff --git a/common/hmap.h b/common/hmap.h
-index bf6684b..a124b53 100644
---- a/common/hmap.h
-+++ b/common/hmap.h
-@@ -50,8 +50,8 @@ void *hmap_put(HMap *map, void *key, void *value);
- bool hmap_contains_key(HMap *map, const void *key);
- void *hmap_remove(HMap *map, const void *key);
- void hmap_iterator(HMap *map, HMapIterator *it);
--void hmap_foreach_key(HMap *map, void (*iterator)());
--void hmap_foreach_value(HMap *map, void (*iterator)());
-+void hmap_foreach_key(HMap *map, void (*iterator)(void *));
-+void hmap_foreach_value(HMap *map, void (*iterator)(void *));
- void hmap_clear(HMap *map);
- size_t hmap_size(HMap *map);
- void hmap_set_hash_fn(HMap *map, hash_fn_t hash);
-diff --git a/common/llist.c b/common/llist.c
-index 873f36c..d65438d 100644
---- a/common/llist.c
-+++ b/common/llist.c
-@@ -445,7 +445,7 @@ llist_is_empty(LList *list)
- }
-
- void
--llist_iterate(LList *list, void (*iterator_func)())
-+llist_iterate(LList *list, void (*iterator_func)(void *))
- {
- LNode *entry;
- for (entry = list->first; entry != NULL; entry = entry->next)
-diff --git a/common/llist.h b/common/llist.h
-index 11d13a3..a2bf77b 100644
---- a/common/llist.h
-+++ b/common/llist.h
-@@ -68,7 +68,7 @@ LList *llist_clone(LList *list);
- void **llist_to_array(LList *list);
- void **llist_to_null_terminated_array(LList *list);
-
--void llist_iterate(LList *list, void (*iterator_func)());
-+void llist_iterate(LList *list, void (*iterator_func)(void *));
- void llist_iterator(LList *list, LListIterator *it);
-
- void llist_reverse(LList *list);
-diff --git a/common/tmap.c b/common/tmap.c
-index bdbd0e3..1512c7c 100644
---- a/common/tmap.c
-+++ b/common/tmap.c
-@@ -512,7 +512,7 @@ predecessor(TMapNode *node)
- #endif
-
- static void
--tmap_foreach_nodes_key(TMapNode *node, void (*iterator)())
-+tmap_foreach_nodes_key(TMapNode *node, void (*iterator)(void *))
- {
- if (node->left != &nil)
- tmap_foreach_nodes_key(node->left, iterator);
-@@ -522,7 +522,7 @@ tmap_foreach_nodes_key(TMapNode *node, void (*iterator)())
- }
-
- static void
--tmap_foreach_nodes_value(TMapNode *node, void (*iterator)())
-+tmap_foreach_nodes_value(TMapNode *node, void (*iterator)(void *))
- {
- if (node->left != &nil)
- tmap_foreach_nodes_value(node->left, iterator);
-@@ -532,14 +532,14 @@ tmap_foreach_nodes_value(TMapNode *node, void (*iterator)())
- }
-
- void
--tmap_foreach_key(TMap *map, void (*iterator)())
-+tmap_foreach_key(TMap *map, void (*iterator)(void *))
- {
- if (map->root != &nil)
- tmap_foreach_nodes_key(map->root, iterator);
- }
-
- void
--tmap_foreach_value(TMap *map, void (*iterator)())
-+tmap_foreach_value(TMap *map, void (*iterator)(void *))
- {
- if (map->root != &nil)
- tmap_foreach_nodes_value(map->root, iterator);
-diff --git a/common/tmap.h b/common/tmap.h
-index b1368f8..e3e422d 100644
---- a/common/tmap.h
-+++ b/common/tmap.h
-@@ -51,8 +51,8 @@ void *tmap_remove(TMap *map, const void *key);
- void tmap_iterator(TMap *map, TMapIterator *it); /* value iterator */
- bool tmap_iterator_partial(TMap *map, TMapIterator *it, const void *match, comparison_fn_t comparator);
- void tmap_clear(TMap *map);
--void tmap_foreach_key(TMap *map, void (*iterator)());
--void tmap_foreach_value(TMap *map, void (*iterator)());
-+void tmap_foreach_key(TMap *map, void (*iterator)(void *));
-+void tmap_foreach_value(TMap *map, void (*iterator)(void *));
-
- #ifdef ENABLE_TMAP_TESTING
- #include <stdio.h>
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icoutils/CMakeLists.txt b/3rdparty/ext_icoutils/CMakeLists.txt
deleted file mode 100644
index 2921af6192..0000000000
--- a/3rdparty/ext_icoutils/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-SET(PREFIX_ext_icoutils "${EXTPREFIX}")
-
-if (MINGW)
-
- #
- # WARNING: please don't use links to http://savannah.nongnu.org, since it is
- # very unstable
- #
-
- ExternalProject_Add(
- ext_icoutils
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://files.kde.org/krita/build/dependencies/icoutils-0.32.3.tar.bz2
- URL_HASH SHA256=17abe02d043a253b68b47e3af69c9fc755b895db68fdc8811786125df564c6e0
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Really-do-not-include-libintl.h.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-CMake-to-build-icotool.exe.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Add-prototype-args-to-function-pointer.patch
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_icoutils} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- DEPENDS ext_png
- UPDATE_COMMAND ""
- )
-
-elseif (MSVC)
-
- ExternalProject_Add(
- ext_icoutils
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://files.kde.org/krita/build/dependencies/icoutils-bin-0.32.3.tar.gz
- URL_HASH SHA256=e2de7f65a82ff0f0377002f9cfb4182ec8bbd7de6d714bb7ae40af8da5d8a451
-
- INSTALL_DIR ${PREFIX_ext_icoutils}
-
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying icoutils
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/icotool.exe ${PREFIX_ext_icoutils}/bin/
-
- DEPENDS ext_png
- UPDATE_COMMAND ""
- )
-
-endif (MINGW)
diff --git a/3rdparty/ext_icu/0001-MinGW-support-from-MSYS.patch b/3rdparty/ext_icu/0001-MinGW-support-from-MSYS.patch
deleted file mode 100644
index 95b17bb3a5..0000000000
--- a/3rdparty/ext_icu/0001-MinGW-support-from-MSYS.patch
+++ /dev/null
@@ -1,221 +0,0 @@
-From bfcbaa5b01f0c4c647bda28e4e8597a36d453981 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Mon, 14 Nov 2022 21:33:49 -0300
-Subject: [PATCH 1/3] MinGW support from MSYS
-
-See: https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-icu
-
-Co-authored-by: Alexey Pavlov <[email protected]>
-Co-authored-by: Andrew Sun <[email protected]>
----
- icu4c/source/config/mh-mingw | 8 +++-----
- icu4c/source/config/mh-mingw64 | 8 +++-----
- icu4c/source/configure.ac | 2 +-
- icu4c/source/icudefs.mk.in | 15 ++++++++-------
- icu4c/source/samples/Makefile.in | 3 ---
- icu4c/source/samples/layout/Makefile.in | 3 ---
- icu4c/source/tools/pkgdata/pkgdata.cpp | 15 +++++++++++++--
- icu4c/source/tools/pkgdata/pkgtypes.h | 2 ++
- icu4c/source/tools/toolutil/pkg_genc.h | 2 +-
- 9 files changed, 31 insertions(+), 27 deletions(-)
-
-diff --git a/icu4c/source/config/mh-mingw b/icu4c/source/config/mh-mingw
-index 30f6e5be81a..850f0773866 100644
---- a/icu4c/source/config/mh-mingw
-+++ b/icu4c/source/config/mh-mingw
-@@ -15,11 +15,6 @@
- # If you prefer to have the DLLs in the lib folder, then set this to NO instead.
- MINGW_MOVEDLLSTOBINDIR = YES
-
--# We install sbin tools into the same bin directory because
--# pkgdata needs some of the tools in sbin, and we can't always depend on
--# icu-config working on Windows.
--sbindir=$(bindir)
--
- ## Commands to generate dependency files
- GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
- GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
-@@ -81,6 +76,9 @@ else
- SO_TARGET_VERSION_SUFFIX =
- endif
-
-+STATIC_PREFIX_WHEN_USED =
-+STATIC_PREFIX =
-+
- # Static library prefix and file extension
- LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
- A = a
-diff --git a/icu4c/source/config/mh-mingw64 b/icu4c/source/config/mh-mingw64
-index fb64c562604..d7544a49a0a 100644
---- a/icu4c/source/config/mh-mingw64
-+++ b/icu4c/source/config/mh-mingw64
-@@ -15,11 +15,6 @@ MINGW_MOVEDLLSTOBINDIR = YES
- # This file is similar to mh-mingw
- # Any changes made here may also need to be made in mh-mingw
-
--# We install sbin tools into the same bin directory because
--# pkgdata needs some of the tools in sbin, and we can't always depend on
--# icu-config working on Windows.
--sbindir=$(bindir)
--
- ## Commands to generate dependency files
- GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
- GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
-@@ -81,6 +76,9 @@ else
- SO_TARGET_VERSION_SUFFIX =
- endif
-
-+STATIC_PREFIX_WHEN_USED =
-+STATIC_PREFIX =
-+
- # Static library prefix and file extension
- LIBSICU = lib$(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
- A = a
-diff --git a/icu4c/source/configure.ac b/icu4c/source/configure.ac
-index 2d7eb300173..9c4ee110863 100644
---- a/icu4c/source/configure.ac
-+++ b/icu4c/source/configure.ac
-@@ -1238,7 +1238,7 @@ AC_SUBST(ICULIBSUFFIX)
- if test "$ICULIBSUFFIX" != ""
- then
- U_HAVE_LIB_SUFFIX=1
-- ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'`
-+ ICULIBSUFFIXCNAME=`echo $ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'`
- UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} "
- else
- U_HAVE_LIB_SUFFIX=0
-diff --git a/icu4c/source/icudefs.mk.in b/icu4c/source/icudefs.mk.in
-index 2c358167a83..dca71f2a7c4 100644
---- a/icu4c/source/icudefs.mk.in
-+++ b/icu4c/source/icudefs.mk.in
-@@ -266,6 +266,7 @@ USING_ICULEHB=yes
- ICULEHB_TRUE=
- ICULEHB_FALSE=#
- ICULIBS_LE=$(ICULEHB_LIBS)
-+ICULIBS_LE=$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)
- ICULE_CFLAGS=$(ICULEHB_CFLAGS) -DUSING_ICULEHB
- else
- USING_ICULEHB=no
-@@ -274,13 +275,13 @@ ICULEHB_FALSE=
- endif
-
- # Just the libs.
--ICULIBS_DT = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
--ICULIBS_UC = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
--ICULIBS_I18N = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
--ICULIBS_LX = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
--ICULIBS_IO = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
--ICULIBS_CTESTFW = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
--ICULIBS_TOOLUTIL = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-+ICULIBS_DT = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
-+ICULIBS_UC = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)
-+ICULIBS_I18N = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)
-+ICULIBS_LX = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)
-+ICULIBS_IO = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)
-+ICULIBS_CTESTFW = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)
-+ICULIBS_TOOLUTIL = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)
- # Link commands to link to ICU libs
- LLIBDIR = -L$(LIBDIR)
- LSTUBDIR = -L$(top_builddir)/stubdata
-diff --git a/icu4c/source/samples/Makefile.in b/icu4c/source/samples/Makefile.in
-index 8f2514bfd00..c16cf5c4428 100644
---- a/icu4c/source/samples/Makefile.in
-+++ b/icu4c/source/samples/Makefile.in
-@@ -16,9 +16,6 @@ include $(top_builddir)/icudefs.mk
- ## Build directory information
- subdir = samples
-
--## Platform-specific setup
--include @platform_make_fragment@
--
- ## Files to remove for 'make clean'
- CLEANFILES = *~
-
-diff --git a/icu4c/source/samples/layout/Makefile.in b/icu4c/source/samples/layout/Makefile.in
-index a8c4a244764..5dc9831b9ce 100644
---- a/icu4c/source/samples/layout/Makefile.in
-+++ b/icu4c/source/samples/layout/Makefile.in
-@@ -13,9 +13,6 @@ top_builddir = ../..
-
- include $(top_builddir)/icudefs.mk
-
--## Platform-specific setup
--include @platform_make_fragment@
--
- ## Build directory information
- subdir = samples/layout
-
-diff --git a/icu4c/source/tools/pkgdata/pkgdata.cpp b/icu4c/source/tools/pkgdata/pkgdata.cpp
-index c2ac112f6ef..2d0983cbb1c 100644
---- a/icu4c/source/tools/pkgdata/pkgdata.cpp
-+++ b/icu4c/source/tools/pkgdata/pkgdata.cpp
-@@ -926,21 +926,9 @@ static void createFileNames(UPKGOptions *o, const char mode, const char *version
- const char* FILE_EXTENSION_SEP = uprv_strlen(pkgDataFlags[SO_EXT]) == 0 ? "" : ".";
- const char* FILE_SUFFIX = pkgDataFlags[LIB_EXT_ORDER][0] == '.' ? "." : "";
-
--#if U_PLATFORM == U_PF_MINGW
-- /* MinGW does not need the library prefix when building in dll mode. */
-- if (IN_DLL_MODE(mode)) {
-- snprintf(libFileNames[LIB_FILE], sizeof(libFileNames[LIB_FILE]), "%s", libName);
-- } else {
-- snprintf(libFileNames[LIB_FILE], sizeof(libFileNames[LIB_FILE]), "%s%s%s",
-- (strstr(libName, "icudt") ? "lib" : ""),
-- pkgDataFlags[LIBPREFIX],
-- libName);
-- }
--#else
- snprintf(libFileNames[LIB_FILE], sizeof(libFileNames[LIB_FILE]), "%s%s",
- pkgDataFlags[LIBPREFIX],
- libName);
--#endif
-
- if(o->verbose) {
- fprintf(stdout, "# libFileName[LIB_FILE] = %s\n", libFileNames[LIB_FILE]);
-@@ -1427,6 +1415,18 @@ static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, c
- freeCmd = true;
- }
- #if U_PLATFORM == U_PF_MINGW
-+ fprintf(stderr, "genlib=%s targetdir=%s libfilenames=%s -o pkgdataflags=%s targetdir=%s libfilenames=%s objectfileandeverythingelse=%s %s%s %s %s",
-+ pkgDataFlags[GENLIB],
-+ targetDir,
-+ libFileNames[LIB_FILE_MINGW],
-+ pkgDataFlags[LDICUDTFLAGS],
-+ targetDir,
-+ libFileNames[LIB_FILE_VERSION_TMP],
-+ objectFile,
-+ pkgDataFlags[LD_SONAME],
-+ pkgDataFlags[LD_SONAME][0] == 0 ? "" : libFileNames[LIB_FILE_VERSION_MAJOR],
-+ pkgDataFlags[RPATH_FLAGS],
-+ pkgDataFlags[BIR_FLAGS]);
- sprintf(cmd, "%s%s%s %s -o %s%s %s %s%s %s %s",
- pkgDataFlags[GENLIB],
- targetDir,
-diff --git a/icu4c/source/tools/pkgdata/pkgtypes.h b/icu4c/source/tools/pkgdata/pkgtypes.h
-index 51c11e0a14d..50c5f88a667 100644
---- a/icu4c/source/tools/pkgdata/pkgtypes.h
-+++ b/icu4c/source/tools/pkgdata/pkgtypes.h
-@@ -140,6 +140,8 @@ char * convertToNativePathSeparators(char *path);
- # ifndef UDATA_SO_SUFFIX
- # define UDATA_SO_SUFFIX ".dll"
- # endif
-+#endif
-+#ifdef WINDOWS_WITH_MSVC
- # define LIB_PREFIX ""
- # define LIB_STATIC_PREFIX ""
- # define OBJ_SUFFIX ".obj"
-diff --git a/icu4c/source/tools/toolutil/pkg_genc.h b/icu4c/source/tools/toolutil/pkg_genc.h
-index 2dd1b45cde9..65604436fd6 100644
---- a/icu4c/source/tools/toolutil/pkg_genc.h
-+++ b/icu4c/source/tools/toolutil/pkg_genc.h
-@@ -17,7 +17,7 @@
-
- /*** Platform #defines move here ***/
- #if U_PLATFORM_HAS_WIN32_API
--#ifdef __GNUC__
-+#if defined(__GNUC__) || defined(__clang__)
- #define WINDOWS_WITH_GNUC
- #else
- #define WINDOWS_WITH_MSVC
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icu/0002-Windows-enable-C-code-generation-with-overridden-ent.patch b/3rdparty/ext_icu/0002-Windows-enable-C-code-generation-with-overridden-ent.patch
deleted file mode 100644
index 63c50fe443..0000000000
--- a/3rdparty/ext_icu/0002-Windows-enable-C-code-generation-with-overridden-ent.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 6728f3117fb33734c15d9add4e432db4f135d047 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Wed, 16 Nov 2022 19:16:08 -0300
-Subject: [PATCH 2/3] Windows: enable C-code generation with overridden entry
- point
-
----
- icu4c/source/tools/toolutil/pkg_genc.cpp | 12 ++++++++++++
- icu4c/source/tools/toolutil/pkg_genc.h | 2 +-
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/icu4c/source/tools/toolutil/pkg_genc.cpp b/icu4c/source/tools/toolutil/pkg_genc.cpp
-index 741a8a5228c..4ae36702da6 100644
---- a/icu4c/source/tools/toolutil/pkg_genc.cpp
-+++ b/icu4c/source/tools/toolutil/pkg_genc.cpp
-@@ -485,6 +485,18 @@ writeCCode(
- #endif
- }
-
-+ if(optEntryPoint != NULL) {
-+ uprv_strcpy(entry, optEntryPoint);
-+ uprv_strcat(entry, "_dat");
-+ }
-+ /* turn dashes in the entry name into underscores */
-+ length=uprv_strlen(entry);
-+ for(i=0; i<length; ++i) {
-+ if(entry[length+i]=='-') {
-+ entry[length+i]='_';
-+ }
-+ }
-+
- out=T_FileStream_open(buffer, "w");
- if(out==nullptr) {
- fprintf(stderr, "genccode: unable to open output file %s\n", buffer);
-diff --git a/icu4c/source/tools/toolutil/pkg_genc.h b/icu4c/source/tools/toolutil/pkg_genc.h
-index 65604436fd6..0723e777894 100644
---- a/icu4c/source/tools/toolutil/pkg_genc.h
-+++ b/icu4c/source/tools/toolutil/pkg_genc.h
-@@ -48,7 +48,7 @@
- * the data to generate the final data library. This can
- * increase the performance of the pkdata tool.
- */
--#if U_PLATFORM == U_PF_OS400
-+#if U_PLATFORM == U_PF_OS400 || U_PLATFORM_HAS_WIN32_API
- #define USE_SINGLE_CCODE_FILE
- #endif
-
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icu/0003-toolutil-Fix-MASM-generation-for-x86-64-and-ARM64.patch b/3rdparty/ext_icu/0003-toolutil-Fix-MASM-generation-for-x86-64-and-ARM64.patch
deleted file mode 100644
index a41b9dc46e..0000000000
--- a/3rdparty/ext_icu/0003-toolutil-Fix-MASM-generation-for-x86-64-and-ARM64.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From cb2bc2dcd9fdebb871938b311156527b3330c285 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Thu, 17 Nov 2022 11:56:02 -0300
-Subject: [PATCH 3/3] toolutil: Fix MASM generation for x86-64 and ARM64
-
----
- icu4c/source/tools/toolutil/pkg_genc.cpp | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/icu4c/source/tools/toolutil/pkg_genc.cpp b/icu4c/source/tools/toolutil/pkg_genc.cpp
-index 4ae36702da6..af253e38cad 100644
---- a/icu4c/source/tools/toolutil/pkg_genc.cpp
-+++ b/icu4c/source/tools/toolutil/pkg_genc.cpp
-@@ -254,6 +254,17 @@ static const struct AssemblyType {
- "%s:\n",
- " dd ","",HEX_0X
- },
-+#if defined(_WIN64)
-+ { "masm",
-+ "\tTITLE %s\n"
-+ "; generated by genccode\n"
-+ "\tPUBLIC _%s\n"
-+ "ICUDATA_%s\tSEGMENT READONLY 'DATA'\n"
-+ "\tALIGN 16\n"
-+ "_%s\tLABEL DWORD\n",
-+ "\tDWORD ","\nICUDATA_%s\tENDS\n\tEND\n",HEX_0H
-+ }
-+#else
- { "masm",
- "\tTITLE %s\n"
- "; generated by genccode\n"
-@@ -274,6 +285,7 @@ static const struct AssemblyType {
- "_%s\tLABEL DWORD\n",
- "\tDWORD ","\nICUDATA_%s\tENDS\n\tEND\n",HEX_0H
- }
-+#endif
- };
-
- static int32_t assemblyHeaderIndex = -1;
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icu/0004-meson-Use-NASM-to-work-around-MSVC-compiler-performa.patch b/3rdparty/ext_icu/0004-meson-Use-NASM-to-work-around-MSVC-compiler-performa.patch
deleted file mode 100644
index fdb8780952..0000000000
--- a/3rdparty/ext_icu/0004-meson-Use-NASM-to-work-around-MSVC-compiler-performa.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 4bb188dadbc842a69fc0cd37bb615cb84160c9d8 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sun, 20 Nov 2022 14:08:43 -0300
-Subject: [PATCH 4/7] meson: Use NASM to work around MSVC compiler performance
- issues
-
----
- source/data/dummy.c | 8 ++++++++
- source/data/meson.build | 9 ++++++---
- 2 files changed, 14 insertions(+), 3 deletions(-)
- create mode 100644 source/data/dummy.c
-
-diff --git a/source/data/dummy.c b/source/data/dummy.c
-new file mode 100644
-index 0000000..e924b26
---- /dev/null
-+++ b/source/data/dummy.c
-@@ -0,0 +1,8 @@
-+#include <stdlib.h>
-+
-+int dummy(void);
-+
-+int dummy(void)
-+{
-+ return 0;
-+}
-diff --git a/source/data/meson.build b/source/data/meson.build
-index cb98e95..25dfd91 100644
---- a/source/data/meson.build
-+++ b/source/data/meson.build
-@@ -16,14 +16,17 @@ if host_machine.system() == 'windows' and get_option('default_library') == 'stat
- endif
-
- if cpp.get_argument_syntax() == 'msvc'
-+ if (host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64') and add_languages('nasm', required: false)
-+ icudata_asm_output = '@[email protected]'.format(U_ICUDATA_NAME)
-+ icudata_command += ['-a', 'nasm']
- ## Uncomment if you want to use MASM (>= 0.64), but be aware
- ## it is Very Slow to build.
-- # if add_languages('masm', required: false)
-+ # elif add_languages('masm', required: false)
- # icudata_asm_output = '@[email protected]'.format(U_ICUDATA_NAME)
- # icudata_command += ['-a', 'masm']
-- # else
-+ else
- icudata_asm_output = '@[email protected]'.format(U_ICUDATA_NAME)
-- # endif
-+ endif
- elif host_machine.system() == 'cygwin'
- icudata_asm_output = '@[email protected]'.format(U_ICUDATA_NAME)
- icudata_command += ['-a', 'gcc-cygwin']
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icu/0005-meson-Work-around-Meson-linking-bug-when-there-s-no-.patch b/3rdparty/ext_icu/0005-meson-Work-around-Meson-linking-bug-when-there-s-no-.patch
deleted file mode 100644
index 2b06acefaa..0000000000
--- a/3rdparty/ext_icu/0005-meson-Work-around-Meson-linking-bug-when-there-s-no-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From b27004875781ecd59c631507121a81e87f0d11dd Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sun, 20 Nov 2022 14:09:06 -0300
-Subject: [PATCH 5/7] meson: Work around Meson linking bug when there's no C
- object present with MSVC
-
----
- source/data/meson.build | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/source/data/meson.build b/source/data/meson.build
-index 25dfd91..4a1bba5 100644
---- a/source/data/meson.build
-+++ b/source/data/meson.build
-@@ -56,6 +56,11 @@ icudata_asm = custom_target(
-
- sources = [icudata_asm]
-
-+# Work around Meson bug -- https://github.com/mesonbuild/meson/issues/11083
-+if cpp.get_argument_syntax() == 'msvc'
-+ sources += files('dummy.c')
-+endif
-+
- python_exe = import('python').find_installation('python3')
-
- icudata_exports = custom_target(
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icu/0006-meson-Enable-icudata-for-MSVC.patch b/3rdparty/ext_icu/0006-meson-Enable-icudata-for-MSVC.patch
deleted file mode 100644
index 15918647cd..0000000000
--- a/3rdparty/ext_icu/0006-meson-Enable-icudata-for-MSVC.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From d7ca1a58606094cde49e5615f614acc6c7cd173b Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Mon, 21 Nov 2022 10:30:59 -0300
-Subject: [PATCH 6/7] meson: Enable icudata for MSVC
-
----
- source/data/meson.build | 32 +++++++++++++++-----------------
- 1 file changed, 15 insertions(+), 17 deletions(-)
-
-diff --git a/source/data/meson.build b/source/data/meson.build
-index 4a1bba5..b175771 100644
---- a/source/data/meson.build
-+++ b/source/data/meson.build
-@@ -74,23 +74,21 @@ if host_machine.system() == 'windows'
- sources += windows.compile_resources('misc/icudata.rc', include_directories: incdir)
- endif
-
--if cpp.get_argument_syntax() != 'msvc'
-- icudata = library(
-- icudata_name,
-- sources,
-- include_directories: incdir,
-- version: U_ICU_VERSION,
-- vs_module_defs: icudata_exports,
-- install: true,
-- )
-+icudata = library(
-+ icudata_name,
-+ sources,
-+ include_directories: incdir,
-+ version: U_ICU_VERSION,
-+ vs_module_defs: icudata_exports,
-+ install: true,
-+)
-
-- icudata_dep = declare_dependency(
-- link_with: icudata,
-- include_directories: incdir,
-- compile_args: usage_args,
-- )
-+icudata_dep = declare_dependency(
-+ link_with: icudata,
-+ include_directories: incdir,
-+ compile_args: usage_args,
-+)
-
-- if meson.version().version_compare('>=0.54.0')
-- meson.override_dependency('icu-data', icudata_dep)
-- endif
-+if meson.version().version_compare('>=0.54.0')
-+ meson.override_dependency('icu-data', icudata_dep)
- endif
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icu/0007-meson-Work-around-windeployqt-expecting-no-ICU-prefi.patch b/3rdparty/ext_icu/0007-meson-Work-around-windeployqt-expecting-no-ICU-prefi.patch
deleted file mode 100644
index 7fc62dd870..0000000000
--- a/3rdparty/ext_icu/0007-meson-Work-around-windeployqt-expecting-no-ICU-prefi.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 3343609c32c7a9de3a20c764a3b5f3cd7661e9d6 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Wed, 18 Jan 2023 12:55:09 -0300
-Subject: [PATCH 7/7] meson: Work around windeployqt expecting no ICU prefix
-
----
- meson.build | 7 +++++++
- source/common/meson.build | 2 ++
- source/data/meson.build | 1 +
- source/i18n/meson.build | 2 ++
- source/io/meson.build | 1 +
- source/layoutex/meson.build | 1 +
- source/stubdata/meson.build | 2 ++
- source/tools/toolutil/meson.build | 2 ++
- 8 files changed, 18 insertions(+)
-
-diff --git a/meson.build b/meson.build
-index e20ef6b..1645228 100644
---- a/meson.build
-+++ b/meson.build
-@@ -64,4 +64,11 @@ else
- library_suffix = ''
- endif
-
-+# Fix windeployqt expecting no prefix on Windows
-+if host_machine.system() == 'windows' and cpp.get_argument_syntax() != 'msvc'
-+ name_prefix = ''
-+else
-+ name_prefix = []
-+endif
-+
- subdir('source')
-diff --git a/source/common/meson.build b/source/common/meson.build
-index a96609f..243fc1a 100644
---- a/source/common/meson.build
-+++ b/source/common/meson.build
-@@ -16,6 +16,7 @@ common_lib = library(
- link_with: stubdata_lib,
- dependencies: dl_dep,
- version: U_ICU_VERSION,
-+ name_prefix: name_prefix,
- install: true,
- )
-
-@@ -31,6 +32,7 @@ else
- link_with: stubdata_native_lib,
- dependencies: dl_native_dep,
- version: U_ICU_VERSION,
-+ name_prefix: name_prefix,
- native: true,
- )
- endif
-diff --git a/source/data/meson.build b/source/data/meson.build
-index b175771..48eedd8 100644
---- a/source/data/meson.build
-+++ b/source/data/meson.build
-@@ -80,6 +80,7 @@ icudata = library(
- include_directories: incdir,
- version: U_ICU_VERSION,
- vs_module_defs: icudata_exports,
-+ name_prefix: name_prefix,
- install: true,
- )
-
-diff --git a/source/i18n/meson.build b/source/i18n/meson.build
-index e3a2f92..5ff2dc5 100644
---- a/source/i18n/meson.build
-+++ b/source/i18n/meson.build
-@@ -18,6 +18,7 @@ i18n_lib = library(
- c_args: '-DU_I18N_IMPLEMENTATION',
- cpp_args: '-DU_I18N_IMPLEMENTATION',
- version: U_ICU_VERSION,
-+ name_prefix: name_prefix,
- install: true,
- )
-
-@@ -31,6 +32,7 @@ else
- c_args: '-DU_I18N_IMPLEMENTATION',
- cpp_args: '-DU_I18N_IMPLEMENTATION',
- version: U_ICU_VERSION,
-+ name_prefix: name_prefix,
- native: true,
- )
- endif
-diff --git a/source/io/meson.build b/source/io/meson.build
-index 1dd3435..aa40755 100644
---- a/source/io/meson.build
-+++ b/source/io/meson.build
-@@ -12,6 +12,7 @@ io_lib = library(
- cpp_args: '-DU_IO_IMPLEMENTATION',
- dependencies: icui18n_dep,
- version: U_ICU_VERSION,
-+ name_prefix: name_prefix,
- install: true,
- )
-
-diff --git a/source/layoutex/meson.build b/source/layoutex/meson.build
-index e78136e..0c18785 100644
---- a/source/layoutex/meson.build
-+++ b/source/layoutex/meson.build
-@@ -14,6 +14,7 @@ layoutex_lib = library(
- cpp_args: '-DU_LAYOUTEX_IMPLEMENTATION',
- dependencies: icuuc_dep,
- version: U_ICU_VERSION,
-+ name_prefix: name_prefix,
- install: true,
- )
-
-diff --git a/source/stubdata/meson.build b/source/stubdata/meson.build
-index fea07ce..1e92689 100644
---- a/source/stubdata/meson.build
-+++ b/source/stubdata/meson.build
-@@ -12,6 +12,7 @@ stubdata_lib = library(
- cpp_args: '-DSTUBDATA_BUILD',
- include_directories: incdir,
- version: U_ICU_VERSION,
-+ name_prefix: name_prefix,
- )
-
- if meson.can_run_host_binaries()
-@@ -25,5 +26,6 @@ else
- include_directories: incdir,
- version: U_ICU_VERSION,
- native: true,
-+ name_prefix: name_prefix,
- )
- endif
-diff --git a/source/tools/toolutil/meson.build b/source/tools/toolutil/meson.build
-index 8afc576..a62c955 100644
---- a/source/tools/toolutil/meson.build
-+++ b/source/tools/toolutil/meson.build
-@@ -15,6 +15,7 @@ toolutil_lib = library(
- c_args: toolutil_c_args,
- cpp_args: toolutil_cpp_args,
- dependencies: icui18n_dep,
-+ name_prefix: name_prefix,
- )
-
- if meson.can_run_host_binaries()
-@@ -26,6 +27,7 @@ else
- c_args: toolutil_c_args,
- cpp_args: toolutil_cpp_args,
- dependencies: icui18n_native_dep,
-+ name_prefix: name_prefix,
- native: true,
- )
- endif
---
-2.24.1.windows.2
-
diff --git a/3rdparty/ext_icu/CMakeLists.txt b/3rdparty/ext_icu/CMakeLists.txt
deleted file mode 100644
index 8bbc92e649..0000000000
--- a/3rdparty/ext_icu/CMakeLists.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-SET(EXTPREFIX_icu "${EXTPREFIX}" )
-
-ExternalProject_Add(
- ext_icu_meson
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://wrapdb.mesonbuild.com/v2/icu_73.2-2/get_patch
- URL_HASH SHA256=218a5f20b58b6b2372e636c2eb2d611a898fdc11be17d6c4f35a3cd54d472010
-
- DOWNLOAD_NAME "icu_73.2-2_patch.zip"
-
- BUILD_COMMAND ""
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ""
- UPDATE_COMMAND ""
-
- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/meson"
-)
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_icu
- MESON
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/unicode-org/icu/releases/download/release-73-2/icu4c-73_2-src.tgz
- URL_HASH SHA256=818a80712ed3caacd9b652305e01afc7fa167e6f2e94996da44b90c2ab604ce1
-
- PATCH_COMMAND ${CMAKE_COMMAND} -E echo Deploying Meson wrap
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${CMAKE_CURRENT_BINARY_DIR}/meson
- <SOURCE_DIR>
- COMMAND ${CMAKE_COMMAND} -E echo Deploying patches
- COMMAND ${PATCH_COMMAND} -p2 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-MinGW-support-from-MSYS.patch
- COMMAND ${PATCH_COMMAND} -p2 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Windows-enable-C-code-generation-with-overridden-ent.patch
- COMMAND ${PATCH_COMMAND} -p2 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-toolutil-Fix-MASM-generation-for-x86-64-and-ARM64.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0004-meson-Use-NASM-to-work-around-MSVC-compiler-performa.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0005-meson-Work-around-Meson-linking-bug-when-there-s-no-.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0006-meson-Enable-icudata-for-MSVC.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0007-meson-Work-around-windeployqt-expecting-no-ICU-prefi.patch
-
- CONFIGURE_ARGS --prefix=${EXTPREFIX_icu} ${EXTRA_MESON_FLAGS}
-
- UPDATE_COMMAND ""
-
- DEPENDS ${MESON_DEP} ${PKG_CONFIG_DEP} ext_icu_meson
-)
diff --git a/3rdparty/ext_jpeg/CMakeLists.txt b/3rdparty/ext_jpeg/CMakeLists.txt
deleted file mode 100644
index 7a74c6981b..0000000000
--- a/3rdparty/ext_jpeg/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-SET(PREFIX_ext_jpeg "${EXTPREFIX}" )
-if (ANDROID)
-ExternalProject_Add( ext_jpeg
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://downloads.sourceforge.net/project/libjpeg-turbo/2.1.4/libjpeg-turbo-2.1.4.tar.gz
- URL_HASH SHA256=d3ed26a1131a13686dfca4935e520eb7c90ae76fbc45d98bb50a8dc86230342b
-
- CMAKE_ARGS -DANDROID_ARM_MODE=arm -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_jpeg} -DENABLE_SHARED=ON -DWITH_SIMD=OFF -DENABLE_STATIC=OFF _DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-else()
-
- kis_ExternalProject_Add_with_separate_builds_apple(
- ext_jpeg
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://downloads.sourceforge.net/project/libjpeg-turbo/2.1.4/libjpeg-turbo-2.1.4.tar.gz
- URL_HASH SHA256=d3ed26a1131a13686dfca4935e520eb7c90ae76fbc45d98bb50a8dc86230342b
-
- INSTALL_DIR ${PREFIX_ext_jpeg}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_jpeg} -DWITH_SIMD=OFF _DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
- )
-
-#else()
-#ExternalProject_Add( ext_jpeg
-# DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
-# URL https://downloads.sourceforge.net/project/libjpeg-turbo/2.1.4/libjpeg-turbo-2.1.4.tar.gz
-# URL_HASH SHA256=d3ed26a1131a13686dfca4935e520eb7c90ae76fbc45d98bb50a8dc86230342b
-
-# INSTALL_DIR ${PREFIX_ext_jpeg}
-# CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_jpeg} -DWITH_SIMD=OFF _DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
-# UPDATE_COMMAND ""
-#)
-endif()
diff --git a/3rdparty/ext_jpegxl/CMakeLists.txt b/3rdparty/ext_jpegxl/CMakeLists.txt
deleted file mode 100644
index 8342f1efbd..0000000000
--- a/3rdparty/ext_jpegxl/CMakeLists.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-SET(PREFIX_ext_jpegxl "${EXTPREFIX}" )
-
-if (MINGW)
- include(CheckCXXSymbolExists)
- include(CheckCXXCompilerFlag)
- check_cxx_symbol_exists(PRIu64 "inttypes.h" CAN_BUILD_HIGHWAY)
- check_cxx_compiler_flag("-mavx512f" CAN_TARGET_AVX512F)
- if (NOT CAN_BUILD_HIGHWAY OR NOT CAN_TARGET_AVX512F)
- message(WARNING "Skipping libjxl, compiler cannot build highway.")
- return()
- endif()
-endif()
-
-ExternalProject_Add( ext_highway
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME highway-1.0.7.tar.gz
- URL https://github.com/google/highway/archive/refs/tags/1.0.7.tar.gz
- URL_HASH SHA256=5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
-
- INSTALL_DIR ${PREFIX_ext_jpegxl}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_jpegxl} DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-
-ExternalProject_Add( ext_brotli
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME brotli-v1.1.0.tar.gz
- URL https://github.com/google/brotli/archive/v1.1.0.tar.gz
- URL_HASH SHA256=e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff
-
- INSTALL_DIR ${PREFIX_ext_jpegxl}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_jpegxl} DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_TESTING=OFF ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-
-ExternalProject_Add( ext_jpegxl
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME libjxl-v0.10.0.tar.gz
- URL https://github.com/libjxl/libjxl/archive/refs/tags/v0.10.0.tar.gz
- URL_HASH SHA256=ab32d52b033c814d24762db4942a3b45315d9db37bf5c8a9741ccc1bb0a52d97
-
- INSTALL_DIR ${PREFIX_ext_jpegxl}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_jpegxl} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- -DJPEGXL_VERSION=0.10.0
- -DJPEGXL_ENABLE_BENCHMARK=OFF
- -DJPEGXL_ENABLE_COVERAGE=OFF
- -DJPEGXL_ENABLE_EXAMPLES=OFF
- -DJPEGXL_ENABLE_FUZZERS=OFF
- -DJPEGXL_ENABLE_JNI=OFF
- -DJPEGXL_ENABLE_SJPEG=OFF
- -DJPEGXL_ENABLE_SKCMS=OFF
- -DJPEGXL_ENABLE_TOOLS=OFF
- -DJPEGXL_ENABLE_VIEWERS=OFF
- -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF
- -DJPEGXL_ENABLE_JPEGLI=OFF
- "-DCMAKE_CXX_FLAGS:STRING=-DJXL_DEBUG_ON_ERROR -DJX_DEBUG_WARNING" ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ext_brotli ext_highway ext_lcms2
-)
diff --git a/3rdparty/ext_json_c/CMakeLists.txt b/3rdparty/ext_json_c/CMakeLists.txt
deleted file mode 100755
index 0add31971d..0000000000
--- a/3rdparty/ext_json_c/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PREFIX_ext_json_c "${EXTPREFIX}" )
-ExternalProject_Add( ext_json_c
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/json-c/json-c/archive/refs/tags/json-c-0.16-20220414.tar.gz
- URL_HASH SHA256=3ecaeedffd99a60b1262819f9e60d7d983844073abc74e495cb822b251904185
-
- INSTALL_DIR ${PREFIX_ext_json_c}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_json_c} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DDISABLE_WERROR=ON
-
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_lager/0001-Correctly-use-global-namespace-to-resolve-lager-deta.patch b/3rdparty/ext_lager/0001-Correctly-use-global-namespace-to-resolve-lager-deta.patch
deleted file mode 100644
index c29177ca56..0000000000
--- a/3rdparty/ext_lager/0001-Correctly-use-global-namespace-to-resolve-lager-deta.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From eb883332d8e3f6d7f42a0c68e81047d4fa84d8dd Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sun, 23 Apr 2023 21:41:01 -0300
-Subject: [PATCH 1/2] Correctly use global namespace to resolve
- lager::detail::make_getset_t
-
----
- lager/lenses.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lager/lenses.hpp b/lager/lenses.hpp
-index 7100103..f19a9b8 100644
---- a/lager/lenses.hpp
-+++ b/lager/lenses.hpp
-@@ -249,7 +249,7 @@ template <typename Getter, typename Setter>
- auto getset(const Getter& getter, const Setter& setter)
- {
- return zug::comp([=](auto&& f) {
-- return detail::make_getset_t(LAGER_FWD(f), getter, setter);
-+ return ::lager::detail::make_getset_t(LAGER_FWD(f), getter, setter);
- });
- }
-
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_lager/0002-Fix-attempt-to-use-final-specifier-with-a-non-virtua.patch b/3rdparty/ext_lager/0002-Fix-attempt-to-use-final-specifier-with-a-non-virtua.patch
deleted file mode 100644
index 50ee09fe2c..0000000000
--- a/3rdparty/ext_lager/0002-Fix-attempt-to-use-final-specifier-with-a-non-virtua.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From d1209444c4fb11c3bced674306823b7d2f4161a0 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sun, 23 Apr 2023 21:42:26 -0300
-Subject: [PATCH 2/2] Fix attempt to use final specifier with a non virtual
- function
-
-This is incorrect as per s.11.4.1.15 [class.mem.general] of the C++
-Standard [1].
-
-See also: https://en.cppreference.com/w/cpp/language/final
-
-[1]: https://eel.is/c++draft/class.mem.general#15
----
- lager/constant.hpp | 2 +-
- lager/detail/lens_nodes.hpp | 2 +-
- lager/detail/merge_nodes.hpp | 2 +-
- lager/detail/nodes.hpp | 4 ++--
- lager/detail/xform_nodes.hpp | 2 +-
- lager/sensor.hpp | 2 +-
- lager/setter.hpp | 4 ++--
- lager/state.hpp | 2 +-
- lager/store.hpp | 2 +-
- 9 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/lager/constant.hpp b/lager/constant.hpp
-index 0b985a0..ede3d7e 100644
---- a/lager/constant.hpp
-+++ b/lager/constant.hpp
-@@ -27,7 +27,7 @@ class constant_node : public root_node<T, reader_node>
- public:
- using base_t::base_t;
-
-- virtual void recompute() final {}
-+ void recompute() final override {}
- };
-
- template <typename T>
-diff --git a/lager/detail/lens_nodes.hpp b/lager/detail/lens_nodes.hpp
-index 51a791b..39d78de 100644
---- a/lager/detail/lens_nodes.hpp
-+++ b/lager/detail/lens_nodes.hpp
-@@ -60,7 +60,7 @@ public:
- , lens_{std::forward<Lens2>(l)}
- {}
-
-- void recompute() final
-+ void recompute() final override
- {
- this->push_down(view(lens_, current_from(this->parents())));
- }
-diff --git a/lager/detail/merge_nodes.hpp b/lager/detail/merge_nodes.hpp
-index 45e2cd4..33ba23e 100644
---- a/lager/detail/merge_nodes.hpp
-+++ b/lager/detail/merge_nodes.hpp
-@@ -49,7 +49,7 @@ public:
- : base_t{current_from(parents), std::forward<ParentsTuple>(parents)}
- {}
-
-- void recompute() final { this->push_down(current_from(this->parents())); }
-+ void recompute() final override { this->push_down(current_from(this->parents())); }
- };
-
- template <typename Parents>
-diff --git a/lager/detail/nodes.hpp b/lager/detail/nodes.hpp
-index 87ed89b..e6e4db1 100644
---- a/lager/detail/nodes.hpp
-+++ b/lager/detail/nodes.hpp
-@@ -260,7 +260,7 @@ public:
- , parents_{std::move(parents)}
- {}
-
-- void refresh() final
-+ void refresh() final override
- {
- std::apply([&](auto&&... ps) { noop((ps->refresh(), 0)...); },
- parents_);
-@@ -302,7 +302,7 @@ struct root_node : Base<T>
- using base_t = Base<T>;
- using base_t::base_t;
-
-- void refresh() final {}
-+ void refresh() final override {}
- };
-
- template <typename... Nodes>
-diff --git a/lager/detail/xform_nodes.hpp b/lager/detail/xform_nodes.hpp
-index 9babe57..c373aa9 100644
---- a/lager/detail/xform_nodes.hpp
-+++ b/lager/detail/xform_nodes.hpp
-@@ -95,7 +95,7 @@ public:
- , down_step_{std::forward<Xform2>(xform)(send_down_rf)}
- {}
-
-- void recompute() final
-+ void recompute() final override
- {
- std::apply([&](auto&&... ps) { down_step_(this, ps->current()...); },
- this->parents());
-diff --git a/lager/sensor.hpp b/lager/sensor.hpp
-index 7c29780..3dca346 100644
---- a/lager/sensor.hpp
-+++ b/lager/sensor.hpp
-@@ -41,7 +41,7 @@ public:
- , sensor_{std::move(sensor)}
- {}
-
-- void recompute() final { this->push_down(sensor_()); }
-+ void recompute() final override { this->push_down(sensor_()); }
-
- private:
- SensorFnT sensor_;
-diff --git a/lager/setter.hpp b/lager/setter.hpp
-index eec8ec2..01009ec 100644
---- a/lager/setter.hpp
-+++ b/lager/setter.hpp
-@@ -40,7 +40,7 @@ public:
- , setter_fn_{std::move(fn)}
- {}
-
-- void recompute() final
-+ void recompute() final override
- {
- if (recomputed_)
- recomputed_ = false;
-@@ -48,7 +48,7 @@ public:
- this->push_down(parent_->current());
- }
-
-- void refresh() final {}
-+ void refresh() final override {}
-
- void send_up(const value_type& value) override
- {
-diff --git a/lager/state.hpp b/lager/state.hpp
-index 6ba43da..ff99e4d 100644
---- a/lager/state.hpp
-+++ b/lager/state.hpp
-@@ -37,7 +37,7 @@ public:
-
- using base_t::base_t;
-
-- virtual void recompute() final {}
-+ void recompute() final override {}
-
- void send_up(const value_type& value) final
- {
-diff --git a/lager/store.hpp b/lager/store.hpp
-index 6af905a..26bb509 100644
---- a/lager/store.hpp
-+++ b/lager/store.hpp
-@@ -40,7 +40,7 @@ struct store_node_base : public root_node<Model, reader_node>
- using base_t = root_node<Model, reader_node>;
- using base_t::base_t;
-
-- virtual void recompute() final {}
-+ void recompute() final override {}
- virtual future dispatch(action_t action) = 0;
- };
-
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_lager/CMakeLists.txt b/3rdparty/ext_lager/CMakeLists.txt
deleted file mode 100644
index d52145e015..0000000000
--- a/3rdparty/ext_lager/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-SET(EXTPREFIX_lager "${EXTPREFIX}" )
-
-ExternalProject_Add( ext_zug
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://github.com/arximboldi/zug.git
- GIT_TAG deb266f4c7c35d325de7eb3d033f06e0809495f2
-
- CMAKE_ARGS -Dzug_BUILD_TESTS=OFF -Dzug_BUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_lager} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-
-ExternalProject_Add( ext_immer
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://github.com/arximboldi/immer.git
- GIT_TAG 42e6beafed53f2ecd971360270f421f9c2e36642
-
- CMAKE_ARGS -Dimmer_BUILD_TESTS=OFF -Dimmer_BUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_lager} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-
-set(EXTRA_LAGER_ARGS)
-
-if (MINGW AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1"
- KRITA_boost_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION})
- set(EXTRA_LAGER_ARGS "-DBoost_COMPILER=mgw${KRITA_boost_COMPILER_VERSION}")
-endif()
-
-ExternalProject_Add( ext_lager
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://github.com/dimula73/lager.git
- GIT_TAG 0b6ab3e0e880bc36be5da4984d768fde03b7cf19
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Correctly-use-global-namespace-to-resolve-lager-deta.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Fix-attempt-to-use-final-specifier-with-a-non-virtua.patch
-
- CMAKE_ARGS -Dlager_BUILD_DEBUGGER_EXAMPLES=OFF
- -Dlager_BUILD_TESTS=OFF
- -Dlager_BUILD_EXAMPLES=OFF
- -Dlager_BUILD_DOCS=OFF
- ${EXTRA_LAGER_ARGS}
- -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_lager}
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ext_zug ext_immer
-)
diff --git a/3rdparty/ext_lcms2/0002-Add-modern-CMake-toolchain.patch b/3rdparty/ext_lcms2/0002-Add-modern-CMake-toolchain.patch
deleted file mode 100644
index ec6424ad12..0000000000
--- a/3rdparty/ext_lcms2/0002-Add-modern-CMake-toolchain.patch
+++ /dev/null
@@ -1,324 +0,0 @@
-From b6dc4548ccb41c67b3a2989ef1a801274abdc9e2 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Thu, 20 Oct 2022 20:13:00 -0300
-Subject: [PATCH 2/2] Add modern CMake toolchain
-
-Co-authored-by: Halla Rempt <[email protected]>
----
- CMakeLists.txt | 59 ++++++++++++++++++++++
- plugins/fast_float/CMakeLists.txt | 51 +++++++++++++++++++
- src/CMakeLists.txt | 82 +++++++++++++++++++++++++++++++
- testbed/CMakeLists.txt | 3 ++
- utils/CMakeLists.txt | 77 +++++++++++++++++++++++++++++
- 5 files changed, 272 insertions(+)
- create mode 100644 CMakeLists.txt
- create mode 100644 plugins/fast_float/CMakeLists.txt
- create mode 100644 src/CMakeLists.txt
- create mode 100644 testbed/CMakeLists.txt
- create mode 100644 utils/CMakeLists.txt
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..7ea5907
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,59 @@
-+cmake_minimum_required(VERSION 3.1)
-+
-+project(lcms2 VERSION "2.12")
-+
-+option(BUILD_TESTS "build the test executable" OFF)
-+option(BUILD_SHARED_LIBS "build as shared library" ON)
-+option(BUILD_UTILS "build the utilities executables" OFF)
-+option(BUILD_PLUGINS "build the plugins" ON)
-+
-+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-+
-+include(CheckLibraryExists)
-+CHECK_LIBRARY_EXISTS(m sqrt "" HAVE_LIBM)
-+
-+include(CheckCSourceCompiles)
-+
-+check_c_source_compiles("__attribute__((visibility(\"hidden\"))) int foo() { return 0; } int main() { return 0; }" HAVE_FUNC_ATTRIBUTE_VISIBILITY)
-+
-+include(CheckCCompilerFlag)
-+
-+check_c_compiler_flag("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN)
-+
-+include(FindThreads)
-+
-+add_subdirectory(src)
-+
-+if(BUILD_PLUGINS)
-+ add_subdirectory(plugins/fast_float)
-+endif()
-+
-+if(BUILD_TESTS)
-+ add_subdirectory(testbed)
-+endif(BUILD_TESTS)
-+
-+if(BUILD_UTILS)
-+ add_subdirectory(utils)
-+endif(BUILD_UTILS)
-+
-+set(prefix ${CMAKE_INSTALL_PREFIX})
-+set(exec_prefix "\${prefix}")
-+set(libdir "\${prefix}/lib")
-+set(includedir "\${exec_prefix}/include")
-+set(PACKAGE ${PROJECT_NAME})
-+set(VERSION ${lcms2_VERSION})
-+if(BUILD_PLUGINS)
-+ set(LIB_PLUGINS "-llcms2_fast_float")
-+endif()
-+if(HAVE_LIBM)
-+ set(LIB_MATH "-lm")
-+endif()
-+if(Threads_FOUND)
-+ set(LIB_THREAD ${CMAKE_THREAD_LIBS_INIT})
-+endif()
-+
-+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lcms2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lcms2.pc @ONLY)
-+install(
-+ FILES ${CMAKE_CURRENT_BINARY_DIR}/lcms2.pc
-+ DESTINATION lib/pkgconfig
-+)
-diff --git a/plugins/fast_float/CMakeLists.txt b/plugins/fast_float/CMakeLists.txt
-new file mode 100644
-index 0000000..49b0825
---- /dev/null
-+++ b/plugins/fast_float/CMakeLists.txt
-@@ -0,0 +1,51 @@
-+include(CheckCXXSourceCompiles)
-+check_cxx_source_compiles ("#include <emmintrin.h>
-+int main() { __m128i n = _mm_set1_epi8(42); }" HAVE_SSE2)
-+
-+set(lcms_plugin_SRCS
-+ src/fast_16_tethra.c
-+ src/fast_8_curves.c
-+ src/fast_8_matsh.c
-+ src/fast_8_tethra.c
-+ src/fast_float_15bits.c
-+ src/fast_float_15mats.c
-+ src/fast_float_cmyk.c
-+ src/fast_float_curves.c
-+ src/fast_float_lab.c
-+ src/fast_float_matsh.c
-+ src/fast_float_separate.c
-+ src/fast_float_sup.c
-+ src/fast_float_tethra.c
-+)
-+
-+add_library(lcms2_fast_float SHARED ${lcms_plugin_SRCS})
-+
-+target_include_directories(lcms2_fast_float PUBLIC
-+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
-+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
-+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
-+ $<INSTALL_INTERFACE:include>
-+)
-+
-+if (NOT HAVE_SSE)
-+ target_compile_definitions(lcms2_fast_float PUBLIC CMS_DONT_USE_SSE2=1)
-+endif()
-+
-+set_target_properties(lcms2_fast_float PROPERTIES VERSION ${lcms2_VERSION}
-+ SOVERSION ${lcms2_VERSION_MAJOR})
-+
-+if(WIN32)
-+ set_target_properties(lcms2_fast_float PROPERTIES COMPILE_FLAGS -DCMS_DLL_BUILD=1)
-+endif()
-+
-+target_link_libraries(lcms2_fast_float PUBLIC lcms2)
-+
-+install(TARGETS lcms2_fast_float RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib)
-+
-+install(FILES
-+ ${CMAKE_CURRENT_SOURCE_DIR}/../../include/lcms2_plugin.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/include/lcms2_fast_float.h
-+ DESTINATION include
-+)
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-new file mode 100644
-index 0000000..66409a5
---- /dev/null
-+++ b/src/CMakeLists.txt
-@@ -0,0 +1,82 @@
-+set(lcms_SRCS
-+ cmscnvrt.c
-+ cmserr.c
-+ cmsgamma.c
-+ cmsgmt.c
-+ cmsintrp.c
-+ cmsio0.c
-+ cmsio1.c
-+ cmslut.c
-+ cmsplugin.c
-+ cmssm.c
-+ cmsmd5.c
-+ cmsmtrx.c
-+ cmspack.c
-+ cmspcs.c
-+ cmswtpnt.c
-+ cmsxform.c
-+ cmssamp.c
-+ cmsnamed.c
-+ cmscam02.c
-+ cmsvirt.c
-+ cmstypes.c
-+ cmscgats.c
-+ cmsps2.c
-+ cmsopt.c
-+ cmshalf.c
-+ cmsalpha.c
-+)
-+
-+if (MSVC)
-+ set(lcms_SRCS ${lcms_SRCS}
-+ lcms2.def
-+ )
-+endif()
-+
-+if (BUILD_SHARED_LIBS)
-+ add_library(lcms2 SHARED ${lcms_SRCS})
-+else()
-+ add_library(lcms2 STATIC ${lcms_SRCS})
-+endif()
-+
-+set_target_properties(lcms2 PROPERTIES VERSION ${lcms2_VERSION}
-+ SOVERSION ${lcms2_VERSION_MAJOR})
-+
-+if(BUILD_SHARED_LIBS AND WIN32)
-+ target_compile_definitions(lcms2 PUBLIC CMS_DLL_BUILD=1)
-+elseif(NOT BUILD_SHARED_LIBS)
-+ target_compile_definitions(lcms2 PUBLIC CMS_STATIC=1)
-+endif()
-+
-+if(HAVE_LIBM)
-+ target_link_libraries(lcms2 PUBLIC m)
-+endif()
-+
-+if(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
-+ target_compile_definitions(lcms2 PUBLIC HAVE_FUNC_ATTRIBUTE_VISIBILITY=1)
-+endif()
-+
-+if(HAVE_VISIBILITY_HIDDEN)
-+ target_compile_options(lcms2 PUBLIC "-fvisibility=hidden")
-+endif()
-+
-+if(Threads_FOUND)
-+ target_compile_definitions(lcms2 PRIVATE HasTHREADS=1)
-+ target_link_libraries(lcms2 PUBLIC Threads::Threads)
-+endif()
-+
-+target_include_directories(lcms2 PUBLIC
-+ $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
-+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
-+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
-+ $<INSTALL_INTERFACE:include>
-+)
-+
-+install(TARGETS lcms2
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib)
-+
-+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../include/lcms2.h
-+ DESTINATION include
-+)
-diff --git a/testbed/CMakeLists.txt b/testbed/CMakeLists.txt
-new file mode 100644
-index 0000000..9f213e4
---- /dev/null
-+++ b/testbed/CMakeLists.txt
-@@ -0,0 +1,3 @@
-+add_executable(testcms testcms2.c testplugin.c zoo_icc.c)
-+target_link_libraries(testcms PUBLIC lcms2 lcms2_fast_float)
-+target_compile_definitions(testcms PRIVATE LCMS_FAST_EXTENSIONS=1)
-diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
-new file mode 100644
-index 0000000..ed2f211
---- /dev/null
-+++ b/utils/CMakeLists.txt
-@@ -0,0 +1,77 @@
-+include_directories(
-+ ${CMAKE_CURRENT_SOURCE_DIR}/common
-+ ${CMAKE_SOURCE_DIR}/include # override search path if LCMS is already installed
-+)
-+
-+find_package(JPEG)
-+find_package(TIFF)
-+
-+set(UTILS_EXECUTABLES )
-+set(UTILS_MANPAGES )
-+
-+###############################################################################
-+if(JPEG_FOUND)
-+ set(JPGICC_SRCS
-+ jpgicc/jpgicc.c
-+ jpgicc/iccjpeg.c
-+ common/xgetopt.c
-+ common/vprf.c
-+ )
-+ add_executable(jpgicc ${JPGICC_SRCS})
-+ target_link_libraries(jpgicc PUBLIC lcms2 ${JPEG_LIBRARIES})
-+ target_include_directories(jpgicc AFTER PRIVATE ${JPEG_INCLUDE_DIR})
-+ list(APPEND UTILS_EXECUTABLES jpgicc)
-+ list(APPEND UTILS_MANPAGES jpgicc/jpgicc.1)
-+endif(JPEG_FOUND)
-+
-+###############################################################################
-+set(LINKICC_SRCS
-+ linkicc/linkicc.c
-+ common/xgetopt.c
-+ common/vprf.c
-+)
-+add_executable(linkicc ${LINKICC_SRCS})
-+target_link_libraries(linkicc PUBLIC lcms2)
-+list(APPEND UTILS_EXECUTABLES linkicc)
-+list(APPEND UTILS_MANPAGES linkicc/linkicc.1)
-+
-+###############################################################################
-+set(PSICC_SRCS
-+ psicc/psicc.c
-+ common/xgetopt.c
-+ common/vprf.c
-+)
-+add_executable(psicc ${PSICC_SRCS})
-+target_link_libraries(psicc PUBLIC lcms2)
-+list(APPEND UTILS_EXECUTABLES psicc)
-+list(APPEND UTILS_MANPAGES psicc/psicc.1)
-+
-+###############################################################################
-+if(TIFF_FOUND)
-+ set(TIFICC_SRCS
-+ tificc/tificc.c
-+ common/xgetopt.c
-+ common/vprf.c
-+ )
-+ add_executable(tificc ${TIFICC_SRCS})
-+ target_link_libraries(tificc PUBLIC lcms2 ${TIFF_LIBRARIES})
-+ target_include_directories(tificc AFTER PRIVATE ${TIFF_INCLUDE_DIR})
-+ list(APPEND UTILS_EXECUTABLES tificc)
-+ list(APPEND UTILS_MANPAGES tificc/tificc.1)
-+endif(TIFF_FOUND)
-+
-+###############################################################################
-+set(TRANSICC_SRCS
-+ transicc/transicc.c
-+ common/xgetopt.c
-+ common/vprf.c
-+)
-+add_executable(transicc ${TRANSICC_SRCS})
-+target_link_libraries(transicc PUBLIC lcms2)
-+list(APPEND UTILS_EXECUTABLES transicc)
-+list(APPEND UTILS_MANPAGES transicc/transicc.1)
-+
-+install(TARGETS ${UTILS_EXECUTABLES} RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib)
-+install(FILES ${UTILS_MANPAGES} DESTINATION share/man/man1)
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_lcms2/0003-Revert-Fix-LUT-based-optimization-on-8-bits.patch b/3rdparty/ext_lcms2/0003-Revert-Fix-LUT-based-optimization-on-8-bits.patch
deleted file mode 100644
index 6ff1db8977..0000000000
--- a/3rdparty/ext_lcms2/0003-Revert-Fix-LUT-based-optimization-on-8-bits.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-From 592d81225a0e1689b11cd15fa8b3a239ca6685ff Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Mon, 28 Nov 2022 18:56:57 -0300
-Subject: [PATCH] Revert "Fix LUT based optimization on 8 bits"
-
-This reverts commit d24a40c9cc685b7145e8082606d5d9384d08e472.
----
- plugins/fast_float/src/fast_8_tethra.c | 6 +-
- plugins/fast_float/testbed/demo_cmyk.c | 151 -------------------------
- 2 files changed, 5 insertions(+), 152 deletions(-)
- delete mode 100644 plugins/fast_float/testbed/demo_cmyk.c
-
-diff --git a/plugins/fast_float/src/fast_8_tethra.c b/plugins/fast_float/src/fast_8_tethra.c
-index 84c36a0..7f72184 100644
---- a/plugins/fast_float/src/fast_8_tethra.c
-+++ b/plugins/fast_float/src/fast_8_tethra.c
-@@ -414,7 +414,11 @@ cmsBool Optimize8BitRGBTransform(_cmsTransform2Fn* TransformFn,
- // Check for validity
- lIsSuitable = TRUE;
- for (t=0; (lIsSuitable && (t < 3)); t++) {
--
-+
-+ // Exclude if non-monotonic
-+ if (!cmsIsToneCurveMonotonic(Trans[t]))
-+ lIsSuitable = FALSE;
-+
- if (IsDegenerated(Trans[t]))
- lIsSuitable = FALSE;
- }
-diff --git a/plugins/fast_float/testbed/demo_cmyk.c b/plugins/fast_float/testbed/demo_cmyk.c
-deleted file mode 100644
-index d41f3f5..0000000
---- a/plugins/fast_float/testbed/demo_cmyk.c
-+++ /dev/null
-@@ -1,151 +0,0 @@
--//---------------------------------------------------------------------------------
--//
--// Little Color Management System, fast floating point extensions
--// Copyright (c) 1998-2022 Marti Maria Saguer, all rights reserved
--//
--//
--// This program is free software: you can redistribute it and/or modify
--// it under the terms of the GNU General Public License as published by
--// the Free Software Foundation, either version 3 of the License, or
--// (at your option) any later version.
--//
--// This program is distributed in the hope that it will be useful,
--// but WITHOUT ANY WARRANTY; without even the implied warranty of
--// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--// GNU General Public License for more details.
--//
--// You should have received a copy of the GNU General Public License
--// along with this program. If not, see <http://www.gnu.org/licenses/>.
--//
--//---------------------------------------------------------------------------------
--
--#include "lcms2_fast_float.h"
--
--#include <stdlib.h>
--#include <memory.h>
--
--static
--void Fail(const char* frm, ...)
--{
-- va_list args;
--
-- va_start(args, frm);
-- vprintf(frm, args);
-- va_end(args);
-- exit(1);
--}
--
--
--
--#define ALIGNED_SIZE(a,x) (((x)+((a) - 1)) & ~((a) - 1))
--
--
--static
--void* make_image(size_t size_x, size_t size_y, cmsBool fill_rgb, cmsUInt32Number* stride_x)
--{
-- cmsUInt32Number size_x_aligned = ALIGNED_SIZE(16, size_x);
-- cmsUInt32Number line_size_in_bytes = size_x_aligned * sizeof(cmsUInt32Number); // RGBA
--
-- cmsUInt8Number* ptr_image = (cmsUInt8Number*) calloc(size_y, line_size_in_bytes);
--
-- if (ptr_image == NULL) Fail("Couldn't allocate memory for image");
--
-- if (fill_rgb)
-- {
-- size_t line;
--
-- for (line = 0; line < size_y; line++)
-- {
-- cmsUInt32Number* ptr_line = (cmsUInt32Number*)(ptr_image + line_size_in_bytes * line);
-- cmsUInt32Number argb = 0;
-- int col;
--
-- for (col = 0; col < size_x; col++)
-- *ptr_line++ = argb++;
--
-- }
-- }
--
-- *stride_x = line_size_in_bytes;
-- return (void*) ptr_image;
--}
--
--#define SIZE_X 10000
--#define SIZE_Y 10000
--
--static
--cmsFloat64Number MPixSec(cmsFloat64Number diff)
--{
-- cmsFloat64Number seconds = (cmsFloat64Number)diff / (cmsFloat64Number)CLOCKS_PER_SEC;
-- return (SIZE_X * SIZE_Y) / (1024.0 * 1024.0 * seconds);
--}
--
--
--
--static
--cmsFloat64Number speed_test(void)
--{
-- clock_t atime;
-- cmsFloat64Number diff;
-- cmsHPROFILE hProfileIn;
-- cmsHPROFILE hProfileOut;
-- cmsHTRANSFORM xform;
-- void* image_in;
-- void* image_out;
-- cmsUInt32Number stride_rgb_x, stride_cmyk_x;
--
--
-- hProfileIn = cmsOpenProfileFromFile("sRGB Color Space Profile.icm", "r");
-- hProfileOut = cmsOpenProfileFromFile("USWebCoatedSWOP.icc", "r");
--
-- if (hProfileIn == NULL || hProfileOut == NULL)
-- Fail("Unable to open profiles");
--
-- xform = cmsCreateTransform(hProfileIn, TYPE_RGBA_8, hProfileOut, TYPE_CMYK_8, INTENT_PERCEPTUAL, 0);
-- cmsCloseProfile(hProfileIn);
-- cmsCloseProfile(hProfileOut);
--
--
-- image_in = make_image(SIZE_X, SIZE_Y, TRUE, &stride_rgb_x);
-- image_out = make_image(SIZE_X, SIZE_Y, FALSE, &stride_cmyk_x);
--
-- atime = clock();
--
-- cmsDoTransformLineStride(xform, image_in, image_out, SIZE_X, SIZE_Y, stride_rgb_x, stride_cmyk_x, 0, 0);
--
-- diff = clock() - atime;
--
-- free(image_in);
-- free(image_out);
--
-- cmsDeleteTransform(xform);
-- return MPixSec(diff);
--}
--
--
--int main(void)
--{
-- cmsFloat64Number without_plugin;
-- cmsFloat64Number with_plugin;
--
-- fprintf(stdout, "DEMO of littleCMS fast float plugin: RGBA -> CMYK in Megapixels per second\n"); fflush(stdout);
--
-- // filling cache
-- fprintf(stdout, "Wait CPU cache to stabilize: "); fflush(stdout);
-- speed_test();
-- fprintf(stdout, "Ok\n");
--
-- fprintf(stdout, "Without plugin: "); fflush(stdout);
-- without_plugin = speed_test();
-- fprintf(stdout, "%.2f\n", without_plugin); fflush(stdout);
--
-- cmsPlugin(cmsFastFloatExtensions());
--
-- fprintf(stdout, "With plugin: "); fflush(stdout);
-- with_plugin = speed_test();
-- fprintf(stdout, "%.2f\n", with_plugin); fflush(stdout);
--
-- fprintf(stdout, "x %2.2f\n", (with_plugin/without_plugin)); fflush(stdout);
--
-- return 0;
--}
-\ No newline at end of file
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_lcms2/CMakeLists.txt b/3rdparty/ext_lcms2/CMakeLists.txt
deleted file mode 100644
index c1b904b7bf..0000000000
--- a/3rdparty/ext_lcms2/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-SET(PREFIX_ext_lcms2 "${EXTPREFIX}" )
-ExternalProject_Add( ext_lcms2
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/mm2/Little-CMS/releases/download/lcms2.14/lcms2-2.14.tar.gz
- URL_HASH SHA256=28474ea6f6591c4d4cee972123587001a4e6e353412a41b3e9e82219818d5740
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Add-modern-CMake-toolchain.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Revert-Fix-LUT-based-optimization-on-8-bits.patch
-
- INSTALL_DIR ${PREFIX_ext_lcms2}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_lcms2} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_TESTS=FALSE -DBUILD_UTILS=FALSE -DBUILD_STATIC=FALSE -DBUILD_PLUGINS=TRUE
-
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_libintl-lite/CMakeLists.txt b/3rdparty/ext_libintl-lite/CMakeLists.txt
deleted file mode 100644
index eb459877c2..0000000000
--- a/3rdparty/ext_libintl-lite/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-SET(EXTPREFIX_libintl-lite "${EXTPREFIX}")
-
-ExternalProject_Add(
- ext_libintl-lite
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://github.com/j-jorge/libintl-lite.git
- INSTALL_DIR ${EXTPREFIX_frameworks}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_libintl-lite}
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- ${GLOBAL_PROFILE}
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_libraw/0001-LibRaw-cmake.patch b/3rdparty/ext_libraw/0001-LibRaw-cmake.patch
deleted file mode 100644
index a1ac762dea..0000000000
--- a/3rdparty/ext_libraw/0001-LibRaw-cmake.patch
+++ /dev/null
@@ -1,1489 +0,0 @@
-From ca53730ea40e56f58bf7ec77fcc6247ab6e2efa3 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sun, 21 Feb 2021 00:13:50 +0000
-Subject: [PATCH 1/2] LibRaw-cmake
-
----
- CMakeLists.txt | 718 +++++++++++++++++++
- INSTALL.CMAKE | 62 ++
- LICENSE | 22 +
- cmake/data/libraw.lsm.cmake | 13 +
- cmake/data/libraw.pc.cmake | 12 +
- cmake/data/libraw_config.h.cmake | 50 ++
- cmake/data/libraw_r.pc.cmake | 12 +
- cmake/modules/FindLCMS.cmake | 60 ++
- cmake/modules/FindLCMS2.cmake | 72 ++
- cmake/modules/FindLibRaw.cmake | 96 +++
- cmake/modules/MacroBoolTo01.cmake | 20 +
- cmake/modules/MacroLogFeature.cmake | 159 ++++
- cmake/modules/MacroOptionalFindPackage.cmake | 48 ++
- cmake/modules/Uninstall.cmake | 22 +
- 14 files changed, 1366 insertions(+)
- create mode 100644 CMakeLists.txt
- create mode 100644 INSTALL.CMAKE
- create mode 100644 LICENSE
- create mode 100644 cmake/data/libraw.lsm.cmake
- create mode 100644 cmake/data/libraw.pc.cmake
- create mode 100644 cmake/data/libraw_config.h.cmake
- create mode 100644 cmake/data/libraw_r.pc.cmake
- create mode 100644 cmake/modules/FindLCMS.cmake
- create mode 100644 cmake/modules/FindLCMS2.cmake
- create mode 100644 cmake/modules/FindLibRaw.cmake
- create mode 100644 cmake/modules/MacroBoolTo01.cmake
- create mode 100644 cmake/modules/MacroLogFeature.cmake
- create mode 100644 cmake/modules/MacroOptionalFindPackage.cmake
- create mode 100644 cmake/modules/Uninstall.cmake
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..948a0a0
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,718 @@
-+# ===========================================================
-+#
-+# This file is a part of Libraw project
-+# <a href="http://www.libraw.org">http://www.libraw.org</a>
-+#
-+# @date 2013-09-07
-+# @brief Library for reading and processing of RAW images
-+#
-+# @author Copyright (C) 2013 by Gilles Caulier
-+# <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
-+#
-+# This program is free software; you can redistribute it
-+# and/or modify it under the terms of the GNU General
-+# Public License as published by the Free Software Foundation;
-+# either version 2, or (at your option)
-+# any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+# GNU General Public License for more details.
-+#
-+# ============================================================
-+
-+CMAKE_MINIMUM_REQUIRED(VERSION 3.12..16)
-+
-+
-+# Determine if libraw is built as a subproject (using add_subdirectory)
-+# or if it is the master project.
-+set(MASTER_PROJECT OFF)
-+if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
-+ set(MASTER_PROJECT ON)
-+ message(STATUS "CMake version: ${CMAKE_VERSION}")
-+endif ()
-+
-+set(LIBRAW_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Relative path to libraw directory (default=CMAKE_CURRENT_SOURCE_DIR)")
-+if(NOT EXISTS "${LIBRAW_PATH}")
-+ message(STATUS "LIBRAW_PATH=${LIBRAW_PATH}")
-+ message(FATAL_ERROR "LIBRAW_PATH does not contain a valid path to the libraw home")
-+endif()
-+
-+file(TO_CMAKE_PATH "${LIBRAW_PATH}" LIBRAW_PATH)
-+
-+# ==================================================================================================
-+# Library version info extraction
-+
-+FILE(READ ${LIBRAW_PATH}/libraw/libraw_version.h _libraw_version_content)
-+
-+# API version strings
-+STRING(REGEX MATCH "#define LIBRAW_MAJOR_VERSION[ \t]*([0-9]*)\n" _version_major_match ${_libraw_version_content})
-+SET(RAW_LIB_MAJOR_VERSION "${CMAKE_MATCH_1}")
-+
-+STRING(REGEX MATCH "#define LIBRAW_MINOR_VERSION[ \t]*([0-9]*)\n" _version_minor_match ${_libraw_version_content})
-+SET(RAW_LIB_MINOR_VERSION "${CMAKE_MATCH_1}")
-+
-+STRING(REGEX MATCH "#define LIBRAW_PATCH_VERSION[ \t]*([0-9]*)\n" _version_patch_match ${_libraw_version_content})
-+SET(RAW_LIB_PATCH_VERSION "${CMAKE_MATCH_1}")
-+
-+# ABI version strings
-+
-+STRING(REGEX MATCH "#define LIBRAW_SHLIB_CURRENT[ \t]*([0-9]*)\n" _version_socur_match ${_libraw_version_content})
-+SET(RAW_LIB_SO_CUR_VERSION "${CMAKE_MATCH_1}")
-+
-+STRING(REGEX MATCH "#define LIBRAW_SHLIB_REVISION[ \t]*([0-9]*)\n" _version_sorev_match ${_libraw_version_content})
-+SET(RAW_LIB_SO_REV_VERSION "${CMAKE_MATCH_1}")
-+
-+STRING(REGEX MATCH "#define LIBRAW_SHLIB_AGE[ \t]*([0-9]*)\n" _version_soage_match ${_libraw_version_content})
-+SET(RAW_LIB_SO_AGE_VERSION "${CMAKE_MATCH_1}")
-+
-+# Set env. variables accordinly.
-+SET(RAW_LIB_VERSION_STRING "${RAW_LIB_MAJOR_VERSION}.${RAW_LIB_MINOR_VERSION}.${RAW_LIB_PATCH_VERSION}")
-+SET(RAW_LIB_VERSION_ID "0x${RAW_LIB_MAJOR_VERSION}${RAW_LIB_MINOR_VERSION}${RAW_LIB_PATCH_VERSION}")
-+SET(RAW_LIB_SO_VERSION_STRING "${RAW_LIB_SO_CUR_VERSION}.${RAW_LIB_SO_REV_VERSION}.${RAW_LIB_SO_AGE_VERSION}")
-+
-+MESSAGE(STATUS "LibRaw string version: ${RAW_LIB_VERSION_STRING}")
-+MESSAGE(STATUS "LibRaw ID version: ${RAW_LIB_VERSION_ID}")
-+MESSAGE(STATUS "LibRaw SO version: ${RAW_LIB_SO_VERSION_STRING}")
-+
-+project(libraw VERSION ${RAW_LIB_VERSION_STRING} LANGUAGES CXX)
-+
-+# ==================================================================================================
-+# Project Options
-+OPTION(BUILD_SHARED_LIBS "Build library as shared library (default=ON)" ON)
-+OPTION(ENABLE_OPENMP "Build library with OpenMP support (default=ON)" ON)
-+OPTION(ENABLE_LCMS "Build library with LCMS support (default=ON)" ON)
-+OPTION(ENABLE_JASPER "Build library with libjasper support (default=ON)" ON)
-+OPTION(ENABLE_EXAMPLES "Build library with sample command-line programs (default=ON)" ${MASTER_PROJECT})
-+OPTION(ENABLE_RAWSPEED "Build library with extra RawSpeed codec support (default=OFF)" OFF)
-+OPTION(ENABLE_DCRAW_DEBUG "Build library with debug message from dcraw (default=OFF)" OFF)
-+OPTION(ENABLE_X3FTOOLS "Build library with Foveon X3F support (default=OFF)" OFF)
-+OPTION(ENABLE_6BY9RPI "Build library with Raspberry Pi RAW support (default=OFF)" OFF)
-+option(LIBRAW_UNINSTALL_TARGET "Add a custom target to ease removal of installed targets" ${MASTER_PROJECT})
-+option(LIBRAW_INSTALL "Generate the install target." ${MASTER_PROJECT})
-+
-+SET(RAWSPEED_RPATH "RawSpeed" CACHE STRING
-+ "Relative path to extra RawSpeed codec (default=RawSpeed)")
-+
-+SET(RAWSPEED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${RAWSPEED_RPATH}")
-+
-+SET(INSTALL_CMAKE_MODULE_PATH "share/libraw/cmake" CACHE STRING
-+ "Path to install cmake module (default=share/libraw/cmake)")
-+
-+# ==================================================================================================
-+# General definitions rules
-+
-+SET(LIB_SUFFIX "" CACHE STRING "Define suffix of lib directory name (32/64)" )
-+
-+IF(WIN32 AND NOT DEFINED CMAKE_DEBUG_POSTFIX)
-+ SET(CMAKE_DEBUG_POSTFIX "d")
-+ENDIF()
-+
-+# To prevent warnings from M$ compiler
-+IF(WIN32 AND MSVC)
-+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
-+ ADD_DEFINITIONS(-D_ATL_SECURE_NO_WARNINGS)
-+ ADD_DEFINITIONS(-D_AFX_SECURE_NO_WARNINGS)
-+ENDIF()
-+
-+# Under Windows, use specific flag to compile.
-+IF(WIN32)
-+ ADD_DEFINITIONS(-DDJGPP)
-+ENDIF()
-+
-+# -- Check dependencies --------------------------------------------------------------------------------
-+
-+SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} )
-+
-+INCLUDE(MacroBoolTo01)
-+INCLUDE(MacroLogFeature)
-+INCLUDE(MacroOptionalFindPackage)
-+
-+# Math library check
-+
-+IF(NOT WIN32)
-+ FIND_LIBRARY(MATH_LIBRARY m)
-+ENDIF()
-+
-+# LCMS version 1 and 2 library check
-+
-+SET(LCMS_SUPPORT_CAN_BE_COMPILED false)
-+
-+IF (ENABLE_LCMS)
-+ MESSAGE(STATUS "Check for LCMS2 availability...")
-+ FIND_PACKAGE(LCMS2)
-+ IF (LCMS2_FOUND AND (LCMS2_VERSION VERSION_EQUAL 2.1 OR LCMS2_VERSION VERSION_GREATER 2.1))
-+ MESSAGE(STATUS "Found LCMS2 : ${LCMS2_LIBRARIES} ${LCMS2_INCLUDE_DIR}")
-+ INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR})
-+ MACRO_LOG_FEATURE(LCMS2_FOUND "LCMS2" "A small-footprint color management engine" "http://www.littlecms.com" FALSE "" "Needed by libkdcraw")
-+ # Flag to compile Little CMS version 2 with LibRaw
-+ ADD_DEFINITIONS(-DUSE_LCMS2)
-+ SET(LCMS_SUPPORT_CAN_BE_COMPILED true)
-+ ELSE ()
-+ MESSAGE(STATUS "Check for LCMS availability instead LCMS2...")
-+ FIND_PACKAGE(LCMS)
-+ IF (LCMS_FOUND)
-+ MESSAGE(STATUS "Found LCMS1: ${LCMS_LIBRARIES} ${LCMS_INCLUDE_DIR}")
-+ INCLUDE_DIRECTORIES(${LCMS_INCLUDE_DIR})
-+ MACRO_LOG_FEATURE(LCMS_FOUND "LCMS1" "A small-footprint color management engine" "http://www.littlecms.com" TRUE "" "Needed by libkdcraw")
-+ # Flag to compile Little CMS version 1 with LibRaw
-+ ADD_DEFINITIONS(-DUSE_LCMS)
-+ # For compatibility
-+ SET(LCMS2_LIBRARIES ${LCMS_LIBRARIES})
-+ SET(LCMS_SUPPORT_CAN_BE_COMPILED true)
-+ ENDIF ()
-+ ENDIF ()
-+ENDIF()
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(LCMS_SUPPORT_CAN_BE_COMPILED LIBRAW_USE_LCMS)
-+
-+# zlib library check
-+
-+FIND_PACKAGE(ZLIB)
-+FIND_PACKAGE(JPEG)
-+
-+# Flag to use zlib with LibRaw DNG deflate codec
-+IF(ZLIB_FOUND)
-+ ADD_DEFINITIONS(-DUSE_ZLIB)
-+ENDIF()
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(ZLIB_FOUND LIBRAW_USE_DNGDEFLATECODEC)
-+
-+# JPEG library check
-+find_package(JPEG)
-+IF(JPEG_FOUND)
-+ if (${JPEG_VERSION} LESS 80)
-+ set(JPEG8_FOUND FALSE)
-+ else()
-+ set(JPEG8_FOUND TRUE)
-+ endif()
-+ENDIF()
-+
-+MACRO_LOG_FEATURE(JPEG8_FOUND "libjpeg" "JPEG image format support" "http://www.ijg.org" FALSE "80" "needed for the LibRaw DNG lossy codec")
-+
-+# Flag to use libjpeg with LibRaw DNG lossy codec
-+IF(JPEG8_FOUND)
-+ ADD_DEFINITIONS(-DUSE_JPEG)
-+ ADD_DEFINITIONS(-DUSE_JPEG8)
-+ENDIF()
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(JPEG8_FOUND LIBRAW_USE_DNGLOSSYCODEC)
-+
-+IF(ENABLE_OPENMP)
-+ find_package(OpenMP REQUIRED)
-+ENDIF(ENABLE_OPENMP)
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(OpenMP_FOUND LIBRAW_USE_OPENMP)
-+
-+# Jasper library check
-+SET(JASPER_FOUND false)
-+IF(ENABLE_JASPER)
-+ FIND_PACKAGE(Jasper)
-+
-+ # Flag to use libjasper with LibRaw RedCine codec
-+ IF(JASPER_FOUND)
-+ ADD_DEFINITIONS(-DUSE_JASPER)
-+ INCLUDE_DIRECTORIES(${JASPER_INCLUDE_DIR})
-+ ENDIF()
-+ENDIF()
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(JASPER_FOUND LIBRAW_USE_REDCINECODEC)
-+
-+# For RawSpeed Codec Support
-+
-+SET(RAWSPEED_FOUND false)
-+SET(RAWSPEED_SUPPORT_CAN_BE_COMPILED false)
-+
-+IF(ENABLE_RAWSPEED)
-+
-+ FIND_PACKAGE(LibXml2)
-+ FIND_PACKAGE(Threads REQUIRED)
-+
-+ MESSAGE(STATUS "RawSpeed codec path: ${RAWSPEED_PATH}")
-+
-+ IF(EXISTS "${RAWSPEED_PATH}/Common.cpp")
-+ SET(RAWSPEED_FOUND true)
-+ ELSE()
-+ MESSAGE(STATUS "RawSpeed source code not found. Please checkout source code from RawStudio project website.")
-+ ENDIF()
-+
-+ IF(ENABLE_RAWSPEED AND RAWSPEED_FOUND AND JPEG8_FOUND AND LIBXML2_FOUND AND PTHREADS_FOUND)
-+
-+ SET(RAWSPEED_SUPPORT_CAN_BE_COMPILED true)
-+
-+ ELSE()
-+ IF (NOT JPEG8_FOUND)
-+ MESSAGE(STATUS "LibJPEG dependency not resolved. LibRaw cannot be compiled with RawSpeed codec")
-+ ENDIF()
-+
-+ IF (NOT LIBXML2_FOUND)
-+ MESSAGE(STATUS "LibXML2 dependency not resolved. LibRaw cannot be compiled with RawSpeed codec")
-+ ENDIF()
-+
-+ IF (NOT PTHREADS_FOUND)
-+ MESSAGE(STATUS "Pthreads dependency not resolved. LibRaw cannot be compiled with RawSpeed codec")
-+ ENDIF()
-+
-+ ENDIF()
-+ENDIF()
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(RAWSPEED_SUPPORT_CAN_BE_COMPILED LIBRAW_USE_RAWSPEED)
-+
-+# -- Compilation rules for RawSpeed library -------------------------------------------------------------
-+
-+IF(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
-+
-+ INCLUDE_DIRECTORIES(${RAWSPEED_PATH})
-+
-+ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PTHREADS_INCLUDE_DIR})
-+
-+ # Flag to include RawSpeed codec with Libraw
-+ ADD_DEFINITIONS(-DUSE_RAWSPEED)
-+
-+ ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${PTHREADS_DEFINITIONS})
-+
-+ SET(librawspeed_LIB_SRCS ${RAWSPEED_PATH}/ArwDecoder.cpp
-+ ${RAWSPEED_PATH}/BitPumpJPEG.cpp
-+ ${RAWSPEED_PATH}/BitPumpMSB.cpp
-+ ${RAWSPEED_PATH}/BitPumpMSB32.cpp
-+ ${RAWSPEED_PATH}/BitPumpPlain.cpp
-+ ${RAWSPEED_PATH}/BlackArea.cpp
-+ ${RAWSPEED_PATH}/ByteStream.cpp
-+ ${RAWSPEED_PATH}/ByteStreamSwap.cpp
-+ ${RAWSPEED_PATH}/Camera.cpp
-+ ${RAWSPEED_PATH}/CameraMetaData.cpp
-+ ${RAWSPEED_PATH}/CameraMetadataException.cpp
-+ ${RAWSPEED_PATH}/CameraSensorInfo.cpp
-+ ${RAWSPEED_PATH}/ColorFilterArray.cpp
-+ ${RAWSPEED_PATH}/Common.cpp
-+ ${RAWSPEED_PATH}/Cr2Decoder.cpp
-+ ${RAWSPEED_PATH}/DngDecoder.cpp
-+ ${RAWSPEED_PATH}/DngDecoderSlices.cpp
-+ ${RAWSPEED_PATH}/DngOpcodes.cpp
-+ ${RAWSPEED_PATH}/FileIOException.cpp
-+ ${RAWSPEED_PATH}/FileMap.cpp
-+ ${RAWSPEED_PATH}/IOException.cpp
-+ ${RAWSPEED_PATH}/LJpegDecompressor.cpp
-+ ${RAWSPEED_PATH}/LJpegPlain.cpp
-+ ${RAWSPEED_PATH}/NefDecoder.cpp
-+ ${RAWSPEED_PATH}/NikonDecompressor.cpp
-+ ${RAWSPEED_PATH}/OrfDecoder.cpp
-+ ${RAWSPEED_PATH}/PefDecoder.cpp
-+ ${RAWSPEED_PATH}/PentaxDecompressor.cpp
-+ ${RAWSPEED_PATH}/RawDecoder.cpp
-+ ${RAWSPEED_PATH}/RawDecoderException.cpp
-+ ${RAWSPEED_PATH}/RawImage.cpp
-+ ${RAWSPEED_PATH}/RawImageDataFloat.cpp
-+ ${RAWSPEED_PATH}/RawImageDataU16.cpp
-+ ${RAWSPEED_PATH}/RawParser.cpp
-+ ${RAWSPEED_PATH}/Rw2Decoder.cpp
-+ ${RAWSPEED_PATH}/SrwDecoder.cpp
-+ ${RAWSPEED_PATH}/TiffEntry.cpp
-+ ${RAWSPEED_PATH}/TiffEntryBE.cpp
-+ ${RAWSPEED_PATH}/TiffIFD.cpp
-+ ${RAWSPEED_PATH}/TiffIFDBE.cpp
-+ ${RAWSPEED_PATH}/TiffParser.cpp
-+ ${RAWSPEED_PATH}/TiffParserException.cpp
-+ ${RAWSPEED_PATH}/TiffParserHeaderless.cpp
-+ ${RAWSPEED_PATH}/TiffParserOlympus.cpp
-+ )
-+
-+ENDIF()
-+
-+# -- Common LibRaw library compilation rules ------------------------------------------------------------------
-+
-+# Flag to add debug print on the console
-+IF(ENABLE_DCRAW_DEBUG)
-+ ADD_DEFINITIONS(-DDCRAW_VERBOSE)
-+ENDIF()
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(ENABLE_DCRAW_DEBUG LIBRAW_USE_DCRAW_DEBUG)
-+
-+# Flag to add Foveon X3F support
-+IF(ENABLE_X3FTOOLS)
-+ ADD_DEFINITIONS(-DUSE_X3FTOOLS)
-+ENDIF()
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(ENABLE_X3FTOOLS LIBRAW_USE_X3FTOOLS)
-+
-+# Flag to add Raspberry Pi RAW support
-+IF(ENABLE_6BY9RPI)
-+ ADD_DEFINITIONS(-DUSE_6BY9RPI)
-+ENDIF()
-+
-+# For registration to libraw_config.h
-+MACRO_BOOL_TO_01(ENABLE_6BY9RPI LIBRAW_USE_6BY9RPI)
-+
-+# Flag to export library symbols
-+IF (WIN32)
-+ ADD_DEFINITIONS(-DLIBRAW_BUILDLIB)
-+ENDIF()
-+
-+# Create a config header for client application.
-+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw_config.h)
-+
-+# Put the include dirs which are in the source or build tree
-+# before all other include dirs, so the headers in the sources
-+# are preferred over the already installed ones
-+SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
-+
-+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/
-+ ${LIBRAW_PATH}/
-+ )
-+
-+# -- Log messages about configuration ------------------------------------------------------------------
-+
-+MESSAGE(STATUS "")
-+MESSAGE(STATUS "----------------------------------------------------------------------------------")
-+MESSAGE(STATUS " Libraw ${RAW_LIB_VERSION_STRING} configuration <http://www.libraw.org>")
-+MESSAGE(STATUS "")
-+
-+IF(OpenMP_FOUND)
-+ MESSAGE(STATUS " Libraw will be compiled with OpenMP support .................. YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with OpenMP support .................. NO")
-+ENDIF()
-+
-+IF(LCMS_SUPPORT_CAN_BE_COMPILED)
-+ MESSAGE(STATUS " Libraw will be compiled with LCMS support .................... YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with LCMS support .................... NO")
-+ENDIF()
-+
-+IF(ENABLE_EXAMPLES)
-+ MESSAGE(STATUS " Libraw will be compiled with example command-line programs ... YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with example command-line programs ... NO")
-+ENDIF()
-+
-+IF(JASPER_FOUND)
-+ MESSAGE(STATUS " Libraw will be compiled with RedCine codec support ........... YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with RedCine codec support ........... NO")
-+ENDIF()
-+
-+IF(ZLIB_FOUND)
-+ MESSAGE(STATUS " Libraw will be compiled with DNG deflate codec support ....... YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with DNG deflate codec support ....... NO")
-+ENDIF()
-+
-+IF(JPEG8_FOUND)
-+ MESSAGE(STATUS " Libraw will be compiled with DNG lossy codec support ......... YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with DNG lossy codec support ......... NO")
-+ENDIF()
-+
-+IF(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
-+ MESSAGE(STATUS " Libraw will be compiled with RawSpeed support ................ YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with RawSpeed support ................ NO")
-+ENDIF()
-+
-+IF(ENABLE_DCRAW_DEBUG)
-+ MESSAGE(STATUS " Libraw will be compiled with debug message from dcraw ........ YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with debug message from dcraw ........ NO")
-+ENDIF()
-+
-+IF(ENABLE_X3FTOOLS)
-+ MESSAGE(STATUS " Libraw will be compiled with Foveon X3F support .............. YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with Foveon X3F support .............. NO")
-+ENDIF()
-+
-+IF(ENABLE_6BY9RPI)
-+ MESSAGE(STATUS " Libraw will be compiled with Raspberry Pi RAW support ........ YES")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled with Raspberry Pi RAW support ........ NO")
-+ENDIF()
-+
-+IF(BUILD_SHARED_LIBS)
-+ MESSAGE(STATUS " Libraw will be compiled as a shared library")
-+ELSE()
-+ MESSAGE(STATUS " Libraw will be compiled as a static library")
-+ENDIF()
-+
-+MESSAGE(STATUS "----------------------------------------------------------------------------------")
-+MESSAGE(STATUS "")
-+
-+# -- Dedicated libraw target which does not support multi-threading ---------------------------------------
-+
-+IF(RAW_LIB_VERSION_STRING VERSION_LESS 0.21)
-+ SET(libraw_LIB_SRCS ${LIBRAW_PATH}/internal/dcraw_common.cpp
-+ ${LIBRAW_PATH}/internal/dcraw_fileio.cpp
-+ ${LIBRAW_PATH}/internal/demosaic_packs.cpp
-+ ${LIBRAW_PATH}/src/libraw_cxx.cpp
-+ ${LIBRAW_PATH}/src/libraw_c_api.cpp
-+ ${LIBRAW_PATH}/src/libraw_datastream.cpp
-+ )
-+ELSE()
-+ FILE(GLOB_RECURSE libraw_LIB_SRCS CONFIGURE_DEPENDS "${LIBRAW_PATH}/src/*.cpp")
-+
-+ # Exclude placeholder (stub) implementations
-+ FILE(GLOB_RECURSE exclude_libraw_LIB_SRCS CONFIGURE_DEPENDS "${LIBRAW_PATH}/src/*_ph.cpp")
-+ LIST(REMOVE_ITEM libraw_LIB_SRCS ${exclude_libraw_LIB_SRCS})
-+ENDIF()
-+
-+IF(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
-+ SET(libraw_LIB_SRCS ${libraw_LIB_SRCS} ${librawspeed_LIB_SRCS})
-+ENDIF()
-+
-+
-+add_library(raw ${libraw_LIB_SRCS})
-+add_library(libraw::libraw ALIAS raw)
-+target_compile_definitions(raw PRIVATE LIBRAW_NOTHREADS)
-+
-+# Disable compilation warnings from LibRaw. Just to be clear on the console.
-+# Use O4 GCC compilation option to prevent artifacts with OpenMP
-+IF(WIN32 AND MSVC)
-+ target_compile_options(raw PRIVATE -w)
-+ELSE()
-+ target_compile_options(raw PRIVATE -w -O4)
-+ENDIF()
-+
-+target_include_directories(raw
-+ PUBLIC
-+ $<INSTALL_INTERFACE:libraw>
-+ $<BUILD_INTERFACE:${LIBRAW_PATH}>)
-+
-+TARGET_LINK_LIBRARIES(raw ${MATH_LIBRARY})
-+
-+IF(MINGW)
-+ TARGET_LINK_LIBRARIES(raw ws2_32)
-+ENDIF()
-+
-+IF(OpenMP_FOUND)
-+ target_link_libraries(raw OpenMP::OpenMP_CXX)
-+ENDIF()
-+
-+IF(LCMS_SUPPORT_CAN_BE_COMPILED)
-+ TARGET_LINK_LIBRARIES(raw ${LCMS2_LIBRARIES})
-+ENDIF()
-+
-+IF(ZLIB_FOUND)
-+ TARGET_LINK_LIBRARIES(raw ZLIB::ZLIB)
-+ENDIF()
-+
-+IF(JPEG8_FOUND)
-+ TARGET_LINK_LIBRARIES(raw JPEG::JPEG)
-+ENDIF()
-+
-+IF(JASPER_FOUND)
-+ TARGET_LINK_LIBRARIES(raw ${JASPER_LIBRARIES})
-+ENDIF()
-+
-+IF(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
-+ TARGET_LINK_LIBRARIES(raw ${LIBXML2_LIBRARIES})
-+ENDIF()
-+
-+SET_TARGET_PROPERTIES(raw PROPERTIES VERSION ${RAW_LIB_SO_VERSION_STRING})
-+SET_TARGET_PROPERTIES(raw PROPERTIES SOVERSION ${RAW_LIB_SO_CUR_VERSION})
-+SET_TARGET_PROPERTIES(raw PROPERTIES OUTPUT_NAME "raw")
-+SET_TARGET_PROPERTIES(raw PROPERTIES COMPILE_PDB_NAME "raw")
-+
-+# -- Dedicated libraw target to support multi-threading ---------------------------------------------
-+
-+SET(libraw_r_LIB_SRCS ${libraw_LIB_SRCS})
-+
-+ADD_LIBRARY(raw_r ${libraw_r_LIB_SRCS})
-+add_library(libraw::libraw_r ALIAS raw_r)
-+
-+IF(WIN32 AND MSVC)
-+ target_compile_options(raw_r PRIVATE -w)
-+ELSE()
-+ target_compile_options(raw_r PRIVATE -w -O4)
-+ENDIF()
-+
-+# Always build position-independent code (PIC), even when building Libraw as a
-+# static library so that shared libraries can link against it, not just
-+# executables (PIC does not apply on Windows).
-+# Use set_target_properties() not append_target_property() here as
-+# POSITION_INDEPENDENT_CODE is a binary ON/OFF switch.
-+set_target_properties(raw PROPERTIES POSITION_INDEPENDENT_CODE ON)
-+set_target_properties(raw_r PROPERTIES POSITION_INDEPENDENT_CODE ON)
-+
-+TARGET_LINK_LIBRARIES(raw_r ${MATH_LIBRARY})
-+target_include_directories(raw_r
-+ PUBLIC
-+ $<INSTALL_INTERFACE:libraw>
-+ $<BUILD_INTERFACE:${LIBRAW_PATH}>)
-+
-+IF(MINGW)
-+ TARGET_LINK_LIBRARIES(raw_r ws2_32)
-+ENDIF()
-+
-+IF(OpenMP_FOUND)
-+ TARGET_LINK_LIBRARIES(raw_r OpenMP::OpenMP_CXX)
-+ENDIF()
-+
-+IF(LCMS_SUPPORT_CAN_BE_COMPILED)
-+ TARGET_LINK_LIBRARIES(raw_r ${LCMS2_LIBRARIES})
-+ENDIF()
-+
-+IF(ZLIB_FOUND)
-+ TARGET_LINK_LIBRARIES(raw_r ZLIB::ZLIB)
-+ENDIF()
-+
-+IF(JPEG8_FOUND)
-+ TARGET_LINK_LIBRARIES(raw_r JPEG::JPEG)
-+ENDIF()
-+
-+IF(JASPER_FOUND)
-+ TARGET_LINK_LIBRARIES(raw_r ${JASPER_LIBRARIES})
-+ENDIF()
-+
-+IF(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
-+ TARGET_LINK_LIBRARIES(raw_r ${LIBXML2_LIBRARIES} Threads::Threads)
-+ENDIF()
-+
-+SET_TARGET_PROPERTIES(raw_r PROPERTIES VERSION ${RAW_LIB_SO_VERSION_STRING})
-+SET_TARGET_PROPERTIES(raw_r PROPERTIES SOVERSION ${RAW_LIB_SO_CUR_VERSION})
-+SET_TARGET_PROPERTIES(raw_r PROPERTIES OUTPUT_NAME "raw_r")
-+SET_TARGET_PROPERTIES(raw_r PROPERTIES COMPILE_PDB_NAME "raw_r")
-+
-+# -- Files to install -------------------------------------------------------------------------------------
-+if (LIBRAW_INSTALL)
-+
-+# Configure and install data file for packaging.
-+IF(NOT WIN32)
-+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc @ONLY)
-+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
-+
-+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw_r.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw_r.pc @ONLY)
-+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw_r.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
-+
-+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw.lsm)
-+ENDIF()
-+
-+# Install Shared header files.
-+INSTALL(FILES ${LIBRAW_PATH}/libraw/libraw.h
-+ ${LIBRAW_PATH}/libraw/libraw_alloc.h
-+ ${LIBRAW_PATH}/libraw/libraw_const.h
-+ ${LIBRAW_PATH}/libraw/libraw_datastream.h
-+ ${LIBRAW_PATH}/libraw/libraw_internal.h
-+ ${LIBRAW_PATH}/libraw/libraw_types.h
-+ ${LIBRAW_PATH}/libraw/libraw_version.h
-+ ${CMAKE_CURRENT_BINARY_DIR}/libraw_config.h
-+ DESTINATION include/libraw
-+ COMPONENT Devel
-+ )
-+
-+# Install Shared binary files.
-+INSTALL(TARGETS raw
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib${LIB_SUFFIX}
-+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
-+ )
-+
-+INSTALL(TARGETS raw_r
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib${LIB_SUFFIX}
-+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
-+ )
-+
-+IF(MSVC)
-+ INSTALL(FILES $<TARGET_PDB_FILE:raw>
-+ DESTINATION lib
-+ CONFIGURATIONS Debug RelWithDebInfo
-+ )
-+ INSTALL(FILES $<TARGET_PDB_FILE:raw_r>
-+ DESTINATION lib
-+ CONFIGURATIONS Debug RelWithDebInfo
-+ )
-+ENDIF()
-+
-+# Install find cmake script to the system for client applications.
-+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/FindLibRaw.cmake
-+ DESTINATION ${INSTALL_CMAKE_MODULE_PATH})
-+
-+# Install doc data files.
-+IF(NOT WIN32)
-+ INSTALL(FILES ${LIBRAW_PATH}/COPYRIGHT
-+ ${LIBRAW_PATH}/LICENSE.CDDL
-+ ${LIBRAW_PATH}/LICENSE.LGPL
-+ ${LIBRAW_PATH}/Changelog.txt
-+ DESTINATION share/libraw
-+ COMPONENT main
-+ )
-+ENDIF()
-+endif(LIBRAW_INSTALL)
-+
-+# Uninstall rules
-+IF(LIBRAW_UNINSTALL_TARGET)
-+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/Uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY)
-+ ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
-+ENDIF(LIBRAW_UNINSTALL_TARGET)
-+
-+# -- Compile LibRaw Examples --------------------------------------------------------------------------------
-+
-+# add a small macro so that this is a bit cleaner
-+MACRO(LIBRAW_BUILD_SAMPLES)
-+
-+ SET(_filename ${ARGV0})
-+ SET(_rawlib ${ARGV1})
-+ STRING(REPLACE "." ";" _temp ${_filename})
-+ LIST(GET _temp 0 _target)
-+
-+ SET(${_target}_SRCS ${LIBRAW_PATH}/samples/${_filename})
-+
-+ ADD_EXECUTABLE(${_target} ${${_target}_SRCS})
-+ target_compile_options(${_target} PRIVATE -w)
-+
-+ TARGET_LINK_LIBRARIES(${_target} PRIVATE ${_rawlib})
-+
-+ IF(OpenMP_FOUND)
-+ target_link_libraries(${_target} PUBLIC OpenMP::OpenMP_CXX)
-+ ENDIF()
-+
-+ IF (${_rawlib} MATCHES "raw_r")
-+ TARGET_LINK_LIBRARIES(${_target} PUBLIC ${PTHREADS_LIBRARY})
-+ ENDIF()
-+
-+ IF(WIN32)
-+ TARGET_LINK_LIBRARIES(${_target} PUBLIC ws2_32)
-+ ENDIF()
-+
-+ INSTALL(TARGETS ${_target}
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib${LIB_SUFFIX}
-+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
-+ )
-+
-+ENDMACRO(LIBRAW_BUILD_SAMPLES)
-+
-+IF(ENABLE_EXAMPLES)
-+
-+ LIBRAW_BUILD_SAMPLES(simple_dcraw.cpp raw)
-+
-+ if(EXISTS mem_image.cpp)
-+ LIBRAW_BUILD_SAMPLES(mem_image.cpp raw)
-+ else()
-+ LIBRAW_BUILD_SAMPLES(mem_image_sample.cpp raw)
-+ endif()
-+
-+ LIBRAW_BUILD_SAMPLES(dcraw_emu.cpp raw)
-+ LIBRAW_BUILD_SAMPLES(4channels.cpp raw)
-+ LIBRAW_BUILD_SAMPLES(unprocessed_raw.cpp raw)
-+ LIBRAW_BUILD_SAMPLES(raw-identify.cpp raw)
-+ LIBRAW_BUILD_SAMPLES(multirender_test.cpp raw)
-+ LIBRAW_BUILD_SAMPLES(postprocessing_benchmark.cpp raw)
-+
-+ IF (TARGET Threads::Threads)
-+ IF(WIN32)
-+ LIBRAW_BUILD_SAMPLES(half_mt_win32.c raw_r)
-+ ELSE()
-+ LIBRAW_BUILD_SAMPLES(dcraw_half.c raw_r)
-+ LIBRAW_BUILD_SAMPLES(half_mt.c raw_r)
-+ ENDIF()
-+ ENDIF()
-+ENDIF()
-diff --git a/INSTALL.CMAKE b/INSTALL.CMAKE
-new file mode 100644
-index 0000000..e000651
---- /dev/null
-+++ b/INSTALL.CMAKE
-@@ -0,0 +1,62 @@
-+
-+========= Installing LibRaw (CMake version) ==========
-+
-+I. Installation steps
-+
-+1. Unpack the distribution file:
-+
-+ $ tar xzvf LibRaw-0.xx.yy.tar.gz
-+
-+2. Copy this LibRaw-cmake scripts in LibRaw-... folder
-+
-+3. Go to LibRaw folder and run ./configure and make:
-+
-+ $ cd LibRaw-0.xx.yy
-+ $ ./cmake [...optional args...] .
-+ $ make
-+
-+4. install by run make install as root:
-+
-+ $ sudo make install
-+
-+
-+II. ./cmake options
-+
-+-DENABLE_OPENMP=ON/OFF
-+
-+ Enable/disable OpenMP support if compiler supports it.
-+ OpenMP is enabled by default.
-+
-+
-+-DENABLE_LCMS=ON/OFF
-+
-+ Enable/disable LCMS color engine support. If enabled, ./cmake will try to
-+ find lcms library. Both LCMS-1.x and LCMS-2.x are supported
-+ LCMS support is enabled by default
-+
-+
-+-DENABLE_EXAMPLES=ON/OFF
-+
-+ Enables/disables examples compilation and installation. Enabled by default
-+
-+
-+-DENABLE_RAWSPEED=ON/OFF
-+-DRAWSPEED_RPATH=FOLDERNAME
-+
-+ Enables/disables support of additional code from RawStudio project
-+ You need to download RawSpeed source code to use this feature.
-+ See README.RawSpeed.txt for details.
-+ ./cmake will try to find RawSpeed code in:
-+
-+ a) If folder is specified via -DRAWSPEED_RPATH=FOLDERNAME
-+ command-line option, then only this folder will be checked.
-+
-+ b) If no folder is specified in -DENABLE_RAWSPEED switch:
-+
-+ ./RawSpeed (in LibRaw folder)
-+
-+
-+
-+-DENABLE_DCRAW_DEBUG=ON/OFF
-+
-+ Enables/disables support of additional debug traces from dcraw operations. Disabled by default
-diff --git a/LICENSE b/LICENSE
-new file mode 100644
-index 0000000..4b41776
---- /dev/null
-+++ b/LICENSE
-@@ -0,0 +1,22 @@
-+Redistribution and use in source and binary forms, with or without
-+modification, are permitted provided that the following conditions
-+are met:
-+
-+1. Redistributions of source code must retain the copyright
-+ notice, this list of conditions and the following disclaimer.
-+2. Redistributions in binary form must reproduce the copyright
-+ notice, this list of conditions and the following disclaimer in the
-+ documentation and/or other materials provided with the distribution.
-+3. The name of the author may not be used to endorse or promote products
-+ derived from this software without specific prior written permission.
-+
-+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-diff --git a/cmake/data/libraw.lsm.cmake b/cmake/data/libraw.lsm.cmake
-new file mode 100644
-index 0000000..45dfb45
---- /dev/null
-+++ b/cmake/data/libraw.lsm.cmake
-@@ -0,0 +1,13 @@
-+Begin4
-+Title: ${PROJECT_NAME}
-+Version: ${RAW_LIB_VERSION_STRING}
-+Entered-date: 2013-09-08
-+Description: Raw image decoder library
-+Keywords: Raw image digital camera demosaicing decoding
-+Author: Copyright 2008-2013 LibRaw LLC ([email protected])
-+Maintained-by:
-+Primary-site: http://www.libraw.org
-+Original-site:
-+Platforms: Linux and other Unices, MacOs-X, Win32
-+Copying-policy: GPL
-+End
-diff --git a/cmake/data/libraw.pc.cmake b/cmake/data/libraw.pc.cmake
-new file mode 100644
-index 0000000..aede5f2
---- /dev/null
-+++ b/cmake/data/libraw.pc.cmake
-@@ -0,0 +1,12 @@
-+prefix=@CMAKE_INSTALL_PREFIX@
-+exec_prefix=${prefix}
-+libdir=${prefix}/lib@LIB_SUFFIX@
-+includedir=${prefix}/include/libraw
-+
-+Name: @PROJECT_NAME@
-+Description: @PROJECT_NAME@ - Raw image decoder library (non-thread-safe)
-+URL: http://www.libraw.org
-+Requires:
-+Version: @RAW_LIB_VERSION_STRING@
-+Libs: -L${libdir} -lraw
-+Cflags: -I${includedir}
-diff --git a/cmake/data/libraw_config.h.cmake b/cmake/data/libraw_config.h.cmake
-new file mode 100644
-index 0000000..4e4b314
---- /dev/null
-+++ b/cmake/data/libraw_config.h.cmake
-@@ -0,0 +1,50 @@
-+/* -*- C++ -*-
-+ * File: libraw_version.h
-+ * Copyright 2008-2013 LibRaw LLC ([email protected])
-+ * Created: Mon Sept 8, 2008
-+ *
-+ * LibRaw C++ interface
-+ *
-+
-+LibRaw is free software; you can redistribute it and/or modify
-+it under the terms of the one of two licenses as you choose:
-+
-+1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1
-+(See the file LICENSE.LGPL provided in LibRaw distribution archive for details).
-+
-+2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-+(See the file LICENSE.CDDL provided in LibRaw distribution archive for details).
-+
-+ */
-+
-+#ifndef __LIBRAW_CONFIG_H
-+#define __LIBRAW_CONFIG_H
-+
-+/* Define to 1 if LibRaw have been compiled with DNG deflate codec support */
-+#cmakedefine LIBRAW_USE_DNGDEFLATECODEC 1
-+
-+/* Define to 1 if LibRaw have been compiled with DNG lossy codec support */
-+#cmakedefine LIBRAW_USE_DNGLOSSYCODEC 1
-+
-+/* Define to 1 if LibRaw have been compiled with OpenMP support */
-+#cmakedefine LIBRAW_USE_OPENMP 1
-+
-+/* Define to 1 if LibRaw have been compiled with LCMS support */
-+#cmakedefine LIBRAW_USE_LCMS 1
-+
-+/* Define to 1 if LibRaw have been compiled with RedCine codec support */
-+#cmakedefine LIBRAW_USE_REDCINECODEC 1
-+
-+/* Define to 1 if LibRaw have been compiled with RawSpeed codec support */
-+#cmakedefine LIBRAW_USE_RAWSPEED 1
-+
-+/* Define to 1 if LibRaw have been compiled with debug message from dcraw */
-+#cmakedefine LIBRAW_USE_DCRAW_DEBUG 1
-+
-+/* Define to 1 if LibRaw have been compiled with Foveon X3F support */
-+#cmakedefine LIBRAW_USE_X3FTOOLS 1
-+
-+/* Define to 1 if LibRaw have been compiled with Raspberry Pi RAW support */
-+#cmakedefine LIBRAW_USE_6BY9RPI 1
-+
-+#endif
-diff --git a/cmake/data/libraw_r.pc.cmake b/cmake/data/libraw_r.pc.cmake
-new file mode 100644
-index 0000000..16134e8
---- /dev/null
-+++ b/cmake/data/libraw_r.pc.cmake
-@@ -0,0 +1,12 @@
-+prefix=@CMAKE_INSTALL_PREFIX@
-+exec_prefix=${prefix}
-+libdir=${prefix}/lib@LIB_SUFFIX@
-+includedir=${prefix}/include/libraw
-+
-+Name: @PROJECT_NAME@
-+Description: @PROJECT_NAME@ - Raw image decoder library (thread-safe)
-+URL: http://www.libraw.org
-+Requires:
-+Version: @RAW_LIB_VERSION_STRING@
-+Libs: -L${libdir} -lraw_r
-+Cflags: -I${includedir}
-diff --git a/cmake/modules/FindLCMS.cmake b/cmake/modules/FindLCMS.cmake
-new file mode 100644
-index 0000000..d82d82e
---- /dev/null
-+++ b/cmake/modules/FindLCMS.cmake
-@@ -0,0 +1,60 @@
-+# - Find LCMS
-+# Find the LCMS (Little Color Management System) library and includes and
-+# This module defines
-+# LCMS_INCLUDE_DIR, where to find lcms.h
-+# LCMS_LIBRARIES, the libraries needed to use LCMS.
-+# LCMS_DOT_VERSION, The version number of the LCMS library, e.g. "1.19"
-+# LCMS_VERSION, Similar to LCMS_DOT_VERSION, but without the dots, e.g. "119"
-+# LCMS_FOUND, If false, do not try to use LCMS.
-+#
-+# The minimum required version of LCMS can be specified using the
-+# standard syntax, e.g. find_package(LCMS 1.10)
-+
-+# Copyright (c) 2008, Adrian Page, <[email protected]>
-+# Copyright (c) 2009, Cyrille Berger, <[email protected]>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying LICENSE file.
-+
-+
-+# use pkg-config to get the directories and then use these values
-+# in the FIND_PATH() and FIND_LIBRARY() calls
-+if(NOT WIN32)
-+ find_package(PkgConfig)
-+ pkg_check_modules(PC_LCMS lcms)
-+ set(LCMS_DEFINITIONS ${PC_LCMS_CFLAGS_OTHER})
-+endif(NOT WIN32)
-+
-+find_path(LCMS_INCLUDE_DIR lcms.h
-+ HINTS
-+ ${PC_LCMS_INCLUDEDIR}
-+ ${PC_LCMS_INCLUDE_DIRS}
-+ PATH_SUFFIXES lcms liblcms1
-+)
-+
-+find_library(LCMS_LIBRARIES NAMES lcms liblcms lcms-1 liblcms-1
-+ HINTS
-+ ${PC_LCMS_LIBDIR}
-+ ${PC_LCMS_LIBRARY_DIRS}
-+ PATH_SUFFIXES lcms
-+)
-+
-+# Store the LCMS version number in the cache, so we don't have to search every time again
-+if(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION)
-+ file(READ ${LCMS_INCLUDE_DIR}/lcms.h LCMS_VERSION_CONTENT)
-+ string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS_VERSION_MATCH ${LCMS_VERSION_CONTENT})
-+ if(LCMS_VERSION_MATCH)
-+ string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" _LCMS_VERSION ${LCMS_VERSION_MATCH})
-+ string(SUBSTRING ${_LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION)
-+ string(SUBSTRING ${_LCMS_VERSION} 1 2 LCMS_MINOR_VERSION)
-+ endif(LCMS_VERSION_MATCH)
-+ set(LCMS_VERSION "${LCMS_MAJOR_VERSION}${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms" FORCE)
-+ set(LCMS_DOT_VERSION "${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms split into components" FORCE)
-+endif(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION)
-+
-+include(FindPackageHandleStandardArgs)
-+find_package_handle_standard_args(LCMS REQUIRED_VARS LCMS_LIBRARIES LCMS_INCLUDE_DIR
-+ VERSION_VAR LCMS_DOT_VERSION )
-+
-+mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION)
-+
-diff --git a/cmake/modules/FindLCMS2.cmake b/cmake/modules/FindLCMS2.cmake
-new file mode 100644
-index 0000000..4e3e482
---- /dev/null
-+++ b/cmake/modules/FindLCMS2.cmake
-@@ -0,0 +1,72 @@
-+# - Find LCMS2
-+# Find the LCMS2 includes and library
-+# This module defines
-+# LCMS2_INCLUDE_DIR, where to find lcms.h
-+# LCMS2_LIBRARIES, the libraries needed to use LCMS2.
-+# LCMS2_VERSION, The value of LCMS_VERSION defined in lcms.h
-+# LCMS2_FOUND, If false, do not try to use LCMS2.
-+
-+
-+# Copyright (c) 2008, Adrian Page, <[email protected]>
-+# Copyright (c) 2009, Cyrille Berger, <[email protected]>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying LICENSE file.
-+
-+
-+# use pkg-config to get the directories and then use these values
-+# in the FIND_PATH() and FIND_LIBRARY() calls
-+if(NOT WIN32)
-+ find_package(PkgConfig)
-+ pkg_check_modules(PC_LCMS2 lcms2)
-+ set(LCMS2_DEFINITIONS ${PC_LCMS2_CFLAGS_OTHER})
-+endif(NOT WIN32)
-+
-+find_path(LCMS2_INCLUDE_DIR lcms2.h
-+ PATHS
-+ ${PC_LCMS2_INCLUDEDIR}
-+ ${PC_LCMS2_INCLUDE_DIRS}
-+ PATH_SUFFIXES lcms2 liblcms2
-+)
-+
-+find_library(LCMS2_LIBRARIES NAMES lcms2 liblcms2 lcms-2 liblcms-2
-+ PATHS
-+ ${PC_LCMS2_LIBDIR}
-+ ${PC_LCMS2_LIBRARY_DIRS}
-+ PATH_SUFFIXES lcms2
-+)
-+
-+if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
-+ set(LCMS2_FOUND TRUE)
-+else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
-+ set(LCMS2_FOUND FALSE)
-+endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
-+
-+if(LCMS2_FOUND)
-+ file(READ ${LCMS2_INCLUDE_DIR}/lcms2.h LCMS2_VERSION_CONTENT)
-+ string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS2_VERSION_MATCH ${LCMS2_VERSION_CONTENT})
-+ if(LCMS2_VERSION_MATCH)
-+ string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" LCMS2_VERSION ${LCMS2_VERSION_MATCH})
-+ if(NOT LCMS2_FIND_QUIETLY)
-+ string(SUBSTRING ${LCMS2_VERSION} 0 1 LCMS2_MAJOR_VERSION)
-+ string(SUBSTRING ${LCMS2_VERSION} 1 2 LCMS2_MINOR_VERSION)
-+ message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARIES}")
-+ endif(NOT LCMS2_FIND_QUIETLY)
-+ else(LCMS2_VERSION_MATCH)
-+ if(NOT LCMS2_FIND_QUIETLY)
-+ message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARIES}")
-+ endif(NOT LCMS2_FIND_QUIETLY)
-+ set(LCMS2_VERSION NOTFOUND)
-+ endif(LCMS2_VERSION_MATCH)
-+else(LCMS2_FOUND)
-+ if(NOT LCMS2_FIND_QUIETLY)
-+ if(LCMS2_FIND_REQUIRED)
-+ message(FATAL_ERROR "Required package lcms2 NOT found")
-+ else(LCMS2_FIND_REQUIRED)
-+ message(STATUS "lcms2 NOT found")
-+ endif(LCMS2_FIND_REQUIRED)
-+ endif(NOT LCMS2_FIND_QUIETLY)
-+endif(LCMS2_FOUND)
-+
-+mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARIES LCMS2_VERSION)
-+
-diff --git a/cmake/modules/FindLibRaw.cmake b/cmake/modules/FindLibRaw.cmake
-new file mode 100644
-index 0000000..2ce7140
---- /dev/null
-+++ b/cmake/modules/FindLibRaw.cmake
-@@ -0,0 +1,96 @@
-+# - Find LibRaw
-+# Find the LibRaw library <http://www.libraw.org>
-+# This module defines
-+# LibRaw_VERSION_STRING, the version string of LibRaw
-+# LibRaw_INCLUDE_DIR, where to find libraw.h
-+# LibRaw_LIBRARIES, the libraries needed to use LibRaw (non-thread-safe)
-+# LibRaw_r_LIBRARIES, the libraries needed to use LibRaw (thread-safe)
-+# LibRaw_DEFINITIONS, the definitions needed to use LibRaw (non-thread-safe)
-+# LibRaw_r_DEFINITIONS, the definitions needed to use LibRaw (thread-safe)
-+#
-+# Copyright (c) 2013, Pino Toscano <pino at kde dot org>
-+# Copyright (c) 2013, Gilles Caulier <caulier dot gilles at gmail dot com>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying LICENSE file.
-+
-+FIND_PACKAGE(PkgConfig)
-+
-+IF(PKG_CONFIG_FOUND)
-+ PKG_CHECK_MODULES(PC_LIBRAW libraw)
-+ SET(LibRaw_DEFINITIONS ${PC_LIBRAW_CFLAGS_OTHER})
-+
-+ PKG_CHECK_MODULES(PC_LIBRAW_R libraw_r)
-+ SET(LibRaw_r_DEFINITIONS ${PC_LIBRAW_R_CFLAGS_OTHER})
-+ENDIF()
-+
-+FIND_PATH(LibRaw_INCLUDE_DIR libraw.h
-+ HINTS
-+ ${PC_LIBRAW_INCLUDEDIR}
-+ ${PC_LibRaw_INCLUDE_DIRS}
-+ PATH_SUFFIXES libraw
-+ )
-+
-+FIND_LIBRARY(LibRaw_LIBRARY_RELEASE NAMES raw
-+ HINTS
-+ ${PC_LIBRAW_LIBDIR}
-+ ${PC_LIBRAW_LIBRARY_DIRS}
-+ )
-+
-+FIND_LIBRARY(LibRaw_LIBRARY_DEBUG NAMES rawd
-+ HINTS
-+ ${PC_LIBRAW_LIBDIR}
-+ ${PC_LIBRAW_LIBRARY_DIRS}
-+ )
-+
-+include(SelectLibraryConfigurations)
-+select_library_configurations(LibRaw)
-+
-+FIND_LIBRARY(LibRaw_r_LIBRARY_RELEASE NAMES raw_r
-+ HINTS
-+ ${PC_LIBRAW_R_LIBDIR}
-+ ${PC_LIBRAW_R_LIBRARY_DIRS}
-+ )
-+
-+FIND_LIBRARY(LibRaw_r_LIBRARY_DEBUG NAMES raw_rd
-+ HINTS
-+ ${PC_LIBRAW_R_LIBDIR}
-+ ${PC_LIBRAW_R_LIBRARY_DIRS}
-+ )
-+
-+select_library_configurations(LibRaw_r)
-+
-+IF(LibRaw_INCLUDE_DIR)
-+ FILE(READ ${LibRaw_INCLUDE_DIR}/libraw_version.h _libraw_version_content)
-+
-+ STRING(REGEX MATCH "#define LIBRAW_MAJOR_VERSION[ \t]*([0-9]*)\n" _version_major_match ${_libraw_version_content})
-+ SET(_libraw_version_major "${CMAKE_MATCH_1}")
-+
-+ STRING(REGEX MATCH "#define LIBRAW_MINOR_VERSION[ \t]*([0-9]*)\n" _version_minor_match ${_libraw_version_content})
-+ SET(_libraw_version_minor "${CMAKE_MATCH_1}")
-+
-+ STRING(REGEX MATCH "#define LIBRAW_PATCH_VERSION[ \t]*([0-9]*)\n" _version_patch_match ${_libraw_version_content})
-+ SET(_libraw_version_patch "${CMAKE_MATCH_1}")
-+
-+ IF(_version_major_match AND _version_minor_match AND _version_patch_match)
-+ SET(LibRaw_VERSION_STRING "${_libraw_version_major}.${_libraw_version_minor}.${_libraw_version_patch}")
-+ ELSE()
-+ IF(NOT LibRaw_FIND_QUIETLY)
-+ MESSAGE(STATUS "Failed to get version information from ${LibRaw_INCLUDE_DIR}/libraw_version.h")
-+ ENDIF()
-+ ENDIF()
-+ENDIF()
-+
-+INCLUDE(FindPackageHandleStandardArgs)
-+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibRaw
-+ REQUIRED_VARS LibRaw_LIBRARIES LibRaw_INCLUDE_DIR
-+ VERSION_VAR LibRaw_VERSION_STRING
-+ )
-+
-+MARK_AS_ADVANCED(LibRaw_VERSION_STRING
-+ LibRaw_INCLUDE_DIR
-+ LibRaw_LIBRARIES
-+ LibRaw_r_LIBRARIES
-+ LibRaw_DEFINITIONS
-+ LibRaw_r_DEFINITIONS
-+ )
-diff --git a/cmake/modules/MacroBoolTo01.cmake b/cmake/modules/MacroBoolTo01.cmake
-new file mode 100644
-index 0000000..a6f2fd8
---- /dev/null
-+++ b/cmake/modules/MacroBoolTo01.cmake
-@@ -0,0 +1,20 @@
-+# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN )
-+# This macro evaluates its first argument
-+# and sets all the given vaiables either to 0 or 1
-+# depending on the value of the first one
-+
-+# Copyright (c) 2006, Alexander Neundorf, <[email protected]>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying LICENSE file.
-+
-+
-+MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
-+ FOREACH (_current_VAR ${ARGN})
-+ IF(${FOUND_VAR})
-+ SET(${_current_VAR} 1)
-+ ELSE(${FOUND_VAR})
-+ SET(${_current_VAR} 0)
-+ ENDIF(${FOUND_VAR})
-+ ENDFOREACH(_current_VAR)
-+ENDMACRO(MACRO_BOOL_TO_01)
-diff --git a/cmake/modules/MacroLogFeature.cmake b/cmake/modules/MacroLogFeature.cmake
-new file mode 100644
-index 0000000..5917a09
---- /dev/null
-+++ b/cmake/modules/MacroLogFeature.cmake
-@@ -0,0 +1,159 @@
-+# This file defines the Feature Logging macros.
-+#
-+# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]])
-+# Logs the information so that it can be displayed at the end
-+# of the configure run
-+# VAR : TRUE or FALSE, indicating whether the feature is supported
-+# FEATURE: name of the feature, e.g. "libjpeg"
-+# DESCRIPTION: description what this feature provides
-+# URL: home page
-+# REQUIRED: TRUE or FALSE, indicating whether the feature is required
-+# MIN_VERSION: minimum version number. empty string if unneeded
-+# COMMENTS: More info you may want to provide. empty string if unnecessary
-+#
-+# MACRO_DISPLAY_FEATURE_LOG()
-+# Call this to display the collected results.
-+# Exits CMake with a FATAL error message if a required feature is missing
-+#
-+# Example:
-+#
-+# INCLUDE(MacroLogFeature)
-+#
-+# FIND_PACKAGE(JPEG)
-+# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "")
-+# ...
-+# MACRO_DISPLAY_FEATURE_LOG()
-+
-+# Copyright (c) 2006, Alexander Neundorf, <[email protected]>
-+# Copyright (c) 2006, Allen Winter, <[email protected]>
-+# Copyright (c) 2009, Sebastian Trueg, <[email protected]>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying LICENSE file.
-+
-+IF (NOT _macroLogFeatureAlreadyIncluded)
-+ SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
-+ IF (EXISTS ${_file})
-+ FILE(REMOVE ${_file})
-+ ENDIF (EXISTS ${_file})
-+
-+ SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
-+ IF (EXISTS ${_file})
-+ FILE(REMOVE ${_file})
-+ ENDIF (EXISTS ${_file})
-+
-+ SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
-+ IF (EXISTS ${_file})
-+ FILE(REMOVE ${_file})
-+ ENDIF (EXISTS ${_file})
-+
-+ SET(_macroLogFeatureAlreadyIncluded TRUE)
-+
-+ INCLUDE(FeatureSummary)
-+
-+ENDIF (NOT _macroLogFeatureAlreadyIncluded)
-+
-+
-+MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments)
-+
-+ STRING(TOUPPER "${ARGV4}" _required)
-+ SET(_minvers "${ARGV5}")
-+ SET(_comments "${ARGV6}")
-+
-+ IF (${_var})
-+ SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
-+ ELSE (${_var})
-+ IF ("${_required}" STREQUAL "TRUE")
-+ SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
-+ ELSE ("${_required}" STREQUAL "TRUE")
-+ SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
-+ ENDIF ("${_required}" STREQUAL "TRUE")
-+ ENDIF (${_var})
-+
-+ SET(_logtext " * ${_package}")
-+
-+ IF (NOT ${_var})
-+ IF (${_minvers} MATCHES ".*")
-+ SET(_logtext "${_logtext} (${_minvers} or higher)")
-+ ENDIF (${_minvers} MATCHES ".*")
-+ SET(_logtext "${_logtext} <${_url}>\n ")
-+ ELSE (NOT ${_var})
-+ SET(_logtext "${_logtext} - ")
-+ ENDIF (NOT ${_var})
-+
-+ SET(_logtext "${_logtext}${_description}")
-+
-+ IF (NOT ${_var})
-+ IF (${_comments} MATCHES ".*")
-+ SET(_logtext "${_logtext}\n ${_comments}")
-+ ENDIF (${_comments} MATCHES ".*")
-+# SET(_logtext "${_logtext}\n") #double-space missing features?
-+ ENDIF (NOT ${_var})
-+
-+ FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n")
-+
-+ IF(COMMAND SET_PACKAGE_PROPERTIES)
-+ SET_PACKAGE_PROPERTIES("${_package}" PROPERTIES URL "${_url}" DESCRIPTION "\"${_description}\"")
-+ ELSEIF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3
-+ SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"")
-+ ENDIF(COMMAND SET_PACKAGE_PROPERTIES)
-+
-+ENDMACRO(MACRO_LOG_FEATURE)
-+
-+
-+MACRO(MACRO_DISPLAY_FEATURE_LOG)
-+ IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3
-+ FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt
-+ WHAT ALL)
-+ ENDIF(COMMAND FEATURE_SUMMARY)
-+
-+ SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
-+ SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
-+ SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
-+
-+ IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
-+ SET(_printSummary TRUE)
-+ ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
-+
-+ IF(_printSummary)
-+ SET(_missingDeps 0)
-+ IF (EXISTS ${_enabledFile})
-+ FILE(READ ${_enabledFile} _enabled)
-+ FILE(REMOVE ${_enabledFile})
-+ SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}")
-+ ENDIF (EXISTS ${_enabledFile})
-+
-+
-+ IF (EXISTS ${_disabledFile})
-+ SET(_missingDeps 1)
-+ FILE(READ ${_disabledFile} _disabled)
-+ FILE(REMOVE ${_disabledFile})
-+ SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}")
-+ ENDIF (EXISTS ${_disabledFile})
-+
-+
-+ IF (EXISTS ${_missingFile})
-+ SET(_missingDeps 1)
-+ FILE(READ ${_missingFile} _requirements)
-+ SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}")
-+ FILE(REMOVE ${_missingFile})
-+ SET(_haveMissingReq 1)
-+ ENDIF (EXISTS ${_missingFile})
-+
-+
-+ IF (NOT ${_missingDeps})
-+ SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.")
-+ ENDIF (NOT ${_missingDeps})
-+
-+
-+ MESSAGE(${_summary})
-+ MESSAGE("-----------------------------------------------------------------------------\n")
-+
-+
-+ IF(_haveMissingReq)
-+ MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
-+ ENDIF(_haveMissingReq)
-+
-+ ENDIF(_printSummary)
-+
-+ENDMACRO(MACRO_DISPLAY_FEATURE_LOG)
-diff --git a/cmake/modules/MacroOptionalFindPackage.cmake b/cmake/modules/MacroOptionalFindPackage.cmake
-new file mode 100644
-index 0000000..05fa139
---- /dev/null
-+++ b/cmake/modules/MacroOptionalFindPackage.cmake
-@@ -0,0 +1,48 @@
-+# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
-+# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
-+# This macro is a combination of OPTION() and FIND_PACKAGE(), it
-+# works like FIND_PACKAGE(), but additionally it automatically creates
-+# an option name WITH_<name>, which can be disabled via the cmake GUI.
-+# or via -DWITH_<name>=OFF
-+# The standard <name>_FOUND variables can be used in the same way
-+# as when using the normal FIND_PACKAGE()
-+
-+# Copyright (c) 2006-2010 Alexander Neundorf, <[email protected]>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying LICENSE file.
-+
-+# This is just a helper macro to set a bunch of variables empty.
-+# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
-+macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
-+ if(DEFINED ${_name}_${_var})
-+ set(${_name}_${_var} "")
-+ endif(DEFINED ${_name}_${_var})
-+
-+ string(TOUPPER ${_name} _nameUpper)
-+ if(DEFINED ${_nameUpper}_${_var})
-+ set(${_nameUpper}_${_var} "")
-+ endif(DEFINED ${_nameUpper}_${_var})
-+endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
-+
-+
-+macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
-+ option(WITH_${_name} "Search for ${_name} package" ON)
-+ if (WITH_${_name})
-+ find_package(${_name} ${ARGN})
-+ else (WITH_${_name})
-+ string(TOUPPER ${_name} _nameUpper)
-+ set(${_name}_FOUND FALSE)
-+ set(${_nameUpper}_FOUND FALSE)
-+
-+ _mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
-+ _mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
-+ _mofp_set_empty_if_defined(${_name} INCLUDES)
-+ _mofp_set_empty_if_defined(${_name} LIBRARY)
-+ _mofp_set_empty_if_defined(${_name} LIBRARIES)
-+ _mofp_set_empty_if_defined(${_name} LIBS)
-+ _mofp_set_empty_if_defined(${_name} FLAGS)
-+ _mofp_set_empty_if_defined(${_name} DEFINITIONS)
-+ endif (WITH_${_name})
-+endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
-+
-diff --git a/cmake/modules/Uninstall.cmake b/cmake/modules/Uninstall.cmake
-new file mode 100644
-index 0000000..36dd9ba
---- /dev/null
-+++ b/cmake/modules/Uninstall.cmake
-@@ -0,0 +1,22 @@
-+IF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
-+ MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"")
-+ENDIF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
-+
-+FILE(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
-+STRING(REGEX REPLACE "\n" ";" files "${files}")
-+FOREACH(file ${files})
-+ MESSAGE(STATUS "Uninstalling \"${file}\"")
-+ IF(EXISTS "${file}")
-+ EXEC_PROGRAM(
-+ "@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
-+ OUTPUT_VARIABLE rm_out
-+ RETURN_VALUE rm_retval
-+ )
-+ IF("${rm_retval}" STREQUAL 0)
-+ ELSE("${rm_retval}" STREQUAL 0)
-+ MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
-+ ENDIF("${rm_retval}" STREQUAL 0)
-+ ELSE(EXISTS "${file}")
-+ MESSAGE(STATUS "File \"${file}\" does not exist.")
-+ ENDIF(EXISTS "${file}")
-+ENDFOREACH(file)
---
-2.30.1.windows.1
-
diff --git a/3rdparty/ext_libraw/0002-Use-CMake-install-prefix.patch b/3rdparty/ext_libraw/0002-Use-CMake-install-prefix.patch
deleted file mode 100644
index bd866594e4..0000000000
--- a/3rdparty/ext_libraw/0002-Use-CMake-install-prefix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f7fa9edc33426f0ae155b16702b626f320ebae46 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Thu, 18 Feb 2021 15:31:16 +0000
-Subject: [PATCH 2/2] Use CMake install prefix
-
----
- CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 948a0a0..0e11436 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -97,8 +97,8 @@ SET(RAWSPEED_RPATH "RawSpeed" CACHE STRING
-
- SET(RAWSPEED_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${RAWSPEED_RPATH}")
-
--SET(INSTALL_CMAKE_MODULE_PATH "share/libraw/cmake" CACHE STRING
-- "Path to install cmake module (default=share/libraw/cmake)")
-+SET(INSTALL_CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake/libraw" CACHE STRING
-+ "Path to install cmake module (default=CMAKE_INSTALL_PREFIX/lib/cmake/libraw)")
-
- # ==================================================================================================
- # General definitions rules
---
-2.30.1.windows.1
-
diff --git a/3rdparty/ext_libraw/CMakeLists.txt b/3rdparty/ext_libraw/CMakeLists.txt
deleted file mode 100644
index 4a03ab47fe..0000000000
--- a/3rdparty/ext_libraw/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-SET(PREFIX_ext_libraw "${EXTPREFIX}" )
-
-if(APPLE)
- # There is no OPENMP support on apple's clang
- set(LIBRAW_CMAKE_FLAGS "-DENABLE_OPENMP=OFF")
-endif()
-
-ExternalProject_Add(ext_raw
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://www.libraw.org/data/LibRaw-0.20.2.tar.gz
- URL_HASH SHA256=dc1b486c2003435733043e4e05273477326e51c3ea554c6864a4eafaff1004a6
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-LibRaw-cmake.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Use-CMake-install-prefix.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_libraw} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${LIBRAW_CMAKE_FLAGS} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ext_lcms2 ext_jpeg
-)
-
-ExternalProject_Add(ext_kdcraw
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/release-service/22.12.1/src/libkdcraw-22.12.1.tar.xz
- URL_HASH SHA256=8b0a71937f7ed4926c2c047e0bd36001e5e98f52b1cf633d8bfbe4e4eeac65eb
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_libraw}
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- -DBUILD_SHARED_LIBS=OFF
- ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ext_raw ext_extra_cmake_modules ${QT_DEP}
-)
-
-add_custom_target(ext_libraw)
-add_dependencies(ext_libraw ext_raw ext_kdcraw)
diff --git a/3rdparty/ext_libunwindstack-ndk/0001-Add-install-property-and-cmake-config-file.patch b/3rdparty/ext_libunwindstack-ndk/0001-Add-install-property-and-cmake-config-file.patch
deleted file mode 100644
index 374c8e1776..0000000000
--- a/3rdparty/ext_libunwindstack-ndk/0001-Add-install-property-and-cmake-config-file.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From ef114659f068dba2e6d966c48c2c3adf865d0d03 Mon Sep 17 00:00:00 2001
-From: Sharaf Zaman <[email protected]>
-Date: Thu, 13 Jan 2022 13:59:01 +0000
-Subject: [PATCH] Add install property and cmake config file
-
----
- cmake/CMakeLists.txt | 24 ++++++++++++++++++++++++
- cmake/unwindstack-config.cmake.in | 10 ++++++++++
- 2 files changed, 34 insertions(+)
- create mode 100644 cmake/unwindstack-config.cmake.in
-
-diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 68fd086..02ddb56 100644
---- a/cmake/CMakeLists.txt
-+++ b/cmake/CMakeLists.txt
-@@ -1,6 +1,8 @@
- project(unwindstack LANGUAGES C CXX ASM)
- cmake_minimum_required(VERSION 3.10)
-
-+include(GNUInstallDirs)
-+
- set(UNWINDSTACK_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../)
-
- include_directories(${UNWINDSTACK_ROOT} ${UNWINDSTACK_ROOT}/include)
-@@ -98,6 +100,28 @@ add_library(unwindstack STATIC
- target_link_libraries(unwindstack log)
- set_property(TARGET unwindstack PROPERTY CXX_STANDARD 17)
-
-+include(CMakePackageConfigHelpers)
-+configure_package_config_file(unwindstack-config.cmake.in
-+ ${CMAKE_CURRENT_BINARY_DIR}/unwindstack-config.cmake
-+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/unwindstack/cmake
-+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_PREFIX)
-+
- if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- target_compile_options(unwindstack PRIVATE $<BUILD_INTERFACE:-Wno-unknown-attributes>)
- endif()
-+
-+install(TARGETS unwindstack
-+ EXPORT ${PROJECT_NAME}Targets
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ )
-+
-+install(EXPORT ${PROJECT_NAME}Targets
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
-+ )
-+
-+install(DIRECTORY ${UNWINDSTACK_ROOT}/include/ ${UNWINDSTACK_ROOT}/include/unwindstack DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-+install(FILES
-+ "${CMAKE_CURRENT_BINARY_DIR}/unwindstack-config.cmake"
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
-diff --git a/cmake/unwindstack-config.cmake.in b/cmake/unwindstack-config.cmake.in
-new file mode 100644
-index 0000000..39032c1
---- /dev/null
-+++ b/cmake/unwindstack-config.cmake.in
-@@ -0,0 +1,10 @@
-+@PACKAGE_INIT@
-+
-+set_and_check(@PROJECT_NAME@_INCLUDE_DIR @PACKAGE_CMAKE_INSTALL_INCLUDEDIR@)
-+
-+include("@PACKAGE_CMAKE_INSTALL_LIBDIR@/cmake/@PROJECT_NAME@/@[email protected]")
-+get_target_property(unwindstack_lib_location unwindstack "LOCATION")
-+set_and_check(@PROJECT_NAME@_LIBRARIES ${unwindstack_lib_location})
-+set_and_check(unwindstack_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@)
-+
-+set(unwindstack_FOUND TRUE)
---
-2.37.1
-
diff --git a/3rdparty/ext_libunwindstack-ndk/CMakeLists.txt b/3rdparty/ext_libunwindstack-ndk/CMakeLists.txt
deleted file mode 100644
index d9b00f1b95..0000000000
--- a/3rdparty/ext_libunwindstack-ndk/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-SET(EXTPREFIX_libunwindstack-ndk "${EXTPREFIX}")
-
-ExternalProject_Add(
- ext_libunwindstack-ndk
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- SOURCE_SUBDIR ./cmake
- GIT_REPOSITORY https://github.com/getsentry/libunwindstack-ndk.git
- GIT_TAG a4c27d48deff95fe922fe9733ef5c1339bdbf4fb
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Add-install-property-and-cmake-config-file.patch
-
- INSTALL_DIR ${EXTPREFIX_libunwindstack-ndk}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_libunwindstack-ndk}
- -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
- ${GLOBAL_PROFILE}
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_lzma/CMakeLists.txt b/3rdparty/ext_lzma/CMakeLists.txt
deleted file mode 100644
index e9407626fd..0000000000
--- a/3rdparty/ext_lzma/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-SET(PREFIX_ext_lzma "${EXTPREFIX}" )
-if (WIN32)
- ExternalProject_Add( ext_lzma
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://tukaani.org/xz/xz-5.2.6-windows.zip
- URL_HASH SHA256=6fd6dad79e5b0d3b24a43bc3f79472b62a48d210f1aaa02fb06e5dfad89a4ebc
-
- INSTALL_DIR ${PREFIX_ext_lzma}
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying 64-bit liblzma.dll
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin_x86-64/liblzma.dll ${PREFIX_ext_lzma}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin_x86-64/liblzma.a ${PREFIX_ext_lzma}/bin/
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma.h ${PREFIX_ext_lzma}/include/
- COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include/lzma ${PREFIX_ext_lzma}/include/lzma/
-
- UPDATE_COMMAND ""
- )
-else ()
- ExternalProject_Add( ext_lzma
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://tukaani.org/xz/xz-5.2.6.tar.gz
- URL_HASH SHA256=a2105abee17bcd2ebd15ced31b4f5eda6e17efd6b10f921a01cda4a44c91b3a0
-
- INSTALL_DIR ${PREFIX_ext_lzma}
- CONFIGURE_COMMAND ./configure --prefix=${PREFIX_ext_lzma} --disable-xz --disable-xzdec --disable-lzmadec --disable-lzmainfo --disable-lzma-links --disable-scripts --disable-doc --disable-static --enable-shared ${GLOBAL_AUTOMAKE_PROFILE}
-
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE 1
- )
-
-endif ()
diff --git a/3rdparty/ext_meson/0001-fix-linker-detection-on-Xcode-15.patch b/3rdparty/ext_meson/0001-fix-linker-detection-on-Xcode-15.patch
deleted file mode 100644
index c40f8f059d..0000000000
--- a/3rdparty/ext_meson/0001-fix-linker-detection-on-Xcode-15.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 01a8979dc75293a8bbc038410dcc9e1569c61464 Mon Sep 17 00:00:00 2001
-From: Ivan Yossi <[email protected]>
-Date: Mon, 25 Sep 2023 12:44:12 -0600
-Subject: [PATCH] fix linker detection on Xcode 15
-
----
- mesonbuild/linkers/detect.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py
-index 97e770c..03e80b6 100644
---- a/mesonbuild/linkers/detect.py
-+++ b/mesonbuild/linkers/detect.py
-@@ -218,7 +218,7 @@ def guess_nix_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty
- mlog.debug(f'linker stderr:\n{newerr}')
-
- for line in newerr.split('\n'):
-- if 'PROJECT:ld' in line:
-+ if 'PROJECT:ld' or 'PROJECT:dyld' in line:
- v = line.split('-')[1]
- break
- else:
---
-2.37.1 (Apple Git-137.1)
-
diff --git a/3rdparty/ext_meson/CMakeLists.txt b/3rdparty/ext_meson/CMakeLists.txt
deleted file mode 100644
index 5c1d4b7800..0000000000
--- a/3rdparty/ext_meson/CMakeLists.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-SET(PREFIX_ext_meson "${EXTPREFIX}" )
-if (WIN32)
- krita_to_native_path("${PREFIX_ext_meson}" _meson_prefix)
-
- ExternalProject_Add( ext_meson
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/mesonbuild/meson/releases/download/1.1.0/meson-1.1.0.tar.gz
- URL_HASH SHA256=d9616c44cd6c53689ff8f05fc6958a693f2e17c3472a8daf83cee55dabff829f
-
- CONFIGURE_COMMAND ""
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build -j ${SUBMAKE_JOBS}
-
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --skip-build --prefix=${_meson_prefix} --optimize=1 --install-scripts=${_meson_prefix}\\bin
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_python ${NINJA_DEP}
- )
-elseif(NOT CMAKE_CROSSCOMPILING)
- set(_meson_prefix "${PREFIX_ext_meson}")
-
- ExternalProject_Add( ext_meson
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/mesonbuild/meson/releases/download/1.1.0/meson-1.1.0.tar.gz
- URL_HASH SHA256=d9616c44cd6c53689ff8f05fc6958a693f2e17c3472a8daf83cee55dabff829f
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-fix-linker-detection-on-Xcode-15.patch
-
- CONFIGURE_COMMAND chmod u+x <SOURCE_DIR>/setup.py
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- SETUPTOOLS_USE_DISTUTILS=local
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build -j ${SUBMAKE_JOBS}
-
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- SETUPTOOLS_USE_DISTUTILS=local
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --skip-build --prefix=${_meson_prefix} --optimize=1 --install-scripts=${PREFIX_ext_meson}/bin
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_python ${NINJA_DEP}
- )
-else()
- set(_meson_prefix "${PREFIX_ext_meson}")
- # Meson needs to be brought manually when crosscompiling.
- ExternalProject_Add(ext_meson
- DOWNLOAD_COMMAND ""
-
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "Installing meson natively"
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONUSERBASE=${_meson_prefix}
- ${Python_EXECUTABLE} -m pip install --upgrade meson==1.1.0 --user --ignore-installed --verbose
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${Python_EXECUTABLE} -m pip show -f meson
-
- UPDATE_COMMAND ""
-
- DEPENDS ${NINJA_DEP}
- )
-endif()
diff --git a/3rdparty/ext_mlt/0001-Fix-compilation-on-Windows-with-Clang-15-965.patch b/3rdparty/ext_mlt/0001-Fix-compilation-on-Windows-with-Clang-15-965.patch
deleted file mode 100644
index 4cd82cc3bd..0000000000
--- a/3rdparty/ext_mlt/0001-Fix-compilation-on-Windows-with-Clang-15-965.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 3ffb57b99a62a6cd356e6548f233d4f683a4b21c Mon Sep 17 00:00:00 2001
-From: Emmet O'Neill <[email protected]>
-Date: Tue, 12 Dec 2023 15:36:19 -0800
-Subject: [PATCH] Fix compilation on Windows with Clang 15 (#965)
-
-Co-authored-by: Dmitry Kazakov <[email protected]>
----
- src/framework/CMakeLists.txt | 8 ++------
- src/framework/mlt_property.h | 2 ++
- src/mlt++/CMakeLists.txt | 8 ++------
- 3 files changed, 6 insertions(+), 12 deletions(-)
-
-diff --git a/src/framework/CMakeLists.txt b/src/framework/CMakeLists.txt
-index e17e43c0..c61cd3b8 100644
---- a/src/framework/CMakeLists.txt
-+++ b/src/framework/CMakeLists.txt
-@@ -96,12 +96,8 @@ set_target_properties(mlt PROPERTIES
-
- if(WIN32)
- if(MINGW)
-- install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt-${MLT_VERSION_MAJOR}.dll"
-- DESTINATION ${CMAKE_INSTALL_LIBDIR}
-- RENAME libmlt.dll
-- )
-- target_link_options(mlt PRIVATE -Wl,--output-def,libmlt.def)
-- install(FILES "${CMAKE_BINARY_DIR}/libmlt.def" DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+ target_link_options(mlt PRIVATE -Wl,--output-def,${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt-${MLT_VERSION_MAJOR}.def)
-+ install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt-${MLT_VERSION_MAJOR}.def" DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endif()
- target_sources(mlt PRIVATE ../win32/win32.c ../win32/strptime.c)
- target_link_libraries(mlt PRIVATE Iconv::Iconv)
-diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h
-index 4b51af41..e347d4b6 100644
---- a/src/framework/mlt_property.h
-+++ b/src/framework/mlt_property.h
-@@ -39,6 +39,8 @@ typedef locale_t mlt_locale_t;
- #elif defined(__OpenBSD__)
- /* XXX matches __nop_locale glue in libc++ */
- typedef void *mlt_locale_t;
-+#elif (defined _WIN32 && defined _LIBCPP_VERSION)
-+struct mlt_locale_t;
- #else
- typedef char *mlt_locale_t;
- #endif
-diff --git a/src/mlt++/CMakeLists.txt b/src/mlt++/CMakeLists.txt
-index 26c05579..7028c41d 100644
---- a/src/mlt++/CMakeLists.txt
-+++ b/src/mlt++/CMakeLists.txt
-@@ -85,12 +85,8 @@ set_target_properties(mlt++ PROPERTIES
-
- if(WIN32)
- if(MINGW)
-- install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt++-${MLT_VERSION_MAJOR}.dll"
-- DESTINATION ${CMAKE_INSTALL_LIBDIR}
-- RENAME libmlt++.dll
-- )
-- target_link_options(mlt++ PRIVATE -Wl,--output-def,libmlt++.def)
-- install(FILES "${CMAKE_BINARY_DIR}/libmlt++.def" DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+ target_link_options(mlt++ PRIVATE -Wl,--output-def,${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt++-${MLT_VERSION_MAJOR}.def)
-+ install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt++-${MLT_VERSION_MAJOR}.def" DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endif()
- target_compile_definitions(mlt++ PRIVATE MLTPP_EXPORTS)
- endif()
---
-2.23.0.windows.1
-
diff --git a/3rdparty/ext_mlt/0001-macOS-allow-finding-plugins-outside-bundles.patch b/3rdparty/ext_mlt/0001-macOS-allow-finding-plugins-outside-bundles.patch
deleted file mode 100644
index a67c0d65c4..0000000000
--- a/3rdparty/ext_mlt/0001-macOS-allow-finding-plugins-outside-bundles.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 38ef302db9ae8b41c5158f4b44fbbe1ef8636b60 Mon Sep 17 00:00:00 2001
-From: Ivan Yossi <[email protected]>
-Date: Fri, 26 Jan 2024 19:57:17 +0100
-Subject: [PATCH 1/2] [macOS] allow finding plugins outside bundles
-
-This allows to load mlt plugins from install directory when the
-.app is missing Plugins and Resources locations.
-
-The patch is not robust, its designed to change from one static
-location to another when running krita.app from a kritadev environment
-when the bundle dirs are missing: this only happens when running
-krita.app from install directory after building.
-
-changes are:
-i/bin/krita.app/Contents/Plugins/mlt -> i/lib/mlt
-i/bin/krita.app/Contents/Resources/mlt -> i/share/mlt
----
- src/framework/mlt_factory.c | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/src/framework/mlt_factory.c b/src/framework/mlt_factory.c
-index 16469aa1..bee8eb9f 100644
---- a/src/framework/mlt_factory.c
-+++ b/src/framework/mlt_factory.c
-@@ -52,6 +52,7 @@
- #endif
- #ifdef __APPLE__
- #include <mach-o/dyld.h>
-+#include <dirent.h>
- /** the default subdirectory of the libdir for holding modules (plugins) */
- #define PREFIX_LIB "/PlugIns/mlt"
- /** the default subdirectory of the install prefix for holding module (plugin) data */
-@@ -64,6 +65,24 @@
- #endif
- #endif
-
-+#ifdef __APPLE__
-+void mlt_apple_relocate_mltdirectory(char **path, char* basepath, char* altpath)
-+{
-+ DIR *pdir = opendir(*path);
-+
-+ if ( !pdir ) {
-+ memset(*path,0,strlen(*path));
-+
-+ size_t size = strlen(basepath);
-+ strncpy( *path, basepath, size - 23);
-+ strcat( *path, altpath);
-+ } else {
-+ closedir(pdir);
-+ }
-+ return;
-+}
-+#endif
-+
- /** holds the full path to the modules directory - initialized and retained for the entire session */
- static char *mlt_directory = NULL;
- /** a global properties list for holding environment config data and things needing session-oriented cleanup */
-@@ -182,12 +201,18 @@ mlt_repository mlt_factory_init(const char *directory)
- mlt_directory = calloc(1, size + strlen(PREFIX_DATA) + 1);
- strcpy(mlt_directory, exedir);
- strcat(mlt_directory, PREFIX_DATA);
-+#ifdef __APPLE__
-+ mlt_apple_relocate_mltdirectory(&mlt_directory, exedir, "/share/mlt");
-+#endif
- mlt_properties_set(global_properties, "MLT_DATA", mlt_directory);
- free(mlt_directory);
- }
- mlt_directory = calloc(1, size + strlen(PREFIX_LIB) + 1);
- strcpy(mlt_directory, exedir);
- strcat(mlt_directory, PREFIX_LIB);
-+#ifdef __APPLE__
-+ mlt_apple_relocate_mltdirectory(&mlt_directory, exedir, "/lib/mlt");
-+#endif
- }
- #endif
-
---
-2.23.0.windows.1
-
diff --git a/3rdparty/ext_mlt/0002-MLT-check-pointers-before-dereferencing.patch b/3rdparty/ext_mlt/0002-MLT-check-pointers-before-dereferencing.patch
deleted file mode 100644
index c22cfd662a..0000000000
--- a/3rdparty/ext_mlt/0002-MLT-check-pointers-before-dereferencing.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4a6944fd0e7164d77eddca22f9d703ce2533611e Mon Sep 17 00:00:00 2001
-From: Halla Rempt <[email protected]>
-Date: Fri, 26 Jan 2024 20:03:28 +0100
-Subject: [PATCH 2/2] MLT: check pointers before dereferencing
-
-In other places, checks for "self" occur as well, so it probably
-should be checked everywhere.
-
-This prevents MLT from crashing if it cannot find plugins on creating
-an image in Krita. It's still not good that MLT cannot find plugins
-in a reliable way, though...
----
- src/framework/mlt_consumer.c | 2 ++
- src/framework/mlt_service.c | 4 +++-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c
-index a65d7c81..00c125a9 100644
---- a/src/framework/mlt_consumer.c
-+++ b/src/framework/mlt_consumer.c
-@@ -578,6 +578,8 @@ int mlt_consumer_put_frame(mlt_consumer self, mlt_frame frame)
- {
- int error = 1;
-
-+ if (!self) return error;
-+
- // Get the service associated to the consumer
- mlt_service service = MLT_CONSUMER_SERVICE(self);
-
-diff --git a/src/framework/mlt_service.c b/src/framework/mlt_service.c
-index 4ee83fa5..f2e42331 100644
---- a/src/framework/mlt_service.c
-+++ b/src/framework/mlt_service.c
-@@ -319,9 +319,11 @@ int mlt_service_insert_producer(mlt_service self, mlt_service producer, int inde
-
- int mlt_service_disconnect_producer(mlt_service self, int index)
- {
-+ if (!self) return -1;
-+
- mlt_service_base *base = self->local;
-
-- if (base->in && index >= 0 && index < base->count) {
-+ if (base && base->in && index >= 0 && index < base->count) {
- mlt_service current = base->in[index];
-
- if (current) {
---
-2.23.0.windows.1
-
diff --git a/3rdparty/ext_mlt/CMakeLists.txt b/3rdparty/ext_mlt/CMakeLists.txt
deleted file mode 100644
index 40f4262b51..0000000000
--- a/3rdparty/ext_mlt/CMakeLists.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-
-SET(PREFIX_ext_mlt "${EXTPREFIX}")
-
-if (NOT WIN32 OR MINGW)
-set(DLFCN_WIN32_DEP)
-set(WIN32_CMAKE_ARGS)
-
-if (WIN32)
-
- ExternalProject_Add(
- ext_dlfcn_win32
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/dlfcn-win32/dlfcn-win32/archive/refs/tags/v1.3.1.zip
- URL_HASH SHA256=4f611c4372eef7f0179a33f76f84d54857c4fe676b60b654c6c5d91a6d4dad55
-
- CMAKE_ARGS ${GLOBAL_PROFILE} -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_mlt}
- )
-
- set(DLFCN_WIN32_DEP ext_dlfcn_win32)
- set(WIN32_CMAKE_ARGS -DWINDOWS_DEPLOY=OFF)
-endif()
-
-if (ANDROID)
- set(BUILD_EXTRA_OPTS "-DMOD_RTAUDIO=OFF")
-else()
- set(BUILD_EXTRA_OPTS "")
-endif()
-
-
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_mlt
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/mltframework/mlt/releases/download/v7.22.0/mlt-7.22.0.tar.gz
- URL_HASH MD5=9f747ae1b7388937be6328b4c234431b
- #GIT_REPOSITORY https://github.com/emmetoneillpdx/mlt.git
- #GIT_TAG origin/master
- # GIT_TAG 1924f3712e3dc0f7a1e5a1aa658dbbbf0e863754 # fixed tip of 'origin/mlt-krita-plugins'
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-compilation-on-Windows-with-Clang-15-965.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-macOS-allow-finding-plugins-outside-bundles.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-MLT-check-pointers-before-dereferencing.patch
-
- CMAKE_ARGS ${GLOBAL_PROFILE} -DMOD_OPENCV=OFF ${WIN32_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_mlt} ${BUILD_EXTRA_OPTS}
-
- DEPENDS ext_ffmpeg ${DLFCN_WIN32_DEP}
-)
-endif()
diff --git a/3rdparty/ext_mypaint/0001-Add-cmake-build-system.patch b/3rdparty/ext_mypaint/0001-Add-cmake-build-system.patch
deleted file mode 100644
index 3cb2808b4f..0000000000
--- a/3rdparty/ext_mypaint/0001-Add-cmake-build-system.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 62838fc9791a9fbe807b1cc4f90f802af91b39a5 Mon Sep 17 00:00:00 2001
-From: Boudewijn Rempt <[email protected]>
-Date: Tue, 17 Nov 2020 12:47:55 +0100
-Subject: [PATCH 1/5] Add cmake build system
-
----
- CMakeLists.txt | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
- FindJsonC.cmake | 31 +++++++++++++++++++++++
- config.h | 4 +--
- mypaint-brush-settings.c | 12 ++++-----
- 4 files changed, 103 insertions(+), 8 deletions(-)
- create mode 100644 CMakeLists.txt
- create mode 100644 FindJsonC.cmake
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..d93309d
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,64 @@
-+cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
-+
-+set (project libmypaint)
-+
-+LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
-+
-+find_package(ECM 5.22 REQUIRED NOMODULE)
-+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
-+include(CMakePackageConfigHelpers)
-+
-+find_package(JsonC)
-+
-+include_directories(SYSTEM ${JSONC_INCLUDE_DIRS})
-+
-+set(mypaint_SOURCES
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-brush-settings.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-symmetry.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/fifo.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/helpers.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/tilemap.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/operationqueue.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-rectangle.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-fixed-tiled-surface.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-mapping.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/rng-double.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-brush.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-surface.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/brushmodes.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-matrix.c
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-tiled-surface.c
-+)
-+
-+set(mypaint_HEADERS
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-brush.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/tiled-surface-private.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/fifo.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/rng-double.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-rectangle.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-config.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-tiled-surface.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/config.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-mapping.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/brushsettings-gen.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-symmetry.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/tilemap.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/operationqueue.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-matrix.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/helpers.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-brush-settings-gen.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-glib-compat.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/brushmodes.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-fixed-tiled-surface.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-brush-settings.h
-+ ${CMAKE_CURRENT_SOURCE_DIR}/mypaint-surface.h
-+)
-+
-+
-+add_library(mypaint SHARED ${mypaint_SOURCES} ${mypaint_HEADERS})
-+target_link_libraries(mypaint PRIVATE ${JSONC_LIBRARIES})
-+set_property(TARGET mypaint PROPERTY C_STANDARD 11)
-+install(TARGETS mypaint RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
-+install(FILES ${mypaint_HEADERS} DESTINATION include)
-diff --git a/FindJsonC.cmake b/FindJsonC.cmake
-new file mode 100644
-index 0000000..17464df
---- /dev/null
-+++ b/FindJsonC.cmake
-@@ -0,0 +1,31 @@
-+#For finding JsonC library in the system
-+
-+
-+find_path(LIBJSONC_INCLUDE_DIR
-+ NAMES json_config.h
-+ /usr/include
-+ /usr/local/include
-+ /sw/include
-+ /opt/local/include
-+ ${MYPAINT_PKGCONF_INCLUDE_DIRS}
-+ ${MYPAINT_PKGCONF_INCLUDEDIR}
-+ PATH_SUFFIXES json-c
-+)
-+
-+#message("XXXX" ${LIBJSONC_INCLUDE_DIR})
-+
-+find_library(LIBJSONC_LIBRARY
-+ NAMES libjson-c json-c
-+ HINTS ${JSONC_PKGCONF_LIBRARY_DIRS} ${JSONC_PKGCONF_LIBDIR}
-+ DOC "Libraries to link against for json support"
-+)
-+
-+#message("YYYY" ${LIBJSONC_LIBRARY})
-+
-+string(REGEX MATCH "(.*)/libjson.so" LIBJSONC_LIBRARIES ${LIBJSONC_LIBRARY})
-+
-+set(JSONC_LIBRARIES ${LIBJSONC_LIBRARY})
-+set(JSONC_INCLUDE_DIRS ${LIBJSONC_INCLUDE_DIR})
-+set(JSONC_FOUND ${JSONC_PKGCONF_FOUND})
-+set(JSONC_VERSION ${JSONCl_PKGCONF_VERSION})
-+
-diff --git a/config.h b/config.h
-index a44118b..c70f205 100644
---- a/config.h
-+++ b/config.h
-@@ -17,7 +17,7 @@
- #define HAVE_DLFCN_H 1
-
- /* Define if the GNU gettext() function is already present or preinstalled. */
--#define HAVE_GETTEXT 1
-+#define HAVE_GETTEXT 0
-
- /* Define to 1 if you have the <inttypes.h> header file. */
- #define HAVE_INTTYPES_H 1
-@@ -56,7 +56,7 @@
- #define LT_OBJDIR ".libs/"
-
- /* Define to 1 if glib is used */
--#define MYPAINT_CONFIG_USE_GLIB 1
-+#define MYPAINT_CONFIG_USE_GLIB 0
-
- /* Define to the address where bug reports for this package should be sent. */
- #define PACKAGE_BUGREPORT "https://github.com/mypaint/libmypaint/issues"
-diff --git a/mypaint-brush-settings.c b/mypaint-brush-settings.c
-index b352cec..2e3b1fe 100644
---- a/mypaint-brush-settings.c
-+++ b/mypaint-brush-settings.c
-@@ -21,15 +21,15 @@
- #include <string.h>
- #include <assert.h>
-
--#ifdef HAVE_GETTEXT
-- #include <libintl.h>
-- #define N_(String) (String)
-- #define _(String) gettext (String)
--#else
-+//#ifdef HAVE_GETTEXT
-+// #include <libintl.h>
-+// #define N_(String) (String)
-+// #define _(String) gettext (String)
-+//#else
- #define dgettext(Domain,String) (String)
- #define N_(String) (String)
- #define _(String) (String)
--#endif // HAVE_GETTEXT
-+//#endif // HAVE_GETTEXT
-
- #include <float.h>
-
---
-2.13.2.windows.1
-
diff --git a/3rdparty/ext_mypaint/0002-cmake-library-versioning-info-for-pkg-config.patch b/3rdparty/ext_mypaint/0002-cmake-library-versioning-info-for-pkg-config.patch
deleted file mode 100644
index 3e8f9d5f08..0000000000
--- a/3rdparty/ext_mypaint/0002-cmake-library-versioning-info-for-pkg-config.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 39d42d865210cf1c61804a6494e933c3792570a0 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Tue, 17 Nov 2020 22:04:57 +0000
-Subject: [PATCH 2/5] cmake: library versioning info for pkg-config
-
----
- CMakeLists.txt | 14 +++++++++++++-
- libmypaint.pc.in | 16 ++++++++--------
- 2 files changed, 21 insertions(+), 9 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e6b00cc..afba70b 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,6 +1,9 @@
- cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
-
--set (project libmypaint)
-+project(libmypaint
-+ VERSION "1.6.1"
-+ HOMEPAGE_URL "https://github.com/mypaint/libmypaint"
-+)
-
- LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
-
-@@ -62,3 +65,12 @@ target_link_libraries(mypaint ${JSONC_LIBRARIES})
- set_property(TARGET mypaint PROPERTY C_STANDARD 11)
- install(TARGETS mypaint RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
- install(FILES ${mypaint_HEADERS} DESTINATION include)
-+
-+if(JsonC_FOUND)
-+ set(PKG_CONFIG_REQUIRES "json-c")
-+else()
-+ set(PKG_CONFIG_REQUIRES "")
-+endif()
-+configure_file("libmypaint.pc.in" "libmypaint.pc" @ONLY)
-+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmypaint.pc"
-+ DESTINATION lib/pkgconfig)
-diff --git a/libmypaint.pc.in b/libmypaint.pc.in
-index cdd8a24..bd3367d 100644
---- a/libmypaint.pc.in
-+++ b/libmypaint.pc.in
-@@ -1,12 +1,12 @@
--prefix=@prefix@
--exec_prefix=@exec_prefix@
--libdir=@libdir@
--includedir=@includedir@
-+prefix=@CMAKE_INSTALL_PREFIX@
-+exec_prefix=${prefix}
-+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
-
--Name: @PACKAGE_NAME@
--Description: MyPaint's brushstroke rendering library (@LIBMYPAINT_VERSION_FULL@)
--URL: @PACKAGE_URL@
--Version: @LIBMYPAINT_VERSION@
-+Name: @PROJECT_NAME@
-+Description: MyPaint's brushstroke rendering library (@libmypaint_VERSION@)
-+URL: @libmypaint_HOMEPAGE_URL@
-+Version: @libmypaint_VERSION@
- Requires: @PKG_CONFIG_REQUIRES@
- Cflags: -I${includedir}/libmypaint
- Libs: -L${libdir} -lmypaint @OPENMP_CFLAGS@
---
-2.29.2.windows.1
-
diff --git a/3rdparty/ext_mypaint/0003-cmake-library-versioning-info-for-CMake-itself.patch b/3rdparty/ext_mypaint/0003-cmake-library-versioning-info-for-CMake-itself.patch
deleted file mode 100644
index 07e1052989..0000000000
--- a/3rdparty/ext_mypaint/0003-cmake-library-versioning-info-for-CMake-itself.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 4722ec81754db474d185a2d05c77ed7f7eed4e8b Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Tue, 17 Nov 2020 22:57:09 +0000
-Subject: [PATCH 3/5] cmake: library versioning info for CMake itself
-
----
- CMakeLists.txt | 20 +++++++++++++++++++-
- libmypaint-Config.cmake.in | 11 +++++++++++
- 2 files changed, 30 insertions(+), 1 deletion(-)
- create mode 100644 libmypaint-Config.cmake.in
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index afba70b..882e20e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -10,6 +10,7 @@ LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
- find_package(ECM 5.22 REQUIRED NOMODULE)
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
- include(CMakePackageConfigHelpers)
-+include(KDEInstallDirs)
-
- find_package(JsonC)
-
-@@ -63,7 +64,12 @@ set(mypaint_HEADERS
- add_library(mypaint SHARED ${mypaint_SOURCES} ${mypaint_HEADERS})
- target_link_libraries(mypaint ${JSONC_LIBRARIES})
- set_property(TARGET mypaint PROPERTY C_STANDARD 11)
--install(TARGETS mypaint RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
-+install(TARGETS mypaint
-+ EXPORT libmypaintTargets
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib
-+)
- install(FILES ${mypaint_HEADERS} DESTINATION include)
-
- if(JsonC_FOUND)
-@@ -74,3 +80,15 @@ endif()
- configure_file("libmypaint.pc.in" "libmypaint.pc" @ONLY)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmypaint.pc"
- DESTINATION lib/pkgconfig)
-+
-+configure_package_config_file(
-+ "libmypaint-config.cmake.in" "libmypaint-config.cmake"
-+ INSTALL_DESTINATION lib/cmake/libmypaint
-+ PATH_VARS CMAKE_INSTALL_PREFIX CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR)
-+write_basic_package_version_file(libmypaint-config-version.cmake
-+ COMPATIBILITY SameMinorVersion)
-+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmypaint-config-version.cmake"
-+ "${CMAKE_CURRENT_BINARY_DIR}/libmypaint-config.cmake"
-+ DESTINATION lib/cmake/libmypaint)
-+
-+install(EXPORT libmypaintTargets DESTINATION lib/cmake/libmypaint)
-diff --git a/libmypaint-config.cmake.in b/libmypaint-config.cmake.in
-new file mode 100644
-index 0000000..752d388
---- /dev/null
-+++ b/libmypaint-config.cmake.in
-@@ -0,0 +1,11 @@
-+@PACKAGE_INIT@
-+
-+set(libmypaint_VERSION @libmypaint_VERSION@)
-+
-+set_and_check(libmypaint_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@)
-+set_and_check(libmypaint_LIBRARY_DIRS @PACKAGE_CMAKE_INSTALL_LIBDIR@)
-+set_and_check(libmypaint_INCLUDE_DIRS @PACKAGE_CMAKE_INSTALL_INCLUDEDIR@)
-+
-+include("${CMAKE_CURRENT_LIST_DIR}/libmypaintTargets.cmake")
-+
-+set(libmypaint_FOUND TRUE)
---
-2.29.2.windows.1
-
diff --git a/3rdparty/ext_mypaint/0004-cmake-Fix-relative-paths.patch b/3rdparty/ext_mypaint/0004-cmake-Fix-relative-paths.patch
deleted file mode 100644
index 9ffefc4a7b..0000000000
--- a/3rdparty/ext_mypaint/0004-cmake-Fix-relative-paths.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 165c022a9ab7b6dff88f20c576b41e36991e2f99 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Tue, 17 Nov 2020 23:44:44 +0000
-Subject: [PATCH 4/5] cmake: Fix relative paths
-
----
- CMakeLists.txt | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0da19e9..b99f289 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -66,11 +66,11 @@ target_link_libraries(mypaint ${JSONC_LIBRARIES})
- set_property(TARGET mypaint PROPERTY C_STANDARD 11)
- install(TARGETS mypaint
- EXPORT libmypaintTargets
-- RUNTIME DESTINATION bin
-- LIBRARY DESTINATION lib
-- ARCHIVE DESTINATION lib
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- )
--install(FILES ${mypaint_HEADERS} DESTINATION include)
-+install(FILES ${mypaint_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libmypaint)
-
- if(JsonC_FOUND)
- set(PKG_CONFIG_REQUIRES "json-c")
-@@ -79,16 +79,16 @@ else()
- endif()
- configure_file("libmypaint.pc.in" "libmypaint.pc" @ONLY)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmypaint.pc"
-- DESTINATION lib/pkgconfig)
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-
- configure_package_config_file(
- "libmypaint-config.cmake.in" "libmypaint-config.cmake"
-- INSTALL_DESTINATION lib/cmake/libmypaint
-+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libmypaint
- PATH_VARS CMAKE_INSTALL_PREFIX CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR)
- write_basic_package_version_file(libmypaint-config-version.cmake
- COMPATIBILITY SameMinorVersion)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmypaint-config-version.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/libmypaint-config.cmake"
-- DESTINATION lib/cmake/libmypaint)
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libmypaint)
-
--install(EXPORT libmypaintTargets DESTINATION lib/cmake/libmypaint)
-+install(EXPORT libmypaintTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libmypaint)
---
-2.29.2.windows.1
-
diff --git a/3rdparty/ext_mypaint/0005-Export-all-symbols.patch b/3rdparty/ext_mypaint/0005-Export-all-symbols.patch
deleted file mode 100644
index fc01ed4a8f..0000000000
--- a/3rdparty/ext_mypaint/0005-Export-all-symbols.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 6c70f2fba1491b1bedc5c891d3add83b4eac67e3 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sat, 3 Apr 2021 01:45:52 +0000
-Subject: [PATCH 5/5] Export all symbols
-
----
- CMakeLists.txt | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index f6f198c..0890f7c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -63,6 +63,9 @@ set(mypaint_HEADERS
-
- add_library(mypaint SHARED ${mypaint_SOURCES} ${mypaint_HEADERS})
- target_link_libraries(mypaint PRIVATE ${JSONC_LIBRARIES})
-+if(MSVC)
-+ set_property(TARGET mypaint PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)
-+endif()
- set_property(TARGET mypaint PROPERTY C_STANDARD 11)
- install(TARGETS mypaint
- EXPORT libmypaintTargets
---
-2.30.1.windows.1
-
diff --git a/3rdparty/ext_mypaint/CMakeLists.txt b/3rdparty/ext_mypaint/CMakeLists.txt
deleted file mode 100644
index 36ad80e9fc..0000000000
--- a/3rdparty/ext_mypaint/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-SET(PREFIX_ext_mypaint "${EXTPREFIX}" )
-ExternalProject_Add( ext_mypaint
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/mypaint/libmypaint/releases/download/v1.6.1/libmypaint-1.6.1.tar.xz
- URL_HASH SHA256=741754f293f6b7668f941506da07cd7725629a793108bb31633fb6c3eae5315f
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Add-cmake-build-system.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-cmake-library-versioning-info-for-pkg-config.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-cmake-library-versioning-info-for-CMake-itself.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0004-cmake-Fix-relative-paths.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0005-Export-all-symbols.patch
-
- INSTALL_DIR ${PREFIX_ext_mypaint}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_mypaint} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- DEPENDS ext_json_c
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_ninja/CMakeLists.txt b/3rdparty/ext_ninja/CMakeLists.txt
deleted file mode 100644
index 99427eca30..0000000000
--- a/3rdparty/ext_ninja/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-SET(PREFIX_ext_ninja "${EXTPREFIX}" )
-
-if (NOT CMAKE_CROSSCOMPILING OR APPLE)
-ExternalProject_Add(ext_ninja
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME ninja-v1.11.0.tar.gz
- URL https://github.com/ninja-build/ninja/archive/v1.11.0.tar.gz
- URL_HASH SHA256=3c6ba2e66400fe3f1ae83deb4b235faf3137ec20bd5b08c29bfc368db143e4c6
-
- INSTALL_DIR ${PREFIX_ext_ninja}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_ninja} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-else()
- set(_meson_prefix "${PREFIX_ext_ninja}")
- # Ninja needs to be brought manually.
- ExternalProject_Add(ext_ninja
- DOWNLOAD_COMMAND ""
-
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "Installing ninja natively"
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONUSERBASE=${_meson_prefix}
- ${Python_EXECUTABLE} -m pip install --upgrade ninja==1.11.1 --user --ignore-installed --verbose
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${Python_EXECUTABLE} -m pip show -f ninja
-
- UPDATE_COMMAND ""
- )
-endif()
diff --git a/3rdparty/ext_ocio/CMakeLists.txt b/3rdparty/ext_ocio/CMakeLists.txt
deleted file mode 100644
index 0afc73be32..0000000000
--- a/3rdparty/ext_ocio/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-SET(EXTPREFIX_ocio "${EXTPREFIX}" )
-
-ExternalProject_Add(
- ext_ocio
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME OpenColorIO-v2.3.0.tar.gz
- URL https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/refs/tags/v2.3.0.tar.gz
- URL_HASH SHA256=32b7be676c110d849a77886d8a409159f0367309b2b2f5dae5aa0c38f42b445a
-
- INSTALL_DIR ${EXTPREFIX_ocio}
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_ocio} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DOCIO_BUILD_NUKE:BOOL=OFF -DOCIO_BUILD_DOCS:BOOL=OFF -DOCIO_BUILD_TESTS:BOOL=OFF -DOCIO_BUILD_GPU_TESTS:BOOL=OFF -DOCIO_BUILD_PYTHON:BOOL=OFF -DOCIO_INSTALL_EXT_PACKAGES=MISSING -DOCIO_BUILD_APPS=OFF
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_openexr
-)
diff --git a/3rdparty/ext_openexr/CMakeLists.txt b/3rdparty/ext_openexr/CMakeLists.txt
deleted file mode 100644
index d950e6f18d..0000000000
--- a/3rdparty/ext_openexr/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-SET(EXTPREFIX_openexr "${EXTPREFIX}" )
-if (WIN32)
- set(_openexr_dep ${ZLIB_DEP})
-else()
- set(_openexr_dep)
-endif()
-
-ExternalProject_Add( ext_openexr
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME openexr-v2.5.8.tar.gz
- URL https://github.com/AcademySoftwareFoundation/openexr/archive/v2.5.8.tar.gz
- URL_HASH SHA256=db261a7fcc046ec6634e4c5696a2fc2ce8b55f50aac6abe034308f54c8495f55
-
- INSTALL_DIR ${EXTPREFIX_openexr}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_openexr} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DNAMESPACE_VERSIONING=OFF
-
- UPDATE_COMMAND ""
- DEPENDS ${_openexr_dep}
-)
diff --git a/3rdparty/ext_openjpeg/0001-Build-fix-linking-of-executables-on-some-systems-whe.patch b/3rdparty/ext_openjpeg/0001-Build-fix-linking-of-executables-on-some-systems-whe.patch
deleted file mode 100644
index 58444047ee..0000000000
--- a/3rdparty/ext_openjpeg/0001-Build-fix-linking-of-executables-on-some-systems-whe.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 338246278a8e753c36e8319044360eb7a84f6488 Mon Sep 17 00:00:00 2001
-From: Even Rouault <[email protected]>
-Date: Mon, 27 Jun 2022 12:02:57 +0200
-Subject: [PATCH] Build: fix linking of executables on some systems where
- TIFF/LCMS2 static libraries are not in system directories (fixes #1430)
-
-Note that the fix might be partial only for static-only builds (cf
-comments)
-
-Ammends PR #866 and #867
----
- thirdparty/CMakeLists.txt | 22 ++++++++++++++++++----
- 1 file changed, 18 insertions(+), 4 deletions(-)
-
-diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
-index a215d18d..b136fff1 100644
---- a/thirdparty/CMakeLists.txt
-+++ b/thirdparty/CMakeLists.txt
-@@ -89,8 +89,15 @@ else(BUILD_THIRDPARTY)
- message(STATUS "Your system seems to have a TIFF lib available, we will use it")
- set(OPJ_HAVE_TIFF_H 1 PARENT_SCOPE)
- set(OPJ_HAVE_LIBTIFF 1 PARENT_SCOPE)
-- set(TIFF_LIBNAME ${TIFF_LIBRARIES} ${PC_TIFF_STATIC_LIBRARIES} PARENT_SCOPE)
-- set(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} ${PC_TIFF_STATIC_INCLUDE_DIRS} PARENT_SCOPE)
-+ if(BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
-+ # Probably incorrect as PC_TIFF_STATIC_LIBRARIES will lack the path to the libraries
-+ # and will only work if they are in system directories
-+ set(TIFF_LIBNAME ${PC_TIFF_STATIC_LIBRARIES} PARENT_SCOPE)
-+ set(TIFF_INCLUDE_DIRNAME ${PC_TIFF_STATIC_INCLUDE_DIRS} PARENT_SCOPE)
-+ else()
-+ set(TIFF_LIBNAME ${TIFF_LIBRARIES} PARENT_SCOPE)
-+ set(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} PARENT_SCOPE)
-+ endif()
- else(TIFF_FOUND) # not found
- set(OPJ_HAVE_TIFF_H 0 PARENT_SCOPE)
- set(OPJ_HAVE_LIBTIFF 0 PARENT_SCOPE)
-@@ -124,8 +131,15 @@ else(BUILD_THIRDPARTY)
- message(STATUS "Your system seems to have a LCMS2 lib available, we will use it")
- set(OPJ_HAVE_LCMS2_H 1 PARENT_SCOPE)
- set(OPJ_HAVE_LIBLCMS2 1 PARENT_SCOPE)
-- set(LCMS_LIBNAME ${LCMS2_LIBRARIES} ${PC_LCMS2_STATIC_LIBRARIES} PARENT_SCOPE)
-- set(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIRS} ${PC_LCMS2_STATIC_INCLUDE_DIRS} PARENT_SCOPE)
-+ if(BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
-+ # Probably incorrect as PC_LCMS2_STATIC_LIBRARIES will lack the path to the libraries
-+ # and will only work if they are in system directories
-+ set(LCMS_LIBNAME ${PC_LCMS2_STATIC_LIBRARIES} PARENT_SCOPE)
-+ set(LCMS_INCLUDE_DIRNAME ${PC_LCMS2_STATIC_INCLUDE_DIRS} PARENT_SCOPE)
-+ else()
-+ set(LCMS_LIBNAME ${LCMS2_LIBRARIES} PARENT_SCOPE)
-+ set(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIRS} PARENT_SCOPE)
-+ endif()
- else(LCMS2_FOUND) # not found lcms2
- # try to find LCMS
- find_package(LCMS)
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_openjpeg/CMakeLists.txt b/3rdparty/ext_openjpeg/CMakeLists.txt
deleted file mode 100755
index 03c14dd75f..0000000000
--- a/3rdparty/ext_openjpeg/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-SET(PREFIX_ext_openjpeg "${EXTPREFIX}" )
-ExternalProject_Add( ext_openjpeg
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME openjpeg-v2.5.0.tar.gz
- URL https://github.com/uclouvain/openjpeg/archive/v2.5.0.tar.gz
- URL_HASH SHA256=0333806d6adecc6f7a91243b2b839ff4d2053823634d4f6ed7a59bc87409122a
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Build-fix-linking-of-executables-on-some-systems-whe.patch
-
- INSTALL_DIR ${PREFIX_ext_openjpeg}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_openjpeg} -DOPENJPEG_INSTALL_INCLUDE_DIR=include/ -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_PKGCONFIG_FILES=ON ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ext_lcms2
-)
diff --git a/3rdparty/ext_openssl/CMakeLists.txt b/3rdparty/ext_openssl/CMakeLists.txt
deleted file mode 100644
index 8453fe9bc0..0000000000
--- a/3rdparty/ext_openssl/CMakeLists.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-SET(PREFIX_ext_openssl "${EXTPREFIX}" )
-
-if (WIN32)
- if (MSVC)
- # Use the binaries from ConanCenter
- ExternalProject_Add(ext_openssl
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://files.kde.org/krita/build/dependencies/openssl-1.1.1k-win64-msvc.tgz
- URL_HASH SHA256=beae4c78e2f2b64cc3621402a34550ef1fffd08cd35b6a6802f22ed0460ff1d4
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying openssl 64-bit dependencies
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include ${PREFIX_ext_openssl}/include
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/lib/libcrypto.lib ${PREFIX_ext_openssl}/lib
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/lib/libssl.lib ${PREFIX_ext_openssl}/lib
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/libcrypto-1_1-x64.dll ${PREFIX_ext_openssl}/bin
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin/libssl-1_1-x64.dll ${PREFIX_ext_openssl}/bin
- UPDATE_COMMAND ""
- )
- else(MSVC)
- # Use the binaries from curl for Windows (https://github.com/curl/curl-for-win).
- ExternalProject_Add(ext_openssl
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://files.kde.org/krita/build/dependencies/openssl-1.1.1l_4-win64-mingw.zip
- URL_HASH SHA256=6582432d4f537323bfa032a1d91b4eee12efdf0c72e4fabdacc0ac5dd1685e9a
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying openssl 64-bit dependencies
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/include ${PREFIX_ext_openssl}/include
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/lib/libcrypto.dll.a ${PREFIX_ext_openssl}/lib
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/lib/libssl.dll.a ${PREFIX_ext_openssl}/lib
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/libcrypto-1_1-x64.dll ${PREFIX_ext_openssl}/bin
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/libssl-1_1-x64.dll ${PREFIX_ext_openssl}/bin
- UPDATE_COMMAND ""
- )
- endif(MSVC)
-elseif (ANDROID)
- ExternalProject_Add( ext_openssl
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://www.openssl.org/source/openssl-1.1.1m.tar.gz
- URL_HASH SHA256=f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96
-
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env
- ANDROID_NDK_HOME=${CMAKE_ANDROID_NDK}
- ANDROID_NDK=${CMAKE_ANDROID_NDK}
- PATH=${ANDROID_TOOLCHAIN_ROOT}/bin/:$ENV{PATH}
- <SOURCE_DIR>/Configure android-${CMAKE_ANDROID_ARCH} -D__ANDROID_API__=${ANDROID_PLATFORM_LEVEL}
- --prefix=${PREFIX_ext_openssl} --openssldir=ssl
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PATH=${ANDROID_TOOLCHAIN_ROOT}/bin:$ENV{PATH}
- CXXFLAGS=-D__ANDROID_API__=${ANDROID_PLATFORM_LEVEL}
- make build_libs SHLIB_VERSION_NUMBER= SHLIB_EXT=_1_1.so
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PATH=${ANDROID_TOOLCHAIN_ROOT}/bin:$ENV{PATH}
- CXXFLAGS=-D__ANDROID_API__=${ANDROID_PLATFORM_LEVEL}
- make install_sw SHLIB_VERSION_NUMBER= SHLIB_EXT=_1_1.so
-
- INSTALL_DIR ${PREFIX_ext_openssl}
-
- UPDATE_COMMAND ""
-)
-else (WIN32)
-
- kis_ExternalProject_Add_with_separate_builds_apple(
- ext_openssl
-
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://www.openssl.org/source/openssl-1.1.1m.tar.gz
- URL_HASH SHA256=f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96
-
- WORKING_DIRECTORY <SOURCE_DIR>
- CONFIGURE_COMMAND <SOURCE_DIR>/config --prefix=${PREFIX_ext_openssl} --openssldir=ssl
-
- BUILD_COMMAND make clean COMMAND make -j${SUBMAKE_JOBS} depend COMMAND make -j${SUBMAKE_JOBS}
- INSTALL_COMMAND make install
-
- INSTALL_DIR ${PREFIX_ext_openssl}
-
- UPDATE_COMMAND ""
- )
-
-endif (WIN32)
diff --git a/3rdparty/ext_openssl/README-UPDATERS-MSVC.md b/3rdparty/ext_openssl/README-UPDATERS-MSVC.md
deleted file mode 100644
index a7ea4e2265..0000000000
--- a/3rdparty/ext_openssl/README-UPDATERS-MSVC.md
+++ /dev/null
@@ -1,239 +0,0 @@
-Notes on updating OpenSSL
----
-
-The binaries that we use for MSVC were copied from the Conan package manager, the package listing of which is at:
-
-https://conan.io/center/openssl?os=Windows&tab=configuration
-
-For reasons of transparency and reproducibility, I attach the full configuration I used below.
-
-Configuration:
-
- Windows / Any / Visual Studio
-
-The entry in "List of available binary packages":
-
- openssl/1.1.1k:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7
-
-`conanfile.txt`:
-
- [requires]
- openssl/1.1.1k
-
- [options]
- openssl:shared=True
-
- [generators]
- cmake
-
-The configuration above should result in the following lock files:
-
-`conaninfo.txt`:
-
- [settings]
- arch=x86_64
- build_type=Release
- compiler=Visual Studio
- compiler.runtime=MD
- compiler.version=15
- os=Windows
-
- [requires]
- openssl/1.Y.Z
-
- [options]
-
-
- [full_settings]
- arch=x86_64
- arch_build=x86_64
- build_type=Release
- compiler=Visual Studio
- compiler.runtime=MD
- compiler.version=15
- os=Windows
- os_build=Windows
-
- [full_requires]
- openssl/1.1.1k:970e773c5651dc2560f86200a4ea56c23f568ff9
-
- [full_options]
- openssl:386=False
- openssl:capieng_dialog=False
- openssl:enable_capieng=False
- openssl:no_aria=False
- openssl:no_asm=False
- openssl:no_async=False
- openssl:no_bf=False
- openssl:no_blake2=False
- openssl:no_camellia=False
- openssl:no_cast=False
- openssl:no_chacha=False
- openssl:no_cms=False
- openssl:no_comp=False
- openssl:no_ct=False
- openssl:no_deprecated=False
- openssl:no_des=False
- openssl:no_dgram=False
- openssl:no_dh=False
- openssl:no_dsa=False
- openssl:no_dso=False
- openssl:no_engine=False
- openssl:no_filenames=False
- openssl:no_gost=False
- openssl:no_hmac=False
- openssl:no_idea=False
- openssl:no_md4=False
- openssl:no_md5=False
- openssl:no_mdc2=False
- openssl:no_ocsp=False
- openssl:no_pinshared=False
- openssl:no_rc2=False
- openssl:no_rmd160=False
- openssl:no_rsa=False
- openssl:no_sha=False
- openssl:no_sm2=False
- openssl:no_sm3=False
- openssl:no_sm4=False
- openssl:no_srp=False
- openssl:no_srtp=False
- openssl:no_sse2=False
- openssl:no_ssl=False
- openssl:no_threads=False
- openssl:no_ts=False
- openssl:no_whirlpool=False
- openssl:openssldir=None
- openssl:shared=True
-
- [recipe_hash]
-
-
- [env]
-
-
-The associated configuration ("Conan Info") for the hash above is:
-
- [settings]
- arch=x86_64
- build_type=Release
- compiler=Visual Studio
- compiler.runtime=MD
- compiler.version=15
- os=Windows
-
- [requires]
-
-
- [options]
- 386=False
- capieng_dialog=False
- enable_capieng=False
- no_aria=False
- no_asm=False
- no_async=False
- no_bf=False
- no_blake2=False
- no_camellia=False
- no_cast=False
- no_chacha=False
- no_cms=False
- no_comp=False
- no_ct=False
- no_deprecated=False
- no_des=False
- no_dgram=False
- no_dh=False
- no_dsa=False
- no_dso=False
- no_engine=False
- no_filenames=False
- no_gost=False
- no_hmac=False
- no_idea=False
- no_md4=False
- no_md5=False
- no_mdc2=False
- no_ocsp=False
- no_pinshared=False
- no_rc2=False
- no_rmd160=False
- no_rsa=False
- no_sha=False
- no_sm2=False
- no_sm3=False
- no_sm4=False
- no_srp=False
- no_srtp=False
- no_sse2=False
- no_ssl=False
- no_threads=False
- no_ts=False
- no_whirlpool=False
- openssldir=None
- shared=False
-
- [full_settings]
- arch=x86_64
- build_type=Release
- compiler=Visual Studio
- compiler.runtime=MD
- compiler.version=15
- os=Windows
-
- [full_requires]
-
-
- [full_options]
- 386=False
- capieng_dialog=False
- enable_capieng=False
- no_aria=False
- no_asm=False
- no_async=False
- no_bf=False
- no_blake2=False
- no_camellia=False
- no_cast=False
- no_chacha=False
- no_cms=False
- no_comp=False
- no_ct=False
- no_deprecated=False
- no_des=False
- no_dgram=False
- no_dh=False
- no_dsa=False
- no_dso=False
- no_engine=False
- no_filenames=False
- no_gost=False
- no_hmac=False
- no_idea=False
- no_md4=False
- no_md5=False
- no_mdc2=False
- no_ocsp=False
- no_pinshared=False
- no_rc2=False
- no_rmd160=False
- no_rsa=False
- no_sha=False
- no_sm2=False
- no_sm3=False
- no_sm4=False
- no_srp=False
- no_srtp=False
- no_sse2=False
- no_ssl=False
- no_threads=False
- no_ts=False
- no_whirlpool=False
- openssldir=None
- shared=False
-
- [recipe_hash]
- 688f7f1454ac56b46b0276cea3300296
-
- [env]
-
---amyspark, Apr 8, 2021
diff --git a/3rdparty/ext_patch/CMakeLists.txt b/3rdparty/ext_patch/CMakeLists.txt
deleted file mode 100644
index 56231bc5ce..0000000000
--- a/3rdparty/ext_patch/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-SET(PREFIX_ext_patch "${EXTPREFIX}" )
-ExternalProject_Add( ext_patch
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://files.kde.org/krita/build/dependencies/patch-2.5.9-7-bin.zip
- URL_MD5 b9c8b31d62f4b2e4f1887bbb63e8a905
- INSTALL_DIR ${PREFIX_ext_patch}
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo deploying patch.exe binary
- INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${PREFIX_ext_patch}/bin
- COMMAND ${CMAKE_COMMAND} -E copy bin/patch.exe ${PREFIX_ext_patch}/bin/patch.exe
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/patch.exe.manifest ${PREFIX_ext_patch}/bin/patch.exe.manifest
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE 1
-)
diff --git a/3rdparty/ext_patch/patch.exe.manifest b/3rdparty/ext_patch/patch.exe.manifest
deleted file mode 100644
index e60b1b70d6..0000000000
--- a/3rdparty/ext_patch/patch.exe.manifest
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity type="win32" name="patch.exe" version="2.5.9.2670"/>
- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
- <security>
- <requestedPrivileges>
- <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
- </requestedPrivileges>
- </security>
- </trustInfo>
-</assembly>
diff --git a/3rdparty/ext_perl/CMakeLists.txt b/3rdparty/ext_perl/CMakeLists.txt
deleted file mode 100644
index a61a0defe7..0000000000
--- a/3rdparty/ext_perl/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-set(EXTPREFIX_perl "${EXTPREFIX}")
-
-ExternalProject_Add(
- ext_strawberryperl
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- # From https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit-portable.zip
- URL https://files.kde.org/krita/build/dependencies/strawberry-perl-5.32.1.1-32bit-portable.zip
- URL_HASH SHA1=28bca91cadd6651c2b2463db8587c170bf17f2fa
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying Strawberry Perl portable
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${CMAKE_CURRENT_BINARY_DIR}/Strawberry
- ${EXTPREFIX_perl}/Strawberry
- COMMAND ${CMAKE_COMMAND} -E echo "Removing Strawberry Perl pkg-config"
- COMMAND ${CMAKE_COMMAND} -E rm
- ${EXTPREFIX_perl}/Strawberry/perl/bin/pkg-config.bat
- ${EXTPREFIX_perl}/Strawberry/perl/bin/pkg-config
- UPDATE_COMMAND ""
-
- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/Strawberry"
-)
-
-set(USE_STRAWBERRYPERL ON CACHE BOOL "Krita will use its own package of strawberryperl" FORCE)
-set(PERL_EXECUTABLE ${EXTPREFIX}/Strawberry/perl/bin/perl.exe CACHE FILEPATH "Path to our own perl executable" FORCE)
-string(TOLOWER "$ENV{PATH}" _path)
-if (NOT _path MATCHES "strawberry")
- message(FATAL_ERROR "Please add the following directories to PATH: ${EXTPREFIX}\\Strawberry\\perl\\bin")
-else()
- message(STATUS "Perl not found, using Strawberry Perl as a fallback.")
-endif()
diff --git a/3rdparty/ext_pkgconfig/CMakeLists.txt b/3rdparty/ext_pkgconfig/CMakeLists.txt
deleted file mode 100644
index 85123efe97..0000000000
--- a/3rdparty/ext_pkgconfig/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-SET(PREFIX_pkgconfig "${EXTPREFIX}" )
-
-if (NOT WIN32)
-ExternalProject_Add( ext_pkgconfig
- DOWNLOAD_EXTRACT_TIMESTAMP TRUE
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
- URL_MD5 f6e931e319531b736fadc017f470e68a
-
- BUILD_IN_SOURCE 1
-
- CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PREFIX_pkgconfig} ${GLOBAL_AUTOMAKE_PROFILE} --with-internal-glib
-
-)
-else()
-
-ExternalProject_Add( ext_pkgconfig
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://github.com/pkgconf/pkgconf.git
- GIT_TAG pkgconf-1.9.3
-
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
- ${MESON_BINARY_PATH} setup <BINARY_DIR> <SOURCE_DIR>
- --prefix=${PREFIX_pkgconfig}
- --libdir=lib
- -Dbuildtype=$<IF:$<CONFIG:Debug>,debug,debugoptimized>
- -Dtests=false
- ${EXTRA_MESON_FLAGS}
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${MESON_BINARY_PATH} compile -C <BINARY_DIR> -j${SUBMAKE_JOBS}
-
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${MESON_BINARY_PATH} install -C <BINARY_DIR>
-
- UPDATE_COMMAND ""
-
- DEPENDS ${MESON_DEP}
-)
-endif()
diff --git a/3rdparty/ext_png/CMakeLists.txt b/3rdparty/ext_png/CMakeLists.txt
deleted file mode 100644
index d126c814be..0000000000
--- a/3rdparty/ext_png/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-SET(PREFIX_ext_png "${EXTPREFIX}" )
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_png
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://downloads.sourceforge.net/project/libpng/libpng16/1.6.38/libpng-1.6.38.tar.xz
- URL_HASH SHA256=b3683e8b8111ebf6f1ac004ebb6b0c975cd310ec469d98364388e9cedbfa68be
-
- INSTALL_DIR ${PREFIX_ext_png}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_png} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DPNG_TESTS=OFF
-
- UPDATE_COMMAND ""
-
- DEPENDS ${ZLIB_DEP}
-)
diff --git a/3rdparty/ext_poppler/0001-fix_sed_invocation.patch b/3rdparty/ext_poppler/0001-fix_sed_invocation.patch
deleted file mode 100644
index e0dce1a63b..0000000000
--- a/3rdparty/ext_poppler/0001-fix_sed_invocation.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 9e0d0e65261384bde8cb7f1932738bbeb19d3292 Mon Sep 17 00:00:00 2001
-From: Carlo Cabrera <[email protected]>
-Date: Thu, 1 Sep 2022 13:18:39 +0800
-Subject: [PATCH] Fix `sed` invocation.
-
-The current `sed` call works only for GNU sed. We can fix that by using
-the `-e` flag.
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ec36673d7..b85add059 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -542,7 +542,7 @@ if (GPERF AND SED AND RUN_GPERF_IF_PRESENT)
- add_custom_command(OUTPUT poppler/${input}.c
- COMMAND ${GPERF} poppler/${input}.gperf > ${CMAKE_CURRENT_BINARY_DIR}/poppler/${input}.c
- COMMAND ${GPERF} poppler/${input}.gperf > ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c
-- COMMAND ${SED} -i "s#${GPERF}#gperf#" ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c
-+ COMMAND ${SED} -i -e "s#${GPERF}#gperf#" ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c
- COMMAND clang-format -i ${CMAKE_CURRENT_SOURCE_DIR}/poppler/${input}.pregenerated.c || true
- DEPENDS poppler/${input}.gperf
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
---
-GitLab
-
diff --git a/3rdparty/ext_poppler/0001-macos-add-missing-system-header.patch b/3rdparty/ext_poppler/0001-macos-add-missing-system-header.patch
deleted file mode 100644
index 3c61a1cf94..0000000000
--- a/3rdparty/ext_poppler/0001-macos-add-missing-system-header.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 8e1a02ef3b6436522dfa01be6a3c81f372fedc02 Mon Sep 17 00:00:00 2001
-From: Ivan Yossi <[email protected]>
-Date: Fri, 15 Mar 2024 00:09:48 -0600
-Subject: [PATCH] macos add missing system header
-
----
- poppler/ImageEmbeddingUtils.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/poppler/ImageEmbeddingUtils.cc b/poppler/ImageEmbeddingUtils.cc
-index 0c13fe9..c7b90f1 100644
---- a/poppler/ImageEmbeddingUtils.cc
-+++ b/poppler/ImageEmbeddingUtils.cc
-@@ -11,6 +11,7 @@
- //========================================================================
-
- #include <config.h>
-+#include <stdio.h>
-
- #include <memory>
- #ifdef ENABLE_LIBJPEG
---
-2.37.1 (Apple Git-137.1)
-
diff --git a/3rdparty/ext_poppler/CMakeLists.txt b/3rdparty/ext_poppler/CMakeLists.txt
deleted file mode 100644
index 470c004e14..0000000000
--- a/3rdparty/ext_poppler/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-SET(PREFIX_ext_poppler "${EXTPREFIX}" )
-
-ExternalProject_Add( ext_poppler
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://poppler.freedesktop.org/poppler-22.08.0.tar.xz
- URL_HASH SHA256=b493328721402f25cb7523f9cdc2f7d7c59f45ad999bde75c63c90604db0f20b
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-fix_sed_invocation.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-macos-add-missing-system-header.patch
-
- INSTALL_DIR ${PREFIX_ext_poppler}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_poppler} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_GTK_TESTS=OFF -DBUILD_QT5_TESTS=FALSE -DBUILD_CPP_TESTS=FALSE -DENABLE_UTILS=FALSE -DENABLE_GLIB=FALSE -DENABLE_LIBOPENJPEG=none -DWITH_NSS3=OFF -DBUILD_MANUAL_TESTS=OFF
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_freetype ext_fontconfig
-)
diff --git a/3rdparty/ext_pyqt/0001-Fix-Qt-composite-module-lacking-a-platform-tag-on-ma.patch b/3rdparty/ext_pyqt/0001-Fix-Qt-composite-module-lacking-a-platform-tag-on-ma.patch
deleted file mode 100644
index da2faa135d..0000000000
--- a/3rdparty/ext_pyqt/0001-Fix-Qt-composite-module-lacking-a-platform-tag-on-ma.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From aa486a6629eb92694f37b7adcb155f879403ad2a Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Thu, 9 Feb 2023 13:16:11 -0300
-Subject: [PATCH] Fix Qt composite module lacking a platform tag on macOS
-
-Co-authored-by: Ivan Yossi <[email protected]>
----
- project.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/project.py b/project.py
-index 7cd0b31..61aca2a 100644
---- a/project.py
-+++ b/project.py
-@@ -196,6 +196,8 @@ del find_qt
- # Add the composite module.
- if 'Qt' in self.bindings:
- self._add_composite_module(tool)
-+ # Also handle the platform tag for it.
-+ self.bindings['Qt'].tags.append(plattag)
-
- # Always install the uic module.
- installable = Installable('uic', target_subdir='PyQt5')
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_pyqt/0001-Fix-building-pyqt-on-Windows.patch b/3rdparty/ext_pyqt/0001-Fix-building-pyqt-on-Windows.patch
deleted file mode 100644
index 086244e8af..0000000000
--- a/3rdparty/ext_pyqt/0001-Fix-building-pyqt-on-Windows.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 95a19b641810128da9e01768fc0e706266cbca0b Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <[email protected]>
-Date: Fri, 28 Jul 2023 15:25:49 +0200
-Subject: [PATCH] Fix building pyqt on Windows
-
-For some reason, when we write
-
-distinfo.extra = \\?\C:\dev\env-2\i\bin\sip-distinfo --inventory <...>
-
-in PyQt5.pro, then this line is incorrectly converted into Makefile as
-
-\?\C:\dev\env-2\i\bin\sip-distinfo --inventory <...>
-
-That is, the first backslash is lost. This path just workarounds the issue
-by stripping UNC-path that is leaked from argv[0] of sip-build.exe
----
- pyqtbuild/builder.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pyqtbuild/builder.py b/pyqtbuild/builder.py
-index c5dbe04..e922a38 100644
---- a/pyqtbuild/builder.py
-+++ b/pyqtbuild/builder.py
-@@ -63,7 +63,7 @@ class QmakeBuilder(Builder):
- if tool != 'pep517':
- self._sip_distinfo = os.path.join(
- os.path.abspath(os.path.dirname(
-- sys.argv[0]).replace('\\', '/')),
-+ sys.argv[0]).removeprefix('\\\\?\\').replace('\\', '/')),
- self._sip_distinfo)
-
- # Check we have a qmake.
---
-2.38.1.windows.1
-
diff --git a/3rdparty/ext_pyqt/0001-MinGW-Distutils-support-hack.patch b/3rdparty/ext_pyqt/0001-MinGW-Distutils-support-hack.patch
deleted file mode 100644
index 2f3702f83c..0000000000
--- a/3rdparty/ext_pyqt/0001-MinGW-Distutils-support-hack.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From d13bc940f9400305cbd7474f6a74b67d76101e68 Mon Sep 17 00:00:00 2001
-From: Alvin Wong <[email protected]>
-Date: Mon, 24 May 2021 13:25:42 +0000
-Subject: [PATCH] MinGW Distutils support hack
-
----
- setup.py | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/setup.py b/setup.py
-index 18984ce..4852658 100644
---- a/setup.py
-+++ b/setup.py
-@@ -20,6 +20,23 @@
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- # POSSIBILITY OF SUCH DAMAGE.
-
-+from distutils import cygwinccompiler
-+
-+
-+def _get_msvcr_replacement():
-+ # So, the original `get_msvcr` function is supposed to return the name
-+ # of the specific version of MS C runtime so that it can be (?) copied
-+ # over. But we don't really need to do it since we have the packaging
-+ # script to take care of that.
-+ return []
-+
-+
-+if not callable(cygwinccompiler.get_msvcr):
-+ raise RuntimeError(
-+ "distutils.cygwinccompiler.get_msvcr is not a function, which is unexpected")
-+
-+# HACK: Replace the function to apply our hack...
-+cygwinccompiler.get_msvcr = _get_msvcr_replacement
-
- import glob
- import sys
---
-2.31.1.windows.1
-
diff --git a/3rdparty/ext_pyqt/0001-Support-MinGW-and-MSYS-Python-builds.patch b/3rdparty/ext_pyqt/0001-Support-MinGW-and-MSYS-Python-builds.patch
deleted file mode 100644
index a02e2e3b46..0000000000
--- a/3rdparty/ext_pyqt/0001-Support-MinGW-and-MSYS-Python-builds.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 492e19d22d6ed91c22cbf7a7d7798431fd6e40c1 Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Sun, 2 Oct 2022 16:07:12 -0300
-Subject: [PATCH] Support MinGW and MSYS Python builds
-
-Based on
-https://github.com/msys2/MINGW-packages/blame/master/mingw-w64-pyqt-builder/001-mingw-python.patch
-
-Co-authored-by: Mehdi Chinoune <[email protected]>
-Co-authored-by: Alexey Pavlov <[email protected]>
-Co-authored-by: Biswapriyo Nath <[email protected]>
-
-Signed-off-by: L. E. Segovia <[email protected]>
----
- pyqtbuild/builder.py | 27 +++++++++++++++++++++------
- pyqtbuild/project.py | 6 +++++-
- 2 files changed, 26 insertions(+), 7 deletions(-)
-
-diff --git a/pyqtbuild/builder.py b/pyqtbuild/builder.py
-index 3f35a7f..c5dbe04 100644
---- a/pyqtbuild/builder.py
-+++ b/pyqtbuild/builder.py
-@@ -26,6 +26,11 @@ import os
- import sys
- import sysconfig
-
-+try:
-+ from sysconfig import _POSIX_BUILD
-+except:
-+ _POSIX_BUILD = False
-+
- from sipbuild import (Buildable, BuildableModule, Builder, Option, Project,
- PyProjectOptionException, UserException)
-
-@@ -57,7 +62,8 @@ class QmakeBuilder(Builder):
- # be on PATH).
- if tool != 'pep517':
- self._sip_distinfo = os.path.join(
-- os.path.abspath(os.path.dirname(sys.argv[0])),
-+ os.path.abspath(os.path.dirname(
-+ sys.argv[0]).replace('\\', '/')),
- self._sip_distinfo)
-
- # Check we have a qmake.
-@@ -237,8 +243,13 @@ class QmakeBuilder(Builder):
- ['install_' + installable.name
- for installable in project.installables])))
- pro_lines.append('distinfo.extra = {}'.format(' '.join(args)))
-+ if self.project.py_platform == 'win32' and "MSYSTEM" in os.environ:
-+ distinfo_dir = os.popen(
-+ ' '.join(['cygpath', '--unix', target_dir])).readline().strip()
-+ else:
-+ distinfo_dir = target_dir
- pro_lines.append(
-- 'distinfo.path = {}'.format(self.qmake_quote(target_dir)))
-+ 'distinfo.path = {}'.format(self.qmake_quote(distinfo_dir)))
- pro_lines.append('INSTALLS += distinfo')
-
- pro_name = os.path.join(project.build_dir, project.name + '.pro')
-@@ -336,6 +347,8 @@ class QmakeBuilder(Builder):
- if self.project.py_platform == 'win32':
- if 'g++' in self.spec:
- make = 'make'
-+ if self._find_exe(make) is None:
-+ make = 'mingw32-make'
- else:
- make = 'nmake'
- else:
-@@ -462,11 +475,10 @@ macx {
-
- # Python.h on Windows seems to embed the need for pythonXY.lib, so tell
- # it where it is.
-- # TODO: is this still necessary for Python v3.8?
- if not buildable.static:
- pro_lines.extend(['win32 {',
-- ' LIBS += -L{}'.format(
-- self.qmake_quote(project.py_pylib_dir)),
-+ ' LIBS += -L{} -l{}'.format(
-+ self.qmake_quote(project.py_pylib_dir), self.qmake_quote(project.py_pylib_lib)),
- '}'])
-
- # Add any installables from the buildable.
-@@ -497,6 +509,9 @@ macx {
- "Unexpected output from qmake: '{0}'".format(line))
-
- name, value = tokens
-+ if _POSIX_BUILD and "MSYSTEM" in os.environ and value != "":
-+ value = os.popen(
-+ ' '.join(['cygpath', '--unix', value])).readline().strip()
- else:
- name = tokens
- value = None
-@@ -627,7 +642,7 @@ macx {
-
- if install:
- args.append('install')
-- elif project.py_platform != 'win32' and self.jobs:
-+ elif 'make' in args[0] and self.jobs:
- args.append('-j')
- args.append(str(self.jobs))
-
-diff --git a/pyqtbuild/project.py b/pyqtbuild/project.py
-index 8a816ad..5f8fd79 100644
---- a/pyqtbuild/project.py
-+++ b/pyqtbuild/project.py
-@@ -24,6 +24,10 @@
-
- import os
- import sys
-+try:
-+ from sysconfig import _POSIX_BUILD
-+except:
-+ _POSIX_BUILD = False
-
- from sipbuild import Option, Project, UserException
-
-@@ -72,7 +76,7 @@ class PyQtProject(Project):
- # Get the details of the default Python interpreter library. Note that
- # these are actually non-user options but we need the 'link_full_dll'
- # user option in order to set them.
-- if self.py_platform == 'win32':
-+ if self.py_platform == 'win32' and not _POSIX_BUILD:
- pylib_dir = os.path.join(sys.base_prefix, 'libs')
-
- debug_suffix = '_d' if self.py_debug else ''
---
-2.37.1.windows.1
-
diff --git a/3rdparty/ext_pyqt/0001-restrict-sip-version.patch b/3rdparty/ext_pyqt/0001-restrict-sip-version.patch
deleted file mode 100644
index c0f1cab37c..0000000000
--- a/3rdparty/ext_pyqt/0001-restrict-sip-version.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 906e05f3fb14b84fe23bc09b67ec2b624536a168 Mon Sep 17 00:00:00 2001
-From: Ivan Yossi <[email protected]>
-Date: Thu, 7 Dec 2023 01:40:41 -0600
-Subject: [PATCH] restrict sip version
-
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 3c8d47f..feb53ef 100644
---- a/setup.py
-+++ b/setup.py
-@@ -49,7 +49,7 @@ setup(
- version=version,
- license='SIP',
- python_requires='>=3.7',
-- install_requires=['packaging', 'sip >=6.3, <7'],
-+ install_requires=['packaging', 'sip >=6.3, <6.8'],
- packages=find_packages(),
- package_data={
- 'pyqtbuild.bundle': ['dlls/*/*', 'qt_wheel_distinfo/*'],
---
-2.37.1 (Apple Git-137.1)
-
diff --git a/3rdparty/ext_pyqt/CMakeLists.txt b/3rdparty/ext_pyqt/CMakeLists.txt
deleted file mode 100644
index a52106af00..0000000000
--- a/3rdparty/ext_pyqt/CMakeLists.txt
+++ /dev/null
@@ -1,201 +0,0 @@
-SET(PREFIX_ext_pyqt "${EXTPREFIX}" )
-
-if(UNIX)
- if (QT_ENABLE_ASAN)
- set(_extra_pyqt_config --qmake-setting QMAKE_LFLAGS+=-fsanitize=address --qmake-setting QMAKE_CFLAGS+=-fsanitize=address --qmake-setting QMAKE_CXXFLAGS+=-fsanitize=address)
- elseif(APPLE)
- if(MACOS_ARCHS GREATER 1)
- set(_extra_pyqt_config --qmake-setting "QMAKE_APPLE_DEVICE_ARCHS=${CMAKE_OSX_ARCHITECTURES_STR}")
- endif()
- else ()
- unset(_extra_pyqt_config)
- endif ()
-
- ExternalProject_Add(ext_pyqtbuilder
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://pypi.io/packages/source/P/PyQt-builder/PyQt-builder-1.13.0.tar.gz
- URL_HASH SHA256=4877580c38ceb5320e129b381d083b0a8601c68166d8b99707f08fa0a1689eef
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-restrict-sip-version.patch
-
- CONFIGURE_COMMAND ""
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build ${_compiler} -j ${SUBMAKE_JOBS}
-
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --skip-build --prefix=${PREFIX_ext_pyqt} --optimize=1
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
- )
-
- ExternalProject_Add( ext_pyqt5
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://pypi.python.org/packages/source/P/PyQt5/PyQt5-5.15.7.tar.gz
- URL_HASH SHA256=755121a52b3a08cb07275c10ebb96576d36e320e572591db16cfdbc558101594
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-Qt-composite-module-lacking-a-platform-tag-on-ma.patch
-
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${PREFIX_ext_pyqt}/bin/sip-build --confirm-license --no-designer-plugin --no-qml-plugin --no-dbus-python --no-tools --no-make --jobs ${SUBMAKE_JOBS} ${_extra_pyqt_config}
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/build
- make -j${SUBMAKE_JOBS}
-
- # force single-threaded installation to avoid
- # race conditions in post-install .py script
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/build
- make -j1 install
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_sip ext_pyqtbuilder
- )
-
- ExternalProject_Add( ext_pyqt5_sip
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://pypi.python.org/packages/source/P/PyQt5-sip/PyQt5_sip-12.11.0.tar.gz
- URL_HASH SHA256=b4710fd85b57edef716cc55fae45bfd5bfac6fc7ba91036f1dcc3f331ca0eb39
-
- CONFIGURE_COMMAND ""
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build ${_compiler} -j ${SUBMAKE_JOBS}
-
- # Here we need a flat-egg installation, otherwise the egg is deployed
- # inside its own directory in site-packages.
- # So we set as root our 3rdparty layout, and a sufficiently dud prefix.
- # See https://github.com/msys2/MINGW-packages/blob/8a4066591cf1e023971526c55bf2d5fe0c7aa84a/mingw-w64-pyqt5-sip/PKGBUILD
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix "." --root=${PREFIX_ext_pyqt} --optimize=1
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
- )
-
- add_custom_target(ext_pyqt)
- add_dependencies(ext_pyqt ext_pyqt5 ext_pyqt5_sip)
-elseif(WIN32)
- if(MINGW)
- set(_compiler -c mingw32)
- set(_make_command mingw32-make)
- elseif(MSVC)
- set(_compiler -c msvc)
- set(_make_command jom)
- endif()
-
- if (QT_ENABLE_ASAN)
- set(_extra_pyqt_config --qmake-setting QMAKE_LFLAGS+=-fsanitize=address --qmake-setting QMAKE_CFLAGS+=-fsanitize=address --qmake-setting QMAKE_CXXFLAGS+=-fsanitize=address)
- else ()
- unset(_extra_pyqt_config)
- endif ()
-
- krita_to_native_path("${PREFIX_ext_pyqt}" _pyqt_prefix)
- krita_to_native_path("${KRITA_PYTHONPATH}" _krita_pythonpath)
- string(TOLOWER ${_krita_pythonpath} _krita_pythonpath)
- krita_to_native_environment_path_list("${_krita_pythonpath}" _krita_pythonpath)
-
- ExternalProject_Add(ext_pyqtbuilder
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://pypi.io/packages/source/P/PyQt-builder/PyQt-builder-1.13.0.tar.gz
- URL_HASH SHA256=4877580c38ceb5320e129b381d083b0a8601c68166d8b99707f08fa0a1689eef
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Support-MinGW-and-MSYS-Python-builds.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-building-pyqt-on-Windows.patch
-
- CONFIGURE_COMMAND ""
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- SETUPTOOLS_USE_DISTUTILS=local
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build ${_compiler} -j ${SUBMAKE_JOBS}
-
- # HACK: Create lib\site-packages before installing
- # See e.g. https://access.redhat.com/errata/RHBA-2020:4437
- INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${_pyqt_prefix}\\lib\\site-packages
- COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- SETUPTOOLS_USE_DISTUTILS=local
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --skip-build --prefix=${_pyqt_prefix} --optimize=1 --install-scripts=${_pyqt_prefix}\\bin
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
- )
-
- ExternalProject_Add( ext_pyqt5
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://pypi.python.org/packages/source/P/PyQt5/PyQt5-5.15.7.tar.gz
- URL_HASH SHA256=755121a52b3a08cb07275c10ebb96576d36e320e572591db16cfdbc558101594
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Fix-Qt-composite-module-lacking-a-platform-tag-on-ma.patch
-
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${PREFIX_ext_pyqt}/bin/sip-build --confirm-license --no-designer-plugin --no-qml-plugin --no-dbus-python --no-tools --no-make --target-dir ${PREFIX_ext_pyqt}\\lib\\site-packages --jobs ${SUBMAKE_JOBS} ${_extra_pyqt_config}
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/build
- ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${_make_command} -j${SUBMAKE_JOBS}
-
- # force single-threaded installation to avoid
- # race conditions in post-install .py script
- INSTALL_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/build
- ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- ${_make_command} install
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_sip ext_pyqtbuilder
- )
-
- ExternalProject_Add( ext_pyqt5_sip
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://pypi.python.org/packages/source/P/PyQt5-sip/PyQt5_sip-12.11.0.tar.gz
- URL_HASH SHA256=b4710fd85b57edef716cc55fae45bfd5bfac6fc7ba91036f1dcc3f331ca0eb39
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-MinGW-Distutils-support-hack.patch
-
- CONFIGURE_COMMAND ""
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- SETUPTOOLS_USE_DISTUTILS=local
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build ${_compiler} -j ${SUBMAKE_JOBS}
-
- # Here we need a flat-egg installation, otherwise the egg is deployed
- # inside its own directory in site-packages.
- # So we set as root our 3rdparty layout, and a sufficiently dud prefix.
- # See https://github.com/msys2/MINGW-packages/blob/8a4066591cf1e023971526c55bf2d5fe0c7aa84a/mingw-w64-pyqt5-sip/PKGBUILD
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- SETUPTOOLS_USE_DISTUTILS=local
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --skip-build --prefix "." --root=${_pyqt_prefix} --optimize=1 --install-scripts=${_pyqt_prefix}\\bin
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
- )
-
- add_custom_target(ext_pyqt)
- add_dependencies(ext_pyqt ext_pyqt5 ext_pyqt5_sip)
-endif()
-
diff --git a/3rdparty/ext_python/CMakeLists.txt b/3rdparty/ext_python/CMakeLists.txt
deleted file mode 100644
index 55cc3b4956..0000000000
--- a/3rdparty/ext_python/CMakeLists.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-SET(PREFIX_ext_python "${EXTPREFIX}" )
-if (UNIX)
- if (APPLE)
- if(MACOS_ARCHS GREATER 1)
- set(PYTHON_MACOS_CONFIG "--enable-universalsdk" "--with-universal-archs=universal2")
- endif()
- ExternalProject_Add( ext_python
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tar.xz
- URL_MD5 b8094f007b3a835ca3be6bdf8116cccc
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/osx_fixappinstall.diff
-
- # Setuptools needs OpenSSL 1.1, the stock libssl isn't enough
- CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env
- PATH="${PREFIX_ext_python}/lib/Python.framework/Versions/Current/bin:$ENV{PATH}"
- <SOURCE_DIR>/configure MACOSX_DEPLOYMENT_TARGET=10.13 --prefix=${PREFIX_ext_python} ${GLOBAL_AUTOMAKE_PROFILE} --with-openssl=${PREFIX_ext_python}
- --enable-framework=${PREFIX_ext_python}/lib --enable-optimizations --with-suffix=no
- ${PYTHON_MACOS_CONFIG}
-
- # force single-threaded installation to avoid race conditions
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- PATH="${PREFIX_ext_python}/lib/Python.framework/Versions/Current/bin:$ENV{PATH}"
- make -j1 install
-
- UPDATE_COMMAND ""
-
- DEPENDS ext_openssl
- )
- ExternalProject_Add_Step( ext_python create_symlink
- COMMENT "Creating helper symlinks"
- COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_python}/bin/python3 ${PREFIX_ext_python}/bin/python
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/sitecustomize.py ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/lib/python${PYTHON_VERSION}/
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/lib/python${PYTHON_VERSION} ${PREFIX_ext_python}/lib/python${PYTHON_VERSION}
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/include/python${PYTHON_VERSION} ${PREFIX_ext_python}/include/python${PYTHON_VERSION}
- COMMAND ${CMAKE_COMMAND} -E create_symlink ./lib/python${PYTHON_VERSION}/site-packages ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/site-packages
- # CMake FindPythonLib can't find framework libraries, lack of maintainer for Python
- COMMAND find ${PREFIX_ext_python}/lib/Python.framework/Versions/Current/lib -type l -d 1
- | grep -o "[^/]*$"
- | xargs -I FILE ${CMAKE_COMMAND} -E create_symlink ./Python.framework/Python ${PREFIX_ext_python}/lib/FILE
- DEPENDEES install
- )
- ExternalProject_Add_Step( ext_python update_sip
- COMMENT "Updating pip"
- COMMAND COMMAND ${PREFIX_ext_python}/bin/python3 -m pip install --upgrade pip
- DEPENDEES install
- )
- ExternalProject_Add_Step( ext_python update_certifi
- COMMENT "Deploying certifi to our OpenSSL CApath"
- COMMAND ${PREFIX_ext_python}/bin/python3 ${CMAKE_CURRENT_SOURCE_DIR}/install_certificates.py
- DEPENDEES update_sip
- )
-
- else()
-
- ExternalProject_Add( ext_python
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tar.xz
- URL_MD5 b8094f007b3a835ca3be6bdf8116cccc
-
- CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PREFIX_ext_python} ${GLOBAL_AUTOMAKE_PROFILE} --enable-shared
-
- UPDATE_COMMAND ""
- )
-
- ExternalProject_Add_Step( ext_python post_install
- COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_python}/bin/python3 ${PREFIX_ext_python}/bin/python
- DEPENDEES install
- )
- endif()
-elseif(WIN32)
- ExternalProject_Add( ext_python
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://www.python.org/ftp/python/3.10.7/python-3.10.7-embed-amd64.zip
- URL_MD5 7f90f8642c1b19cf02bce91a5f4f9263
-
- INSTALL_DIR ${PREFIX_ext_python}
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ${CMAKE_COMMAND} -E echo deploying python3 64-bit binary
- COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/ ${PREFIX_ext_python}/python
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/python3.dll ${PREFIX_ext_python}/bin
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/python310.dll ${PREFIX_ext_python}/bin
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/vcruntime140.dll ${PREFIX_ext_python}/bin
- COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/vcruntime140_1.dll ${PREFIX_ext_python}/bin
- COMMAND ${CMAKE_COMMAND} -E make_directory ${PREFIX_ext_python}/lib/site-packages/
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/sitecustomize.py ${PREFIX_ext_python}/lib/site-packages/
- UPDATE_COMMAND ""
- )
-endif()
diff --git a/3rdparty/ext_python/_distutils_system_mod.py b/3rdparty/ext_python/_distutils_system_mod.py
deleted file mode 100644
index 00aabb4777..0000000000
--- a/3rdparty/ext_python/_distutils_system_mod.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# SPDX-FileCopyright: 2021 Alvin Wong <[email protected]>
-# SPDX-FileCopyright: 2022 L. E. Segovia <[email protected]>
-# SPDX-License-Ref: GPL-2.0-or-later
-
-# Use the debian/pkgsrc hook to patch the MSVCRT lookup out.
-
-from distutils import cygwinccompiler
-import sys
-
-def _get_msvcr_replacement():
- # So, the original `get_msvcr` function is supposed to return the name
- # of the specific version of MS C runtime so that it can be (?) copied
- # over. But we don't really need to do it since we have he packaging
- # script to take care of that.
- return []
-
-
-if not callable(cygwinccompiler.get_msvcr):
- raise RuntimeError(
- "distutils.cygwinccompiler.get_msvcr is not a function, which is unexpected")
-
-# print("[*] Krita is patching cygwinccompiler.get_msvcr... ({})".format(cygwinccompiler.__file__))
-
-# HACK: Replace the function to apply our hack...
-cygwinccompiler.get_msvcr = _get_msvcr_replacement
-
-# print("[*] Check: {} {}".format(cygwinccompiler.get_msvcr,
-# cygwinccompiler.get_msvcr()))
-
-
-# distutils's cygwinccompiler module contains some very old version checking
-# code that had only been removed upstream recently in [1]. This includes a
-# version check for `ld`. The llvm-mingw toolchain only contains `ld.lld.exe`
-# as an executable but not `ld.exe`, which breaks this check. Here we just
-# monkey patch this check to return some modern version for `ld` to make the
-# check not fail.
-# [1]: https://github.com/pypa/distutils/commit/221a2f2888aa1a48887003c5afa10c1d18ae3a92
-
-_original_get_versions = cygwinccompiler.get_versions
-
-def _get_versions_replacement():
- gcc_ver, ld_ver, dllwrap_ver = _original_get_versions()
- if ld_ver is None:
- ld_ver = "2.37"
- return gcc_ver, ld_ver, dllwrap_ver
-
-if callable(cygwinccompiler.get_versions):
- # print("[*] Krita is patching cygwinccompiler.get_versions... ({})".format(cygwinccompiler.__file__))
- cygwinccompiler.get_versions = _get_versions_replacement
-
-
-# HACK: Override distutils.cygwinccompiler lookup
-# https://github.com/pypa/setuptools/blob/298f5a6368397977ee09cb0b39d5f76aa544b048/setuptools/_distutils/ccompiler.py#L1024
-# print("[*] Freezing distutils.cygwinccompiler module")
-
-sys.modules["distutils.cygwinccompiler"] = cygwinccompiler
diff --git a/3rdparty/ext_python/install_certificates.py b/3rdparty/ext_python/install_certificates.py
deleted file mode 100644
index 5ce0f319c1..0000000000
--- a/3rdparty/ext_python/install_certificates.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# SPDX-FileCopyrightText: 2021 Python Software Foundation
-# SPDX-License-Ref: PSF-2.0 OR 0BSD
-
-# install_certifi.py
-#
-# sample script to install or update a set of default Root Certificates
-# for the ssl module. Uses the certificates provided by the certifi package:
-# https://pypi.org/project/certifi/
-
-import os
-import os.path
-import ssl
-import stat
-import subprocess
-import sys
-
-STAT_0o775 = (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR
- | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP
- | stat.S_IROTH | stat.S_IXOTH)
-
-
-def main():
- openssl_dir, openssl_cafile = os.path.split(
- ssl.get_default_verify_paths().openssl_cafile)
-
- print(" -- pip install --upgrade certifi")
- subprocess.check_call([sys.executable,
- "-E", "-s", "-m", "pip", "install", "--upgrade", "certifi"])
-
- import certifi
-
- # change working directory to the default SSL directory
- os.chdir(openssl_dir)
- relpath_to_certifi_cafile = os.path.relpath(certifi.where())
- print(" -- removing any existing file or link")
- try:
- os.remove(openssl_cafile)
- except FileNotFoundError:
- pass
- print(" -- creating symlink to certifi certificate bundle")
- os.symlink(relpath_to_certifi_cafile, openssl_cafile)
- print(" -- setting permissions")
- os.chmod(openssl_cafile, STAT_0o775)
- print(" -- update complete")
-
-
-if __name__ == '__main__':
- main()
diff --git a/3rdparty/ext_python/osx_fixappinstall.diff b/3rdparty/ext_python/osx_fixappinstall.diff
deleted file mode 100644
index ca82901b03..0000000000
--- a/3rdparty/ext_python/osx_fixappinstall.diff
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/configure b/configure
-index 2a933cd..4dfb4fb 100755
---- a/configure
-+++ b/configure
-@@ -3149,7 +3149,7 @@ if test "${enable_framework+set}" = set; then :
- FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
- FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
- FRAMEWORKPYTHONW="frameworkpythonw"
-- FRAMEWORKINSTALLAPPSPREFIX="/Applications"
-+ FRAMEWORKINSTALLAPPSPREFIX="${prefix}/Applications"
-
- if test "x${prefix}" = "xNONE" ; then
- FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
-@@ -3160,7 +3160,7 @@ if test "${enable_framework+set}" = set; then :
-
- case "${enableval}" in
- /System*)
-- FRAMEWORKINSTALLAPPSPREFIX="/Applications"
-+ FRAMEWORKINSTALLAPPSPREFIX="${prefix}/Applications"
- if test "${prefix}" = "NONE" ; then
- # See below
- FRAMEWORKUNIXTOOLSPREFIX="/usr"
-@@ -3168,13 +3168,13 @@ if test "${enable_framework+set}" = set; then :
- ;;
-
- /Library*)
-- FRAMEWORKINSTALLAPPSPREFIX="/Applications"
-+ FRAMEWORKINSTALLAPPSPREFIX="${prefix}/Applications"
- ;;
-
- */Library/Frameworks)
- MDIR="`dirname "${enableval}"`"
- MDIR="`dirname "${MDIR}"`"
-- FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
-+ FRAMEWORKINSTALLAPPSPREFIX="${MDIR}${prefix}/Applications"
-
- if test "${prefix}" = "NONE"; then
- # User hasn't specified the
-@@ -3188,7 +3188,7 @@ if test "${enable_framework+set}" = set; then :
- ;;
-
- *)
-- FRAMEWORKINSTALLAPPSPREFIX="/Applications"
-+ FRAMEWORKINSTALLAPPSPREFIX="${prefix}/Applications"
- ;;
- esac
-
\ No newline at end of file
diff --git a/3rdparty/ext_python/sitecustomize.py b/3rdparty/ext_python/sitecustomize.py
deleted file mode 100644
index 16a1b577f6..0000000000
--- a/3rdparty/ext_python/sitecustomize.py
+++ /dev/null
@@ -1,11 +0,0 @@
-import os
-import site
-import sysconfig
-
-framework_path = os.path.dirname(os.path.abspath(__file__))
-data_path = sysconfig.get_paths()['data']
-# https://github.com/pypa/setuptools/issues/2165 (windows)
-site.addsitedir(framework_path)
-site.addsitedir(os.path.join(data_path, 'site-packages'))
-site.addsitedir(os.path.join(framework_path,'site-packages'))
-site.addsitedir(os.path.join(framework_path,'site-packages', 'PyQt5'))
diff --git a/3rdparty/ext_qt/CMakeLists.txt b/3rdparty/ext_qt/CMakeLists.txt
deleted file mode 100644
index 1b15f307b9..0000000000
--- a/3rdparty/ext_qt/CMakeLists.txt
+++ /dev/null
@@ -1,255 +0,0 @@
-SET(EXTPREFIX_qt "${EXTPREFIX}")
-
-set(QT_GIT_TAG "6d099d35da4958861ea62e2f54271a1dd8ea7707")
-
-if (MINGW)
- set(QT_BUILD_COMMAND mingw32-make -j${SUBMAKE_JOBS})
- set(QT_INSTALL_COMMAND mingw32-make -j${SUBMAKE_JOBS} install)
-elseif (MSVC)
- set(QT_BUILD_COMMAND jom -j${SUBMAKE_JOBS})
- set(QT_INSTALL_COMMAND jom -j${SUBMAKE_JOBS} install)
-elseif (CMAKE_GENERATOR MATCHES "Makefiles")
- set (QT_BUILD_COMMAND $(MAKE) -j${SUBMAKE_JOBS})
- set (QT_INSTALL_COMMAND $(MAKE) install)
-else()
- set (QT_BUILD_COMMAND make -j${SUBMAKE_JOBS})
- set (QT_INSTALL_COMMAND make install)
-endif()
-
-if (WIN32)
-
- if(MINGW)
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- set(QT_CONFIG_PLATFORM win32-clang-g++)
- else()
- set(QT_CONFIG_PLATFORM win32-g++)
- endif()
- elseif(MSVC)
- ExternalProject_Add(ext_jom
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.qt.io/official_releases/jom/jom_1_1_3.zip
- URL_HASH SHA256=128fdd846fe24f8594eed37d1d8929a0ea78df563537c0c1b1861a635013fff8
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying Jom
- CONFIGURE_COMMAND ""
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/jom.exe ${EXTPREFIX_qt}/bin
-
- UPDATE_COMMAND ""
- )
-
- set(QT_CONFIG_PLATFORM win32-msvc)
- list(APPEND QT_EXTRA_DEPS ext_jom)
- endif(MINGW)
-
- list(APPEND _QT_conf -skip qt3d -skip qtactiveqt -skip qtcanvas3d
- -skip qtconnectivity -skip qtdoc
- -skip qtlocation -skip qtsensors -skip qtserialport -skip qtwayland
- -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview
- -skip qtxmlpatterns -nomake examples -nomake tools
- -no-compile-examples -no-dbus -no-iconv -no-qml-debug
- -no-libproxy -no-system-proxies -icu -no-mtdev
- -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtnetworkauth
- -skip qtpurchasing -skip qtremoteobjects -skip qtscxml -skip qtserialbus
- -skip qtspeech -skip qtvirtualkeyboard -qt-sqlite
- #
- -system-zlib -qt-pcre -qt-libpng -qt-libjpeg -openssl-linked -qt-freetype -qt-harfbuzz
- -I ${EXTPREFIX_qt}/include
- -L ${EXTPREFIX_qt}/lib
- #
- -opensource -confirm-license
- -feature-relocatable
- -no-feature-d3d12
- -no-feature-qdoc
- -no-direct2d
- #
- -release -platform ${QT_CONFIG_PLATFORM} -prefix ${EXTPREFIX_qt}
- QMAKE_LFLAGS_APP+=${SECURITY_EXE_LINKER_FLAGS}
- QMAKE_LFLAGS_SHLIB+=${SECURITY_SHARED_LINKER_FLAGS}
- QMAKE_LFLAGS_SONAME+=${SECURITY_SHARED_LINKER_FLAGS}
- )
- if (MSVC)
- list(APPEND _QT_conf
- QMAKE_CFLAGS+=${SECURITY_C_FLAGS}
- QMAKE_CXXFLAGS+=${SECURITY_CXX_FLAGS}
- )
- endif (MSVC)
-
- if(QT_ENABLE_DEBUG_INFO OR WIN32)
- # Set the option to build Qt with debugging info enabled
- list(APPEND _QT_conf -force-debug-info)
- endif(QT_ENABLE_DEBUG_INFO OR WIN32)
- if (QT_ENABLE_ASAN)
- list(APPEND _QT_conf -sanitize address)
- endif ()
- if (MINGW)
- if (NOT QT_ENABLE_DEBUG_INFO)
- # Generate minimal debug info for backtraces
- list(APPEND _QT_conf
- QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO-=-g
- QMAKE_CFLAGS+=-g1
- QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO-=-g
- QMAKE_CXXFLAGS+=-g1
- )
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- # This is needed for proper C++ function signatures
- list(APPEND _QT_conf
- QMAKE_CFLAGS+=-fdebug-info-for-profiling
- QMAKE_CXXFLAGS+=-fdebug-info-for-profiling
- )
- endif ()
- endif ()
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- # Workaround for DrMingw, see parent CMakeLists.txt
- list(APPEND _QT_conf
- QMAKE_CFLAGS+=-gdwarf-aranges
- QMAKE_CXXFLAGS+=-gdwarf-aranges
- )
- endif ()
- elseif (MSVC)
- if (NOT QT_ENABLE_DEBUG_INFO)
- # Generate minimal debug info for backtraces
- list(APPEND _QT_conf
- QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO-=-Zi
- QMAKE_CFLAGS+=-Zi
- QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO-=-Zi
- QMAKE_CXXFLAGS+=-Zi
- )
- endif ()
- endif ()
- list(APPEND _QT_conf -opengl dynamic)
-
- if (NOT PERL_FOUND) # Implies strawberry perl
- list(APPEND QT_EXTRA_DEPS ext_strawberryperl)
- endif()
-
-
- ExternalProject_Add(
- ext_qt
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://invent.kde.org/szaman/qt5.git
- GIT_TAG ${QT_GIT_TAG}
- GIT_SUBMODULES qtbase qtdeclarative qtimageformats qttools qtsvg qtwinextras qttranslations
- GIT_SUBMODULES_RECURSE false
- GIT_PROGRESS true
- GIT_REMOTE_UPDATE_STRATEGY REBASE
-
- INSTALL_DIR ${EXTPREFIX_qt}
- CONFIGURE_COMMAND <SOURCE_DIR>/configure.bat ${_QT_conf}
-
- BUILD_COMMAND ${QT_BUILD_COMMAND}
-
- INSTALL_COMMAND ${QT_INSTALL_COMMAND}
- UPDATE_COMMAND ""
- # Use a short name to reduce the chance of exceeding path length limit
- SOURCE_DIR s
- BINARY_DIR b
- DEPENDS ext_googleangle ${OPENSSL_DEP} ${QT_EXTRA_DEPS} ${ZLIB_DEP} ext_icu
- )
-elseif (ANDROID)
- ExternalProject_Add(
- ext_qt
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://invent.kde.org/szaman/qt5.git
- GIT_TAG ${QT_GIT_TAG}
- GIT_SUBMODULES qtbase qtdeclarative qtimageformats qttools qtsvg qttranslations qtandroidextras
- GIT_SUBMODULES_RECURSE false
- GIT_PROGRESS true
- GIT_REMOTE_UPDATE_STRATEGY REBASE
-
- # TODO(sh_zam): We can probably skip the skipping now.
- CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -verbose
- -android-sdk ${ANDROID_SDK_ROOT} -android-ndk ${CMAKE_ANDROID_NDK} -android-arch ${ANDROID_ABI}
- -xplatform android-clang -android-ndk-platform android-23
- -make libs -qt-sqlite -openssl-linked OPENSSL_PREFIX=${EXTPREFIX_qt} -system-zlib
- -nomake examples -nomake tests -nomake tools -skip qt3d -skip qtactiveqt -skip qtcanvas3d
- -skip qtconnectivity -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine
- -skip qtwebsockets -skip qtwebview -skip qtserialport -skip qtvirtualkeyboard -skip qtspeech
- -skip qtsensors -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtnetworkauth
- -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtpurchasing -skip qtserialbus
- -icu
- -I ${EXTPREFIX_qt}/include
- -L ${EXTPREFIX_qt}/lib
-
- BUILD_COMMAND ${QT_BUILD_COMMAND}
- INSTALL_COMMAND ${QT_INSTALL_COMMAND}
-
- INSTALL_DIR ${EXTPREFIX_qt}
-
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE 0
-
- DEPENDS ext_openssl ${ZLIB_DEP} ext_icu
-)
-elseif (NOT APPLE)
- if (QT_ENABLE_DEBUG_INFO)
- # Set the option to build Qt with debugging info enabled
- set(QT_DEBUG_OPTIONS -force-debug-info)
- endif()
- if (QT_ENABLE_ASAN)
- list(APPEND _QT_conf -sanitize address)
- endif ()
-
-
- ExternalProject_Add(
- ext_qt
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- GIT_REPOSITORY https://invent.kde.org/szaman/qt5.git
- GIT_TAG ${QT_GIT_TAG}
- GIT_SUBMODULES qtbase qtdeclarative qtimageformats qttools qtsvg qtx11extras qttranslations
- GIT_SUBMODULES_RECURSE false
- GIT_PROGRESS true
- GIT_REMOTE_UPDATE_STRATEGY REBASE
-
- CMAKE_ARGS -DOPENSSL_LIBS='-L${EXTPREFIX_qt}/lib -lssl -lcrypto'
-
- CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -feature-relocatable -openssl-linked -verbose -nomake examples -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtandroidextras -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtnetworkauth -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtpurchasing -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard -qt-sqlite -system-zlib ${QT_DEBUG_OPTIONS}
-
- BUILD_COMMAND ${QT_BUILD_COMMAND}
- INSTALL_COMMAND ${QT_INSTALL_COMMAND}
-
- INSTALL_DIR ${EXTPREFIX_qt}
-
-
- UPDATE_COMMAND ""
- BUILD_IN_SOURCE OFF
- DEPENDS ${ZLIB_DEP}
- )
-else( APPLE )
-
- set(MACOS_QT_CONFIGURE_OPS
- -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtlocation -skip qtsensors -skip qtserialport -skip qtwayland
- -skip qtwebchannel -skip qtwebsockets -skip qtwebview -skip qtwebengine -skip qtxmlpatterns
- -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtnetworkauth
- -skip qtpurchasing -skip qtremoteobjects -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard -nomake examples -nomake tools -no-compile-examples
- -no-dbus -no-iconv -no-qml-debug -no-libproxy -no-system-proxies -icu -no-mtdev -system-zlib -qt-pcre -qt-sqlite
- -opensource -confirm-license -openssl-linked -prefix ${EXTPREFIX_qt}
- )
-
- kis_ExternalProject_Add_macos(
- ext_qt
-
- GIT_REPOSITORY https://invent.kde.org/szaman/qt5.git
- GIT_TAG ${QT_GIT_TAG}
- GIT_SUBMODULES qtbase qtdeclarative qtimageformats qttools qtsvg qtmacextras qttranslations
- GIT_SUBMODULES_RECURSE false
- GIT_PROGRESS true
- GIT_REMOTE_UPDATE_STRATEGY REBASE
-
- WORKING_DIRECTORY <BINARY_DIR>-@ARCH@
-
- CONFIGURE_COMMAND -e "OPENSSL_LIBS=-L${EXTPREFIX_qt}/lib -lssl -lcrypto"
- <SOURCE_DIR>/configure
- ${MACOS_QT_CONFIGURE_OPS}
- -device-option QMAKE_APPLE_DEVICE_ARCHS=@ARCH@
-
- BUILD_COMMAND ${QT_BUILD_COMMAND}
-
- DEPENDS ${ZLIB_DEP} ext_icu ext_openssl
- )
-
- # Qt needs separate builds for universal compilation before qt6
- foreach(ARCH ${CMAKE_OSX_ARCHITECTURES})
- mkdir_build_arch_dir(${ARCH})
- endforeach()
-
-endif()
diff --git a/3rdparty/ext_quazip/CMakeLists.txt b/3rdparty/ext_quazip/CMakeLists.txt
deleted file mode 100644
index bff30eae7b..0000000000
--- a/3rdparty/ext_quazip/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-SET(PREFIX_ext_quazip "${EXTPREFIX}" )
-ExternalProject_Add( ext_quazip
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- DOWNLOAD_NAME quazip-v0.9.1.tar.gz
- URL https://github.com/stachenov/quazip/archive/v0.9.1.tar.gz
- URL_HASH SHA256=5d36b745cb94da440432690050e6db45b99b477cfe9bc3b82fd1a9d36fff95f5
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/liblocation.diff
-
- INSTALL_DIR ${PREFIX_ext_quazip}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_quazip} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
- DEPENDS ${ZLIB_DEP}
-)
-
diff --git a/3rdparty/ext_quazip/liblocation.diff b/3rdparty/ext_quazip/liblocation.diff
deleted file mode 100644
index a690e290da..0000000000
--- a/3rdparty/ext_quazip/liblocation.diff
+++ /dev/null
@@ -1,45 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ed96b33..af4e523 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,6 +1,8 @@
- cmake_minimum_required(VERSION 2.6)
- project(QuaZip)
-
-+include(GNUInstallDirs)
-+
- # CMP0042: Explicitly acknowledge MACOSX_RPATH
- # (introduced in CMake 2.8.12, enabled by default in CMake 3.0,
- # and producing a warning when unset since 3.7.1)
-@@ -45,12 +47,8 @@ endif()
- # Use system zlib on unix and Qt ZLIB on Windows
- find_package(ZLIB REQUIRED)
-
--# All build libraries are moved to this directory
--set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
--
- set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
--set(LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name" FORCE)
--set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig" CACHE STRING "Installation directory for pkgconfig (.pc) files" FORCE)
-+set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE STRING "Installation directory for pkgconfig (.pc) files" FORCE)
- set(QUAZIP_LIB_TARGET_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX} CACHE
- INTERNAL "Target name of libquazip" FORCE)
-
-@@ -62,4 +60,4 @@ if(UNIX AND NOT APPLE)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/quazip.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}")
- endif()
-
--install(FILES QuaZipConfig.cmake DESTINATION ${LIB_DESTINATION}/cmake/QuaZip${QUAZIP_LIB_VERSION_SUFFIX} RENAME QuaZip${QUAZIP_LIB_VERSION_SUFFIX}Config.cmake)
-+install(FILES QuaZipConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake RENAME QuaZip${QUAZIP_LIB_VERSION_SUFFIX}Config.cmake)
-diff --git a/quazip/CMakeLists.txt b/quazip/CMakeLists.txt
-index 1efb5e2..f39d508 100644
---- a/quazip/CMakeLists.txt
-+++ b/quazip/CMakeLists.txt
-@@ -27,5 +27,5 @@ set_target_properties(${QUAZIP_LIB_TARGET_NAME} quazip_static PROPERTIES VERSION
- target_link_libraries(${QUAZIP_LIB_TARGET_NAME} ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES})
- target_link_libraries(quazip_static ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES})
-
--install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip${QUAZIP_LIB_VERSION_SUFFIX})
--install(TARGETS ${QUAZIP_LIB_TARGET_NAME} quazip_static LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION})
-+install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/quazip${QUAZIP_LIB_VERSION_SUFFIX})
-+install(TARGETS ${QUAZIP_LIB_TARGET_NAME} quazip_static)
diff --git a/3rdparty/ext_seexpr/CMakeLists.txt b/3rdparty/ext_seexpr/CMakeLists.txt
deleted file mode 100644
index 8d9da3b3f9..0000000000
--- a/3rdparty/ext_seexpr/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-SET(PREFIX_ext_seexpr "${EXTPREFIX}" )
-ExternalProject_Add(
- ext_seexpr
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.kde.org/stable/kseexpr/4.0.4/kseexpr-4.0.4.0.tar.gz
- URL_MD5 207a7f20fe8995cb0ae90424495a1c67
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_seexpr} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DFLAVOR=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DENABLE_LLVM_BACKEND=OFF -DBUILD_DOC=OFF -DBUILD_TESTS=OFF -DBUILD_UTILS=OFF
-
- UPDATE_COMMAND ""
- DEPENDS ${QT_DEP} ext_extra_cmake_modules ext_ki18n
-)
diff --git a/3rdparty/ext_sip/CMakeLists.txt b/3rdparty/ext_sip/CMakeLists.txt
deleted file mode 100644
index 2d28cc7dcf..0000000000
--- a/3rdparty/ext_sip/CMakeLists.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-SET(PREFIX_ext_sip "${EXTPREFIX}" )
-
-if(UNIX)
- ExternalProject_Add( ext_sip
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://pypi.python.org/packages/source/s/sip/sip-6.6.2.tar.gz
- URL_HASH SHA256=0e3efac1c5dfd8e525ae57140927df26993e13f58b89d1577c314f4105bfd90d
-
- CONFIGURE_COMMAND ""
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build -j ${SUBMAKE_JOBS}
-
- INSTALL_COMMAND ${CMAKE_COMMAND} -E env
- "PYTHONPATH=${KRITA_PYTHONPATH}"
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --skip-build --prefix=${PREFIX_ext_sip} --optimize=1
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
- )
-elseif (WIN32)
- if(MINGW)
- set(_compiler -c mingw32)
- elseif(MSVC)
- set(_compiler -c msvc)
- endif()
-
- krita_to_native_path("${PREFIX_ext_sip}" _sip_prefix)
- krita_to_native_path("${KRITA_PYTHONPATH}" _krita_pythonpath)
- string(TOLOWER ${_krita_pythonpath} _krita_pythonpath)
- krita_to_native_environment_path_list("${_krita_pythonpath}" _krita_pythonpath)
-
- ExternalProject_Add( ext_sip
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://pypi.python.org/packages/source/s/sip/sip-6.6.2.tar.gz
- URL_HASH SHA256=0e3efac1c5dfd8e525ae57140927df26993e13f58b89d1577c314f4105bfd90d
-
- CONFIGURE_COMMAND ""
-
- BUILD_COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- SETUPTOOLS_USE_DISTUTILS=local
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py build -j ${SUBMAKE_JOBS} ${_compiler}
-
- # HACK: Create lib\site-packages before installing
- # See e.g. https://access.redhat.com/errata/RHBA-2020:4437
- INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${_sip_prefix}\\lib\\site-packages
- COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- SETUPTOOLS_USE_DISTUTILS=local
- ${Python_EXECUTABLE} <SOURCE_DIR>/setup.py install --skip-build --prefix=${_sip_prefix} --optimize=1 --install-scripts=${_sip_prefix}\\bin
-
- BUILD_IN_SOURCE 1
-
- UPDATE_COMMAND ""
- )
-
- if (MINGW)
- ExternalProject_Add_Step(ext_sip
- wheel_update_setuptools
- COMMAND ${CMAKE_COMMAND} -E env
- PYTHONPATH=${_krita_pythonpath}
- PYTHONUSERBASE=${_sip_prefix}
- ${Python_EXECUTABLE} -m pip install -U pip setuptools>==59.8.0
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../ext_python/sitecustomize.py ${_sip_prefix}\\lib\\site-packages
-
- DEPENDERS build
- )
- message(STATUS "Using mingw, Will deploy workaround for setuptools.")
- ExternalProject_Add_Step(ext_sip
- distutils_system_mod
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../ext_python/_distutils_system_mod.py ${_sip_prefix}\\lib\\site-packages
-
- DEPENDERS build
- )
- endif()
-endif()
-
diff --git a/3rdparty/ext_sip/README.md b/3rdparty/ext_sip/README.md
deleted file mode 100644
index 1a71ab9ff8..0000000000
--- a/3rdparty/ext_sip/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Notes on SIP
-
-Building
-
-export BUILDROOT=$HOME/dev
-python3 configure.py -b $BUILDROOT/deps/bin -d $BUILDROOT/deps/sip -e $BUILDROOT/deps/include --sipdir $BUILDROOT/deps/sip --target-py-version 3.4
-
diff --git a/3rdparty/ext_tiff/CMakeLists.txt b/3rdparty/ext_tiff/CMakeLists.txt
deleted file mode 100644
index 12c36b9164..0000000000
--- a/3rdparty/ext_tiff/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(EXTPREFIX_tiff "${EXTPREFIX}" )
-ExternalProject_Add( ext_tiff
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://download.osgeo.org/libtiff/tiff-4.4.0.tar.gz
- URL_HASH SHA256=917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed
-
- INSTALL_DIR ${EXTPREFIX_tiff}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_tiff} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_unibreak/0001-Add-CMake-toolchain.patch b/3rdparty/ext_unibreak/0001-Add-CMake-toolchain.patch
deleted file mode 100644
index 3a6120b584..0000000000
--- a/3rdparty/ext_unibreak/0001-Add-CMake-toolchain.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From 9b60a39671bfc8a7b46316337cc60796df4b591e Mon Sep 17 00:00:00 2001
-From: "L. E. Segovia" <[email protected]>
-Date: Wed, 22 Jun 2022 21:11:51 -0300
-Subject: [PATCH] Add CMake toolchain
-
----
- CMakeLists.txt | 71 +++++++++++++++++++++++++++++++++++++++++++
- cmake/PkgConfig.cmake | 46 ++++++++++++++++++++++++++++
- 2 files changed, 117 insertions(+)
- create mode 100644 CMakeLists.txt
- create mode 100644 cmake/PkgConfig.cmake
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 0000000..b1f769c
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,71 @@
-+# SPDX-FileCopyrightText: 2022 Microsoft Corporation
-+# SPDX-FileCopyrightText: 2022 L. E. Segovia <[email protected]>
-+# SPDX-License-Ref: MIT
-+
-+cmake_minimum_required(VERSION 3.8.0)
-+
-+project(libunibreak VERSION 5.0 LANGUAGES C)
-+
-+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
-+
-+include(GNUInstallDirs)
-+
-+set(libunibreak_srcs
-+ src/linebreak.c
-+ src/linebreakdata.c
-+ src/linebreakdef.c
-+ src/wordbreak.c
-+ src/wordbreakdata.c
-+ src/graphemebreak.c
-+ src/graphemebreakdata.c
-+ src/emojidef.c
-+ src/unibreakbase.c
-+ src/unibreakdef.c
-+)
-+
-+include_directories(src)
-+
-+add_library(unibreak STATIC ${libunibreak_srcs})
-+
-+set_target_properties(unibreak PROPERTIES POSITION_INDEPENDENT_CODE ON)
-+
-+include(PkgConfig)
-+
-+install(
-+ TARGETS unibreak
-+ EXPORT libunibreak
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+)
-+
-+if(NOT DISABLE_INSTALL_HEADERS)
-+ install(
-+ FILES
-+ src/emojidef.h
-+ src/graphemebreak.h
-+ src/graphemebreakdef.h
-+ src/linebreak.h
-+ src/linebreakdef.h
-+ src/test_skips.h
-+ src/unibreakbase.h
-+ src/unibreakdef.h
-+ src/wordbreak.h
-+ src/wordbreakdef.h
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
-+ )
-+endif()
-+
-+install(EXPORT libunibreak
-+ NAMESPACE libunibreak::
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unibreak
-+)
-+
-+include(CMakePackageConfigHelpers)
-+write_basic_package_version_file(
-+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
-+ VERSION ${PACKAGE_VERSION}
-+ COMPATIBILITY AnyNewerVersion)
-+
-+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unibreak)
-diff --git a/cmake/PkgConfig.cmake b/cmake/PkgConfig.cmake
-new file mode 100644
-index 0000000..1021d79
---- /dev/null
-+++ b/cmake/PkgConfig.cmake
-@@ -0,0 +1,46 @@
-+# pkg-config support
-+#
-+# Copyright © 2015 Open Microscopy Environment / University of Dundee
-+# Copyright © 2021 Roger Leigh <[email protected]>
-+# Copyright © 2022 L. E. Segovia <[email protected]>
-+# Written by Roger Leigh <[email protected]>
-+#
-+# Permission to use, copy, modify, distribute, and sell this software and
-+# its documentation for any purpose is hereby granted without fee, provided
-+# that (i) the above copyright notices and this permission notice appear in
-+# all copies of the software and related documentation, and (ii) the names of
-+# Sam Leffler and Silicon Graphics may not be used in any advertising or
-+# publicity relating to the software without the specific, prior written
-+# permission of Sam Leffler and Silicon Graphics.
-+#
-+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-+#
-+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
-+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-+# OF THIS SOFTWARE.
-+
-+# Generate pkg-config file
-+set(prefix "${CMAKE_INSTALL_PREFIX}")
-+set(exec_prefix "\${prefix}")
-+if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
-+ set(libdir "${CMAKE_INSTALL_LIBDIR}")
-+else()
-+ set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
-+endif()
-+if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
-+ set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
-+else()
-+ set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
-+endif()
-+set(VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
-+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libunibreak.pc.in
-+ ${CMAKE_CURRENT_BINARY_DIR}/libunibreak.pc @ONLY)
-+
-+# Install pkg-config file
-+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libunibreak.pc
-+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
---
-2.37.3
-
diff --git a/3rdparty/ext_unibreak/CMakeLists.txt b/3rdparty/ext_unibreak/CMakeLists.txt
deleted file mode 100644
index 6439e2d6b6..0000000000
--- a/3rdparty/ext_unibreak/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-SET(EXTPREFIX_unibreak "${EXTPREFIX}" )
-
-ExternalProject_Add(
- ext_unibreak
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/adah1972/libunibreak/releases/download/libunibreak_5_0/libunibreak-5.0.tar.gz
- URL_HASH SHA256=58f2fe4f9d9fc8277eb324075ba603479fa847a99a4b134ccb305ca42adf7158
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Add-CMake-toolchain.patch
- INSTALL_DIR ${EXTPREFIX_unibreak}
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_unibreak} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_webp/0003-fix-tool-dependencies.patch b/3rdparty/ext_webp/0003-fix-tool-dependencies.patch
deleted file mode 100644
index 63fb5afde1..0000000000
--- a/3rdparty/ext_webp/0003-fix-tool-dependencies.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 77a0f85..4a84ed1 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -410,6 +410,8 @@ endif()
-
- # Build the executables if asked for.
- if(WEBP_BUILD_ANIM_UTILS
-+ OR WEBP_BUILD_WEBPINFO
-+ OR WEBP_BUILD_WEBPMUX
- OR WEBP_BUILD_CWEBP
- OR WEBP_BUILD_DWEBP
- OR WEBP_BUILD_GIF2WEBP
diff --git a/3rdparty/ext_webp/0007-fix-arm-build.patch b/3rdparty/ext_webp/0007-fix-arm-build.patch
deleted file mode 100644
index 909b7c2930..0000000000
--- a/3rdparty/ext_webp/0007-fix-arm-build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake
-index bc0dbc9..381f64a 100644
---- a/cmake/cpu.cmake
-+++ b/cmake/cpu.cmake
-@@ -97,7 +97,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
- set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
- webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD})
- else()
-- if(MSVC AND SIMD_ENABLE_FLAGS)
-+ if(MSVC AND SIMD_ENABLE_FLAGS AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "^ARM"))
- # The detection for SSE2/SSE4 support under MSVC is based on the compiler
- # version so e.g., clang-cl will require flags to enable the assembly.
- list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
diff --git a/3rdparty/ext_webp/0008-sdl.patch b/3rdparty/ext_webp/0008-sdl.patch
deleted file mode 100644
index b156af0366..0000000000
--- a/3rdparty/ext_webp/0008-sdl.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 91a4ba8..10a3f4d 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -624,11 +624,12 @@ endif()
-
- if(WEBP_BUILD_WEBP_JS)
- # wasm2js does not support SIMD.
-+ find_package(SDL REQUIRED)
- if(NOT WEBP_ENABLE_SIMD)
- # JavaScript version
- add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
-- target_link_libraries(webp_js webpdecoder SDL)
-- target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-+ target_link_libraries(webp_js webpdecoder ${SDL_LIBRARY})
-+ target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR})
- set(WEBP_HAVE_SDL 1)
- set_target_properties(
- webp_js
-@@ -641,14 +642,14 @@ if(WEBP_BUILD_WEBP_JS)
-
- # WASM version
- add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
-- target_link_libraries(webp_wasm webpdecoder SDL)
-- target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-+ target_link_libraries(webp_wasm webpdecoder ${SDL_LIBRARY})
-+ target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR})
- set_target_properties(
- webp_wasm
- PROPERTIES LINK_FLAGS "-sWASM=1 ${emscripten_stack_size} \
- -sEXPORTED_FUNCTIONS=_WebPToSDL -sINVOKE_RUN=0 \
- -sEXPORTED_RUNTIME_METHODS=cwrap")
-- target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
-+ target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H)
-
- target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN)
- endif()
diff --git a/3rdparty/ext_webp/CMakeLists.txt b/3rdparty/ext_webp/CMakeLists.txt
deleted file mode 100644
index 84b50bcd44..0000000000
--- a/3rdparty/ext_webp/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-SET(EXTPREFIX_webp "${EXTPREFIX}" )
-
-kis_ExternalProject_Add_with_separate_builds_apple(
- ext_webp
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.3.2.tar.gz
- URL_HASH SHA256=2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-fix-tool-dependencies.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0007-fix-arm-build.patch
- COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0008-sdl.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_webp} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} -DBUILD_SHARED_LIBS=ON ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_xsimd/CMakeLists.txt b/3rdparty/ext_xsimd/CMakeLists.txt
deleted file mode 100644
index 1371a16001..0000000000
--- a/3rdparty/ext_xsimd/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-SET(EXTPREFIX_xsimd "${EXTPREFIX}" )
-
-ExternalProject_Add( ext_xsimd
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
-
-# Update to xsimd 11.1.0 after releasing Krita 5.2.0
-# URL https://github.com/xtensor-stack/xsimd/archive/refs/tags/11.1.0.tar.gz
-# URL_HASH SHA256=aa54dba8daade472656eba0d27154f072fec06ee3831aefcac69a5f6c7dbbae7
-
- URL https://github.com/xtensor-stack/xsimd/archive/5647254635ea6f590b7366e0848a8a0ab3007efa.tar.gz
- URL_HASH SHA256=5b175c8b671d4287343b0e79e9e3a8070992815f5e0ed44bfc9bce01f8880814
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_xsimd} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
diff --git a/3rdparty/ext_zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch b/3rdparty/ext_zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
deleted file mode 100644
index c73727c0eb..0000000000
--- a/3rdparty/ext_zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/zconf.h.cmakein b/zconf.h.cmakein
-index a7f24cc..a1b359b 100644
---- a/zconf.h.cmakein
-+++ b/zconf.h.cmakein
-@@ -434,11 +434,19 @@ typedef uLong FAR uLongf;
- #endif
-
- #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
--# define Z_HAVE_UNISTD_H
-+# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1
-+# define Z_HAVE_UNISTD_H
-+# elif HAVE_UNISTD_H != 0
-+# define Z_HAVE_UNISTD_H
-+# endif
- #endif
-
- #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
--# define Z_HAVE_STDARG_H
-+# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1
-+# define Z_HAVE_STDARG_H
-+# elif HAVE_STDARG_H != 0
-+# define Z_HAVE_STDARG_H
-+# endif
- #endif
-
- #ifdef STDC
-diff --git a/zconf.h.in b/zconf.h.in
-index 5e1d68a..32f53c8 100644
---- a/zconf.h.in
-+++ b/zconf.h.in
-@@ -432,11 +432,19 @@ typedef uLong FAR uLongf;
- #endif
-
- #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
--# define Z_HAVE_UNISTD_H
-+# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1
-+# define Z_HAVE_UNISTD_H
-+# elif HAVE_UNISTD_H != 0
-+# define Z_HAVE_UNISTD_H
-+# endif
- #endif
-
- #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
--# define Z_HAVE_STDARG_H
-+# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1
-+# define Z_HAVE_STDARG_H
-+# elif HAVE_STDARG_H != 0
-+# define Z_HAVE_STDARG_H
-+# endif
- #endif
-
- #ifdef STDC
diff --git a/3rdparty/ext_zlib/CMakeLists.txt b/3rdparty/ext_zlib/CMakeLists.txt
deleted file mode 100644
index b59f786d90..0000000000
--- a/3rdparty/ext_zlib/CMakeLists.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-SET(PREFIX_ext_zlib "${EXTPREFIX}" )
-if (NOT APPLE)
-ExternalProject_Add(
- ext_zlib
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz
- URL_HASH SHA1=55eaa84906f31ac20d725aa26cd20839196b6ba6
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_zlib} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-
-if(WIN32)
- # Workaround for zlib's library naming bug:
- # https://github.com/madler/zlib/issues/652
- if (MINGW)
- ExternalProject_Add_Step(
- ext_zlib
- post_install
- COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_zlib}/lib/libzlib.dll.a ${PREFIX_ext_zlib}/lib/libz.dll.a
- DEPENDEES install
- )
- elseif(MSVC)
- ExternalProject_Add_Step(
- ext_zlib
- post_install
- COMMAND ${CMAKE_COMMAND} -E copy ${PREFIX_ext_zlib}/lib/zlib.lib ${PREFIX_ext_zlib}/lib/z.lib
- DEPENDEES install
- )
- endif()
-endif()
-
-else()
-ExternalProject_Add(
- ext_zlib
- DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz
- URL_HASH SHA1=55eaa84906f31ac20d725aa26cd20839196b6ba6
-
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_zlib} ${GLOBAL_PROFILE}
-
- UPDATE_COMMAND ""
-)
-endif()
diff --git a/3rdparty/meson-compiler.ini.in b/3rdparty/meson-compiler.ini.in
deleted file mode 100644
index 4fe990fcc2..0000000000
--- a/3rdparty/meson-compiler.ini.in
+++ /dev/null
@@ -1,26 +0,0 @@
-[constants]
-common_args = ['-I@CMAKE_PREFIX_PATH@/include']
-common_link_args = ['-L@CMAKE_PREFIX_PATH@/lib']
-cross_compile_args = @_cross_compile_flags@
-cross_link_args = @_cross_linker_flags@
-security_linker_flags = @_security_exe_linker_flags@
-
-[binaries]
-c = ['@CMAKE_C_COMPILER@'] + cross_compile_args
-cpp = ['@CMAKE_CXX_COMPILER@'] + cross_compile_args
-ar = '@CMAKE_AR@'
-strip = '@CMAKE_STRIP@'
-pkgconfig = '@PKG_CONFIG_EXECUTABLE@'
-nasm = '@MESON_NASM_PATH@'
-@_c_ld@
-@_cpp_ld@
-
-[properties]
-c_args = common_args + @_security_c_flags@
-cpp_args = common_args + @_security_cxx_flags@
-c_link_args = common_link_args + cross_link_args + security_linker_flags
-cpp_link_args = common_link_args + cross_link_args + security_linker_flags
-@_pkg_config_libdir@
-
-[built-in options]
-pkg_config_path = '@EXTPREFIX@/share/pkgconfig,@EXTPREFIX@/lib/pkgconfig,@EXTPREFIX@/lib64/pkgconfig'
diff --git a/3rdparty/meson-host.ini.in b/3rdparty/meson-host.ini.in
deleted file mode 100644
index 1132a6f962..0000000000
--- a/3rdparty/meson-host.ini.in
+++ /dev/null
@@ -1,5 +0,0 @@
-[host_machine]
-system = '@_system_name@'
-cpu_family = '@MESON_CPU_FAMILY@'
-cpu = '@CMAKE_SYSTEM_PROCESSOR@'
-endian = '@_endian@'
diff --git a/3rdparty/tools/macos_consolidate.sh b/3rdparty/tools/macos_consolidate.sh
deleted file mode 100755
index a3d30bf1b0..0000000000
--- a/3rdparty/tools/macos_consolidate.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env zsh
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-#
-
-# creates a universal tar build from build-x86_64 and build-arm64
-# First argument is <root_dir> where build dirs reside.
-
-consolidate_universal_binaries () {
- # echo "dirs ${DIR_X86} :: ${DIR_UNI}"
- for f in "${@}"; do
- # Only try to consolidate Mach-O and static libs
- if [[ -n $(file "${f}" | grep "Mach-O") || "${f:(-2)}" = ".a" ]]; then
- # echo "${BUILDROOT}/${DEPBUILD_X86_64_DIR}/${f##*test-i/}"
- LIPO_OUTPUT=$(lipo -info "${f}" | grep Non-fat 2> /dev/null)
- if [[ -n ${LIPO_OUTPUT} ]]; then
- if [[ -f "${DIR_X86}/${f##*${DIR_UNI}/}" ]]; then
- echo "creating universal binary -- ${f##*${DIR_UNI}/}"
- lipo -create "${f}" "${DIR_X86}/${f##*${DIR_UNI}/}" -output "${f}"
- fi
- fi
- # log "ignoring ${f}"
- fi
- done
-}
-
-consolidate_build_dirs() {
- DIR_X86=${1}
- local DIR_ARM=${2}
- local DIR_UNI=${3}
-
- rsync -aq ${DIR_ARM}/ ${DIR_UNI}
- consolidate_universal_binaries $(find "${DIR_UNI}" -type f)
-}
-
-if [[ ${#@} < 1 ]]; then
- echo "script needs root_dir of builds to consolidate as input"
- exit
-fi
-
-root_dir=${1}
-
-if [[ ! -d ${root_dir} ]]; then
- echo "provided path is not a directory"
- echo "path: ${root_dir}"
-fi
-
-dir_x86="${root_dir}/build-x86_64"
-dir_arm="${root_dir}/build-arm64"
-dir_uni="${root_dir}/build_uni"
-
-
-if [[ -d "${dir_x86}" && -d "${dir_arm}" ]]; then
- consolidate_build_dirs "${dir_x86}" "${dir_arm}" "${dir_uni}"
-else
- if [[ -d "${dir_x86}" ]]; then
- rsync -aq "${dir_x86}/" "${dir_uni}"
- else
- rsync -aq "${dir_arm}/" "${dir_uni}"
- fi
-fi
-
-# from https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html
-build_tar=package_build_fat.tar.gz
-
-cd "${dir_uni}"
-find . '(' -type f -o -type l ')' -print > ../files.lst
-tar zcvf "${build_tar}" --files-from "../files.lst"
-mv ${build_tar} ../
-
-echo "consolidate end"
\ No newline at end of file