[packages/exact-image] - updated to 0.9.2 - removed obsolete 0.8.5-1,giflib patches - support php7 (using swig 3.0.12+)

qboosh qboosh at pld-linux.org
Sun Feb 26 12:08:35 CET 2017


commit e48077b8957cb2e3b82fcbe38a329e3b862e7a96
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 26 12:10:32 2017 +0100

    - updated to 0.9.2
    - removed obsolete 0.8.5-1,giflib patches
    - support php7 (using swig 3.0.12+)

 exact-image-giflib.patch | 139 -----------------------------------------------
 exact-image.spec         |  25 +++++----
 exactimage_0.8.5-1.patch | 104 -----------------------------------
 3 files changed, 14 insertions(+), 254 deletions(-)
---
diff --git a/exact-image.spec b/exact-image.spec
index 6b80966..cc8dafc 100644
--- a/exact-image.spec
+++ b/exact-image.spec
@@ -7,22 +7,20 @@
 %bcond_without	perl	# Perl API
 %bcond_without	php	# PHP API
 %bcond_without	python	# Python API
-%bcond_with	ruby	# Ruby API [not finished as of 0.8.9]
+%bcond_with	ruby	# Ruby API [still not finished as of 0.9.2]
 
 %define		php_name	php%{?php_suffix}
 %include	/usr/lib/rpm/macros.perl
 Summary:	A fast, modern and generic image processing library
 Summary(pl.UTF-8):	Szybka, nowoczesna i ogólna biblioteka do przetwarzania obrazu
 Name:		exact-image
-Version:	0.8.9
-Release:	10
+Version:	0.9.2
+Release:	1
 License:	GPL v2
 Group:		Applications/Graphics
 Source0:	http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2
-# Source0-md5:	a8694722cd7cc9aa9407950a8440f0cd
+# Source0-md5:	bb9c8be82a4b5126be0224529ea7c4c7
 Patch0:		%{name}-libs.patch
-Patch1:		exactimage_0.8.5-1.patch
-Patch2:		%{name}-giflib.patch
 Patch3:		%{name}-evas.patch
 Patch4:		%{name}-install.patch
 Patch5:		swig.patch
@@ -30,10 +28,10 @@ URL:		http://www.exactcode.de/site/open_source/exactimage/
 BuildRequires:	OpenEXR-devel >= 1.2.0
 BuildRequires:	agg-devel >= 2.3
 %{?with_evas:BuildRequires:	evas-devel >= 0.9.9}
-BuildRequires:	expat-devel
+BuildRequires:	expat-devel >= 1.95
 # pkgconfig(freetype) >= 9.5.0
 BuildRequires:	freetype-devel >= 2.1.6
-%{?with_gif:BuildRequires:	giflib-devel >= 5}
+%{?with_gif:BuildRequires:	giflib-devel >= 5.1}
 BuildRequires:	jasper-devel
 BuildRequires:	lcms-devel >= 1.10
 BuildRequires:	libjpeg-devel
@@ -49,8 +47,9 @@ BuildRequires:	rpm-perlprov
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.219
 %{?with_ruby:BuildRequires:	ruby-devel >= 1.8.5}
+BuildRequires:	sed >= 4.0
 %{?with_perl:BuildRequires:	swig-perl >= 1.3.32}
-%{?with_php:BuildRequires:	swig-php >= 1.3.32}
+%{?with_php:BuildRequires:	swig-php >= 3.0.12}
 %{?with_python:BuildRequires:	swig-python >= 1.3.32}
 BuildRequires:	xorg-lib-libX11-devel >= 1.3
 BuildRequires:	zlib-devel
@@ -114,12 +113,16 @@ API ExactImage dla Pythona.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 
+%if %{with php}
+%if "%(php%{?php_suffix}-config --version)" >= "7.0"
+%{__sed} -i -e 's/-php5/-php7/' api/php/Makefile
+%endif
+%endif
+
 %build
 ./configure \
 	--prefix=%{_prefix} \
