%bcond_without tests # "make check"
#
%ifarch pentium3 pentium4
-%define with_ssemath 1
+%define with_sse 1
%endif
Summary: Library for PNG, JPEG creation
Summary(es.UTF-8): Biblioteca para manipulación de imágenes
Summary(pl.UTF-8): Biblioteka do tworzenia grafiki w formacie PNG, JPEG
Summary(pt_BR.UTF-8): Biblioteca para manipulação de imagens
Name: gd
-Version: 2.2.3
-Release: 1
+Version: 2.2.5
+Release: 2
License: BSD-like
Group: Libraries
#Source0Download: https://github.com/libgd/libgd/releases
Source0: https://github.com/libgd/libgd/releases/download/%{name}-%{version}/lib%{name}-%{version}.tar.xz
-# Source0-md5: 14e4134c129b4c166c3a0549a32ef340
+# Source0-md5: 8d8d6a6189513ecee6e893b1fb109bf8
Patch0: %{name}-fontpath.patch
-Patch1: %{name}-2.0.33-BoxBound.patch
Patch2: %{name}-loop.patch
Patch3: %{name}-liq.patch
URL: https://libgd.github.io/
%prep
%setup -q -n libgd-%{version}
%patch0 -p1
-%patch1 -p1
%patch2 -p1
%patch3 -p1
%{__make}
%if %{with tests}
-# https://bitbucket.org/libgd/gd-libgd/issue/72/gdimagestringft_bbox-test-fails-on-old (what is the exact reason???)
-XFAIL_TESTS=gdimagestringft/gdimagestringft_bbox
%ifarch %{ix86}
-%if %{without ssemath}
+# https://github.com/libgd/libgd/issues/359
+XFAIL_TESTS="$XFAIL_TESTS gdimagegrayscale/basic"
+%if %{without sse}
# 387 arithmetic is inexact, https://github.com/libgd/libgd/issues/242
XFAIL_TESTS="$XFAIL_TESTS gdimagecopyresampled/bug00201 gdimagerotate/bug00067"
%endif
%endif
-%if %{with libimagequant}
-# liq quantization method doesn't support alpha channel in a way expected by gd
-XFAIL_TESTS="$XFAIL_TESTS gif/bug00006"
-%endif
-# freetype TTF rendering difference?
-XFAIL_TESTS="$XFAIL_TESTS freetype/bug00132"
export XFAIL_TESTS
%{__make} check
%endif
%files
%defattr(644,root,root,755)
-%doc COPYING ChangeLog NEWS
+%doc CONTRIBUTORS COPYING README.md
%attr(755,root,root) %{_libdir}/libgd.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libgd.so.3