From 94c105d6a10c1aba884b91945ecd7df729e3a0a3 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Tue, 1 Jan 2019 23:33:08 +0100 Subject: [PATCH] gnome-color-manager: rebuild against exiv2-0.27.0_1 [ci skip] --- srcpkgs/gnome-color-manager/patches/1.patch | 53 +++++++++++++++++++++ srcpkgs/gnome-color-manager/template | 3 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/gnome-color-manager/patches/1.patch diff --git a/srcpkgs/gnome-color-manager/patches/1.patch b/srcpkgs/gnome-color-manager/patches/1.patch new file mode 100644 index 00000000000..9149de9b7ea --- /dev/null +++ b/srcpkgs/gnome-color-manager/patches/1.patch @@ -0,0 +1,53 @@ +From 6ef6bf5e3909531b874f86cb95381fa0668cf90b Mon Sep 17 00:00:00 2001 +From: Ting-Wei Lan +Date: Sun, 18 Nov 2018 14:09:08 +0800 +Subject: [PATCH] Fix build with Exiv2 0.27 + +The first parameter of Exiv2::Error has changed from an int to an +Exiv2::ErrorCode enum. +--- + src/gcm-helper-exiv.cpp | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/gcm-helper-exiv.cpp b/src/gcm-helper-exiv.cpp +index 9854e79..ffbc82c 100644 +--- a/src/gcm-helper-exiv.cpp ++++ b/src/gcm-helper-exiv.cpp +@@ -24,6 +24,10 @@ + #include + #include + ++#if EXIV2_MAJOR_VERSION >= 1 || (EXIV2_MAJOR_VERSION == 0 && EXIV2_MINOR_VERSION >= 27) ++#define HAVE_EXIV2_ERROR_CODE ++#endif ++ + int + main (int argc, char* const argv[]) + { +@@ -51,7 +55,11 @@ main (int argc, char* const argv[]) + if (argc == 2) + filename = argv[1]; + if (filename.empty()) ++#ifdef HAVE_EXIV2_ERROR_CODE ++ throw Exiv2::Error(Exiv2::kerErrorMessage, "No filename specified"); ++#else + throw Exiv2::Error(1, "No filename specified"); ++#endif + image = Exiv2::ImageFactory::open(filename); + image->readMetadata(); + +@@ -60,7 +68,11 @@ main (int argc, char* const argv[]) + if (exifData.empty()) { + std::string error(argv[1]); + error += ": No Exif data found in the file"; ++#ifdef HAVE_EXIV2_ERROR_CODE ++ throw Exiv2::Error(Exiv2::kerErrorMessage, error); ++#else + throw Exiv2::Error(1, error); ++#endif + } + + /* try to find make, model and serial number */ +-- +2.18.1 + diff --git a/srcpkgs/gnome-color-manager/template b/srcpkgs/gnome-color-manager/template index c08edeed2bf..64a94585272 100644 --- a/srcpkgs/gnome-color-manager/template +++ b/srcpkgs/gnome-color-manager/template @@ -1,7 +1,7 @@ # Template file for 'gnome-color-manager' pkgname=gnome-color-manager version=3.30.0 -revision=2 +revision=3 build_style=meson configure_args="-Denable-tests=true -Denable-exiv=true -Denable-packagekit=false" hostmakedepends="pkg-config intltool itstool libglib-devel gnome-doc-utils glib-devel" @@ -15,3 +15,4 @@ license="GPL-2.0-or-later" homepage="https://gitlab.gnome.org/GNOME/gnome-color-manager" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" checksum=90bbb881acccdfa0a9e74c4ac72b4514385048037456923a2db66d3f30c6ab80 +patch_args="-Np1"