diff --git a/exact-image-giflib.patch b/exact-image-giflib.patch
deleted file mode 100644
index f15c7ad..0000000
--- a/exact-image-giflib.patch
+++ /dev/null
@@ -1,139 +0,0 @@
---- exact-image-0.8.9/codecs/gif.cc.orig	2010-03-03 22:04:44.000000000 +0100
-+++ exact-image-0.8.9/codecs/gif.cc	2014-10-20 16:45:48.021255431 +0200
-@@ -17,6 +17,12 @@
- 
- #include <gif_lib.h>
- 
-+#if (GIFLIB_MAJOR > 5) || (GIFLIB_MINOR >= 1)
-+#define Internal_EGifCloseFile(f) EGifCloseFile(f, NULL)
-+#else
-+#define Internal_EGifCloseFile(f) EGifCloseFile(f)
-+#endif
-+
- #include "gif.hh"
- #include "Colorspace.hh"
- 
-@@ -58,11 +64,11 @@
-   GifRecordType RecordType;
-   GifByteType* Extension;
-   ColorMapObject *ColorMap = NULL;
--  int ExtCode;
-+  int ExtCode, GifError;
-   
--  if ((GifFile = DGifOpen (stream, &GIFInputFunc)) == NULL)
-+  if ((GifFile = DGifOpen (stream, &GIFInputFunc, &GifError)) == NULL)
-     {
--      PrintGifError();
-+      std::cerr << "Error: " << GifErrorString(GifError) << std::endl;
-       return false;
-     }
-   
-@@ -74,7 +80,7 @@
-   /* Scan the content of the GIF file and load the image(s) in: */
-   do {
-     if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR) {
--      PrintGifError();
-+      std::cerr << "DGifGetRecordType error: " << GifErrorString(GifFile->Error) << std::endl;
-       return false;
-     }
-     
-@@ -83,7 +89,7 @@
-     switch (RecordType) {
-     case IMAGE_DESC_RECORD_TYPE:
-       if (DGifGetImageDesc(GifFile) == GIF_ERROR) {
--	PrintGifError();
-+        std::cerr << "DGifGetImageDesc error: " << GifErrorString(GifFile->Error) << std::endl;
- 	return false;
-       }
-       
-@@ -104,7 +110,7 @@
- 	       j += InterlacedJumps[i]) {
- 	    if (DGifGetLine(GifFile, &image.getRawData()[j*image.stride()+Col],
- 			    Width) == GIF_ERROR) {
--	      PrintGifError();
-+	      std::cerr << "DGifGetLine error: " << GifErrorString(GifFile->Error) << std::endl;
- 	      return false;
- 	    }
- 	  }
-@@ -113,7 +119,7 @@
- 	for (int i = 0; i < Height; ++i) {
- 	  if (DGifGetLine(GifFile, &image.getRawData()[Row++ * image.stride()+Col],
- 			  Width) == GIF_ERROR) {
--	    PrintGifError();
-+	    std::cerr << "DGifGetLine error: " << GifErrorString(GifFile->Error) << std::endl;
- 	    return false;
- 	  }
- 	}
-@@ -122,12 +128,12 @@
-     case EXTENSION_RECORD_TYPE:
-       /* Skip any extension blocks in file: */
-       if (DGifGetExtension(GifFile, &ExtCode, &Extension) == GIF_ERROR) {
--	PrintGifError();
-+	std::cerr << "DGifGetExtension error: " << GifErrorString(GifFile->Error) << std::endl;
- 	return false;
-       }
-       while (Extension != NULL) {
- 	if (DGifGetExtensionNext(GifFile, &Extension) == GIF_ERROR) {
--	  PrintGifError();
-+	  std::cerr << "DGifGetExtensionNext error: " << GifErrorString(GifFile->Error) << std::endl;
- 	  return false;
- 	}
-       }
-@@ -155,7 +161,7 @@
-   // convert colormap to our 16bit "TIFF"format
-   colorspace_de_palette (image, ColorMap->ColorCount, rmap, gmap, bmap);
-   
--  EGifCloseFile(GifFile);
-+  Internal_EGifCloseFile(GifFile);
- 
-   return true;
- }
-@@ -165,17 +171,18 @@
- {
-   GifFileType* GifFile;
-   GifByteType* Ptr;
-+  int GifError;
-   
--  if ((GifFile = EGifOpen (stream, &GIFOutputFunc)) == NULL)
-+  if ((GifFile = EGifOpen (stream, &GIFOutputFunc, &GifError)) == NULL)
-     {
--      std::cerr << "Error preparing GIF file for writing." << std::endl;
-+      std::cerr << "Error preparing GIF file for writing: " << GifErrorString(GifError) << std::endl;
-       return false;
-     }
-   
-   int ColorMapSize = 256;
-   
-   // later use our own colormap generation
--  ColorMapObject* OutputColorMap = MakeMapObject(ColorMapSize, NULL);
-+  ColorMapObject* OutputColorMap = GifMakeMapObject(ColorMapSize, NULL);
-   if (!OutputColorMap)
-     return false;
-   
-@@ -203,7 +210,7 @@
-   }
-    
-   
--  if (QuantizeBuffer(image.w, image.h, &ColorMapSize,
-+  if (GifQuantizeBuffer(image.w, image.h, &ColorMapSize,
- 		     RedBuffer, GreenBuffer, BlueBuffer,
- 		     OutputBuffer, OutputColorMap->Colors) == GIF_ERROR) {
-     return false;
-@@ -215,7 +222,7 @@
-   if (EGifPutScreenDesc(GifFile, image.w, image.h,
- 			ColorMapSize, 0, OutputColorMap) == GIF_ERROR ||
-       EGifPutImageDesc(GifFile, 0, 0, image.w, image.h,
--		       FALSE, NULL) == GIF_ERROR)
-+		       false, NULL) == GIF_ERROR)
-     {
-       std::cerr << "Error writing GIF header." << std::endl;
-       return false;
-@@ -234,7 +241,7 @@
- 
-   delete (RedBuffer); delete (GreenBuffer); delete (BlueBuffer);
- 
--  EGifCloseFile(GifFile);
-+  Internal_EGifCloseFile(GifFile);
-   return true;
- }
- 
diff --git a/exactimage_0.8.5-1.patch b/exactimage_0.8.5-1.patch
deleted file mode 100644
index df9fd1f..0000000
--- a/exactimage_0.8.5-1.patch
+++ /dev/null
@@ -1,104 +0,0 @@
---- 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/e48077b8957cb2e3b82fcbe38a329e3b862e7a96



More information about the pld-cvs-commit mailing list