path: root/gd.spec
diff options
authorRemi Collet <>2013-04-21 17:03:17 +0200
committerRemi Collet <>2013-04-21 17:03:17 +0200
commit64eeb5f34d30b45455fcc3b6c0314a45783b6784 (patch)
treeff5a75464769ecea1c924f235c14fb70e240c1ab /gd.spec
parent6a715214dc1997c7e40ec98c1e103e554d50db7c (diff)
more work:
- gd-2.1.0-multilib.patch - refresh sources (for missing files) - upstream patch for gdCalloc in tests
Diffstat (limited to 'gd.spec')
1 files changed, 16 insertions, 19 deletions
diff --git a/gd.spec b/gd.spec
index fcd1c5b..bf4ee29 100644
--- a/gd.spec
+++ b/gd.spec
@@ -7,8 +7,8 @@ Release: 0.1.preview%{?dist}
Group: System Environment/Libraries
License: MIT
-Patch3: gd-2.0.34-multilib.patch
+Patch1: gd-2.1.0-multilib.patch
Patch4: gd-loop.patch
Patch5: gd-2.0.34-sparc64.patch
Patch6: gd-2.0.35-overflow.patch
@@ -24,17 +24,16 @@ Patch15: gd-sa3.patch
Patch16: gd-sa4.patch
Patch17: gd-aarch64.patch
-Patch20: gd-gdcalloc.patch
BuildRequires: freetype-devel
BuildRequires: fontconfig-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
+BuildRequires: libvpx-devel
BuildRequires: libX11-devel
BuildRequires: libXpm-devel
BuildRequires: zlib-devel
BuildRequires: pkgconfig
+BuildRequires: chrpath
# we need cmake for building test suite
BuildRequires: cmake
@@ -66,6 +65,7 @@ Requires: freetype-devel%{?_isa}
Requires: fontconfig-devel%{?_isa}
Requires: libjpeg-devel%{?_isa}
Requires: libpng-devel%{?_isa}
+Requires: libvpx-devel%{?_isa}
Requires: libX11-devel%{?_isa}
Requires: libXpm-devel%{?_isa}
Requires: zlib-devel%{?_isa}
@@ -78,7 +78,7 @@ files for gd, a graphics library for creating PNG and JPEG graphics.
%setup -q -n gd-%{version}
-#patch3 -p1 -b .mlib
+%patch1 -p1 -b .mlib
#patch4 -p1 -b .loop
#patch6 -p1 -b .overflow
#patch5 -p1 -b .sparc64
@@ -94,19 +94,8 @@ files for gd, a graphics library for creating PNG and JPEG graphics.
#patch16 -p1 -b .sa4
#patch17 -p1 -b .aarch64
-# Missing sources
-sed -e '/SOURCES/s/$/ gd_bmp.c bmp.h gd_tga.c gd_tga.h/' \
- -i src/
-# Export gdCalloc
-%patch20 -p1 -b .gdcalloc
-# Disable failed tests
-sed -e '/bmp_im2im/d' -i tests/bmp/CMakeLists.txt
-sed -e '/gdimageline_aa/d' -i tests/gdimageline/CMakeLists.txt
-# Generate autotool stuff
+# Generate autotool stuff (when build git git archive)
+[ -f configure ] || ./
#cmake -DENABLE_PNG=1 \
@@ -126,10 +115,18 @@ make install INSTALL='install -p' DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%{_libdir}/
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a
+# Using the last resort to remove rpath, another tricks didn't help
+chrpath --delete $RPM_BUILD_ROOT%{_bindir}/{pngtogd,gdparttopng,annotate,gdcmpgif,gdtopng,webpng,pngtogd2,gd2togif,gd2copypal,giftogd2,gd2topng}
pushd tests
+# Disable failed tests
+sed -e '/bmp_im2im/d' -i bmp/CMakeLists.txt
+sed -e '/gdimageline_aa/d' -i gdimageline/CMakeLists.txt
cmake -DBUILD_TEST=1 \
-DGD_INCLUDE_DIR="$top/src" \
-DGD_LIBS_DIR="$top/src/.libs" \