From 1f1f2df2b98e65d99cc336013b57e3deddf6b3d1 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 11 Mar 2022 17:20:21 +0100 Subject: [PATCH] medfile: support python API - forgotten script ... --- products/compil_scripts/med-4.1.1.sh | 76 ++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 products/compil_scripts/med-4.1.1.sh diff --git a/products/compil_scripts/med-4.1.1.sh b/products/compil_scripts/med-4.1.1.sh new file mode 100755 index 0000000..c91dfef --- /dev/null +++ b/products/compil_scripts/med-4.1.1.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +echo "##########################################################################" +echo "med" $VERSION +echo "##########################################################################" + +CONFIGURE_FLAGS= +CONFIGURE_FLAGS+=' CFLAGS=-m64 CXXFLAGS=-m64' +CONFIGURE_FLAGS+=' --enable-python=yes' +CONFIGURE_FLAGS+=' --enable-mesgerr' +if [ -n "$SAT_HPC" ] +then + CONFIGURE_FLAGS+=' --enable-parallel' +else + export F77=gfortran +fi + +if [ -n "$SALOME_USE_64BIT_IDS" ] +then + echo "WARNING: user requested 64 bits encoding for integers..." + export FFLAGS="-g -O2 -ffixed-line-length-none -fdefault-integer-8" + export FCFLAGS="-fdefault-integer-8" + CONFIGURE_FLAGS+=' --with-med_int=long' +else + export FFLAGS="-g -O2 -ffixed-line-length-none" + export FCFLAGS="-g -O2 -ffixed-line-length-none" +fi + +echo +echo "*** configure --prefix=$PRODUCT_INSTALL FFLAGS=\"${FFLAGS}\" FCFLAGS=\"${FCFLAGS}\" $CONFIGURE_FLAGS" +$SOURCE_DIR/configure --prefix=$PRODUCT_INSTALL FFLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" $CONFIGURE_FLAGS +if [ $? -ne 0 ] +then + echo "ERROR on configure" + exit 1 +fi +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +# post-build action in case devtoolset-8 is used +LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION" +case $LINUX_DISTRIBUTION in + CO7) + if [ -n "$X_SCLS" ] + then + X_SCLSVALUE=$(echo $X_SCLS) + if [ $X_SCLSVALUE == "devtoolset-8" ]; then + echo "WARNING: devtoolset-8 is installed on ${LINUX_DISTRIBUTION} - libgfortran will be embedded..." + cp -RP /usr/lib64/libgfortran.so.5* $PRODUCT_INSTALL/lib/ + fi + else + echo "INFO: X_SCLS does not seem to be set. skipping..." + fi + ;; + *) + ;; +esac + +echo +echo "########## END" + -- 2.39.2