[SCM] Debian packaging of libbio-primerdesigner-perl branch, master, updated. 2db9dda5dd4969ddfe920158e7cf57e19c2f3b45

gregor herrmann gregoa at debian.org
Mon Jul 29 16:19:33 UTC 2013


The following commit has been merged in the master branch:
commit d1caac094fa91b57471a30d8194702e10f61900e
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon Jul 29 17:40:52 2013 +0200

    Add a patch to use Module::Build's args() instead of Getopt::Long.
    
    Closes: #718056

diff --git a/debian/patches/build.pl-getopt-long.patch b/debian/patches/build.pl-getopt-long.patch
new file mode 100644
index 0000000..00c9b7a
--- /dev/null
+++ b/debian/patches/build.pl-getopt-long.patch
@@ -0,0 +1,100 @@
+Description: Use of Getopt::Long was breaking the Build.PL interface 
+ for passing Module::Build long options (for example --installdirs).
+ Refactor Build.PL to use the built-in args() method.
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/718056
+Forwarded: not-yet
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2013-07-29
+
+--- a/Build.PL
++++ b/Build.PL
+@@ -4,7 +4,6 @@
+ use warnings;
+ use Cwd;
+ use Data::Dumper;
+-use Getopt::Long;
+ use Pod::Usage;
+ use File::Spec::Functions 'catfile';
+ 
+@@ -14,36 +13,6 @@
+     exit(0);
+ }
+ 
+-my $help = '';
+-my $url  = '';
+-GetOptions(
+-    'h|help' => \$help,
+-    'url:s'  => \$url,
+-);
+-
+-if ( $help ) {
+-    pod2usage({ -exitval => 0 });
+-}
+-
+-#
+-# Write any local config info to the Config file
+-#
+-if ( $url && $url !~ m{^http://} ) {
+-    $url = 'http://' . $url;
+-}
+-
+-my $cwd       = cwd;
+-my $tmpl_file = catfile( $cwd, 'templates', 'Config.pm' );
+-open my $in_fh, '<', $tmpl_file or die "Can't read $tmpl_file: $!\n";
+-my $tmpl      = join('', <$in_fh>);
+-my $config    = sprintf( $tmpl, "  local_url => '$url'," );
+-close $in_fh;
+-
+-my $config_pm = catfile( cwd(), 'lib', 'Bio', 'PrimerDesigner', 'Config.pm' );
+-open my $out_fh, '>', $config_pm or die "Can't write '$config': $!\n";
+-print $out_fh $config;
+-close $out_fh;
+-
+ # 
+ # Here we make the Build script
+ # 
+@@ -70,6 +39,34 @@
+     },
+ );
+ 
++my %args = $builder->args;
++
++my $help = exists $args{help};
++my $url  = $args{url};
++
++if ( $help ) {
++    pod2usage({ -exitval => 0 });
++}
++
++#
++# Write any local config info to the Config file
++#
++if ( $url && $url !~ m{^http://} ) {
++    $url = 'http://' . $url;
++}
++
++my $cwd       = cwd;
++my $tmpl_file = catfile( $cwd, 'templates', 'Config.pm' );
++open my $in_fh, '<', $tmpl_file or die "Can't read $tmpl_file: $!\n";
++my $tmpl      = join('', <$in_fh>);
++my $config    = sprintf( $tmpl, "  local_url => '$url'," );
++close $in_fh;
++
++my $config_pm = catfile( cwd(), 'lib', 'Bio', 'PrimerDesigner', 'Config.pm' );
++open my $out_fh, '>', $config_pm or die "Can't write '$config': $!\n";
++print $out_fh $config;
++close $out_fh;
++
+ my $tarball = $builder->dist_dir . '.tar.gz';
+ 
+ $builder->add_to_cleanup( $tarball, 'lib/Bio/PrimerDesigner/Config.pm' );
+@@ -94,7 +91,7 @@
+ 
+ Options:
+ 
+-  -h|--help   Show usage
++  --help      Show usage
+   --url       The URL to use for remote program access, e.g.,
+               http://my.org/cgi-bin/primer_designer.cgi
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3ee7479
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+build.pl-getopt-long.patch

-- 
Debian packaging of libbio-primerdesigner-perl



More information about the Pkg-perl-cvs-commits mailing list