jfbview: split out jfbpdf (jfbview w/o imlib2)

This commit is contained in:
Tobias Geerinckx-Rice 2016-05-06 13:45:34 +02:00
parent e7cfdd6c14
commit 273e160a12
No known key found for this signature in database
GPG key ID: 91CCDB9B48541B99
2 changed files with 23 additions and 8 deletions

View file

@ -1,12 +1,20 @@
{ stdenv, fetchFromGitHub
, freetype, harfbuzz, imlib2, jbig2dec, libjpeg, libX11, mujs, mupdf
, ncurses, openjpeg, openssl }:
, freetype, harfbuzz, jbig2dec, libjpeg, libX11, mujs, mupdf, ncurses, openjpeg
, openssl
, imageSupport ? true, imlib2 ? null }:
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
stdenv.mkDerivation rec {
name = "jfbview-${version}";
name = "${package}-${version}";
version = "0.5.2";
src = fetchFromGitHub {
@ -16,12 +24,16 @@ stdenv.mkDerivation rec {
owner = "jichu4n";
};
buildInputs = [ freetype harfbuzz imlib2 jbig2dec libjpeg libX11 mujs mupdf
ncurses openjpeg openssl ];
buildInputs = [
freetype harfbuzz jbig2dec libjpeg libX11 mujs mupdf ncurses openjpeg
openssl
] ++ stdenv.lib.optionals imageSupport [
imlib2
];
configurePhase = ''
# Hack. Probing (with `ldconfig -p`) fails with cannot execute binary file.
# Overriding `OPENJP2 = ...` later works, but makes build output misleading:
# Hack. Probing (`ldconfig -p`) fails with cannot execute binary file.
# Overriding `OPENJP2 =` later works, but makes build output misleading:
substituteInPlace Makefile --replace "ldconfig -p" "echo libopenjp2"
make config.mk

View file

@ -10482,6 +10482,9 @@ in
iw = callPackage ../os-specific/linux/iw { };
jfbview = callPackage ../os-specific/linux/jfbview { };
jfbpdf = callPackage ../os-specific/linux/jfbview {
imageSupport = false;
};
jool-cli = callPackage ../os-specific/linux/jool/cli.nix { };