Merge pull request #208732 from wegank/jxrlib-darwin

jxrlib: migrate to cmake

authored by Robert Scott and committed by GitHub ec5228dc 8877cc28

+16 -12
+16 -12
pkgs/development/libraries/jxrlib/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, python3, fixDarwinDylibNames }: 1 + { lib, stdenv, fetchFromGitHub, fetchpatch, cmake }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "jxrlib"; ··· 13 13 sha256 = "0rk3hbh00nw0wgbfbqk1szrlfg3yq7w6ar16napww3nrlm9cj65w"; 14 14 }; 15 15 16 - postPatch = '' 17 - substituteInPlace Makefile \ 18 - --replace "cc" "$CC" 19 - '' + lib.optionalString stdenv.isDarwin '' 20 - substituteInPlace Makefile \ 21 - --replace '-shared' '-dynamiclib -undefined dynamic_lookup' \ 22 - --replace '.so' '.dylib' 23 - ''; 16 + patches = [ 17 + (fetchpatch { 18 + url = "https://salsa.debian.org/debian-phototools-team/jxrlib/-/raw/df96f9b9c1fbe9cdc97589c337f8a948bc81c4d0/debian/patches/usecmake.patch"; 19 + sha256 = "sha256-BpCToLgA5856PZk5mXlwAy3Oh9aYP/2wvu2DXDTqufM="; 20 + }) 21 + (fetchpatch { 22 + url = "https://salsa.debian.org/debian-phototools-team/jxrlib/-/raw/6c88037293aff8d5bc8a76ea32b36781c430ede3/debian/patches/bug803743.patch"; 23 + sha256 = "sha256-omIGa+ZrWjaH/IkBn4jgjufF/HEDKw69anVCX4hw+xQ="; 24 + }) 25 + (fetchpatch { 26 + url = "https://salsa.debian.org/debian-phototools-team/jxrlib/-/raw/b23d49062ec6a9b2739c9dade86be525a72fc807/debian/patches/pkg-config.patch"; 27 + sha256 = "sha256-ZACaXEi+rbKIFBHtSBheyFfqV2HYsKKrT+SmTShyUhg="; 28 + }) 29 + ]; 24 30 25 - nativeBuildInputs = [ python3 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; 31 + nativeBuildInputs = [ cmake ]; 26 32 27 33 strictDeps = true; 28 - 29 - makeFlags = [ "DIR_INSTALL=$(out)" "SHARED=1" ]; 30 34 31 35 meta = with lib; { 32 36 description = "Implementation of the JPEG XR image codec standard";