Hello community, here is the log from the commit of package zathura-plugin-ps for openSUSE:Factory checked in at 2018-01-30 15:42:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/zathura-plugin-ps (Old) and /work/SRC/openSUSE:Factory/.zathura-plugin-ps.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zathura-plugin-ps" Tue Jan 30 15:42:38 2018 rev:4 rq:569898 version:0.2.5 Changes: -------- --- /work/SRC/openSUSE:Factory/zathura-plugin-ps/zathura-plugin-ps.changes 2017-05-29 22:19:40.667751761 +0200 +++ /work/SRC/openSUSE:Factory/.zathura-plugin-ps.new/zathura-plugin-ps.changes 2018-01-30 15:42:38.495540686 +0100 @@ -1,0 +2,6 @@ +Fri Jan 26 14:22:56 UTC 2018 - [email protected] + +- update to 0.2.5 +* adapt to new plugin interface + +------------------------------------------------------------------- Old: ---- zathura-ps-0.2.4.tar.gz New: ---- zathura-ps-0.2.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ zathura-plugin-ps.spec ++++++ --- /var/tmp/diff_new_pack.qWFnHS/_old 2018-01-30 15:42:39.715483732 +0100 +++ /var/tmp/diff_new_pack.qWFnHS/_new 2018-01-30 15:42:39.719483545 +0100 @@ -1,7 +1,7 @@ # # spec file for package zathura-plugin-ps # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,19 +18,19 @@ %define realname zathura-ps Name: zathura-plugin-ps -Version: 0.2.4 +Version: 0.2.5 Release: 0 Summary: PS support for zathura via libspectre License: Zlib Group: Productivity/Office/Other Url: https://pwmt.org/projects/%{realname}/ Source: https://pwmt.org/projects/%{realname}/download/%{realname}-%{version}.tar.gz +BuildRequires: pkgconfig BuildRequires: pkgconfig(girara-gtk3) BuildRequires: pkgconfig(libspectre) BuildRequires: pkgconfig(zathura) Requires: zathura Provides: zathura-ps-plugin -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The zathura-ps plugin adds PostScript support to zathura by using the libspectre library. @@ -47,11 +47,9 @@ find %{buildroot} -name "*.desktop" -delete -print %post -n %{name} -p /sbin/ldconfig - %postun -n %{name} -p /sbin/ldconfig %files -n %{name} -%defattr(-,root,root) %doc AUTHORS LICENSE %dir %{_libdir}/zathura %{_libdir}/zathura/ps.so ++++++ zathura-ps-0.2.4.tar.gz -> zathura-ps-0.2.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zathura-ps-0.2.4/Makefile new/zathura-ps-0.2.5/Makefile --- old/zathura-ps-0.2.4/Makefile 2017-01-11 22:12:17.000000000 +0100 +++ new/zathura-ps-0.2.5/Makefile 2017-12-21 14:21:17.000000000 +0100 @@ -10,12 +10,6 @@ OBJECTS = ${SOURCE:.c=.o} DOBJECTS = ${SOURCE:.c=.do} -ifneq "$(WITH_CAIRO)" "0" -CPPFLAGS += -DHAVE_CAIRO -INCS += $(CAIRO_INC) -LIBS += $(CAIRO_LIB) -endif - CPPFLAGS += "-DVERSION_MAJOR=${VERSION_MAJOR}" CPPFLAGS += "-DVERSION_MINOR=${VERSION_MINOR}" CPPFLAGS += "-DVERSION_REV=${VERSION_REV}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zathura-ps-0.2.4/config.mk new/zathura-ps-0.2.5/config.mk --- old/zathura-ps-0.2.4/config.mk 2017-01-11 22:12:17.000000000 +0100 +++ new/zathura-ps-0.2.5/config.mk 2017-12-21 14:21:17.000000000 +0100 @@ -2,11 +2,11 @@ VERSION_MAJOR = 0 VERSION_MINOR = 2 -VERSION_REV = 4 +VERSION_REV = 5 VERSION = ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV} # minimum required zathura version -ZATHURA_MIN_VERSION = 0.2.0 +ZATHURA_MIN_VERSION = 0.3.8 ZATHURA_VERSION_CHECK ?= $(shell pkg-config --atleast-version=$(ZATHURA_MIN_VERSION) zathura; echo $$?) ZATHURA_GTK_VERSION ?= $(shell pkg-config --variable=GTK_VERSION zathura) @@ -34,8 +34,8 @@ PLUGINDIR = ${LIBDIR}/zathura endif -INCS = ${GLIB_INC} ${SPECTRE_INC} ${GIRARA_INC} ${ZATHURA_INC} -LIBS = ${GLIB_LIB} ${SPECTRE_LIB} ${GIRARA_LIB} +INCS = ${GLIB_INC} ${SPECTRE_INC} ${GIRARA_INC} ${CAIRO_INC} ${ZATHURA_INC} +LIBS = ${GLIB_LIB} ${SPECTRE_LIB} ${GIRARA_LIB} ${CAIRO_LIB} # compiler flags CFLAGS += -std=c11 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS) @@ -46,9 +46,6 @@ # debug DFLAGS ?= -g -# build with cairo support? -WITH_CAIRO ?= 1 - # compiler CC ?= gcc LD ?= ld diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zathura-ps-0.2.4/document.c new/zathura-ps-0.2.5/document.c --- old/zathura-ps-0.2.4/document.c 2017-01-11 22:12:17.000000000 +0100 +++ new/zathura-ps-0.2.5/document.c 2017-12-21 14:21:17.000000000 +0100 @@ -47,8 +47,9 @@ } zathura_error_t -ps_document_free(zathura_document_t* document, SpectreDocument* spectre_document) +ps_document_free(zathura_document_t* document, void* data) { + SpectreDocument* spectre_document = data; if (document == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; } @@ -62,8 +63,9 @@ } zathura_error_t -ps_document_save_as(zathura_document_t* document, SpectreDocument* spectre_document, const char* path) +ps_document_save_as(zathura_document_t* document, void* data, const char* path) { + SpectreDocument* spectre_document = data; if (document == NULL || spectre_document == NULL || path == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zathura-ps-0.2.4/meta.c new/zathura-ps-0.2.5/meta.c --- old/zathura-ps-0.2.4/meta.c 2017-01-11 22:12:17.000000000 +0100 +++ new/zathura-ps-0.2.5/meta.c 2017-12-21 14:21:17.000000000 +0100 @@ -3,9 +3,9 @@ #include "plugin.h" girara_list_t* -ps_document_get_information(zathura_document_t* document, SpectreDocument* - spectre_document, zathura_error_t* error) +ps_document_get_information(zathura_document_t* document, void* data, zathura_error_t* error) { + SpectreDocument* spectre_document = data; if (document == NULL || spectre_document == NULL) { if (error != NULL) { *error = ZATHURA_ERROR_INVALID_ARGUMENTS; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zathura-ps-0.2.4/page.c new/zathura-ps-0.2.5/page.c --- old/zathura-ps-0.2.4/page.c 2017-01-11 22:12:17.000000000 +0100 +++ new/zathura-ps-0.2.5/page.c 2017-12-21 14:21:17.000000000 +0100 @@ -3,7 +3,7 @@ #include "plugin.h" zathura_error_t -ps_page_init(zathura_page_t* page, SpectrePage* spectre_page) +ps_page_init(zathura_page_t* page) { if (page == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; @@ -29,12 +29,13 @@ } zathura_error_t -ps_page_clear(zathura_page_t* page, SpectrePage* spectre_page) +ps_page_clear(zathura_page_t* page, void* data) { if (page == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; } + SpectrePage* spectre_page = data; if (spectre_page != NULL) { spectre_page_free(spectre_page); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zathura-ps-0.2.4/plugin.c new/zathura-ps-0.2.5/plugin.c --- old/zathura-ps-0.2.4/plugin.c 2017-01-11 22:12:17.000000000 +0100 +++ new/zathura-ps-0.2.5/plugin.c 2017-12-21 14:21:17.000000000 +0100 @@ -2,25 +2,19 @@ #include "plugin.h" -void -register_functions(zathura_plugin_functions_t* functions) -{ - functions->document_open = (zathura_plugin_document_open_t) ps_document_open; - functions->document_free = (zathura_plugin_document_free_t) ps_document_free; - functions->page_init = (zathura_plugin_page_init_t) ps_page_init; - functions->page_clear = (zathura_plugin_page_clear_t) ps_page_clear; - functions->page_render = (zathura_plugin_page_render_t) ps_page_render; - functions->document_save_as = (zathura_plugin_document_save_as_t) ps_document_save_as; - functions->document_get_information = (zathura_plugin_document_get_information_t) ps_document_get_information; -#if HAVE_CAIRO - functions->page_render_cairo = (zathura_plugin_page_render_cairo_t) ps_page_render_cairo; -#endif -} - -ZATHURA_PLUGIN_REGISTER( +ZATHURA_PLUGIN_REGISTER_WITH_FUNCTIONS( "ps", VERSION_MAJOR, VERSION_MINOR, VERSION_REV, - register_functions, + ZATHURA_PLUGIN_FUNCTIONS({ + .document_open = ps_document_open, + .document_free = ps_document_free, + .page_init = ps_page_init, + .page_clear = ps_page_clear, + .page_render = ps_page_render, + .document_save_as = ps_document_save_as, + .document_get_information = ps_document_get_information, + .page_render_cairo = ps_page_render_cairo, + }), ZATHURA_PLUGIN_MIMETYPES({ "application/postscript", "application/eps", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zathura-ps-0.2.4/plugin.h new/zathura-ps-0.2.5/plugin.h --- old/zathura-ps-0.2.4/plugin.h 2017-01-11 22:12:17.000000000 +0100 +++ new/zathura-ps-0.2.5/plugin.h 2017-12-21 14:21:17.000000000 +0100 @@ -6,10 +6,7 @@ #include <stdbool.h> #include <libspectre/spectre.h> #include <zathura/plugin-api.h> - -#if HAVE_CAIRO #include <cairo.h> -#endif /** * Open a PostScript document @@ -18,7 +15,7 @@ * @return ZATHURA_ERROR_OK if no error occurred otherwise see * zathura_error_t */ -zathura_error_t ps_document_open(zathura_document_t* document); +GIRARA_HIDDEN zathura_error_t ps_document_open(zathura_document_t* document); /** * Closes and frees the internal document structure @@ -27,7 +24,7 @@ * @return ZATHURA_ERROR_OK if no error occurred otherwise see * zathura_error_t */ -zathura_error_t ps_document_free(zathura_document_t* document, SpectreDocument* spectre_document); +GIRARA_HIDDEN zathura_error_t ps_document_free(zathura_document_t* document, void* spectre_document); /** * Saves the document to the given path @@ -37,7 +34,7 @@ * @return ZATHURA_ERROR_OK when no error occurred, otherwise see * zathura_error_t */ -zathura_error_t ps_document_save_as(zathura_document_t* document, SpectreDocument* spectre_document, const char* path); +GIRARA_HIDDEN zathura_error_t ps_document_save_as(zathura_document_t* document, void* spectre_document, const char* path); /** * Returns a list of document information entries of the document @@ -47,7 +44,7 @@ * error occurred * @return List of information entries or NULL if an error occurred */ -girara_list_t* ps_document_get_information(zathura_document_t* document, SpectreDocument* +GIRARA_HIDDEN girara_list_t* ps_document_get_information(zathura_document_t* document, void* spectre_document, zathura_error_t* error); /** @@ -57,7 +54,7 @@ * @return ZATHURA_ERROR_OK if no error occurred otherwise see * zathura_error_t */ -zathura_error_t ps_page_init(zathura_page_t* page, SpectrePage* spectre_page); +GIRARA_HIDDEN zathura_error_t ps_page_init(zathura_page_t* page); /** * Renders a page and returns a allocated image buffer which has to be freed @@ -68,9 +65,8 @@ * error occurred * @return Image buffer or NULL if an error occurred */ -zathura_image_buffer_t* ps_page_render(zathura_page_t* page, SpectrePage* spectre_page, zathura_error_t* error); +GIRARA_HIDDEN zathura_image_buffer_t* ps_page_render(zathura_page_t* page, void* spectre_page, zathura_error_t* error); -#if HAVE_CAIRO /** * Renders a page onto a cairo object * @@ -80,8 +76,7 @@ * @return ZATHURA_ERROR_OK if no error occurred otherwise see * zathura_error_t */ -zathura_error_t ps_page_render_cairo(zathura_page_t* page, SpectrePage* spectre_page, cairo_t* cairo, bool printing); -#endif +GIRARA_HIDDEN zathura_error_t ps_page_render_cairo(zathura_page_t* page, void* spectre_page, cairo_t* cairo, bool printing); /** * Frees a PostScript page @@ -90,6 +85,6 @@ * @return ZATHURA_ERROR_OK if no error occurred otherwise see * zathura_error_t */ -zathura_error_t ps_page_clear(zathura_page_t* page, SpectrePage* spectre_page); +GIRARA_HIDDEN zathura_error_t ps_page_clear(zathura_page_t* page, void* spectre_page); #endif // PS_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zathura-ps-0.2.4/render.c new/zathura-ps-0.2.5/render.c --- old/zathura-ps-0.2.4/render.c 2017-01-11 22:12:17.000000000 +0100 +++ new/zathura-ps-0.2.5/render.c 2017-12-21 14:21:17.000000000 +0100 @@ -3,15 +3,14 @@ #include <glib.h> #include <stdlib.h> -#if HAVE_CAIRO #include <cairo.h> -#endif #include "plugin.h" zathura_image_buffer_t* -ps_page_render(zathura_page_t* page, SpectrePage* spectre_page, zathura_error_t* error) +ps_page_render(zathura_page_t* page, void* data, zathura_error_t* error) { + SpectrePage* spectre_page = data; if (page == NULL) { if (error != NULL) { *error = ZATHURA_ERROR_INVALID_ARGUMENTS; @@ -84,15 +83,14 @@ return NULL; } -#if HAVE_CAIRO zathura_error_t -ps_page_render_cairo(zathura_page_t* page, SpectrePage* spectre_page, cairo_t* cairo, bool GIRARA_UNUSED(printing)) +ps_page_render_cairo(zathura_page_t* page, void* data, cairo_t* cairo, bool GIRARA_UNUSED(printing)) { + SpectrePage* ps_page = data; if (page == NULL || cairo == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; } - SpectrePage* ps_page = (SpectrePage*) zathura_page_get_data(page);; cairo_surface_t* surface = cairo_get_target(cairo); if (ps_page == NULL || surface == NULL || @@ -145,4 +143,3 @@ return ZATHURA_ERROR_OK; } -#endif
