git: f13af80790bd - main - astro/gpscorrelate: make compatible with exiv2 0.28
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jul 2023 22:09:34 UTC
The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=f13af80790bd8020ef983cef5ad252972bf316ec commit f13af80790bd8020ef983cef5ad252972bf316ec Author: Matthias Andree <mandree@FreeBSD.org> AuthorDate: 2023-07-02 12:53:49 +0000 Commit: Matthias Andree <mandree@FreeBSD.org> CommitDate: 2023-07-09 22:08:08 +0000 astro/gpscorrelate: make compatible with exiv2 0.28 PR: 272311 --- astro/gpscorrelate/Makefile | 11 +++- astro/gpscorrelate/files/patch-exif-gps.cpp | 92 +++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 8 deletions(-) diff --git a/astro/gpscorrelate/Makefile b/astro/gpscorrelate/Makefile index 4c061b178349..ac88fc2e73d2 100644 --- a/astro/gpscorrelate/Makefile +++ b/astro/gpscorrelate/Makefile @@ -1,6 +1,6 @@ PORTNAME= gpscorrelate PORTVERSION= 1.6.1 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= astro geography MAINTAINER= ports@FreeBSD.org @@ -12,13 +12,18 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libexiv2.so:graphics/exiv2 \ libgtkmm-2.4.so:x11-toolkits/gtkmm24 +LIB_DEPENDS+= libatk-1.0.so:accessibility/at-spi2-core +LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig +LIB_DEPENDS+= libfreetype.so:print/freetype2 +LIB_DEPENDS+= libharfbuzz.so:print/harfbuzz -USES= compiler:c++11-lang gmake gnome pkgconfig -USE_GNOME= libxml2 +USES= compiler:c++11-lang gettext-runtime gmake gnome pkgconfig USE_GITHUB= yes GH_ACCOUNT= freefoote +USE_GNOME= cairo gdkpixbuf2 glib20 gtk20 libxml2 pango + PLIST_FILES= bin/gpscorrelate bin/gpscorrelate-gui \ man/man1/gpscorrelate.1.gz man/man1/gpscorrelate-gui.1.gz PORTDOCS= * diff --git a/astro/gpscorrelate/files/patch-exif-gps.cpp b/astro/gpscorrelate/files/patch-exif-gps.cpp index 441fcf55569c..445e3cd75606 100644 --- a/astro/gpscorrelate/files/patch-exif-gps.cpp +++ b/astro/gpscorrelate/files/patch-exif-gps.cpp @@ -1,13 +1,95 @@ ---- exif-gps.cpp.orig 2019-07-07 08:26:16 UTC +--- exif-gps.cpp.orig 2012-08-14 10:11:01 UTC +++ exif-gps.cpp -@@ -40,9 +40,7 @@ +@@ -40,10 +40,8 @@ #include <sys/stat.h> #include <unistd.h> -- --#include "exiv2/image.hpp" --#include "exiv2/exif.hpp" +#include <exiv2/exiv2.hpp> +-#include "exiv2/image.hpp" +-#include "exiv2/exif.hpp" +- #include "gpsstructure.h" #include "exif-gps.h" + +@@ -87,7 +85,7 @@ char* ReadExifDate(char* File, int* IncludesGPS) + { + // Open and read the file. + Exiv2::ExifData ExifRead; +- Exiv2::Image::AutoPtr Image; ++ Exiv2::Image::UniquePtr Image; + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -150,7 +148,7 @@ char* ReadExifData(char* File, double* Lat, double* Lo + // for display purposes. For the GUI version. + // Open and read the file. + Exiv2::ExifData ExifRead; +- Exiv2::Image::AutoPtr Image; ++ Exiv2::Image::UniquePtr Image; + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -268,7 +266,7 @@ char* ReadExifData(char* File, double* Lat, double* Lo + + // Is the altitude below sea level? If so, negate the value. + GPSData = ExifRead["Exif.GPSInfo.GPSAltitudeRef"]; +- if (GPSData.count() >= 1 && GPSData.toLong() == 1) ++ if (GPSData.count() >= 1 && GPSData.toInt64() == 1) + { + // Negate the elevation. + *Elev = -*Elev; +@@ -289,7 +287,7 @@ char* ReadGPSTimestamp(char* File, char* DateStamp, ch + // for display purposes. For the GUI version. + // Open and read the file. + Exiv2::ExifData ExifRead; +- Exiv2::Image::AutoPtr Image; ++ Exiv2::Image::UniquePtr Image; + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -445,7 +443,7 @@ int WriteGPSData(char* File, struct GPSPoint* Point, c + struct utimbuf utb; + if (NoChangeMtime) + stat(File, &statbuf); +- Exiv2::Image::AutoPtr Image; ++ Exiv2::Image::UniquePtr Image; + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -473,7 +471,7 @@ int WriteGPSData(char* File, struct GPSPoint* Point, c + // Do all the easy constant ones first. + // GPSVersionID tag: standard says is should be four bytes: 02 00 00 00 + // (and, must be present). +- Exiv2::Value::AutoPtr Value = Exiv2::Value::create(Exiv2::unsignedByte); ++ Exiv2::Value::UniquePtr Value = Exiv2::Value::create(Exiv2::unsignedByte); + Value->read("2 0 0 0"); + ExifToWrite.add(Exiv2::ExifKey("Exif.GPSInfo.GPSVersionID"), Value.get()); + // Datum: the datum of the measured data. If not given, we insert WGS-84. +@@ -660,7 +658,7 @@ int WriteFixedDatestamp(char* File, time_t Time) + struct utimbuf utb; + stat(File, &statbuf); + +- Exiv2::Image::AutoPtr Image; ++ Exiv2::Image::UniquePtr Image; + + try { + Image = Exiv2::ImageFactory::open(File); +@@ -699,7 +697,7 @@ int WriteFixedDatestamp(char* File, time_t Time) + + char ScratchBuf[100]; + +- Exiv2::Value::AutoPtr Value; ++ Exiv2::Value::UniquePtr Value; + Value = Exiv2::Value::create(Exiv2::signedRational); + snprintf(ScratchBuf, 100, "%d/1 %d/1 %d/1", + TimeStamp.tm_year + 1900, +@@ -737,7 +735,7 @@ int RemoveGPSExif(char* File, int NoChangeMtime) + stat(File, &statbuf); + + // Open the file and start reading. +- Exiv2::Image::AutoPtr Image; ++ Exiv2::Image::UniquePtr Image; + + try { + Image = Exiv2::ImageFactory::open(File);