]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_shlibdeps
r496: * Man page cleanups, Closes: #119335
[debhelper.git] / dh_shlibdeps
index 274aeeda027a93e51c388f4a498de3a20b2ce3cc..b3648e514d1d97fdccc713f92cbb3189ab277cf7 100755 (executable)
@@ -12,7 +12,7 @@ use Debian::Debhelper::Dh_Lib;
 
 =head1 SYNOPSIS
 
-  dh_shlibdeps [debhelper options] [-ldirectory] [-Xitem] [-- params]
+B<dh_shlibdeps> [S<I<debhelper options>>] [B<-l>I<directory>] [B<-X>I<item>] [S<B<--> I<params>>]
 
 =head1 DESCRIPTION
 
@@ -55,6 +55,26 @@ dpkg-shlibdeps.
 
 init();
 
+# Add directory to library search path.
+if ($dh{L_PARAMS}) {
+       my @paths=();
+       # Add to existing paths, if set.
+       push @paths, $ENV{'LD_LIBRARY_PATH'}
+               if exists $ENV{'LD_LIBRARY_PATH'};
+       foreach (split(/:/, $dh{L_PARAMS})) {
+               # Force the path absolute.
+               if (m:^/:) {
+                       push @paths, $_;
+               }
+               else {
+                       push @paths, getcwd()."/$_";
+               }
+       }
+       $dh{L_PARAMS}=join(':', @paths);
+       $ENV{'LD_LIBRARY_PATH'}=$dh{L_PARAMS};
+       verbose_print("LD_LIBRARY_PATH=$dh{L_PARAMS}");
+}
+
 foreach my $package (@{$dh{DOPACKAGES}}) {
        my $tmp=tmpdir($package);
        my $ext=pkgext($package);
@@ -77,24 +97,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
 
        if (@filelist) {
-               if ($dh{L_PARAMS}) {
-                       my @paths=();
-                       # Add to existing paths, if set.
-                       push @paths, $ENV{'LD_LIBRARY_PATH'}
-                               if exists $ENV{'LD_LIBRARY_PATH'};
-                       foreach (split(/:/, $dh{L_PARAMS})) {
-                               # Force the path absolute.
-                               if (m:^/:) {
-                                       push @paths, $_;
-                               }
-                               else {
-                                       push @paths, getcwd()."/$_";
-                               }
-                       }
-                       $dh{L_PARAMS}=join(':', @paths);
-                       $ENV{'LD_LIBRARY_PATH'}=$dh{L_PARAMS};
-                       verbose_print("LD_LIBRARY_PATH=$dh{L_PARAMS} \\");
-               }
                doit("dpkg-shlibdeps","-Tdebian/${ext}substvars",@{$dh{U_PARAMS}},'-dDepends',@filelist);
        }
 }