r39528 - in /branches/upstream/liblocale-msgfmt-perl/current: Changes MANIFEST META.yml bin/msgfmt.pl lib/Locale/Msgfmt.pm lib/Locale/Msgfmt/Utils.pm lib/Locale/Msgfmt/mo.pm lib/Locale/Msgfmt/po.pm lib/Module/Install/Msgfmt.pm t/msgfmt.t t/version.t
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Thu Jul 9 08:03:35 UTC 2009
Author: ryan52-guest
Date: Thu Jul 9 08:03:27 2009
New Revision: 39528
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39528
Log:
[svn-upgrade] Integrating new upstream version, liblocale-msgfmt-perl (0.13)
Added:
branches/upstream/liblocale-msgfmt-perl/current/t/version.t
Modified:
branches/upstream/liblocale-msgfmt-perl/current/Changes
branches/upstream/liblocale-msgfmt-perl/current/MANIFEST
branches/upstream/liblocale-msgfmt-perl/current/META.yml
branches/upstream/liblocale-msgfmt-perl/current/bin/msgfmt.pl
branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm
branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm
branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm
branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm
branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm
branches/upstream/liblocale-msgfmt-perl/current/t/msgfmt.t
Modified: branches/upstream/liblocale-msgfmt-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/Changes?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/Changes (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/Changes Thu Jul 9 08:03:27 2009
@@ -1,4 +1,10 @@
Revision history for Locale-Msgfmt
+
+0.13 Jul 08, 2009
+ - act like make when rebuilding, only rebuild things that need to be rebuilt.
+ - add a --force option to force the old behavior of always rebuilding
+ - make the "use" in msgfmt.pl versioned to make sure that the correct version
+ of Locale::Msgfmt is being used, and add a test to keep this up to date
0.12 Jul 06, 2009
- unlink the output file before writing to it if it already exists
Modified: branches/upstream/liblocale-msgfmt-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/MANIFEST?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/MANIFEST (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/MANIFEST Thu Jul 9 08:03:27 2009
@@ -26,5 +26,6 @@
t/samples/ja.po
t/samples/ngettext.mo
t/samples/ngettext.po
+t/version.t
Makefile.PL
META.yml
Modified: branches/upstream/liblocale-msgfmt-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/META.yml?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/META.yml (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/META.yml Thu Jul 9 08:03:27 2009
@@ -1,6 +1,6 @@
---
name: Locale-Msgfmt
-version: 0.12
+version: 0.13
author:
- 'Ryan Niebur <ryanryan52 at gmail.com>'
abstract: Compile .po files to .mo files
@@ -12,19 +12,19 @@
provides:
Locale::Msgfmt:
file: lib/Locale/Msgfmt.pm
- version: 0.12
+ version: 0.13
Locale::Msgfmt::Utils:
file: lib/Locale/Msgfmt/Utils.pm
- version: 0.12
+ version: 0.13
Locale::Msgfmt::mo:
file: lib/Locale/Msgfmt/mo.pm
- version: 0.12
+ version: 0.13
Locale::Msgfmt::po:
file: lib/Locale/Msgfmt/po.pm
- version: 0.12
+ version: 0.13
Module::Install::Msgfmt:
file: lib/Module/Install/Msgfmt.pm
- version: 0.12
+ version: 0.13
generated_by: Module::Build version 0.33
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
Modified: branches/upstream/liblocale-msgfmt-perl/current/bin/msgfmt.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/bin/msgfmt.pl?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/bin/msgfmt.pl (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/bin/msgfmt.pl Thu Jul 9 08:03:27 2009
@@ -1,16 +1,16 @@
#!/usr/bin/perl
-use Locale::Msgfmt;
+use Locale::Msgfmt 0.13;
use Getopt::Long;
use strict;
use warnings;
-my($opt_o, $opt_f, $opt_q);
-GetOptions("output-file|o=s" => \$opt_o, "use-fuzzy|f" => \$opt_f, "quiet|q" => \$opt_q);
+my($opt_o, $opt_f, $opt_q, $opt_force);
+GetOptions("output-file|o=s" => \$opt_o, "use-fuzzy|f" => \$opt_f, "quiet|q" => \$opt_q, "force" => \$opt_force);
my $in = shift;
-msgfmt({in => $in, out => $opt_o, fuzzy => $opt_f, verbose => !$opt_q});
+msgfmt({in => $in, out => $opt_o, fuzzy => $opt_f, verbose => !$opt_q, force => $opt_force});
=head1 NAME
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt.pm Thu Jul 9 08:03:27 2009
@@ -2,6 +2,7 @@
use Locale::Msgfmt::mo;
use Locale::Msgfmt::po;
+use Locale::Msgfmt::Utils;
use File::Path;
use File::Spec;
@@ -12,7 +13,7 @@
our @EXPORT = qw/msgfmt/;
-our $VERSION = '0.12';
+our $VERSION = '0.13';
sub msgfmt {
my $hash = shift;
@@ -53,6 +54,11 @@
} else {
die("error: must give an output file");
}
+ }
+ unless ( $hash->{force} ) {
+ return
+ if ( -f $hash->{out}
+ && Locale::Msgfmt::Utils::mtime( $hash->{out} ) > Locale::Msgfmt::Utils::mtime( $hash->{in} ) );
}
my $mo = Locale::Msgfmt::mo->new();
$mo->initialize();
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/Utils.pm Thu Jul 9 08:03:27 2009
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.12';
+our $VERSION = '0.13';
sub character {
return map { pack "N*", $_ } @_;
@@ -53,6 +53,10 @@
return chr(4);
}
+sub mtime {
+ return @{ [ stat(shift) ] }[9];
+}
+
=head1 NAME
Locale::Msgfmt::Utils - functions used internally by Locale::Msgfmt
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/mo.pm Thu Jul 9 08:03:27 2009
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '0.12';
+our $VERSION = '0.13';
use Locale::Msgfmt::Utils;
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Locale/Msgfmt/po.pm Thu Jul 9 08:03:27 2009
@@ -5,7 +5,7 @@
use strict;
use warnings;
-our $VERSION = '0.12';
+our $VERSION = '0.13';
sub new {
my $class = shift;
@@ -89,7 +89,7 @@
}
}
} else {
- die("unknown line: " . $_);
+ die( "unknown line: " . $_ );
}
}
$self->add_string( \%h );
Modified: branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/lib/Module/Install/Msgfmt.pm Thu Jul 9 08:03:27 2009
@@ -5,7 +5,7 @@
use Module::Install::Base ();
use Module::Install::Share;
-our $VERSION = '0.12';
+our $VERSION = '0.13';
our @ISA = 'Module::Install::Base';
sub install_share_with_mofiles {
Modified: branches/upstream/liblocale-msgfmt-perl/current/t/msgfmt.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/t/msgfmt.t?rev=39528&op=diff
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/t/msgfmt.t (original)
+++ branches/upstream/liblocale-msgfmt-perl/current/t/msgfmt.t Thu Jul 9 08:03:27 2009
@@ -17,7 +17,8 @@
sub my_msgfmt {
my ( $fh, $filename ) = File::Temp::tempfile();
close $fh;
- my $in = shift;
+ my $in = shift;
+ utime( undef, undef, $in );
my $fuzzy = 0;
if (shift) {
$fuzzy = 1;
Added: branches/upstream/liblocale-msgfmt-perl/current/t/version.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocale-msgfmt-perl/current/t/version.t?rev=39528&op=file
==============================================================================
--- branches/upstream/liblocale-msgfmt-perl/current/t/version.t (added)
+++ branches/upstream/liblocale-msgfmt-perl/current/t/version.t Thu Jul 9 08:03:27 2009
@@ -1,0 +1,27 @@
+#!perl
+
+use Test::More tests => 2;
+use Locale::Msgfmt;
+use File::Spec;
+
+sub slurp {
+ open F, File::Spec->catfile(@_);
+ my @str = <F>;
+ my $str = join "", @str;
+ close F;
+ return wantarray ? @str : $str;
+}
+
+my @all_bin = slurp("bin", "msgfmt.pl");
+my @all_pm = slurp("lib", "Locale", "Msgfmt.pm");
+my ($pm, $bin);
+foreach(@all_bin) {
+ $_ =~ /^use Locale::Msgfmt (.*);$/;
+ $bin = $1 if($1);
+}
+foreach(@all_pm) {
+ $_ =~ /^our \$VERSION = '(.*)';$/;
+ $pm = $1 if($1);
+}
+is($pm, $Locale::Msgfmt::VERSION);
+is($bin, $pm);
More information about the Pkg-perl-cvs-commits
mailing list