[Pkg-mono-svn-commits] rev 2971 - in cli-common/tags: . 0.4.7
0.4.7/debian
Sebastian Dröge
slomo at alioth.debian.org
Tue Feb 27 15:35:02 CET 2007
Author: slomo
Date: 2007-02-27 15:35:02 +0100 (Tue, 27 Feb 2007)
New Revision: 2971
Added:
cli-common/tags/0.4.7/
cli-common/tags/0.4.7/debian/changelog
cli-common/tags/0.4.7/debian/control
cli-common/tags/0.4.7/dh_clideps
Removed:
cli-common/tags/0.4.7/debian/changelog
cli-common/tags/0.4.7/debian/control
cli-common/tags/0.4.7/dh_clideps
Log:
* tag 0.4.7
Copied: cli-common/tags/0.4.7 (from rev 2965, cli-common/trunk)
Deleted: cli-common/tags/0.4.7/debian/changelog
===================================================================
--- cli-common/trunk/debian/changelog 2007-02-27 13:35:34 UTC (rev 2965)
+++ cli-common/tags/0.4.7/debian/changelog 2007-02-27 14:35:02 UTC (rev 2971)
@@ -1,210 +0,0 @@
-cli-common (0.4.8) unstable; urgency=low
-
- * debian/control,
- debian/cli-policy.sgml:
- + Update to use my debian.org mail address
-
- -- Sebastian Dröge <slomo at debian.org> Mon, 8 Jan 2007 00:41:51 +0100
-
-cli-common (0.4.7) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + dh_clideps:
- - Added support for overriding assembly references using
- debian/$package.clideps-override.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Fri, 24 Nov 2006 01:11:07 +0100
-
-cli-common (0.4.6) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + dh_clideps:
- - Don't parse symlinks that point to CLI assemblies.
- - Added support for MONO_PATH using -l parameter.
- - Only use the basename of DLL map targets.
- (else the shlibs lookup will fail)
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sun, 1 Oct 2006 12:51:20 +0200
-
-cli-common (0.4.5) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + debian/control:
- - Really added libxml-dom-perl dependency to cli-common-dev.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sun, 24 Sep 2006 20:06:14 +0200
-
-cli-common (0.4.4) unstable; urgency=low
-
- * Dylan R. E. Moonfire
- + Created dh_clifixperms to easily correct file permissions.
- * Mirco 'meebey Bauer
- + Updated link in the CLI Policy for MS .NET term usage.
- + dh_{makeclilibs,clideps}:
- - Bumped cli-common-dev build-depends check to >= 0.4.4
- + dh_clideps:
- - Rewrote many parts.
- - Assembly ModuleRefs are now parsed.
- - Using /etc/mono/config now for resolving DLL maps.
- - Added override feature for detected dependencies, to support Suggests
- and Recommends fields. (debian/$package.clideps-override)
- - Using libxml-dom-perl now instead of hackish regex.
- - Added special handling of libc6 dependency, the package is not called
- libc6 on all architectures.
- + debian/control:
- - Removed transition dependency for cli-common on cli-common-dev.
- (7 month for a package rename transition should be more than enough)
- - Added libxml-dom-perl dependency to cli-common.
- - Updated to Standards Version 3.7.2 (no changes).
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sun, 24 Sep 2006 00:58:36 +0200
-
-cli-common (0.4.3) unstable; urgency=low
-
- * Sebastian 'slomo' Dröge:
- + Fix file naming of the policy files in the CLI policy
- + dh_installcligac:
- - Do some sanity checking whether the files listed in the installcligac
- files really exist. Otherwise fail.
- + gac-package-install:
- - Fail at install time if a file listed in the installcligac file does
- not exist. (Closes: #366451)
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Wed, 28 Jun 2006 12:33:24 +0200
-
-cli-common (0.4.2) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + Renamed debian/cli-common-dev.manapges to debian/cli-common-dev.manpages
- (caused missing manpages, Closes: #368212)
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sun, 21 May 2006 13:29:13 +0200
-
-cli-common (0.4.1) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + debian/control:
- - Fixed replaces of cli-common-dev.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sat, 29 Apr 2006 22:29:38 +0200
-
-cli-common (0.4.0) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + Includes CLI policy version 0.4.0.
- + Added LD_LIBRARY_PATH to "mono" call for internal-mono mode.
- + Fixed dllmap parser regex in dh_clideps and dh_makeclideps, to not use
- the full filename but the SONAME.
- + Fixed shlibs parser regex and cat call to use fullpath.
- + New package cli-common-dev, which is for building CLI
- libraries/application packages.
- cli-common is now used for base package for runtime, it includes a
- framework for GAC integration across CRLs.
- For transition cli-common depends on cli-common-dev till all source
- packages have updated their build-deps.
- + Bumped debhelper compat to 5 and updated the build-dep to >= 5.0.0
- + dh_clideps will now create dependencies for applications on mono-runtime
- instead of mono-jit, required for libraries that are installed via GAC.
- * Dylan R. E. Moonfire <debian at mfgames.com>
- + Added a late GAC installer framework.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Mon, 20 Feb 2006 00:59:07 +0100
-
-cli-common (0.2.3) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + Added LD_LIBRARY_PATH to dh_makeclilibs and dh_clideps for the
- internal-mono mode, this fixes full bootstrapping of Mono.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sun, 2 Oct 2005 17:45:28 +0200
-
-cli-common (0.2.2) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + Fixed manpage of dh_makeclilibs, "internal-mono" not "--internal-mono".
- + dh_clideps knows now 2.0.0.0 version of mscorlib.
- + Fixed bug in dh_clideps, when .NET 1.0 and 2.0 were used in the same
- package, the generated dependency was only for .NET 1.0 then.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sat, 24 Sep 2005 15:46:42 +0200
-
-cli-common (0.2.1) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + Added mono/2.0 to MONO_PATH in dh_clideps and dh_makeclilibs for
- internal-mono mode, this caused FTBFS.
- (thanks to Sebastian Dröge <mail at slomosnail.de> for investigating)
- + Using debian/tmp/usr/bin/monodis in dh_makeclilibs again.
- + Updated to Standards Version 3.6.2.1 (no changes).
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Fri, 2 Sep 2005 18:35:20 +0200
-
-cli-common (0.2.0) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + Ported the CLI policy in SGML.
- + /usr/share/doc/cli-common contains now the CLI policy.
- + Includes CLI policy version 0.2.0.
- + debian/control:
- - Added debiandoc-sgml and tetex-extra to build-deps-indep.
- - Changed Build-Depends to Build-Depends-Indep.
- + debian/rules:
- - Added calls to generate the CLI policy from SGML.
- - Moved pod2man calls to build target.
- + debian/cli-common.docs:
- - Added generated CLI policy documents.
- + dh_clideps:
- - Added error handling/messages when monodis fails for some reason.
- - Fixed bug, it was not generating required dependencies when run in
- internal-mono mode, caused wrong CLI deps for mono packages.
- - Packages with no .exe files will no longer have a mono-jit
- dependency.
- - The versioned dependency of mono-jit for applications will be >= 1.0
- when using .NET 1.0 and >= 1.1.8.1-1 when using .NET 2.0 now.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sun, 28 Aug 2005 15:53:48 +0200
-
-cli-common (0.1.4) unstable; urgency=low
-
- * Mirco 'meebey' Bauer
- + Changed title of generated manpages. (Closes: #288198)
- + Applied patch by Ingo Saitz that allows to use a built mono in debian/
- (using internal-mono switch).
- + Added debian/compat.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sun, 10 Jul 2005 19:46:23 +0200
-
-cli-common (0.1.3.0) unstable; urgency=low
-
- * upload to unstable
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sun, 29 May 2005 19:52:32 +0200
-
-cli-common (0.1.3) experimental; urgency=low
-
- * Mirco 'meebey' Bauer
- + fixed bug in dh_clideps, when no "-r" was passed it didn't generate a
- dependency on the virtual machine.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sat, 14 May 2005 16:47:37 +0200
-
-cli-common (0.1.2) experimental; urgency=low
-
- * Mirco 'meebey' Bauer
- + build-dep check for cli-common applies also now to buil-dep-indep.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Sat, 23 Apr 2005 12:44:14 +0200
-
-cli-common (0.1.1) experimental; urgency=low
-
- * Mirco 'meebey' Bauer
- + added mono-mcs and virtual packages to dependencies.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Mon, 4 Apr 2005 18:31:27 +0200
-
-cli-common (0.1) experimental; urgency=low
-
- * Mirco 'meebey' Bauer
- + Initial release.
-
- -- Debian Mono Group <pkg-mono-group at lists.alioth.debian.org> Mon, 4 Apr 2005 18:31:27 +0200
Copied: cli-common/tags/0.4.7/debian/changelog (from rev 2970, cli-common/trunk/debian/changelog)
Deleted: cli-common/tags/0.4.7/debian/control
===================================================================
--- cli-common/trunk/debian/control 2007-02-27 13:35:34 UTC (rev 2965)
+++ cli-common/tags/0.4.7/debian/control 2007-02-27 14:35:02 UTC (rev 2971)
@@ -1,33 +0,0 @@
-Source: cli-common
-Section: interpreters
-Priority: optional
-Maintainer: Debian Mono Group <pkg-mono-group at lists.alioth.debian.org>
-Uploaders: Mirco Bauer <meebey at meebey.net>, Sebastian Dröge <slomo at debian.org>
-Build-Depends-Indep: debhelper (>= 5.0.0), debiandoc-sgml, tetex-extra
-Standards-Version: 3.7.2
-
-Package: cli-common
-Architecture: all
-Description: common files between all CLI (.NET) packages
- This package must be installed if a CLI (Common Language Infrastructure)/.NET
- runtime environment is desired.
- .
- It covers useful integration and information for CLI implementations in
- Debian GNU/Linux, including:
- * The CLI policy describes how CLI packages should behave and integrate.
- * A FAQ for package maintainers of CLI/.NET applications.
- * Integration for CLRs (Common Language Runtime):
- + Installing libraries into existing GACs (Global Assembly Cache)
-
-Package: cli-common-dev
-Architecture: all
-Replaces: cli-common (<< 0.4.0)
-Depends: debhelper (>= 5.0.0), mono-utils | cil-disassembler, mono-mcs | strong-name-tool, libxml-dom-perl
-Description: common files for building CLI (.NET) packages
- This package must be installed if a CLI (Common Language Infrastructure)/.NET
- packaging environment is desired.
- .
- It includes debhelper scripts for managing automatic dependency tracking
- between native libraries, CLI libraries and CLI applications:
- * dh_clideps to generate cli:Depends information for debian/control
- * dh_makeclilibs to create clilibs files that are needed/used by dh_clideps
Copied: cli-common/tags/0.4.7/debian/control (from rev 2970, cli-common/trunk/debian/control)
Deleted: cli-common/tags/0.4.7/dh_clideps
===================================================================
--- cli-common/trunk/dh_clideps 2007-02-27 13:35:34 UTC (rev 2965)
+++ cli-common/tags/0.4.7/dh_clideps 2007-02-27 14:35:02 UTC (rev 2971)
@@ -1,585 +0,0 @@
-#!/usr/bin/perl -w
-
-=head1 NAME
-
-dh_clideps - calculates CLI (.NET) dependencies
-
-=cut
-
-use strict;
-use Cwd;
-use File::Find;
-use File::Temp;
-use Debian::Debhelper::Dh_Lib;
-
-#eval 'use Debian::Debhelper::Dh_Lib';
-#print "You need to install the debhelper package in order to use this program!" if $@;
-
-=head1 SYNOPSIS
-
-B<dh_clideps> [S<I<debhelper options>>]
-
-=head1 DESCRIPTION
-
-dh_clideps is a debhelper program that is responsible for generating the
-${cli:Depends} substitutions and adding them to substvars files.
-
-The program will look at .dll/.exe and .config files in your package, and
-will use the embedded dependency information to generate a dependency
-string on assembly and shared libs packages, including the setting of
-version ranges (as declared by the shlibs/clilibs files of the used
-packages). The dependency on a certain CLR (.NET runtime) version will be
-also added to the final variable.
-
-Note: the dependencies on shared libraries may be not resolved correctly
-if there are no .config files associated with the the .exe/.dll file
-which refers to the particular shared library (by its SONAME).
-
-If you use this program, your package should build-depend on cli-common-dev
-(>= 0.4.0).
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-d>
-
-Attempt to predict and avoid duplicates that may appear if you package
-both, native shared libraries and DLL assemblies in one package.
-The list of possibly duplicating candidates is expected to be in the
-variable shlib:Depends from debian/package.substvars.
-
-=item B<-r>
-
-Don't set a strong versioned dependency on mono-runtime or other CLR packages.
-This option can be used to specify a relaxed dependency on the VM/CLR
-by-hand in the control file, eg. "mono-runtime | cli-runtime".
-
-=item B<-l>directory[:directory:directory:..]
-
-Before mondis is run, MONO_GAC_PREFIX and MONO_PATH are set to the specified directory (or
-directories -- separate with colons). This is useful for multi-binary packages where a library is
-built in one package and another package contains binaries linked against said library. Relative
-paths will be made absolute for the benefit of monodis.
-
-Note that the directory given should be the complete or relative path to a directory that contains
-the library. See example below.
-
-=item B<internal-mono>
-
-Uses the mono runtime in . (used for bootstrapping mono packages)
-
-=head1 EXAMPLES
-
-Suppose that your source package produces libfoo1.0-cil and libbar1.0-cil
-binary packages.
-In your rules file, first run dh_makeclilibs, then dh_clideps:
- (MONO_GAC_PREFIX example)
- dh_makeclilibs -V
- dh_clideps -l debian/libfoo1.0-cil/usr:debian/libbar1.0-cil/usr
-or
- (MONO_PATH example)
- dh_clideps -l debian/foo-application/usr/lib/foo-application
-or
- (MONO_GAC_PREFIX example)
- dh_clideps -l debian/tmp/usr
-
-=cut
-
-init();
-
-my $clr;
-my $cli = '/usr/bin/cli';
-my $cli_version = `$cli --version 2>&1`;
-my $cli_parser;
-my $cli_parser_paths;
-my $pwd = `pwd`;
-chomp $pwd;
-
-my $mono_gac_prefix = "";
-my $mono_path = "";
-if ($dh{L_PARAMS}) {
- my @mono_paths = ();
- my @mono_gac_prefixes = ();
- # Add to existing paths, if set.
- push(@mono_gac_prefixes, $ENV{'MONO_GAC_PREFIX'}) if exists $ENV{'MONO_GAC_PREFIX'};
- push(@mono_paths, $ENV{'MONO_PATH'}) if exists $ENV{'MONO_PATH'};
- foreach (split(/:/, $dh{L_PARAMS})) {
- # Force the path absolute.
- my $full_path;
- if (m:^/:) {
- $full_path = $_;
- } else {
- $full_path = getcwd()."/$_";
- }
- if (-d "$full_path/lib/mono/gac") {
- # it's a GAC prefix
- push(@mono_gac_prefixes, $full_path);
- } else {
- # it's a Mono PATH
- push(@mono_paths, $full_path);
- }
- }
- $mono_gac_prefix .= ":" . join(':', @mono_gac_prefixes);
- $mono_path .= ":" . join(':', @mono_paths);
-} else {
- $mono_gac_prefix = $ENV{'MONO_GAC_PREFIX'} if exists $ENV{'MONO_GAC_PREFIX'};
- $mono_path = $ENV{'MONO_PATH'} if exists $ENV{'MONO_PATH'};
-}
-
-if (defined($ARGV[0]) && $ARGV[0] eq "internal-mono") {
- $clr = "mono";
- $cli_parser = "$pwd/debian/tmp/usr/bin/monodis";
- $cli_parser_paths = "LD_LIBRARY_PATH=$pwd/debian/tmp/usr/lib MONO_PATH=$mono_path:$pwd/debian/tmp/usr/lib/mono/1.0:$pwd/debian/tmp/usr/lib/mono/2.0 MONO_GAC_PREFIX=$mono_gac_prefix ";
- $cli_version = `LD_LIBRARY_PATH=$pwd/debian/tmp/usr/lib $pwd/debian/tmp/usr/bin/mono --version 2>&1`;
- verbose_print("Will use built Mono (debian/tmp/usr/bin/monodis) for CIL parsing.");
-} elsif (-x "/usr/bin/monodis") {
- $clr = "mono";
- $cli_parser = "/usr/bin/monodis";
- $cli_parser_paths = "MONO_PATH=$mono_path MONO_GAC_PREFIX=$mono_gac_prefix ";
- verbose_print("Will use Mono (/usr/bin/monodis) for CIL parsing.");
-} elsif (-x "/usr/bin/ildasm") {
- $clr = "pnet";
- $cli_parser = "/usr/share/cli-common/ildasm-monodis";
- verbose_print("Will use Portable.NET (/usr/bin/ildasm) for CIL parsing.");
-} else {
- error("Could not find a CIL disassembler, aborting.");
-}
-
-{
- local $/="";
- open(FILE, 'debian/control');
- my @filedata = <FILE>;
- close(FILE);
- if (!($filedata[0] =~ /Build-Depends(-Indep)?: .*cli-common-dev \(>= 0\.4\.4\)/)) {
- warning("Warning! No Build-Depends(-Indep) on cli-common-dev (>= 0.4.4)!");
- }
-}
-
-if (!defined $cli_version || $cli_version eq "" ) {
- warning("Warning! No CLR is installed. (Probably forgot to Build-Depend on cli-virtual-machine.)");
-} else {
- if ($clr eq "mono") {
- if ($cli_version =~ /(mint|version)\ ([\d\.]+)/) {
- $cli_version = "$2";
- } else {
- error("Unable to parse Mono version out of \"$cli_version\".");
- }
- } elsif ($clr eq "pnet") {
- if ($cli_version =~ /ILRUN\ ([\d\.]+)/) {
- $cli_version = "$1";
- } else {
- error("Unable to parse Portable.NET version out of \"$cli_version\".");
- }
- } else {
- error("Unable to detect CLR, aborting.");
- }
-}
-
-
-# Cleaning the paths given on the command line
-foreach (@ARGV) {
- s#/$##;
- s#^/##;
-}
-
-my $fh;
-
-verbose_print("Loading clilibs...");
-my %clilibdata;
-open($fh, "cat /var/lib/dpkg/info/*.clilibs debian/*/DEBIAN/clilibs 2> /dev/null |");
-while (<$fh>) {
- /(\S+)\s+(\S+)\s+(\w.*)\n?/;
- $clilibdata{"$1/$2"} = $3;
-}
-close($fh);
-
-
-verbose_print("Loading shlibs...");
-my %shlibdata;
-open($fh, "cat /var/lib/dpkg/info/*.shlibs $pwd/debian/shlibs.local $pwd/debian/*/DEBIAN/shlibs 2> /dev/null |");
-while (<$fh>) {
- /(\S+)\s+(\S+)\s+(\w.*)\n?/;
- my ($soname, $soversion, $dependency);
- #chomp;
- #my($soname, $soversion, $dependency) = split(/\s+/, $_, 3);
- $soname = $1;
- $soversion = $2;
- $dependency = $3;
- $shlibdata{"$soname.so.$soversion"} = $dependency;
-}
-close($fh);
-
-our $needs_net_1_0;
-our $needs_net_2_0;
-
-foreach my $package (@{$dh{DOPACKAGES}}) {
- my $tmp = tmpdir($package);
- my %refs = ( depends => [],
- recommends => [],
- suggests => [] );
- my $found_exe = 0;
- $needs_net_1_0 = 0;
- $needs_net_2_0 = 0;
-
- # for idempotency
- delsubstvar($package, "cli:Depends");
- delsubstvar($package, "cli:Suggests");
- delsubstvar($package, "cli:Recommends");
-
- # find binaries
- find (sub {
- return unless -f && !-l && /\.(exe|dll)$/;
- my $file = $_;
- if (/\.exe$/) {
- $found_exe = 1;
- }
-
- verbose_print("Package: $package Assembly: $file");
-
- my %shlibRefs = resolveShlibRefs($package, $file);
- push(@{$refs{depends}}, @{$shlibRefs{depends}});
- push(@{$refs{recommends}}, @{$shlibRefs{recommends}});
- push(@{$refs{suggests}}, @{$shlibRefs{suggests}});
-
- my %clilibRefs = resolveClilibRefs($package, $tmp, $file);
- push(@{$refs{depends}}, @{$clilibRefs{depends}});
- push(@{$refs{recommends}}, @{$clilibRefs{recommends}});
- push(@{$refs{suggests}}, @{$clilibRefs{suggests}});
- }, $tmp);
-
- $refs{depends} = filterDuplicates($package, $refs{depends});
- $refs{recommends} = filterDuplicates($package, $refs{recommends});
- $refs{suggests} = filterDuplicates($package, $refs{suggests});
-
- my $vm_ref = "";
- if (!defined($dh{R_FLAG}) && $found_exe) {
- if ($clr eq "mono") {
- if ($needs_net_2_0) {
- $vm_ref = "mono-runtime (>= 1.1.8.1), ";
- } elsif ($needs_net_1_0) {
- $vm_ref = "mono-runtime (>= 1.0), ";
- } else {
- $vm_ref = "mono-runtime (>= $cli_version), ";
- }
- } elsif ($clr eq "pnet") {
- $vm_ref = "pnet-interpreter (>= $cli_version), ";
- }
- }
-
- if (-f "$tmp/usr/share/cli-common/packages.d/$package.installcligac") {
- $vm_ref .= "cli-common (>= 0.4.0), ";
- }
-
- #$deps .= join(", ", "",
- # sort {
- # # beautify the sort order, requested by meebey
- # my $apkg;
- # $a =~ /^\S+/;
- # $apkg=$&;
- # $b =~ /^\S+/;
- # if($apkg eq $&) {
- # return -1 if( ($a=~/>=/) && ($b=~/<</));
- # return 1 if( ($b=~/>=/) && ($a=~/<</));
- # }
- # $a cmp $b;
- # } (keys %depkgsFiltered)
- #);
-
- @{$refs{depends}} = sort(@{$refs{depends}});
- @{$refs{recommends}} = sort(@{$refs{recommends}});
- @{$refs{suggests}} = sort(@{$refs{suggests}});
-
- addsubstvar($package, "cli:Depends", $vm_ref . join(", ", @{$refs{depends}}));
- addsubstvar($package, "cli:Recommends", join(", ", @{$refs{recommends}}));
- addsubstvar($package, "cli:Suggests", join(", ", @{$refs{suggests}}));
-}
-
-sub filterDuplicates {
- my $package = shift;
- my $packages = shift;
-
- my %packagesFiltered;
- for (@{$packages}) {
- # filter undef, empties, dups and don't depend on ourself package
- if (!$_) {
- next;
- }
-
- /^(\S+)/;
- if ($1 &&
- $1 ne $package) {
- $packagesFiltered{$_} = 1;
- }
- }
-
- # now filter the dupes coming from shlibs
- if (defined($dh{D_FLAG})) {
- my $fh;
- if (open($fh, "< $pwd/debian/$package.substvars" )) {
- while (<$fh>) {
- if (/^shlibs:Depends=(.*)\n?/) {
- for (split(/\s*,\s*/, $1)) {
- delete $packagesFiltered{$_};
- }
- }
- }
- close($fh);
- } else {
- verbose_print("Could not read $pwd/debian/$package.substvars");
- }
- }
-
- return [ keys %packagesFiltered ];
-}
-
-sub loadDllMap {
- my $filename = shift;
- our $dllmapdata = shift;
- if (!-f $filename) {
- verbose_print("loadDllMap(): DLL map $filename not found, ignoring...");
- return;
- }
-
- use XML::DOM;
- my $parser = new XML::DOM::Parser;
- my $doc = $parser->parsefile($filename, whitespace => 'strip');
- my $root = $doc->getDocumentElement();
- my @mapentries = $root->getElementsByTagName("dllmap");
- foreach my $mapentry (@mapentries) {
- my $dll = $mapentry->getAttribute("dll");
- my $target = $mapentry->getAttribute("target");
- #verbose_print("DLL map: '$dll' target: '$target'");
- $dllmapdata->{$dll} = $target;
- }
-}
-
-sub loadOverrides {
- my $package = shift;
- my $overridedata = shift;
-
- # load clideps overrides
- verbose_print("Loading clideps-override for $package...");
- my $fh;
- open($fh, "cat $pwd/debian/$package.clideps-override 2> /dev/null |");
- while (<$fh>) {
- /(\S+)\s+(\S+)(?:\s+(\(\S+\s+\S+\)))?\n?/;
- my ($type, $package, $version);
- $type = $1;
- $package = $2;
- $version = $3 if defined($3);
- if ($version) {
- $overridedata->{$package} = $type." ".$version;
- } else {
- $overridedata->{$package} = $type;
- }
- }
- close($fh);
-}
-
-sub resolveOverride {
- my $package = shift;
- my $pkgref = shift;
- my %ret = ( depends => undef,
- recommends => undef,
- suggests => undef );
-
- my $type = "depends";
- my $newpkgref = $pkgref;
- $newpkgref =~ m/(\S+)(?:\s+(\(\S+\s+\S+\)))?/;
- my $pkgname = $1;
- my $ver = $2;
- # hack for libc6, for ia64 and alpha the package name is libc6.1
- if ($pkgname =~ m/^libc6/) {
- $newpkgref = "libc6 $ver | libc6.1 $ver";
- }
-
- my %overridedata;
- loadOverrides($package, \%overridedata);
- if (defined($overridedata{$pkgname})) {
- verbose_print("Found clideps-override: $pkgname for: $package");
-
- my $override = $overridedata{$pkgname};
- $override =~ m/(\S+)(?:\s+(\(\S+\s+\S+\)))?/;
- if ($1 eq "suggests" ||
- $1 eq "recommends") {
- $type = $1;
- } elsif ($1 eq "ignores") {
- } else {
- warning("Warning: unknown override type: $1 in: '$override' for: $package!");
- }
-
- if (defined($2)) {
- $newpkgref = "$pkgname $2";
- } else {
- $newpkgref = $pkgref;
- }
- }
- verbose_print("resolved pkgref: $pkgref to $type: $newpkgref");
- $ret{$type} = $newpkgref;
-
- return %ret;
-}
-
-sub resolveClilibRefs {
- my $package = shift;
- my $tmp = shift;
- my $assembly_filename = shift;
- my %ret = ( depends => [],
- recommends => [],
- suggests => [] );
-
- my (undef, $tmpfile) = File::Temp::tempfile("/tmp/".basename($0).".XXXX", UNLINK => 1);
- my $command = "LANG=C $cli_parser_paths MONO_GAC_PREFIX=\$MONO_GAC_PREFIX:$tmp/usr $cli_parser --assemblyref $assembly_filename 2>&1 > $tmpfile";
- verbose_print("running CLI parser command: $command");
-
- system($command);
- if ($?) {
- my $output;
- {
- local *F;
- open(F, $tmpfile);
- local $/;
- $output = <F>;
- close(F);
- }
- error("cli_parser call failed: '".$command."' rc: $? output: $output");
- return;
- }
-
- my ($ver, $name, $key);
- local *F;
- open(F, $tmpfile);
- while (<F>) {
- $ver = $1 if /Version=(.*)\n/;
- $name = $1 if /Could not find assembly ([^,]+),/;
- $name = $1 if /Name=(.*)\n/;
- $ver = "$1.$2" if /Major\/Minor:\s*(\d+),(\d+)/;
- $ver .= ".$1.$2" if /Build:\s*(\d+),(\d+)/;
-
- if (/0x\S+:.([ABCDEF0123456789 ]+)\n/ || /Token:\s*(\w+)/) {
- $key = $1;
- $key =~ s/\ //g;
- $key = $ver . "__" . lc($key);
- my $compat = "$name/$key";
- if (!defined($clilibdata{$compat})) {
- warning("Warning: No Debian dependency data for $name ($key)!");
- } else {
- my $pkgref = $clilibdata{$compat};
- my %overriddenRef = resolveOverride($package, $pkgref);
- push(@{$ret{depends}}, $overriddenRef{depends});
- push(@{$ret{recommends}}, $overriddenRef{recommends});
- push(@{$ret{suggests}}, $overriddenRef{suggests});
- }
-
- if ($name eq "mscorlib") {
- if ($ver eq "1.0.5000.0") {
- $needs_net_1_0 = 1;
- } elsif ($ver eq "2.0.3600.0") {
- $needs_net_2_0 = 1;
- } elsif ($ver eq "2.0.0.0") {
- $needs_net_2_0 = 1;
- } else {
- warning("Warning: Unknown mscorlib version: $ver!");
- }
- }
- }
- }
- close(F);
-
- return %ret;
-}
-
-sub resolveShlibRefs {
- my $package = shift;
- my $assembly_filename = shift;
- my $config_filename = $assembly_filename.".config";
- my %ret = ( depends => [],
- recommends => [],
- suggests => [] );
- if (-r $config_filename) {
- verbose_print("Found DLL map: $config_filename");
- } else {
- verbose_print("Found no specific DLL map, but resolving modulerefs anyway");
- }
-
- # load dll maps
- verbose_print("Loading DLL maps for: $assembly_filename...");
- my %dllmapdata;
- loadDllMap("/etc/mono/config", \%dllmapdata);
- loadDllMap("$pwd/debian/tmp/etc/mono/config", \%dllmapdata);
- loadDllMap($config_filename, \%dllmapdata);
-
- # parse modulerefs
- my (undef, $tmpfile) = File::Temp::tempfile("/tmp/".basename($0).".XXXX", UNLINK => 1);
- my $command = "LANG=C $cli_parser_paths $cli_parser --moduleref $assembly_filename 2>&1 > $tmpfile";
-
- system($command);
- if ($?) {
- my $output;
- {
- local *F;
- open(F, $tmpfile);
- local $/;
- $output = <F>;
- close(F);
- }
- error("cli_parser call failed: '".$command."' rc: $? output: $output");
- return;
- }
-
- local *F;
- open(F, $tmpfile);
- while (<F>) {
- my $name = $1 if /\d+:\s+(.*)\n/;
- if (!defined($name)) {
- next;
- }
- my $target = $dllmapdata{$name};
-
- if (defined($target)) {
- $target = basename($target);
- verbose_print("Resolved moduleref via DLL map: $name to: $target");
- } elsif (defined($shlibdata{$name})) {
- verbose_print("Resolved moduleref via direct match in shlibs");
- } else {
- warning("Warning: Could not resolve moduleref: $name for: $assembly_filename!");
- next;
- }
-
- my $pkgref;
- if (defined($target) && defined($shlibdata{$target})) {
- $pkgref = $shlibdata{$target};
- } elsif (defined($shlibdata{$name})) {
- $pkgref = $shlibdata{$name};
- } elsif (defined($target) && defined($shlibdata{$target.".0"})) {
- # for DLL maps that have an unversioned library as target
- $pkgref = $shlibdata{$target.".0"};
- } else {
- warning("Warning: Missing shlibs entry: $target or $name for: $assembly_filename!");
- next;
- }
-
- my %overriddenRef = resolveOverride($package, $pkgref);
- push(@{$ret{depends}}, $overriddenRef{depends});
- push(@{$ret{recommends}}, $overriddenRef{recommends});
- push(@{$ret{suggests}}, $overriddenRef{suggests});
- }
- close(F);
-
- return %ret;
-}
-
-=head1 SEE ALSO
-
-L<debhelper(7)>
-
-This program is a part of cli-common-dev.
-
-=head1 AUTHOR
-
-Mirco Bauer <meebey at meebey.net>, Eduard Bloch <blade at debian.org>,
-partialy based on code from Brendan O'Dea <bod at debian.org> and
-Joey Hess <joeyh at debian.org>.
-
-=cut
Copied: cli-common/tags/0.4.7/dh_clideps (from rev 2966, cli-common/trunk/dh_clideps)
More information about the Pkg-mono-svn-commits
mailing list