Ignore:
Timestamp:
2010-10-11T10:27:08+13:00 (14 years ago)
Author:
sjm84
Message:

Several changes to the GNOME support library to fix issues when a pre-compiled version is used to assist Greenstone installation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/gnome-lib/trunk/src/devel.bash

    r23026 r23076  
    33if [ "x$GEXTGNOME" = "x" ] ; then
    44    source setup.bash
     5fi
     6
     7if [ -d cascade-make ] ; then
     8  source cascade-make/lib/cascade-lib.bash
    59fi
    610
     
    1519    export LDFLAGS="-L$GEXTGNOME_INSTALLED/lib $LDFLAGS"
    1620   
    17     echo "+Your environment is now setup to compile with the Gnome Support Library"
     21    echo "+Your environment is now setup to compile with the GNOME Support Library"
     22
     23    if [ -d "$GEXTGNOME_INSTALLED/lib/pkgconfig" ] ; then
     24        echo ""
     25        echo "+Testing that pkg-config is correctly configured..."
     26
     27        pushd $GEXTGNOME_INSTALLED/lib/pkgconfig
     28
     29#   pcfilelist=`ls *.pc`
     30#   firstfile=`$pcfilelist | head -1`
     31#   pkgconfigprefix=`awk '/^prefix=/{ sub(/^prefix=/, "") ; print }' $firstfile`
     32
     33#   if [ "$pkgconfigprefix" = "$GEXTGNOME_INSTALLED" ] ; then
     34#       echo "OK"
     35#   else
     36#       echo "NO - Correcting configuration..."
     37
     38#       for file in $pcfilelist ; do
     39#           awk '{ sub(/^prefix=\/.*$/, "prefix=$GEXTGNOME_INSTALLED") ; print }' $file > $file
     40#       done
     41#       
     42#       echo "COMPLETE"
     43#   fi
     44
     45
     46        if [ ! -e .fixed-prefix.awk ] ; then
     47
     48            echo "Configuring ..."
     49
     50            echo "/^prefix=/ { print \"prefix=$GEXTGNOME_INSTALLED\" ; next }" > .fixed-prefix.awk
     51            echo "  { print $0 }" >> .fixed-prefix.awk
     52
     53            for file in *.pc ; do
     54                cat $file | awk -f .fixed-prefix.awk > $file.new && \
     55                  /bin/mv $file.new $file
     56            done
     57            echo "... done"
     58        else
     59            echo "No configuration needed"
     60        fi
     61
     62        popd
     63    fi
    1864else
    19     echo "+Your environment is already setup to compile with the Gnome Support Library"
     65    echo "+Your environment is already setup to compile with the GNOME Support Library"
    2066fi
Note: See TracChangeset for help on using the changeset viewer.