Hello community,

here is the log from the commit of package pdf2svg for openSUSE:Factory checked 
in at 2015-12-14 10:14:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pdf2svg (Old)
 and      /work/SRC/openSUSE:Factory/.pdf2svg.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pdf2svg"

Changes:
--------
--- /work/SRC/openSUSE:Factory/pdf2svg/pdf2svg.changes  2014-03-10 
12:39:04.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.pdf2svg.new/pdf2svg.changes     2015-12-14 
10:14:11.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Dec  8 19:37:38 UTC 2015 - [email protected]
+
+- Update to version 0.2.3
+  * No changelog available
+- Update download Url
+- Remove obsolete %clean section
+
+-------------------------------------------------------------------

Old:
----
  pdf2svg-0.2.2.tar.gz

New:
----
  pdf2svg-0.2.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pdf2svg.spec ++++++
--- /var/tmp/diff_new_pack.ZFYUN7/_old  2015-12-14 10:14:12.000000000 +0100
+++ /var/tmp/diff_new_pack.ZFYUN7/_new  2015-12-14 10:14:12.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package pdf2svg
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,9 +21,9 @@
 Summary:        PDF to SVG Converter
 License:        GPL-2.0+
 Group:          Productivity/Graphics/Convertors
-Version:        0.2.2
+Version:        0.2.3
 Release:        0
-Source0:        
http://www.cityinthesky.co.uk/wp-content/uploads/2013/10/pdf2svg-%{version}.tar.gz
+Source0:        
https://github.com/db9052/pdf2svg/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 BuildRequires:  cairo-devel
@@ -41,14 +41,11 @@
 make %{?_smp_mflags}
 
 %install
-%makeinstall
-
-%clean
-rm -rf %{buildroot}
+%make_install
 
 %files
 %defattr(-,root,root,-)
-%doc README.md AUTHORS ChangeLog LICENSE
+%doc README COPYING AUTHORS ChangeLog LICENSE
 %{_bindir}/%{name}
 
 %changelog

++++++ pdf2svg-0.2.2.tar.gz -> pdf2svg-0.2.3.tar.gz ++++++
++++ 8961 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pdf2svg-0.2.2/Makefile.am new/pdf2svg-0.2.3/Makefile.am
--- old/pdf2svg-0.2.2/Makefile.am       2013-07-18 13:10:33.000000000 +0200
+++ new/pdf2svg-0.2.3/Makefile.am       2015-06-16 14:52:54.000000000 +0200
@@ -14,7 +14,7 @@
 # N.B. POPPLERGLIB_ should be set by the configure script either using 
pkg-config, 
 # by guessing where the librarys may be, or by the user specifying.
 pdf2svg_SOURCES = pdf2svg.c
-pdf2svg_CFLAGS = $(CAIRO_CFLAGS) $(GTK2_CFLAGS) $(POPPLERGLIB_CFLAGS) 
-pdf2svg_LDADD = $(CAIRO_LIBS) $(GTK2_LIBS) $(POPPLERGLIB_LIBS) 
+pdf2svg_CFLAGS = $(CAIRO_CFLAGS) $(POPPLERGLIB_CFLAGS) 
+pdf2svg_LDADD = $(CAIRO_LIBS) $(POPPLERGLIB_LIBS) 
 
