From 03f204185beb19c9d2bce85adabf85998c309024 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Wed, 25 May 2005 02:21:29 +0000 Subject: [PATCH] auto-import perl-Text-Autoformat-1.13-1 on branch devel from perl-Text-Autoformat-1.13-1.src.rpm --- .cvsignore | 2 +- Text-Autoformat-1.12-1.13beta.patch | 139 ---------------------------- filter-provides.sh | 9 ++ perl-Text-Autoformat.spec | 18 ++-- sources | 2 +- 5 files changed, 23 insertions(+), 147 deletions(-) delete mode 100644 Text-Autoformat-1.12-1.13beta.patch create mode 100755 filter-provides.sh diff --git a/.cvsignore b/.cvsignore index 9075364..169544c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -Text-Autoformat-1.12.tar.gz +Text-Autoformat-1.13.tar.gz diff --git a/Text-Autoformat-1.12-1.13beta.patch b/Text-Autoformat-1.12-1.13beta.patch deleted file mode 100644 index caef760..0000000 --- a/Text-Autoformat-1.12-1.13beta.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- lib/Text/Autoformat.pm.orig 2003-05-27 18:34:38.000000000 -0500 -+++ lib/Text/Autoformat.pm 2005-02-09 11:35:36.487236034 -0600 -@@ -2,7 +2,7 @@ - - use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use Carp; - use 5.005; --$VERSION = '1.12'; -+$VERSION = '1.13beta'; - - require Exporter; - -@@ -74,15 +74,23 @@ - return ""; - } - --my $ignore_headers = qr/\A(From\b.*$)?([^:]+:.*$([ \t].*$)*)+\s*\Z/m; -+my $ignore_headers = qr/ -+ \A -+ (?: From \b .* $)? -+ (?: [^:\n]+ : .* \n -+ (?: [ \t] .* \n)* -+ )+ -+ \s* -+ \Z -+ /mx; - my $ignore_indent = qr/^[^\S\n].*(\n[^\S\n].*)*$/; - --sub ignore_headers { $_[0]==1 && /$ignore_headers/ } -+sub ignore_headers { $_[0] && /$ignore_headers/ } - - # BITS OF A TEXT LINE - - my $quotechar = qq{[!#%=|:]}; --my $quotechunk = qq{(?:$quotechar(?![a-z])|[a-z]*>+)}; -+my $quotechunk = qq{(?:$quotechar(?![a-z])|(?:[a-z]\\w*)?>+)}; - my $quoter = qq{(?:(?i)(?:$quotechunk(?:[ \\t]*$quotechunk)*))}; - - my $separator = q/(?:[-_]{2,}|[=#*]{3,}|[+~]{4,})/; -@@ -120,9 +128,11 @@ - $args{break} = break_at('-') unless exists $args{break}; - $args{impfill} = ! exists $args{fill}; - $args{expfill} = $args{fill}; -+ $args{tabspace} = 8 unless exists $args{tabspace}; - $args{renumber} = 1 unless exists $args{renumber}; - $args{autocentre} = 1 unless exists $args{autocentre}; - $args{_centred} = 1 if $args{justify} =~ /cent(er(ed)?|red?)/; -+ $args{all} ||= $args{mail}; - - # SPECIAL IGNORANCE... - if ($args{ignore}) { -@@ -138,13 +148,16 @@ - croak "Expected suboutine reference as value for -ignore option" - if ref $args{ignore} ne 'CODE'; - } -- else { -+ elsif ($args{mail}) { - $args{ignore} = \&ignore_headers; - } -+ else { -+ $args{ignore} = sub{0}; -+ } - - # DETABIFY - my @rawlines = split /\n/, $text; -- use Text::Tabs; -+ use Text::Tabs; $tabstop = $args{tabspace}; - @rawlines = expand(@rawlines); - - # PARSE EACH LINE -@@ -255,11 +268,13 @@ - # SELECT PARAS TO HANDLE - - my $remainder = ""; -- if ($args{all}) { # STOP AT MAIL TERMINATOR -+ if ($args{all}) { # STOP AT MAIL TERMINATOR IF $args{mail} -+ my $lastignored = 1; - for my $index (0..$#paras) { -- local $_ = $paras[$index]{raw}; -- $paras[$index]{ignore} = $args{ignore}($index+1); -- next unless /^--$/; -+ local $_ = $paras[$index]{raw} . "\n"; -+ $lastignored &&= -+ $paras[$index]{ignore} = $args{ignore}($lastignored); -+ next unless $args{mail} && /^--$/; - $remainder = join "\n", map { $_->{raw} } splice @paras, $index; - $remainder .= "\n" unless $remainder =~ /\n\z/; - last; -@@ -513,7 +528,9 @@ - } - - my $abbrev = join '|', qw{ -- etc[.] pp[.] ph[.]?d[.] U[.]S[.] -+ etc[.] pp[.] ph[.]?d[.] -+ (?:[A-Z][A-Za-z]+[.])+ -+ (?:[A-Z][.])(?:[A-Z][.])+ - }; - - my $gen_abbrev = join '|', $abbrev, qw{ -@@ -604,6 +621,7 @@ - } - - package Hang; -+use strict; - - # ROMAN NUMERALS - -@@ -658,6 +676,9 @@ - elsif ($_[1] =~ s#\A($hang)##) { - @vals = { type => 'bul', val => $1 } - } -+ elsif ($_[1] =~ m#\([^\s)]+\s#) { -+ @vals = (); -+ } - else { - local $^W; - my $cut; -@@ -801,6 +822,7 @@ - sub empty { 0 } - - package NullHang; -+use strict; - - sub new { bless {}, $_[0] } - sub stringify { "" } -@@ -1021,6 +1043,14 @@ - C will ignore any paragraph in which I line begins with a - whitespace. - -+One other special case of ignorance is ignoring mail headers and signature. -+This option is specified using the C argument: -+ -+ $tidied_mesg = autoformat($messy_mesg, {mail=>1}); -+ -+Note that the C option automatically implies C. -+ -+ - =head2 Bulleting and (re-)numbering - - Often plaintext will include lists that are either: diff --git a/filter-provides.sh b/filter-provides.sh new file mode 100755 index 0000000..e7444b6 --- /dev/null +++ b/filter-provides.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ -x /usr/lib/rpm/redhat/find-provides ]; then + FINDREQ=/usr/lib/rpm/redhat/find-provides +else + FINDREQ=/usr/lib/rpm/find-provides +fi + +$FINDREQ $* | grep -v 'perl(\(Null\)\?Hang)' diff --git a/perl-Text-Autoformat.spec b/perl-Text-Autoformat.spec index 3f5d536..478f2e4 100644 --- a/perl-Text-Autoformat.spec +++ b/perl-Text-Autoformat.spec @@ -2,14 +2,18 @@ Name: perl-Text-Autoformat Version: 1.13 -Release: 0.3.beta%{?dist} +Release: 1%{?dist} Summary: Text::Autoformat Perl module License: Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Text-Autoformat/ -Source0: http://www.cpan.org/modules/by-module/Text/Text-Autoformat-1.12.tar.gz -# From http://rt.cpan.org/NoAuth/Bug.html?id=8018 -Patch0: Text-Autoformat-1.12-1.13beta.patch +Source0: http://www.cpan.org/modules/by-module/Text/Text-Autoformat-%{version}.tar.gz + +# Filter out perl(Hang) and perl(NullHang) auto-provides. +Source1: filter-provides.sh +%define _use_internal_dependency_generator 0 +%define __find_provides %{SOURCE1} + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(Text::Reform) @@ -27,8 +31,7 @@ The module also supplies a re-entrant, highly configurable replacement for the built-in Perl format() mechanism. %prep -%setup -q -n Text-Autoformat-1.12 -%patch0 -p0 +%setup -q -n Text-Autoformat-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -57,6 +60,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/* %changelog +* Tue May 24 2005 Steven Pritchard 1.13-1 +- Update to 1.13 final. + * Tue May 10 2005 Steven Pritchard 1.13-0.3.beta - Drop Epoch and change Release for Fedora Extras. diff --git a/sources b/sources index 761503b..813f408 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a5a588e7a2d98fc8e8f196db71290dc0 Text-Autoformat-1.12.tar.gz +1a944e3e21e176178bb4f87a6068f041 Text-Autoformat-1.13.tar.gz