forked from mirrors/nixpkgs
jfbview: split out jfbpdf (jfbview w/o imlib2)
This commit is contained in:
parent
e7cfdd6c14
commit
273e160a12
|
@ -1,12 +1,20 @@
|
||||||
{ stdenv, fetchFromGitHub
|
{ stdenv, fetchFromGitHub
|
||||||
, freetype, harfbuzz, imlib2, jbig2dec, libjpeg, libX11, mujs, mupdf
|
, freetype, harfbuzz, jbig2dec, libjpeg, libX11, mujs, mupdf, ncurses, openjpeg
|
||||||
, ncurses, openjpeg, openssl }:
|
, openssl
|
||||||
|
|
||||||
|
, imageSupport ? true, imlib2 ? null }:
|
||||||
|
|
||||||
let
|
let
|
||||||
binaries = [ "jfbpdf" "jfbview" "jpdfcat" "jpdfgrep" ];
|
package = if imageSupport
|
||||||
|
then "jfbview"
|
||||||
|
else "jfbpdf";
|
||||||
|
binaries = if imageSupport
|
||||||
|
then [ "jfbview" "jpdfcat" "jpdfgrep" ] # all require imlib2
|
||||||
|
else [ "jfbpdf" ]; # does not
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "jfbview-${version}";
|
name = "${package}-${version}";
|
||||||
version = "0.5.2";
|
version = "0.5.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
@ -16,12 +24,16 @@ stdenv.mkDerivation rec {
|
||||||
owner = "jichu4n";
|
owner = "jichu4n";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ freetype harfbuzz imlib2 jbig2dec libjpeg libX11 mujs mupdf
|
buildInputs = [
|
||||||
ncurses openjpeg openssl ];
|
freetype harfbuzz jbig2dec libjpeg libX11 mujs mupdf ncurses openjpeg
|
||||||
|
openssl
|
||||||
|
] ++ stdenv.lib.optionals imageSupport [
|
||||||
|
imlib2
|
||||||
|
];
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
# Hack. Probing (with `ldconfig -p`) fails with ‘cannot execute binary file’.
|
# Hack. Probing (`ldconfig -p`) fails with ‘cannot execute binary file’.
|
||||||
# Overriding `OPENJP2 = ...` later works, but makes build output misleading:
|
# Overriding `OPENJP2 =` later works, but makes build output misleading:
|
||||||
substituteInPlace Makefile --replace "ldconfig -p" "echo libopenjp2"
|
substituteInPlace Makefile --replace "ldconfig -p" "echo libopenjp2"
|
||||||
|
|
||||||
make config.mk
|
make config.mk
|
||||||
|
|
|
@ -10482,6 +10482,9 @@ in
|
||||||
iw = callPackage ../os-specific/linux/iw { };
|
iw = callPackage ../os-specific/linux/iw { };
|
||||||
|
|
||||||
jfbview = callPackage ../os-specific/linux/jfbview { };
|
jfbview = callPackage ../os-specific/linux/jfbview { };
|
||||||
|
jfbpdf = callPackage ../os-specific/linux/jfbview {
|
||||||
|
imageSupport = false;
|
||||||
|
};
|
||||||
|
|
||||||
jool-cli = callPackage ../os-specific/linux/jool/cli.nix { };
|
jool-cli = callPackage ../os-specific/linux/jool/cli.nix { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue