Salome HOME
Update for OCCT 6.5.2
[tools/install.git] / config_files / metis-4.0.sh
index 17d1e8e49e02f30791a8e8403f69a32e5dd88be4..8c5dccb3359578d797364c060db4e722556b3df9 100755 (executable)
@@ -61,13 +61,32 @@ install_source_and_build()
 # install sources
 install_source
 
+# build sources
+cd ${PRODUCT_SRC_DIR}
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+# patch for 64bit platforms
+if test `uname -m` = "x86_64" ; then
+  sed -e "s%COPTIONS[[:space:]]*=[[:space:]]*\(.*\)%COPTIONS = -fPIC \1%g" Makefile.in > Makefile.in.new
+  mv Makefile.in.new Makefile.in
+fi
+
+# make
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+
+# install
+cp -rf Doc Graphs libmetis.a pmetis kmetis oemetis onmetis partdmesh partnmesh mesh2dual mesh2nodal graphchk ${PRODUCT_DIR}
+( mkdir -p ${PRODUCT_DIR}/Lib && cp Lib/*.h ${PRODUCT_DIR}/Lib )
+
+cd ${PRODUCT_DIR};
+
 # remove sources and temporary files after building
 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
     test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
 fi
 
-# install binary
-install_binary
+# to generate environment scripts
+try_preinstalled
 }
 
 install_binary()