* 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 MAINTAINER= ports@FreeBSD.org
BROKEN= "Does not build"
BUILD_DEPENDS= ${X11BASE}/lib/libsx.a:${PORTSDIR}/x11/libsx BUILD_DEPENDS= ${X11BASE}/lib/libsx.a:${PORTSDIR}/x11/libsx
USE_X_PREFIX= yes USE_X_PREFIX= yes

View file

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

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