From f72ee0686dfa37018d76669764fb8794a7d501e4 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 19 Dec 2024 16:29:49 +0100 Subject: [PATCH] libtiff: fix static builds --- pkgs/by-name/li/libtiff/package.nix | 1 + pkgs/by-name/li/libtiff/static.patch | 36 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/by-name/li/libtiff/static.patch diff --git a/pkgs/by-name/li/libtiff/package.nix b/pkgs/by-name/li/libtiff/package.nix index 772afe696f25..03564fced802 100644 --- a/pkgs/by-name/li/libtiff/package.nix +++ b/pkgs/by-name/li/libtiff/package.nix @@ -43,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: { # libc++abi 11 has an `#include `, this picks up files name # `version` in the project's include paths ./rename-version.patch + ./static.patch ]; postPatch = '' diff --git a/pkgs/by-name/li/libtiff/static.patch b/pkgs/by-name/li/libtiff/static.patch new file mode 100644 index 000000000000..0eecc5d149b8 --- /dev/null +++ b/pkgs/by-name/li/libtiff/static.patch @@ -0,0 +1,36 @@ +From ed5fcc718075021fe670daee6dd426a5e12d6842 Mon Sep 17 00:00:00 2001 +From: Alyssa Ross +Date: Thu, 19 Dec 2024 16:51:51 +0100 +Subject: [PATCH] Fix name of Lerc package + +Lerc calls its CMake package "Lerc", not "LERC". This meant that, +even if building libtiff with -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON, +Lerc's CMake files wouldn't be used as intended. + +Link: https://gitlab.com/libtiff/libtiff/-/merge_requests/686 +--- + cmake/{FindLERC.cmake => FindLerc.cmake} | 0 + cmake/LERCCodec.cmake | 2 +- + 2 files changed, 1 insertion(+), 1 deletion(-) + rename cmake/{FindLERC.cmake => FindLerc.cmake} (100%) + +diff --git a/cmake/FindLERC.cmake b/cmake/FindLerc.cmake +similarity index 100% +rename from cmake/FindLERC.cmake +rename to cmake/FindLerc.cmake +diff --git a/cmake/LERCCodec.cmake b/cmake/LERCCodec.cmake +index 54504ca1..237f8d7e 100644 +--- a/cmake/LERCCodec.cmake ++++ b/cmake/LERCCodec.cmake +@@ -25,7 +25,7 @@ + + # libLerc + set(LERC_SUPPORT FALSE) +-find_package(LERC) ++find_package(Lerc) + option(lerc "use libLerc (required for LERC compression)" ${LERC_FOUND}) + if (lerc AND LERC_FOUND AND ZIP_SUPPORT) + set(LERC_SUPPORT TRUE) +-- +2.47.0 +