mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
ccache: version bump 4.2.1 -> 4.3
Instead of [1] a very similar PR [2] was merged that allows enabling/disabling documentation builds. So drop the patch here and use the upstream cmake option ENABLE_DOCUMENTATION instead. [1] https://github.com/ccache/ccache/pull/844 [2] https://github.com/ccache/ccache/pull/842 (From OE-Core rev: 1eedc5f822933928ed7861350ad47ff9c096552a) Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2809a33b74
commit
4638576d10
-161
@@ -1,161 +0,0 @@
|
|||||||
From aebabafe085dd1b84027a1e31e5566c82528bd62 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bastian Krause <bst@pengutronix.de>
|
|
||||||
Date: Tue, 4 May 2021 11:41:56 +0200
|
|
||||||
Subject: [PATCH] doc: allow disabling docs/man page generation
|
|
||||||
|
|
||||||
The assumption that HTML documentation and manual pages should be
|
|
||||||
generated if the required tools (asciidoc) are present is not always
|
|
||||||
true. So add a cmake option that allows disabling the docs/man page
|
|
||||||
generation. The default is to generate docs/man pages like before.
|
|
||||||
|
|
||||||
Origin: https://github.com/ccache/ccache/pull/844
|
|
||||||
Upstream-Status: Submitted
|
|
||||||
Signed-off-by: Bastian Krause <bst@pengutronix.de>
|
|
||||||
---
|
|
||||||
doc/CMakeLists.txt | 128 +++++++++++++++++++++++----------------------
|
|
||||||
1 file changed, 66 insertions(+), 62 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
|
|
||||||
index c5ce224d..74b7831b 100644
|
|
||||||
--- a/doc/CMakeLists.txt
|
|
||||||
+++ b/doc/CMakeLists.txt
|
|
||||||
@@ -1,70 +1,74 @@
|
|
||||||
+option(BUILD_DOCS "Indicates whether HTML documentation and manual pages should be built or not" ON)
|
|
||||||
+
|
|
||||||
find_program(ASCIIDOC_EXE asciidoc)
|
|
||||||
mark_as_advanced(ASCIIDOC_EXE) # Don't show in CMake UIs
|
|
||||||
|
|
||||||
-if(NOT ASCIIDOC_EXE)
|
|
||||||
- message(WARNING "Could not find asciidoc; documentation will not be generated")
|
|
||||||
-else()
|
|
||||||
- #
|
|
||||||
- # HTML documentation
|
|
||||||
- #
|
|
||||||
- function(generate_html adoc_file)
|
|
||||||
- get_filename_component(base_name "${adoc_file}" NAME_WE)
|
|
||||||
- set(html_file "${base_name}.html")
|
|
||||||
- add_custom_command(
|
|
||||||
- OUTPUT "${html_file}"
|
|
||||||
- COMMAND
|
|
||||||
- ${ASCIIDOC_EXE}
|
|
||||||
- -o "${html_file}"
|
|
||||||
- -a revnumber="${CCACHE_VERSION}"
|
|
||||||
- -a toc
|
|
||||||
- -b xhtml11
|
|
||||||
- "${CMAKE_SOURCE_DIR}/${adoc_file}"
|
|
||||||
- MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/${adoc_file}"
|
|
||||||
- )
|
|
||||||
- set(html_files "${html_files}" "${html_file}" PARENT_SCOPE)
|
|
||||||
- endfunction()
|
|
||||||
+if (BUILD_DOCS)
|
|
||||||
+ if(NOT ASCIIDOC_EXE)
|
|
||||||
+ message(WARNING "Could not find asciidoc; documentation will not be generated")
|
|
||||||
+ else()
|
|
||||||
+ #
|
|
||||||
+ # HTML documentation
|
|
||||||
+ #
|
|
||||||
+ function(generate_html adoc_file)
|
|
||||||
+ get_filename_component(base_name "${adoc_file}" NAME_WE)
|
|
||||||
+ set(html_file "${base_name}.html")
|
|
||||||
+ add_custom_command(
|
|
||||||
+ OUTPUT "${html_file}"
|
|
||||||
+ COMMAND
|
|
||||||
+ ${ASCIIDOC_EXE}
|
|
||||||
+ -o "${html_file}"
|
|
||||||
+ -a revnumber="${CCACHE_VERSION}"
|
|
||||||
+ -a toc
|
|
||||||
+ -b xhtml11
|
|
||||||
+ "${CMAKE_SOURCE_DIR}/${adoc_file}"
|
|
||||||
+ MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/${adoc_file}"
|
|
||||||
+ )
|
|
||||||
+ set(html_files "${html_files}" "${html_file}" PARENT_SCOPE)
|
|
||||||
+ endfunction()
|
|
||||||
|
|
||||||
- generate_html(LICENSE.adoc)
|
|
||||||
- generate_html(doc/AUTHORS.adoc)
|
|
||||||
- generate_html(doc/MANUAL.adoc)
|
|
||||||
- generate_html(doc/NEWS.adoc)
|
|
||||||
+ generate_html(LICENSE.adoc)
|
|
||||||
+ generate_html(doc/AUTHORS.adoc)
|
|
||||||
+ generate_html(doc/MANUAL.adoc)
|
|
||||||
+ generate_html(doc/NEWS.adoc)
|
|
||||||
|
|
||||||
- add_custom_target(doc-html DEPENDS "${html_files}")
|
|
||||||
- set(doc_files "${html_files}")
|
|
||||||
+ add_custom_target(doc-html DEPENDS "${html_files}")
|
|
||||||
+ set(doc_files "${html_files}")
|
|
||||||
|
|
||||||
- #
|
|
||||||
- # Man page
|
|
||||||
- #
|
|
||||||
- find_program(A2X_EXE a2x)
|
|
||||||
- mark_as_advanced(A2X_EXE) # Don't show in CMake UIs
|
|
||||||
- if(NOT A2X_EXE)
|
|
||||||
- message(WARNING "Could not find a2x; man page will not be generated")
|
|
||||||
- else()
|
|
||||||
- # MANUAL.adoc -> MANUAL.xml -> man page
|
|
||||||
- add_custom_command(
|
|
||||||
- OUTPUT MANUAL.xml
|
|
||||||
- COMMAND
|
|
||||||
- ${ASCIIDOC_EXE}
|
|
||||||
- -o -
|
|
||||||
- -a revnumber=${CCACHE_VERSION}
|
|
||||||
- -d manpage
|
|
||||||
- -b docbook "${CMAKE_SOURCE_DIR}/doc/MANUAL.adoc"
|
|
||||||
- | perl -pe 's!<literal>\(.*?\)</literal>!<emphasis role="strong">\\1</emphasis>!g'
|
|
||||||
- >MANUAL.xml
|
|
||||||
- MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/doc/MANUAL.adoc"
|
|
||||||
- )
|
|
||||||
- add_custom_command(
|
|
||||||
- OUTPUT ccache.1
|
|
||||||
- COMMAND ${A2X_EXE} --doctype manpage --format manpage MANUAL.xml
|
|
||||||
- MAIN_DEPENDENCY MANUAL.xml
|
|
||||||
- )
|
|
||||||
- add_custom_target(doc-man-page DEPENDS ccache.1)
|
|
||||||
- install(
|
|
||||||
- FILES "${CMAKE_CURRENT_BINARY_DIR}/ccache.1"
|
|
||||||
- DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
|
|
||||||
- )
|
|
||||||
- set(doc_files "${doc_files}" ccache.1)
|
|
||||||
- endif()
|
|
||||||
+ #
|
|
||||||
+ # Man page
|
|
||||||
+ #
|
|
||||||
+ find_program(A2X_EXE a2x)
|
|
||||||
+ mark_as_advanced(A2X_EXE) # Don't show in CMake UIs
|
|
||||||
+ if(NOT A2X_EXE)
|
|
||||||
+ message(WARNING "Could not find a2x; man page will not be generated")
|
|
||||||
+ else()
|
|
||||||
+ # MANUAL.adoc -> MANUAL.xml -> man page
|
|
||||||
+ add_custom_command(
|
|
||||||
+ OUTPUT MANUAL.xml
|
|
||||||
+ COMMAND
|
|
||||||
+ ${ASCIIDOC_EXE}
|
|
||||||
+ -o -
|
|
||||||
+ -a revnumber=${CCACHE_VERSION}
|
|
||||||
+ -d manpage
|
|
||||||
+ -b docbook "${CMAKE_SOURCE_DIR}/doc/MANUAL.adoc"
|
|
||||||
+ | perl -pe 's!<literal>\(.*?\)</literal>!<emphasis role="strong">\\1</emphasis>!g'
|
|
||||||
+ >MANUAL.xml
|
|
||||||
+ MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/doc/MANUAL.adoc"
|
|
||||||
+ )
|
|
||||||
+ add_custom_command(
|
|
||||||
+ OUTPUT ccache.1
|
|
||||||
+ COMMAND ${A2X_EXE} --doctype manpage --format manpage MANUAL.xml
|
|
||||||
+ MAIN_DEPENDENCY MANUAL.xml
|
|
||||||
+ )
|
|
||||||
+ add_custom_target(doc-man-page DEPENDS ccache.1)
|
|
||||||
+ install(
|
|
||||||
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/ccache.1"
|
|
||||||
+ DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
|
|
||||||
+ )
|
|
||||||
+ set(doc_files "${doc_files}" ccache.1)
|
|
||||||
+ endif()
|
|
||||||
|
|
||||||
- add_custom_target(doc ALL DEPENDS "${doc_files}")
|
|
||||||
+ add_custom_target(doc ALL DEPENDS "${doc_files}")
|
|
||||||
+ endif()
|
|
||||||
endif()
|
|
||||||
--
|
|
||||||
2.29.2
|
|
||||||
|
|
||||||
+3
-5
@@ -11,10 +11,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=698a26b57e513d678e1e7727bf56395b"
|
|||||||
|
|
||||||
DEPENDS = "zstd"
|
DEPENDS = "zstd"
|
||||||
|
|
||||||
SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz \
|
SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
|
||||||
file://0001-doc-allow-disabling-docs-man-page-generation.patch \
|
SRC_URI[sha256sum] = "b9789c42e52c73e99428f311a34def9ffec3462736439afd12dbacc7987c1533"
|
||||||
"
|
|
||||||
SRC_URI[sha256sum] = "320d2b17d2f76393e5d4bb28c8dee5ca783248e9cd23dff0654694d60f8a4b62"
|
|
||||||
|
|
||||||
UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
|
UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
|
||||||
|
|
||||||
@@ -24,4 +22,4 @@ PATCHTOOL = "patch"
|
|||||||
|
|
||||||
BBCLASSEXTEND = "native nativesdk"
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
|
|
||||||
PACKAGECONFIG[docs] = "-DBUILD_DOCS=ON,-DBUILD_DOCS=OFF,asciidoc"
|
PACKAGECONFIG[docs] = "-DENABLE_DOCUMENTATION=ON,-DENABLE_DOCUMENTATION=OFF,asciidoc"
|
||||||
Reference in New Issue
Block a user