[Reproducible-commits] [libextutils-depends-perl] 126/187: Imported Upstream version 0.307

Maria Valentina Marin Rodrigues akira-guest at moszumanska.debian.org
Wed Jan 21 21:16:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

akira-guest pushed a commit to branch pu/reproducible_builds
in repository libextutils-depends-perl.

commit 33defb88b7748e543275600af16b028096bdd214
Author: Florian Schlichting <fsfs at debian.org>
Date:   Thu May 1 22:34:38 2014 +0200

    Imported Upstream version 0.307
---
 Changes                 |  4 ++++
 META.json               | 14 ++++++++++++--
 META.yml                | 13 ++++++++++---
 MYMETA.json             | 14 ++++++++++++--
 MYMETA.yml              | 13 ++++++++++---
 README                  | 11 +++++++++++
 lib/ExtUtils/Depends.pm | 19 ++++++++++++++-----
 t/02_save_load.t        | 27 ++++++++++++++++++++++++---
 8 files changed, 97 insertions(+), 18 deletions(-)

diff --git a/Changes b/Changes
index 58e8776..b4f3e80 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 Revision history for Perl extension ExtUtils::Depends.
 
+0.307 Mon Apr 28 22:04:38 PDT 2014
+    - $Data::Dumper::Terse set to 1 broke save_config
+    - Document API expected by ::load function
+
 0.306 Mon Sep 28 22:04:38 PDT 2013
     - Fixed typo in RT queue URL; fixes RT#88960
 
