import gegl-0.2.0-39.el8

This commit is contained in:
CentOS Sources 2020-04-28 05:32:49 -04:00 committed by Andrew Lukoshko
parent 40ec863d55
commit c96d219bd7
2 changed files with 121 additions and 2 deletions

View File

@ -0,0 +1,115 @@
diff --git a/configure.ac b/configure.ac
index d18859b..d6dc63b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -971,25 +971,6 @@ AM_CONDITIONAL(HAVE_SPIRO, test "$spiro_ok" = "yes")
AC_SUBST(LIBSPIRO)
-###################
-# Check for exiv2
-###################
-
-AC_ARG_WITH(exiv2, [ --without-exiv2 build without libexiv2 support])
-
-have_libexiv2="no"
-if test "x$with_libexiv2" != "xno"; then
- PKG_CHECK_MODULES(EXIV2, exiv2,
- have_exiv2="yes",
- have_exiv2="no (exiv2 library not found)")
-fi
-
-AM_CONDITIONAL(HAVE_EXIV2, test "$have_exiv2" = "yes")
-
-AC_SUBST(EXIV2_CFLAGS)
-AC_SUBST(EXIV2_CXXFLAGS)
-AC_SUBST(EXIV2_LIBS)
-
###################
# Check for UMFPACK
###################
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 8f1077d..93d83fc 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -26,9 +26,9 @@ AM_LDFLAGS = \
noinst_PROGRAMS = introspect operation_reference img_cmp
-if HAVE_EXIV2
+if HAVE_GEXIV2
noinst_PROGRAMS += exp_combine
exp_combine_SOURCES = exp_combine.cpp
-exp_combine_LDADD = $(EXIV2_LIBS)
-exp_combine_CXXFLAGS = $(AM_CFLAGS) $(EXIV2_CFLAGS)
+exp_combine_LDADD = $(GEXIV2_LIBS)
+exp_combine_CXXFLAGS = $(AM_CFLAGS) $(GEXIV2_CFLAGS)
endif
diff --git a/tools/exp_combine.cpp b/tools/exp_combine.cpp
index efd8e3c..58649b6 100644
--- a/tools/exp_combine.cpp
+++ b/tools/exp_combine.cpp
@@ -8,8 +8,7 @@
#include <iostream>
-#include <exiv2/image.hpp>
-#include <exiv2/exif.hpp>
+#include <gexiv2/gexiv2.h>
using namespace std;
@@ -54,35 +53,32 @@ die:
static gfloat
expcombine_get_file_ev (const gchar *path)
{
- /* Open the file and read in the metadata */
- Exiv2::Image::AutoPtr image;
- try
- {
- image = Exiv2::ImageFactory::open (path);
- image->readMetadata ();
- }
- catch (Exiv2::Error ex)
- {
- g_print ("Error: unable to read metadata from path: '%s'\n", path);
- exit (EXIT_FAILURE);
- }
+ GError *error = NULL;
+ GExiv2Metadata *e2m = gexiv2_metadata_new ();
+ gfloat time, aperture, gain = 1.0f;
- Exiv2::ExifData &exifData = image->exifData ();
- if (exifData.empty ())
- return NAN;
+ gexiv2_metadata_open_path (e2m, path, &error);
+ if (error)
+ {
+ g_warning ("%s", error->message);
+ exit (EXIT_FAILURE);
+ }
/* Calculate the APEX brightness / EV */
- gfloat time, aperture, gain = 1.0f;
- time = exifData["Exif.Photo.ExposureTime"].value().toFloat();
- aperture = exifData["Exif.Photo.FNumber" ].value().toFloat();
+ {
+ gint nom, den;
+ gexiv2_metadata_get_exposure_time (e2m, &nom, &den);
+ time = nom * 1.0f / den;
+ }
+ aperture = gexiv2_metadata_get_fnumber (e2m);
/* iso */
- try
+ if (gexiv2_metadata_has_tag (e2m, "Exif.Image.ISOSpeedRatings"))
{
- gain = exifData["Exif.Photo.ISOSpeedRatings"].value().toLong() / 100.0f;
+ gain = gexiv2_metadata_get_iso_speed (e2m) / 100.0f;
}
- catch (Exiv2::Error ex)
+ else
{
// Assume ISO is set at 100. It's reasonably likely that the ISO is the
// same across all images anyway, and for our purposes the relative

View File

@ -16,7 +16,7 @@
Summary: A graph based image processing framework
Name: gegl
Version: 0.2.0
Release: 38%{?dist}
Release: 39%{?dist}
# Compute some version related macros
# Ugly hack, you need to get your quoting backslashes/percent signs straight
@ -36,11 +36,11 @@ Patch3: 0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch
Patch4: gegl-0.2.0-linker-flags.patch
Patch5: gegl-0.2.0-libopenraw.patch
Patch6: gegl-0.2.0-ppc64-rand-fix.patch
Patch7: gegl-build-without-exiv2.patch
BuildRequires: asciidoc
BuildRequires: babl-devel >= 0.1.10
BuildRequires: cairo-devel
BuildRequires: enscript
BuildRequires: exiv2-devel
BuildRequires: gdk-pixbuf2-devel >= 2.18.0
BuildRequires: gcc
BuildRequires: gcc-c++
@ -220,6 +220,10 @@ make check
%{_libdir}/pkgconfig/%{name}-%{apiver}.pc
%changelog
* Mon Nov 04 2019 Jan Grulich <jgrulich@redhat.com> - 0.2.0-39
- Build without exiv2
Resolves: bz#1767748
* Wed Feb 21 2018 Josef Ridky <jridky@redhat.com> - 0.2.0-38
- Remove Group tag from spec file