llpp: update to latest revision, uses now the ninja build system

This commit is contained in:
Pascal Wittmann 2014-11-29 14:17:19 +01:00
parent f063a0a245
commit 5dd9d2d342
2 changed files with 28 additions and 59 deletions

View File

@ -1,75 +1,41 @@
{ stdenv, fetchgit, ocaml, mupdf, lablgl, mesa { stdenv, makeWrapper, fetchgit, pkgconfig, ninja, ocaml, findlib, mupdf, lablgl
, libX11, libXext, gtk3, freetype, zlib, openjpeg , gtk3, openjpeg, jbig2dec, mujs }:
, jbig2dec, libjpeg, ncurses }:
stdenv.mkDerivation { let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
name = "llpp-2014-05-26"; in stdenv.mkDerivation rec {
name = "llpp-2014-11-29";
src = fetchgit { src = fetchgit {
url = "git://repo.or.cz/llpp.git"; url = "git://repo.or.cz/llpp.git";
rev = "902143de64d86b5714b3a59d2cc7085083b87249"; rev = "481c8398b2c5dc4589738f5f80104ed75b9c73ff";
sha256 = "038xl4gbvm57na2lz1fw36sf43zaxq407zi2d53985vc33677j9s"; sha256 = "13zi5mzpd9j4mmm68m3zkv49xgkhswhqvmp4bbyi0psmhxak8y5l";
}; };
buildInputs = [ ocaml mupdf lablgl mesa libX11 libXext gtk3 buildInputs = [ pkgconfig ninja makeWrapper ocaml findlib mupdf lablgl
freetype jbig2dec libjpeg openjpeg zlib ncurses ]; gtk3 jbig2dec openjpeg mujs ];
# The build phase was extracted from buildall.sh, because that script configurePhase = ''
# fetched the dependencies on its own. sh configure.sh -O -F ${mupdf}
buildPhase = '' sed -i 's;-lopenjpeg;-lopenjp2;g' .config
ccopt="-O" sed -i 's;$builddir/link\.so;link.so;g' build.ninja
ccopt="$ccopt -I ${jbig2dec}/include"
ccopt="$ccopt -I ${libjpeg}/include"
ccopt="$ccopt -I ${freetype}/include/freetype2"
ccopt="$ccopt -I ${openjpeg}/include"
ccopt="$ccopt -I ${zlib}/include"
ccopt="$ccopt -I ${mupdf}/include"
ccopt="$ccopt -include ft2build.h"
ccopt="$ccopt -D_GNU_SOURCE"
cclib="$cclib -lmupdf"
cclib="$cclib -lz -ljpeg -lopenjp2 -ljbig2dec -lfreetype -lpthread"
cclib="$cclib -lX11"
cclib="$cclib -lfreetype"
comp=ocamlc.opt
cmsuf=cmo
sh mkhelp.sh keystoml.ml KEYS > help.ml
$comp -c -o link.o -ccopt "$ccopt" link.c
$comp -c -o help.$cmsuf help.ml
$comp -c -o utils.$cmsuf utils.ml
$comp -c -o wsi.cmi wsi.mli
$comp -c -o wsi.$cmsuf wsi.ml
$comp -c -o parser.$cmsuf parser.ml
$comp -c -o main.$cmsuf -I ${lablgl}/lib/ocaml/4.01.0/site-lib/lablgl main.ml
$comp -custom -o llpp \
-I ${lablgl}/lib/ocaml/4.01.0/site-lib/lablgl \
str.cma unix.cma lablgl.cma \
link.o \
-cclib "$cclib" \
help.cmo \
utils.cmo \
parser.cmo \
wsi.cmo \
main.cmo
''; '';
# Binary fails with 'No bytecode file specified.' if stripped. buildPhase = "${ninja}/bin/ninja";
dontStrip = true;
installPhase = '' installPhase = ''
install -d $out/bin install -d $out/bin $out/lib
install llpp llppac $out/bin install build/llpp $out/bin
install link.so $out/lib
wrapProgram $out/bin/llpp \
--prefix CAML_LD_LIBRARY_PATH ":" "${lablgl}/lib/ocaml/${ocamlVersion}/site-lib/lablgl" \
--prefix CAML_LD_LIBRARY_PATH ":" "$out/lib"
''; '';
meta = { meta = with stdenv.lib; {
homepage = http://repo.or.cz/w/llpp.git; homepage = http://repo.or.cz/w/llpp.git;
description = "A MuPDF based PDF pager written in OCaml"; description = "A MuPDF based PDF pager written in OCaml";
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
maintainers = [ stdenv.lib.maintainers.pSub ]; maintainers = with maintainers; [ pSub ];
license = "GPL"; license = licenses.gpl3;
}; };
} }

View File

@ -10076,7 +10076,10 @@ let
bison = bison2; bison = bison2;
}; };
llpp = callPackage ../applications/misc/llpp { inherit (ocamlPackages) lablgl; }; llpp = callPackage ../applications/misc/llpp {
inherit (ocamlPackages_4_02_1) lablgl findlib;
ocaml = ocaml_4_02_1;
};
lmms = callPackage ../applications/audio/lmms { }; lmms = callPackage ../applications/audio/lmms { };