[packages/mpeghdec] - build apidocs (but only HTML, no PDF)

qboosh qboosh at pld-linux.org
Sun Jun 21 17:47:29 CEST 2026


commit 0db04299cb3388487ea33744193856bb080afd17
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jun 21 17:47:57 2026 +0200

    - build apidocs (but only HTML, no PDF)

 mpeghdec-no-pdf.patch | 29 +++++++++++++++++++++++++++++
 mpeghdec.spec         | 33 ++++++++++++++++++++++++++++++---
 2 files changed, 59 insertions(+), 3 deletions(-)
---
diff --git a/mpeghdec.spec b/mpeghdec.spec
index d04634d..b0ba992 100644
--- a/mpeghdec.spec
+++ b/mpeghdec.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	apidocs		# API documentation (doxygen generated)
+
 # ilo and mmtisobmff are upstream static-only helper libraries pulled in via
 # CMake FetchContent (no network at build time in PLD), with no standalone
 # shared library or other consumer - so they are vendored here as Source1/Source2
@@ -20,9 +24,12 @@ Source2:	https://github.com/Fraunhofer-IIS/mmtisobmff/archive/r%{mmtver}/mmtisob
 # Source2-md5:	ba89ae2bcbb98b94651415502deba5e9
 Patch0:		%{name}-soname.patch
 Patch1:		%{name}-x32.patch
+Patch2:		%{name}-no-pdf.patch
 URL:		https://github.com/Fraunhofer-IIS/mpeghdec
 BuildRequires:	cmake >= 3.16
+%{?with_apidocs:BuildRequires:	doxygen}
 BuildRequires:	libstdc++-devel >= 6:4.7
+BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpmbuild(macros) >= 1.605
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -33,8 +40,8 @@ ATSC 3.0 and other next-generation broadcast and streaming services.
 
 %description -l pl.UTF-8
 Dekoder Fraunhofera MPEG-H (mpeghdec) to biblioteka dekodera standardu
-MPEG-H 3D Audio (ISO/IEC 23008-3) - systemu dźwięku używanego przez ATSC
-3.0 oraz inne systemy nadawcze i streamingowe nowej generacji.
+MPEG-H 3D Audio (ISO/IEC 23008-3) - systemu dźwięku używanego przez
+ATSC 3.0 oraz inne systemy nadawcze i streamingowe nowej generacji.
 
 %package devel
 Summary:	Header files for Fraunhofer MPEG-H decoder library
@@ -48,10 +55,23 @@ Header files for Fraunhofer MPEG-H decoder library.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe biblioteki dekodera Fraunhofer MPEG-H.
 
+%package apidocs
+Summary:	API documentation for MPEG-H decoder library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki dekodera MPEG-H
+Group:		Documentation
+BuildArch:	noarch
+
+%description apidocs
+API documentation for MPEG-H decoder library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki dekodera MPEG-H.
+
 %prep
 %setup -q -n %{name}-r%{version} -a1 -a2
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1 -b .orig
 
 %build
 # relative INCLUDEDIR and LIBDIR for correct .pc
@@ -62,7 +82,8 @@ Pliki nagłówkowe biblioteki dekodera Fraunhofer MPEG-H.
 	-DCMAKE_INSTALL_LIBDIR=%{_lib} \
 	-DFETCHCONTENT_SOURCE_DIR_ILO=$(pwd)/ilo-r%{ilover} \
 	-DFETCHCONTENT_SOURCE_DIR_MMTISOBMFF=$(pwd)/mmtisobmff-r%{mmtver} \
-	-Dmpeghdec_BUILD_BINARIES=OFF
+	-Dmpeghdec_BUILD_BINARIES=OFF \
+	%{?with_apidocs:-Dmpeghdec_BUILD_DOC=ON}
 
 %{__make} -C build
 
@@ -89,3 +110,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libmpeghdec.so
 %{_includedir}/mpeghdec
 %{_pkgconfigdir}/mpeghdec.pc
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc build/doc/doc/html/*
+%endif
diff --git a/mpeghdec-no-pdf.patch b/mpeghdec-no-pdf.patch
new file mode 100644
index 0000000..3984b90
--- /dev/null
+++ b/mpeghdec-no-pdf.patch
@@ -0,0 +1,29 @@
+--- mpeghdec-r3.0.3/doc/CMakeLists.txt.orig	2026-03-30 13:28:00.000000000 +0200
++++ mpeghdec-r3.0.3/doc/CMakeLists.txt	2026-06-21 16:55:26.462410378 +0200
+@@ -32,15 +32,6 @@ if(DOXYGEN_FOUND)
+     COMMENT "Create doxygen documentation"
+     VERBATIM
+   )
+-
+-  add_custom_command(
+-    TARGET ${PROJECT_NAME}_doc
+-    COMMAND make
+-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/latex
+-    COMMENT "Create doxygen PDF documentation"
+-    VERBATIM
+-    DEPENDS ${PROJECT_NAME}_doc
+-  )
+ else()
+   message("Doxygen need to be installed to generate the doxygen documentation")
+ endif()
+--- mpeghdec-r3.0.3/doc/Doxyfile.in.orig	2026-03-30 13:28:00.000000000 +0200
++++ mpeghdec-r3.0.3/doc/Doxyfile.in	2026-06-21 16:56:53.216214411 +0200
+@@ -1881,7 +1881,7 @@ EXTRA_SEARCH_MAPPINGS  =
+ # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+ # The default value is: YES.
+ 
+-GENERATE_LATEX         = YES
++GENERATE_LATEX         = NO
+ 
+ # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+ # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mpeghdec.git/commitdiff/0db04299cb3388487ea33744193856bb080afd17



More information about the pld-cvs-commit mailing list