* Unbreak build of FORTRAN parts.

PR:		40928
Submitted by:	Amar Takhar <verm@drunkmonk.net>

* Fix build on -CURRENT.
This commit is contained in:
Christian Weisgerber 2002-07-23 22:30:18 +00:00
parent 21cb6ca48e
commit b0c55b07ca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=63460
5 changed files with 95 additions and 75 deletions

View file

@ -14,8 +14,6 @@ DISTFILES= femlab-2d-v${PORTVERSION}.tar.gz
MAINTAINER= ports@FreeBSD.org
BROKEN= "Does not build"
BUILD_DEPENDS= ${X11BASE}/lib/libsx.a:${PORTSDIR}/x11/libsx
USE_X_PREFIX= yes

View file

@ -1,74 +1,57 @@
*** source/graph.c.orig Thu Sep 14 08:42:13 1995
--- source/graph.c Sat Mar 7 00:14:42 1998
***************
*** 608,614 ****
void getDrawingScale()
{
float xoff, yoff;
! float scl;
int width, height;
int ww;
int nx, ny, id;
--- 611,617 ----
void getDrawingScale()
{
float xoff, yoff;
! float iscl; /* inverse scale */
int width, height;
int ww;
int nx, ny, id;
***************
*** 630,654 ****
width = width / nx;
height = height / ny;
! if(state > HAVE_NOTHING){
! scl = 1./max(xmax-xmin,ymax-ymin);
! xoff = -scl*(xmin+.5*(xmax-xmin)-.5/scl);
! yoff = -scl*(ymin+.5*(ymax-ymin)-.5/scl);
!
! xoff = - xmin*scl*.85;
! yoff = - ymin*scl*.85;
!
! ww = min(width, height);
! Xscl = (int) ((float)ww * 0.85 * scl);
! Xxoff = (int) ww * xoff ;
! Xyoff = (int) ww * yoff;
! Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
! Xyoff += (int) (height - ( Xscl*ymax +Xyoff))/2 + (int)(id/(nx+.5)) *height;
! }
SetDrawArea(drawWindow);
if(device == PS)
psGetScale();
}
void getBoundaryScale(Widget w, void *data)
--- 633,659 ----
width = width / nx;
height = height / ny;
! iscl = max(xmax-xmin,ymax-ymin);
! if (iscl != 0.0) {
! if(state > HAVE_NOTHING) {
! /* These are recalculated ??
! xoff = .5-(xmin+.5*(xmax-xmin))/iscl;
! yoff = .5-(ymin+.5*(ymax-ymin))/iscl;
! */
! xoff = - xmin*.85/iscl;
! yoff = - ymin*.85/iscl;
! ww = min(width, height);
! Xscl = (int) ((float)ww * 0.85 / iscl);
! Xxoff = (int) ww * xoff ;
! Xyoff = (int) ww * yoff;
! Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
! Xyoff += (int) (height - ( Xscl*ymax +Xyoff))/2 + (int)(id/(nx+.5)) *height;
! }
SetDrawArea(drawWindow);
if(device == PS)
psGetScale();
$FreeBSD$
--- source/graph.c.orig Wed Jul 24 00:01:06 2002
+++ source/graph.c Wed Jul 24 00:01:07 2002
@@ -608,7 +608,7 @@
void getDrawingScale()
{
float xoff, yoff;
- float scl;
+ float iscl; /* inverse scale */
int width, height;
int ww;
int nx, ny, id;
@@ -630,25 +630,27 @@
width = width / nx;
height = height / ny;
- if(state > HAVE_NOTHING){
- scl = 1./max(xmax-xmin,ymax-ymin);
- xoff = -scl*(xmin+.5*(xmax-xmin)-.5/scl);
- yoff = -scl*(ymin+.5*(ymax-ymin)-.5/scl);
-
- xoff = - xmin*scl*.85;
- yoff = - ymin*scl*.85;
-
- ww = min(width, height);
- Xscl = (int) ((float)ww * 0.85 * scl);
- Xxoff = (int) ww * xoff ;
- Xyoff = (int) ww * yoff;
- Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
- Xyoff += (int) (height - ( Xscl*ymax +Xyoff))/2 + (int)(id/(nx+.5)) *height;
- }
+ iscl = max(xmax-xmin,ymax-ymin);
+ if (iscl != 0.0) {
+ if(state > HAVE_NOTHING) {
+/* These are recalculated ??
+ xoff = .5-(xmin+.5*(xmax-xmin))/iscl;
+ yoff = .5-(ymin+.5*(ymax-ymin))/iscl;
+*/
+ xoff = - xmin*.85/iscl;
+ yoff = - ymin*.85/iscl;
+ ww = min(width, height);
+ Xscl = (int) ((float)ww * 0.85 / iscl);
+ Xxoff = (int) ww * xoff ;
+ Xyoff = (int) ww * yoff;
+ Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
+ Xyoff += (int) (height - ( Xscl*ymax +Xyoff))/2 + (int)(id/(nx+.5)) *height;
+ }
}
void getBoundaryScale(Widget w, void *data)
SetDrawArea(drawWindow);
if(device == PS)
psGetScale();
+ }
}
void getBoundaryScale(Widget w, void *data)

View file

@ -0,0 +1,11 @@
$FreeBSD$
--- fsource/makepoisson.orig Thu Sep 14 09:47:27 1995
+++ fsource/makepoisson Wed Jul 24 00:06:17 2002
@@ -1,4 +1,4 @@
-FFLAGS= -O
+FFLAGS= -O -fno-globals
FFILES= dwm1.f startpo.f preproc.f rhslhs.f poisson.f output.f

View file

@ -0,0 +1,14 @@
$FreeBSD$
--- fsource/y.tab.c.orig Wed Jul 24 00:14:46 2002
+++ fsource/y.tab.c Wed Jul 24 00:14:56 2002
@@ -38,7 +38,7 @@
#include <memory.h>
#endif
-#include <values.h>
+#include <float.h>
#ifdef __cplusplus

View file

@ -0,0 +1,14 @@
$FreeBSD$
--- source/y.tab.c.orig Wed Jul 24 00:01:34 2002
+++ source/y.tab.c Wed Jul 24 00:01:44 2002
@@ -38,7 +38,7 @@
#include <memory.h>
#endif
-#include <values.h>
+#include <float.h>
#ifdef __cplusplus