Unverified Commit e2a89f8c authored by Jan Tojnar's avatar Jan Tojnar Committed by GitHub
Browse files

Merge pull request #96648 from paperdigits/exiv2-0.27.3

exiv2: 0.27.2 -> 0.27.3
parents d35049c7 b181edb3
Loading
Loading
Loading
Loading
+8 −14
Original line number Diff line number Diff line
@@ -15,22 +15,21 @@

stdenv.mkDerivation rec {
  pname = "exiv2";
  version = "0.27.2";
  version = "0.27.3";

  src = fetchFromGitHub {
    owner = "exiv2";
    repo  = "exiv2";
    rev = "v${version}";
    sha256 = "0n8il52yzbmvbkryrl8waz7hd9a2fdkw8zsrmhyh63jlvmmc31gf";
    sha256 = "0d294yhcdw8ziybyd4rp5hzwknzik2sm0cz60ff7fljacv75bjpy";
  };

  patches = [
    # included in next release
    # Fix aarch64 build https://github.com/Exiv2/exiv2/pull/1271
    (fetchpatch {
      name = "cve-2019-20421.patch";
      url = "https://github.com/Exiv2/exiv2/commit/a82098f4f90cd86297131b5663c3dec6a34470e8.patch";
      sha256 = "16r19qb9l5j43ixm5jqid9sdv5brlkk1wq0w79rm5agxq4kblfyc";
      excludes = [ "tests/bugfixes/github/test_issue_1011.py" "test/data/Jp2Image_readMetadata_loop.poc" ];
      name = "cmake-fix-aarch64.patch";
      url = "https://github.com/Exiv2/exiv2/commit/bbe0b70840cf28b7dd8c0b7e9bb1b741aeda2efd.patch";
      sha256 = "13zw1mn0ag0jrz73hqjhdsh1img7jvj5yddip2k2sb5phy04rzfx";
    })
  ];

@@ -40,6 +39,7 @@ stdenv.mkDerivation rec {
    # 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,
    #  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_LIBDIR=lib"
  ];
@@ -77,7 +77,6 @@ stdenv.mkDerivation rec {
  preCheck = ''
    patchShebangs ../test/
    mkdir ../test/tmp
    export LD_LIBRARY_PATH="$(realpath ../build/lib)"

    ${stdenv.lib.optionalString (stdenv.isAarch64 || stdenv.isAarch32) ''
      # Fix tests on arm
@@ -86,7 +85,6 @@ stdenv.mkDerivation rec {
    ''}

    ${stdenv.lib.optionalString stdenv.isDarwin ''
      export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib
      # Removing tests depending on charset conversion
      substituteInPlace ../test/Makefile --replace "conversions.sh" ""
      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
  # a tests target. This removes them.
  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 = ''
    sed -i "$dev/lib/cmake/exiv2/exiv2Config.cmake" \
        -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${_IMPORT_PREFIX}@$dev@" \