Merge branch '0.27-maintenance' into cleanup_0.27

v0.27.3
Robin Mills 5 years ago committed by GitHub
commit aa39a70104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -136,7 +136,7 @@ if (EXIV2_TEAM_PACKAGING)
endif() endif()
configure_file(cmake/exiv2.pc.in exiv2.pc @ONLY) configure_file(cmake/exiv2.pc.in exiv2.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/exiv2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
# ****************************************************************************** # ******************************************************************************
# Man page # Man page

@ -12,9 +12,6 @@
// Define if you require webready support. // Define if you require webready support.
#cmakedefine EXV_ENABLE_WEBREADY #cmakedefine EXV_ENABLE_WEBREADY
// Define if you have the `gmtime_r' function.
#cmakedefine EXV_HAVE_GMTIME_R
// Define if you have the <libintl.h> header file. // Define if you have the <libintl.h> header file.
#cmakedefine EXV_HAVE_LIBINTL_H #cmakedefine EXV_HAVE_LIBINTL_H

@ -27,5 +27,8 @@ if (UNIX)
endif() endif()
endif() endif()
configure_file(cmake/exiv2_uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY) # Prevent conflicts when exiv2 is consumed in multiple-subdirectory projects.
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") if (NOT TARGET uninstall)
configure_file(cmake/exiv2_uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY)
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake")
endif()

@ -910,13 +910,7 @@ namespace Exiv2 {
ULongValue v; ULongValue v;
v.read(ciffComponent.pData(), 8, byteOrder); v.read(ciffComponent.pData(), 8, byteOrder);
time_t t = v.value_[0]; time_t t = v.value_[0];
#ifdef EXV_HAVE_GMTIME_R struct tm* tm = std::localtime(&t);
struct tm tms;
struct tm* tm = &tms;
tm = gmtime_r(&t, tm);
#else
struct tm* tm = std::gmtime(&t);
#endif
if (tm) { if (tm) {
const size_t m = 20; const size_t m = 20;
char s[m]; char s[m];
@ -1138,8 +1132,9 @@ namespace Exiv2 {
if (ed != image.exifData().end()) { if (ed != image.exifData().end()) {
struct tm tm; struct tm tm;
std::memset(&tm, 0x0, sizeof(tm)); std::memset(&tm, 0x0, sizeof(tm));
int rc = exifTime(ed->toString().c_str(), &tm); if ( exifTime(ed->toString().c_str(), &tm) == 0 ) {
if (rc == 0) t = timegm(&tm); t=::mktime(&tm);
}
} }
if (t != 0) { if (t != 0) {
DataBuf buf(12); DataBuf buf(12);

@ -317,7 +317,6 @@ void Exiv2::dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys)
"unknown"; "unknown";
#endif #endif
int have_gmtime_r =0;
int have_inttypes =0; int have_inttypes =0;
int have_libintl =0; int have_libintl =0;
int have_lensdata =0; int have_lensdata =0;
@ -352,10 +351,6 @@ void Exiv2::dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys)
int use_curl =0; int use_curl =0;
int use_ssh =0; int use_ssh =0;
#ifdef EXV_HAVE_GMTIME_R
have_gmtime_r=1;
#endif
#ifdef EXV_HAVE_INTTYPES_H #ifdef EXV_HAVE_INTTYPES_H
have_inttypes=1; have_inttypes=1;
#endif #endif
@ -524,7 +519,6 @@ void Exiv2::dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys)
} }
output(os,keys,"have_strerror_r" ,have_strerror_r ); output(os,keys,"have_strerror_r" ,have_strerror_r );
output(os,keys,"have_gmtime_r" ,have_gmtime_r );
output(os,keys,"have_inttypes" ,have_inttypes ); output(os,keys,"have_inttypes" ,have_inttypes );
output(os,keys,"have_libintl" ,have_libintl ); output(os,keys,"have_libintl" ,have_libintl );
output(os,keys,"have_lensdata" ,have_lensdata ); output(os,keys,"have_lensdata" ,have_lensdata );

@ -14,7 +14,9 @@ source ./functions.source
echo set Exif.Canon.SerialNumber 1 echo set Exif.Canon.SerialNumber 1
echo add Exif.Canon.SerialNumber 2 echo add Exif.Canon.SerialNumber 2
echo set Exif.Photo.ISOSpeedRatings 155 echo set Exif.Photo.ISOSpeedRatings 155
# echo set Exif.Photo.DateTimeOriginal 2007:11:11 09:10:11 # See #1219 echo set Exif.Photo.DateTimeOriginal 2007:11:11 09:10:11
echo set Exif.Image.DateTime 2020:05:26 07:31:41
echo set Exif.Photo.DateTimeDigitized 2020:05:26 07:31:42
) > $cmdfile ) > $cmdfile
copyTestFile $crwfile copyTestFile $crwfile

