[perl-Hardware-Vhdl-Parser] Fix a FTBFS failure with recent File::Find

Petr Šabata psabata at fedoraproject.org
Mon Mar 2 15:48:06 UTC 2015


commit a12c6e5022159c4b008aace3c66f51f8a6346b92
Author: Petr Šabata <contyk at redhat.com>
Date:   Mon Mar 2 16:48:03 2015 +0100

    Fix a FTBFS failure with recent File::Find
    
    - Fix broken grammar for entity_declaritive_item
    - Modernize the spec
    - Enable tests

 Hardware-Vhdl-Parser-0.12-unreachable.patch | 13 +++++++
 perl-Hardware-Vhdl-Parser.spec              | 54 ++++++++++++++---------------
 2 files changed, 40 insertions(+), 27 deletions(-)
---
diff --git a/Hardware-Vhdl-Parser-0.12-unreachable.patch b/Hardware-Vhdl-Parser-0.12-unreachable.patch
new file mode 100644
index 0000000..6b4375e
--- /dev/null
+++ b/Hardware-Vhdl-Parser-0.12-unreachable.patch
@@ -0,0 +1,13 @@
+diff --git a/Parser.pm b/Parser.pm
+index ddcc82f..90cdb1f 100644
+--- a/Parser.pm
++++ b/Parser.pm
+@@ -461,7 +461,7 @@ passive_process_statement :
+ 	process_statement
+ 
+ entity_declaritive_item : 
+-	| signal_declaration 
++	  signal_declaration
+ 	| constant_declaration 
+ 	| type_declaration 
+ 	| subtype_declaration 
diff --git a/perl-Hardware-Vhdl-Parser.spec b/perl-Hardware-Vhdl-Parser.spec
index f62c477..f0a9821 100644
--- a/perl-Hardware-Vhdl-Parser.spec
+++ b/perl-Hardware-Vhdl-Parser.spec
@@ -1,22 +1,22 @@
 Name:           perl-Hardware-Vhdl-Parser
 Version:        0.12
-Release:        18%{?dist}
+Release:        19%{?dist}
 Summary:        Complete grammar for parsing VHDL code using perl
-
 License:        GPL+ or Artistic
-Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Hardware-Vhdl-Parser/
 Source0:        http://www.cpan.org/authors/id/G/GS/GSLONDON/Hardware-Vhdl-Parser-%{version}.tar.gz
-
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# rt#102452
+Patch0:         Hardware-Vhdl-Parser-0.12-unreachable.patch
 BuildArch:      noarch
-
-BuildRequires:  perl(ExtUtils::MakeMaker)
+# Build
+BuildRequires:  perl
+BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
+# Runtime
 BuildRequires:  perl(Parse::RecDescent)
-
-Requires:       perl(Parse::RecDescent)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
+BuildRequires:  perl(strict)
+BuildRequires:  perl(vars)
+# Tests only
+Requires:       perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
 
 %description
 This module defines the complete grammar needed to parse any VHDL code. By
@@ -25,36 +25,36 @@ which run through VHDL code and perform specific functions.
 
 %prep
 %setup -q -n Hardware-Vhdl-Parser-%{version}
-
-find . -type f | xargs %{__perl} -pi -e 's|#! /bin/perl|#! /usr/bin/perl|'
+%patch0 -p1
+find . -type f | xargs perl -pi -e 's|#!\s*/bin/perl|#!%{__perl}|'
+# rt#102450
+rm -rf Hardware
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
 make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
+make pure_install DESTDIR=%{buildroot}
+rm -f %{buildroot}%{perl_vendorlib}/Hardware/Vhdl/*.pl
+%{_fixperms} %{buildroot}/*
 
-make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
-
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
-%{__rm} -f $RPM_BUILD_ROOT%{perl_vendorlib}//Hardware/Vhdl/*.pl
-
-%{_fixperms} $RPM_BUILD_ROOT/*
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+%check
+make test
 
 %files
-%defattr(-,root,root,-)
 %doc Changes readme.txt test1.vhd
 %doc parser.pl hierarchy.pl
 %{perl_vendorlib}/*
 %{_mandir}/man3/*
 
 %changelog
+* Mon Mar 02 2015 Petr Šabata <contyk at redhat.com> - 0.12-19
+- Fix a FTBFS failure with recent File::Find
+- Fix broken grammar for entity_declaritive_item
+- Modernize the spec
+- Enable tests
+
 * Thu Aug 28 2014 Jitka Plesnikova <jplesnik at redhat.com> - 0.12-18
 - Perl 5.20 rebuild
 


More information about the scm-commits mailing list