[packages/cairo] - updated to 1.18.0, now uses meson; egl,gl,glesv2,glesv3,glx,qt,vg,xml backends are gone

qboosh qboosh at pld-linux.org
Mon Sep 25 07:51:30 CEST 2023


commit 170c82762a1fccbeb64c31f392243bb58206a323
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Sep 25 06:26:47 2023 +0200

    - updated to 1.18.0, now uses meson; egl,gl,glesv2,glesv3,glx,qt,vg,xml backends are gone

 cairo-composite_color_glyphs.patch                 |  56 -------
 ...one_MM_Var-instead-of-free-when-available.patch |  30 ----
 cairo-gobject-deps.patch                           |  16 --
 cairo-link.patch                                   |  12 --
 cairo.spec                                         | 176 +++++----------------
 5 files changed, 42 insertions(+), 248 deletions(-)
---
diff --git a/cairo.spec b/cairo.spec
index ea6a9ce..240b534 100644
--- a/cairo.spec
+++ b/cairo.spec
@@ -1,68 +1,35 @@
 #
 # Conditional build:
 %bcond_without	apidocs		# disable gtk-doc
-%bcond_with	cogl		# Cogl surface backend [incompatible with cogl 1.12.x]
-%bcond_with	directfb	# DirectFB surface backend
-%bcond_with	drm		# DRM surface backend
-%bcond_with	opengl		# OpenGL surface backend, http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-May/024387.html
-%bcond_with	glesv2		# OpenGLESv2 surface backend (mutually exclusive with gl and glesv3)
-%bcond_with	glesv3		# OpenGLESv3 surface backend (mutually exclusive with gl and glesv2)
-%bcond_with	openvg		# OpenVG surface backend
 %bcond_without	pdf		# PDF surface backend
 %bcond_without	ps		# PS surface backend
-%bcond_without	svg		# SVG surface backend (disable to boostrap librsvg)
-%bcond_with	qt		# Qt surface backend [expects qt_draw_glyphs() API in Qt 4.7+]
-%if "%{pld_release}" == "ac"
-%bcond_with	xcb		# XCB backend
-%else
+%bcond_without	svg		# SVG surface backend
 %bcond_without	xcb		# XCB backend
-%endif
 %bcond_with	tests		# perform tests (can fail due to out of memory)
 
-%if %{with glesv2} || %{with glesv3}
-%undefine	with_opengl
-%endif
-%if %{with glesv3}
-%undefine	with_glesv2
-%endif
 Summary:	Cairo - multi-platform 2D graphics library
 Summary(pl.UTF-8):	Cairo - wieloplatformowa biblioteka graficzna 2D
 Name:		cairo
-Version:	1.16.0
-Release:	5
+Version:	1.18.0
+Release:	1
 License:	LGPL v2.1 or MPL v1.1
 Group:		Libraries
 Source0:	https://www.cairographics.org/releases/%{name}-%{version}.tar.xz
-# Source0-md5:	f19e0353828269c22bd72e271243a552
-Patch0:		%{name}-link.patch
-Patch1:		%{name}-gobject-deps.patch
-Patch2:		%{name}-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
-Patch3:		%{name}-composite_color_glyphs.patch
+# Source0-md5:	3f0685fbadc530606f965b9645bb51d9
 URL:		https://www.cairographics.org/
-%{?with_directfb:BuildRequires:	DirectFB-devel}
-%if %{with opengl} || %{with glesv2} || %{with glesv3} || %{with openvg}
-BuildRequires:	EGL-devel >= 1.1
-%endif
-%if %{with opengl} || %{with openvg}
-BuildRequires:	OpenGL-GLX-devel
-%endif
-%{?with_opengl:BuildRequires:	OpenGL-devel}
-%{?with_glesv2:BuildRequires:	OpenGLESv2-devel >= 2.0}
-%{?with_glesv3:BuildRequires:	OpenGLESv3-devel >= 3.0}
-%{?with_openvg:BuildRequires:	OpenVG-devel}
-%{?with_qt:BuildRequires:	QtGui-devel >= 4.4.0}
-BuildRequires:	autoconf >= 2.63
-BuildRequires:	automake >= 1:1.11
 BuildRequires:	binutils-devel
-%{?with_cogl:BuildRequires:	cogl-devel}
 BuildRequires:	fontconfig-devel >= 2.2.95
-BuildRequires:	freetype-devel >= 1:2.5.1
+%if %{with tests}
+# ttx
+BuildRequires:	fonttools
+%endif
+# pkgconfig(freetype2) >= 25.0.19
+BuildRequires:	freetype-devel >= 1:2.13.0
 BuildRequires:	glib2-devel >= 1:2.14
 %if %{with svg} && %{with tests}
 BuildRequires:	gtk+2-devel >= 1:2.0
 %endif
 %{?with_apidocs:BuildRequires:	gtk-doc >= 1.15}
