diff options
author | Florian Franzmann | 2013-03-20 18:30:27 +0100 |
---|---|---|
committer | Florian Franzmann | 2013-03-20 18:30:44 +0100 |
commit | ffca9177615ae756b6259d8a4d5b3e38bfb59b97 (patch) | |
tree | ae112d3b66755942f5bd48094a225a4fc534dc60 | |
parent | 9866a42d1c297318595af52d2adbd5c16246de08 (diff) |
graphics/xli: version 1.17.0
-rw-r--r-- | graphics/xli/0001-add-missing-include.patch | 24 | ||||
-rwxr-xr-x | graphics/xli/BUILD | 2 | ||||
-rwxr-xr-x | graphics/xli/DETAILS | 13 | ||||
-rw-r--r-- | graphics/xli/HISTORY | 5 | ||||
-rwxr-xr-x | graphics/xli/PRE_BUILD | 27 | ||||
-rw-r--r-- | graphics/xli/fix-scale-zoom.patch | 61 | ||||
-rw-r--r-- | graphics/xli/libpng14.patch | 14 | ||||
-rw-r--r-- | graphics/xli/xli-security-gentoo.diff | 199 |
8 files changed, 56 insertions, 289 deletions
diff --git a/graphics/xli/0001-add-missing-include.patch b/graphics/xli/0001-add-missing-include.patch new file mode 100644 index 0000000000..fe32690a14 --- /dev/null +++ b/graphics/xli/0001-add-missing-include.patch @@ -0,0 +1,24 @@ +From 5d07b7fcd93e0684702484283f897664211b30f5 Mon Sep 17 00:00:00 2001 +From: Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de> +Date: Wed, 20 Mar 2013 18:20:34 +0100 +Subject: [PATCH] add missing include + +--- + ddxli.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ddxli.h b/ddxli.h +index 9122aa7..1dd7837 100644 +--- a/ddxli.h ++++ b/ddxli.h +@@ -13,6 +13,7 @@ + #include <sys/ipc.h> + #include <sys/shm.h> + #include <X11/extensions/XShm.h> ++#include <string.h> + + #if defined(SYSV) || defined(VMS) + #include <string.h> +-- +1.8.1.3 + diff --git a/graphics/xli/BUILD b/graphics/xli/BUILD index 39978a97c3..2ab39ac029 100755 --- a/graphics/xli/BUILD +++ b/graphics/xli/BUILD @@ -1,2 +1,2 @@ xmkmf && -default_build_make +make CDEBUGFLAGS="-Wall $(CFLAGS)" CXXDEBUGFLAGS="$(CXXFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)" PROJECT_DEFINES="$(CPPFLAGS)" diff --git a/graphics/xli/DETAILS b/graphics/xli/DETAILS index 754a0ee647..ee9ad00db7 100755 --- a/graphics/xli/DETAILS +++ b/graphics/xli/DETAILS @@ -1,9 +1,12 @@ SPELL=xli - VERSION=2005-02-27 - SOURCE="${SPELL}-${VERSION}.tar.gz" - SOURCE_URL[0]=http://distfiles.gentoo.org/distfiles/${SOURCE} - SOURCE_HASH=sha512:132b28396ebf3832dc35ff5fa7c102539ef30a194512fe6577ce1432bb84ecd7b4368e75eaf59f26a806900f63e1bfb9a93487ce1ebe3cfef2199256a783ccf7 -SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}" + VERSION=1.17.0+20061110 + SOURCE="${SPELL}_${VERSION}.orig.tar.gz" + SOURCE_URL[0]=http://ftp.debian.org/debian/pool/main/x/xli/${SOURCE} + SOURCE_HASH=sha512:03a1b6d20e71c8b30a04b92718dae05abb2fb7f8ee2b14453cc78957014a12fdbbd888a02ff27edf7be1dff1e4b8159f12ba7270312ffb70c3bb70657e08ede1 + SOURCE2=${SPELL}_${VERSION}-4.diff.gz + SOURCE2_URL[0]=http://ftp.debian.org/debian/pool/main/x/xli/${SOURCE2} + SOURCE2_HASH=sha512:d12489452682333a81a1872ee0730fd40903d312dd741ef70f13dc830aea8d3918d73b45d09016948212458c286b4457b630ae556858abe00d11c978d3bc2558 +SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-2006-11-10" WEB_SITE="http://web.aanet.com.au/gwg/xli.html" LICENSE[0]=MIT ENTERED=20130317 diff --git a/graphics/xli/HISTORY b/graphics/xli/HISTORY index 59dde1ba0d..85efdd8e79 100644 --- a/graphics/xli/HISTORY +++ b/graphics/xli/HISTORY @@ -1,3 +1,8 @@ +2013-03-20 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de> + * BUILD, PRE_BUILD, DETAILS, 0001-add-missing-include.patch: version + 1.17.0 + * fix-scale-zoom.patch, libpng14.patch, xli-security-gentoo.diff: removed + 2013-03-17 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de> * BUILD, DEPENDS, DETAILS, fix-scale-zoom.patch, INSTALL, libpng14.patch, PRE_BUILD, xli-security-gentoo.diff: spell created, patches are from gentoo diff --git a/graphics/xli/PRE_BUILD b/graphics/xli/PRE_BUILD index 28ef520d44..c1b8dfd626 100755 --- a/graphics/xli/PRE_BUILD +++ b/graphics/xli/PRE_BUILD @@ -1,11 +1,20 @@ default_pre_build && cd ${SOURCE_DIRECTORY} && -sedit 's:varargs.h:stdarg.h:' rlelib.c && -sedit "s:zopen:xli_zopen:g" * && -sed -i Imakefile \ - -e '/^DEFINES =/s/$/ -DHAVE_GUNZIP -DHAVE_BUNZIP2 /' \ - -e '/CCOPTIONS =/s/=.*/=/' && -sedit '/^#include "xli.h"/i#undef _BSD_SOURCE' png.c && -patch -p1 < ${SPELL_DIRECTORY}/xli-security-gentoo.diff && -patch -p1 < ${SPELL_DIRECTORY}/fix-scale-zoom.patch && -patch -p0 < ${SPELL_DIRECTORY}/libpng14.patch +zcat ${SOURCE_CACHE}/${SOURCE2} | patch -p1 && + +sedit 's:DEFINES = -DHAS_MEMCPY:DEFINES = -DHAS_MEMCPY -DHAVE_GUNZIP:' ${SOURCE_DIRECTORY}/Imakefile && + +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/manpage.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/8-bit_pallette_support.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/read_past_bufferend_343718.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/security_fixes.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/fillscreen_forall.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/multiple_images_merge.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/xpm_background.patch && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/arrow_keys.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/documentzooming.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/zoom_auto_440768.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/manpage_fixes.diff && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/fix-x-resource-leak && +patch -p1 < ${SOURCE_DIRECTORY}/debian/patches/disable-libjpeg-scaling && +patch -p1 < ${SPELL_DIRECTORY}/0001-add-missing-include.patch diff --git a/graphics/xli/fix-scale-zoom.patch b/graphics/xli/fix-scale-zoom.patch deleted file mode 100644 index 44ee262aee..0000000000 --- a/graphics/xli/fix-scale-zoom.patch +++ /dev/null @@ -1,61 +0,0 @@ -As of jpeg-7, the scale coefficents may be set to non-unitary values by the -initial DCT transform. This caused the original already-scale detection -algorithm in xli to break. - -To avoid this, set the already-scaled marker when we adjust the scale fraction -(that gets passed into the DCT). - -Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> - -diff -Nuar -X x xli-2005-02-27.orig/jpeg.c xli-2005-02-27/jpeg.c ---- xli-2005-02-27.orig/jpeg.c 2005-02-27 16:42:39.000000000 -0800 -+++ xli-2005-02-27/jpeg.c 2009-09-05 15:02:12.462635389 -0700 -@@ -211,7 +211,7 @@ - xli_jpg_err jerr; - Image *image = 0; - byte **rows = 0; -- int i, rowbytes; -+ int i, rowbytes, flags; - - CURRFUNC("jpegLoad"); - zfp = zopen(fullname); -@@ -248,9 +248,13 @@ - if (verbose) - describe_jpeg(&cinfo, fullname); - -+ flags = 0; - if (image_ops->iscale > 0 && image_ops->iscale < 4) { -- cinfo.scale_num = 1; -- cinfo.scale_denom = 1 << image_ops->iscale; -+ flags |= FLAG_ISCALE; -+ //cinfo.scale_num = 1; -+ cinfo.scale_denom *= 1 << image_ops->iscale; -+ if (verbose) -+ printf("scaling to %d/%d\n", cinfo.scale_num, cinfo.scale_denom); - } else if (image_ops->iscale_auto) { - image_ops->iscale = 0; - while (image_ops->iscale < 3 && (cinfo.image_width >> -@@ -258,9 +262,11 @@ - cinfo.image_height >> image_ops->iscale > - globals.dinfo.height * .9)) - image_ops->iscale += 1; -- cinfo.scale_denom = 1 << image_ops->iscale; -+ cinfo.scale_denom *= 1 << image_ops->iscale; -+ if(image_ops->iscale > 0) -+ flags |= FLAG_ISCALE; - if (verbose) -- printf("auto-scaling to 1/%d\n", cinfo.scale_denom); -+ printf("auto-scaling to %d/%d\n", cinfo.scale_num, cinfo.scale_denom); - } - znocache(zfp); - -@@ -288,8 +294,7 @@ - } - - image->gamma = RETURN_GAMMA; -- if (cinfo.scale_denom > 1) -- image->flags |= FLAG_ISCALE; -+ image->flags |= flags; - - rowbytes = cinfo.output_width * cinfo.output_components; - assert(image->pixlen * image->width == rowbytes); diff --git a/graphics/xli/libpng14.patch b/graphics/xli/libpng14.patch deleted file mode 100644 index afb4b24208..0000000000 --- a/graphics/xli/libpng14.patch +++ /dev/null @@ -1,14 +0,0 @@ -http://aur.archlinux.org/packages.php?ID=1676 -http://archwyrm.net/~me/xli-libpng.diff - ---- png.c -+++ png.c -@@ -27,7 +27,7 @@ - if (ret != 8) - return 0; - -- ret = png_check_sig(buf, 8); -+ ret = !png_sig_cmp(buf, 0, 8); - - return (ret); - } diff --git a/graphics/xli/xli-security-gentoo.diff b/graphics/xli/xli-security-gentoo.diff deleted file mode 100644 index 7425e67c7c..0000000000 --- a/graphics/xli/xli-security-gentoo.diff +++ /dev/null @@ -1,199 +0,0 @@ -diff -Nrup xli-2005-02-27/imagetypes.c xli-2005-02-27/imagetypes.c ---- xli-2005-02-27/imagetypes.c 1999-10-24 22:14:57.000000000 -0400 -+++ xli-2005-02-27/imagetypes.c 2005-10-18 07:53:46.000000000 -0400 -@@ -53,7 +53,7 @@ Image *loadImage(ImageOptions * image_op - Image *image; - int a; - -- if (findImage(image_ops->name, fullname) < 0) { -+ if (findImage(image_ops->name, fullname, BUFSIZ) < 0) { - if (errno == ENOENT) - printf("%s: image not found\n", image_ops->name); - else if (errno == EISDIR) -@@ -95,7 +95,7 @@ void identifyImage(char *name) - char fullname[BUFSIZ]; - int a; - -- if (findImage(name, fullname) < 0) { -+ if (findImage(name, fullname, BUFSIZ) < 0) { - if (errno == ENOENT) - printf("%s: image not found\n", name); - else if (errno == EISDIR) -diff -Nrup xli-2005-02-27/path.c xli-2005-02-27/path.c ---- xli-2005-02-27/path.c 2005-02-27 19:42:39.000000000 -0500 -+++ xli-2005-02-27/path.c 2005-10-18 07:56:45.000000000 -0400 -@@ -172,12 +172,12 @@ static int fileIsOk(char *fullname, stru - /* find an image with paths and extensions from defaults files. returns - * -1 if access denied or not found, 0 if ok. - */ --int findImage(char *name, char *fullname) -+int findImage(char *name, char *fullname, size_t size) - { - unsigned int p, e; - struct stat sbuf; - -- strcpy(fullname, name); -+ strncpy(fullname, name, size); - if (!strcmp(name, "stdin")) /* stdin is special name */ - return (0); - -@@ -185,26 +185,26 @@ int findImage(char *name, char *fullname - if (!stat(fullname, &sbuf)) - return (fileIsOk(fullname, &sbuf)); - #ifndef NO_COMPRESS -- strcat(fullname, ".Z"); -+ strncat(fullname, ".Z", size); - if (!stat(fullname, &sbuf)) - return (fileIsOk(fullname, &sbuf)); - #endif - - for (p = 0; p < NumPaths; p++) { -- sprintf(fullname, "%s/%s", Paths[p], name); -+ snprintf(fullname, size, "%s/%s", Paths[p], name); - if (!stat(fullname, &sbuf)) - return (fileIsOk(fullname, &sbuf)); - #ifndef NO_COMPRESS -- strcat(fullname, ".Z"); -+ strncat(fullname, ".Z", size); - if (!stat(fullname, &sbuf)) - #endif - return (fileIsOk(fullname, &sbuf)); - for (e = 0; e < NumExts; e++) { -- sprintf(fullname, "%s/%s%s", Paths[p], name, Exts[e]); -+ snprintf(fullname, size, "%s/%s%s", Paths[p], name, Exts[e]); - if (!stat(fullname, &sbuf)) - return (fileIsOk(fullname, &sbuf)); - #ifndef NO_COMPRESS -- strcat(fullname, ".Z"); -+ strncat(fullname, ".Z", size); - if (!stat(fullname, &sbuf)) - return (fileIsOk(fullname, &sbuf)); - #endif -@@ -212,11 +212,11 @@ int findImage(char *name, char *fullname - } - - for (e = 0; e < NumExts; e++) { -- sprintf(fullname, "%s%s", name, Exts[e]); -+ snprintf(fullname, size, "%s%s", name, Exts[e]); - if (!stat(fullname, &sbuf)) - return (fileIsOk(fullname, &sbuf)); - #ifndef NO_COMPRESS -- strcat(fullname, ".Z"); -+ strncat(fullname, ".Z", size); - if (!stat(fullname, &sbuf)) - return (fileIsOk(fullname, &sbuf)); - #endif -@@ -241,7 +241,7 @@ void listImages(void) - for (a = 0; a < NumPaths; a++) { - printf("%s:\n", Paths[a]); - fflush(stdout); -- sprintf(buf, "ls %s", Paths[a]); -+ snprintf(buf, sizeof(buf)-1, "ls %s", Paths[a]); - if (system(buf) < 0) { - perror("ls"); - return; -@@ -296,14 +296,14 @@ char *expandPath(char *p) - var++; - else if (*p == '~') { - buf1[b1] = '\0'; -- strcat(buf1, getenv("HOME")); -+ strncat(buf1, getenv("HOME"), sizeof(buf1)-1); - b1 = strlen(buf1); - var = 0; - } else if (*p == '/' || *p == '}') { - if (var) { - buf1[b1] = '\0'; - buf2[b2] = '\0'; -- strcat(buf1, getenv(buf2)); -+ strncat(buf1, getenv(buf2), sizeof(buf1)); - b1 = strlen(buf1); - buf2[0] = '\0'; - b2 = 0; -diff -Nrup xli-2005-02-27/reduce.c xli-2005-02-27/reduce.c ---- xli-2005-02-27/reduce.c 1999-10-24 22:15:02.000000000 -0400 -+++ xli-2005-02-27/reduce.c 2005-10-18 07:33:34.000000000 -0400 -@@ -178,7 +178,7 @@ Image *reduce(Image *image, unsigned col - /* get destination image */ - depth = colorsToDepth(OutColors); - new_image = newRGBImage(image->width, image->height, depth); -- sprintf(buf, "%s (%d colors)", image->title, OutColors); -+ snprintf(buf, sizeof(buf)-1, "%s (%d colors)", image->title, OutColors); - new_image->title = dupString(buf); - new_image->gamma = image->gamma; - -diff -Nrup xli-2005-02-27/rlelib.c xli-2005-02-27/rlelib.c ---- xli-2005-02-27/rlelib.c 2005-10-18 07:40:51.000000000 -0400 -+++ xli-2005-02-27/rlelib.c 2005-10-18 07:48:12.000000000 -0400 -@@ -18,7 +18,7 @@ - #undef DEBUG - - #ifdef DEBUG --# define debug(xx) fprintf(stderr,xx) -+# define debug(xx) fprintf(stderr, "%s", xx) - #else - # define debug(xx) - #endif -Files xli-2005-02-27/xli and xli-2005-02-27/xli differ -diff -Nrup xli-2005-02-27/xli.h xli-2005-02-27/xli.h ---- xli-2005-02-27/xli.h 1999-10-24 22:15:07.000000000 -0400 -+++ xli-2005-02-27/xli.h 2005-10-19 07:49:21.000000000 -0400 -@@ -229,7 +229,7 @@ char *xlistrstr(char *s1, char *s2); - - /* path.c */ - char *expandPath(char *p); --int findImage(char *name, char *fullname); -+int findImage(char *name, char *fullname, size_t size); - void listImages(void); - void loadPathsAndExts(void); - void showPath(void); -diff -Nrup xli-2005-02-27/xlito.c xli-2005-02-27/xlito.c ---- xli-2005-02-27/xlito.c 2005-02-27 19:42:39.000000000 -0500 -+++ xli-2005-02-27/xlito.c 2005-10-18 07:48:54.000000000 -0400 -@@ -31,7 +31,7 @@ char *pname, *fname; - #undef DEBUG - - #ifdef DEBUG --# define debug(xx) fprintf(stderr,xx) -+# define debug(xx) fprintf(stderr, "%s", xx) - #else - # define debug(xx) - #endif -diff -Nrup xli-2005-02-27/zoom.c xli-2005-02-27/zoom.c ---- xli-2005-02-27/zoom.c 2005-02-27 19:42:39.000000000 -0500 -+++ xli-2005-02-27/zoom.c 2005-10-18 07:35:42.000000000 -0400 -@@ -52,30 +52,30 @@ Image *zoom(Image *oimage, unsigned int - if (verbose) - printf(" Zooming image Y axis by %d%%...", yzoom); - if (changetitle) -- sprintf(buf, "%s (Y zoom %d%%)", oimage->title, yzoom); -+ snprintf(buf, sizeof(buf)-1, "%s (Y zoom %d%%)", oimage->title, yzoom); - } - else if (!yzoom) { - if (verbose) - printf(" Zooming image X axis by %d%%...", xzoom); - if (changetitle) -- sprintf(buf, "%s (X zoom %d%%)", oimage->title, xzoom); -+ snprintf(buf, sizeof(buf)-1, "%s (X zoom %d%%)", oimage->title, xzoom); - } - else if (xzoom == yzoom) { - if (verbose) - printf(" Zooming image by %d%%...", xzoom); - if (changetitle) -- sprintf(buf, "%s (%d%% zoom)", oimage->title, xzoom); -+ snprintf(buf, sizeof(buf)-1, "%s (%d%% zoom)", oimage->title, xzoom); - } - else { - if (verbose) - printf(" Zooming image X axis by %d%% and Y axis by %d%%...", - xzoom, yzoom); - if (changetitle) -- sprintf(buf, "%s (X zoom %d%% Y zoom %d%%)", oimage->title, -+ snprintf(buf, sizeof(buf)-1, "%s (X zoom %d%% Y zoom %d%%)", oimage->title, - xzoom, yzoom); - } - if (!changetitle) -- strcpy(buf,oimage->title); -+ strncpy(buf,oimage->title, sizeof(buf)-1); - - if (verbose) - fflush(stdout); |