Skip to content

Instantly share code, notes, and snippets.

@andyvand
andyvand / wimlib-1.14.4-macOS.diff
Created December 13, 2025 15:13
wimlib 1.14.4 for macOS
diff -Nur wimlib-1.14.4/src/mount_image.c wimlib-1.14.4-macOS/src/mount_image.c
--- wimlib-1.14.4/src/mount_image.c 2023-07-23 01:55:59
+++ wimlib-1.14.4-macOS/src/mount_image.c 2025-12-13 14:59:37
@@ -45,7 +45,11 @@
#include <errno.h>
#include <fuse.h>
#include <limits.h>
+
+#ifndef __APPLE__
#include <mqueue.h>
@andyvand
andyvand / qemu-10.1.3-winrt.diff
Last active December 12, 2025 17:24
QEMU Windows RT ARM (8.1/10) patch
diff -Nur qemu-10.1.3/hw/arm/virt-acpi-build.c qemu-10.1.3-winrt/hw/arm/virt-acpi-build.c
--- qemu-10.1.3/hw/arm/virt-acpi-build.c 2025-12-06 16:26:44
+++ qemu-10.1.3-winrt/hw/arm/virt-acpi-build.c 2025-12-12 18:19:56
@@ -139,6 +139,58 @@
aml_append(table, scope);
}
+static void acpi_dsdt_add_ehci(Aml *scope, const MemMapEntry *ehci_memmap,
+ uint32_t ehci_irq)
+{
@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)