[113401] trunk/dports/graphics/inkscape

devans at macports.org devans at macports.org
Fri Nov 15 07:48:44 PST 2013


Revision: 113401
          https://trac.macports.org/changeset/113401
Author:   devans at macports.org
Date:     2013-11-15 07:48:44 -0800 (Fri, 15 Nov 2013)
Log Message:
-----------
inkscape: patch to 0.48.x bzr 9985, all Mavericks/C++11 patches or equivalent now incorporated upstream.

Modified Paths:
--------------
    trunk/dports/graphics/inkscape/Portfile
    trunk/dports/graphics/inkscape/files/patch-python-configure.ac.diff

Added Paths:
-----------
    trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff

Removed Paths:
-------------
    trunk/dports/graphics/inkscape/files/patch-clang.diff

Modified: trunk/dports/graphics/inkscape/Portfile
===================================================================
--- trunk/dports/graphics/inkscape/Portfile	2013-11-15 14:41:25 UTC (rev 113400)
+++ trunk/dports/graphics/inkscape/Portfile	2013-11-15 15:48:44 UTC (rev 113401)
@@ -6,7 +6,7 @@
 name            inkscape
 conflicts       inkscape-devel
 version         0.48.4
-revision        17
+revision        18
 license         GPL-2 LGPL-2.1
 maintainers     devans
 categories      graphics gnome
@@ -48,7 +48,7 @@
                 port:gtkspell2
 
 patchfiles      patch-thru-r9971.diff \