-MAINTAINERCLEANFILES = Makefile.in
\ No newline at end of file
+MAINTAINERCLEANFILES = Makefile.in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pdf2svg-0.2.2/README new/pdf2svg-0.2.3/README
--- old/pdf2svg-0.2.2/README    1970-01-01 01:00:00.000000000 +0100
+++ new/pdf2svg-0.2.3/README    2015-06-16 14:52:54.000000000 +0200
@@ -0,0 +1,37 @@
+pdf2svg
+=======
+
+A simple PDF to SVG converter using the Poppler and Cairo libraries.
+
+For Windows binaries see <https://github.com/jalios/pdf2svg-windows>.
+
+For Linux binaries, see your package manager (e.g., "yum install pdf2svg" or 
"apt-get install pdf2svg").
+
+Prerequisites:
+
+* poppler [http://poppler.freedesktop.org/](http://poppler.freedesktop.org/)
+    - tested with v0.5.4 but other versions may work as well
+* cairo [http://cairographics.org/](http://cairographics.org/)
+    - tested with v1.2.6 and v1.4.10 but other versions may work as well
+
+
+To make and install pdf2svg:
+
+1) Download pdf2svg-0.2.2.tar.gz and unpack
+2) Change to the pdf2svg-0.2.2 directory
+3) Do the normal ./configure && make && make install
+
+
+Usage:
+
+pdf2svg &lt;input.pdf&gt; &lt;output.svg&gt; \[&lt;page no of pdf or 
"all"&gt;\]
+
+
+Copyright (C) 2007-2013 David Barton ([email protected])
+[http://www.cityinthesky.co.uk/](http://www.cityinthesky.co.uk/)
+
+Copyright (C) 2007 Matthew Flaschen ([email protected])
+Updated to allow conversion of all pages at once.
+
+Copyright (C) 2008 Ed Grace
+Added GNU Autotools commands.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pdf2svg-0.2.2/README.md new/pdf2svg-0.2.3/README.md
--- old/pdf2svg-0.2.2/README.md 2013-07-18 13:10:33.000000000 +0200
+++ new/pdf2svg-0.2.3/README.md 1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-pdf2svg
-=======
-
-A simple PDF to SVG converter using the Poppler and Cairo libraries.
-
-Prerequisites:
-
-* poppler <http://poppler.freedesktop.org/>
-    - tested with v0.5.4 but other versions may work as well
-* cairo <http://cairographics.org/>
-    - tested with v1.2.6 and v1.4.10 but other versions may work as well
-
-
-To make and install pdf2svg:
-
-1) Download pdf2svg-0.2.2.tar.gz and unpack
-2) Change to the pdf2svg-0.2.2 directory
-3) Do the normal ./configure && make && make install
-
-
-Usage:
-
-pdf2svg <input.pdf> <output.svg> [<page no of pdf or "all">]
-
-
-Copyright (C) 2007-2013 David Barton ([email protected])
-<http://www.cityinthesky.co.uk/>
-
-Copyright (C) 2007 Matthew Flaschen ([email protected])
-Updated to allow conversion of all pages at once.
-
-Copyright (C) 2008 Ed Grace
-Added GNU Autotools commands.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pdf2svg-0.2.2/configure.ac new/pdf2svg-0.2.3/configure.ac
--- old/pdf2svg-0.2.2/configure.ac      2013-07-18 13:10:33.000000000 +0200
+++ new/pdf2svg-0.2.3/configure.ac      2015-06-16 14:52:54.000000000 +0200
@@ -20,8 +20,6 @@
 PKG_CHECK_MODULES(CAIRO,cairo >= 1.2.6)
 # Use pkg-config to check for the existence of the poppler-glib libraries
 PKG_CHECK_MODULES(POPPLERGLIB,poppler-glib >= 0.5.4)
-# GTK
-PKG_CHECK_MODULES(GTK2,gtk+-2.0)
 
 # Generate the Makefile
 AC_CONFIG_FILES([Makefile])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pdf2svg-0.2.2/pdf2svg.c new/pdf2svg-0.2.3/pdf2svg.c
--- old/pdf2svg-0.2.2/pdf2svg.c 2013-07-18 13:10:33.000000000 +0200
+++ new/pdf2svg-0.2.3/pdf2svg.c 2015-06-16 14:52:54.000000000 +0200
@@ -19,6 +19,8 @@
 
 // Definitely works with Cairo v1.2.6 and Poppler 0.5.4
 
+#include <assert.h>
+#include <stdlib.h>
 #include <glib.h>
 #include <poppler.h>
 #include <poppler-document.h>
