0
0
Fork 0
haikuports/media-gfx/flam3/patches/flam3-3.1.1.patchset

85 lines
2.5 KiB
Plaintext

From 3a83a1c2fd8fba40edec980d4c023f357f9d78d0 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 28 Apr 2017 22:28:42 +0200
Subject: flam3, gcc2 patch
diff --git a/Makefile.am b/Makefile.am
index c3d0f42..8d841dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
GIT_DEF = -D'GIT_REV="$(shell git describe --tags --dirty)"'
-AM_CFLAGS = -g -O3 -std=gnu99 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(GIT_DEF)
+AM_CFLAGS = -g -O3 -ffast-math -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" $(GIT_DEF)
ACLOCAL_AMFLAGS = -I m4
diff --git a/flam3-genome.c b/flam3-genome.c
index 509dbd7..5798e94 100644
--- a/flam3-genome.c
+++ b/flam3-genome.c
@@ -888,10 +888,12 @@ main(argc, argv)
fprintf(stderr, "can only find parents of one genome\n");
exit(1);
}
- xmlDocPtr edits = cp[0].edits;
+ {
+ xmlDocPtr edits = cp[0].edits;
xmlNode *rootnode = xmlDocGetRootElement(edits);
print_find_parents(rootnode, 0, 0);
exit(0);
+ }
}
/* pick a control point until it looks good enough */
diff --git a/flam3.c b/flam3.c
index 8b84629..47761f1 100644
--- a/flam3.c
+++ b/flam3.c
@@ -1816,7 +1816,8 @@ void flam3_print(FILE *f, flam3_genome *cp, char *extra_attributes, int print_ed
}
- int hexpalette = argi("hexpalette",0);
+ {
+ int hexpalette = argi("hexpalette",0);
if (hexpalette) {
@@ -1891,6 +1892,7 @@ void flam3_print(FILE *f, flam3_genome *cp, char *extra_attributes, int print_ed
fprintf(stderr, "error: couldn't restore locale settings\n");
free(locale);
}
+ }
}
#define PRINTNON(p) do { if (x->p != 0.0) fprintf(f, #p "=\"%f\" ",x->p); } while(0)
diff --git a/interpolation.c b/interpolation.c
index 4390337..30af0a1 100644
--- a/interpolation.c
+++ b/interpolation.c
@@ -430,7 +430,8 @@ void flam3_interpolate_n(flam3_genome *result, int ncp,
new_count = 1.0;
/* Convert the new hsv coord to back rgb */
- double new_hsv_rgb[3];
+ {
+ double new_hsv_rgb[3];
hsv2rgb(new_hsv, new_hsv_rgb);
/* Store the interpolated color in the new palette */
@@ -452,6 +453,7 @@ void flam3_interpolate_n(flam3_genome *result, int ncp,
result->palette[i].index = 0.0;
if (result->palette[i].index > 255.0)
result->palette[i].index = 255.0;
+ }
}
} else {
/* Sweep - not the best option for float indices */
--
2.7.0