Update to 2.5. I've kept part of the diff and updated the comment.
Tested on amd64.
Comments? OK?

f.-

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/links+/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- Makefile    21 Jul 2011 18:36:36 -0000      1.43
+++ Makefile    27 Feb 2012 11:19:38 -0000
@@ -2,10 +2,9 @@
 
 COMMENT=       graphics and text browser
 
-VER=           2.2
+VER=           2.5
 DISTNAME=      links-${VER}
 PKGNAME=       links+-${VER}
-REVISION=      2
 
 CATEGORIES=    www
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/links+/distinfo,v
retrieving revision 1.22
diff -u -p -r1.22 distinfo
--- distinfo    10 Oct 2008 23:08:26 -0000      1.22
+++ distinfo    27 Feb 2012 11:19:38 -0000
@@ -1,5 +1,5 @@
-MD5 (links-2.2.tar.gz) = yZN/ntAGHyZJcxgvhx+2Zw==
-RMD160 (links-2.2.tar.gz) = GDED/bHQu0quRZFRhuduswviT7Q=
-SHA1 (links-2.2.tar.gz) = haemVf9Zn38nP3mZ2H+KEfI+ZKA=
-SHA256 (links-2.2.tar.gz) = CVuudOB+Jb88fgFry7pigBeyAhaBMVsKzStpwvMZHqE=
-SIZE (links-2.2.tar.gz) = 4186804
+MD5 (links-2.5.tar.gz) = LYhbLiYB4ir7AhY0B6n2fw==
+RMD160 (links-2.5.tar.gz) = yQ4g9IVIsZGaMwyYOtbyWhCsX84=
+SHA1 (links-2.5.tar.gz) = +7ey6bHYWYY9STxS9lBqNK7Hu40=
+SHA256 (links-2.5.tar.gz) = n9++Qajcp9PsT9N2lNhSCYcv63YxvQXiWFrV1siZenk=
+SIZE (links-2.5.tar.gz) = 4226809
Index: patches/patch-dip_c
===================================================================
RCS file: /cvs/ports/www/links+/patches/patch-dip_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-dip_c
--- patches/patch-dip_c 21 Jul 2011 18:36:36 -0000      1.1
+++ patches/patch-dip_c 27 Feb 2012 11:19:38 -0000
@@ -1,17 +1,11 @@
 $OpenBSD: patch-dip_c,v 1.1 2011/07/21 18:36:36 jasper Exp $
 
 From John Bowler <[email protected]> via NetBSD pkg/44940:
-It's two bugs: one, the obvious one, in the two calls to
-png_set_rgb_to_gray() in dip.c; that should be *DIVIDED* by 256,
-not multiplied!
-                                                                               
                                                                                
                                                     
-The other is that there is *NO* error handling, no call to setjmp();
+
+There is *NO* error handling, no call to setjmp();
 so when png_error is called the call stack ends up destroyed and,
 apparently, the program dies in create_read_struct_2, right after
 the comment that explains why libpng is about to call abort() ;-)
-                                                                               
                                                                                
                                                     
-The attached patch fixes both problems, but links will still error
-out on a png_error (just with an OOM message, not an abort()).
 
 --- dip.c.orig Sat Jul  7 23:23:39 2007
 +++ dip.c      Thu Jul 21 20:31:14 2011
@@ -24,21 +18,3 @@ out on a png_error (just with an OOM mes
        info_ptr=png_create_info_struct(png_ptr);
        png_set_read_fn(png_ptr,&work,(png_rw_ptr)&read_stored_data);
        png_read_info(png_ptr, info_ptr);
-@@ -1462,7 +1464,7 @@ unsigned char *png_data, int png_length, struct style 
-               if (color_type==PNG_COLOR_TYPE_PALETTE){
-                       png_set_expand(png_ptr);
- #ifdef HAVE_PNG_SET_RGB_TO_GRAY
--                      png_set_rgb_to_gray(png_ptr,1,54.0*256,183.0*256);
-+                      png_set_rgb_to_gray(png_ptr,1,54.0/256,183.0/256);
- #else
-                       goto end;
- #endif
-@@ -1473,7 +1475,7 @@ unsigned char *png_data, int png_length, struct style 
-               if (color_type==PNG_COLOR_TYPE_RGB ||
-                       color_type==PNG_COLOR_TYPE_RGB_ALPHA){
- #ifdef HAVE_PNG_SET_RGB_TO_GRAY
--                      png_set_rgb_to_gray(png_ptr, 1, 54.0*256, 183.0*256);
-+                      png_set_rgb_to_gray(png_ptr, 1, 54.0/256, 183.0/256);
- #else
-                       goto end;
- #endif
Index: patches/patch-png_c
===================================================================
RCS file: patches/patch-png_c
diff -N patches/patch-png_c
--- patches/patch-png_c 8 Jul 2011 20:38:01 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-$OpenBSD: patch-png_c,v 1.1 2011/07/08 20:38:01 naddy Exp $
-
-Fix build with png-1.5.
-
---- png.c.orig Wed Jul  6 11:27:06 2011
-+++ png.c      Wed Jul  6 11:28:03 2011
-@@ -48,7 +48,7 @@ void img_my_png_warning(png_structp a, png_const_charp
- /* Error for from-web PNG images. */
- void img_my_png_error(png_structp png_ptr, png_const_charp error_string)
- {
--      longjmp(png_ptr->jmpbuf,1);
-+      png_longjmp(png_ptr,1);
- }
- 
- void png_info_callback(png_structp png_ptr, png_infop info_ptr)
-@@ -203,7 +203,7 @@ void png_start(struct cached_image *cimg)
- #ifdef DEBUG
-       if (!info_ptr) internal ("png_create_info_struct failed\n");
- #endif /* #ifdef DEBUG */
--      if (setjmp(png_ptr->jmpbuf)){
-+      if (setjmp(png_jmpbuf(png_ptr))){
- error:
-               png_destroy_read_struct(&png_ptr, &info_ptr,
-                       (png_infopp)NULL);
-@@ -213,7 +213,7 @@ error:
-       png_set_progressive_read_fn(png_ptr, NULL,
-                                   png_info_callback, png_row_callback,
-                                   png_end_callback);
--      if (setjmp(png_ptr->jmpbuf)) goto error;
-+      if (setjmp(png_jmpbuf(png_ptr))) goto error;
-       decoder=mem_alloc(sizeof(*decoder));
-       decoder->png_ptr=png_ptr;
-       decoder->info_ptr=info_ptr;
-@@ -232,7 +232,7 @@ void png_restart(struct cached_image *cimg, unsigned c
-       png_ptr=((struct png_decoder *)(cimg->decoder))->png_ptr;
-       info_ptr=((struct png_decoder *)(cimg->decoder))->info_ptr;
-       end_callback_hit=0;
--      if (setjmp(png_ptr->jmpbuf)){
-+      if (setjmp(png_jmpbuf(png_ptr))){
-               img_end(cimg);
-               return;
-       }

Reply via email to