Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2013 14:37:59 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r330754 - in head/graphics/inkscape: . files
Message-ID:  <201310181437.r9IEbxCI004285@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kwm
Date: Fri Oct 18 14:37:58 2013
New Revision: 330754
URL: http://svnweb.freebsd.org/changeset/ports/330754

Log:
  Fix the build with clang and with libc++ [1]
  Switch to new lib_depend syntax, stageify, USES=desktop-file-utils.
  Quiet warning spam when building with clang.
  Cleanup obsolete sed lines, rename patches with obsolete names.
  
  Obtained from:	inkscape launchpad bug 1232474 and 0.48.x stable branch [1]

Added:
  head/graphics/inkscape/files/patch-configure   (contents, props changed)
  head/graphics/inkscape/files/patch-src_2geom_basic-intersection.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_2geom_sbasis.h   (contents, props changed)
  head/graphics/inkscape/files/patch-src_2geom_solve-bezier-parametric.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_color-profile.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_display_nr-filter-gaussian.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_io_inkjar.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_io_inkjar.h   (contents, props changed)
  head/graphics/inkscape/files/patch-src_io_uristream.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_io_uristream.h   (contents, props changed)
  head/graphics/inkscape/files/patch-src_io_xsltstream.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_io_xsltstream.h   (contents, props changed)
  head/graphics/inkscape/files/patch-src_libgdl_gdl-dock-object.h   (contents, props changed)
  head/graphics/inkscape/files/patch-src_libnr_nr-matrix.cpp
     - copied unchanged from r330517, head/graphics/inkscape/files/patch-src::libnr::nr-matrix.cpp
  head/graphics/inkscape/files/patch-src_libnrtype_Layout-TNG-OutIter.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_libvpsc_csolve-VPSC.h   (contents, props changed)
  head/graphics/inkscape/files/patch-src_livarot_Path.cpp
     - copied unchanged from r330517, head/graphics/inkscape/files/patch-src::livarot::Path.cpp
  head/graphics/inkscape/files/patch-src_remove-last.h
     - copied, changed from r330517, head/graphics/inkscape/files/patch-src::remove-last.h
  head/graphics/inkscape/files/patch-src_sp-item-rm-unsatisfied-cns.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_trace_siox.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_ui_dialog_inkscape-preferences.cpp   (contents, props changed)
  head/graphics/inkscape/files/patch-src_ui_tool_node.h   (contents, props changed)
  head/graphics/inkscape/files/patch-src_ui_widget_registered-widget.h   (contents, props changed)
  head/graphics/inkscape/files/patch-src_widgets_desktop-widget.h   (contents, props changed)
Deleted:
  head/graphics/inkscape/files/patch-src::libnr::nr-matrix.cpp
  head/graphics/inkscape/files/patch-src::livarot::Path.cpp
  head/graphics/inkscape/files/patch-src::remove-last.h
Modified:
  head/graphics/inkscape/Makefile
  head/graphics/inkscape/pkg-plist

Modified: head/graphics/inkscape/Makefile
==============================================================================
--- head/graphics/inkscape/Makefile	Fri Oct 18 14:33:34 2013	(r330753)
+++ head/graphics/inkscape/Makefile	Fri Oct 18 14:37:58 2013	(r330754)
@@ -12,38 +12,41 @@ MAINTAINER=	gnome@FreeBSD.org
 COMMENT=	Full featured open source SVG editor
 
 BUILD_DEPENDS=	${LOCALBASE}/include/boost/concept_check.hpp:${PORTSDIR}/devel/boost-libs
