Ignore:
Timestamp:
Apr 10, 2013, 7:54:53 PM (7 years ago)
Author:
michaelld@…
Message:

transfig:

  • fix libpng changes to be more in-line with the intent of the original code (hopefully);
  • add patch to make c code compile more cleanly and be more C99 compliant (works with clang now).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/print/transfig/files/patch-libpng-1.5.diff

    r97304 r105115  
    1 --- fig2dev/dev/readpng.c.orig
    2 +++ fig2dev/dev/readpng.c
    3 @@ -62,7 +62,7 @@ read_png(file,filetype,pic,llx,lly)
     1--- fig2dev/dev/readpng.c.orig  2013-04-10 15:00:00.000000000 -0400
     2+++ fig2dev/dev/readpng.c       2013-04-10 15:01:25.000000000 -0400
     3@@ -62,7 +62,7 @@
    44     }
    55 
     
    1010        png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
    1111        return 0;
    12 @@ -78,15 +78,17 @@ read_png(file,filetype,pic,llx,lly)
     12@@ -78,15 +78,19 @@
    1313     png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type,
    1414        &interlace_type, &compression_type, &filter_type);
     
    1616-    if (info_ptr->valid & PNG_INFO_gAMA)
    1717-       png_set_gamma(png_ptr, 2.2, info_ptr->gamma);
    18 -    else
     18+    double gamma = 0.45;
     19+    if (png_get_gAMA(png_ptr,info_ptr,&gamma))
     20+      png_set_gamma(png_ptr, 2.2, gamma);
     21     else
    1922-       png_set_gamma(png_ptr, 2.2, 0.45);
    20 +    png_fixed_point gamma = 0.45;
    21 +    png_get_gAMA_fixed(png_ptr,info_ptr,&gamma);
    22 +    png_set_gamma(png_ptr, 2.2, gamma);
     23+      png_set_gamma(png_ptr, 2.2, 0.45);
    2324 
    2425-    if (info_ptr->valid & PNG_INFO_bKGD)
Note: See TracChangeset for help on using the changeset viewer.