Skip to content

Instantly share code, notes, and snippets.

@andyvand
andyvand / glib-old-macos.patch
Created July 23, 2025 18:28
glib-old-macos.patch
--- glib/meson.build 2023-12-06 19:03:55
+++ glib-patched/meson.build 2025-07-23 20:24:16
@@ -897,9 +897,9 @@
endif
osx_ldflags = []
-glib_have_os_x_9_or_later = false
+glib_have_os_x_9_or_later = true
glib_have_carbon = false
-glib_have_cocoa = false
@andyvand
andyvand / static-libintle-macos-glib.patch
Created July 23, 2025 18:10
static-libintle-macos-glib.patch
--- meson.build 2025-07-19 14:45:10
+++ meson.build.patched 2025-07-19 14:45:45
@@ -2336,7 +2336,6 @@
else
# using proxy-libintl fallback
libintl = dependency('intl', allow_fallback: true)
- assert(libintl.type_name() == 'internal')
libintl_deps = [libintl]
have_bind_textdomain_codeset = true # proxy-libintl supports it
endif
@andyvand
andyvand / glib-old-macos.patch
Created July 23, 2025 18:05
glib-old-macos.patch
--- meson.build 2025-07-22 05:51:36
+++ meson.build.patched 2025-07-22 05:52:16
@@ -994,13 +994,6 @@
if host_system == 'darwin'
add_languages('objc', native: false, required: true)
objcc = meson.get_compiler('objc')
- if not objcc.compiles('''#include <AvailabilityMacros.h>
- #if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
- #error message "GLib requires macOS 10.13 or later."
- #endif''',
diff -Nur libx265/source/CMakeLists.txt libx265_patched/source/CMakeLists.txt
--- libx265/source/CMakeLists.txt 2024-11-22 13:07:34
+++ libx265_patched/source/CMakeLists.txt 2025-07-04 15:25:22
@@ -6,14 +6,8 @@
FORCE)
endif()
message(STATUS "cmake version ${CMAKE_VERSION}")
-if(POLICY CMP0025)
- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
-endif()
@andyvand
andyvand / wx-macOS.patch
Last active July 6, 2025 12:11 — forked from rkitover/wx-macOS.patch
wxWidgets patch for macOS
diff -Nur wxwidgets/src/osx/cocoa/window.mm wxwidgets_patched/src/osx/cocoa/window.mm
--- wxwidgets/src/osx/cocoa/window.mm 2025-05-30 13:39:07
+++ wxwidgets_patched/src/osx/cocoa/window.mm 2025-05-30 13:40:04
@@ -2370,11 +2370,7 @@
{
if ( HasUserKeyHandling() )
return m_wxPeer->AcceptsFocus();
- else
- {
- wxOSX_FocusHandlerPtr superimpl = (wxOSX_FocusHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
@andyvand
andyvand / mesa-25.1.1-WinXP.diff
Created May 27, 2025 06:04
mesa 25.1.1 Windows XP patch
diff -Nur mesa-25.1.1/src/c11/impl/threads_win32.c mesa-25.1.1-XP/src/c11/impl/threads_win32.c
--- mesa-25.1.1/src/c11/impl/threads_win32.c 2025-05-21 09:15:28.000000000 +0200
+++ mesa-25.1.1-XP/src/c11/impl/threads_win32.c 2025-05-26 20:00:09.541552500 +0200
@@ -2,118 +2,47 @@
* SPDX-License-Identifier: BSL-1.0
* Copyright yohhoy 2012.
*/
+#define HAVE_PTHREAD 1
+
+#include <stdlib.h>
@andyvand
andyvand / ffmpeg-xp.diff
Last active May 23, 2025 11:28
ffmpeg XP patch
diff -Nur ffmpeg-7.1.1/libavutil/wchar_filename.h ffmpeg-7.1.1-XP/libavutil/wchar_filename.h
--- ffmpeg-7.1.1/libavutil/wchar_filename.h 2025-03-02 22:08:21
+++ ffmpeg-7.1.1-XP/libavutil/wchar_filename.h 2025-05-23 12:58:40
@@ -49,7 +49,7 @@
static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w,
char **filename)
{
- DWORD flags = code_page == CP_UTF8 ? WC_ERR_INVALID_CHARS : 0;
+ DWORD flags = 0;
int num_chars = WideCharToMultiByte(code_page, flags, filename_w, -1,
@andyvand
andyvand / wxWidgets-3.2.8-XP.diff
Created May 23, 2025 09:35
wxWidgets Windows XP patch
diff -Nur wxWidgets-3.2.8/CMakeLists.txt wxWidgets-3.2.8-XP/CMakeLists.txt
--- wxWidgets-3.2.8/CMakeLists.txt 2025-04-24 21:21:09
+++ wxWidgets-3.2.8-XP/CMakeLists.txt 2025-05-23 11:25:02
@@ -28,15 +28,6 @@
# This block, particularly the versions used, should be kept in sync with
# samples/minimal/CMakeLists.txt.
-if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
- # If no deployment target has been set default to the minimum supported
- # OS version (this has to be set before the first project() call)
@andyvand
andyvand / mingw-w64-12.0.0-XP.diff
Last active May 24, 2025 10:46
mingw-w64 winpthreads XP
diff -Nur mingw-w64-v12.0.0/mingw-w64-crt/Makefile.am mingw-w64-v12.0.0-XP/mingw-w64-crt/Makefile.am
--- mingw-w64-v12.0.0/mingw-w64-crt/Makefile.am 2024-05-22 09:07:14
+++ mingw-w64-v12.0.0-XP/mingw-w64-crt/Makefile.am 2025-05-22 18:55:51
@@ -20,7 +20,7 @@
endif
AM_CPPFLAGS=$(sysincludes)
-AM_CFLAGS=-pipe -std=gnu99 -D_CRTBLD -D_WIN32_WINNT=0x0f00 -D__MSVCRT_VERSION__=0x700 -D__USE_MINGW_ANSI_STDIO=0 @IMAGEBASE_CFLAGS@ @CFGUARD_CFLAGS@ @ADD_C_CXX_WARNING_FLAGS@ @ADD_C_ONLY_WARNING_FLAGS@
+AM_CFLAGS=-pipe -std=gnu99 -D_CRTBLD -D_WIN32_WINNT=0x0501 -D__MSVCRT_VERSION__=0x700 -D__USE_MINGW_ANSI_STDIO=0 @IMAGEBASE_CFLAGS@ @CFGUARD_CFLAGS@ @ADD_C_CXX_WARNING_FLAGS@ @ADD_C_ONLY_WARNING_FLAGS@
AM_CXXFLAGS=@ADD_C_CXX_WARNING_FLAGS@ @ADD_CXX_ONLY_WARNING_FLAGS@
@andyvand
andyvand / unzip_buildfix.diff
Last active May 19, 2025 07:32
unzip buildfix
--- unzip60/unix/Makefile 2009-01-18 23:41:18
+++ unzip/unix/Makefile 2025-05-19 09:28:40
@@ -52,7 +52,7 @@
CF = $(CFLAGS) $(CF_NOOPT)
LFLAGS1 =
LF = -o unzip$E $(LFLAGS1)
-LF2 = -s
+LF2 = -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib
# UnZipSFX flags