svn commit: r384416 - in head/graphics/iulib: . files
John Marino
marino at FreeBSD.org
Tue Apr 21 09:37:15 UTC 2015
Author: marino
Date: Tue Apr 21 09:37:13 2015
New Revision: 384416
URL: https://svnweb.freebsd.org/changeset/ports/384416
Log:
graphics/iulib: Fix c++ template so gcc5 can build iulib, but use clang
This error should have appeared with gcc 4.9. According to documentation,
"Default arguments on redeclaration of member functions of class
template now rejected"
The default argument has to appear in first declaration of the template.
Fixing this for gcc5 has the pleasant side effect of allowing USE_GCC
requirement to be dropped. Clang needed this fix too!
Approved by: blanket (gcc5, clang)
Added:
head/graphics/iulib/files/patch-imglib_imgops.cc (contents, props changed)
head/graphics/iulib/files/patch-imglib_imgops.h (contents, props changed)
Modified:
head/graphics/iulib/Makefile
Modified: head/graphics/iulib/Makefile
==============================================================================
--- head/graphics/iulib/Makefile Tue Apr 21 09:21:13 2015 (r384415)
+++ head/graphics/iulib/Makefile Tue Apr 21 09:37:13 2015 (r384416)
@@ -3,7 +3,7 @@
PORTNAME= iulib
PORTVERSION= 0.4
-PORTREVISION= 16
+PORTREVISION= 17
CATEGORIES= graphics
MASTER_SITES= GOOGLE_CODE
@@ -21,7 +21,6 @@ SDL_DESC= Enable SDL for graphical debug
VIDIO_DESC= Enable Video Input/Output (using ffmpeg)
USES= autoreconf libtool python:build tar:tgz
-USE_GCC= any
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
CPPFLAGS+= -I${LOCALBASE}/include
Added: head/graphics/iulib/files/patch-imglib_imgops.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/iulib/files/patch-imglib_imgops.cc Tue Apr 21 09:37:13 2015 (r384416)
@@ -0,0 +1,11 @@
+--- imglib/imgops.cc.orig 2009-06-09 22:32:20 UTC
++++ imglib/imgops.cc
+@@ -133,7 +133,7 @@ namespace iulib {
+
+ template<class T,class V>
+ void addscaled(narray<T> &dest,narray<T> &src,
+- V scale=1,int dx=0,int dy=0) {
++ V scale,int dx,int dy) {
+ for (int i=0; i<dest.dim(0); i++)
+ for (int j=0; j<dest.dim(1); j++)
+ dest.unsafe_at(i,j) += (T)(scale*xref(src,i+dx,j+dy));
Added: head/graphics/iulib/files/patch-imglib_imgops.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/iulib/files/patch-imglib_imgops.h Tue Apr 21 09:37:13 2015 (r384416)
@@ -0,0 +1,12 @@
+--- imglib/imgops.h.orig 2009-06-09 22:32:20 UTC
++++ imglib/imgops.h
+@@ -67,7 +67,8 @@ namespace iulib {
+ }
+
+ template<class T, class V>
+- void addscaled(colib::narray<T> &, colib::narray<T> &, V, int, int);
++ void addscaled(colib::narray<T> &dest, colib::narray<T> &src,
++ V scale=1, int dx=0, int dy=0);
+ template<class T>
+ void tighten(colib::narray<T> &image);
+ template<class T>
More information about the svn-ports-all
mailing list