-                patch-clang.diff \
+                patch-r9972-thru-r9985.diff \
                 patch-python-configure.ac.diff
 
 variant python26 conflicts python27 description {Configure to use Python version 2.6} {

Deleted: trunk/dports/graphics/inkscape/files/patch-clang.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-clang.diff	2013-11-15 14:41:25 UTC (rev 113400)
+++ trunk/dports/graphics/inkscape/files/patch-clang.diff	2013-11-15 15:48:44 UTC (rev 113401)
@@ -1,923 +0,0 @@
---- src/2geom/sbasis.h.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/2geom/sbasis.h	2013-10-26 06:50:20.000000000 -0700
-@@ -75,10 +75,18 @@
-         return d[i];
-     }
-     Linear& operator[](unsigned i) { return d.at(i); }
--    Linear const* begin() const { return (Linear const*)&*d.begin();}
--    Linear const* end() const { return (Linear const*)&*d.end();}
--    Linear* begin() { return (Linear*)&*d.begin();}
--    Linear* end() { return (Linear*)&*d.end();}
-+	
-+    //Linear const* begin() const { return (Linear const*)&*d.begin();}
-+    //Linear const* end() const { return (Linear const*)&*d.end();}
-+    //Linear* begin() { return (Linear*)&*d.begin();}
-+    //Linear* end() { return (Linear*)&*d.end();}
-+	
-+	std::vector<Linear>::const_iterator begin() const { return d.begin(); }
-+	std::vector<Linear>::const_iterator end() const { return d.end(); }
-+	
-+	std::vector<Linear>::iterator begin() { return d.begin(); }
-+	std::vector<Linear>::iterator end() { return d.end(); }
-+	
-     bool empty() const {return d.empty();}
-     Linear &back() {return d.back();}
-     Linear const &back() const {return d.back();}
-@@ -87,7 +95,11 @@
-     void resize(unsigned n, Linear const& 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<Linear>::iterator(before), src_begin, src_end);}
-+	
-+    void insert(std::vector<Linear>::iterator before, std::vector<Linear>::const_iterator src_begin, std::vector<Linear>::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& at(unsigned i) { return d.at(i);}
-     //void insert(Linear* before, int& n, Linear const &l) { d.insert(std::vector<Linear>::iterator(before), n, l);}
-@@ -283,7 +295,13 @@
- 
- inline SBasis truncate(SBasis const &a, unsigned terms) {
-     SBasis c;
--    c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
-+	
-+	std::vector<Linear>::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;
- }
- 
---- src/io/inkjar.h	2011-12-08 11:53:54 +0000
-+++ src/io/inkjar.h	2013-10-12 22:59:07 +0000
-@@ -27,6 +27,7 @@
- #endif
- 
- #include <glib.h>
-+#include <stdio.h>
- 
- 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;
-
---- src/io/uristream.cpp.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/io/uristream.cpp	2013-10-26 07:00:11.000000000 -0700
-@@ -104,7 +104,7 @@
-  *
-  */
- UriInputStream::UriInputStream(Inkscape::URI &source)
--                    throw (StreamException): uri(source)
-+                    : uri(source)
- {
-     //get information from uri
-     char const *schemestr = uri.getScheme();
-@@ -146,7 +146,7 @@
-  *
-  */
- UriInputStream::UriInputStream(FILE *source, Inkscape::URI &uri)
--    throw (StreamException): inf(source),
-+    : inf(source),
-                              uri(uri)
- {
-     scheme = SCHEME_FILE;
-@@ -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 &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->available();
- }
-@@ -273,7 +272,7 @@
- /**
-  *
-  */
--void UriReader::close() throw(StreamException)
-+void UriReader::close()
- {
-     inputStream->close();
- }
-@@ -281,7 +280,7 @@
- /**
-  *
-  */
--gunichar UriReader::get() throw(StreamException)
-+gunichar UriReader::get()
- {
-     gunichar ch = (gunichar)inputStream->get();
-     return ch;
-@@ -296,7 +295,7 @@
-  * Temporary kludge
-  */
- UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &destination)
--                    throw (StreamException): closed(false),
-+                    : closed(false),
-                                              ownsFile(false),
-                                              outf(fp),
-                                              uri(destination),
-@@ -312,7 +311,7 @@
-  *
-  */
- UriOutputStream::UriOutputStream(Inkscape::URI &destination)
--                    throw (StreamException): closed(false),
-+                    : closed(false),
-                                              ownsFile(true),
-                                              outf(NULL),
-                                              uri(destination),
-@@ -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 &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->close();
- }
-@@ -477,7 +475,7 @@
- /**
-  *
-  */
--void UriWriter::flush() throw(StreamException)
-+void UriWriter::flush()
- {
-     outputStream->flush();
- }
-@@ -485,7 +483,7 @@
- /**
-  *
-  */
--void UriWriter::put(gunichar ch) throw(StreamException)
-+void UriWriter::put(gunichar ch)
- {
-     int ich = (int)ch;
-     outputStream->put(ich);
---- src/io/uristream.h.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/io/uristream.h	2013-10-26 07:42:20.000000000 -0700
-@@ -35,17 +35,17 @@
- {
- 
- public:
--    UriInputStream(FILE *source, Inkscape::URI &uri) throw(StreamException);
-+    UriInputStream(FILE *source, Inkscape::URI &uri);
- 
--    UriInputStream(Inkscape::URI &source) throw(StreamException);
-+    UriInputStream(Inkscape::URI &source);
- 
--    virtual ~UriInputStream() throw(StreamException);
-+    virtual ~UriInputStream();
- 
--    virtual int available() throw(StreamException);
-+    virtual int available();
- 
--    virtual void close() throw(StreamException);
-+    virtual void close();
- 
--    virtual int get() throw(StreamException);
-+    virtual int get();
- 
- private:
- 
-@@ -74,15 +74,15 @@
- 
- public:
- 
--    UriReader(Inkscape::URI &source) throw(StreamException);
-+    UriReader(Inkscape::URI &source);
- 
--    virtual ~UriReader() throw(StreamException);
-+    virtual ~UriReader();
- 
--    virtual int available() throw(StreamException);
-+    virtual int available();
- 
--    virtual void close() throw(StreamException);
-+    virtual void close();
- 
--    virtual gunichar get() throw(StreamException);
-+    virtual gunichar get();
- 
- private:
- 
-@@ -106,17 +106,17 @@
- 
- public:
- 
--    UriOutputStream(FILE *fp, Inkscape::URI &destination) throw(StreamException);
-+    UriOutputStream(FILE *fp, Inkscape::URI &destination);
- 
--    UriOutputStream(Inkscape::URI &destination) throw(StreamException);
-+    UriOutputStream(Inkscape::URI &destination);
- 
--    virtual ~UriOutputStream() throw(StreamException);
-+    virtual ~UriOutputStream();
- 
--    virtual void close() throw(StreamException);
-+    virtual void close();
- 
--    virtual void flush() throw(StreamException);
-+    virtual void flush();
- 
--    virtual void put(int ch) throw(StreamException);
-+    virtual void put(int ch);
- 
- private:
- 
-@@ -145,15 +145,15 @@
- 
- public:
- 
--    UriWriter(Inkscape::URI &source) throw(StreamException);
-+    UriWriter(Inkscape::URI &source);
- 
--    virtual ~UriWriter() throw(StreamException);
-+    virtual ~UriWriter();
- 
--    virtual void close() throw(StreamException);
-+    virtual void close();
- 
--    virtual void flush() throw(StreamException);
-+    virtual void flush();
- 
--    virtual void put(gunichar ch) throw(StreamException);
-+    virtual void put(gunichar ch);
- 
- private:
- 
---- src/io/xsltstream.cpp.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/io/xsltstream.cpp	2013-10-26 07:04:51.000000000 -0700
-@@ -30,7 +30,6 @@
-  *
-  */
- XsltStyleSheet::XsltStyleSheet(InputStream &xsltSource)
--               throw (StreamException)
-                    : stylesheet(NULL)
- {
-     if (!read(xsltSource)) {
-@@ -86,7 +85,6 @@
-  *
-  */ 
- XsltInputStream::XsltInputStream(InputStream &xmlSource, XsltStyleSheet &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 &dest, XsltStyleSheet &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);
---- src/io/xsltstream.h.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/io/xsltstream.h	2013-10-26 07:07:49.000000000 -0700
-@@ -38,7 +38,7 @@
-     /**
-      * Constructor with loading
-      */
--    XsltStyleSheet(InputStream &source)  throw (StreamException);
-+    XsltStyleSheet(InputStream &source);
- 
-     /**
-      * Simple constructor, no loading
-@@ -73,16 +73,15 @@
- 
- public:
- 
--    XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet)
--                        throw (StreamException);
-+    XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet);
-     
--    virtual ~XsltInputStream() throw (StreamException);
-+    virtual ~XsltInputStream();
-     
--    virtual int available() throw (StreamException);
-+    virtual int available();
-     
--    virtual void close() throw (StreamException);
-+    virtual void close();
-     
--    virtual int get() throw (StreamException);
-+    virtual int get();
-     
- 
- private:
-@@ -110,16 +109,15 @@
- 
- public:
- 
--    XsltOutputStream(OutputStream &destination, XsltStyleSheet &stylesheet)
--                             throw (StreamException);
-+    XsltOutputStream(OutputStream &destination, XsltStyleSheet &stylesheet);
-     
--    virtual ~XsltOutputStream() throw (StreamException);
-+    virtual ~XsltOutputStream();
-     
--    virtual void close() throw (StreamException);
-+    virtual void close();
-     
--    virtual void flush() throw (StreamException);
-+    virtual void flush();
-     
--    virtual void put(int ch) throw (StreamException);
-+    virtual void put(int ch);
- 
- private:
- 
---- src/libgdl/gdl-dock-object.h.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/libgdl/gdl-dock-object.h	2013-10-26 06:50:20.000000000 -0700
-@@ -215,7 +215,7 @@
-     G_STMT_START {                            \
-     g_log (G_LOG_DOMAIN,                      \
- 	   G_LOG_LEVEL_DEBUG,                 \
--           "%s:%d (%s) %s [%p %d%s:%d]: "format, \
-+           "%s:%d (%s) %s [%p %d%s:%d]: " format, \
- 	   __FILE__,                          \
- 	   __LINE__,                          \
- 	   __PRETTY_FUNCTION__,               \
---- src/libnrtype/Layout-TNG-OutIter.cpp.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/libnrtype/Layout-TNG-OutIter.cpp	2013-10-26 06:50:20.000000000 -0700
-@@ -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 < _input_stream.size() ; source_index++)
-+        if (_input_stream[source_index]->source_cookie == source_cookie) break;
-+    if (source_index == _input_stream.size()) return end();
-+	
-+    unsigned char_index = _sourceToCharacter(source_index);
-+    
-+    if (_input_stream[source_index]->Type() != TEXT_SOURCE)
-+        return iterator(this, char_index);
-+	
-+    InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(_input_stream[source_index]);
-+    //if (text_iterator <= text_source->text_begin) return iterator(this, char_index);
-+	return iterator(this, char_index);
- }
- 
- Geom::OptRect Layout::glyphBoundingBox(iterator const &it, double *rotation) const
-@@ -506,18 +522,23 @@
-     *source_cookie = stream_item->source_cookie;
-     if (text_iterator && stream_item->Type() == TEXT_SOURCE) {
-         InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(stream_item);
--        Glib::ustring::const_iterator text_iter_const = text_source->text_begin;
-+        //Glib::ustring::const_iterator text_iter_const = text_source->text_begin;
-+        Glib::ustring::iterator text_iter = const_cast<Glib::ustring*>(text_source->text)->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 && _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->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base());
--        *text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast<char*>(&*text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base()))));
-+        //text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base());
-+        
-+		// FIXME C++11
-+		//*text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast<char*>(&*text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base()))));
-              // the caller owns the string, so they're going to want a non-const iterator
-+        *text_iterator = text_iter;
-     }
- }
- 
---- src/remove-last.h	2010-11-17 02:12:56 +0000
-+++ src/remove-last.h	2013-10-12 21:45:26 +0000
-@@ -12,8 +12,9 @@
- 
-     typename vector<T>::reverse_iterator i(find(seq.rbegin(), seq.rend(), elem));
-     g_assert( i != seq.rend() );
--    typename vector<T>::iterator ii(&*i);
--    seq.erase(ii);
-+    //typename vector<T>::iterator ii(&*i);
-+    //seq.erase(ii);
-+	seq.erase(i.base());
- }
- 
- 
-
---- src/sp-item-rm-unsatisfied-cns.cpp.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/sp-item-rm-unsatisfied-cns.cpp	2013-10-26 07:12:42.000000000 -0700
-@@ -24,8 +24,8 @@
-         if (!approx_equal( sp_guide_distance_from_pt(cn.g, snappoints[snappoint_ix].getPoint()), 0) ) {
-             remove_last(cn.g->attached_items, SPGuideAttachment(&item, cn.snappoint_ix));
-             g_assert( i < item.constraints.size() );
--            vector<SPGuideConstraint>::iterator const ei(&item.constraints[i]);
--            item.constraints.erase(ei);
-+            // vector<SPGuideConstraint>::iterator const ei(&item.constraints[i]);
-+            // item.constraints.erase(ei);
-         }
-     }
- }
---- src/trace/siox.cpp.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/trace/siox.cpp	2013-10-26 06:50:20.000000000 -0700
-@@ -21,6 +21,7 @@
- #include <stdarg.h>
- #include <map>
- #include <algorithm>
-+#include <cstdlib>
- 
- 
- namespace org
---- src/ui/tool/node.h.orig	2012-02-13 19:22:17.000000000 -0800
-+++ src/ui/tool/node.h	2013-10-26 07:20:46.000000000 -0700
-@@ -16,7 +16,13 @@
- #include <iosfwd>
- #include <stdexcept>
- #include <cstddef>
-+
-+#if __cplusplus >= 201103L
-+#include <functional>
-+#else
- #include <tr1/functional>
-+#endif
-+
- #include <boost/utility.hpp>
- #include <boost/shared_ptr.hpp>
- #include <boost/optional.hpp>
-@@ -32,11 +38,13 @@
- }
- }
- 
-+#if __cplusplus < 201103L
- namespace std {
- namespace tr1 {
- template <typename N> struct hash< Inkscape::UI::NodeIterator<N> >;
- }
- }
-+#endif
- 
- namespace Inkscape {
- namespace UI {
---- src/color-profile.cpp.orig	2013-10-26 08:40:40.000000000 -0700
-+++ src/color-profile.cpp	2013-10-26 08:42:22.000000000 -0700
-@@ -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<guchar>(SP_RGBA32_R_U(val)),
-+        static_cast<guchar>(SP_RGBA32_G_U(val)),
-+        static_cast<guchar>(SP_RGBA32_B_U(val)),
-         255};
-     cmsDoTransform(ColorProfile::getTransfGamutCheck(), &check_color, &outofgamut, 1);
- 
---- src/libgdl/gdl-tools.h.orig	2013-10-26 08:53:53.000000000 -0700
-+++ src/libgdl/gdl-tools.h	2013-10-26 08:54:34.000000000 -0700
-@@ -48,7 +48,7 @@
- #define GDL_TRACE_EXTRA(format, args...) G_STMT_START {     \
-     g_log (G_LOG_DOMAIN,                      \
- 	   G_LOG_LEVEL_DEBUG,                 \
--	   "file %s: line %d (%s): "format,   \
-+	   "file %s: line %d (%s): " format,   \
- 	   __FILE__,                          \
- 	   __LINE__,                          \
- 	   __PRETTY_FUNCTION__,               \
---- src/sp-conn-end.cpp.orig	2013-10-26 09:04:30.000000000 -0700
-+++ src/sp-conn-end.cpp	2013-10-26 09:05:16.000000000 -0700
-@@ -152,7 +152,7 @@
-     // Set sensible values incase there the connector ends are not
-     // attached to any shapes.
-     Geom::PathVector conn_pv = path->curve->get_pathvector();
--    double endPos[2] = { 0, conn_pv[0].size() };
-+    double endPos[2] = { 0, static_cast<double>(conn_pv[0].size()) };
- 
-     SPConnEnd** _connEnd = path->connEndPair.getConnEnds();
-     for (unsigned h = 0; h < 2; ++h) {
---- src/sp-guide.cpp.orig	2013-10-26 09:15:28.000000000 -0700
-+++ src/sp-guide.cpp	2013-10-26 09:20:06.000000000 -0700
-@@ -281,10 +281,10 @@
-     Geom::Point B(C[Geom::X], 0);
-     Geom::Point D(0, C[Geom::Y]);
- 
--    pts.push_back(std::make_pair<Geom::Point, Geom::Point>(A, B));
--    pts.push_back(std::make_pair<Geom::Point, Geom::Point>(B, C));
--    pts.push_back(std::make_pair<Geom::Point, Geom::Point>(C, D));
--    pts.push_back(std::make_pair<Geom::Point, Geom::Point>(D, A));
-+    pts.push_back(std::pair<Geom::Point, Geom::Point>(A, B));
-+    pts.push_back(std::pair<Geom::Point, Geom::Point>(B, C));
-+    pts.push_back(std::pair<Geom::Point, Geom::Point>(C, D));
-+    pts.push_back(std::pair<Geom::Point, Geom::Point>(D, A));
- 
-     sp_guide_pt_pairs_to_guides(dt, pts);
- 
---- src/widgets/eek-preview.cpp.orig	2013-10-26 09:40:36.000000000 -0700
-+++ src/widgets/eek-preview.cpp	2013-10-26 09:42:13.000000000 -0700
-@@ -235,7 +235,7 @@
- 
-         GdkGC *gc = gdk_gc_new( widget->window );
-         EekPreview* preview = EEK_PREVIEW(widget);
--        GdkColor fg = {0, preview->_r, preview->_g, preview->_b};
-+        GdkColor fg = {0, static_cast<guint16>(preview->_r), static_cast<guint16>(preview->_g), static_cast<guint16>(preview->_b)};
- 
-         gdk_colormap_alloc_color( gdk_colormap_get_system(), &fg, FALSE, TRUE );
- 
---- src/widgets/sp-color-icc-selector.cpp.orig	2013-10-26 10:59:14.000000000 -0700
-+++ src/widgets/sp-color-icc-selector.cpp	2013-10-26 11:01:08.000000000 -0700
-@@ -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<guchar>(SP_RGBA32_R_U(val)),
-+                        static_cast<guchar>(SP_RGBA32_G_U(val)),
-+                        static_cast<guchar>(SP_RGBA32_B_U(val)),
-                         255};
- #ifdef DEBUG_LCMS
-                     g_message("Shoving in [%02x] [%02x] [%02x]", pre[0], pre[1], pre[2]);
---- src/dom/svgimpl.cpp.orig	2013-10-26 11:23:19.000000000 -0700
-+++ src/dom/svgimpl.cpp	2013-10-26 11:24:35.000000000 -0700
-@@ -119,7 +119,7 @@
-     { "SVGUnitTypes",                 SVG_UNIT_TYPES                  },
-     { "SVGURIReference",              SVG_URI_REFERENCE               },
-     { "SVGViewSpec",                  SVG_VIEW_SPEC                   },
--    { "SVGZoomAndPan",                SVG_ZOOM_AND_PAN                }
-+    { "SVGZoomAndPan",                static_cast<int>(SVG_ZOOM_AND_PAN)}
- };
- 
- 
---- src/dom/io/uristream.h.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/dom/io/uristream.h	2013-10-27 12:29:54.000000000 -0700
-@@ -67,7 +67,7 @@
- 
-     UriInputStream(const URI &source) throw(StreamException);
- 
--    virtual ~UriInputStream() throw(StreamException);
-+    virtual ~UriInputStream();
- 
-     virtual int available() throw(StreamException);
- 
-@@ -108,7 +108,7 @@
- 
-     UriReader(const URI &source) throw(StreamException);
- 
--    virtual ~UriReader() throw(StreamException);
-+    virtual ~UriReader();
- 
-     virtual int available() throw(StreamException);
- 
-@@ -140,7 +140,7 @@
- 
-     UriOutputStream(const URI &destination) throw(StreamException);
- 
--    virtual ~UriOutputStream() throw(StreamException);
-+    virtual ~UriOutputStream();
- 
-     virtual void close() throw(StreamException);
- 
-@@ -181,7 +181,7 @@
- 
-     UriWriter(const URI &source) throw(StreamException);
- 
--    virtual ~UriWriter() throw(StreamException);
-+    virtual ~UriWriter();
- 
-     virtual void close() throw(StreamException);
- 
---- src/dom/io/uristream.cpp.orig	2011-07-08 11:25:09.000000000 -0700
-+++ src/dom/io/uristream.cpp	2013-10-27 13:04:35.000000000 -0700
-@@ -116,7 +116,7 @@
- /**
-  *
-  */
--UriInputStream::~UriInputStream() throw(StreamException)
-+UriInputStream::~UriInputStream()
- {
-     close();
- }
-@@ -240,7 +240,7 @@
- /**
-  *
-  */
--UriReader::~UriReader() throw (StreamException)
-+UriReader::~UriReader()
- {
-     delete inputStream;
- }
-@@ -328,7 +328,7 @@
- /**
-  *
-  */
--UriOutputStream::~UriOutputStream() throw(StreamException)
-+UriOutputStream::~UriOutputStream()
- {
-     close();
- }
-@@ -445,7 +445,7 @@
- /**
-  *
-  */
--UriWriter::~UriWriter() throw (StreamException)
-+UriWriter::~UriWriter()
- {
-     delete outputStream;
- }
---- src/io/inkjar.cpp.orig	2012-02-13 19:22:17.000000000 -0800
-+++ src/io/inkjar.cpp	2013-10-28 04:39:40.000000000 -0700
-@@ -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 <cstdio>
-+
- bool JarFile::open()
- {
--    if ((fd = ::open(_filename, O_RDONLY)) < 0) {
-+    if ((fd = fopen(_filename, O_RDONLY)) < 0) {
- 	fprintf(stderr, "open failed.\n");
- 	return false;
-     }
-@@ -116,7 +119,7 @@
- 
- bool JarFile::close()
- {
--    if (fd >= 0 && !::close(fd)) {
-+    if (fd >= 0 && !fclose(fd)) {
- 	inflateEnd(&_zs);
- 	return true;
-     }
-@@ -256,7 +259,7 @@
-     
-     if (method == 8 || flags & 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("%d bytes written\n", out_a);
- #endif
-     }
--    lseek(fd, eflen, SEEK_CUR);
-     g_free(bytes);
-+    fseek(fd, eflen, SEEK_CUR);
- 
-     if (!check_crc(crc, crc2, flags)) {
-         bytes = gba->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, "read error\n");
- 	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 < RDSZ ? leftover_in : RDSZ))) 
- 		< 0) {
-+*/
-+if ((nbytes = fread(in_buffer, 1, (leftover_in < RDSZ ? leftover_in : RDSZ), fd))
-+< 0) {
- 		fprintf(stderr, "jarfile read error");
- 	    }
- 	    _zs.avail_in = nbytes;
-@@ -537,7 +544,8 @@
- 		}
- 	    }
- 	} else if (gba->len > 0)
--	    ::write(1, gba->data, gba->len);
-+	    //::write(1, gba->data, gba->len);
-+fwrite(gba->data, 1, gba-len, stdout);
- 	else
- 	    break;
-     }

Modified: trunk/dports/graphics/inkscape/files/patch-python-configure.ac.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-python-configure.ac.diff	2013-11-15 14:41:25 UTC (rev 113400)
+++ trunk/dports/graphics/inkscape/files/patch-python-configure.ac.diff	2013-11-15 15:48:44 UTC (rev 113401)
@@ -1,6 +1,6 @@
---- configure.ac.orig	2013-10-23 10:16:59.000000000 -0700
-+++ configure.ac	2013-10-23 10:20:12.000000000 -0700
-@@ -431,11 +431,11 @@
+--- configure.ac.orig	2013-11-13 13:32:49.000000000 -0800
++++ configure.ac	2013-11-13 13:32:50.000000000 -0800
+@@ -434,11 +434,11 @@
              [with_python=$withval], [with_python=skipped])
  
  if test "x$with_python" = "xyes"; then

Added: trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff	                        (rev 0)
+++ trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff	2013-11-15 15:48:44 UTC (rev 113401)
@@ -0,0 +1,1670 @@
+=== 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 "x$openmp_ok" = "xyes"; then
+ 	dnl We have it, now set up the flags
+ 	CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+-	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& operator[](unsigned i) { return d.at(i); }
+-    Linear const* begin() const { return (Linear const*)&*d.begin();}
+-    Linear const* end() const { return (Linear const*)&*d.end();}
+-    Linear* begin() { return (Linear*)&*d.begin();}
+-    Linear* end() { return (Linear*)&*d.end();}
++	
++    //Linear const* begin() const { return (Linear const*)&*d.begin();}
++    //Linear const* end() const { return (Linear const*)&*d.end();}
++    //Linear* begin() { return (Linear*)&*d.begin();}
++    //Linear* end() { return (Linear*)&*d.end();}
++	
++	std::vector<Linear>::const_iterator begin() const { return d.begin(); }
++	std::vector<Linear>::const_iterator end() const { return d.end(); }
++	
++	std::vector<Linear>::iterator begin() { return d.begin(); }
++	std::vector<Linear>::iterator end() { return d.end(); }
++	
+     bool empty() const {return d.empty();}
+     Linear &back() {return d.back();}
+     Linear const &back() const {return d.back();}
+@@ -87,7 +95,11 @@
+     void resize(unsigned n, Linear const& 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<Linear>::iterator(before), src_begin, src_end);}
++	
++    void insert(std::vector<Linear>::iterator before, std::vector<Linear>::const_iterator src_begin, std::vector<Linear>::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& at(unsigned i) { return d.at(i);}
+     //void insert(Linear* before, int& n, Linear const &l) { d.insert(std::vector<Linear>::iterator(before), n, l);}
+@@ -283,7 +295,13 @@
+ 
+ inline SBasis truncate(SBasis const &a, unsigned terms) {
+     SBasis c;
+-    c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
++	
++	std::vector<Linear>::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<guchar>(SP_RGBA32_R_U(val)),
++        static_cast<guchar>(SP_RGBA32_G_U(val)),
++        static_cast<guchar>(SP_RGBA32_B_U(val)),
+         255};
+     cmsDoTransform(ColorProfile::getTransfGamutCheck(), &check_color, &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 &source)
+-                    throw (StreamException): uri((URI &)source)
++    : uri((URI &)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 &uri) throw (StreamException)
++UriReader::UriReader(const URI &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->available();
+ }
+@@ -256,7 +256,7 @@
+ /**
+  *
+  */
+-void UriReader::close() throw(StreamException)
++void UriReader::close()
+ {
+     inputStream->close();
+ }
+@@ -264,7 +264,7 @@
+ /**
+  *
+  */
+-int UriReader::get() throw(StreamException)
++int UriReader::get()
+ {
+     int ch = (int)inputStream->get();
+     return ch;
+@@ -279,10 +279,10 @@
+  *
+  */
+ UriOutputStream::UriOutputStream(const URI &destination)
+-                    throw (StreamException): closed(false),
+-                                             ownsFile(true),
+-                                             outf(NULL),
+-                                             uri((URI &)destination)
++    : closed(false),
++      ownsFile(true),
++      outf(NULL),
++      uri((URI &)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 &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->close();
+ }
+@@ -461,7 +460,7 @@
+ /**
+  *
+  */
+-void UriWriter::flush() throw(StreamException)
++void UriWriter::flush()
+ {
+     outputStream->flush();
+ }
+@@ -469,7 +468,7 @@
+ /**
+  *
+  */
+-int UriWriter::put(XMLCh ch) throw(StreamException)
++int UriWriter::put(XMLCh ch)
+ {
+     int ich = (int)ch;
+     if (outputStream->put(ich) < 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 &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 &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 &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 &source);
++
++    virtual ~UriReader();
++
++    virtual int available();
++
++    virtual void close();
++
++    virtual int get();
+ 
+ private:
+ 
+@@ -138,19 +138,19 @@
+ 
+ public:
+ 
+-    UriOutputStream(const URI &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 &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 &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 &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 "unknown" if not found
+  */
+-const char *svgInterfaceEnumToStr(int type)
++const char *svgInterfaceEnumToStr(unsigned int type)
+ {
+-    if (type < 1 || type > (int)SVG_ZOOM_AND_PAN)
++    if (type < 1 || type > SVG_ZOOM_AND_PAN)
+         return "unknown";
+     SVGTableEntry *entry = interfaceTable;
+     for (int i = 0 ; i < 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 <cstdio>
++
+ bool JarFile::open()
+ {
+-    if ((fd = ::open(_filename, O_RDONLY)) < 0) {
++    if ((fd = fopen(_filename, O_RDONLY)) < 0) {
+ 	fprintf(stderr, "open failed.\n");
+ 	return false;
+     }
+@@ -116,7 +119,7 @@
+ 
+ bool JarFile::close()
+ {
+-    if (fd >= 0 && !::close(fd)) {
++    if (fd >= 0 && !fclose(fd)) {
+ 	inflateEnd(&_zs);
+ 	return true;
+     }
+@@ -256,7 +259,7 @@
+     
+     if (method == 8 || flags & 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("%d bytes written\n", out_a);
+ #endif
+     }
+-    lseek(fd, eflen, SEEK_CUR);
+     g_free(bytes);
++    fseek(fd, eflen, SEEK_CUR);
+ 
+     if (!check_crc(crc, crc2, flags)) {
+         bytes = gba->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, "read error\n");
+ 	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 < RDSZ ? leftover_in : RDSZ))) 
+ 		< 0) {
++*/
++if ((nbytes = fread(in_buffer, 1, (leftover_in < RDSZ ? leftover_in : RDSZ), fd))
++< 0) {
+ 		fprintf(stderr, "jarfile read error");
+ 	    }
+ 	    _zs.avail_in = nbytes;
+@@ -537,7 +544,8 @@
+ 		}
+ 	    }
+ 	} else if (gba->len > 0)
+-	    ::write(1, gba->data, gba->len);
++	    //::write(1, gba->data, gba->len);
++fwrite(gba->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 <glib.h>
++#include <stdio.h>
+ 
+ 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 &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 &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 &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->available();
+ }
+@@ -273,7 +272,7 @@
+ /**
+  *
+  */
+-void UriReader::close() throw(StreamException)
++void UriReader::close()
+ {
+     inputStream->close();
+ }
+@@ -281,7 +280,7 @@
+ /**
+  *
+  */
+-gunichar UriReader::get() throw(StreamException)
++gunichar UriReader::get()
+ {
+     gunichar ch = (gunichar)inputStream->get();
+     return ch;
+@@ -296,11 +295,11 @@
+  * Temporary kludge
+  */
+ UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &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 = "UriOutputStream given null file ";
+@@ -312,11 +311,11 @@
+  *
+  */
+ UriOutputStream::UriOutputStream(Inkscape::URI &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 &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->close();
+ }
+@@ -477,7 +475,7 @@
+ /**
+  *
+  */
+-void UriWriter::flush() throw(StreamException)
++void UriWriter::flush()
+ {
+     outputStream->flush();
+ }
+@@ -485,7 +483,7 @@
+ /**
+  *
+  */
+-void UriWriter::put(gunichar ch) throw(StreamException)
++void UriWriter::put(gunichar ch)
+ {
+     int ich = (int)ch;
+     outputStream->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 &uri) throw(StreamException);
+-
+-    UriInputStream(Inkscape::URI &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 &uri);
++
++    UriInputStream(Inkscape::URI &source);
++
++    virtual ~UriInputStream();
++
++    virtual int available();
++
++    virtual void close();
++
++    virtual int get();
+ 
+ private:
+ 
+@@ -74,15 +74,15 @@
+ 
+ public:
+ 
+-    UriReader(Inkscape::URI &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 &source);
++
++    virtual ~UriReader();
++
++    virtual int available();
++
++    virtual void close();
++
++    virtual gunichar get();
+ 
+ private:
+ 
+@@ -106,17 +106,17 @@
+ 
+ public:
+ 
+-    UriOutputStream(FILE *fp, Inkscape::URI &destination) throw(StreamException);
+-
+-    UriOutputStream(Inkscape::URI &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 &destination);
++
++    UriOutputStream(Inkscape::URI &destination);
++
++    virtual ~UriOutputStream();
++
++    virtual void close();
++
++    virtual void flush();
++
++    virtual void put(int ch);
+ 
+ private:
+ 
+@@ -145,15 +145,15 @@
+ 
+ public:
+ 
+-    UriWriter(Inkscape::URI &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 &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 &xsltSource)
+-               throw (StreamException)
+                    : stylesheet(NULL)
+ {
+     if (!read(xsltSource)) {
+@@ -86,7 +85,6 @@
+  *
+  */ 
+ XsltInputStream::XsltInputStream(InputStream &xmlSource, XsltStyleSheet &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 &dest, XsltStyleSheet &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 &source)  throw (StreamException);
++    XsltStyleSheet(InputStream &source) ;
+ 
+     /**
+      * Simple constructor, no loading
+@@ -73,16 +73,15 @@
+ 
+ public:
+ 
+-    XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet)
+-                        throw (StreamException);
+-    
+-    virtual ~XsltInputStream() throw (StreamException);
+-    
+-    virtual int available() throw (StreamException);
+-    
+-    virtual void close() throw (StreamException);
+-    
+-    virtual int get() throw (StreamException);
++    XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet);
++    
++    virtual ~XsltInputStream();
++    
++    virtual int available();
++    
++    virtual void close();
++    
++    virtual int get();
+     
+ 
+ private:
+@@ -110,16 +109,15 @@
+ 
+ public:
+ 
+-    XsltOutputStream(OutputStream &destination, XsltStyleSheet &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 &destination, XsltStyleSheet &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,                 \
+-           "%s:%d (%s) %s [%p %d%s:%d]: "format, \
++           "%s:%d (%s) %s [%p %d%s:%d]: " 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,                 \
+-	   "file %s: line %d (%s): "format,   \
++	   "file %s: line %d (%s): " 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 < _input_stream.size() ; source_index++)
++        if (_input_stream[source_index]->source_cookie == source_cookie) break;
++    if (source_index == _input_stream.size()) return end();
++	
++    unsigned char_index = _sourceToCharacter(source_index);
++    
++    if (_input_stream[source_index]->Type() != TEXT_SOURCE)
++        return iterator(this, char_index);
++	
++    InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(_input_stream[source_index]);
++    //if (text_iterator <= text_source->text_begin) return iterator(this, char_index);
++	return iterator(this, char_index);
+ }
+ 
+ Geom::OptRect Layout::glyphBoundingBox(iterator const &it, double *rotation) const
+@@ -506,18 +522,23 @@
+     *source_cookie = stream_item->source_cookie;
+     if (text_iterator && stream_item->Type() == TEXT_SOURCE) {
+         InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(stream_item);
+-        Glib::ustring::const_iterator text_iter_const = text_source->text_begin;
++        //Glib::ustring::const_iterator text_iter_const = text_source->text_begin;
++        Glib::ustring::iterator text_iter = const_cast<Glib::ustring*>(text_source->text)->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 && _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->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base());
+-        *text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast<char*>(&*text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base()))));
++        //text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base());
++        
++		// FIXME C++11
++		//*text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast<char*>(&*text_source->text->begin().base() + (text_iter_const.base() - text_source->text->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 <tgdwyer at gmail.com>
+- *
+- * Copyright (C) 2005 Authors
+- *
+- * Released under GNU LGPL.  Read the file 'COPYING' for more information.
+- */
+-#include <iostream>
+-#include <cassert>
+-#include <cstdlib>
+-#include "variable.h"
+-#include "constraint.h"
+-#include "generate-constraints.h"
+-#include "solve_VPSC.h"
+-#include "csolve_VPSC.h"
+-using namespace vpsc;
+-extern "C" {
+-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<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<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<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<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<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->satisfy();
+-	} catch(const char *e) {
+-		std::cerr << e << std::endl;
+-		exit(1);
+-	}
+-}
+-int getSplitCnt(IncSolver *vpsc) {
+-	return vpsc->splitCnt;
+-}
+-void deleteVPSC(Solver *vpsc) {
+-	assert(vpsc!=NULL);
+-	delete vpsc;
+-}
+-void solveVPSC(Solver* vpsc) {
+-	vpsc->solve();
+-}
+-void splitIncVPSC(IncSolver* vpsc) {
+-	vpsc->splitBlocks();
+-}
+-void setVariableDesiredPos(Variable *v, double desiredPos) {
+-	v->desiredPosition = desiredPos;
+-}
+-double getVariablePos(Variable *v) {
+-	return v->position();
+-}
+-void remapInConstraints(Variable *u, Variable *v, double dgap) {
+-	for(Constraints::iterator i=u->in.begin();i!=u->in.end();i++) {
+-		Constraint* c=*i;	
+-		c->right=v;
+-		c->gap+=dgap;
+-		v->in.push_back(c);
+-	}
+-	u->in.clear();
+-}
+-void remapOutConstraints(Variable *u, Variable *v, double dgap) {
+-	for(Constraints::iterator i=u->out.begin();i!=u->out.end();i++) {
+-		Constraint* c=*i;	
+-		c->left=v;
+-		c->gap+=dgap;
+-		v->out.push_back(c);
+-	}
+-	u->out.clear();
+-}
+-int getLeftVarID(Constraint *c) {
+-	return c->left->id;
+-}
+-int getRightVarID(Constraint *c){
+-	return c->right->id;
+-}
+-double getSeparation(Constraint *c){
+-	return c->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 <tgdwyer at gmail.com>
+- *
+- * 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 "C" {
+-#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<T>::reverse_iterator i(find(seq.rbegin(), seq.rend(), elem));
+     g_assert( i != seq.rend() );
+-    typename vector<T>::iterator ii(&*i);
+-    seq.erase(ii);
++    //typename vector<T>::iterator ii(&*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->curve->get_pathvector();
+-    double endPos[2] = { 0, conn_pv[0].size() };
++    double endPos[2] = { 0, static_cast<double>(conn_pv[0].size()) };
+ 
+     SPConnEnd** _connEnd = path->connEndPair.getConnEnds();
+     for (unsigned h = 0; h < 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<Geom::Point, Geom::Point>(A, B));
+-    pts.push_back(std::make_pair<Geom::Point, Geom::Point>(B, C));
+-    pts.push_back(std::make_pair<Geom::Point, Geom::Point>(C, D));
+-    pts.push_back(std::make_pair<Geom::Point, Geom::Point>(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->attached_items, SPGuideAttachment(&item, cn.snappoint_ix));
+             g_assert( i < item.constraints.size() );
+-            vector<SPGuideConstraint>::iterator const ei(&item.constraints[i]);
+-            item.constraints.erase(ei);
++            // vector<SPGuideConstraint>::iterator const ei(&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 <stdarg.h>
+ #include <map>
+ #include <algorithm>
++#include <cstdlib>
+ 
+ 
+ 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 <cmath>
+ #include <list>
+ #include <unistd.h>
+ #include <sys/stat.h>
+@@ -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<int>(trunc(scaledSvgWidth)), static_cast<int>(trunc(scaledSvgHeight))};
++    NRRectL bbox =  {0, 0, static_cast<int>(trunc(scaledSvgWidth)), static_cast<int>(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 <iosfwd>
+ #include <stdexcept>
+ #include <cstddef>
++
++#if __cplusplus >= 201103L
++#include <functional>
++#else
+ #include <tr1/functional>
++#endif
++
+ #include <boost/utility.hpp>
+ #include <boost/shared_ptr.hpp>
+ #include <boost/optional.hpp>
+@@ -32,11 +38,13 @@
+ }
+ }
+ 
++#if __cplusplus < 201103L
+ namespace std {
+ namespace tr1 {
+ template <typename N> struct hash< Inkscape::UI::NodeIterator<N> >;
+ }
+ }
++#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->window );
+         EekPreview* preview = EEK_PREVIEW(widget);
+-        GdkColor fg = {0, preview->_r, preview->_g, preview->_b};
++        GdkColor fg = {0, static_cast<guint16>(preview->_r), static_cast<guint16>(preview->_g), static_cast<guint16>(preview->_b)};
+ 
+         gdk_colormap_alloc_color( gdk_colormap_get_system(), &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<guchar>(SP_RGBA32_R_U(val)),
++                        static_cast<guchar>(SP_RGBA32_G_U(val)),
++                        static_cast<guchar>(SP_RGBA32_B_U(val)),
+                         255};
+ #ifdef DEBUG_LCMS
+                     g_message("Shoving in [%02x] [%02x] [%02x]", 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->cachedData = std::string("");
++        this->cachedPos = 0;
++ 
++        // First get data from file in typical way (cache it all)
++        char *buffer = new char [4096];
++        while(true) {
++            int len = this->read(buffer, 4096);
++            if(len <= 0) break;
++            buffer[len] = 0;
++            this->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(
++            "<!ENTITY\\s+[^>\\s]+\\s+(SYSTEM|PUBLIC\\s+\"[^>\"]+\")\\s+\"[^>\"]+\"\\s*>",
++            G_REGEX_CASELESS, G_REGEX_MATCH_NEWLINE_ANY, NULL);
++ 
++        g_regex_match (regex, this->cachedData.c_str(), G_REGEX_MATCH_NEWLINE_ANY, &info);
++ 
++        while (g_match_info_matches (info)) {
++            if (g_match_info_fetch_pos (info, 1, &start, &end))
++                this->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->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->getBool("/options/externalresources/xml/allow_net_access", 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<XmlSource*>(context);
+         retVal = self->read( buffer, len );
+     }
++
+     return retVal;
+ }
+ 
+@@ -193,7 +248,15 @@
+     int retVal = 0;
+     size_t got = 0;
+ 
+-    if ( firstFewLen > 0 ) {
++    if ( LoadEntities ) {
++        if (cachedPos >= cachedData.length()) {
++            return -1;
++        } else {
++            retVal = cachedData.copy(buffer, len, cachedPos);
++            cachedPos += retVal;
++            return retVal; // Do NOT continue.
++        }
++    } else if ( firstFewLen > 0 ) {
+         int some = (len < firstFewLen) ? len : firstFewLen;
+         memcpy( buffer, firstFew, some );
+         if ( len < 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->getBool("/options/externalresources/xml/allow_net_access", 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 && strcmp(rdoc->root()->name(), "ns:svg") == 0) {
++                xmlFreeDoc( doc );
++                src.setFile(filename, true);
++                doc = src.readXml();
++                rdoc = sp_repr_do_read( doc, default_ns );
+             }
+-            doc = xmlReadIO( XmlSource::readCb,
+-                             XmlSource::closeCb,
+-                             &src,
+-                             localFilename,
+-                             src.getEncoding(),
+-                             parse_options);
+         }
+     }
+ 
+-    rdoc = sp_repr_do_read( doc, default_ns );
+     if ( doc ) {
+         xmlFreeDoc( doc );
+     }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131115/ed241332/attachment-0001.html>


More information about the macports-changes mailing list