SHA256
1
0
forked from pool/doxygen
doxygen/doxygen.spec
Petr Gajdos a8bf8d94ec 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
2019-09-30 14:34:40 +00:00

103 lines
3.2 KiB
RPMSpec

#
# spec file for package doxygen
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# build with "--with libclang" to enable libclang support
%bcond_with libclang
Name: doxygen
Version: 1.8.16
Release: 0
Summary: Automated C, C++, and Java Documentation Generator
# qtools are used for building and they are GPL-3.0 licensed
License: GPL-2.0-or-later AND GPL-3.0-only
Group: Development/Tools/Doc Generators
Url: http://www.doxygen.nl/
Source0: http://doxygen.nl/files/doxygen-%{version}.src.tar.gz
# suse specific
Patch0: %{name}-modify_footer.patch
# suse specific
Patch1: %{name}-no-lowercase-man-names.patch
# PATCH-FIX-UPSTREAM: add missing returns to non-void functions
Patch3: vhdlparser-no-return.patch
# suse specific, for ppc64le ppc64, workaround for bnc#921577
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
%description
Doxygen is a documentation system for C, C++, Java, and IDL. It can
generate an online class browser (in HTML) and an offline reference
manual (in LaTeX) from a set of documented source files. The
documentation is extracted directly from the sources. Doxygen is
developed on a Linux platform, but it runs on most other UNIX flavors
as well.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch3 -p1
%ifarch ppc64le ppc64
%patch4 -p1
%endif
%patch5 -p1
%if %{with libclang}
%patch6
%endif
%build
%cmake \
-Dbuild_doc=OFF \
-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" \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_LIBS=ON
%make_jobs
%install
%cmake_install
mkdir -p %{buildroot}%{_mandir}/man1/
install -m 644 doc/doxygen.1 %{buildroot}%{_mandir}/man1/
%files
%license LICENSE
%attr(644,root,root) %{_mandir}/man1/doxygen.1%{?ext_man}
%attr(755,root,root) %{_bindir}/*
%changelog