summary refs log tree commit diff
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-05 00:18:18 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-30 22:59:52 +0200
commit62c6d285c8a385eeb17c9ee99a02fed7b2f8cf40 (patch)
tree85689b416e27eae6d81f7af1c07ee04652423fd5
parented66c817ab4ec6f086d2ea7cb5770f380a84a5a3 (diff)
downloadnixpkgs-62c6d285c8a385eeb17c9ee99a02fed7b2f8cf40.tar
nixpkgs-62c6d285c8a385eeb17c9ee99a02fed7b2f8cf40.tar.gz
nixpkgs-62c6d285c8a385eeb17c9ee99a02fed7b2f8cf40.tar.bz2
nixpkgs-62c6d285c8a385eeb17c9ee99a02fed7b2f8cf40.tar.lz
nixpkgs-62c6d285c8a385eeb17c9ee99a02fed7b2f8cf40.tar.xz
nixpkgs-62c6d285c8a385eeb17c9ee99a02fed7b2f8cf40.tar.zst
nixpkgs-62c6d285c8a385eeb17c9ee99a02fed7b2f8cf40.zip
exiv2: 0.27.6 -> 0.28.0
-rw-r--r--pkgs/development/libraries/exiv2/default.nix99
1 files changed, 36 insertions, 63 deletions
diff --git a/pkgs/development/libraries/exiv2/default.nix b/pkgs/development/libraries/exiv2/default.nix
index 0c4c339c639..bf36c5a9bca 100644
--- a/pkgs/development/libraries/exiv2/default.nix
+++ b/pkgs/development/libraries/exiv2/default.nix
@@ -1,30 +1,33 @@
-{ lib, stdenv
+{ lib
+, stdenv
 , fetchFromGitHub
-, zlib
-, expat
 , cmake
-, which
-, libxml2
-, python3
-, gettext
 , doxygen
+, gettext
 , graphviz
 , libxslt
-, libiconv
 , removeReferencesTo
+, libiconv
+, brotli
+, expat
+, inih
+, zlib
+, libxml2
+, python3
+, which
 }:
 
 stdenv.mkDerivation rec {
   pname = "exiv2";
-  version = "0.27.7";
+  version = "0.28.0";
 
-  outputs = [ "out" "lib" "dev" "doc" "man" "static" ];
+  outputs = [ "out" "lib" "dev" "doc" "man" ];
 
   src = fetchFromGitHub {
     owner = "exiv2";
-    repo  = "exiv2";
+    repo = "exiv2";
     rev = "v${version}";
-    sha256 = "sha256-xytVGrLDS22n2/yydFTT6CsDESmhO9mFbPGX4yk+b6g=";
+    hash = "sha256-nEoLJWxSJmAonCbW/iZKjLrKMj09mwEaSUXUcUu8GxU=";
   };
 
   nativeBuildInputs = [
@@ -36,10 +39,14 @@ stdenv.mkDerivation rec {
     removeReferencesTo
   ];
 
-  buildInputs = lib.optional stdenv.isDarwin libiconv;
+  buildInputs = lib.optionals stdenv.isDarwin [
+    libiconv
+  ];
 
   propagatedBuildInputs = [
+    brotli
     expat
+    inih
     zlib
   ];
 
@@ -60,68 +67,34 @@ stdenv.mkDerivation rec {
     "doc"
   ];
 
-  doCheck = true;
+  # https://github.com/Exiv2/exiv2/issues/2762
+  doCheck = lib.versionOlder brotli.version "1.1.0";
 
   preCheck = ''
     patchShebangs ../test/
     mkdir ../test/tmp
-
-    ${lib.optionalString stdenv.hostPlatform.isAarch ''
-      # Fix tests on arm
-      # https://github.com/Exiv2/exiv2/issues/933
-      rm -f ../tests/bugfixes/github/test_CVE_2018_12265.py
-    ''}
-
-    ${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
-      rm -f ../tests/bugfixes/github/test_issue_1046.py
-
-      rm ../tests/bugfixes/redmine/test_issue_683.py
-
-      # disable tests that requires loopback networking
-      substituteInPlace  ../tests/bash_tests/testcases.py \
-        --replace "def io_test(self):" "def io_disabled(self):"
-     ''}
-  '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
+  '' + lib.optionalString stdenv.hostPlatform.isAarch32 ''
+    # Fix tests on arm
+    # https://github.com/Exiv2/exiv2/issues/933
+    rm -f ../tests/bugfixes/github/test_CVE_2018_12265.py
+  '' + lib.optionalString stdenv.isDarwin ''
+    export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/lib
     export LC_ALL=C
-  '' + lib.optionalString stdenv.isAarch32 ''
-    # these tests are fixed in 0.28, remove when updating to 0.28
-    rm -f ../tests/bugfixes/github/test_issue_1503.py
-    rm -f ../tests/bugfixes/github/test_pr1475_AVIF.py
-    rm -f ../tests/bugfixes/github/test_pr1475_HEIC.py
-    rm -f ../tests/bugfixes/github/test_pr1475_HIF.py
-  '';
 
-  # With CMake we have to enable samples or there won't be
-  # a tests target. This removes them.
-  postInstall = ''
-    ( cd "$out/bin"
-      mv exiv2 .exiv2
-      rm *
-      mv .exiv2 exiv2
-    )
-
-    mkdir -p $static/lib
-    mv $lib/lib/*.a $static/lib/
-
-    remove-references-to -t ${stdenv.cc.cc} $lib/lib/*.so.*.*.* $out/bin/exiv2 $static/lib/*.a
+    # disable tests that requires loopback networking
+    substituteInPlace  ../tests/bash_tests/testcases.py \
+      --replace "def io_test(self):" "def io_disabled(self):"
   '';
 
-  postFixup = ''
-    substituteInPlace "$dev"/lib/cmake/exiv2/exiv2Config.cmake --replace \
-      "set(_IMPORT_PREFIX \"$out\")" \
-      "set(_IMPORT_PREFIX \"$static\")"
-    substituteInPlace "$dev"/lib/cmake/exiv2/exiv2Config-*.cmake --replace \
-      "$lib/lib/libexiv2-xmp.a" \
-      "$static/lib/libexiv2-xmp.a"
+  preFixup = ''
+    remove-references-to -t ${stdenv.cc.cc} $lib/lib/*.so.*.*.* $out/bin/exiv2 $static/lib/*.a
   '';
 
   disallowedReferences = [ stdenv.cc.cc ];
 
+  # causes redefinition of _FORTIFY_SOURCE
+  hardeningDisable = [ "fortify3" ];
+
   meta = with lib; {
     homepage = "https://exiv2.org";
     description = "A library and command-line utility to manage image metadata";