external/libeot/0001-const-up-tripletEncodings.patch |   54 +++++++++++++++++++
 external/libeot/UnpackedTarball_libeot.mk            |    2 
 2 files changed, 56 insertions(+)

New commits:
commit e07607e7e3c2193c2455041d08dbf220c5b3c8b6
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jul 13 19:49:59 2025 +0100
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Jul 26 21:31:16 2025 +0200

    const up libeot
    
    Change-Id: Ifd8a774365b8c343e214660942d9bac4d52462b9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187822
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188417
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/external/libeot/0001-const-up-tripletEncodings.patch 
b/external/libeot/0001-const-up-tripletEncodings.patch
new file mode 100644
index 000000000000..a4b26b2fa0a1
--- /dev/null
+++ b/external/libeot/0001-const-up-tripletEncodings.patch
@@ -0,0 +1,54 @@
+From 1cb423d68e647e0c99e397cd6cf04272240ee86d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnam...@collabora.com>
+Date: Sun, 13 Jul 2025 19:43:51 +0100
+Subject: [PATCH] const up tripletEncodings
+
+moves tripletEncodings out of the .data section
+---
+ src/ctf/parseCTF.c      | 2 +-
+ src/triplet_encodings.c | 2 +-
+ src/triplet_encodings.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/ctf/parseCTF.c b/src/ctf/parseCTF.c
+index 3ec938d..231a85e 100644
+--- a/src/ctf/parseCTF.c
++++ b/src/ctf/parseCTF.c
+@@ -424,7 +424,7 @@
+   unsigned currX = 0, currY = 0;
+   for (unsigned i = 0; i < totalPoints; ++i)
+   {
+-    struct TripletEncoding enc = tripletEncodings[flags[i] & 0x7F];
++    const struct TripletEncoding enc = tripletEncodings[flags[i] & 0x7F];
+     unsigned moreBytes = enc.byteCount - 1;
+     if (in->pos + moreBytes > in->size)
+     {
+diff --git a/src/triplet_encodings.c b/src/triplet_encodings.c
+index 899eadb..81e9ae0 100644
+--- a/src/triplet_encodings.c
++++ b/src/triplet_encodings.c
+@@ -4,7 +4,7 @@
+  */
+ 
+ #include "triplet_encodings.h"
+-struct TripletEncoding tripletEncodings[] = {{2, 0, 8, 0, 0, 0, -1},
++const struct TripletEncoding tripletEncodings[] = {{2, 0, 8, 0, 0, 0, -1},
+ {2, 0, 8, 0, 0, 0, 1},
+ {2, 0, 8, 0, 256, 0, -1},
+ {2, 0, 8, 0, 256, 0, 1},
+diff --git a/src/triplet_encodings.h b/src/triplet_encodings.h
+index 972145f..40a7537 100644
+--- a/src/triplet_encodings.h
++++ b/src/triplet_encodings.h
+@@ -17,7 +17,7 @@
+   int ySign;
+ };
+ 
+-extern struct TripletEncoding tripletEncodings[];
++extern const struct TripletEncoding tripletEncodings[];
+ 
+ #endif /* #define __LIBEOT_TRIPLET_ENCODINGS_H__ */
+ 
+-- 
+2.49.0
+
diff --git a/external/libeot/UnpackedTarball_libeot.mk 
b/external/libeot/UnpackedTarball_libeot.mk
index 40ac1cbb0b94..532afa5adea3 100644
--- a/external/libeot/UnpackedTarball_libeot.mk
+++ b/external/libeot/UnpackedTarball_libeot.mk
@@ -11,6 +11,8 @@ libeot_patches :=
 libeot_patches += 0001-remove-unused-err.h.patch
 libeot_patches += debug-no-werror.patch.0
 libeot_patches += ubsan.patch.0
+# upstreamed as: https://github.com/umanwizard/libeot/pull/14
+libeot_patches += 0001-const-up-tripletEncodings.patch
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,libeot))
 

Reply via email to