summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBastian Krause <bst@pengutronix.de>2021-05-12 12:22:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-22 10:03:10 +0100
commit70ef9ded892eaa7ac230aa8b3c163458b6746d7c (patch)
tree4e0a9146345199014cea51090c9ce4c7980f6cac /meta
parent1170b40cd23978aac9d8e73ee6e30e8ee77e2a50 (diff)
downloadpoky-70ef9ded892eaa7ac230aa8b3c163458b6746d7c.tar.gz
ccache: add packageconfig docs option
Before, ccache's configure stage built HTML documentation and man pages depending on if asciidoc is installed. This patch makes it configurable. Pass the new cmake option ENABLE_DOCUMENTATION along and add the asciidoc dependency if necessary. This fixes an issue when ccache's configure stage found asciidoc/a2x on the system outside of the sysroot (e.g. installed via 'apt install asciidoc'). ccache would then decide to build docs and manual pages, but would fail during compilation: the system's a2x could not find the system's asciidoc because it did not reside in the set PATH. By enabling/disabling docs/man page generation explicitly and adding asciidoc to DEPENDS as necessary, this is no longer an issue. [ This corresponds to commit b0aedd74 and parts of commit 1eedc5f8, with the patch replaced by the upstream version. ] (From OE-Core rev: 3ca3c890834152597d8440b77e3d2767ca72c7a6) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/ccache/ccache/0001-CMake-make-build-of-documentation-optional-842.patch36
-rw-r--r--meta/recipes-devtools/ccache/ccache_4.2.bb4
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ccache/ccache/0001-CMake-make-build-of-documentation-optional-842.patch b/meta/recipes-devtools/ccache/ccache/0001-CMake-make-build-of-documentation-optional-842.patch
new file mode 100644
index 0000000000..9f6bb1780b
--- /dev/null
+++ b/meta/recipes-devtools/ccache/ccache/0001-CMake-make-build-of-documentation-optional-842.patch
@@ -0,0 +1,36 @@
1From 857d74f2c5fff79589e9b35cd405bf8ffffafb54 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
3Date: Mon, 3 May 2021 18:44:53 +0200
4Subject: [PATCH] CMake: make build of documentation optional (#842)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9So we don't need to support corner cases as for example one fixed in
10commit f6202db308e3 ("doc/MANUAL.adoc: Don't use non-ASCII quotes
11(#761)") when the documentation is actually not needed at all as ccache
12is used as a build tool only.
13
14Signed-off-by: Petr Štetiar <ynezz@true.cz>
15Upstream-Status: Backport [b96ca763c453a602b5516b4b9ca5e2829528e318]
16Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
17---
18 CMakeLists.txt | 5 ++++-
19 1 file changed, 4 insertions(+), 1 deletion(-)
20
21diff --git a/CMakeLists.txt b/CMakeLists.txt
22index 40e21a57..151cc5f7 100644
23--- a/CMakeLists.txt
24+++ b/CMakeLists.txt
25@@ -131,7 +131,10 @@ target_link_libraries(ccache PRIVATE standard_settings standard_warnings ccache_
26 #
27 # Documentation
28 #
29-add_subdirectory(doc)
30+option(ENABLE_DOCUMENTATION "Enable documentation" ON)
31+if(ENABLE_DOCUMENTATION)
32+ add_subdirectory(doc)
33+endif()
34
35 #
36 # Installation
diff --git a/meta/recipes-devtools/ccache/ccache_4.2.bb b/meta/recipes-devtools/ccache/ccache_4.2.bb
index 9957bc7e65..b76bf043f0 100644
--- a/meta/recipes-devtools/ccache/ccache_4.2.bb
+++ b/meta/recipes-devtools/ccache/ccache_4.2.bb
@@ -12,10 +12,14 @@ LIC_FILES_CHKSUM = "file://LICENSE.adoc;md5=28afb89f649f309e7ac1aab554564637"
12DEPENDS = "zstd" 12DEPENDS = "zstd"
13 13
14SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz" 14SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz"
15SRC_URI += "file://0001-CMake-make-build-of-documentation-optional-842.patch"
16
15SRC_URI[sha256sum] = "dbf139ff32031b54cb47f2d7983269f328df14b5a427882f89f7721e5c411b7e" 17SRC_URI[sha256sum] = "dbf139ff32031b54cb47f2d7983269f328df14b5a427882f89f7721e5c411b7e"
16 18
17UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/" 19UPSTREAM_CHECK_URI = "https://github.com/ccache/ccache/releases/"
18 20
21PACKAGECONFIG[docs] = "-DENABLE_DOCUMENTATION=ON,-DENABLE_DOCUMENTATION=OFF,asciidoc"
22
19inherit cmake 23inherit cmake
20 24
21PATCHTOOL = "patch" 25PATCHTOOL = "patch"