-%{?with_drm:BuildRequires:	libdrm-devel >= 2.4}
 BuildRequires:	libpng-devel >= 2:1.4.0
 %if %{with svg} && %{with tests}
 BuildRequires:	librsvg-devel >= 2.35.0
@@ -70,34 +37,28 @@ BuildRequires:	librsvg-devel >= 2.35.0
 %if %{with ps} && %{with tests}
 BuildRequires:	libspectre-devel >= 0.2.0
 %endif
-BuildRequires:	libtool >= 2:2.2
 %{?with_xcb:BuildRequires:	libxcb-devel >= 1.6}
 BuildRequires:	lzo-devel >= 2
-BuildRequires:	pixman-devel >= 0.30.0
+BuildRequires:	meson >= 0.59.0
+BuildRequires:	ninja >= 1.5
+BuildRequires:	pixman-devel >= 0.36.0
 BuildRequires:	pkgconfig >= 1:0.18
 %if %{with pdf} && %{with tests}
 BuildRequires:	poppler-glib-devel >= 0.17.4
 %endif
 BuildRequires:	rpm >= 4.4.9-56
+BuildRequires:	rpmbuild(macros) >= 1.736
 BuildRequires:	sed >= 4.0
 BuildRequires:	tar >= 1:1.22
-%{?with_drm:BuildRequires:	udev-devel >= 1:136}
-%if "%{pld_release}" == "ac"
-BuildRequires:	xrender-devel >= 0.6
-%else
 BuildRequires:	xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
 BuildRequires:	xorg-lib-libXext-devel
 BuildRequires:	xorg-lib-libXrender-devel >= 0.6
-%endif
 BuildRequires:	xz
 BuildRequires:	zlib-devel
-%{?with_qt:Requires:	QtGui >= 4.4.0}
 Requires:	fontconfig-libs >= 2.2.95
-Requires:	freetype >= 1:2.5.1
-%{?with_drm:Requires:	libdrm >= 2.4}
+Requires:	freetype >= 1:2.13.0
 %{?with_xcb:Requires:	libxcb >= 1.6}
-Requires:	pixman >= 0.30.0
-%{?with_drm:Requires:	udev-libs >= 1:136}
+Requires:	pixman >= 0.36.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -133,31 +94,15 @@ Summary:	Development files for Cairo library
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki Cairo
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-%{?with_directfb:Requires:	DirectFB-devel}
-%if %{with opengl} || %{with glesv2} || %{with openvg}
-Requires:	EGL-devel >= 1.1
-%endif
-%{?with_opengl:Requires:	OpenGL-devel}
-%{?with_glesv2:Requires:	OpenGLESv2-devel >= 2.0}
-%{?with_glesv3:Requires:	OpenGLESv3-devel >= 3.0}
-%{?with_openvg:Requires:	OpenVG-devel}
-%{?with_qt:Requires:	QtGui-devel >= 4.4.0}
-%{?with_cogl:Requires:	cogl-devel}
 Requires:	fontconfig-devel >= 2.2.95
-Requires:	freetype-devel >= 1:2.5.1
-%{?with_drm:Requires:	libdrm-devel >= 2.4}
+Requires:	freetype-devel >= 1:2.13.0
 Requires:	libpng-devel >= 2:1.4.0
 %{?with_xcb:Requires:	libxcb-devel >= 1.6}
 Requires:	lzo-devel >= 2
-Requires:	pixman-devel >= 0.30.0
-%{?with_drm:Requires:	udev-devel >= 1:136}
-%if "%{pld_release}" == "ac"
-Requires:	xrender-devel >= 0.6
-%else
+Requires:	pixman-devel >= 0.36.0
 Requires:	xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
 Requires:	xorg-lib-libXext-devel
 Requires:	xorg-lib-libXrender-devel >= 0.6
-%endif
 Requires:	zlib-devel
 
 %description devel
@@ -245,59 +190,36 @@ Dokumentacja API Cairo.
 
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
 
-%if %{without tests}
-%{__sed} -i -e '/SUBDIRS += boilerplate test perf/d' Makefile.am
-%endif
+#%if %{without tests}
+#%{__sed} -i -e '/SUBDIRS += boilerplate test perf/d' Makefile.am
+#%endif
 
 %build
