[perl-Date-Pcalc] Fix boolean definition
Petr Pisar
ppisar at fedoraproject.org
Tue Jun 12 11:51:24 UTC 2012
commit 93359c573171236993454803eb31352f8fc97998
Author: Petr Písař <ppisar at redhat.com>
Date: Tue Jun 12 13:50:08 2012 +0200
Fix boolean definition
Date-Pcalc-6.1-boolean.patch | 25 +++++++++++++++++++++++++
perl-Date-Pcalc.spec | 6 +++++-
2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/Date-Pcalc-6.1-boolean.patch b/Date-Pcalc-6.1-boolean.patch
new file mode 100644
index 0000000..95f1cf9
--- /dev/null
+++ b/Date-Pcalc-6.1-boolean.patch
@@ -0,0 +1,25 @@
+<https://rt.cpan.org/Public/Bug/Display.html?id=76442>
+
+It has been predicted that D:C:XS would be affected but I did not read
+it. The following patch works:
+
+--- src/C_XS/ToolBox.h 2009-10-16
+23:47:55.000000000 +0200
++++ src/C_XS/ToolBox.h 2012-04-09
+14:27:56.116897462 +0200
+@@ -93,7 +93,10 @@
+ #elif PERL_DARWIN
+ #define boolean bool
+ #else
+- typedef enum { false = FALSE, true = TRUE } boolean;
++ typedef int boolean;
++ #ifndef I_STDBOOL
++ enum { false, true };
++ #endif
+ #endif
+ #endif
+
+
+
+Tested with v5.15.2-436-gbd31be4 and v5.15.9-123-gbd9cbc4
+
diff --git a/perl-Date-Pcalc.spec b/perl-Date-Pcalc.spec
index 45a7c60..c27f538 100644
--- a/perl-Date-Pcalc.spec
+++ b/perl-Date-Pcalc.spec
@@ -6,6 +6,8 @@ License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Date-Pcalc/
Source0: http://search.cpan.org/CPAN/authors/id/S/ST/STBEY/Date-Pcalc-%{version}.tar.gz
+# Perl 5.16 compatibility, CPAN RT #76442
+Patch0: Date-Pcalc-6.1-boolean.patch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildRequires: %{_bindir}/iconv
@@ -21,9 +23,10 @@ DIN 1355 and, to some extent, ISO 8601 (where applicable).
%prep
%setup -q -n Date-Pcalc-%{version}
+%patch0 -p0
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__perl} Makefile.PL INSTALLDIRS=vendor </dev/null
make %{?_smp_mflags}
%install
@@ -50,6 +53,7 @@ make test
%changelog
* Tue Jun 12 2012 Petr Pisar <ppisar at redhat.com> - 6.1-4
- Perl 5.16 rebuild
+- Fix boolean definition (RT #76442)
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list