Skip to content

Commit f9c233c

Browse files
committed
Merge pull request #102673 from akien-mga/linux-wayland-so_wrap-disabled
Wayland: Fix build config with `so_wrap` disabled
2 parents 5460fe3 + 19a30bb commit f9c233c

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

platform/linuxbsd/detect.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,14 @@ def configure(env: "SConsEnvironment"):
455455
print_error("Wayland EGL library not found. Aborting.")
456456
sys.exit(255)
457457
env.ParseConfig("pkg-config wayland-egl --cflags --libs")
458+
else:
459+
env.Prepend(CPPPATH=["#thirdparty/linuxbsd_headers/wayland/"])
460+
if env["libdecor"]:
461+
env.Prepend(CPPPATH=["#thirdparty/linuxbsd_headers/libdecor-0/"])
458462

459463
if env["libdecor"]:
460464
env.Append(CPPDEFINES=["LIBDECOR_ENABLED"])
461465

462-
env.Prepend(CPPPATH=["#platform/linuxbsd", "#thirdparty/linuxbsd_headers/wayland/"])
463466
env.Append(CPPDEFINES=["WAYLAND_ENABLED"])
464467
env.Append(LIBS=["rt"]) # Needed by glibc, used by _allocate_shm_file
465468

platform/linuxbsd/wayland/dynwrappers/libdecor-so_wrap.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This file is generated. Do not edit!
22
// see https://github.com/hpvb/dynload-wrapper for details
33
// generated by ./generate-wrapper.py 0.3 on 2022-12-12 10:55:19
4-
// flags: ./generate-wrapper.py --include /usr/include/libdecor-0/libdecor.h --sys-include <libdecor-0/libdecor.h> --soname libdecor-0.so.0 --init-name libdecor --output-header libdecor-so_wrap.h --output-implementation libdecor-so_wrap.c --omit-prefix wl_
4+
// flags: ./generate-wrapper.py --include /usr/include/libdecor-0/libdecor.h --sys-include <libdecor.h> --soname libdecor-0.so.0 --init-name libdecor --output-header libdecor-so_wrap.h --output-implementation libdecor-so_wrap.c --omit-prefix wl_
55
//
66
// EDIT: This has been handpatched to properly report the pointer type of the window_state argument of libdecor_configuration_get_window_state.
77
#include <stdint.h>
@@ -45,7 +45,7 @@
4545
#define libdecor_state_free libdecor_state_free_dylibloader_orig_libdecor
4646
#define libdecor_configuration_get_content_size libdecor_configuration_get_content_size_dylibloader_orig_libdecor
4747
#define libdecor_configuration_get_window_state libdecor_configuration_get_window_state_dylibloader_orig_libdecor
48-
#include <libdecor-0/libdecor.h>
48+
#include <libdecor.h>
4949
#undef libdecor_unref
5050
#undef libdecor_new
5151
#undef libdecor_get_fd

platform/linuxbsd/wayland/dynwrappers/libdecor-so_wrap.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This file is generated. Do not edit!
44
// see https://github.com/hpvb/dynload-wrapper for details
55
// generated by ./generate-wrapper.py 0.3 on 2022-12-12 10:55:19
6-
// flags: ./generate-wrapper.py --include /usr/include/libdecor-0/libdecor.h --sys-include <libdecor-0/libdecor.h> --soname libdecor-0.so.0 --init-name libdecor --output-header libdecor-so_wrap.h --output-implementation libdecor-so_wrap.c --omit-prefix wl_
6+
// flags: ./generate-wrapper.py --include /usr/include/libdecor-0/libdecor.h --sys-include <libdecor.h> --soname libdecor-0.so.0 --init-name libdecor --output-header libdecor-so_wrap.h --output-implementation libdecor-so_wrap.c --omit-prefix wl_
77
//
88
// EDIT: This has been handpatched to properly report the pointer type of the window_state argument of libdecor_configuration_get_window_state.
99
#include <stdint.h>
@@ -47,7 +47,7 @@
4747
#define libdecor_state_free libdecor_state_free_dylibloader_orig_libdecor
4848
#define libdecor_configuration_get_content_size libdecor_configuration_get_content_size_dylibloader_orig_libdecor
4949
#define libdecor_configuration_get_window_state libdecor_configuration_get_window_state_dylibloader_orig_libdecor
50-
#include <libdecor-0/libdecor.h>
50+
#include <libdecor.h>
5151
#undef libdecor_unref
5252
#undef libdecor_new
5353
#undef libdecor_get_fd

platform/linuxbsd/wayland/wayland_thread.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
#ifdef SOWRAP_ENABLED
7979
#include "dynwrappers/libdecor-so_wrap.h"
8080
#else
81-
#include <libdecor-0/libdecor.h>
81+
#include <libdecor.h>
8282
#endif // SOWRAP_ENABLED
8383
#endif // LIBDECOR_ENABLED
8484

0 commit comments

Comments
 (0)