Sergei Trofimovich 2024-02-26 22:12:21 +00:00
parent 5e3b611a30
commit e29b451c53

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config { lib, stdenv, fetchFromGitHub, cmake, pkg-config
, libdeflate, libpng, libtiff, zlib, lcms2, jpylyzer , libdeflate, libpng, libtiff, zlib, lcms2, jpylyzer
, jpipLibSupport ? false # JPIP library & executables , jpipLibSupport ? false # JPIP library & executables
, jpipServerSupport ? false, curl, fcgi # JPIP Server , jpipServerSupport ? false, curl, fcgi # JPIP Server
@ -12,32 +12,17 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "openjpeg"; pname = "openjpeg";
version = "2.5.0"; version = "2.5.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "uclouvain"; owner = "uclouvain";
repo = "openjpeg"; repo = "openjpeg";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-/0o3Fl6/jx5zu854TCqMyOz/8mnEyEC9lpZ6ij/tbHc="; hash = "sha256-mQ9B3MJY2/bg0yY/7jUJrAXM6ozAHT5fmwES5Q1SGxw=";
}; };
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
patches = [
# modernise cmake files, also fixes them for multiple outputs
# https://github.com/uclouvain/openjpeg/pull/1424
(fetchpatch {
name = "uclouvain-openjpeg-pull-1424.patch";
url = "https://github.com/uclouvain/openjpeg/compare/52927287402a9f7353de8854c88f931051211e2f...9d4f70cfe99626f82f9c8dcbf45f07709e3511b2.patch";
sha256 = "sha256-CxVRt1u4HVOMUjWiZ2plmZC29t/zshCpSY+N4Wlrlvg=";
})
# fix cmake files cross compilation
(fetchpatch {
url = "https://github.com/uclouvain/openjpeg/commit/c6ceb84c221b5094f1e8a4c0c247dee3fb5074e8.patch";
sha256 = "sha256-gBUtmO/7RwSWEl7rc8HGr8gNtvNFdhjEwm0Dd51p5O8=";
})
];
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_INSTALL_NAME_DIR=\${CMAKE_INSTALL_PREFIX}/lib" "-DCMAKE_INSTALL_NAME_DIR=\${CMAKE_INSTALL_PREFIX}/lib"
"-DBUILD_SHARED_LIBS=ON" "-DBUILD_SHARED_LIBS=ON"