diff options
author | Job Bautista <jobbautista9@protonmail.com> | 2022-06-30 13:55:14 +0800 |
---|---|---|
committer | Job Bautista <jobbautista9@protonmail.com> | 2022-06-30 13:55:14 +0800 |
commit | 10a37f462e7b4357feda9284dac608c0da0a416e (patch) | |
tree | ea9a36cc266c0171f1ec277bfaba253203a4c48a /media | |
parent | 922edb1d933f96c3bf929d5294fc522a4a460864 (diff) | |
download | uxp-10a37f462e7b4357feda9284dac608c0da0a416e.tar.gz |
Issue #1769 - Follow-up: Put JXL_DEPRECATED in front of types
This fixes building with Clang on Mac.
I also separated our changes to JXL_DEPRECATED into a patch file.
Diffstat (limited to 'media')
-rw-r--r-- | media/libjxl/mcp-deprecatedchange.patch | 32 | ||||
-rwxr-xr-x | media/libjxl/patch.sh | 2 | ||||
-rw-r--r-- | media/libjxl/src/lib/include/jxl/types.h | 4 |
3 files changed, 36 insertions, 2 deletions
diff --git a/media/libjxl/mcp-deprecatedchange.patch b/media/libjxl/mcp-deprecatedchange.patch new file mode 100644 index 0000000000..77988bbc44 --- /dev/null +++ b/media/libjxl/mcp-deprecatedchange.patch @@ -0,0 +1,32 @@ +diff -u /include/jxl/jxl_export.h +--- /include/jxl/jxl_export.h ++++ /include/jxl/jxl_export.h +@@ -9,8 +9,7 @@ + + #define JXL_EXPORT + +-// TODO: go back to [[deprecated]] +-// https://github.com/libjxl/libjxl/issues/1388 +-#define JXL_DEPRECATED __attribute__((__deprecated__)) ++// MSVC requires [[deprecated]] ++#define JXL_DEPRECATED [[deprecated]] + + #endif /* JXL_EXPORT_H */ +diff -u /src/lib/include/jxl/types.h /src/lib/include/jxl/types.h +--- /src/lib/include/jxl/types.h ++++ /src/lib/include/jxl/types.h +@@ -57,11 +57,11 @@ typedef enum { + + /* DEPRECATED: bit-packed 1-bit data type. Use JXL_TYPE_UINT8 instead. + */ +-static const int JXL_DEPRECATED JXL_TYPE_BOOLEAN = 1; ++JXL_DEPRECATED static const int JXL_TYPE_BOOLEAN = 1; + + /* DEPRECATED: uint32_t data type. Use JXL_TYPE_FLOAT instead. + */ +-static const int JXL_DEPRECATED JXL_TYPE_UINT32 = 4; ++JXL_DEPRECATED static const int JXL_TYPE_UINT32 = 4; + + /** Ordering of multi-byte data. + */ + diff --git a/media/libjxl/patch.sh b/media/libjxl/patch.sh new file mode 100755 index 0000000000..fa95ac32c7 --- /dev/null +++ b/media/libjxl/patch.sh @@ -0,0 +1,2 @@ +#!/bin/sh +patch -p1 < mcp-deprecatedchange.patch diff --git a/media/libjxl/src/lib/include/jxl/types.h b/media/libjxl/src/lib/include/jxl/types.h index 49b7ad5b93..ef804edcf1 100644 --- a/media/libjxl/src/lib/include/jxl/types.h +++ b/media/libjxl/src/lib/include/jxl/types.h @@ -57,11 +57,11 @@ typedef enum { /* DEPRECATED: bit-packed 1-bit data type. Use JXL_TYPE_UINT8 instead. */ -static const int JXL_DEPRECATED JXL_TYPE_BOOLEAN = 1; +JXL_DEPRECATED static const int JXL_TYPE_BOOLEAN = 1; /* DEPRECATED: uint32_t data type. Use JXL_TYPE_FLOAT instead. */ -static const int JXL_DEPRECATED JXL_TYPE_UINT32 = 4; +JXL_DEPRECATED static const int JXL_TYPE_UINT32 = 4; /** Ordering of multi-byte data. */ |