<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[122134] trunk/dports/graphics/inkscape-devel</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/122134">122134</a></dd>
<dt>Author</dt> <dd>devans@macports.org</dd>
<dt>Date</dt> <dd>2014-07-15 11:03:30 -0700 (Tue, 15 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>inkscape-devel: add +revenge variant, experimental upstream patch to build with latest libcdr, libvisio, libwpg based on librevenge.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsinkscapedevelPortfile">trunk/dports/graphics/inkscape-devel/Portfile</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/dports/graphics/inkscape-devel/files/</li>
<li><a href="#trunkdportsgraphicsinkscapedevelfilespatchlibrevengediff">trunk/dports/graphics/inkscape-devel/files/patch-librevenge.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsinkscapedevelPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/inkscape-devel/Portfile (122133 => 122134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/inkscape-devel/Portfile        2014-07-15 17:32:35 UTC (rev 122133)
+++ trunk/dports/graphics/inkscape-devel/Portfile        2014-07-15 18:03:30 UTC (rev 122134)
</span><span class="lines">@@ -56,6 +56,16 @@
</span><span class="cx"> ui_msg "---> Fetching source from bzr repository: this may take a while"
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+variant revenge description {Experimental upstream patch to build with latest libcdr, libvisio, libwpg based on librevenge} {
+ patchfiles-append patch-librevenge.diff
+ depends_lib-delete port:libcdr \
+ port:libvisio \
+ port:libwpg
+ depends_lib-append port:libcdr-0.1 \
+ port:libvisio-0.1 \
+ port:libwpg-0.3
+}
+
</ins><span class="cx"> variant python26 conflicts python27 description {Configure to use Python version 2.6} {
</span><span class="cx"> depends_lib-append \
</span><span class="cx"> port:py26-lxml \
</span></span></pre></div>
<a id="trunkdportsgraphicsinkscapedevelfilespatchlibrevengediff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/inkscape-devel/files/patch-librevenge.diff (0 => 122134)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/inkscape-devel/files/patch-librevenge.diff         (rev 0)
+++ trunk/dports/graphics/inkscape-devel/files/patch-librevenge.diff        2014-07-15 18:03:30 UTC (rev 122134)
</span><span class="lines">@@ -0,0 +1,294 @@
</span><ins>+=== modified file 'configure.ac'
+--- configure.ac        2014-06-03 15:38:31 +0000
++++ configure.ac        2014-06-15 09:24:33 +0000
+@@ -531,28 +531,14 @@
+ with_libwpg=no
+
+ if test "x$enable_wpg" = "xyes"; then
+-        PKG_CHECK_MODULES(LIBWPG01, libwpg-0.1 libwpg-stream-0.1, with_libwpg01=yes, with_libwpg01=no)
+-        if test "x$with_libwpg01" = "xyes"; then
+-                AC_DEFINE(WITH_LIBWPG01,1,[Build in libwpg 0.1.x])
+-                with_libwpg=yes
+-                AC_SUBST(LIBWPG_LIBS, $LIBWPG01_LIBS)
+-                AC_SUBST(LIBWPG_CFLAGS, $LIBWPG01_CFLAGS)
+-        fi
+-
+-        PKG_CHECK_MODULES(LIBWPG02, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg02=yes, with_libwpg02=no)
+-        if test "x$with_libwpg02" = "xyes"; then
+-                AC_DEFINE(WITH_LIBWPG02,1,[Build in libwpg 0.2.x])
+-                with_libwpg=yes
+-                AC_SUBST(LIBWPG_LIBS, $LIBWPG02_LIBS)
+-                AC_SUBST(LIBWPG_CFLAGS, $LIBWPG02_CFLAGS)
+-        fi
++        PKG_CHECK_MODULES(LIBWPG, libwpg-0.3 librevenge-0.0 librevenge-stream-0.0, with_libwpg=yes, with_libwpg=no)
+
+         if test "x$with_libwpg" = "xyes"; then
+                 AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
+         fi
+ fi
+-AM_CONDITIONAL(WITH_LIBWPG01, test "x$with_libwpg01" = "xyes")
+-AM_CONDITIONAL(WITH_LIBWPG02, test "x$with_libwpg02" = "xyes")
++AC_SUBST(LIBWPG_LIBS)
++AC_SUBST(LIBWPG_CFLAGS)
+ AM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
+
+ dnl ********************************
+@@ -566,7 +552,7 @@
+ with_libvisio=no
+
+ if test "x$enable_visio" = "xyes"; then
+-        PKG_CHECK_MODULES(LIBVISIO, libvisio-0.0 >= 0.0.20 libwpd-0.9 libwpd-stream-0.9 libwpg-0.2, with_libvisio=yes, with_libvisio=no)
++        PKG_CHECK_MODULES(LIBVISIO, libvisio-0.1 librevenge-0.0 librevenge-stream-0.0, with_libvisio=yes, with_libvisio=no)
+
+         if test "x$with_libvisio" = "xyes"; then
+                 AC_DEFINE(WITH_LIBVISIO,1,[Build in libvisio])
+@@ -587,7 +573,7 @@
+ with_libcdr=no
+
+ if test "x$enable_cdr" = "xyes"; then
+-        PKG_CHECK_MODULES(LIBCDR, libcdr-0.0 >= 0.0.3 libwpd-0.9 libwpd-stream-0.9 libwpg-0.2, with_libcdr=yes, with_libcdr=no)
++        PKG_CHECK_MODULES(LIBCDR, libcdr-0.1 librevenge-0.0 librevenge-stream-0.0, with_libcdr=yes, with_libcdr=no)
+
+         if test "x$with_libcdr" = "xyes"; then
+                 AC_DEFINE(WITH_LIBCDR,1,[Build in libcdr])
+
+=== modified file 'src/extension/internal/cdr-input.cpp'
+--- src/extension/internal/cdr-input.cpp        2013-10-27 16:33:32 +0000
++++ src/extension/internal/cdr-input.cpp        2014-06-15 09:24:33 +0000
+@@ -24,7 +24,7 @@
+ #include <cstring>
+
+ #include <libcdr/libcdr.h>
+-#include <libwpd-stream/libwpd-stream.h>
++#include <librevenge-stream/librevenge-stream.h>
+
+ #include <gtkmm/alignment.h>
+ #include <gtkmm/comboboxtext.h>
+@@ -60,7 +60,7 @@
+
+ class CdrImportDialog : public Gtk::Dialog {
+ public:
+- CdrImportDialog(const std::vector<WPXString> &vec);
++ CdrImportDialog(const std::vector<librevenge::RVNGString> &vec);
+ virtual ~CdrImportDialog();
+
+ bool showDialog();
+@@ -86,12 +86,12 @@
+ class Gtk::VBox * vbox2;
+ class Gtk::Widget * _previewArea;
+
+- const std::vector<WPXString> &_vec; // Document to be imported
++ const std::vector<librevenge::RVNGString> &_vec; // Document to be imported
+ unsigned _current_page; // Current selected page
+ int _preview_width, _preview_height; // Size of the preview area
+ };
+
+-CdrImportDialog::CdrImportDialog(const std::vector<WPXString> &vec)
++CdrImportDialog::CdrImportDialog(const std::vector<librevenge::RVNGString> &vec)
+ : _vec(vec), _current_page(1)
+ {
+ int num_pages = _vec.size();
+@@ -210,14 +210,16 @@
+
+ SPDocument *CdrInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri)
+ {
+- WPXFileStream input(uri);
++ librevenge::RVNGFileStream input(uri);
+
+ if (!libcdr::CDRDocument::isSupported(&input)) {
+ return NULL;
+ }
+
+- libcdr::CDRStringVector output;
+- if (!libcdr::CDRDocument::generateSVG(&input, output)) {
++ librevenge::RVNGStringVector output;
++ librevenge::RVNGSVGDrawingGenerator generator(output, "svg");
++
++ if (!libcdr::CDRDocument::parse(&input, &generator)) {
+ return NULL;
+ }
+
+@@ -225,9 +227,9 @@
+ return NULL;
+ }
+
+- std::vector<WPXString> tmpSVGOutput;
++ std::vector<librevenge::RVNGString> tmpSVGOutput;
+ for (unsigned i=0; i<output.size(); ++i) {
+- WPXString tmpString("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
++ librevenge::RVNGString tmpString("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
+ tmpString.append(output[i]);
+ tmpSVGOutput.push_back(tmpString);
+ }
+
+=== modified file 'src/extension/internal/vsd-input.cpp'
+--- src/extension/internal/vsd-input.cpp        2013-10-24 15:03:01 +0000
++++ src/extension/internal/vsd-input.cpp        2014-06-15 09:24:33 +0000
+@@ -24,7 +24,7 @@
+ #include <cstring>
+
+ #include <libvisio/libvisio.h>
+-#include <libwpd-stream/libwpd-stream.h>
++#include <librevenge-stream/librevenge-stream.h>
+
+ #include <gtkmm/alignment.h>
+ #include <gtkmm/comboboxtext.h>
+@@ -59,7 +59,7 @@
+
+ class VsdImportDialog : public Gtk::Dialog {
+ public:
+- VsdImportDialog(const std::vector<WPXString> &vec);
++ VsdImportDialog(const std::vector<librevenge::RVNGString> &vec);
+ virtual ~VsdImportDialog();
+
+ bool showDialog();
+@@ -85,12 +85,12 @@
+ class Gtk::VBox * vbox2;
+ class Gtk::Widget * _previewArea;
+
+- const std::vector<WPXString> &_vec; // Document to be imported
++ const std::vector<librevenge::RVNGString> &_vec; // Document to be imported
+ unsigned _current_page; // Current selected page
+ int _preview_width, _preview_height; // Size of the preview area
+ };
+
+-VsdImportDialog::VsdImportDialog(const std::vector<WPXString> &vec)
++VsdImportDialog::VsdImportDialog(const std::vector<librevenge::RVNGString> &vec)
+ : _vec(vec), _current_page(1)
+ {
+ int num_pages = _vec.size();
+@@ -209,14 +209,16 @@
+
+ SPDocument *VsdInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri)
+ {
+- WPXFileStream input(uri);
++ librevenge::RVNGFileStream input(uri);
+
+ if (!libvisio::VisioDocument::isSupported(&input)) {
+ return NULL;
+ }
+
+- libvisio::VSDStringVector output;
+- if (!libvisio::VisioDocument::generateSVG(&input, output)) {
++ librevenge::RVNGStringVector output;
++ librevenge::RVNGSVGDrawingGenerator generator(output, "svg");
++
++ if (!libvisio::VisioDocument::parse(&input, &generator)) {
+ return NULL;
+ }
+
+@@ -224,9 +226,9 @@
+ return NULL;
+ }
+
+- std::vector<WPXString> tmpSVGOutput;
++ std::vector<librevenge::RVNGString> tmpSVGOutput;
+ for (unsigned i=0; i<output.size(); ++i) {
+- WPXString tmpString("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
++ librevenge::RVNGString tmpString("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
+ tmpString.append(output[i]);
+ tmpSVGOutput.push_back(tmpString);
+ }
+
+=== modified file 'src/extension/internal/wpg-input.cpp'
+--- src/extension/internal/wpg-input.cpp        2014-03-27 01:33:44 +0000
++++ src/extension/internal/wpg-input.cpp        2014-06-15 09:24:33 +0000
+@@ -52,17 +52,8 @@
+ #include "util/units.h"
+ #include <cstring>
+
+-// Take a guess and fallback to 0.1.x if no configure has run
+-#if !defined(WITH_LIBWPG01) && !defined(WITH_LIBWPG02)
+-#define WITH_LIBWPG01 1
+-#endif
+-
+ #include "libwpg/libwpg.h"
+-#if WITH_LIBWPG01
+-#include "libwpg/WPGStreamImplementation.h"
+-#elif WITH_LIBWPG02
+-#include "libwpd-stream/libwpd-stream.h"
+-#endif
++#include "librevenge-stream/librevenge-stream.h"
+
+ using namespace libwpg;
+
+@@ -73,17 +64,9 @@
+
+ SPDocument *WpgInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri)
+ {
+-#if WITH_LIBWPG01
+- WPXInputStream* input = new libwpg::WPGFileStream(uri);
+-#elif WITH_LIBWPG02
+- WPXInputStream* input = new WPXFileStream(uri);
+-#endif
+- if (input->isOLEStream()) {
+-#if WITH_LIBWPG01
+- WPXInputStream* olestream = input->getDocumentOLEStream();
+-#elif WITH_LIBWPG02
+- WPXInputStream* olestream = input->getDocumentOLEStream("PerfectOffice_MAIN");
+-#endif
++ librevenge::RVNGInputStream* input = new librevenge::RVNGFileStream(uri);
++ if (input->isStructured()) {
++ librevenge::RVNGInputStream* olestream = input->getSubStreamByName("PerfectOffice_MAIN");
+ if (olestream) {
+ delete input;
+ input = olestream;
+@@ -98,15 +81,17 @@
+ return NULL;
+ }
+
+-#if WITH_LIBWPG01
+- libwpg::WPGString output;
+-#elif WITH_LIBWPG02
+- WPXString output;
+-#endif
+- if (!libwpg::WPGraphics::generateSVG(input, output)) {
++        librevenge::RVNGStringVector vec;
++        librevenge::RVNGSVGDrawingGenerator generator(vec, "");
++
++        if (!libwpg::WPGraphics::parse(input, &generator) || vec.empty() || vec[0].empty())
++         {
+ delete input;
+ return NULL;
+- }
++         }
++
++ librevenge::RVNGString output("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
++        output.append(vec[0]);
+
+ //printf("I've got a doc: \n%s", painter.document.c_str());
+
+
+=== modified file 'src/ui/dialog/symbols.cpp'
+--- src/ui/dialog/symbols.cpp        2014-06-13 16:06:01 +0000
++++ src/ui/dialog/symbols.cpp        2014-06-15 09:24:33 +0000
+@@ -63,7 +63,7 @@
+
+ #ifdef WITH_LIBVISIO
+ #include <libvisio/libvisio.h>
+-#include <libwpd-stream/libwpd-stream.h>
++#include <librevenge-stream/librevenge-stream.h>
+ #endif
+
+ #include "verbs.h"
+@@ -495,14 +495,16 @@
+ // Read Visio stencil files
+ SPDocument* read_vss( gchar* fullname, gchar* filename ) {
+
+- WPXFileStream input(fullname);
++ librevenge::RVNGFileStream input(fullname);
+
+ if (!libvisio::VisioDocument::isSupported(&input)) {
+ return NULL;
+ }
+
+- libvisio::VSDStringVector output;
+- if (!libvisio::VisioDocument::generateSVGStencils(&input, output)) {
++ librevenge::RVNGStringVector output;
++ librevenge::RVNGSVGDrawingGenerator generator(output, "svg");
++
++ if (!libvisio::VisioDocument::parseStencils(&input, &generator)) {
+ return NULL;
+ }
+
+
</ins></span></pre>
</div>
</div>
</body>
</html>