forked from pool/doxygen
Prepare for RPM 4.20 OBS-URL: https://build.opensuse.org/request/show/1150589 OBS-URL: https://build.opensuse.org/package/show/devel:tools/doxygen?expand=0&rev=205
105 lines
3.2 KiB
RPMSpec
105 lines
3.2 KiB
RPMSpec
#
|
|
# spec file for package doxygen
|
|
#
|
|
# Copyright (c) 2024 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
|
|
|
|
Name: doxygen
|
|
Version: 1.10.0
|
|
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
|
|
# suse specific
|
|
Patch1: %{name}-no-lowercase-man-names.patch
|
|
# The unified libclang-cpp library doesn't exist on older Leap / SLE
|
|
Patch2: doxygen-no-libclang-cpp.patch
|
|
Patch3: reproducible.patch
|
|
BuildRequires: bison
|
|
BuildRequires: cmake >= 3.14
|
|
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
|
|
|
|
%description
|
|
Doxygen is the de facto standard tool for generating documentation
|
|
from annotated C++ sources, but it also supports other popular
|
|
programming languages such as C, Objective-C, C-sharp, PHP, Java,
|
|
Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran,
|
|
and to some extent D. Doxygen also supports the hardware description
|
|
language VHDL.
|
|
|
|
%prep
|
|
%setup -q
|
|
# Leap 15 and SLE don't accept '%%autopatch -M'
|
|
%patch -P 1 -p1
|
|
%if %{with libclang}
|
|
%if 0%{?sle_version} == 150100 || (0%{?sle_version} == 150200 && !0%{?is_opensuse})
|
|
%patch -P 2 -p1
|
|
%endif
|
|
%endif
|
|
%patch -P 3 -p1
|
|
|
|
%build
|
|
%cmake \
|
|
-Dbuild_doc=OFF \
|
|
-Dbuild_xmlparser=ON \
|
|
-Dbuild_search=OFF \
|
|
-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" \
|
|
-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/
|
|
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
|