mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
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)
This commit is contained in:
parent
19d0c4c3a4
commit
a66b1d72db
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=474753
5 changed files with 33 additions and 87 deletions
|
@ -2,22 +2,34 @@
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTNAME= flam3
|
PORTNAME= flam3
|
||||||
PORTVERSION= 2.7.18
|
DISTVERSIONPREFIX= v
|
||||||
PORTREVISION= 5
|
DISTVERSION= 3.1.1-5
|
||||||
|
DISTVERSIONSUFFIX= -g7fb50c8
|
||||||
CATEGORIES= graphics
|
CATEGORIES= graphics
|
||||||
MASTER_SITES= http://flam3.com/ \
|
|
||||||
http://interwebfun.org/distfiles/
|
|
||||||
|
|
||||||
MAINTAINER= john.c.prather@gmail.com
|
MAINTAINER= john.c.prather@gmail.com
|
||||||
COMMENT= Flame Renderer
|
COMMENT= Algorithmically generated fractal flames images and animations
|
||||||
|
|
||||||
|
LICENSE= GPLv3
|
||||||
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||||
|
|
||||||
LIB_DEPENDS= libpng.so:graphics/png \
|
LIB_DEPENDS= libpng.so:graphics/png \
|
||||||
libxml2.so:textproc/libxml2
|
libxml2.so:textproc/libxml2
|
||||||
|
|
||||||
|
USES= gmake jpeg libtool localbase pathfix
|
||||||
|
USE_GITHUB= yes
|
||||||
|
GH_ACCOUNT= scottdraves
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
USES= gmake jpeg libtool pathfix pkgconfig
|
CONFIGURE_ARGS= --enable-shared --disable-static
|
||||||
|
INSTALL_TARGET= install-strip
|
||||||
|
USE_LDCONFIG= yes
|
||||||
|
|
||||||
CPPFLAGS+= -I${LOCALBASE}/include
|
post-patch:
|
||||||
LIBS+= -L${LOCALBASE}/lib
|
@${REINPLACE_CMD} -e 's|^libflam3_la_SOURCES = .*|& sincos.c| ; s| isaac.lo$$|& sincos.lo|' \
|
||||||
|
${WRKSRC}/Makefile.in # sincos is missing on some systems: bug#218300
|
||||||
|
@${REINPLACE_CMD} -e 's| -g -O3||' ${WRKSRC}/Makefile.in # https://github.com/scottdraves/flam3/issues/25
|
||||||
|
|
||||||
|
pre-build:
|
||||||
|
@${CP} ${FILESDIR}/sincos.c ${WRKSRC}
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
SHA256 (flam3-2.7.18.tar.gz) = f3f8155d8a0ea11a23412566e18b2751da84f9ae24bd0f37a5f6484b10ad817e
|
TIMESTAMP = 1531765360
|
||||||
SIZE (flam3-2.7.18.tar.gz) = 1093666
|
SHA256 (scottdraves-flam3-v3.1.1-5-g7fb50c8_GH0.tar.gz) = d44bbf76e36857067d63832f4a15982cb54533a91ee189971705a1791f0a59d0
|
||||||
|
SIZE (scottdraves-flam3-v3.1.1-5-g7fb50c8_GH0.tar.gz) = 1245265
|
||||||
|
|
|
@ -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);
|
|
6
graphics/flam3/files/sincos.c
Normal file
6
graphics/flam3/files/sincos.c
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
void sincos(double x, double *s, double *c) {
|
||||||
|
*s = sin(x);
|
||||||
|
*c = cos(x);
|
||||||
|
}
|
|
@ -5,7 +5,10 @@ bin/flam3-convert
|
||||||
include/flam3.h
|
include/flam3.h
|
||||||
include/isaac.h
|
include/isaac.h
|
||||||
include/isaacs.h
|
include/isaacs.h
|
||||||
lib/libflam3.a
|
include/rect.c
|
||||||
|
lib/libflam3.so
|
||||||
|
lib/libflam3.so.0
|
||||||
|
lib/libflam3.so.0.0.0
|
||||||
libdata/pkgconfig/flam3.pc
|
libdata/pkgconfig/flam3.pc
|
||||||
share/flam3/flam3-palettes.xml
|
share/flam3/flam3-palettes.xml
|
||||||
man/man1/flam3-animate.1.gz
|
man/man1/flam3-animate.1.gz
|
||||||
|
|
Loading…
Add table
Reference in a new issue