Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
5b1697d814
!48 update to version 1.18.0
From: @paulthomas100199 
Reviewed-by: @open-bot 
Signed-off-by: @open-bot
2023-12-29 07:16:23 +00:00
lwg
d4e94c3f37 update to version 1.18.0 2023-12-27 17:41:18 +08:00
openeuler-ci-bot
360365efcd
!47 update to 1.17.8
From: @zhangqiumiao 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2023-07-28 02:13:48 +00:00
Qiumiao Zhang
db0da66c9c update to 1.17.8
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-07-26 11:55:03 +08:00
openeuler-ci-bot
c2b3fb46f1
!44 fix fuzzers
From: @sun_hai_10 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2023-06-14 09:19:11 +00:00
sun_hai_10
aec9fd7771 fix fuzzers 2023-06-14 16:56:38 +08:00
openeuler-ci-bot
7951331583
!43 [sync] PR-40: correct source URL
From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-12-02 07:54:03 +00:00
pengyi37
538b9fc0b9 correct source URL
(cherry picked from commit bb3c5cb40a35622c47f829fe23424dbb741f6dea)
2022-12-01 22:06:04 +08:00
openeuler-ci-bot
5234aef22d
!37 【轻量级 PR】:disable symbol-lookup
From: @kerongw 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-05-09 06:51:27 +00:00
kerongw
b4c9f7740f
disable symbol-lookup 2022-05-09 06:25:30 +00:00
6 changed files with 57 additions and 160 deletions

View File

