I'm updating the port for Octave, and trying to adapt to the MODGCC
fortran for building.  It does not seem to recognize g95 version 4.2:

# make package
===>  Checking files for octave-3.2.4
`/usr/ports/distfiles/octave-3.2.4.tar.gz' is up to date.
`/usr/ports/distfiles/UFconfig-3.4.0.tar.gz' is up to date.
>> (SHA256) octave-3.2.4.tar.gz: OK
>> (SHA256) UFconfig-3.4.0.tar.gz: OK
===>  octave-3.2.4 depends on: g95->=4.2,<4.3 - not found
===>  Verifying install for g95->=4.2,<4.3 in lang/gcc/4.2
===> Returning to build of octave-3.2.4
===>  octave-3.2.4 depends on: g95->=4.2,<4.3 - not found
===>  Verifying install for g95->=4.2,<4.3 in lang/gcc/4.2
===> Returning to build of octave-3.2.4
Dependency check failed
*** Error code 1

Stop in /usr/ports/myports/math/octave (line 1657 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/myports/math/octave (line 2049 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/myports/math/octave (line 1476 of
/usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/myports/math/octave (line 2016 of
/usr/ports/infrastructure/mk/bsd.port.mk).
# pkg_info
amd-2.2.0p0         order a sparse matrix prior to Cholesky factorization
autoconf-2.61p3     automatically configure source code on many Un*x
platforms
blas-1.0p3          Basic Linear Algebra Subprograms
curl-7.19.7p0       get files from FTP, Gopher, HTTP or HTTPS servers
desktop-file-utils-0.15p1 utilities for 'desktop' entries
fftw3-3.2.2         C routines for computing the Discrete Fourier Transform
fftw3-common-3.2.2  common files for the fftw3 packages
fftw3-float-3.2.2   C routines for computing the Discrete Fourier Transform
g++-4.2.4p2v0       GNU compiler collection: C++ compiler
g95-4.2.4p1v0       GNU compiler collection: f95 compiler
gcc-4.2.4p0v0       GNU compiler collection: core C compiler
gettext-0.17p0      GNU gettext
glib2-2.22.4        general-purpose utility library
gmake-3.81p0        GNU make
gmp-4.3.1           library for arbitrary precision arithmetic
lapack-3.1.1p1      library of Fortran 77 linear algebra subroutines
libgamin-0.1.10     file and directory monitoring system
libiconv-1.13p0     character set conversion library
libidn-1.11         internationalized string handling
libstdc++-4.2.4v0   GNU compiler collection: C++ compiler library
metaauto-0.9        wrapper for gnu auto*
mpfr-2.3.2          library for multiple-precision floating-point
computations
pcre-7.9            perl-compatible regular expression library

I have g95 but it is not recognized.  I suspect some interaction between
the "95" of g95 and "4.2" of the version range test.

This is the Feb21 snapshot and /usr/ports updated to -current as of
yesterday.

The relevent lines of Makefile are

MODULES +=      gcc4
MODGCC4_ARCHES = i386
MODGCC4_LANGS += c++ fortran

If I remove "fortran" it builds with f77 from comp47.tgz, of course.  In
other words, gcc-4.2.4 is OK but g95-4.2.4 is not.

I've got a variation of this working on 4.6-release, but had to adjust the
gcc.port.mk to redefine f77 commands to be egfortran.

Here is my Makefile for Octave 3.2.4, based on the 4.6 original:

NOT_FOR_ARCHS=  vax sparc

COMMENT=        high-level language for numerical computations

VERSION=        3.2.4
DISTNAME=       octave-${VERSION}
PKGNAME=        ${DISTNAME}
CATEGORIES=     myports

SHARED_LIBS=    cruft           5.1 \
                octave          5.1 \
                octinterp       4.1

HOMEPAGE=       http://www.gnu.org/software/octave/

MAINTAINER=     Steven Mestdagh <[email protected]>

# GPL v3
PERMIT_PACKAGE_CDROM=   Yes
PERMIT_PACKAGE_FTP=     Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP=   Yes

WANTLIB=        c freetype m ncurses pthread readline stdc++ z GL GLU X11

MASTER_SITES=   ftp://ftp.octave.org/pub/octave/ \
                ftp://ftp.u-aizu.ac.jp/pub/SciEng/numanal/Octave/ \
                ftp://neacm.fe.up.pt/pub/octave/
MASTER_SITES0 = http://www.cise.ufl.edu/research/sparse/UFconfig/
DISTFILES  =    ${DISTNAME}${EXTRACT_SUFX} UFconfig-3.4.0.tar.gz:0

MODULES +=      gcc4
MODGCC4_ARCHES = i386
MODGCC4_LANGS += c++ fortran


BUILD_DEPENDS=  ::devel/desktop-file-utils
RUN_DEPENDS=    ::devel/gmake \
                :desktop-file-utils-*:devel/desktop-file-utils
LIB_DEPENDS=    fftw3.>=3::math/fftw3 \
                fftw3.>=3::math/fftw3,float \
                amd::math/amd \
                pcre.>=1::devel/pcre \
                curl.>=6::net/curl

USE_GMAKE=      Yes

CONFIGURE_STYLE = autoconf
AUTOCONF_VERSION=2.61
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
                --with-fftw \
                --without-blas --without-lapack \
                --without-hdf5
CONFIGURE_ENV=  CFLAGS="-I${WRKDIR}/UFconfig -I${LOCALBASE}/include/amd
-I${X11BASE}/include" \
                CPPFLAGS="-I${WRKDIR}/UFconfig -I${LOCALBASE}/include/amd
-I${X11BASE}/include" \
                LDFLAGS="-L${LOCALBASE}/lib" \
                LIBS="-lpthread" \
                F77=${FC} \
                SED=/usr/bin/sed
MAKE_ENV=       LIBcruft_VERSION=${LIBcruft_VERSION} \
                LIBoctave_VERSION=${LIBoctave_VERSION} \
                LIBoctinterp_VERSION=${LIBoctinterp_VERSION}

USE_X11 =       Yes

.if ${MACHINE_ARCH} == "alpha"
CONFIGURE_ENV+= FFLAGS="${FFLAGS}"
.endif

# needed to build on amd64
GCC_ARCH=       ${MACHINE_ARCH}-unknown-openbsd${OPSYS_VER}
GNU_ARCH=       ${GCC_ARCH:S/amd64/x86_64/}
SUBST_VARS=     GNU_ARCH VERSION

# need to use fpic version of libgcc.a
post-configure:
        @perl -pi -e 's#(gcc-lib/${GCC_ARCH}/[\d.]+)\s#\1/fpic #' \
                ${WRKBUILD}/Makeconf

.ifmake regress
# some tests need HOME to be writable
PORTHOME=       /tmp
# define some user for tilde expansion test
MAKE_ENV+=      USER=nobody
.endif

post-regress:
        @rm -df /tmp/oct-*

# fix ls-R and install HTML documentation
HTMLDOCS=       interpreter liboctave
post-install:
        @cd ${PREFIX}/share/octave && \
                perl -pi -e "s,${PREFIX},${TRUEPREFIX}," ls-R
        @cd ${PREFIX}/libexec/octave && \
                perl -pi -e "s,${PREFIX},${TRUEPREFIX}," ls-R
.for d in ${HTMLDOCS}
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/octave/${d}
        ${INSTALL_DATA} ${WRKBUILD}/doc/${d}/HTML/*.html \
                ${PREFIX}/share/doc/octave/${d}
.endfor

.include <bsd.port.mk>

Can anyone confirm/refute the workings of fortran in MODGCC?  What can I
try short of digging into bsd.port.mk guts?

thanks

--John



Reply via email to