diff options
author | Vladimír Čunát <v@cunat.cz> | 2021-07-20 10:49:29 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2021-07-20 10:50:50 +0200 |
commit | 07b9fef470319edea17ba27d2bf08ae3d9962d40 (patch) | |
tree | 8f3c7004c4390ce4b96d745b7bd29a0261337f52 /pkgs/development | |
parent | 6e001c1ace93719b7639a1578d4ee9ca8086b94e (diff) |
libtiff: revert to previous version on aarch64-darwin
/cc PR #129687. This should work; I can't see another way immediately.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/libtiff/aarch64-darwin.nix | 53 | ||||
-rw-r--r-- | pkgs/development/libraries/libtiff/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libtiff/headers-cmake.patch | 13 |
3 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libtiff/aarch64-darwin.nix b/pkgs/development/libraries/libtiff/aarch64-darwin.nix new file mode 100644 index 0000000000000..5de481066f67d --- /dev/null +++ b/pkgs/development/libraries/libtiff/aarch64-darwin.nix @@ -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; + }; +} diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix index 035b0ab55ad64..ea246790020e6 100644 --- a/pkgs/development/libraries/libtiff/default.nix +++ b/pkgs/development/libraries/libtiff/default.nix @@ -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"; diff --git a/pkgs/development/libraries/libtiff/headers-cmake.patch b/pkgs/development/libraries/libtiff/headers-cmake.patch new file mode 100644 index 0000000000000..5a00502ef2818 --- /dev/null +++ b/pkgs/development/libraries/libtiff/headers-cmake.patch @@ -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) |