From 996c8728cb22e41f1c85787e7f400f249c993be3 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 2 Dec 2021 11:21:45 +0100 Subject: rename to gd3php on EL-7 and EL-8 https://github.com/remicollet/remirepo/issues/194 --- gd.spec | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/gd.spec b/gd.spec index 3f7b762..d3f5d5c 100644 --- a/gd.spec +++ b/gd.spec @@ -12,6 +12,12 @@ #global commit 725ba9de4005144d137d2a7a70f760068fc3d306 #global short %%(c=%%{commit}; echo ${c:0:7}) +%if 0%{?rhel} >= 7 && 0%{?rhel} <= 8 +%bcond_without bump +%else +%bcond_with bump +%endif + %bcond_without webp %if 0%{?fedora} >= 35 # disabled as breaks vertical text @@ -45,13 +51,13 @@ %endif Summary: A graphics library for quick creation of PNG or JPEG images -%if 0%{?fedora} >= 20 || 0%{?rhel} >= 8 -Name: gd +%if %{with bump} +Name: gd3php %else -Name: gd-last +Name: gd %endif Version: 2.3.3 -Release: 3%{?prever}%{?short}%{?dist} +Release: 4%{?prever}%{?short}%{?dist} License: MIT URL: http://libgd.github.io/ %if 0%{?commit:1} @@ -66,6 +72,9 @@ Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/li Patch0: libgd-flip.patch # Missing header see https://github.com/libgd/libgd/pull/766 Patch1: libgd-iostream.patch +# But soname for PHP usage +Patch2: libgd-bumpsoname.patch + BuildRequires: freetype-devel BuildRequires: fontconfig-devel @@ -103,10 +112,6 @@ BuildRequires: perl(FindBin) # for fontconfig/basic test BuildRequires: liberation-sans-fonts -%if "%{name}" != "gd-last" -Obsoletes: gd-last <= %{version} -%endif - %description The gd graphics library allows your code to quickly draw images @@ -120,11 +125,9 @@ browsers. Note that gd is not a paint program. %package progs Requires: %{name}%{?_isa} = %{version}-%{release} Summary: Utility programs that use libgd -%if "%{name}" == "gd-last" +%if %{with bump} Conflicts: gd-progs < %{version} Provides: gd-progs = %{version}-%{release} -%else -Obsoletes: gd-last-progs <= %{version} %endif %description progs @@ -159,11 +162,9 @@ Requires: libavif-devel Requires: libheif-devel %endif -%if "%{name}" == "gd-last" +%if %{with bump} Conflicts: gd-devel < %{version} Provides: gd-devel = %{version}-%{release} -%else -Obsoletes: gd-last-devel <= %{version} %endif @@ -176,6 +177,9 @@ files for gd, a graphics library for creating PNG and JPEG graphics. %setup -q -n libgd-%{version}%{?prever:-%{prever}} %patch0 -p1 %patch1 -p1 +%if %{with bump} +%patch2 -p1 +%endif : $(perl config/getver.pl) @@ -274,7 +278,11 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc %files %{!?_licensedir:%global license %%doc} %license COPYING -%{_libdir}/*.so.* +%if %{with bump} +%{_libdir}/*.so.103* +%else +%{_libdir}/*.so.3* +%endif %files progs %{_bindir}/* @@ -286,6 +294,10 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc %changelog +* Thu Dec 2 2021 Remi Collet - 2.3.3-4 +- rename to gd3php on EL-7 and EL-8 + https://github.com/remicollet/remirepo/issues/194 + * Fri Nov 19 2021 Remi Collet - 2.3.3-3 - disable libraqm usage on F35+ -- cgit