@ -6,7 +6,7 @@ Exif.Photo.PixelXDimension Long 1 2272
Exif.Photo.PixelYDimension Long 1 1704 Exif.Photo.PixelYDimension Long 1 1704
Exif.Image.Orientation Short 1 top, left Exif.Image.Orientation Short 1 top, left
Exif.Canon.FileNumber Long 1 130-3050 Exif.Canon.FileNumber Long 1 130-3050
Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 17:54:36 Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 18:54:36
Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image
Exif.Canon.OwnerName Ascii 15 Andreas Huggel Exif.Canon.OwnerName Ascii 15 Andreas Huggel
Exif.Image.Make Ascii 6 Canon Exif.Image.Make Ascii 6 Canon
@ -72,6 +72,9 @@ Set Exif.Canon.FirmwareVersion "Whatever version" (Ascii)
Set Exif.Canon.SerialNumber "1" (Long) Set Exif.Canon.SerialNumber "1" (Long)
Add Exif.Canon.SerialNumber "2" (Long) Add Exif.Canon.SerialNumber "2" (Long)
Set Exif.Photo.ISOSpeedRatings "155" (Short) Set Exif.Photo.ISOSpeedRatings "155" (Short)
Set Exif.Photo.DateTimeOriginal "2007:11:11 09:10:11" (Ascii)
Set Exif.Image.DateTime "2020:05:26 07:31:41" (Ascii)
Set Exif.Photo.DateTimeDigitized "2020:05:26 07:31:42" (Ascii)
File 1/1: exiv2-canon-powershot-s40.crw File 1/1: exiv2-canon-powershot-s40.crw
Exif.Thumbnail.Compression Short 1 JPEG (old-style) Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.JPEGInterchangeFormat Long 1 0 Exif.Thumbnail.JPEGInterchangeFormat Long 1 0
@ -80,7 +83,7 @@ Exif.Photo.PixelXDimension Long 1 2272
Exif.Photo.PixelYDimension Long 1 1704 Exif.Photo.PixelYDimension Long 1 1704
Exif.Image.Orientation Short 1 top, left Exif.Image.Orientation Short 1 top, left
Exif.Canon.FileNumber Long 1 130-3050 Exif.Canon.FileNumber Long 1 130-3050
Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 17:54:36 Exif.Photo.DateTimeOriginal Ascii 20 2007:11:11 09:10:11
Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image
Exif.Canon.OwnerName Ascii 16 Different owner Exif.Canon.OwnerName Ascii 16 Different owner
Exif.Image.Make Ascii 6 Canon Exif.Image.Make Ascii 6 Canon
@ -117,7 +120,7 @@ Exif.Photo.PixelXDimension Long 1 2272
Exif.Photo.PixelYDimension Long 1 1704 Exif.Photo.PixelYDimension Long 1 1704
Exif.Image.Orientation Short 1 top, left Exif.Image.Orientation Short 1 top, left
Exif.Canon.FileNumber Long 1 130-3050 Exif.Canon.FileNumber Long 1 130-3050
Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 17:54:36 Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 18:54:36
Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image
Exif.Canon.OwnerName Ascii 15 Andreas Huggel Exif.Canon.OwnerName Ascii 15 Andreas Huggel
Exif.Image.Make Ascii 6 Canon Exif.Image.Make Ascii 6 Canon
@ -186,7 +189,7 @@ Exif.Photo.PixelXDimension Long 1 2272
Exif.Photo.PixelYDimension Long 1 1704 Exif.Photo.PixelYDimension Long 1 1704
Exif.Image.Orientation Short 1 top, left Exif.Image.Orientation Short 1 top, left
Exif.Canon.FileNumber Long 1 130-3050 Exif.Canon.FileNumber Long 1 130-3050
Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 17:54:36 Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 18:54:36
Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image
Exif.Image.Make Ascii 6 Canon Exif.Image.Make Ascii 6 Canon
Exif.Image.Model Ascii 20 Canon PowerShot S40 Exif.Image.Model Ascii 20 Canon PowerShot S40

Loading…
Cancel
Save