aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2006-04-27 22:17:32 +0800
committerleeym <leeym@FreeBSD.org>2006-04-27 22:17:32 +0800
commita67f629c296e02c2cfe532a36eef9923ddfcbcb6 (patch)
tree98dec49c2e79c05cc3f4c601ef5e48a8121cbfb9
parenta8689f7dc019671c5ad6f6a68ef59fd3e62d1f66 (diff)
downloadfreebsd-ports-gnome-a67f629c296e02c2cfe532a36eef9923ddfcbcb6.tar.gz
freebsd-ports-gnome-a67f629c296e02c2cfe532a36eef9923ddfcbcb6.tar.zst
freebsd-ports-gnome-a67f629c296e02c2cfe532a36eef9923ddfcbcb6.zip
- update to 1.51
- unbreak under old perl (tested under perl 5.005_03, 5.6.2, 5.8.8)
-rw-r--r--textproc/p5-Number-Format/Makefile16
-rw-r--r--textproc/p5-Number-Format/distinfo6
-rw-r--r--textproc/p5-Number-Format/files/patch-Format.pm13
-rw-r--r--textproc/p5-Number-Format/files/patch-t-locale.t11
4 files changed, 40 insertions, 6 deletions
diff --git a/textproc/p5-Number-Format/Makefile b/textproc/p5-Number-Format/Makefile
index fe4610a741f1..7099e00fbfe4 100644
--- a/textproc/p5-Number-Format/Makefile
+++ b/textproc/p5-Number-Format/Makefile
@@ -6,17 +6,27 @@
#
PORTNAME= Number-Format
-PORTVERSION= 1.45
+PORTVERSION= 1.51
CATEGORIES= textproc perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Number
PKGNAMEPREFIX= p5-
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= perl@FreeBSD.org
COMMENT= Perl extension for formatting numbers
PERL_CONFIGURE= yes
MAN3= Number::Format.3
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+post-patch:
+.if ${PERL_LEVEL} < 500800
+ ${PERL} -pi -e '$$_="" if m{5.008}' ${WRKSRC}/Format.pm
+.endif
+.if ${PERL_LEVEL} < 500600
+ ${PERL} -pi -e 's/^our\s+([\$$\@\%]\w+)/use vars qw($$1);$$1/;' ${WRKSRC}/Format.pm
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/textproc/p5-Number-Format/distinfo b/textproc/p5-Number-Format/distinfo
index 826ffee9daf6..53d06dd4553a 100644
--- a/textproc/p5-Number-Format/distinfo
+++ b/textproc/p5-Number-Format/distinfo
@@ -1,3 +1,3 @@
-MD5 (Number-Format-1.45.tar.gz) = 6b349dd339aac5e3acf233a02262a734
-SHA256 (Number-Format-1.45.tar.gz) = a22ab952d287695c76fcc85a71e3fdb667024ddfb5fac687c2bafd9fbeca1a73
-SIZE (Number-Format-1.45.tar.gz) = 14084
+MD5 (Number-Format-1.51.tar.gz) = 0191de22501fa4df10a58a400bd79977
+SHA256 (Number-Format-1.51.tar.gz) = 5b02975dd39379cf472af5f04b6f684fca131a5dce56bbac81d9a469e17edc84
+SIZE (Number-Format-1.51.tar.gz) = 16340
diff --git a/textproc/p5-Number-Format/files/patch-Format.pm b/textproc/p5-Number-Format/files/patch-Format.pm
new file mode 100644
index 000000000000..d09d288091a8
--- /dev/null
+++ b/textproc/p5-Number-Format/files/patch-Format.pm
@@ -0,0 +1,13 @@
+--- Format.pm.orig Thu Apr 27 00:47:37 2006
++++ Format.pm Thu Apr 27 21:59:09 2006
+@@ -643,8 +643,8 @@
+ $decimal .= '0'x($precision - length $decimal);
+
+ # Combine it all back together and return it.
+- $self->{int_curr_symbol} =~ s/\s+$/ /;
+- my $result = ($self->{int_curr_symbol} .
++ $self->{int_curr_symbol} =~ s/\s+$//;
++ my $result = ($self->{int_curr_symbol} . ' ' .
+ ($precision ?
+ join($self->{mon_decimal_point}, $integer, $decimal) :
+ $integer));
diff --git a/textproc/p5-Number-Format/files/patch-t-locale.t b/textproc/p5-Number-Format/files/patch-t-locale.t
new file mode 100644
index 000000000000..26b42393efe8
--- /dev/null
+++ b/textproc/p5-Number-Format/files/patch-t-locale.t
@@ -0,0 +1,11 @@
+--- t/locale.t.orig Thu Apr 27 21:59:24 2006
++++ t/locale.t Thu Apr 27 21:59:32 2006
+@@ -34,7 +34,7 @@
+ }
+ print "ok 2\n";
+
+-setlocale(&LC_ALL, "en_US");
++setlocale(&LC_ALL, "en_US.US-ASCII");
+ my $english = new Number::Format();
+ print "not " unless ($english->format_price(123456.789) eq 'USD 123,456.79');
+ print "ok 3\n";