openjpeg: clean-up
Merge generic.nix and 2.x.nix into default.nix. openjpeg_2 is now an alias
This commit is contained in:
parent
d846bfaa4d
commit
8c9a72e55f
|
@ -1,21 +0,0 @@
|
||||||
{ callPackage, fetchpatch, ... } @ args:
|
|
||||||
|
|
||||||
callPackage ./generic.nix (args // rec {
|
|
||||||
version = "2.4.0";
|
|
||||||
branch = "2.4";
|
|
||||||
revision = "v${version}";
|
|
||||||
sha256 = "143dvy5g6v6129lzvl0r8mrgva2fppkn0zl099qmi9yi9l9h7yyf";
|
|
||||||
|
|
||||||
extraFlags = [
|
|
||||||
"-DOPENJPEG_INSTALL_INCLUDE_DIR=${placeholder "dev"}/include/openjpeg-${branch}"
|
|
||||||
"-DOPENJPEG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/openjpeg-${branch}"
|
|
||||||
];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./fix-cmake-config-includedir.patch
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://patch-diff.githubusercontent.com/raw/uclouvain/openjpeg/pull/1321.patch";
|
|
||||||
sha256 = "1cjpr76nf9g65nqkfnxnjzi3bv7ifbxpc74kxxibh58pzjlp6al8";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
})
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config
|
||||||
, libpng, libtiff, lcms2, jpylyzer
|
, libpng, libtiff, lcms2, jpylyzer
|
||||||
, mj2Support ? true # MJ2 executables
|
, mj2Support ? true # MJ2 executables
|
||||||
, jpwlLibSupport ? true # JPWL library & executables
|
, jpwlLibSupport ? true # JPWL library & executables
|
||||||
|
@ -10,8 +10,6 @@
|
||||||
, thirdPartySupport ? false # Third party libraries - OFF: only build when found, ON: always build
|
, thirdPartySupport ? false # Third party libraries - OFF: only build when found, ON: always build
|
||||||
, testsSupport ? true
|
, testsSupport ? true
|
||||||
, jdk ? null
|
, jdk ? null
|
||||||
# Inherit generics
|
|
||||||
, branch, version, revision, sha256, patches ? [], extraFlags ? [], ...
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert jpipServerSupport -> jpipLibSupport && curl != null && fcgi != null;
|
assert jpipServerSupport -> jpipLibSupport && curl != null && fcgi != null;
|
||||||
|
@ -23,18 +21,24 @@ let
|
||||||
mkFlag = optSet: flag: "-D${flag}=${if optSet then "ON" else "OFF"}";
|
mkFlag = optSet: flag: "-D${flag}=${if optSet then "ON" else "OFF"}";
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "openjpeg";
|
pname = "openjpeg";
|
||||||
inherit version;
|
version = "2.4.0"; # don't forget to change passthru.incDir
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "uclouvain";
|
owner = "uclouvain";
|
||||||
repo = "openjpeg";
|
repo = "openjpeg";
|
||||||
rev = revision;
|
rev = "v${version}";
|
||||||
inherit sha256;
|
sha256 = "143dvy5g6v6129lzvl0r8mrgva2fppkn0zl099qmi9yi9l9h7yyf";
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit patches;
|
patches = [
|
||||||
|
./fix-cmake-config-includedir.patch
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://patch-diff.githubusercontent.com/raw/uclouvain/openjpeg/pull/1321.patch";
|
||||||
|
sha256 = "1cjpr76nf9g65nqkfnxnjzi3bv7ifbxpc74kxxibh58pzjlp6al8";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
|
@ -52,7 +56,9 @@ stdenv.mkDerivation {
|
||||||
(mkFlag jp3dSupport "BUILD_JP3D")
|
(mkFlag jp3dSupport "BUILD_JP3D")
|
||||||
(mkFlag thirdPartySupport "BUILD_THIRDPARTY")
|
(mkFlag thirdPartySupport "BUILD_THIRDPARTY")
|
||||||
(mkFlag testsSupport "BUILD_TESTING")
|
(mkFlag testsSupport "BUILD_TESTING")
|
||||||
] ++ extraFlags;
|
"-DOPENJPEG_INSTALL_INCLUDE_DIR=${placeholder "dev"}/include/${passthru.incDir}"
|
||||||
|
"-DOPENJPEG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/${passthru.incDir}"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
|
|
||||||
|
@ -71,7 +77,7 @@ stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
incDir = "openjpeg-${branch}";
|
incDir = "openjpeg-2.4";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
|
@ -402,6 +402,7 @@ mapAliases ({
|
||||||
opencl-icd = ocl-icd; # added 2017-01-20
|
opencl-icd = ocl-icd; # added 2017-01-20
|
||||||
openexr_ctl = ctl; # added 2018-04-25
|
openexr_ctl = ctl; # added 2018-04-25
|
||||||
openjpeg_1 = throw "openjpeg_1 has been removed, use openjpeg_2 instead"; # added 2021-01-24
|
openjpeg_1 = throw "openjpeg_1 has been removed, use openjpeg_2 instead"; # added 2021-01-24
|
||||||
|
openjpeg_2 = openjpeg; # added 2021-01-25
|
||||||
openjpeg_2_1 = openjpeg_2; # added 2018-10-25
|
openjpeg_2_1 = openjpeg_2; # added 2018-10-25
|
||||||
opensans-ttf = open-sans; # added 2018-12-04
|
opensans-ttf = open-sans; # added 2018-12-04
|
||||||
openssh_with_kerberos = openssh; # added 2018-01-28
|
openssh_with_kerberos = openssh; # added 2018-01-28
|
||||||
|
|
|
@ -15912,8 +15912,7 @@ in
|
||||||
|
|
||||||
openh264 = callPackage ../development/libraries/openh264 { };
|
openh264 = callPackage ../development/libraries/openh264 { };
|
||||||
|
|
||||||
openjpeg_2 = callPackage ../development/libraries/openjpeg/2.x.nix { };
|
openjpeg = callPackage ../development/libraries/openjpeg { };
|
||||||
openjpeg = openjpeg_2;
|
|
||||||
|
|
||||||
openpa = callPackage ../development/libraries/openpa { };
|
openpa = callPackage ../development/libraries/openpa { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue