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
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
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
}