Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2007 18:46:40 +0100
From:      "Harald Servat" <redcrash@gmail.com>
To:        "Stephen Montgomery-Smith" <stephen@math.missouri.edu>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: fortran compiler issues in port
Message-ID:  <d825e0270710281046v68521fc5j702218450c1f3d3c@mail.gmail.com>
In-Reply-To: <47236A23.9020901@math.missouri.edu>
References:  <d825e0270710270734i3b3f686axa13b2ae18693f061@mail.gmail.com> <47236A23.9020901@math.missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
2007/10/27, Stephen Montgomery-Smith <stephen@math.missouri.edu>:
>
> Harald Servat wrote:
> > Hello,
> >
> >   I'm a maintainer of a port which needs a fortran compiler. Due to the
> > inclusion of GCC 4.2 as the default compiler for FreeBSD 7.0 I'm facing
> a
> > problem with the port. My FreeBSD 6.2 box can compile fine my port using
> > f77, however the build farms do not compile successfully the port
> because
> > they use gfortran42 (which comes with GCC 4.2) and this compiler needs
> an
> > special flag to compile the port.
> >
> >   I was thinking to place an "if" statement checking if ${F77} is f77 or
> > gfortran42 and act in consequence like the code below:
> >
> > .if "${F77}" = "f77"
> > specific setting for F77
> > .elif "${F77}" = "gfortran42"
> > specific setting for gfortran42
> > .endif
> >
> >   However, there's an issue here, what will happen when gfortran43 is
> > installed? It won't work. Is there a clear way to check for "gfortran*"
> > instead of an specific version?
> >   As all gfortran compilers have the same specific needs for my port, I
> > think this should be a better and clearer way to solve the compiling
> problem
> > of my port.
>
> One possibility is to put "USE_FORTRAN" in your makefile.  Then if you
> are using FreeBSD 6.2, I think it will first install the gcc42 port, and
> then use that.
>
> But to specifically answer your question, maybe something like
>
> .elif "${F77:C/[[:digit:]]*//} = "gfortran"
>
> would work.  I admit I haven't tested it, but if it doesn't work
> something similar will.  You need to read "man make" (quite an easy
> document to read) and "man re_format" (quite a lot to take in, and not
> so easy to read).
>
>
Aha!, thank you very much for your answers. I'll take a look into the Mk and
the man files you pointed.

-- 
_________________________________________________________________
Empty your memory,
with a free()...
like a pointer!

If you cast a pointer to an integer,
it becomes an integer,
if you cast a pointer to a struct,
it becomes a struct.

The pointer can crash...,
and can overflow.

Be a pointer my friend...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d825e0270710281046v68521fc5j702218450c1f3d3c>