Skip to content

Commit

Permalink
Merge pull request #96648 from paperdigits/exiv2-0.27.3
Browse files Browse the repository at this point in the history
exiv2: 0.27.2 -> 0.27.3
  • Loading branch information
jtojnar committed Sep 4, 2020
2 parents d35049c + b181edb commit e2a89f8
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions pkgs/development/libraries/exiv2/default.nix
Expand Up @@ -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";
})
];

Expand All @@ -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"
];
Expand Down Expand Up @@ -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
Expand All @@ -86,18 +85,13 @@ 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
rm -f ../tests/bugfixes/redmine/test_issue_662.py
''}
'';

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 = ''
Expand All @@ -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@" \
Expand Down

0 comments on commit e2a89f8

Please sign in to comment.