|
|
commit 6add57d4bd29157a9d4ac8c412f4f29eb600067a
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Jun 6 15:32:54 2022 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Jun 6 15:32:54 2022 +0200
Wayland under FreeBSD: use package evdev-proto which brings linux/input.h
README.Wayland.txt | 3 ++-
libdecor/build/Makefile | 16 +++-------------
src/CMakeLists.txt | 16 ----------------
3 files changed, 5 insertions(+), 30 deletions(-)
diff --git README.Wayland.txt README.Wayland.txt
index b0334de..5e33dda 100644
--- README.Wayland.txt
+++ README.Wayland.txt
@@ -178,7 +178,8 @@ Package installation command: sudo yum install <package-name ...>
The Wayland platform is known to work with FreeBSD version 13.1 and the sway compositor.
These packages are necessary to build the FLTK library and the sway compositor:
-pkg install git autoconf pkgconf xorg urwfonts gnome glew seatd sway dmenu-wayland dmenu
+pkg install git autoconf pkgconf xorg urwfonts gnome glew seatd sway \
+ dmenu-wayland dmenu evdev-proto
The FLTK library can be built as follows using either configure or CMake :
diff --git libdecor/build/Makefile libdecor/build/Makefile
index c76a73d..0491b6a 100644
--- libdecor/build/Makefile
+++ libdecor/build/Makefile
@@ -21,16 +21,12 @@ OBJECTS = fl_libdecor.o libdecor-cairo-blur.o fl_libdecor-plugins.o \
../../src/text-input-protocol.o cursor-settings.o os-compatibility.o
-#$(UNAME) is set to the product of `uname -s` in makeinclude
+# ${UNAME} is set to the product of `uname -s` in makeinclude
Linux_PROTO = /usr/share/wayland-protocols
FreeBSD_PROTO = /usr/local/share/wayland-protocols
PROTOCOLS = ${${UNAME}_PROTO}
-Linux_INPUT =
-FreeBSD_INPUT = linux/input.h
-EXTRA_INPUT= ${${UNAME}_INPUT}
-
Linux_CFLAGS =
FreeBSD_CFLAGS = -I/usr/local/include
EXTRA_DECOR = ${${UNAME}_CFLAGS}
@@ -47,16 +43,10 @@ all : demo $(GLWLDEMO)
depend:
: echo "libdecor/build: make depend..."
-linux/input.h :
- mkdir -p linux
- echo "#define BTN_LEFT 0x110" > linux/input.h
- echo "#define BTN_RIGHT 0x111" >> linux/input.h
- echo "#define BTN_MIDDLE 0x112" >> linux/input.h
-
fl_libdecor.o : fl_libdecor.c ../src/libdecor.c ../../src/xdg-shell-protocol.c ../../src/xdg-decoration-protocol.c ../../src/text-input-protocol.c
$(CC) $(CFLAGS) $(CFLAGS_DECOR) -c fl_libdecor.c -DLIBDECOR_PLUGIN_API_VERSION=1 -DLIBDECOR_PLUGIN_DIR=\"/usr/local/lib/libdecor/plugins-1\"
-fl_libdecor-plugins.o : $(EXTRA_INPUT) fl_libdecor-plugins.c ../src/plugins/cairo/libdecor-cairo.c
+fl_libdecor-plugins.o : fl_libdecor-plugins.c ../src/plugins/cairo/libdecor-cairo.c
$(CC) $(CFLAGS) $(CFLAGS_DECOR) -c fl_libdecor-plugins.c -DLIBDECOR_PLUGIN_API_VERSION=1 -DLIBDECOR_PLUGIN_DIR=\"/usr/local/lib/libdecor/plugins-1\"
libdecor-cairo-blur.o : ../src/plugins/cairo/libdecor-cairo-blur.c
@@ -90,7 +80,7 @@ cursor-settings.o : ../src/cursor-settings.c
$(PROTOCOLS)/unstable/text-input/text-input-unstable-v3.xml \
../../src/text-input-client-protocol.h
-demo : ../demo/demo.c $(OBJECTS) $(EXTRA_INPUT)
+demo : ../demo/demo.c $(OBJECTS)
$(CC) -o demo ../demo/demo.c -D_GNU_SOURCE -I../.. -I../src -I. -I../../src $(EXTRA_DECOR) $(OBJECTS) $(LDLIBS) -lm -rdynamic $(NOPIE) -Wl,--defsym=fl_libdecor_using_weston=0
egl : ../demo/egl.c $(OBJECTS)
diff --git src/CMakeLists.txt src/CMakeLists.txt
index e75c301..405dd30 100644
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -581,22 +581,6 @@ endif (USE_XFT)
if (OPTION_USE_WAYLAND)
if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
set(PROTOCOLS /usr/local/share/wayland-protocols)
-# create and populate linux/input.h needed by Fl_Wayland_Screen_Driver.cxx and libdecor plugins
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/linux/input.h
- COMMAND rm -r -f ${CMAKE_CURRENT_BINARY_DIR}/linux
- COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/linux
- COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/linux/input.h
- COMMAND echo "#define BTN_LEFT 0x110" > ${CMAKE_CURRENT_BINARY_DIR}/linux/input.h
- COMMAND echo "#define BTN_RIGHT 0x111" >> ${CMAKE_CURRENT_BINARY_DIR}/linux/input.h
- COMMAND echo "#define BTN_MIDDLE 0x112" >> ${CMAKE_CURRENT_BINARY_DIR}/linux/input.h
- VERBATIM
- )
- SET_SOURCE_FILES_PROPERTIES(
- ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/fl_libdecor_plugins.c
- ${CMAKE_CURRENT_SOURCE_DIR}/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
- PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/linux/input.h
- )
else ()
set(PROTOCOLS /usr/share/wayland-protocols)
endif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
[ Direct Link to Message ] | |
|
| |