commit:     04c9f723291d93383f60f576a177d7cefddd8ab7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 27 00:18:17 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 07:48:52 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04c9f723

dev-util/cmocka: Fix USE doc

Closes: https://bugs.gentoo.org/671404
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-util/cmocka/cmocka-1.1.3.ebuild                | 19 ++++++----
 .../cmocka/files/cmocka-1.1.3-fix-doxygen.patch    | 43 ++++++++++++++++++++++
 2 files changed, 54 insertions(+), 8 deletions(-)

diff --git a/dev-util/cmocka/cmocka-1.1.3.ebuild 
b/dev-util/cmocka/cmocka-1.1.3.ebuild
index 6ae39d5ba5d..c98c2e9957e 100644
--- a/dev-util/cmocka/cmocka-1.1.3.ebuild
+++ b/dev-util/cmocka/cmocka-1.1.3.ebuild
@@ -15,12 +15,16 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc 
~ppc64 ~s390 ~sparc ~
 IUSE="doc static-libs test"
 
 DEPEND="
-       doc? ( app-doc/doxygen[latex] )
+       doc? ( app-doc/doxygen[dot] )
 "
 RDEPEND=""
 
 DOCS=( AUTHORS ChangeLog README.md )
 
+PATCHES=(
+       "${FILESDIR}/${P}-fix-doxygen.patch" # bug 671404
+)
+
 multilib_src_configure() {
        local mycmakeargs=(
                -DWITH_STATIC_LIB=$(usex static-libs)
@@ -32,15 +36,14 @@ multilib_src_configure() {
        cmake-utils_src_configure
 }
 
+multilib_src_compile() {
+       cmake-utils_src_compile
+       multilib_is_native_abi && cmake-utils_src_compile docs
+}
+
 multilib_src_install() {
        if multilib_is_native_abi && use doc; then
-               pushd doc || die
-               doxygen Doxyfile || die
-               rm -f html/*.md5 latex/*.md5 latex/Manifest man/man3/_* || die
-               dodoc -r html/
-               dodoc -r latex/
-               doman man/man3/*.3
-               popd || die
+               local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
        fi
 
        cmake-utils_src_install

diff --git a/dev-util/cmocka/files/cmocka-1.1.3-fix-doxygen.patch 
b/dev-util/cmocka/files/cmocka-1.1.3-fix-doxygen.patch
new file mode 100644
index 00000000000..c093021aa82
--- /dev/null
+++ b/dev-util/cmocka/files/cmocka-1.1.3-fix-doxygen.patch
@@ -0,0 +1,43 @@
+From 1abfea55df24e83c2ea321b5f2b75e1a58963bc6 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <[email protected]>
+Date: Wed, 24 Oct 2018 16:33:39 +0200
+Subject: cmake: Fix doxygen generation
+
+Fixes #12
+
+Signed-off-by: Andreas Schneider <[email protected]>
+---
+ CMakeLists.txt     | 2 +-
+ doc/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 88408a9..7778039 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -51,9 +51,9 @@ if (MINGW)
+ endif (MINGW)
+ 
+ # check subdirectories
+-add_subdirectory(doc)
+ add_subdirectory(include)
+ add_subdirectory(src)
++add_subdirectory(doc)
+ 
+ include(AddCMockaTest)
+ if (UNIT_TESTING)
+diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
+index a7bc65e..6ac7494 100644
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -38,7 +38,7 @@ if (DOXYGEN_FOUND)
+ 
+     doxygen_add_docs(docs
+                      ${cmocka-library_SOURCE_DIR}
+-                     ${cmocka-headers_SOURCE_DIR}
++                     ${cmocka-header_SOURCE_DIR}
+                      ${CMAKE_CURRENT_SOURCE_DIR})
+ endif(DOXYGEN_FOUND)
+ 
+-- 
+cgit v1.2.1

Reply via email to