From 982ead969e52e9b86d88a902bf9387d69b1af446 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 24 Apr 2021 21:18:33 +0200 Subject: [PATCH] - updated to 1.8.10 (seems not to require any new tex features), uses cmake now - updated flex2.6 patch - removed outdated qt-dirs patch - added doc patch (skip installing pdf and html by default) - build doxysearch --- doxygen-doc.patch | 21 ++++++++++++++ doxygen-qt-dirs.patch | 30 -------------------- doxygen.spec | 66 ++++++++++++++++++++++++++++--------------- flex2.6.patch | 11 ++++++++ 4 files changed, 76 insertions(+), 52 deletions(-) create mode 100644 doxygen-doc.patch delete mode 100644 doxygen-qt-dirs.patch diff --git a/doxygen-doc.patch b/doxygen-doc.patch new file mode 100644 index 0000000..08f240d --- /dev/null +++ b/doxygen-doc.patch @@ -0,0 +1,21 @@ +--- doxygen-1.8.10/doc/CMakeLists.txt.orig 2021-04-24 19:09:10.889930009 +0200 ++++ doxygen-1.8.10/doc/CMakeLists.txt 2021-04-24 19:09:33.446474476 +0200 +@@ -88,17 +88,7 @@ install(FILES + "${PROJECT_BINARY_DIR}/man/doxywizard.1" + "${PROJECT_BINARY_DIR}/man/doxysearch.1" + "${PROJECT_BINARY_DIR}/man/doxyindexer.1" +- DESTINATION man/man1 +-) +- +-install(FILES +- "${PROJECT_BINARY_DIR}/latex/doxygen_manual.pdf" +- DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}" +-) +- +-install(DIRECTORY +- "${PROJECT_BINARY_DIR}/html" +- DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}" ++ DESTINATION share/man/man1 + ) + + endif() diff --git a/doxygen-qt-dirs.patch b/doxygen-qt-dirs.patch deleted file mode 100644 index 5a26027..0000000 --- a/doxygen-qt-dirs.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- doxygen-1.8.6/configure.orig 2013-12-24 17:14:46.000000000 +0100 -+++ doxygen-1.8.6/configure 2014-01-29 20:59:58.925766639 +0100 -@@ -326,7 +326,7 @@ - if test -z "$QTDIR"; then - echo " QTDIR environment variable not set!" - printf " Checking for Qt..." -- for d in /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4} /usr; do -+ for d in /usr/{libx32,lib64,lib,share,qt}/{qt-4,qt4,qt,qt*,4}; do - if test -x "$d/bin/qmake"; then - QTDIR=$d - break 2 -@@ -704,6 +704,7 @@ - DOXYDOCS = .. - DOCDIR = $f_docdir - QTDIR = $QTDIR -+MAN1DIR = share/man/man1 - EOF - - if test "$f_dot" != NO; then ---- doxygen-1.8.3/Makefile.in.orig 2013-01-02 21:33:10.021332601 +0100 -+++ doxygen-1.8.3/Makefile.in 2013-01-03 16:32:34.159907679 +0100 -@@ -53,8 +53,6 @@ - - DATE=$(shell date "+%B %Y") - --MAN1DIR = man/man1 -- - install: doxywizard_install doxysearch_install - $(INSTTOOL) -d $(DESTDIR)/$(INSTALL)/bin - $(INSTTOOL) -m 755 bin/doxygen $(DESTDIR)/$(INSTALL)/bin diff --git a/doxygen.spec b/doxygen.spec index 7dde89f..f5f5479 100644 --- a/doxygen.spec +++ b/doxygen.spec @@ -1,6 +1,8 @@ +# NOTE: on upgrades, beware of texlive features available in PLD # # Conditional build: %bcond_without qt # without doxywizard (qt-based) +%bcond_without xapian # without doxysearch (xapian based) # Summary: Doxygen is the documentation system for C/C++ Summary(es.UTF-8): Doxygen es el sistema de documentación para C/C++ @@ -9,7 +11,7 @@ Summary(pt_BR.UTF-8): Um sistema de documentação para C/C++ Summary(ru.UTF-8): Система документирования для C та C++ Summary(uk.UTF-8): Система документування для C та C++ Name: doxygen -Version: 1.8.9.1 +Version: 1.8.10 Release: 1 Epoch: 1 License: GPL v2 @@ -18,23 +20,26 @@ Group: Development/Tools #Source0Download: https://www.doxygen.nl/download.html #Source0: https://www.doxygen.nl/files/%{name}-%{version}.src.tar.gz Source0: http://downloads.sourceforge.net/doxygen/%{name}-%{version}.src.tar.gz -# Source0-md5: 3d1a5c26bef358c10a3894f356a69fbc -Patch0: %{name}-qt-dirs.patch +# Source0-md5: 79767ccd986f12a0f949015efb5f058f +Patch0: %{name}-doc.patch Patch1: flex2.6.patch URL: https://www.doxygen.nl/ %{?with_qt:BuildRequires: QtGui-devel >= 4.3} %{?with_qt:BuildRequires: QtXml-devel >= 4.3} BuildRequires: bison +BuildRequires: cmake >= 2.8.12 BuildRequires: flex BuildRequires: ghostscript BuildRequires: ghostscript-fonts-std BuildRequires: libpng-devel BuildRequires: libstdc++-devel BuildRequires: perl-base +BuildRequires: python >= 2 %{?with_qt:BuildRequires: qt4-build >= 4.3} %{?with_qt:BuildRequires: qt4-qmake >= 4.3} BuildRequires: texlive-latex BuildRequires: texlive-pdftex +%{?with_xapian:BuildRequires: xapian-core-devel} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -105,6 +110,18 @@ Doxygen можна також зконфігурувати для отриман недокументованих вихідних файлів. Це може бути дуже корисним для того, щоб швидко розібратися у великому проекті. +%package search +Summary: Search tools for Doxygen +Summary(pl.UTF-8): Narzędzia do przeszukiwania dla Doxygena +Group: Development/Tools +Conflicts: doxygen < 1:1.3.4 + +%description search +Search tools for Doxygen. + +%description search -l pl.UTF-8 +Narzędzia do przeszukiwania dla Doxygena. + %package doxywizard Summary: A GUI front-end for creating and editing configuration files Summary(es.UTF-8): Un front-end GUI para crear y editar ficheros de configuración @@ -168,41 +185,46 @@ wygenerowanych przez Doxygena. %patch1 -p1 %build -# don't change it to %%configure, not autoconf-generated! -./configure \ - --prefix %{_prefix} \ - --perl %{__perl} \ - --install %{_bindir}/install \ - %{?with_qt:--with-doxywizard} - -%{__make} \ - CC="%{__cc}" \ - CXX="%{__cxx}" \ - LINK="%{__cxx}" \ - QMAKE="%{_bindir}/qmake-qt4" \ - QTDIR="%{_prefix}" \ - CFLAGS="%{rpmcflags}" \ - CXXFLAGS="%{rpmcxxflags} -DQT_LITE_UNICODE -DNODEBUG" \ - LFLAGS="%{rpmldflags}" +install -d build +cd build +%cmake .. \ + -DBUILD_SHARED_LIBS=OFF \ + -Dbuild_doc=ON \ + %{?with_xapian:-Dbuild_search=ON} \ + %{?with_qt:-Dbuild_wizard=ON} + +%{__make} %{__make} docs -#%%{__make} pdf %install rm -rf $RPM_BUILD_ROOT -%{__make} install \ +%{__make} -C build install \ DESTDIR=$RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_examplesdir} +cp -pr examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} + %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc html examples README.md +%doc README.md build/html %attr(755,root,root) %{_bindir}/doxygen +%{_examplesdir}/%{name}-%{version} %{_mandir}/man1/doxygen.1* +%if %{with xapian} +%files search +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/doxyindexer +%attr(755,root,root) %{_bindir}/doxysearch.cgi +%{_mandir}/man1/doxyindexer.1* +%{_mandir}/man1/doxysearch.1* +%endif + %if %{with qt} %files doxywizard %defattr(644,root,root,755) diff --git a/flex2.6.patch b/flex2.6.patch index 15b9ce8..d3f19b0 100644 --- a/flex2.6.patch +++ b/flex2.6.patch @@ -184,3 +184,14 @@ index 695704844..e4ae0e7ff 100644 #error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!" #endif +--- doxygen-1.8.10/src/xmlcode.l.orig 2021-04-24 18:28:51.986367667 +0200 ++++ doxygen-1.8.10/src/xmlcode.l 2021-04-24 18:28:55.833013495 +0200 +@@ -407,7 +407,7 @@ void resetXmlCodeParserState() + extern "C" { // some bogus code to keep the compiler happy + void xmlcodeYYdummy() { yy_flex_realloc(0,0); } + } +-#elif YY_FLEX_SUBMINOR_VERSION<33 ++#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33 + #error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)." + #endif + -- 2.44.0