[packages/exact-image] - updated to 1.2.1, adjust for current gif,heif,jasper,jxl libraries

qboosh qboosh at pld-linux.org
Thu Aug 29 20:42:23 CEST 2024


commit b34e166d7a49cdf234f43ed126ffeaaaaf028819
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Aug 29 20:30:59 2024 +0200

    - updated to 1.2.1, adjust for current gif,heif,jasper,jxl libraries

 exact-image-gif.patch     | 21 +++++++++++++++++++++
 exact-image-heif.patch    | 11 +++++++++++
 exact-image-install.patch | 10 +++++-----
 exact-image-jasper.patch  | 37 +++++++++++++++++++++++++++++++++++++
 exact-image-jxl.patch     | 11 +++++++++++
 exact-image-ub.patch      |  9 ---------
 exact-image.spec          | 22 ++++++++++++++++------
 7 files changed, 101 insertions(+), 20 deletions(-)
---
diff --git a/exact-image.spec b/exact-image.spec
index 348c780..4e54049 100644
--- a/exact-image.spec
+++ b/exact-image.spec
@@ -13,17 +13,21 @@
 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:	1.0.1
+Version:	1.2.1
 Release:	1
 License:	GPL v2
 Group:		Applications/Graphics
 Source0:	http://dl.exactcode.de/oss/exact-image/%{name}-%{version}.tar.bz2
-# Source0-md5:	1f03ef559ca81cf7a1651a72fd9fe98f
+# Source0-md5:	f0afb7874ad44a3b0096a9882fa70457
 Patch0:		%{name}-libs.patch
 Patch1:		%{name}-ub.patch
 Patch2:		%{name}-make.patch
 Patch3:		%{name}-evas.patch
 Patch4:		%{name}-install.patch
+Patch5:		%{name}-gif.patch
+Patch6:		%{name}-heif.patch
+Patch7:		%{name}-jasper.patch
+Patch8:		%{name}-jxl.patch
 URL:		http://www.exactcode.de/site/open_source/exactimage/
 BuildRequires:	OpenEXR-devel >= 1.2.0
 BuildRequires:	agg-devel >= 2.3
@@ -34,9 +38,11 @@ BuildRequires:	freetype-devel >= 2.1.6
 %{?with_gif:BuildRequires:	giflib-devel >= 5.1}
 BuildRequires:	jasper-devel
 BuildRequires:	lcms-devel >= 1.10
+BuildRequires:	libheif-devel >= 1.16
 BuildRequires:	libjpeg-devel
+BuildRequires:	libjxl-devel >= 0.6
 BuildRequires:	libpng-devel >= 2:1.5
-BuildRequires:	libstdc++-devel
+BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	libtiff-devel
 %{?with_lua:BuildRequires:	lua51-devel >= 5.1}
 BuildRequires:	perl-devel >= 1:5.8.0
@@ -45,8 +51,8 @@ BuildRequires:	pkgconfig
 %{?with_python:BuildRequires:	python-devel >= 1:2.5.0}
 BuildRequires:	rpm-perlprov
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.219
-%{?with_ruby:BuildRequires:	ruby-devel >= 1.8.5}
+BuildRequires:	rpmbuild(macros) >= 1.745
+%{?with_ruby:BuildRequires:	ruby-devel >= 1.9}
 BuildRequires:	sed >= 4.0
 %{?with_perl:BuildRequires:	swig-perl >= 1.3.32}
 %{?with_php:BuildRequires:	swig-php >= 3.0.12}
@@ -117,6 +123,10 @@ API ExactImage dla Pythona.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 %if %{with php}
 %if "%(php%{?php_suffix}-config --version)" >= "7.0"
@@ -138,7 +148,7 @@ API ExactImage dla Pythona.
 	CC="%{__cc}" \
 	CXX="%{__cxx}" \
 	CFLAGS="%{rpmcflags}" \
-	CXXFLAGS="%{rpmcflags} -std=gnu++98" \
+	CXXFLAGS="%{rpmcxxflags}" \
 	Q=
 
 %install