-%{?with_apidocs:%{__gtkdocize}}
-%{__libtoolize}
-%{__aclocal} -I build
-%{__autoheader}
-%{__autoconf}
-%{__automake}
-%configure \
-	--disable-silent-rules \
-	%{__enable_disable cogl} \
-	%{__enable_disable directfb} \
-	%{__enable_disable opengl gl} \
-	%{__enable_disable glesv2} \
-	%{__enable_disable glesv3} \
-	%{__enable_disable apidocs gtk-doc} \
-	%{__enable_disable pdf} \
-	%{__enable_disable ps} \
-	%{__enable_disable qt} \
-	%{__enable_disable svg} \
-	%{__enable_disable openvg vg} \
-	%{__enable_disable xcb} \
-	--enable-ft \
-	--enable-png \
-	--enable-tee \
-	--enable-xml \
-	--with-html-dir=%{_gtkdocdir}
-
-%{__make}
-%{?with_tests:%{__make} check}
+%meson build \
+	-Dfontconfig=enabled \
+	-Dfreetype=enabled \
+	-Dgtk2-utils=enabled \
+	-Dgtk_doc=%{__true_false apidocs} \
+	-Dpng=enabled \
+	-Dspectre=%{__enabled_disabled ps} \
+	-Dtee=enabled \
+	-Dtests=disabled \
+	-Dxcb=%{__enabled_disabled xcb} \
+	-Dxlib=enabled \
+	-Dzlib=enabled
+
+%ninja_build -C build
+
+%{?with_tests:%ninja_test -C build}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+%ninja_install -C build
 
-# obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libcairo*.la
 # LD_PRELOADable library
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a}
-# LD_PRELOADable modules(?)
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/cairo-{fdr,sphinx}.{la,a}
-
-%{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-{fdr,trace}.a
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -311,7 +233,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 # COPYING contains only notes, not LGPL/MPL texts
-%doc AUTHORS COPYING ChangeLog NEWS README
+%doc AUTHORS BUGS COPYING NEWS README.md
 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
@@ -324,31 +246,19 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/cairo
 %exclude %{_includedir}/cairo/cairo-gobject.h
 %{_pkgconfigdir}/cairo.pc
-%{?with_directfb:%{_pkgconfigdir}/cairo-directfb.pc}
-%if %{with opengl} || %{with glesv2} || %{with glesv3} || %{with openvg}
-%{_pkgconfigdir}/cairo-egl.pc
-%endif
 %{_pkgconfigdir}/cairo-fc.pc
 %{_pkgconfigdir}/cairo-ft.pc
-%{?with_opengl:%{_pkgconfigdir}/cairo-gl.pc}
-%{?with_glesv2:%{_pkgconfigdir}/cairo-glesv2.pc}
-%{?with_glesv3:%{_pkgconfigdir}/cairo-glesv3.pc}
-%if %{with opengl} || %{with openvg}
-%{_pkgconfigdir}/cairo-glx.pc
-%endif
 %{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc}
 %{_pkgconfigdir}/cairo-png.pc
 %{?with_ps:%{_pkgconfigdir}/cairo-ps.pc}
-%{?with_qt:%{_pkgconfigdir}/cairo-qt.pc}
 %{_pkgconfigdir}/cairo-script.pc
+%{_pkgconfigdir}/cairo-script-interpreter.pc
 %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
 %{_pkgconfigdir}/cairo-tee.pc
-%{?with_openvg:%{_pkgconfigdir}/cairo-vg.pc}
 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
 %{_pkgconfigdir}/cairo-xlib.pc
 %{_pkgconfigdir}/cairo-xlib-xrender.pc
-%{_pkgconfigdir}/cairo-xml.pc
 
 %files static
 %defattr(644,root,root,755)
@@ -372,11 +282,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files trace
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/cairo-sphinx
 %attr(755,root,root) %{_bindir}/cairo-trace
 %dir %{_libdir}/cairo
-%attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so*
-%attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so*
+%attr(755,root,root) %{_libdir}/cairo/libcairo-fdr.so
 %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
 
 %if %{with apidocs}
diff --git a/cairo-composite_color_glyphs.patch b/cairo-composite_color_glyphs.patch
deleted file mode 100644
index fe8860e..0000000
--- a/cairo-composite_color_glyphs.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 79ad01724161502e8d9d2bd384ff1f0174e5df6e Mon Sep 17 00:00:00 2001
-From: Matthias Clasen <mclasen at redhat.com>
-Date: Thu, 30 May 2019 07:30:55 -0400
-Subject: [PATCH] Fix a thinko in composite_color_glyphs
-
-We can't just move around the contents of the
-passed-in string, we need to make a copy. This
-was showing up as memory corruption in pango.
-
-See https://gitlab.gnome.org/GNOME/pango/issues/346
----
- src/cairo-surface.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/cairo-surface.c b/src/cairo-surface.c
-index c30f84087..e112b660a 100644
---- a/src/cairo-surface.c
-+++ b/src/cairo-surface.c
-@@ -2820,6 +2820,7 @@ _cairo_surface_show_text_glyphs (cairo_surface_t	    *surface,
- 				 const cairo_clip_t		*clip)
- {
-     cairo_int_status_t status;
-+    char *utf8_copy = NULL;
- 
-     TRACE ((stderr, "%s\n", __FUNCTION__));
-     if (unlikely (surface->status))
-@@ -2847,6 +2848,10 @@ _cairo_surface_show_text_glyphs (cairo_surface_t	    *surface,
-     status = CAIRO_INT_STATUS_UNSUPPORTED;
- 
-     if (_cairo_scaled_font_has_color_glyphs (scaled_font)) {
-+        utf8_copy = malloc (sizeof (char) * utf8_len);
-+        memcpy (utf8_copy, utf8, sizeof (char) * utf8_len);
-+        utf8 = utf8_copy;
-+
-         status = composite_color_glyphs (surface, op,
-                                          source,
-                                          (char *)utf8, &utf8_len,
-@@ -2861,6 +2866,8 @@ _cairo_surface_show_text_glyphs (cairo_surface_t	    *surface,
-         if (num_glyphs == 0)
-             goto DONE;
-     }
-+    else
-+      utf8_copy = NULL;
- 
-     /* The logic here is duplicated in _cairo_analysis_surface show_glyphs and
-      * show_text_glyphs.  Keep in synch. */
-@@ -2918,6 +2925,9 @@ _cairo_surface_show_text_glyphs (cairo_surface_t	    *surface,
- 	surface->serial++;
-     }
- 
-+    if (utf8_copy)
-+        free (utf8_copy);
-+
-     return _cairo_surface_set_error (surface, status);
- }
- 
diff --git a/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch b/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
deleted file mode 100644
index 3709c5a..0000000
--- a/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001
-From: Carlos Garcia Campos <cgarcia at igalia.com>
-Date: Mon, 19 Nov 2018 12:33:07 +0100
-Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in
- cairo_ft_apply_variations
-
-Fixes a crash when using freetype >= 2.9
----
- src/cairo-ft-font.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
-index 325dd61b4..981973f78 100644
---- a/src/cairo-ft-font.c
-+++ b/src/cairo-ft-font.c
-@@ -2393,7 +2393,11 @@ skip:
- done:
-         free (coords);
-         free (current_coords);
-+#if HAVE_FT_DONE_MM_VAR
-+        FT_Done_MM_Var (face->glyph->library, ft_mm_var);
-+#else
-         free (ft_mm_var);
-+#endif
-     }
- }
- 
--- 
-2.19.2
-
diff --git a/cairo-gobject-deps.patch b/cairo-gobject-deps.patch
deleted file mode 100644
index 576adcb..0000000
--- a/cairo-gobject-deps.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Hack to avoid leaking cairo-gobject dependencies to main cairo.pc
---- cairo-1.14.0/build/aclocal.enable.m4.orig	2014-10-18 14:18:01.248879262 +0200
-+++ cairo-1.14.0/build/aclocal.enable.m4	2014-10-18 14:18:52.212210456 +0200
-@@ -101,10 +101,12 @@ AC_DEFUN([_CAIRO_ENABLE],
- 
- 	AS_IF([test "x$use_$1" = "xyes"],
- 	[dnl
-+		AS_IF([test "cr_feature" != "gobject"],[dnl
- 		CAIRO_ACCUMULATED_FEATURE_VARS_FOREACH([cr_var],
- 		[dnl
- 			CAIRO_ACCUMULATE_UNQUOTED_BEFORE(cr_var, [$]cr_feature[_]cr_var)
- 		])dnl
-+		])dnl
- 	],[dnl
- 		dnl If not enabled, empty the vars so no one accidentally uses them.
- 		CAIRO_FEATURE_VARS_FOREACH([cr_var], [unset cr_feature[_]cr_var]m4_newline)
diff --git a/cairo-link.patch b/cairo-link.patch
deleted file mode 100644
index 2356428..0000000
--- a/cairo-link.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp -x '*.orig' cairo-1.16.0.org/configure.ac cairo-1.16.0/configure.ac
---- cairo-1.16.0.org/configure.ac	2018-10-18 00:21:03.000000000 +0000
-+++ cairo-1.16.0/configure.ac	2022-04-05 11:08:14.785626121 +0000
-@@ -89,7 +89,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib,
- 		     if test "x$no_x" = xyes; then
- 		       use_xlib="no (requires X development libraries)"
- 		     else
--		       xlib_NONPKGCONFIG_LIBS="$X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
-+		       xlib_NONPKGCONFIG_LIBS="$X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
- 		       xlib_NONPKGCONFIG_CFLAGS=$X_CFLAGS
- 		     fi])
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cairo.git/commitdiff/170c82762a1fccbeb64c31f392243bb58206a323



More information about the pld-cvs-commit mailing list