pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/mgl Link against libgif now that default has ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1716079a8f55
branches:  trunk
changeset: 587205:1716079a8f55
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun Apr 03 11:40:07 2011 +0000

description:
Link against libgif now that default has changed, and fix build with png-1.5.

diffstat:

 graphics/mgl/distinfo         |    8 +-
 graphics/mgl/patches/patch-ab |    5 +-
 graphics/mgl/patches/patch-ac |   18 +++--
 graphics/mgl/patches/patch-as |  140 +++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 154 insertions(+), 17 deletions(-)

diffs (242 lines):

diff -r 5c838af6c3d8 -r 1716079a8f55 graphics/mgl/distinfo
--- a/graphics/mgl/distinfo     Sun Apr 03 11:27:24 2011 +0000
+++ b/graphics/mgl/distinfo     Sun Apr 03 11:40:07 2011 +0000
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.7 2007/12/05 13:38:27 obache Exp $
+$NetBSD: distinfo,v 1.8 2011/04/03 11:40:07 wiz Exp $
 
 SHA1 (mgl2-alpha-020.tar.gz) = aa6be2be28749ba9952afbb359ca0525cad3717f
 RMD160 (mgl2-alpha-020.tar.gz) = 4c1b6772d9b9adc96279b016fb574defb78f1fe7
 Size (mgl2-alpha-020.tar.gz) = 341420 bytes
 SHA1 (patch-aa) = 65104bb4030f3bd393f08d6b81382dc87913f5c7
-SHA1 (patch-ab) = 57bb2b1879c5a8ee9f0022ccd74fc8ec2daeef8f
-SHA1 (patch-ac) = b928439dcf815ffab8ec9bb15782ff34ad18006f
+SHA1 (patch-ab) = d9ac9acb108f3f1254a24a90b5ceb7efe4e44e7b
+SHA1 (patch-ac) = e4179c5e6a000fbf24ab515769ab71849f0ec7fd
 SHA1 (patch-ad) = 8d333d48b897758754d781339a85b78edfd44541
 SHA1 (patch-ae) = e631dbe4341056cbc67f0a0054952746a087c5c1
 SHA1 (patch-af) = 9265534267b9aa67a9e5db520de0bfc12a601671
@@ -21,7 +21,7 @@
 SHA1 (patch-ap) = f77dbbd3ae25e17e34d2a81155fdefa8765429a2
 SHA1 (patch-aq) = ecdf40c1bc906da2bd738e9145719d0a2fc146ff
 SHA1 (patch-ar) = 680c2f40e37f8f71d305c8f46460a1fbdc0f0242
-SHA1 (patch-as) = fceb87ac6fb9644bd7a640dcc81cf29ca0f824e5
+SHA1 (patch-as) = dddbd356858f0af34f3995cb4519e347772f5ed5
 SHA1 (patch-at) = 263b09454b9900d383e3447bc5b3da2e37b495cf
 SHA1 (patch-au) = 8450ac4c190d08430583b36c5b8b767601a5aab3
 SHA1 (patch-av) = a8ad4b5e4043bfdf8a77ba1f8017fca697f02cab
diff -r 5c838af6c3d8 -r 1716079a8f55 graphics/mgl/patches/patch-ab
--- a/graphics/mgl/patches/patch-ab     Sun Apr 03 11:27:24 2011 +0000
+++ b/graphics/mgl/patches/patch-ab     Sun Apr 03 11:40:07 2011 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.2 2001/03/20 13:54:31 wiz Exp $
+$NetBSD: patch-ab,v 1.3 2011/04/03 11:40:08 wiz Exp $
 
 --- conf/config.mk-netbsd-i386-x.orig  Sun Dec 10 02:49:30 2000
 +++ conf/config.mk-netbsd-i386-x       Wed Mar 14 06:41:48 2001
@@ -56,7 +56,8 @@
 -GIFLIBDIR = -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib
 +GIFINCDIR = -I${PREFIX}/include
 +GIFLIBDIR = -L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib
- GIFLIB    = -lungif
+-GIFLIB    = -lungif
++GIFLIB    = -lgif
  
 -#USE_PNG   = -DUSE_PNG
 -#PNGINCDIR = -I/usr/pkg/include
