File: mkpkgindex.sh

package info (click to toggle)
graphviz 2.40.1-6
  • links: PTS
  • area: main
  • in suites: buster
  • size: 81,972 kB
  • sloc: ansic: 1,033,400; sh: 17,772; cpp: 11,186; makefile: 4,656; yacc: 3,348; xml: 2,466; tcl: 1,934; cs: 1,890; objc: 1,163; lex: 423; perl: 422; awk: 241; python: 76; ruby: 41; php: 26
file content (25 lines) | stat: -rwxr-xr-x 644 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# $1 = .la file in build tree (doesn't need to be installed)
# $2 = Name of extension
# $3 = Version of extension

lib=`sed -n "/dlname/s/^[^']*'\([^ ']*\).*$/\1/p" $1`
if [ -z "$lib" ]
then
    libBaseName=`basename $1 .la`
    case `uname` in
        CYGWIN*) lib="${libBaseName}.dll"   ;;
        Darwin*) lib="${libBaseName}.dylib" ;;
        HP-UX*)  lib="${libBaseName}.sl"    ;;
        *)       lib="${libBaseName}.so"    ;;
    esac
fi

echo "package ifneeded $2 $3 \"" >pkgIndex.tcl
case "$1" in
  *tk* )
    echo "	package require Tk 8.3" >>pkgIndex.tcl
    ;;
esac
echo "	load [file join \$dir $lib] $2\"" >>pkgIndex.tcl