summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-07-04 16:00:13 -0400
committerLibravatar Drew DeVault <ddevault@vistarmedia.com>2017-07-11 20:08:06 -0400
commitcf4ea4c86b2023e3d1f9fa54b9e1dcf2fc27ef3d (patch)
tree511bae3020cb9a9293feed881b853f5d7828e801
parentMerge pull request #1256 from lheckemann/doc-png (diff)
downloadsway-cf4ea4c86b2023e3d1f9fa54b9e1dcf2fc27ef3d.tar.gz
sway-cf4ea4c86b2023e3d1f9fa54b9e1dcf2fc27ef3d.tar.zst
sway-cf4ea4c86b2023e3d1f9fa54b9e1dcf2fc27ef3d.zip
Make asciidoc (and man pages) optional
And remove it from the build
-rw-r--r--.build.yml1
-rw-r--r--.travis.yml1
-rw-r--r--CMake/Manpage.cmake56
-rw-r--r--sway/CMakeLists.txt12
-rw-r--r--sway/handlers.c8
-rw-r--r--swaygrab/CMakeLists.txt4
-rw-r--r--swaylock/CMakeLists.txt4
-rw-r--r--swaymsg/CMakeLists.txt4
8 files changed, 53 insertions, 37 deletions
diff --git a/.build.yml b/.build.yml
index 161c796a..9c9e8adb 100644
--- a/.build.yml
+++ b/.build.yml
@@ -10,7 +10,6 @@ packages:
10 - cairo 10 - cairo
11 - wayland 11 - wayland
12 - gdk-pixbuf2 12 - gdk-pixbuf2
13 - asciidoc
14sources: 13sources:
15 - https://git.sr.ht/~sircmpwn/sway 14 - https://git.sr.ht/~sircmpwn/sway
16tasks: 15tasks:
diff --git a/.travis.yml b/.travis.yml
index 2bb17d40..69634765 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,7 +10,6 @@ arch:
10 packages: 10 packages:
11 - cmake 11 - cmake
12 - xorg-server-xwayland 12 - xorg-server-xwayland
13 - asciidoc
14 - json-c 13 - json-c
15 - wayland 14 - wayland
16 - xcb-util-image 15 - xcb-util-image
diff --git a/CMake/Manpage.cmake b/CMake/Manpage.cmake
index d9780bc4..cc04d710 100644
--- a/CMake/Manpage.cmake
+++ b/CMake/Manpage.cmake
@@ -1,31 +1,33 @@
1find_package(A2X REQUIRED) 1find_package(A2X)
2 2
3add_custom_target(man ALL) 3if (A2X_FOUND)
4 add_custom_target(man ALL)
4 5
5function(add_manpage name section) 6 function(add_manpage name section)
6 add_custom_command( 7 add_custom_command(
7 OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} 8 OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
8 COMMAND ${A2X_COMMAND} 9 COMMAND ${A2X_COMMAND}
9 --no-xmllint 10 --no-xmllint
10 --doctype manpage 11 --doctype manpage
11 --format manpage 12 --format manpage
12 -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 13 -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
13 ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt 14 ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
14 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt 15 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
15 COMMENT Generating manpage for ${name}.${section} 16 COMMENT Generating manpage for ${name}.${section}
16 ) 17 )
17 18
18 add_custom_target(man-${name}.${section} 19 add_custom_target(man-${name}.${section}
19 DEPENDS 20 DEPENDS
20 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} 21 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
21 ) 22 )
22 add_dependencies(man 23 add_dependencies(man
23 man-${name}.${section} 24 man-${name}.${section}
24 ) 25 )
25 26
26 install( 27 install(
27 FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} 28 FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
28 DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section} 29 DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section}
29 COMPONENT documentation 30 COMPONENT documentation
30 ) 31 )
31endfunction() 32 endfunction()
33endif()
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt
index 981f8a07..bf0b2e7f 100644
--- a/sway/CMakeLists.txt
+++ b/sway/CMakeLists.txt
@@ -93,8 +93,10 @@ endfunction()
93add_config(config config sway) 93add_config(config config sway)
94add_config(00-defaults security.d/00-defaults sway/security.d) 94add_config(00-defaults security.d/00-defaults sway/security.d)
95 95
96add_manpage(sway 1) 96if (A2X_FOUND)
97add_manpage(sway 5) 97 add_manpage(sway 1)
98add_manpage(sway-input 5) 98 add_manpage(sway 5)
99add_manpage(sway-bar 5) 99 add_manpage(sway-input 5)
100add_manpage(sway-security 7) 100 add_manpage(sway-bar 5)
101 add_manpage(sway-security 7)
102endif()
diff --git a/sway/handlers.c b/sway/handlers.c
index 39261e3d..052789ca 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -1084,8 +1084,16 @@ bool handle_pointer_scroll(wlc_handle view, uint32_t time, const struct wlc_modi
1084 return EVENT_PASSTHROUGH; 1084 return EVENT_PASSTHROUGH;
1085} 1085}
1086 1086
1087static void clip_test_cb(void *data, const char *type, int fd) {
1088 const char *str = data;
1089 write(fd, str, strlen(str));
1090 close(fd);
1091}
1092
1087static void handle_wlc_ready(void) { 1093static void handle_wlc_ready(void) {
1088 sway_log(L_DEBUG, "Compositor is ready, executing cmds in queue"); 1094 sway_log(L_DEBUG, "Compositor is ready, executing cmds in queue");
1095 const char *type = "text/plain;charset=utf-8";
1096 wlc_set_selection("test", &type, 1, &clip_test_cb);
1089 // Execute commands until there are none left 1097 // Execute commands until there are none left
1090 config->active = true; 1098 config->active = true;
1091 while (config->cmd_queue->length) { 1099 while (config->cmd_queue->length) {
diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt
index a5e91e9c..42806cae 100644
--- a/swaygrab/CMakeLists.txt
+++ b/swaygrab/CMakeLists.txt
@@ -23,4 +23,6 @@ install(
23 COMPONENT runtime 23 COMPONENT runtime
24) 24)
25 25
26add_manpage(swaygrab 1) 26if (A2X_FOUND)
27 add_manpage(swaygrab 1)
28endif()
diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt
index 4aec6424..90b54a72 100644
--- a/swaylock/CMakeLists.txt
+++ b/swaylock/CMakeLists.txt
@@ -46,4 +46,6 @@ install(
46 COMPONENT data 46 COMPONENT data
47) 47)
48 48
49add_manpage(swaylock 1) 49if (A2X_FOUND)
50 add_manpage(swaylock 1)
51endif()
diff --git a/swaymsg/CMakeLists.txt b/swaymsg/CMakeLists.txt
index f23919b8..b428a409 100644
--- a/swaymsg/CMakeLists.txt
+++ b/swaymsg/CMakeLists.txt
@@ -18,4 +18,6 @@ install(
18 COMPONENT runtime 18 COMPONENT runtime
19) 19)
20 20
21add_manpage(swaymsg 1) 21if (A2X_FOUND)
22 add_manpage(swaymsg 1)
23endif()