psabata pushed to perl-pmtools (master). "Fix the build by patching faqpods to work with perlfaq in vendorlib (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue Aug 25 14:24:07 UTC 2015
From f1d2786da9eca5dc22ecb7eb418a0e466b210d16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk at redhat.com>
Date: Tue, 25 Aug 2015 16:23:22 +0200
Subject: Fix the build by patching faqpods to work with perlfaq in vendorlib
This is needed following the perl-perlfaq subpackaging from perl in F24.
Correct the build time dependency list, too.
diff --git a/perl-pmtools.spec b/perl-pmtools.spec
index 95b91ba..175c649 100644
--- a/perl-pmtools.spec
+++ b/perl-pmtools.spec
@@ -1,19 +1,38 @@
Name: perl-pmtools
Version: 2.0.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: A suite of small programs to help manage Perl modules
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/pmtools/
Source: http://www.cpan.org/authors/id/M/ML/MLFISHER/pmtools-%{version}.tar.gz
+Patch0: pmtools-2.0.0-perlfaq-in-vendorlib.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+BuildRequires: coreutils
+BuildRequires: findutils
+BuildRequires: less
+BuildRequires: make
+BuildRequires: perl
+BuildRequires: perl(Carp)
+BuildRequires: perl(Config)
+BuildRequires: perl(constant) >= 1.01
BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(File::Find)
+BuildRequires: perl(File::Spec)
+BuildRequires: perl(FindBin)
+BuildRequires: perl(Getopt::Long)
+BuildRequires: perl(Getopt::Std)
+BuildRequires: perl(lib)
+BuildRequires: perl(perlfaq)
+BuildRequires: perl(strict)
+BuildRequires: perl(warnings)
BuildRequires: perl(Test::More)
-BuildRequires: less
+BuildRequires: perl(vars)
+BuildRequires: perl(warnings)
%description
This is pmtools -- a suite of small programs to help manage modules.
@@ -28,6 +47,7 @@ Tom Christiansen
%setup -q -n pmtools-%{version}
find . -type f -perm 755 | xargs %{__perl} -pi -e 's{^#!/usr/bin/env perl}{#!%{__perl}}'
chmod -c a-x Changes TODO lib/Devel/Loaded.pm
+%patch0 -p1
%build
@@ -56,6 +76,11 @@ make test
%changelog
+* Tue Aug 25 2015 Petr Šabata <contyk at redhat.com> - 2.0.0-5
+- Fix the build by patching faqpods to work with perlfaq in vendorlib
+ This is needed following the perl-perlfaq subpackaging from perl in F24
+- Correct the build time dependency list, too
+
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/pmtools-2.0.0-perlfaq-in-vendorlib.patch b/pmtools-2.0.0-perlfaq-in-vendorlib.patch
new file mode 100644
index 0000000..afdd4ca
--- /dev/null
+++ b/pmtools-2.0.0-perlfaq-in-vendorlib.patch
@@ -0,0 +1,67 @@
+From 99569b1f5c2dc647ee345028927af8c54cf0ea6d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk at redhat.com>
+Date: Tue, 25 Aug 2015 15:58:57 +0200
+Subject: [PATCH] faqpods: Check for vendorlib perlfaq if core perlfaq isn't
+ available
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fedora 24 introduced the perl-perlfaq package which may replace the core
+perl-perlfaq subpackage, installing its files into vendorlib.
+
+This patch ensures faqpods can still find them. Loosely based on
+basepods.
+
+Signed-off-by: Petr Šabata <contyk at redhat.com>
+---
+ bin/faqpods | 21 +++++++++++++++++++--
+ 1 file changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/bin/faqpods b/bin/faqpods
+index a36f7c1..c1ff4e2 100755
+--- a/bin/faqpods
++++ b/bin/faqpods
+@@ -7,13 +7,27 @@
+ # ------ pragmas
+ use strict;
+ use warnings;
++use Config;
+
+ our $VERSION = '2.0.0';
+
++my $foundcore = undef;
++
+ open(PROG, "$^X -S basepods |") || die "can't fork: $!";
+ while (<PROG>) {
+- print if /perlfaq/;
+-}
++ if (/perlfaq/) {
++ print $_;
++ $foundcore = 1;
++ }
++}
++
++unless ($foundcore) {
++ my $lib = $Config{'vendorlib'};
++ opendir(LIB, $lib) || die "$0: can't opendir $lib: $!\n";
++ while ($_ = readdir(LIB)) {
++ print "$lib/$_\n" if /perlfaq.*\.pod$/;
++ }
++}
+
+ __END__
+
+@@ -29,6 +43,9 @@ directory whose names start in C<perlfaq> will be printed to the standard
+ output, one per line. This is normally used in backticks to produce
+ a list of filenames for other commands.
+
++Alternatively, C<vendorlib> CPAN perlfaq files, if any, are listed in
++case none are supplied by the core installation.
++
+ =head1 EXAMPLES
+
+ $ podgrep typeglob `faqpods`
+--
+2.4.3
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/perl-pmtools.git/commit/?h=master&id=f1d2786da9eca5dc22ecb7eb418a0e466b210d16
More information about the perl-devel
mailing list