gd/gd.spec

172 lines
4.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gd
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without avif
%define prjname libgd
%define lname libgd3
Name: gd
Version: 2.3.3
Release: 0
Summary: A Drawing Library for Programs That Use PNG and JPEG Output
License: MIT
URL: https://libgd.github.io/
Source: https://github.com/libgd/libgd/releases/download/%{name}-%{version}/%{prjname}-%{version}.tar.xz
Source1: baselibs.conf
# might be upstreamed, but could be suse specific also (/usr/share/fonts/Type1 font dir)
Patch1: gd-fontpath.patch
# could be upstreamed, but not in this form (need ac check for attribute format printf, etc.)
Patch2: gd-format.patch
# could be upstreamed
Patch3: gd-aliasing.patch
# needed for tests
BuildRequires: dejavu-fonts
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
%if %{with avif}
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} > 150300
BuildRequires: pkgconfig(libavif)
%endif
%endif
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(xpm)
Provides: gdlib = %{version}
Obsoletes: gdlib < %{version}
%description
Gd allows your code to quickly draw images complete with lines, arcs,
text, and multiple colors. It supports cut and paste from other images
and flood fills. It outputs PNG, JPEG, and WBMP (for wireless devices)
and is supported by PHP.
%package -n %{lname}
Summary: A Drawing Library for Programs That Use PNG and JPEG Output
# change order while installing a split library
Obsoletes: gd < 2.2.3
Conflicts: gd < 2.2.3
%description -n %{lname}
Gd allows your code to quickly draw images complete with lines, arcs,
text, and multiple colors. It supports cut and paste from other images
and flood fills. It outputs PNG, JPEG, and WBMP (for wireless devices)
and is supported by PHP.
%package devel
Summary: Drawing Library for Programs with PNG and JPEG Output
Requires: %{lname} = %{version}
Requires: glibc-devel
%description devel
gd allows code to quickly draw images complete with lines, arcs, text,
multiple colors, cut and paste from other images, and flood fills. gd
writes out the result as a PNG or JPEG file. This is particularly
useful in World Wide Web applications, where PNG and JPEG are two of
the formats accepted for inline images by most browsers.
%prep
%setup -q -n %{prjname}-%{version}
%patch1
%patch2
%patch3
chmod 644 COPYING
%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 \
--disable-werror \
--without-liq \
--without-x \
--with-fontconfig \
--with-freetype \
--with-jpeg \
--with-png \
--with-xpm \
--enable-gd-formats=yes \
--with-webp \
%if %{with avif}
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} > 150300
--with-avif \
%endif
%endif
--with-zlib \
--disable-static
Accepting request 825196 from home:elimat:branches:graphics - Version update to 2.3.0: ### Security - Potential double-free in gdImage*Ptr(). (CVE-2019-6978) - gdImageColorMatch() out of bounds write on heap. (CVE-2019-6977) - Uninitialized read in gdImageCreateFromXbm(). (CVE-2019-11038) - Double-free in gdImageBmp. (CVE-2018-1000222) - Potential NULL pointer dereference in gdImageClone(). (CVE-2018-14553) - Potential infinite loop in gdImageCreateFromGifCtx(). (CVE-2018-5711) ### Fixed - Fix #597: add codecov support - Fix #596: gdTransformAffineCopy run error - Fix #589: Install dependencies move to .travis.yml - Fix #586: gdTransformAffineCopy() segfaults on palette images - Fix #585: gdTransformAffineCopy() changes interpolation method - Fix #584: gdImageSetInterpolationMethod(im, GD_DEFAULT) inconsistent - Fix #583: gdTransformAffineCopy() may use unitialized values - Fix #533: Remove cmake modules - Fix #539: Add RAQM support for cmake - Fix #499: gdImageGifAnimAddPtr: heap corruption with 2 identical images - Fix #486: gdImageCropAuto(…, GD_CROP_SIDES) crops left but not right - Fix #485: auto cropping has insufficient precision - Fix #479: Provide a suitable malloc function to liq - Fix #474: libtiff link returns 404 HTTP code - Fix #450: Failed to open 1 bit per pixel bitmap - Fix #440: new_width & new_height exception handling - Fix #432: gdImageCrop neglecting transparency - Fix #420: Potential infinite loop in gdImageCreateFromGifCtx - Fix #411: gd_gd.c format documentation appears to be incorrect - Fix #369: Fix new_a init error in gdImageConvolution() - Fix #351: gdImageFilledArc() doesn't properly draw pies - Fix #338: Fatal and normal libjpeg/libpng errors not distinguishable - Fix #169: Update var type to hold bigger w&h for ellipse - Fix #164: update doc files install directory in CMakeLists.txt - Correct some test depend errors - Update cmake min version to 3.7 - Delete libimagequant source code download action in CMakeLists.txt - Improve msys support - Fix some logic error in CMakeLists.txt - Remove the following macro: HAVE_STDLIB_H, HAVE_STRING_H, HAVE_STDDEF_H, HAVE_LIMITS_H, HAVE_ERRNO_H, AC_C_CONST ### Added - test cases for following API: gdImageCopyResized(), gdImageWebpEx(), gdImageCreateFromGd2PartPtr(), gdImageCloneMatch(), gdImageColorClosestHWB(), gdImageColorMatch(), gdImageStringUp(), gdImageStringUp16(), gdImageString(), gdImageString16(), gdImageCopyMergeGray(), gdImageCopyMerge() - Drop CVE patches now fixed upstream: - gd-CVE-2018-1000222.patch - gd-CVE-2018-14553.patch - gd-CVE-2018-5711.patch - gd-CVE-2019-11038.patch - gd-CVE-2019-6977.patch - gd-CVE-2019-6978.patch - Drop patch: libgd-config.patch since upstream have dropped libgd-config binary - Run spec-cleaner + Remove package groups + use license macro + use make macros OBS-URL: https://build.opensuse.org/request/show/825196 OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=62
2020-08-11 08:59:35 +00:00
%make_build
%check
%if !0%{?sle_version} || 0%{?sle_version} < 150000
# on SLE15 we have --with-arch-32=x86_64 so the test actually
# passes boo#1053825
%ifarch %{ix86}
# See https://github.com/libgd/libgd/issues/359
XFAIL_TESTS="gdimagegrayscale/basic $XFAIL_TESTS"
%endif
%endif
export XFAIL_TESTS
# https://github.com/libgd/libgd/issues/763#issuecomment-918049103
export TMPDIR=/tmp
Accepting request 825196 from home:elimat:branches:graphics - Version update to 2.3.0: ### Security - Potential double-free in gdImage*Ptr(). (CVE-2019-6978) - gdImageColorMatch() out of bounds write on heap. (CVE-2019-6977) - Uninitialized read in gdImageCreateFromXbm(). (CVE-2019-11038) - Double-free in gdImageBmp. (CVE-2018-1000222) - Potential NULL pointer dereference in gdImageClone(). (CVE-2018-14553) - Potential infinite loop in gdImageCreateFromGifCtx(). (CVE-2018-5711) ### Fixed - Fix #597: add codecov support - Fix #596: gdTransformAffineCopy run error - Fix #589: Install dependencies move to .travis.yml - Fix #586: gdTransformAffineCopy() segfaults on palette images - Fix #585: gdTransformAffineCopy() changes interpolation method - Fix #584: gdImageSetInterpolationMethod(im, GD_DEFAULT) inconsistent - Fix #583: gdTransformAffineCopy() may use unitialized values - Fix #533: Remove cmake modules - Fix #539: Add RAQM support for cmake - Fix #499: gdImageGifAnimAddPtr: heap corruption with 2 identical images - Fix #486: gdImageCropAuto(…, GD_CROP_SIDES) crops left but not right - Fix #485: auto cropping has insufficient precision - Fix #479: Provide a suitable malloc function to liq - Fix #474: libtiff link returns 404 HTTP code - Fix #450: Failed to open 1 bit per pixel bitmap - Fix #440: new_width & new_height exception handling - Fix #432: gdImageCrop neglecting transparency - Fix #420: Potential infinite loop in gdImageCreateFromGifCtx - Fix #411: gd_gd.c format documentation appears to be incorrect - Fix #369: Fix new_a init error in gdImageConvolution() - Fix #351: gdImageFilledArc() doesn't properly draw pies - Fix #338: Fatal and normal libjpeg/libpng errors not distinguishable - Fix #169: Update var type to hold bigger w&h for ellipse - Fix #164: update doc files install directory in CMakeLists.txt - Correct some test depend errors - Update cmake min version to 3.7 - Delete libimagequant source code download action in CMakeLists.txt - Improve msys support - Fix some logic error in CMakeLists.txt - Remove the following macro: HAVE_STDLIB_H, HAVE_STRING_H, HAVE_STDDEF_H, HAVE_LIMITS_H, HAVE_ERRNO_H, AC_C_CONST ### Added - test cases for following API: gdImageCopyResized(), gdImageWebpEx(), gdImageCreateFromGd2PartPtr(), gdImageCloneMatch(), gdImageColorClosestHWB(), gdImageColorMatch(), gdImageStringUp(), gdImageStringUp16(), gdImageString(), gdImageString16(), gdImageCopyMergeGray(), gdImageCopyMerge() - Drop CVE patches now fixed upstream: - gd-CVE-2018-1000222.patch - gd-CVE-2018-14553.patch - gd-CVE-2018-5711.patch - gd-CVE-2019-11038.patch - gd-CVE-2019-6977.patch - gd-CVE-2019-6978.patch - Drop patch: libgd-config.patch since upstream have dropped libgd-config binary - Run spec-cleaner + Remove package groups + use license macro + use make macros OBS-URL: https://build.opensuse.org/request/show/825196 OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=62
2020-08-11 08:59:35 +00:00
%make_build check
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%files
Accepting request 825196 from home:elimat:branches:graphics - Version update to 2.3.0: ### Security - Potential double-free in gdImage*Ptr(). (CVE-2019-6978) - gdImageColorMatch() out of bounds write on heap. (CVE-2019-6977) - Uninitialized read in gdImageCreateFromXbm(). (CVE-2019-11038) - Double-free in gdImageBmp. (CVE-2018-1000222) - Potential NULL pointer dereference in gdImageClone(). (CVE-2018-14553) - Potential infinite loop in gdImageCreateFromGifCtx(). (CVE-2018-5711) ### Fixed - Fix #597: add codecov support - Fix #596: gdTransformAffineCopy run error - Fix #589: Install dependencies move to .travis.yml - Fix #586: gdTransformAffineCopy() segfaults on palette images - Fix #585: gdTransformAffineCopy() changes interpolation method - Fix #584: gdImageSetInterpolationMethod(im, GD_DEFAULT) inconsistent - Fix #583: gdTransformAffineCopy() may use unitialized values - Fix #533: Remove cmake modules - Fix #539: Add RAQM support for cmake - Fix #499: gdImageGifAnimAddPtr: heap corruption with 2 identical images - Fix #486: gdImageCropAuto(…, GD_CROP_SIDES) crops left but not right - Fix #485: auto cropping has insufficient precision - Fix #479: Provide a suitable malloc function to liq - Fix #474: libtiff link returns 404 HTTP code - Fix #450: Failed to open 1 bit per pixel bitmap - Fix #440: new_width & new_height exception handling - Fix #432: gdImageCrop neglecting transparency - Fix #420: Potential infinite loop in gdImageCreateFromGifCtx - Fix #411: gd_gd.c format documentation appears to be incorrect - Fix #369: Fix new_a init error in gdImageConvolution() - Fix #351: gdImageFilledArc() doesn't properly draw pies - Fix #338: Fatal and normal libjpeg/libpng errors not distinguishable - Fix #169: Update var type to hold bigger w&h for ellipse - Fix #164: update doc files install directory in CMakeLists.txt - Correct some test depend errors - Update cmake min version to 3.7 - Delete libimagequant source code download action in CMakeLists.txt - Improve msys support - Fix some logic error in CMakeLists.txt - Remove the following macro: HAVE_STDLIB_H, HAVE_STRING_H, HAVE_STDDEF_H, HAVE_LIMITS_H, HAVE_ERRNO_H, AC_C_CONST ### Added - test cases for following API: gdImageCopyResized(), gdImageWebpEx(), gdImageCreateFromGd2PartPtr(), gdImageCloneMatch(), gdImageColorClosestHWB(), gdImageColorMatch(), gdImageStringUp(), gdImageStringUp16(), gdImageString(), gdImageString16(), gdImageCopyMergeGray(), gdImageCopyMerge() - Drop CVE patches now fixed upstream: - gd-CVE-2018-1000222.patch - gd-CVE-2018-14553.patch - gd-CVE-2018-5711.patch - gd-CVE-2019-11038.patch - gd-CVE-2019-6977.patch - gd-CVE-2019-6978.patch - Drop patch: libgd-config.patch since upstream have dropped libgd-config binary - Run spec-cleaner + Remove package groups + use license macro + use make macros OBS-URL: https://build.opensuse.org/request/show/825196 OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=62
2020-08-11 08:59:35 +00:00
%license COPYING
%{_bindir}/annotate
%{_bindir}/bdftogd
%{_bindir}/gd2copypal
%{_bindir}/gd2togif
%{_bindir}/gd2topng
%{_bindir}/gdcmpgif
%{_bindir}/gdparttopng
%{_bindir}/gdtopng
%{_bindir}/giftogd2
%{_bindir}/pngtogd
%{_bindir}/pngtogd2
%{_bindir}/webpng
%files -n %{lname}
Accepting request 825196 from home:elimat:branches:graphics - Version update to 2.3.0: ### Security - Potential double-free in gdImage*Ptr(). (CVE-2019-6978) - gdImageColorMatch() out of bounds write on heap. (CVE-2019-6977) - Uninitialized read in gdImageCreateFromXbm(). (CVE-2019-11038) - Double-free in gdImageBmp. (CVE-2018-1000222) - Potential NULL pointer dereference in gdImageClone(). (CVE-2018-14553) - Potential infinite loop in gdImageCreateFromGifCtx(). (CVE-2018-5711) ### Fixed - Fix #597: add codecov support - Fix #596: gdTransformAffineCopy run error - Fix #589: Install dependencies move to .travis.yml - Fix #586: gdTransformAffineCopy() segfaults on palette images - Fix #585: gdTransformAffineCopy() changes interpolation method - Fix #584: gdImageSetInterpolationMethod(im, GD_DEFAULT) inconsistent - Fix #583: gdTransformAffineCopy() may use unitialized values - Fix #533: Remove cmake modules - Fix #539: Add RAQM support for cmake - Fix #499: gdImageGifAnimAddPtr: heap corruption with 2 identical images - Fix #486: gdImageCropAuto(…, GD_CROP_SIDES) crops left but not right - Fix #485: auto cropping has insufficient precision - Fix #479: Provide a suitable malloc function to liq - Fix #474: libtiff link returns 404 HTTP code - Fix #450: Failed to open 1 bit per pixel bitmap - Fix #440: new_width & new_height exception handling - Fix #432: gdImageCrop neglecting transparency - Fix #420: Potential infinite loop in gdImageCreateFromGifCtx - Fix #411: gd_gd.c format documentation appears to be incorrect - Fix #369: Fix new_a init error in gdImageConvolution() - Fix #351: gdImageFilledArc() doesn't properly draw pies - Fix #338: Fatal and normal libjpeg/libpng errors not distinguishable - Fix #169: Update var type to hold bigger w&h for ellipse - Fix #164: update doc files install directory in CMakeLists.txt - Correct some test depend errors - Update cmake min version to 3.7 - Delete libimagequant source code download action in CMakeLists.txt - Improve msys support - Fix some logic error in CMakeLists.txt - Remove the following macro: HAVE_STDLIB_H, HAVE_STRING_H, HAVE_STDDEF_H, HAVE_LIMITS_H, HAVE_ERRNO_H, AC_C_CONST ### Added - test cases for following API: gdImageCopyResized(), gdImageWebpEx(), gdImageCreateFromGd2PartPtr(), gdImageCloneMatch(), gdImageColorClosestHWB(), gdImageColorMatch(), gdImageStringUp(), gdImageStringUp16(), gdImageString(), gdImageString16(), gdImageCopyMergeGray(), gdImageCopyMerge() - Drop CVE patches now fixed upstream: - gd-CVE-2018-1000222.patch - gd-CVE-2018-14553.patch - gd-CVE-2018-5711.patch - gd-CVE-2019-11038.patch - gd-CVE-2019-6977.patch - gd-CVE-2019-6978.patch - Drop patch: libgd-config.patch since upstream have dropped libgd-config binary - Run spec-cleaner + Remove package groups + use license macro + use make macros OBS-URL: https://build.opensuse.org/request/show/825196 OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=62
2020-08-11 08:59:35 +00:00
%license COPYING
%{_libdir}/*.so.*
%files devel
Accepting request 825196 from home:elimat:branches:graphics - Version update to 2.3.0: ### Security - Potential double-free in gdImage*Ptr(). (CVE-2019-6978) - gdImageColorMatch() out of bounds write on heap. (CVE-2019-6977) - Uninitialized read in gdImageCreateFromXbm(). (CVE-2019-11038) - Double-free in gdImageBmp. (CVE-2018-1000222) - Potential NULL pointer dereference in gdImageClone(). (CVE-2018-14553) - Potential infinite loop in gdImageCreateFromGifCtx(). (CVE-2018-5711) ### Fixed - Fix #597: add codecov support - Fix #596: gdTransformAffineCopy run error - Fix #589: Install dependencies move to .travis.yml - Fix #586: gdTransformAffineCopy() segfaults on palette images - Fix #585: gdTransformAffineCopy() changes interpolation method - Fix #584: gdImageSetInterpolationMethod(im, GD_DEFAULT) inconsistent - Fix #583: gdTransformAffineCopy() may use unitialized values - Fix #533: Remove cmake modules - Fix #539: Add RAQM support for cmake - Fix #499: gdImageGifAnimAddPtr: heap corruption with 2 identical images - Fix #486: gdImageCropAuto(…, GD_CROP_SIDES) crops left but not right - Fix #485: auto cropping has insufficient precision - Fix #479: Provide a suitable malloc function to liq - Fix #474: libtiff link returns 404 HTTP code - Fix #450: Failed to open 1 bit per pixel bitmap - Fix #440: new_width & new_height exception handling - Fix #432: gdImageCrop neglecting transparency - Fix #420: Potential infinite loop in gdImageCreateFromGifCtx - Fix #411: gd_gd.c format documentation appears to be incorrect - Fix #369: Fix new_a init error in gdImageConvolution() - Fix #351: gdImageFilledArc() doesn't properly draw pies - Fix #338: Fatal and normal libjpeg/libpng errors not distinguishable - Fix #169: Update var type to hold bigger w&h for ellipse - Fix #164: update doc files install directory in CMakeLists.txt - Correct some test depend errors - Update cmake min version to 3.7 - Delete libimagequant source code download action in CMakeLists.txt - Improve msys support - Fix some logic error in CMakeLists.txt - Remove the following macro: HAVE_STDLIB_H, HAVE_STRING_H, HAVE_STDDEF_H, HAVE_LIMITS_H, HAVE_ERRNO_H, AC_C_CONST ### Added - test cases for following API: gdImageCopyResized(), gdImageWebpEx(), gdImageCreateFromGd2PartPtr(), gdImageCloneMatch(), gdImageColorClosestHWB(), gdImageColorMatch(), gdImageStringUp(), gdImageStringUp16(), gdImageString(), gdImageString16(), gdImageCopyMergeGray(), gdImageCopyMerge() - Drop CVE patches now fixed upstream: - gd-CVE-2018-1000222.patch - gd-CVE-2018-14553.patch - gd-CVE-2018-5711.patch - gd-CVE-2019-11038.patch - gd-CVE-2019-6977.patch - gd-CVE-2019-6978.patch - Drop patch: libgd-config.patch since upstream have dropped libgd-config binary - Run spec-cleaner + Remove package groups + use license macro + use make macros OBS-URL: https://build.opensuse.org/request/show/825196 OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=62
2020-08-11 08:59:35 +00:00
%license COPYING
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/gdlib.pc
%changelog