SHA256
1
0
forked from pool/doxygen

Accepting request 734103 from home:fsirl:doxygen-libclang

Hi,
this request adds optional support for doxygen with libclang integration to the specfile. Doxygen with libclang support is regularly requested by my users, so it would be nice to have upstream. The build currently only fails against SUSE-SLE-15-SP1:Update because the following clang7 change hasn't been backported yet:
* Mon Jul 01 2019 Aaron Puchert <aaronpuchert@alice-dsl.net>
- Add a clang-%{_sonum} symlink, which is referenced by
  /usr/lib64/cmake/clang/ClangTargets.cmake (boo#1138457)

Franz.

OBS-URL: https://build.opensuse.org/request/show/734103
OBS-URL: https://build.opensuse.org/package/show/devel:tools/doxygen?expand=0&rev=140
This commit is contained in:
Petr Gajdos 2019-09-30 14:34:40 +00:00 committed by Git OBS Bridge
parent 718ad89419
commit a8bf8d94ec
3 changed files with 33 additions and 0 deletions

13
doxygen-llvm-libs.patch Normal file
View File

@ -0,0 +1,13 @@
--- src/CMakeLists.txt~ 2019-07-28 13:32:49.436473952 +0200
+++ src/CMakeLists.txt 2019-07-28 13:33:52.016439550 +0200
@@ -261,9 +261,8 @@
endif()
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
- llvm_map_components_to_libnames(llvm_libs support core option)
target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS})
- set(CLANG_LIBS libclang clangTooling ${llvm_libs})
+ set(CLANG_LIBS libclang clangTooling LLVM)
endif()
target_link_libraries(doxygen

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Sep 30 13:06:06 UTC 2019 - Franz Sirl <franz.sirl-obs@lauterbach.com>
- Optional build with libclang support:
* add doxygen-llvm-libs.patch to link with monolithic libLLVM
* support "--with libclang" in specfile
-------------------------------------------------------------------
Mon Sep 30 11:13:23 UTC 2019 - pgajdos@suse.com

View File

@ -16,6 +16,9 @@
#
# build with "--with libclang" to enable libclang support
%bcond_with libclang
Name: doxygen
Version: 1.8.16
Release: 0
@ -35,12 +38,16 @@ Patch3: vhdlparser-no-return.patch
Patch4: doxygen-dot-one-thread.patch
# really do not require git executable
Patch5: doxygen-git-not-required.patch
Patch6: doxygen-llvm-libs.patch
BuildRequires: bison
BuildRequires: cmake >= 2.8.12
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: python3-base
BuildRequires: python3-xml
%if %{with libclang}
BuildRequires: llvm-clang-devel
%endif
# Do not bother building documentation with latex since it is present on the
# web trivialy for all versions of doxygen
Obsoletes: doxygen-doc
@ -62,6 +69,9 @@ as well.
%patch4 -p1
%endif
%patch5 -p1
%if %{with libclang}
%patch6
%endif
%build
%cmake \
@ -69,6 +79,9 @@ as well.
-Dbuild_xmlparser=ON \
-Dbuild_search=OFF \
-Dbuild_wizard=OFF \
%if %{with libclang}
-Duse_libclang=ON \
%endif
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,relro,-z,now" \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,relro,-z,now" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,relro,-z,now" \