Changeset 1146


Ignore:
Timestamp:
May 12, 2017, 7:26:10 PM (8 years ago)
Author:
dmik
Message:

rpm: Make pkgconfig dependency generator work on OS/2 and under [d]ash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rpm/trunk/scripts/pkgconfigdeps.sh

    r375 r1146  
    33# TODO fix this script to accept $2 instead of stdin
    44# re-read file to stdin...
    5 exec 0<$2
     5[ -n "$2" ] && exec 0<$2
    66
    7 pkgconfig=/usr/bin/pkg-config
    8 test -x $pkgconfig || {
     7case `uname -a` in
     8OS/2*)
     9    pkgconfig=/@unixroot/usr/bin/pkg-config.exe
     10    pathsep="\;"
     11    ;;
     12*)
     13    pkgconfig=/usr/bin/pkg-config
     14    pathsep=":"
     15    ;;
     16esac
     17
     18test -x "$pkgconfig" || {
    919    cat > /dev/null
    1020    exit 0
     
    2838        # Query the dependencies of the package.
    2939        DIR="`dirname ${filename}`"
    30         export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
     40        export PKG_CONFIG_PATH="$DIR$pathsep$DIR/../../share/pkgconfig"
    3141        $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do
    3242            [ -n "$n" ] || continue
     
    4858        [ $i -eq 1 ] && echo "$pkgconfig"
    4959        DIR="`dirname ${filename}`"
    50         export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
     60        export PKG_CONFIG_PATH="$DIR$pathsep$DIR/../../share/pkgconfig"
    5161        $pkgconfig --print-requires --print-requires-private "$filename" 2> /dev/null | while read n r v ; do
    5262            [ -n "$n" ] || continue
Note: See TracChangeset for help on using the changeset viewer.