diff --git a/referencer-1.0.3-x86_64.patch b/referencer-1.0.3-x86_64.patch
new file mode 100644
index 0000000..50912ee
--- /dev/null
+++ b/referencer-1.0.3-x86_64.patch
@@ -0,0 +1,89 @@
+diff -r -U 5 referencer-1.0.3.orig/src/BibData.C referencer-1.0.3/src/BibData.C
+--- referencer-1.0.3.orig/src/BibData.C 2007-04-28 15:29:15.000000000 -0600
++++ referencer-1.0.3/src/BibData.C 2007-05-26 17:21:50.000000000 -0600
+@@ -398,11 +398,11 @@
+ "Retrieving metadata\n\n"
+ "Contacting citebase.org to retrieve metadata for '"
+ + extras_["eprint"] + "'\n";
+
+ Glib::ustring arxivid = extras_["eprint"];
+- unsigned int index = arxivid.find ("v");
++ int index = arxivid.find ("v");
+ if (index != Glib::ustring::npos) {
+ arxivid = arxivid.substr (0, index);
+ }
+
+ arxivid = Glib::Markup::escape_text (arxivid);
+diff -r -U 5 referencer-1.0.3.orig/src/Document.C referencer-1.0.3/src/Document.C
+--- referencer-1.0.3.orig/src/Document.C 2007-04-28 15:29:15.000000000 -0600
++++ referencer-1.0.3/src/Document.C 2007-05-26 17:08:02.000000000 -0600
+@@ -60,11 +60,11 @@
+ // Ideally Chambers06
+ // If not then pap104
+ // If not then Unnamed-5
+ Glib::ustring name;
+
+- unsigned int const maxlen = 14;
++ Glib::ustring::size_type const maxlen = 14;
+
+ if (!bib_.getAuthors().empty ()) {
+ Glib::ustring year = bib_.getYear ();
+ if (year.size() == 4)
+ year = year.substr (2,3);
+@@ -80,11 +80,11 @@
+ name = authors + year;
+ } else if (!filename_.empty ()) {
+ Glib::ustring filename = Gnome::Vfs::unescape_string_for_display (
+ Glib::path_get_basename (filename_));
+
+- unsigned int periodpos = filename.find_last_of (".");
++ int periodpos = filename.find_last_of (".");
+ if (periodpos != std::string::npos) {
+ filename = filename.substr (0, periodpos);
+ }
+
+ name = filename;
+@@ -484,11 +484,11 @@
+ Glib::ustring shortname = olduri->extract_short_name ();
+ std::cerr << "Shortname = " << shortname << "\n";
+ Glib::ustring dirname = olduri->extract_dirname ();
+ std::cerr << "Dirname = " << dirname << "\n";
+
+- unsigned int pos = shortname.rfind (".");
++ int pos = shortname.rfind (".");
+ Glib::ustring extension = "";
+ if (pos != Glib::ustring::npos)
+ extension = shortname.substr (pos, shortname.length() - 1);
+
+ Glib::ustring newfilename = getKey() + extension;
+diff -r -U 5 referencer-1.0.3.orig/src/Utility.C referencer-1.0.3/src/Utility.C
+--- referencer-1.0.3.orig/src/Utility.C 2007-04-28 15:29:15.000000000 -0600
++++ referencer-1.0.3/src/Utility.C 2007-05-26 17:19:02.000000000 -0600
+@@ -228,12 +228,12 @@
+
+
+ std::string escapeBibtexAccents (
+ Glib::ustring target)
+ {
+- std::cerr << "escapeBibtexAccents '" << target << "'\n";
+- for (unsigned int i = 0; i < target.length(); ++i) {
++ //std::cerr << "escapeBibtexAccents '" << target << "'\n";
++ for (Glib::ustring::size_type i = 0; i < target.length(); ++i) {
+ gunichar letter = target[i];
+ std::cerr << (char)letter << "\n";
+ if (letter < 128) {
+ // Rationale: although in general we pass through {,},\ etc to allow
+ // the user to use his own latex-isms, the ampersand has no legitimate
+@@ -288,11 +288,11 @@
+ Glib::ustring separator = Glib::build_filename ("-", "-");
+ separator = separator.substr (1, separator.length() - 2);
+
+ std::vector libparts;
+
+- unsigned int next;
++ int next;
+ while ((next = parent.find (separator)) != Glib::ustring::npos) {
+ Glib::ustring chunk = parent.substr (0, next);
+ libparts.push_back (chunk);
+ parent = parent.substr (next + 1, parent.length() - 1);
+ }
diff --git a/referencer.spec b/referencer.spec
index d084db1..71a53f8 100644
--- a/referencer.spec
+++ b/referencer.spec
@@ -1,11 +1,12 @@
Name: referencer
Summary: A document organiser and bibliography manager for Gnome
Version: 1.0.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: Applications/System
License: GPL
URL: http://icculus.org/referencer
Source0: http://icculus.org/referencer/downloads/%{name}-%{version}.tar.gz
+Patch0: referencer-1.0.3-x86_64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: poppler-devel libgnomeuimm26-devel
BuildRequires: boost-devel gcc-c++
@@ -20,6 +21,7 @@ import from BibTeX, Reference Manager and EndNote, and tagging.
%prep
%setup -q
+%patch0 -p1 -b .x64
%build
%configure --disable-update-mime-database
@@ -68,6 +70,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_datadir}/referencer/
%changelog
+* Wed May 30 2007 Rick L Vinyard Jr - 1.0.3-3
+- Fix the crash on x86_64
+
* Sat May 05 2007 Deji Akingunola - 1.0.3-2
- Preserve timestamp (from package review)