From 397531d651fef2b05c0adbe5a3c286519e08020b Mon Sep 17 00:00:00 2001
From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Mon, 3 Nov 2025 19:16:15 +0100
Subject: [PATCH 43/48] removing SHARED from source set names on OSX

---
 build/bakefiles/files.bkl           | 30 +++--------------------------
 build/cmake/files.cmake             | 15 ++-------------
 build/cmake/lib/base/CMakeLists.txt |  2 +-
 build/files                         | 16 ++-------------
 4 files changed, 8 insertions(+), 55 deletions(-)

diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl
index 5febfc75fb..3eea13d4a6 100644
--- a/build/bakefiles/files.bkl
+++ b/build/bakefiles/files.bkl
@@ -85,22 +85,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     wx/unix/fswatcher_kqueue.h
 </set>
 
-<!--
-    Files used on all Unix systems, including Darwin with any port but wxMac
-    (this is really an aberration, we should also use these files for wxMac,
-     it's not done because of some OS 9 support leftovers only now)
- -->
-<set var="BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC" hints="files">
-    $(BASE_UNIX_AND_DARWIN_SRC)
-    src/unix/mimetype.cpp
-    src/unix/uilocale.cpp
-</set>
-
-<set var="BASE_UNIX_AND_DARWIN_NOTWXMAC_HDR" hints="files">
-    $(BASE_UNIX_AND_DARWIN_HDR)
-    wx/unix/mimetype.h
-</set>
-
 <!--
     Files used on all non-Darwin Unix systems (because Darwin provides other,
     better, native equivalents of the functionality they implement (e.g.
@@ -210,14 +194,14 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
 </set>
 
 <!-- Base files used by OS X ports (not Carbon) -->
-<set var="BASE_OSX_SHARED_SRC" hints="files">
+<set var="BASE_OSX_SRC" hints="files">
     $(BASE_COREFOUNDATION_SRC)
     $(BASE_UNIX_AND_DARWIN_SRC)
     src/osx/fswatcher_fsevents.cpp
     src/osx/core/uilocale.mm
     src/osx/core/mimetype.cpp
 </set>
-<set var="BASE_OSX_SHARED_HDR" hints="files">
+<set var="BASE_OSX_HDR" hints="files">
     $(BASE_COREFOUNDATION_HDR)
     $(BASE_UNIX_AND_DARWIN_HDR)
     wx/osx/fswatcher_fsevents.h
@@ -3208,14 +3192,10 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     <!-- wxBase files: -->
 
     <!-- Nested if would be nicer, but this works -->
-    <!-- These are the files for PLATFORM_MACOSX -->
-    <set var="BASE_OSX_SRC" hints="files">
-        $(BASE_OSX_SHARED_SRC)
-    </set>
     <set var="BASE_PLATFORM_SRC" hints="files">
         <if cond="PLATFORM_UNIX=='1'">$(BASE_UNIX_SRC)</if>
         <if cond="PLATFORM_WIN32=='1'">$(BASE_WIN32_SRC)</if>
-        <if cond="PLATFORM_MACOSX=='1'">$(BASE_OSX_SHARED_SRC)</if>
+        <if cond="PLATFORM_MACOSX=='1'">$(BASE_OSX_SRC)</if>
     </set>
     <set var="BASE_AND_GUI_TOOLKIT_SRC" hints="files">
         <if cond="TOOLKIT=='OSX_COCOA'">$(BASE_AND_GUI_OSX_COCOA_SRC)</if>
@@ -3227,10 +3207,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     </set>
 
     <!-- Nested if would be nicer, but this works -->
-    <!-- These are the files for PLATFORM_MACOSX -->
-    <set var="BASE_OSX_HDR" hints="files">
-        $(BASE_OSX_SHARED_HDR)
-    </set>
     <set var="BASE_PLATFORM_HDR" hints="files">
         <if cond="PLATFORM_UNIX=='1'">$(BASE_UNIX_HDR)</if>
         <if cond="PLATFORM_WIN32=='1'">$(BASE_WIN32_HDR)</if>
diff --git a/build/cmake/files.cmake b/build/cmake/files.cmake
index 4f7e23a68b..2a17698af5 100644
--- a/build/cmake/files.cmake
+++ b/build/cmake/files.cmake
@@ -31,17 +31,6 @@ set(BASE_UNIX_AND_DARWIN_HDR
     wx/unix/fswatcher_kqueue.h
 )
 
-set(BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC
-    ${BASE_UNIX_AND_DARWIN_SRC}
-    src/unix/mimetype.cpp
-    src/unix/uilocale.cpp
-)
-
-set(BASE_UNIX_AND_DARWIN_NOTWXMAC_HDR
-    ${BASE_UNIX_AND_DARWIN_HDR}
-    wx/unix/mimetype.h
-)
-
 set(BASE_UNIX_SRC
     src/unix/fswatcher_inotify.cpp
     src/unix/secretstore.cpp
@@ -140,7 +129,7 @@ set(BASE_COREFOUNDATION_HDR
     wx/osx/core/stdpaths.h
 )
 
-set(BASE_OSX_SHARED_SRC
+set(BASE_OSX_SRC
     src/osx/fswatcher_fsevents.cpp
     ${BASE_COREFOUNDATION_SRC}
     ${BASE_UNIX_AND_DARWIN_SRC}
@@ -148,7 +137,7 @@ set(BASE_OSX_SHARED_SRC
     src/osx/core/mimetype.cpp
 )
 
-set(BASE_OSX_SHARED_HDR
+set(BASE_OSX_HDR
     wx/osx/fswatcher_fsevents.h
     ${BASE_COREFOUNDATION_HDR}
     ${BASE_UNIX_AND_DARWIN_HDR}
diff --git a/build/cmake/lib/base/CMakeLists.txt b/build/cmake/lib/base/CMakeLists.txt
index 97f748e506..10b06c1b7a 100644
--- a/build/cmake/lib/base/CMakeLists.txt
+++ b/build/cmake/lib/base/CMakeLists.txt
@@ -14,7 +14,7 @@ if(WIN32)
     wx_append_sources(BASE_FILES BASE_WIN32)
     wx_append_sources(BASE_FILES BASE_AND_GUI_WIN32)
 elseif(APPLE)
-    wx_append_sources(BASE_FILES BASE_OSX_SHARED)
+    wx_append_sources(BASE_FILES BASE_OSX)
     if(WXOSX_COCOA OR WXOSX_IPHONE)
         if(WXOSX_COCOA)
             wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_COCOA)
diff --git a/build/files b/build/files
index 1da1d33fa8..52c7fc668f 100644
--- a/build/files
+++ b/build/files
@@ -50,18 +50,6 @@ BASE_UNIX_AND_DARWIN_HDR =
     wx/unix/stackwalk.h
     wx/unix/fswatcher_kqueue.h
 
-# Files used on all Unix systems, including Darwin with any port but wxMac
-# (this is really an aberration, we should also use these files for wxMac,
-#  it's not done because of some OS 9 support leftovers only now)
-#BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC =
-#    $(BASE_UNIX_AND_DARWIN_SRC)
-#    src/unix/mimetype.cpp
-#    src/unix/uilocale.cpp
-
-#BASE_UNIX_AND_DARWIN_NOTWXMAC_HDR =
-#    $(BASE_UNIX_AND_DARWIN_HDR)
-#    wx/unix/mimetype.h
-
 # Files used on all non-Darwin Unix systems (because Darwin provides other,
 # better, native equivalents of the functionality they implement (e.g.
 # CFSocket instead of BSD sockets) or doesn't provide it at all (epoll,
@@ -165,14 +153,14 @@ BASE_COREFOUNDATION_HDR =
     wx/osx/core/stdpaths.h
 
 # Base files used by OS X ports (not Carbon)
-BASE_OSX_SHARED_SRC =
+BASE_OSX_SRC =
     $(BASE_UNIX_AND_DARWIN_SRC)
     $(BASE_COREFOUNDATION_SRC)
     src/osx/core/mimetype.cpp
     src/osx/core/uilocale.mm
     src/osx/fswatcher_fsevents.cpp
 
-BASE_OSX_SHARED_HDR =
+BASE_OSX_HDR =
     $(BASE_UNIX_AND_DARWIN_HDR)
     $(BASE_COREFOUNDATION_HDR)
     wx/osx/fswatcher_fsevents.h
-- 
2.24.3 (Apple Git-128)

