Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/10.4-EOL/x11
In directory vz-cvs-3.sog:/tmp/cvs-serv31913

Modified Files:
        xv.info xv.patch 
Log Message:
sync. w/ 10.!4/stable, validated on powerpc-darwin8


Index: xv.patch
===================================================================
RCS file: /cvsroot/fink/dists/10.4/stable/main/finkinfo/10.4-EOL/x11/xv.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xv.patch    11 Jul 2011 04:08:36 -0000      1.1
+++ xv.patch    14 Dec 2011 00:51:14 -0000      1.2
@@ -1,6 +1,6 @@
-diff -Nurd -x'*~' xv-3.10a.20070520/Makefile xv-3.10a.fink/Makefile
---- xv-3.10a.20070520/Makefile 2007-06-01 12:28:16.000000000 -0400
-+++ xv-3.10a.fink/Makefile     2007-06-01 12:29:06.000000000 -0400
+diff -Nurd -x'*~' xv-3.10a.orig/Makefile xv-3.10a/Makefile
+--- xv-3.10a.orig/Makefile     2011-08-11 12:17:34.000000000 -0400
++++ xv-3.10a/Makefile  2011-08-11 12:18:52.000000000 -0400
 @@ -1,7 +1,7 @@
  # Makefile for xv
  
@@ -15,7 +15,7 @@
  
  
 -CCOPTS = -O
-+CCOPTS = -Os -Wall -pipe -I/usr/X11R6/include
++CCOPTS = -Os -Wall -pipe -MD
  #
  # these are the usual optimization and warning options for gcc; all such
  # warnings but one (mktemp() use) have been eliminated (at least on Linux):
@@ -28,6 +28,19 @@
  DESTDIR =
  
  
+@@ -164,10 +164,10 @@
+ #ZLIBDIR = /usr/local
+ #ZLIBDIR = ../../zlib
+ ###
+-ZLIBINC = -I$(ZLIBDIR)/include
++#ZLIBINC = -I$(ZLIBDIR)/include
+ #ZLIBINC = -I$(ZLIBDIR)
+ ###
+-ZLIBLIB = -L$(ZLIBDIR)/lib -lz
++ZLIBLIB = -lz
+ #ZLIBLIB = -L$(ZLIBDIR) -lz
+ #ZLIBLIB = $(ZLIBDIR)/libz.a
+ 
 @@ -182,10 +182,10 @@
  JP2KDIR = /usr/local/lib
  ###
@@ -41,9 +54,18 @@
  
  
  ###
-diff -Nurd -x'*~' xv-3.10a.20070520/vdcomp.c xv-3.10a.fink/vdcomp.c
---- xv-3.10a.20070520/vdcomp.c 2007-06-01 12:28:16.000000000 -0400
-+++ xv-3.10a.fink/vdcomp.c     2007-06-01 12:29:20.000000000 -0400
+@@ -339,7 +339,7 @@
+       $(TIFF) $(TIFFINC) $(PDS) $(JP2K) $(JP2KINC) $(TVL10N) $(MGCSFX) \
+       $(UNIX) $(BSDTYPES) $(RAND) $(MALLOC) $(DXWM) $(MCHN) $(NODIRENT) \
+       $(VPRINTF) $(TIMERS) -DDOCDIR=\"$(DOCDIR)\" \
+-      -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DXVEXECPATH=\"$(LIBDIR)\"
++      -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DXVEXECPATH=\"$(LIBDIR)\" 
-I/usr/X11R6/include
+ 
+ ### remove -lm for BeOS:
+ LIBS = $(TIFFLIB) $(JPEGLIB) $(PNGLIB) $(ZLIBLIB) $(JP2KLIB) -L/usr/X11R6/lib 
-lX11 -lm
+diff -Nurd -x'*~' xv-3.10a.orig/vdcomp.c xv-3.10a/vdcomp.c
+--- xv-3.10a.orig/vdcomp.c     2011-08-11 12:17:34.000000000 -0400
++++ xv-3.10a/vdcomp.c  2011-08-11 12:18:52.000000000 -0400
 @@ -119,7 +119,7 @@
        !defined(__FreeBSD__)               && \
        !defined(__OpenBSD__)               && \
@@ -53,10 +75,22 @@
  
  #    if defined(hp300) || defined(hp800) || defined(NeXT)
  #      include <sys/malloc.h>    /* it's in "sys" on HPs and NeXT */
