From 5385e7bf5b848d8ecf2478665117eb41e734dde5 Mon Sep 17 00:00:00 2001 From: uint Date: Thu, 18 Dec 2025 18:59:29 +0000 Subject: add ladybird patches for build --- build_patches/cmake.patch | 15 +++++++++++++++ build_patches/lagom_options.patch | 10 ++++++++++ build_patches/ui_cmake.patch | 13 +++++++++++++ build_patches/vcpkg.patch | 28 ++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 build_patches/cmake.patch create mode 100644 build_patches/lagom_options.patch create mode 100644 build_patches/ui_cmake.patch create mode 100644 build_patches/vcpkg.patch (limited to 'build_patches') diff --git a/build_patches/cmake.patch b/build_patches/cmake.patch new file mode 100644 index 0000000..1da02b6 --- /dev/null +++ b/build_patches/cmake.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index afcc5bf2..e7a12776 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -69,6 +69,10 @@ if (ENABLE_QT AND ENABLE_GUI_TARGETS) + find_package(Qt6 REQUIRED COMPONENTS Core Widgets) + endif() + ++if (ENABLE_QUARTZ AND ENABLE_GUI_TARGETS) ++ include(Meta/CMake/SDL3.cmake) ++endif() ++ + # We need to find OpenSSL in order to link it explicitly with all targets. + find_package(OpenSSL REQUIRED) + diff --git a/build_patches/lagom_options.patch b/build_patches/lagom_options.patch new file mode 100644 index 0000000..da4f590 --- /dev/null +++ b/build_patches/lagom_options.patch @@ -0,0 +1,10 @@ +diff --git a/Meta/CMake/lagom_options.cmake b/Meta/CMake/lagom_options.cmake +index cd4a0e15..fe886cd4 100644 +--- a/Meta/CMake/lagom_options.cmake ++++ b/Meta/CMake/lagom_options.cmake +@@ -30,3 +30,5 @@ if (ANDROID OR APPLE) + else() + ladybird_option(ENABLE_QT ON CACHE BOOL "Build ladybird application using Qt GUI") + endif() ++ ++ladybird_option(ENABLE_QUARTZ OFF CACHE BOOL "Build ladybird application using Quartz GUI") diff --git a/build_patches/ui_cmake.patch b/build_patches/ui_cmake.patch new file mode 100644 index 0000000..12a318f --- /dev/null +++ b/build_patches/ui_cmake.patch @@ -0,0 +1,13 @@ +diff --git a/UI/CMakeLists.txt b/UI/CMakeLists.txt +index d02cec2d..ce8a1943 100644 +--- a/UI/CMakeLists.txt ++++ b/UI/CMakeLists.txt +@@ -49,6 +49,8 @@ endfunction() + # Select UI Framework + if (ENABLE_QT) + add_subdirectory(Qt) ++elseif (ENABLE_QUARTZ) ++ add_subdirectory(quartz) + elseif (APPLE) + add_subdirectory(AppKit) + elseif(ANDROID) diff --git a/build_patches/vcpkg.patch b/build_patches/vcpkg.patch new file mode 100644 index 0000000..5902701 --- /dev/null +++ b/build_patches/vcpkg.patch @@ -0,0 +1,28 @@ +diff --git a/vcpkg.json b/vcpkg.json +index 6317530e..ea6ff163 100644 +--- a/vcpkg.json ++++ b/vcpkg.json +@@ -160,10 +160,20 @@ + }, + { + "name": "sdl3", ++ "platform": "linux | freebsd", ++ "default-features": false, ++ "features": [ ++ "x11", ++ "wayland" ++ ] ++ }, ++ { ++ "name": "sdl3", ++ "platform": "!(linux | freebsd)", + "default-features": false +- }, +- "simdutf", +- { ++ }, ++ "simdutf", ++ { + "name": "skia", + "platform": "osx", + "features": [ -- cgit v1.2.3