-LIB_DEPENDS=	popt:${PORTSDIR}/devel/popt \
-		gtkmm-2.4:${PORTSDIR}/x11-toolkits/gtkmm24 \
-		gc:${PORTSDIR}/devel/boehm-gc \
-		gsl:${PORTSDIR}/math/gsl \
-		gtkspell:${PORTSDIR}/textproc/gtkspell \
-		lcms:${PORTSDIR}/graphics/lcms \
-		wpg-0.2:${PORTSDIR}/graphics/libwpg \
-		png15:${PORTSDIR}/graphics/png \
-		Magick++:${PORTSDIR}/graphics/ImageMagick
+LIB_DEPENDS=	libpopt.so:${PORTSDIR}/devel/popt \
+		libgc.so:${PORTSDIR}/devel/boehm-gc \
+		libgsl.so:${PORTSDIR}/math/gsl \
+		libgtkspell.so:${PORTSDIR}/textproc/gtkspell \
+		liblcms.so:${PORTSDIR}/graphics/lcms \
+		libwpg-0.2.so:${PORTSDIR}/graphics/libwpg \
+		libpng15.so:${PORTSDIR}/graphics/png \
+		libMagick++.so:${PORTSDIR}/graphics/ImageMagick
 RUN_DEPENDS=	p5-XML-XQL>=0:${PORTSDIR}/textproc/p5-XML-XQL
 
 USE_BZIP2=	yes
-USE_GCC=	any
-WANT_GNOME=	yes
-USE_GNOME=	gnomehack desktopfileutils intlhack libxslt
-USES=		gettext gmake perl5
+USE_GNOME=	gtkmm24 intlhack libxslt
+USES=		desktop-file-utils gettext gmake pathfix perl5 shebangfix
 GNU_CONFIGURE=	yes
 INSTALLS_ICONS=	yes
-CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
-LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
 
-MAN1=		inkscape.1 inkview.1
-NO_MANCOMPRESS=	yes
+python_OLD_CMD?=/usr/bin/env python
+python_CMD?=	${LOCALBASE}/bin/python2
+SHEBANG_FILES=	cxxtest/cxxtestgen.pl share/extensions/*.p[lm] \
+		share/extensions/*.py
 
 OPTIONS_DEFINE=	GNOMEVFS POPPLER
 OPTIONS_DEFAULT=POPPLER
 POPPLER_DESC=	PDF preview rendering
 GNOMEVFS_DESC=	Use gnomevfs for loading files
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
+_CCVERSION!=	${CC} --version
+.if ${_CCVERSION:Mclang}
+CPPFLAGS+=	-Wno-mismatched-tags
+.endif
+
 .if ${PORT_OPTIONS:MGNOMEVFS}
 USE_GNOME+=		gnomevfs2
 CONFIGURE_ARGS+=	--with-gnome-vfs
@@ -52,26 +55,19 @@ CONFIGURE_ARGS+=	--without-gnome-vfs
 .endif
 
 .if ${PORT_OPTIONS:MPOPPLER}
-LIB_DEPENDS+=		poppler-glib:${PORTSDIR}/graphics/poppler-glib
+LIB_DEPENDS+=		libpoppler-glib.so:${PORTSDIR}/graphics/poppler-glib
 CONFIGURE_ARGS+=	--enable-poppler-cairo
 .else
 CONFIGURE_ARGS+=	--enable-poppler-cairo=no
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|ieefp.h|ieeefp.h|' \
-		${WRKSRC}/src/2geom/bezier-utils.cpp
 	@${REINPLACE_CMD} -e 's|libpng >= 1.2|libpng15 >= 1.2|g' \
 		-e 's|-ldl||g' \
 	    	${WRKSRC}/configure
-	@${FIND} ${WRKSRC} -name "*.h" -o -name "*.cpp" | ${XARGS} \
-		${REINPLACE_CMD} -e 's|glib/gmessages.h|glib/gtestutils.h|g'
 .if !defined(WITH_POPPLER)
 	@${REINPLACE_CMD} -e 's|poppler|pdisable|g' \
 		${WRKSRC}/configure
 .endif
 
-post-install:
-	@-update-desktop-database
-
 .include <bsd.port.mk>

Added: head/graphics/inkscape/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-configure	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,11 @@
+--- configure.orig	2013-10-16 22:37:30.000000000 +0200
++++ configure	2013-10-16 22:37:37.000000000 +0200
+@@ -7498,7 +7498,7 @@
+ 	cc_vers_all=`expr $cc_vers_major '*' 1000000 + $cc_vers_minor '*' 1000 + $cc_vers_patch`
+ 
+ 	if test $cc_vers_major -lt 3; then
+-		as_fn_error $? "gcc >= 3.0 is needed to compile inkscape" "$LINENO" 5
++#		as_fn_error $? "gcc >= 3.0 is needed to compile inkscape" "$LINENO" 5
+ 	fi
+ fi
+ 

Added: head/graphics/inkscape/files/patch-src_2geom_basic-intersection.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_2geom_basic-intersection.cpp	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,28 @@
+--- src/2geom/basic-intersection.cpp.orig	2013-10-17 12:28:59.000000000 +0200
++++ src/2geom/basic-intersection.cpp	2013-10-17 13:17:08.000000000 +0200
+@@ -64,7 +64,12 @@
+ 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];
++
++    for (unsigned int i = 0; i < sz; ++i) {
++        Vtemp[i] = new Geom::Point[sz];
++    }
+ 
+     /* Copy control points	*/
+     std::copy(p.begin(), p.end(), Vtemp[0]);
+@@ -82,6 +87,11 @@
+         left[j]  = Vtemp[j][0];
+     for (unsigned j = 0; j < sz; j++)
+         right[j] = Vtemp[sz-1-j][j];
++
++    for (unsigned int i = 0; i < sz; ++i)
++        delete[] Vtemp[i];
++
++    delete[] Vtemp;
+ }
+ 
+ 

