forked from pool/doxygen
Petr Gajdos
f26e8c3135
Add reproducible.patch to make doxytags output reproducible (boo#1201579) OBS-URL: https://build.opensuse.org/request/show/1099185 OBS-URL: https://build.opensuse.org/package/show/devel:tools/doxygen?expand=0&rev=191
165 lines
4.6 KiB
RPMSpec
165 lines
4.6 KiB
RPMSpec
#
|
|
# spec file
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%if 0%{?sle_version} >= 150100
|
|
# build with "--with libclang" to enable libclang support
|
|
%bcond_with libclang
|
|
%endif
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
%if "%{flavor}" == ""
|
|
%global flavor doxygen
|
|
%endif
|
|
|
|
Name: %{flavor}
|
|
Version: 1.9.7
|
|
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: https://www.doxygen.nl/
|
|
Source0: https://www.doxygen.nl/files/doxygen-%{version}.src.tar.gz
|
|
%if "%{flavor}" == "doxywizard"
|
|
Source1: doxywizard.desktop
|
|
%endif
|
|
# The unified libclang-cpp library doesn't exist on older Leap / SLE
|
|
Patch10: doxygen-no-libclang-cpp.patch
|
|
Patch11: reproducible.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
|
|
# web trivialy for all versions of doxygen
|
|
Obsoletes: doxygen-doc
|
|
%if %{with libclang}
|
|
BuildRequires: llvm-clang-devel
|
|
%endif
|
|
%if "%{flavor}" == "doxywizard"
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: python3-base
|
|
BuildRequires: python3-xml
|
|
BuildRequires: update-desktop-files
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
BuildRequires: pkgconfig(Qt5Gui)
|
|
BuildRequires: pkgconfig(Qt5Widgets)
|
|
BuildRequires: pkgconfig(Qt5Xml)
|
|
Requires: doxygen = %{version}
|
|
%endif
|
|
%if "%{flavor}" == "doxygen"
|
|
# for tests
|
|
BuildRequires: libxml2-tools
|
|
BuildRequires: texlive-bibtex
|
|
# --
|
|
%endif
|
|
|
|
%if "%{flavor}" == "doxygen"
|
|
%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.
|
|
%endif
|
|
|
|
%if "%{flavor}" == "doxywizard"
|
|
%description
|
|
Doxywizard is a graphical front-end to read/edit/write doxygen
|
|
configuration files.
|
|
%endif
|
|
|
|
%prep
|
|
%setup -q -n doxygen-%{version}
|
|
# Leap 15 and SLE don't accept '%%autopatch -M'
|
|
%if %{with libclang}
|
|
%if 0%{?sle_version} == 150100 || (0%{?sle_version} == 150200 && !0%{?is_opensuse})
|
|
%patch10 -p1
|
|
%endif
|
|
%endif
|
|
%patch11 -p1
|
|
|
|
%build
|
|
%cmake \
|
|
%if "%{flavor}" == "doxygen"
|
|
-Dbuild_wizard=OFF \
|
|
%endif
|
|
%if "%{flavor}" == "doxywizard"
|
|
-Dbuild_wizard=ON \
|
|
%endif
|
|
-Dbuild_doc=OFF \
|
|
-Dbuild_xmlparser=ON \
|
|
-Dbuild_search=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" \
|
|
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,relro,-z,now" \
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
-DBUILD_STATIC_LIBS=ON
|
|
%cmake_build
|
|
|
|
%install
|
|
%cmake_install
|
|
mkdir -p %{buildroot}%{_mandir}/man1/
|
|
%if "%{flavor}" == "doxygen"
|
|
install -m 644 doc/doxygen.1 %{buildroot}%{_mandir}/man1/
|
|
%endif
|
|
%if "%{flavor}" == "doxywizard"
|
|
rm %{buildroot}%{_bindir}/doxygen
|
|
install -m 644 doc/doxywizard.1 %{buildroot}%{_mandir}/man1/
|
|
%suse_update_desktop_file -i doxywizard Development Documentation
|
|
%endif
|
|
|
|
%check
|
|
%if "%{flavor}" == "doxygen"
|
|
# https://github.com/doxygen/doxygen/issues/10053
|
|
rm -r testing/061*
|
|
export LANG=C.UTF-8
|
|
# testing doxygen package here to avoid build
|
|
# cycle between latex and doxygen
|
|
%ctest
|
|
%endif
|
|
|
|
%files
|
|
%if "%{flavor}" == "doxygen"
|
|
%license LICENSE
|
|
%attr(644,root,root) %{_mandir}/man1/doxygen.1%{?ext_man}
|
|
%attr(755,root,root) %{_bindir}/*
|
|
%endif
|
|
%if "%{flavor}" == "doxywizard"
|
|
%attr(755,root,root) %{_bindir}/doxywizard
|
|
%{_datadir}/applications/doxywizard.desktop
|
|
%{_mandir}/man1/doxywizard.1%{?ext_man}
|
|
%endif
|
|
|
|
%changelog
|