[112619] trunk/dports/graphics/inkscape
devans at macports.org
devans at macports.org
Mon Oct 28 05:17:14 PDT 2013
Revision: 112619
https://trac.macports.org/changeset/112619
Author: devans at macports.org
Date: 2013-10-28 05:17:13 -0700 (Mon, 28 Oct 2013)
Log Message:
-----------
inkscape: add additional patches for c++11/libc++ compatibility, now builds on Mavericks.
Modified Paths:
--------------
trunk/dports/graphics/inkscape/Portfile
Added Paths:
-----------
trunk/dports/graphics/inkscape/files/patch-clang.diff
Removed Paths:
-------------
trunk/dports/graphics/inkscape/files/patch-src-2geom-sbasis.h.diff
Modified: trunk/dports/graphics/inkscape/Portfile
===================================================================
--- trunk/dports/graphics/inkscape/Portfile 2013-10-28 10:47:12 UTC (rev 112618)
+++ trunk/dports/graphics/inkscape/Portfile 2013-10-28 12:17:13 UTC (rev 112619)
@@ -6,7 +6,7 @@
name inkscape
conflicts inkscape-devel
version 0.48.4
-revision 16
+revision 17
license GPL-2 LGPL-2.1
maintainers devans
categories graphics gnome
@@ -48,7 +48,7 @@
port:gtkspell2
patchfiles patch-thru-r9971.diff \
- patch-src-2geom-sbasis.h.diff \
+ patch-clang.diff \
patch-python-configure.ac.diff
variant python26 conflicts python27 description {Configure to use Python version 2.6} {
@@ -83,17 +83,6 @@
${prefix}/bin/python2.7
}
-platform darwin {
- if {${os.major} >= 13} {
- depends_lib
- depends_run
- pre-fetch {
- ui_error "$name does not build on Mavericks or later."
- error "unsupported platform"
- }
- }
-}
-
use_autoreconf yes
autoreconf.args -fvi
@@ -105,6 +94,10 @@
configure.cppflags-append \
-I${worksrcpath}/src/extension/script
+if {${configure.compiler} == "clang"} {
+ configure.cxxflags-append -std=c++11
+}
+
if {![variant_isset python26] && ![variant_isset python27]} {
default_variants +python27
}
Added: trunk/dports/graphics/inkscape/files/patch-clang.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-clang.diff (rev 0)
+++ trunk/dports/graphics/inkscape/files/patch-clang.diff 2013-10-28 12:17:13 UTC (rev 112619)
@@ -0,0 +1,923 @@
+--- 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;
+ }
Deleted: trunk/dports/graphics/inkscape/files/patch-src-2geom-sbasis.h.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-src-2geom-sbasis.h.diff 2013-10-28 10:47:12 UTC (rev 112618)
+++ trunk/dports/graphics/inkscape/files/patch-src-2geom-sbasis.h.diff 2013-10-28 12:17:13 UTC (rev 112619)
@@ -1,53 +0,0 @@
---- src/2geom/sbasis.h.orig 2011-07-08 11:25:09.000000000 -0700
-+++ src/2geom/sbasis.h 2013-10-23 13:55:01.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;
- }
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131028/2d937a07/attachment-0001.html>
More information about the macports-changes
mailing list