commit: c7e9f1efa3b4a85d175084e550677cffc56cd3da Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> AuthorDate: Mon Jan 1 21:45:14 2018 +0000 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> CommitDate: Mon Jan 1 21:45:56 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7e9f1ef
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 .../wmcpuwatch/files/wmcpuwatch-0.2-cmake.patch | 33 ++++++++++++++++++++++ ...puwatch-0.2.ebuild => wmcpuwatch-0.2-r1.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 00000000000..bd3ddac6240 --- /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 similarity index 50% rename from x11-plugins/wmcpuwatch/wmcpuwatch-0.2.ebuild rename to x11-plugins/wmcpuwatch/wmcpuwatch-0.2-r1.ebuild index d475e3e240e..e758ba522ee 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 +}