aboutsummaryrefslogtreecommitdiff
path: root/cad/qucs
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-08-08 01:16:35 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-08-08 01:16:35 +0000
commit3b82e704356fc2fd710e2d2b2edce07d35121a09 (patch)
treeccc456fe73bcd680971f818dc9205cf6019da1e2 /cad/qucs
parent6e9c77c66709dd47734b93271a01961c639608be (diff)
downloadports-3b82e704356fc2fd710e2d2b2edce07d35121a09.tar.gz
ports-3b82e704356fc2fd710e2d2b2edce07d35121a09.zip
Notes
Diffstat (limited to 'cad/qucs')
-rw-r--r--cad/qucs/Makefile4
-rw-r--r--cad/qucs/files/extrapatch-qucs-core_src_evaluate.cpp46
2 files changed, 50 insertions, 0 deletions
diff --git a/cad/qucs/Makefile b/cad/qucs/Makefile
index f40ff26c65a0..c26a91c7d60a 100644
--- a/cad/qucs/Makefile
+++ b/cad/qucs/Makefile
@@ -24,6 +24,10 @@ MAN1= qucs.1 qucsator.1 qucsconv.1 qucsdigi.1 qucsedit.1 \
.include <bsd.port.pre.mk>
+.if ${OSVERSION} < 500000
+EXTRA_PATCHES= ${FILESDIR}/extrapatch-qucs-core_src_evaluate.cpp
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's#qucsdigi\.bat##g' \
${WRKSRC}/qucs/Makefile*
diff --git a/cad/qucs/files/extrapatch-qucs-core_src_evaluate.cpp b/cad/qucs/files/extrapatch-qucs-core_src_evaluate.cpp
new file mode 100644
index 000000000000..8a4ba273c825
--- /dev/null
+++ b/cad/qucs/files/extrapatch-qucs-core_src_evaluate.cpp
@@ -0,0 +1,46 @@
+--- qucs-core/src/evaluate.cpp.orig Sat May 27 11:46:33 2006
++++ qucs-core/src/evaluate.cpp Tue Aug 8 00:52:02 2006
+@@ -113,6 +113,7 @@
+ #define _DEFR() constant * res = new constant (TAG_RANGE);
+ #define _RETD(var) res->d = (var); return res;
+ #define _RETC(var) res->c = new complex (var); return res;
++#define _RETV2() res->v = new vector (); return res;
+ #define _RETV(var) res->v = new vector (var); return res;
+ #define _RETM(var) res->m = new matrix (var); return res;
+ #define _RETMV(var) res->mv = new matvec (var); return res;
+@@ -3246,7 +3247,7 @@
+ if (n < 1) {
+ THROW_MATH_EXCEPTION ("runavg: number n to be averaged over must be "
+ "larger or equal 1");
+- _RETV ();
++ _RETV2 ();
+ }
+ _RETV (runavg (rect (x, 0), n));
+ }
+@@ -3258,7 +3259,7 @@
+ if (n < 1) {
+ THROW_MATH_EXCEPTION ("runavg: number n to be averaged over must be "
+ "larger or equal 1");
+- _RETV ();
++ _RETV2 ();
+ }
+ _RETV (runavg (*x, n));
+ }
+@@ -3271,7 +3272,7 @@
+ THROW_MATH_EXCEPTION ("runavg: number n to be averaged over must be "
+ "larger or equal 1 and less or equal than the "
+ "number of vector elements");
+- _RETV ();
++ _RETV2 ();
+ }
+ _RETV (runavg (*x, n));
+ }
+@@ -3285,7 +3286,7 @@
+ nr_double_t sval = 0.0;
+ if (size <= 0) {
+ THROW_MATH_EXCEPTION ("kbd: vector length must be greater than zero");
+- _RETV ();
++ _RETV2 ();
+ }
+ vector v (size);
+ for (i = 0; i < size / 2; i++) {