@@ -31,142 +33,142 @@
 // Begin theft from ePDFview (Copyright (C) 2006 Emma's Software) under the GPL
 gchar *getAbsoluteFileName(const gchar *fileName)
 {
-    gchar *absoluteFileName = NULL;
-    if (g_path_is_absolute(fileName)) {
-        absoluteFileName = g_strdup(fileName);
-    }
-    else {
-        gchar *currentDir = g_get_current_dir();
-        absoluteFileName = g_build_filename(currentDir, fileName, NULL);
-        g_free(currentDir);
-    }
-    return absoluteFileName;
+       gchar *absoluteFileName = NULL;
+       if (g_path_is_absolute(fileName)) {
+               absoluteFileName = g_strdup(fileName);
+       }
+       else {
+               gchar *currentDir = g_get_current_dir();
+               absoluteFileName = g_build_filename(currentDir, fileName, NULL);
+               g_free(currentDir);
+       }
+       return absoluteFileName;
 }
 // End theft from ePDFview
 
 
 int convertPage(PopplerPage *page, const char* svgFilename)
 {
-    // Poppler stuff 
-    double width, height;
+       // Poppler stuff 
+       double width, height;
 
-    // Cairo stuff
-    cairo_surface_t *surface;
-    cairo_t *drawcontext;
-
-    if (page == NULL) {
-        fprintf(stderr, "Page does not exist\n");
-        return -1;
-    }
-    poppler_page_get_size (page, &width, &height);
-
-    // Open the SVG file
-    surface = cairo_svg_surface_create(svgFilename, width, height);
-    drawcontext = cairo_create(surface);
-
-    // Render the PDF file into the SVG file
-    poppler_page_render_for_printing(page, drawcontext);
-    cairo_show_page(drawcontext);
-
-    // Close the SVG file
-    cairo_destroy(drawcontext);
-    cairo_surface_destroy(surface);
-
-    // Close the PDF file
-    g_object_unref(page);
-    
-    return 0;     
+       // Cairo stuff
+       cairo_surface_t *surface;
+       cairo_t *drawcontext;
+
+       if (page == NULL) {
+               fprintf(stderr, "Page does not exist\n");
+               return -1;
+       }
+       poppler_page_get_size (page, &width, &height);
+
+       // Open the SVG file
+       surface = cairo_svg_surface_create(svgFilename, width, height);
+       drawcontext = cairo_create(surface);
+
+       // Render the PDF file into the SVG file
+       poppler_page_render_for_printing(page, drawcontext);
+       cairo_show_page(drawcontext);
+
+       // Close the SVG file
+       cairo_destroy(drawcontext);
+       cairo_surface_destroy(surface);
+
+       // Close the PDF file
+       g_object_unref(page);
+       
+       return 0;     
 }
 
 int main(int argn, char *args[])
 {
-    // Poppler stuff
-    PopplerDocument *pdffile;
-    PopplerPage *page;
-
-    // Initialise the GType library
-    g_type_init ();
-
-    // Get command line arguments
-    if ((argn < 3)||(argn > 4)) {
-        printf("Usage: pdf2svg <in file.pdf> <out file.svg> [<page no>]\n");
-        return -2;
-    }
-    gchar *absoluteFileName = getAbsoluteFileName(args[1]);
-    gchar *filename_uri = g_filename_to_uri(absoluteFileName, NULL, NULL);
-    gchar *pageLabel = NULL;
-
-    char* svgFilename = args[2];
-
-    g_free(absoluteFileName);
-    if (argn == 4) {
-        // Get page number
-        pageLabel = g_strdup(args[3]);
-    }
-
-    // Open the PDF file
-    pdffile = poppler_document_new_from_file(filename_uri, NULL, NULL);
-    g_free(filename_uri);
-    if (pdffile == NULL) {
-        fprintf(stderr, "Unable to open file\n");
-        return -3;
-    }
-
-    int conversionErrors = 0;
-    // Get the page
-
-    if(pageLabel == NULL)
-    {
-        page = poppler_document_get_page(pdffile, 0);
-        conversionErrors = convertPage(page, svgFilename);
-    }
-    else
-    {
-        if(strcmp(pageLabel, "all") == 0)
-        {
-             int curError;
-             int pageCount = poppler_document_get_n_pages(pdffile);
-             
-             if(pageCount > 9999999) 
-             {
-                  fprintf(stderr, "Too many pages (>9,999,999)\n");
-                  return -5;
-             }
-        
-             char pageCountBuffer[8]; // 9,999,999 page limit
-             sprintf(pageCountBuffer, "%d", pageCount);
-
-             char* svgFilenameBuffer = malloc(strlen(svgFilename) + 
strlen(pageCountBuffer));
-
-             int pageInd;
-             for(pageInd = 0; pageInd < pageCount; pageInd++)
-             {
-                  sprintf(svgFilenameBuffer, svgFilename, pageInd + 1);
-                  page = poppler_document_get_page(pdffile, pageInd);
-                  curError = convertPage(page, svgFilenameBuffer);
-                  if(curError != 0) {
-                       conversionErrors = -1;
-                  }
-             }
-
-             free(svgFilenameBuffer);
-        }
-        else
-        {
-             page = poppler_document_get_page_by_label(pdffile, pageLabel);
-             conversionErrors = convertPage(page, svgFilename);
-             g_free(pageLabel);
-        }
-    }
-
-    g_object_unref(pdffile);
-
-    if(conversionErrors != 0) {
-        return -4;
-    }
-
-    else {
-        return 0;
-    }
+       // Poppler stuff
+       PopplerDocument *pdffile;
+       PopplerPage *page;
+
+       // Initialise the GType library
+       g_type_init ();
+
+       // Get command line arguments
+       if ((argn < 3)||(argn > 4)) {
+               printf("Usage: pdf2svg <in file.pdf> <out file.svg> [<page 
no>]\n");
+               return -2;
+       }
+       gchar *absoluteFileName = getAbsoluteFileName(args[1]);
+       gchar *filename_uri = g_filename_to_uri(absoluteFileName, NULL, NULL);
+       gchar *pageLabel = NULL;
+
+       char* svgFilename = args[2];
+
+       g_free(absoluteFileName);
+       if (argn == 4) {
+               // Get page number
+               pageLabel = g_strdup(args[3]);
+       }
+
+       // Open the PDF file
+       pdffile = poppler_document_new_from_file(filename_uri, NULL, NULL);
+       g_free(filename_uri);
+       if (pdffile == NULL) {
+               fprintf(stderr, "Unable to open file\n");
+               return -3;
+       }
+
+       int conversionErrors = 0;
+       // Get the page
+
+       if(pageLabel == NULL) {
+               page = poppler_document_get_page(pdffile, 0);
+               conversionErrors = convertPage(page, svgFilename);
+       }
+       else {
+               if(strcmp(pageLabel, "all") == 0) {
+                       int curError;
+                       int pageCount = poppler_document_get_n_pages(pdffile);
+
+                       if(pageCount > 9999999) {
+                               fprintf(stderr, "Too many pages 
(>9,999,999)\n");
+                               return -5;
+                       }
+
+                       size_t svgFilenameBufLen = strlen(svgFilename) + 1;
+                       char *svgFilenameBuffer = 
(char*)malloc(svgFilenameBufLen);
+                       assert(svgFilenameBuffer != NULL);
+
+                       int pageInd;
+                       for(pageInd = 0; pageInd < pageCount; pageInd++) {
+                               while (1) {
+                                       size_t _wr_len = 
snprintf(svgFilenameBuffer, svgFilenameBufLen, svgFilename, pageInd + 1);
+                                       if (_wr_len >= svgFilenameBufLen) {
+                                               svgFilenameBufLen = _wr_len + 1;
+                                               svgFilenameBuffer = 
(char*)realloc(svgFilenameBuffer, svgFilenameBufLen);
+                                               assert(svgFilenameBuffer != 
NULL);
+                                               continue;
+                                       }
+                                       break;
+                               }
+
+                               page = poppler_document_get_page(pdffile, 
pageInd);
+                               curError = convertPage(page, svgFilenameBuffer);
+                               if(curError != 0)
+                                       conversionErrors = -1;
+                       }
+                       free(svgFilenameBuffer);
+               }
+               else {
+                       page = poppler_document_get_page_by_label(pdffile, 
pageLabel);
+                       conversionErrors = convertPage(page, svgFilename);
+                       g_free(pageLabel);
+               }
+       }
+
+       g_object_unref(pdffile);
+
+       if(conversionErrors != 0) {
+               return -4;
+       }
+       else {
+               return 0;
+       }
 
 }


Reply via email to