Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package zathura-plugin-cb for
openSUSE:Factory checked in at 2022-09-20 19:23:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zathura-plugin-cb (Old)
and /work/SRC/openSUSE:Factory/.zathura-plugin-cb.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zathura-plugin-cb"
Tue Sep 20 19:23:40 2022 rev:6 rq:1004738 version:0.1.10
Changes:
--------
--- /work/SRC/openSUSE:Factory/zathura-plugin-cb/zathura-plugin-cb.changes
2018-08-10 09:51:46.830463766 +0200
+++
/work/SRC/openSUSE:Factory/.zathura-plugin-cb.new.2083/zathura-plugin-cb.changes
2022-09-20 19:23:45.894505232 +0200
@@ -1,0 +2,6 @@
+Mon Sep 19 14:41:36 UTC 2022 - Ond??ej S??kup <[email protected]>
+
+- update to 0.1.10
+ * Various bug fixes and improvements
+
+-------------------------------------------------------------------
Old:
----
zathura-cb-0.1.8.tar.xz
New:
----
zathura-cb-0.1.10.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zathura-plugin-cb.spec ++++++
--- /var/tmp/diff_new_pack.ccDJG0/_old 2022-09-20 19:23:46.418506735 +0200
+++ /var/tmp/diff_new_pack.ccDJG0/_new 2022-09-20 19:23:46.422506746 +0200
@@ -1,7 +1,7 @@
#
# spec file for package zathura-plugin-cb
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,19 +12,19 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define realname zathura-cb
Name: zathura-plugin-cb
-Version: 0.1.8
+Version: 0.1.10
Release: 0
Summary: Comic book support for zathura
License: Zlib
Group: Productivity/Office/Other
URL: http://pwmt.org/projects/zathura/plugins/zathura-cb/
-Source:
http://pwmt.org/projects/zathura/plugins/download/%{realname}-%{version}.tar.xz
+Source:
https://pwmt.org/projects/zathura-cb/download/%{realname}-%{version}.tar.xz
BuildRequires: meson > 0.43
BuildRequires: pkgconfig
BuildRequires: pkgconfig(girara-gtk3)
++++++ zathura-cb-0.1.8.tar.xz -> zathura-cb-0.1.10.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/.gitignore
new/zathura-cb-0.1.10/.gitignore
--- old/zathura-cb-0.1.8/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/zathura-cb-0.1.10/.gitignore 2022-05-07 18:47:47.000000000 +0200
@@ -0,0 +1,10 @@
+*.o
+*.do
+*~
+.depend
+*.so
+*.swp
+tags
+compile_commands.json
+.ycm_extra_conf.*
+build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/README new/zathura-cb-0.1.10/README
--- old/zathura-cb-0.1.8/README 2018-03-17 11:44:26.000000000 +0100
+++ new/zathura-cb-0.1.10/README 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-zathura-cb
-=================
-The zathura-b plugin adds comic book support to zathura.
-
-Requirements
-------------
-zathura (>= 0.2.0)
-libarchive
-girara
-cairo
-
-Installation
-------------
-To build and install the plugin:
-
- make install
-
-Uninstall:
-----------
-To delete the plugin from your system, just type:
-
- make uninstall
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/README.md
new/zathura-cb-0.1.10/README.md
--- old/zathura-cb-0.1.8/README.md 1970-01-01 01:00:00.000000000 +0100
+++ new/zathura-cb-0.1.10/README.md 2022-05-07 18:47:47.000000000 +0200
@@ -0,0 +1,30 @@
+zathura-cb
+==========
+
+The zathura-cb plugin adds comic book support to zathura.
+
+Requirements
+------------
+
+* `zathura` (>= 0.2.0)
+* `libarchive`
+* `girara`
+* `cairo`
+
+Installation
+------------
+
+To build and install the plugin using meson's ninja backend, use:
+
+ meson build
+ cd build
+ ninja
+ ninja install
+
+Note that the default backend for meson might vary based on the platform.
Please
+refer to the meson documentation for platform specific dependencies.
+
+Bugs
+----
+
+Please report bugs at http://git.pwmt.org/pwmt/zathura-cb.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/data/org.pwmt.zathura-cb.desktop
new/zathura-cb-0.1.10/data/org.pwmt.zathura-cb.desktop
--- old/zathura-cb-0.1.8/data/org.pwmt.zathura-cb.desktop 2018-03-17
11:44:26.000000000 +0100
+++ new/zathura-cb-0.1.10/data/org.pwmt.zathura-cb.desktop 2022-05-07
18:47:47.000000000 +0200
@@ -7,4 +7,4 @@
Terminal=false
NoDisplay=true
Categories=Office;Viewer;
-MimeType=application/x-cbr;application/x-rar;application/x-cbz;application/zip;application/x-cb7;application/x-7z-compressed;application/x-cbt;application/x-tar;
+MimeType=application/x-cbr;application/x-rar;application/x-cbz;application/zip;application/x-cb7;application/x-7z-compressed;application/x-cbt;application/x-tar;inode/directory;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/meson.build
new/zathura-cb-0.1.10/meson.build
--- old/zathura-cb-0.1.8/meson.build 2018-03-17 11:44:26.000000000 +0100
+++ new/zathura-cb-0.1.10/meson.build 2022-05-07 18:47:47.000000000 +0200
@@ -1,5 +1,5 @@
project('zathura-cb', 'c',
- version: '0.1.8',
+ version: '0.1.10',
meson_version: '>=0.43',
default_options: 'c_std=c11'
)
@@ -22,6 +22,12 @@
build_dependencies = [zathura, girara, glib, cairo, libarchive]
+if get_option('plugindir') == ''
+ plugindir = zathura.get_pkgconfig_variable('plugindir')
+else
+ plugindir = get_option('plugindir')
+endif
+
# defines
defines = [
'-DVERSION_MAJOR=@0@'.format(version_array[0]),
@@ -55,7 +61,7 @@
dependencies: build_dependencies,
c_args: defines + flags,
install: true,
- install_dir: zathura.get_pkgconfig_variable('plugindir')
+ install_dir: plugindir
)
subdir('data')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/meson_options.txt
new/zathura-cb-0.1.10/meson_options.txt
--- old/zathura-cb-0.1.8/meson_options.txt 1970-01-01 01:00:00.000000000
+0100
+++ new/zathura-cb-0.1.10/meson_options.txt 2022-05-07 18:47:47.000000000
+0200
@@ -0,0 +1,5 @@
+option('plugindir',
+ type: 'string',
+ value: '',
+ description: 'Install to a different location than Zathura\'s plugin
directory'
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/document.c
new/zathura-cb-0.1.10/zathura-cb/document.c
--- old/zathura-cb-0.1.8/zathura-cb/document.c 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/document.c 2022-05-07 18:47:47.000000000
+0200
@@ -1,4 +1,4 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#include <stdlib.h>
#include <stdio.h>
@@ -18,6 +18,7 @@
static bool read_archive(cb_document_t* cb_document, const char* archive,
girara_list_t* supported_extensions);
static char* get_extension(const char* path);
static void cb_document_page_meta_free(cb_document_page_meta_t* meta);
+static bool read_dir(cb_document_t* cb_document, const char* directory,
girara_list_t* supported_extensions);
zathura_error_t
cb_document_open(zathura_document_t* document)
@@ -25,8 +26,7 @@
if (document == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
-
- cb_document_t* cb_document = g_malloc0(sizeof(cb_document));
+ cb_document_t* cb_document = g_malloc0(sizeof(cb_document_t));
/* archive path */
const char* path = zathura_document_get_path(document);
@@ -58,8 +58,14 @@
}
/* read files recursively */
- if (read_archive(cb_document, path, supported_extensions) == false) {
- goto error_free;
+ if (g_file_test(path, G_FILE_TEST_IS_DIR)) {
+ if (read_dir(cb_document, path, supported_extensions) == false) {
+ goto error_free;
+ }
+ } else {
+ if (read_archive(cb_document, path, supported_extensions) == false) {
+ goto error_free;
+ }
}
girara_list_free(supported_extensions);
@@ -207,6 +213,43 @@
return true;
}
+static bool
+read_dir(cb_document_t* cb_document, const char* directory, girara_list_t*
supported_extensions)
+{
+ GDir* dir = g_dir_open(directory, 0, NULL);
+ const char* entrypath = NULL;
+ while ((entrypath = g_dir_read_name(dir))) {
+ char* fullpath = g_strdup_printf("%s/%s", directory, entrypath);
+ char* extension = get_extension(fullpath);
+ if (extension == NULL) {
+ continue;
+ }
+
+ GIRARA_LIST_FOREACH(supported_extensions, char*, iter, ext)
+ if (g_strcmp0(ext, extension) == 0) {
+ cb_document_page_meta_t* meta =
g_malloc(sizeof(cb_document_page_meta_t));
+ meta->file = g_strdup(fullpath);
+ g_free(fullpath);
+ GdkPixbuf* data = gdk_pixbuf_new_from_file(meta->file, NULL);
+ meta->width = gdk_pixbuf_get_width(data);
+ meta->height = gdk_pixbuf_get_height(data);
+
+ if (meta->width > 0 && meta->height > 0) {
+ girara_list_append(cb_document->pages, meta);
+ } else {
+ cb_document_page_meta_free(meta);
+ }
+
+ break;
+ }
+ GIRARA_LIST_FOREACH_END(supported_extensions, char*, iter, ext);
+
+ g_free(extension);
+ }
+ g_dir_close(dir);
+ return true;
+}
+
static int
compare_pages(const cb_document_page_meta_t* page1, const
cb_document_page_meta_t* page2)
{
@@ -227,3 +270,4 @@
return g_ascii_strdown(res + 1, -1);
}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/index.c
new/zathura-cb-0.1.10/zathura-cb/index.c
--- old/zathura-cb-0.1.8/zathura-cb/index.c 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/index.c 2022-05-07 18:47:47.000000000
+0200
@@ -1,4 +1,4 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#include "plugin.h"
#include "internal.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/internal.h
new/zathura-cb-0.1.10/zathura-cb/internal.h
--- old/zathura-cb-0.1.8/zathura-cb/internal.h 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/internal.h 2022-05-07 18:47:47.000000000
+0200
@@ -1,4 +1,4 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#ifndef INTERNAL_H
#define INTERNAL_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/page.c
new/zathura-cb-0.1.10/zathura-cb/page.c
--- old/zathura-cb-0.1.8/zathura-cb/page.c 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/page.c 2022-05-07 18:47:47.000000000
+0200
@@ -1,4 +1,4 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#include <glib.h>
#include <gtk/gtk.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/plugin.c
new/zathura-cb-0.1.10/zathura-cb/plugin.c
--- old/zathura-cb-0.1.8/zathura-cb/plugin.c 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/plugin.c 2022-05-07 18:47:47.000000000
+0200
@@ -1,4 +1,4 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#include "plugin.h"
@@ -21,6 +21,7 @@
"application/x-cb7",
"application/x-7z-compressed",
"application/x-cbt",
- "application/x-tar"
+ "application/x-tar",
+ "inode/directory"
})
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/plugin.h
new/zathura-cb-0.1.10/zathura-cb/plugin.h
--- old/zathura-cb-0.1.8/zathura-cb/plugin.h 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/plugin.h 2022-05-07 18:47:47.000000000
+0200
@@ -1,4 +1,4 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#ifndef CB_H
#define CB_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/render.c
new/zathura-cb-0.1.10/zathura-cb/render.c
--- old/zathura-cb-0.1.8/zathura-cb/render.c 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/render.c 2022-05-07 18:47:47.000000000
+0200
@@ -1,4 +1,4 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#include <gio/gio.h>
#include <archive.h>
@@ -45,82 +45,86 @@
return NULL;
}
- struct archive* a = archive_read_new();
- if (a == NULL) {
- return NULL;
- }
-
- archive_read_support_filter_all(a);
- archive_read_support_format_all(a);
- int r = archive_read_open_filename(a, archive, LIBARCHIVE_BUFFER_SIZE);
- if (r != ARCHIVE_OK) {
- return NULL;
- }
-
- struct archive_entry* entry = NULL;
- while ((r = archive_read_next_header(a, &entry)) != ARCHIVE_EOF) {
- if (r < ARCHIVE_WARN) {
- archive_read_close(a);
- archive_read_free(a);
+ if (g_file_test(archive, G_FILE_TEST_IS_DIR)) {
+ return gdk_pixbuf_new_from_file(file, NULL);
+ } else {
+ struct archive* a = archive_read_new();
+ if (a == NULL) {
return NULL;
}
- const char* path = archive_entry_pathname(entry);
- if (compare_path(path, file) != 0) {
- continue;
- }
-
- GInputStream* is = g_memory_input_stream_new();
- if (is == NULL) {
- archive_read_close(a);
- archive_read_free(a);
+ archive_read_support_filter_all(a);
+ archive_read_support_format_all(a);
+ int r = archive_read_open_filename(a, archive, LIBARCHIVE_BUFFER_SIZE);
+ if (r != ARCHIVE_OK) {
return NULL;
}
- GMemoryInputStream* mis = G_MEMORY_INPUT_STREAM(is);
- size_t size = 0;
- const void* buf = NULL;
- __LA_INT64_T offset = 0;
- while ((r = archive_read_data_block(a, &buf, &size, &offset)) !=
ARCHIVE_EOF) {
+ struct archive_entry* entry = NULL;
+ while ((r = archive_read_next_header(a, &entry)) != ARCHIVE_EOF) {
if (r < ARCHIVE_WARN) {
archive_read_close(a);
archive_read_free(a);
- g_object_unref(mis);
return NULL;
}
- if (size == 0 || buf == NULL) {
+ const char* path = archive_entry_pathname(entry);
+ if (compare_path(path, file) != 0) {
continue;
}
- void* tmp = g_malloc0(size);
- if (tmp == NULL) {
+ GInputStream* is = g_memory_input_stream_new();
+ if (is == NULL) {
archive_read_close(a);
archive_read_free(a);
- g_object_unref(mis);
return NULL;
}
+ GMemoryInputStream* mis = G_MEMORY_INPUT_STREAM(is);
- memcpy(tmp, buf, size);
- g_memory_input_stream_add_data(mis, tmp, size, g_free);
- }
+ size_t size = 0;
+ const void* buf = NULL;
+ __LA_INT64_T offset = 0;
+ while ((r = archive_read_data_block(a, &buf, &size, &offset)) !=
ARCHIVE_EOF) {
+ if (r < ARCHIVE_WARN) {
+ archive_read_close(a);
+ archive_read_free(a);
+ g_object_unref(mis);
+ return NULL;
+ }
+
+ if (size == 0 || buf == NULL) {
+ continue;
+ }
+
+ void* tmp = g_malloc0(size);
+ if (tmp == NULL) {
+ archive_read_close(a);
+ archive_read_free(a);
+ g_object_unref(mis);
+ return NULL;
+ }
+
+ memcpy(tmp, buf, size);
+ g_memory_input_stream_add_data(mis, tmp, size, g_free);
+ }
+
+ GdkPixbuf* pixbuf = gdk_pixbuf_new_from_stream(is, NULL, NULL);
+ if (pixbuf == NULL) {
+ archive_read_close(a);
+ archive_read_free(a);
+ g_object_unref(mis);
+ return NULL;
+ }
- GdkPixbuf* pixbuf = gdk_pixbuf_new_from_stream(is, NULL, NULL);
- if (pixbuf == NULL) {
archive_read_close(a);
archive_read_free(a);
g_object_unref(mis);
- return NULL;
+ return pixbuf;
}
archive_read_close(a);
archive_read_free(a);
- g_object_unref(mis);
- return pixbuf;
}
-
- archive_read_close(a);
- archive_read_free(a);
return NULL;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/utils.c
new/zathura-cb-0.1.10/zathura-cb/utils.c
--- old/zathura-cb-0.1.8/zathura-cb/utils.c 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/utils.c 2022-05-07 18:47:47.000000000
+0200
@@ -1,6 +1,7 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#include <glib.h>
+#include <dirent.h>
#include "utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.8/zathura-cb/utils.h
new/zathura-cb-0.1.10/zathura-cb/utils.h
--- old/zathura-cb-0.1.8/zathura-cb/utils.h 2018-03-17 11:44:26.000000000
+0100
+++ new/zathura-cb-0.1.10/zathura-cb/utils.h 2022-05-07 18:47:47.000000000
+0200
@@ -1,4 +1,4 @@
-/* See LICENSE file for license and copyright information */
+/* SPDX-License-Identifier: Zlib */
#ifndef UTILS_H
#define UTILS_H