diff --git a/exact-image-gif.patch b/exact-image-gif.patch
new file mode 100644
index 0000000..fcdab18
--- /dev/null
+++ b/exact-image-gif.patch
@@ -0,0 +1,21 @@
+--- exact-image-1.2.1/codecs/gif.cc.orig	2020-03-13 17:35:09.000000000 +0100
++++ exact-image-1.2.1/codecs/gif.cc	2024-08-25 21:48:19.378553305 +0200
+@@ -16,6 +16,7 @@
+  */
+ 
+ #include <gif_lib.h>
++#include <gif_util.h>
+ 
+ #include "gif.hh"
+ #include "Colorspace.hh"
+--- exact-image-1.2.1/codecs/Makefile.orig	2024-01-02 00:25:03.000000000 +0100
++++ exact-image-1.2.1/codecs/Makefile	2024-08-28 06:20:58.615944584 +0200
+@@ -31,7 +31,7 @@ NOT_SRCS += png.cc
+ endif
+ 
+ ifeq "$(WITHLIBGIF)" "1"
+-LDFLAGS += -lgif
++LDFLAGS += -lgif -lgifutil
+ else
+ NOT_SRCS += gif.cc
+ endif
diff --git a/exact-image-heif.patch b/exact-image-heif.patch
new file mode 100644
index 0000000..6ba6380
--- /dev/null
+++ b/exact-image-heif.patch
@@ -0,0 +1,11 @@
+--- exact-image-1.2.1/codecs/heif.cc.orig	2024-01-02 21:10:58.000000000 +0100
++++ exact-image-1.2.1/codecs/heif.cc	2024-08-26 17:37:03.913854555 +0200
+@@ -23,7 +23,7 @@
+ #include <sstream>
+ #include <vector>
+ 
+-#include <libheif/heif.h>
++#include <libheif/heif_cxx.h>
+ 
+ #include "heif.hh"
+ 
diff --git a/exact-image-install.patch b/exact-image-install.patch
index 37fe4c6..456cbf4 100644
--- a/exact-image-install.patch
+++ b/exact-image-install.patch
@@ -13,9 +13,9 @@
 -	$(Q)install $^ $(dir $^)/ExactImage.pm $(DESTDIR)$(libdir)/perl5/site_perl/
 +	$(Q)mkdir -p $(DESTDIR)$(PERL_INSTALLDIR)
 +	$(Q)install $^ $(dir $^)/ExactImage.pm $(DESTDIR)$(PERL_INSTALLDIR)
---- exact-image-0.8.9/api/php/Makefile.orig	2014-10-20 22:12:43.280432256 +0200
-+++ exact-image-0.8.9/api/php/Makefile	2014-10-20 22:12:47.193765425 +0200
-@@ -16,9 +16,11 @@
+--- exact-image-1.2.1/api/php/Makefile.orig	2024-08-25 18:24:47.551377113 +0200
++++ exact-image-1.2.1/api/php/Makefile	2024-08-25 18:30:19.222913628 +0200
+@@ -16,9 +16,11 @@ X_BUILD_IMPLICIT := 0
  include build/bottom.make
  X_BUILD_IMPLICIT := $(_X_BUILD_IMPLICIT)
  
@@ -26,6 +26,6 @@
  install:: $($(X_MODULE)_BINARY)
  	$(Q)echo "INSTALL PHP module $^"
 -	$(Q)mkdir -p $(DESTDIR)$(libdir)/php/
--	$(Q)install $^ $(dir $^)/ExactImage.php $(DESTDIR)$(libdir)/php/
+-	$(Q)install $^ $(DESTDIR)$(libdir)/php/
 +	$(Q)mkdir -p $(DESTDIR)$(PHP_INSTALLDIR)
