diff --git a/package/wayland/CMakeLists.txt b/package/wayland/CMakeLists.txt index 91dcb52..26345ab 100644 --- a/package/wayland/CMakeLists.txt +++ b/package/wayland/CMakeLists.txt @@ -1,5 +1,11 @@ br_get_var("package/wayland/wayland.mk" HOST_WAYLAND_VERSION WAYLAND_VERSION) +if (APPLE OR BSD) + list(APPEND WAYLAND_PATCHES "${CMAKE_CURRENT_SOURCE_DIR}/fix-dtddata.macos.patch") +endif () + +list(TRANSFORM WAYLAND_PATCHES PREPEND "COMMAND;patch;-p1;<;" OUTPUT_VARIABLE WAYLAND_PATCH_COMMANDS) + ExternalProject_Add(wayland INSTALL_DIR "${CMAKE_STAGING_PREFIX}" URL "http://wayland.freedesktop.org/releases/wayland-${WAYLAND_VERSION}.tar.xz" diff --git a/package/wayland/fix-dtddata.macos.patch b/package/wayland/fix-dtddata.macos.patch new file mode 100644 index 0000000..44c4544 --- /dev/null +++ b/package/wayland/fix-dtddata.macos.patch @@ -0,0 +1,11 @@ +diff --git a/src/dtddata.S b/src/dtddata.S +--- a/src/dtddata.S (date 1709447244638) ++++ b/src/dtddata.S (date 1709447346579) +@@ -46,5 +46,5 @@ + .int (\name\()_end - \name\()_begin) + .endm + +-.section .rodata +-binfile DTD_DATA src/wayland.dtd.embed ++.section __TEXT,__const ++binfile _DTD_DATA, src/wayland.dtd.embed