Add condition if fedora for packages not available in RHEL

This commit is contained in:
Filip Januš 2021-03-17 11:04:22 +01:00
parent 3147fefdfd
commit b81dacf966

18
gd.spec
View File

@ -1,8 +1,13 @@
%if 0%{?rhel}
%bcond_with liq
%bcond_with raqm
%bcond_with avif
%else
# Enabled by default # Enabled by default
%bcond_without liq %bcond_without liq
%bcond_without raqm %bcond_without raqm
%bcond_without avif %bcond_without avif
%endif
# Not available in Fedora, only in rpmfusion # Not available in Fedora, only in rpmfusion
# Also see https://github.com/libgd/libgd/issues/678 segfault # Also see https://github.com/libgd/libgd/issues/678 segfault
%bcond_with heif %bcond_with heif
@ -11,7 +16,7 @@
Summary: A graphics library for quick creation of PNG or JPEG images Summary: A graphics library for quick creation of PNG or JPEG images
Name: gd Name: gd
Version: 2.3.2 Version: 2.3.2
Release: 2%{?prever}%{?short}%{?dist} Release: 3%{?prever}%{?short}%{?dist}
License: MIT License: MIT
URL: http://libgd.github.io/ URL: http://libgd.github.io/
%if 0%{?commit:1} %if 0%{?commit:1}
@ -21,8 +26,6 @@ Source0: libgd-%{version}-%{commit}.tgz
%else %else
Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/libgd-%{version}.tar.xz Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/libgd-%{version}.tar.xz
%endif %endif
# Missing, temporary workaround, fixed upstream for next version
Source1: https://raw.githubusercontent.com/libgd/libgd/gd-%{version}/config/getlib.sh
BuildRequires: freetype-devel BuildRequires: freetype-devel
BuildRequires: fontconfig-devel BuildRequires: fontconfig-devel
@ -107,7 +110,6 @@ files for gd, a graphics library for creating PNG and JPEG graphics.
%prep %prep
%setup -q -n libgd-%{version}%{?prever:-%{prever}} %setup -q -n libgd-%{version}%{?prever:-%{prever}}
install -m 0755 %{SOURCE1} config/
: $(perl config/getver.pl) : $(perl config/getver.pl)
@ -153,9 +155,10 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a
%check %check
# minor diff in size # minor diff in size
%if %{with raqm}
XFAIL_TESTS="gdimagestringft/gdimagestringft_bbox" XFAIL_TESTS="gdimagestringft/gdimagestringft_bbox"
export XFAIL_TESTS export XFAIL_TESTS
%endif
: Upstream test suite : Upstream test suite
make check make check
@ -182,6 +185,9 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc
%changelog %changelog
* Wed Mar 17 2021 Filip Januš <fjanus@redhat.com> - 2.3.2-3
- Add condition if fedora for packages not available in RHEL
* Mon Mar 8 2021 Remi Collet <remi@remirepo.net> - 2.3.2-2 * Mon Mar 8 2021 Remi Collet <remi@remirepo.net> - 2.3.2-2
- enable avif support - enable avif support
- use bcond - use bcond