diff --git a/META.json b/META.json
index e547bd0..47589fe 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Gtk2-Perl Team <gtk-perl-list at gnome dot org>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921",
+   "generated_by" : "ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.133380",
    "keywords" : [
       "XS",
       "XS extensions",
@@ -30,16 +30,26 @@
    "prereqs" : {
       "build" : {
          "requires" : {
+            "ExtUtils::MakeMaker" : "0",
             "Test::More" : "0"
          }
       },
       "configure" : {
          "requires" : {
             "Data::Dumper" : "0",
+            "ExtUtils::MakeMaker" : "0",
             "File::Spec" : "0",
             "IO::File" : "0"
          }
       },
+      "runtime" : {
+         "requires" : {
+            "Data::Dumper" : "0",
+            "File::Spec" : "0",
+            "IO::File" : "0",
+            "perl" : "5.006"
+         }
+      },
       "test" : {
          "recommends" : {
             "Test::Number::Delta" : "1"
@@ -63,5 +73,5 @@
       },
       "x_MailingList" : "https://mail.gnome.org/mailman/listinfo/gtk-perl-list"
    },
-   "version" : "0.306"
+   "version" : "0.307"
 }
diff --git a/META.yml b/META.yml
index ab027c9..0b320ef 100644
--- a/META.yml
+++ b/META.yml
@@ -3,13 +3,15 @@ abstract: unknown
 author:
   - 'Gtk2-Perl Team <gtk-perl-list at gnome dot org>'
 build_requires:
+  ExtUtils::MakeMaker: 0
   Test::More: 0
 configure_requires:
   Data::Dumper: 0
+  ExtUtils::MakeMaker: 0
   File::Spec: 0
   IO::File: 0
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921'
+generated_by: 'ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.133380'
 keywords:
   - XS
   - 'XS extensions'
@@ -25,10 +27,15 @@ no_index:
     - inc
   package:
     - ExtUtils::MM
+requires:
+  Data::Dumper: 0
+  File::Spec: 0
+  IO::File: 0
+  perl: 5.006
 resources:
+  MailingList: https://mail.gnome.org/mailman/listinfo/gtk-perl-list
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=ExtUtils-Depends
   homepage: http://gtk2-perl.sourceforge.net
   license: http://dev.perl.org/licenses/
   repository: git://git.gnome.org/perl-ExtUtils-Depends
-  x_MailingList: https://mail.gnome.org/mailman/listinfo/gtk-perl-list
-version: 0.306
+version: 0.307
diff --git a/MYMETA.json b/MYMETA.json
index 64ff244..4ff0cd3 100644
--- a/MYMETA.json
+++ b/MYMETA.json
@@ -4,7 +4,7 @@
       "Gtk2-Perl Team <gtk-perl-list at gnome dot org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921",
+   "generated_by" : "ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.133380",
    "keywords" : [
       "XS",
       "XS extensions",
@@ -30,16 +30,26 @@
    "prereqs" : {
       "build" : {
          "requires" : {
+            "ExtUtils::MakeMaker" : "0",
             "Test::More" : "0"
          }
       },
       "configure" : {
          "requires" : {
             "Data::Dumper" : "0",
+            "ExtUtils::MakeMaker" : "0",
             "File::Spec" : "0",
             "IO::File" : "0"
          }
       },
+      "runtime" : {
+         "requires" : {
+            "Data::Dumper" : "0",
+            "File::Spec" : "0",
+            "IO::File" : "0",
+            "perl" : "5.006"
+         }
+      },
       "test" : {
          "recommends" : {
             "Test::Number::Delta" : "1"
@@ -63,5 +73,5 @@
       },
       "x_MailingList" : "https://mail.gnome.org/mailman/listinfo/gtk-perl-list"
    },
-   "version" : "0.306"
+   "version" : "0.307"
 }
diff --git a/MYMETA.yml b/MYMETA.yml
index c67e5d5..30b484e 100644
--- a/MYMETA.yml
+++ b/MYMETA.yml
@@ -3,13 +3,15 @@ abstract: unknown
 author:
   - 'Gtk2-Perl Team <gtk-perl-list at gnome dot org>'
 build_requires:
+  ExtUtils::MakeMaker: 0
   Test::More: 0
 configure_requires:
   Data::Dumper: 0
+  ExtUtils::MakeMaker: 0
   File::Spec: 0
   IO::File: 0
 dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921'
+generated_by: 'ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.133380'
 keywords:
   - XS
   - 'XS extensions'
@@ -25,10 +27,15 @@ no_index:
     - inc
   package:
     - ExtUtils::MM
+requires:
+  Data::Dumper: 0
+  File::Spec: 0
+  IO::File: 0
+  perl: 5.006
 resources:
+  MailingList: https://mail.gnome.org/mailman/listinfo/gtk-perl-list
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=ExtUtils-Depends
   homepage: http://gtk2-perl.sourceforge.net
   license: http://dev.perl.org/licenses/
   repository: git://git.gnome.org/perl-ExtUtils-Depends
-  x_MailingList: https://mail.gnome.org/mailman/listinfo/gtk-perl-list
-version: 0.306
+version: 0.307
diff --git a/README b/README
index 55851a6..c5c80d4 100644
--- a/README
+++ b/README
@@ -43,6 +43,9 @@ DESCRIPTION
     into the data structures required by ExtUtils::MakeMaker's WriteMakefile
     function.
 
+    For information on how to make your module fit into this scheme, see
+    "hashref = ExtUtils::Depends::load (name)".
+
     When creating a new Depends object, you give it a name, which is the
     name of the module you are building. You can also specify the names of
     modules on which this module depends. These dependencies will be loaded
@@ -149,6 +152,14 @@ METHODS
             exist when loading files created by old versions of
             ExtUtils::Depends.
 
+        If you want to make module *name* support this, you must provide a
+        module *name*::Install::Files, which on loading will provide the
+        following package variables: @typemaps, $inc, $libs, $deps, with the
+        same contents as above (not coincidentally). The "load" function
+        will supply the "instpath". An easy way to achieve this is to use
+        the method "$depends->save_config ($filename)", but your package may
+        have different facilities already.
+
     $depends->load_deps
         Load *$depends* dependencies, by calling "load" on each dependency
         module. This is usually done for you, and should only be needed if
diff --git a/lib/ExtUtils/Depends.pm b/lib/ExtUtils/Depends.pm
index 05ef316..795742d 100644
--- a/lib/ExtUtils/Depends.pm
+++ b/lib/ExtUtils/Depends.pm
@@ -11,7 +11,7 @@ use File::Find;
 use File::Spec;
 use Data::Dumper;
 
-our $VERSION = '0.306';
+our $VERSION = '0.307';
 
 sub import {
 	my $class = shift;
@@ -112,6 +112,7 @@ sub install {
 
 sub save_config {
 	use Data::Dumper;
+	local $Data::Dumper::Terse = 0;
 	use IO::File;
 
 	my ($self, $filename) = @_;
@@ -120,16 +121,13 @@ sub save_config {
 		or croak "can't open '$filename' for writing: $!\n";
 
 	print $file "package $self->{name}\::Install::Files;\n\n";
-	# for modern stuff
 	print $file "".Data::Dumper->Dump([{
 		inc => join (" ", @{ $self->{inc} }),
 		libs => $self->{libs},
 		typemaps => [ map { basename $_ } @{ $self->{typemaps} } ],
 		deps => [keys %{ $self->{deps} }],
 	}], ['self']);
-	# for ancient stuff
-	print $file "\n\n# this is for backwards compatiblity\n";
-	print $file "\@deps = \@{ \$self->{deps} };\n";
+	print $file "\n\n\@deps = \@{ \$self->{deps} };\n";
 	print $file "\@typemaps = \@{ \$self->{typemaps} };\n";
 	print $file "\$libs = \$self->{libs};\n";
 	print $file "\$inc = \$self->{inc};\n";
@@ -414,6 +412,9 @@ may be retrieved later.  The object can also reformat this information
 into the data structures required by ExtUtils::MakeMaker's WriteMakefile
 function.
 
+For information on how to make your module fit into this scheme, see
+L</"hashref = ExtUtils::Depends::load (name)">.
+
 When creating a new Depends object, you give it a name, which is the name
 of the module you are building.   You can also specify the names of modules
 on which this module depends.  These dependencies will be loaded
@@ -546,6 +547,14 @@ loading files created by old versions of ExtUtils::Depends.
 
 =back
 
+If you want to make module I<name> support this, you must provide
+a module I<name>::Install::Files, which on loading will provide the
+following package variables: C<@typemaps>, C<$inc>, C<$libs>, C<$deps>,
+with the same contents as above (not coincidentally). The C<load>
+function will supply the C<instpath>. An easy way to achieve this is
+to use the method L</"$depends-E<gt>save_config ($filename)">, but your
+package may have different facilities already.
+
 =item $depends->load_deps
 
 Load I<$depends> dependencies, by calling C<load> on each dependency module.
diff --git a/t/02_save_load.t b/t/02_save_load.t
index 9d50572..101acf8 100644
--- a/t/02_save_load.t
+++ b/t/02_save_load.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 24;
+use Test::More tests => 28;
 
 use FindBin;
 use lib "$FindBin::Bin/lib";
@@ -40,6 +40,8 @@ my @installed_files = qw(dep.h
                          dep-private.h);
 $dep_info->install (@installed_files);
 
+use Data::Dumper;
+$Data::Dumper::Terse = 1;
 $dep_info->save_config (catfile $tmp_inc, qw(DepTest Install Files.pm));
 
 # --------------------------------------------------------------------------- #
@@ -75,9 +77,15 @@ my $info = ExtUtils::Depends::load ('DepTest');
 
 my $install_part = qr|DepTest.Install|;
 like ($info->{inc}, $install_part);
-ok (-1 != index $info->{inc}, $inc);
+isnt (index($info->{inc}, $inc), -1);
 
-isa_ok ($info->{typemaps}, 'ARRAY');
+my @typemaps_expected = map { my $t = $_; $t =~ s#build/##; $t } @typemaps;
+sub strip_typemap { my $t = $_; $t =~ s#.*DepTest/Install/##; $t }
+is_deeply (
+  [ map { strip_typemap($_) } @{$info->{typemaps}} ],
+  \@typemaps_expected,
+  'check typemaps actually saved/loaded'
+);
 
 like ($info->{instpath}, $install_part);
 
@@ -85,4 +93,17 @@ is_deeply ($info->{deps}, []);
 
 is ($info->{libs}, $libs);
 
+# now check package vars are set, per the ::load doc!
+{
+no warnings qw(once);
+is ($DepTest::Install::Files::inc, $inc);
+is_deeply (
+  [ map { strip_typemap($_) } @DepTest::Install::Files::typemaps ],
+  \@typemaps_expected,
+  'api check typemaps'
+);
+is_deeply (\@DepTest::Install::Files::deps, []);
+is ($DepTest::Install::Files::libs, $libs);
+}
+
 # --------------------------------------------------------------------------- #

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/libextutils-depends-perl.git



More information about the Reproducible-commits mailing list