Commits

David B. Evans authored 80d414b2717
vsd2svg: patch to use libvisio-0.1, librevenge
No tags

graphics/vsd2svg/files/patch-support-libvisio-0.1.diff

Added
1 +commit fca28533281ee3875e1444998e36e2ae348266fa
2 +Author: Felipe Weckx <felipe@weckx.net>
3 +Date: Fri Aug 15 09:33:38 2014 -0300
4 +
5 + support to librevenge and libvisio >= 0.1
6 +
7 +diff --git a/NEWS b/NEWS
8 +index 943f0cc..93ac894 100644
9 +--- NEWS
10 ++++ NEWS
11 +@@ -1,3 +1,6 @@
12 ++2014-08-14 vsd2svg 0.2.0
13 ++ * Update to work with libvisio-0.1 and librevenge
14 ++
15 + 2012-09-02 vsd2svg 0.0.2
16 +
17 + * First working version
18 +diff --git a/configure.ac b/configure.ac
19 +index 9fd7fc1..3bc64ff 100644
20 +--- configure.ac
21 ++++ configure.ac
22 +@@ -4,7 +4,7 @@
23 + AC_PREREQ([2.67])
24 +
25 + m4_define([vsd2svg_version_major],[0])
26 +-m4_define([vsd2svg_version_minor],[1])
27 ++m4_define([vsd2svg_version_minor],[2])
28 + m4_define([vsd2svg_version_micro],[0])
29 + m4_define([vsd2svg_version],[vsd2svg_version_major.vsd2svg_version_minor.vsd2svg_version_micro])
30 +
31 +@@ -49,7 +49,8 @@ AC_CONFIG_FILES([Makefile build/Makefile build/win32/Makefile \
32 + src/Makefile])
33 +
34 + # Checks for libraries.
35 +-PKG_CHECK_MODULES([libvisio],[libvisio-0.0])
36 ++PKG_CHECK_MODULES([libvisio],[libvisio-0.1])
37 ++PKG_CHECK_MODULES([librevenge],[librevenge-0.0 librevenge-stream-0.0 librevenge-generators-0.0])
38 +
39 + # Checks for header files.
40 + AC_CHECK_HEADERS([windows.h], [AM_CONDITIONAL([WINDOWS_H], true)],
41 +diff --git a/installer/rpm/mingw32-vsd2svg.spec b/installer/rpm/mingw32-vsd2svg.spec
42 +index 0eec9b5..09fae22 100644
43 +--- installer/rpm/mingw32-vsd2svg.spec
44 ++++ installer/rpm/mingw32-vsd2svg.spec
45 +@@ -8,7 +8,7 @@
46 +
47 + Name: mingw32-vsd2svg
48 + Summary: Convert VSD files into SVG files
49 +-Version: 0.1.0
50 ++Version: 0.2.0
51 + Release: 0
52 + License: GPLv2+
53 + Group: Graphics
54 +diff --git a/src/Makefile.am b/src/Makefile.am
55 +index 43c8874..00e5904 100644
56 +--- src/Makefile.am
57 ++++ src/Makefile.am
58 +@@ -3,14 +3,14 @@ if WINDOWS_H
59 + bin_PROGRAMS += vsd2svg-win
60 + vsd2svg_win_DEPENDENCIES = @VSD2SVG_WIN_WIN32_RESOURCE@
61 + vsd2svg_win_SOURCES = vsd2svg-win.cpp
62 +- vsd2svg_win_LDADD = $(libvisio_LIBS) -lcomdlg32 @VSD2SVG_WIN_WIN32_RESOURCE@
63 ++ vsd2svg_win_LDADD = $(libvisio_LIBS) $(librevenge_LIBS) -lcomdlg32 @VSD2SVG_WIN_WIN32_RESOURCE@
64 + vsd2svg_win_LDFLAGS = -mwindows
65 + endif
66 +
67 +-AM_CPPFLAGS = $(libvisio_CFLAGS)
68 ++AM_CPPFLAGS = $(libvisio_CFLAGS) $(librevenge_CFLAGS)
69 +
70 + vsd2svg_SOURCES = vsd2svg.cpp
71 +-vsd2svg_LDADD = $(libvisio_LIBS)
72 ++vsd2svg_LDADD = $(libvisio_LIBS) $(librevenge_LIBS)
73 +
74 + if WINDOWS_H
75 + @VSD2SVG_WIN_WIN32_RESOURCE@ : vsd2svg-win.rc $(vsd2svg_win_OBJECTS)
76 +diff --git a/src/vsd2svg-win.cpp b/src/vsd2svg-win.cpp
77 +index f8162db..a8f8f41 100644
78 +--- src/vsd2svg-win.cpp
79 ++++ src/vsd2svg-win.cpp
80 +@@ -28,19 +28,19 @@
81 + #include <iostream>
82 + #include <string>
83 + #include <sys/stat.h>
84 ++#include <librevenge-stream/librevenge-stream.h>
85 ++#include <librevenge-generators/librevenge-generators.h>
86 ++#include <librevenge/librevenge.h>
87 + #include <libvisio/libvisio.h>
88 +-#include <libwpd-stream/libwpd-stream.h>
89 +-#include <libwpd/libwpd.h>
90 + #include <windows.h>
91 + #include <config.h>
92 + #include <vsd2svg-win.h>
93 +
94 + using namespace std;
95 +
96 +-char gszVersion[] = "vsd2svg-win 0.1.0";
97 ++char gszVersion[] = "vsd2svg-win 0.2.0";
98 + unsigned giDrawingPageCount = 0;
99 +-libvisio::VSDStringVector output;
100 +-
101 ++librevenge::RVNGStringVector output;
102 + int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
103 + LPSTR lpCmdLine, int nCmdShow)
104 + {
105 +@@ -116,7 +116,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
106 + return 1;
107 + }
108 +
109 +- WPXFileStream input(szTmpVisio);
110 ++ librevenge::RVNGFileStream input(szTmpVisio);
111 +
112 + if (!libvisio::VisioDocument::isSupported(&input)) {
113 + MessageBox(NULL,
114 +@@ -128,7 +128,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
115 + return 1;
116 + }
117 +
118 +- if (!libvisio::VisioDocument::generateSVG(&input, output)) {
119 ++ librevenge::RVNGSVGDrawingGenerator generator(output, "svg");
120 ++ if (!libvisio::VisioDocument::parse(&input, &generator)) {
121 + MessageBox(NULL,
122 + "ERROR: SVG generation failed!",
123 + gszVersion, MB_ICONERROR);
124 +diff --git a/src/vsd2svg.cpp b/src/vsd2svg.cpp
125 +index 9be3a84..bf26886 100644
126 +--- src/vsd2svg.cpp
127 ++++ src/vsd2svg.cpp
128 +@@ -27,9 +27,10 @@
129 + #include <fstream>
130 + #include <iostream>
131 + #include <sys/stat.h>
132 ++#include <librevenge-stream/librevenge-stream.h>
133 ++#include <librevenge-generators/librevenge-generators.h>
134 ++#include <librevenge/librevenge.h>
135 + #include <libvisio/libvisio.h>
136 +-#include <libwpd-stream/libwpd-stream.h>
137 +-#include <libwpd/libwpd.h>
138 + #include <strings.h>
139 + #include <config.h>
140 +
141 +@@ -73,7 +74,7 @@ int main(int argc, char *argv[])
142 + return 1;
143 + }
144 +
145 +- WPXFileStream input(argv[1 + allpages]);
146 ++ librevenge::RVNGFileStream input(argv[1 + allpages]);
147 +
148 + if (!libvisio::VisioDocument::isSupported(&input)) {
149 + cerr <<
150 +@@ -82,8 +83,9 @@ int main(int argc, char *argv[])
151 + return 1;
152 + }
153 +
154 +- libvisio::VSDStringVector output;
155 +- if (!libvisio::VisioDocument::generateSVG(&input, output)) {
156 ++ librevenge::RVNGStringVector output;
157 ++ librevenge::RVNGSVGDrawingGenerator generator(output, "svg");
158 ++ if (!libvisio::VisioDocument::parse(&input, &generator)) {
159 + cerr << "ERROR: SVG Generation failed!" << endl;
160 + return 1;
161 + }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut