Skip to content

Commit

Permalink
fixed wayland-scanner on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Mar 3, 2024
1 parent ea2d068 commit e354610
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions package/wayland/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
11 changes: 11 additions & 0 deletions package/wayland/fix-dtddata.macos.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e354610

Please sign in to comment.