Added: head/graphics/inkscape/files/patch-src_2geom_sbasis.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_2geom_sbasis.h	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,47 @@
+--- src/2geom/sbasis.h.orig	2013-10-16 23:20:03.000000000 +0200
++++ src/2geom/sbasis.h	2013-10-16 23:27:50.000000000 +0200
+@@ -75,10 +75,13 @@
+         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 @@
+     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 @@
+ 
+ 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;
+ }
+ 

Added: head/graphics/inkscape/files/patch-src_2geom_solve-bezier-parametric.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_2geom_solve-bezier-parametric.cpp	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,54 @@
+--- src/2geom/solve-bezier-parametric.cpp.orig	2013-10-17 12:28:59.000000000 +0200
++++ src/2geom/solve-bezier-parametric.cpp	2013-10-17 13:19:47.000000000 +0200
+@@ -68,13 +68,20 @@
+         break;
+     }
+ 
+-    // Otherwise, solve recursively after subdividing control polygon
+-    std::vector<Geom::Point> Left(degree + 1);    // New left and right
+-    std::vector<Geom::Point> Right(degree + 1);   // control polygons
++    /*
++     * Otherwise, solve recursively after subdividing control polygon
++     * New left and right control polygons
++     */
++    Geom::Point *Left  = new Geom::Point[degree+1];
++    Geom::Point *Right = new Geom::Point[degree+1];
++
+     Bezier(w, degree, 0.5, &Left[0], &Right[0]);
+     total_subs ++;
+     find_parametric_bezier_roots(&Left[0],  degree, solutions, depth + 1);
+     find_parametric_bezier_roots(&Right[0], degree, solutions, depth + 1);
++
++    delete[] Left;
++    delete[] Right;
+ }
+ 
+ 
+@@ -191,7 +198,10 @@
+        Geom::Point *Left,	/* RETURN left half ctl pts */
+        Geom::Point *Right)	/* RETURN right half ctl pts */
+ {
+-    Geom::Point Vtemp[degree+1][degree+1];
++    Geom::Point **Vtemp = new Geom::Point* [degree+1];
++
++    for (unsigned int i = 0; i < degree+1; ++i)
++        Vtemp[i] = new Geom::Point[degree+1];
+ 
+     /* Copy control points	*/
+     std::copy(V, V+degree+1, Vtemp[0]);
+@@ -208,7 +218,14 @@
+     for (unsigned j = 0; j <= degree; j++)
+         Right[j] = Vtemp[degree-j][j];
+ 
+-    return (Vtemp[degree][0]);
++    Geom::Point return_value = Vtemp[degree][0];
++
++    for (unsigned int i = 0; i < degree+1; ++i)
++        delete[] Vtemp[i];
++
++    delete[] Vtemp;
++
++    return return_value;
+ }
+ 
+ };

