diff options
author | wiz <wiz@pkgsrc.org> | 2014-01-11 17:48:52 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-01-11 17:48:52 +0000 |
commit | 0aecad3f7d596221d83bc42e78b1ec578d87f28e (patch) | |
tree | 8d3ed24c9499bc158cc7d3bf0a39e06ec553ec8a /graphics/inkscape | |
parent | d413bc9f02b13809278023239cf030100a6ad39d (diff) | |
download | pkgsrc-0aecad3f7d596221d83bc42e78b1ec578d87f28e.tar.gz |
Fix build with clang.
XXX: Haven't tested with gcc, let me know if it breaks (will watch bulk builds).
Diffstat (limited to 'graphics/inkscape')
8 files changed, 216 insertions, 2 deletions
diff --git a/graphics/inkscape/distinfo b/graphics/inkscape/distinfo index 92f73ce55f7..2bc5a34b0ba 100644 --- a/graphics/inkscape/distinfo +++ b/graphics/inkscape/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.48 2013/12/15 08:29:07 markd Exp $ +$NetBSD: distinfo,v 1.49 2014/01/11 17:48:52 wiz Exp $ SHA1 (inkscape-0.48.4.tar.bz2) = 5f26f6ad191d1e7c2a9fb69a438722beb172224c RMD160 (inkscape-0.48.4.tar.bz2) = b089ced7694a9803fac8588d93e7e6239c71d3e8 @@ -13,9 +13,10 @@ SHA1 (patch-ag) = 6b6000f3940ec6db9404a206f9757928c1d5740b SHA1 (patch-ah) = 6da5e0651b583f925debed97faaf6800f88463da SHA1 (patch-ai) = 1cd8e744848d6b52ffb4f07922e09689b5e43f61 SHA1 (patch-aj) = 8564ee2d4e884dc31e4ad4232267f6fad09f71ee -SHA1 (patch-ap) = cd29bd178dc2c6c9456bc09d6663d6a25acc7da1 +SHA1 (patch-ap) = 134a47053020547703906140ff744e875ca1284f SHA1 (patch-aq) = dd307f598741cd5f0ff35eb06dff7c685752a979 SHA1 (patch-src_2geom_basic-intersection.cpp) = 743b13293191a74d4c0c22231e5ed7866219dfee +SHA1 (patch-src_2geom_sbasis.h) = 483353f56f7fb01ca8c76241aca5e63d0513aba5 SHA1 (patch-src_2geom_solve-bezier-parametric.cpp) = 71cca994451b1e7d5aba625600089d1e4a47888e SHA1 (patch-src_Makefile.in) = 4c07142f3a554a01d4c2b352df27c0a83ac4352b SHA1 (patch-src_color-profile.cpp) = 14932b25ed333925518d5140b3691a29e155cd9a @@ -25,7 +26,13 @@ SHA1 (patch-src_dom_io_domstream.h) = 9325fc9d211eb3349628a736283ed0c475399a8b SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 02742a022a8a55852d7f0a39969153bf7f24f17e SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = 9e9e76049b9fdcc5192e225b4b477a104902894b SHA1 (patch-src_libnrtype_FontFactory.h) = 282e6ea4da7bb40c5ba8c861fdbe303259d3e864 +SHA1 (patch-src_libnrtype_Layout-TNG-OutIter.cpp) = 28870d9970946b629657f1663cbe8b325ef42b69 SHA1 (patch-src_libvpsc_csolve__VPSC.h) = 33aa27678fa9e802af6ab95b9ea28b69d822c4cb +SHA1 (patch-src_live__effects_lpe-perp__bisector.h) = 08c911a629d1f247bddd001716ae9b0b04a2e357 +SHA1 (patch-src_remove-last.h) = 7ae01e509216680c063bbd8acdc0fb697ebf8552 +SHA1 (patch-src_sp-item-rm-unsatisfied-cns.cpp) = 40e25393233a18372ee86655e3730a7a87701a9b +SHA1 (patch-src_trace_siox.cpp) = 1b91dd39a07dea9de34646e37ff11cca14abae24 SHA1 (patch-src_ui_dialog_inkscape-preferences.cpp) = f95af6d326ddf7512b67f68efe0b23bc3ebe651e +SHA1 (patch-src_ui_tool_node.h) = 18237624e07881cf9985b0a6f2c75bbc082bede6 SHA1 (patch-src_ui_widget_registered-widget.h) = a5c16bcd28a015959121ed8b92423762f182a71b SHA1 (patch-src_widgets_desktop-widget.h) = 6528b3105590bfa8b5d33d428aa8c9cbc3561225 diff --git a/graphics/inkscape/patches/patch-src_2geom_sbasis.h b/graphics/inkscape/patches/patch-src_2geom_sbasis.h new file mode 100644 index 00000000000..b0af1b09639 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_2geom_sbasis.h @@ -0,0 +1,51 @@ +$NetBSD: patch-src_2geom_sbasis.h,v 1.1 2014/01/11 17:48:52 wiz Exp $ + +Fix build with clang/libc++. From upstream via FreeBSD ports. + +--- src/2geom/sbasis.h.orig 2011-07-08 18:25:09.000000000 +0000 ++++ src/2geom/sbasis.h +@@ -75,10 +75,13 @@ public: + 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();} ++ ++ 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 +90,11 @@ public: + 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 +290,12 @@ SBasis shift(Linear const &a, int sh); + + 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(), e); ++ + return c; + } + diff --git a/graphics/inkscape/patches/patch-src_libnrtype_Layout-TNG-OutIter.cpp b/graphics/inkscape/patches/patch-src_libnrtype_Layout-TNG-OutIter.cpp new file mode 100644 index 00000000000..6983c8a035e --- /dev/null +++ b/graphics/inkscape/patches/patch-src_libnrtype_Layout-TNG-OutIter.cpp @@ -0,0 +1,55 @@ +$NetBSD: patch-src_libnrtype_Layout-TNG-OutIter.cpp,v 1.1 2014/01/11 17:48:52 wiz Exp $ + +Fix compilation with clang/libc++. + +--- src/libnrtype/Layout-TNG-OutIter.cpp.orig 2011-07-08 18:25:09.000000000 +0000 ++++ src/libnrtype/Layout-TNG-OutIter.cpp +@@ -197,7 +197,21 @@ Layout::iterator Layout::sourceToIterato + + Layout::iterator Layout::sourceToIterator(void *source_cookie) const + { +- 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 +520,20 @@ void Layout::getSourceOfCharacter(iterat + *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::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; + 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())))); +- // the caller owns the string, so they're going to want a non-const iterator ++ //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-> ++ // the caller owns the string, so they're going to want a non-const iterator ++ *text_iterator = text_iter; + } + } + diff --git a/graphics/inkscape/patches/patch-src_live__effects_lpe-perp__bisector.h b/graphics/inkscape/patches/patch-src_live__effects_lpe-perp__bisector.h new file mode 100644 index 00000000000..f95f15a1520 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_live__effects_lpe-perp__bisector.h @@ -0,0 +1,24 @@ +$NetBSD: patch-src_live__effects_lpe-perp__bisector.h,v 1.1 2014/01/11 17:48:52 wiz Exp $ + +Fix compilation with clang/libc++. + +--- src/live_effects/lpe-perp_bisector.h.orig 2011-07-08 18:25:09.000000000 +0000 ++++ src/live_effects/lpe-perp_bisector.h +@@ -27,7 +27,7 @@ namespace PB { + class KnotHolderEntityEnd; + class KnotHolderEntityLeftEnd; + class KnotHolderEntityRightEnd; +- void bisector_end_set(SPItem *item, Geom::Point const &p, bool left); ++ void bisector_end_set(SPItem *item, Geom::Point const &p, bool left = true); + } + + class LPEPerpBisector : public Effect { +@@ -46,7 +46,7 @@ public: + friend class PB::KnotHolderEntityEnd; + friend class PB::KnotHolderEntityLeftEnd; + friend class PB::KnotHolderEntityRightEnd; +- friend void PB::bisector_end_set(SPItem *item, Geom::Point const &p, bool left = true); ++ friend void PB::bisector_end_set(SPItem *item, Geom::Point const &p, bool left); + + private: + ScalarParam length_left; diff --git a/graphics/inkscape/patches/patch-src_remove-last.h b/graphics/inkscape/patches/patch-src_remove-last.h new file mode 100644 index 00000000000..509de1633e5 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_remove-last.h @@ -0,0 +1,17 @@ +$NetBSD: patch-src_remove-last.h,v 1.1 2014/01/11 17:48:52 wiz Exp $ + +--- src/remove-last.h.orig 2011-07-08 18:25:09.000000000 +0000 ++++ src/remove-last.h +@@ -10,10 +10,9 @@ inline void remove_last(std::vector<T> & + { + using std::vector; + +- typename vector<T>::reverse_iterator i(find(seq.rbegin(), seq.rend(), elem)); ++ typename vector<T>::reverse_iterator i(std::find(seq.rbegin(), seq.rend(), elem)); + g_assert( i != seq.rend() ); +- typename vector<T>::iterator ii(&*i); +- seq.erase(ii); ++ seq.erase(i.base()); + } + + diff --git a/graphics/inkscape/patches/patch-src_sp-item-rm-unsatisfied-cns.cpp b/graphics/inkscape/patches/patch-src_sp-item-rm-unsatisfied-cns.cpp new file mode 100644 index 00000000000..c8ce1e351e8 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_sp-item-rm-unsatisfied-cns.cpp @@ -0,0 +1,18 @@ +$NetBSD: patch-src_sp-item-rm-unsatisfied-cns.cpp,v 1.1 2014/01/11 17:48:52 wiz Exp $ + +Fix compilation with clang/libc++. + +--- src/sp-item-rm-unsatisfied-cns.cpp.orig 2011-07-08 18:25:09.000000000 +0000 ++++ src/sp-item-rm-unsatisfied-cns.cpp +@@ -23,9 +23,9 @@ void sp_item_rm_unsatisfied_cns(SPItem & + g_assert( snappoint_ix < int(snappoints.size()) ); + 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); ++ item.constraints.erase(item.constraints.begin() + i); + } + } + } diff --git a/graphics/inkscape/patches/patch-src_trace_siox.cpp b/graphics/inkscape/patches/patch-src_trace_siox.cpp new file mode 100644 index 00000000000..29b67c38511 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_trace_siox.cpp @@ -0,0 +1,14 @@ +$NetBSD: patch-src_trace_siox.cpp,v 1.1 2014/01/11 17:48:52 wiz Exp $ + +Fix compilation with clang/libc++. + +--- src/trace/siox.cpp.orig 2011-07-08 18:25:09.000000000 +0000 ++++ src/trace/siox.cpp +@@ -19,6 +19,7 @@ + + #include <math.h> + #include <stdarg.h> ++#include <stdlib.h> + #include <map> + #include <algorithm> + diff --git a/graphics/inkscape/patches/patch-src_ui_tool_node.h b/graphics/inkscape/patches/patch-src_ui_tool_node.h new file mode 100644 index 00000000000..a06293c8cf8 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_ui_tool_node.h @@ -0,0 +1,28 @@ +$NetBSD: patch-src_ui_tool_node.h,v 1.1 2014/01/11 17:48:52 wiz Exp $ + +--- src/ui/tool/node.h.orig 2012-02-14 03:22:17.000000000 +0000 ++++ src/ui/tool/node.h +@@ -16,7 +16,9 @@ + #include <iosfwd> + #include <stdexcept> + #include <cstddef> +-#include <tr1/functional> ++ ++#include <functional> ++ + #include <boost/utility.hpp> + #include <boost/shared_ptr.hpp> + #include <boost/optional.hpp> +@@ -32,12 +34,6 @@ template <typename> class NodeIterator; + } + } + +-namespace std { +-namespace tr1 { +-template <typename N> struct hash< Inkscape::UI::NodeIterator<N> >; +-} +-} +- + namespace Inkscape { + namespace UI { + |