-diff -Nurd -x'*~' xv-3.10a.20070520/xv.h xv-3.10a.fink/xv.h
---- xv-3.10a.20070520/xv.h     2007-06-01 12:28:16.000000000 -0400
-+++ xv-3.10a.fink/xv.h 2007-06-01 12:29:06.000000000 -0400
-@@ -158,7 +158,7 @@
+diff -Nurd -x'*~' xv-3.10a.orig/xv.h xv-3.10a/xv.h
+--- xv-3.10a.orig/xv.h 2011-08-11 12:17:34.000000000 -0400
++++ xv-3.10a/xv.h      2011-08-11 12:19:03.000000000 -0400
+@@ -16,8 +16,9 @@
+ /* GRR 2nd public jumbo F+E patches:  20050410 */
+ /* GRR 3rd public jumbo F+E patches:  20050501 */
+ /* GRR 4th public jumbo F+E patch:    20070520 */
+-#define REVDATE   "version 3.10a-jumboFix+Enh of 20070520"
+-#define VERSTR    "3.10a-20070520"
++/* GRR 5th public jumbo F+E patch:    200xxxxx (probably mid-2009) */
++#define REVDATE   "version 3.10a-jumboFix+Enh of 20081216 (interim!)"
++#define VERSTR    "3.10a-20081216"
+ 
+ /*
+  * uncomment the following, and modify for your site, but only if you've
+@@ -158,7 +159,7 @@
  
  #ifndef VMS
  #  include <errno.h>
@@ -65,3 +99,297 @@
  #    if !(defined __GLIBC__ && __GLIBC__ >= 2)
         extern int   errno;         /* SHOULD be in errno.h, but often isn't */
         extern char *sys_errlist[]; /* this too... */
+diff -Nurd -x'*~' xv-3.10a.orig/xvdir.c xv-3.10a/xvdir.c
+--- xv-3.10a.orig/xvdir.c      2011-08-11 12:17:34.000000000 -0400
++++ xv-3.10a/xvdir.c   2011-08-11 12:19:03.000000000 -0400
+@@ -539,8 +539,9 @@
+     return -1;
+   }
+ 
+-  /* handle clicks inside the filename box */
+-  if (x > 80 &&
++  /* handle clicks inside the filename box, but only when box is not empty */
++  if (enPos > stPos &&
++      x > 80 &&
+       y > dList.y + (int) dList.h + 30 &&
+       x < 80 + DNAMWIDE+6 &&
+       y < dList.y + (int) dList.h + 30 + LINEHIGH+5) {
+diff -Nurd -x'*~' xv-3.10a.orig/xvgif.c xv-3.10a/xvgif.c
+--- xv-3.10a.orig/xvgif.c      2011-08-11 12:17:34.000000000 -0400
++++ xv-3.10a/xvgif.c   2011-08-11 12:19:03.000000000 -0400
+@@ -700,7 +700,7 @@
+        * associated output code on the output queue.
+        */
+ 
+-      while (CurCode > BitMask) {
++      while (CurCode >= ClearCode) {  /* Joe Zbiciak fix, 20070621 */
+       if (OutCount > 4096) break;   /* corrupt file */
+       OutCode[OutCount++] = Suffix[CurCode];
+       CurCode = Prefix[CurCode];
+diff -Nurd -x'*~' xv-3.10a.orig/xviff.c xv-3.10a/xviff.c
+--- xv-3.10a.orig/xviff.c      2011-08-11 12:17:34.000000000 -0400
++++ xv-3.10a/xviff.c   2011-08-11 12:19:03.000000000 -0400
+@@ -73,6 +73,7 @@
+   int           BMHDok, CMAPok, CAMGok;
+   int           bmhd_width, bmhd_height, bmhd_bitplanes, bmhd_transcol;
+   int           i, j, k, lineskip, colors, fmt;
++  int           npixels = 0; /* needs to be initialized _outside_ while-loop 
*/
+   byte          bmhd_masking, bmhd_compression;
+   long          chunkLen, camg_viewmode;
+   byte          *databuf, *dataptr, *cmapptr, *picptr, *pic, *bodyptr;
+@@ -138,7 +139,6 @@
+      BODY chunk was found or dataptr ran over end of file */
+ 
+   while ((rv<0) && (dataptr < (databuf + filesize))) {
+-    int npixels = 0;
+     chunkLen = (iff_getlong(dataptr + 4) + 1) & 0xfffffffe; /* make even */
+ 
+     if (strncmp((char *) dataptr, "BMHD", (size_t) 4)==0) { /* BMHD chunk? */
+diff -Nurd -x'*~' xv-3.10a.orig/xvmisc.c xv-3.10a/xvmisc.c
+--- xv-3.10a.orig/xvmisc.c     2011-08-11 12:17:34.000000000 -0400
++++ xv-3.10a/xvmisc.c  2011-08-11 12:19:03.000000000 -0400
+@@ -561,10 +561,6 @@
+     if (mgcsfxW) XDestroyWindow(theDisp, mgcsfxW);
+ #endif
+ 
+-#ifdef HAVE_PNG
+-    if (pngW)  XDestroyWindow(theDisp, pngW);
+-#endif
+-
+     /* if NOT using stdcmap for images, free stdcmap */
+     if (colorMapMode != CM_STDCMAP) {
+       int j;
+diff -Nurd -x'*~' xv-3.10a.orig/xvpng.c xv-3.10a/xvpng.c
+--- xv-3.10a.orig/xvpng.c      2007-05-13 20:53:28.000000000 -0400
++++ xv-3.10a/xvpng.c   2011-08-11 12:38:57.000000000 -0400
+@@ -32,6 +32,7 @@
+ #ifdef HAVE_PNG
+ 
+ #include "png.h"
++#include "zlib.h"
+ 
+ /*** Stuff for PNG Dialog box ***/
+ #define PWIDE 318
+@@ -458,7 +459,7 @@
+     FatalError(software);
+   }
+ 
+-  if (setjmp(png_ptr->jmpbuf)) {
++  if (setjmp(png_jmpbuf(png_ptr))) {
+     png_destroy_write_struct(&png_ptr, &info_ptr);
+     return -1;
+   }
+@@ -921,7 +922,7 @@
+     FatalError("malloc failure in LoadPNG");
+   }
+ 
+-  if (setjmp(png_ptr->jmpbuf)) {
++  if (setjmp(png_jmpbuf(png_ptr))) {
+     fclose(fp);
+     png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+     if (!read_anything) {
+@@ -985,7 +986,7 @@
+         ", %sinterlaced. (%d bytes)",
+         info_ptr->interlace_type ? "" : "non-", filesize);
+ 
+-  sprintf(pinfo->shrtInfo, "%lux%lu PNG", info_ptr->width, info_ptr->height);
++  sprintf(pinfo->shrtInfo, "%ux%u PNG", info_ptr->width, info_ptr->height);
+ 
+   if (info_ptr->bit_depth < 8)
+       png_set_packing(png_ptr);
+@@ -1143,7 +1144,7 @@
+ {
+   SetISTR(ISTR_WARNING,"%s:  libpng error: %s", fbasename, message);
+ 
+-  longjmp(png_ptr->jmpbuf, 1);
++  longjmp(png_jmpbuf(png_ptr), 1);
+ }
+ 
+ 
+@@ -1165,7 +1166,7 @@
+ VersionInfoPNG()      /* GRR 19980605 */
+ {
+   fprintf(stderr, "   Compiled with libpng %s; using libpng %s.\n",
+-    PNG_LIBPNG_VER_STRING, png_libpng_ver);
++    PNG_LIBPNG_VER_STRING, png_get_header_ver(NULL));
+   fprintf(stderr, "   Compiled with zlib %s; using zlib %s.\n",
+     ZLIB_VERSION, zlib_version);
+ }
+diff -Nurd -x'*~' xv-3.10a.orig/xvxwd.c xv-3.10a/xvxwd.c
+--- xv-3.10a.orig/xvxwd.c      2011-08-11 12:17:34.000000000 -0400
++++ xv-3.10a/xvxwd.c   2011-08-11 12:19:03.000000000 -0400
+@@ -19,6 +19,12 @@
+  */
+ 
+ #include "xv.h"
++#include <limits.h>             /* for CHAR_BIT */
++
++/* SJT: just in case ... */
++#ifndef CHAR_BIT
++#  define CHAR_BIT 8
++#endif
+ 
+ 
+ /***************************** x11wd.h *****************************/
+@@ -83,9 +89,14 @@
+ static int    writebiglong    PARM((FILE *, CARD32));
+ #endif
+ 
++static void   getcolorshift   PARM((CARD32, int *, int *)); /* SJT */
++
++/* SJT: for 16bpp and 24bpp shifts */
++static int    red_shift_right, red_justify_left,
++              grn_shift_right, grn_justify_left,
++              blu_shift_right, blu_justify_left;
+ static byte  *pic8, *pic24;
+-static CARD32 red_mask, green_mask, blue_mask;
+-static int    red_shift, green_shift, blue_shift;
++static CARD32 red_mask, grn_mask, blu_mask;
+ static int    bits_per_item, bits_used, bit_shift,
+               bits_per_pixel, bits_per_rgb;
+ static char   buf[4];
+@@ -189,38 +200,34 @@
+       return 0;
+     }
+ 
+-    switch (bits_per_pixel) {
+-    case 16:
+-    case 24:
+-    case 32:
+-      ;
+-    default:
+-      xwdError("True/Direct supports only 16, 24, and 32 bits");
+-      return 0;
+-    }
++    for (row=0; row<rows; row++) {
++      for (col=0, xP=pic24+(row*cols*3); col<cols; col++) {
++      CARD32 ul;
+ 
+-    if (byte_order == MSBFirst) {
+-      for (row=0; row<rows; row++) {
+-        for (col=0, xP=pic24+(row*cols*3); col<cols; col++) {
+-          register CARD32 ul = getpixnum(ifp);
++      ul = getpixnum(ifp);
++      switch (bits_per_pixel) {
++        case 16:
++        case 24:
++        case 32:
++          /* SJT: shift all the way to the right and then shift left. The
++             pairs of shifts could be combined. There will be two right and
++             one left shift, but it's unknown which will be which. It seems
++             easier to do the shifts (which might be 0) separately than to
++             have a complex set of tests. I believe this is independent of
++             byte order but I have no way to test.
++           */
++          *xP++ = ((ul & red_mask) >> red_shift_right) << red_justify_left;
++          *xP++ = ((ul & grn_mask) >> grn_shift_right) << grn_justify_left;
++          *xP++ = ((ul & blu_mask) >> blu_shift_right) << blu_justify_left;
++          break;
+ 
+-          *xP++ = ul >> red_shift   & red_mask  ;
+-          *xP++ = ul >> green_shift & green_mask;
+-          *xP++ = ul >> blue_shift  & blue_mask ;
+-        };
+-        for (col=0; col<padright; col++) getpixnum(ifp);
++      default:
++        xwdError("True/Direct supports only 16, 24, and 32 bits");
++        return 0;
++      }
+       }
+-    } else {
+-      for (row=0; row<rows; row++) {
+-        for (col=0, xP=pic24+(row*cols*3); col<cols; col++) {
+-          register CARD32 ul = getpixnum(ifp);
+ 
+-          *xP++ = ul >> blue_shift  & blue_mask ;
+-          *xP++ = ul >> green_shift & green_mask;
+-          *xP++ = ul >> red_shift   & red_mask  ;
+-        };
+-        for (col=0; col<padright; col++) getpixnum(ifp);
+-      }
++      for (col=0; col<padright; col++) getpixnum(ifp);
+     }
+ 
+     pinfo->type = PIC24;
+@@ -445,28 +452,18 @@
+      (i.e., 3 bytes, no alpha/padding) */
+ 
+ 
+-  bits_used      = bits_per_item;
++  bits_used  = bits_per_item;
+ 
+   if (bits_per_pixel == sizeof(pixel_mask) * 8)  pixel_mask = (CARD32) -1;
+   else pixel_mask = (1 << bits_per_pixel) - 1;
+ 
+-  red_mask   = h11P->red_mask;
+-  green_mask = h11P->grn_mask;
+-  blue_mask  = h11P->blu_mask;
++  red_mask = h11P->red_mask;
++  grn_mask = h11P->grn_mask;
++  blu_mask = h11P->blu_mask;
+ 
+-  red_shift = blue_shift = green_shift = 0;
+-  while (!(red_mask & 1)) {
+-    red_mask >>= 1;
+-    ++red_shift;
+-  }
+-  while (!(blue_mask & 1)) {
+-    blue_mask >>= 1;
+-    ++blue_shift;
+-  }
+-  while (!(green_mask & 1)) {
+-    green_mask >>= 1;
+-    ++green_shift;
+-  }
++  getcolorshift(red_mask, &red_shift_right, &red_justify_left);
++  getcolorshift(grn_mask, &grn_shift_right, &grn_justify_left);
++  getcolorshift(blu_mask, &blu_shift_right, &blu_justify_left);
+ 
+   byteP  = (char   *) buf;
+   shortP = (CARD16 *) buf;
+@@ -476,6 +473,45 @@
+ }
+ 
+ 
++/* SJT: figure out the proper shifts */
++static void getcolorshift (CARD32 mask, int *rightshift, int *leftshift)
++{
++  int lshift, rshift;
++  unsigned int uu;
++
++  if (mask == 0)
++  {
++    *rightshift = *leftshift = 0;
++    return;
++  }
++
++  uu = mask;
++  lshift = rshift = 0;
++  while ((uu & 0xf) == 0)
++  {
++      rshift += 4;
++      uu >>= 4;
++  }
++  while ((uu & 1) == 0)
++  {
++      rshift++;
++      uu >>= 1;
++  }
++
++  while (uu != 0)
++  {
++      if (uu & 1)
++      {
++          lshift++;
++          uu >>= 1;
++      }
++  }
++  *rightshift = rshift;
++  *leftshift = CHAR_BIT * sizeof(pixel) - lshift;
++  return;
++}
++
++
+ /******************************/
+ static CARD32 getpixnum(file)
+      FILE* file;

Index: xv.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/stable/main/finkinfo/10.4-EOL/x11/xv.info,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xv.info     11 Jul 2011 04:08:36 -0000      1.1
+++ xv.info     14 Dec 2011 00:51:14 -0000      1.2
@@ -1,15 +1,16 @@
 Package: xv 
 
 Version: 3.10a
-Revision: 26
+Revision: 30
 
 #Maintainer: Eric Lee <e...@cs.rwth-aachen.de>
 Maintainer: Daniel Macks <dma...@netspace.org>
 BuildDepends: <<
        fink (>= 0.24.12-1),
+       fink-package-precedence,
        libjasper.1,
        libjpeg8, 
-       libpng3, 
+       libpng14, 
        libtiff,
        x11-dev
 <<
@@ -17,7 +18,7 @@
        ghostscript,
        libjasper.1-shlibs,
        libjpeg8-shlibs, 
-       libpng3-shlibs,
+       libpng14-shlibs,
        libtiff-shlibs,
        x11
 <<
@@ -43,19 +44,25 @@
 Source2: mirror:sourceforge:png-mng/xv-3.10a-jumbo-patches-20070520.tar.gz
 Source2-MD5: 9fb2d0ec320498105cafeba38a588472
 
+#Source3: 
http://www.sonic.net/~roelofs/code/xv-3.10a-enhancements.20070520-20081216.diff
+#^-- incorporated into .patch
+
 PatchFile: %n.patch
-PatchFile-MD5: 87ede5f75ce454b3ebe62879ec119941
+PatchFile-MD5: 149800a45bab1f2d8e5cfc2041f7222d
 PatchScript: <<
 # first apply public 3rd-party stuff
 # gunzip --stdout 
../xv-3.10a+jp-extension-rev5.3.3+FLmask.v2.1+png+misc.patch.gz | patch -p1
   patch -p1 < ../xv-3.10a-jumbo-fix-enh-patch-20070520.txt
 
-# then patch in apple and local-fink stuff
+# then other stuff
   patch -p1 < %{PatchFile}
 # perl -pi -e 's,/usr/local,%p,' Makefile
   perl -pi -e 's,^(TIFF|JPEG|PNG|JP2K)DIR = .*,\1DIR = %p,' Makefile
 <<
-CompileScript: make PREFIX=%p
+CompileScript: <<
+       make PREFIX=%p
+       fink-package-precedence --depfile-ext='\.d' .
+<<
 InstallScript: make install PREFIX=%p DESTDIR=%d
 DocFiles: docs/*
 Description: Image viewer
@@ -77,17 +84,19 @@
 SourceN patches are semi-official public stuff:
 Fink's xv-3.10a-24.1 and -25 is 20070520 from 
http://www.sonic.net/~roelofs/greg_xv.html
 
-finkinfo %n.patch is apple- or fink-specific stuff:
+Fink's package revision 29 also includes:
+http://www.sonic.net/~roelofs/code/xv-3.10a-enhancements.20070520-20081216.diff
+in xv.patch
+
 Patched Makefile to use Fink's graphics-libs
 Patched xv.h and vdcomp.c to understand darwin headers
 
 Should re-incorporate parts of old .patch suite...eventually...
 
-       Doesn't seem to build against newer libpng14:
-               Undefined symbols:
-         "_png_libpng_ver", referenced from:
-             _png_libpng_ver$non_lazy_ptr in xvpng.o
-            (maybe you meant: _png_libpng_ver$non_lazy_ptr)
+       Upgrade libpng support for runtime version introspection.
+
+       Fix some libpng14 deprecation warnings. These became errors in
+       libpng15 (cannot upgrade dep until all fixed).
 <<
 License: Restrictive
 Homepage: http://www.trilon.com/xv/index.html


------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits? 
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to