public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/xschem] rawhide: patch to fix FTBFS on i686
@ 2026-06-30  0:03 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-06-30  0:03 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/xschem
            Branch : rawhide
            Commit : 7943cbaae66b2612f3eb97085f4c52d714656b8e
            Author : Filipe Rosset <filiperosset@fedoraproject.org>
            Date   : 2026-06-29T20:58:27-03:00
            Stats  : +35/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/xschem/c/7943cbaae66b2612f3eb97085f4c52d714656b8e?branch=rawhide

            Log:
            patch to fix FTBFS on i686

Signed-off-by: Filipe Rosset <filiperosset@fedoraproject.org>

---
diff --git a/xschem-cairo-jpg-32bit.patch b/xschem-cairo-jpg-32bit.patch
new file mode 100644
index 0000000..fae509d
--- /dev/null
+++ b/xschem-cairo-jpg-32bit.patch
@@ -0,0 +1,28 @@
+--- a/src/cairo_jpg.c
++++ b/src/cairo_jpg.c
+@@ -153,6 +153,7 @@
+    JSAMPROW row_pointer[1];
+    cairo_surface_t *other = NULL;
+    cairo_t *ctx;
++   unsigned long outsize = 0;
+ 
+    /* check valid input format (must be IMAGE_SURFACE && (ARGB32 || RGB24)) */
+    if (cairo_surface_get_type(sfc) != CAIRO_SURFACE_TYPE_IMAGE ||
+@@ -188,7 +189,7 @@
+    jpeg_create_compress(&cinfo);
+ 
+    /*  set compression parameters */
+-   jpeg_mem_dest(&cinfo, data, len);
++   jpeg_mem_dest(&cinfo, data, &outsize);
+    cinfo.image_width = cairo_image_surface_get_width(sfc);
+    cinfo.image_height = cairo_image_surface_get_height(sfc);
+ #ifdef LIBJPEG_TURBO_VERSION
+@@ -230,6 +231,8 @@
+    jpeg_finish_compress(&cinfo);
+    jpeg_destroy_compress(&cinfo);
+ 
++   *len = outsize;
++
+    /*  destroy temporary image surface (if available) */
+    if (other != NULL)
+       cairo_surface_destroy(sfc);

diff --git a/xschem.spec b/xschem.spec
index ed0d487..c9fc1cc 100644
--- a/xschem.spec
+++ b/xschem.spec
@@ -6,6 +6,7 @@ Summary:        Schematic capture and Netlisting EDA tool
 License:        GPL-2.0-or-later
 URL:            http://repo.hu/projects/xschem
 Source0:        http://repo.hu/projects/xschem/releases/xschem-%{version}.tar.gz
+Patch:          xschem-cairo-jpg-32bit.patch
 
 BuildRequires:  bison
 BuildRequires:  flex
@@ -41,7 +42,12 @@ Documentation for %{name}.
 
 
 %prep
-%autosetup
+%setup -q
+
+# Fix wrong line encoding (CRLF to LF) of C files to apply patches cleanly
+sed -i 's/\r$//' src/cairo_jpg.c
+
+%patch -P 0 -p1
 
 # Fix wrong line encoding (CRLF to LF)
 sed -i 's/\r$//' src/make_sym_lcc.awk

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-30  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-30  0:03 [rpms/xschem] rawhide: patch to fix FTBFS on i686 Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox