[arch-commits] Commit in giflib/trunk (PKGBUILD giflib-4.2.1-quantize.patch)

2013-07-01 Thread Bartłomiej Piotrowski
Date: Monday, July 1, 2013 @ 21:08:31
  Author: bpiotrowski
Revision: 189260

upgpkg: giflib 4.2.1-3

- another attempt to bring back quantize support (FS#35362)

Modified:
  giflib/trunk/PKGBUILD
  giflib/trunk/giflib-4.2.1-quantize.patch

-+
 PKGBUILD|4 
 giflib-4.2.1-quantize.patch |  465 +-
 2 files changed, 372 insertions(+), 97 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2013-07-01 18:54:09 UTC (rev 189259)
+++ PKGBUILD2013-07-01 19:08:31 UTC (rev 189260)
@@ -6,7 +6,7 @@
 
 pkgname=giflib
 pkgver=4.2.1
-pkgrel=2
+pkgrel=3
 pkgdesc=A library for reading and writing gif images
 url=http://sourceforge.net/projects/giflib/;
 arch=('i686' 'x86_64')
@@ -20,7 +20,7 @@
 
source=(http://downloads.sourceforge.net/sourceforge/giflib/${pkgname}-${pkgver}.tar.bz2
 giflib-4.2.1-quantize.patch)
 md5sums=('bbd3324af24156d5d7e66ab1cee8508d'
- '67e46b344340ac10f4f597d772679f23')
+ '26174405ba886a89b8a4db18fe653a99')
 
 prepare() {
   cd ${pkgname}-${pkgver}

Modified: giflib-4.2.1-quantize.patch
===
--- giflib-4.2.1-quantize.patch 2013-07-01 18:54:09 UTC (rev 189259)
+++ giflib-4.2.1-quantize.patch 2013-07-01 19:08:31 UTC (rev 189260)
@@ -1,39 +1,39 @@
-diff -up giflib-4.2.1/lib/Makefile.in.quantize giflib-4.2.1/lib/Makefile.in
 giflib-4.2.1/lib/Makefile.in.quantize  2012-10-09 00:37:59.0 
-0300
-+++ giflib-4.2.1/lib/Makefile.in   2012-11-17 12:16:04.485736553 -0200
-@@ -77,7 +77,7 @@ am__installdirs = $(DESTDIR)$(libdir)
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libgif_la_DEPENDENCIES =
- am_libgif_la_OBJECTS = dgif_lib.lo egif_lib.lo gif_font.lo gif_hash.lo \
--  gifalloc.lo gif_err.lo
-+  gifalloc.lo gif_err.lo quantize.lo
- libgif_la_OBJECTS = $(am_libgif_la_OBJECTS)
- libgif_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
-   $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-@@ -234,6 +234,7 @@ libgif_la_SOURCES = dgif_lib.c  \
+From 7b01ed05d6c16172bd11a62d9b334f0eb7c5fc1e Mon Sep 17 00:00:00 2001
+From: Eric S. Raymond e...@thyrsus.com
+Date: Sun, 3 Jun 2012 07:59:30 -0400
+Subject: [PATCH] Return QuantizeBuffer() to the core library.
+
+Fulfils SourceForge FR 3531618.
+---
+ NEWS|   2 +
+ lib/Makefile.am |   3 +-
+ lib/gif_lib.h   |   9 ++
+ lib/quantize.c  | 309 
+ util/rgb2gif.c  | 302 --
+ 5 files changed, 322 insertions(+), 303 deletions(-)
+ create mode 100644 lib/quantize.c
+
+index 813a2f8..ae6d5fa 100644
+--- a/lib/Makefile.am
 b/lib/Makefile.am
+@@ -13,7 +13,8 @@ libgif_la_SOURCES = dgif_lib.c  \
gif_hash.h  \
  gifalloc.c  \
  gif_err.c   \
-+quantize.c  \
-   gif_lib_private.h
+-  gif_lib_private.h
++  gif_lib_private.h \
++  quantize.c
  
- libgif_la_LDFLAGS = -version-info @SHLIBVERSION@
-@@ -319,6 +320,7 @@ distclean-compile:
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif_font.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif_hash.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gifalloc.Plo@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quantize.Plo@am__quote@
+ libgif_la_LDFLAGS = -version-info @SHLIBVERSION@ $(LT_LDFLAGS)
+ libgif_la_LIBADD = @DEVS@
+diff --git a/lib/gif_lib.h b/lib/gif_lib.h
+index e942089..73bc437 100644
+--- a/lib/gif_lib.h
 b/lib/gif_lib.h
+@@ -207,6 +207,15 @@ int DGifGetLZCodes(GifFileType *GifFile, int *GifCode);
  
- .c.o:
- @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ 
$
-diff -up giflib-4.2.1/lib/gif_lib.h.quantize giflib-4.2.1/lib/gif_lib.h
 giflib-4.2.1/lib/gif_lib.h.quantize2012-10-09 00:36:32.0 
-0300
-+++ giflib-4.2.1/lib/gif_lib.h 2012-11-17 12:16:04.488735917 -0200
-@@ -180,6 +180,15 @@ int DGifCloseFile(GifFileType * GifFile)
- #define D_GIF_ERR_IMAGE_DEFECT   112
- #define D_GIF_ERR_EOF_TOO_SOON   113
  
-+/**
+ 
/**
 + * O.K., here are the routines from GIF_LIB file QUANTIZE.C.  
 
+**/
 +int QuantizeBuffer(unsigned int Width, unsigned int Height,
@@ -42,37 +42,29 @@
 +   GifByteType * OutputBuffer,
 +   GifColorType * OutputColorMap);
 +
- /* These are legacy.  You probably do not want to call them directly */
- int 

[arch-commits] Commit in giflib/trunk (PKGBUILD giflib-4.2.1-quantize.patch)

2013-06-03 Thread Bartłomiej Piotrowski
Date: Monday, June 3, 2013 @ 09:04:12
  Author: bpiotrowski
Revision: 187001

upgpkg: giflib 4.2.1-2

- add quantize support (FS#35362)

Added:
  giflib/trunk/giflib-4.2.1-quantize.patch
Modified:
  giflib/trunk/PKGBUILD

-+
 PKGBUILD|9 
 giflib-4.2.1-quantize.patch |  404 ++
 2 files changed, 410 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2013-06-03 04:31:08 UTC (rev 187000)
+++ PKGBUILD2013-06-03 07:04:12 UTC (rev 187001)
@@ -6,7 +6,7 @@
 
 pkgname=giflib
 pkgver=4.2.1
-pkgrel=1
+pkgrel=2
 pkgdesc=A library for reading and writing gif images
 url=http://sourceforge.net/projects/giflib/;
 arch=('i686' 'x86_64')
@@ -17,12 +17,15 @@
 conflicts=('libungif')
 replaces=('libungif')
 options=('!libtool')
-source=(http://downloads.sourceforge.net/sourceforge/giflib/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('bbd3324af24156d5d7e66ab1cee8508d')
+source=(http://downloads.sourceforge.net/sourceforge/giflib/${pkgname}-${pkgver}.tar.bz2
+giflib-4.2.1-quantize.patch)
+md5sums=('bbd3324af24156d5d7e66ab1cee8508d'
+ '67e46b344340ac10f4f597d772679f23')
 
 prepare() {
   cd ${pkgname}-${pkgver}
   sed -i -e '/AC_PATH_XTRA/d' -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' 
configure.ac
+  patch -Np1 -i $srcdir/giflib-4.2.1-quantize.patch
   autoreconf -fi
 }
 

Added: giflib-4.2.1-quantize.patch
===
--- giflib-4.2.1-quantize.patch (rev 0)
+++ giflib-4.2.1-quantize.patch 2013-06-03 07:04:12 UTC (rev 187001)
@@ -0,0 +1,404 @@
+diff -up giflib-4.2.1/lib/Makefile.in.quantize giflib-4.2.1/lib/Makefile.in
+--- giflib-4.2.1/lib/Makefile.in.quantize  2012-10-09 00:37:59.0 
-0300
 giflib-4.2.1/lib/Makefile.in   2012-11-17 12:16:04.485736553 -0200
+@@ -77,7 +77,7 @@ am__installdirs = $(DESTDIR)$(libdir)
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+ libgif_la_DEPENDENCIES =
+ am_libgif_la_OBJECTS = dgif_lib.lo egif_lib.lo gif_font.lo gif_hash.lo \
+-  gifalloc.lo gif_err.lo
++  gifalloc.lo gif_err.lo quantize.lo
+ libgif_la_OBJECTS = $(am_libgif_la_OBJECTS)
+ libgif_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+   $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+@@ -234,6 +234,7 @@ libgif_la_SOURCES = dgif_lib.c  \
+   gif_hash.h  \
+ gifalloc.c  \
+ gif_err.c   \
++quantize.c  \
+   gif_lib_private.h
+ 
+ libgif_la_LDFLAGS = -version-info @SHLIBVERSION@
+@@ -319,6 +320,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif_font.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif_hash.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gifalloc.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quantize.Plo@am__quote@
+ 
+ .c.o:
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ 
$
+diff -up giflib-4.2.1/lib/gif_lib.h.quantize giflib-4.2.1/lib/gif_lib.h
+--- giflib-4.2.1/lib/gif_lib.h.quantize2012-10-09 00:36:32.0 
-0300
 giflib-4.2.1/lib/gif_lib.h 2012-11-17 12:16:04.488735917 -0200
+@@ -180,6 +180,15 @@ int DGifCloseFile(GifFileType * GifFile)
+ #define D_GIF_ERR_IMAGE_DEFECT   112
+ #define D_GIF_ERR_EOF_TOO_SOON   113
+ 
++/**
++ * O.K., here are the routines from GIF_LIB file QUANTIZE.C.  
++**/
++int QuantizeBuffer(unsigned int Width, unsigned int Height,
++   int *ColorMapSize, GifByteType * RedInput,
++   GifByteType * GreenInput, GifByteType * BlueInput,
++   GifByteType * OutputBuffer,
++   GifColorType * OutputColorMap);
++
+ /* These are legacy.  You probably do not want to call them directly */
+ int DGifGetScreenDesc(GifFileType * GifFile);
+ int DGifGetRecordType(GifFileType * GifFile, GifRecordType * GifType);
+diff -up giflib-4.2.1/lib/quantize.c.quantize giflib-4.2.1/lib/quantize.c
+--- giflib-4.2.1/lib/quantize.c.quantize   2012-11-17 12:17:44.741435334 
-0200
 giflib-4.2.1/lib/quantize.c2012-11-17 12:16:04.491735283 -0200
+@@ -0,0 +1,332 @@
++/*
++ *   Gif-Lib - Yet another gif library.
++ *
++ * Written by:  Gershon ElberIBM PC Ver 0.1,Jun. 1989
++ 
**
++ * Module to quatize high resolution image into lower one. You may want to
++ * peek into the following article this code is based on:
++ * Color Image Quantization for frame buffer