From 01dc2d1467c380396508516cbd3aae315f055b17 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 19 Apr 2013 07:12:28 +0000 Subject: [PATCH] Update some important files after binary installation --- config_files/ParaView.sh | 26 ++++++++++++++++++++------ config_files/hdf5.sh | 4 ++++ config_files/med.sh | 24 +++++++++++++++++------- config_files/numpy.sh | 9 +++++++++ 4 files changed, 50 insertions(+), 13 deletions(-) diff --git a/config_files/ParaView.sh b/config_files/ParaView.sh index 618be29..7a5253b 100755 --- a/config_files/ParaView.sh +++ b/config_files/ParaView.sh @@ -323,21 +323,35 @@ fi cd ${PRODUCT_DIR} for f in `find . -name "*.cmake"` ; do -sed -e "s%/[^\";]*/bin/moc%$QTDIR/bin/moc%g" \ - -e "s%/[^\";]*/bin/uic%$QTDIR/bin/uic%g" \ - -e "s%/[^\";]*/bin/rcc%$QTDIR/bin/rcc%g" \ - -e "s%/[^\";]*/bin/qmake%$QTDIR/bin/qmake%g" \ - -e "s%/[^\";]*/lib/libQt%$QTDIR/lib/libQt%g" \ - -e "s%/[^\";]*/lib64/libQt%$QTDIR/lib64/libQt%g" \ +sed -e "s%/[^\";]*/bin/moc%${QTDIR}/bin/moc%g" \ + -e "s%/[^\";]*/bin/uic%${QTDIR}/bin/uic%g" \ + -e "s%/[^\";]*/bin/rcc%${QTDIR}/bin/rcc%g" \ + -e "s%/[^\";]*/bin/qmake%${QTDIR}/bin/qmake%g" \ + -e "s%/[^\";]*/lib/libQt%${QTDIR}/lib/libQt%g" \ + -e "s%/[^\";]*/lib64/libQt%${QTDIR}/lib64/libQt%g" \ -e "s%/[^\";]*/lib/python\([0-9].[0-9]\)/config/libpython%$PYTHONHOME/lib/python\1/config/libpython%g" \ -e "s%/[^\";]*/include/python\([0-9].[0-9]\)%$PYTHONHOME/include/python\1%g" \ -e "s%/[^\";]*/tcltk[^/]*/include%${TCLHOME}/include%g" \ -e "s%/[^\";]*/tcltk[^/]*/lib%${TCLHOME}/lib%g" \ + -e "s%/[^\";]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/include%${HDF5HOME}/include%g" \ -e "s%/[^\";]*/lib/libhdf5.so%${HDF5HOME}/lib/libhdf5.so%g" \ -e "s%/[^\";]*/lib64/libhdf5.so%${HDF5HOME}/lib64/libhdf5.so%g" \ + -e "s%/[^\";]*/lib/libhdf5_hl.so%${HDF5HOME}/lib/libhdf5_hl.so%g" \ + -e "s%/[^\";]*/lib64/libhdf5_hl.so%${HDF5HOME}/lib64/libhdf5_hl.so%g" \ + -e "s%/[^\";]*/gl2ps-[0-9]\+\.[0-9]\+\.[0-9]\+/include%${GL2PSHOME}/include%g" \ + -e "s%/[^\";]*/lib/libgl2ps.so%${GL2PSHOME}/lib/libgl2ps.so%g" \ + -e "s%/[^\";]*/lib64/libgl2ps.so%${GL2PSHOME}/lib64/libgl2ps.so%g" \ + -e "s%\(IMPORTED_LOCATION_RELEASE.*\"\).*/lib/paraview-${PVLIBVERSION}/\([^/]\+\"\)%\1${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}/\2%g" \ + -e "s%\(IMPORTED_LOCATION_RELEASE.* \"\).*/bin/\([^/]\+\"\)%\1${PRODUCT_DIR}/bin/\2%g" \ ${f} > ${f}.new mv -f ${f}.new ${f} done +#sed -i "s%set (VTK_CONFIG_FILE \".*/VTKConfig.cmake\")%set (VTK_CONFIG_FILE \"${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/VTKConfig.cmake\")%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/ParaViewConfig.cmake +#sed -i "s%set (PARAVIEW_CONFIG_TARGETS_FILE \".*/ParaViewTargets.cmake\")%set (PARAVIEW_CONFIG_TARGETS_FILE \"${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/ParaViewTargets.cmake\")%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/ParaViewConfig.cmake +#sed -i "s%set (ParaView_CMAKE_DIR \".*\")%set (ParaView_CMAKE_DIR \"${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}\")%g" ${PRODUCT_DIR}/lib/cmake/paraview-${PVLIBVERSION}/ParaViewConfig.cmake + +sed -i "s%set[[:space:]]*(QtTesting_INCLUDE_DIRS \".*\")%set (QtTesting_INCLUDE_DIRS \"${PRODUCT_DIR}/include/paraview-${PVLIBVERSION}\")%g" ${PRODUCT_DIR}/lib/CMake/QtTestingConfig.cmake +sed -i "s%set[[:space:]]*(QtTesting_LIBRARY_DIR \".*\")%set (QtTesting_LIBRARY_DIR \"${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}\")%g" ${PRODUCT_DIR}/lib/CMake/QtTestingConfig.cmake # to generate environment script for sources try_preinstalled diff --git a/config_files/hdf5.sh b/config_files/hdf5.sh index 8394c80..46eb3b1 100755 --- a/config_files/hdf5.sh +++ b/config_files/hdf5.sh @@ -138,6 +138,10 @@ if [ -e libhdf5_hl.la ] ; then sed -i "s%\(.*\)\([[:space:]].*libhdf5.la\)\(.*\)%\1 ${PRODUCT_DIR}/lib/libhdf5.la\3%g;s%^libdir='\(.*\)'%libdir='${PRODUCT_DIR}/lib'%g" libhdf5_hl.la fi +# modify settings file +cd ${PRODUCT_DIR}/lib +sed -i "s%Installation point: .*%Installation point: ${PRODUCT_DIR}%g" libhdf5.settings + # to generate environment script for sources try_preinstalled } diff --git a/config_files/med.sh b/config_files/med.sh index 02f8b20..40d6b3a 100755 --- a/config_files/med.sh +++ b/config_files/med.sh @@ -140,13 +140,23 @@ for fl in libmed.la libmedC.la libmedimport.la ; do done ### modify scripts to correct installation path -### this pb should be fixed in med 3.0.5 or newer version -cd ${PRODUCT_DIR}/bin -for fl in xmdump xmdump3 ; do - if [ -f ${fl} ] ; then - sed -i "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g;s%#\!.*wish -f%#\!/usr/bin/env wish%g" ${fl} - fi -done +### this pb is fixed in med 3.0.6 +#cd ${PRODUCT_DIR}/bin +#for fl in xmdump xmdump3 ; do +# if [ -f ${fl} ] ; then +# sed -i "s%set cmd \".*/bin/mdump\"%set cmd \"${PRODUCT_DIR}/bin/mdump\"%g;s%#\!.*wish -f%#\!/usr/bin/env wish%g" ${fl} +# fi +#done + +# modify settings file +cd ${PRODUCT_DIR}/lib +sed -i "s%Installation point: .*%Installation point: ${PRODUCT_DIR}%g" libmed3.settings +sed -i "s%-I[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/include%-I${HDF5HOME}/include%g" libmed3.settings +sed -i "s%-L[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/lib%-L${HDF5HOME}/lib%g" libmed3.settings +sed -i "s%[^[:space:]]*/hdf5-[0-9]\+\.[0-9]\+\.[0-9]\+/bin%${HDF5HOME}/bin%g" libmed3.settings +sed -i "s%Tk/wish used for xmdump :.*%Tk/wish used for xmdump : ${TCLHOME}/bin/wish%g" libmed3.settings + +# # to generate environment script for sources try_preinstalled diff --git a/config_files/numpy.sh b/config_files/numpy.sh index b2340db..18693e9 100755 --- a/config_files/numpy.sh +++ b/config_files/numpy.sh @@ -114,6 +114,15 @@ test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} +# modify pkgconfig +cd ${PRODUCT_DIR}/lib/pkgconfig +for l in X `find . -name "*.pc"`; do + if [ "${l}" != "X" ] ; then + sed -i "s%prefix=.*%prefix=${PRODUCT_DIR}%g;s%prefix=.*%libdir=${PRODUCT_DIR}/lib%g" ${l} + sed -i "s%Libs: -L[^[:space:]]*/lib%Libs: -L${PRODUCT_DIR}/lib%g" ${l} + fi +done + # to generate environment script for sources try_preinstalled } -- 2.39.2