commit: bdae96e5be6b581f55854cd93a2b6894bd5a03ec Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Jan 8 05:58:36 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Jan 8 05:58:43 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdae96e5
dev-games/aseprite: drop unused patches See 23229b6a5a9a249890bc7969865395ca8946e376. Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/aseprite-1.3.13_strict-aliasing.patch | 49 ------- .../files/aseprite-1.3.2_strict-aliasing.patch | 55 -------- .../files/aseprite-1.3.5_laf-strict-aliasing.patch | 155 --------------------- 3 files changed, 259 deletions(-) diff --git a/dev-games/aseprite/files/aseprite-1.3.13_strict-aliasing.patch b/dev-games/aseprite/files/aseprite-1.3.13_strict-aliasing.patch deleted file mode 100644 index 377ff25e359f..000000000000 --- a/dev-games/aseprite/files/aseprite-1.3.13_strict-aliasing.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 896b7ffc1767e0d687835b14e80fe9db3ddfbb4c Mon Sep 17 00:00:00 2001 -From: "Azamat H. Hackimov" <[email protected]> -Date: Tue, 2 Jan 2024 21:09:04 +0300 -Subject: [PATCH] Fix strict-aliasing warnings - ---- a/src/dio/aseprite_decoder.cpp -+++ b/src/dio/aseprite_decoder.cpp -@@ -28,10 +28,20 @@ - #include "zlib.h" - - #include <cstdio> -+#include <cstring> - #include <vector> - - namespace dio { - -+template <typename T> -+T -+copy_reinterpret_cast(const void* ptr) -+{ -+ T tmp; -+ std::memcpy(&tmp, ptr, sizeof(T)); -+ return tmp; -+} -+ - bool AsepriteDecoder::decode() - { - bool ignore_old_color_chunks = false; -@@ -413,7 +423,7 @@ float AsepriteDecoder::readFloat() - - // Little endian. - int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); -- return *reinterpret_cast<float*>(&v); -+ return *copy_reinterpret_cast<float*>(&v); - } - - double AsepriteDecoder::readDouble() -@@ -448,7 +458,7 @@ double AsepriteDecoder::readDouble() - long long v = (((long long)b8 << 56) | ((long long)b7 << 48) | ((long long)b6 << 40) | - ((long long)b5 << 32) | ((long long)b4 << 24) | ((long long)b3 << 16) | - ((long long)b2 << 8) | (long long)b1); -- return *reinterpret_cast<double*>(&v); -+ return *copy_reinterpret_cast<double*>(&v); - } - - doc::Palette* AsepriteDecoder::readColorChunk(doc::Palette* prevPal, doc::frame_t frame) --- -2.48.1 - diff --git a/dev-games/aseprite/files/aseprite-1.3.2_strict-aliasing.patch b/dev-games/aseprite/files/aseprite-1.3.2_strict-aliasing.patch deleted file mode 100644 index de88b29a82aa..000000000000 --- a/dev-games/aseprite/files/aseprite-1.3.2_strict-aliasing.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 4e2066a7eb108503bfea2092672329e19ffbde49 Mon Sep 17 00:00:00 2001 -From: "Azamat H. Hackimov" <[email protected]> -Date: Tue, 2 Jan 2024 21:09:04 +0300 -Subject: [PATCH] Fix strict-aliasing warnings - ---- - src/dio/aseprite_decoder.cpp | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/dio/aseprite_decoder.cpp b/src/dio/aseprite_decoder.cpp -index e01fbba32..209a67307 100644 ---- a/src/dio/aseprite_decoder.cpp -+++ b/src/dio/aseprite_decoder.cpp -@@ -28,10 +28,20 @@ - #include "zlib.h" - - #include <cstdio> -+#include <cstring> - #include <vector> - - namespace dio { - -+template <typename T> -+T -+copy_reinterpret_cast(const void* ptr) -+{ -+ T tmp; -+ std::memcpy(&tmp, ptr, sizeof(T)); -+ return tmp; -+} -+ - bool AsepriteDecoder::decode() - { - bool ignore_old_color_chunks = false; -@@ -425,7 +435,7 @@ float AsepriteDecoder::readFloat() - - // Little endian. - int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); -- return *reinterpret_cast<float*>(&v); -+ return *copy_reinterpret_cast<float*>(&v); - } - - double AsepriteDecoder::readDouble() -@@ -465,7 +475,7 @@ double AsepriteDecoder::readDouble() - ((long long)b3 << 16) | - ((long long)b2 << 8) | - (long long)b1); -- return *reinterpret_cast<double*>(&v); -+ return *copy_reinterpret_cast<double*>(&v); - } - - doc::Palette* AsepriteDecoder::readColorChunk(doc::Palette* prevPal, --- -2.41.0 - diff --git a/dev-games/aseprite/files/aseprite-1.3.5_laf-strict-aliasing.patch b/dev-games/aseprite/files/aseprite-1.3.5_laf-strict-aliasing.patch deleted file mode 100644 index de6d5ffe3e7c..000000000000 --- a/dev-games/aseprite/files/aseprite-1.3.5_laf-strict-aliasing.patch +++ /dev/null @@ -1,155 +0,0 @@ -https://github.com/aseprite/laf/pull/84 -From: "Azamat H. Hackimov" <[email protected]> -Date: Sun, 14 Apr 2024 21:47:02 +0300 -Subject: [PATCH] Fix strict-alias warnings - -reinterpret_cast on pointers break strict-aliasing rule (-Wstrict-aliasing). Implemented internal function copy_reinterpret_cast that memcpy pointer into type, that can be converted to desired type. ---- a/laf/base/cfile.cpp -+++ b/laf/base/cfile.cpp -@@ -7,6 +7,7 @@ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif -+#include "base/mem_utils.h" - - #include <cstdio> - -@@ -114,7 +115,7 @@ float fgetf(FILE* file) - - // Little endian. - int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); -- return *reinterpret_cast<float*>(&v); -+ return *copy_reinterpret_cast<float*>(&v); - } - - // Reads a 64-bit double-precision floating point number using -@@ -156,7 +157,7 @@ double fgetd(FILE* file) - ((long long)b3 << 16) | - ((long long)b2 << 8) | - (long long)b1); -- return *reinterpret_cast<double*>(&v); -+ return *copy_reinterpret_cast<double*>(&v); - } - - // Writes a word using little-endian byte ordering. -@@ -231,7 +232,7 @@ int fputq(long long l, FILE* file) - // Returns 0 in success or -1 in error - int fputf(float l, FILE* file) - { -- int b = *(reinterpret_cast<int*>(&l)); -+ int b = *(copy_reinterpret_cast<int*>(&l)); - int b1, b2, b3, b4; - - // Little endian. -@@ -254,7 +255,7 @@ int fputf(float l, FILE* file) - // Returns 0 in success or -1 in error - int fputd(double l, FILE* file) - { -- long long b = *(reinterpret_cast<long long*>(&l)); -+ long long b = *(copy_reinterpret_cast<long long*>(&l)); - int b1, b2, b3, b4, b5, b6, b7, b8; - - // Little endian. ---- a/laf/base/mem_utils.h -+++ b/laf/base/mem_utils.h -@@ -8,10 +8,18 @@ - #define BASE_MEM_UTILS_H_INCLUDED - #pragma once - -+#include <cstring> - #include <string> - - namespace base { - -+ template<typename T> -+ T copy_reinterpret_cast(const void* ptr) { -+ T tmp; -+ std::memcpy(&tmp, ptr, sizeof(T)); -+ return tmp; -+ } -+ - std::string get_pretty_memory_size(std::size_t memsize); - - } // namespace base ---- a/laf/base/serialization.cpp -+++ b/laf/base/serialization.cpp -@@ -8,6 +8,7 @@ - #include "config.h" - #endif - -+#include "base/mem_utils.h" - #include "base/serialization.h" - - #include <iostream> -@@ -57,7 +58,7 @@ std::ostream& little_endian::write64(std::ostream& os, uint64_t qword) - - std::ostream& little_endian::write_float(std::ostream& os, float value) - { -- int b = *(reinterpret_cast<int*>(&value)); -+ int b = *(copy_reinterpret_cast<int*>(&value)); - os.put((int)((b & 0x000000ffl))); - os.put((int)((b & 0x0000ff00l) >> 8)); - os.put((int)((b & 0x00ff0000l) >> 16)); -@@ -67,7 +68,7 @@ std::ostream& little_endian::write_float(std::ostream& os, float value) - - std::ostream& little_endian::write_double(std::ostream& os, double value) - { -- long long b = *(reinterpret_cast<long long*>(&value)); -+ long long b = *(copy_reinterpret_cast<long long*>(&value)); - os.put((int)((b & 0x00000000000000ffl))); - os.put((int)((b & 0x000000000000ff00l) >> 8)); - os.put((int)((b & 0x0000000000ff0000l) >> 16)); -@@ -126,7 +127,7 @@ float little_endian::read_float(std::istream& is) - b3 = is.get(); - b4 = is.get(); - int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); -- return *reinterpret_cast<float*>(&v); -+ return *copy_reinterpret_cast<float*>(&v); - } - - double little_endian::read_double(std::istream& is) -@@ -148,7 +149,7 @@ double little_endian::read_double(std::istream& is) - ((long long)b3 << 16) | - ((long long)b2 << 8) | - (long long)b1); -- return *reinterpret_cast<double*>(&v); -+ return *copy_reinterpret_cast<double*>(&v); - } - - std::ostream& big_endian::write16(std::ostream& os, uint16_t word) -@@ -182,7 +183,7 @@ std::ostream& big_endian::write64(std::ostream& os, uint64_t qword) - - std::ostream& big_endian::write_float(std::ostream& os, float value) - { -- int b = *(reinterpret_cast<int*>(&value)); -+ int b = *(copy_reinterpret_cast<int*>(&value)); - os.put((int)((b & 0xff000000l) >> 24)); - os.put((int)((b & 0x00ff0000l) >> 16)); - os.put((int)((b & 0x0000ff00l) >> 8)); -@@ -192,7 +193,7 @@ std::ostream& big_endian::write_float(std::ostream& os, float value) - - std::ostream& big_endian::write_double(std::ostream& os, double value) - { -- long long b = *(reinterpret_cast<long long*>(&value)); -+ long long b = *(copy_reinterpret_cast<long long*>(&value)); - os.put((int)((b & 0xff00000000000000l) >> 56)); - os.put((int)((b & 0x00ff000000000000l) >> 48)); - os.put((int)((b & 0x0000ff0000000000l) >> 40)); -@@ -251,7 +252,7 @@ float big_endian::read_float(std::istream& is) - b2 = is.get(); - b1 = is.get(); - int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); -- return *reinterpret_cast<float*>(&v); -+ return *copy_reinterpret_cast<float*>(&v); - } - - double big_endian::read_double(std::istream& is) -@@ -273,7 +274,7 @@ double big_endian::read_double(std::istream& is) - ((long long)b3 << 16) | - ((long long)b2 << 8) | - (long long)b1); -- return *reinterpret_cast<double*>(&v); -+ return *copy_reinterpret_cast<double*>(&v); - } - -
