[packages/exact-image] try some PNG 1.5 patch available https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=exact
gotar
gotar at pld-linux.org
Mon Oct 6 15:09:33 CEST 2014
commit fcc4b36137ab9030604e7c344e18a628ebd3cc66
Author: Tomasz Pala <gotar at pld-linux.org>
Date: Mon Oct 6 15:09:20 2014 +0200
try some PNG 1.5 patch available
https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=exactimage_0.8.5-1.patch;att=1;bug=635745
exact-image-libs.patch | 33 ---------------
exact-image.spec | 8 ++--
exactimage_0.8.5-1.patch | 104 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 109 insertions(+), 36 deletions(-)
---
diff --git a/exact-image.spec b/exact-image.spec
index b736199..a7bce5a 100644
--- a/exact-image.spec
+++ b/exact-image.spec
@@ -1,12 +1,13 @@
Summary: A fast, modern and generic image processing library
Name: exact-image
Version: 0.8.9
-Release: 1
+Release: 2
License: GPL v2
Group: Applications/Graphics
Source0: http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2
# Source0-md5: a8694722cd7cc9aa9407950a8440f0cd
Patch0: %{name}-libs.patch
+Patch1: exactimage_0.8.5-1.patch
URL: http://www.exactcode.de/site/open_source/exactimage/
BuildRequires: OpenEXR-devel >= 1.2.0
BuildRequires: agg-devel >= 2.3
@@ -14,7 +15,7 @@ BuildRequires: evas-devel >= 0.9.9
#BuildRequires: giflib4-devel
BuildRequires: jasper-devel
BuildRequires: lcms-devel >= 1.10
-#BuildRequires: libpng12-devel >= 1.2
+BuildRequires: libpng-devel >= 1.5
BuildRequires: libstdc++-devel
BuildRequires: libtiff-cxx-devel
BuildRequires: lua51-devel
@@ -35,9 +36,10 @@ alternative to ImageMagick.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
-./configure --prefix=%{_prefix} --without-libungif --without-libpng --without-php \
+./configure --prefix=%{_prefix} --without-libungif --without-php \
%ifarch %{x8664}
--without-lua --without-perl --without-python
%endif
diff --git a/exact-image-libs.patch b/exact-image-libs.patch
index f3983cb..59afafb 100644
--- a/exact-image-libs.patch
+++ b/exact-image-libs.patch
@@ -10,30 +10,9 @@ diff -ur -urp exact-image-0.8.5.orig/api/lua/Makefile exact-image-0.8.5/api/lua/
# install
all:: $($(X_MODULE)_BINARY)
-diff -ur -urp exact-image-0.8.5.orig/codecs/png.cc exact-image-0.8.5/codecs/png.cc
---- exact-image-0.8.5.orig/codecs/png.cc 2010-03-03 22:04:44.000000000 +0100
-+++ exact-image-0.8.5/codecs/png.cc 2011-05-14 00:28:20.000000000 +0200
-@@ -16,7 +16,7 @@
- */
-
- #include <stdlib.h>
--#include <png.h>
-+#include <libpng12/png.h>
-
- #include <iostream>
-
diff -ur -urp exact-image-0.8.5.orig/configure exact-image-0.8.5/configure
--- exact-image-0.8.5.orig/configure 2010-11-21 11:01:04.000000000 +0100
+++ exact-image-0.8.5/configure 2011-05-14 00:22:45.000000000 +0200
-@@ -63,7 +63,7 @@ fi
-
- pkgcheck libjpeg header LIBJPEG cc jconfig.h
- pkgcheck libtiff header LIBTIFF c++ tiffconf.h tiffio.h # tiffio.hxx
--pkgcheck libpng pkg-config LIBPNG atleast 1.2
-+pkgcheck libpng12 pkg-config LIBPNG atleast 1.2
- pkgcheck libungif header LIBUNGIF c++ gif_lib.h
- pkgcheck jasper header JASPER c++ jasper/jasper.h
- if pkgcheck expat header EXPAT c++ expat.h; then # just for the SVG parser
@@ -91,7 +91,7 @@ pkgcheck swig shell SWIG 'swig -version
# supported swig target languages so far
@@ -43,15 +22,3 @@ diff -ur -urp exact-image-0.8.5.orig/configure exact-image-0.8.5/configure
pkgcheck perl shell PERL 'perl -version 2>/dev/null | sed -n "s/This is perl.*v\([0-9.]*\).*built.*/\1/p"' atleast 5.8.0 &&
PERLINCS="`perl -MExtUtils::Embed -e ccopts`"
-diff -ur -x .svn -x .git -x .bzr -x CVS -urN exact-image-0.8.9/codecs/Makefile b/codecs/Makefile
---- exact-image-0.8.9/codecs/Makefile 2011-06-30 23:23:25.000000000 +0200
-+++ b/codecs/Makefile 2014-10-06 14:17:34.479107173 +0200
-@@ -13,7 +13,7 @@
- endif
-
- ifeq "$(WITHLIBPNG)" "1"
--LDFLAGS += -lpng
-+LDFLAGS += -lpng12
- else
- NOT_SRCS += png.cc
- endif
diff --git a/exactimage_0.8.5-1.patch b/exactimage_0.8.5-1.patch
new file mode 100644
index 0000000..df9fd1f
--- /dev/null
+++ b/exactimage_0.8.5-1.patch
@@ -0,0 +1,104 @@
+--- exactimage-0.8.5.orig/codecs/png.cc
++++ exactimage-0.8.5/codecs/png.cc
+@@ -17,6 +17,7 @@
+
+ #include <stdlib.h>
+ #include <png.h>
++#include <zlib.h>
+
+ #include <iostream>
+
+@@ -58,7 +59,7 @@ int PNGCodec::readImage (std::istream* s
+ png_structp png_ptr;
+ png_infop info_ptr;
+ png_uint_32 width, height;
+- int bit_depth, color_type, interlace_type;
++ int bit_depth, color_type, interlace_type, num_trans;
+
+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
+ NULL /*user_error_ptr*/,
+@@ -71,7 +72,7 @@ int PNGCodec::readImage (std::istream* s
+ /* Allocate/initialize the memory for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return 0;
+ }
+
+@@ -82,7 +83,7 @@ int PNGCodec::readImage (std::istream* s
+
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ /* If we get here, we had a problem reading the file */
+ return 0;
+ }
+@@ -99,13 +100,13 @@ int PNGCodec::readImage (std::istream* s
+ png_read_info (png_ptr, info_ptr);
+
+ png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+- &interlace_type, int_p_NULL, int_p_NULL);
++ &interlace_type, NULL, NULL);
+
+ image.w = width;
+ image.h = height;
+ 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);
+ res_y = png_get_y_pixels_per_meter(png_ptr, info_ptr);
+@@ -119,11 +120,13 @@ int PNGCodec::readImage (std::istream* s
+ * (not useful if you are using png_set_packing). */
+ // png_set_packswap(png_ptr);
+
++ png_get_tRNS(png_ptr, info_ptr, NULL, &num_trans, NULL);
++
+ /* Expand paletted colors into true RGB triplets */
+ if (color_type == PNG_COLOR_TYPE_PALETTE) {
+ png_set_palette_to_rgb(png_ptr);
+ image.bps = 8;
+- if (info_ptr->num_trans)
++ if (num_trans)
+ image.spp = 4;
+ else
+ image.spp = 3;
+@@ -196,11 +199,11 @@ int PNGCodec::readImage (std::istream* s
+ for (int pass = 0; pass < number_passes; ++pass)
+ for (unsigned int y = 0; y < height; ++y) {
+ row_pointers[0] = image.getRawData() + y * stride;
+- png_read_rows(png_ptr, row_pointers, png_bytepp_NULL, 1);
++ png_read_rows(png_ptr, row_pointers, NULL, 1);
+ }
+
+ /* clean up after the read, and free any memory allocated - REQUIRED */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ /* that's it */
+ return true;
+@@ -224,7 +227,7 @@ bool PNGCodec::writeImage (std::ostream*
+ /* Allocate/initialize the memory for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
++ png_destroy_write_struct(&png_ptr, NULL);
+ return false;
+ }
+
+@@ -244,8 +247,10 @@ bool PNGCodec::writeImage (std::ostream*
+ else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION;
+ png_set_compression_level(png_ptr, quality);
+
++ /* Need?
+ png_info_init (info_ptr);
+-
++ */
++
+ /* Set up our STL stream output control */
+ png_set_write_fn (png_ptr, stream, &stdstream_write_data, &stdstream_flush_data);
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/exact-image.git/commitdiff/fcc4b36137ab9030604e7c344e18a628ebd3cc66
More information about the pld-cvs-commit
mailing list