diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2018-07-16 18:28:17 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2018-07-16 18:28:17 +0000 |
commit | a66b1d72dbcc16b2f73fc9677f55dbdb71d5603e (patch) | |
tree | ad7aee6e0fc2c41fb7ffaa3a0ca0117c6962558e /graphics/flam3/files | |
parent | biology/htslib: Update 1.6 -> 1.8 (diff) |
graphics/flam3: Update 2.7.18 -> 3.1.1-5
Port changes:
* Use DISTVERSION
* Change to github
* Update COMMENT
* Add LICENSE/LICENSE_FILE
* Change to shared library
* Add the ad-hoc implemantation for sincos linuxism
PR: 229193
Approved by: maintainer's timeout (john.c.prather@gmail.com; 25 days)
Notes
Notes:
svn path=/head/; revision=474753
Diffstat (limited to 'graphics/flam3/files')
-rw-r--r-- | graphics/flam3/files/patch-png.c | 76 | ||||
-rw-r--r-- | graphics/flam3/files/sincos.c | 6 |
2 files changed, 6 insertions, 76 deletions
diff --git a/graphics/flam3/files/patch-png.c b/graphics/flam3/files/patch-png.c deleted file mode 100644 index 716451601970..000000000000 --- a/graphics/flam3/files/patch-png.c +++ /dev/null @@ -1,76 +0,0 @@ -http://code.google.com/p/flam3/issues/detail?id=8 - ---- png.c.orig -+++ png.c -@@ -142,7 +142,7 @@ - } - if (setjmp(png_jmpbuf(png_ptr))) { - if (png_image) { -- for (y = 0 ; y < info_ptr->height ; y++) -+ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++) - free (png_image[y]); - free (png_image); - } -@@ -161,19 +161,19 @@ - png_set_sig_bytes (png_ptr, SIG_CHECK_SIZE); - png_read_info (png_ptr, info_ptr); - -- if (8 != info_ptr->bit_depth) { -+ if (8 != png_get_bit_depth(png_ptr, info_ptr)) { - fprintf(stderr, "bit depth type must be 8, not %d.\n", -- info_ptr->bit_depth); -+ png_get_bit_depth(png_ptr, info_ptr)); - return 0; - } - -- *width = info_ptr->width; -- *height = info_ptr->height; -+ *width = png_get_image_width(png_ptr, info_ptr); -+ *height = png_get_image_height(png_ptr, info_ptr); - p = q = malloc(4 * *width * *height); -- png_image = (png_byte **)malloc (info_ptr->height * sizeof (png_byte*)); -+ png_image = (png_byte **)malloc (png_get_image_height(png_ptr, info_ptr) * sizeof (png_byte*)); - -- linesize = info_ptr->width; -- switch (info_ptr->color_type) { -+ linesize = png_get_image_width(png_ptr, info_ptr); -+ switch (png_get_color_type(png_ptr, info_ptr)) { - case PNG_COLOR_TYPE_RGB: - linesize *= 3; - break; -@@ -182,21 +182,21 @@ - break; - default: - fprintf(stderr, "color type must be RGB or RGBA not %d.\n", -- info_ptr->color_type); -+ png_get_color_type(png_ptr, info_ptr)); - return 0; - } - -- for (y = 0 ; y < info_ptr->height ; y++) { -+ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++) { - png_image[y] = malloc (linesize); - } - png_read_image (png_ptr, png_image); - png_read_end (png_ptr, info_ptr); - -- for (y = 0 ; y < info_ptr->height ; y++) { -+ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++) { - unsigned char *s = png_image[y]; -- for (x = 0 ; x < info_ptr->width ; x++) { -+ for (x = 0 ; x < png_get_image_width(png_ptr, info_ptr) ; x++) { - -- switch (info_ptr->color_type) { -+ switch (png_get_color_type(png_ptr, info_ptr)) { - case PNG_COLOR_TYPE_RGB: - p[0] = s[0]; - p[1] = s[1]; -@@ -217,7 +217,7 @@ - } - } - -- for (y = 0 ; y < info_ptr->height ; y++) -+ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++) - free (png_image[y]); - free (png_image); - png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp)NULL); diff --git a/graphics/flam3/files/sincos.c b/graphics/flam3/files/sincos.c new file mode 100644 index 000000000000..846e1e3713b4 --- /dev/null +++ b/graphics/flam3/files/sincos.c @@ -0,0 +1,6 @@ +#include <math.h> + +void sincos(double x, double *s, double *c) { + *s = sin(x); + *c = cos(x); +} |