diff -r 5c838af6c3d8 -r 1716079a8f55 graphics/mgl/patches/patch-ac
--- a/graphics/mgl/patches/patch-ac     Sun Apr 03 11:27:24 2011 +0000
+++ b/graphics/mgl/patches/patch-ac     Sun Apr 03 11:40:07 2011 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ac,v 1.2 2001/03/20 13:54:31 wiz Exp $
+$NetBSD: patch-ac,v 1.3 2011/04/03 11:40:08 wiz Exp $
 
---- conf/config.mk-hpcmips.orig        Sun Dec 10 02:49:29 2000
-+++ conf/config.mk-hpcmips     Wed Mar 14 06:44:01 2001
+--- conf/config.mk-hpcmips.orig        2000-12-09 17:49:29.000000000 +0000
++++ conf/config.mk-hpcmips
 @@ -1,15 +1,15 @@
  # MGLDIR : mgl direcory (headers,libs,shared objects,fonts ..)
 -MGLDIR=/usr/pkg/lib/mgl2
@@ -23,7 +23,7 @@
  
  ifndef MGL_HEADER_DIR
  MGL_HEADER_DIR = ${MGLDIR}
-@@ -65,22 +65,26 @@
+@@ -65,22 +65,26 @@ OPTIMIZE_FOR=OPTTYPE_MIPS
  # im option input-method
  #IM_STATIC=y
  IM_DYNAMIC=y
@@ -45,14 +45,16 @@
  USE_GIF   = -DUSE_GIF
 -GIFINCDIR = -I/usr/pkg/include
 -GIFLIBDIR = -L/usr/pkg/lib
-+GIFINCDIR = -I${PREFIX}/include
-+GIFLIBDIR = -L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib
- GIFLIB    = -lungif
- 
+-GIFLIB    = -lungif
+-
 -#USE_PNG   = -DUSE_PNG
 -#PNGINCDIR = -I/usr/pkg/include
 -#PNGLIBDIR = -L/usr/pkg/lib
 -#PNGLIB    = -lpng
++GIFINCDIR = -I${PREFIX}/include
++GIFLIBDIR = -L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib
++GIFLIB    = -lgif
++
 +USE_PNG   = -DUSE_PNG
 +PNGINCDIR = -I${PREFIX}/include
 +PNGLIBDIR = -L${PREFIX}/lib -Wl,-rpath,${PREFIX}/lib
diff -r 5c838af6c3d8 -r 1716079a8f55 graphics/mgl/patches/patch-as
--- a/graphics/mgl/patches/patch-as     Sun Apr 03 11:27:24 2011 +0000
+++ b/graphics/mgl/patches/patch-as     Sun Apr 03 11:40:07 2011 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-as,v 1.1 2003/10/14 16:22:21 salo Exp $
+$NetBSD: patch-as,v 1.2 2011/04/03 11:40:08 wiz Exp $
 
---- mil/mil.c.orig     2000-09-09 05:40:44.000000000 +0200
-+++ mil/mil.c  2003-10-14 18:01:34.000000000 +0200
+--- mil/mil.c.orig     2000-09-09 03:40:44.000000000 +0000
++++ mil/mil.c
 @@ -28,23 +28,23 @@
   */
  
@@ -43,3 +43,137 @@
  ";
  
  #include <stdio.h>
