<!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>[114211] trunk/dports/graphics/inkscape</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/114211">114211</a></dd>
<dt>Author</dt> <dd>devans@macports.org</dd>
<dt>Date</dt> <dd>2013-12-02 10:59:19 -0800 (Mon, 02 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>inkscape: patch through <a href="https://trac.macports.org/changeset/9988">r9988</a>, includes upstream freetype fix, no change in installed files.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsinkscapePortfile">trunk/dports/graphics/inkscape/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsinkscapefilespatchr9972thrur9988diff">trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9988.diff</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsinkscapefilespatchfreetype251diff">trunk/dports/graphics/inkscape/files/patch-freetype-2.5.1.diff</a></li>
<li><a href="#trunkdportsgraphicsinkscapefilespatchr9972thrur9985diff">trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff</a></li>
<li><a href="#trunkdportsgraphicsinkscapefilespatchr9986thrur9987diff">trunk/dports/graphics/inkscape/files/patch-r9986-thru-r9987.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsinkscapePortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/inkscape/Portfile (114210 => 114211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/inkscape/Portfile        2013-12-02 17:55:09 UTC (rev 114210)
+++ trunk/dports/graphics/inkscape/Portfile        2013-12-02 18:59:19 UTC (rev 114211)
</span><span class="lines">@@ -48,9 +48,7 @@
</span><span class="cx">                 port:gtkspell2
</span><span class="cx"> 
</span><span class="cx"> patchfiles      patch-thru-r9971.diff \
</span><del>-                patch-r9972-thru-r9985.diff \
-                patch-r9986-thru-r9987.diff \
-                patch-freetype-2.5.1.diff \
</del><ins>+                patch-r9972-thru-r9988.diff \
</ins><span class="cx">                 patch-python-configure.ac.diff
</span><span class="cx"> 
</span><span class="cx"> variant python26 conflicts python27 description {Configure to use Python version 2.6} {
</span></span></pre></div>
<a id="trunkdportsgraphicsinkscapefilespatchfreetype251diff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/graphics/inkscape/files/patch-freetype-2.5.1.diff (114210 => 114211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/inkscape/files/patch-freetype-2.5.1.diff        2013-12-02 17:55:09 UTC (rev 114210)
+++ trunk/dports/graphics/inkscape/files/patch-freetype-2.5.1.diff        2013-12-02 18:59:19 UTC (rev 114211)
</span><span class="lines">@@ -1,15 +0,0 @@
</span><del>-Fix build with freetype 2.5.1.
-https://bugs.launchpad.net/inkscape/+bug/1255830
---- src/libnrtype/FontFactory.h.orig        2010-04-15 19:00:11 +0000
-+++ src/libnrtype/FontFactory.h        2013-11-28 05:54:34 +0000
-@@ -31,7 +31,8 @@
- #include &lt;pango/pangowin32.h&gt;
- #else
- #include &lt;pango/pangoft2.h&gt;
--#include &lt;freetype/freetype.h&gt;
-+#include &lt;ft2build.h&gt;
-+#include FT_FREETYPE_H
- #endif

- namespace Glib
-
</del></span></pre></div>
<a id="trunkdportsgraphicsinkscapefilespatchr9972thrur9985diff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff (114210 => 114211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff        2013-12-02 17:55:09 UTC (rev 114210)
+++ trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff        2013-12-02 18:59:19 UTC (rev 114211)
</span><span class="lines">@@ -1,1670 +0,0 @@
</span><del>-=== modified file 'configure.ac'
---- configure.ac        2013-09-22 00:34:02 +0000
-+++ configure.ac        2013-11-13 21:17:28 +0000
-@@ -168,11 +168,14 @@
- dnl Check for OpenMP 
- dnl Replace this with AC_OPENMP once Autoconf 2.62 is widespread
- dnl ******************************
--AX_OPENMP([openmp_ok=yes],[openmp_ok=no])
-+AX_OPENMP([AC_CHECK_HEADER([omp.h],
-+                           [openmp_ok=yes],
-+                           [openmp_ok=no])
-+])
-+
- if test &quot;x$openmp_ok&quot; = &quot;xyes&quot;; then
-         dnl We have it, now set up the flags
-         CXXFLAGS=&quot;$CXXFLAGS $OPENMP_CXXFLAGS&quot;
--        AC_CHECK_HEADER(omp.h)
-         AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
- fi

-
-=== modified file 'src/2geom/sbasis.h'
---- src/2geom/sbasis.h        2009-04-06 22:29:34 +0000
-+++ src/2geom/sbasis.h        2013-11-13 21:17:28 +0000
-@@ -75,10 +75,18 @@
-         return d[i];
-     }
-     Linear&amp; operator[](unsigned i) { return d.at(i); }
--    Linear const* begin() const { return (Linear const*)&amp;*d.begin();}
--    Linear const* end() const { return (Linear const*)&amp;*d.end();}
--    Linear* begin() { return (Linear*)&amp;*d.begin();}
--    Linear* end() { return (Linear*)&amp;*d.end();}
-+        
-+    //Linear const* begin() const { return (Linear const*)&amp;*d.begin();}
-+    //Linear const* end() const { return (Linear const*)&amp;*d.end();}
-+    //Linear* begin() { return (Linear*)&amp;*d.begin();}
-+    //Linear* end() { return (Linear*)&amp;*d.end();}
-+        
-+        std::vector&lt;Linear&gt;::const_iterator begin() const { return d.begin(); }
-+        std::vector&lt;Linear&gt;::const_iterator end() const { return d.end(); }
-+        
-+        std::vector&lt;Linear&gt;::iterator begin() { return d.begin(); }
-+        std::vector&lt;Linear&gt;::iterator end() { return d.end(); }
-+        
-     bool empty() const {return d.empty();}
-     Linear &amp;back() {return d.back();}
-     Linear const &amp;back() const {return d.back();}
-@@ -87,7 +95,11 @@
-     void resize(unsigned n, Linear const&amp; l) { d.resize(n, l);}
-     void reserve(unsigned n) { d.reserve(n);}
-     void clear() {d.clear();}
--    void insert(Linear* before, const Linear* src_begin, const Linear* src_end) { d.insert(std::vector&lt;Linear&gt;::iterator(before), src_begin, src_end);}
-+        
-+    void insert(std::vector&lt;Linear&gt;::iterator before, std::vector&lt;Linear&gt;::const_iterator src_begin, std::vector&lt;Linear&gt;::const_iterator src_end) {
-+                d.insert(before, src_begin, src_end);
-+        }
-+        
-     //void insert(Linear* aa, Linear* bb, Linear* cc} { d.insert(aa, bb, cc);}
-     Linear&amp; at(unsigned i) { return d.at(i);}
-     //void insert(Linear* before, int&amp; n, Linear const &amp;l) { d.insert(std::vector&lt;Linear&gt;::iterator(before), n, l);}
-@@ -283,7 +295,13 @@

- inline SBasis truncate(SBasis const &amp;a, unsigned terms) {
-     SBasis c;
--    c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
-+        
-+        std::vector&lt;Linear&gt;::const_iterator e = a.begin();
-+        std::advance(e, std::min(terms, (unsigned)a.size()));
-+        
-+    //c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
-+        c.insert(c.begin(), a.begin(), e);
-+        
-     return c;
- }

-
-=== modified file 'src/color-profile.cpp'
---- src/color-profile.cpp        2013-09-21 22:19:03 +0000
-+++ src/color-profile.cpp        2013-11-13 21:17:28 +0000
-@@ -639,9 +639,9 @@

-     cmsUInt8Number outofgamut = 0;
-     guchar check_color[4] = {
--        SP_RGBA32_R_U(val),
--        SP_RGBA32_G_U(val),
--        SP_RGBA32_B_U(val),
-+        static_cast&lt;guchar&gt;(SP_RGBA32_R_U(val)),
-+        static_cast&lt;guchar&gt;(SP_RGBA32_G_U(val)),
-+        static_cast&lt;guchar&gt;(SP_RGBA32_B_U(val)),
-         255};
-     cmsDoTransform(ColorProfile::getTransfGamutCheck(), &amp;check_color, &amp;outofgamut, 1);

-
-=== modified file 'src/dom/io/uristream.cpp'
---- src/dom/io/uristream.cpp        2009-02-26 21:28:12 +0000
-+++ src/dom/io/uristream.cpp        2013-11-13 21:17:28 +0000
-@@ -54,7 +54,7 @@
-  *
-  */
- UriInputStream::UriInputStream(const URI &amp;source)
--                    throw (StreamException): uri((URI &amp;)source)
-+    : uri((URI &amp;)source)
- {
-     init();
- }
-@@ -62,7 +62,7 @@
- /**
-  *
-  */
--void UriInputStream::init() throw (StreamException)
-+void UriInputStream::init()
- {
-     //get information from uri
-     scheme = uri.getScheme();
-@@ -116,7 +116,7 @@
- /**
-  *
-  */
--UriInputStream::~UriInputStream() throw(StreamException)
-+UriInputStream::~UriInputStream()
- {
-     close();
- }
-@@ -126,7 +126,7 @@
-  * this input stream without blocking by the next caller of a method for
-  * this input stream.
-  */
--int UriInputStream::available() throw(StreamException)
-+int UriInputStream::available()
- {
-     return 0;
- }
-@@ -136,7 +136,7 @@
-  *  Closes this input stream and releases any system resources
-  *  associated with the stream.
-  */
--void UriInputStream::close() throw(StreamException)
-+void UriInputStream::close()
- {
-     if (closed)
-         return;
-@@ -175,7 +175,7 @@
- /**
-  * Reads the next byte of data from the input stream.  -1 if EOF
-  */
--int UriInputStream::get() throw(StreamException)
-+int UriInputStream::get()
- {
-     int retVal = -1;
-     if (closed)
-@@ -232,7 +232,7 @@
- /**
-  *
-  */
--UriReader::UriReader(const URI &amp;uri) throw (StreamException)
-+UriReader::UriReader(const URI &amp;uri)
- {
-     inputStream = new UriInputStream(uri);
- }
-@@ -240,7 +240,7 @@
- /**
-  *
-  */
--UriReader::~UriReader() throw (StreamException)
-+UriReader::~UriReader()
- {
-     delete inputStream;
- }
-@@ -248,7 +248,7 @@
- /**
-  *
-  */
--int UriReader::available() throw(StreamException)
-+int UriReader::available()
- {
-     return inputStream-&gt;available();
- }
-@@ -256,7 +256,7 @@
- /**
-  *
-  */
--void UriReader::close() throw(StreamException)
-+void UriReader::close()
- {
-     inputStream-&gt;close();
- }
-@@ -264,7 +264,7 @@
- /**
-  *
-  */
--int UriReader::get() throw(StreamException)
-+int UriReader::get()
- {
-     int ch = (int)inputStream-&gt;get();
-     return ch;
-@@ -279,10 +279,10 @@
-  *
-  */
- UriOutputStream::UriOutputStream(const URI &amp;destination)
--                    throw (StreamException): closed(false),
--                                             ownsFile(true),
--                                             outf(NULL),
--                                             uri((URI &amp;)destination)
-+    : closed(false),
-+      ownsFile(true),
-+      outf(NULL),
-+      uri((URI &amp;)destination)
- {
-     init();
- }
-@@ -291,7 +291,7 @@
- /**
-  *
-  */
--void UriOutputStream::init() throw(StreamException)
-+void UriOutputStream::init()
- {
-     //get information from uri
-     scheme = uri.getScheme();
-@@ -328,7 +328,7 @@
- /**
-  *
-  */
--UriOutputStream::~UriOutputStream() throw(StreamException)
-+UriOutputStream::~UriOutputStream()
- {
-     close();
- }
-@@ -337,7 +337,7 @@
-  * Closes this output stream and releases any system resources
-  * associated with this stream.
-  */
--void UriOutputStream::close() throw(StreamException)
-+void UriOutputStream::close()
- {
-     if (closed)
-         return;
-@@ -372,7 +372,7 @@
-  *  Flushes this output stream and forces any buffered output
-  *  bytes to be written out.
-  */
--void UriOutputStream::flush() throw(StreamException)
-+void UriOutputStream::flush()
- {
-     if (closed)
-         return;
-@@ -401,7 +401,7 @@
- /**
-  * Writes the specified byte to this output stream.
-  */
--int UriOutputStream::put(XMLCh ch) throw(StreamException)
-+int UriOutputStream::put(XMLCh ch)
- {
-     if (closed)
-         return -1;
-@@ -437,7 +437,6 @@
-  *
-  */
- UriWriter::UriWriter(const URI &amp;uri)
--                    throw (StreamException)
- {
-     outputStream = new UriOutputStream(uri);
- }
-@@ -445,7 +444,7 @@
- /**
-  *
-  */
--UriWriter::~UriWriter() throw (StreamException)
-+UriWriter::~UriWriter()
- {
-     delete outputStream;
- }
-@@ -453,7 +452,7 @@
- /**
-  *
-  */
--void UriWriter::close() throw(StreamException)
-+void UriWriter::close()
- {
-     outputStream-&gt;close();
- }
-@@ -461,7 +460,7 @@
- /**
-  *
-  */
--void UriWriter::flush() throw(StreamException)
-+void UriWriter::flush()
- {
-     outputStream-&gt;flush();
- }
-@@ -469,7 +468,7 @@
- /**
-  *
-  */
--int UriWriter::put(XMLCh ch) throw(StreamException)
-+int UriWriter::put(XMLCh ch)
- {
-     int ich = (int)ch;
-     if (outputStream-&gt;put(ich) &lt; 0)
-
-=== modified file 'src/dom/io/uristream.h'
---- src/dom/io/uristream.h        2008-04-29 02:00:54 +0000
-+++ src/dom/io/uristream.h        2013-11-13 21:17:28 +0000
-@@ -65,19 +65,19 @@

- public:

--    UriInputStream(const URI &amp;source) throw(StreamException);
--
--    virtual ~UriInputStream() throw(StreamException);
--
--    virtual int available() throw(StreamException);
--
--    virtual void close() throw(StreamException);
--
--    virtual int get() throw(StreamException);
-+    UriInputStream(const URI &amp;source);
-+
-+    virtual ~UriInputStream();
-+
-+    virtual int available();
-+
-+    virtual void close();
-+
-+    virtual int get();

- private:

--    void init() throw(StreamException);//common code called by constructor
-+    void init() ;//common code called by constructor

-     bool closed;

-@@ -106,15 +106,15 @@

- public:

--    UriReader(const URI &amp;source) throw(StreamException);
--
--    virtual ~UriReader() throw(StreamException);
--
--    virtual int available() throw(StreamException);
--
--    virtual void close() throw(StreamException);
--
--    virtual int get() throw(StreamException);
-+    UriReader(const URI &amp;source);
-+
-+    virtual ~UriReader();
-+
-+    virtual int available();
-+
-+    virtual void close();
-+
-+    virtual int get();

- private:

-@@ -138,19 +138,19 @@

- public:

--    UriOutputStream(const URI &amp;destination) throw(StreamException);
--
--    virtual ~UriOutputStream() throw(StreamException);
--
--    virtual void close() throw(StreamException);
--
--    virtual void flush() throw(StreamException);
--
--    virtual int put(XMLCh ch) throw(StreamException);
-+    UriOutputStream(const URI &amp;destination);
-+
-+    virtual ~UriOutputStream();
-+
-+    virtual void close();
-+
-+    virtual void flush();
-+
-+    virtual int put(XMLCh ch);

- private:

--    void init() throw(StreamException); //common code called by constructor
-+    void init() ; //common code called by constructor

-     bool closed;
-     bool ownsFile;
-@@ -179,15 +179,15 @@

- public:

--    UriWriter(const URI &amp;source) throw(StreamException);
--
--    virtual ~UriWriter() throw(StreamException);
--
--    virtual void close() throw(StreamException);
--
--    virtual void flush() throw(StreamException);
--
--    virtual int put(XMLCh ch) throw(StreamException);
-+    UriWriter(const URI &amp;source) ;
-+
-+    virtual ~UriWriter() ;
-+
-+    virtual void close() ;
-+
-+    virtual void flush() ;
-+
-+    virtual int put(XMLCh ch) ;

- private:

-
-=== modified file 'src/dom/svgimpl.cpp'
---- src/dom/svgimpl.cpp        2008-06-11 21:23:49 +0000
-+++ src/dom/svgimpl.cpp        2013-11-13 21:17:28 +0000
-@@ -81,7 +81,7 @@
- typedef struct
- {
-     const char *name;
--    int         type;
-+    unsigned int type;
- } SVGTableEntry;


-@@ -266,9 +266,9 @@
-  * Return the string corresponding to a given SVG element type enum
-  * Return &quot;unknown&quot; if not found
-  */
--const char *svgInterfaceEnumToStr(int type)
-+const char *svgInterfaceEnumToStr(unsigned int type)
- {
--    if (type &lt; 1 || type &gt; (int)SVG_ZOOM_AND_PAN)
-+    if (type &lt; 1 || type &gt; SVG_ZOOM_AND_PAN)
-         return &quot;unknown&quot;;
-     SVGTableEntry *entry = interfaceTable;
-     for (int i = 0 ; i &lt; SVG_NR_INTERFACES ; i++)
-
-=== modified file 'src/io/inkjar.cpp'
---- src/io/inkjar.cpp        2011-07-20 20:17:25 +0000
-+++ src/io/inkjar.cpp        2013-11-13 21:17:28 +0000
-@@ -68,7 +68,8 @@
- {
-     _filename = g_strdup(new_filename);
-     _last_filename = NULL;
--    fd = -1;
-+    //fd = -1;
-+fd=NULL;
- }

- //fixme: the following should probably just return a const gchar* and not 
-@@ -102,9 +103,11 @@
-     return true;
- }

-+#include &lt;cstdio&gt;
-+
- bool JarFile::open()
- {
--    if ((fd = ::open(_filename, O_RDONLY)) &lt; 0) {
-+    if ((fd = fopen(_filename, O_RDONLY)) &lt; 0) {
-         fprintf(stderr, &quot;open failed.\n&quot;);
-         return false;
-     }
-@@ -116,7 +119,7 @@

- bool JarFile::close()
- {
--    if (fd &gt;= 0 &amp;&amp; !::close(fd)) {
-+    if (fd &gt;= 0 &amp;&amp; !fclose(fd)) {
-         inflateEnd(&amp;_zs);
-         return true;
-     }
-@@ -256,7 +259,7 @@
-     
-     if (method == 8 || flags &amp; 0x0008) {
-         unsigned int file_length = 0;//uncompressed file length
--        lseek(fd, eflen, SEEK_CUR);
-+        fseek(fd, eflen, SEEK_CUR);
-         guint8 *file_data = get_compressed_file(compressed_size, file_length, 
-                                                 crc, flags);
-         if (file_data == NULL) {
-@@ -274,7 +277,7 @@
-         }
-         g_byte_array_append(gba, file_data, compressed_size);
-     } else {
--        lseek(fd, compressed_size+eflen, SEEK_CUR);
-+        fseek(fd, compressed_size+eflen, SEEK_CUR);
-         g_byte_array_free(gba, FALSE);
-         return NULL;
-     }
-@@ -313,8 +316,8 @@
-         std::printf(&quot;%d bytes written\n&quot;, out_a);
- #endif
-     }
--    lseek(fd, eflen, SEEK_CUR);
-     g_free(bytes);
-+    fseek(fd, eflen, SEEK_CUR);

-     if (!check_crc(crc, crc2, flags)) {
-         bytes = gba-&gt;data;
-@@ -328,7 +331,8 @@
- int JarFile::read(guint8 *buf, int count)
- {
-     int nbytes;
--    if ((nbytes = ::read(fd, buf, count)) != count) {
-+    //if ((nbytes = ::read(fd, buf, count)) != count) {
-+if ((nbytes = fread(buf, 1, count, fd)) != count) {
-         fprintf(stderr, &quot;read error\n&quot;);
-         exit(1);
-         return 0;
-@@ -357,9 +361,12 @@
-                 
-         if (!_zs.avail_in) {
-         
--            if ((nbytes = ::read(fd, in_buffer, 
-+            /*if ((nbytes = ::read(fd, in_buffer, 
-                                  (leftover_in &lt; RDSZ ? leftover_in : RDSZ))) 
-                 &lt; 0) {
-+*/
-+if ((nbytes = fread(in_buffer, 1, (leftover_in &lt; RDSZ ? leftover_in : RDSZ), fd))
-+&lt; 0) {
-                 fprintf(stderr, &quot;jarfile read error&quot;);
-             }
-             _zs.avail_in = nbytes;
-@@ -537,7 +544,8 @@
-                 }
-             }
-         } else if (gba-&gt;len &gt; 0)
--            ::write(1, gba-&gt;data, gba-&gt;len);
-+            //::write(1, gba-&gt;data, gba-&gt;len);
-+fwrite(gba-&gt;data, 1, gba-len, stdout);
-         else
-             break;
-     }
-
-=== modified file 'src/io/inkjar.h'
---- src/io/inkjar.h        2011-12-08 22:05:10 +0000
-+++ src/io/inkjar.h        2013-11-13 21:17:28 +0000
-@@ -27,6 +27,7 @@
- #endif

- #include &lt;glib.h&gt;
-+#include &lt;stdio.h&gt;

- namespace Inkjar {

-@@ -91,7 +92,7 @@
- class JarFile {
- public:

--    JarFile() : fd(-1), _filename(NULL), _last_filename(NULL) {}
-+    JarFile() : fd(NULL), _filename(NULL), _last_filename(NULL) {}
-     virtual ~JarFile();
-     JarFile(gchar const *new_filename);
-     
-@@ -106,7 +107,8 @@

- private:

--    int fd;
-+//    int fd;
-+FILE* fd;
-     gchar *_filename;
-     z_stream _zs;
-     gchar *_last_filename;
-
-=== modified file 'src/io/uristream.cpp'
---- src/io/uristream.cpp        2009-08-02 15:04:57 +0000
-+++ src/io/uristream.cpp        2013-11-13 21:17:28 +0000
-@@ -104,7 +104,7 @@
-  *
-  */
- UriInputStream::UriInputStream(Inkscape::URI &amp;source)
--                    throw (StreamException): uri(source)
-+   : uri(source)
- {
-     //get information from uri
-     char const *schemestr = uri.getScheme();
-@@ -146,8 +146,8 @@
-  *
-  */
- UriInputStream::UriInputStream(FILE *source, Inkscape::URI &amp;uri)
--    throw (StreamException): inf(source),
--                             uri(uri)
-+    : inf(source),
-+      uri(uri)
- {
-     scheme = SCHEME_FILE;
-     if (!inf) {
-@@ -160,7 +160,7 @@
- /**
-  *
-  */
--UriInputStream::~UriInputStream() throw(StreamException)
-+UriInputStream::~UriInputStream()
- {
-     close();
- }
-@@ -170,7 +170,7 @@
-  * this input stream without blocking by the next caller of a method for
-  * this input stream.
-  */
--int UriInputStream::available() throw(StreamException)
-+int UriInputStream::available()
- {
-     return 0;
- }
-@@ -180,7 +180,7 @@
-  *  Closes this input stream and releases any system resources
-  *  associated with the stream.
-  */
--void UriInputStream::close() throw(StreamException)
-+void UriInputStream::close()
- {
-     if (closed)
-         return;
-@@ -207,7 +207,7 @@
- /**
-  * Reads the next byte of data from the input stream.  -1 if EOF
-  */
--int UriInputStream::get() throw(StreamException)
-+int UriInputStream::get()
- {
-     int retVal = -1;
-     if (!closed)
-@@ -249,7 +249,6 @@
-  *
-  */
- UriReader::UriReader(Inkscape::URI &amp;uri)
--                    throw (StreamException)
- {
-     inputStream = new UriInputStream(uri);
- }
-@@ -257,7 +256,7 @@
- /**
-  *
-  */
--UriReader::~UriReader() throw (StreamException)
-+UriReader::~UriReader()
- {
-     delete inputStream;
- }
-@@ -265,7 +264,7 @@
- /**
-  *
-  */
--int UriReader::available() throw(StreamException)
-+int UriReader::available()
- {
-     return inputStream-&gt;available();
- }
-@@ -273,7 +272,7 @@
- /**
-  *
-  */
--void UriReader::close() throw(StreamException)
-+void UriReader::close()
- {
-     inputStream-&gt;close();
- }
-@@ -281,7 +280,7 @@
- /**
-  *
-  */
--gunichar UriReader::get() throw(StreamException)
-+gunichar UriReader::get()
- {
-     gunichar ch = (gunichar)inputStream-&gt;get();
-     return ch;
-@@ -296,11 +295,11 @@
-  * Temporary kludge
-  */
- UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &amp;destination)
--                    throw (StreamException): closed(false),
--                                             ownsFile(false),
--                                             outf(fp),
--                                             uri(destination),
--                                             scheme(SCHEME_FILE)
-+    : closed(false),
-+      ownsFile(false),
-+      outf(fp),
-+      uri(destination),
-+      scheme(SCHEME_FILE)
- {
-     if (!outf) {
-         Glib::ustring err = &quot;UriOutputStream given null file &quot;;
-@@ -312,11 +311,11 @@
-  *
-  */
- UriOutputStream::UriOutputStream(Inkscape::URI &amp;destination)
--                    throw (StreamException): closed(false),
--                                             ownsFile(true),
--                                             outf(NULL),
--                                             uri(destination),
--                                             scheme(SCHEME_FILE)
-+    : closed(false),
-+      ownsFile(true),
-+      outf(NULL),
-+      uri(destination),
-+      scheme(SCHEME_FILE)
- {
-     //get information from uri
-     char const *schemestr = uri.getScheme();
-@@ -353,7 +352,7 @@
- /**
-  *
-  */
--UriOutputStream::~UriOutputStream() throw(StreamException)
-+UriOutputStream::~UriOutputStream()
- {
-     close();
- }
-@@ -362,7 +361,7 @@
-  * Closes this output stream and releases any system resources
-  * associated with this stream.
-  */
--void UriOutputStream::close() throw(StreamException)
-+void UriOutputStream::close()
- {
-     if (closed)
-         return;
-@@ -391,7 +390,7 @@
-  *  Flushes this output stream and forces any buffered output
-  *  bytes to be written out.
-  */
--void UriOutputStream::flush() throw(StreamException)
-+void UriOutputStream::flush()
- {
-     if (closed)
-         return;
-@@ -415,7 +414,7 @@
- /**
-  * Writes the specified byte to this output stream.
-  */
--void UriOutputStream::put(int ch) throw(StreamException)
-+void UriOutputStream::put(int ch)
- {
-     if (closed)
-         return;
-@@ -453,7 +452,6 @@
-  *
-  */
- UriWriter::UriWriter(Inkscape::URI &amp;uri)
--                    throw (StreamException)
- {
-     outputStream = new UriOutputStream(uri);
- }
-@@ -461,7 +459,7 @@
- /**
-  *
-  */
--UriWriter::~UriWriter() throw (StreamException)
-+UriWriter::~UriWriter()
- {
-     delete outputStream;
- }
-@@ -469,7 +467,7 @@
- /**
-  *
-  */
--void UriWriter::close() throw(StreamException)
-+void UriWriter::close()
- {
-     outputStream-&gt;close();
- }
-@@ -477,7 +475,7 @@
- /**
-  *
-  */
--void UriWriter::flush() throw(StreamException)
-+void UriWriter::flush()
- {
-     outputStream-&gt;flush();
- }
-@@ -485,7 +483,7 @@
- /**
-  *
-  */
--void UriWriter::put(gunichar ch) throw(StreamException)
-+void UriWriter::put(gunichar ch)
- {
-     int ich = (int)ch;
-     outputStream-&gt;put(ich);
-
-=== modified file 'src/io/uristream.h'
---- src/io/uristream.h        2006-01-16 02:36:01 +0000
-+++ src/io/uristream.h        2013-11-13 21:17:28 +0000
-@@ -35,17 +35,17 @@
- {

- public:
--    UriInputStream(FILE *source, Inkscape::URI &amp;uri) throw(StreamException);
--
--    UriInputStream(Inkscape::URI &amp;source) throw(StreamException);
--
--    virtual ~UriInputStream() throw(StreamException);
--
--    virtual int available() throw(StreamException);
--
--    virtual void close() throw(StreamException);
--
--    virtual int get() throw(StreamException);
-+    UriInputStream(FILE *source, Inkscape::URI &amp;uri);
-+
-+    UriInputStream(Inkscape::URI &amp;source);
-+
-+    virtual ~UriInputStream();
-+
-+    virtual int available();
-+
-+    virtual void close();
-+
-+    virtual int get();

- private:

-@@ -74,15 +74,15 @@

- public:

--    UriReader(Inkscape::URI &amp;source) throw(StreamException);
--
--    virtual ~UriReader() throw(StreamException);
--
--    virtual int available() throw(StreamException);
--
--    virtual void close() throw(StreamException);
--
--    virtual gunichar get() throw(StreamException);
-+    UriReader(Inkscape::URI &amp;source);
-+
-+    virtual ~UriReader();
-+
-+    virtual int available();
-+
-+    virtual void close();
-+
-+    virtual gunichar get();

- private:

-@@ -106,17 +106,17 @@

- public:

--    UriOutputStream(FILE *fp, Inkscape::URI &amp;destination) throw(StreamException);
--
--    UriOutputStream(Inkscape::URI &amp;destination) throw(StreamException);
--
--    virtual ~UriOutputStream() throw(StreamException);
--
--    virtual void close() throw(StreamException);
--
--    virtual void flush() throw(StreamException);
--
--    virtual void put(int ch) throw(StreamException);
-+    UriOutputStream(FILE *fp, Inkscape::URI &amp;destination);
-+
-+    UriOutputStream(Inkscape::URI &amp;destination);
-+
-+    virtual ~UriOutputStream();
-+
-+    virtual void close();
-+
-+    virtual void flush();
-+
-+    virtual void put(int ch);

- private:

-@@ -145,15 +145,15 @@

- public:

--    UriWriter(Inkscape::URI &amp;source) throw(StreamException);
--
--    virtual ~UriWriter() throw(StreamException);
--
--    virtual void close() throw(StreamException);
--
--    virtual void flush() throw(StreamException);
--
--    virtual void put(gunichar ch) throw(StreamException);
-+    UriWriter(Inkscape::URI &amp;source);
-+
-+    virtual ~UriWriter();
-+
-+    virtual void close();
-+
-+    virtual void flush();
-+
-+    virtual void put(gunichar ch);

- private:

-
-=== modified file 'src/io/xsltstream.cpp'
---- src/io/xsltstream.cpp        2008-05-04 16:09:41 +0000
-+++ src/io/xsltstream.cpp        2013-11-13 21:17:28 +0000
-@@ -30,7 +30,6 @@
-  *
-  */
- XsltStyleSheet::XsltStyleSheet(InputStream &amp;xsltSource)
--               throw (StreamException)
-                    : stylesheet(NULL)
- {
-     if (!read(xsltSource)) {
-@@ -86,7 +85,6 @@
-  *
-  */ 
- XsltInputStream::XsltInputStream(InputStream &amp;xmlSource, XsltStyleSheet &amp;sheet)
--                        throw (StreamException)
-                         : BasicInputStream(xmlSource), stylesheet(sheet)
- {
-     //Load the data
-@@ -110,7 +108,7 @@
- /**
-  *
-  */ 
--XsltInputStream::~XsltInputStream() throw (StreamException)
-+XsltInputStream::~XsltInputStream()
- {
-     xmlFree(outbuf);
- }
-@@ -120,7 +118,7 @@
-  * this input stream without blocking by the next caller of a method for
-  * this input stream.
-  */ 
--int XsltInputStream::available() throw (StreamException)
-+int XsltInputStream::available()
- {
-     return outsize - outpos;
- }
-@@ -130,7 +128,7 @@
-  *  Closes this input stream and releases any system resources
-  *  associated with the stream.
-  */ 
--void XsltInputStream::close() throw (StreamException)
-+void XsltInputStream::close()
- {
-     closed = true;
- }
-@@ -138,7 +136,7 @@
- /**
-  * Reads the next byte of data from the input stream.  -1 if EOF
-  */ 
--int XsltInputStream::get() throw (StreamException)
-+int XsltInputStream::get()
- {
-     if (closed)
-         return -1;
-@@ -161,7 +159,6 @@
-  *
-  */ 
- XsltOutputStream::XsltOutputStream(OutputStream &amp;dest, XsltStyleSheet &amp;sheet)
--                     throw (StreamException)
-                      : BasicOutputStream(dest), stylesheet(sheet)
- {
-     flushed = false;
-@@ -170,7 +167,7 @@
- /**
-  *
-  */ 
--XsltOutputStream::~XsltOutputStream() throw (StreamException)
-+XsltOutputStream::~XsltOutputStream()
- {
-     //do not automatically close
- }
-@@ -179,7 +176,7 @@
-  * Closes this output stream and releases any system resources
-  * associated with this stream.
-  */ 
--void XsltOutputStream::close() throw (StreamException)
-+void XsltOutputStream::close()
- {
-     flush();
-     destination.close();
-@@ -189,7 +186,7 @@
-  *  Flushes this output stream and forces any buffered output
-  *  bytes to be written out.
-  */ 
--void XsltOutputStream::flush() throw (StreamException)
-+void XsltOutputStream::flush()
- {
-     if (flushed)
-         {
-@@ -230,7 +227,7 @@
- /**
-  * Writes the specified byte to this output stream.
-  */ 
--void XsltOutputStream::put(int ch) throw (StreamException)
-+void XsltOutputStream::put(int ch)
- {
-     gunichar uch = (gunichar) ch;
-     outbuf.push_back(uch);
-
-=== modified file 'src/io/xsltstream.h'
---- src/io/xsltstream.h        2008-05-04 16:09:41 +0000
-+++ src/io/xsltstream.h        2013-11-13 21:17:28 +0000
-@@ -38,7 +38,7 @@
-     /**
-      * Constructor with loading
-      */
--    XsltStyleSheet(InputStream &amp;source)  throw (StreamException);
-+    XsltStyleSheet(InputStream &amp;source) ;

-     /**
-      * Simple constructor, no loading
-@@ -73,16 +73,15 @@

- public:

--    XsltInputStream(InputStream &amp;xmlSource, XsltStyleSheet &amp;stylesheet)
--                        throw (StreamException);
--    
--    virtual ~XsltInputStream() throw (StreamException);
--    
--    virtual int available() throw (StreamException);
--    
--    virtual void close() throw (StreamException);
--    
--    virtual int get() throw (StreamException);
-+    XsltInputStream(InputStream &amp;xmlSource, XsltStyleSheet &amp;stylesheet);
-+    
-+    virtual ~XsltInputStream();
-+    
-+    virtual int available();
-+    
-+    virtual void close();
-+    
-+    virtual int get();
-     

- private:
-@@ -110,16 +109,15 @@

- public:

--    XsltOutputStream(OutputStream &amp;destination, XsltStyleSheet &amp;stylesheet)
--                             throw (StreamException);
--    
--    virtual ~XsltOutputStream() throw (StreamException);
--    
--    virtual void close() throw (StreamException);
--    
--    virtual void flush() throw (StreamException);
--    
--    virtual void put(int ch) throw (StreamException);
-+    XsltOutputStream(OutputStream &amp;destination, XsltStyleSheet &amp;stylesheet);
-+    
-+    virtual ~XsltOutputStream();
-+    
-+    virtual void close();
-+    
-+    virtual void flush();
-+    
-+    virtual void put(int ch);

- private:

-
-=== modified file 'src/libgdl/gdl-dock-object.h'
---- src/libgdl/gdl-dock-object.h        2011-06-04 06:04:06 +0000
-+++ src/libgdl/gdl-dock-object.h        2013-11-13 21:17:28 +0000
-@@ -215,7 +215,7 @@
-     G_STMT_START {                            \
-     g_log (G_LOG_DOMAIN,                      \
-            G_LOG_LEVEL_DEBUG,                 \
--           &quot;%s:%d (%s) %s [%p %d%s:%d]: &quot;format, \
-+           &quot;%s:%d (%s) %s [%p %d%s:%d]: &quot; format, \
-            __FILE__,                          \
-            __LINE__,                          \
-            __PRETTY_FUNCTION__,               \
-
-=== modified file 'src/libgdl/gdl-tools.h'
---- src/libgdl/gdl-tools.h        2011-06-04 06:04:06 +0000
-+++ src/libgdl/gdl-tools.h        2013-11-13 21:17:28 +0000
-@@ -48,7 +48,7 @@
- #define GDL_TRACE_EXTRA(format, args...) G_STMT_START {     \
-     g_log (G_LOG_DOMAIN,                      \
-            G_LOG_LEVEL_DEBUG,                 \
--           &quot;file %s: line %d (%s): &quot;format,   \
-+           &quot;file %s: line %d (%s): &quot; format,   \
-            __FILE__,                          \
-            __LINE__,                          \
-            __PRETTY_FUNCTION__,               \
-
-=== modified file 'src/libnrtype/Layout-TNG-OutIter.cpp'
---- src/libnrtype/Layout-TNG-OutIter.cpp        2009-12-29 19:46:02 +0000
-+++ src/libnrtype/Layout-TNG-OutIter.cpp        2013-11-13 21:17:28 +0000
-@@ -197,7 +197,23 @@

- Layout::iterator Layout::sourceToIterator(void *source_cookie) const
- {
--    return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
-+    //return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
-+        
-+        // simply copied from above... what is an iterator to NULL?
-+        unsigned source_index;
-+    if (_characters.empty()) return end();
-+    for (source_index = 0 ; source_index &lt; _input_stream.size() ; source_index++)
-+        if (_input_stream[source_index]-&gt;source_cookie == source_cookie) break;
-+    if (source_index == _input_stream.size()) return end();
-+        
-+    unsigned char_index = _sourceToCharacter(source_index);
-+    
-+    if (_input_stream[source_index]-&gt;Type() != TEXT_SOURCE)
-+        return iterator(this, char_index);
-+        
-+    InputStreamTextSource const *text_source = static_cast&lt;InputStreamTextSource const *&gt;(_input_stream[source_index]);
-+    //if (text_iterator &lt;= text_source-&gt;text_begin) return iterator(this, char_index);
-+        return iterator(this, char_index);
- }

- Geom::OptRect Layout::glyphBoundingBox(iterator const &amp;it, double *rotation) const
-@@ -506,18 +522,23 @@
-     *source_cookie = stream_item-&gt;source_cookie;
-     if (text_iterator &amp;&amp; stream_item-&gt;Type() == TEXT_SOURCE) {
-         InputStreamTextSource const *text_source = static_cast&lt;InputStreamTextSource const *&gt;(stream_item);
--        Glib::ustring::const_iterator text_iter_const = text_source-&gt;text_begin;
-+        //Glib::ustring::const_iterator text_iter_const = text_source-&gt;text_begin;
-+        Glib::ustring::iterator text_iter = const_cast&lt;Glib::ustring*&gt;(text_source-&gt;text)-&gt;begin();
-         unsigned char_index = it._char_index;
-         unsigned original_input_source_index = _spans[_characters[char_index].in_span].in_input_stream_item;
-         // confusing algorithm because the iterator goes forwards while the index goes backwards.
-         // It's just that it's faster doing it that way
-         while (char_index &amp;&amp; _spans[_characters[char_index - 1].in_span].in_input_stream_item == original_input_source_index) {
--            ++text_iter_const;
-+            //++text_iter_const;
-+            ++text_iter;
-             char_index--;
-         }
--        text_source-&gt;text-&gt;begin().base() + (text_iter_const.base() - text_source-&gt;text-&gt;begin().base());
--        *text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast&lt;char*&gt;(&amp;*text_source-&gt;text-&gt;begin().base() + (text_iter_const.base() - text_source-&gt;text-&gt;begin().base()))));
-+        //text_source-&gt;text-&gt;begin().base() + (text_iter_const.base() - text_source-&gt;text-&gt;begin().base());
-+        
-+                // FIXME C++11
-+                //*text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast&lt;char*&gt;(&amp;*text_source-&gt;text-&gt;begin().base() + (text_iter_const.base() - text_source-&gt;text-&gt;begin().base()))));
-              // the caller owns the string, so they're going to want a non-const iterator
-+        *text_iterator = text_iter;
-     }
- }

-
-=== modified file 'src/libvpsc/Makefile_insert'
---- src/libvpsc/Makefile_insert        2007-03-22 00:37:48 +0000
-+++ src/libvpsc/Makefile_insert        2013-11-13 21:17:28 +0000
-@@ -11,7 +11,6 @@
-         libvpsc/pairingheap/PairingHeap.cpp\
-         libvpsc/remove_rectangle_overlap.cpp\
-         libvpsc/solve_VPSC.cpp\
--        libvpsc/csolve_VPSC.cpp\
-         libvpsc/variable.cpp\
-         libvpsc/block.h\
-         libvpsc/blocks.h\
-@@ -21,5 +20,4 @@
-         libvpsc/pairingheap/dsexceptions.h\
-         libvpsc/remove_rectangle_overlap.h\
-         libvpsc/solve_VPSC.h\
--        libvpsc/csolve_VPSC.h\
-         libvpsc/variable.h
-
-=== removed file 'src/libvpsc/csolve_VPSC.cpp'
---- src/libvpsc/csolve_VPSC.cpp        2008-01-31 19:06:59 +0000
-+++ src/libvpsc/csolve_VPSC.cpp        1970-01-01 00:00:00 +0000
-@@ -1,126 +0,0 @@
--/**
-- * \brief Bridge for C programs to access solve_VPSC (which is in C++)
-- *
-- * Authors:
-- *   Tim Dwyer &lt;tgdwyer@gmail.com&gt;
-- *
-- * Copyright (C) 2005 Authors
-- *
-- * Released under GNU LGPL.  Read the file 'COPYING' for more information.
-- */
--#include &lt;iostream&gt;
--#include &lt;cassert&gt;
--#include &lt;cstdlib&gt;
--#include &quot;variable.h&quot;
--#include &quot;constraint.h&quot;
--#include &quot;generate-constraints.h&quot;
--#include &quot;solve_VPSC.h&quot;
--#include &quot;csolve_VPSC.h&quot;
--using namespace vpsc;
--extern &quot;C&quot; {
--Variable* newVariable(int id, double desiredPos, double weight) {
--        return new Variable(id,desiredPos,weight);
--}
--Constraint* newConstraint(Variable* left, Variable* right, double gap) {
--        return new Constraint(left,right,gap);
--}
--Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]) {
--        return new Solver(n,vs,m,cs);
--}
--Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]) {
--        return (Solver*)new vpsc::IncSolver(n,vs,m,cs);
--}
--
--int genXConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs,int transitiveClosure) {
--        Rectangle* rs[n];
--        for(int i=0;i&lt;n;i++) {
--                rs[i]=new Rectangle(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
--        }
--        int m = generateXConstraints(n,rs,vs,*cs,transitiveClosure);
--        for(int i=0;i&lt;n;i++) {
--                delete rs[i];
--        }
--        return m;
--}
--int genYConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs) {
--        Rectangle* rs[n];
--        for(int i=0;i&lt;n;i++) {
--                rs[i]=new Rectangle(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
--        }
--        int m = generateYConstraints(n,rs,vs,*cs);
--        for(int i=0;i&lt;n;i++) {
--                delete rs[i];
--        }
--        return m;
--}
--
--Constraint** newConstraints(int m) {
--        return new Constraint*[m];
--}
--void deleteConstraints(int m, Constraint **cs) {
--        for(int i=0;i&lt;m;i++) {
--                delete cs[i];
--        }
--        delete [] cs;
--}
--void deleteConstraint(Constraint* c) {
--        delete c;
--}
--void deleteVariable(Variable* v) {
--        delete v;
--}
--void satisfyVPSC(Solver* vpsc) {
--        try {
--                vpsc-&gt;satisfy();
--        } catch(const char *e) {
--                std::cerr &lt;&lt; e &lt;&lt; std::endl;
--                exit(1);
--        }
--}
--int getSplitCnt(IncSolver *vpsc) {
--        return vpsc-&gt;splitCnt;
--}
--void deleteVPSC(Solver *vpsc) {
--        assert(vpsc!=NULL);
--        delete vpsc;
--}
--void solveVPSC(Solver* vpsc) {
--        vpsc-&gt;solve();
--}
--void splitIncVPSC(IncSolver* vpsc) {
--        vpsc-&gt;splitBlocks();
--}
--void setVariableDesiredPos(Variable *v, double desiredPos) {
--        v-&gt;desiredPosition = desiredPos;
--}
--double getVariablePos(Variable *v) {
--        return v-&gt;position();
--}
--void remapInConstraints(Variable *u, Variable *v, double dgap) {
--        for(Constraints::iterator i=u-&gt;in.begin();i!=u-&gt;in.end();i++) {
--                Constraint* c=*i;        
--                c-&gt;right=v;
--                c-&gt;gap+=dgap;
--                v-&gt;in.push_back(c);
--        }
--        u-&gt;in.clear();
--}
--void remapOutConstraints(Variable *u, Variable *v, double dgap) {
--        for(Constraints::iterator i=u-&gt;out.begin();i!=u-&gt;out.end();i++) {
--                Constraint* c=*i;        
--                c-&gt;left=v;
--                c-&gt;gap+=dgap;
--                v-&gt;out.push_back(c);
--        }
--        u-&gt;out.clear();
--}
--int getLeftVarID(Constraint *c) {
--        return c-&gt;left-&gt;id;
--}
--int getRightVarID(Constraint *c){
--        return c-&gt;right-&gt;id;
--}
--double getSeparation(Constraint *c){
--        return c-&gt;gap;
--}
--}
-
-=== removed file 'src/libvpsc/csolve_VPSC.h'
---- src/libvpsc/csolve_VPSC.h        2006-07-14 04:09:40 +0000
-+++ src/libvpsc/csolve_VPSC.h        1970-01-01 00:00:00 +0000
-@@ -1,60 +0,0 @@
--/**
-- * \brief Bridge for C programs to access solve_VPSC (which is in C++)
-- *
-- * Authors:
-- *   Tim Dwyer &lt;tgdwyer@gmail.com&gt;
-- *
-- * Copyright (C) 2005 Authors
-- *
-- * Released under GNU LGPL.  Read the file 'COPYING' for more information.
-- */
--#ifndef _CSOLVE_VPSC_H_
--#define _CSOLVE_VPSC_H_
--#ifdef __cplusplus
--class vpsc::Variable;
--class vpsc::Constraint;
--class vpsc::Solver;
--class vpsc::IncSolver;
--using namespace vpsc;
--extern &quot;C&quot; {
--#else
--typedef struct Variable Variable;
--typedef struct Constraint Constraint;
--typedef struct Solver Solver;
--typedef struct IncSolver IncSolver;
--#endif
--Variable* newVariable(int id, double desiredPos, double weight);
--void setVariableDesiredPos(Variable *, double desiredPos);
--double getVariablePos(Variable*);
--
--Constraint* newConstraint(Variable* left, Variable* right, double gap);
--
--Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]);
--void deleteSolver(Solver*);
--void deleteConstraint(Constraint*);
--void deleteVariable(Variable*);
--Constraint** newConstraints(int m);
--void deleteConstraints(int m,Constraint**);
--void remapInConstraints(Variable *u, Variable *v, double dgap);
--void remapOutConstraints(Variable *u, Variable *v, double dgap);
--int getLeftVarID(Constraint *c);
--int getRightVarID(Constraint *c);
--double getSeparation(Constraint *c);
--
--#ifndef HAVE_POINTF_S
--typedef struct pointf_s { double x, y; } pointf;
--typedef struct { pointf LL, UR; } boxf;
--#endif
--int genXConstraints(int n, boxf[], Variable** vs, Constraint*** cs,
--                int transitiveClosure);
--int genYConstraints(int n, boxf[], Variable** vs, Constraint*** cs);
--
--void satisfyVPSC(Solver*);
--void solveVPSC(Solver*);
--Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]);
--void splitIncSolver(IncSolver*);
--int getSplitCnt(IncSolver *vpsc);
--#ifdef __cplusplus
--}
--#endif
--#endif /* _CSOLVE_VPSC_H_ */
-
-=== modified file 'src/remove-last.h'
---- src/remove-last.h        2007-03-18 18:39:34 +0000
-+++ src/remove-last.h        2013-11-13 21:17:28 +0000
-@@ -12,8 +12,9 @@

-     typename vector&lt;T&gt;::reverse_iterator i(find(seq.rbegin(), seq.rend(), elem));
-     g_assert( i != seq.rend() );
--    typename vector&lt;T&gt;::iterator ii(&amp;*i);
--    seq.erase(ii);
-+    //typename vector&lt;T&gt;::iterator ii(&amp;*i);
-+    //seq.erase(ii);
-+        seq.erase(i.base());
- }


-
-=== modified file 'src/sp-conn-end.cpp'
---- src/sp-conn-end.cpp        2010-02-21 10:40:13 +0000
-+++ src/sp-conn-end.cpp        2013-11-13 21:17:28 +0000
-@@ -152,7 +152,7 @@
-     // Set sensible values incase there the connector ends are not
-     // attached to any shapes.
-     Geom::PathVector conn_pv = path-&gt;curve-&gt;get_pathvector();
--    double endPos[2] = { 0, conn_pv[0].size() };
-+    double endPos[2] = { 0, static_cast&lt;double&gt;(conn_pv[0].size()) };

-     SPConnEnd** _connEnd = path-&gt;connEndPair.getConnEnds();
-     for (unsigned h = 0; h &lt; 2; ++h) {
-
-=== modified file 'src/sp-guide.cpp'
---- src/sp-guide.cpp        2011-08-21 10:27:43 +0000
-+++ src/sp-guide.cpp        2013-11-13 21:17:28 +0000
-@@ -281,10 +281,10 @@
-     Geom::Point B(C[Geom::X], 0);
-     Geom::Point D(0, C[Geom::Y]);

--    pts.push_back(std::make_pair&lt;Geom::Point, Geom::Point&gt;(A, B));
--    pts.push_back(std::make_pair&lt;Geom::Point, Geom::Point&gt;(B, C));
--    pts.push_back(std::make_pair&lt;Geom::Point, Geom::Point&gt;(C, D));
--    pts.push_back(std::make_pair&lt;Geom::Point, Geom::Point&gt;(D, A));
-+    pts.push_back(std::make_pair(A, B));
-+    pts.push_back(std::make_pair(B, C));
-+    pts.push_back(std::make_pair(C, D));
-+    pts.push_back(std::make_pair(D, A));

-     sp_guide_pt_pairs_to_guides(dt, pts);

-
-=== modified file 'src/sp-item-rm-unsatisfied-cns.cpp'
---- src/sp-item-rm-unsatisfied-cns.cpp        2010-01-09 21:14:38 +0000
-+++ src/sp-item-rm-unsatisfied-cns.cpp        2013-11-13 21:17:28 +0000
-@@ -24,8 +24,8 @@
-         if (!approx_equal( sp_guide_distance_from_pt(cn.g, snappoints[snappoint_ix].getPoint()), 0) ) {
-             remove_last(cn.g-&gt;attached_items, SPGuideAttachment(&amp;item, cn.snappoint_ix));
-             g_assert( i &lt; item.constraints.size() );
--            vector&lt;SPGuideConstraint&gt;::iterator const ei(&amp;item.constraints[i]);
--            item.constraints.erase(ei);
-+            // vector&lt;SPGuideConstraint&gt;::iterator const ei(&amp;item.constraints[i]);
-+            // item.constraints.erase(ei);
-         }
-     }
- }
-
-=== modified file 'src/trace/siox.cpp'
---- src/trace/siox.cpp        2009-01-23 21:55:34 +0000
-+++ src/trace/siox.cpp        2013-11-13 21:17:28 +0000
-@@ -21,6 +21,7 @@
- #include &lt;stdarg.h&gt;
- #include &lt;map&gt;
- #include &lt;algorithm&gt;
-+#include &lt;cstdlib&gt;


- namespace org
-
-=== modified file 'src/ui/dialog/filedialogimpl-win32.cpp'
---- src/ui/dialog/filedialogimpl-win32.cpp        2012-04-04 19:54:14 +0000
-+++ src/ui/dialog/filedialogimpl-win32.cpp        2013-11-13 21:17:28 +0000
-@@ -16,6 +16,7 @@
- #endif

- //General includes
-+#include &lt;cmath&gt;
- #include &lt;list&gt;
- #include &lt;unistd.h&gt;
- #include &lt;sys/stat.h&gt;
-@@ -931,8 +932,9 @@
-     const double scaledSvgHeight = scaleFactor * svgHeight;

-     Geom::Rect area(Geom::Point(0, 0), Geom::Point(scaledSvgWidth, scaledSvgHeight));
--    NRRectL areaL = {0, 0, scaledSvgWidth, scaledSvgHeight};
--    NRRectL bbox = {0, 0, scaledSvgWidth, scaledSvgHeight};
-+    // assume that scaledSvgWidth and scaledSvgHeight are not bigger than largest int
-+    NRRectL areaL = {0, 0, static_cast&lt;int&gt;(trunc(scaledSvgWidth)), static_cast&lt;int&gt;(trunc(scaledSvgHeight))};
-+    NRRectL bbox =  {0, 0, static_cast&lt;int&gt;(trunc(scaledSvgWidth)), static_cast&lt;int&gt;(trunc(scaledSvgHeight))};

-     // write object bbox to area
-     Geom::OptRect maybeArea(area);
-
-=== modified file 'src/ui/tool/node.h'
---- src/ui/tool/node.h        2012-01-23 22:51:19 +0000
-+++ src/ui/tool/node.h        2013-11-13 21:17:28 +0000
-@@ -16,7 +16,13 @@
- #include &lt;iosfwd&gt;
- #include &lt;stdexcept&gt;
- #include &lt;cstddef&gt;
-+
-+#if __cplusplus &gt;= 201103L
-+#include &lt;functional&gt;
-+#else
- #include &lt;tr1/functional&gt;
-+#endif
-+
- #include &lt;boost/utility.hpp&gt;
- #include &lt;boost/shared_ptr.hpp&gt;
- #include &lt;boost/optional.hpp&gt;
-@@ -32,11 +38,13 @@
- }
- }

-+#if __cplusplus &lt; 201103L
- namespace std {
- namespace tr1 {
- template &lt;typename N&gt; struct hash&lt; Inkscape::UI::NodeIterator&lt;N&gt; &gt;;
- }
- }
-+#endif

- namespace Inkscape {
- namespace UI {
-
-=== modified file 'src/widgets/eek-preview.cpp'
---- src/widgets/eek-preview.cpp        2009-03-23 03:16:48 +0000
-+++ src/widgets/eek-preview.cpp        2013-11-13 21:17:28 +0000
-@@ -235,7 +235,7 @@

-         GdkGC *gc = gdk_gc_new( widget-&gt;window );
-         EekPreview* preview = EEK_PREVIEW(widget);
--        GdkColor fg = {0, preview-&gt;_r, preview-&gt;_g, preview-&gt;_b};
-+        GdkColor fg = {0, static_cast&lt;guint16&gt;(preview-&gt;_r), static_cast&lt;guint16&gt;(preview-&gt;_g), static_cast&lt;guint16&gt;(preview-&gt;_b)};

-         gdk_colormap_alloc_color( gdk_colormap_get_system(), &amp;fg, FALSE, TRUE );

-
-=== modified file 'src/widgets/sp-color-icc-selector.cpp'
---- src/widgets/sp-color-icc-selector.cpp        2012-02-15 06:02:14 +0000
-+++ src/widgets/sp-color-icc-selector.cpp        2013-11-13 21:17:28 +0000
-@@ -507,9 +507,9 @@
-                 if ( trans ) {
-                     guint32 val = _color.toRGBA32(0);
-                     guchar pre[4] = {
--                        SP_RGBA32_R_U(val),
--                        SP_RGBA32_G_U(val),
--                        SP_RGBA32_B_U(val),
-+                        static_cast&lt;guchar&gt;(SP_RGBA32_R_U(val)),
-+                        static_cast&lt;guchar&gt;(SP_RGBA32_G_U(val)),
-+                        static_cast&lt;guchar&gt;(SP_RGBA32_B_U(val)),
-                         255};
- #ifdef DEBUG_LCMS
-                     g_message(&quot;Shoving in [%02x] [%02x] [%02x]&quot;, pre[0], pre[1], pre[2]);
-
-=== modified file 'src/xml/repr-io.cpp'
---- src/xml/repr-io.cpp        2012-12-05 22:48:00 +0000
-+++ src/xml/repr-io.cpp        2013-11-13 21:17:28 +0000
-@@ -88,7 +88,9 @@
-         }
-     }

--    int setFile( char const * filename );
-+    int setFile( char const * filename, bool load_entities );
-+
-+    xmlDocPtr readXml();

-     static int readCb( void * context, char * buffer, int len );
-     static int closeCb( void * context );
-@@ -102,12 +104,15 @@
-     FILE* fp;
-     unsigned char firstFew[4];
-     int firstFewLen;
-+    bool LoadEntities; // Checks for SYSTEM Entities (requires cached data)
-+    std::string cachedData;
-+    unsigned int cachedPos;
-     Inkscape::URI dummy;
-     Inkscape::IO::UriInputStream* instr;
-     Inkscape::IO::GzipInputStream* gzin;
- };

--int XmlSource::setFile(char const *filename)
-+int XmlSource::setFile(char const *filename, bool load_entities=false)
- {
-     int retVal = -1;

-@@ -165,17 +170,67 @@
-         }
-     }

-+    if(load_entities) {
-+        this-&gt;cachedData = std::string(&quot;&quot;);
-+        this-&gt;cachedPos = 0;
-+ 
-+        // First get data from file in typical way (cache it all)
-+        char *buffer = new char [4096];
-+        while(true) {
-+            int len = this-&gt;read(buffer, 4096);
-+            if(len &lt;= 0) break;
-+            buffer[len] = 0;
-+            this-&gt;cachedData += buffer;
-+        }
-+        free(buffer);
-+ 
-+        // Check for SYSTEM or PUBLIC entities and remove them from the cache
-+        GMatchInfo *info;
-+        gint start, end;
-+ 
-+        GRegex *regex = g_regex_new(
-+            &quot;&lt;!ENTITY\\s+[^&gt;\\s]+\\s+(SYSTEM|PUBLIC\\s+\&quot;[^&gt;\&quot;]+\&quot;)\\s+\&quot;[^&gt;\&quot;]+\&quot;\\s*&gt;&quot;,
-+            G_REGEX_CASELESS, G_REGEX_MATCH_NEWLINE_ANY, NULL);
-+ 
-+        g_regex_match (regex, this-&gt;cachedData.c_str(), G_REGEX_MATCH_NEWLINE_ANY, &amp;info);
-+ 
-+        while (g_match_info_matches (info)) {
-+            if (g_match_info_fetch_pos (info, 1, &amp;start, &amp;end))
-+                this-&gt;cachedData.erase(start, end - start);
-+            g_match_info_next (info, NULL);
-+        }
-+        g_match_info_free(info);
-+        g_regex_unref(regex);
-+    }
-+    // Do this after loading cache, so reads don't return cache to fill cache.
-+    this-&gt;LoadEntities = load_entities;
-     return retVal;
- }

-+xmlDocPtr XmlSource::readXml()
-+{
-+    int parse_options = XML_PARSE_HUGE | XML_PARSE_RECOVER;
-+ 
-+    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-+    bool allowNetAccess = prefs-&gt;getBool(&quot;/options/externalresources/xml/allow_net_access&quot;, false);
-+    if (!allowNetAccess) parse_options |= XML_PARSE_NONET;
-+
-+    // Allow NOENT only if we're filtering out SYSTEM and PUBLIC entities
-+    if (LoadEntities)    parse_options |= XML_PARSE_NOENT;
-+
-+    return xmlReadIO( readCb, closeCb, this,
-+                      filename, getEncoding(), parse_options);
-+}

- int XmlSource::readCb( void * context, char * buffer, int len )
- {
-     int retVal = -1;
-+
-     if ( context ) {
-         XmlSource* self = static_cast&lt;XmlSource*&gt;(context);
-         retVal = self-&gt;read( buffer, len );
-     }
-+
-     return retVal;
- }

-@@ -193,7 +248,15 @@
-     int retVal = 0;
-     size_t got = 0;

--    if ( firstFewLen &gt; 0 ) {
-+    if ( LoadEntities ) {
-+        if (cachedPos &gt;= cachedData.length()) {
-+            return -1;
-+        } else {
-+            retVal = cachedData.copy(buffer, len, cachedPos);
-+            cachedPos += retVal;
-+            return retVal; // Do NOT continue.
-+        }
-+    } else if ( firstFewLen &gt; 0 ) {
-         int some = (len &lt; firstFewLen) ? len : firstFewLen;
-         memcpy( buffer, firstFew, some );
-         if ( len &lt; firstFewLen ) {
-@@ -289,22 +352,19 @@
-         XmlSource src;

-         if ( (src.setFile(filename) == 0) ) {
--            int parse_options = XML_PARSE_HUGE; // do not use XML_PARSE_NOENT ! see bug lp:1025185
--            Inkscape::Preferences *prefs = Inkscape::Preferences::get();
--            bool allowNetAccess = prefs-&gt;getBool(&quot;/options/externalresources/xml/allow_net_access&quot;, false);
--            if (!allowNetAccess) {
--                parse_options |= XML_PARSE_NONET;
-+            doc = src.readXml();
-+            rdoc = sp_repr_do_read( doc, default_ns );
-+            // For some reason, failed ns loading results in this
-+            // We try a system check version of load with NOENT for adobe
-+            if(rdoc &amp;&amp; strcmp(rdoc-&gt;root()-&gt;name(), &quot;ns:svg&quot;) == 0) {
-+                xmlFreeDoc( doc );
-+                src.setFile(filename, true);
-+                doc = src.readXml();
-+                rdoc = sp_repr_do_read( doc, default_ns );
-             }
--            doc = xmlReadIO( XmlSource::readCb,
--                             XmlSource::closeCb,
--                             &amp;src,
--                             localFilename,
--                             src.getEncoding(),
--                             parse_options);
-         }
-     }

--    rdoc = sp_repr_do_read( doc, default_ns );
-     if ( doc ) {
-         xmlFreeDoc( doc );
-     }
-
</del></span></pre></div>
<a id="trunkdportsgraphicsinkscapefilespatchr9972thrur9988diff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9988.diff (0 => 114211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9988.diff                                (rev 0)
+++ trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9988.diff        2013-12-02 18:59:19 UTC (rev 114211)
</span><span class="lines">@@ -0,0 +1,1709 @@
</span><ins>+=== modified file 'configure.ac'
+--- configure.ac        2013-09-22 00:34:02 +0000
++++ configure.ac        2013-11-13 21:17:28 +0000
+@@ -168,11 +168,14 @@
+ dnl Check for OpenMP 
+ dnl Replace this with AC_OPENMP once Autoconf 2.62 is widespread
+ dnl ******************************
+-AX_OPENMP([openmp_ok=yes],[openmp_ok=no])
++AX_OPENMP([AC_CHECK_HEADER([omp.h],
++                           [openmp_ok=yes],
++                           [openmp_ok=no])
++])
++
+ if test &quot;x$openmp_ok&quot; = &quot;xyes&quot;; then
+         dnl We have it, now set up the flags
+         CXXFLAGS=&quot;$CXXFLAGS $OPENMP_CXXFLAGS&quot;
+-        AC_CHECK_HEADER(omp.h)
+         AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
+ fi

+
+=== modified file 'src/2geom/sbasis.h'
+--- src/2geom/sbasis.h        2009-04-06 22:29:34 +0000
++++ src/2geom/sbasis.h        2013-11-13 21:17:28 +0000
+@@ -75,10 +75,18 @@
+         return d[i];
+     }
+     Linear&amp; operator[](unsigned i) { return d.at(i); }
+-    Linear const* begin() const { return (Linear const*)&amp;*d.begin();}
+-    Linear const* end() const { return (Linear const*)&amp;*d.end();}
+-    Linear* begin() { return (Linear*)&amp;*d.begin();}
+-    Linear* end() { return (Linear*)&amp;*d.end();}
++        
++    //Linear const* begin() const { return (Linear const*)&amp;*d.begin();}
++    //Linear const* end() const { return (Linear const*)&amp;*d.end();}
++    //Linear* begin() { return (Linear*)&amp;*d.begin();}
++    //Linear* end() { return (Linear*)&amp;*d.end();}
++        
++        std::vector&lt;Linear&gt;::const_iterator begin() const { return d.begin(); }
++        std::vector&lt;Linear&gt;::const_iterator end() const { return d.end(); }
++        
++        std::vector&lt;Linear&gt;::iterator begin() { return d.begin(); }
++        std::vector&lt;Linear&gt;::iterator end() { return d.end(); }
++        
+     bool empty() const {return d.empty();}
+     Linear &amp;back() {return d.back();}
+     Linear const &amp;back() const {return d.back();}
+@@ -87,7 +95,11 @@
+     void resize(unsigned n, Linear const&amp; l) { d.resize(n, l);}
+     void reserve(unsigned n) { d.reserve(n);}
+     void clear() {d.clear();}
+-    void insert(Linear* before, const Linear* src_begin, const Linear* src_end) { d.insert(std::vector&lt;Linear&gt;::iterator(before), src_begin, src_end);}
++        
++    void insert(std::vector&lt;Linear&gt;::iterator before, std::vector&lt;Linear&gt;::const_iterator src_begin, std::vector&lt;Linear&gt;::const_iterator src_end) {
++                d.insert(before, src_begin, src_end);
++        }
++        
+     //void insert(Linear* aa, Linear* bb, Linear* cc} { d.insert(aa, bb, cc);}
+     Linear&amp; at(unsigned i) { return d.at(i);}
+     //void insert(Linear* before, int&amp; n, Linear const &amp;l) { d.insert(std::vector&lt;Linear&gt;::iterator(before), n, l);}
+@@ -283,7 +295,13 @@

+ inline SBasis truncate(SBasis const &amp;a, unsigned terms) {
+     SBasis c;
+-    c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
++        
++        std::vector&lt;Linear&gt;::const_iterator e = a.begin();
++        std::advance(e, std::min(terms, (unsigned)a.size()));
++        
++    //c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
++        c.insert(c.begin(), a.begin(), e);
++        
+     return c;
+ }

+
+=== modified file 'src/color-profile.cpp'
+--- src/color-profile.cpp        2013-09-21 22:19:03 +0000
++++ src/color-profile.cpp        2013-11-13 21:17:28 +0000
+@@ -639,9 +639,9 @@

+     cmsUInt8Number outofgamut = 0;
+     guchar check_color[4] = {
+-        SP_RGBA32_R_U(val),
+-        SP_RGBA32_G_U(val),
+-        SP_RGBA32_B_U(val),
++        static_cast&lt;guchar&gt;(SP_RGBA32_R_U(val)),
++        static_cast&lt;guchar&gt;(SP_RGBA32_G_U(val)),
++        static_cast&lt;guchar&gt;(SP_RGBA32_B_U(val)),
+         255};
+     cmsDoTransform(ColorProfile::getTransfGamutCheck(), &amp;check_color, &amp;outofgamut, 1);

+
+=== modified file 'src/dom/io/uristream.cpp'
+--- src/dom/io/uristream.cpp        2009-02-26 21:28:12 +0000
++++ src/dom/io/uristream.cpp        2013-11-13 21:17:28 +0000
+@@ -54,7 +54,7 @@
+  *
+  */
+ UriInputStream::UriInputStream(const URI &amp;source)
+-                    throw (StreamException): uri((URI &amp;)source)
++    : uri((URI &amp;)source)
+ {
+     init();
+ }
+@@ -62,7 +62,7 @@
+ /**
+  *
+  */
+-void UriInputStream::init() throw (StreamException)
++void UriInputStream::init()
+ {
+     //get information from uri
+     scheme = uri.getScheme();
+@@ -116,7 +116,7 @@
+ /**
+  *
+  */
+-UriInputStream::~UriInputStream() throw(StreamException)
++UriInputStream::~UriInputStream()
+ {
+     close();
+ }
+@@ -126,7 +126,7 @@
+  * this input stream without blocking by the next caller of a method for
+  * this input stream.
+  */
+-int UriInputStream::available() throw(StreamException)
++int UriInputStream::available()
+ {
+     return 0;
+ }
+@@ -136,7 +136,7 @@
+  *  Closes this input stream and releases any system resources
+  *  associated with the stream.
+  */
+-void UriInputStream::close() throw(StreamException)
++void UriInputStream::close()
+ {
+     if (closed)
+         return;
+@@ -175,7 +175,7 @@
+ /**
+  * Reads the next byte of data from the input stream.  -1 if EOF
+  */
+-int UriInputStream::get() throw(StreamException)
++int UriInputStream::get()
+ {
+     int retVal = -1;
+     if (closed)
+@@ -232,7 +232,7 @@
+ /**
+  *
+  */
+-UriReader::UriReader(const URI &amp;uri) throw (StreamException)
++UriReader::UriReader(const URI &amp;uri)
+ {
+     inputStream = new UriInputStream(uri);
+ }
+@@ -240,7 +240,7 @@
+ /**
+  *
+  */
+-UriReader::~UriReader() throw (StreamException)
++UriReader::~UriReader()
+ {
+     delete inputStream;
+ }
+@@ -248,7 +248,7 @@
+ /**
+  *
+  */
+-int UriReader::available() throw(StreamException)
++int UriReader::available()
+ {
+     return inputStream-&gt;available();
+ }
+@@ -256,7 +256,7 @@
+ /**
+  *
+  */
+-void UriReader::close() throw(StreamException)
++void UriReader::close()
+ {
+     inputStream-&gt;close();
+ }
+@@ -264,7 +264,7 @@
+ /**
+  *
+  */
+-int UriReader::get() throw(StreamException)
++int UriReader::get()
+ {
+     int ch = (int)inputStream-&gt;get();
+     return ch;
+@@ -279,10 +279,10 @@
+  *
+  */
+ UriOutputStream::UriOutputStream(const URI &amp;destination)
+-                    throw (StreamException): closed(false),
+-                                             ownsFile(true),
+-                                             outf(NULL),
+-                                             uri((URI &amp;)destination)
++    : closed(false),
++      ownsFile(true),
++      outf(NULL),
++      uri((URI &amp;)destination)
+ {
+     init();
+ }
+@@ -291,7 +291,7 @@
+ /**
+  *
+  */
+-void UriOutputStream::init() throw(StreamException)
++void UriOutputStream::init()
+ {
+     //get information from uri
+     scheme = uri.getScheme();
+@@ -328,7 +328,7 @@
+ /**
+  *
+  */
+-UriOutputStream::~UriOutputStream() throw(StreamException)
++UriOutputStream::~UriOutputStream()
+ {
+     close();
+ }
+@@ -337,7 +337,7 @@
+  * Closes this output stream and releases any system resources
+  * associated with this stream.
+  */
+-void UriOutputStream::close() throw(StreamException)
++void UriOutputStream::close()
+ {
+     if (closed)
+         return;
+@@ -372,7 +372,7 @@
+  *  Flushes this output stream and forces any buffered output
+  *  bytes to be written out.
+  */
+-void UriOutputStream::flush() throw(StreamException)
++void UriOutputStream::flush()
+ {
+     if (closed)
+         return;
+@@ -401,7 +401,7 @@
+ /**
+  * Writes the specified byte to this output stream.
+  */
+-int UriOutputStream::put(XMLCh ch) throw(StreamException)
++int UriOutputStream::put(XMLCh ch)
+ {
+     if (closed)
+         return -1;
+@@ -437,7 +437,6 @@
+  *
+  */
+ UriWriter::UriWriter(const URI &amp;uri)
+-                    throw (StreamException)
+ {
+     outputStream = new UriOutputStream(uri);
+ }
+@@ -445,7 +444,7 @@
+ /**
+  *
+  */
+-UriWriter::~UriWriter() throw (StreamException)
++UriWriter::~UriWriter()
+ {
+     delete outputStream;
+ }
+@@ -453,7 +452,7 @@
+ /**
+  *
+  */
+-void UriWriter::close() throw(StreamException)
++void UriWriter::close()
+ {
+     outputStream-&gt;close();
+ }
+@@ -461,7 +460,7 @@
+ /**
+  *
+  */
+-void UriWriter::flush() throw(StreamException)
++void UriWriter::flush()
+ {
+     outputStream-&gt;flush();
+ }
+@@ -469,7 +468,7 @@
+ /**
+  *
+  */
+-int UriWriter::put(XMLCh ch) throw(StreamException)
++int UriWriter::put(XMLCh ch)
+ {
+     int ich = (int)ch;
+     if (outputStream-&gt;put(ich) &lt; 0)
+
+=== modified file 'src/dom/io/uristream.h'
+--- src/dom/io/uristream.h        2008-04-29 02:00:54 +0000
++++ src/dom/io/uristream.h        2013-11-13 21:17:28 +0000
+@@ -65,19 +65,19 @@

+ public:

+-    UriInputStream(const URI &amp;source) throw(StreamException);
+-
+-    virtual ~UriInputStream() throw(StreamException);
+-
+-    virtual int available() throw(StreamException);
+-
+-    virtual void close() throw(StreamException);
+-
+-    virtual int get() throw(StreamException);
++    UriInputStream(const URI &amp;source);
++
++    virtual ~UriInputStream();
++
++    virtual int available();
++
++    virtual void close();
++
++    virtual int get();

+ private:

+-    void init() throw(StreamException);//common code called by constructor
++    void init() ;//common code called by constructor

+     bool closed;

+@@ -106,15 +106,15 @@

+ public:

+-    UriReader(const URI &amp;source) throw(StreamException);
+-
+-    virtual ~UriReader() throw(StreamException);
+-
+-    virtual int available() throw(StreamException);
+-
+-    virtual void close() throw(StreamException);
+-
+-    virtual int get() throw(StreamException);
++    UriReader(const URI &amp;source);
++
++    virtual ~UriReader();
++
++    virtual int available();
++
++    virtual void close();
++
++    virtual int get();

+ private:

+@@ -138,19 +138,19 @@

+ public:

+-    UriOutputStream(const URI &amp;destination) throw(StreamException);
+-
+-    virtual ~UriOutputStream() throw(StreamException);
+-
+-    virtual void close() throw(StreamException);
+-
+-    virtual void flush() throw(StreamException);
+-
+-    virtual int put(XMLCh ch) throw(StreamException);
++    UriOutputStream(const URI &amp;destination);
++
++    virtual ~UriOutputStream();
++
++    virtual void close();
++
++    virtual void flush();
++
++    virtual int put(XMLCh ch);

+ private:

+-    void init() throw(StreamException); //common code called by constructor
++    void init() ; //common code called by constructor

+     bool closed;
+     bool ownsFile;
+@@ -179,15 +179,15 @@

+ public:

+-    UriWriter(const URI &amp;source) throw(StreamException);
+-
+-    virtual ~UriWriter() throw(StreamException);
+-
+-    virtual void close() throw(StreamException);
+-
+-    virtual void flush() throw(StreamException);
+-
+-    virtual int put(XMLCh ch) throw(StreamException);
++    UriWriter(const URI &amp;source) ;
++
++    virtual ~UriWriter() ;
++
++    virtual void close() ;
++
++    virtual void flush() ;
++
++    virtual int put(XMLCh ch) ;

+ private:

+
+=== modified file 'src/dom/svgimpl.cpp'
+--- src/dom/svgimpl.cpp        2008-06-11 21:23:49 +0000
++++ src/dom/svgimpl.cpp        2013-11-13 21:17:28 +0000
+@@ -81,7 +81,7 @@
+ typedef struct
+ {
+     const char *name;
+-    int         type;
++    unsigned int type;
+ } SVGTableEntry;


+@@ -266,9 +266,9 @@
+  * Return the string corresponding to a given SVG element type enum
+  * Return &quot;unknown&quot; if not found
+  */
+-const char *svgInterfaceEnumToStr(int type)
++const char *svgInterfaceEnumToStr(unsigned int type)
+ {
+-    if (type &lt; 1 || type &gt; (int)SVG_ZOOM_AND_PAN)
++    if (type &lt; 1 || type &gt; SVG_ZOOM_AND_PAN)
+         return &quot;unknown&quot;;
+     SVGTableEntry *entry = interfaceTable;
+     for (int i = 0 ; i &lt; SVG_NR_INTERFACES ; i++)
+
+=== modified file 'src/io/inkjar.cpp'
+--- src/io/inkjar.cpp        2011-07-20 20:17:25 +0000
++++ src/io/inkjar.cpp        2013-11-13 21:17:28 +0000
+@@ -68,7 +68,8 @@
+ {
+     _filename = g_strdup(new_filename);
+     _last_filename = NULL;
+-    fd = -1;
++    //fd = -1;
++fd=NULL;
+ }

+ //fixme: the following should probably just return a const gchar* and not 
+@@ -102,9 +103,11 @@
+     return true;
+ }

++#include &lt;cstdio&gt;
++
+ bool JarFile::open()
+ {
+-    if ((fd = ::open(_filename, O_RDONLY)) &lt; 0) {
++    if ((fd = fopen(_filename, O_RDONLY)) &lt; 0) {
+         fprintf(stderr, &quot;open failed.\n&quot;);
+         return false;
+     }
+@@ -116,7 +119,7 @@

+ bool JarFile::close()
+ {
+-    if (fd &gt;= 0 &amp;&amp; !::close(fd)) {
++    if (fd &gt;= 0 &amp;&amp; !fclose(fd)) {
+         inflateEnd(&amp;_zs);
+         return true;
+     }
+@@ -256,7 +259,7 @@
+     
+     if (method == 8 || flags &amp; 0x0008) {
+         unsigned int file_length = 0;//uncompressed file length
+-        lseek(fd, eflen, SEEK_CUR);
++        fseek(fd, eflen, SEEK_CUR);
+         guint8 *file_data = get_compressed_file(compressed_size, file_length, 
+                                                 crc, flags);
+         if (file_data == NULL) {
+@@ -274,7 +277,7 @@
+         }
+         g_byte_array_append(gba, file_data, compressed_size);
+     } else {
+-        lseek(fd, compressed_size+eflen, SEEK_CUR);
++        fseek(fd, compressed_size+eflen, SEEK_CUR);
+         g_byte_array_free(gba, FALSE);
+         return NULL;
+     }
+@@ -313,8 +316,8 @@
+         std::printf(&quot;%d bytes written\n&quot;, out_a);
+ #endif
+     }
+-    lseek(fd, eflen, SEEK_CUR);
+     g_free(bytes);
++    fseek(fd, eflen, SEEK_CUR);

+     if (!check_crc(crc, crc2, flags)) {
+         bytes = gba-&gt;data;
+@@ -328,7 +331,8 @@
+ int JarFile::read(guint8 *buf, int count)
+ {
+     int nbytes;
+-    if ((nbytes = ::read(fd, buf, count)) != count) {
++    //if ((nbytes = ::read(fd, buf, count)) != count) {
++if ((nbytes = fread(buf, 1, count, fd)) != count) {
+         fprintf(stderr, &quot;read error\n&quot;);
+         exit(1);
+         return 0;
+@@ -357,9 +361,12 @@
+                 
+         if (!_zs.avail_in) {
+         
+-            if ((nbytes = ::read(fd, in_buffer, 
++            /*if ((nbytes = ::read(fd, in_buffer, 
+                                  (leftover_in &lt; RDSZ ? leftover_in : RDSZ))) 
+                 &lt; 0) {
++*/
++if ((nbytes = fread(in_buffer, 1, (leftover_in &lt; RDSZ ? leftover_in : RDSZ), fd))
++&lt; 0) {
+                 fprintf(stderr, &quot;jarfile read error&quot;);
+             }
+             _zs.avail_in = nbytes;
+@@ -537,7 +544,8 @@
+                 }
+             }
+         } else if (gba-&gt;len &gt; 0)
+-            ::write(1, gba-&gt;data, gba-&gt;len);
++            //::write(1, gba-&gt;data, gba-&gt;len);
++fwrite(gba-&gt;data, 1, gba-len, stdout);
+         else
+             break;
+     }
+
+=== modified file 'src/io/inkjar.h'
+--- src/io/inkjar.h        2011-12-08 22:05:10 +0000
++++ src/io/inkjar.h        2013-11-13 21:17:28 +0000
+@@ -27,6 +27,7 @@
+ #endif

+ #include &lt;glib.h&gt;
++#include &lt;stdio.h&gt;

+ namespace Inkjar {

+@@ -91,7 +92,7 @@
+ class JarFile {
+ public:

+-    JarFile() : fd(-1), _filename(NULL), _last_filename(NULL) {}
++    JarFile() : fd(NULL), _filename(NULL), _last_filename(NULL) {}
+     virtual ~JarFile();
+     JarFile(gchar const *new_filename);
+     
+@@ -106,7 +107,8 @@

+ private:

+-    int fd;
++//    int fd;
++FILE* fd;
+     gchar *_filename;
+     z_stream _zs;
+     gchar *_last_filename;
+
+=== modified file 'src/io/uristream.cpp'
+--- src/io/uristream.cpp        2009-08-02 15:04:57 +0000
++++ src/io/uristream.cpp        2013-11-13 21:17:28 +0000
+@@ -104,7 +104,7 @@
+  *
+  */
+ UriInputStream::UriInputStream(Inkscape::URI &amp;source)
+-                    throw (StreamException): uri(source)
++   : uri(source)
+ {
+     //get information from uri
+     char const *schemestr = uri.getScheme();
+@@ -146,8 +146,8 @@
+  *
+  */
+ UriInputStream::UriInputStream(FILE *source, Inkscape::URI &amp;uri)
+-    throw (StreamException): inf(source),
+-                             uri(uri)
++    : inf(source),
++      uri(uri)
+ {
+     scheme = SCHEME_FILE;
+     if (!inf) {
+@@ -160,7 +160,7 @@
+ /**
+  *
+  */
+-UriInputStream::~UriInputStream() throw(StreamException)
++UriInputStream::~UriInputStream()
+ {
+     close();
+ }
+@@ -170,7 +170,7 @@
+  * this input stream without blocking by the next caller of a method for
+  * this input stream.
+  */
+-int UriInputStream::available() throw(StreamException)
++int UriInputStream::available()
+ {
+     return 0;
+ }
+@@ -180,7 +180,7 @@
+  *  Closes this input stream and releases any system resources
+  *  associated with the stream.
+  */
+-void UriInputStream::close() throw(StreamException)
++void UriInputStream::close()
+ {
+     if (closed)
+         return;
+@@ -207,7 +207,7 @@
+ /**
+  * Reads the next byte of data from the input stream.  -1 if EOF
+  */
+-int UriInputStream::get() throw(StreamException)
++int UriInputStream::get()
+ {
+     int retVal = -1;
+     if (!closed)
+@@ -249,7 +249,6 @@
+  *
+  */
+ UriReader::UriReader(Inkscape::URI &amp;uri)
+-                    throw (StreamException)
+ {
+     inputStream = new UriInputStream(uri);
+ }
+@@ -257,7 +256,7 @@
+ /**
+  *
+  */
+-UriReader::~UriReader() throw (StreamException)
++UriReader::~UriReader()
+ {
+     delete inputStream;
+ }
+@@ -265,7 +264,7 @@
+ /**
+  *
+  */
+-int UriReader::available() throw(StreamException)
++int UriReader::available()
+ {
+     return inputStream-&gt;available();
+ }
+@@ -273,7 +272,7 @@
+ /**
+  *
+  */
+-void UriReader::close() throw(StreamException)
++void UriReader::close()
+ {
+     inputStream-&gt;close();
+ }
+@@ -281,7 +280,7 @@
+ /**
+  *
+  */
+-gunichar UriReader::get() throw(StreamException)
++gunichar UriReader::get()
+ {
+     gunichar ch = (gunichar)inputStream-&gt;get();
+     return ch;
+@@ -296,11 +295,11 @@
+  * Temporary kludge
+  */
+ UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &amp;destination)
+-                    throw (StreamException): closed(false),
+-                                             ownsFile(false),
+-                                             outf(fp),
+-                                             uri(destination),
+-                                             scheme(SCHEME_FILE)
++    : closed(false),
++      ownsFile(false),
++      outf(fp),
++      uri(destination),
++      scheme(SCHEME_FILE)
+ {
+     if (!outf) {
+         Glib::ustring err = &quot;UriOutputStream given null file &quot;;
+@@ -312,11 +311,11 @@
+  *
+  */
+ UriOutputStream::UriOutputStream(Inkscape::URI &amp;destination)
+-                    throw (StreamException): closed(false),
+-                                             ownsFile(true),
+-                                             outf(NULL),
+-                                             uri(destination),
+-                                             scheme(SCHEME_FILE)
++    : closed(false),
++      ownsFile(true),
++      outf(NULL),
++      uri(destination),
++      scheme(SCHEME_FILE)
+ {
+     //get information from uri
+     char const *schemestr = uri.getScheme();
+@@ -353,7 +352,7 @@
+ /**
+  *
+  */
+-UriOutputStream::~UriOutputStream() throw(StreamException)
++UriOutputStream::~UriOutputStream()
+ {
+     close();
+ }
+@@ -362,7 +361,7 @@
+  * Closes this output stream and releases any system resources
+  * associated with this stream.
+  */
+-void UriOutputStream::close() throw(StreamException)
++void UriOutputStream::close()
+ {
+     if (closed)
+         return;
+@@ -391,7 +390,7 @@
+  *  Flushes this output stream and forces any buffered output
+  *  bytes to be written out.
+  */
+-void UriOutputStream::flush() throw(StreamException)
++void UriOutputStream::flush()
+ {
+     if (closed)
+         return;
+@@ -415,7 +414,7 @@
+ /**
+  * Writes the specified byte to this output stream.
+  */
+-void UriOutputStream::put(int ch) throw(StreamException)
++void UriOutputStream::put(int ch)
+ {
+     if (closed)
+         return;
+@@ -453,7 +452,6 @@
+  *
+  */
+ UriWriter::UriWriter(Inkscape::URI &amp;uri)
+-                    throw (StreamException)
+ {
+     outputStream = new UriOutputStream(uri);
+ }
+@@ -461,7 +459,7 @@
+ /**
+  *
+  */
+-UriWriter::~UriWriter() throw (StreamException)
++UriWriter::~UriWriter()
+ {
+     delete outputStream;
+ }
+@@ -469,7 +467,7 @@
+ /**
+  *
+  */
+-void UriWriter::close() throw(StreamException)
++void UriWriter::close()
+ {
+     outputStream-&gt;close();
+ }
+@@ -477,7 +475,7 @@
+ /**
+  *
+  */
+-void UriWriter::flush() throw(StreamException)
++void UriWriter::flush()
+ {
+     outputStream-&gt;flush();
+ }
+@@ -485,7 +483,7 @@
+ /**
+  *
+  */
+-void UriWriter::put(gunichar ch) throw(StreamException)
++void UriWriter::put(gunichar ch)
+ {
+     int ich = (int)ch;
+     outputStream-&gt;put(ich);
+
+=== modified file 'src/io/uristream.h'
+--- src/io/uristream.h        2006-01-16 02:36:01 +0000
++++ src/io/uristream.h        2013-11-13 21:17:28 +0000
+@@ -35,17 +35,17 @@
+ {

+ public:
+-    UriInputStream(FILE *source, Inkscape::URI &amp;uri) throw(StreamException);
+-
+-    UriInputStream(Inkscape::URI &amp;source) throw(StreamException);
+-
+-    virtual ~UriInputStream() throw(StreamException);
+-
+-    virtual int available() throw(StreamException);
+-
+-    virtual void close() throw(StreamException);
+-
+-    virtual int get() throw(StreamException);
++    UriInputStream(FILE *source, Inkscape::URI &amp;uri);
++
++    UriInputStream(Inkscape::URI &amp;source);
++
++    virtual ~UriInputStream();
++
++    virtual int available();
++
++    virtual void close();
++
++    virtual int get();

+ private:

+@@ -74,15 +74,15 @@

+ public:

+-    UriReader(Inkscape::URI &amp;source) throw(StreamException);
+-
+-    virtual ~UriReader() throw(StreamException);
+-
+-    virtual int available() throw(StreamException);
+-
+-    virtual void close() throw(StreamException);
+-
+-    virtual gunichar get() throw(StreamException);
++    UriReader(Inkscape::URI &amp;source);
++
++    virtual ~UriReader();
++
++    virtual int available();
++
++    virtual void close();
++
++    virtual gunichar get();

+ private:

+@@ -106,17 +106,17 @@

+ public:

+-    UriOutputStream(FILE *fp, Inkscape::URI &amp;destination) throw(StreamException);
+-
+-    UriOutputStream(Inkscape::URI &amp;destination) throw(StreamException);
+-
+-    virtual ~UriOutputStream() throw(StreamException);
+-
+-    virtual void close() throw(StreamException);
+-
+-    virtual void flush() throw(StreamException);
+-
+-    virtual void put(int ch) throw(StreamException);
++    UriOutputStream(FILE *fp, Inkscape::URI &amp;destination);
++
++    UriOutputStream(Inkscape::URI &amp;destination);
++
++    virtual ~UriOutputStream();
++
++    virtual void close();
++
++    virtual void flush();
++
++    virtual void put(int ch);

+ private:

+@@ -145,15 +145,15 @@

+ public:

+-    UriWriter(Inkscape::URI &amp;source) throw(StreamException);
+-
+-    virtual ~UriWriter() throw(StreamException);
+-
+-    virtual void close() throw(StreamException);
+-
+-    virtual void flush() throw(StreamException);
+-
+-    virtual void put(gunichar ch) throw(StreamException);
++    UriWriter(Inkscape::URI &amp;source);
++
++    virtual ~UriWriter();
++
++    virtual void close();
++
++    virtual void flush();
++
++    virtual void put(gunichar ch);

+ private:

+
+=== modified file 'src/io/xsltstream.cpp'
+--- src/io/xsltstream.cpp        2008-05-04 16:09:41 +0000
++++ src/io/xsltstream.cpp        2013-11-13 21:17:28 +0000
+@@ -30,7 +30,6 @@
+  *
+  */
+ XsltStyleSheet::XsltStyleSheet(InputStream &amp;xsltSource)
+-               throw (StreamException)
+                    : stylesheet(NULL)
+ {
+     if (!read(xsltSource)) {
+@@ -86,7 +85,6 @@
+  *
+  */ 
+ XsltInputStream::XsltInputStream(InputStream &amp;xmlSource, XsltStyleSheet &amp;sheet)
+-                        throw (StreamException)
+                         : BasicInputStream(xmlSource), stylesheet(sheet)
+ {
+     //Load the data
+@@ -110,7 +108,7 @@
+ /**
+  *
+  */ 
+-XsltInputStream::~XsltInputStream() throw (StreamException)
++XsltInputStream::~XsltInputStream()
+ {
+     xmlFree(outbuf);
+ }
+@@ -120,7 +118,7 @@
+  * this input stream without blocking by the next caller of a method for
+  * this input stream.
+  */ 
+-int XsltInputStream::available() throw (StreamException)
++int XsltInputStream::available()
+ {
+     return outsize - outpos;
+ }
+@@ -130,7 +128,7 @@
+  *  Closes this input stream and releases any system resources
+  *  associated with the stream.
+  */ 
+-void XsltInputStream::close() throw (StreamException)
++void XsltInputStream::close()
+ {
+     closed = true;
+ }
+@@ -138,7 +136,7 @@
+ /**
+  * Reads the next byte of data from the input stream.  -1 if EOF
+  */ 
+-int XsltInputStream::get() throw (StreamException)
++int XsltInputStream::get()
+ {
+     if (closed)
+         return -1;
+@@ -161,7 +159,6 @@
+  *
+  */ 
+ XsltOutputStream::XsltOutputStream(OutputStream &amp;dest, XsltStyleSheet &amp;sheet)
+-                     throw (StreamException)
+                      : BasicOutputStream(dest), stylesheet(sheet)
+ {
+     flushed = false;
+@@ -170,7 +167,7 @@
+ /**
+  *
+  */ 
+-XsltOutputStream::~XsltOutputStream() throw (StreamException)
++XsltOutputStream::~XsltOutputStream()
+ {
+     //do not automatically close
+ }
+@@ -179,7 +176,7 @@
+  * Closes this output stream and releases any system resources
+  * associated with this stream.
+  */ 
+-void XsltOutputStream::close() throw (StreamException)
++void XsltOutputStream::close()
+ {
+     flush();
+     destination.close();
+@@ -189,7 +186,7 @@
+  *  Flushes this output stream and forces any buffered output
+  *  bytes to be written out.
+  */ 
+-void XsltOutputStream::flush() throw (StreamException)
++void XsltOutputStream::flush()
+ {
+     if (flushed)
+         {
+@@ -230,7 +227,7 @@
+ /**
+  * Writes the specified byte to this output stream.
+  */ 
+-void XsltOutputStream::put(int ch) throw (StreamException)
++void XsltOutputStream::put(int ch)
+ {
+     gunichar uch = (gunichar) ch;
+     outbuf.push_back(uch);
+
+=== modified file 'src/io/xsltstream.h'
+--- src/io/xsltstream.h        2008-05-04 16:09:41 +0000
++++ src/io/xsltstream.h        2013-11-13 21:17:28 +0000
+@@ -38,7 +38,7 @@
+     /**
+      * Constructor with loading
+      */
+-    XsltStyleSheet(InputStream &amp;source)  throw (StreamException);
++    XsltStyleSheet(InputStream &amp;source) ;

+     /**
+      * Simple constructor, no loading
+@@ -73,16 +73,15 @@

+ public:

+-    XsltInputStream(InputStream &amp;xmlSource, XsltStyleSheet &amp;stylesheet)
+-                        throw (StreamException);
+-    
+-    virtual ~XsltInputStream() throw (StreamException);
+-    
+-    virtual int available() throw (StreamException);
+-    
+-    virtual void close() throw (StreamException);
+-    
+-    virtual int get() throw (StreamException);
++    XsltInputStream(InputStream &amp;xmlSource, XsltStyleSheet &amp;stylesheet);
++    
++    virtual ~XsltInputStream();
++    
++    virtual int available();
++    
++    virtual void close();
++    
++    virtual int get();
+     

+ private:
+@@ -110,16 +109,15 @@

+ public:

+-    XsltOutputStream(OutputStream &amp;destination, XsltStyleSheet &amp;stylesheet)
+-                             throw (StreamException);
+-    
+-    virtual ~XsltOutputStream() throw (StreamException);
+-    
+-    virtual void close() throw (StreamException);
+-    
+-    virtual void flush() throw (StreamException);
+-    
+-    virtual void put(int ch) throw (StreamException);
++    XsltOutputStream(OutputStream &amp;destination, XsltStyleSheet &amp;stylesheet);
++    
++    virtual ~XsltOutputStream();
++    
++    virtual void close();
++    
++    virtual void flush();
++    
++    virtual void put(int ch);

+ private:

+
+=== modified file 'src/libgdl/gdl-dock-object.h'
+--- src/libgdl/gdl-dock-object.h        2011-06-04 06:04:06 +0000
++++ src/libgdl/gdl-dock-object.h        2013-11-13 21:17:28 +0000
+@@ -215,7 +215,7 @@
+     G_STMT_START {                            \
+     g_log (G_LOG_DOMAIN,                      \
+            G_LOG_LEVEL_DEBUG,                 \
+-           &quot;%s:%d (%s) %s [%p %d%s:%d]: &quot;format, \
++           &quot;%s:%d (%s) %s [%p %d%s:%d]: &quot; format, \
+            __FILE__,                          \
+            __LINE__,                          \
+            __PRETTY_FUNCTION__,               \
+
+=== modified file 'src/libgdl/gdl-tools.h'
+--- src/libgdl/gdl-tools.h        2011-06-04 06:04:06 +0000
++++ src/libgdl/gdl-tools.h        2013-11-13 21:17:28 +0000
+@@ -48,7 +48,7 @@
+ #define GDL_TRACE_EXTRA(format, args...) G_STMT_START {     \
+     g_log (G_LOG_DOMAIN,                      \
+            G_LOG_LEVEL_DEBUG,                 \
+-           &quot;file %s: line %d (%s): &quot;format,   \
++           &quot;file %s: line %d (%s): &quot; format,   \
+            __FILE__,                          \
+            __LINE__,                          \
+            __PRETTY_FUNCTION__,               \
+
+=== modified file 'src/libnrtype/Layout-TNG-OutIter.cpp'
+--- src/libnrtype/Layout-TNG-OutIter.cpp        2009-12-29 19:46:02 +0000
++++ src/libnrtype/Layout-TNG-OutIter.cpp        2013-11-13 21:17:28 +0000
+@@ -197,7 +197,23 @@

+ Layout::iterator Layout::sourceToIterator(void *source_cookie) const
+ {
+-    return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
++    //return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
++        
++        // simply copied from above... what is an iterator to NULL?
++        unsigned source_index;
++    if (_characters.empty()) return end();
++    for (source_index = 0 ; source_index &lt; _input_stream.size() ; source_index++)
++        if (_input_stream[source_index]-&gt;source_cookie == source_cookie) break;
++    if (source_index == _input_stream.size()) return end();
++        
++    unsigned char_index = _sourceToCharacter(source_index);
++    
++    if (_input_stream[source_index]-&gt;Type() != TEXT_SOURCE)
++        return iterator(this, char_index);
++        
++    InputStreamTextSource const *text_source = static_cast&lt;InputStreamTextSource const *&gt;(_input_stream[source_index]);
++    //if (text_iterator &lt;= text_source-&gt;text_begin) return iterator(this, char_index);
++        return iterator(this, char_index);
+ }

+ Geom::OptRect Layout::glyphBoundingBox(iterator const &amp;it, double *rotation) const
+@@ -506,18 +522,23 @@
+     *source_cookie = stream_item-&gt;source_cookie;
+     if (text_iterator &amp;&amp; stream_item-&gt;Type() == TEXT_SOURCE) {
+         InputStreamTextSource const *text_source = static_cast&lt;InputStreamTextSource const *&gt;(stream_item);
+-        Glib::ustring::const_iterator text_iter_const = text_source-&gt;text_begin;
++        //Glib::ustring::const_iterator text_iter_const = text_source-&gt;text_begin;
++        Glib::ustring::iterator text_iter = const_cast&lt;Glib::ustring*&gt;(text_source-&gt;text)-&gt;begin();
+         unsigned char_index = it._char_index;
+         unsigned original_input_source_index = _spans[_characters[char_index].in_span].in_input_stream_item;
+         // confusing algorithm because the iterator goes forwards while the index goes backwards.
+         // It's just that it's faster doing it that way
+         while (char_index &amp;&amp; _spans[_characters[char_index - 1].in_span].in_input_stream_item == original_input_source_index) {
+-            ++text_iter_const;
++            //++text_iter_const;
++            ++text_iter;
+             char_index--;
+         }
+-        text_source-&gt;text-&gt;begin().base() + (text_iter_const.base() - text_source-&gt;text-&gt;begin().base());
+-        *text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast&lt;char*&gt;(&amp;*text_source-&gt;text-&gt;begin().base() + (text_iter_const.base() - text_source-&gt;text-&gt;begin().base()))));
++        //text_source-&gt;text-&gt;begin().base() + (text_iter_const.base() - text_source-&gt;text-&gt;begin().base());
++        
++                // FIXME C++11
++                //*text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast&lt;char*&gt;(&amp;*text_source-&gt;text-&gt;begin().base() + (text_iter_const.base() - text_source-&gt;text-&gt;begin().base()))));
+              // the caller owns the string, so they're going to want a non-const iterator
++        *text_iterator = text_iter;
+     }
+ }

+
+=== modified file 'src/libvpsc/Makefile_insert'
+--- src/libvpsc/Makefile_insert        2007-03-22 00:37:48 +0000
++++ src/libvpsc/Makefile_insert        2013-11-13 21:17:28 +0000
+@@ -11,7 +11,6 @@
+         libvpsc/pairingheap/PairingHeap.cpp\
+         libvpsc/remove_rectangle_overlap.cpp\
+         libvpsc/solve_VPSC.cpp\
+-        libvpsc/csolve_VPSC.cpp\
+         libvpsc/variable.cpp\
+         libvpsc/block.h\
+         libvpsc/blocks.h\
+@@ -21,5 +20,4 @@
+         libvpsc/pairingheap/dsexceptions.h\
+         libvpsc/remove_rectangle_overlap.h\
+         libvpsc/solve_VPSC.h\
+-        libvpsc/csolve_VPSC.h\
+         libvpsc/variable.h
+
+=== removed file 'src/libvpsc/csolve_VPSC.cpp'
+--- src/libvpsc/csolve_VPSC.cpp        2008-01-31 19:06:59 +0000
++++ src/libvpsc/csolve_VPSC.cpp        1970-01-01 00:00:00 +0000
+@@ -1,126 +0,0 @@
+-/**
+- * \brief Bridge for C programs to access solve_VPSC (which is in C++)
+- *
+- * Authors:
+- *   Tim Dwyer &lt;tgdwyer@gmail.com&gt;
+- *
+- * Copyright (C) 2005 Authors
+- *
+- * Released under GNU LGPL.  Read the file 'COPYING' for more information.
+- */
+-#include &lt;iostream&gt;
+-#include &lt;cassert&gt;
+-#include &lt;cstdlib&gt;
+-#include &quot;variable.h&quot;
+-#include &quot;constraint.h&quot;
+-#include &quot;generate-constraints.h&quot;
+-#include &quot;solve_VPSC.h&quot;
+-#include &quot;csolve_VPSC.h&quot;
+-using namespace vpsc;
+-extern &quot;C&quot; {
+-Variable* newVariable(int id, double desiredPos, double weight) {
+-        return new Variable(id,desiredPos,weight);
+-}
+-Constraint* newConstraint(Variable* left, Variable* right, double gap) {
+-        return new Constraint(left,right,gap);
+-}
+-Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]) {
+-        return new Solver(n,vs,m,cs);
+-}
+-Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]) {
+-        return (Solver*)new vpsc::IncSolver(n,vs,m,cs);
+-}
+-
+-int genXConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs,int transitiveClosure) {
+-        Rectangle* rs[n];
+-        for(int i=0;i&lt;n;i++) {
+-                rs[i]=new Rectangle(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
+-        }
+-        int m = generateXConstraints(n,rs,vs,*cs,transitiveClosure);
+-        for(int i=0;i&lt;n;i++) {
+-                delete rs[i];
+-        }
+-        return m;
+-}
+-int genYConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs) {
+-        Rectangle* rs[n];
+-        for(int i=0;i&lt;n;i++) {
+-                rs[i]=new Rectangle(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
+-        }
+-        int m = generateYConstraints(n,rs,vs,*cs);
+-        for(int i=0;i&lt;n;i++) {
+-                delete rs[i];
+-        }
+-        return m;
+-}
+-
+-Constraint** newConstraints(int m) {
+-        return new Constraint*[m];
+-}
+-void deleteConstraints(int m, Constraint **cs) {
+-        for(int i=0;i&lt;m;i++) {
+-                delete cs[i];
+-        }
+-        delete [] cs;
+-}
+-void deleteConstraint(Constraint* c) {
+-        delete c;
+-}
+-void deleteVariable(Variable* v) {
+-        delete v;
+-}
+-void satisfyVPSC(Solver* vpsc) {
+-        try {
+-                vpsc-&gt;satisfy();
+-        } catch(const char *e) {
+-                std::cerr &lt;&lt; e &lt;&lt; std::endl;
+-                exit(1);
+-        }
+-}
+-int getSplitCnt(IncSolver *vpsc) {
+-        return vpsc-&gt;splitCnt;
+-}
+-void deleteVPSC(Solver *vpsc) {
+-        assert(vpsc!=NULL);
+-        delete vpsc;
+-}
+-void solveVPSC(Solver* vpsc) {
+-        vpsc-&gt;solve();
+-}
+-void splitIncVPSC(IncSolver* vpsc) {
+-        vpsc-&gt;splitBlocks();
+-}
+-void setVariableDesiredPos(Variable *v, double desiredPos) {
+-        v-&gt;desiredPosition = desiredPos;
+-}
+-double getVariablePos(Variable *v) {
+-        return v-&gt;position();
+-}
+-void remapInConstraints(Variable *u, Variable *v, double dgap) {
+-        for(Constraints::iterator i=u-&gt;in.begin();i!=u-&gt;in.end();i++) {
+-                Constraint* c=*i;        
+-                c-&gt;right=v;
+-                c-&gt;gap+=dgap;
+-                v-&gt;in.push_back(c);
+-        }
+-        u-&gt;in.clear();
+-}
+-void remapOutConstraints(Variable *u, Variable *v, double dgap) {
+-        for(Constraints::iterator i=u-&gt;out.begin();i!=u-&gt;out.end();i++) {
+-                Constraint* c=*i;        
+-                c-&gt;left=v;
+-                c-&gt;gap+=dgap;
+-                v-&gt;out.push_back(c);
+-        }
+-        u-&gt;out.clear();
+-}
+-int getLeftVarID(Constraint *c) {
+-        return c-&gt;left-&gt;id;
+-}
+-int getRightVarID(Constraint *c){
+-        return c-&gt;right-&gt;id;
+-}
+-double getSeparation(Constraint *c){
+-        return c-&gt;gap;
+-}
+-}
+
+=== removed file 'src/libvpsc/csolve_VPSC.h'
+--- src/libvpsc/csolve_VPSC.h        2006-07-14 04:09:40 +0000
++++ src/libvpsc/csolve_VPSC.h        1970-01-01 00:00:00 +0000
+@@ -1,60 +0,0 @@
+-/**
+- * \brief Bridge for C programs to access solve_VPSC (which is in C++)
+- *
+- * Authors:
+- *   Tim Dwyer &lt;tgdwyer@gmail.com&gt;
+- *
+- * Copyright (C) 2005 Authors
+- *
+- * Released under GNU LGPL.  Read the file 'COPYING' for more information.
+- */
+-#ifndef _CSOLVE_VPSC_H_
+-#define _CSOLVE_VPSC_H_
+-#ifdef __cplusplus
+-class vpsc::Variable;
+-class vpsc::Constraint;
+-class vpsc::Solver;
+-class vpsc::IncSolver;
+-using namespace vpsc;
+-extern &quot;C&quot; {
+-#else
+-typedef struct Variable Variable;
+-typedef struct Constraint Constraint;
+-typedef struct Solver Solver;
+-typedef struct IncSolver IncSolver;
+-#endif
+-Variable* newVariable(int id, double desiredPos, double weight);
+-void setVariableDesiredPos(Variable *, double desiredPos);
+-double getVariablePos(Variable*);
+-
+-Constraint* newConstraint(Variable* left, Variable* right, double gap);
+-
+-Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]);
+-void deleteSolver(Solver*);
+-void deleteConstraint(Constraint*);
+-void deleteVariable(Variable*);
+-Constraint** newConstraints(int m);
+-void deleteConstraints(int m,Constraint**);
+-void remapInConstraints(Variable *u, Variable *v, double dgap);
+-void remapOutConstraints(Variable *u, Variable *v, double dgap);
+-int getLeftVarID(Constraint *c);
+-int getRightVarID(Constraint *c);
+-double getSeparation(Constraint *c);
+-
+-#ifndef HAVE_POINTF_S
+-typedef struct pointf_s { double x, y; } pointf;
+-typedef struct { pointf LL, UR; } boxf;
+-#endif
+-int genXConstraints(int n, boxf[], Variable** vs, Constraint*** cs,
+-                int transitiveClosure);
+-int genYConstraints(int n, boxf[], Variable** vs, Constraint*** cs);
+-
+-void satisfyVPSC(Solver*);
+-void solveVPSC(Solver*);
+-Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]);
+-void splitIncSolver(IncSolver*);
+-int getSplitCnt(IncSolver *vpsc);
+-#ifdef __cplusplus
+-}
+-#endif
+-#endif /* _CSOLVE_VPSC_H_ */
+
+=== modified file 'src/remove-last.h'
+--- src/remove-last.h        2007-03-18 18:39:34 +0000
++++ src/remove-last.h        2013-11-13 21:17:28 +0000
+@@ -12,8 +12,9 @@

+     typename vector&lt;T&gt;::reverse_iterator i(find(seq.rbegin(), seq.rend(), elem));
+     g_assert( i != seq.rend() );
+-    typename vector&lt;T&gt;::iterator ii(&amp;*i);
+-    seq.erase(ii);
++    //typename vector&lt;T&gt;::iterator ii(&amp;*i);
++    //seq.erase(ii);
++        seq.erase(i.base());
+ }


+
+=== modified file 'src/sp-conn-end.cpp'
+--- src/sp-conn-end.cpp        2010-02-21 10:40:13 +0000
++++ src/sp-conn-end.cpp        2013-11-13 21:17:28 +0000
+@@ -152,7 +152,7 @@
+     // Set sensible values incase there the connector ends are not
+     // attached to any shapes.
+     Geom::PathVector conn_pv = path-&gt;curve-&gt;get_pathvector();
+-    double endPos[2] = { 0, conn_pv[0].size() };
++    double endPos[2] = { 0, static_cast&lt;double&gt;(conn_pv[0].size()) };

+     SPConnEnd** _connEnd = path-&gt;connEndPair.getConnEnds();
+     for (unsigned h = 0; h &lt; 2; ++h) {
+
+=== modified file 'src/sp-guide.cpp'
+--- src/sp-guide.cpp        2011-08-21 10:27:43 +0000
++++ src/sp-guide.cpp        2013-11-13 21:17:28 +0000
+@@ -281,10 +281,10 @@
+     Geom::Point B(C[Geom::X], 0);
+     Geom::Point D(0, C[Geom::Y]);

+-    pts.push_back(std::make_pair&lt;Geom::Point, Geom::Point&gt;(A, B));
+-    pts.push_back(std::make_pair&lt;Geom::Point, Geom::Point&gt;(B, C));
+-    pts.push_back(std::make_pair&lt;Geom::Point, Geom::Point&gt;(C, D));
+-    pts.push_back(std::make_pair&lt;Geom::Point, Geom::Point&gt;(D, A));
++    pts.push_back(std::make_pair(A, B));
++    pts.push_back(std::make_pair(B, C));
++    pts.push_back(std::make_pair(C, D));
++    pts.push_back(std::make_pair(D, A));

+     sp_guide_pt_pairs_to_guides(dt, pts);

+
+=== modified file 'src/sp-item-rm-unsatisfied-cns.cpp'
+--- src/sp-item-rm-unsatisfied-cns.cpp        2010-01-09 21:14:38 +0000
++++ src/sp-item-rm-unsatisfied-cns.cpp        2013-11-13 21:17:28 +0000
+@@ -24,8 +24,8 @@
+         if (!approx_equal( sp_guide_distance_from_pt(cn.g, snappoints[snappoint_ix].getPoint()), 0) ) {
+             remove_last(cn.g-&gt;attached_items, SPGuideAttachment(&amp;item, cn.snappoint_ix));
+             g_assert( i &lt; item.constraints.size() );
+-            vector&lt;SPGuideConstraint&gt;::iterator const ei(&amp;item.constraints[i]);
+-            item.constraints.erase(ei);
++            // vector&lt;SPGuideConstraint&gt;::iterator const ei(&amp;item.constraints[i]);
++            // item.constraints.erase(ei);
+         }
+     }
+ }
+
+=== modified file 'src/trace/siox.cpp'
+--- src/trace/siox.cpp        2009-01-23 21:55:34 +0000
++++ src/trace/siox.cpp        2013-11-13 21:17:28 +0000
+@@ -21,6 +21,7 @@
+ #include &lt;stdarg.h&gt;
+ #include &lt;map&gt;
+ #include &lt;algorithm&gt;
++#include &lt;cstdlib&gt;


+ namespace org
+
+=== modified file 'src/ui/dialog/filedialogimpl-win32.cpp'
+--- src/ui/dialog/filedialogimpl-win32.cpp        2012-04-04 19:54:14 +0000
++++ src/ui/dialog/filedialogimpl-win32.cpp        2013-11-13 21:17:28 +0000
+@@ -16,6 +16,7 @@
+ #endif

+ //General includes
++#include &lt;cmath&gt;
+ #include &lt;list&gt;
+ #include &lt;unistd.h&gt;
+ #include &lt;sys/stat.h&gt;
+@@ -931,8 +932,9 @@
+     const double scaledSvgHeight = scaleFactor * svgHeight;

+     Geom::Rect area(Geom::Point(0, 0), Geom::Point(scaledSvgWidth, scaledSvgHeight));
+-    NRRectL areaL = {0, 0, scaledSvgWidth, scaledSvgHeight};
+-    NRRectL bbox = {0, 0, scaledSvgWidth, scaledSvgHeight};
++    // assume that scaledSvgWidth and scaledSvgHeight are not bigger than largest int
++    NRRectL areaL = {0, 0, static_cast&lt;int&gt;(trunc(scaledSvgWidth)), static_cast&lt;int&gt;(trunc(scaledSvgHeight))};
++    NRRectL bbox =  {0, 0, static_cast&lt;int&gt;(trunc(scaledSvgWidth)), static_cast&lt;int&gt;(trunc(scaledSvgHeight))};

+     // write object bbox to area
+     Geom::OptRect maybeArea(area);
+
+=== modified file 'src/ui/tool/node.h'
+--- src/ui/tool/node.h        2012-01-23 22:51:19 +0000
++++ src/ui/tool/node.h        2013-11-13 21:17:28 +0000
+@@ -16,7 +16,13 @@
+ #include &lt;iosfwd&gt;
+ #include &lt;stdexcept&gt;
+ #include &lt;cstddef&gt;
++
++#if __cplusplus &gt;= 201103L
++#include &lt;functional&gt;
++#else
+ #include &lt;tr1/functional&gt;
++#endif
++
+ #include &lt;boost/utility.hpp&gt;
+ #include &lt;boost/shared_ptr.hpp&gt;
+ #include &lt;boost/optional.hpp&gt;
+@@ -32,11 +38,13 @@
+ }
+ }

++#if __cplusplus &lt; 201103L
+ namespace std {
+ namespace tr1 {
+ template &lt;typename N&gt; struct hash&lt; Inkscape::UI::NodeIterator&lt;N&gt; &gt;;
+ }
+ }
++#endif

+ namespace Inkscape {
+ namespace UI {
+
+=== modified file 'src/widgets/eek-preview.cpp'
+--- src/widgets/eek-preview.cpp        2009-03-23 03:16:48 +0000
++++ src/widgets/eek-preview.cpp        2013-11-13 21:17:28 +0000
+@@ -235,7 +235,7 @@

+         GdkGC *gc = gdk_gc_new( widget-&gt;window );
+         EekPreview* preview = EEK_PREVIEW(widget);
+-        GdkColor fg = {0, preview-&gt;_r, preview-&gt;_g, preview-&gt;_b};
++        GdkColor fg = {0, static_cast&lt;guint16&gt;(preview-&gt;_r), static_cast&lt;guint16&gt;(preview-&gt;_g), static_cast&lt;guint16&gt;(preview-&gt;_b)};

+         gdk_colormap_alloc_color( gdk_colormap_get_system(), &amp;fg, FALSE, TRUE );

+
+=== modified file 'src/widgets/sp-color-icc-selector.cpp'
+--- src/widgets/sp-color-icc-selector.cpp        2012-02-15 06:02:14 +0000
++++ src/widgets/sp-color-icc-selector.cpp        2013-11-13 21:17:28 +0000
+@@ -507,9 +507,9 @@
+                 if ( trans ) {
+                     guint32 val = _color.toRGBA32(0);
+                     guchar pre[4] = {
+-                        SP_RGBA32_R_U(val),
+-                        SP_RGBA32_G_U(val),
+-                        SP_RGBA32_B_U(val),
++                        static_cast&lt;guchar&gt;(SP_RGBA32_R_U(val)),
++                        static_cast&lt;guchar&gt;(SP_RGBA32_G_U(val)),
++                        static_cast&lt;guchar&gt;(SP_RGBA32_B_U(val)),
+                         255};
+ #ifdef DEBUG_LCMS
+                     g_message(&quot;Shoving in [%02x] [%02x] [%02x]&quot;, pre[0], pre[1], pre[2]);
+
+=== modified file 'src/xml/repr-io.cpp'
+--- src/xml/repr-io.cpp        2012-12-05 22:48:00 +0000
++++ src/xml/repr-io.cpp        2013-11-13 21:17:28 +0000
+@@ -88,7 +88,9 @@
+         }
+     }

+-    int setFile( char const * filename );
++    int setFile( char const * filename, bool load_entities );
++
++    xmlDocPtr readXml();

+     static int readCb( void * context, char * buffer, int len );
+     static int closeCb( void * context );
+@@ -102,12 +104,15 @@
+     FILE* fp;
+     unsigned char firstFew[4];
+     int firstFewLen;
++    bool LoadEntities; // Checks for SYSTEM Entities (requires cached data)
++    std::string cachedData;
++    unsigned int cachedPos;
+     Inkscape::URI dummy;
+     Inkscape::IO::UriInputStream* instr;
+     Inkscape::IO::GzipInputStream* gzin;
+ };

+-int XmlSource::setFile(char const *filename)
++int XmlSource::setFile(char const *filename, bool load_entities=false)
+ {
+     int retVal = -1;

+@@ -165,17 +170,67 @@
+         }
+     }

++    if(load_entities) {
++        this-&gt;cachedData = std::string(&quot;&quot;);
++        this-&gt;cachedPos = 0;
++ 
++        // First get data from file in typical way (cache it all)
++        char *buffer = new char [4096];
++        while(true) {
++            int len = this-&gt;read(buffer, 4096);
++            if(len &lt;= 0) break;
++            buffer[len] = 0;
++            this-&gt;cachedData += buffer;
++        }
++        free(buffer);
++ 
++        // Check for SYSTEM or PUBLIC entities and remove them from the cache
++        GMatchInfo *info;
++        gint start, end;
++ 
++        GRegex *regex = g_regex_new(
++            &quot;&lt;!ENTITY\\s+[^&gt;\\s]+\\s+(SYSTEM|PUBLIC\\s+\&quot;[^&gt;\&quot;]+\&quot;)\\s+\&quot;[^&gt;\&quot;]+\&quot;\\s*&gt;&quot;,
++            G_REGEX_CASELESS, G_REGEX_MATCH_NEWLINE_ANY, NULL);
++ 
++        g_regex_match (regex, this-&gt;cachedData.c_str(), G_REGEX_MATCH_NEWLINE_ANY, &amp;info);
++ 
++        while (g_match_info_matches (info)) {
++            if (g_match_info_fetch_pos (info, 1, &amp;start, &amp;end))
++                this-&gt;cachedData.erase(start, end - start);
++            g_match_info_next (info, NULL);
++        }
++        g_match_info_free(info);
++        g_regex_unref(regex);
++    }
++    // Do this after loading cache, so reads don't return cache to fill cache.
++    this-&gt;LoadEntities = load_entities;
+     return retVal;
+ }

++xmlDocPtr XmlSource::readXml()
++{
++    int parse_options = XML_PARSE_HUGE | XML_PARSE_RECOVER;
++ 
++    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
++    bool allowNetAccess = prefs-&gt;getBool(&quot;/options/externalresources/xml/allow_net_access&quot;, false);
++    if (!allowNetAccess) parse_options |= XML_PARSE_NONET;
++
++    // Allow NOENT only if we're filtering out SYSTEM and PUBLIC entities
++    if (LoadEntities)    parse_options |= XML_PARSE_NOENT;
++
++    return xmlReadIO( readCb, closeCb, this,
++                      filename, getEncoding(), parse_options);
++}

+ int XmlSource::readCb( void * context, char * buffer, int len )
+ {
+     int retVal = -1;
++
+     if ( context ) {
+         XmlSource* self = static_cast&lt;XmlSource*&gt;(context);
+         retVal = self-&gt;read( buffer, len );
+     }
++
+     return retVal;
+ }

+@@ -193,7 +248,15 @@
+     int retVal = 0;
+     size_t got = 0;

+-    if ( firstFewLen &gt; 0 ) {
++    if ( LoadEntities ) {
++        if (cachedPos &gt;= cachedData.length()) {
++            return -1;
++        } else {
++            retVal = cachedData.copy(buffer, len, cachedPos);
++            cachedPos += retVal;
++            return retVal; // Do NOT continue.
++        }
++    } else if ( firstFewLen &gt; 0 ) {
+         int some = (len &lt; firstFewLen) ? len : firstFewLen;
+         memcpy( buffer, firstFew, some );
+         if ( len &lt; firstFewLen ) {
+@@ -289,22 +352,19 @@
+         XmlSource src;

+         if ( (src.setFile(filename) == 0) ) {
+-            int parse_options = XML_PARSE_HUGE; // do not use XML_PARSE_NOENT ! see bug lp:1025185
+-            Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+-            bool allowNetAccess = prefs-&gt;getBool(&quot;/options/externalresources/xml/allow_net_access&quot;, false);
+-            if (!allowNetAccess) {
+-                parse_options |= XML_PARSE_NONET;
++            doc = src.readXml();
++            rdoc = sp_repr_do_read( doc, default_ns );
++            // For some reason, failed ns loading results in this
++            // We try a system check version of load with NOENT for adobe
++            if(rdoc &amp;&amp; strcmp(rdoc-&gt;root()-&gt;name(), &quot;ns:svg&quot;) == 0) {
++                xmlFreeDoc( doc );
++                src.setFile(filename, true);
++                doc = src.readXml();
++                rdoc = sp_repr_do_read( doc, default_ns );
+             }
+-            doc = xmlReadIO( XmlSource::readCb,
+-                             XmlSource::closeCb,
+-                             &amp;src,
+-                             localFilename,
+-                             src.getEncoding(),
+-                             parse_options);
+         }
+     }

+-    rdoc = sp_repr_do_read( doc, default_ns );
+     if ( doc ) {
+         xmlFreeDoc( doc );
+     }
+
+=== modified file 'src/extension/effect.cpp'
+--- src/extension/effect.cpp        2010-09-28 21:11:41 +0000
++++ src/extension/effect.cpp        2013-11-19 23:57:37 +0000
+@@ -36,7 +36,7 @@
+ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp)
+     : Extension(in_repr, in_imp),
+       _id_noprefs(Glib::ustring(get_id()) + &quot;.noprefs&quot;),
+-      _name_noprefs(Glib::ustring(get_name()) + _(&quot; (No preferences)&quot;)),
++      _name_noprefs(Glib::ustring(_(get_name())) + _(&quot; (No preferences)&quot;)),
+       _verb(get_id(), get_name(), NULL, NULL, this, true),
+       _verb_nopref(_id_noprefs.c_str(), _name_noprefs.c_str(), NULL, NULL, this, false),
+       _menu_node(NULL), _workingDialog(true),
+
+=== modified file 'src/extension/system.cpp'
+--- src/extension/system.cpp        2013-09-21 22:20:09 +0000
++++ src/extension/system.cpp        2013-11-19 23:57:37 +0000
+@@ -20,6 +20,7 @@

+ #include &lt;interface.h&gt;

++#include &lt;unistd.h&gt;
+ #include &quot;system.h&quot;
+ #include &quot;preferences.h&quot;
+ #include &quot;extension.h&quot;
+
+=== modified file 'src/libnrtype/FontFactory.h'
+--- src/libnrtype/FontFactory.h        2010-04-15 19:00:11 +0000
++++ src/libnrtype/FontFactory.h        2013-12-02 00:55:44 +0000
+@@ -31,7 +31,8 @@
+ #include &lt;pango/pangowin32.h&gt;
+ #else
+ #include &lt;pango/pangoft2.h&gt;
+-#include &lt;freetype/freetype.h&gt;
++#include &lt;ft2build.h&gt;
++#include FT_FREETYPE_H
+ #endif

+ namespace Glib
+
</ins></span></pre></div>
<a id="trunkdportsgraphicsinkscapefilespatchr9986thrur9987diff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/graphics/inkscape/files/patch-r9986-thru-r9987.diff (114210 => 114211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/inkscape/files/patch-r9986-thru-r9987.diff        2013-12-02 17:55:09 UTC (rev 114210)
+++ trunk/dports/graphics/inkscape/files/patch-r9986-thru-r9987.diff        2013-12-02 18:59:19 UTC (rev 114211)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-=== modified file 'src/extension/effect.cpp'
---- src/extension/effect.cpp        2010-09-28 21:11:41 +0000
-+++ src/extension/effect.cpp        2013-11-19 23:57:37 +0000
-@@ -36,7 +36,7 @@
- Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp)
-     : Extension(in_repr, in_imp),
-       _id_noprefs(Glib::ustring(get_id()) + &quot;.noprefs&quot;),
--      _name_noprefs(Glib::ustring(get_name()) + _(&quot; (No preferences)&quot;)),
-+      _name_noprefs(Glib::ustring(_(get_name())) + _(&quot; (No preferences)&quot;)),
-       _verb(get_id(), get_name(), NULL, NULL, this, true),
-       _verb_nopref(_id_noprefs.c_str(), _name_noprefs.c_str(), NULL, NULL, this, false),
-       _menu_node(NULL), _workingDialog(true),
-
-=== modified file 'src/extension/system.cpp'
---- src/extension/system.cpp        2013-09-21 22:20:09 +0000
-+++ src/extension/system.cpp        2013-11-19 23:57:37 +0000
-@@ -20,6 +20,7 @@

- #include &lt;interface.h&gt;

-+#include &lt;unistd.h&gt;
- #include &quot;system.h&quot;
- #include &quot;preferences.h&quot;
- #include &quot;extension.h&quot;
-
</del></span></pre>
</div>
</div>

</body>
</html>