Allow empty cflags
This commit is contained in:
parent
ee1dc615d4
commit
0d8b384542
44
ExtUtils-PkgConfig-1.12-Empty-cflags-are-valid-cflags.patch
Normal file
44
ExtUtils-PkgConfig-1.12-Empty-cflags-are-valid-cflags.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From be149af1735ba52aefd85d6d318b11e45c3244b5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Mon, 22 Jul 2013 09:32:29 +0200
|
||||
Subject: [PATCH] Empty cflags are valid cflags
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
ExtUtils::PkgConfig-find() croaked on emptry cflags:
|
||||
|
||||
$ pkg-config --cflags 'libffi >= 3.0.0'| hexdump -C
|
||||
00000000 0a |.|
|
||||
00000001
|
||||
$ perl -MData::Dumper -MExtUtils::PkgConfig -e 'print
|
||||
Dumper(ExtUtils::PkgConfig->find(q{libffi}))'
|
||||
*** can't find cflags for "libffi"
|
||||
*** is it properly installed and available in PKG_CONFIG_PATH?
|
||||
at -e line 1.
|
||||
|
||||
That's wrong. Empty string cflags are valid cflafs too.
|
||||
|
||||
<https://rt.cpan.org/Public/Bug/Display.html?id=84026>
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
lib/ExtUtils/PkgConfig.pm | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/ExtUtils/PkgConfig.pm b/lib/ExtUtils/PkgConfig.pm
|
||||
index 075d8dc..0f68256 100644
|
||||
--- a/lib/ExtUtils/PkgConfig.pm
|
||||
+++ b/lib/ExtUtils/PkgConfig.pm
|
||||
@@ -129,7 +129,7 @@ sub find {
|
||||
$data{$what} =~ s/[\015\012]+$//;
|
||||
croak "*** can't find $what for \"$data{pkg}\"\n"
|
||||
. "*** is it properly installed and available in PKG_CONFIG_PATH?\n"
|
||||
- unless $data{$what};
|
||||
+ unless defined $data{$what};
|
||||
}
|
||||
return %data;
|
||||
}
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,12 +1,14 @@
|
||||
Name: perl-ExtUtils-PkgConfig
|
||||
Version: 1.12
|
||||
Release: 15%{?dist}
|
||||
Release: 16%{?dist}
|
||||
Summary: Simplistic interface to pkg-config
|
||||
|
||||
Group: Development/Libraries
|
||||
License: LGPLv2+
|
||||
URL: http://search.cpan.org/dist/ExtUtils-PkgConfig/
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/T/TS/TSCH/ExtUtils-PkgConfig-%{version}.tar.gz
|
||||
# Allow empty cflags, CPAN RT#84026
|
||||
Patch0: ExtUtils-PkgConfig-1.12-Empty-cflags-are-valid-cflags.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildArch: noarch
|
||||
@ -28,6 +30,7 @@ that you would've written yourself.
|
||||
|
||||
%prep
|
||||
%setup -q -n ExtUtils-PkgConfig-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -59,6 +62,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 22 2013 Petr Pisar <ppisar@redhat.com> - 1.12-16
|
||||
- Allow empty cflags (CPAN RT#84026)
|
||||
|
||||
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 1.12-15
|
||||
- Perl 5.18 rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user