aboutsummaryrefslogtreecommitdiffstats
path: root/french/aster/Makefile
diff options
context:
space:
mode:
authoroliver <oliver@FreeBSD.org>2003-07-26 01:27:33 +0800
committeroliver <oliver@FreeBSD.org>2003-07-26 01:27:33 +0800
commit3e7ec941333cfde89fbf52792cb1b263852d2b48 (patch)
treef9f673e54bc41cf22a993c6ded7ca1f725521d35 /french/aster/Makefile
parent29fc13596f9f534ee2a3a5dc90bd04df75a4c3ff (diff)
downloadfreebsd-ports-gnome-3e7ec941333cfde89fbf52792cb1b263852d2b48.tar.gz
freebsd-ports-gnome-3e7ec941333cfde89fbf52792cb1b263852d2b48.tar.zst
freebsd-ports-gnome-3e7ec941333cfde89fbf52792cb1b263852d2b48.zip
Add aster 7.1, analyse des structures et thermo-mécanique.
EDF R&D has developed for twelve years a numerical simulation software for structural analysis, Code_Aster. Widely used for the expertise and maintenance of power plants and electrical networks, this tool covers a wide range of applications today: thermal and mechanical analysis - 3D linear or non linear, static or dynamic analysis pressure vessels - machines - civil engineering - porous media. (From the press release). This application is in french, but there exists a translated GUI (see the port cad/astk-client). PR: 54766 Submitted by: thierry@pompo.net
Diffstat (limited to 'french/aster/Makefile')
-rw-r--r--french/aster/Makefile254
1 files changed, 254 insertions, 0 deletions
diff --git a/french/aster/Makefile b/french/aster/Makefile
new file mode 100644
index 000000000000..a3d5ac227bde
--- /dev/null
+++ b/french/aster/Makefile
@@ -0,0 +1,254 @@
+# New ports collection makefile for: aster
+# Date created: Thu Jun 26 2003
+# Whom: thierry@pompo.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= aster
+PORTVERSION= 7.1
+CATEGORIES= french cad python tk83
+MASTER_SITES= http://www.code-aster.org/FICHIERS/code_aster/
+DISTNAME= ${PORTNAME}_src_${PORTVERSION}
+EXTRACT_SUFX= .tar
+
+MAINTAINER= ports@FreeBSD.org
+COMMENT= Analyse des structures et thermo-mécanique
+
+#-----------------------------------------------------------------------
+# You may define these options:
+#
+# - F77: don't use the default fortran compiler;
+# - WITH_ZSH or WITH_BASH or WITH_KSH: select a shell among
+# zsh (default), bash or ksh;
+# - WITHOUT_ASTK: don't use the GUI;
+# - 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);
+# - WITHOUT_GRACE: don't install Grace (used to create 2D graph);
+# - WITHOUT_HOMARD: don't install Homard (adaptative mesh capability)
+# - WITHOUT_MACR_RECAL: don't install Numerical Python
+# (required by the macro MACR_RECAL);
+# - WITH_GIBI: not yet implemented (only for EDF's internal use,
+# waiting for a license from CEA).
+#
+#-----------------------------------------------------------------------
+
+PATCH_DEPENDS= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${SHORT_TCL_VER} \
+ wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${SHORT_TK_VER}
+LIB_DEPENDS= blas.1:${PORTSDIR}/math/blas
+BUILD_DEPENDS= ${opt_hdf}:${PORTSDIR}/graphics/hdf5 \
+ ${opt_med}:${PORTSDIR}/french/med \
+ ${SHELL_INSTALL_ASTER}:${PORTSDIR}/shells/${SHIA}
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/Gnuplot:${PORTSDIR}/math/py-gnuplot \
+ ${LOCALBASE}/bin/onmetis.exe:${PORTSDIR}/cad/metis-edf
+
+EXTRACT_CMD= ${TAR}
+EXTRACT_BEFORE_ARGS= -xf
+EXTRACT_AFTER_ARGS= # empty
+USE_PYTHON= yes
+USE_REINPLACE= yes
+REINPLACE_ARGS= -i ""
+
+WRKSRC= ${WRKDIR}/${vaster}
+PLIST_SUB= ASTERDIR=${PORTNAME}/${vaster}
+.if defined(WITHOUT_ASTK) || defined(WITHOUT_ASTK_CLI)
+PKGMESSAGE= ${PKGDIR}/pkg-message.sans-astk
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_ASTK)
+RUN_DEPENDS+= ${LOCALBASE}/ASTK/ASTK_SERV:${PORTSDIR}/cad/astk-serveur
+.if !defined(WITHOUT_ASTK_CLI)
+RUN_DEPENDS+= ${LOCALBASE}/ASTK/ASTK_CLIENT:${PORTSDIR}/cad/astk-client
+PLIST_SUB+= ASTK_CLIENT="" ASTKDIR=${ASTKDIR}
+.else
+PLIST_SUB+= ASTK_CLIENT="@comment " ASTKDIR=""
+.endif
+.endif
+.if !defined(WITHOUT_EFICAS)
+RUN_DEPENDS+= ${LOCALBASE}/apps/Eficas:${PORTSDIR}/french/eficas
+PLIST_SUB+= EFICAS=""
+.else
+PLIST_SUB+= EFICAS="@comment "
+.endif
+.if !defined(WITHOUT_GMSH)
+RUN_DEPENDS+= ${LOCALBASE}/bin/gmsh:${PORTSDIR}/cad/gmsh
+PLIST_SUB+= GMSH=""
+.else
+PLIST_SUB+= GMSH="@comment "
+.endif
+.if !defined(WITHOUT_GRACE)
+RUN_DEPENDS+= ${X11BASE}/bin/xmgrace:${PORTSDIR}/math/grace
+PLIST_SUB+= GRACE=""
+.else
+PLIST_SUB+= GRACE="@comment "
+.endif
+.if (${ARCH} == "i386") && !defined(WITHOUT_HOMARD)
+RUN_DEPENDS+= ${LOCALBASE}/apps/homard:${PORTSDIR}/french/homard
+PLIST_SUB+= HOMARD="" HOMARDDIR=${HOMARDDIR}
+.else
+PLIST_SUB+= HOMARD="@comment " HOMARDDIR=""
+.endif
+.if !defined(WITHOUT_MACR_RECAL)
+RUN_DEPENDS+= ${PYNUMERIC}
+.endif
+
+F77?= f77
+
+TK_VER?= 8.3
+SHORT_TK_VER= ${TK_VER:S/.//}
+TKCONFIG= ${LOCALBASE}/lib/tk${TK_VER}/tkConfig.sh
+
+TCL_VER?= ${TK_VER}
+SHORT_TCL_VER= ${TCL_VER:S/.//}
+TCLCONFIG= ${LOCALBASE}/lib/tcl${TK_VER}/tclConfig.sh
+
+.if defined(WITH_ZSH)
+SHIA= zsh
+.elif defined(WITH_BASH)
+SHIA= bash
+.elif defined(WITH_KSH)
+SHIA= ksh
+.elif exists(${LOCALBASE}/bin/zsh)
+SHIA= zsh
+.elif exists(${LOCALBASE}/bin/bash)
+SHIA= bash
+.elif exists(${LOCALBASE}/bin/ksh)
+SHIA= ksh
+.else
+SHIA= zsh
+.endif
+
+vaster= STA${PORTVERSION}
+MK_FILES= make_aster make_cata make_etude make_exec make_lib make_test
+INST_DAT= astest bibpyt cata_ele.pickled catalo catapy commande \
+ config.txt elements etude materiau tcl
+python_path= ${PYTHON_LIBDIR}:${PYTHON_LIBDIR}/lib-dynload:${PYTHON_SITELIBDIR}:${PYTHON_SITELIBDIR}/Numeric
+#nm!= ${WHICH} nm
+#nmD= ${nm} -D
+inst_dir= ${PREFIX}/${PORTNAME}/${vaster}
+tools_dir= ${inst_dir}/outils
+unames!= ${UNAME} -s
+v_ifdef= ${unames:U}
+SHELL_INSTALL_ASTER= ${LOCALBASE}/bin/${SHIA}
+tcl_dir= ${LOCALBASE}
+tcl_bin= tclsh${TK_VER}
+python_dir= ${PYTHONBASE}/bin
+opt_hdf= ${LOCALBASE}/lib/libhdf5.a
+opt_med= ${LOCALBASE}/lib/libmed.a
+lib_blas= -lblas
+home_ar!= dirname `${WHICH} ${AR}`
+#home_f77!= dirname `${WHICH} ${F77}`
+#home_cc!= dirname `${WHICH} ${CC}`
+gzip!= dirname `${WHICH} ${GZIP_CMD}`
+LASTKDIR?= ASTK/ASTK_CLIENT
+ASTKDIR= ${LOCALBASE}/${LASTKDIR}
+LHOMARDDIR?= apps/homard
+HOMARDDIR= ${LOCALBASE}/${LHOMARDDIR}
+
+post-extract:
+ @(cd ${WRKDIR} && \
+ ${TAR} xfz ${WRKDIR}/${PORTNAME}.tar.gz)
+
+post-patch:
+.for mk_file in ${MK_FILES}
+ @${REINPLACE_CMD} -e "s#HOME_CODE_ASTER#${WRKSRC}#g" \
+ -e "s#IFDEF#${v_ifdef}#" \
+ -e "s#HOME_XTERM#${X11BASE}/bin#" \
+ -e "s#REP_TOOLS#${tools_dir}#" ${WRKSRC}/tcl/${mk_file}
+.endfor
+ @${REINPLACE_CMD} -e "s#HOME_CODE_ASTER#${WRKSRC}#g" \
+ -e "s#HOME_TCL_TK#${tcl_dir}#g" \
+ -e "s#TCL_BIN#${tcl_bin}#g" \
+ -e "s#TCL_TK_VERSION#${TK_VER}#g" \
+ -e "s#HOME_PYTHON#${python_dir}#g" \
+ -e "s#/bin/sh#${SHELL_INSTALL_ASTER}#g" \
+ -e "s#%%PYTHONPATH%%#${python_path}#" \
+ ${WRKSRC}/tcl/run_aster
+ @${CHMOD} 755 ${WRKSRC}/tcl/run_aster
+.if !exists(${WRKSRC}/tcl/conf/${v_ifdef}/config.txt)
+ @${MKDIR} ${WRKSRC}/tcl/conf/${v_ifdef}
+ @${CP} ${FILESDIR}/config.txt ${WRKSRC}/tcl/conf/${v_ifdef}
+.endif
+ @${GREP} TCL_LIB_SPEC ${TCLCONFIG} | \
+ ${SED} -e "s#TCL_LIB_SPEC='##;s#\$${TCL_DBGX}'##" \
+ > ${WRKDIR}/tcl_lib_spec
+ @${GREP} TK_LIB_SPEC ${TKCONFIG} | \
+ ${SED} -e "s#TK_LIB_SPEC='##;s#'##" > ${WRKDIR}/tk_lib_spec
+ @${REINPLACE_CMD} -e "s#OPT_HDF#${opt_hdf}#" \
+ -e "s#OPT_MED#${opt_med}#" \
+ -e "s#OPT_TCL#`${CAT} ${WRKDIR}/tcl_lib_spec`#g" \
+ -e "s#OPT_TK#`${CAT} ${WRKDIR}/tk_lib_spec`#g" \
+ -e "s#OPT_X11#-L${X11BASE}/lib -lX11#" \
+ -e "s#OPT_BLAS#${lib_blas}#" \
+ -e "s#HOME_AR#${home_ar}#g" \
+ -e "s#%%F77%%#${F77}#g" \
+ -e "s#HOME_F90#${home_f77}#g" \
+ -e "s#%%CC%%#${CC}#g" \
+ -e "s#CFLAGS#${CFLAGS} ${PTHREAD_CFLAGS}#g" \
+ -e "s#HOME_GZIP#${gzip}#g" \
+ -e "s#HOME_PYTHON#${PYTHONBASE}#g" \
+ -e "s#PYTHON_BIN#${PYTHON_VERSION}#g" \
+ -e "s#PYTHON_VERSION#${_PYTHON_VERSION}#g" \
+ -e "s#PTHREAD#${PTHREAD_LIBS}#g" \
+ ${WRKSRC}/tcl/conf/${v_ifdef}/config.txt
+ @${MV} ${WRKSRC}/tcl/conf/${v_ifdef}/config.txt ${WRKSRC}
+ @${RM} ${WRKSRC}/tcl/run_aster.orig
+ @${RM} -rf ${WRKSRC}/tcl/conf
+ @${RM} -rf ${WRKSRC}/bibpyt/Utilitai
+ @${REINPLACE_CMD} -e "s#\$$(HOME)#${LOCALBASE}/apps#" \
+ ${WRKSRC}/bibpyt/Execution/E_SUPERV.py
+
+do-build:
+ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/bibpyt
+ ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/bibpyt
+ (cd ${WRKSRC}/tcl&& ${SETENV} PYTHONPATH=${python_path} \
+ ./run_aster make_aster)
+
+do-install:
+.for mk_file in ${MK_FILES} run_aster ../config.txt
+ ${REINPLACE_CMD} -e "s#${WRKSRC}#${inst_dir}#g" ${WRKSRC}/tcl/${mk_file}
+.endfor
+ ${MKDIR} ${tools_dir}
+.for FILE in ${INST_DAT}
+ ${CP} -R ${WRKSRC}/${FILE} ${inst_dir}
+.endfor
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${inst_dir}
+ ${INSTALL_PROGRAM} ${WRKSRC}/asteru.exe ${inst_dir}
+ ${INSTALL_SCRIPT} ${WRKSRC}/tcl/run_aster ${inst_dir}/tcl
+
+post-install:
+ ${LN} -fs ${LOCALBASE}/bin/onmetis ${tools_dir}/
+ ${LN} -fs ${LOCALBASE}/bin/gnuplot ${tools_dir}/
+.if !defined(WITHOUT_ASTK) && !defined(WITHOUT_ASTK_CLI)
+ ${LN} -fs ${ASTKDIR}/bin/astk ${tools_dir}/
+ ${LN} -fs ${ASTKDIR}/bin/bsf ${tools_dir}/
+.endif
+.if !defined(WITHOUT_EFICAS)
+ ${LN} -fs ${LOCALBASE}/bin/eficas ${tools_dir}/
+.endif
+.if !defined(WITHOUT_GMSH)
+ ${LN} -fs ${LOCALBASE}/bin/gmsh ${tools_dir}/
+.endif
+.if !defined(WITHOUT_GRACE)
+ ${LN} -fs ${X11BASE}/bin/xmgrace ${tools_dir}/
+.endif
+.if (${ARCH} == "i386") && !defined(WITHOUT_HOMARD)
+ ${LN} -fs ${HOMARDDIR}/homard ${tools_dir}/
+ ${LN} -fs ${HOMARDDIR}/aster_homard_py ${tools_dir}/
+.endif
+ @${ECHO}
+ @${CAT} ${PKGMESSAGE} | ${SED} -e "s#%%inst_dir%%#${inst_dir}#"
+ @${ECHO}
+
+.if defined(MAINTAINER_MODE)
+test: install
+ (cd ${inst_dir}/tcl; \
+ ./run_aster make_etude)
+ (cd ${inst_dir}/tcl; \
+ ./run_aster make_test)
+.endif
+
+.include <bsd.port.post.mk>