From 162f30f47e0e5df535047cf983a24f135c495fbc Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 19 Apr 2013 14:38:31 +0000 Subject: [PATCH] Update some important files after installation of binaries --- config_files/Python.sh | 10 ++++++++++ config_files/freetype.sh | 4 +++- config_files/ftgl.sh | 2 +- config_files/graphviz.sh | 4 ++-- config_files/libxml2.sh | 5 ++++- config_files/numpy.sh | 2 +- config_files/omniORB.sh | 2 +- config_files/qt.sh | 14 ++++++++++++++ config_files/tcltk.sh | 10 ++++++++++ 9 files changed, 46 insertions(+), 7 deletions(-) diff --git a/config_files/Python.sh b/config_files/Python.sh index 11e3bf2..1fb368f 100755 --- a/config_files/Python.sh +++ b/config_files/Python.sh @@ -162,6 +162,16 @@ for sc in idle pydoc smtpd.py ; do fi done +# modify pkgconfig +if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then + 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" ${l} + fi + done +fi + # to generate environment scripts try_preinstalled } diff --git a/config_files/freetype.sh b/config_files/freetype.sh index e96e463..66c3876 100755 --- a/config_files/freetype.sh +++ b/config_files/freetype.sh @@ -128,10 +128,12 @@ if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then 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" ${l} + sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} fi done fi +# modify config file +sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${PRODUCT_DIR}/bin/freetype-config # to generate environment script for sources try_preinstalled diff --git a/config_files/ftgl.sh b/config_files/ftgl.sh index 30d11c8..f58cabb 100755 --- a/config_files/ftgl.sh +++ b/config_files/ftgl.sh @@ -137,7 +137,7 @@ if [ -d ${PRODUCT_DIR}/lib/pkgconfig ] ; then 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%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${FREETYPEDIR}/lib%g;s%-I[^[:space:]]*/freetype[^[:space:]]*/include%-I${FREETYPEDIR}/include%g" ${l} + sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g;s%-L[^[:space:]]*/freetype[^[:space:]]*/lib%-L${FREETYPEDIR}/lib%g;s%-I[^[:space:]]*/freetype[^[:space:]]*/include%-I${FREETYPEDIR}/include%g" ${l} fi done fi diff --git a/config_files/graphviz.sh b/config_files/graphviz.sh index d640428..8fc0f5d 100755 --- a/config_files/graphviz.sh +++ b/config_files/graphviz.sh @@ -166,11 +166,11 @@ for l in X `find $ldir -name "*.la"`; do fi done +# modify pkgconfig cd ${PRODUCT_DIR}/lib/pkgconfig for l in X `find . -name "*.pc"`; do if [ "${l}" != "X" ] ; then - sed -e "s%prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} > ${l}_ - chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l} + sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} fi done diff --git a/config_files/libxml2.sh b/config_files/libxml2.sh index b2bc15c..ef2154c 100755 --- a/config_files/libxml2.sh +++ b/config_files/libxml2.sh @@ -120,9 +120,12 @@ test -f python${PYTHON_VERSION}/site-packages/libxml2mod.la && sed -i "s%^libdir 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" ${l} + sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} fi done +# modify config files +sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${PRODUCT_DIR}/bin/xml2-config +sed -i "s%XML2_LIBDIR=.*%XML2_LIBDIR=\"${PRODUCT_DIR}/lib\"%g;s%XML2_INCLUDEDIR=.*%XML2_INCLUDEDIR=\"${PRODUCT_DIR}/include/libxml2\"%g" ${PRODUCT_DIR}/lib/xml2Conf.sh # to generate environment scripts try_preinstalled diff --git a/config_files/numpy.sh b/config_files/numpy.sh index 18693e9..34f654e 100755 --- a/config_files/numpy.sh +++ b/config_files/numpy.sh @@ -118,7 +118,7 @@ check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} 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%^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 diff --git a/config_files/omniORB.sh b/config_files/omniORB.sh index 9ad8b27..c6f86ed 100755 --- a/config_files/omniORB.sh +++ b/config_files/omniORB.sh @@ -227,7 +227,7 @@ done 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" ${l} + sed -i "s%^prefix=.*%prefix=${PRODUCT_DIR}%g" ${l} fi done diff --git a/config_files/qt.sh b/config_files/qt.sh index 9715e9a..46273c7 100755 --- a/config_files/qt.sh +++ b/config_files/qt.sh @@ -161,10 +161,24 @@ for l in X `find . -name "*.pc"`; do -e "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g" \ -e "s%moc_location=.*%moc_location=${PRODUCT_DIR}/bin/moc%g" \ -e "s%uic_location=.*%uic_location=${PRODUCT_DIR}/bin/uic%g" \ + -e "s%rcc_location=.*%uic_location=${PRODUCT_DIR}/bin/rcc%g" \ + -e "s%lupdate_location=.*%uic_location=${PRODUCT_DIR}/bin/lupdate%g" \ + -e "s%lrelease_location=.*%uic_location=${PRODUCT_DIR}/bin/lrelease%g" \ ${l} > ${l}_ chmod -f --reference=${l} ${l}_ ; mv -f ${l}_ ${l} fi done +# modify qt prl files +cd ${PRODUCT_DIR}/lib +for l in X `find . -name "*.prl"`; do + if [ "${l}" != "X" ] ; then + sed -i "s%[[:space:]]\(-L\)\?[^[:space:]]*qt-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g;s%[[:space:]]\(-L\)\?[^[:space:]]*qt-x11-opensource-src-${QT_REF_VERSION}% \1${PRODUCT_DIR}%g" ${l} + fi +done +# modify qt mkspecs +cd ${PRODUCT_DIR}/mkspecs +sed -i "s%QMAKE_RPATHDIR += \".*\"%QMAKE_RPATHDIR += \"${PRODUCT_DIR}/lib\"%g" qconfig.pri + # generate qt.conf file cat > ${PRODUCT_DIR}/bin/qt.conf <