]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-libtool-deps.patch
- for .la symlinks generate libtool(symlink), not libtool(target) Provides
[packages/rpm.git] / rpm-libtool-deps.patch
1 --- rpm-4.4.8.org/scripts/libtooldeps.sh        2005-11-12 22:20:42.000000000 +0100
2 +++ rpm-4.4.8/scripts/libtooldeps.sh    2006-11-26 20:06:49.254008750 +0100
3 @@ -5,15 +5,17 @@
4      exit 0
5  }
6  
7 +pkgname="$3"
8 +
9  case $1 in
10  -P|--provides)
11      shift
12 -    RPM_BUILD_ROOT="$1"
13 +    RPM_BUILD_ROOT="$1"
14      while read possible
15      do
16         case "$possible" in
17         *.la)
18 -           if grep -iq '^# Generated by ltmain.sh' "$possible" 2> /dev/null ; then
19 +           if file -L "$possible" | grep -iq 'libtool library file' 2> /dev/null ; then
20                 possible="`echo ${possible} | sed -e s,${RPM_BUILD_ROOT}/,/,`"
21                 echo "libtool($possible)"
22             fi
23 @@ -22,21 +24,28 @@
24      done
25      ;;
26  -R|--requires)
27 -    while read possible ; do
28 -       case "$possible" in
29 -       *.la)
30 -           for dep in `grep '^dependency_libs='"$possible" 2> /dev/null | \
31 -                       sed -e "s,^dependency_libs='\(.*\)',\1,g"`
32 -           do
33 -               case "$dep" in
34 -               /*.la)
35 -                   echo "libtool($dep)"
36 +    case $pkgname in
37 +    *-devel)
38 +           while read possible ; do
39 +               case "$possible" in
40 +               *.la)
41 +                   for dep in `grep '^dependency_libs=' "$possible" 2> /dev/null | \
42 +                               sed -e "s,^dependency_libs='\(.*\)',\1,g"`
43 +                   do
44 +                       case "$dep" in
45 +                       /*.la)
46 +                           dep="`readlink -f "$dep" 2> /dev/null || echo "$dep"`"
47 +                           echo "libtool($dep)"
48 +                           ;;
49 +                       esac
50 +                   done
51                     ;;
52                 esac
53             done
54 -           ;;
55 -       esac
56 -    done
57 -    ;;
58 +     ;;
59 +     *)
60 +            cat > /dev/null
61 +     ;;
62 +     esac
63  esac
64  exit 0
This page took 0.046086 seconds and 3 git commands to generate.