Added: head/graphics/inkscape/files/patch-src_color-profile.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_color-profile.cpp	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,22 @@
+--- src/color-profile.cpp.orig	2013-10-17 12:28:59.000000000 +0200
++++ src/color-profile.cpp	2013-10-17 12:34:25.000000000 +0200
+@@ -103,6 +103,8 @@
+ 
+ static SPObjectClass *cprof_parent_class;
+ 
++namespace Inkscape {
++
+ class ColorProfileImpl {
+ public:
+ #if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+@@ -129,10 +131,6 @@
+ #endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+ };
+ 
+-
+-
+-namespace Inkscape {
+-
+ #if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+ cmsColorSpaceSignature asICColorSpaceSig(ColorSpaceSig const & sig)
+ {

Added: head/graphics/inkscape/files/patch-src_display_nr-filter-gaussian.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_display_nr-filter-gaussian.cpp	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,20 @@
+--- src/display/nr-filter-gaussian.cpp.orig	2013-10-17 12:28:58.000000000 +0200
++++ src/display/nr-filter-gaussian.cpp	2013-10-17 12:58:55.000000000 +0200
+@@ -708,7 +708,7 @@
+         };
+     } else if ( scr_len_x > 0 ) { // !use_IIR_x
+         // Filter kernel for x direction
+-        FIRValue kernel[scr_len_x+1];
++        std::vector<FIRValue> kernel(scr_len_x+1);
+         _make_kernel(&kernel[0], deviation_x);
+ 
+         // Filter (x)
+@@ -770,7 +770,7 @@
+         };
+     } else if ( scr_len_y > 0 ) { // !use_IIR_y
+         // Filter kernel for y direction
+-        FIRValue kernel[scr_len_y+1];
++        std::vector<FIRValue> kernel(scr_len_y+1);
+         _make_kernel(&kernel[0], deviation_y);
+ 
+         // Filter (y)

Added: head/graphics/inkscape/files/patch-src_io_inkjar.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_io_inkjar.cpp	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,94 @@
+--- src/io/inkjar.cpp.orig	2013-10-16 23:28:46.000000000 +0200
++++ src/io/inkjar.cpp	2013-10-16 23:34:00.000000000 +0200
+@@ -44,6 +44,7 @@
+ 
+ #include <cstring>
+ #include <string>
++#include <cstdio>
+ #include <cstdlib>
+ #include <glib.h>
+ #include <zlib.h>
+@@ -68,7 +69,7 @@
+ {
+     _filename = g_strdup(new_filename);
+     _last_filename = NULL;
+-    fd = -1;
++    fd = NULL;
+ }
+ 
+ //fixme: the following should probably just return a const gchar* and not 
+@@ -104,7 +105,7 @@
+ 
+ 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 +117,7 @@
+ 
+ bool JarFile::close()
+ {
+-    if (fd >= 0 && !::close(fd)) {
++    if (fd >= 0 && !fclose(fd)) {
+ 	inflateEnd(&_zs);
+ 	return true;
+     }
+@@ -256,7 +257,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 +275,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,7 +314,7 @@
+ 	std::printf("%d bytes written\n", out_a);
+ #endif
+     }
+-    lseek(fd, eflen, SEEK_CUR);
++    fseek(fd, eflen, SEEK_CUR);
+     g_free(bytes);
+ 
+     if (!check_crc(crc, crc2, flags)) {
+@@ -328,7 +329,7 @@
+ int JarFile::read(guint8 *buf, int count)
+ {
+     int nbytes;
+-    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 +358,8 @@
+ 		
+ 	if (!_zs.avail_in) {
+ 	
+-	    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 +537,7 @@
+ 		}
+ 	    }
+ 	} else if (gba->len > 0)
+-	    ::write(1, gba->data, gba->len);
++	    fwrite(gba->data, 1, gba->len, stdout);
+ 	else
+ 	    break;
+     }

Added: head/graphics/inkscape/files/patch-src_io_inkjar.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_io_inkjar.h	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,28 @@
+--- src/io/inkjar.h.orig	2013-10-16 23:34:39.000000000 +0200
++++ src/io/inkjar.h	2013-10-16 23:35:52.000000000 +0200
+@@ -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,7 @@
+ 
+ private:
+ 
+-    int fd;
++    FILE* fd;
+     gchar *_filename;
+     z_stream _zs;
+     gchar *_last_filename;

Added: head/graphics/inkscape/files/patch-src_io_uristream.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_io_uristream.cpp	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,199 @@
+--- src/io/uristream.cpp.orig	2011-07-08 20:25:09.468790000 +0200
++++ src/io/uristream.cpp	2013-10-17 13:09:15.000000000 +0200
+@@ -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,8 +280,7 @@
+ /**
+  *
+  */
+-gunichar UriReader::get() throw(StreamException)
+-{
++gunichar UriReader::get(){
+     gunichar ch = (gunichar)inputStream->get();
+     return ch;
+ }
+@@ -296,7 +294,7 @@
+  * Temporary kludge
+  */
+ UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &destination)
+-                    throw (StreamException): closed(false),
++                    : closed(false),
+                                              ownsFile(false),
+                                              outf(fp),
+                                              uri(destination),
+@@ -312,7 +310,7 @@
+  *
+  */
+ UriOutputStream::UriOutputStream(Inkscape::URI &destination)
+-                    throw (StreamException): closed(false),
++                    : closed(false),
+                                              ownsFile(true),
+                                              outf(NULL),
+                                              uri(destination),
+@@ -353,7 +351,7 @@
+ /**
+  *
+  */
+-UriOutputStream::~UriOutputStream() throw(StreamException)
++UriOutputStream::~UriOutputStream()
+ {
+     close();
+ }
+@@ -362,7 +360,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 +389,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 +413,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 +451,6 @@
+  *
+  */
+ UriWriter::UriWriter(Inkscape::URI &uri)
+-                    throw (StreamException)
+ {
+     outputStream = new UriOutputStream(uri);
+ }
+@@ -461,7 +458,7 @@
+ /**
+  *
+  */
+-UriWriter::~UriWriter() throw (StreamException)
++UriWriter::~UriWriter()
+ {
+     delete outputStream;
+ }
+@@ -469,7 +466,7 @@
+ /**
+  *
+  */
+-void UriWriter::close() throw(StreamException)
++void UriWriter::close()
+ {
+     outputStream->close();
+ }
+@@ -477,7 +474,7 @@
+ /**
+  *
+  */
+-void UriWriter::flush() throw(StreamException)
++void UriWriter::flush()
+ {
+     outputStream->flush();
+ }
+@@ -485,7 +482,7 @@
+ /**
+  *
+  */
+-void UriWriter::put(gunichar ch) throw(StreamException)
++void UriWriter::put(gunichar ch)
+ {
+     int ich = (int)ch;
+     outputStream->put(ich);

Added: head/graphics/inkscape/files/patch-src_io_uristream.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_io_uristream.h	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,92 @@
+--- src/io/uristream.h.orig	2013-10-16 23:43:05.000000000 +0200
++++ src/io/uristream.h	2013-10-16 23:55:31.000000000 +0200
+@@ -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:
+ 

Added: head/graphics/inkscape/files/patch-src_io_xsltstream.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_io_xsltstream.cpp	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,98 @@
+--- src/io/xsltstream.cpp.orig	2013-10-16 23:56:16.000000000 +0200
++++ src/io/xsltstream.cpp	2013-10-17 11:59:55.000000000 +0200
+@@ -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);

Added: head/graphics/inkscape/files/patch-src_io_xsltstream.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_io_xsltstream.h	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,55 @@
+--- src/io/xsltstream.h.orig	2011-07-08 20:25:09.468790000 +0200
++++ src/io/xsltstream.h	2013-10-17 13:10:26.000000000 +0200
+@@ -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:
+ 

Added: head/graphics/inkscape/files/patch-src_libgdl_gdl-dock-object.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_libgdl_gdl-dock-object.h	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,11 @@
+--- src/libgdl/gdl-dock-object.h.orig	2013-10-16 23:18:22.000000000 +0200
++++ src/libgdl/gdl-dock-object.h	2013-10-17 12:02:38.000000000 +0200
+@@ -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__,               \

Copied: head/graphics/inkscape/files/patch-src_libnr_nr-matrix.cpp (from r330517, head/graphics/inkscape/files/patch-src::libnr::nr-matrix.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_libnr_nr-matrix.cpp	Fri Oct 18 14:37:58 2013	(r330754, copy of r330517, head/graphics/inkscape/files/patch-src::libnr::nr-matrix.cpp)
@@ -0,0 +1,10 @@
+--- src/libnr/nr-matrix.cpp.org	2008-04-02 22:01:32.000000000 +0200
++++ src/libnr/nr-matrix.cpp	2008-04-02 22:01:54.000000000 +0200
+@@ -11,6 +11,7 @@
+  * This code is in public domain
+  */
+ 
++#include <cstdio>
+ #include <cstdlib>
+ #include "nr-matrix.h"
+ 

Added: head/graphics/inkscape/files/patch-src_libnrtype_Layout-TNG-OutIter.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_libnrtype_Layout-TNG-OutIter.cpp	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,51 @@
+--- src/libnrtype/Layout-TNG-OutIter.cpp.orig	2011-07-08 20:25:09.468790000 +0200
++++ src/libnrtype/Layout-TNG-OutIter.cpp	2013-10-17 13:12:08.000000000 +0200
+@@ -197,7 +197,21 @@
+ 
+ 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 @@
+     *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;
+     }
+ }
+ 

Added: head/graphics/inkscape/files/patch-src_libvpsc_csolve-VPSC.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_libvpsc_csolve-VPSC.h	Fri Oct 18 14:37:58 2013	(r330754)
@@ -0,0 +1,14 @@
+--- src/libvpsc/csolve_VPSC.h.bak	2011-07-08 20:25:09.468790000 +0200
++++ src/libvpsc/csolve_VPSC.h	2013-10-17 12:54:54.000000000 +0200
+@@ -11,10 +11,7 @@
+ #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

Copied: head/graphics/inkscape/files/patch-src_livarot_Path.cpp (from r330517, head/graphics/inkscape/files/patch-src::livarot::Path.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-src_livarot_Path.cpp	Fri Oct 18 14:37:58 2013	(r330754, copy of r330517, head/graphics/inkscape/files/patch-src::livarot::Path.cpp)
@@ -0,0 +1,10 @@
+--- src/livarot/Path.cpp.orig	Sat Apr 10 03:53:47 2004
++++ src/livarot/Path.cpp	Sat Apr 10 03:53:52 2004
+@@ -7,6 +7,7 @@
+  */
+ 
+ #include <glib.h>
++#include <cstdio>
+ #include "Path.h"
+ #include <libnr/nr-point.h>
+ #include <libnr/nr-point-ops.h>

Copied and modified: head/graphics/inkscape/files/patch-src_remove-last.h (from r330517, head/graphics/inkscape/files/patch-src::remove-last.h)
==============================================================================
--- head/graphics/inkscape/files/patch-src::remove-last.h	Wed Oct 16 14:23:09 2013	(r330517, copy source)
+++ head/graphics/inkscape/files/patch-src_remove-last.h	Fri Oct 18 14:37:58 2013	(r330754)
@@ -1,19 +1,15 @@
---- src/remove-last.h.orig	Mon Apr 12 09:56:06 2004
-+++ src/remove-last.h	Mon Apr 12 09:56:47 2004
-@@ -2,6 +2,7 @@
- #define __REMOVE_LAST_H__
- 
- #include <vector>
-+#include <algorithm>
- #include <glib.h>
- 
- template<class T>
-@@ -9,7 +10,7 @@
+--- src/remove-last.h.orig	2011-07-08 20:25:09.468790000 +0200

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310181437.r9IEbxCI004285>