# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: Source Filters for Perl Name: perl-Filter Epoch: 2 Version: 1.64 Release: 511.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Filter Source0: https://cpan.metacpan.org/authors/id/R/RU/RURBAN/Filter-%{version}.tar.gz # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc BuildRequires: make BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: sed # Module Runtime BuildRequires: m4 BuildRequires: perl(Carp) BuildRequires: perl(Config) BuildRequires: perl(Exporter) BuildRequires: perl(strict) BuildRequires: perl(warnings) BuildRequires: perl(XSLoader) # Test Suite BuildRequires: perl(Class::XSAccessor) BuildRequires: perl(Cwd) BuildRequires: perl(File::Copy) BuildRequires: perl(FindBin) BuildRequires: perl(lib) BuildRequires: perl(List::MoreUtils) BuildRequires: perl(Perl::MinimumVersion) >= 1.20 BuildRequires: perl(perl5db.pl) BuildRequires: perl(POSIX) BuildRequires: perl(Test::CPAN::Meta) >= 0.12 BuildRequires: perl(Test::Kwalitee) BuildRequires: perl(Test::MinimumVersion) >= 0.008 BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Test::Pod) >= 1.0 BuildRequires: perl(Test::Pod::Coverage) >= 1.04 BuildRequires: perl(Text::CSV_XS) BuildRequires: perl(vars) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: m4 Requires: perl(Carp) # Don't "provide" private Perl libs %{?perl_default_filter} %description This package provides source-level filters for Perl modules. Source filters alter the program text of a module before Perl sees it, much as a C preprocessor alters the source text of a C program before the compiler sees it. %prep %setup -q -n Filter-%{version} # Fix script interpreter sed -i -e 's|^#!/usr/local/bin/perl|#!/usr/bin/perl|' examples/filtdef # Avoid doc-file dependencies chmod -c -x examples/filt{def,uu} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete find %{buildroot} -type f -name '*.bs' -empty -delete %{_fixperms} -c %{buildroot} %check make test IS_MAINTAINER=1 RELEASE_TESTING=1 %files %doc Changes README examples/ %{perl_vendorarch}/Filter/ %{perl_vendorarch}/auto/Filter/ %{_mandir}/man3/Filter::cpp.3* %{_mandir}/man3/Filter::decrypt.3* %{_mandir}/man3/Filter::exec.3* %{_mandir}/man3/Filter::m4.3* %{_mandir}/man3/Filter::sh.3* %{_mandir}/man3/Filter::tee.3* %{_mandir}/man3/Filter::Util::Call.3* %{_mandir}/man3/Filter::Util::Exec.3* %{_mandir}/man3/Filter::Util::perlfilter.3* %changelog * Fri Jun 14 2024 Paul Howarth - 2:1.64-511 - Perl 5.40 rebuild * Fri Jul 14 2023 Paul Howarth - 2:1.64-500 - Perl 5.38 rebuild * Wed Aug 17 2022 Paul Howarth - 2:1.64-1 - Update to 1.64 - Exec: Silence all Windows -Wint-conversion and -Wint-to-pointer-cast warnings * Sun Aug 14 2022 Paul Howarth - 2:1.63-1 - Update to 1.63 - Exec: Really fix USE_ITHREADS (GH#17) with USE_THREADS on Windows; USE_5005THREADS is not defined in older perls, but OLD_PTHREADS_API is * Wed Aug 10 2022 Paul Howarth - 2:1.62-1 - Update to 1.62 - Exec: Compile with USE_THREADS and USE_ITHREADS (GH#17) - Add a make release target * Fri Jun 17 2022 Paul Howarth - 2:1.61-1 - Update to 1.61 - perfilter.pod: Minor improvements (GH#16) - Remove runtime recommends META (GH#14) - "use strict" in all modules, fixes Test::Kwalitee - Add github actions and cirrus CI's - Updated Copyright years * Mon May 30 2022 Paul Howarth - 2:1.60-488 - Perl 5.36 rebuild * Mon May 24 2021 Paul Howarth - 2:1.60-4 - Perl 5.34 rebuild * Wed Aug 5 2020 Paul Howarth - 2:1.60-1 - Update to 1.60 - Update search.cpan.org link to metacpan (GH#10) - Push cwd to @INC for PERL_CORE (GH#11) - Increase t/call.t verbosity on failures (GH#12) * Mon Jun 29 2020 Paul Howarth - 2:1.59-457 - Perl 5.32 rebuild * Sun Jun 2 2019 Paul Howarth - 2:1.59-439 - Perl 5.30 rebuild * Mon Aug 20 2018 Paul Howarth - 2:1.59-1 - Update to 1.59 - Improve tests using FindBin for filter-util.pl (GH#9) - Added new m4 filter (GH#8) - Add int casts, assert on 2GB limitation * Fri Jun 29 2018 Paul Howarth - 2:1.58-416 - Perl 5.28 rebuild * Wed Nov 15 2017 Paul Howarth - 2:1.58-1 - Update to 1.58 - Drop 5.005 support - Switch from DynaLoader to XSLoader (GH#5) - Replace use vars by our (GH#5) - Lazy load Carp only when required (GH#5) - Minor test improvements - Fix v5.8 cast warnings * Wed Jun 14 2017 Paul Howarth - 2:1.57-4 - Perl 5.26 rebuild * Mon Jan 23 2017 Paul Howarth - 2:1.57-1 - Update to 1.57 - Todo the t/exec.t test 2 on cygwin - Fixed/Todo the t/decrypt.t test 7 utf8 failures; skip with non UTF-8 locale * Sun Jan 22 2017 Paul Howarth - 2:1.56-1 - Update to 1.56 - Add binmode to the decrypt/encr,decrypt sample scripts - Add utf8-encoded testcase to t/decrypt.t (CPAN RT#110921); use -C - Stabilized some tests, add diag to sometimes-failing sh tests - Moved filter-util.pl to t/ - Fixed INSTALLDIRS back to site since 5.12 (GH#2) - Fixed exec/sh test races using the same temporary filenames - Reversed the order of entries in the Changes file to latest-first - Added Travis CI - Add upstream workaround for failing t/decrypt.t * Thu Aug 25 2016 Paul Howarth - 2:1.55-366 - BR: perl-devel and perl-generators where available - Simplify find commands using -empty and -delete * Mon Jul 27 2015 Paul Howarth - 2:1.55-1 - Update to 1.55 - Fix t/z_pod-coverage.t with old Test::More (CPAN RT#106090) - Fix t/tee.t + t/order.t race under parallel testing (CPAN RT#105396) - Fix Filter exec refcount, breaking earlier parse exits with __DATA__ (CPAN RT#101668) - Add missing filter_del in exec filter - Add pod for Filter::Util::Call::unimport to fix t/z_pod-coverage.t * Fri Jan 30 2015 Paul Howarth - 2:1.54-1 - Update to 1.54 - Fix some compiler warnings for -Wall (CPAN RT#101587); note that perl5 itself is not yet -pedantic safe, but Filter is * Mon Dec 22 2014 Paul Howarth - 2:1.53-1 - Update to 1.53 - Fix Filter::Util::Call regression from 1.50, for filter_add({}) or filter_add([]); this broke Switch (CPAN RT#101004) * Tue Dec 9 2014 Paul Howarth - 2:1.51-1 - Update to 1.51 - Minor -Wall -Wextra clean-ups (CPAN RT#100742) - Updated Copyright years - Document and warn about its limitations * Wed Sep 17 2014 Paul Howarth - 2:1.50-6 - Perl 5.20 rebuild * Tue Jun 10 2014 Paul Howarth - 1:1.50-1 - Update to 1.50 - Do not re-bless already blessed filter_add arguments into the caller's package (CPAN RT#54452) - t/z_pod-coverage.t: omit empty Filter::decrypt (also fixes CPAN RT#84405) - Fix Perl Compiler detection in Filter::decrypt - Update spec for modern rpmbuild as we're only building for F-18 onwards now - Reinstate kwalitee test * Thu Jul 25 2013 Paul Howarth - 1:1.49-3 - Bump epoch as per Fedora package - Avoid Test::Kwalitee as it tries to verify the module's signature, which will fail if we have to patch Makefile.PL, tests etc. for old distribution support - Add upstream fix to omit empty Filter::decrypt from POD coverage test * Wed Apr 3 2013 Paul Howarth - 1.49-1 - Update to 1.49 - Better fix for test failures with non-english locale (CPAN RT#41285) - Add t/z_*.t meta tests, move Try to t/FilterTry, add POD to Filter::Util::Call, Filter::Util::Exec and generated FilterTry - BR: perl(File::Copy), perl(Perl::MinimumVersion) >= 1.20, perl(Test::CPAN::Meta) >= 0.12, perl(Test::Kwalitee), perl(Test::MinimumVersion) >= 0.008 and perl(Test::Pod::Coverage) >= 1.04 for the newly-added maintainer tests and explicitly run them - Specify version requirement for perl(Test::Pod) - Add patch to remove the need for Test::More::done_testing (CPAN RT#84405) * Mon Apr 1 2013 Paul Howarth - 1.48-1 - Update to 1.48 - Added META records, such as repository, recommends to Makefile.PL * Mon Apr 1 2013 Paul Howarth - 1.47-1 - Update to 1.47 - Fix test failures with non-English locale (CPAN RT#41285) * Fri Mar 29 2013 Paul Howarth - 1.46-1 - Update to 1.46 - Fix PIPE_PID/waitpid broken in exec pipe_read since 5.17.6 (CPAN RT#84292) - Fix Bad NAME in Makefile.PL (CPAN RT#84210) - Fix cpansign MANIFEST failure (CPAN RT#82687) - Work on test failures with non-English locale (CPAN RT#41285) - Skip patching the src for newWarnings style; these are the default - Fix examples/method/Decompress.pm syntax error (CPAN RT#53132) and add usage docs * Tue Jun 19 2012 Paul Howarth - 1.45-1 - Update to 1.45 - Sync perlfilter.pod with core improvements * Mon Jun 18 2012 Paul Howarth - 1.44-1 - Update to 1.44 - Sync t/call.t with core fixes in 2adbc9b6 - Don't need to remove empty directories from the buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorarch} - Use DESTDIR rather than PERL_INSTALL_ROOT - Use %%{_fixperms} macro rather than our own chmod incantation * Wed Feb 22 2012 Paul Howarth - 1.43-1 - Update to 1.43 - Fix more windows tests: http://www.cpantesters.org/cpan/report/9e790a72-6bf5-1014-9f3b-641f296be760 * Tue Feb 21 2012 Paul Howarth - 1.42-1 - Update to 1.42 - Improve t/tee.t test 5 on Windows, which allows read access for all Administrator group members * Sat Feb 18 2012 Paul Howarth - 1.41-1 - Update to 1.41 - Fix tee and all tests to work with Perl 5.14 and higher - PVIO has no IV field anymore, so abuse the empty IoOFP, which is only used for printing, not reading (fixes CPAN RT#56875 and more) - Tested for 5.6.2, 5.8.4, 5.8.5, 5.8.8, 5.8.9, 5.10.1, 5.12.4, 5.14.2, 5.15.7 - Hide example packages from the pause indexer - This release by RURBAN -> update source URL - Add buildreqs for Perl core modules that might be dual-lived * Tue Oct 18 2011 Paul Howarth - 1.39-2 - Fix dist tag for CentOS 6 and Scientific Linux * Sun May 1 2011 Paul Howarth - 1.39-1 - Update to 1.39 - Fix decrypt to work with Perl 5.14 (CPAN RT#67656) * Tue Apr 26 2011 Paul Howarth - 1.38-1 - Update to 1.38 - Bumped all versions to match the distribution version number, as having module versions different from distribution version results in dependency confusion (CPAN RT#67655) - Fix decrypt to work with Perl 5.14 (CPAN RT#67656) - Update the Filter-Simple URL (CPAN RT#49778) - Fix doc-file dependencies - Nobody else likes macros for commands * Wed Sep 16 2009 Paul Howarth - 1.37-1 - Initial RPM package