From b0f1d3d6ea1b380e628958bd1b17ccb2c789ec2d Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Wed, 24 Aug 2022 00:43:14 +0200 Subject: Build with AsciiDoc as well as Asciidoctor And bump copyright years. --- CMakeLists.txt | 29 ++++++++++++++++++++--------- LICENSE | 2 +- README.adoc | 11 +++++++---- docs/sdtui.1.adoc | 7 +++++-- src/sdgui.c | 2 +- 5 files changed, 34 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d740ec0..fd2cc27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,20 +130,31 @@ GETTEXT_CREATE_TRANSLATIONS ( # Documentation find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor) -if (NOT ASCIIDOCTOR_EXECUTABLE) - message (FATAL_ERROR "asciidoctor not found") +find_program (A2X_EXECUTABLE a2x) +if (NOT ASCIIDOCTOR_EXECUTABLE AND NOT A2X_EXECUTABLE) + message (FATAL_ERROR "Neither asciidoctor nor a2x were found") endif () foreach (page "${PROJECT_NAME}.1") set (page_output "${PROJECT_BINARY_DIR}/${page}") list (APPEND project_MAN_PAGES "${page_output}") - add_custom_command (OUTPUT ${page_output} - COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage - -a release-version=${PROJECT_VERSION} - "${PROJECT_SOURCE_DIR}/docs/${page}.adoc" - -o "${page_output}" - DEPENDS "docs/${page}.adoc" - COMMENT "Generating man page for ${page}" VERBATIM) + if (ASCIIDOCTOR_EXECUTABLE) + add_custom_command (OUTPUT ${page_output} + COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage + -a release-version=${PROJECT_VERSION} + -o "${page_output}" + "${PROJECT_SOURCE_DIR}/docs/${page}.adoc" + DEPENDS "docs/${page}.adoc" + COMMENT "Generating man page for ${page}" VERBATIM) + elseif (A2X_EXECUTABLE) + add_custom_command (OUTPUT ${page_output} + COMMAND ${A2X_EXECUTABLE} --doctype manpage --format manpage + -a release-version=${PROJECT_VERSION} + -D "${PROJECT_BINARY_DIR}" + "${PROJECT_SOURCE_DIR}/docs/${page}.adoc" + DEPENDS "docs/${page}.adoc" + COMMENT "Generating man page for ${page}" VERBATIM) + endif () endforeach () add_custom_target (docs ALL DEPENDS ${project_MAN_PAGES}) diff --git a/LICENSE b/LICENSE index 594da52..f1407c8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013 - 2021, Přemysl Eric Janouch
+Copyright (c) 2013 - 2022, Přemysl Eric Janouch
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. diff --git a/README.adoc b/README.adoc index 2f928af..d5bee2c 100644 --- a/README.adoc +++ b/README.adoc @@ -28,11 +28,14 @@ The rest of this README will concern itself with externalities. Building and Running -------------------- -Build-only dependencies: CMake, pkg-config, gettext utilities, asciidoctor, +Build-only dependencies: + CMake, pkg-config, gettext utilities, asciidoctor or asciidoc + +Optional build-only dependencies: librsvg (for the GUI), icoutils (for the GUI, when targetting Windows) + -Runtime dependencies: ncursesw, zlib, ICU, termo (included), glib-2.0 >= 2.38, - pango, xcb, xcb-xfixes (the latter two optional for the TUI), - gtk+-3.0 (for the GUI) +Runtime dependencies: + ncursesw, zlib, ICU, termo (included), glib-2.0 >= 2.38, pango + +Optional runtime dependencies: + xcb, xcb-xfixes (the first two for the TUI), gtk+-3.0 (for the GUI) $ git clone --recursive https://git.janouch.name/p/sdtui.git $ mkdir sdtui/build diff --git a/docs/sdtui.1.adoc b/docs/sdtui.1.adoc index 0292271..f70248f 100644 --- a/docs/sdtui.1.adoc +++ b/docs/sdtui.1.adoc @@ -48,10 +48,13 @@ Luckily, some compositors, such as Sway, synchronize selections with Xwayland. To set up automatically loaded dictionaries, use the following scheme: +// AsciiDoc would otherwise like to process tildes as a long subscript. +:tilde: ~ + [subs="normal"] [Dictionaries] - _name 1_ = __~/path/to/dict.ifo__ - _name 2_ = __~/another/dict.ifo__ + _name 1_ = __{tilde}/path/to/dict.ifo__ + _name 2_ = __{tilde}/another/dict.ifo__ The left-hand side keys define their appearance in the tab bar. diff --git a/src/sdgui.c b/src/sdgui.c index e0becd3..457e72e 100644 --- a/src/sdgui.c +++ b/src/sdgui.c @@ -1,7 +1,7 @@ /* * StarDict GTK+ UI * - * Copyright (c) 2020 - 2021, Přemysl Eric Janouch
+ * Copyright (c) 2020 - 2022, Přemysl Eric Janouch
* * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted. -- cgit v1.2.3-70-g09d2