libjpeg_turbo: fix cross to compatible platforms

Fixes e.g. pkgsStatic.libjpeg_turbo.

Link: https://github.com/NixOS/nixpkgs/pull/251853#issuecomment-1754793525
This commit is contained in:
Alyssa Ross 2024-01-31 16:13:07 +01:00
parent 1328c58881
commit 45581ad4b4
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, nasm
, openjdk
@ -41,8 +42,14 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-xHjd0WHN50b75wdWPHUwfmJGsiWKmj+zA59UwakIo74=";
};
# This is needed by freeimage
patches = [
(fetchpatch {
name = "CMAKE_CROSSCOMPILING_EMULATOR=env-fix.patch";
url = "https://github.com/libjpeg-turbo/libjpeg-turbo/compare/36c51dd3eb60ebde3ca77d3cfa7df3422f1aaaf1..b6ee1016abbc55116304ad396cf88aa19391e10a.patch";
hash = "sha256-dNwXicvZEsG02TBaM5nYMlZ+VczT/Dfx6ZM/6huZpwE=";
})
# This is needed by freeimage
./0001-Compile-transupp.c-as-part-of-the-library.patch
] ++ lib.optionals (!stdenv.hostPlatform.isMinGW) [
./0002-Make-exported-symbols-in-transupp.c-weak.patch