]> git.pld-linux.org Git - packages/gd.git/commitdiff
- added missing patch (missing script required to properly set version information) auto/th/gd-2.1.1-4
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 21 Jun 2015 14:33:58 +0000 (16:33 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 21 Jun 2015 14:33:58 +0000 (16:33 +0200)
- added version patch (fixes major and minor in gdlib-config script)
- added liq patch (allow to use libimagequant when using autoconf; ported from cmake files)
- release 4

gd-liq.patch [new file with mode: 0644]
gd-missing.patch [new file with mode: 0644]
gd-version.patch [new file with mode: 0644]
gd.spec

diff --git a/gd-liq.patch b/gd-liq.patch
new file mode 100644 (file)
index 0000000..3ad5467
--- /dev/null
@@ -0,0 +1,23 @@
+--- libgd-2.1.1/configure.ac.orig      2015-06-19 20:50:19.125019013 +0200
++++ libgd-2.1.1/configure.ac   2015-06-21 16:12:24.498467052 +0200
+@@ -154,6 +154,20 @@
+ fi
+ AM_CONDITIONAL([HAVE_LIBPNG], test "$with_png" = yes)
++dnl LIQ
++AC_ARG_WITH(libimagequant,dnl
++[  --with-libimagequant=DIR  where to find the libimagequant library],
++  [if test -d "$withval"; then
++     LDFLAGS="$LDFLAGS -L$withval/lib"
++     CFLAGS="$CFLAGS -I$withval/include"
++   fi])
++
++if test "$with_libimagequant" != no; then
++   AC_CHECK_HEADER([libimagequant.h])
++   AC_CHECK_LIB(imagequant, liq_attr_create,
++     [LIBS="-limagequant $LIBS"])
++fi
++
+ dnl FreeType configure tests snarfed from libwmf ..
+ AC_ARG_WITH(freetype,dnl
+ [  --with-freetype=DIR     where to find the freetype 2.x library]])
diff --git a/gd-missing.patch b/gd-missing.patch
new file mode 100644 (file)
index 0000000..18de618
--- /dev/null
@@ -0,0 +1,45 @@
+--- libgd-2.1.1/config/getver.pl.orig  1970-01-01 01:00:00.000000000 +0100
++++ libgd-2.1.1/config/getver.pl       2015-06-19 20:37:05.518385651 +0200
+@@ -0,0 +1,42 @@
++#!/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
diff --git a/gd-version.patch b/gd-version.patch
new file mode 100644 (file)
index 0000000..9aa5bdb
--- /dev/null
@@ -0,0 +1,11 @@
+--- libgd-2.1.1/configure.ac.orig      2015-06-19 20:38:02.458383261 +0200
++++ libgd-2.1.1/configure.ac   2015-06-19 20:48:54.771689220 +0200
+@@ -27,6 +27,8 @@
+ GDLIB_REVISION=gd_REVISION
+ GDLIB_EXTRA=gd_EXTRA
+ GDLIB_VERSION=gd_PKG_VERSION
++AC_SUBST(GDLIB_MAJOR)
++AC_SUBST(GDLIB_MINOR)
+ # Dynamic library version information
+ # See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
diff --git a/gd.spec b/gd.spec
index 2e782e8b0087720b44186b2a1a6d59301f02d911..4074a2f13911dd14a0fe0d067821c06de7905e31 100644 (file)
--- a/gd.spec
+++ b/gd.spec
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 %bcond_without fontconfig      # fontconfig support
+%bcond_without libimagequant   # LIQ quantization method support
 %bcond_without xpm             # XPM support (requires X11 libs)
 %bcond_without tests           # "make check"
 #
@@ -10,7 +11,7 @@ Summary(pl.UTF-8):    Biblioteka do tworzenia grafiki w formacie PNG, JPEG
 Summary(pt_BR.UTF-8):  Biblioteca para manipulação de imagens
 Name:          gd
 Version:       2.1.1
-Release:       3
+Release:       4
 License:       BSD-like
 Group:         Libraries
 #Source0Download: https://github.com/libgd/libgd/releases
@@ -22,12 +23,16 @@ Patch0:             %{name}-fontpath.patch
 Patch1:                %{name}-2.0.33-BoxBound.patch
 Patch2:                %{name}-loop.patch
 Patch3:                libvpx2.patch
+Patch4:                %{name}-missing.patch
+Patch5:                %{name}-version.patch
+Patch6:                %{name}-liq.patch
 URL:           http://www.libgd.org/
 BuildRequires: autoconf >= 2.54
 BuildRequires: automake
 %{?with_fontconfig:BuildRequires:      fontconfig-devel}
 BuildRequires: freetype-devel >= 1:2.1.10
 BuildRequires: gettext-tools
+%{?with_libimagequant:BuildRequires:   libimagequant-devel}
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel >= 2:1.4.0
 BuildRequires: libtiff-devel >= 4
@@ -87,6 +92,7 @@ Group:                Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      fontconfig-devel
 Requires:      freetype-devel >= 1:2.1.10
+%{?with_libimagequant:Requires:        libimagequant-devel}
 Requires:      libjpeg-devel
 Requires:      libpng-devel
 Requires:      libtiff-devel >= 4
@@ -159,6 +165,9 @@ para uso pelos programas que usam a libgd.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 # hack to avoid inclusion of -s in --ldflags
 %{__sed} -i -e 's,@LDFLAGS@,,g' config/gdlib-config.in
@@ -173,6 +182,7 @@ para uso pelos programas que usam a libgd.
 %{__autoconf}
 %configure \
        %{!?with_fontconfig:--without-fontconfig} \
+       %{!?with_libimagequant:--without-libimagequant} \
        %{!?with_xpm:--without-xpm}
 %{__make}
 
This page took 0.164075 seconds and 4 git commands to generate.