summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2018-01-01 22:45:14 +0100
committerBernard Cafarelli <voyageur@gentoo.org>2018-01-01 22:45:56 +0100
commitc7e9f1efa3b4a85d175084e550677cffc56cd3da (patch)
treefa1d737960076d7e04494ebc1929059c886deb70 /x11-plugins/wmcpuwatch
parentdev-util/strace: Disable test suite when FEATURES=usersandbox is set (diff)
downloadgentoo-c7e9f1efa3b4a85d175084e550677cffc56cd3da.tar.gz
gentoo-c7e9f1efa3b4a85d175084e550677cffc56cd3da.tar.bz2
gentoo-c7e9f1efa3b4a85d175084e550677cffc56cd3da.zip
x11-plugins/wmcpuwatch: add documentation handling
Add missing app-doc/doxygen[dot] dependency Handle documentation installation in the ebuild Skip documentation build with USE=-doc Add PROJECT_BINARY_DIR in include directories (to find config.h) Closes: https://bugs.gentoo.org/641142 Closes: https://bugs.gentoo.org/641200 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'x11-plugins/wmcpuwatch')
-rw-r--r--x11-plugins/wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch33
-rw-r--r--x11-plugins/wmcpuwatch/wmcpuwatch-0.2-r1.ebuild (renamed from x11-plugins/wmcpuwatch/wmcpuwatch-0.2.ebuild)20
2 files changed, 50 insertions, 3 deletions
diff --git a/x11-plugins/wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch b/x11-plugins/wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch
new file mode 100644
index 000000000000..bd3ddac62403
--- /dev/null
+++ b/x11-plugins/wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch
@@ -0,0 +1,33 @@
+diff -Naur wmcpuwatch-0.2.orig/CMakeLists.txt wmcpuwatch-0.2/CMakeLists.txt
+--- wmcpuwatch-0.2.orig/CMakeLists.txt 2017-09-03 13:58:43.000000000 +0200
++++ wmcpuwatch-0.2/CMakeLists.txt 2018-01-01 22:28:19.108393247 +0100
+@@ -26,6 +26,7 @@
+ #
+ # Define include directories
+ include_directories(
++ "${PROJECT_BINARY_DIR}"
+ ${DOCKAPP_INCLUDE_DIR}
+ ${X11_X11_INCLUDE_PATH})
+
+@@ -56,8 +57,6 @@
+ install(TARGETS wmcpuwatch RUNTIME DESTINATION bin)
+ install(FILES wmcpuwatch.1 DESTINATION share/man/man1)
+ install(FILES wmcpuwatch.desktop DESTINATION share/applications)
+-install(FILES README.md DESTINATION share/doc/${CMAKE_PROJECT_NAME})
+-install(FILES ChangeLog DESTINATION share/doc/${CMAKE_PROJECT_NAME} RENAME changelog)
+
+ #
+ # Create a source tarball using CPack
+diff -Naur wmcpuwatch-0.2.orig/doc/CMakeLists.txt wmcpuwatch-0.2/doc/CMakeLists.txt
+--- wmcpuwatch-0.2.orig/doc/CMakeLists.txt 2017-09-03 12:00:37.000000000 +0200
++++ wmcpuwatch-0.2/doc/CMakeLists.txt 2018-01-01 22:33:00.690614708 +0100
+@@ -20,9 +20,6 @@
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "Generating code documentation"
+ VERBATIM)
+-
+- # Install the documentation
+- install(DIRECTORY html DESTINATION share/doc/${CMAKE_PROJECT_NAME})
+ else (DOXYGEN_FOUND)
+ message("doxygen not installed: Not creating code documentation")
+ endif (DOXYGEN_FOUND)
diff --git a/x11-plugins/wmcpuwatch/wmcpuwatch-0.2.ebuild b/x11-plugins/wmcpuwatch/wmcpuwatch-0.2-r1.ebuild
index d475e3e240e7..e758ba522eee 100644
--- a/x11-plugins/wmcpuwatch/wmcpuwatch-0.2.ebuild
+++ b/x11-plugins/wmcpuwatch/wmcpuwatch-0.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -11,7 +11,21 @@ SRC_URI="https://bitbucket.org/StarFire/${PN}/downloads/${P}.tar.bz2"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="doc"
RDEPEND=">=x11-libs/libdockapp-0.7:="
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[dot] )"
+
+DOCS=( ChangeLog README.md )
+PATCHES=( "${FILESDIR}"/${P}-cmake.patch )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ use doc || sed -e "s/add_subdirectory(doc)//" -i CMakeLists.txt || die
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc -r "${BUILD_DIR}"/doc/html
+}