mirror of
https://github.com/swaywm/sway.git
synced 2024-11-01 05:57:17 +00:00
Make asciidoc (and man pages) optional
And remove it from the build
This commit is contained in:
parent
36fcb954bd
commit
cf4ea4c86b
|
@ -10,7 +10,6 @@ packages:
|
||||||
- cairo
|
- cairo
|
||||||
- wayland
|
- wayland
|
||||||
- gdk-pixbuf2
|
- gdk-pixbuf2
|
||||||
- asciidoc
|
|
||||||
sources:
|
sources:
|
||||||
- https://git.sr.ht/~sircmpwn/sway
|
- https://git.sr.ht/~sircmpwn/sway
|
||||||
tasks:
|
tasks:
|
||||||
|
|
|
@ -10,7 +10,6 @@ arch:
|
||||||
packages:
|
packages:
|
||||||
- cmake
|
- cmake
|
||||||
- xorg-server-xwayland
|
- xorg-server-xwayland
|
||||||
- asciidoc
|
|
||||||
- json-c
|
- json-c
|
||||||
- wayland
|
- wayland
|
||||||
- xcb-util-image
|
- xcb-util-image
|
||||||
|
|
|
@ -1,31 +1,33 @@
|
||||||
find_package(A2X REQUIRED)
|
find_package(A2X)
|
||||||
|
|
||||||
add_custom_target(man ALL)
|
if (A2X_FOUND)
|
||||||
|
add_custom_target(man ALL)
|
||||||
|
|
||||||
function(add_manpage name section)
|
function(add_manpage name section)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
|
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
|
||||||
COMMAND ${A2X_COMMAND}
|
COMMAND ${A2X_COMMAND}
|
||||||
--no-xmllint
|
--no-xmllint
|
||||||
--doctype manpage
|
--doctype manpage
|
||||||
--format manpage
|
--format manpage
|
||||||
-D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
-D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
|
||||||
COMMENT Generating manpage for ${name}.${section}
|
COMMENT Generating manpage for ${name}.${section}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(man-${name}.${section}
|
add_custom_target(man-${name}.${section}
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
|
||||||
)
|
)
|
||||||
add_dependencies(man
|
add_dependencies(man
|
||||||
man-${name}.${section}
|
man-${name}.${section}
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
|
FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
|
||||||
DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section}
|
DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section}
|
||||||
COMPONENT documentation
|
COMPONENT documentation
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
endif()
|
||||||
|
|
|
@ -93,8 +93,10 @@ endfunction()
|
||||||
add_config(config config sway)
|
add_config(config config sway)
|
||||||
add_config(00-defaults security.d/00-defaults sway/security.d)
|
add_config(00-defaults security.d/00-defaults sway/security.d)
|
||||||
|
|
||||||
add_manpage(sway 1)
|
if (A2X_FOUND)
|
||||||
add_manpage(sway 5)
|
add_manpage(sway 1)
|
||||||
add_manpage(sway-input 5)
|
add_manpage(sway 5)
|
||||||
add_manpage(sway-bar 5)
|
add_manpage(sway-input 5)
|
||||||
add_manpage(sway-security 7)
|
add_manpage(sway-bar 5)
|
||||||
|
add_manpage(sway-security 7)
|
||||||
|
endif()
|
||||||
|
|
|
@ -1084,8 +1084,16 @@ bool handle_pointer_scroll(wlc_handle view, uint32_t time, const struct wlc_modi
|
||||||
return EVENT_PASSTHROUGH;
|
return EVENT_PASSTHROUGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void clip_test_cb(void *data, const char *type, int fd) {
|
||||||
|
const char *str = data;
|
||||||
|
write(fd, str, strlen(str));
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
|
||||||
static void handle_wlc_ready(void) {
|
static void handle_wlc_ready(void) {
|
||||||
sway_log(L_DEBUG, "Compositor is ready, executing cmds in queue");
|
sway_log(L_DEBUG, "Compositor is ready, executing cmds in queue");
|
||||||
|
const char *type = "text/plain;charset=utf-8";
|
||||||
|
wlc_set_selection("test", &type, 1, &clip_test_cb);
|
||||||
// Execute commands until there are none left
|
// Execute commands until there are none left
|
||||||
config->active = true;
|
config->active = true;
|
||||||
while (config->cmd_queue->length) {
|
while (config->cmd_queue->length) {
|
||||||
|
|
|
@ -23,4 +23,6 @@ install(
|
||||||
COMPONENT runtime
|
COMPONENT runtime
|
||||||
)
|
)
|
||||||
|
|
||||||
add_manpage(swaygrab 1)
|
if (A2X_FOUND)
|
||||||
|
add_manpage(swaygrab 1)
|
||||||
|
endif()
|
||||||
|
|
|
@ -46,4 +46,6 @@ install(
|
||||||
COMPONENT data
|
COMPONENT data
|
||||||
)
|
)
|
||||||
|
|
||||||
add_manpage(swaylock 1)
|
if (A2X_FOUND)
|
||||||
|
add_manpage(swaylock 1)
|
||||||
|
endif()
|
||||||
|
|
|
@ -18,4 +18,6 @@ install(
|
||||||
COMPONENT runtime
|
COMPONENT runtime
|
||||||
)
|
)
|
||||||
|
|
||||||
add_manpage(swaymsg 1)
|
if (A2X_FOUND)
|
||||||
|
add_manpage(swaymsg 1)
|
||||||
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue