Update of /cvsroot/fink/dists/10.7/stable/main/finkinfo/libs
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16756/libs

Modified Files:
        libglpng1.info libglpng1.patch 
Log Message:
patch to use libpng16

Index: libglpng1.info
===================================================================
RCS file: /cvsroot/fink/dists/10.7/stable/main/finkinfo/libs/libglpng1.info,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- libglpng1.info      25 Jun 2013 12:08:33 -0000      1.2
+++ libglpng1.info      3 Aug 2013 23:20:50 -0000       1.3
@@ -1,6 +1,6 @@
 Package: libglpng1
 Version: 1.45
-Revision: 2
+Revision: 3
 Description: PNG loader library for OpenGL
 License: BSD
 Maintainer: Hanspeter Niederstrasser <nie...@users.sourceforge.net>
@@ -8,28 +8,28 @@
        %N-shlibs (= %v-%r)
 <<
 BuildDepends: <<
-       fink (>= 0.24.12),
-       libpng14
+       fink-package-precedence,
+       libpng16
 <<
 BuildDependsOnly: true
 Source: mirror:debian:pool/main/libg/libglpng/libglpng_%v.orig.tar.gz
 Source-MD5: 9e0daad8e39fbf3179c73c0d3f74f104
 SourceDirectory: libglpng-%v.orig
 PatchFile: %n.patch
-PatchFile-MD5: 516606e18ae4d88a4358eafc55d571f4
+PatchFile-MD5: 8c377808a4f7c6b99b7569ab4dec34d6
 PatchScript: <<
-       ### src/glpng.c has a bunch of windows line endings.
-       /usr/bin/perl -pi -e "s|\r||g" src/glpng.c
-       ### add Makefile and proper location of png.h
+       ### files have a bunch of windows line endings.
+       /usr/bin/perl -pi -e "s|\r||g" src/glpng.c include/GL/glpng.h
+       ### add Makefile and proper location of png.h, plus libpng15 fix
        %{default_script}
 <<
-CompileScript: cd src ; CPPFLAGS="-I%p/include" LDFLAGS="-L%p/lib" PREFIX="%p" 
/usr/bin/make ; /usr/bin/head -n 21 glpng.c > ../LICENSE
+CompileScript: cd src ; CPPFLAGS="-I%p/include" LDFLAGS="-L%p/lib" PREFIX="%p" 
/usr/bin/make ; /usr/bin/head -n 21 glpng.c > ../LICENSE ; 
fink-package-precedence --depfile-ext='\.d' .
 InstallScript: cd src ; /usr/bin/make -w install DESTDIR="%d" PREFIX="%p"
 DocFiles: glpng.htm Example/Stunt.png Example/Test.c LICENSE
 SplitOff: <<
   Package: %N-shlibs
   Depends: <<
-    libpng14-shlibs
+    libpng16-shlibs
   <<
   Files: lib/libglpng.1.dylib
   Shlibs: <<
@@ -51,5 +51,8 @@
 
 Modified code to use OpenGL framework rather than X11 GL.
 
-Cannot be updated to use libpng > libpng14.
+Patch to use libpng >= 15
+https://lists.fedoraproject.org/pipermail/scm-commits/2011-December/692101.html
+
+#include <string.h> to silence clang warnings.
 <<

Index: libglpng1.patch
===================================================================
RCS file: /cvsroot/fink/dists/10.7/stable/main/finkinfo/libs/libglpng1.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- libglpng1.patch     1 Nov 2011 14:46:58 -0000       1.1
+++ libglpng1.patch     3 Aug 2013 23:20:50 -0000       1.2
@@ -1,8 +1,20 @@
+diff -ruN libglpng-1.45.orig/include/GL/glpng.h 
libglpng-1.45/include/GL/glpng.h
+--- libglpng-1.45.orig/include/GL/glpng.h      2013-08-03 08:34:31.000000000 
-0400
++++ libglpng-1.45/include/GL/glpng.h   2013-08-03 08:33:21.000000000 -0400
+@@ -57,7 +57,7 @@
+ #define PNG_SIMPLEMIPMAP PNG_SIMPLEMIPMAPS
+ 
+ /* Transparency parameters */
+-#define PNG_CALLBACK  -3 /* Call the callback function to generate alpha   */
++#define PNG_CALLBACK_FUNC -3 /* Call the callback function to generate alpha  
 */
+ #define PNG_ALPHA     -2 /* Use alpha channel in PNG file, if there is one */
+ #define PNG_SOLID     -1 /* No transparency                                */
+ #define PNG_STENCIL    0 /* Sets alpha to 0 for r=g=b=0, 1 otherwise       */
 diff -ruN libglpng-1.45.orig/src/Makefile libglpng-1.45/src/Makefile
 --- libglpng-1.45.orig/src/Makefile    1969-12-31 19:00:00.000000000 -0500
-+++ libglpng-1.45/src/Makefile 2010-06-19 11:40:09.000000000 -0400
++++ libglpng-1.45/src/Makefile 2013-08-03 08:33:21.000000000 -0400
 @@ -0,0 +1,30 @@
-+CC = gcc
++CC = gcc -MD
 +#CFLAGS = 
 +#CPPFLAGS =
 +#DESTDIR =
@@ -33,18 +45,52 @@
 +      $(MKDIR) $(DESTDIR)$(PREFIX)/include/GL/
 +      $(INSTALL_DATA) ../include/GL/glpng.h $(DESTDIR)$(PREFIX)/include/GL/
 diff -ruN libglpng-1.45.orig/src/glpng.c libglpng-1.45/src/glpng.c
---- libglpng-1.45.orig/src/glpng.c     2000-07-10 15:27:10.000000000 -0400
-+++ libglpng-1.45/src/glpng.c  2010-06-19 11:58:34.000000000 -0400
-@@ -26,10 +26,10 @@
+--- libglpng-1.45.orig/src/glpng.c     2013-08-03 08:34:31.000000000 -0400
++++ libglpng-1.45/src/glpng.c  2013-08-03 08:33:21.000000000 -0400
+@@ -26,10 +26,11 @@
  #endif
  
  #include <GL/glpng.h>
 -#include <GL/gl.h>
 +#include <OpenGL/gl.h>
  #include <stdlib.h>
++#include <string.h>
  #include <math.h>
 -#include "png/png.h"
 +#include <png.h>
  
  /* Used to decide if GL/gl.h supports the paletted extension */
  #ifdef GL_COLOR_INDEX1_EXT
+@@ -276,7 +277,11 @@
+       endinfo = png_create_info_struct(png);
+ 
+       // DH: added following lines
++#if PNG_LIBPNG_VER >= 10400
++      if (setjmp(png_jmpbuf(png)))
++#else
+       if (setjmp(png->jmpbuf))
++#endif
+       {
+               png_destroy_read_struct(&png, &info, &endinfo);
+               return 0;
+@@ -380,7 +385,11 @@
+       endinfo = png_create_info_struct(png);
+ 
+       // DH: added following lines
++#if PNG_LIBPNG_VER >= 10400
++      if (setjmp(png_jmpbuf(png)))
++#else
+       if (setjmp(png->jmpbuf))
++#endif
+       {
+               png_destroy_read_struct(&png, &info, &endinfo);
+               return 0;
+@@ -559,7 +568,7 @@
+                       #define ALPHA *q
+ 
+                       switch (trans) {
+-                              case PNG_CALLBACK:
++                              case PNG_CALLBACK_FUNC:
+                                       FORSTART
+                                               ALPHA = AlphaCallback((unsigned 
char) r, (unsigned char) g, (unsigned char) b);
+                                       FOREND


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to