[packages/xdelta] Rel 3
arekm
arekm at pld-linux.org
Sat Mar 14 12:44:11 CET 2026
commit 41c02fa00b9bbf8d8a52d0f751622469c7bc305a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Mar 14 12:44:00 2026 +0100
Rel 3
xdelta-gzFile-type.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
xdelta.spec | 13 ++++++-----
2 files changed, 64 insertions(+), 5 deletions(-)
---
diff --git a/xdelta.spec b/xdelta.spec
index ba4b03d..78205ed 100644
--- a/xdelta.spec
+++ b/xdelta.spec
@@ -4,11 +4,11 @@ Summary(pl.UTF-8): XDELTA - system kontroli wersji
Summary(pt_BR.UTF-8): patch e diff para arquivos binários
Name: xdelta
Version: 1.1.4
-Release: 2
-License: GPL
+Release: 3
+License: GPL v2+
Group: Development/Version Control
-#Source0Download: http://code.google.com/p/xdelta/downloads/list
-Source0: http://xdelta.googlecode.com/files/%{name}-%{version}.tar.gz
+#Source0Download: https://github.com/bbidulock/xdelta/releases
+Source0: https://github.com/bbidulock/xdelta/releases/download/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 1b896c01ebf0e353b7e3c3071b05f496
Patch0: %{name}-ac_fixes.patch
Patch1: %{name}-use_sys_getopt.patch
@@ -16,7 +16,8 @@ Patch2: %{name}-am15.patch
Patch3: %{name}-ac25x.patch
Patch4: %{name}-am18.patch
Patch5: unresolved.patch
-URL: http://www.xdelta.org/
+Patch6: %{name}-gzFile-type.patch
+URL: https://github.com/jmacd/xdelta
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: glib-devel >= 1.2.0
@@ -120,6 +121,7 @@ Bibliotecas estáticas para desenvolvimento com xdelta.
%patch -P3 -p1
%patch -P4 -p1
%patch -P5 -p1
+%patch -P6 -p1
%build
%{__libtoolize}
@@ -127,6 +129,7 @@ Bibliotecas estáticas para desenvolvimento com xdelta.
%{__autoconf}
%{__autoheader}
%{__automake}
+CFLAGS="%{rpmcflags} -std=gnu17" \
%configure
%{__make}
diff --git a/xdelta-gzFile-type.patch b/xdelta-gzFile-type.patch
new file mode 100644
index 0000000..f258ebf
--- /dev/null
+++ b/xdelta-gzFile-type.patch
@@ -0,0 +1,56 @@
+Fix type mismatch between FILE* and gzFile in XdFileHandle.
+The 'in' field is used as both FILE* (via fdopen) and gzFile (via gzdopen)
+depending on whether the input is compressed. Modern zlib defines gzFile
+as struct gzFile_s* which is incompatible with FILE*. Change the field
+type to void* and add casts in functions that use it as FILE*.
+Also fix incorrect gzFile* (double pointer) in test/xdeltatest.c.
+
+--- xdelta-1.1.4/xdmain.c.orig 2007-01-28 21:21:11.000000000 +0100
++++ xdelta-1.1.4/xdmain.c 2026-03-14 00:00:00.000000000 +0100
+@@ -178,7 +178,7 @@
+ guint narrow_low;
+ guint narrow_high;
+ guint current_pos;
+- FILE* in;
++ void* in;
+ gboolean (* in_read) (XdFileHandle* handle, void* buf, gint nbyte);
+ gboolean (* in_close) (XdFileHandle* handle);
+ gboolean in_compressed;
+@@ -496,7 +496,7 @@
+ static gboolean
+ xd_fread (XdFileHandle* fh, void* buf, gint nbyte)
+ {
+- return fread (buf, nbyte, 1, fh->in) == 1;
++ return fread (buf, nbyte, 1, (FILE*) fh->in) == 1;
+ }
+
+ static gboolean
+@@ -508,7 +508,7 @@
+ static gboolean
+ xd_frclose (XdFileHandle* fh)
+ {
+- return fclose (fh->in) == 0;
++ return fclose ((FILE*) fh->in) == 0;
+ }
+
+ static gboolean
+@@ -988,7 +988,7 @@
+
+ fh->current_pos = pos + fh->narrow_low;
+
+- if (fseek (fh->in, fh->current_pos, SEEK_SET))
++ if (fseek ((FILE*) fh->in, fh->current_pos, SEEK_SET))
+ {
+ xd_error ("fseek failed: %s\n", g_strerror (errno));
+ return FALSE;
+--- xdelta-1.1.4/test/xdeltatest.c.orig 2007-01-28 21:21:11.000000000 +0100
++++ xdelta-1.1.4/test/xdeltatest.c 2026-03-14 00:00:00.000000000 +0100
+@@ -512,7 +512,7 @@
+ if (zlevel > 0 && starts_with (tp->name, "diff"))
+ {
+ Patch *patch = read_patch (out, & sbuf);
+- gzFile *rewrite = gzopen (out->name, diff_gzargs);
++ gzFile rewrite = gzopen (out->name, diff_gzargs);
+
+ if (! rewrite) fail ();
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xdelta.git/commitdiff/41c02fa00b9bbf8d8a52d0f751622469c7bc305a
More information about the pld-cvs-commit
mailing list