Merge pull request #96648 from paperdigits/exiv2-0.27.3

exiv2: 0.27.2 -> 0.27.3
This commit is contained in:
Jan Tojnar 2020-09-05 00:23:14 +02:00 committed by GitHub
commit e2a89f8cf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,22 +15,21 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "exiv2"; pname = "exiv2";
version = "0.27.2"; version = "0.27.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "exiv2"; owner = "exiv2";
repo = "exiv2"; repo = "exiv2";
rev = "v${version}"; rev = "v${version}";
sha256 = "0n8il52yzbmvbkryrl8waz7hd9a2fdkw8zsrmhyh63jlvmmc31gf"; sha256 = "0d294yhcdw8ziybyd4rp5hzwknzik2sm0cz60ff7fljacv75bjpy";
}; };
patches = [ patches = [
# included in next release # Fix aarch64 build https://github.com/Exiv2/exiv2/pull/1271
(fetchpatch { (fetchpatch {
name = "cve-2019-20421.patch"; name = "cmake-fix-aarch64.patch";
url = "https://github.com/Exiv2/exiv2/commit/a82098f4f90cd86297131b5663c3dec6a34470e8.patch"; url = "https://github.com/Exiv2/exiv2/commit/bbe0b70840cf28b7dd8c0b7e9bb1b741aeda2efd.patch";
sha256 = "16r19qb9l5j43ixm5jqid9sdv5brlkk1wq0w79rm5agxq4kblfyc"; sha256 = "13zw1mn0ag0jrz73hqjhdsh1img7jvj5yddip2k2sb5phy04rzfx";
excludes = [ "tests/bugfixes/github/test_issue_1011.py" "test/data/Jp2Image_readMetadata_loop.poc" ];
}) })
]; ];
@ -40,6 +39,7 @@ stdenv.mkDerivation rec {
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
# (setting it to an absolute path causes include files to go to $out/$out/include, # (setting it to an absolute path causes include files to go to $out/$out/include,
# because the absolute path is interpreted with root at $out). # because the absolute path is interpreted with root at $out).
# Can probably be removed once https://github.com/Exiv2/exiv2/pull/1263 is merged.
"-DCMAKE_INSTALL_INCLUDEDIR=include" "-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_LIBDIR=lib"
]; ];
@ -77,7 +77,6 @@ stdenv.mkDerivation rec {
preCheck = '' preCheck = ''
patchShebangs ../test/ patchShebangs ../test/
mkdir ../test/tmp mkdir ../test/tmp
export LD_LIBRARY_PATH="$(realpath ../build/lib)"
${stdenv.lib.optionalString (stdenv.isAarch64 || stdenv.isAarch32) '' ${stdenv.lib.optionalString (stdenv.isAarch64 || stdenv.isAarch32) ''
# Fix tests on arm # Fix tests on arm
@ -86,7 +85,6 @@ stdenv.mkDerivation rec {
''} ''}
${stdenv.lib.optionalString stdenv.isDarwin '' ${stdenv.lib.optionalString stdenv.isDarwin ''
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib
# Removing tests depending on charset conversion # Removing tests depending on charset conversion
substituteInPlace ../test/Makefile --replace "conversions.sh" "" substituteInPlace ../test/Makefile --replace "conversions.sh" ""
rm -f ../tests/bugfixes/redmine/test_issue_460.py rm -f ../tests/bugfixes/redmine/test_issue_460.py
@ -94,10 +92,6 @@ stdenv.mkDerivation rec {
''} ''}
''; '';
postCheck = ''
(cd ../tests/ && python3 runner.py)
'';
# With CMake we have to enable samples or there won't be # With CMake we have to enable samples or there won't be
# a tests target. This removes them. # a tests target. This removes them.
postInstall = '' postInstall = ''
@ -108,7 +102,7 @@ stdenv.mkDerivation rec {
) )
''; '';
# Fix CMake export paths. # Fix CMake export paths. Can be removed once https://github.com/Exiv2/exiv2/pull/1263 is merged.
postFixup = '' postFixup = ''
sed -i "$dev/lib/cmake/exiv2/exiv2Config.cmake" \ sed -i "$dev/lib/cmake/exiv2/exiv2Config.cmake" \
-e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${_IMPORT_PREFIX}@$dev@" \ -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${_IMPORT_PREFIX}@$dev@" \