diff --git a/cvsps-2.2b1-diff-opts.patch b/cvsps-2.2b1-diff-opts.patch
new file mode 100644
index 0000000..d493cce
--- /dev/null
+++ b/cvsps-2.2b1-diff-opts.patch
@@ -0,0 +1,12 @@
+diff -up cvsps-2.2b1/cvsps.1.orig cvsps-2.2b1/cvsps.1
+--- cvsps-2.2b1/cvsps.1.orig 2009-12-22 21:16:20.000000000 +0200
++++ cvsps-2.2b1/cvsps.1 2009-12-22 21:16:25.000000000 +0200
+@@ -83,7 +83,7 @@ some hacks which are not generally appli
+ disable the use of rlog internally. Note: rlog is
+ required for stable PatchSet numbering. Use with care.
+ .TP
+-.B \-\-diffs\-opts
++.B \-\-diff\-opts
+ send a custom set of options to diff, for example to increase
+ the number of context lines, or change the diff format.
+ .TP
diff --git a/cvsps.spec b/cvsps.spec
index 8f84b60..e869de4 100644
--- a/cvsps.spec
+++ b/cvsps.spec
@@ -2,20 +2,22 @@
Name: cvsps
Version: 2.2
-Release: 0.4.%{prever}%{?dist}
+Release: 0.5.%{prever}%{?dist}
Summary: Patchset tool for CVS
Group: Development/Tools
License: GPL+
URL: http://www.cobite.com/cvsps/
Source0: http://www.cobite.com/cvsps/%{name}-%{version}%{prever}.tar.gz
-# #516083
+# https://bugzilla.redhat.com/516083
Patch0: %{name}-2.2b1-dynamic-logbuf.patch
+Patch1: %{name}-2.2b1-diff-opts.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: zlib-devel
-# Requires cvs only with --no-cvs-direct, but I cannot imagine this dep
-# being a problem on systems where cvsps will be installed...
+# Strictly speaking, requires cvs only with --no-cvs-direct (which is
+# the default as of 2.2b1), but this shouldn't be a problem on systems
+# where cvsps will be installed.
Requires(hint): cvs
%description
@@ -31,11 +33,11 @@ changes were committed 'atomically' to the repository.
%prep
%setup -q -n %{name}-%{version}%{prever}
%patch0 -p1
-sed -i -e 's/diffs\\-opts/diff\\-opts/' cvsps.1
+%patch1 -p1
%build
-CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}
+CFLAGS="$RPM_OPT_FLAGS -DLINUX" make %{?_smp_mflags}
%install
@@ -55,7 +57,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
-* Thu Aug 6 2009 Ville Skyttä - 2.2-0.4.b1
+* Tue Dec 22 2009 Ville Skyttä - 2.2-0.5.b1
+- Build with -DLINUX to fix --cvs-direct on 64-bit platforms (#539765).
+- Use patch instead of sed for man page fixes.
+
+* Thu Aug 6 2009 Ville Skyttä - 2.2-0.4.b1
- Apply David D. Kilzer's dynamic log buffer allocation patch (#516083,
Andreas Schwab).
- Use %%global instead of %%define.
@@ -66,30 +72,30 @@ rm -rf $RPM_BUILD_ROOT
* Tue Feb 24 2009 Fedora Release Engineering - 2.2-0.2.b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-* Sat Jun 14 2008 Ville Skyttä - 2.2-0.1.b1
+* Sat Jun 14 2008 Ville Skyttä - 2.2-0.1.b1
- 2.2b1.
-* Sat Feb 9 2008 Ville Skyttä - 2.1-6
+* Sat Feb 9 2008 Ville Skyttä - 2.1-6
- Change cvs dependency to a Requires(hint).
- Fix typo in man page.
-* Thu Aug 16 2007 Ville Skyttä - 2.1-5
+* Thu Aug 16 2007 Ville Skyttä - 2.1-5
- License: GPL+
-* Tue Aug 29 2006 Ville Skyttä - 2.1-4
+* Tue Aug 29 2006 Ville Skyttä - 2.1-4
- Rebuild.
-* Wed Feb 15 2006 Ville Skyttä - 2.1-3
+* Wed Feb 15 2006 Ville Skyttä - 2.1-3
- Rebuild.
-* Fri May 27 2005 Ville Skyttä - 2.1-2
+* Fri May 27 2005 Ville Skyttä - 2.1-2
- 2.1.
-* Sun Mar 20 2005 Ville Skyttä - 2.0-0.2.rc1
+* Sun Mar 20 2005 Ville Skyttä - 2.0-0.2.rc1
- Drop 0.fdr and Epoch: 0.
-* Sun Sep 14 2003 Ville Skyttä - 0:2.0-0.fdr.0.2.rc1
+* Sun Sep 14 2003 Ville Skyttä - 0:2.0-0.fdr.0.2.rc1
- Remove #---- section markers.
-* Fri Jul 4 2003 Ville Skyttä - 0:2.0-0.fdr.0.1.rc1
+* Fri Jul 4 2003 Ville Skyttä - 0:2.0-0.fdr.0.1.rc1
- First build.