summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-05-28 09:23:50 +0200
committerRemi Collet <fedora@famillecollet.com>2016-05-28 09:23:50 +0200
commit3a68ba3e4962f017f8575ef98fb387d0ca527d40 (patch)
tree23a4674775083f1d2469775992eb1811107f5690
parentbf10ddd51b76640cce8e3fee6d1cc7fdc9e2b33a (diff)
gd-last: 2.2.1
-rw-r--r--gd-2.2.1-fix-unused-variable-in-tests.patch22
-rw-r--r--gd-2.2.1-initialize-full_filename.patch22
-rw-r--r--gd.spec91
-rwxr-xr-xgetver.pl42
4 files changed, 100 insertions, 77 deletions
diff --git a/gd-2.2.1-fix-unused-variable-in-tests.patch b/gd-2.2.1-fix-unused-variable-in-tests.patch
new file mode 100644
index 0000000..837bca8
--- /dev/null
+++ b/gd-2.2.1-fix-unused-variable-in-tests.patch
@@ -0,0 +1,22 @@
+From 7d0d9d2a4f8e48f19e1603c649d4f15d0b9736de Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org>
+Date: Fri, 20 May 2016 10:44:33 +0200
+Subject: [PATCH] Fix error: unused variable in tests/
+
+---
+ tests/gdimagesetpixel/gdeffectoverlay.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tests/gdimagesetpixel/gdeffectoverlay.c b/tests/gdimagesetpixel/gdeffectoverlay.c
+index 5e42547..7f63e17 100644
+--- a/tests/gdimagesetpixel/gdeffectoverlay.c
++++ b/tests/gdimagesetpixel/gdeffectoverlay.c
+@@ -5,8 +5,6 @@ int main()
+ {
+ gdImagePtr im;
+ int x, y, c;
+- FILE *out;
+- char path[1024];
+ int r=0;
+
+
diff --git a/gd-2.2.1-initialize-full_filename.patch b/gd-2.2.1-initialize-full_filename.patch
new file mode 100644
index 0000000..93dfab5
--- /dev/null
+++ b/gd-2.2.1-initialize-full_filename.patch
@@ -0,0 +1,22 @@
+From a184630682c25e314979b459950ec6c81fa82a5f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org>
+Date: Fri, 20 May 2016 10:15:57 +0200
+Subject: [PATCH] Initialize full_filename in tests/gdimagefile/gdnametest.c
+
+---
+ tests/gdimagefile/gdnametest.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/gdimagefile/gdnametest.c b/tests/gdimagefile/gdnametest.c
+index 2be648e..a339e69 100644
+--- a/tests/gdimagefile/gdnametest.c
++++ b/tests/gdimagefile/gdnametest.c
+@@ -84,7 +84,7 @@ do_test() {
+ for (n = 0; names[n].nm; n++) {
+ gdImagePtr orig, copy;
+ int status;
+- char *full_filename;
++ char *full_filename = NULL;
+
+ /* Some image readers are buggy and crash the program so we
+ * skip them. Bug fixers should remove these from the list of
diff --git a/gd.spec b/gd.spec
index 7384008..50a3225 100644
--- a/gd.spec
+++ b/gd.spec
@@ -1,13 +1,21 @@
+# remirepo spec file for gd-last
+# renamed for parallel installation, from:
+#
+# Fedora spec file for gd
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
+# Please preserve changelog entries
+#
#global prever dev
#global commit 725ba9de4005144d137d2a7a70f760068fc3d306
-#global short %(c=%{commit}; echo ${c:0:7})
+#global short %%(c=%%{commit}; echo ${c:0:7})
-# We observe a huge memory consumption on EL-6
-# when libvpx is enabled (~500MB)
-%if 0%{?fedora} < 17 && 0%{?rhel} < 6
-%global with_vpx 0
+%if 0%{?fedora} < 20 && 0%{?rhel} < 6
+%global with_webp 0
%else
-%global with_vpx 1
+%global with_webp 1
%endif
Summary: A graphics library for quick creation of PNG or JPEG images
@@ -16,24 +24,22 @@ Name: gd
%else
Name: gd-last
%endif
-Version: 2.1.1
+Version: 2.2.1
Release: 2%{?prever}%{?short}%{?dist}
Group: System Environment/Libraries
License: MIT
-URL: http://libgd.bitbucket.org/
+URL: http://libgd.github.io/
%if 0%{?commit:1}
-# git clone git@bitbucket.org:libgd/gd-libgd.git; cd gd-libgd
-# git archive --format=tgz --output=libgd-2.1.0-$(git rev-parse master).tgz --prefix=libgd-2.1.0/ master
+# git clone https://github.com/libgd/libgd.git; cd gd-libgd
+# git archive --format=tgz --output=libgd-%{version}-%{commit}.tgz --prefix=libgd-%{version}/ master
Source0: libgd-%{version}-%{commit}.tgz
-# Stable archive (only used in EL-5 for autostuff)
-Source1: https://bitbucket.org/libgd/gd-libgd/downloads/libgd-%{version}-rc2.tar.xz
%else
-Source0: https://bitbucket.org/libgd/gd-libgd/downloads/libgd-%{version}%{?prever:-%{prever}}.tar.xz
+Source0: https://github.com/libgd/libgd/releases/download/gd-%{version}/libgd-%{version}.tar.xz
%endif
-# Missing in official archive, need for autoreconf
-Source2: getver.pl
Patch1: gd-2.1.0-multilib.patch
+Patch2: gd-2.2.1-initialize-full_filename.patch
+Patch3: gd-2.2.1-fix-unused-variable-in-tests.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: freetype-devel
@@ -42,8 +48,8 @@ BuildRequires: gettext-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
-%if %{with_vpx}
-BuildRequires: libvpx-devel
+%if %{with_webp}
+BuildRequires: libwebp-devel
%endif
BuildRequires: libX11-devel
BuildRequires: libXpm-devel
@@ -52,6 +58,10 @@ BuildRequires: pkgconfig
BuildRequires: libtool
BuildRequires: perl
+%if "%{name}" != "gd-last"
+Obsoletes: gd-last <= %{version}
+%endif
+
%description
The gd graphics library allows your code to quickly draw images
@@ -69,6 +79,8 @@ Group: Applications/Multimedia
%if "%{name}" == "gd-last"
Conflicts: gd-progs < %{version}
Provides: gd-progs = %{version}-%{release}
+%else
+Obsoletes: gd-last-progs <= %{version}
%endif
%description progs
@@ -85,8 +97,8 @@ Requires: fontconfig-devel%{?_isa}
Requires: libjpeg-devel%{?_isa}
Requires: libpng-devel%{?_isa}
Requires: libtiff-devel%{?_isa}
-%if %{with_vpx}
-Requires: libvpx-devel%{?_isa}
+%if %{with_webp}
+Requires: libwebp-devel%{?_isa}
%endif
Requires: libX11-devel%{?_isa}
Requires: libXpm-devel%{?_isa}
@@ -95,6 +107,8 @@ Requires: zlib-devel%{?_isa}
%if "%{name}" == "gd-last"
Conflicts: gd-devel < %{version}
Provides: gd-devel = %{version}-%{release}
+%else
+Obsoletes: gd-last-devel <= %{version}
%endif
@@ -106,21 +120,13 @@ files for gd, a graphics library for creating PNG and JPEG graphics.
%prep
%setup -q -n libgd-%{version}%{?prever:-%{prever}}
%patch1 -p1 -b .mlib
-
-# Workaround for https://bugzilla.redhat.com/978415
-touch src/vpx_config.h
-
-# Workaround for missing file
-cp %{SOURCE2} config/getver.pl
+%patch2 -p1 -b .full_filename
+%patch3 -p1 -b .unused-variable
: $(perl config/getver.pl)
# RHEL-5 auto* are too old
-%if 0%{?rhel} == 5
-%if 0%{?commit:1}
-xzcat %{SOURCE1} | \
-tar --extract --file - --keep-newer-files --strip-components 1
-%endif
+%if 0%{?rhel} == 5 || 0%{?rhel} == 6
%else
: regenerate autotool stuff
if [ -f configure ]; then
@@ -141,10 +147,11 @@ CFLAGS="$RPM_OPT_FLAGS -DDEFAULT_FONTPATH='\"\
/usr/share/X11/fonts/Type1:\
/usr/share/fonts/liberation\"'"
-%configure \
-%if %{with_vpx}
- --with-vpx=%{_prefix} \
+%if 0%{?rhel} == 5
+CFLAGS="$CFLAGS -fno-strict-aliasing"
%endif
+
+%configure \
--with-tiff=%{_prefix} \
--disable-rpath
make %{?_smp_mflags}
@@ -157,8 +164,11 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libgd.a
%check
-%if 0%{?fedora} <= 14 && 0%{?rhel} <= 5
-export XFAIL_TESTS="gdimagestringft/gdimagestringft_bbox"
+%if 0%{?rhel} > 0 && 0%{?rhel} <= 6
+export XFAIL_TESTS="freetype/bug00132"
+%endif
+%if 0%{?rhel} > 0 && 0%{?rhel} <= 5
+export XFAIL_TESTS="gdimagestringft/gdimagestringft_bbox $XFAIL_TESTS"
%endif
: Upstream test suite
@@ -194,6 +204,17 @@ grep %{version} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gdlib.pc
%changelog
+* Sat May 28 2016 Remi Collet <remi@fedoraproject.org> - 2.2.1-2
+- Update to 2.2.1 (from Fedora)
+- remove unneeded sources
+- fix EL-5 and EL-6 build
+- obsolete gd-last when needed
+- use libwebp instead of libvpx for webp images
+
+* Fri May 27 2016 Marek Skalicky <mskalick@redhat.com> - 2.2.1-1
+- Upgrade to 2.2.1 release
+- Upstream moved to github.com
+
* Mon Mar 23 2015 Remi Collet <remi@fedoraproject.org> - 2.1.1-2
- fix version in gdlib.pc
diff --git a/getver.pl b/getver.pl
deleted file mode 100755
index 3838952..0000000
--- a/getver.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env perl
-
-# Simple script to extract the version number parts from src/gd.h. If
-# called with the middle word of the version macro, it prints the
-# value of that macro. If called with no argument, it outputs a
-# human-readable version string. This must be run in the project
-# root. It is used by configure.ac and docs/naturaldocs/run_docs.sh.
-
-use strict;
-
-my $key = shift;
-my @version_parts = ();
-
-open FH, "<src/gd.h" # old-style filehandle for max. portability
- or die "Unable to open 'version.h' for reading.\n";
-
-while(<FH>) {
- next unless m{version605b5d1778};
- next unless /^#define\s+GD_([A-Z0-9]+)_VERSION+\s+(\S+)/;
- my ($lk, $lv) = ($1, $2);
- if ($lk eq $key) {
- chomp $lv;
- $lv =~ s/"//g;
-
- print $lv; # no newline
- exit(0); # success!
- }
-
- push @version_parts, $lv if (!$key);
-}
-
-close(FH);
-
-if (scalar @version_parts == 4) {
- my $result = join(".", @version_parts[0..2]);
- $result .= $version_parts[3];
- $result =~ s/"//g;
- print $result;
- exit(0);
-}
-
-exit(1); # failure