diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index 8fa83fae..a436656b 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -124,7 +124,9 @@ def targets(): YasmTarget(), # Tools without binaries stored in the repo, can be outdated + BisonTarget(), GlslangTarget(), + GraphvizTarget(), P7ZipTarget(), PbzxTarget(), QPakManTarget(), diff --git a/aedi/target/base.py b/aedi/target/base.py index e70ed669..328ce472 100644 --- a/aedi/target/base.py +++ b/aedi/target/base.py @@ -467,10 +467,10 @@ class CMakeStaticDependencyTarget(CMakeTarget): def post_build(self, state: BuildState): self.install(state) - def keep_module_target(self, state: BuildState, target: str): + def keep_module_target(self, state: BuildState, target: str, module_paths: typing.Sequence[Path] = ()): import_patterns = ( - r'list\s*\(APPEND\s+_cmake_import_check_targets\s+(?P\w+::[\w-]+)[\s)]', - r'list\s*\(APPEND\s+_cmake_import_check_files_for_(?P\w+::[\w-]+)\s', + r'list\s*\(APPEND\s+_cmake_import_check_targets\s+(?P[\w:-]+)[\s)]', + r'list\s*\(APPEND\s+_cmake_import_check_files_for_(?P[\w:-]+)\s', ) import_regexes = [re.compile(regex, re.IGNORECASE) for regex in import_patterns] @@ -483,12 +483,19 @@ class CMakeStaticDependencyTarget(CMakeTarget): return line - module = 'targets-release.cmake' + probe_modules = False - for probe_module in (module, self.name + module): - module_path = state.install_path / 'lib' / 'cmake' / self.name / probe_module + if not module_paths: + default_modules_path = state.install_path / 'lib' / 'cmake' / self.name + default_module_name = 'targets-release.cmake' + module_paths = ( + default_modules_path / default_module_name, + default_modules_path / (self.name + default_module_name) + ) + probe_modules = True - if module_path.exists(): + for module_path in module_paths: + if not probe_modules or module_path.exists(): self.update_text_file(module_path, _keep_target) diff --git a/aedi/target/library_tier1.py b/aedi/target/library_tier1.py index 12347f90..48f89c68 100644 --- a/aedi/target/library_tier1.py +++ b/aedi/target/library_tier1.py @@ -83,8 +83,8 @@ class FlacTarget(base.CMakeStaticDependencyTarget): def prepare_source(self, state: BuildState): state.download_source( - 'https://github.com/xiph/flac/releases/download/1.4.2/flac-1.4.2.tar.xz', - 'e322d58a1f48d23d9dd38f432672865f6f79e73a6f9cc5a5f57fcaa83eb5a8e4') + 'https://github.com/xiph/flac/releases/download/1.4.3/flac-1.4.3.tar.xz', + '6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70') def configure(self, state: BuildState): opts = state.options @@ -197,8 +197,8 @@ class JpegTurboTarget(base.CMakeStaticDependencyTarget): def prepare_source(self, state: BuildState): state.download_source( - 'https://downloads.sourceforge.net/project/libjpeg-turbo/2.1.5.1/libjpeg-turbo-2.1.5.1.tar.gz', - '2fdc3feb6e9deb17adec9bafa3321419aa19f8f4e5dea7bf8486844ca22207bf') + 'https://downloads.sourceforge.net/project/libjpeg-turbo/3.0.0/libjpeg-turbo-3.0.0.tar.gz', + 'c77c65fcce3d33417b2e90432e7a0eb05f59a7fff884022a9d931775d583bfaa') def configure(self, state: BuildState): opts = state.options @@ -485,16 +485,19 @@ class ZlibNgTarget(base.CMakeStaticDependencyTarget): def prepare_source(self, state: BuildState): state.download_source( - 'https://github.com/zlib-ng/zlib-ng/archive/2.0.7.tar.gz', - '6c0853bb27738b811f2b4d4af095323c3d5ce36ceed6b50e5f773204fb8f7200') + 'https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.3.tar.gz', + 'd20e55f89d71991c59f1c5ad1ef944815e5850526c0d9cd8e504eaed5b24491a') def detect(self, state: BuildState) -> bool: return state.has_source_file('zlib-ng.h') def configure(self, state: BuildState): opts = state.options + opts['WITH_GTEST'] = 'NO' + opts['WITH_SANITIZER'] = 'NO' opts['ZLIB_COMPAT'] = 'YES' opts['ZLIB_ENABLE_TESTS'] = 'NO' + opts['ZLIBNG_ENABLE_TESTS'] = 'NO' super().configure(state) diff --git a/aedi/target/library_tier2.py b/aedi/target/library_tier2.py index 1b9b871b..ab091cba 100644 --- a/aedi/target/library_tier2.py +++ b/aedi/target/library_tier2.py @@ -54,8 +54,8 @@ class FluidSynthTarget(base.CMakeStaticDependencyTarget): def prepare_source(self, state: BuildState): state.download_source( - 'https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.2.tar.gz', - 'cd610810f30566e28fb98c36501f00446a06fa6bae3dc562c8cd3868fe1c0fc7') + 'https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.3.tar.gz', + '321f7d3f72206b2522f30a1cb8ad1936fd4533ffc4d29dd335b1953c9fb371e6') def configure(self, state: BuildState): opts = state.options @@ -67,7 +67,7 @@ class FluidSynthTarget(base.CMakeStaticDependencyTarget): super().configure(state) def post_build(self, state: BuildState): - super().prepare_source(state) + super().post_build(state) self.keep_module_target(state, 'FluidSynth::libfluidsynth') @@ -287,8 +287,8 @@ class Sdl2Target(base.CMakeStaticDependencyTarget): def prepare_source(self, state: BuildState): state.download_source( - 'https://github.com/libsdl-org/SDL/releases/download/release-2.26.5/SDL2-2.26.5.tar.gz', - 'ad8fea3da1be64c83c45b1d363a6b4ba8fd60f5bde3b23ec73855709ec5eabf7', + 'https://github.com/libsdl-org/SDL/releases/download/release-2.28.1/SDL2-2.28.1.tar.gz', + '4977ceba5c0054dbe6c2f114641aced43ce3bf2b41ea64b6a372d6ba129cb15d', patches='sdl2-no-gamecontroller+corehaptic') def configure(self, state: BuildState): diff --git a/aedi/target/tool_tier2.py b/aedi/target/tool_tier2.py index 2a875dda..c1c5849e 100644 --- a/aedi/target/tool_tier2.py +++ b/aedi/target/tool_tier2.py @@ -23,6 +23,23 @@ from ..state import BuildState from . import base +class BisonTarget(base.ConfigureMakeStaticDependencyTarget): + def __init__(self, name='bison'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz', + '9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2') + + def detect(self, state: BuildState) -> bool: + return state.has_source_file('doc/bison.1') + + def configure(self, state: BuildState): + state.options['--enable-relocatable'] = None + super().configure(state) + + class GlslangTarget(base.CMakeStaticDependencyTarget): # Build with --os-version-x64=10.15 command line option @@ -31,8 +48,8 @@ class GlslangTarget(base.CMakeStaticDependencyTarget): def prepare_source(self, state: BuildState): state.download_source( - 'https://github.com/KhronosGroup/glslang/archive/refs/tags/12.2.0.tar.gz', - '870d17030fda7308c1521fb2e01a9e93cbe4b130bc8274e90d00e127432ab6f6') + 'https://github.com/KhronosGroup/glslang/archive/refs/tags/12.3.1.tar.gz', + 'a57836a583b3044087ac51bb0d5d2d803ff84591d55f89087fc29ace42a8b9a8') def configure(self, state: BuildState): args = ('python3', 'update_glslang_sources.py') @@ -43,6 +60,37 @@ class GlslangTarget(base.CMakeStaticDependencyTarget): super().configure(state) + def post_build(self, state: BuildState): + super().post_build(state) + + # Remove shared library + lib_path = state.install_path / 'lib' + os.unlink(lib_path / 'libSPIRV-Tools-shared.dylib') + + lib_cmake_path = lib_path / 'cmake' + spirv_tools_module = lib_cmake_path / 'SPIRV-Tools/SPIRV-ToolsTarget-release.cmake' + self.keep_module_target(state, 'SPIRV-Tools-static', (spirv_tools_module,)) + + # Remove deprecated files with absolute paths in them + for entry in os.listdir(lib_cmake_path): + if entry.endswith('.cmake'): + os.unlink(lib_cmake_path / entry) + + +class GraphvizTarget(base.CMakeTarget): + def __init__(self, name='graphviz'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://gitlab.com/graphviz/graphviz/-/archive/8.1.0/graphviz-8.1.0.tar.bz2', + 'ce8911695752aa2c3929147e3dee016e58aa624d81d7c18dd16f895ae79460de') + + def configure(self, state: BuildState): + # state.options['ENABLE_CTEST'] = 'NO' + + super().configure(state) + class P7ZipTarget(base.CMakeTarget): def __init__(self, name='p7zip'): @@ -153,8 +201,8 @@ class SeverZipTarget(base.MakeTarget): def prepare_source(self, state: BuildState): state.download_source( - 'https://www.7-zip.org/a/7z2201-src.tar.xz', - '393098730c70042392af808917e765945dc2437dee7aae3cfcc4966eb920fbc5', + 'https://7-zip.org/a/7z2301-src.tar.xz', + '356071007360e5a1824d9904993e8b2480b51b570e8c9faf7c0f58ebe4bf9f74', patches='7zip-fix-errors') def detect(self, state: BuildState) -> bool: diff --git a/deps/flac/include/FLAC/all.h b/deps/flac/include/FLAC/all.h index a6a012fc..277dcbc5 100644 --- a/deps/flac/include/FLAC/all.h +++ b/deps/flac/include/FLAC/all.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/deps/flac/include/FLAC/assert.h b/deps/flac/include/FLAC/assert.h index aee23c8c..ee3ee080 100644 --- a/deps/flac/include/FLAC/assert.h +++ b/deps/flac/include/FLAC/assert.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2001-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -34,6 +34,10 @@ #define FLAC__ASSERT_H /* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */ +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION +#define FLAC__ASSERT(x) if(!(x)) __builtin_abort(); +#define FLAC__ASSERT_DECLARATION(x) x +#else #ifndef NDEBUG #include #define FLAC__ASSERT(x) assert(x) @@ -42,5 +46,6 @@ #define FLAC__ASSERT(x) #define FLAC__ASSERT_DECLARATION(x) #endif +#endif #endif diff --git a/deps/flac/include/FLAC/callback.h b/deps/flac/include/FLAC/callback.h index d00878b6..4babcd32 100644 --- a/deps/flac/include/FLAC/callback.h +++ b/deps/flac/include/FLAC/callback.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2004-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -90,7 +90,9 @@ typedef void* FLAC__IOHandle; /** Signature for the read callback. * The signature and semantics match POSIX fread() implementations - * and can generally be used interchangeably. + * and can generally be used interchangeably. Note that the global + * variable errno from errno.h is read by some libFLAC functions to + * detect read errors. * * \param ptr The address of the read buffer. * \param size The size of the records to be read. @@ -166,6 +168,9 @@ typedef int (*FLAC__IOCallback_Close) (FLAC__IOHandle handle); * * If the seek requirement for an interface is optional, you can signify that * a data source is not seekable by setting the \a seek field to \c NULL. + * + * See the detailed documentation for callbacks in the + * \link flac_callbacks callbacks \endlink module. */ typedef struct { FLAC__IOCallback_Read read; /**< See FLAC__IOCallbacks */ diff --git a/deps/flac/include/FLAC/export.h b/deps/flac/include/FLAC/export.h index 983f13b1..d14728a5 100644 --- a/deps/flac/include/FLAC/export.h +++ b/deps/flac/include/FLAC/export.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -95,9 +95,9 @@ /** These \#defines will mirror the libtool-based library version number, see * http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning */ -#define FLAC_API_VERSION_CURRENT 12 +#define FLAC_API_VERSION_CURRENT 13 #define FLAC_API_VERSION_REVISION 0 /**< see above */ -#define FLAC_API_VERSION_AGE 0 /**< see above */ +#define FLAC_API_VERSION_AGE 1 /**< see above */ #ifdef __cplusplus extern "C" { diff --git a/deps/flac/include/FLAC/format.h b/deps/flac/include/FLAC/format.h index 2d548437..ef7c8b21 100644 --- a/deps/flac/include/FLAC/format.h +++ b/deps/flac/include/FLAC/format.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/deps/flac/include/FLAC/metadata.h b/deps/flac/include/FLAC/metadata.h index 651b7405..4747a5f3 100644 --- a/deps/flac/include/FLAC/metadata.h +++ b/deps/flac/include/FLAC/metadata.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2001-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2197,6 +2197,34 @@ FLAC_API FLAC__bool FLAC__metadata_object_picture_set_data(FLAC__StreamMetadata */ FLAC_API FLAC__bool FLAC__metadata_object_picture_is_legal(const FLAC__StreamMetadata *object, const char **violation); + +/** Get the raw (binary) representation of a FLAC__StreamMetadata objeect. + * After use, free() the returned buffer. The length of the buffer is + * the length of the input metadata object plus 4 bytes for the header. + * + * \param object A pointer to metadata block to be converted. + * \assert + * \code object != NULL \endcode + * \retval FLAC__byte* + * \c NULL if there was an error, else a pointer to a buffer holding + * the requested data. + */ +FLAC_API FLAC__byte * FLAC__metadata_object_get_raw(const FLAC__StreamMetadata *object); + + +/** Turn a raw (binary) representation into a FLAC__StreamMetadata objeect. + * The returned object must be deleted with FLAC__metadata_object_delete() + * after use. + * + * \param buffer A pointer to a buffer containing a binary representation + * to be converted to a FLAC__StreamMetadata object + * \param length The length of the supplied buffer + * \retval FLAC__StreamMetadata* + * \c NULL if there was an error, else a pointer to a FLAC__StreamMetadata + * holding the requested data. + */ + +FLAC_API FLAC__StreamMetadata * FLAC__metadata_object_set_raw(FLAC__byte *buffer, FLAC__uint32 length); /* \} */ #ifdef __cplusplus diff --git a/deps/flac/include/FLAC/ordinals.h b/deps/flac/include/FLAC/ordinals.h index 77757d66..d61aac57 100644 --- a/deps/flac/include/FLAC/ordinals.h +++ b/deps/flac/include/FLAC/ordinals.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,26 +33,10 @@ #ifndef FLAC__ORDINALS_H #define FLAC__ORDINALS_H -#if defined(_MSC_VER) && _MSC_VER < 1600 - -/* Microsoft Visual Studio earlier than the 2010 version did not provide - * the 1999 ISO C Standard header file . - */ - -typedef signed __int8 FLAC__int8; -typedef signed __int16 FLAC__int16; -typedef signed __int32 FLAC__int32; -typedef signed __int64 FLAC__int64; -typedef unsigned __int8 FLAC__uint8; -typedef unsigned __int16 FLAC__uint16; -typedef unsigned __int32 FLAC__uint32; -typedef unsigned __int64 FLAC__uint64; - -#else - -/* For MSVC 2010 and everything else which provides . */ +/* This of course assumes C99 headers */ #include +#include typedef int8_t FLAC__int8; typedef uint8_t FLAC__uint8; @@ -64,22 +48,8 @@ typedef uint16_t FLAC__uint16; typedef uint32_t FLAC__uint32; typedef uint64_t FLAC__uint64; -#endif - typedef int FLAC__bool; typedef FLAC__uint8 FLAC__byte; - -#ifdef true -#undef true -#endif -#ifdef false -#undef false -#endif -#ifndef __cplusplus -#define true 1 -#define false 0 -#endif - #endif diff --git a/deps/flac/include/FLAC/stream_decoder.h b/deps/flac/include/FLAC/stream_decoder.h index f4e16488..2272bcac 100644 --- a/deps/flac/include/FLAC/stream_decoder.h +++ b/deps/flac/include/FLAC/stream_decoder.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/deps/flac/include/FLAC/stream_encoder.h b/deps/flac/include/FLAC/stream_encoder.h index 4ab4dce4..a0d02639 100644 --- a/deps/flac/include/FLAC/stream_encoder.h +++ b/deps/flac/include/FLAC/stream_encoder.h @@ -1,6 +1,6 @@ /* libFLAC - Free Lossless Audio Codec library * Copyright (C) 2000-2009 Josh Coalson - * Copyright (C) 2011-2022 Xiph.Org Foundation + * Copyright (C) 2011-2023 Xiph.Org Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -850,7 +850,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *en * 5 true false tukey(0.5) 8 0 false false false 0 5 0 * 6 true false subdivide_tukey(2) 8 0 false false false 0 6 0 * 7 true false subdivide_tukey(2) 12 0 false false false 0 6 0 - * 8 true false subdivide_tukey(2) 12 0 false false false 0 6 0 + * 8 true false subdivide_tukey(3) 12 0 false false false 0 6 0 * * * \default \c 5 diff --git a/deps/flac/lib/cmake/FLAC/flac-config-version.cmake b/deps/flac/lib/cmake/FLAC/flac-config-version.cmake index 0743ca75..c5c24bd2 100644 --- a/deps/flac/lib/cmake/FLAC/flac-config-version.cmake +++ b/deps/flac/lib/cmake/FLAC/flac-config-version.cmake @@ -7,7 +7,7 @@ # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. # The variable CVF_VERSION must be set before calling configure_file(). -set(PACKAGE_VERSION "1.4.2") +set(PACKAGE_VERSION "1.4.3") if (PACKAGE_FIND_VERSION_RANGE) # Package version must be in the requested version range diff --git a/deps/flac/lib/cmake/FLAC/targets-release.cmake b/deps/flac/lib/cmake/FLAC/targets-release.cmake index bc2cb592..c6a9cf75 100644 --- a/deps/flac/lib/cmake/FLAC/targets-release.cmake +++ b/deps/flac/lib/cmake/FLAC/targets-release.cmake @@ -12,8 +12,8 @@ set_target_properties(FLAC::FLAC PROPERTIES IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libFLAC.a" ) -list(APPEND _IMPORT_CHECK_TARGETS FLAC::FLAC ) -list(APPEND _IMPORT_CHECK_FILES_FOR_FLAC::FLAC "${_IMPORT_PREFIX}/lib/libFLAC.a" ) +list(APPEND _cmake_import_check_targets FLAC::FLAC ) +list(APPEND _cmake_import_check_files_for_FLAC::FLAC "${_IMPORT_PREFIX}/lib/libFLAC.a" ) # Commands beyond this point should not need to know the version. set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deps/flac/lib/cmake/FLAC/targets.cmake b/deps/flac/lib/cmake/FLAC/targets.cmake index 09d7b181..f4b4250e 100644 --- a/deps/flac/lib/cmake/FLAC/targets.cmake +++ b/deps/flac/lib/cmake/FLAC/targets.cmake @@ -1,10 +1,13 @@ # Generated by CMake -if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) - message(FATAL_ERROR "CMake >= 2.6.0 required") +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.0 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") endif() cmake_policy(PUSH) -cmake_policy(VERSION 2.6...3.19) +cmake_policy(VERSION 2.8.3...3.23) #---------------------------------------------------------------- # Generated CMake target import file. #---------------------------------------------------------------- @@ -13,32 +16,34 @@ cmake_policy(VERSION 2.6...3.19) set(CMAKE_IMPORT_FILE_VERSION 1) # Protect against multiple inclusion, which would fail when already imported targets are added once more. -set(_targetsDefined) -set(_targetsNotDefined) -set(_expectedTargets) -foreach(_expectedTarget FLAC::FLAC) - list(APPEND _expectedTargets ${_expectedTarget}) - if(NOT TARGET ${_expectedTarget}) - list(APPEND _targetsNotDefined ${_expectedTarget}) - endif() - if(TARGET ${_expectedTarget}) - list(APPEND _targetsDefined ${_expectedTarget}) +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS FLAC::FLAC) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") endif() endforeach() -if("${_targetsDefined}" STREQUAL "${_expectedTargets}") - unset(_targetsDefined) - unset(_targetsNotDefined) - unset(_expectedTargets) - set(CMAKE_IMPORT_FILE_VERSION) +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) cmake_policy(POP) return() endif() -if(NOT "${_targetsDefined}" STREQUAL "") - message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") endif() -unset(_targetsDefined) -unset(_targetsNotDefined) -unset(_expectedTargets) +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) # Compute the installation prefix relative to this file. @@ -64,21 +69,22 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12) endif() # Load information for each installed configuration. -get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -file(GLOB CONFIG_FILES "${_DIR}/targets-*.cmake") -foreach(f ${CONFIG_FILES}) - include(${f}) +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/targets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) # Cleanup temporary variables. set(_IMPORT_PREFIX) # Loop over all imported files and verify that they actually exist -foreach(target ${_IMPORT_CHECK_TARGETS} ) - foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) - if(NOT EXISTS "${file}" ) - message(FATAL_ERROR "The imported target \"${target}\" references the file - \"${file}\" +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. @@ -88,9 +94,11 @@ but not all the files it references. ") endif() endforeach() - unset(_IMPORT_CHECK_FILES_FOR_${target}) + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") endforeach() -unset(_IMPORT_CHECK_TARGETS) +unset(_cmake_target) +unset(_cmake_import_check_targets) # This file does not depend on other imported targets which have # been exported from the same project but in a separate export set. diff --git a/deps/flac/lib/libFLAC.a b/deps/flac/lib/libFLAC.a index c603cc6c..683b7735 100644 Binary files a/deps/flac/lib/libFLAC.a and b/deps/flac/lib/libFLAC.a differ diff --git a/deps/flac/lib/pkgconfig/flac.pc b/deps/flac/lib/pkgconfig/flac.pc index aff15921..e9603022 100644 --- a/deps/flac/lib/pkgconfig/flac.pc +++ b/deps/flac/lib/pkgconfig/flac.pc @@ -5,7 +5,7 @@ includedir=${prefix}/include Name: FLAC Description: Free Lossless Audio Codec Library -Version: 1.4.2 +Version: 1.4.3 Requires.private: ogg Libs: -L${libdir} -lFLAC Libs.private: -lm diff --git a/deps/fluidsynth/include/fluidsynth/version.h b/deps/fluidsynth/include/fluidsynth/version.h index e9c4156b..748a75d6 100644 --- a/deps/fluidsynth/include/fluidsynth/version.h +++ b/deps/fluidsynth/include/fluidsynth/version.h @@ -31,10 +31,10 @@ extern "C" { * * @{ */ -#define FLUIDSYNTH_VERSION "2.3.2" /**< String constant of libfluidsynth version. */ +#define FLUIDSYNTH_VERSION "2.3.3" /**< String constant of libfluidsynth version. */ #define FLUIDSYNTH_VERSION_MAJOR 2 /**< libfluidsynth major version integer constant. */ #define FLUIDSYNTH_VERSION_MINOR 3 /**< libfluidsynth minor version integer constant. */ -#define FLUIDSYNTH_VERSION_MICRO 2 /**< libfluidsynth micro version integer constant. */ +#define FLUIDSYNTH_VERSION_MICRO 3 /**< libfluidsynth micro version integer constant. */ FLUIDSYNTH_API void fluid_version(int *major, int *minor, int *micro); FLUIDSYNTH_API char* fluid_version_str(void); diff --git a/deps/fluidsynth/lib/cmake/fluidsynth/FluidSynthConfigVersion.cmake b/deps/fluidsynth/lib/cmake/fluidsynth/FluidSynthConfigVersion.cmake index f05a1fb4..6860e85d 100644 --- a/deps/fluidsynth/lib/cmake/fluidsynth/FluidSynthConfigVersion.cmake +++ b/deps/fluidsynth/lib/cmake/fluidsynth/FluidSynthConfigVersion.cmake @@ -10,13 +10,13 @@ # The variable CVF_VERSION must be set before calling configure_file(). -set(PACKAGE_VERSION "2.3.2") +set(PACKAGE_VERSION "2.3.3") if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() - if("2.3.2" MATCHES "^([0-9]+)\\.([0-9]+)") + if("2.3.3" MATCHES "^([0-9]+)\\.([0-9]+)") set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}") @@ -27,7 +27,7 @@ else() string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}") endif() else() - set(CVF_VERSION_MAJOR "2.3.2") + set(CVF_VERSION_MAJOR "2.3.3") set(CVF_VERSION_MINOR "") endif() diff --git a/deps/fluidsynth/lib/libfluidsynth.a b/deps/fluidsynth/lib/libfluidsynth.a index 856bf699..6b769996 100644 Binary files a/deps/fluidsynth/lib/libfluidsynth.a and b/deps/fluidsynth/lib/libfluidsynth.a differ diff --git a/deps/fluidsynth/lib/pkgconfig/fluidsynth.pc b/deps/fluidsynth/lib/pkgconfig/fluidsynth.pc index 4a6c2728..b6fcb303 100644 --- a/deps/fluidsynth/lib/pkgconfig/fluidsynth.pc +++ b/deps/fluidsynth/lib/pkgconfig/fluidsynth.pc @@ -5,7 +5,7 @@ includedir=${prefix}/include Name: FluidSynth Description: Software SoundFont synth -Version: 2.3.2 +Version: 2.3.3 Requires.private: glib-2.0 gthread-2.0 sndfile libinstpatch-1.0 Libs: -L${libdir} -lfluidsynth Libs.private: -lm -Wl,-framework,CoreAudio,-framework,AudioUnit -Wl,-framework,CoreMIDI,-framework,CoreServices diff --git a/deps/jpeg-turbo/include/jconfig.h b/deps/jpeg-turbo/include/jconfig.h index d347c336..ce20ad36 100644 --- a/deps/jpeg-turbo/include/jconfig.h +++ b/deps/jpeg-turbo/include/jconfig.h @@ -4,34 +4,57 @@ #define JPEG_LIB_VERSION 62 /* libjpeg-turbo version */ -#define LIBJPEG_TURBO_VERSION 2.1.5.1 +#define LIBJPEG_TURBO_VERSION 3.0.0 /* libjpeg-turbo version in integer form */ -#define LIBJPEG_TURBO_VERSION_NUMBER 2001005 +#define LIBJPEG_TURBO_VERSION_NUMBER 3000000 -/* Support arithmetic encoding */ +/* Support arithmetic encoding when using 8-bit samples */ #define C_ARITH_CODING_SUPPORTED 1 -/* Support arithmetic decoding */ +/* Support arithmetic decoding when using 8-bit samples */ #define D_ARITH_CODING_SUPPORTED 1 /* Support in-memory source/destination managers */ -#define MEM_SRCDST_SUPPORTED 1 +#define MEM_SRCDST_SUPPORTED 1 -/* Use accelerated SIMD routines. */ +/* Use accelerated SIMD routines when using 8-bit samples */ #define WITH_SIMD 1 -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 12 for 12-bit sample values - * Only 8 and 12 are legal data precisions for lossy JPEG according to the - * JPEG standard, and the IJG code does not support anything else! - * We do not support run-time selection of data precision, sorry. +/* This version of libjpeg-turbo supports run-time selection of data precision, + * so BITS_IN_JSAMPLE is no longer used to specify the data precision at build + * time. However, some downstream software expects the macro to be defined. + * Since 12-bit data precision is an opt-in feature that requires explicitly + * calling 12-bit-specific libjpeg API functions and using 12-bit-specific data + * types, the unmodified portion of the libjpeg API still behaves as if it were + * built for 8-bit precision, and JSAMPLE is still literally an 8-bit data + * type. Thus, it is correct to define BITS_IN_JSAMPLE to 8 here. */ +#ifndef BITS_IN_JSAMPLE +#define BITS_IN_JSAMPLE 8 +#endif -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ +#ifdef _WIN32 + +#undef RIGHT_SHIFT_IS_UNSIGNED + +/* Define "boolean" as unsigned char, not int, per Windows custom */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + +/* Define "INT32" as int, not long, per Windows custom */ +#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ +typedef short INT16; +typedef signed int INT32; +#endif +#define XMD_H /* prevent jmorecfg.h from redefining it */ + +#else /* Define if your (broken) compiler shifts signed values as if they were unsigned. */ /* #undef RIGHT_SHIFT_IS_UNSIGNED */ + +#endif diff --git a/deps/jpeg-turbo/include/jerror.h b/deps/jpeg-turbo/include/jerror.h index eb44a114..39362fdd 100644 --- a/deps/jpeg-turbo/include/jerror.h +++ b/deps/jpeg-turbo/include/jerror.h @@ -4,6 +4,8 @@ * This file was part of the Independent JPEG Group's software: * Copyright (C) 1994-1997, Thomas G. Lane. * Modified 1997-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: * Copyright (C) 2014, 2017, 2021-2022, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg @@ -53,7 +55,8 @@ JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") #if JPEG_LIB_VERSION >= 70 JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") #endif -JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") +JMESSAGE(JERR_BAD_DCT_COEF, + "DCT coefficient (lossy) or spatial difference (lossless) out of range") JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") #if JPEG_LIB_VERSION >= 70 JMESSAGE(JERR_BAD_DROP_SAMPLING, @@ -69,9 +72,9 @@ JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") JMESSAGE(JERR_BAD_PROGRESSION, - "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") + "Invalid progressive/lossless parameters Ss=%d Se=%d Ah=%d Al=%d") JMESSAGE(JERR_BAD_PROG_SCRIPT, - "Invalid progressive parameters at scan script entry %d") + "Invalid progressive/lossless parameters at scan script entry %d") JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") @@ -180,7 +183,7 @@ JMESSAGE(JTRC_THUMB_PALETTE, JMESSAGE(JTRC_THUMB_RGB, "JFIF extension marker: RGB thumbnail image, length %u") JMESSAGE(JTRC_UNKNOWN_IDS, - "Unrecognized component IDs %d %d %d, assuming YCbCr") + "Unrecognized component IDs %d %d %d, assuming YCbCr (lossy) or RGB (lossless)") JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") @@ -211,6 +214,8 @@ JMESSAGE(JWRN_BOGUS_ICC, "Corrupt JPEG data: bad ICC marker") JMESSAGE(JERR_BAD_DROP_SAMPLING, "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") #endif +JMESSAGE(JERR_BAD_RESTART, + "Invalid restart interval %d; must be an integer multiple of the number of MCUs in an MCU row (%d)") #ifdef JMAKE_ENUM_LIST diff --git a/deps/jpeg-turbo/include/jmorecfg.h b/deps/jpeg-turbo/include/jmorecfg.h index b33a9919..89c7842c 100644 --- a/deps/jpeg-turbo/include/jmorecfg.h +++ b/deps/jpeg-turbo/include/jmorecfg.h @@ -4,8 +4,10 @@ * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1997, Thomas G. Lane. * Modified 1997-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: - * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, D. R. Commander. + * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * @@ -41,31 +43,29 @@ * arrays is very slow on your hardware, you might want to change these. */ -#if BITS_IN_JSAMPLE == 8 -/* JSAMPLE should be the smallest type that will hold the values 0..255. - */ +/* JSAMPLE should be the smallest type that will hold the values 0..255. */ typedef unsigned char JSAMPLE; #define GETJSAMPLE(value) ((int)(value)) -#define MAXJSAMPLE 255 -#define CENTERJSAMPLE 128 - -#endif /* BITS_IN_JSAMPLE == 8 */ +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 -#if BITS_IN_JSAMPLE == 12 -/* JSAMPLE should be the smallest type that will hold the values 0..4095. - * On nearly all machines "short" will do nicely. - */ +/* J12SAMPLE should be the smallest type that will hold the values 0..4095. */ -typedef short JSAMPLE; -#define GETJSAMPLE(value) ((int)(value)) +typedef short J12SAMPLE; -#define MAXJSAMPLE 4095 -#define CENTERJSAMPLE 2048 +#define MAXJ12SAMPLE 4095 +#define CENTERJ12SAMPLE 2048 -#endif /* BITS_IN_JSAMPLE == 12 */ + +/* J16SAMPLE should be the smallest type that will hold the values 0..65535. */ + +typedef unsigned short J16SAMPLE; + +#define MAXJ16SAMPLE 65535 +#define CENTERJ16SAMPLE 32768 /* Representation of a DCT frequency coefficient. @@ -242,14 +242,16 @@ typedef int boolean; #define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */ #define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ /* Note: if you selected 12-bit data precision, it is dangerous to turn off * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit * precision, so jchuff.c normally uses entropy optimization to compute * usable tables for higher precision. If you don't want to do optimization, * you'll have to supply different default Huffman tables. - * The exact same statements apply for progressive JPEG: the default tables - * don't work for progressive mode. (This may get fixed, however.) + * The exact same statements apply for progressive and lossless JPEG: + * the default tables don't work for progressive mode or lossless mode. + * (This may get fixed, however.) */ #define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ @@ -257,6 +259,7 @@ typedef int boolean; #define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define D_LOSSLESS_SUPPORTED /* Lossless JPEG? */ #define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ #define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ #define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ diff --git a/deps/jpeg-turbo/include/jpeglib.h b/deps/jpeg-turbo/include/jpeglib.h index d7664f06..8c813097 100644 --- a/deps/jpeg-turbo/include/jpeglib.h +++ b/deps/jpeg-turbo/include/jpeglib.h @@ -4,8 +4,10 @@ * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1998, Thomas G. Lane. * Modified 2002-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. * libjpeg-turbo Modifications: - * Copyright (C) 2009-2011, 2013-2014, 2016-2017, 2020, D. R. Commander. + * Copyright (C) 2009-2011, 2013-2014, 2016-2017, 2020, 2022, D. R. Commander. * Copyright (C) 2015, Google, Inc. * For conditions of distribution and use, see the accompanying README.ijg * file. @@ -43,6 +45,13 @@ extern "C" { * if you want to be compatible. */ +/* NOTE: In lossless mode, an MCU contains one or more samples rather than one + * or more 8x8 DCT blocks, so the term "data unit" is used to generically + * describe a sample in lossless mode or an 8x8 DCT block in lossy mode. To + * preserve backward API/ABI compatibility, the field and macro names retain + * the "block" terminology. + */ + #define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ #define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ #define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ @@ -57,9 +66,9 @@ extern "C" { * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe * sometimes emits noncompliant files doesn't mean you should too. */ -#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on data units/MCU */ #ifndef D_MAX_BLOCKS_IN_MCU -#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on data units/MCU */ #endif @@ -70,6 +79,20 @@ typedef JSAMPLE *JSAMPROW; /* ptr to one image row of pixel samples. */ typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ +typedef J12SAMPLE *J12SAMPROW; /* ptr to one image row of 12-bit pixel + samples. */ +typedef J12SAMPROW *J12SAMPARRAY; /* ptr to some 12-bit sample rows (a 2-D + 12-bit sample array) */ +typedef J12SAMPARRAY *J12SAMPIMAGE; /* a 3-D 12-bit sample array: top index is + color */ + +typedef J16SAMPLE *J16SAMPROW; /* ptr to one image row of 16-bit pixel + samples. */ +typedef J16SAMPROW *J16SAMPARRAY; /* ptr to some 16-bit sample rows (a 2-D + 16-bit sample array) */ +typedef J16SAMPARRAY *J16SAMPIMAGE; /* a 3-D 16-bit sample array: top index is + color */ + typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ typedef JBLOCK *JBLOCKROW; /* pointer to one row of coefficient blocks */ typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ @@ -135,17 +158,20 @@ typedef struct { /* Remaining fields should be treated as private by applications. */ /* These values are computed during compression or decompression startup: */ - /* Component's size in DCT blocks. - * Any dummy blocks added to complete an MCU are not counted; therefore - * these values do not depend on whether a scan is interleaved or not. + /* Component's size in data units. + * In lossy mode, any dummy blocks added to complete an MCU are not counted; + * therefore these values do not depend on whether a scan is interleaved or + * not. In lossless mode, these are always equal to the image width and + * height. */ JDIMENSION width_in_blocks; JDIMENSION height_in_blocks; - /* Size of a DCT block in samples. Always DCTSIZE for compression. - * For decompression this is the size of the output from one DCT block, + /* Size of a data unit in samples. Always DCTSIZE for lossy compression. + * For lossy decompression this is the size of the output from one DCT block, * reflecting any scaling we choose to apply during the IDCT step. - * Values from 1 to 16 are supported. - * Note that different components may receive different IDCT scalings. + * Values from 1 to 16 are supported. Note that different components may + * receive different IDCT scalings. In lossless mode, this is always equal + * to 1. */ #if JPEG_LIB_VERSION >= 70 int DCT_h_scaled_size; @@ -156,8 +182,10 @@ typedef struct { /* The downsampled dimensions are the component's actual, unpadded number * of samples at the main buffer (preprocessing/compression interface), thus * downsampled_width = ceil(image_width * Hi/Hmax) - * and similarly for height. For decompression, IDCT scaling is included, so + * and similarly for height. For lossy decompression, IDCT scaling is + * included, so * downsampled_width = ceil(image_width * Hi/Hmax * DCT_[h_]scaled_size/DCTSIZE) + * In lossless mode, these are always equal to the image width and height. */ JDIMENSION downsampled_width; /* actual width in samples */ JDIMENSION downsampled_height; /* actual height in samples */ @@ -169,12 +197,12 @@ typedef struct { /* These values are computed before starting a scan of the component. */ /* The decompressor output side may not use these variables. */ - int MCU_width; /* number of blocks per MCU, horizontally */ - int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_width; /* number of data units per MCU, horizontally */ + int MCU_height; /* number of data units per MCU, vertically */ int MCU_blocks; /* MCU_width * MCU_height */ int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_[h_]scaled_size */ - int last_col_width; /* # of non-dummy blocks across in last MCU */ - int last_row_height; /* # of non-dummy blocks down in last MCU */ + int last_col_width; /* # of non-dummy data units across in last MCU */ + int last_row_height; /* # of non-dummy data units down in last MCU */ /* Saved quantization table for component; NULL if none yet saved. * See jdinput.c comments about the need for this information. @@ -192,8 +220,12 @@ typedef struct { typedef struct { int comps_in_scan; /* number of components encoded in this scan */ int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ - int Ss, Se; /* progressive JPEG spectral selection parms */ - int Ah, Al; /* progressive JPEG successive approx. parms */ + int Ss, Se; /* progressive JPEG spectral selection parms + (Ss is the predictor selection value in + lossless mode) */ + int Ah, Al; /* progressive JPEG successive approx. parms + (Al is the point transform value in lossless + mode) */ } jpeg_scan_info; /* The decompressor can save APPn and COM markers in a list of these: */ @@ -419,11 +451,13 @@ struct jpeg_compress_struct { int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ #endif - JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ - /* The coefficient controller receives data in units of MCU rows as defined - * for fully interleaved scans (whether the JPEG file is interleaved or not). - * There are v_samp_factor * DCTSIZE sample rows of each component in an - * "iMCU" (interleaved MCU) row. + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coefficient or + difference controller */ + /* The coefficient or difference controller receives data in units of MCU + * rows as defined for fully interleaved scans (whether the JPEG file is + * interleaved or not). In lossy mode, there are v_samp_factor * DCTSIZE + * sample rows of each component in an "iMCU" (interleaved MCU) row. In + * lossless mode, total_iMCU_rows is always equal to the image height. */ /* @@ -437,12 +471,13 @@ struct jpeg_compress_struct { JDIMENSION MCUs_per_row; /* # of MCUs across the image */ JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - int blocks_in_MCU; /* # of DCT blocks per MCU */ + int blocks_in_MCU; /* # of data units per MCU */ int MCU_membership[C_MAX_BLOCKS_IN_MCU]; /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ + /* i'th data unit in an MCU */ - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + int Ss, Se, Ah, Al; /* progressive/lossless JPEG parameters for + scan */ #if JPEG_LIB_VERSION >= 80 int block_size; /* the basic DCT block size: 1..16 */ @@ -537,7 +572,12 @@ struct jpeg_decompress_struct { * The map has out_color_components rows and actual_number_of_colors columns. */ int actual_number_of_colors; /* number of entries in use */ - JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array + If data_precision is 12 or 16, then this is + actually a J12SAMPARRAY or a J16SAMPARRAY, + so callers must type-cast it in order to + read/write 12-bit or 16-bit samples from/to + the array. */ /* State variables: these variables indicate the progress of decompression. * The application may examine these but must not modify them. @@ -647,15 +687,21 @@ struct jpeg_decompress_struct { #endif JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ - /* The coefficient controller's input and output progress is measured in - * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows - * in fully interleaved JPEG scans, but are used whether the scan is - * interleaved or not. We define an iMCU row as v_samp_factor DCT block - * rows of each component. Therefore, the IDCT output contains + /* The coefficient or difference controller's input and output progress is + * measured in units of "iMCU" (interleaved MCU) rows. These are the same as + * MCU rows in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. In lossy mode, we define an iMCU row as v_samp_factor + * DCT block rows of each component. Therefore, the IDCT output contains * v_samp_factor*DCT_[v_]scaled_size sample rows of a component per iMCU row. + * In lossless mode, total_iMCU_rows is always equal to the image height. */ - JSAMPLE *sample_range_limit; /* table for fast range-limiting */ + JSAMPLE *sample_range_limit; /* table for fast range-limiting + If data_precision is 12 or 16, then this is + actually a J12SAMPLE pointer or a J16SAMPLE + pointer, so callers must type-cast it in + order to read 12-bit or 16-bit samples from + the array. */ /* * These fields are valid during any one scan. @@ -669,12 +715,13 @@ struct jpeg_decompress_struct { JDIMENSION MCUs_per_row; /* # of MCUs across the image */ JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - int blocks_in_MCU; /* # of DCT blocks per MCU */ + int blocks_in_MCU; /* # of data units per MCU */ int MCU_membership[D_MAX_BLOCKS_IN_MCU]; /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ + /* i'th data unit in an MCU */ - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + int Ss, Se, Ah, Al; /* progressive/lossless JPEG parameters for + scan */ #if JPEG_LIB_VERSION >= 80 /* These fields are derived from Se of first SOS marker. @@ -835,6 +882,11 @@ struct jpeg_memory_mgr { void *(*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject); void *(*alloc_large) (j_common_ptr cinfo, int pool_id, size_t sizeofobject); + /* If cinfo->data_precision is 12 or 16, then this method and the + * access_virt_sarray method actually return a J12SAMPARRAY or a + * J16SAMPARRAY, so callers must type-cast the return value in order to + * read/write 12-bit or 16-bit samples from/to the array. + */ JSAMPARRAY (*alloc_sarray) (j_common_ptr cinfo, int pool_id, JDIMENSION samplesperrow, JDIMENSION numrows); JBLOCKARRAY (*alloc_barray) (j_common_ptr cinfo, int pool_id, @@ -916,13 +968,11 @@ EXTERN(void) jpeg_destroy_decompress(j_decompress_ptr cinfo); EXTERN(void) jpeg_stdio_dest(j_compress_ptr cinfo, FILE *outfile); EXTERN(void) jpeg_stdio_src(j_decompress_ptr cinfo, FILE *infile); -#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED) /* Data source and destination managers: memory buffers. */ EXTERN(void) jpeg_mem_dest(j_compress_ptr cinfo, unsigned char **outbuffer, unsigned long *outsize); EXTERN(void) jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *inbuffer, unsigned long insize); -#endif /* Default parameter setup for compression */ EXTERN(void) jpeg_set_defaults(j_compress_ptr cinfo); @@ -942,6 +992,9 @@ EXTERN(void) jpeg_add_quant_table(j_compress_ptr cinfo, int which_tbl, const unsigned int *basic_table, int scale_factor, boolean force_baseline); EXTERN(int) jpeg_quality_scaling(int quality); +EXTERN(void) jpeg_enable_lossless(j_compress_ptr cinfo, + int predictor_selection_value, + int point_transform); EXTERN(void) jpeg_simple_progression(j_compress_ptr cinfo); EXTERN(void) jpeg_suppress_tables(j_compress_ptr cinfo, boolean suppress); EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table(j_common_ptr cinfo); @@ -953,6 +1006,12 @@ EXTERN(void) jpeg_start_compress(j_compress_ptr cinfo, EXTERN(JDIMENSION) jpeg_write_scanlines(j_compress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_write_scanlines(j_compress_ptr cinfo, + J12SAMPARRAY scanlines, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg16_write_scanlines(j_compress_ptr cinfo, + J16SAMPARRAY scanlines, + JDIMENSION num_lines); EXTERN(void) jpeg_finish_compress(j_compress_ptr cinfo); #if JPEG_LIB_VERSION >= 70 @@ -963,6 +1022,9 @@ EXTERN(void) jpeg_calc_jpeg_dimensions(j_compress_ptr cinfo); /* Replaces jpeg_write_scanlines when writing raw downsampled data. */ EXTERN(JDIMENSION) jpeg_write_raw_data(j_compress_ptr cinfo, JSAMPIMAGE data, JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_write_raw_data(j_compress_ptr cinfo, + J12SAMPIMAGE data, + JDIMENSION num_lines); /* Write a special marker. See libjpeg.txt concerning safe usage. */ EXTERN(void) jpeg_write_marker(j_compress_ptr cinfo, int marker, @@ -998,15 +1060,28 @@ EXTERN(boolean) jpeg_start_decompress(j_decompress_ptr cinfo); EXTERN(JDIMENSION) jpeg_read_scanlines(j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg12_read_scanlines(j_decompress_ptr cinfo, + J12SAMPARRAY scanlines, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg16_read_scanlines(j_decompress_ptr cinfo, + J16SAMPARRAY scanlines, + JDIMENSION max_lines); EXTERN(JDIMENSION) jpeg_skip_scanlines(j_decompress_ptr cinfo, JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_skip_scanlines(j_decompress_ptr cinfo, + JDIMENSION num_lines); EXTERN(void) jpeg_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, JDIMENSION *width); +EXTERN(void) jpeg12_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, + JDIMENSION *width); EXTERN(boolean) jpeg_finish_decompress(j_decompress_ptr cinfo); /* Replaces jpeg_read_scanlines when reading raw downsampled data. */ EXTERN(JDIMENSION) jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg12_read_raw_data(j_decompress_ptr cinfo, + J12SAMPIMAGE data, + JDIMENSION max_lines); /* Additional entry points for buffered-image mode. */ EXTERN(boolean) jpeg_has_multiple_scans(j_decompress_ptr cinfo); diff --git a/deps/jpeg-turbo/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake b/deps/jpeg-turbo/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake index 18933c23..eca2f22b 100644 --- a/deps/jpeg-turbo/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake +++ b/deps/jpeg-turbo/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake @@ -7,7 +7,7 @@ # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. # The variable CVF_VERSION must be set before calling configure_file(). -set(PACKAGE_VERSION "2.1.5.1") +set(PACKAGE_VERSION "3.0.0") if (PACKAGE_FIND_VERSION_RANGE) # Package version must be in the requested version range diff --git a/deps/jpeg-turbo/lib/libjpeg.a b/deps/jpeg-turbo/lib/libjpeg.a index d5b930c1..56b52764 100644 Binary files a/deps/jpeg-turbo/lib/libjpeg.a and b/deps/jpeg-turbo/lib/libjpeg.a differ diff --git a/deps/jpeg-turbo/lib/pkgconfig/libjpeg.pc b/deps/jpeg-turbo/lib/pkgconfig/libjpeg.pc index aa9350ff..a219ff1a 100644 --- a/deps/jpeg-turbo/lib/pkgconfig/libjpeg.pc +++ b/deps/jpeg-turbo/lib/pkgconfig/libjpeg.pc @@ -5,6 +5,6 @@ includedir=${prefix}/include Name: libjpeg Description: A SIMD-accelerated JPEG codec that provides the libjpeg API -Version: 2.1.5.1 +Version: 3.0.0 Libs: -L${libdir} -ljpeg Cflags: -I${includedir} diff --git a/deps/sdl2/bin/sdl2-config b/deps/sdl2/bin/sdl2-config index ba5f4f89..82638b01 100755 --- a/deps/sdl2/bin/sdl2-config +++ b/deps/sdl2/bin/sdl2-config @@ -43,7 +43,7 @@ while test $# -gt 0; do echo $exec_prefix ;; --version) - echo 2.26.5 + echo 2.28.1 ;; --cflags) echo -I${prefix}/include/SDL2 -D_THREAD_SAFE diff --git a/deps/sdl2/include/SDL2/SDL_atomic.h b/deps/sdl2/include/SDL2/SDL_atomic.h index 22ea0191..8273287f 100644 --- a/deps/sdl2/include/SDL2/SDL_atomic.h +++ b/deps/sdl2/include/SDL2/SDL_atomic.h @@ -249,9 +249,8 @@ typedef void (*SDL_KernelMemoryBarrierFunc)(); #elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) #define SDL_CPUPauseInstruction() __yield() #elif defined(__WATCOMC__) && defined(__386__) - /* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */ extern __inline void SDL_CPUPauseInstruction(void); - #pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h" + #pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause" #else #define SDL_CPUPauseInstruction() #endif diff --git a/deps/sdl2/include/SDL2/SDL_audio.h b/deps/sdl2/include/SDL2/SDL_audio.h index 2c0f2119..ccd35982 100644 --- a/deps/sdl2/include/SDL2/SDL_audio.h +++ b/deps/sdl2/include/SDL2/SDL_audio.h @@ -169,13 +169,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, * The calculated values in this structure are calculated by SDL_OpenAudio(). * * For multi-channel audio, the default SDL channel mapping is: - * 2: FL FR (stereo) - * 3: FL FR LFE (2.1 surround) - * 4: FL FR BL BR (quad) - * 5: FL FR LFE BL BR (4.1 surround) - * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) - * 7: FL FR FC LFE BC SL SR (6.1 surround) - * 8: FL FR FC LFE BL BR SL SR (7.1 surround) + * 2: FL FR (stereo) + * 3: FL FR LFE (2.1 surround) + * 4: FL FR BL BR (quad) + * 5: FL FR LFE BL BR (4.1 surround) + * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) + * 7: FL FR FC LFE BC SL SR (6.1 surround) + * 8: FL FR FC LFE BL BR SL SR (7.1 surround) */ typedef struct SDL_AudioSpec { diff --git a/deps/sdl2/include/SDL2/SDL_blendmode.h b/deps/sdl2/include/SDL2/SDL_blendmode.h index b8621165..4ecbe507 100644 --- a/deps/sdl2/include/SDL2/SDL_blendmode.h +++ b/deps/sdl2/include/SDL2/SDL_blendmode.h @@ -52,7 +52,7 @@ typedef enum dstA = dstA */ SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) - dstA = (srcA * dstA) + (dstA * (1-srcA)) */ + dstA = dstA */ SDL_BLENDMODE_INVALID = 0x7FFFFFFF /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ diff --git a/deps/sdl2/include/SDL2/SDL_config.h b/deps/sdl2/include/SDL2/SDL_config.h index fad2e515..53ed0e02 100644 --- a/deps/sdl2/include/SDL2/SDL_config.h +++ b/deps/sdl2/include/SDL2/SDL_config.h @@ -332,6 +332,7 @@ /* #undef SDL_INPUT_LINUXEV */ /* #undef SDL_INPUT_LINUXKD */ /* #undef SDL_INPUT_FBSDKBIO */ +/* #undef SDL_INPUT_WSCONS */ /* #undef SDL_JOYSTICK_ANDROID */ /* #undef SDL_JOYSTICK_HAIKU */ /* #undef SDL_JOYSTICK_WGI */ @@ -359,6 +360,7 @@ /* #undef SDL_HAPTIC_XINPUT */ /* #undef SDL_HAPTIC_ANDROID */ /* #undef SDL_LIBUSB_DYNAMIC */ +/* #undef SDL_UDEV_DYNAMIC */ /* Enable various sensor drivers */ /* #undef SDL_SENSOR_ANDROID */ @@ -539,6 +541,8 @@ /* #undef SDL_VIDEO_VITA_PVR */ /* #undef SDL_VIDEO_VITA_PVR_OGL */ +/* #undef SDL_HAVE_LIBDECOR_GET_MIN_MAX */ + #if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_) /* Most everything except Visual Studio 2008 and earlier has stdint.h now */ #if defined(_MSC_VER) && (_MSC_VER < 1600) diff --git a/deps/sdl2/include/SDL2/SDL_endian.h b/deps/sdl2/include/SDL2/SDL_endian.h index 582c3a8b..71bc0672 100644 --- a/deps/sdl2/include/SDL2/SDL_endian.h +++ b/deps/sdl2/include/SDL2/SDL_endian.h @@ -140,7 +140,7 @@ extern "C" { #if HAS_BUILTIN_BSWAP16 #define SDL_Swap16(x) __builtin_bswap16(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ushort) #define SDL_Swap16(x) _byteswap_ushort(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -189,7 +189,7 @@ SDL_Swap16(Uint16 x) #if HAS_BUILTIN_BSWAP32 #define SDL_Swap32(x) __builtin_bswap32(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_ulong) #define SDL_Swap32(x) _byteswap_ulong(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP @@ -241,7 +241,7 @@ SDL_Swap32(Uint32 x) #if HAS_BUILTIN_BSWAP64 #define SDL_Swap64(x) __builtin_bswap64(x) -#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL) #pragma intrinsic(_byteswap_uint64) #define SDL_Swap64(x) _byteswap_uint64(x) #elif defined(__i386__) && !HAS_BROKEN_BSWAP diff --git a/deps/sdl2/include/SDL2/SDL_gamecontroller.h b/deps/sdl2/include/SDL2/SDL_gamecontroller.h index d66e1b06..140054d3 100644 --- a/deps/sdl2/include/SDL2/SDL_gamecontroller.h +++ b/deps/sdl2/include/SDL2/SDL_gamecontroller.h @@ -724,10 +724,10 @@ typedef enum SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */ - SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */ - SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */ - SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */ - SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */ + SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 (upper left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 (upper right, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 (lower left, facing the back) */ + SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 (lower right, facing the back) */ SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */ SDL_CONTROLLER_BUTTON_MAX } SDL_GameControllerButton; diff --git a/deps/sdl2/include/SDL2/SDL_hints.h b/deps/sdl2/include/SDL2/SDL_hints.h index 1317924e..ad3b4030 100644 --- a/deps/sdl2/include/SDL2/SDL_hints.h +++ b/deps/sdl2/include/SDL2/SDL_hints.h @@ -92,7 +92,7 @@ extern "C" { * By default this hint is not set and the APK expansion files are not searched. */ #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" - + /** * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc. * @@ -132,13 +132,13 @@ extern "C" { * \brief A variable to control whether we trap the Android back button to handle it manually. * This is necessary for the right mouse button to work on some Android devices, or * to be able to trap the back button for use in your code reliably. If set to true, - * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of + * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of * SDL_SCANCODE_AC_BACK. * * The variable can be set to the following values: * "0" - Back button will be handled as usual for system. (default) * "1" - Back button will be trapped, allowing you to handle the key press - * manually. (This will also let right mouse click work on systems + * manually. (This will also let right mouse click work on systems * where the right mouse button functions as back.) * * The value of this hint is used at runtime, so it can be changed at any time. @@ -147,7 +147,7 @@ extern "C" { /** * \brief Specify an application name. - * + * * This hint lets you specify the application name sent to the OS when * required. For example, this will often appear in volume control applets for * audio streams, and in lists of applications which are inhibiting the @@ -377,6 +377,17 @@ extern "C" { */ #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" +/** + * \brief A variable that controls whether the on-screen keyboard should be shown when text input is active + * + * The variable can be set to the following values: + * "0" - Do not show the on-screen keyboard + * "1" - Show the on-screen keyboard + * + * The default value is "1". This hint must be set before text input is activated. + */ +#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD" + /** * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs * @@ -507,7 +518,7 @@ extern "C" { /** * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout. - * + * * For example, on Nintendo Switch controllers, normally you'd get: * * (Y) @@ -569,9 +580,9 @@ extern "C" { * * The variable can be set to the following values: * "0" - SDL_TEXTEDITING events are sent, and it is the application's - * responsibility to render the text from these events and + * responsibility to render the text from these events and * differentiate it somehow from committed text. (default) - * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, + * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, * and text that is being composed will be rendered in its own UI. */ #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" @@ -1310,6 +1321,8 @@ extern "C" { * * This variable can be one of the following values: * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape" + * + * Since SDL 2.0.22 this variable accepts a comma-separated list of values above. */ #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION" @@ -1495,7 +1508,7 @@ extern "C" { * disabled. You should use a string that describes what your program is doing * (and, therefore, why the screensaver is disabled). For example, "Playing a * game" or "Watching a video". - * + * * Setting this to "" or leaving it unset will have SDL use a reasonable * default: "Playing a game" or something similar. * @@ -1509,13 +1522,13 @@ extern "C" { * On some platforms, like Linux, a realtime priority thread may be subject to restrictions * that require special handling by the application. This hint exists to let SDL know that * the app is prepared to handle said restrictions. - * + * * On Linux, SDL will apply the following configuration to any thread that becomes realtime: * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. * * Exceeding this limit will result in the kernel sending SIGKILL to the app, * * Refer to the man pages for more information. - * + * * This variable can be set to the following values: * "0" - default platform specific behaviour * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy @@ -1603,7 +1616,7 @@ extern "C" { #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK" /** - * \brief A variable controlling whether the screensaver is enabled. + * \brief A variable controlling whether the screensaver is enabled. * * This variable can be set to the following values: * "0" - Disable screensaver @@ -1616,7 +1629,7 @@ extern "C" { /** * \brief Tell the video driver that we only want a double buffer. * - * By default, most lowlevel 2D APIs will use a triple buffer scheme that + * By default, most lowlevel 2D APIs will use a triple buffer scheme that * wastes no CPU time on waiting for vsync after issuing a flip, but * introduces a frame of latency. On the other hand, using a double buffer * scheme instead is recommended for cases where low latency is an important @@ -1747,9 +1760,9 @@ extern "C" { /** * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p"). -* +* * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has -* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly +* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly * created SDL_Window: * * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is @@ -1815,13 +1828,13 @@ extern "C" { /** * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used. - * + * * This variable can be set to the following values: * "0" - Disable _NET_WM_BYPASS_COMPOSITOR * "1" - Enable _NET_WM_BYPASS_COMPOSITOR - * + * * By default SDL will use _NET_WM_BYPASS_COMPOSITOR - * + * */ #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" @@ -1955,7 +1968,29 @@ extern "C" { #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING" /** - * \brief A variable controlling whether the windows message loop is processed by SDL + * \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic). + * + * If the mnemonics are enabled, then menus can be opened by pressing the Alt + * key and the corresponding mnemonic (for example, Alt+F opens the File menu). + * However, in case an invalid mnemonic is pressed, Windows makes an audible + * beep to convey that nothing happened. This is true even if the window has + * no menu at all! + * + * Because most SDL applications don't have menus, and some want to use the Alt + * key for other purposes, SDL disables mnemonics (and the beeping) by default. + * + * Note: This also affects keyboard events: with mnemonics enabled, when a + * menu is opened from the keyboard, you will not receive a KEYUP event for + * the mnemonic key, and *might* not receive one for Alt. + * + * This variable can be set to the following values: + * "0" - Alt+mnemonic does nothing, no beeping. (default) + * "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep. + */ +#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS" + +/** + * \brief A variable controlling whether the windows message loop is processed by SDL * * This variable can be set to the following values: * "0" - The window message loop is not run @@ -1996,7 +2031,7 @@ extern "C" { #define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" /** - * \brief A variable to specify custom icon resource id from RC file on Windows platform + * \brief A variable to specify custom icon resource id from RC file on Windows platform */ #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" @@ -2035,16 +2070,16 @@ extern "C" { * * This hint must be set before initializing the video subsystem. * - * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with + * The main purpose of declaring DPI awareness is to disable OS bitmap scaling of SDL windows on monitors with * a DPI scale factor. - * + * * This hint is equivalent to requesting DPI awareness via external means (e.g. calling SetProcessDpiAwarenessContext) * and does not cause SDL to use a virtualized coordinate system, so it will generally give you 1 SDL coordinate = 1 pixel * even on high-DPI displays. - * + * * For more information, see: * https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows - * + * * This variable can be set to the following values: * "" - Do not change the DPI awareness (default). * "unaware" - Declare the process as DPI unaware. (Windows 8.1 and later). @@ -2062,16 +2097,16 @@ extern "C" { /** * \brief Uses DPI-scaled points as the SDL coordinate system on Windows. - * + * * This changes the SDL coordinate system units to be DPI-scaled points, rather than pixels everywhere. * This means windows will be appropriately sized, even when created on high-DPI displays with scaling. - * + * * e.g. requesting a 640x480 window from SDL, on a display with 125% scaling in Windows display settings, * will create a window with an 800x600 client area (in pixels). * * Setting this to "1" implicitly requests process DPI awareness (setting SDL_WINDOWS_DPI_AWARENESS is unnecessary), * and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows. - * + * * This variable can be set to the following values: * "0" - SDL coordinates equal Windows coordinates. No automatic window resizing when dragging * between monitors with different scale factors (unless this is performed by @@ -2082,7 +2117,7 @@ extern "C" { #define SDL_HINT_WINDOWS_DPI_SCALING "SDL_WINDOWS_DPI_SCALING" /** - * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden + * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden * * This variable can be set to the following values: * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc) @@ -2093,7 +2128,7 @@ extern "C" { #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" /** -* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called +* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called * * This variable can be set to the following values: * "0" - The window is activated when the SDL_ShowWindow function is called diff --git a/deps/sdl2/include/SDL2/SDL_joystick.h b/deps/sdl2/include/SDL2/SDL_joystick.h index 07d6a2e0..b9b4f622 100644 --- a/deps/sdl2/include/SDL2/SDL_joystick.h +++ b/deps/sdl2/include/SDL2/SDL_joystick.h @@ -44,6 +44,7 @@ #include "SDL_stdinc.h" #include "SDL_error.h" #include "SDL_guid.h" +#include "SDL_mutex.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ @@ -66,6 +67,9 @@ extern "C" { /** * The joystick structure used to identify an SDL joystick */ +#ifdef SDL_THREAD_SAFETY_ANALYSIS +extern SDL_mutex *SDL_joystick_lock; +#endif struct _SDL_Joystick; typedef struct _SDL_Joystick SDL_Joystick; @@ -131,7 +135,7 @@ typedef enum * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_LockJoysticks(void) SDL_ACQUIRE(SDL_joystick_lock); /** @@ -146,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); * * \since This function is available since SDL 2.0.7. */ -extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); +extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void) SDL_RELEASE(SDL_joystick_lock); /** * Count the number of joysticks attached to the system. @@ -284,13 +288,12 @@ extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_in /** * Get the instance ID of a joystick. * - * This can be called before any joysticks are opened. If the index is out of - * range, this function will return -1. + * This can be called before any joysticks are opened. * * \param device_index the index of the joystick to query (the N'th joystick * on the system * \returns the instance id of the selected joystick. If called on an invalid - * index, this function returns zero + * index, this function returns -1. * * \since This function is available since SDL 2.0.6. */ diff --git a/deps/sdl2/include/SDL2/SDL_keycode.h b/deps/sdl2/include/SDL2/SDL_keycode.h index 2523506d..71062230 100644 --- a/deps/sdl2/include/SDL2/SDL_keycode.h +++ b/deps/sdl2/include/SDL2/SDL_keycode.h @@ -40,7 +40,7 @@ * an SDLK_* constant for those keys that do not generate characters. * * A special exception is the number keys at the top of the keyboard which - * always map to SDLK_0...SDLK_9, regardless of layout. + * map to SDLK_0...SDLK_9 on AZERTY layouts. */ typedef Sint32 SDL_Keycode; diff --git a/deps/sdl2/include/SDL2/SDL_main.h b/deps/sdl2/include/SDL2/SDL_main.h index 14d39f1e..5cc8e591 100644 --- a/deps/sdl2/include/SDL2/SDL_main.h +++ b/deps/sdl2/include/SDL2/SDL_main.h @@ -263,6 +263,13 @@ extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_fun */ extern DECLSPEC int SDLCALL SDL_GDKRunApp(SDL_main_func mainFunction, void *reserved); +/** + * Callback from the application to let the suspend continue. + * + * \since This function is available since SDL 2.28.0. + */ +extern DECLSPEC void SDLCALL SDL_GDKSuspendComplete(void); + #endif /* __GDK__ */ #ifdef __cplusplus diff --git a/deps/sdl2/include/SDL2/SDL_mouse.h b/deps/sdl2/include/SDL2/SDL_mouse.h index c5712efc..aa075757 100644 --- a/deps/sdl2/include/SDL2/SDL_mouse.h +++ b/deps/sdl2/include/SDL2/SDL_mouse.h @@ -198,13 +198,9 @@ extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y); /** * Set relative mouse mode. * - * While the mouse is in relative mode, the cursor is hidden, and the driver - * will try to report continuous motion in the current window. Only relative - * motion events will be delivered, the mouse position will not change. - * - * Note that this function will not be able to provide continuous relative - * motion when used over Microsoft Remote Desktop, instead motion is limited - * to the bounds of the screen. + * While the mouse is in relative mode, the cursor is hidden, the mouse + * position is constrained to the window, and SDL will report continuous + * relative mouse motion even if the mouse is at the edge of the window. * * This function will flush any pending mouse motion. * @@ -389,6 +385,9 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); /** * Get the default cursor. * + * You do not have to call SDL_FreeCursor() on the return value, but it is + * safe to do so. + * * \returns the default cursor on success or NULL on failure. * * \since This function is available since SDL 2.0.0. diff --git a/deps/sdl2/include/SDL2/SDL_mutex.h b/deps/sdl2/include/SDL2/SDL_mutex.h index 54b6a53a..e679d380 100644 --- a/deps/sdl2/include/SDL2/SDL_mutex.h +++ b/deps/sdl2/include/SDL2/SDL_mutex.h @@ -31,6 +31,80 @@ #include "SDL_stdinc.h" #include "SDL_error.h" +/******************************************************************************/ +/* Enable thread safety attributes only with clang. + * The attributes can be safely erased when compiling with other compilers. + */ +#if defined(SDL_THREAD_SAFETY_ANALYSIS) && \ + defined(__clang__) && (!defined(SWIG)) +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) +#else +#define SDL_THREAD_ANNOTATION_ATTRIBUTE__(x) /* no-op */ +#endif + +#define SDL_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) + +#define SDL_SCOPED_CAPABILITY \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable) + +#define SDL_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) + +#define SDL_PT_GUARDED_BY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) + +#define SDL_ACQUIRED_BEFORE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(x)) + +#define SDL_ACQUIRED_AFTER(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(x)) + +#define SDL_REQUIRES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(x)) + +#define SDL_REQUIRES_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(x)) + +#define SDL_ACQUIRE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(x)) + +#define SDL_ACQUIRE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(x)) + +#define SDL_RELEASE(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(x)) + +#define SDL_RELEASE_SHARED(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(x)) + +#define SDL_RELEASE_GENERIC(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(release_generic_capability(x)) + +#define SDL_TRY_ACQUIRE(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(x, y)) + +#define SDL_TRY_ACQUIRE_SHARED(x, y) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(x, y)) + +#define SDL_EXCLUDES(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(x)) + +#define SDL_ASSERT_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x)) + +#define SDL_ASSERT_SHARED_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x)) + +#define SDL_RETURN_CAPABILITY(x) \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x)) + +#define SDL_NO_THREAD_SAFETY_ANALYSIS \ + SDL_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) + +/******************************************************************************/ + + #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus @@ -96,7 +170,7 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex) SDL_ACQUIRE(mutex); #define SDL_mutexP(m) SDL_LockMutex(m) /** @@ -119,7 +193,7 @@ extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); * \sa SDL_LockMutex * \sa SDL_UnlockMutex */ -extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex) SDL_TRY_ACQUIRE(0, mutex); /** * Unlock the mutex. @@ -138,7 +212,7 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); +extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex) SDL_RELEASE(mutex); #define SDL_mutexV(m) SDL_UnlockMutex(m) /** @@ -276,7 +350,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * successful it will atomically decrement the semaphore value. * * \param sem the semaphore to wait on - * \param ms the length of the timeout, in milliseconds + * \param timeout the length of the timeout, in milliseconds * \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not * succeed in the allotted time, or a negative error code on failure; * call SDL_GetError() for more information. @@ -290,7 +364,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); * \sa SDL_SemValue * \sa SDL_SemWait */ -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout); /** * Atomically increment a semaphore's value and wake waiting threads. diff --git a/deps/sdl2/include/SDL2/SDL_opengl_glext.h b/deps/sdl2/include/SDL2/SDL_opengl_glext.h index 8527e174..ff6ad12c 100644 --- a/deps/sdl2/include/SDL2/SDL_opengl_glext.h +++ b/deps/sdl2/include/SDL2/SDL_opengl_glext.h @@ -1,4 +1,8 @@ -#ifndef __gl_glext_h_ +/* SDL modified the include guard to be compatible with Mesa and Apple include guards: + * - Mesa uses: __gl_glext_h_ + * - Apple uses: __glext_h_ */ +#if !defined(__glext_h_) && !defined(__gl_glext_h_) +#define __glext_h_ 1 #define __gl_glext_h_ 1 #ifdef __cplusplus diff --git a/deps/sdl2/include/SDL2/SDL_power.h b/deps/sdl2/include/SDL2/SDL_power.h index be06c8b4..1d75704c 100644 --- a/deps/sdl2/include/SDL2/SDL_power.h +++ b/deps/sdl2/include/SDL2/SDL_power.h @@ -48,7 +48,6 @@ typedef enum SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ } SDL_PowerState; - /** * Get the current power supply details. * @@ -65,17 +64,17 @@ typedef enum * It's possible a platform can only report battery percentage or time left * but not both. * - * \param secs seconds of battery life left, you can pass a NULL here if you - * don't care, will return -1 if we can't determine a value, or - * we're not running on a battery - * \param pct percentage of battery life left, between 0 and 100, you can pass - * a NULL here if you don't care, will return -1 if we can't - * determine a value, or we're not running on a battery + * \param seconds seconds of battery life left, you can pass a NULL here if + * you don't care, will return -1 if we can't determine a + * value, or we're not running on a battery + * \param percent percentage of battery life left, between 0 and 100, you can + * pass a NULL here if you don't care, will return -1 if we + * can't determine a value, or we're not running on a battery * \returns an SDL_PowerState enum representing the current battery state. * * \since This function is available since SDL 2.0.0. */ -extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); +extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent); /* Ends C function definitions when using C++ */ #ifdef __cplusplus diff --git a/deps/sdl2/include/SDL2/SDL_render.h b/deps/sdl2/include/SDL2/SDL_render.h index c7295014..d62715a3 100644 --- a/deps/sdl2/include/SDL2/SDL_render.h +++ b/deps/sdl2/include/SDL2/SDL_render.h @@ -1731,6 +1731,11 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, * * \param renderer the rendering context * + * \threadsafety You may only call this function on the main thread. If this + * happens to work on a background thread on any given platform + * or backend, it's purely by luck and you should not rely on it + * to work next time. + * * \since This function is available since SDL 2.0.0. * * \sa SDL_RenderClear diff --git a/deps/sdl2/include/SDL2/SDL_revision.h b/deps/sdl2/include/SDL2/SDL_revision.h index e8629352..98f2177f 100644 --- a/deps/sdl2/include/SDL2/SDL_revision.h +++ b/deps/sdl2/include/SDL2/SDL_revision.h @@ -2,7 +2,7 @@ #define SDL_REVISION_NUMBER 0 #ifdef SDL_VENDOR_INFO -#define SDL_REVISION "SDL-release-2.26.5-0-gac13ca9ab (" SDL_VENDOR_INFO ")" +#define SDL_REVISION "SDL-release-2.28.1-0-g4761467b2 (" SDL_VENDOR_INFO ")" #else -#define SDL_REVISION "SDL-release-2.26.5-0-gac13ca9ab" +#define SDL_REVISION "SDL-release-2.28.1-0-g4761467b2" #endif diff --git a/deps/sdl2/include/SDL2/SDL_sensor.h b/deps/sdl2/include/SDL2/SDL_sensor.h index 3010e497..9ecce44b 100644 --- a/deps/sdl2/include/SDL2/SDL_sensor.h +++ b/deps/sdl2/include/SDL2/SDL_sensor.h @@ -84,7 +84,7 @@ typedef enum * The accelerometer returns the current acceleration in SI meters per * second squared. This measurement includes the force of gravity, so * a device at rest will have an value of SDL_STANDARD_GRAVITY away - * from the center of the earth. + * from the center of the earth, which is a positive Y value. * * values[0]: Acceleration on the x axis * values[1]: Acceleration on the y axis diff --git a/deps/sdl2/include/SDL2/SDL_stdinc.h b/deps/sdl2/include/SDL2/SDL_stdinc.h index bbce3d06..182ed86e 100644 --- a/deps/sdl2/include/SDL2/SDL_stdinc.h +++ b/deps/sdl2/include/SDL2/SDL_stdinc.h @@ -30,12 +30,6 @@ #include "SDL_config.h" -#ifdef __APPLE__ -#ifndef _DARWIN_C_SOURCE -#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */ -#endif -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif @@ -85,7 +79,9 @@ Visual Studio. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx for more information. */ -# define _USE_MATH_DEFINES +# ifndef _USE_MATH_DEFINES +# define _USE_MATH_DEFINES +# endif # endif # include #endif @@ -528,9 +524,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) { -#ifdef __APPLE__ - memset_pattern4(dst, &val, dwords * 4); -#elif defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && defined(__i386__) int u0, u1, u2; __asm__ __volatile__ ( "cld \n\t" @@ -694,7 +688,7 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t * outbytesleft); /** - * This function converts a string between encodings in one pass, returning a + * This function converts a buffer or string between encodings in one pass, returning a * string that must be freed with SDL_free() or NULL on error. * * \since This function is available since SDL 2.0.0. @@ -722,6 +716,20 @@ size_t strlcpy(char* dst, const char* src, size_t size); size_t strlcat(char* dst, const char* src, size_t size); #endif +#ifndef HAVE_WCSLCPY +size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +#ifndef HAVE_WCSLCAT +size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); +#endif + +/* Starting LLVM 16, the analyser errors out if these functions do not have + their prototype defined (clang-diagnostic-implicit-function-declaration) */ +#include +#include +#include + #define SDL_malloc malloc #define SDL_calloc calloc #define SDL_realloc realloc diff --git a/deps/sdl2/include/SDL2/SDL_thread.h b/deps/sdl2/include/SDL2/SDL_thread.h index 849f70bd..b829bbad 100644 --- a/deps/sdl2/include/SDL2/SDL_thread.h +++ b/deps/sdl2/include/SDL2/SDL_thread.h @@ -35,7 +35,7 @@ #include "SDL_atomic.h" #include "SDL_mutex.h" -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) #include /* _beginthreadex() and _endthreadex() */ #endif #if defined(__OS2__) /* for _beginthread() and _endthread() */ @@ -88,7 +88,7 @@ typedef enum { typedef int (SDLCALL * SDL_ThreadFunction) (void *data); -#if defined(__WIN32__) || defined(__GDK__) +#if (defined(__WIN32__) || defined(__GDK__)) && !defined(__WINRT__) /** * \file SDL_thread.h * diff --git a/deps/sdl2/include/SDL2/SDL_version.h b/deps/sdl2/include/SDL2/SDL_version.h index 5c357a7a..59693902 100644 --- a/deps/sdl2/include/SDL2/SDL_version.h +++ b/deps/sdl2/include/SDL2/SDL_version.h @@ -58,8 +58,8 @@ typedef struct SDL_version /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL */ #define SDL_MAJOR_VERSION 2 -#define SDL_MINOR_VERSION 26 -#define SDL_PATCHLEVEL 5 +#define SDL_MINOR_VERSION 28 +#define SDL_PATCHLEVEL 1 /** * Macro to determine SDL version program was compiled against. diff --git a/deps/sdl2/include/SDL2/SDL_video.h b/deps/sdl2/include/SDL2/SDL_video.h index c70facb5..c8b2d7a0 100644 --- a/deps/sdl2/include/SDL2/SDL_video.h +++ b/deps/sdl2/include/SDL2/SDL_video.h @@ -187,7 +187,8 @@ typedef enum SDL_DISPLAYEVENT_NONE, /**< Never used */ SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */ SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */ - SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_DISCONNECTED, /**< Display has been removed from the system */ + SDL_DISPLAYEVENT_MOVED /**< Display has changed position */ } SDL_DisplayEventID; /** @@ -1274,6 +1275,17 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window); extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags); +/** + * Return whether the window has a surface associated with it. + * + * \returns SDL_TRUE if there is a surface associated with the window, or SDL_FALSE otherwise. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + */ +extern DECLSPEC SDL_bool SDLCALL SDL_HasWindowSurface(SDL_Window *window); + /** * Get the SDL surface associated with the window. * @@ -1294,6 +1306,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, * * \since This function is available since SDL 2.0.0. * + * \sa SDL_DestroyWindowSurface + * \sa SDL_HasWindowSurface * \sa SDL_UpdateWindowSurface * \sa SDL_UpdateWindowSurfaceRects */ @@ -1328,7 +1342,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window); * * \param window the window to update * \param rects an array of SDL_Rect structures representing areas of the - * surface to copy + * surface to copy, in pixels * \param numrects the number of rectangles * \returns 0 on success or a negative error code on failure; call * SDL_GetError() for more information. @@ -1342,6 +1356,20 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects, int numrects); +/** + * Destroy the surface associated with the window. + * + * \param window the window to update + * \returns 0 on success or a negative error code on failure; call + * SDL_GetError() for more information. + * + * \since This function is available since SDL 2.28.0. + * + * \sa SDL_GetWindowSurface + * \sa SDL_HasWindowSurface + */ +extern DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window); + /** * Set a window's input grab mode. * diff --git a/deps/sdl2/include/SDL2/begin_code.h b/deps/sdl2/include/SDL2/begin_code.h index 1f01e0bc..4142ffeb 100644 --- a/deps/sdl2/include/SDL2/begin_code.h +++ b/deps/sdl2/include/SDL2/begin_code.h @@ -28,10 +28,10 @@ */ /* This shouldn't be nested -- included it around code only. */ -#ifdef _begin_code_h +#ifdef SDL_begin_code_h #error Nested inclusion of begin_code.h #endif -#define _begin_code_h +#define SDL_begin_code_h #ifndef SDL_DEPRECATED # if defined(__GNUC__) && (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */ @@ -171,17 +171,17 @@ #define SDL_FALLTHROUGH [[fallthrough]] #else #if defined(__has_attribute) -#define _HAS_FALLTHROUGH __has_attribute(__fallthrough__) +#define SDL_HAS_FALLTHROUGH __has_attribute(__fallthrough__) #else -#define _HAS_FALLTHROUGH 0 +#define SDL_HAS_FALLTHROUGH 0 #endif /* __has_attribute */ -#if _HAS_FALLTHROUGH && \ +#if SDL_HAS_FALLTHROUGH && \ ((defined(__GNUC__) && __GNUC__ >= 7) || \ (defined(__clang_major__) && __clang_major__ >= 10)) #define SDL_FALLTHROUGH __attribute__((__fallthrough__)) #else #define SDL_FALLTHROUGH do {} while (0) /* fallthrough */ -#endif /* _HAS_FALLTHROUGH */ -#undef _HAS_FALLTHROUGH +#endif /* SDL_HAS_FALLTHROUGH */ +#undef SDL_HAS_FALLTHROUGH #endif /* C++17 or C2x */ #endif /* SDL_FALLTHROUGH not defined */ diff --git a/deps/sdl2/include/SDL2/close_code.h b/deps/sdl2/include/SDL2/close_code.h index 874a926b..b5ff3e20 100644 --- a/deps/sdl2/include/SDL2/close_code.h +++ b/deps/sdl2/include/SDL2/close_code.h @@ -26,10 +26,10 @@ * after you finish any function and structure declarations in your headers */ -#ifndef _begin_code_h +#ifndef SDL_begin_code_h #error close_code.h included without matching begin_code.h #endif -#undef _begin_code_h +#undef SDL_begin_code_h /* Reset structure packing at previous byte alignment */ #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) diff --git a/deps/sdl2/lib/cmake/SDL2/SDL2Config.cmake b/deps/sdl2/lib/cmake/SDL2/SDL2Config.cmake index f73e3a45..f9d15a08 100644 --- a/deps/sdl2/lib/cmake/SDL2/SDL2Config.cmake +++ b/deps/sdl2/lib/cmake/SDL2/SDL2Config.cmake @@ -54,6 +54,18 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake") set(SDL2_SDL2test_FOUND TRUE) endif() + +include("${CMAKE_CURRENT_LIST_DIR}/sdlfind.cmake") + +set(SDL_ALSA OFF) +set(SDL_ALSA_SHARED OFF) +if(SDL_ALSA AND NOT SDL_ALSA_SHARED AND TARGET SDL2::SDL2-static) + sdlFindALSA() +endif() +unset(SDL_ALSA) +unset(SDL_ALSA_SHARED) + + check_required_components(SDL2) # Create SDL2::SDL2 alias for static-only builds diff --git a/deps/sdl2/lib/cmake/SDL2/SDL2ConfigVersion.cmake b/deps/sdl2/lib/cmake/SDL2/SDL2ConfigVersion.cmake index 3786981b..a4b37ec2 100644 --- a/deps/sdl2/lib/cmake/SDL2/SDL2ConfigVersion.cmake +++ b/deps/sdl2/lib/cmake/SDL2/SDL2ConfigVersion.cmake @@ -7,7 +7,7 @@ # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. # The variable CVF_VERSION must be set before calling configure_file(). -set(PACKAGE_VERSION "2.26.5") +set(PACKAGE_VERSION "2.28.1") if (PACKAGE_FIND_VERSION_RANGE) # Package version must be in the requested version range diff --git a/deps/sdl2/lib/cmake/SDL2/SDL2mainTargets.cmake b/deps/sdl2/lib/cmake/SDL2/SDL2mainTargets.cmake index ab03fcbc..2a9a3562 100644 --- a/deps/sdl2/lib/cmake/SDL2/SDL2mainTargets.cmake +++ b/deps/sdl2/lib/cmake/SDL2/SDL2mainTargets.cmake @@ -59,7 +59,9 @@ endif() add_library(SDL2::SDL2main STATIC IMPORTED) set_target_properties(SDL2::SDL2main PROPERTIES + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include/SDL2" + INTERFACE_SDL_VERSION "SDL2" ) # Load information for each installed configuration. diff --git a/deps/sdl2/lib/cmake/SDL2/SDL2staticTargets.cmake b/deps/sdl2/lib/cmake/SDL2/SDL2staticTargets.cmake index 383fde96..5fa159ac 100644 --- a/deps/sdl2/lib/cmake/SDL2/SDL2staticTargets.cmake +++ b/deps/sdl2/lib/cmake/SDL2/SDL2staticTargets.cmake @@ -60,9 +60,11 @@ add_library(SDL2::SDL2-static STATIC IMPORTED) set_target_properties(SDL2::SDL2-static PROPERTIES COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED" + COMPATIBLE_INTERFACE_STRING "SDL_VERSION" INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include/SDL2" INTERFACE_LINK_LIBRARIES "\$;-Wl,-framework,CoreVideo;-Wl,-framework,Cocoa;-Wl,-framework,IOKit;-Wl,-framework,ForceFeedback;-Wl,-framework,Carbon;-Wl,-framework,CoreAudio;-Wl,-framework,AudioToolbox;-Wl,-framework,AVFoundation;-Wl,-framework,Foundation;-Wl,-weak_framework,Metal;-Wl,-weak_framework,QuartzCore;\$" INTERFACE_SDL2_SHARED "FALSE" + INTERFACE_SDL_VERSION "SDL2" ) if(CMAKE_VERSION VERSION_LESS 2.8.12) diff --git a/deps/sdl2/lib/cmake/SDL2/sdlfind.cmake b/deps/sdl2/lib/cmake/SDL2/sdlfind.cmake new file mode 100644 index 00000000..a8145484 --- /dev/null +++ b/deps/sdl2/lib/cmake/SDL2/sdlfind.cmake @@ -0,0 +1,9 @@ + +macro(sdlFindALSA) + find_package(ALSA MODULE) + if(ALSA_FOUND AND (NOT TARGET ALSA::ALSA) ) + add_Library(ALSA::ALSA UNKNOWN IMPORTED) + set_property(TARGET ALSA::ALSA PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIRS}) + set_property(TARGET ALSA::ALSA APPEND PROPERTY IMPORTED_LOCATION ${ALSA_LIBRARY}) + endif() +endmacro() diff --git a/deps/sdl2/lib/libSDL2.a b/deps/sdl2/lib/libSDL2.a index 7dadf637..296e73be 100644 Binary files a/deps/sdl2/lib/libSDL2.a and b/deps/sdl2/lib/libSDL2.a differ diff --git a/deps/sdl2/lib/pkgconfig/sdl2.pc b/deps/sdl2/lib/pkgconfig/sdl2.pc index 9d24f28a..7c4b8fa8 100644 --- a/deps/sdl2/lib/pkgconfig/sdl2.pc +++ b/deps/sdl2/lib/pkgconfig/sdl2.pc @@ -7,8 +7,8 @@ includedir=${prefix}/include Name: sdl2 Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. -Version: 2.26.5 -Requires: +Version: 2.28.1 +Requires.private: Conflicts: Libs: -L${libdir} -lSDL2 -lSDL2 -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,IOKit -Wl,-framework,ForceFeedback -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AVFoundation -Wl,-framework,Foundation -Wl,-weak_framework,Metal -Wl,-weak_framework,QuartzCore -lm Cflags: -I${includedir} -I${includedir}/SDL2 -D_THREAD_SAFE diff --git a/deps/zlib-ng/include/zconf.h b/deps/zlib-ng/include/zconf.h index 1c03f294..657effa7 100644 --- a/deps/zlib-ng/include/zconf.h +++ b/deps/zlib-ng/include/zconf.h @@ -6,18 +6,12 @@ #ifndef ZCONF_H #define ZCONF_H +#include "zlib_name_mangling.h" + #if !defined(_WIN32) && defined(__WIN32__) # define _WIN32 #endif -#ifdef __STDC_VERSION__ -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif - /* Clang macro for detecting declspec support * https://clang.llvm.org/docs/LanguageExtensions.html#has-declspec-attribute */ @@ -41,6 +35,9 @@ * created by gzip. (Files created by minigzip can still be extracted by * gzip.) */ +#ifndef MIN_WBITS +# define MIN_WBITS 8 /* 256 LZ77 window */ +#endif #ifndef MAX_WBITS # define MAX_WBITS 15 /* 32K LZ77 window */ #endif @@ -105,6 +102,9 @@ # define Z_EXPORTVA #endif +/* Conditional exports */ +#define ZNG_CONDEXPORT Z_INTERNAL + /* For backwards compatibility */ #ifndef ZEXTERN @@ -198,4 +198,6 @@ typedef PTRDIFF_TYPE ptrdiff_t; # endif #endif +typedef size_t z_size_t; + #endif /* ZCONF_H */ diff --git a/deps/zlib-ng/include/zlib.h b/deps/zlib-ng/include/zlib.h index 4303e38c..9e2583f3 100644 --- a/deps/zlib-ng/include/zlib.h +++ b/deps/zlib-ng/include/zlib.h @@ -1,9 +1,9 @@ #ifndef ZLIB_H_ #define ZLIB_H_ /* zlib.h -- interface of the 'zlib-ng' compression library - Forked from and compatible with zlib 1.2.11 + Forked from and compatible with zlib 1.2.13 - Copyright (C) 1995-2016 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -34,6 +34,7 @@ # error Include zlib-ng.h for zlib-ng API or zlib.h for zlib-compat API but not both #endif +#ifndef RC_INVOKED #include #include @@ -42,23 +43,25 @@ #ifndef ZCONF_H # error Missing zconf.h add binary output directory to include directories #endif +#endif /* RC_INVOKED */ #ifdef __cplusplus extern "C" { #endif -#define ZLIBNG_VERSION "2.0.7" -#define ZLIBNG_VERNUM 0x2070 +#define ZLIBNG_VERSION "2.1.3" +#define ZLIBNG_VERNUM 0x020103F0L /* MMNNRRSM: major minor revision status modified */ #define ZLIBNG_VER_MAJOR 2 -#define ZLIBNG_VER_MINOR 0 -#define ZLIBNG_VER_REVISION 7 -#define ZLIBNG_VER_SUBREVISION 0 +#define ZLIBNG_VER_MINOR 1 +#define ZLIBNG_VER_REVISION 3 +#define ZLIBNG_VER_STATUS F /* 0=devel, 1-E=beta, F=Release */ +#define ZLIBNG_VER_MODIFIED 0 /* non-zero if modified externally from zlib-ng */ -#define ZLIB_VERSION "1.2.11.zlib-ng" -#define ZLIB_VERNUM 0x12bf +#define ZLIB_VERSION "1.2.13.zlib-ng" +#define ZLIB_VERNUM 0x12df #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 11 +#define ZLIB_VER_REVISION 13 #define ZLIB_VER_SUBREVISION 15 /* 15=fork (0xf) */ /* @@ -1729,19 +1732,18 @@ Z_EXTERN unsigned long Z_EXPORT crc32_combine(unsigned long crc1, unsigned long */ /* -Z_EXTERN void Z_EXPORT crc32_combine_gen(uint32_t op[32], z_off_t len2); +Z_EXTERN unsigned long Z_EXPORT crc32_combine_gen(z_off_t len2); - Generate the operator op corresponding to length len2, to be used with - crc32_combine_op(). op must have room for 32 z_crc_t values. (32 is the - number of bits in the CRC.) + Return the operator corresponding to length len2, to be used with + crc32_combine_op(). */ -Z_EXTERN uint32_t Z_EXPORT crc32_combine_op(uint32_t crc1, uint32_t crc2, - const uint32_t *op); +Z_EXTERN unsigned long Z_EXPORT crc32_combine_op(unsigned long crc1, unsigned long crc2, + const unsigned long op); /* Give the same result as crc32_combine(), using op in place of len2. op is is generated from len2 by crc32_combine_gen(). This will be faster than - crc32_combine() if the generated op is used many times. + crc32_combine() if the generated op is used more than once. */ @@ -1796,7 +1798,7 @@ Z_EXTERN int Z_EXPORT gzgetc_(gzFile file); /* backward compatibility */ Z_EXTERN z_off64_t Z_EXPORT gzoffset64(gzFile); Z_EXTERN unsigned long Z_EXPORT adler32_combine64(unsigned long, unsigned long, z_off64_t); Z_EXTERN unsigned long Z_EXPORT crc32_combine64(unsigned long, unsigned long, z_off64_t); - Z_EXTERN void Z_EXPORT crc32_combine_gen64(uint32_t *op, z_off64_t); + Z_EXTERN unsigned long Z_EXPORT crc32_combine_gen64(z_off64_t); #endif #endif @@ -1815,7 +1817,7 @@ Z_EXTERN int Z_EXPORT gzgetc_(gzFile file); /* backward compatibility */ Z_EXTERN z_off_t Z_EXPORT gzoffset64(gzFile); Z_EXTERN unsigned long Z_EXPORT adler32_combine64(unsigned long, unsigned long, z_off_t); Z_EXTERN unsigned long Z_EXPORT crc32_combine64(unsigned long, unsigned long, z_off_t); - Z_EXTERN void Z_EXPORT crc32_combine_gen64(uint32_t *op, z_off64_t); + Z_EXTERN unsigned long Z_EXPORT crc32_combine_gen64(z_off64_t); # endif #else # ifndef Z_SOLO @@ -1823,10 +1825,10 @@ Z_EXTERN int Z_EXPORT gzgetc_(gzFile file); /* backward compatibility */ Z_EXTERN z_off_t Z_EXPORT gzseek(gzFile, z_off_t, int); Z_EXTERN z_off_t Z_EXPORT gztell(gzFile); Z_EXTERN z_off_t Z_EXPORT gzoffset(gzFile); -# endif +# endif Z_EXTERN unsigned long Z_EXPORT adler32_combine(unsigned long, unsigned long, z_off_t); Z_EXTERN unsigned long Z_EXPORT crc32_combine(unsigned long, unsigned long, z_off_t); - Z_EXTERN void Z_EXPORT crc32_combine_gen(uint32_t *op, z_off_t); + Z_EXTERN unsigned long Z_EXPORT crc32_combine_gen(z_off_t); #endif /* undocumented functions */ diff --git a/deps/zlib-ng/include/zlib_name_mangling.h b/deps/zlib-ng/include/zlib_name_mangling.h new file mode 100644 index 00000000..b24cb834 --- /dev/null +++ b/deps/zlib-ng/include/zlib_name_mangling.h @@ -0,0 +1,8 @@ +/* zlib_name_mangling.h has been automatically generated from + * zlib_name_mangling.h.empty because ZLIB_SYMBOL_PREFIX was NOT set. + */ + +#ifndef ZLIB_NAME_MANGLING_H +#define ZLIB_NAME_MANGLING_H + +#endif /* ZLIB_NAME_MANGLING_H */ diff --git a/deps/zlib-ng/lib/libz.a b/deps/zlib-ng/lib/libz.a index 02473a74..3b7e6154 100644 Binary files a/deps/zlib-ng/lib/libz.a and b/deps/zlib-ng/lib/libz.a differ diff --git a/deps/zlib-ng/lib/pkgconfig/zlib.pc b/deps/zlib-ng/lib/pkgconfig/zlib.pc index 8f5129b1..97eaf16b 100644 --- a/deps/zlib-ng/lib/pkgconfig/zlib.pc +++ b/deps/zlib-ng/lib/pkgconfig/zlib.pc @@ -1,12 +1,13 @@ prefix= exec_prefix=${prefix} +symbol_prefix= libdir=${exec_prefix}/lib sharedlibdir=${libdir} includedir=${prefix}/include Name: zlib Description: zlib-ng compression library -Version: 1.2.11.zlib-ng +Version: 1.2.13.zlib-ng Requires: Libs: -L${libdir} -L${sharedlibdir} -lz diff --git a/patch/7zip-fix-errors.diff b/patch/7zip-fix-errors.diff index 11ad8733..5a051c73 100644 --- a/patch/7zip-fix-errors.diff +++ b/patch/7zip-fix-errors.diff @@ -1,46 +1,27 @@ ---- a/CPP/7zip/7zip_gcc.mak -+++ b/CPP/7zip/7zip_gcc.mak -@@ -17,10 +17,6 @@ - PROGPATH_STATIC = $(O)/$(PROG)s +--- a/C/Threads.c ++++ b/C/Threads.c +@@ -371,10 +371,11 @@ + WRes Event_Set(CEvent *p) + { ++ int res1, res2; + RINOK(pthread_mutex_lock(&p->_mutex)) + p->_state = True; +- int res1 = pthread_cond_broadcast(&p->_cond); +- int res2 = pthread_mutex_unlock(&p->_mutex); ++ res1 = pthread_cond_broadcast(&p->_cond); ++ res2 = pthread_mutex_unlock(&p->_mutex); + return (res2 ? res2 : res1); + } --ifneq ($(CC), xlc) --CFLAGS_WARN_WALL = -Wall -Werror -Wextra --endif -- - # for object file - CFLAGS_BASE_LIST = -c - # CFLAGS_BASE_LIST = -S ---- a/CPP/7zip/Archive/ApfsHandler.cpp -+++ b/CPP/7zip/Archive/ApfsHandler.cpp -@@ -983,7 +983,7 @@ - INODE_ALLOCATION_SPILLEDOVER = 0x00010000, - INODE_FAST_PROMOTE = 0x00020000, - */ --INODE_HAS_UNCOMPRESSED_SIZE = 0x00040000, -+INODE_HAS_UNCOMPRESSED_SIZE = 0x00040000 - /* - INODE_IS_PURGEABLE = 0x00080000, - INODE_WANTS_TO_BE_PURGEABLE = 0x00100000, ---- a/CPP/7zip/Common/FileStreams.cpp -+++ b/CPP/7zip/Common/FileStreams.cpp -@@ -12,7 +12,7 @@ - #include +--- a/CPP/7zip/UI/Common/EnumDirItems.cpp ++++ b/CPP/7zip/UI/Common/EnumDirItems.cpp +@@ -287,7 +287,7 @@ + + CObjectVector entries; - // for major()/minor(): --#if defined(__FreeBSD__) || defined(BSD) -+#if 1 - #include - #else - #include ---- a/CPP/7zip/UI/Common/UpdateCallback.cpp -+++ b/CPP/7zip/UI/Common/UpdateCallback.cpp -@@ -9,7 +9,7 @@ - // #include - - // for major()/minor(): --#if defined(__FreeBSD__) || defined(BSD) -+#if 1 - #include - #else - #include +- for (unsigned ttt = 0; ; ttt++) ++ for (;;) + { + bool found; + NFind::CDirEntry de;