Skip to content

Commit

Permalink
exact-image: update to 0.8.7 (https://trac.macports.org/ticket/33798)…
Browse files Browse the repository at this point in the history
…; blacklist clang (https://trac.macports.org/ticket/34201); fix build with libpng 1.5 (https://trac.macports.org/ticket/36742); enable evas and openexr, and disable bardecode (https://trac.macports.org/ticket/33787)

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@99117 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
ryandesign committed Oct 27, 2012
1 parent 341f500 commit 91f0e52
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.
17 changes: 12 additions & 5 deletions graphics/exact-image/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
PortSystem 1.0

name exact-image
version 0.8.4
revision 1
version 0.8.7
categories graphics
license GPL-2
maintainers tobias-elze.de:macports openmaintainer
Expand All @@ -18,31 +17,39 @@ homepage http://www.exactcode.de/site/open_source/exactimage/
master_sites http://dl.exactcode.de/oss/exact-image/

use_bzip2 yes
checksums md5 a7f18ca4d2970d9e2d74bdea84990c78 \
sha1 36d946be607699e166e81fc451ee878f646a94c5 \
rmd160 0e60d5fc30c6d88ea4ae8e1a5c34e119c281204a

checksums rmd160 8e3f11a94688cc276ca4c29021e4b9231da25629 \
sha256 b1b5d00e98903b7f87019920b200c600c8cbfe574ec158729566fa37f2641dfd

depends_build port:pkgconfig
depends_lib port:antigraingeometry \
port:libpng \
port:jasper \
port:evas \
port:expat \
port:openexr \
port:lcms

platform darwin 9 {
# Undefined symbols: "BarDecode::code25i_t::tol", referenced from: __ZN9BarDecode9code25i_t3tolE$non_lazy_ptr in bardecode.o
configure.compiler gcc-4.2
}

# error: variable length array of non-POD element type
compiler.blacklist clang

patchfiles codecs_png.cc.diff

configure.args --with-freetype \
--with-libjpeg \
--with-libtiff \
--with-libpng \
--with-jasper \
--with-evas \
--with-expat \
--with-openexr \
--with-lcms \
--without-bardecode \
--without-libungif \
--without-lua \
--without-swig \
Expand Down
45 changes: 37 additions & 8 deletions graphics/exact-image/files/codecs_png.cc.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
--- codecs/png.cc.orig 2011-02-09 16:18:47.000000000 +1100
+++ codecs/png.cc 2011-02-09 16:25:04.000000000 +1100
@@ -71,7 +71,7 @@ int PNGCodec::readImage (std::istream* s
--- codecs/png.cc.orig 2010-03-03 15:04:44.000000000 -0600
+++ codecs/png.cc 2012-10-26 14:48:30.000000000 -0500
@@ -17,6 +17,7 @@

#include <stdlib.h>
#include <png.h>
+#include <zlib.h>

#include <iostream>

@@ -71,7 +72,7 @@
/* Allocate/initialize the memory for image information. REQUIRED. */
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL) {
Expand All @@ -9,7 +17,7 @@
return 0;
}

@@ -82,7 +82,7 @@ int PNGCodec::readImage (std::istream* s
@@ -82,7 +83,7 @@

if (setjmp(png_jmpbuf(png_ptr))) {
/* Free all of the memory associated with the png_ptr and info_ptr */
Expand All @@ -18,7 +26,7 @@
/* If we get here, we had a problem reading the file */
return 0;
}
@@ -99,7 +99,7 @@ int PNGCodec::readImage (std::istream* s
@@ -99,12 +100,12 @@
png_read_info (png_ptr, info_ptr);

png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
Expand All @@ -27,7 +35,28 @@

image.w = width;
image.h = height;
@@ -196,11 +196,11 @@ int PNGCodec::readImage (std::istream* s
image.bps = bit_depth;
- image.spp = info_ptr->channels;
+ image.spp = png_get_channels(png_ptr, info_ptr);

png_uint_32 res_x, res_y;
res_x = png_get_x_pixels_per_meter(png_ptr, info_ptr);
@@ -123,7 +124,13 @@
if (color_type == PNG_COLOR_TYPE_PALETTE) {
png_set_palette_to_rgb(png_ptr);
image.bps = 8;
- if (info_ptr->num_trans)
+
+ png_bytep trans_alpha;
+ int num_trans;
+ png_color_16p trans_color;
+ png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color);
+
+ if (num_trans)
image.spp = 4;
else
image.spp = 3;
@@ -196,11 +203,11 @@
for (int pass = 0; pass < number_passes; ++pass)
for (unsigned int y = 0; y < height; ++y) {
row_pointers[0] = image.getRawData() + y * stride;
Expand All @@ -41,7 +70,7 @@

/* that's it */
return true;
@@ -224,7 +224,7 @@ bool PNGCodec::writeImage (std::ostream*
@@ -224,7 +231,7 @@
/* Allocate/initialize the memory for image information. REQUIRED. */
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL) {
Expand All @@ -50,7 +79,7 @@
return false;
}

@@ -244,8 +244,6 @@ bool PNGCodec::writeImage (std::ostream*
@@ -244,8 +251,6 @@
else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION;
png_set_compression_level(png_ptr, quality);

Expand Down

0 comments on commit 91f0e52

Please sign in to comment.