diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-07-23 09:26:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-07-23 09:26:00 +0000 |
commit | ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d (patch) | |
tree | 504b28a058661f6c1cbb7d3f580020e50367ca7f /nixpkgs/pkgs/development/libraries/libtiff | |
parent | 55cc63c079f49e81d695a25bc2f5b3902f2bd290 (diff) | |
parent | b09661d41fb93562fd53f31574dbf781b130ac44 (diff) | |
download | nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.gz nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.bz2 nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.lz nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.xz nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.tar.zst nixlib-ab63e0bb8dcf2b1bf8d4a26ed360af777b8f241d.zip |
Merge commit 'b09661d41fb93562fd53f31574dbf781b130ac44'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libtiff')
4 files changed, 93 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libtiff/aarch64-darwin.nix b/nixpkgs/pkgs/development/libraries/libtiff/aarch64-darwin.nix new file mode 100644 index 000000000000..5de481066f67 --- /dev/null +++ b/nixpkgs/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/nixpkgs/pkgs/development/libraries/libtiff/default.nix b/nixpkgs/pkgs/development/libraries/libtiff/default.nix index 46c13bbe4a9d..ea246790020e 100644 --- a/nixpkgs/pkgs/development/libraries/libtiff/default.nix +++ b/nixpkgs/pkgs/development/libraries/libtiff/default.nix @@ -1,8 +1,8 @@ { lib, stdenv , fetchurl +, autoreconfHook , pkg-config -, cmake , libdeflate , libjpeg @@ -10,19 +10,17 @@ , zlib }: +#FIXME: fix aarch64-darwin build and get rid of ./aarch64-darwin.nix + stdenv.mkDerivation rec { pname = "libtiff"; - version = "4.2.0"; + version = "4.3.0"; src = fetchurl { url = "https://download.osgeo.org/libtiff/tiff-${version}.tar.gz"; - sha256 = "1jrkjv0xya9radddn8idxvs2gqzp3l2b1s8knlizmn7ad3jq817b"; + sha256 = "1j3snghqjbhwmnm5vz3dr1zm68dj15mgbx1wqld7vkl7n2nfaihf"; }; - cmakeFlags = if stdenv.isDarwin then [ - "-DCMAKE_SKIP_BUILD_RPATH=OFF" - ] else null; - # FreeImage needs this patch patches = [ ./headers.patch ]; @@ -34,7 +32,9 @@ stdenv.mkDerivation rec { moveToOutput include/tiffiop.h $dev_private ''; - nativeBuildInputs = [ cmake pkg-config ]; + # If you want to change to a different build system, please make + # sure cross-compilation works first! + nativeBuildInputs = [ autoreconfHook pkg-config ]; propagatedBuildInputs = [ libjpeg xz zlib ]; #TODO: opengl support (bogus configure detection) @@ -42,12 +42,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - doInstallCheck = true; - installCheckTarget = "test"; + doCheck = true; meta = with lib; { description = "Library and utilities for working with the TIFF image file format"; - homepage = "http://download.osgeo.org/libtiff"; + homepage = "https://libtiff.gitlab.io/libtiff"; + changelog = "https://libtiff.gitlab.io/libtiff/v${version}.html"; + maintainers = with maintainers; [ qyliss ]; license = licenses.libtiff; platforms = platforms.unix; }; diff --git a/nixpkgs/pkgs/development/libraries/libtiff/headers-cmake.patch b/nixpkgs/pkgs/development/libraries/libtiff/headers-cmake.patch new file mode 100644 index 000000000000..5a00502ef281 --- /dev/null +++ b/nixpkgs/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) diff --git a/nixpkgs/pkgs/development/libraries/libtiff/headers.patch b/nixpkgs/pkgs/development/libraries/libtiff/headers.patch index 5a00502ef281..e1c681502b33 100644 --- a/nixpkgs/pkgs/development/libraries/libtiff/headers.patch +++ b/nixpkgs/pkgs/development/libraries/libtiff/headers.patch @@ -1,13 +1,16 @@ -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) +diff --git i/libtiff/Makefile.am w/libtiff/Makefile.am +index 44522b62..d66e5948 100644 +--- i/libtiff/Makefile.am ++++ w/libtiff/Makefile.am +@@ -36,8 +36,11 @@ EXTRA_DIST = \ + tiffconf.h.cmake.in - set(tiff_HEADERS -+ tiffiop.h -+ ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h -+ tif_dir.h - tiff.h - tiffio.h - tiffvers.h) + libtiffinclude_HEADERS = \ ++ tif_config.h \ ++ tif_dir.h \ + tiff.h \ + tiffio.h \ ++ tiffiop.h \ + tiffvers.h + + if HAVE_CXX |