Index: Makefile
===================================================================
--- Makefile (nonexistent)
+++ Makefile (revision 5)
@@ -0,0 +1,58 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url = $(DOWNLOAD_SERVER)/sources/packages/l/giflib
+
+versions = 5.2.1
+pkgname = giflib
+suffix = tar.gz
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+patches = $(CURDIR)/patches/giflib-5.2.1-quantize-buffer.patch
+patches += $(CURDIR)/patches/giflib-5.2.1-format-overflow.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======\n" ; \
+ for tarball in $(tarballs) ; do \
+ echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+ done ; wait
+
+$(sha1s): $(tarballs)
+ @for sha in $@ ; do \
+ echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+ echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+ touch $$sha ; \
+ echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+ sha1sum --check $$sha ; ret="$$?" ; \
+ if [ "$$ret" == "1" ]; then \
+ echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+ exit 1 ; \
+ fi ; \
+ done
+
+$(patches): $(sha1s)
+ @echo -e "\n======= Create Patches =======\n" ; \
+ ( cd create-5.2.1-quantize-buffer-patch ; ./create.patch.sh ) ; \
+ ( cd create-5.2.1-format-overflow-patch ; ./create.patch.sh ) ; \
+ echo -e "\n"
+
+download_clean:
+ @rm -f $(tarballs) $(sha1s) $(patches)
Index: create-5.2.1-format-overflow-patch/create.patch.sh
===================================================================
--- create-5.2.1-format-overflow-patch/create.patch.sh (nonexistent)
+++ create-5.2.1-format-overflow-patch/create.patch.sh (revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=5.2.1
+
+tar --files-from=file.list -xzvf ../giflib-$VERSION.tar.gz
+mv giflib-$VERSION giflib-$VERSION-orig
+
+cp -rf ./giflib-$VERSION-new ./giflib-$VERSION
+
+diff --unified -Nr giflib-$VERSION-orig giflib-$VERSION > giflib-$VERSION-format-overflow.patch
+
+mv giflib-$VERSION-format-overflow.patch ../patches
+
+rm -rf ./giflib-$VERSION
+rm -rf ./giflib-$VERSION-orig
Property changes on: create-5.2.1-format-overflow-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-5.2.1-format-overflow-patch/file.list
===================================================================
--- create-5.2.1-format-overflow-patch/file.list (nonexistent)
+++ create-5.2.1-format-overflow-patch/file.list (revision 5)
@@ -0,0 +1 @@
+giflib-5.2.1/giftool.c
Index: create-5.2.1-format-overflow-patch/giflib-5.2.1-new/giftool.c
===================================================================
--- create-5.2.1-format-overflow-patch/giflib-5.2.1-new/giftool.c (nonexistent)
+++ create-5.2.1-format-overflow-patch/giflib-5.2.1-new/giftool.c (revision 5)
@@ -0,0 +1,580 @@
+/****************************************************************************
+
+giftool.c - GIF transformation tool.
+
+SPDX-License-Identifier: MIT
+
+****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <stdbool.h>
+
+#include "getopt.h"
+#include "gif_lib.h"
+#include "getarg.h"
+
+#define PROGRAM_NAME "giftool"
+
+#define MAX_OPERATIONS 256
+#define MAX_IMAGES 2048
+
+enum boolmode {numeric, onoff, tf, yesno};
+
+char *putbool(bool flag, enum boolmode mode)
+{
+ if (flag)
+ switch (mode) {
+ case numeric: return "1"; break;
+ case onoff: return "on"; break;
+ case tf: return "true"; break;
+ case yesno: return "yes"; break;
+ }
+ else
+ switch (mode) {
+ case numeric: return "0"; break;
+ case onoff: return "off"; break;
+ case tf: return "false"; break;
+ case yesno: return "no"; break;
+ }
+
+ return "FAIL"; /* should never happen */
+}
+
+bool getbool(char *from)
+{
+ struct valmap {char *name; bool val;}
+ boolnames[] = {
+ {"yes", true},
+ {"on", true},
+ {"1", true},
+ {"t", true},
+ {"no", false},
+ {"off", false},
+ {"0", false},
+ {"f", false},
+ {NULL, false},
+ }, *sp;
+
+ for (sp = boolnames; sp->name; sp++)
+ if (strcmp(sp->name, from) == 0)
+ return sp->val;
+
+ if( sp && sp->name )
+ (void)fprintf(stderr,
+ "giftool: %s is not a valid boolean argument.\n",
+ sp->name);
+ exit(EXIT_FAILURE);
+}
+
+struct operation {
+ enum {
+ aspect,
+ delaytime,
+ background,
+ info,
+ interlace,
+ position,
+ screensize,
+ transparent,
+ userinput,
+ disposal,
+ } mode;
+ union {
+ GifByteType numerator;
+ int delay;
+ int color;
+ int dispose;
+ char *format;
+ bool flag;
+ struct {
+ int x, y;
+ } p;
+ };
+};
+
+int main(int argc, char **argv)
+{
+ extern char *optarg; /* set by getopt */
+ extern int optind; /* set by getopt */
+ struct operation operations[MAX_OPERATIONS];
+ struct operation *top = operations;
+ int selected[MAX_IMAGES], nselected = 0;
+ bool have_selection = false;
+ char *cp;
+ int i, status, ErrorCode;
+ GifFileType *GifFileIn, *GifFileOut = (GifFileType *)NULL;
+ struct operation *op;
+
+ /*
+ * Gather operations from the command line. We use regular
+ * getopt(3) here rather than Gershom's argument getter because
+ * preserving the order of operations is important.
+ */
+ while ((status = getopt(argc, argv, "a:b:d:f:i:n:p:s:u:x:")) != EOF)
+ {
+ if (top >= operations + MAX_OPERATIONS) {
+ (void)fprintf(stderr, "giftool: too many operations.");
+ exit(EXIT_FAILURE);
+ }
+
+ switch (status)
+ {
+ case 'a':
+ top->mode = aspect;
+ top->numerator = (GifByteType)atoi(optarg);
+ break;
+
+ case 'b':
+ top->mode = background;
+ top->color = atoi(optarg);
+ break;
+
+ case 'd':
+ top->mode = delaytime;
+ top->delay = atoi(optarg);
+ break;
+
+ case 'f':
+ top->mode = info;
+ top->format = optarg;
+ break;
+
+ case 'i':
+ top->mode = interlace;
+ top->flag = getbool(optarg);
+ break;
+
+ case 'n':
+ have_selection = true;
+ nselected = 0;
+ cp = optarg;
+ for (;;)
+ {
+ size_t span = strspn(cp, "0123456789");
+
+ if (span > 0)
+ {
+ selected[nselected++] = atoi(cp)-1;
+ cp += span;
+ if (*cp == '\0')
+ break;
+ else if (*cp == ',')
+ continue;
+ }
+
+ (void) fprintf(stderr, "giftool: bad selection.\n");
+ exit(EXIT_FAILURE);
+ }
+ break;
+
+ case 'p':
+ case 's':
+ if (status == 'p')
+ top->mode = position;
+ else
+ top->mode = screensize;
+ cp = strchr(optarg, ',');
+ if (cp == NULL)
+ {
+ (void) fprintf(stderr, "giftool: missing comma in coordinate pair.\n");
+ exit(EXIT_FAILURE);
+ }
+ top->p.x = atoi(optarg);
+ top->p.y = atoi(cp+1);
+ if (top->p.x < 0 || top->p.y < 0)
+ {
+ (void) fprintf(stderr, "giftool: negative coordinate.\n");
+ exit(EXIT_FAILURE);
+ }
+ break;
+
+ case 'u':
+ top->mode = userinput;
+ top->flag = getbool(optarg);
+ break;
+
+ case 'x':
+ top->mode = disposal;
+ top->dispose = atoi(optarg);
+ break;
+
+ default:
+ fprintf(stderr, "usage: giftool [-b color] [-d delay] [-iI] [-t color] -[uU] [-x disposal]\n");
+ break;
+ }
+
+ ++top;
+ }
+
+ /* read in a GIF */
+ if ((GifFileIn = DGifOpenFileHandle(0, &ErrorCode)) == NULL) {
+ PrintGifError(ErrorCode);
+ exit(EXIT_FAILURE);
+ }
+ if (DGifSlurp(GifFileIn) == GIF_ERROR) {
+ PrintGifError(GifFileIn->Error);
+ exit(EXIT_FAILURE);
+ }
+ if ((GifFileOut = EGifOpenFileHandle(1, &ErrorCode)) == NULL) {
+ PrintGifError(ErrorCode);
+ exit(EXIT_FAILURE);
+ }
+
+ /* if the selection is defaulted, compute it; otherwise bounds-check it */
+ if (!have_selection)
+ for (i = nselected = 0; i < GifFileIn->ImageCount; i++)
+ selected[nselected++] = i;
+ else
+ for (i = 0; i < nselected; i++)
+ if (selected[i] >= GifFileIn->ImageCount || selected[i] < 0)
+ {
+ (void) fprintf(stderr,
+ "giftool: selection index out of bounds.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ /* perform the operations we've gathered */
+ for (op = operations; op < top; op++)
+ switch (op->mode)
+ {
+ case background:
+ GifFileIn->SBackGroundColor = op->color;
+ break;
+
+ case delaytime:
+ for (i = 0; i < nselected; i++)
+ {
+ GraphicsControlBlock gcb;
+
+ DGifSavedExtensionToGCB(GifFileIn, selected[i], &gcb);
+ gcb.DelayTime = op->delay;
+ EGifGCBToSavedExtension(&gcb, GifFileIn, selected[i]);
+ }
+ break;
+
+ case info:
+ for (i = 0; i < nselected; i++) {
+ SavedImage *ip = &GifFileIn->SavedImages[selected[i]];
+ GraphicsControlBlock gcb;
+ for (cp = op->format; *cp; cp++) {
+ if (*cp == '\\')
+ {
+ char c;
+ switch (*++cp)
+ {
+ case 'b':
+ (void)putchar('\b');
+ break;
+ case 'e':
+ (void)putchar(0x1b);
+ break;
+ case 'f':
+ (void)putchar('\f');
+ break;
+ case 'n':
+ (void)putchar('\n');
+ break;
+ case 'r':
+ (void)putchar('\r');
+ break;
+ case 't':
+ (void)putchar('\t');
+ break;
+ case 'v':
+ (void)putchar('\v');
+ break;
+ case 'x':
+ switch (*++cp) {
+ case '0':
+ c = (char)0x00;
+ break;
+ case '1':
+ c = (char)0x10;
+ break;
+ case '2':
+ c = (char)0x20;
+ break;
+ case '3':
+ c = (char)0x30;
+ break;
+ case '4':
+ c = (char)0x40;
+ break;
+ case '5':
+ c = (char)0x50;
+ break;
+ case '6':
+ c = (char)0x60;
+ break;
+ case '7':
+ c = (char)0x70;
+ break;
+ case '8':
+ c = (char)0x80;
+ break;
+ case '9':
+ c = (char)0x90;
+ break;
+ case 'A':
+ case 'a':
+ c = (char)0xa0;
+ break;
+ case 'B':
+ case 'b':
+ c = (char)0xb0;
+ break;
+ case 'C':
+ case 'c':
+ c = (char)0xc0;
+ break;
+ case 'D':
+ case 'd':
+ c = (char)0xd0;
+ break;
+ case 'E':
+ case 'e':
+ c = (char)0xe0;
+ break;
+ case 'F':
+ case 'f':
+ c = (char)0xf0;
+ break;
+ default:
+ return -1;
+ }
+ switch (*++cp) {
+ case '0':
+ c += 0x00;
+ break;
+ case '1':
+ c += 0x01;
+ break;
+ case '2':
+ c += 0x02;
+ break;
+ case '3':
+ c += 0x03;
+ break;
+ case '4':
+ c += 0x04;
+ break;
+ case '5':
+ c += 0x05;
+ break;
+ case '6':
+ c += 0x06;
+ break;
+ case '7':
+ c += 0x07;
+ break;
+ case '8':
+ c += 0x08;
+ break;
+ case '9':
+ c += 0x09;
+ break;
+ case 'A':
+ case 'a':
+ c += 0x0a;
+ break;
+ case 'B':
+ case 'b':
+ c += 0x0b;
+ break;
+ case 'C':
+ case 'c':
+ c += 0x0c;
+ break;
+ case 'D':
+ case 'd':
+ c += 0x0d;
+ break;
+ case 'E':
+ case 'e':
+ c += 0x0e;
+ break;
+ case 'F':
+ case 'f':
+ c += 0x0f;
+ break;
+ default:
+ return -2;
+ }
+ putchar(c);
+ break;
+ default:
+ putchar(*cp);
+ break;
+ }
+ }
+ else if (*cp == '%')
+ {
+ enum boolmode boolfmt;
+ SavedImage *sp = &GifFileIn->SavedImages[i];
+
+ if (cp[1] == 't') {
+ boolfmt = tf;
+ ++cp;
+ } else if (cp[1] == 'o') {
+ boolfmt = onoff;
+ ++cp;
+ } else if (cp[1] == 'y') {
+ boolfmt = yesno;
+ ++cp;
+ } else if (cp[1] == '1') {
+ boolfmt = numeric;
+ ++cp;
+ } else
+ boolfmt = numeric;
+
+ switch (*++cp)
+ {
+ case '%':
+ putchar('%');
+ break;
+ case 'a':
+ (void)printf("%d", GifFileIn->AspectByte);
+ break;
+ case 'b':
+ (void)printf("%d", GifFileIn->SBackGroundColor);
+ break;
+ case 'd':
+ DGifSavedExtensionToGCB(GifFileIn,
+ selected[i],
+ &gcb);
+ (void)printf("%d", gcb.DelayTime);
+ break;
+ case 'h':
+ (void)printf("%d", ip->ImageDesc.Height);
+ break;
+ case 'n':
+ (void)printf("%d", selected[i]+1);
+ break;
+ case 'p':
+ (void)printf("%d,%d",
+ ip->ImageDesc.Left, ip->ImageDesc.Top);
+ break;
+ case 's':
+ (void)printf("%d,%d",
+ GifFileIn->SWidth,
+ GifFileIn->SHeight);
+ break;
+ case 'w':
+ (void)printf("%d", ip->ImageDesc.Width);
+ break;
+ case 't':
+ DGifSavedExtensionToGCB(GifFileIn,
+ selected[i],
+ &gcb);
+ (void)printf("%d", gcb.TransparentColor);
+ break;
+ case 'u':
+ DGifSavedExtensionToGCB(GifFileIn,
+ selected[i],
+ &gcb);
+ (void)printf("%s", putbool(gcb.UserInputFlag, boolfmt));
+ break;
+ case 'v':
+ fputs(EGifGetGifVersion(GifFileIn), stdout);
+ break;
+ case 'x':
+ DGifSavedExtensionToGCB(GifFileIn,
+ selected[i],
+ &gcb);
+ (void)printf("%d", gcb.DisposalMode);
+ break;
+ case 'z':
+ (void) printf("%s", putbool(sp->ImageDesc.ColorMap && sp->ImageDesc.ColorMap->SortFlag, boolfmt));
+ break;
+ default:
+ (void)fprintf(stderr,
+ "giftool: bad format %%%c\n", *cp);
+ }
+ }
+ else
+ (void)putchar(*cp);
+ }
+ }
+ exit(EXIT_SUCCESS);
+ break;
+
+ case interlace:
+ for (i = 0; i < nselected; i++)
+ GifFileIn->SavedImages[selected[i]].ImageDesc.Interlace = op->flag;
+ break;
+
+ case position:
+ for (i = 0; i < nselected; i++) {
+ GifFileIn->SavedImages[selected[i]].ImageDesc.Left = op->p.x;
+ GifFileIn->SavedImages[selected[i]].ImageDesc.Top = op->p.y;
+ }
+ break;
+
+ case screensize:
+ GifFileIn->SWidth = op->p.x;
+ GifFileIn->SHeight = op->p.y;
+ break;
+
+ case transparent:
+ for (i = 0; i < nselected; i++)
+ {
+ GraphicsControlBlock gcb;
+
+ DGifSavedExtensionToGCB(GifFileIn, selected[i], &gcb);
+ gcb.TransparentColor = op->color;
+ EGifGCBToSavedExtension(&gcb, GifFileIn, selected[i]);
+ }
+ break;
+
+ case userinput:
+ for (i = 0; i < nselected; i++)
+ {
+ GraphicsControlBlock gcb;
+
+ DGifSavedExtensionToGCB(GifFileIn, selected[i], &gcb);
+ gcb.UserInputFlag = op->flag;
+ EGifGCBToSavedExtension(&gcb, GifFileIn, selected[i]);
+ }
+ break;
+
+ case disposal:
+ for (i = 0; i < nselected; i++)
+ {
+ GraphicsControlBlock gcb;
+
+ DGifSavedExtensionToGCB(GifFileIn, selected[i], &gcb);
+ gcb.DisposalMode = op->dispose;
+ EGifGCBToSavedExtension(&gcb, GifFileIn, selected[i]);
+ }
+ break;
+
+ default:
+ (void)fprintf(stderr, "giftool: unknown operation mode\n");
+ exit(EXIT_FAILURE);
+ }
+
+ /* write out the results */
+ GifFileOut->SWidth = GifFileIn->SWidth;
+ GifFileOut->SHeight = GifFileIn->SHeight;
+ GifFileOut->SColorResolution = GifFileIn->SColorResolution;
+ GifFileOut->SBackGroundColor = GifFileIn->SBackGroundColor;
+ if (GifFileIn->SColorMap != NULL)
+ GifFileOut->SColorMap = GifMakeMapObject(
+ GifFileIn->SColorMap->ColorCount,
+ GifFileIn->SColorMap->Colors);
+
+ for (i = 0; i < GifFileIn->ImageCount; i++)
+ (void) GifMakeSavedImage(GifFileOut, &GifFileIn->SavedImages[i]);
+
+ if (EGifSpew(GifFileOut) == GIF_ERROR)
+ PrintGifError(GifFileOut->Error);
+ else if (DGifCloseFile(GifFileIn, &ErrorCode) == GIF_ERROR)
+ PrintGifError(ErrorCode);
+
+ return 0;
+}
+
+/* end */
Index: create-5.2.1-format-overflow-patch/giflib-5.2.1-new
===================================================================
--- create-5.2.1-format-overflow-patch/giflib-5.2.1-new (nonexistent)
+++ create-5.2.1-format-overflow-patch/giflib-5.2.1-new (revision 5)
Property changes on: create-5.2.1-format-overflow-patch/giflib-5.2.1-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-5.2.1-format-overflow-patch
===================================================================
--- create-5.2.1-format-overflow-patch (nonexistent)
+++ create-5.2.1-format-overflow-patch (revision 5)
Property changes on: create-5.2.1-format-overflow-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-5.2.1-quantize-buffer-patch/create.patch.sh
===================================================================
--- create-5.2.1-quantize-buffer-patch/create.patch.sh (nonexistent)
+++ create-5.2.1-quantize-buffer-patch/create.patch.sh (revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=5.2.1
+
+tar --files-from=file.list -xzvf ../giflib-$VERSION.tar.gz
+mv giflib-$VERSION giflib-$VERSION-orig
+
+cp -rf ./giflib-$VERSION-new ./giflib-$VERSION
+
+diff --unified -Nr giflib-$VERSION-orig giflib-$VERSION > giflib-$VERSION-quantize-buffer.patch
+
+mv giflib-$VERSION-quantize-buffer.patch ../patches
+
+rm -rf ./giflib-$VERSION
+rm -rf ./giflib-$VERSION-orig
Property changes on: create-5.2.1-quantize-buffer-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-5.2.1-quantize-buffer-patch/file.list
===================================================================
--- create-5.2.1-quantize-buffer-patch/file.list (nonexistent)
+++ create-5.2.1-quantize-buffer-patch/file.list (revision 5)
@@ -0,0 +1 @@
+giflib-5.2.1/Makefile
Index: create-5.2.1-quantize-buffer-patch/giflib-5.2.1-new/Makefile
===================================================================
--- create-5.2.1-quantize-buffer-patch/giflib-5.2.1-new/Makefile (nonexistent)
+++ create-5.2.1-quantize-buffer-patch/giflib-5.2.1-new/Makefile (revision 5)
@@ -0,0 +1,173 @@
+# Top-level Unix makefile for the GIFLIB package
+# Should work for all Unix versions
+#
+# If your platform has the OpenBSD reallocarray(3) call, you may
+# add -DHAVE_REALLOCARRAY to CFLAGS to use that, saving a bit
+# of code space in the shared library.
+
+#
+OFLAGS = -O0 -g
+OFLAGS = -O2
+CFLAGS = -std=gnu99 -fPIC -Wall -Wno-format-truncation $(OFLAGS)
+
+SHELL = /bin/sh
+TAR = tar
+INSTALL = install
+
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+INCDIR = $(PREFIX)/include
+LIBDIR = $(PREFIX)/lib
+MANDIR = $(PREFIX)/share/man
+
+# No user-serviceable parts below this line
+
+VERSION:=$(shell ./getversion)
+LIBMAJOR=7
+LIBMINOR=2
+LIBPOINT=0
+LIBVER=$(LIBMAJOR).$(LIBMINOR).$(LIBPOINT)
+
+SOURCES = dgif_lib.c egif_lib.c gifalloc.c gif_err.c gif_font.c \
+ gif_hash.c openbsd-reallocarray.c
+HEADERS = gif_hash.h gif_lib.h gif_lib_private.h
+OBJECTS = $(SOURCES:.c=.o)
+
+USOURCES = qprintf.c quantize.c getarg.c
+UHEADERS = getarg.h
+UOBJECTS = $(USOURCES:.c=.o)
+
+# Some utilities are installed
+INSTALLABLE = \
+ gif2rgb \
+ gifbuild \
+ giffix \
+ giftext \
+ giftool \
+ gifclrmp
+
+# Some utilities are only used internally for testing.
+# There is a parallel list in doc/Makefile.
+# These are all candidates for removal in future releases.
+UTILS = $(INSTALLABLE) \
+ gifbg \
+ gifcolor \
+ gifecho \
+ giffilter \
+ gifhisto \
+ gifinto \
+ gifsponge \
+ gifwedge
+
+LDLIBS=libgif.a -lm
+
+all: libgif.so libgif.a libutil.so libutil.a $(UTILS)
+ $(MAKE) -C doc
+
+$(UTILS):: libgif.a libutil.a
+
+libgif.so: $(OBJECTS) $(HEADERS) $(UOBJECTS)
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libgif.so.$(LIBMAJOR) -o libgif.so $(OBJECTS) $(UOBJECTS)
+
+libgif.a: $(OBJECTS) $(HEADERS)
+ $(AR) rcs libgif.a $(OBJECTS)
+
+libutil.so: $(UOBJECTS) $(UHEADERS)
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libutil.so.$(LIBMAJOR) -o libutil.so $(UOBJECTS)
+
+libutil.a: $(UOBJECTS) $(UHEADERS)
+ $(AR) rcs libutil.a $(UOBJECTS)
+
+clean:
+ rm -f $(UTILS) $(TARGET) libgetarg.a libgif.a libgif.so libutil.a libutil.so *.o
+ rm -f libgif.so.$(LIBMAJOR).$(LIBMINOR).$(LIBPOINT)
+ rm -f libgif.so.$(LIBMAJOR)
+ rm -fr doc/*.1 *.html doc/staging
+
+check: all
+ $(MAKE) -C tests
+
+# Installation/uninstallation
+
+install: all install-bin install-include install-lib install-man
+install-bin: $(INSTALLABLE)
+ $(INSTALL) -d "$(DESTDIR)$(BINDIR)"
+ $(INSTALL) $^ "$(DESTDIR)$(BINDIR)"
+install-include:
+ $(INSTALL) -d "$(DESTDIR)$(INCDIR)"
+ $(INSTALL) -m 644 gif_lib.h "$(DESTDIR)$(INCDIR)"
+install-lib:
+ $(INSTALL) -d "$(DESTDIR)$(LIBDIR)"
+ $(INSTALL) -m 644 libgif.a "$(DESTDIR)$(LIBDIR)/libgif.a"
+ $(INSTALL) -m 755 libgif.so "$(DESTDIR)$(LIBDIR)/libgif.so.$(LIBVER)"
+ ln -sf libgif.so.$(LIBVER) "$(DESTDIR)$(LIBDIR)/libgif.so.$(LIBMAJOR)"
+ ln -sf libgif.so.$(LIBMAJOR) "$(DESTDIR)$(LIBDIR)/libgif.so"
+install-man:
+ $(INSTALL) -d "$(DESTDIR)$(MANDIR)/man1"
+ $(INSTALL) -m 644 doc/*.1 "$(DESTDIR)$(MANDIR)/man1"
+uninstall: uninstall-man uninstall-include uninstall-lib uninstall-bin
+uninstall-bin:
+ cd "$(DESTDIR)$(BINDIR)" && rm -f $(INSTALLABLE)
+uninstall-include:
+ rm -f "$(DESTDIR)$(INCDIR)/gif_lib.h"
+uninstall-lib:
+ cd "$(DESTDIR)$(LIBDIR)" && \
+ rm -f libgif.a libgif.so libgif.so.$(LIBMAJOR) libgif.so.$(LIBVER)
+uninstall-man:
+ cd "$(DESTDIR)$(MANDIR)/man1" && rm -f $(shell cd doc >/dev/null && echo *.1)
+
+# Make distribution tarball
+#
+# We include all of the XML, and also generated manual pages
+# so people working from the distribution tarball won't need xmlto.
+
+EXTRAS = README \
+ NEWS \
+ TODO \
+ COPYING \
+ getversion \
+ ChangeLog \
+ build.adoc \
+ history.adoc \
+ control \
+ doc/whatsinagif \
+ doc/gifstandard \
+
+DSOURCES = Makefile *.[ch]
+DOCS = doc/*.xml doc/*.1 doc/*.html doc/index.html.in doc/00README doc/Makefile
+ALL = $(DSOURCES) $(DOCS) tests pic $(EXTRAS)
+giflib-$(VERSION).tar.gz: $(ALL)
+ $(TAR) --transform='s:^:giflib-$(VERSION)/:' -czf giflib-$(VERSION).tar.gz $(ALL)
+giflib-$(VERSION).tar.bz2: $(ALL)
+ $(TAR) --transform='s:^:giflib-$(VERSION)/:' -cjf giflib-$(VERSION).tar.bz2 $(ALL)
+
+dist: giflib-$(VERSION).tar.gz giflib-$(VERSION).tar.bz2
+
+# Auditing tools.
+
+# Check that getversion hasn't gone pear-shaped.
+version:
+ @echo $(VERSION)
+
+# cppcheck should run clean
+cppcheck:
+ cppcheck --inline-suppr --template gcc --enable=all --suppress=unusedFunction --force *.[ch]
+
+# Verify the build
+distcheck: all
+ $(MAKE) giflib-$(VERSION).tar.gz
+ tar xzvf giflib-$(VERSION).tar.gz
+ $(MAKE) -C giflib-$(VERSION)
+ rm -fr giflib-$(VERSION)
+
+# release using the shipper tool
+release: all distcheck
+ $(MAKE) -C doc website
+ shipper --no-stale version=$(VERSION) | sh -e -x
+ rm -fr doc/staging
+
+# Refresh the website
+refresh: all
+ $(MAKE) -C doc website
+ shipper --no-stale -w version=$(VERSION) | sh -e -x
+ rm -fr doc/staging
Index: create-5.2.1-quantize-buffer-patch/giflib-5.2.1-new
===================================================================
--- create-5.2.1-quantize-buffer-patch/giflib-5.2.1-new (nonexistent)
+++ create-5.2.1-quantize-buffer-patch/giflib-5.2.1-new (revision 5)
Property changes on: create-5.2.1-quantize-buffer-patch/giflib-5.2.1-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-5.2.1-quantize-buffer-patch
===================================================================
--- create-5.2.1-quantize-buffer-patch (nonexistent)
+++ create-5.2.1-quantize-buffer-patch (revision 5)
Property changes on: create-5.2.1-quantize-buffer-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: patches/README
===================================================================
--- patches/README (nonexistent)
+++ patches/README (revision 5)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+ TODO: Leave some comment here.
+
+ * end */
Index: patches
===================================================================
--- patches (nonexistent)
+++ patches (revision 5)
Property changes on: patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: .
===================================================================
--- . (nonexistent)
+++ . (revision 5)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~