+@@ -1045,7 +1045,7 @@ int read_png_file(char *f, int *w, int *
+     }
+ 
+     /* error handling */
+-    if(setjmp(png_ptr->jmpbuf)){
++    if(setjmp(png_jmpbuf(png_ptr))){
+         png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+         fclose(fp);
+         return -1;
+@@ -1061,29 +1061,29 @@ int read_png_file(char *f, int *w, int *
+     png_read_info(png_ptr, info_ptr);
+ 
+     /* 1, 2, 4bit -> 8bit */
+-    if(info_ptr->bit_depth < 8){
++    if(png_get_bit_depth(png_ptr, info_ptr) < 8){
+         png_set_packing(png_ptr);
+     }
+ 
+     /* 8bit with colormap -> 24bit */
+-    if(info_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
+-       info_ptr->bit_depth <= 8){
++    if(png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE &&
++       png_get_bit_depth(png_ptr, info_ptr) <= 8){
+         /* png_set_palette_to_rgb(png_ptr); */
+         png_set_expand(png_ptr);
+     }
+ 
+ #if 0
+     /* gray -> 8bit */
+-    if(info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
+-       info_ptr->bit_depth < 8){
++    if(png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY &&
++       png_get_bit_depth(png_ptr, info_ptr) < 8){
+         /* png_set_gray_1_2_4_to_8(png_ptr); */
+         png_set_expand(png_ptr);
+     }
+ #endif
+ 
+     /* gray -> 24bit */
+-    if(info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
+-       info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA){
++    if(png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY ||
++       png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA){
+           png_set_gray_to_rgb(png_ptr);
+     }
+ 
+@@ -1095,36 +1095,36 @@ int read_png_file(char *f, int *w, int *
+     }
+ 
+     /* Cut alpha channel */
+-    if(info_ptr->color_type & PNG_COLOR_MASK_ALPHA){
++    if(png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA){
+         /* png_set_invert_alpha(png_ptr); */
+         png_set_strip_alpha(png_ptr);
+     }
+ #endif
+ 
+     /* 16bit -> 8bit/color */
+-    if(info_ptr->bit_depth == 16){
++    if(png_get_bit_depth(png_ptr, info_ptr) == 16){
+         png_set_strip_16(png_ptr);
+     }
+ 
+     /* RGB -> RGBA */
+ #if 0
+-    if((info_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
+-       info_ptr->color_type == PNG_COLOR_TYPE_RGB) &&
+-       info_ptr->bit_depth <= 8){
++    if((png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE ||
++       png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB) &&
++       png_get_bit_depth(png_ptr, info_ptr) <= 8){
+         png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
+     }
+ #endif
+-    if(info_ptr->pixel_depth != 32){
++    if(png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB) {
+         png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
+     }
+ 
+     /* Update info structure */
+     png_read_update_info(png_ptr, info_ptr);
+ 
+-    *w  =  (int)info_ptr->width;
+-    *h  = (int)info_ptr->height;
++    *w  =  (int)png_get_image_width(png_ptr, info_ptr);
++    *h  = (int)png_get_image_height(png_ptr, info_ptr);
+ 
+-    png_image = (png_bytep)malloc(info_ptr->rowbytes * info_ptr->height);
++    png_image = (png_bytep)malloc(png_get_rowbytes(png_ptr, info_ptr) * png_get_image_height(png_ptr, info_ptr));
+     if(!png_image){
+         png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+         fclose(fp);
+@@ -1132,15 +1132,15 @@ int read_png_file(char *f, int *w, int *
+     }
+ 
+     /* File Read */
+-    row_pointers = (png_bytep *)malloc(info_ptr->height * sizeof(png_bytep *));
++    row_pointers = (png_bytep *)malloc(png_get_image_height(png_ptr, info_ptr) * sizeof(png_bytep *));
+     if(!row_pointers){
+         png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+         free(png_image);
+         fclose(fp);
+         return -1;
+     }
+-    for(i = 0; i < info_ptr->height; ++i){
+-        row_pointers[i] = png_image + i * info_ptr->rowbytes;
++    for(i = 0; i < png_get_image_height(png_ptr, info_ptr); ++i){
++        row_pointers[i] = png_image + i * png_get_rowbytes(png_ptr, info_ptr);
+     }
+ 
+     png_read_image(png_ptr, row_pointers);
+@@ -1149,16 +1149,16 @@ int read_png_file(char *f, int *w, int *
+     png_read_end(png_ptr, end_info);
+ 
+ #if 0
+-printf("width            [%d]\n", info_ptr->width);
+-printf("height           [%d]\n", info_ptr->height);
+-printf("rowbytes         [%d]\n", info_ptr->rowbytes);
+-printf("bit_depth        [%d]\n", info_ptr->bit_depth);
++printf("width            [%d]\n", png_get_image_width(png_ptr, info_ptr));
++printf("height           [%d]\n", png_get_image_height(png_ptr, info_ptr));
++printf("rowbytes         [%d]\n", png_get_rowbytes(png_ptr, info_ptr));
++printf("bit_depth        [%d]\n", png_get_bit_depth(png_ptr, info_ptr));
+ printf("num_palette      [%d]\n", info_ptr->num_palette);
+-printf("color_type       [%d]\n", info_ptr->color_type);
++printf("color_type       [%d]\n", png_get_color_type(png_ptr, info_ptr));
+ printf("compression_type [%d]\n", info_ptr->compression_type);
+ printf("filter_type      [%d]\n", info_ptr->filter_type);
+ printf("interlace_type   [%d]\n", info_ptr->interlace_type);
+-printf("pixel_depth      [%d]\n", info_ptr->pixel_depth);
++printf("pixel_depth      [%d]\n", png_get_pixel_depth(png_ptr, info_ptr));
+ #endif
+ 
+     /* File Close */



Home | Main Index | Thread Index | Old Index