SHA256
1
0
forked from pool/doxygen

Accepting request 841435 from home:fsirl:doxygen-libclang

This request does 2 things:

1. The doxygen/doxywizard C++ code in doxygen-1.8.20 triggers GCC bug 85180, leading to exorbitant compile times. This bug was fixed for GCC-8, but not backported to GCC-7 (also not included in the SUSE gcc7 package).
Workaround this bug by using the gcc9 package on SLE15 based distributions.

2. Adjust the libclang support to the changes in doxygen-1.8.20. This also disables libclang support for SLES15GA, because clang on SLES15GA is not compatible.

OBS-URL: https://build.opensuse.org/request/show/841435
OBS-URL: https://build.opensuse.org/package/show/devel:tools/doxygen?expand=0&rev=156
This commit is contained in:
Petr Gajdos 2020-10-13 08:42:23 +00:00 committed by Git OBS Bridge
parent a45b8135ac
commit ad2f9c1fe6
7 changed files with 45 additions and 53 deletions

View File

@ -1,33 +0,0 @@
--- doxygen-1.8.16/addon/doxyapp/CMakeLists.txt~ 2020-07-07 16:52:25.526347653 +0200
+++ doxygen-1.8.16/addon/doxyapp/CMakeLists.txt 2020-07-07 17:07:15.382642253 +0200
@@ -14,7 +14,7 @@
)
if (use_libclang)
- set(CLANG_LIBS libclang clangTooling ${llvm_libs})
+ set(CLANG_LIBS libclang clang-cpp ${llvm_libs})
endif()
target_link_libraries(doxyapp
--- doxygen-1.8.16/addon/doxyparse/CMakeLists.txt~ 2020-07-07 16:52:25.526347653 +0200
+++ doxygen-1.8.16/addon/doxyparse/CMakeLists.txt 2020-07-07 17:07:38.729600748 +0200
@@ -14,7 +14,7 @@
)
if (use_libclang)
- set(CLANG_LIBS libclang clangTooling ${llvm_libs})
+ set(CLANG_LIBS libclang clang-cpp ${llvm_libs})
endif()
target_link_libraries(doxyparse
--- doxygen-1.8.16/src/CMakeLists.txt~ 2020-07-07 16:52:25.538347118 +0200
+++ doxygen-1.8.16/src/CMakeLists.txt 2020-07-07 17:08:18.567823582 +0200
@@ -269,7 +269,7 @@
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS})
- set(CLANG_LIBS libclang clangTooling LLVM)
+ set(CLANG_LIBS libclang clang-cpp LLVM)
endif()
target_link_libraries(doxygen

View File

@ -1,13 +0,0 @@
--- 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

@ -0,0 +1,11 @@
--- doxygen-1.8.20/src/CMakeLists.txt.orig 2020-10-06 15:56:02.841527965 +0200
+++ doxygen-1.8.20/src/CMakeLists.txt 2020-10-06 16:07:14.226206979 +0200
@@ -341,7 +341,7 @@
set(CLANG_LIBS libclang clangTooling)
else() # dynamically linked version of clang
llvm_config(doxymain USE_SHARED support)
- set(CLANG_LIBS libclang clang-cpp)
+ set(CLANG_LIBS libclang clangTooling)
endif()
target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS})
endif()

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Oct 12 15:55:24 UTC 2020 - Franz Sirl <franz.sirl-obs@lauterbach.com>
- Use gcc9 for building on SLE_15 based distributions to workaround
gcc7 bug PR85180.
- Adjust building with libclang support for doxygen-1.8.20.
-------------------------------------------------------------------
Fri Oct 2 00:59:49 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -15,9 +15,11 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?sle_version} >= 150100
# build with "--with libclang" to enable libclang support
%bcond_with libclang
%endif
Name: doxygen
Version: 1.8.20
Release: 0
@ -33,14 +35,17 @@ Patch0: %{name}-modify_footer.patch
Patch1: %{name}-no-lowercase-man-names.patch
# PATCH-FIX-UPSTREAM: add missing returns to non-void functions
Patch3: vhdlparser-no-return.patch
Patch6: doxygen-llvm-libs.patch
Patch10: doxygen-libclang-cpp.patch
Patch10: doxygen-no-libclang-cpp.patch
# PATCH-FIX-UPSTREAM
Patch11: 0001-issue-7979-C++-enums-being-defined-in-multiple-files.patch
BuildRequires: bison
BuildRequires: cmake >= 2.8.12
BuildRequires: flex
%if 0%{?suse_version} <= 1500
BuildRequires: gcc9-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: python3-base
BuildRequires: python3-xml
# Do not bother building documentation with latex since it is present on the
@ -64,10 +69,7 @@ as well.
%patch1 -p1
%patch3 -p1
%if %{with libclang}
%patch6
%endif
%if %{with libclang}
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
%if 0%{?sle_version} == 150100 || (0%{?sle_version} == 150200 && !0%{?is_opensuse})
%patch10 -p1
%endif
%endif
@ -81,6 +83,10 @@ as well.
-Dbuild_wizard=OFF \
%if %{with libclang}
-Duse_libclang=ON \
%endif
%if 0%{?suse_version} <= 1500
-DCMAKE_C_COMPILER=gcc-9 \
-DCMAKE_CXX_COMPILER=g++-9 \
%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" \

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Oct 12 15:51:33 UTC 2020 - Franz Sirl <franz.sirl-obs@lauterbach.com>
- Use gcc9 for building on SLE_15 based distributions to workaround
gcc7 bug PR85180.
-------------------------------------------------------------------
Sun Sep 20 15:49:59 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>

View File

@ -31,7 +31,11 @@ Patch3: vhdlparser-no-return.patch
BuildRequires: bison
BuildRequires: cmake >= 2.8.12
BuildRequires: flex
%if 0%{?suse_version} <= 1500
BuildRequires: gcc9-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig
BuildRequires: python3-base
@ -61,6 +65,10 @@ export CFLAGS="%{optflags} -fPIC"
export CXXFLAGS="%{optflags} -fPIC"
%cmake \
-Dbuild_wizard=ON \
%if 0%{?suse_version} <= 1500
-DCMAKE_C_COMPILER=gcc-9 \
-DCMAKE_CXX_COMPILER=g++-9 \
%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" \