libtiff: revert to previous version on aarch64-darwin

/cc PR #129687.  This should work; I can't see another way immediately.
This commit is contained in:
Vladimír Čunát 2021-07-20 10:49:29 +02:00
parent 6e001c1ace
commit 07b9fef470
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
4 changed files with 71 additions and 1 deletions

View File

@ -0,0 +1,53 @@
{ lib, stdenv
, fetchurl
, pkg-config
, cmake
, libdeflate
, libjpeg
, xz
, zlib
}:
stdenv.mkDerivation rec {
pname = "libtiff";
version = "4.2.0";
src = fetchurl {
url = "https://download.osgeo.org/libtiff/tiff-${version}.tar.gz";
sha256 = "1jrkjv0xya9radddn8idxvs2gqzp3l2b1s8knlizmn7ad3jq817b";
};
cmakeFlags = lib.optional stdenv.isDarwin "-DCMAKE_SKIP_BUILD_RPATH=OFF";
# FreeImage needs this patch
patches = [ ./headers-cmake.patch ];
outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
postFixup = ''
moveToOutput include/tif_dir.h $dev_private
moveToOutput include/tif_config.h $dev_private
moveToOutput include/tiffiop.h $dev_private
'';
nativeBuildInputs = [ cmake pkg-config ];
propagatedBuildInputs = [ libjpeg xz zlib ]; #TODO: opengl support (bogus configure detection)
buildInputs = [ libdeflate ]; # TODO: move all propagatedBuildInputs to buildInputs.
enableParallelBuilding = true;
doInstallCheck = true;
installCheckTarget = "test";
meta = with lib; {
description = "Library and utilities for working with the TIFF image file format";
homepage = "https://libtiff.gitlab.io/libtiff";
changelog = "https://libtiff.gitlab.io/libtiff/v${version}.html";
license = licenses.libtiff;
platforms = platforms.unix;
};
}

View File

@ -10,6 +10,8 @@
, zlib
}:
#FIXME: fix aarch64-darwin build and get rid of ./aarch64-darwin.nix
stdenv.mkDerivation rec {
pname = "libtiff";
version = "4.3.0";

View File

@ -0,0 +1,13 @@
diff -ruN a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
--- a/libtiff/CMakeLists.txt 2019-05-31 13:05:22.849705817 +0000
+++ b/libtiff/CMakeLists.txt 2020-11-27 21:50:03.527831837 +0000
@@ -42,6 +42,9 @@
libtiffxx.map)
set(tiff_HEADERS
+ tiffiop.h
+ ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h
+ tif_dir.h
tiff.h
tiffio.h
tiffvers.h)

View File

@ -17088,7 +17088,9 @@ in
libtifiles2 = callPackage ../development/libraries/libtifiles2 { };
libtiff = callPackage ../development/libraries/libtiff { };
libtiff = if stdenv.isDarwin && stdenv.isAarch64
then callPackage ../development/libraries/libtiff/aarch64-darwin.nix { }
else callPackage ../development/libraries/libtiff { };
libtiger = callPackage ../development/libraries/libtiger { };