uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
57
pkgs/applications/misc/llpp/default.nix
Normal file
57
pkgs/applications/misc/llpp/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ stdenv, lib, substituteAll, makeWrapper, fetchgit, ocaml, mupdf, libX11, jbig2dec, openjpeg, libjpeg , lcms2, harfbuzz,
|
||||
libGLU, libGL, gumbo, freetype, zlib, xclip, inotify-tools, procps }:
|
||||
|
||||
assert lib.versionAtLeast (lib.getVersion ocaml) "4.07";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "llpp";
|
||||
version = "33";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://repo.or.cz/llpp.git";
|
||||
rev = "v${version}";
|
||||
sha256 = "0shqzhaflm2yhkx6c0csq9lxp1s1r7lh5kgpx9q5k06xya2a7yvs";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
patches = (substituteAll {
|
||||
inherit version;
|
||||
src = ./fix-build-bash.patch;
|
||||
});
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ ocaml mupdf libX11 libGLU libGL freetype zlib gumbo jbig2dec openjpeg libjpeg lcms2 harfbuzz ];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
configurePhase = ''
|
||||
mkdir -p build/mupdf/thirdparty
|
||||
ln -s ${freetype.dev} build/mupdf/thirdparty/freetype
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
bash ./build.bash build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -d $out/bin
|
||||
install build/llpp $out/bin
|
||||
install misc/llpp.inotify $out/bin/llpp.inotify
|
||||
|
||||
wrapProgram $out/bin/llpp \
|
||||
--prefix PATH ":" "${xclip}/bin"
|
||||
|
||||
wrapProgram $out/bin/llpp.inotify \
|
||||
--prefix PATH ":" "$out/bin" \
|
||||
--prefix PATH ":" "${inotify-tools}/bin" \
|
||||
--prefix PATH ":" "${procps}/bin"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://repo.or.cz/w/llpp.git";
|
||||
description = "A MuPDF based PDF pager written in OCaml";
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
80
pkgs/applications/misc/llpp/fix-build-bash.patch
Normal file
80
pkgs/applications/misc/llpp/fix-build-bash.patch
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
diff --git a/build.bash b/build.bash
|
||||
index 7c278b6..41494c5 100755
|
||||
with manual adjustments
|
||||
--- a/build.bash
|
||||
+++ b/build.bash
|
||||
@@ -30,7 +30,6 @@ srcd="$(dirname $0)"
|
||||
mudir=$outd/mupdf
|
||||
muinc="-I $mudir/include -I $mudir/thirdparty/freetype/include"
|
||||
|
||||
-test -d "$mudir" || die muPDF not found, consult $(dirname $0)/BUILDING
|
||||
|
||||
mkdir -p $outd/{$wsid,lablGL}
|
||||
:>$outd/ordered
|
||||
@@ -41,12 +40,6 @@ isfresh() { test -r "$1.past" && . "$1.past" && test "$k" = "$2"; }
|
||||
mulibst="$mudir/build/$mbt/libs"
|
||||
mulibs="$mudir/build/$mbt/libmupdf.a $mudir/build/$mbt/libmupdf-third.a"
|
||||
|
||||
-keycmd="(cd $mudir && make -q build=$mbt libs && echo); digest $mulibs"
|
||||
-isfresh "$mulibst" "$(eval $keycmd)" || (
|
||||
- make -C "$mudir" build=$mbt -j $mjobs libs
|
||||
- eval $keycmd >${mulibst}.past
|
||||
-) && vecho "fresh mupdf"
|
||||
-
|
||||
oincs() {
|
||||
local i=
|
||||
local incs1=
|
||||
@@ -100,35 +93,6 @@ mflags() {
|
||||
}
|
||||
|
||||
overs="$(ocamlc -vnum 2>/dev/null)" || overs=""
|
||||
-test "$overs" = "4.11.1" || {
|
||||
- url=https://caml.inria.fr/pub/distrib/ocaml-4.11/ocaml-4.11.1.tar.xz
|
||||
- txz=$outd/$(basename $url)
|
||||
- keycmd="printf $url; digest $txz;"
|
||||
- isfresh $txz "$(eval $keycmd)" || {
|
||||
- executable_p() { command -v "$1" >/dev/null 2>&1; }
|
||||
- if executable_p wget; then dl() { wget -q "$1" -O "$2"; }
|
||||
- elif executable_p curl; then dl() { curl -L "$1" -o "$2"; }
|
||||
- else die "no program to fetch remote urls found"
|
||||
- fi
|
||||
- dl $url $txz
|
||||
- eval $keycmd >$txz.past
|
||||
- } && vecho "fresh $txz"
|
||||
- absprefix=$(cd $outd &>/dev/null; pwd -P)
|
||||
- export PATH=$absprefix/bin:$PATH
|
||||
- ocamlc=$absprefix/bin/ocamlc
|
||||
- keycmd="printf $url; digest $ocamlc;"
|
||||
- isfresh $ocamlc "$(eval $keycmd)" || (
|
||||
- tar xf $txz -C $outd
|
||||
- bn=$(basename $url)
|
||||
- cd $outd/${bn%.tar.xz}
|
||||
- ./configure --disable-ocamldoc --disable-ocamltest \
|
||||
- --enable-debugger=no --prefix=$absprefix
|
||||
- make -j $mjobs world
|
||||
- make install
|
||||
- eval $keycmd >$absprefix/bin/ocamlc.past
|
||||
- ) && vecho "fresh ocamlc"
|
||||
- overs=$(ocamlc -vnum 2>/dev/null)
|
||||
-}
|
||||
|
||||
ccomp=${LLPP_CC-$(ocamlc -config | grep "^c_compiler: " | \
|
||||
{ read _ c; echo $c; })}
|
||||
@@ -243,7 +208,7 @@ bobjc() {
|
||||
} && vecho "fresh $o"
|
||||
}
|
||||
|
||||
-ver=$(cd $srcd && git describe --tags --dirty) || ver=unknown
|
||||
+ver=@version@
|
||||
|
||||
cmd="(. $srcd/genconfstr.sh >$outd/confstruct.ml)"
|
||||
keycmd="digest $srcd/genconfstr.sh $outd/confstruct.ml"
|
||||
@@ -291,7 +256,7 @@ for m in ml_gl ml_glarray ml_raw; do
|
||||
done
|
||||
|
||||
libs="str.cma unix.cma"
|
||||
-clibs="-L$mudir/build/$mbt -lmupdf -lmupdf-third -lpthread"
|
||||
+clibs="-lmupdf -lmupdf-third -lfreetype -lgumbo -ljpeg -lopenjp2 -ljbig2dec -llcms2 -lharfbuzz -lpthread -lz"
|
||||
if $darwin; then
|
||||
mcomp=$(ocamlc -config | grep bytecomp_c_co | { read _ c; echo $c; })
|
||||
clibs="$clibs -framework Cocoa -framework OpenGL"
|
||||
Loading…
Add table
Add a link
Reference in a new issue