aboutsummaryrefslogtreecommitdiff
path: root/french
diff options
context:
space:
mode:
Diffstat (limited to 'french')
-rw-r--r--french/aster/Makefile63
-rw-r--r--french/aster/files/patch-products.py44
2 files changed, 87 insertions, 20 deletions
diff --git a/french/aster/Makefile b/french/aster/Makefile
index 9ee42a6d73a3..a34748cef197 100644
--- a/french/aster/Makefile
+++ b/french/aster/Makefile
@@ -7,7 +7,7 @@
PORTNAME= aster
DISTVERSION= 8.2.0-4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= french cad python
MASTER_SITES= http://www.code-aster.org/FICHIERS/
DISTNAME= ${PORTNAME}-full-src-${DISTVERSION}
@@ -23,8 +23,9 @@ COMMENT= Code_Aster finite element method solver
# - WITH_ZSH or WITH_BASH or WITH_KSH: select a shell among
# zsh (default), bash or ksh;
# - WITH_ED: select an editor accepting '-display' (e.g. gvim, nedit);
-# - WITH_BLAS: don't link with atlas, but with blas;
-# (blas is slower, but lighter)
+# - WITH_ATLAS: replace blas;
+# - WITH_BLAS: don't link with atlas, even if present, but with blas;
+# (blas might be slower, but is lighter)
# - WITHOUT_ASTK_CLI: won't use the GUI from this machine;
# - WITHOUT_EFICAS: don't install ASter Command FIle Editor;
# - WITHOUT_GMSH: don't install GMSH (a mesh generator);
@@ -32,6 +33,7 @@ COMMENT= Code_Aster finite element method solver
# - WITHOUT_MACR_RECAL: don't install Numerical Python
# (required by the macro MACR_RECAL);
# - WITHOUT_SCOTCH: don't install Scotch.
+# - WITH_MUMPS: install the interface between Code_Aster and MUMPS (experimental)
#
#-----------------------------------------------------------------------
@@ -47,8 +49,8 @@ RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/Gnuplot:${PORTSDIR}/math/py-gnuplot \
${LOCALBASE}/bin/onmetis.exe:${PORTSDIR}/math/metis-edf \
${LOCALBASE}/aster/ASTK/ASTK_SERV:${PORTSDIR}/cad/astk-serveur
-#USE_GCC= 3.4 # Helps on 4.x, but not sufficient.
USE_PYTHON= yes
+USE_BISON= yes
HAS_CONFIGURE= yes
REINPLACE_ARGS= -i ""
@@ -80,10 +82,13 @@ BROKEN= Seg. fault on ${ARCH} during compilation of elements.
BROKEN= Does not build on sparc64
.endif
-.if defined(WITH_BLAS)
-LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas
-.else
+.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS)
+WITH_ATLAS= yes
+.endif
+.if defined(WITH_ATLAS)
LIB_DEPENDS+= f77blas.1:${PORTSDIR}/math/atlas
+.else
+LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas
.endif
.if !defined(WITHOUT_ASTK_CLI)
RUN_DEPENDS+= ${ASTKDIR}:${PORTSDIR}/cad/astk-client
@@ -116,6 +121,17 @@ RUN_DEPENDS+= ${PYNUMERIC}
BUILD_DEPENDS+= ${LOCALBASE}/lib/libscotch.a:${PORTSDIR}/cad/scotch
.endif
+.if exists(${LOCALBASE}/lib/libcmumps.a)
+WITH_MUMPS= yes
+.endif
+.if defined(WITH_MUMPS)
+F90= gfortran41
+FC= ${LOCALBASE}/bin/${F90}
+DLIBF90!= ${DIRNAME} `${LDCONFIG} -r | ${GREP} gfortran | ${AWK} '{print $$3}'`
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libcmumps.a:${PORTSDIR}/math/mumps \
+ ${FC}:${PORTSDIR}/lang/gfortran
+.endif
+
.if !${OSVERSION} < 500039
F77?= f77
.endif
@@ -178,20 +194,22 @@ v_ifdef= ${OPSYS:U}
SHELL_INSTALL_ASTER= ${LOCALBASE}/bin/${SHIA}
tcl_dir= ${LOCALBASE}
hdf_dir= ${LOCALBASE}
-.if defined(WITH_BLAS)
-lib_blas= blas
+.if defined(WITH_ATLAS)
+lib_blas= ptf77blas
+lib_atlas= atlas_r
.else
-lib_blas= f77blas
-lib_atlas= atlas
+lib_blas= blas
+lib_atlas= # empty
.endif
LASTKDIR?= ${PORTNAME}/ASTK/ASTK_CLIENT
ASTKDIR= ${LOCALBASE}/${LASTKDIR}
pre-configure:
+ @${REINPLACE_CMD} -e 's|PREFER_SHARED_LIBS=False|PREFER_SHARED_LIBS=True|' ${WRKSRC}/setup.cfg
@${REINPLACE_CMD} -e 's|/opt/aster|${WRKSRC}/instdir|' \
-e 's|/usr/bin/gcc|${CC}|;s|/usr/bin/g77|${F77}|' \
${WRKSRC}/setup.cfg
-.if !defined(WITH_BLAS)
+.if defined(WITH_ATLAS)
@${REINPLACE_CMD} -e "s|cfg\['BLASLIB'\]|cfg['BLASLIB'], cfg['ATLASLIB']|" \
${WRKSRC}/products.py
.endif
@@ -212,13 +230,24 @@ pre-configure:
@${ECHO_CMD} "_install_aster_Linux = False" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "_install_scotch = False" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "HOME_SCOTCH = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg
+.if defined(WITH_MUMPS)
+ @${ECHO_CMD} "HOME_MUMPS = '${LOCALBASE}'" >> ${WRKSRC}/setup.cfg
+ @${ECHO_CMD} "F90='${LOCALBASE}/bin/gfortran41'" >> ${WRKSRC}/setup.cfg
+ @${ECHO_CMD} "SYSLIB='-Xlinker -export-dynamic ${PTHREAD_LIBS} -lutil -lm -lz -lg2c -L${DLIBF90} -lgfortran'" \
+ >> ${WRKSRC}/setup.cfg
+.else
@${ECHO_CMD} "HOME_MUMPS = ''" >> ${WRKSRC}/setup.cfg
+ @${ECHO_CMD} "SYSLIB='-Xlinker -export-dynamic ${PTHREAD_LIBS} -lutil -lm -lz -lg2c'" \
+ >> ${WRKSRC}/setup.cfg
+.endif
@${ECHO_CMD} "HOME_ZMAT = ''" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "HOME_HDF='${hdf_dir}'" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "HOME_MED='${LOCALBASE}'" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "HOME_TCL_TK='${tcl_dir}'" >> ${WRKSRC}/setup.cfg
- @${ECHO_CMD} "BLASLIB='${lib_blas}'" >> ${WRKSRC}/setup.cfg
+.if defined(WITH_ATLAS)
@${ECHO_CMD} "ATLASLIB='${lib_atlas}'" >> ${WRKSRC}/setup.cfg
+.endif
+ @${ECHO_CMD} "BLASLIB='${lib_blas}'" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "LAPACKLIB='${LOCALBASE}/lib/liblapack.a'" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "GZIP='/usr/bin/gzip'" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "SHELL_EXECUTION='${SHELL_INSTALL_ASTER}'" >> ${WRKSRC}/setup.cfg
@@ -226,12 +255,14 @@ pre-configure:
@${ECHO_CMD} "LDFLAGS='-v ${LDFLAGS}'" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "FFLAGS='-c ${FFLAGS} -D${FLAGARCH}'" >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "FFLAGS_DBG='-c -g -O -D${FLAGARCH}'" >> ${WRKSRC}/setup.cfg
+ @${ECHO_CMD} "F90FLAGS='-c ${FFLAGS} -ff2c -D${FLAGARCH}'" \
+ >> ${WRKSRC}/setup.cfg
+ @${ECHO_CMD} "F90FLAGS_DBG='-c -g -O -ff2c -D${FLAGARCH}'" \
+ >> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "CFLAGS='-c ${CFLAGS} ${PTHREAD_CFLAGS} -D${FLAGARCH}'" \
>> ${WRKSRC}/setup.cfg
@${ECHO_CMD} "CFLAGS_DBG='-c -g -O -pipe ${PTHREAD_CFLAGS} -D${FLAGARCH}'" \
>> ${WRKSRC}/setup.cfg
- @${ECHO_CMD} "SYSLIB='-Xlinker -export-dynamic ${PTHREAD_LIBS} -lutil -lm -lz -lg2c'" \
- >> ${WRKSRC}/setup.cfg
do-configure:
(cd ${CONFIGURE_WRKSRC} && ${PYTHON_CMD} setup.py test \
@@ -305,7 +336,7 @@ post-install:
@${ECHO_MSG}
.if defined(MAINTAINER_MODE)
-test: install
+regression-test: install
(cd ${inst_dir}; \
${LOCALBASE}/aster/ASTK/ASTK_SERV/bin/as_run forma01a.export)
@${ECHO_CMD} Note: homard must be installed to run some steps succesfully.
diff --git a/french/aster/files/patch-products.py b/french/aster/files/patch-products.py
index 065634c74680..85e22b6dd8ec 100644
--- a/french/aster/files/patch-products.py
+++ b/french/aster/files/patch-products.py
@@ -1,11 +1,36 @@
--- products.py.orig Wed Jan 25 13:06:09 2006
-+++ products.py Fri Feb 3 00:08:27 2006
-@@ -871,6 +871,18 @@
++++ products.py Wed May 31 22:34:26 2006
+@@ -822,16 +822,18 @@
+ 'HOME_PYTHON', 'PYTHON_EXE', 'PYTHONLIB', 'PYMODULES_PREFIX',
+ 'HOME_MUMPS', 'HOME_ZMAT', 'HOME_MPI',
+ 'HOME_MED', 'HOME_HDF', 'HOME_CRPCRS',
+- 'LD', 'CC', 'F77', 'F90',],
++ 'LD', 'CC', 'F77', 'F90','LDFLAGS', 'SYSLIB',
++ 'CFLAGS', 'CFLAGS_DBG',
++ 'FFLAGS', 'FFLAGS_DBG',
++ 'F90FLAGS', 'F90FLAGS_DBG'],
+ reqobj=['file:?HOME_ASTK?/ASTK_SERV/bin/as_run',
+ 'file:?HOME_ASTK?/ASTK_SERV/conf/aster_profile.sh'],
+- set=['SYSLIB', 'OTHERLIB',
++ set=['OTHERLIB',
+ 'MEDLIB', 'HDFLIB', 'LAPACKLIB',
+ 'MUMPSLIB', 'ZMATLIB', 'SCOTCHLIB',
+- 'LDFLAGS',
+- 'CFLAGS', 'CFLAGS_DBG', 'CINCLUDE',
+- 'FFLAGS', 'FFLAGS_DBG', 'FINCLUDE',
+- 'F90FLAGS', 'F90FLAGS_DBG', 'F90INCLUDE',
++ 'CINCLUDE',
++ 'FINCLUDE',
++ 'F90INCLUDE',
+ 'NOBUILD', ],
+ )
+ cfg['OTHERLIB'] = cfg.get('OTHERLIB', '')
+@@ -871,6 +873,18 @@
cxxlibs.extend(['stdc++', 'supc++'])
zmat_platform='Linux4'
mpilibs.extend(['mpich'])
+ elif cfg['IFDEF']=='FREEBSD':
-+ opt['MATH_LIST'] = [cfg['LAPACKLIB'], cfg['BLASLIB'], cfg['ATLASLIB'], 'g2c']
++ opt['MATH_LIST'] = [cfg['LAPACKLIB'], cfg['BLASLIB'], 'g2c']
+ opt['SYSLIB'] = cfg['SYSLIB']
+ opt['LDFLAGS'] = cfg['LDFLAGS']
+ opt['CFLAGS_DBG'] = cfg['CFLAGS_DBG']
@@ -19,7 +44,18 @@
elif cfg['IFDEF']=='x86_64':
opt['MATH_LIST'] = ['lapack', 'blas', 'g2c']
opt['SYSLIB'] = '-Wl,--allow-multiple-definition -Wl,--export-dynamic -lieee -ldl -lpthread -lutil -lm'
-@@ -1011,7 +1023,7 @@
+@@ -922,8 +936,8 @@
+ opt['FINCLUDE'] = ''
+
+ # ----- F90
+- opt['F90FLAGS_DBG'] = opt['FFLAGS_DBG']
+- opt['F90FLAGS'] = opt['FFLAGS']
++ opt['F90FLAGS_DBG'] = cfg['F90FLAGS_DBG']
++ opt['F90FLAGS'] = cfg['F90FLAGS']
+ opt['F90INCLUDE']=''
+
+ # ----- check for MED and HDF5 libraries, and HDF5 includes
+@@ -1011,7 +1025,7 @@
for lib in ('common', 'scotch', 'scotcherr', 'scotcherrcom'):
ftools.findlib_and_set(cfg, 'SCOTCHLIB', lib,
kargs['libdirs'], cfg['HOME_SCOTCH'],