diff options
author | joerg <joerg> | 2012-11-16 00:54:04 +0000 |
---|---|---|
committer | joerg <joerg> | 2012-11-16 00:54:04 +0000 |
commit | c3732542075c294de0a1d4dc67e9454abf3595be (patch) | |
tree | 1eeb9f3d56f3a6fd7a5825b498de628106c63194 /graphics | |
parent | 79380601919e0f363d54431e008e75f6a4a8b62c (diff) | |
download | pkgsrc-c3732542075c294de0a1d4dc67e9454abf3595be.tar.gz |
Fix template look up. Don't use variable length arrays of non-POD types.
Don't pass non-POD types to variadic functions.
Diffstat (limited to 'graphics')
10 files changed, 251 insertions, 1 deletions
diff --git a/graphics/inkscape/distinfo b/graphics/inkscape/distinfo index c5b4a67c56d..0111d85e5c2 100644 --- a/graphics/inkscape/distinfo +++ b/graphics/inkscape/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.41 2012/09/29 23:28:22 dholland Exp $ +$NetBSD: distinfo,v 1.42 2012/11/16 00:54:04 joerg Exp $ SHA1 (inkscape-0.48.3.1.tar.bz2) = 23344555a1b5cc7909ad01d926cfaddb67bfbde9 RMD160 (inkscape-0.48.3.1.tar.bz2) = 139720f01b987001b558226ec2de60b36fb1123c @@ -19,3 +19,12 @@ SHA1 (patch-am) = 2307f1ab4bb628d9babaeadb5783073f62eedaca SHA1 (patch-ap) = cd29bd178dc2c6c9456bc09d6663d6a25acc7da1 SHA1 (patch-aq) = dd307f598741cd5f0ff35eb06dff7c685752a979 SHA1 (patch-ar) = 128749bac44faf4135670068e06c0928eb5c27c8 +SHA1 (patch-src_2geom_basic-intersection.cpp) = 743b13293191a74d4c0c22231e5ed7866219dfee +SHA1 (patch-src_2geom_solve-bezier-parametric.cpp) = 71cca994451b1e7d5aba625600089d1e4a47888e +SHA1 (patch-src_color-profile.cpp) = 14932b25ed333925518d5140b3691a29e155cd9a +SHA1 (patch-src_display_nr-filter-gaussian.cpp) = 344109eb4360560bfe8481b25588ef37e5140135 +SHA1 (patch-src_dom_io_domstream.cpp) = 6b525b8e730e4497afdf1da0ae27f0dc69bfad40 +SHA1 (patch-src_dom_io_domstream.h) = 9325fc9d211eb3349628a736283ed0c475399a8b +SHA1 (patch-src_ui_dialog_inkscape-preferences.cpp) = f95af6d326ddf7512b67f68efe0b23bc3ebe651e +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_basic-intersection.cpp b/graphics/inkscape/patches/patch-src_2geom_basic-intersection.cpp new file mode 100644 index 00000000000..b3e9c6e5fc4 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_2geom_basic-intersection.cpp @@ -0,0 +1,37 @@ +$NetBSD: patch-src_2geom_basic-intersection.cpp,v 1.1 2012/11/16 00:54:04 joerg Exp $ + +--- src/2geom/basic-intersection.cpp.orig 2012-11-15 17:34:38.000000000 +0000 ++++ src/2geom/basic-intersection.cpp +@@ -64,24 +64,27 @@ void find_intersections(std::vector< std + void split(vector<Point> const &p, double t, + vector<Point> &left, vector<Point> &right) { + const unsigned sz = p.size(); +- Geom::Point Vtemp[sz][sz]; ++ Geom::Point *Vtemp = new Geom::Point[sz * sz];; + + /* Copy control points */ +- std::copy(p.begin(), p.end(), Vtemp[0]); ++ for (unsigned i = 0; i < sz; ++i) ++ Vtemp[0 * sz + i] = p[i]; + + /* Triangle computation */ + for (unsigned i = 1; i < sz; i++) { + for (unsigned j = 0; j < sz - i; j++) { +- Vtemp[i][j] = lerp(t, Vtemp[i-1][j], Vtemp[i-1][j+1]); ++ Vtemp[i * sz + j] = lerp(t, Vtemp[(i-1) * sz + j], Vtemp[(i-1) * sz + j+1]); + } + } + + left.resize(sz); + right.resize(sz); + for (unsigned j = 0; j < sz; j++) +- left[j] = Vtemp[j][0]; ++ left[j] = Vtemp[j * sz]; + for (unsigned j = 0; j < sz; j++) +- right[j] = Vtemp[sz-1-j][j]; ++ right[j] = Vtemp[(sz-1-j) * sz + j]; ++ ++ delete[] Vtemp; + } + + diff --git a/graphics/inkscape/patches/patch-src_2geom_solve-bezier-parametric.cpp b/graphics/inkscape/patches/patch-src_2geom_solve-bezier-parametric.cpp new file mode 100644 index 00000000000..7074db8ff65 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_2geom_solve-bezier-parametric.cpp @@ -0,0 +1,39 @@ +$NetBSD: patch-src_2geom_solve-bezier-parametric.cpp,v 1.1 2012/11/16 00:54:04 joerg Exp $ + +--- src/2geom/solve-bezier-parametric.cpp.orig 2012-11-15 17:42:23.000000000 +0000 ++++ src/2geom/solve-bezier-parametric.cpp +@@ -191,24 +191,27 @@ Bezier(Geom::Point const *V, /* Control + Geom::Point *Left, /* RETURN left half ctl pts */ + Geom::Point *Right) /* RETURN right half ctl pts */ + { +- Geom::Point Vtemp[degree+1][degree+1]; ++ const unsigned sz = degree + 1; ++ Geom::Point *Vtemp = new Geom::Point[sz * sz]; + + /* Copy control points */ +- std::copy(V, V+degree+1, Vtemp[0]); ++ for (unsigned i = 0; i < sz; ++i) ++ Vtemp[0 * sz + i] = V[i]; + + /* Triangle computation */ + for (unsigned i = 1; i <= degree; i++) { + for (unsigned j = 0; j <= degree - i; j++) { +- Vtemp[i][j] = lerp(t, Vtemp[i-1][j], Vtemp[i-1][j+1]); ++ Vtemp[i * sz + j] = lerp(t, Vtemp[(i-1) * sz + j], Vtemp[(i-1) * sz + j+1]); + } + } + + for (unsigned j = 0; j <= degree; j++) +- Left[j] = Vtemp[j][0]; ++ Left[j] = Vtemp[j * sz + 0]; + for (unsigned j = 0; j <= degree; j++) +- Right[j] = Vtemp[degree-j][j]; +- +- return (Vtemp[degree][0]); ++ Right[j] = Vtemp[(degree-j) * sz + j]; ++ Geom::Point rv(Vtemp[degree * sz + 0]); ++ delete[] Vtemp; ++ return rv; + } + + }; diff --git a/graphics/inkscape/patches/patch-src_color-profile.cpp b/graphics/inkscape/patches/patch-src_color-profile.cpp new file mode 100644 index 00000000000..bfe05ab8e2e --- /dev/null +++ b/graphics/inkscape/patches/patch-src_color-profile.cpp @@ -0,0 +1,21 @@ +$NetBSD: patch-src_color-profile.cpp,v 1.1 2012/11/16 00:54:04 joerg Exp $ + +--- src/color-profile.cpp.orig 2012-11-15 16:10:51.000000000 +0000 ++++ src/color-profile.cpp +@@ -103,6 +103,8 @@ extern guint update_in_progress; + + static SPObjectClass *cprof_parent_class; + ++namespace Inkscape { ++ + class ColorProfileImpl { + public: + #if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) +@@ -129,6 +131,7 @@ public: + #endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) + }; + ++} + + + namespace Inkscape { diff --git a/graphics/inkscape/patches/patch-src_display_nr-filter-gaussian.cpp b/graphics/inkscape/patches/patch-src_display_nr-filter-gaussian.cpp new file mode 100644 index 00000000000..33e8b21d23f --- /dev/null +++ b/graphics/inkscape/patches/patch-src_display_nr-filter-gaussian.cpp @@ -0,0 +1,38 @@ +$NetBSD: patch-src_display_nr-filter-gaussian.cpp,v 1.1 2012/11/16 00:54:04 joerg Exp $ + +--- src/display/nr-filter-gaussian.cpp.orig 2012-11-15 16:38:32.000000000 +0000 ++++ src/display/nr-filter-gaussian.cpp +@@ -708,7 +708,7 @@ int FilterGaussian::render(FilterSlot &s + }; + } else if ( scr_len_x > 0 ) { // !use_IIR_x + // Filter kernel for x direction +- FIRValue kernel[scr_len_x+1]; ++ FIRValue *kernel = new FIRValue[scr_len_x+1]; + _make_kernel(&kernel[0], deviation_x); + + // Filter (x) +@@ -728,6 +728,7 @@ int FilterGaussian::render(FilterSlot &s + default: + assert(false); + }; ++ delete[] kernel; + } else if ( out != ssin ) { // out can be equal to ssin if resampling is used + nr_blit_pixblock_pixblock(out, ssin); + } +@@ -770,7 +771,7 @@ int FilterGaussian::render(FilterSlot &s + }; + } else if ( scr_len_y > 0 ) { // !use_IIR_y + // Filter kernel for y direction +- FIRValue kernel[scr_len_y+1]; ++ FIRValue *kernel = new FIRValue[scr_len_y+1]; + _make_kernel(&kernel[0], deviation_y); + + // Filter (y) +@@ -790,6 +791,7 @@ int FilterGaussian::render(FilterSlot &s + default: + assert(false); + }; ++ delete[] kernel; + } + + for(int i=0; i<NTHREADS; i++) { diff --git a/graphics/inkscape/patches/patch-src_dom_io_domstream.cpp b/graphics/inkscape/patches/patch-src_dom_io_domstream.cpp new file mode 100644 index 00000000000..89ba7f0a475 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_dom_io_domstream.cpp @@ -0,0 +1,37 @@ +$NetBSD: patch-src_dom_io_domstream.cpp,v 1.1 2012/11/16 00:54:04 joerg Exp $ + +--- src/dom/io/domstream.cpp.orig 2012-11-15 18:28:52.000000000 +0000 ++++ src/dom/io/domstream.cpp +@@ -35,6 +35,7 @@ + */ + + #include <cstdio> ++#include <cstring> + #include <math.h> + #include <stdarg.h> + +@@ -285,12 +286,11 @@ static int getint(const DOMString &buf, + + + +-static int dprintf(Writer &outs, const DOMString &fmt, va_list ap) ++static int dprintf(Writer &outs, const char *fmt, va_list ap) + { ++ size_t len = strlen(fmt); + +- int len = fmt.size(); +- +- for (int pos=0 ; pos < len ; pos++) ++ for (size_t pos = 0 ; pos < len ; pos++) + { + XMLCh ch = fmt[pos]; + +@@ -909,7 +909,7 @@ Writer &BasicWriter::printf(char const * + return *this; + } + */ +-Writer &BasicWriter::printf(const DOMString &fmt, ...) ++Writer &BasicWriter::printf(const char *fmt, ...) + { + va_list args; + va_start(args, fmt); diff --git a/graphics/inkscape/patches/patch-src_dom_io_domstream.h b/graphics/inkscape/patches/patch-src_dom_io_domstream.h new file mode 100644 index 00000000000..a3abc704341 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_dom_io_domstream.h @@ -0,0 +1,22 @@ +$NetBSD: patch-src_dom_io_domstream.h,v 1.1 2012/11/16 00:54:05 joerg Exp $ + +--- src/dom/io/domstream.h.orig 2012-11-15 18:28:31.000000000 +0000 ++++ src/dom/io/domstream.h +@@ -492,7 +492,7 @@ public: + virtual int put(XMLCh ch) = 0; + + /* Formatted output */ +- virtual Writer& printf(const DOMString &fmt, ...) = 0; ++ virtual Writer& printf(const char *fmt, ...) = 0; + + virtual Writer& writeChar(char val) = 0; + +@@ -544,7 +544,7 @@ public: + + + /* Formatted output */ +- virtual Writer &printf(const DOMString &fmt, ...); ++ virtual Writer &printf(const char *fmt, ...); + + virtual Writer& writeChar(char val); + diff --git a/graphics/inkscape/patches/patch-src_ui_dialog_inkscape-preferences.cpp b/graphics/inkscape/patches/patch-src_ui_dialog_inkscape-preferences.cpp new file mode 100644 index 00000000000..4a665490aa0 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_ui_dialog_inkscape-preferences.cpp @@ -0,0 +1,21 @@ +$NetBSD: patch-src_ui_dialog_inkscape-preferences.cpp,v 1.1 2012/11/16 00:54:05 joerg Exp $ + +--- src/ui/dialog/inkscape-preferences.cpp.orig 2012-11-15 16:58:17.000000000 +0000 ++++ src/ui/dialog/inkscape-preferences.cpp +@@ -1236,7 +1236,7 @@ void InkscapePreferences::initPageBitmap + gchar** splits = g_strsplit(choices.data(), ",", 0); + gint numIems = g_strv_length(splits); + +- Glib::ustring labels[numIems]; ++ Glib::ustring *labels = new Glib::ustring[numIems]; + int values[numIems]; + for ( gint i = 0; i < numIems; i++) { + values[i] = i; +@@ -1246,6 +1246,7 @@ void InkscapePreferences::initPageBitmap + _page_bitmaps.add_line( false, _("Bitmap editor:"), _misc_bitmap_editor, "", "", false); + + g_strfreev(splits); ++ delete[] labels; + } + + _bitmap_copy_res.init("/options/createbitmap/resolution", 1.0, 6000.0, 1.0, 1.0, PX_PER_IN, true, false); diff --git a/graphics/inkscape/patches/patch-src_ui_widget_registered-widget.h b/graphics/inkscape/patches/patch-src_ui_widget_registered-widget.h new file mode 100644 index 00000000000..b7c26bd0fae --- /dev/null +++ b/graphics/inkscape/patches/patch-src_ui_widget_registered-widget.h @@ -0,0 +1,13 @@ +$NetBSD: patch-src_ui_widget_registered-widget.h,v 1.1 2012/11/16 00:54:05 joerg Exp $ + +--- src/ui/widget/registered-widget.h.orig 2012-11-15 16:20:03.000000000 +0000 ++++ src/ui/widget/registered-widget.h +@@ -62,7 +62,7 @@ public: + bool is_updating() {if (_wr) return _wr->isUpdating(); else return false;} + + // provide automatic 'upcast' for ease of use. (do it 'dynamic_cast' instead of 'static' because who knows what W is) +- operator const Gtk::Widget () { return dynamic_cast<Gtk::Widget*>(this); } ++ operator const Gtk::Widget *() { return dynamic_cast<Gtk::Widget*>(this); } + + protected: + RegisteredWidget() : W() { construct(); } diff --git a/graphics/inkscape/patches/patch-src_widgets_desktop-widget.h b/graphics/inkscape/patches/patch-src_widgets_desktop-widget.h new file mode 100644 index 00000000000..3897cc25ab6 --- /dev/null +++ b/graphics/inkscape/patches/patch-src_widgets_desktop-widget.h @@ -0,0 +1,13 @@ +$NetBSD: patch-src_widgets_desktop-widget.h,v 1.1 2012/11/16 00:54:05 joerg Exp $ + +--- src/widgets/desktop-widget.h.orig 2012-11-15 16:18:43.000000000 +0000 ++++ src/widgets/desktop-widget.h +@@ -239,7 +239,7 @@ struct SPDesktopWidget { + private: + GtkWidget *tool_toolbox; + GtkWidget *aux_toolbox; +- GtkWidget *commands_toolbox,; ++ GtkWidget *commands_toolbox; + GtkWidget *snap_toolbox; + + static void init(SPDesktopWidget *widget); |