1 |
commit: c7e9f1efa3b4a85d175084e550677cffc56cd3da |
2 |
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 1 21:45:14 2018 +0000 |
4 |
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 1 21:45:56 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7e9f1ef |
7 |
|
8 |
x11-plugins/wmcpuwatch: add documentation handling |
9 |
|
10 |
Add missing app-doc/doxygen[dot] dependency |
11 |
Handle documentation installation in the ebuild |
12 |
Skip documentation build with USE=-doc |
13 |
Add PROJECT_BINARY_DIR in include directories (to find config.h) |
14 |
|
15 |
Closes: https://bugs.gentoo.org/641142 |
16 |
Closes: https://bugs.gentoo.org/641200 |
17 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
18 |
|
19 |
.../wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch | 33 ++++++++++++++++++++++ |
20 |
...puwatch-0.2.ebuild => wmcpuwatch-0.2-r1.ebuild} | 20 +++++++++++-- |
21 |
2 files changed, 50 insertions(+), 3 deletions(-) |
22 |
|
23 |
diff --git a/x11-plugins/wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch b/x11-plugins/wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch |
24 |
new file mode 100644 |
25 |
index 00000000000..bd3ddac6240 |
26 |
--- /dev/null |
27 |
+++ b/x11-plugins/wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch |
28 |
@@ -0,0 +1,33 @@ |
29 |
+diff -Naur wmcpuwatch-0.2.orig/CMakeLists.txt wmcpuwatch-0.2/CMakeLists.txt |
30 |
+--- wmcpuwatch-0.2.orig/CMakeLists.txt 2017-09-03 13:58:43.000000000 +0200 |
31 |
++++ wmcpuwatch-0.2/CMakeLists.txt 2018-01-01 22:28:19.108393247 +0100 |
32 |
+@@ -26,6 +26,7 @@ |
33 |
+ # |
34 |
+ # Define include directories |
35 |
+ include_directories( |
36 |
++ "${PROJECT_BINARY_DIR}" |
37 |
+ ${DOCKAPP_INCLUDE_DIR} |
38 |
+ ${X11_X11_INCLUDE_PATH}) |
39 |
+ |
40 |
+@@ -56,8 +57,6 @@ |
41 |
+ install(TARGETS wmcpuwatch RUNTIME DESTINATION bin) |
42 |
+ install(FILES wmcpuwatch.1 DESTINATION share/man/man1) |
43 |
+ install(FILES wmcpuwatch.desktop DESTINATION share/applications) |
44 |
+-install(FILES README.md DESTINATION share/doc/${CMAKE_PROJECT_NAME}) |
45 |
+-install(FILES ChangeLog DESTINATION share/doc/${CMAKE_PROJECT_NAME} RENAME changelog) |
46 |
+ |
47 |
+ # |
48 |
+ # Create a source tarball using CPack |
49 |
+diff -Naur wmcpuwatch-0.2.orig/doc/CMakeLists.txt wmcpuwatch-0.2/doc/CMakeLists.txt |
50 |
+--- wmcpuwatch-0.2.orig/doc/CMakeLists.txt 2017-09-03 12:00:37.000000000 +0200 |
51 |
++++ wmcpuwatch-0.2/doc/CMakeLists.txt 2018-01-01 22:33:00.690614708 +0100 |
52 |
+@@ -20,9 +20,6 @@ |
53 |
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
54 |
+ COMMENT "Generating code documentation" |
55 |
+ VERBATIM) |
56 |
+- |
57 |
+- # Install the documentation |
58 |
+- install(DIRECTORY html DESTINATION share/doc/${CMAKE_PROJECT_NAME}) |
59 |
+ else (DOXYGEN_FOUND) |
60 |
+ message("doxygen not installed: Not creating code documentation") |
61 |
+ endif (DOXYGEN_FOUND) |
62 |
|
63 |
diff --git a/x11-plugins/wmcpuwatch/wmcpuwatch-0.2.ebuild b/x11-plugins/wmcpuwatch/wmcpuwatch-0.2-r1.ebuild |
64 |
similarity index 50% |
65 |
rename from x11-plugins/wmcpuwatch/wmcpuwatch-0.2.ebuild |
66 |
rename to x11-plugins/wmcpuwatch/wmcpuwatch-0.2-r1.ebuild |
67 |
index d475e3e240e..e758ba522ee 100644 |
68 |
--- a/x11-plugins/wmcpuwatch/wmcpuwatch-0.2.ebuild |
69 |
+++ b/x11-plugins/wmcpuwatch/wmcpuwatch-0.2-r1.ebuild |
70 |
@@ -1,4 +1,4 @@ |
71 |
-# Copyright 1999-2017 Gentoo Foundation |
72 |
+# Copyright 1999-2018 Gentoo Foundation |
73 |
# Distributed under the terms of the GNU General Public License v2 |
74 |
|
75 |
EAPI=6 |
76 |
@@ -11,7 +11,21 @@ SRC_URI="https://bitbucket.org/StarFire/${PN}/downloads/${P}.tar.bz2" |
77 |
LICENSE="GPL-3+" |
78 |
SLOT="0" |
79 |
KEYWORDS="~amd64 ~x86" |
80 |
-IUSE="" |
81 |
+IUSE="doc" |
82 |
|
83 |
RDEPEND=">=x11-libs/libdockapp-0.7:=" |
84 |
-DEPEND="${RDEPEND}" |
85 |
+DEPEND="${RDEPEND} |
86 |
+ doc? ( app-doc/doxygen[dot] )" |
87 |
+ |
88 |
+DOCS=( ChangeLog README.md ) |
89 |
+PATCHES=( "${FILESDIR}"/${P}-cmake.patch ) |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ cmake-utils_src_prepare |
93 |
+ use doc || sed -e "s/add_subdirectory(doc)//" -i CMakeLists.txt || die |
94 |
+} |
95 |
+ |
96 |
+src_install() { |
97 |
+ cmake-utils_src_install |
98 |
+ use doc && dodoc -r "${BUILD_DIR}"/doc/html |
99 |
+} |