diff --git a/doxygen-llvm-libs.patch b/doxygen-llvm-libs.patch new file mode 100644 index 0000000..0e1e997 --- /dev/null +++ b/doxygen-llvm-libs.patch @@ -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 diff --git a/doxygen.changes b/doxygen.changes index ff179c9..019a3c1 100644 --- a/doxygen.changes +++ b/doxygen.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Sep 30 13:06:06 UTC 2019 - Franz Sirl + +- 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 diff --git a/doxygen.spec b/doxygen.spec index f4e1a28..396ae0b 100644 --- a/doxygen.spec +++ b/doxygen.spec @@ -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" \