Accepting request 432049 from home:badshah400:branches:graphics

- Update to version 2.2.3:
- Drop upstreamed patches:
- Add BuildRequires for automake and autoconf since
  gd-disable-freetype27-failed-tests.patch touches makefiles.
- Drop getver.pl from source: included in upstream tarball.
- Add "-msse -mfpmath=sse" to CFLAGS to fix tests on ix86
  architectures.
- Add "-ffp-contract=off" to CFLAGS for non-ix86 arch (ppc, arm)
  to fix a test: see gh#libgd/libgd#278.
- Add gd-test-unintialized-var.patch to fix an uninitialised
  variable in tests/gd2/gd2_read.c to prevent it from compiling
  with -Werror (only causes problems in no ix86 arch
  surprisingly); patch sent upstream.
- Rebase gd-disable-freetype27-failed-tests.patch for updated
  version.
- Update URL and Source to project's new github URL's.

OBS-URL: https://build.opensuse.org/request/show/432049
OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=32
This commit is contained in:
Ismail Dönmez
2016-09-30 17:02:24 +00:00
committed by Git OBS Bridge
parent 25745403db
commit 801d752d5d
12 changed files with 114 additions and 358 deletions

38
gd.spec
View File

@@ -21,15 +21,14 @@
%define lname libgd3
Name: gd
Version: 2.1.1
Version: 2.2.3
Release: 0
Summary: A Drawing Library for Programs That Use PNG and JPEG Output
License: MIT
Group: System/Libraries
Url: http://libgd.bitbucket.org/
Source: https://bitbucket.org/libgd/gd-libgd/downloads/libgd-%{version}.tar.xz
Url: https://libgd.github.io/
Source: https://github.com/libgd/libgd/releases/download/%{name}-%{version}/%{prjname}-%{version}.tar.xz
Source1: baselibs.conf
Source2: getver.pl
# to be upstreamed, gdlib-config --libs to return the same as pkg-config --libs gdlib
Patch0: gd-config.patch
# might be upstreamed, but could be suse specific also (/usr/share/fonts/Type1 font dir)
@@ -38,14 +37,12 @@ Patch1: gd-fontpath.patch
Patch2: gd-format.patch
# could be upstreamed
Patch3: gd-aliasing.patch
# could be upstreamed
Patch4: gd-libvpx.patch
Patch5: gd-CVE-2016-5116.patch
Patch6: gd-CVE-2016-6132.patch
Patch7: gd-CVE-2016-6214.patch
Patch8: gd-CVE-2016-6905.patch
# PATCH-FIX-UPSTREAM gd-disable-freetype27-failed-tests.patch gh#libgd/libgd#302 badshah400@gmail.com -- Disable for now tests failing against freetype >= 2.7 for being too exact.
Patch9: gd-disable-freetype27-failed-tests.patch
Patch5: gd-disable-freetype27-failed-tests.patch
# PATCH-FIX-UPSTREAM gd-test-unintialized-var.patch badshah400@gmail.com -- Initialise a variable in tests/gd2/gd2_read.c to 0 to prevent it from failing to compile with -Werror (only causes problems in no ix86 arch surprisingly); patch sent upstream
Patch6: gd-test-unintialized-var.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fontconfig-devel
BuildRequires: freetype2-devel
BuildRequires: libjpeg-devel
@@ -100,19 +97,20 @@ the formats accepted for inline images by most browsers.
%patch1
%patch2
%patch3
%patch4
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%build
# this file is errorneously forgotten from the tarball
# remove in next release to 2.1.1
cp %{SOURCE2} config/getver.pl
perl config/getver.pl
autoreconf -fiv
# ADDITIONAL CFLAGS ARE NEEDED TO FIX TEST FAILURES IN CASE OF i586, BUT HARMLESS TO APPLY GENERALLY FOR ALL ix86
%ifarch %{ix86}
CFLAGS="$CFLAGS -msse -mfpmath=sse"
export CFLAGS
%else
CFLAGS="$CFLAGS -ffp-contract=off"
%endif
# without-x -- useless switch which just mangles cflags
%configure \
--without-x \
@@ -123,6 +121,7 @@ autoreconf -fiv
--with-xpm \
--disable-static \
--with-pic
make %{?_smp_mflags}
%check
@@ -130,6 +129,7 @@ make check %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
%post -n %lname -p /sbin/ldconfig