From 7acd1f9b7b20f31470630aec41c60134c46e26997d88f72dc27574ee2e03b2f5 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 13 Dec 2019 09:45:32 +0000 Subject: [PATCH] Accepting request 756128 from home:StefanBruens:branches:GNOME:Factory libgtk3 takes ~15 minutes to build, the API docs about 3 hours. Putting the API-docs into a separate package removes 23MByte from a gtk3-devel install. - Split API doc generation from main package using _multibuild, libgtk3 itself only takes a fraction of the time to build. OBS-URL: https://build.opensuse.org/request/show/756128 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk3?expand=0&rev=370 --- _multibuild | 3 +++ gtk3.changes | 6 ++++++ gtk3.spec | 61 ++++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..58ef5ee --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + doc + diff --git a/gtk3.changes b/gtk3.changes index e388e7e..786a642 100644 --- a/gtk3.changes +++ b/gtk3.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 11 20:03:40 UTC 2019 - Stefan BrĂ¼ns + +- Split API doc generation from main package using _multibuild, + libgtk3 itself only takes a fraction of the time to build. + ------------------------------------------------------------------- Wed Nov 27 19:06:58 UTC 2019 - bjorn.lie@gmail.com diff --git a/gtk3.spec b/gtk3.spec index dbbd3f3..7ec963e 100644 --- a/gtk3.spec +++ b/gtk3.spec @@ -17,11 +17,24 @@ # +%global flavor @BUILD_FLAVOR@%{nil} + +%if "%{flavor}" == "" +%global pname gtk3 +%bcond_with doc +%endif + +%if "%{flavor}" == "doc" +%global pname gtk3-doc +%bcond_without doc +%endif + # When updating the binary version, do not forget to also update baselibs.conf %define gtk_binary_version 3.0.0 %define _name gtk %bcond_without broadway -Name: gtk3 +%bcond_with doc +Name: %{pname} Version: 3.24.13+0 Release: 0 Summary: The GTK+ toolkit library (version 3) @@ -42,7 +55,10 @@ BuildRequires: cups-devel >= 1.7 BuildRequires: docbook-xsl-stylesheets BuildRequires: fdupes BuildRequires: gettext-tools-mini >= 0.19.7 +# Autotools requires gtk-doc even with --disable-gtk-doc, try again with meson +%if %{with doc} || 1 BuildRequires: gtk-doc +%endif BuildRequires: hicolor-icon-theme # libtool is needed since we are using a git checkout BuildRequires: libtool @@ -353,6 +369,17 @@ This package enhances gettext with an International Tag Set for GTK+ 3 %lang_package +%package -n gtk3-devel-doc +Summary: API documentation for the GTK+ toolkit library v3 +Group: Documentation/HTML + +%description -n gtk3-devel-doc +GTK+ is a multi-platform toolkit for creating graphical user interfaces. +Offering a complete set of widgets, GTK+ is suitable for projects +ranging from small one-off projects to complete application suites. + +This package contains the API documentation for GTK+ 3.x. + %prep %setup -q -n %{_name}-%{version} translation-update-upstream @@ -375,7 +402,8 @@ cp -a %{SOURCE1} . NOCONFIGURE=1 ./autogen.sh %configure \ --disable-static \ - --enable-gtk-doc \ + %{?with_doc: \ + --enable-gtk-doc} \ --enable-man \ --enable-x11-backend \ --enable-introspection \ @@ -385,9 +413,18 @@ NOCONFIGURE=1 ./autogen.sh --enable-explicit-deps=yes \ --enable-colord \ %{nil} + +%if "%{flavor}" == "" make %{?_smp_mflags} V=1 +%else +make %{?_smp_mflags} V=1 -C gdk +make %{?_smp_mflags} V=1 -C gtk +make %{?_smp_mflags} V=1 -C tests +make %{?_smp_mflags} V=1 -C docs +%endif %install +%if "%{flavor}" == "" %make_install find %{buildroot} -type f -name "*.la" -delete -print # Do not install the exampleapp glib schema, as the app itself is noinst @@ -415,6 +452,12 @@ ln -s -f %{_sysconfdir}/alternatives/gtk-update-icon-cache.1%{ext_man} %{buildro # Install rpm macros mkdir -p %{buildroot}%{_rpmmacrodir} cp %{SOURCE3} %{buildroot}%{_rpmmacrodir} + +%else +%make_install -C docs +rm -Rf %{buildroot}%{_mandir}/man1/ +%endif + %fdupes %{buildroot}%{_datadir} %fdupes %{buildroot}%{_libdir} @@ -545,6 +588,7 @@ if [ ! -f %{_bindir}/gtk-update-icon-cache-3.0 ]; then update-alternatives --remove gtk-update-icon-cache %{_bindir}/gtk-update-icon-cache-3.0 fi +%if "%{flavor}" == "" %files -n libgtk-3-0 %license COPYING %if "%{_lib}" == "lib64" @@ -644,10 +688,6 @@ fi %config(noreplace) %{_sysconfdir}/gtk-3.0/settings.ini %files devel -%doc HACKING README.commits -%doc %{_datadir}/gtk-doc/html/gail-libgail-util3/ -%doc %{_datadir}/gtk-doc/html/gdk3/ -%doc %{_datadir}/gtk-doc/html/gtk3/ %{_bindir}/gtk3-demo %{_bindir}/gtk3-demo-application %{_bindir}/gtk3-widget-factory @@ -690,5 +730,14 @@ fi %{_datadir}/gettext/its/gtkbuilder.loc %files lang -f gtk30.lang -f gtk30-properties.lang +%endif + +%if %{with doc} +%files -n gtk3-devel-doc +%doc HACKING README.commits +%doc %{_datadir}/gtk-doc/html/gail-libgail-util3/ +%doc %{_datadir}/gtk-doc/html/gdk3/ +%doc %{_datadir}/gtk-doc/html/gtk3/ +%endif %changelog