Update to XaoS 3.6.
This commit is contained in:
parent
28a3dd52bf
commit
4f81e8c801
@ -2,12 +2,12 @@
|
||||
|
||||
COMMENT = interactive fractal zoomer and morpher
|
||||
|
||||
VERSION = 3.5
|
||||
VERSION = 3.6
|
||||
DISTNAME = xaos-${VERSION}
|
||||
|
||||
CATEGORIES = graphics
|
||||
|
||||
HOMEPAGE = http://wmi.math.u-szeged.hu/xaos/doku.php
|
||||
HOMEPAGE = http://matek.hu/xaos/doku.php
|
||||
|
||||
MAINTAINER = Pascal Stumpf <Pascal.Stumpf@cubes.de>
|
||||
|
||||
|
@ -1,5 +1,2 @@
|
||||
MD5 (xaos-3.5.tar.gz) = Rl0UabJ2UBpYvzJeST6lkQ==
|
||||
RMD160 (xaos-3.5.tar.gz) = GTVTgYZG+/LXyfDIVcoxI0RuFrw=
|
||||
SHA1 (xaos-3.5.tar.gz) = bRalgYf7pydua9BUfML9a7BzuAE=
|
||||
SHA256 (xaos-3.5.tar.gz) = Rx+nUhVKjkxGh3l/4SQd8bP4JACy705qYDlponzXSEI=
|
||||
SIZE (xaos-3.5.tar.gz) = 2930590
|
||||
SHA256 (xaos-3.6.tar.gz) = mJ8+OPd5OBDLsUltUpHUSDan18BYQiue4c/7FjoLjZU=
|
||||
SIZE (xaos-3.6.tar.gz) = 2040707
|
||||
|
@ -1,135 +0,0 @@
|
||||
$OpenBSD: patch-src_util_png_c,v 1.1 2011/07/08 20:36:09 naddy Exp $
|
||||
|
||||
Fix build with png-1.5.
|
||||
|
||||
--- src/util/png.c.orig Wed Jul 6 14:19:33 2011
|
||||
+++ src/util/png.c Wed Jul 6 14:37:05 2011
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <aconfig.h>
|
||||
#ifdef USE_PNG
|
||||
#include <png.h>
|
||||
+#include <zlib.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -31,6 +32,9 @@ CONST char *writepng(FILE * file, CONST struct image *
|
||||
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_
|
||||
@@ -59,7 +63,7 @@ CONST char *writepng(FILE * file, CONST struct image *
|
||||
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);
|
||||
return strerror(errno);
|
||||
@@ -78,57 +82,71 @@ CONST char *writepng(FILE * file, CONST struct image *
|
||||
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);
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/04/14 07:02:21 jasper Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2013/11/23 16:11:11 pascal Exp $
|
||||
@bin bin/xaos
|
||||
@info info/xaos.info
|
||||
@man man/man6/xaos.6
|
||||
@ -53,6 +53,7 @@ share/XaoS/examples/beatle2.xpf
|
||||
share/XaoS/examples/bolygo.xpf
|
||||
share/XaoS/examples/brown.xpf
|
||||
share/XaoS/examples/burnship.xpf
|
||||
share/XaoS/examples/butterfly-langston.xpf
|
||||
share/XaoS/examples/butterfly.xpf
|
||||
share/XaoS/examples/checker.xpf
|
||||
share/XaoS/examples/circle.xpf
|
||||
@ -61,6 +62,7 @@ share/XaoS/examples/csiga2.xpf
|
||||
share/XaoS/examples/csiga3.xpf
|
||||
share/XaoS/examples/csiga4.xpf
|
||||
share/XaoS/examples/csiga5.xpf
|
||||
share/XaoS/examples/dark.xpf
|
||||
share/XaoS/examples/dblspira.xpf
|
||||
share/XaoS/examples/dragons.xpf
|
||||
share/XaoS/examples/dragons2.xpf
|
||||
@ -118,6 +120,7 @@ share/XaoS/examples/kovzsi8.xpf
|
||||
share/XaoS/examples/kovzsi9.2.xpf
|
||||
share/XaoS/examples/kovzsi9.xpf
|
||||
share/XaoS/examples/lemon.xpf
|
||||
share/XaoS/examples/light-kovzsi.xpf
|
||||
share/XaoS/examples/light.xpf
|
||||
share/XaoS/examples/lighting.xpf
|
||||
share/XaoS/examples/magnet.xpf
|
||||
|
Loading…
x
Reference in New Issue
Block a user