From ef191c9378574d26dd23e41c4c9eff4c0e52177c Mon Sep 17 00:00:00 2001 From: Stephen Montgomery-Smith Date: Sat, 17 May 2014 19:34:49 +0000 Subject: [PATCH] - Make clang compliant. - Bump portrevision. --- math/octave-forge-miscellaneous/Makefile | 2 +- .../files/patch-partarray.cc | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 math/octave-forge-miscellaneous/files/patch-partarray.cc diff --git a/math/octave-forge-miscellaneous/Makefile b/math/octave-forge-miscellaneous/Makefile index 1a8cc8d7518c..9504541bc57b 100644 --- a/math/octave-forge-miscellaneous/Makefile +++ b/math/octave-forge-miscellaneous/Makefile @@ -3,7 +3,7 @@ PORTNAME= octave-forge-miscellaneous PORTVERSION= 1.2.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= math MAINTAINER= stephen@FreeBSD.org diff --git a/math/octave-forge-miscellaneous/files/patch-partarray.cc b/math/octave-forge-miscellaneous/files/patch-partarray.cc new file mode 100644 index 000000000000..417863ab1447 --- /dev/null +++ b/math/octave-forge-miscellaneous/files/patch-partarray.cc @@ -0,0 +1,47 @@ +--- partarray.cc.orig 2012-03-24 14:53:23.000000000 -0500 ++++ partarray.cc 2014-05-17 13:05:40.000000000 -0500 +@@ -39,9 +39,12 @@ + Array nidx (dim_vector (maxdims, 1)); + // Octave-3.2.4 reports "missing symbol" with Array >, + // though 3.3.54+ does not +- Array bidc [maxdims], eidc [maxdims]; + // + Array step (dim_vector (maxdims, 1)); ++ // Array bidc [maxdims], eidc [maxdims]; ++ Array *bidc, *eidc; ++ bidc = new Array [maxdims]; ++ eidc = new Array [maxdims]; + step(0) = 1; + for (int i = 0; i < maxdims; i++) + { +@@ -62,6 +65,8 @@ + { + error ("%s: argument %i: wrong dimensions", + fname.c_str (), i + 2); ++ delete(bidc); ++ delete(eidc); + return Cell (); + } + cnidx = +@@ -83,8 +88,11 @@ + if (i < maxdims - 1) + step(i + 1) = step(i) * alldims(i); + } +- if (error_state) ++ if (error_state) { ++ delete(bidc); ++ delete(eidc); + return Cell (); ++ } + + dim_vector rdv (nc, 1); + +@@ -144,6 +152,8 @@ + } + } + ++ delete(bidc); ++ delete(eidc); + return retval; + } +