Accepting request 511828 from home:scarabeus_iv:branches:graphics

- Add patch gd-rounding.patch
- Set again the cflags so other archs do not fail testsuite

OBS-URL: https://build.opensuse.org/request/show/511828
OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=38
This commit is contained in:
Petr Gajdos 2017-07-21 12:02:06 +00:00 committed by Git OBS Bridge
parent b783cebdcb
commit 7e8d316dac
3 changed files with 68 additions and 1 deletions

44
gd-rounding.patch Normal file
View File

@ -0,0 +1,44 @@
From b7b66ea1ea9191b5bf1c2fdc9c7915c9ba69c4bb Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Fri, 22 Jul 2016 08:14:12 +0200
Subject: [PATCH] Fix gd2/gd2_read.c:8:6: error: 'error' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
Also report about any error, not only the last one.
(cherry picked from commit 2b3dd57a6ccb2940f2e9119ae04e14362e2a1f61)
---
tests/gd2/gd2_read.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/tests/gd2/gd2_read.c b/tests/gd2/gd2_read.c
index 94fe069f..8ce8bd15 100644
--- a/tests/gd2/gd2_read.c
+++ b/tests/gd2/gd2_read.c
@@ -5,7 +5,7 @@
int main(int argc, char *argv[])
{
- int error, i = 0;
+ int error = 0, i = 0;
gdImagePtr im, exp;
FILE *fp;
char *path[] = {
@@ -40,8 +40,6 @@ int main(int argc, char *argv[])
gdTestErrorMsg("image %s differs from expected result\n", path[i]);
gdImageDestroy(im);
error = 1;
- } else {
- error = 0;
}
if (exp) {
gdImageDestroy(exp);
@@ -52,8 +50,6 @@ int main(int argc, char *argv[])
gdTestErrorMsg("image %s should have failed to be loaded\n", path[i]);
gdImageDestroy(im);
error = 1;
- } else {
- error = 0;
}
}
i++;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jul 21 11:29:06 UTC 2017 - tchvatal@suse.com
- Add patch gd-rounding.patch
- Set again the cflags so other archs do not fail testsuite
-------------------------------------------------------------------
Fri Jul 7 10:54:11 UTC 2017 - tchvatal@suse.com

19
gd.spec
View File

@ -33,8 +33,10 @@ Patch1: gd-fontpath.patch
Patch2: gd-format.patch
# could be upstreamed
Patch3: gd-aliasing.patch
# PATCH-FIX-UPSTREAM:
# PATCH-FIX-UPSTREAM: build with newer freetype
Patch4: gd-freetype.patch
# PATCH-FIX-UPSTREAM: fix testfailure on 32b platforms
Patch5: gd-rounding.patch
# needed for tests
BuildRequires: dejavu
BuildRequires: libjpeg-devel
@ -95,8 +97,18 @@ the formats accepted for inline images by most browsers.
%patch2
%patch3
%patch4 -p1
%patch5 -p1
%build
# ADDITIONAL CFLAGS ARE NEEDED TO FIX TEST FAILURES IN CASE OF i586, BUT HARMLESS TO APPLY GENERALLY FOR ALL ix86
%ifarch %{ix86}
export CFLAGS="%{optflags} -msse -mfpmath=sse"
%else
%ifnarch x86_64
export CFLAGS="%{optflags} -ffp-contract=off"
%endif
%endif
# without-x -- useless switch which just mangles cflags
%configure \
--disable-silent-rules \
@ -114,6 +126,11 @@ the formats accepted for inline images by most browsers.
make %{?_smp_mflags}
%check
%ifarch %{ix86}
# See https://github.com/libgd/libgd/issues/359
XFAIL_TESTS="gdimagegrayscale/basic $XFAIL_TESTS"
%endif
export XFAIL_TESTS
make check %{?_smp_mflags}
%install