# SDL\_image: Synchronize files with SDL3 repo

**URL:** <https://discourse.libsdl.org/t/sdl-image-synchronize-files-with-sdl3-repo/69243>\
**Category:** SDL Commits\
**Created:** [September 5, 2026, 11:06am UTC](https://discourse.libsdl.org/t/sdl-image-synchronize-files-with-sdl3-repo/69243 "2026-09-05T11:06:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [September 5, 2026, 11:06am UTC](https://discourse.libsdl.org/t/sdl-image-synchronize-files-with-sdl3-repo/69243/1 "2026-09-05T11:06:15Z")

</div>

> <https://github.com/libsdl-org/SDL_image/commit/e0d52a168df7d9e80ac0358e2ba43b3da40969bb>

```diff
From e0d52a168df7d9e80ac0358e2ba43b3da40969bb Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 4 Sep 2026 23:13:08 +0200
Subject: [PATCH] Synchronize files with SDL3 repo

---
 build-scripts/wikiheaders.pl | 32 +++++++++++++++++++++++++-------
 cmake/sdlcpu.cmake | 4 +++-
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl
index 2092912bc..933156ea7 100755
--- a/build-scripts/wikiheaders.pl
+++ b/build-scripts/wikiheaders.pl
@@ -396,6 +396,19 @@ sub wikify {
     return $retval;
 }
 
+sub gen_manpage_url {
+ my $url = shift;
+ my $desc = shift;
+
+ # We have to unmangle some mangling we just did. :/
+ $url =~ s/\\\[char46\]/./g;
+
+ # can't have newlines in this.
+ $desc =~ s/\n/ /g;
+
+ return "\n.URL \"$url\" \"$desc\"\n";
+}
+
 
 my $dewikify_mode = 'md';
 my $dewikify_manpage_code_indent = 1;
@@ -459,7 +472,7 @@ sub dewikify_chunk {
             }
 
             # links
- $str =~ s/\[(https?\:\/\/.*?)\s+(.*?)\]/\n.URL "$1" "$2"\n/g;
+ $str =~ s/\[(https?\:\/\/.*?)\s+(.*?)\]\s*/gen_manpage_url($1, $2)/ge;
 
             # <code></code> is also popular. :/
             $str =~ s/\s*\<code>(.*?)<\/code>\s*/\n.BR $1\n/gms;
@@ -496,7 +509,7 @@ sub dewikify_chunk {
             }
 
             # links
- $str =~ s/\[(.*?)]\((https?\:\/\/.*?)\)/\n.URL "$2" "$1"\n/g;
+ $str =~ s/\[([^\]]*?)]\((https?\:\/\/.*?)\)\s*/gen_manpage_url($2, $1)/ge;
 
             # <code></code> is also popular. :/
             $str =~ s/\s*(\S*?)\`([^\n]*?)\`(\S*)\s*/\n.BR "" "$1" "$2" "$3"\n/gms;
@@ -1773,20 +1786,20 @@ sub generate_envvar_wiki_page {
             } elsif (/\A\= (.*?) \=\Z/) {
                 $firstline = 0;
                 $current_section = ($1 eq $sym) ? '[Brief]' : $1;
- die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
+ die("Doubly-defined section '$current_section' in '$wikipath/$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 $sections{$current_section} = '';
             } elsif (/\A\=\= (.*?) \=\=\Z/) {
                 $firstline = 0;
                 $current_section = ($1 eq $sym) ? '[Brief]' : $1;
- die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
+ die("Doubly-defined section '$current_section' in '$wikipath/$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 $sections{$current_section} = '';
                 next;
             } elsif (/\A\-\-\-\-\Z/) {
                 $firstline = 0;
                 $current_section = '[footer]';
- die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
+ die("Doubly-defined section '$current_section' in '$wikipath/$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 $sections{$current_section} = '';
                 next;
@@ -1798,14 +1811,14 @@ sub generate_envvar_wiki_page {
             } elsif (/\A\#+ (.*?)\Z/) {
                 $firstline = 0;
                 $current_section = ($1 eq $sym) ? '[Brief]' : $1;
- die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
+ die("Doubly-defined section '$current_section' in '$wikipath/$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 $sections{$current_section} = '';
                 next;
             } elsif (/\A\-\-\-\-\Z/) {
                 $firstline = 0;
                 $current_section = '[footer]';
- die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
+ die("Doubly-defined section '$current_section' in '$wikipath/$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 $sections{$current_section} = '';
                 next;
@@ -2912,6 +2925,11 @@ sub generate_envvar_wiki_page {
         $brief = shift @briefsplit;
         $brief = dewikify($wikitype, $brief);
 
+ # Hack: `apropros` doesn't like escaped character things like `\[char46]` for `.`...since almost every
+ # manpage will end their Brief section with a period and it won't wordwrap to risk being a groff control
+ # character, just replace it.
+ $brief =~ s/\\\[char46\]/./g;
+
         if (defined $remarks) {
             $remarks = dewikify($wikitype, join("\n", @briefsplit) . $remarks);
         }
diff --git a/cmake/sdlcpu.cmake b/cmake/sdlcpu.cmake
index a27e7329c..fa7d4aa82 100644
--- a/cmake/sdlcpu.cmake
+++ b/cmake/sdlcpu.cmake
@@ -1,6 +1,6 @@
 function(SDL_DetectTargetCPUArchitectures DETECTED_ARCHS)
 
- set(known_archs EMSCRIPTEN ARM32 ARM64 ARM64EC LOONGARCH64 POWERPC32 POWERPC64 RISCV32 RISCV64 X86 X64)
+ set(known_archs EMSCRIPTEN ARM32 ARM64 ARM64EC LOONGARCH64 MIPS32 MIPS64 POWERPC32 POWERPC64 RISCV32 RISCV64 X86 X64)
 
   if(APPLE AND CMAKE_OSX_ARCHITECTURES)
     foreach(known_arch IN LISTS known_archs)
@@ -37,6 +37,8 @@ function(SDL_DetectTargetCPUArchitectures DETECTED_ARCHS)
   set(arch_check_ARM64EC "defined(_M_ARM64EC)")
   set(arch_check_EMSCRIPTEN "defined( __EMSCRIPTEN__ )")
   set(arch_check_LOONGARCH64 "defined(__loongarch64)")
+ set(arch_check_MIPS32 "(defined( __mips__ ) && !defined(__mips64))")
+ set(arch_check_MIPS64 "(defined( __mips__ ) && defined(__mips64))")
   set(arch_check_POWERPC32 "(defined( __PPC__ ) || defined( __powerpc__ )) && !defined( __powerpc64__ )")
   set(arch_check_POWERPC64 "defined( __PPC64__ ) || defined( __powerpc64__ )")
   set(arch_check_RISCV32 "defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 32")

```