@ -1,56 +0,0 @@
From 12a5b7384f35d9a3f4c6b151fac4857444db3d6a Mon Sep 17 00:00:00 2001
From: Nikolaus Waxweiler <madigens@gmail.com>
Date: Sat, 10 Nov 2018 16:44:23 +0000
Subject: [PATCH] Set default LCD filter to FreeType's default
---
src/cairo-ft-font.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 325dd61b4..3c47dc12e 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1404,7 +1404,7 @@ _render_glyph_outline (FT_Face face,
cairo_image_surface_t **surface)
{
int rgba = FC_RGBA_UNKNOWN;
- int lcd_filter = FT_LCD_FILTER_LEGACY;
+ int lcd_filter = FT_LCD_FILTER_DEFAULT;
FT_GlyphSlot glyphslot = face->glyph;
FT_Outline *outline = &glyphslot->outline;
FT_Bitmap bitmap;
@@ -1439,13 +1439,13 @@ _render_glyph_outline (FT_Face face,
case CAIRO_LCD_FILTER_NONE:
lcd_filter = FT_LCD_FILTER_NONE;
break;
- case CAIRO_LCD_FILTER_DEFAULT:
case CAIRO_LCD_FILTER_INTRA_PIXEL:
lcd_filter = FT_LCD_FILTER_LEGACY;
break;
case CAIRO_LCD_FILTER_FIR3:
lcd_filter = FT_LCD_FILTER_LIGHT;
break;
+ case CAIRO_LCD_FILTER_DEFAULT:
case CAIRO_LCD_FILTER_FIR5:
lcd_filter = FT_LCD_FILTER_DEFAULT;
break;
@@ -3416,7 +3416,6 @@ _cairo_ft_font_options_substitute (const cairo_font_options_t *options,
case CAIRO_LCD_FILTER_NONE:
lcd_filter = FT_LCD_FILTER_NONE;
break;
- case CAIRO_LCD_FILTER_DEFAULT:
case CAIRO_LCD_FILTER_INTRA_PIXEL:
lcd_filter = FT_LCD_FILTER_LEGACY;
break;
@@ -3424,6 +3423,7 @@ _cairo_ft_font_options_substitute (const cairo_font_options_t *options,
lcd_filter = FT_LCD_FILTER_LIGHT;
break;
default:
+ case CAIRO_LCD_FILTER_DEFAULT:
case CAIRO_LCD_FILTER_FIR5:
lcd_filter = FT_LCD_FILTER_DEFAULT;
break;
--
2.19.1

View File

@ -1,14 +0,0 @@
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
index 390397bae..1bde774a4 100644
--- a/src/cairo-arc.c
+++ b/src/cairo-arc.c
@@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t *cr,
if (cairo_status (cr))
return;
- assert (angle_max >= angle_min);
+ if (angle_max < angle_min)
+ return;
if (angle_max - angle_min > 2 * M_PI * MAX_FULL_CIRCLES) {
angle_max = fmod (angle_max - angle_min, 2 * M_PI);

View File

@ -1,13 +0,0 @@
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
index 390397bae..f9249dbeb 100644
--- a/src/cairo-arc.c
+++ b/src/cairo-arc.c
@@ -99,7 +99,7 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
do {
angle = M_PI / i++;
error = _arc_error_normalized (angle);
- } while (error > tolerance);
+ } while (error > tolerance && error > __DBL_EPSILON__);
return angle;
}

View File

@ -1,51 +0,0 @@
From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001
From: Heiko Lewin <heiko.lewin@worldiety.de>
Date: Tue, 15 Dec 2020 16:48:19 +0100
Subject: [PATCH] Fix mask usage in image-compositor
Conflict:NA
Reference:https://gitlab.freedesktop.org/cairo/cairo/-/commit/03a820b173ed1fdef6ff14b4468f5dbc02ff59be
---
src/cairo-image-compositor.c | 8 ++--
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
index 79ad69f68..4f8aaed99 100644
--- a/src/cairo-image-compositor.c
+++ b/src/cairo-image-compositor.c
@@ -2610,14 +2610,14 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
unsigned num_spans)
{
cairo_image_span_renderer_t *r = abstract_renderer;
- uint8_t *m;
+ uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask);
int x0;
if (num_spans == 0)
return CAIRO_STATUS_SUCCESS;
x0 = spans[0].x;
- m = r->_buf;
+ m = base;
do {
int len = spans[1].x - spans[0].x;
if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) {
@@ -2655,7 +2655,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
spans[0].x, y,
spans[1].x - spans[0].x, h);
- m = r->_buf;
+ m = base;
x0 = spans[1].x;
} else if (spans[0].coverage == 0x0) {
if (spans[0].x != x0) {
@@ -2684,7 +2684,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h,
#endif
}
- m = r->_buf;
+ m = base;
x0 = spans[1].x;
} else {
*m++ = spans[0].coverage;

View File

@ -1,24 +1,22 @@
%global cairogl --disable-gl
Name: cairo
Version: 1.17.4
Version: 1.18.0
Release: 1
Summary: A 2D graphics library
License: LGPLv2 or MPLv1.1
URL: http://cairographics.org
Source0: http://cairographics.org/napshots/%{name}-%{version}.tar.xz
Source0: http://cairographics.org/snapshots/%{name}-%{version}.tar.xz
Patch0001: 0001-Set-default-LCD-filter-to-FreeType-s-default.patch
Patch6000: CVE-2019-6461.patch
Patch6001: CVE-2019-6462.patch
Patch6002: backport-CVE-2020-35492.patch
BuildRequires: gcc make
BuildRequires: pkgconfig glib2-devel librsvg2-devel
BuildRequires: libXrender-devel libX11-devel libpng-devel libxml2-devel
BuildRequires: pixman-devel >= 0.36.0
BuildRequires: freetype-devel >= 2.1.9
BuildRequires: fontconfig-devel >= 2.2.95
BuildRequires: gcc gcc-c++ gtk-doc meson
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(pixman-1) >= 0.36.0
BuildRequires: pkgconfig(freetype2) >= 2.1.9
BuildRequires: pkgconfig(fontconfig) >= 2.2.95
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xcb-render)
BuildRequires: pkgconfig(xrender)
%description
Cairo is a 2D graphics libarary with support for multiple output devices.
@ -61,7 +59,8 @@ needed for developing software which uses the cairo Gobject library.
%package tools
Summary: Development tools for cairo
Requires: %{name}%{?_isa} = %{version}-%{release}
%description tools
Cairo is a 2D graphics library designed to provide high-quality display
and print output.
@ -73,25 +72,29 @@ This package contains tools for working with the cairo graphics library.
%autosetup -p1
%build
%configure --disable-static --enable-xlib --enable-ft --enable-ps \
--enable-pdf --enable-svg --enable-tee --enable-gobject \
%{cairogl} --disable-gtk-doc
sed -i -e 's/^hardcode_libdir_flag_spec=.*/hardcode_libdir_flag_spec=""/g' \
-e 's/^runpath_var=LD_RUN_PATH/runpath_var=DIE_RPATH_DIE/g' libtool
%make_build V=1
%meson \
-Dfreetype=enabled \
-Dfontconfig=enabled \
-Dglib=enabled \
-Dgtk_doc=true \
-Dspectre=disabled \
-Dsymbol-lookup=disabled \
-Dtee=enabled \
-Dtests=disabled \
-Dxcb=enabled \
-Dxlib=enabled
%meson_build
%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -delete
%meson_install
%files
%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
%doc AUTHORS BIBLIOGRAPHY BUGS NEWS README
%doc AUTHORS BUGS NEWS README.md
%{_libdir}/libcairo.so.2*
%{_libdir}/libcairo-script-interpreter.so.2*
%files devel
%doc ChangeLog PORTING_GUIDE
%dir %{_includedir}/cairo/
%{_includedir}/cairo/cairo-deprecated.h
%{_includedir}/cairo/cairo-features.h
@ -115,6 +118,7 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%{_libdir}/pkgconfig/cairo-pdf.pc
%{_libdir}/pkgconfig/cairo-png.pc
%{_libdir}/pkgconfig/cairo-ps.pc
%{_libdir}/pkgconfig/cairo-script-interpreter.pc
%{_libdir}/pkgconfig/cairo-svg.pc
%{_libdir}/pkgconfig/cairo-tee.pc
%{_libdir}/pkgconfig/cairo-xlib.pc
@ -137,6 +141,33 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%{_libdir}/cairo/
%changelog
* Wed Dec 27 2023 Paul Thomas <paulthomas100199@gmail.com> - 1.18.0-1
- Type: requirement
- ID: NA
- SUG: NA
- DESC: update to 1.18.0
* Wed Jul 26 2023 zhangqiumiao<zhangqiumiao1@huawei.com> - 1.17.8-1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:update to 1.17.8
* Wed Jun 14 2023 sunhai<sunhai10@huawei.com> - 1.17.4-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:cairo_truetype_reverse_cmap detected memory leaks
fix read memory access
fix call get_unaligned_be32 heap buffer overflow
fix heap buffer overflow in cairo_cff_parse_charstring
* Thu Dec 1 2022 pengyi<pengyi37@huawei.com> - 1.17.4-3
- DESC:correct source URL
* Mon May 09 2022 wangkerong<wangkerong@h-partners.com> - 1.17.4-2
- DESC:disable symbol-lookup,fix build failure after install binutils-devel
* Mon Nov 22 2021 hanhui<hanhui15@huawei.com> - 1.17.4-1
- DESC:update to 1.17.4