-+	$(Q)install $^ $(dir $^)/ExactImage.php $(DESTDIR)$(PHP_INSTALLDIR)
++	$(Q)install $^ $(DESTDIR)$(PHP_INSTALLDIR)
diff --git a/exact-image-jasper.patch b/exact-image-jasper.patch
new file mode 100644
index 0000000..3b542bf
--- /dev/null
+++ b/exact-image-jasper.patch
@@ -0,0 +1,37 @@
+--- exact-image-1.2.1/codecs/jpeg2000.cc.orig	2017-07-21 16:19:01.000000000 +0200
++++ exact-image-1.2.1/codecs/jpeg2000.cc	2024-08-26 18:11:43.735616525 +0200
+@@ -67,14 +67,14 @@ static jas_stream_t* jas_stream_create()
+   return stream;
+ }
+ 
+-static int cpp_jas_read (jas_stream_obj_t* obj, char* buf, int cnt)
++static ssize_t cpp_jas_read (jas_stream_obj_t* obj, char* buf, size_t cnt)
+ {
+   std::istream* stream = (std::istream*) obj;
+   stream->read (buf, cnt);
+   return cnt;
+ }
+ 
+-static int cpp_jas_write (jas_stream_obj_t* obj, char* buf, int cnt)
++static ssize_t cpp_jas_write (jas_stream_obj_t* obj, const char* buf, size_t cnt)
+ {
+   std::ostream* stream = (std::ostream*) obj;
+   stream->write (buf, cnt);
+@@ -149,7 +149,7 @@ int JPEG2000Codec::readImage (std::istre
+   
+   jas_stream_initbuf (in);
+   
+-  if (!(image = jp2_decode(in, 0))) {
++  if (!(image = jas_image_decode(in, jas_image_strtofmt("jp2"), 0))) {
+     std::cerr << "error: cannot load image data" << std::endl;
+     return false;
+   }
+@@ -324,7 +324,7 @@ bool JPEG2000Codec::writeImage (std::ost
+ 
+   std::stringstream opts;
+   opts << "rate=" << (double)quality / 100;
+-  jp2_encode(image, out, (char*)opts.str().c_str());
++  jas_image_encode(image, out, jas_image_strtofmt("jp2"), (char*)opts.str().c_str());
+   jas_image_destroy (image);
+   jas_stream_close (out);
+   
diff --git a/exact-image-jxl.patch b/exact-image-jxl.patch
new file mode 100644
index 0000000..df3aa54
--- /dev/null
+++ b/exact-image-jxl.patch
@@ -0,0 +1,11 @@
+--- exact-image-1.2.1/codecs/jpegxl.cc.orig	2021-10-05 14:36:35.000000000 +0200
++++ exact-image-1.2.1/codecs/jpegxl.cc	2024-08-26 18:54:16.735418802 +0200
+@@ -186,7 +186,7 @@ bool JPEGXLCodec::writeImage(std::ostrea
+   }
+   
+   if (JXL_ENC_SUCCESS !=
+-      JxlEncoderAddImageFrame(JxlEncoderOptionsCreate(enc.get(), nullptr),
++      JxlEncoderAddImageFrame(JxlEncoderFrameSettingsCreate(enc.get(), nullptr),
+                               &pixel_format, image.getRawData(),
+                               image.stride() * image.h)) {
+     std::cerr << "JxlEncoderAddImageFrame failed" << std::endl;
diff --git a/exact-image-ub.patch b/exact-image-ub.patch
index 1a6ba3e..ea3905e 100644
--- a/exact-image-ub.patch
+++ b/exact-image-ub.patch
@@ -33,12 +33,3 @@
  	cam_xyz_coeff (rgb_cam, cam_xyz);
        }
        break;
-@@ -9547,7 +9547,7 @@
-   strncpy (th->desc, desc, 512);
-   strncpy (th->make, make, 64);
-   strncpy (th->model, model, 64);
--  strcpy (th->soft, "dcraw v"DCRAW_VERSION);
-+  strcpy (th->soft, "dcraw v" DCRAW_VERSION);
-   t = localtime (&timestamp);
-   sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d",
-       t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/exact-image.git/commitdiff/eb55f2598a3ec47966b5c1373891719439ad3937



More information about the pld-cvs-commit mailing list