[packages/libinstpatch] - updated to 1.1.5 - added gtkdoc patch, actually build apidocs by default
qboosh
qboosh at pld-linux.org
Sun Jan 17 21:27:06 CET 2021
commit 5f7970f3261a31dc836b4821549dd1154b929f42
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jan 17 21:27:09 2021 +0100
- updated to 1.1.5
- added gtkdoc patch, actually build apidocs by default
libinstpatch-gtkdoc.patch | 102 ++++++++++++++++++++++++++++++++++++++++++++++
libinstpatch.spec | 41 ++++++++++++++++---
2 files changed, 137 insertions(+), 6 deletions(-)
---
diff --git a/libinstpatch.spec b/libinstpatch.spec
index 6c6a198..3e64bbc 100644
--- a/libinstpatch.spec
+++ b/libinstpatch.spec
@@ -1,20 +1,26 @@
+#
+# Conditional build:
+%bcond_without apidocs # API documentation
+
Summary: Library for processing digital sample based MIDI instrument "patch" files
Summary(pl.UTF-8): Biblioteka do przetwarzania plików "wstawek" instrumentów MIDI opartych na próbkach cyfrowych
Name: libinstpatch
-Version: 1.1.3
+Version: 1.1.5
Release: 1
License: LGPL v2.1
Group: Libraries
#Source0Download: https://github.com/swami/libinstpatch/releases
Source0: https://github.com/swami/libinstpatch/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 4b818fba72d792f86b1a3599622f0d42
+# Source0-md5: e2b4a0867a72e464aab0fd7dae9c1abe
+Patch0: %{name}-gtkdoc.patch
URL: http://www.swamiproject.org/
BuildRequires: cmake >= 2.6.3
BuildRequires: glib2-devel >= 1:2.14
#BuildRequires: gobject-introspection-devel
-BuildRequires: gtk-doc
+%{?with_apidocs:BuildRequires: gtk-doc}
BuildRequires: libsndfile-devel >= 1.0.0
BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.752
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -48,15 +54,28 @@ Header files for libinstpatch library.
%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki libinstpatch.
+%package apidocs
+Summary: API documentation for libinstpatch library
+Summary(pl.UTF-8): Dokumentacja API biblioteki libinstpatch
+Group: Documentation
+%{?noarchpackage}
+
+%description apidocs
+API documentation for libinstpatch library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki libinstpatch.
+
%prep
%setup -q
+%patch0 -p1
%build
install -d build
cd build
%cmake .. \
- -DGTKDOC_ENABLED=ON
-# -DINTROSPECTION_ENABLED=ON broken cmake support in 1.1.3
+ %{?with_apidocs:-DGTKDOC_ENABLED=ON}
+# -DINTROSPECTION_ENABLED=ON broken cmake support in 1.1.[35]
%{__make}
@@ -66,7 +85,11 @@ rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_gtkdocdir}/
+%if %{with apidocs}
+install -d $RPM_BUILD_ROOT%{_gtkdocdir}/libinstpatch
+cp -p build/docs/reference/libinstpatch/html/* $RPM_BUILD_ROOT%{_gtkdocdir}/libinstpatch
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -84,3 +107,9 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libinstpatch-1.0.so
%{_includedir}/libinstpatch-2
%{_pkgconfigdir}/libinstpatch-1.0.pc
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%{_gtkdocdir}/libinstpatch
+%endif
diff --git a/libinstpatch-gtkdoc.patch b/libinstpatch-gtkdoc.patch
new file mode 100644
index 0000000..43e5779
--- /dev/null
+++ b/libinstpatch-gtkdoc.patch
@@ -0,0 +1,102 @@
+--- libinstpatch-1.1.5/cmake/FindGtkDoc.cmake.orig 2020-05-26 13:09:21.000000000 +0200
++++ libinstpatch-1.1.5/cmake/FindGtkDoc.cmake 2021-01-17 17:02:54.626330817 +0100
+@@ -34,12 +34,6 @@
+ set(GTKDOC_FOUND 0)
+ endif(NOT GTKDOC_SCANGOBJ_WRAPPER)
+
+-find_program(GTKDOC_MKTMPL_EXE gtkdoc-mktmpl PATH "${GLIB_PREFIX}/bin")
+-if(NOT GTKDOC_MKTMPL_EXE)
+- message(STATUS "gtkdoc-mktmpl not found")
+- set(GTKDOC_FOUND 0)
+-endif(NOT GTKDOC_MKTMPL_EXE)
+-
+ find_program(GTKDOC_MKDB_EXE gtkdoc-mkdb PATH "${GLIB_PREFIX}/bin")
+ if(NOT GTKDOC_MKDB_EXE)
+ message(STATUS "gtkdoc-mkdb not found")
+--- libinstpatch-1.1.5/cmake/UseGtkDoc.cmake.orig 2020-05-26 13:09:21.000000000 +0200
++++ libinstpatch-1.1.5/cmake/UseGtkDoc.cmake 2021-01-17 18:15:40.099347687 +0100
+@@ -130,26 +130,6 @@
+ WORKING_DIRECTORY "${_output_dir}"
+ VERBATIM)
+
+- # add a command to make the templates
+- add_custom_command(
+- OUTPUT
+- "${_output_unused}"
+- "${_output_undeclared}"
+- "${_output_undocumented}"
+- "${_output_tmpl_dir}"
+- "${_output_tmpl_stamp}"
+- DEPENDS
+- "${_output_types}"
+- "${_output_signals}"
+- "${_output_sections}"
+- "${_output_overrides}"
+- ${ARG_DEPENDS}
+- COMMAND ${CMAKE_COMMAND} -E remove_directory ${_output_tmpl_dir}
+- COMMAND ${GTKDOC_MKTMPL_EXE}
+- "--module=${_doc_prefix}"
+- WORKING_DIRECTORY "${_output_dir}"
+- VERBATIM)
+-
+ set(_copy_xml_if_needed "")
+ if(ARG_XML)
+ get_filename_component(ARG_XML ${ARG_XML} ABSOLUTE)
+@@ -169,10 +149,10 @@
+ "${_output_sgml_stamp}"
+ "${_default_xml_file}"
+ DEPENDS
+- "${_output_tmpl_stamp}"
+- "${_output_unused}"
+- "${_output_undeclared}"
+- "${_output_undocumented}"
++ "${_output_overrides}"
++ "${_output_sections}"
++ "${_output_signals}"
++ "${_output_types}"
+ ${ARG_DEPENDS}
+ ${_remove_xml_if_needed}
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${_output_xml_dir}
+@@ -162,6 +162,7 @@
+ "--source-suffixes=${_doc_source_suffixes}"
+ "--output-format=xml"
+ "--main-sgml-file=${_default_xml_file}"
++ COMMAND sh -c "printf '<!ENTITY package \"${PACKAGE}\">\\n<!ENTITY package_bugreport \"\">\\n<!ENTITY package_name \"${PACKAGE})\">\\n<!ENTITY package_string \"${PACKAGE}\">\\n<!ENTITY package_tarname \"${PACKAGE}\">\\n<!ENTITY package_url \"http://www.swamiproject.org/\">\\n<!ENTITY package_version \"${VERSION}\">\\n' > ${_output_xml_dir}/gtkdocentities.ent"
+ ${_copy_xml_if_needed}
+ WORKING_DIRECTORY "${_output_dir}"
+ VERBATIM)
+@@ -200,7 +180,6 @@
+ DEPENDS
+ "${_output_html_dir_stamp}"
+ "${_output_sgml_stamp}"
+- "${_output_tmpl_stamp}"
+ "${ARG_XML}"
+ ${ARG_DEPENDS}
+ ${_copy_xml_if_needed}
+@@ -196,7 +197,7 @@
+ ${ARG_DEPENDS}
+ COMMAND ${GTKDOC_FIXXREF_EXE}
+ "--module=${_doc_prefix}"
+- "--module-dir=."
++ "--module-dir=html"
+ ${ARG_FIXXREFOPTS}
+ #${_remove_xml_if_needed}
+ WORKING_DIRECTORY "${_output_dir}"
+--- libinstpatch-1.1.5/docs/reference/CMakeLists.txt.orig 2020-05-26 13:09:21.000000000 +0200
++++ libinstpatch-1.1.5/docs/reference/CMakeLists.txt 2021-01-17 18:01:36.473917998 +0100
+@@ -40,7 +40,7 @@
+ CFLAGS -I${CMAKE_SOURCE_DIR}
+ LDFLAGS -L${CMAKE_CURRENT_BINARY_DIR}/../../libinstpatch -linstpatch-1.0
+ LDPATH ${CMAKE_CURRENT_BINARY_DIR}/../../libinstpatch
+- DEPENDS instpatch-1.0
++ DEPENDS libinstpatch
+ )
+ endif ()
+
+--- libinstpatch-1.1.5/cmake/GtkDocScanGObjWrapper.cmake.orig 2020-05-26 13:09:21.000000000 +0200
++++ libinstpatch-1.1.5/cmake/GtkDocScanGObjWrapper.cmake 2021-01-17 19:29:27.275363616 +0100
+@@ -1,3 +1,4 @@
++include(CMakeGenericSystem)
+ if(NOT APPLE)
+ # We use pkg-config to fing glib et al
+ find_package(PkgConfig)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libinstpatch.git/commitdiff/5f7970f3261a31dc836b4821549dd1154b929f42
More information about the pld-cvs-commit
mailing list