From 58138b6b8c85bb6ab7fac185d5e1a5d8088581d5 Mon Sep 17 00:00:00 2001 From: maintenance team Date: Tue, 20 Jan 2009 09:58:22 +0000 Subject: [PATCH] Implementation of building from source files --- config_files/metis-4.0.sh | 21 +++++++++++++++++++-- config_files/scotch-4.0.sh | 26 ++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/config_files/metis-4.0.sh b/config_files/metis-4.0.sh index 17d1e8e..f4fc04f 100755 --- a/config_files/metis-4.0.sh +++ b/config_files/metis-4.0.sh @@ -61,13 +61,30 @@ 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 ) + # 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() diff --git a/config_files/scotch-4.0.sh b/config_files/scotch-4.0.sh index 736f264..b5e5e12 100755 --- a/config_files/scotch-4.0.sh +++ b/config_files/scotch-4.0.sh @@ -61,13 +61,35 @@ 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} + +cd src + +# create Makefile for Linux 64bit platforms +if test `uname -m` = "x86_64" ; then + sed -e "s%CFLAGS\([[:space:]]*\)=\([[:space:]]*\)\(.*\)%CFLAGS\1=\2-fPIC \3%g" \ + Make.inc/Makefile.inc.i686_pc_linux2.prof > Make.inc/Makefile.inc.x86_64_pc_linux2.prof + ln -sf Make.inc/Makefile.inc.x86_64_pc_linux2.prof Makefile.inc +else + ln -sf Make.inc/Makefile.inc.i686_pc_linux2.prof Makefile.inc +fi + +# make +check_job ${PRODUCT_DIR}/MAKE.LOG make + +# install +cd ${PRODUCT_SRC_DIR} +cp -rf bin doc grf tgt ${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() -- 2.39.2