aboutsummaryrefslogtreecommitdiff
path: root/print/fontforge
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2010-03-29 08:08:39 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2010-03-29 08:08:39 +0000
commite038dbd3bb0356fc6e4463fd5c3a1564bbb3625f (patch)
tree071423e35e3e5235783e60231147828f672aae35 /print/fontforge
parentc5c22bbf593c19ad26c552dee77116d216ad9b03 (diff)
downloadports-e038dbd3bb0356fc6e4463fd5c3a1564bbb3625f.tar.gz
ports-e038dbd3bb0356fc6e4463fd5c3a1564bbb3625f.zip
- fix build for png-1.4.1
Notes
Notes: svn path=/head/; revision=251695
Diffstat (limited to 'print/fontforge')
-rw-r--r--print/fontforge/files/patch-gutils-gimagereadpng.c21
-rw-r--r--print/fontforge/files/patch-gutils-gimagewritepng.c65
2 files changed, 86 insertions, 0 deletions
diff --git a/print/fontforge/files/patch-gutils-gimagereadpng.c b/print/fontforge/files/patch-gutils-gimagereadpng.c
new file mode 100644
index 000000000000..d66792c4128e
--- /dev/null
+++ b/print/fontforge/files/patch-gutils-gimagereadpng.c
@@ -0,0 +1,21 @@
+--- gutils/gimagereadpng.c.orig 2009-02-22 18:26:06.000000000 +0100
++++ gutils/gimagereadpng.c 2010-03-29 09:15:26.000000000 +0200
+@@ -220,13 +220,13 @@
+ if ( (info_ptr->valid&PNG_INFO_tRNS) && info_ptr->num_trans>0 ) {
+ if ( info_ptr->color_type==PNG_COLOR_TYPE_RGB || info_ptr->color_type==PNG_COLOR_TYPE_RGB_ALPHA )
+ base->trans = COLOR_CREATE(
+- (info_ptr->trans_values.red>>8),
+- (info_ptr->trans_values.green>>8),
+- (info_ptr->trans_values.blue>>8));
++ (info_ptr->trans_color.red>>8),
++ (info_ptr->trans_color.green>>8),
++ (info_ptr->trans_color.blue>>8));
+ else if ( base->image_type == it_mono )
+- base->trans = info_ptr->trans[0];
++ base->trans = info_ptr->trans_alpha[0];
+ else
+- base->clut->trans_index = base->trans = info_ptr->trans[0];
++ base->clut->trans_index = base->trans = info_ptr->trans_alpha[0];
+ }
+
+ row_pointers = galloc(info_ptr->height*sizeof(png_bytep));
diff --git a/print/fontforge/files/patch-gutils-gimagewritepng.c b/print/fontforge/files/patch-gutils-gimagewritepng.c
new file mode 100644
index 000000000000..a07f206ebeac
--- /dev/null
+++ b/print/fontforge/files/patch-gutils-gimagewritepng.c
@@ -0,0 +1,65 @@
+--- gutils/gimagewritepng.c.orig 2009-02-22 18:26:06.000000000 +0100
++++ gutils/gimagewritepng.c 2010-03-29 09:59:24.000000000 +0200
+@@ -183,8 +183,8 @@
+ if ( info_ptr->num_palette<=16 )
+ _png_set_packing(png_ptr);
+ if ( base->trans!=-1 ) {
+- info_ptr->trans = galloc(1);
+- info_ptr->trans[0] = base->trans;
++ info_ptr->trans_alpha = galloc(1);
++ info_ptr->trans_alpha[0] = base->trans;
+ }
+ } else {
+ info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+@@ -192,9 +192,9 @@
+ info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+
+ if ( base->trans!=-1 ) {
+- info_ptr->trans_values.red = COLOR_RED(base->trans);
+- info_ptr->trans_values.green = COLOR_GREEN(base->trans);
+- info_ptr->trans_values.blue = COLOR_BLUE(base->trans);
++ info_ptr->trans_color.red = COLOR_RED(base->trans);
++ info_ptr->trans_color.green = COLOR_GREEN(base->trans);
++ info_ptr->trans_color.blue = COLOR_BLUE(base->trans);
+ }
+ }
+ _png_write_info(png_ptr, info_ptr);
+@@ -210,7 +210,7 @@
+
+ _png_write_end(png_ptr, info_ptr);
+
+- if ( info_ptr->trans!=NULL ) gfree(info_ptr->trans);
++ if ( info_ptr->trans_alpha!=NULL ) gfree(info_ptr->trans_alpha);
+ if ( info_ptr->palette!=NULL ) gfree(info_ptr->palette);
+ _png_destroy_write_struct(&png_ptr, &info_ptr);
+ gfree(rows);
+@@ -314,15 +314,15 @@
+ if ( info_ptr->num_palette<=16 )
+ png_set_packing(png_ptr);
+ if ( base->trans!=-1 ) {
+- info_ptr->trans = galloc(1);
+- info_ptr->trans[0] = base->trans;
++ info_ptr->trans_alpha = galloc(1);
++ info_ptr->trans_alpha[0] = base->trans;
+ }
+ } else {
+ info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+ if ( base->trans!=-1 ) {
+- info_ptr->trans_values.red = COLOR_RED(base->trans);
+- info_ptr->trans_values.green = COLOR_GREEN(base->trans);
+- info_ptr->trans_values.blue = COLOR_BLUE(base->trans);
++ info_ptr->trans_color.red = COLOR_RED(base->trans);
++ info_ptr->trans_color.green = COLOR_GREEN(base->trans);
++ info_ptr->trans_color.blue = COLOR_BLUE(base->trans);
+ }
+ }
+ png_write_info(png_ptr, info_ptr);
+@@ -338,7 +338,7 @@
+
+ png_write_end(png_ptr, info_ptr);
+
+- if ( info_ptr->trans!=NULL ) gfree(info_ptr->trans);
++ if ( info_ptr->trans_alpha!=NULL ) gfree(info_ptr->trans_alpha);
+ if ( info_ptr->palette!=NULL ) gfree(info_ptr->palette);
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ gfree(rows);