aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2005-08-17 13:22:58 +0800
committerthierry <thierry@FreeBSD.org>2005-08-17 13:22:58 +0800
commitde9a06066e5c9cc146ba5b06e7322dc102ba4bbb (patch)
tree2af99d92bc7de695dcb3b5844bc58a14833871c3 /math
parent6f19192a6875bb1ad6c935fef5545c0c36de161c (diff)
downloadfreebsd-ports-gnome-de9a06066e5c9cc146ba5b06e7322dc102ba4bbb.tar.gz
freebsd-ports-gnome-de9a06066e5c9cc146ba5b06e7322dc102ba4bbb.tar.zst
freebsd-ports-gnome-de9a06066e5c9cc146ba5b06e7322dc102ba4bbb.zip
Unbreak with gcc 3.4.
Approved by: portmgr (marcus)
Diffstat (limited to 'math')
-rw-r--r--math/kaskade/Makefile10
-rw-r--r--math/kaskade/files/patch-sources_alloc.c63
-rw-r--r--math/kaskade/files/patch-sources_alloc.h12
-rw-r--r--math/kaskade/files/patch-sources_cmdpars.h11
-rw-r--r--math/kaskade/files/patch-sources_dict.h11
-rw-r--r--math/kaskade/files/patch-sources_dlist.h11
-rw-r--r--math/kaskade/files/patch-sources_family.h11
-rw-r--r--math/kaskade/files/patch-sources_general.h.in13
-rw-r--r--math/kaskade/files/patch-sources_kvector.h32
-rw-r--r--math/kaskade/files/patch-sources_matrix.h35
-rw-r--r--math/kaskade/files/patch-sources_slist.h11
-rw-r--r--math/kaskade/files/patch-sources_stack.c143
-rw-r--r--math/kaskade/files/patch-sources_stack.h11
-rw-r--r--math/kaskade/files/patch-sources_utils.h15
-rw-r--r--math/kaskade/files/patch-sources_varalloc.cc11
-rw-r--r--math/kaskade/files/patch-sources_vector.c28
-rw-r--r--math/kaskade/files/patch-sources_vector.h31
-rw-r--r--math/kaskade/pkg-plist1
18 files changed, 453 insertions, 7 deletions
diff --git a/math/kaskade/Makefile b/math/kaskade/Makefile
index 027f73d23590..968cc810b8cf 100644
--- a/math/kaskade/Makefile
+++ b/math/kaskade/Makefile
@@ -16,16 +16,11 @@ COMMENT= Adaptive linear scalar elliptic and parabolic problem solver
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
DIST_SUBDIR= kaskade
WRKSRC= ${WRKDIR}/3.2.1
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 502126
-BROKEN= "Does not compile on FreeBSD >= 5.x"
-.endif
-
post-patch:
${CP} ${FILESDIR}/Makefile ${WRKSRC}
${CP} ${FILESDIR}/configure ${WRKSRC}
@@ -34,10 +29,11 @@ post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/data/*.cmd ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/data/*.dat ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/data/*.ex ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/data/*.geo ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/data/kaskade.init ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/data/*.mat ${EXAMPLESDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/math/kaskade/files/patch-sources_alloc.c b/math/kaskade/files/patch-sources_alloc.c
new file mode 100644
index 000000000000..4b4bd26269b9
--- /dev/null
+++ b/math/kaskade/files/patch-sources_alloc.c
@@ -0,0 +1,63 @@
+--- ./sources/alloc.c.orig Tue Dec 14 13:06:31 1999
++++ ./sources/alloc.c Tue Aug 16 23:59:29 2005
+@@ -60,7 +60,7 @@
+ ++noOfElementsInBlock;
+ ++freeElement;
+
+- if (noOfElementsInBlock > maxElementsInBlock)
++ if (noOfElementsInBlock > maxElementsInBlock)
+ {
+ if (noOfBlocksSinceIncrement > 100) // dynamic size extension
+ {
+@@ -71,7 +71,7 @@
+ MemoryBlock* newBlock = ::new MemoryBlock;
+ if (newBlock == 0) allocationError();
+
+- newBlock->space = ::new T[maxElementsInBlock];
++ newBlock->space = ::new T[maxElementsInBlock];
+ if (newBlock->space == 0) allocationError();
+
+ newBlock->next = lastBlock;
+@@ -97,19 +97,19 @@
+ //-------------------------------------------------------------------------
+
+ template<class T> Allocator<T>:: ~Allocator()
+-{
+- MemoryBlock* toDel;
++{
++ typename StaticAllocator<T>::MemoryBlock* toDel;
+
+- while(lastBlock)
++ while(this->lastBlock)
+ {
+- toDel = lastBlock;
+- lastBlock = lastBlock->next;
++ toDel = this->lastBlock;
++ this->lastBlock = this->lastBlock->next;
+ delete [] toDel->space;
+ delete toDel;
+ }
+
+ int i;
+- FORALL(returnedElements,i) returnedElements[i] = 0;
++ FORALL(this->returnedElements,i) this->returnedElements[i] = 0;
+ }
+ //-------------------------------------------------------------------------
+
+@@ -118,11 +118,11 @@
+ {
+ T* elem;
+
+- if (returnedElements.h == 0) elem = getFromBlock();
+- else
+- {
+- elem = returnedElements.pop();
+- elem->reset();
++ if (this->returnedElements.h == 0) elem = this->getFromBlock();
++ else
++ {
++ elem = this->returnedElements.pop();
++ elem->reset();
+ }
+ return elem;
+ }
diff --git a/math/kaskade/files/patch-sources_alloc.h b/math/kaskade/files/patch-sources_alloc.h
new file mode 100644
index 000000000000..f3cc76b829d8
--- /dev/null
+++ b/math/kaskade/files/patch-sources_alloc.h
@@ -0,0 +1,12 @@
+--- ./sources/alloc.h.orig Fri Dec 10 15:19:05 1999
++++ ./sources/alloc.h Tue Aug 16 22:42:54 2005
+@@ -3,7 +3,8 @@
+ #ifndef ALLOC_H
+ #define ALLOC_H
+
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+
+ #include "stack.h"
+
diff --git a/math/kaskade/files/patch-sources_cmdpars.h b/math/kaskade/files/patch-sources_cmdpars.h
new file mode 100644
index 000000000000..a2e0be5b1683
--- /dev/null
+++ b/math/kaskade/files/patch-sources_cmdpars.h
@@ -0,0 +1,11 @@
+--- ./sources/cmdpars.h.orig Fri Dec 10 15:30:27 1999
++++ ./sources/cmdpars.h Tue Aug 16 21:40:15 2005
+@@ -3,7 +3,7 @@
+ #ifndef CMDPARS_H
+ #define CMDPARS_H
+
+-#include <fstream.h>
++#include <fstream>
+
+ #include "dict.h"
+
diff --git a/math/kaskade/files/patch-sources_dict.h b/math/kaskade/files/patch-sources_dict.h
new file mode 100644
index 000000000000..b82c6baae94a
--- /dev/null
+++ b/math/kaskade/files/patch-sources_dict.h
@@ -0,0 +1,11 @@
+--- ./sources/dict.h.orig Tue Dec 14 12:55:24 1999
++++ ./sources/dict.h Tue Aug 16 22:03:02 2005
+@@ -4,7 +4,7 @@
+ #define DICT_H
+
+
+-#include <iostream.h>
++#include <iostream>
+ #include <math.h>
+
+ #include "stack.h"
diff --git a/math/kaskade/files/patch-sources_dlist.h b/math/kaskade/files/patch-sources_dlist.h
new file mode 100644
index 000000000000..372e5a318774
--- /dev/null
+++ b/math/kaskade/files/patch-sources_dlist.h
@@ -0,0 +1,11 @@
+--- ./sources/dlist.h.orig Tue Dec 14 13:48:01 1999
++++ ./sources/dlist.h Tue Aug 16 22:50:10 2005
+@@ -3,7 +3,7 @@
+ #ifndef DLIST_H
+ #define DLIST_H
+
+-#include <iostream.h>
++#include <iostream>
+
+ template<class T>
+
diff --git a/math/kaskade/files/patch-sources_family.h b/math/kaskade/files/patch-sources_family.h
new file mode 100644
index 000000000000..6dfc59aca3e2
--- /dev/null
+++ b/math/kaskade/files/patch-sources_family.h
@@ -0,0 +1,11 @@
+--- ./sources/family.h.orig Fri Aug 4 10:13:45 2000
++++ ./sources/family.h Wed Aug 17 00:07:37 2005
+@@ -85,7 +85,7 @@
+
+ virtual ~Son() { }
+
+- void* operator new(size_t /*size*/) { cout.flush(); abort(); return 0; }
++ void* operator new(size_t /*size*/) throw() { cout.flush(); abort(); return 0; }
+ void operator delete(void* /*son*/) { cout.flush(); abort(); }
+
+ virtual int NoOfFathers() const = 0;
diff --git a/math/kaskade/files/patch-sources_general.h.in b/math/kaskade/files/patch-sources_general.h.in
new file mode 100644
index 000000000000..c2a2945e8174
--- /dev/null
+++ b/math/kaskade/files/patch-sources_general.h.in
@@ -0,0 +1,13 @@
+--- ./sources/general.h.in.orig Tue Dec 14 15:27:41 1999
++++ ./sources/general.h.in Tue Aug 16 21:27:57 2005
+@@ -3,8 +3,8 @@
+ #ifndef GENERAL_H
+ #define GENERAL_H
+
+-#include <iostream.h>
+-#include <stddef.h>
++#include <iostream>
++#include <stddef.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
diff --git a/math/kaskade/files/patch-sources_kvector.h b/math/kaskade/files/patch-sources_kvector.h
new file mode 100644
index 000000000000..52b7c3895803
--- /dev/null
+++ b/math/kaskade/files/patch-sources_kvector.h
@@ -0,0 +1,32 @@
+--- ./sources/kvector.h.orig Fri Dec 10 15:20:04 1999
++++ ./sources/kvector.h Tue Aug 16 22:39:18 2005
+@@ -12,20 +12,21 @@
+
+ //-------------------------------------------------------------------------
+
+-#include <iostream.h>
+-#include <stdlib.h>
++#include <iostream>
++using namespace std;
++#include <stdlib.h>
+
+ //----------------------------------------------------------------------------
+
+ template<class T>
+
+-class Vector
+-{
+- public:
+-
+- T* v;
++class Vector
++{
++ public:
++
++ T* v;
+ int l, h;
+-
++
+ Vector(int l1, int h1) { allocate(l1, h1); }
+ Vector(int h1) { allocate( 1, h1); }
+ Vector() { allocate( 1, 1); }
diff --git a/math/kaskade/files/patch-sources_matrix.h b/math/kaskade/files/patch-sources_matrix.h
new file mode 100644
index 000000000000..c3c7519acc87
--- /dev/null
+++ b/math/kaskade/files/patch-sources_matrix.h
@@ -0,0 +1,35 @@
+--- ./sources/matrix.h.orig Fri Dec 10 15:20:13 1999
++++ ./sources/matrix.h Tue Aug 16 22:41:02 2005
+@@ -13,21 +13,22 @@
+ //-------------------------------------------------------------------------
+
+ #include <stdio.h>
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+
+
+ template<class T>
+-
+-class Matrix
+-{
+- public:
+
+- T** row;
+- int rl, rh, cl, ch;
+-
+- Matrix (int rl1, int rh1, int cl1, int ch1)
++class Matrix
++{
++ public:
++
++ T** row;
++ int rl, rh, cl, ch;
++
++ Matrix (int rl1, int rh1, int cl1, int ch1)
+ { allocate (rl1,rh1,cl1,ch1); }
+- Matrix (int nr1, int nc1) { allocate (1, nr1, 1, nc1); }
++ Matrix (int nr1, int nc1) { allocate (1, nr1, 1, nc1); }
+ ~Matrix();
+
+
diff --git a/math/kaskade/files/patch-sources_slist.h b/math/kaskade/files/patch-sources_slist.h
new file mode 100644
index 000000000000..82c45b7c78bb
--- /dev/null
+++ b/math/kaskade/files/patch-sources_slist.h
@@ -0,0 +1,11 @@
+--- ./sources/slist.h.orig Fri Dec 10 15:20:49 1999
++++ ./sources/slist.h Tue Aug 16 23:25:00 2005
+@@ -3,7 +3,7 @@
+ #ifndef SLIST_H
+ #define SLIST_H
+
+-#include <iostream.h>
++#include <iostream>
+
+
+ template<class T>
diff --git a/math/kaskade/files/patch-sources_stack.c b/math/kaskade/files/patch-sources_stack.c
new file mode 100644
index 000000000000..eeb7cfe387ff
--- /dev/null
+++ b/math/kaskade/files/patch-sources_stack.c
@@ -0,0 +1,143 @@
+--- ./sources/stack.c.orig Thu Oct 10 12:01:26 1996
++++ ./sources/stack.c Tue Aug 16 23:20:18 2005
+@@ -8,77 +8,77 @@
+ #include "stack.h"
+
+
+-template<class T>
+-Stack<T>:: Stack(int l1, int top1, int h1)
+- : Vector<T>(l1,top1) { top=top1; h=h1; }
+-
+-template<class T>
+-Stack<T>:: Stack(int l1, int top1)
+- : Vector<T>(l1,top1) { top=top1; h=l1-1; }
++template<class T>
++Stack<T>:: Stack(int l1, int top1, int h1)
++ : Vector<T>(l1,top1) { top=top1; this->h=h1; }
++
++template<class T>
++Stack<T>:: Stack(int l1, int top1)
++ : Vector<T>(l1,top1) { top=top1; this->h=l1-1; }
+
+-template<class T>
+-Stack<T>:: Stack(int top1) : Vector<T>(1,top1) { top=top1; h=0;}
++template<class T>
++Stack<T>:: Stack(int top1) : Vector<T>(1,top1) { top=top1; this->h=0;}
+
+-template<class T>
+-Stack<T>:: Stack() : Vector<T>(DefaultSize) { top=DefaultSize; h=0;}
++template<class T>
++Stack<T>:: Stack() : Vector<T>(DefaultSize) { top=DefaultSize; this->h=0;}
+
+
+
+ template<class T> void Stack<T>:: push(const T a)
+ {
+- if (h==top) extend();
+- v[++h] = a;
++ if (this->h==top) extend();
++ this->v[++this->h] = a;
+ }
+
+ template<class T> T Stack<T>:: pop()
+ {
+- if (h < l)
++ if (this->h < this->l)
+ {
+- cout << "\n*** pop tried from empty stack \n";
+- cout.flush(); abort(); return v[l]; // dummy to avoid compiler warnings
++ cout << "\n*** pop tried from empty stack \n";
++ cout.flush(); abort(); return this->v[this->l]; // dummy to avoid compiler warnings
+ }
+- else return v[h--];
++ else return this->v[this->h--];
+ }
+
+ template<class T> T Stack<T>:: Top() const
+ {
+- if (h < l)
++ if (this->h < this->l)
+ {
+- cout << "\n*** Class Stack (Top): empty stack \n";
+- cout.flush(); abort(); return v[l]; // dummy to avoid compiler warnings
++ cout << "\n*** Class Stack (Top): empty stack \n";
++ cout.flush(); abort(); return this->v[this->l]; // dummy to avoid compiler warnings
+ }
+- else return v[h];
++ else return this->v[this->h];
+ }
+
+ template<class T> T Stack<T>:: Prev() const
+ {
+- if (h <= l)
++ if (this->h <= this->l)
+ {
+- cout << "\n*** Class Stack (Prev): only one element on stack \n";
+- cout.flush(); abort(); return v[l]; // dummy to avoid compiler warnings
++ cout << "\n*** Class Stack (Prev): only one element on stack \n";
++ cout.flush(); abort(); return this->v[this->l]; // dummy to avoid compiler warnings
+ }
+- else return v[h-1];
++ else return this->v[this->h-1];
+ }
+
+ template<class T> void Stack<T>:: extend()
+ {
+- int stackSize = top-l+1;
++ int stackSize = top - this->l + 1;
+ stackSize = int(1.5*stackSize);
+ if (stackSize <= 2) stackSize = 4;
+-
+- top = l+stackSize-1;
++
++ top = this->l+stackSize-1;
+ T* vnew = new T[stackSize];
+- if (!vnew)
++ if (!vnew)
+ {
+- cout << "\n*** stack extension failure: l=" <<l<< " top=" <<top<< "\n";
++ cout << "\n*** stack extension failure: l=" <<this->l<< " top=" <<top<< "\n";
+ cout.flush(); abort();
+ }
+- vnew -= l;
++ vnew -= this->l;
+
+- for (int i=l; i<=h; ++i) vnew[i] = v[i];
+- v = v+l;
+- delete [] v;
+- v = vnew;
++ for (int i=this->l; i<=this->h; ++i) vnew[i] = this->v[i];
++ this->v = this->v + this->l;
++ delete [] this->v;
++ this->v = vnew;
+
+ if (AnnounceExtensionFlag) cout << "\n* Stack extended to " << top << "\n";
+ }
+@@ -86,10 +86,10 @@
+
+ template<class T> void Stack<T>:: resize(int newl, int newTop)
+ {
+- v += l; delete[] v;
+- allocate (newl, newTop);
++ this->v += this->l; delete[] this->v;
++ this->allocate (newl, newTop);
+ top = newTop;
+- h = newl-1;
++ this->h = newl-1;
+ }
+
+ template<class T> void Stack<T>:: resize(int newTop) { resize (1,newTop); }
+@@ -97,11 +97,11 @@
+ template<class T> void Stack<T>:: resize(int newl, int newTop, int newh)
+ {
+ resize(newl, newTop);
+- h = newh;
++ this->h = newh;
+ }
+ //-------------------------------------------------------------------------
+
+ template<class T> Stack<T>:: Stack(Stack<T>& /*vec*/)
+ {
+- notImplemented("Stack:: copy constructor! Check function arguments");
++ this->notImplemented("Stack:: copy constructor! Check function arguments");
+ }
diff --git a/math/kaskade/files/patch-sources_stack.h b/math/kaskade/files/patch-sources_stack.h
new file mode 100644
index 000000000000..e69b3bbafb71
--- /dev/null
+++ b/math/kaskade/files/patch-sources_stack.h
@@ -0,0 +1,11 @@
+--- ./sources/stack.h.orig Fri Dec 10 15:20:50 1999
++++ ./sources/stack.h Tue Aug 16 22:01:00 2005
+@@ -30,7 +30,7 @@
+
+ virtual T Top() const;
+
+- int empty() const { return h < l; }
++ int empty() const { return this->h < this->l; }
+
+ virtual void resize(int newTop);
+ virtual void resize(int newl, int newTop);
diff --git a/math/kaskade/files/patch-sources_utils.h b/math/kaskade/files/patch-sources_utils.h
new file mode 100644
index 000000000000..6b8b82473958
--- /dev/null
+++ b/math/kaskade/files/patch-sources_utils.h
@@ -0,0 +1,15 @@
+--- ./sources/utils.h.orig Tue Dec 14 15:57:46 1999
++++ ./sources/utils.h Tue Aug 16 21:32:31 2005
+@@ -3,10 +3,10 @@
+ #ifndef UTILS_H
+ #define UTILS_H
+
+-#include <stddef.h>
++#include <stddef.h>
+ #include <stdio.h>
+ #include <string.h>
+-#include <iostream.h>
++#include <iostream>
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <math.h>
diff --git a/math/kaskade/files/patch-sources_varalloc.cc b/math/kaskade/files/patch-sources_varalloc.cc
new file mode 100644
index 000000000000..7b0d7ab389b3
--- /dev/null
+++ b/math/kaskade/files/patch-sources_varalloc.cc
@@ -0,0 +1,11 @@
+--- ./sources/varalloc.cc.orig Fri Dec 10 12:41:11 1999
++++ ./sources/varalloc.cc Wed Aug 17 00:04:09 2005
+@@ -5,7 +5,7 @@
+ Part of the Kaskade distribution
+ */
+
+-#include <iostream.h>
++#include <iostream>
+ #include <stdlib.h>
+
+ #include "varalloc.h"
diff --git a/math/kaskade/files/patch-sources_vector.c b/math/kaskade/files/patch-sources_vector.c
new file mode 100644
index 000000000000..404ff2e6d4b2
--- /dev/null
+++ b/math/kaskade/files/patch-sources_vector.c
@@ -0,0 +1,28 @@
+--- ./sources/vector.c.orig Thu Oct 10 12:01:35 1996
++++ ./sources/vector.c Tue Aug 16 22:37:14 2005
+@@ -5,12 +5,14 @@
+ Part of the Kaskade distribution
+ */
+
++#include <iostream>
++using namespace std;
+
+ template<class T> Vector<T>:: ~Vector() { v+=l; delete[] v; }
+
+ template<class T> void Vector<T>:: allocate (int l1, int h1)
+-{
+- l=l1; h=h1;
++{
++ l=l1; h=h1;
+ if (h < l) {
+ cout << "\n*** Class vector: wrong indices: l,h = "
+ << l << " " << h << "\n";
+@@ -23,7 +25,7 @@
+ cout.flush(); abort();
+ }
+ v -= l;
+-}
++}
+
+ template<class T> void Vector<T>:: resize(int newl, int newh)
+ {
diff --git a/math/kaskade/files/patch-sources_vector.h b/math/kaskade/files/patch-sources_vector.h
new file mode 100644
index 000000000000..d7899f29e98b
--- /dev/null
+++ b/math/kaskade/files/patch-sources_vector.h
@@ -0,0 +1,31 @@
+--- ./sources/vector.h.orig Fri Dec 10 15:21:23 1999
++++ ./sources/vector.h Tue Aug 16 22:04:53 2005
+@@ -12,20 +12,20 @@
+
+ //-------------------------------------------------------------------------
+
+-#include <iostream.h>
+-#include <stdlib.h>
++#include <iostream>
++#include <stdlib.h>
+
+ //----------------------------------------------------------------------------
+
+ template<class T>
+
+-class Vector
+-{
+- public:
+-
+- T* v;
++class Vector
++{
++ public:
++
++ T* v;
+ int l, h;
+-
++
+ Vector(int l1, int h1) { allocate(l1, h1); }
+ Vector(int h1) { allocate( 1, h1); }
+ Vector() { allocate( 1, 1); }
diff --git a/math/kaskade/pkg-plist b/math/kaskade/pkg-plist
index 81c0c869ce25..357a51e1b9f6 100644
--- a/math/kaskade/pkg-plist
+++ b/math/kaskade/pkg-plist
@@ -55,6 +55,7 @@ bin/k6
%%PORTDOCS%%%%EXAMPLESDIR%%/holes-3d.cmd
%%PORTDOCS%%%%EXAMPLESDIR%%/holes-3d.geo
%%PORTDOCS%%%%EXAMPLESDIR%%/holes-3d.mat
+%%PORTDOCS%%%%EXAMPLESDIR%%/integ.dat
%%PORTDOCS%%%%EXAMPLESDIR%%/jump.cmd
%%PORTDOCS%%%%EXAMPLESDIR%%/jump.ex
%%PORTDOCS%%%%EXAMPLESDIR%%/jump.geo