[packages/fltk2] - fixed build with cairo

qboosh qboosh at pld-linux.org
Tue May 12 19:24:58 CEST 2026


commit ec9cd1f9b99131ab144e5d65524a4c9523a4f417
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue May 12 19:24:24 2026 +0200

    - fixed build with cairo

 fltk2-cairo.patch | 19 +++++++++++++++++++
 fltk2.spec        |  4 +++-
 2 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/fltk2.spec b/fltk2.spec
index 1de23ee..df8d78d 100644
--- a/fltk2.spec
+++ b/fltk2.spec
@@ -1,6 +1,6 @@
 #
 # Conditional build:
-%bcond_with	cairo	# cairo support
+%bcond_without	cairo	# cairo support
 
 Summary:	Fast Light Tool Kit 2.x
 Summary(pl.UTF-8):	FLTK - "lekki" X11 toolkit wersja 2.x
@@ -21,6 +21,7 @@ Patch2:		%{name}-types.patch
 Patch3:		%{name}-c++.patch
 Patch4:		%{name}-link.patch
 Patch5:		%{name}-config.patch
+Patch6:		%{name}-cairo.patch
 URL:		https://github.com/fltk/fltk-legacy
 BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	OpenGL-devel
@@ -104,6 +105,7 @@ Bibliotecas estáticas para o FLTK2.
 %patch -P3 -p1
 %patch -P4 -p1
 %patch -P5 -p1
+%patch -P6 -p1
 
 %build
 %{__autoconf}
diff --git a/fltk2-cairo.patch b/fltk2-cairo.patch
new file mode 100644
index 0000000..3e0894e
--- /dev/null
+++ b/fltk2-cairo.patch
@@ -0,0 +1,19 @@
+--- fltk-legacy-c2171d83a31ae533e37bdbb7458c29041c4d62c0/src/addarc.cxx.orig	2026-05-12 19:19:32.936484067 +0200
++++ fltk-legacy-c2171d83a31ae533e37bdbb7458c29041c4d62c0/src/addarc.cxx	2026-05-12 19:19:46.096412774 +0200
+@@ -36,6 +36,8 @@
+ #include <fltk/math.h>
+ using namespace fltk;
+ 
++extern void fl_set_cairo_ctm();
++
+ /*!
+   Add a series of points to the current path on the arc of an
+   ellipse. The ellipse in inscribed in the l,t,w,h rectangle, and the
+@@ -48,7 +50,6 @@ void fltk::addarc(float l, float t, floa
+ {
+ #if USE_CAIRO
+   cairo_save(cr);
+-  extern void fl_set_cairo_ctm();
+   fl_set_cairo_ctm();
+   float x = l+w/2;
+   float y = t+h/2;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fltk2.git/commitdiff/48d686a22635e0b5cb3720685ef5963f924a3096



More information about the pld-cvs-commit mailing list