diff options
author | maho <maho@FreeBSD.org> | 2007-01-17 10:21:49 +0800 |
---|---|---|
committer | maho <maho@FreeBSD.org> | 2007-01-17 10:21:49 +0800 |
commit | f1a12ce55375e626923fc389a8625501243ea68f (patch) | |
tree | 3db8f259dda8bccb56dd440395130a8127cb167f /science/mbdyn | |
parent | cb8b684fb0431da3a06582978dd846252d5d54fb (diff) | |
download | freebsd-ports-gnome-f1a12ce55375e626923fc389a8625501243ea68f.tar.gz freebsd-ports-gnome-f1a12ce55375e626923fc389a8625501243ea68f.tar.zst freebsd-ports-gnome-f1a12ce55375e626923fc389a8625501243ea68f.zip |
* Migrate to gfortran.
* Bump port revision.
* Use gfortran compiled atlas/blas/lapack.
* Approved by: portmgr(kris)
Diffstat (limited to 'science/mbdyn')
-rw-r--r-- | science/mbdyn/Makefile | 33 | ||||
-rw-r--r-- | science/mbdyn/files/patch-configure.in | 103 | ||||
-rw-r--r-- | science/mbdyn/files/patch-dummy_c.c | 11 | ||||
-rw-r--r-- | science/mbdyn/files/patch-modules+Makefile.in | 11 |
4 files changed, 153 insertions, 5 deletions
diff --git a/science/mbdyn/Makefile b/science/mbdyn/Makefile index ff41cb48d891..4a75f108e21e 100644 --- a/science/mbdyn/Makefile +++ b/science/mbdyn/Makefile @@ -7,24 +7,31 @@ PORTNAME= mbdyn PORTVERSION= 1.2.6 +PORTREVISION= 1 CATEGORIES= science MASTER_SITES= http://mbdyn.aero.polimi.it/~masarati/Download/mbdyn/ MAINTAINER= kay_lehmann@web.de COMMENT= A MultiBody Dynamics analysis system -LIB_DEPENDS= lapack.3:${PORTSDIR}/math/lapack \ - atlas.1:${PORTSDIR}/math/atlas -BUILD_DEPENDS= ${LOCALBASE}/lib/libumfpack.a:${PORTSDIR}/math/umfpack +LIB_DEPENDS= umfpack:${PORTSDIR}/math/suitesparse GNU_CONFIGURE= yes +USE_AUTOTOOLS= autoconf:259 USE_GMAKE= yes CONFIGURE_ARGS+= --program-prefix='' --with-umfpack=yes -CPPFLAGS+= -I${LOCALBASE}/include/UMFPACK ${PTHREAD_CFLAGS} +CPPFLAGS+= -I${LOCALBASE}/include/suitesparse ${PTHREAD_CFLAGS} LDFLAGS+= -lm -L${LOCALBASE}/lib ${PTHREAD_LIBS} +WANT_FORTRAN= yes #dummy but future use +BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42 +FC= gfortran42 +F77= gfortran42 +FORTRANLIBS= -lgfortranbegin -lgfortran +GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../.. CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" + LDFLAGS="${LDFLAGS}" \ + FC="${FC}" F77="${F77}" FFLAGS="${FFLAGS}" MAN1= mbdyn.1 @@ -35,6 +42,22 @@ OPTIONS= MPI "Enable mpich-support" off \ .include <bsd.port.pre.mk> +WITH_BLAS= yes +.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS) +WITH_ATLAS= yes +.endif +.if defined(WITH_ATLAS) +LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas +CONFIGURE_ARGS+= --with-blas=atlas +.else +LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas +CONFIGURE_ARGS+= --with-blas=blas +.endif + +post-patch: + @${DIRNAME} `${LOCALBASE}/bin/${F77} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR + @${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" -e "s+%%FORTRANLIBS%%+${FORTRANLIBS}+" ${WRKSRC}/configure.in + .if defined(WITH_MPI) BUILD_DEPENDS+= ${LOCALBASE}/mpich/lib/libmpich.a:${PORTSDIR}/net/mpich CONFIGURE_ARGS+= --with-mpi=pmpi diff --git a/science/mbdyn/files/patch-configure.in b/science/mbdyn/files/patch-configure.in new file mode 100644 index 000000000000..5c277395890a --- /dev/null +++ b/science/mbdyn/files/patch-configure.in @@ -0,0 +1,103 @@ +--- configure.in.orig Wed Jan 17 10:27:48 2007 ++++ configure.in Wed Jan 17 10:29:35 2007 +@@ -157,7 +157,6 @@ + dnl ---------------------------------------------------------------- + dnl General "with" options + OL_ARG_WITH(tcl,[ --with-tcl with tcl interpreters],auto,[auto yes no]) +-OL_ARG_WITH(libf2c,[ --with-libf2c[={f2c|g2c}] with f2c library],auto,[auto yes no g2c]) + OL_ARG_WITH(fs,[ --with-fs[={unix|dos}] filesystem type],unix,[unix dos]) + OL_ARG_WITH(mpi,[ --with-mpi with MPI support (=pmpi for profiling)],auto,[auto yes pmpi no]) + OL_ARG_ENABLE(debug_mpi,[ --enable-debug-mpi enable MPI debugging], no)dnl +@@ -597,7 +596,7 @@ + AC_CHECK_LIB(tcl,Tcl_CreateInterp,[have_libtcl=yes],[have_libtcl=no]) + if test $have_libtcl != no ; then + AC_DEFINE(USE_TCL,1,[define if you want to use tcl]) +- TCL_LIBS=-ltcl ++ TCL_LIBS=-ltcl84 + else + if test $ol_with_tcl != auto ; then + AC_MSG_ERROR([Could not locate tcl library]) +@@ -629,64 +628,6 @@ + + dnl ---------------------------------------------------------------- + dnl +-dnl Check for f2c libraries +-dnl +-ol_link_libf2c=no +-if test $ol_with_libf2c != no ; then +- AC_CHECK_HEADERS(g2c.h f2c.h) +- +- AC_MSG_CHECKING([for f2c library]) +- AC_MSG_RESULT([]) +- +- if test $ol_with_libf2c = g2c ; then +- libf2c_pool="g2c" +- else +- libf2c_pool="f2c g2c" +- fi +- +- for l in $libf2c_pool ; do +- AC_MSG_CHECKING([for lib$l]) +- +- try_libf2c="$l" +- try_libf2c_LIBS="-l$l" +- save_LIBS=$LIBS +- LIBS="$LIBS $try_libf2c_LIBS -lm" +- AC_TRY_LINK([ +-#include <$top_builddir/include/ac/f2c.h> +- ],[ +- doublereal i = 1., o; +- o = d_cos(&i); +- ],[have_libf2c=yes],[have_libf2c=no]) +- LIBS=$save_LIBS +- +- if test $have_libf2c != no ; then +- F2C_LIBS=$try_libf2c_LIBS +- AC_MSG_RESULT([yes]) +- ol_link_libf2c=yes +- break +- else +- AC_MSG_RESULT([no]) +- fi +- done +- +- if test $ol_link_libf2c = no ; then +- +- if test $ol_with_libf2c != auto ; then +- AC_MSG_ERROR([Could not locate f2c library]) +- else +- AC_MSG_WARN([f2c library not supported]) +- fi +- else +- dnl Hack to allow different Fortran compatibility libraries +- dnl that apparently do not implement integer power of double +- AC_CHECK_LIB($try_libf2c,pow_di,[ +- AC_DEFINE(HAVE_POW_DI,1,[define if pow_di() function is available])]) +- fi +-fi +- +- +-dnl ---------------------------------------------------------------- +-dnl + dnl Check for UNIX fs !?! + dnl + case "$ol_with_fs" in +@@ -949,6 +948,9 @@ + dnl + dnl Check for BLAS + dnl ++ ++F2C_LIBS="%%GCCLIBDIR%% %%FORTRANLIBS%%" ++ + ol_link_blas=no + if test $ol_with_blas != no ; then + dnl FIXME: any standard BLAS headers? +@@ -1641,7 +1582,7 @@ + ],[have_mpi=yes],[have_mpi=no]) + if test $have_mpi = no ; then + if test "$ol_with_mpi" = "pmpi" ; then +- try_mpi_LIBS="-lpmpich++ -lmpich -lpmpich -lnsl" ++ try_mpi_LIBS="-lpmpich++ -lmpich -lpmpich" + else + try_mpi_LIBS="-lmpich++ -lmpich -lnsl" + fi diff --git a/science/mbdyn/files/patch-dummy_c.c b/science/mbdyn/files/patch-dummy_c.c new file mode 100644 index 000000000000..4ca21b5553ab --- /dev/null +++ b/science/mbdyn/files/patch-dummy_c.c @@ -0,0 +1,11 @@ +--- mbdyn/dummy_c.c~ Thu Jan 19 01:26:09 2006 ++++ mbdyn/dummy_c.c Wed Jan 17 11:12:01 2007 +@@ -40,7 +40,7 @@ + dummy_c(void) + { + double a, b; +- pow_dd(&a, &b); ++// pow_dd(&a, &b); + + #ifdef NEED_F77_IO + #warning "needed for F77 I/o" diff --git a/science/mbdyn/files/patch-modules+Makefile.in b/science/mbdyn/files/patch-modules+Makefile.in new file mode 100644 index 000000000000..b9146decb438 --- /dev/null +++ b/science/mbdyn/files/patch-modules+Makefile.in @@ -0,0 +1,11 @@ +--- modules/Makefile.in~ Wed Feb 1 20:32:46 2006 ++++ modules/Makefile.in Wed Jan 17 09:35:04 2007 +@@ -375,7 +375,7 @@ + -fPIC \ + $(AM_CPPFLAGS) @CPPFLAGS@ $(AM_CXXFLAGS) @CXXFLAGS@ + export CXXLINK = @LIBTOOL@ --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +- @CXXFLAGS@ @LDFLAGS@ -shared -lg2c ++ @CXXFLAGS@ @LDFLAGS@ %%GCCLIBDIR%% %%FORTRANLIBS%% + export LTCOMPILE = @LIBTOOL@ --mode=compile @CC@ @DEFS@ \ + -I. -I@srcdir@ -I../../include \ + -I../../libraries/libmbutil -I../../libraries/libmbmath \ |