Wireshark-dev: [Wireshark-dev] Asciidoctor PDF generation
From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Fri, 18 May 2018 08:55:57 +0200
Hi list,

Working on a Debian testing system, the packagers have come so far as to package the recent update to Asciidoctor. This allows to generate the Wireshark documentation (WSUG/WSDG) with the proper layout. One stage is PDF generation, which requires an additional backend, being asciidoctor-pdf. This, not being in the Debian repository, is to be installed though gem, which works perfectly fine. 

Still, for this to work with the Wireshark documentation generation (PDF versions of it) there needs to be an additional option to the asciidoctor command line, otherwise it will not be aware of the PDF backend and fail. The addition is to the cmake/modules/FindAsciidoctor.cmake file, to the macro ASCIIDOCTOR2PDF. In there the parameter ‘--require asciidoctor-pdf’ needs to be added. 

Before pushing a change, I wanted to confirm that this additional parameter would not interfere with other doc build setups. Can you ‘Asciidoctor-J’ people out there confirm?

--- /tmp/5T9mK4_FindAsciidoctor.cmake
+++ src/wireshark/wsug_mate/cmake/modules/FindAsciidoctor.cmake
@@ -127,6 +127,7 @@
                 ${_output_pdf}
             COMMAND ${_asciidoctor_common_command}
                 --backend pdf
+                --require asciidoctor-pdf
                 ${_asciidoctor_common_args}
                 --out-file ${_output_pdf}
                 ${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}


Thanks,
Jaap