summaryrefslogtreecommitdiff
path: root/x11/XaoS
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-01-29 14:17:33 +0000
committerwiz <wiz@pkgsrc.org>2011-01-29 14:17:33 +0000
commit9e3ea7800eaa3e4c33f2707f82138b800bfe3ff1 (patch)
treef95da1ebe889bd2dd8d6cd43a4049e31aacb9a29 /x11/XaoS
parent7cbcd2832906609be7d144902efe779f9414f2c5 (diff)
downloadpkgsrc-9e3ea7800eaa3e4c33f2707f82138b800bfe3ff1.tar.gz
Fix build with png-1.5.
Diffstat (limited to 'x11/XaoS')
-rw-r--r--x11/XaoS/Makefile3
-rw-r--r--x11/XaoS/distinfo3
-rw-r--r--x11/XaoS/patches/patch-ab136
3 files changed, 140 insertions, 2 deletions
diff --git a/x11/XaoS/Makefile b/x11/XaoS/Makefile
index e7ff5b46893..36913ae9478 100644
--- a/x11/XaoS/Makefile
+++ b/x11/XaoS/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2011/01/13 13:40:07 wiz Exp $
+# $NetBSD: Makefile,v 1.29 2011/01/29 14:17:33 wiz Exp $
#
DISTNAME= XaoS-3.4
@@ -9,6 +9,7 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xaos/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://xaos.sourceforge.net/
COMMENT= Zoomable fractal rendering doodad
+LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
PKG_INSTALLATION_TYPES= overwrite pkgviews
diff --git a/x11/XaoS/distinfo b/x11/XaoS/distinfo
index b2c69bbc116..617e05e7ea2 100644
--- a/x11/XaoS/distinfo
+++ b/x11/XaoS/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.12 2009/05/22 20:19:19 tnn Exp $
+$NetBSD: distinfo,v 1.13 2011/01/29 14:17:33 wiz Exp $
SHA1 (XaoS-3.4.tar.gz) = 4e419715ae0479fa3a20ed5f48ede7ad222f2d10
RMD160 (XaoS-3.4.tar.gz) = 37ce4728940e80c2876792650aa656236893d5f7
Size (XaoS-3.4.tar.gz) = 1977108 bytes
SHA1 (patch-aa) = f4327652392714bbe27e4655de40f7208a528990
+SHA1 (patch-ab) = 3864bf56d3758fdbb931fdbc62d5419c99bb5efb
SHA1 (patch-ac) = 98355581b4d45f927d58722cacb39ec83b7a540e
SHA1 (patch-ad) = e783ed91ba611af333256a660d537bcf77992893
SHA1 (patch-al) = dc5adebc2220aa1f76920570d1212730adb2e7e7
diff --git a/x11/XaoS/patches/patch-ab b/x11/XaoS/patches/patch-ab
new file mode 100644
index 00000000000..4d7643892bb
--- /dev/null
+++ b/x11/XaoS/patches/patch-ab
@@ -0,0 +1,136 @@
+$NetBSD: patch-ab,v 1.6 2011/01/29 14:17:34 wiz Exp $
+
+Fix build with png-1.5 (untested, waiting for confirmation).
+
+--- src/util/png.c.orig 2003-02-03 16:16:46.000000000 +0000
++++ src/util/png.c
+@@ -3,6 +3,7 @@
+ #include <aconfig.h>
+ #ifdef USE_PNG
+ #include <png.h>
++#include <zlib.h>
+ #endif
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -33,6 +34,9 @@ writepng (FILE * file, CONST struct imag
+ png_structp png_ptr;
+ png_infop info_ptr;
+ png_color palette[256];
++ png_color_8 sig_bit;
++ int color_type;
++ int bit_depth;
+ volatile unsigned short a = 255;
+ volatile unsigned char *b = (volatile unsigned char *) &a;
+ #ifdef _undefined_
+@@ -62,7 +66,7 @@ writepng (FILE * file, CONST struct imag
+ png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
+ return "No memory to create png info structure";
+ }
+- if (setjmp (png_ptr->jmpbuf))
++ if (setjmp (png_jmpbuf(png_ptr)))
+ {
+ png_destroy_write_struct (&png_ptr, &info_ptr);
+ fclose (file);
+@@ -82,58 +86,73 @@ writepng (FILE * file, CONST struct imag
+ png_set_compression_window_bits (png_ptr, 15);
+ png_set_compression_method (png_ptr, 8);
+
+- info_ptr->width = image->width;
+- info_ptr->height = image->height;
+- /*info_ptr->gamma=1.0; */
+- info_ptr->gamma = 0.5;
+- info_ptr->valid |= PNG_INFO_gAMA | PNG_INFO_pHYs;
+- info_ptr->x_pixels_per_unit = (png_uint_32) (100 / image->pixelwidth);
+- info_ptr->y_pixels_per_unit = (png_uint_32) (100 / image->pixelheight);
++ switch (image->palette->type)
++ {
++ case C256:
++ color_type = PNG_COLOR_TYPE_PALETTE;
++ bit_depth = image->bytesperpixel * 8;
++ break;
++ case SMALLITER:
++ case LARGEITER:
++ case GRAYSCALE:
++ color_type = PNG_COLOR_TYPE_GRAY;
++ bit_depth = image->bytesperpixel * 8;
++ break;
++ case TRUECOLOR:
++ case TRUECOLOR24:
++ case TRUECOLOR16:
++ color_type = PNG_COLOR_TYPE_RGB;
++ bit_depth = 8;
++ break;
++ }
+
++ png_set_IHDR (png_ptr, info_ptr, image->width, image->height, bit_depth,
++ color_type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE,
++ PNG_FILTER_TYPE_BASE);
+
+ switch (image->palette->type)
+ {
+ case C256:
+ {
+ int i;
+- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
+- info_ptr->bit_depth = image->bytesperpixel * 8;
+- info_ptr->palette = palette;
+- info_ptr->valid |= PNG_INFO_PLTE;
++ png_color png_palette[257];
++ int png_num_palette;
+ for (i = 0; i < image->palette->end; i++)
+- info_ptr->palette[i].red = image->palette->rgb[i][0],
+- info_ptr->palette[i].green = image->palette->rgb[i][1],
+- info_ptr->palette[i].blue = image->palette->rgb[i][2],
+- info_ptr->num_palette = image->palette->end;
++ png_palette[i].red = image->palette->rgb[i][0],
++ png_palette[i].green = image->palette->rgb[i][1],
++ png_palette[i].blue = image->palette->rgb[i][2],
++ png_num_palette = image->palette->end;
++ png_set_PLTE(png_ptr, info_ptr, png_palette, png_num_palette);
+ }
+ break;
+- case SMALLITER:
+- case LARGEITER:
+- case GRAYSCALE:
+- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
+- info_ptr->bit_depth = image->bytesperpixel * 8;
+- break;
+ case TRUECOLOR:
+ case TRUECOLOR24:
+ case TRUECOLOR16:
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+- info_ptr->bit_depth = 8;
+- info_ptr->sig_bit.red = 8 - image->palette->info.truec.rprec;
+- info_ptr->sig_bit.green = 8 - image->palette->info.truec.gprec;
+- info_ptr->sig_bit.blue = 8 - image->palette->info.truec.bprec;
++ {
++ sig_bit.red = 8 - image->palette->info.truec.rprec;
++ sig_bit.green = 8 - image->palette->info.truec.gprec;
++ sig_bit.blue = 8 - image->palette->info.truec.bprec;
++ png_set_sBIT(png_ptr, info_ptr, &sig_bit);
++ }
+ break;
+ }
+- info_ptr->interlace_type = 0;
++
++ png_write_info (png_ptr, info_ptr);
++
+ #ifdef _undefined_
+ png_set_text (png_ptr, info_ptr, comments,
+ sizeof (comments) / sizeof (png_text));
+ #endif
+
+- png_write_info (png_ptr, info_ptr);
++ png_set_gAMA(png_ptr, info_ptr, 0.5 /* 1.0 */);
++ png_set_pHYs(png_ptr, info_ptr, (png_uint_32) (100 / image->pixelwidth),
++ (png_uint_32) (100 / image->pixelheight), PNG_RESOLUTION_UNKNOWN);
++
++
+ /*png_set_filler(png_ptr,0,PNG_FILLER_AFTER); */
+ png_set_packing (png_ptr);
+ if (image->palette->type & (TRUECOLOR | TRUECOLOR24 | TRUECOLOR16))
+- png_set_shift (png_ptr, &(info_ptr->sig_bit));
++ png_set_shift (png_ptr, &sig_bit);
+ if (*b == 255)
+ png_set_swap (png_ptr);
+ png_set_bgr (png_ptr);