From 25a81d9ee4f5b8ccb82a239d9bee73c4c7a5eadb Mon Sep 17 00:00:00 2001
From: "Colin B. Macdonald" <cbm(a)m.fsf.org>
Date: Wed, 4 Jan 2017 16:04:49 -0800
Subject: Patch from upstream for s390 arch (#1400921)
---
perl-Text-BibTeX-fix-format-code.patch | 27 +++++++++++++++++++++++++++
perl-Text-BibTeX.spec | 8 +++++++-
2 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 perl-Text-BibTeX-fix-format-code.patch
diff --git a/perl-Text-BibTeX-fix-format-code.patch
b/perl-Text-BibTeX-fix-format-code.patch
new file mode 100644
index 0000000..fde2829
--- /dev/null
+++ b/perl-Text-BibTeX-fix-format-code.patch
@@ -0,0 +1,27 @@
+diff --git a/btparse/src/format_name.c b/btparse/src/format_name.c
+index 3e8a891..bdcd5ae 100644
+--- a/btparse/src/format_name.c
++++ b/btparse/src/format_name.c
+@@ -96,6 +96,9 @@ bt_create_name_format (char * parts, boolean abbrev_first)
+ int part_pos[BT_MAX_NAMEPARTS];
+ int i;
+
++ for (i = 0; i < BT_MAX_NAMEPARTS; i++)
++ part_pos[i] = -2;
++
+ /*
+ * Check that the part list (a string with one letter -- f, v, l, or j
+ * -- for each part is valid: no longer than four characters, and no
+@@ -905,6 +908,12 @@ dump_format (bt_name_format * format)
+
+ for (i = 0; i < BT_MAX_NAMEPARTS; i++)
+ {
++ int j;
++ for (j = 0; j < format->num_parts; j++)
++ if (i == format->parts[j])
++ break;
++ if (j == format->num_parts) continue;
++
+ printf (" %-5s: pre-part=%p (%s), post-part=%p (%s)\n",
+ nameparts[i],
+ format->pre_part[i], format->pre_part[i],
diff --git a/perl-Text-BibTeX.spec b/perl-Text-BibTeX.spec
index 87db8db..3dd81ff 100644
--- a/perl-Text-BibTeX.spec
+++ b/perl-Text-BibTeX.spec
@@ -1,11 +1,13 @@
Name: perl-Text-BibTeX
Version: 0.77
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Interface to read and parse BibTeX files
License: GPL+ or Artistic
Group: Development/Libraries
URL:
http://search.cpan.org/dist/Text-BibTeX/
Source0:
http://www.cpan.org/authors/id/A/AM/AMBS/Text-BibTeX-%{version}.tar.gz
+# from upstream:
https://github.com/ambs/Text-BibTeX/commit/af90c47efe98899958ab088f5ee4aa...
+Patch0: %{name}-fix-format-code.patch
BuildRequires: chrpath
BuildRequires: coreutils
BuildRequires: findutils
@@ -53,6 +55,7 @@ entries, as well as other miscellaneous functions.
%prep
%setup -q -n Text-BibTeX-%{version}
+%patch0 -p1
sed -ri 's#/usr/local/bin/perl5?#%{__perl}#' scripts/* examples/*
chmod a-x scripts/* examples/*
@@ -79,6 +82,9 @@ chrpath -d $RPM_BUILD_ROOT%{_bindir}/*
%{_libdir}/*.so
%changelog
+* Wed Jan 04 2017 Colin B. Macdonald <cbm(a)m.fsf.org> - 0.77-2
+- Patch from upstream for s390 arch (#1400921)
+
* Mon Oct 17 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 0.77-1
- 0.77 bump
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Text-BibTeX.git/commit/?h=master&...