From e68a722708980fed5bf661414e02587210e38a9e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:48:58 +0000 Subject: import devhelp-3.22.0-1.el7 --- diff --git a/.devhelp.metadata b/.devhelp.metadata index 1f86538..f56ef21 100644 --- a/.devhelp.metadata +++ b/.devhelp.metadata @@ -1 +1 @@ -f369c063c83437f504373d34c0e4ca42fb93bfe5 SOURCES/devhelp-3.14.0.tar.xz +92de726c26faa76a27b7e50b93e8d1023962ac9f SOURCES/devhelp-3.22.0.tar.xz diff --git a/.gitignore b/.gitignore index b1b018a..d8da7e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/devhelp-3.14.0.tar.xz +SOURCES/devhelp-3.22.0.tar.xz diff --git a/SOURCES/devhelp-3.14.0-python2.patch b/SOURCES/devhelp-3.14.0-python2.patch deleted file mode 100644 index 5a16c2e..0000000 --- a/SOURCES/devhelp-3.14.0-python2.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.in.python2 devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.in ---- devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.in.python2 2016-04-11 10:42:43.761181264 -0400 -+++ devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.in 2016-04-11 10:43:05.676213069 -0400 -@@ -1,5 +1,5 @@ - [Plugin] --Loader=python3 -+Loader=python - Module=devhelp - IAge=3 - _Name=Devhelp support -diff -up devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.python2 devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop -diff -up devhelp-3.14.0/misc/gedit-plugin/devhelp.plugin.python2 devhelp-3.14.0/misc/gedit-plugin/devhelp.plugin ---- devhelp-3.14.0/misc/gedit-plugin/devhelp.plugin.python2 2016-04-11 10:42:50.634191239 -0400 -+++ devhelp-3.14.0/misc/gedit-plugin/devhelp.plugin 2016-04-11 10:43:17.006229512 -0400 -@@ -1,5 +1,5 @@ - [Plugin] --Loader=python3 -+Loader=python - Module=devhelp - IAge=3 - Name=Devhelp support diff --git a/SOURCES/devhelp-3.22.0-python2.patch b/SOURCES/devhelp-3.22.0-python2.patch new file mode 100644 index 0000000..a77f500 --- /dev/null +++ b/SOURCES/devhelp-3.22.0-python2.patch @@ -0,0 +1,10 @@ +diff -up devhelp-3.22.0/misc/gedit-plugin/devhelp.plugin.desktop.in.python2 devhelp-3.22.0/misc/gedit-plugin/devhelp.plugin.desktop.in +--- devhelp-3.22.0/misc/gedit-plugin/devhelp.plugin.desktop.in.python2 2016-11-24 15:16:31.871038939 +0100 ++++ devhelp-3.22.0/misc/gedit-plugin/devhelp.plugin.desktop.in 2016-11-24 15:16:35.327107126 +0100 +@@ -1,5 +1,5 @@ + [Plugin] +-Loader=python3 ++Loader=python + Module=devhelp + IAge=3 + _Name=Devhelp support diff --git a/SOURCES/devhelp-handle-empty-devhelp-files.patch b/SOURCES/devhelp-handle-empty-devhelp-files.patch deleted file mode 100644 index 8fd39c1..0000000 --- a/SOURCES/devhelp-handle-empty-devhelp-files.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 0ad2461ede6002eab14b3becfd0bb4e5e00a3be1 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Tue, 6 Jan 2015 16:51:54 +0100 -Subject: [PATCH 1/2] Don't crash with empty .devhelp* files - -Call g_markup_parse_context_end_parse after we are done reading the -file to catch empty files among other things. This is the only method -that raises G_MARKUP_ERROR_EMPTY, so it is particularly necessary for -this case. - -It was necessary to remove parser_error_cb because we should not be -freeing the context inside it and dh_parser_free would have done it -for us anyway. The error callback is called from set_error_literal -inside g_markup_parse_context_end_parse, and invalidating the context -can lead to bad things. - -Construction of a DhBook instance can fail due to parsing errors, so -be careful about that. - -https://bugzilla.gnome.org/show_bug.cgi?id=742447 ---- - src/dh-book-manager.c | 2 ++ - src/dh-parser.c | 17 +++++------------ - 2 files changed, 7 insertions(+), 12 deletions(-) - -diff --git a/src/dh-book-manager.c b/src/dh-book-manager.c -index a8e1ad2..51110d2 100644 ---- a/src/dh-book-manager.c -+++ b/src/dh-book-manager.c -@@ -648,6 +648,8 @@ book_manager_add_from_filepath (DhBookManager *book_manager, - - /* Allocate new book struct */ - book = dh_book_new (book_path); -+ if (book == NULL) -+ return; - - /* Check if book with same path was already loaded in the manager */ - if (g_list_find_custom (priv->books, -diff --git a/src/dh-parser.c b/src/dh-parser.c -index 35d3179..469da8e 100644 ---- a/src/dh-parser.c -+++ b/src/dh-parser.c -@@ -468,17 +468,6 @@ parser_end_node_cb (GMarkupParseContext *context, - } - } - --static void --parser_error_cb (GMarkupParseContext *context, -- GError *error, -- gpointer user_data) --{ -- DhParser *parser = user_data; -- -- g_markup_parse_context_free (parser->context); -- parser->context = NULL; --} -- - static gboolean - parser_read_gz_file (DhParser *parser, - const gchar *path, -@@ -565,7 +554,6 @@ dh_parser_read_file (const gchar *path, - - parser->m_parser->start_element = parser_start_node_cb; - parser->m_parser->end_element = parser_end_node_cb; -- parser->m_parser->error = parser_error_cb; - - parser->context = g_markup_parse_context_new (parser->m_parser, 0, - parser, NULL); -@@ -614,6 +602,11 @@ dh_parser_read_file (const gchar *path, - goto exit; - } - } -+ -+ if (!g_markup_parse_context_end_parse (parser->context, error)) { -+ result = FALSE; -+ goto exit; -+ } - } - - exit: --- -2.1.0 - - -From 6cf3b4a20bc08d9c8245a14ee6abdc60620c6531 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Tue, 20 Jan 2015 19:15:22 +0100 -Subject: [PATCH 2/2] Don't rely on the GError** passed by the caller - -https://bugzilla.gnome.org/show_bug.cgi?id=742447 ---- - src/dh-parser.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/src/dh-parser.c b/src/dh-parser.c -index 469da8e..3972f00 100644 ---- a/src/dh-parser.c -+++ b/src/dh-parser.c -@@ -595,9 +595,8 @@ dh_parser_read_file (const gchar *path, - if (io_status == G_IO_STATUS_EOF || io_status == G_IO_STATUS_ERROR) { - break; - } -- g_markup_parse_context_parse (parser->context, buf, -- bytes_read, error); -- if (error != NULL && *error != NULL) { -+ if (!g_markup_parse_context_parse (parser->context, buf, -+ bytes_read, error)) { - result = FALSE; - goto exit; - } --- -2.1.0 - diff --git a/SPECS/devhelp.spec b/SPECS/devhelp.spec index 636e3f5..72a6ea4 100644 --- a/SPECS/devhelp.spec +++ b/SPECS/devhelp.spec @@ -1,53 +1,47 @@ -### Abstract ### - Name: devhelp -Version: 3.14.0 -Release: 2%{?dist} +Version: 3.22.0 +Release: 1%{?dist} Epoch: 1 -License: GPLv2+ -Group: Development/Tools -Summary: API documention browser -URL: http://live.gnome.org/devhelp -#VCS: git:git://git.gnome.org/devhelp -Source: http://download.gnome.org/sources/devhelp/3.14/devhelp-%{version}.tar.xz +Summary: API documentation browser -# https://bugzilla.gnome.org/show_bug.cgi?id=742447 -Patch0: devhelp-handle-empty-devhelp-files.patch +License: GPLv2+ +URL: https://wiki.gnome.org/Apps/Devhelp +Source0: https://download.gnome.org/sources/%{name}/3.22/%{name}-%{version}.tar.xz # https://bugzilla.redhat.com/show_bug.cgi?id=1235584 -Patch1: devhelp-3.14.0-python2.patch - -### Dependencies ### - -Requires(post): /usr/bin/gtk-update-icon-cache -Requires(postun): /usr/bin/gtk-update-icon-cache - -### Build Dependencies ### +Patch1: devhelp-3.22.0-python2.patch BuildRequires: chrpath BuildRequires: desktop-file-utils >= 0.3 BuildRequires: gettext BuildRequires: intltool -BuildRequires: gtk3-devel -BuildRequires: webkitgtk3-devel +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(webkit2gtk-4.0) +BuildRequires: libappstream-glib %description Devhelp is an API documentation browser for the GNOME desktop. It works natively with API documentation generated by gtk-doc. -%package devel +%package libs Summary: Library to embed Devhelp in other applications -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} -%description devel +%description libs Devhelp is an API documentation browser for the GNOME desktop. This package contains a library that can be used for embedding devhelp into other applications such as IDEs. +%package devel +Summary: Library to embed Devhelp in other applications - Development files +Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} + +%description devel +Devhelp is an API documentation browser for the GNOME desktop. +This package contains the development files for the library that can be used +for embedding devhelp into other applications such as IDEs. + %prep %setup -q -%patch0 -p1 %patch1 -p1 %build @@ -55,7 +49,16 @@ into other applications such as IDEs. make %{?_smp_mflags} CFLAGS="$CFLAGS -fno-strict-aliasing" %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install + +# Update the screenshot shown in the software center +# +# NOTE: It would be *awesome* if this file was pushed upstream. +# +# See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details. +# +appstream-util replace-screenshots $RPM_BUILD_ROOT%{_datadir}/appdata/org.gnome.Devhelp.appdata.xml \ + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/devhelp/a.png find ${RPM_BUILD_ROOT} -type f -name "*.la" -exec rm -f {} ';' @@ -65,52 +68,73 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/devhelp %find_lang devhelp -desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/devhelp.desktop + +%check +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/appdata/org.gnome.Devhelp.appdata.xml +desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Devhelp.desktop %post -/sbin/ldconfig touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : %postun -/sbin/ldconfig if [ $1 -eq 0 ]; then - glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || : touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : fi %posttrans -glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : -%files -f devhelp.lang -%doc AUTHORS COPYING NEWS README misc/devhelp.{el,vim} +%post libs +/sbin/ldconfig + +%postun libs +/sbin/ldconfig +if [ $1 -eq 0 ]; then + glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || : +fi + +%posttrans libs +glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || : + +%files +%doc AUTHORS NEWS README misc/devhelp.{el,vim} +%license COPYING %{_bindir}/devhelp -%{_libdir}/libdevhelp*.so.* -%{_datadir}/applications/devhelp.desktop +%{_datadir}/appdata/org.gnome.Devhelp.appdata.xml +%{_datadir}/applications/org.gnome.Devhelp.desktop +%{_datadir}/dbus-1/services/org.gnome.Devhelp.service %{_datadir}/devhelp -%{_datadir}/appdata/devhelp.appdata.xml -%{_datadir}/GConf/gsettings/devhelp.convert -%{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml %{_datadir}/icons/hicolor/16x16/apps/devhelp.png %{_datadir}/icons/hicolor/22x22/apps/devhelp.png %{_datadir}/icons/hicolor/24x24/apps/devhelp.png %{_datadir}/icons/hicolor/32x32/apps/devhelp.png %{_datadir}/icons/hicolor/48x48/apps/devhelp.png %{_datadir}/icons/hicolor/256x256/apps/devhelp.png +%{_datadir}/icons/hicolor/symbolic/apps/devhelp-symbolic.svg %dir %{_libdir}/gedit %dir %{_libdir}/gedit/plugins %{_libdir}/gedit/plugins/devhelp.* +%{_mandir}/man1/devhelp.1* + +%files libs -f devhelp.lang +%{_libdir}/libdevhelp*.so.* +%{_datadir}/GConf/gsettings/devhelp.convert +%{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml %files devel -%{_prefix}/include/devhelp-3.0 +%{_includedir}/devhelp-3.0/ %{_libdir}/libdevhelp*.so %{_libdir}/pkgconfig/* %changelog +* Mon Sep 19 2016 Kalev Lember - 1:3.22.0-1 +- Update to 3.22.0 +- Resolves: #1386845 + * Mon Apr 11 2016 Matthew Barnes - 3.14.0-2 - Rebase to 3.14.0 (sync with f21) Resolves: #1235584