diff --git a/.cvsignore b/.cvsignore index e69de29..565535a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +Devel-Size-0.64.tar.gz diff --git a/patch_fix_tests.txt b/patch_fix_tests.txt new file mode 100644 index 0000000..56e2321 --- /dev/null +++ b/patch_fix_tests.txt @@ -0,0 +1,24 @@ +diff -ruN Devel-Size-0.64/t/basic.t Devel-Size-0.64_a/t/basic.t +--- Devel-Size-0.64/t/basic.t 2004-11-27 22:40:31.000000000 +0100 ++++ Devel-Size-0.64_a/t/basic.t 2006-09-09 18:49:12.000000000 +0200 +@@ -24,17 +24,17 @@ + %foo = (a => 1, b => 2); + + my $x = "A string"; +-my $y = "A longer string"; ++my $y = "A much much longer string"; + if (size($x) < size($y)) { + print "ok 2\n"; + } else { +- print "not ok 2\n"; ++ print "not ok 2 # " . size($x) . " not < than " . size($y) . "\n"; + } + + if (total_size($x) < total_size($y)) { + print "ok 3\n"; + } else { +- print "not ok 3\n"; ++ print "not ok 3 # " . total_size($x) . " not < than " . total_size($y) . "\n"; + } + + my @x = (1..4); diff --git a/perl-Devel-Size.spec b/perl-Devel-Size.spec new file mode 100644 index 0000000..48708fa --- /dev/null +++ b/perl-Devel-Size.spec @@ -0,0 +1,59 @@ +Name: perl-Devel-Size +Version: 0.64 +Release: 1%{?dist} +Summary: Perl extension for finding the memory usage of Perl variables +License: GPL or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/Devel-Size/ + +Source0: http://www.cpan.org/authors/id/D/DS/DSUGAL/Devel-Size-%{version}.tar.gz +# see: http://rt.cpan.org/Public/Bug/Display.html?id=21404 +Patch0: http://rt.cpan.org/Ticket/Attachment/239561/101363/patch_fix_tests.txt + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description +This module figures out the real sizes of Perl variables in bytes. Call +functions with a reference to the variable you want the size of. If the +variable is a plain scalar it returns the size of the scalar. If the +variable is a hash or an array, use a reference when calling. + +%prep +%setup -q -n Devel-Size-%{version} +%patch0 -p1 + +# fix permissions.... +find . -type f -exec chmod -x {} \; + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} + +make pure_install PERL_INSTALL_ROOT=%{buildroot} + +find %{buildroot} -type f -name .packlist -exec rm -f {} \; +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; + +%{_fixperms} %{buildroot}/* + +%check +make test + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc Changes +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/Devel* +%{_mandir}/man3/* + +%changelog +* Wed Aug 16 2006 Chris Weyl 0.64-1 +- Specfile autogenerated by cpanspec 1.68. diff --git a/sources b/sources index e69de29..e74f7d1 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d200be2102275c77e2e3bb18ac6914b4 Devel-Size-0.64.tar.gz