[Pkg-mono-svn-commits] rev 958 - mono/trunk/debian
Eduard Bloch
blade@haydn.debian.org
Sat, 12 Jun 2004 10:41:38 -0600
Author: blade
Date: 2004-06-12 10:41:35 -0600 (Sat, 12 Jun 2004)
New Revision: 958
Modified:
mono/trunk/debian/dh_makenetlibs
mono/trunk/debian/dh_netdeps
Log:
shlibs from .config parsing and including
Modified: mono/trunk/debian/dh_makenetlibs
===================================================================
--- mono/trunk/debian/dh_makenetlibs 2004-06-12 16:32:38 UTC (rev 957)
+++ mono/trunk/debian/dh_makenetlibs 2004-06-12 16:41:35 UTC (rev 958)
@@ -11,7 +11,7 @@
=head1 SYNOPSIS
-B<dh_makenetlibs> [S<I<debhelper options>>] [B<-m>I<minversion>] [B<-l>I<nextincompatible>] [B<-X>I<item>]
+B<dh_makenetlibs> [S<I<debhelper options>>] [B<-m>I<minversion>] [B<-V>I<[dependancies]>] [B<-l>I<nextincompatible>] [B<-X>I<item>]
=head1 DESCRIPTION
@@ -22,7 +22,7 @@
By default, dh_makenetlibs scans the DLL files in the package
directories and writes the discovered compatibility data (major/minor,
build, token) to "netlibs" files int he appropriate packages. The
-dependencies on native shared libs are resolved as good as possible.
+dependencies on native shared libs are resolved using dpkg-shlibdeps.
However, if a file like debian/package.netlibs is found, this one will
be installed and no scanning is performed.
@@ -106,11 +106,32 @@
init();
+## shared code
+my $fh;
+my %shlibdata;
+open( $fh, "cat /var/lib/dpkg/info/*.shlibs 2>/dev/null |" );
+while (<$fh>) {
+ /(\S+)\s+(\S+)\s+(\w.*)\n?/;
+ $shlibdata{"$1.so.$2"} = $3;
+}
+
+
sub extraDeps {
my $config=$_[0].".config";
- return undef;
+ my $ret=undef;
+ if( -r $config) {
+ $config=`cat $config`;
+ while($config=~s/\Wtarget\W*=\W*(\w[\w.\-\d]+)//) {
+ $ret.= (", ".$shlibdata{$1}) if(defined($shlibdata{$1}));
+ }
+ }
+ $ret=~s/^, //;
+ print "TEST: $ret\n";
+ return $ret;
}
+## /shared code
+
foreach my $package ( @{ $dh{DOPACKAGES} } ) {
next if is_udeb($package);
Modified: mono/trunk/debian/dh_netdeps
===================================================================
--- mono/trunk/debian/dh_netdeps 2004-06-12 16:32:38 UTC (rev 957)
+++ mono/trunk/debian/dh_netdeps 2004-06-12 16:41:35 UTC (rev 958)
@@ -15,10 +15,8 @@
=head1 SYNOPSIS
-FIXME: document debian/mono.local, document the usage
+B<dh_python> [S<I<debhelper options>>]
-B<dh_python> [S<I<debhelper options>>] [B<-n>] [B<-V> I<version>] [S<I<module dirs ...>>]
-
=head1 DESCRIPTION
dh_python is a debhelper program that is responsible for generating the
@@ -88,7 +86,7 @@
}
if ( system "grep \"Build-Dep.*mono-utils\" debian/control" ) {
- print "Warning: no Build-Depends on mono-utils!\n";
+ warning("Warning! No Build-Depends on mono-utils!");
}
if ( !defined $mono_version || $mono_version eq "" ) {
@@ -128,10 +126,37 @@
my %libdata;
open( $fh, "cat /var/lib/dpkg/info/*.netlibs debian/*/DEBIAN/netlibs 2>/dev/null |" );
while (<$fh>) {
- /(\S+)\s+(\S+)\s+(\S+)/;
+ /(\S+)\s+(\S+)\s+(\w.*)\n?/;
$libdata{"$1/$2"} = $3;
}
+## shared code
+my %shlibdata;
+open( $fh, "cat /var/lib/dpkg/info/*.shlibs 2>/dev/null |" );
+while (<$fh>) {
+ /(\S+)\s+(\S+)\s+(\w.*)\n?/;
+ $shlibdata{"$1.so.$2"} = $3;
+}
+
+
+sub extraDeps {
+ my $config=$_[0].".config";
+ my $ret=undef;
+ if( -r $config) {
+ $config=`cat $config`;
+ while($config=~s/\Wtarget\W*=\W*(\w[\w.\-\d]+)//) {
+ $ret.= (", ".$shlibdata{$1}) if(defined($shlibdata{$1}));
+ }
+ }
+ $ret=~s/^, //;
+ print "TEST: $ret\n";
+ return $ret;
+}
+
+## /shared code
+
+
+
#print (values %libdata);
#exit 1;
@@ -160,7 +185,7 @@
$key = $vers . "__" . lc($key);
my $compat = "$name/$key";
if(!defined($libdata{$compat})) {
- print "Warning: no Debian dependency data for $name ($key)!\n";
+ warning("Warning! No Debian dependency data for $name ($key)!");
}
else {
$depkgs{$libdata{$compat}} = 1;
@@ -175,7 +200,7 @@
#exit 1;
addsubstvar( $package, "net:Depends",
- "mono-jit (>> $mono_version) | cli-virtual-machine", join(", ", (keys %depkgs)) );
+ "mono-jit (>> $mono_version) | cli-virtual-machine".(%depkgs?join(", ", "", (keys %depkgs)):""));
# # finaly resolve the version and add it to substvars
# foreach my $pkg (keys %deps) {