mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Added llpp, a mupdf based pdf pager written in ocaml.
Updated lablgl to 1.05 and mupdf to 1.4. Added myself as maintainer for lablgl.
This commit is contained in:
parent
6b21186742
commit
86b7cf8bb4
75
pkgs/applications/misc/llpp/default.nix
Normal file
75
pkgs/applications/misc/llpp/default.nix
Normal file
@ -0,0 +1,75 @@
|
||||
{ stdenv, fetchgit, ocaml, mupdf, lablgl, mesa
|
||||
, libX11, libXext, gtk3, freetype, zlib, openjpeg
|
||||
, jbig2dec, libjpeg, ncurses }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "llpp-2014-05-26";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://repo.or.cz/llpp.git";
|
||||
rev = "902143de64d86b5714b3a59d2cc7085083b87249";
|
||||
sha256 = "038xl4gbvm57na2lz1fw36sf43zaxq407zi2d53985vc33677j9s";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml mupdf lablgl mesa libX11 libXext gtk3
|
||||
freetype jbig2dec libjpeg openjpeg zlib ncurses ];
|
||||
|
||||
# The build phase was extracted from buildall.sh, because that script
|
||||
# fetched the dependencies on its own.
|
||||
buildPhase = ''
|
||||
ccopt="-O"
|
||||
ccopt="$ccopt -I ${jbig2dec}/include"
|
||||
ccopt="$ccopt -I ${libjpeg}/include"
|
||||
ccopt="$ccopt -I ${freetype}/include"
|
||||
ccopt="$ccopt -I ${openjpeg}/include"
|
||||
ccopt="$ccopt -I ${zlib}/include"
|
||||
ccopt="$ccopt -I ${mupdf}/include"
|
||||
ccopt="$ccopt -include ${freetype}/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.
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = ''
|
||||
install -d $out/bin
|
||||
install llpp llppac $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://repo.or.cz/w/llpp.git;
|
||||
description = "A MuPDF based PDF pager written in OCaml";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.pSub ];
|
||||
license = "GPL";
|
||||
};
|
||||
}
|
@ -1,20 +1,13 @@
|
||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, zlib, freetype, libjpeg, jbig2dec, openjpeg
|
||||
, libX11, libXext }:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mupdf-1.3";
|
||||
name = "mupdf-1.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://mupdf.com/download/archive/${name}-source.tar.gz";
|
||||
sha256 = "0y247nka5gkr1ajn47jrlp5rcnf6h4ff7dfsprma3h4wxqdv7a5b";
|
||||
sha256 = "08pc6fv42sb9k9dzjs8ph32nixzrzmr08yxh7arkpsdm42asp2q1";
|
||||
};
|
||||
|
||||
patches = [(fetchpatch {
|
||||
name = "CVE-2014-2013.patch";
|
||||
url = "http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;"
|
||||
+ "h=60dabde18d7fe12b19da8b509bdfee9cc886aafc";
|
||||
sha256 = "0p721f3g2djz9fy6rcgj83c20f5k257wg2d0yvvmp02m7sp06l0g";
|
||||
})];
|
||||
|
||||
buildInputs = [ pkgconfig zlib freetype libjpeg jbig2dec openjpeg libX11 libXext ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
@ -41,7 +41,7 @@ diff -Naur lablGL.ori/Makefile.config lablGL/Makefile.config
|
||||
+
|
||||
+##### Uncomment these for windows
|
||||
+#TKLIBS = tk83.lib tcl83.lib gdi32.lib user32.lib
|
||||
+#GLLIBS = opengl32.lib glu32.lib
|
||||
+#GLLIBS = opengl32.lib glu32.lib
|
||||
+#TOOLCHAIN = msvc
|
||||
+#XA = .lib
|
||||
+#XB = .bat
|
||||
@ -65,53 +65,3 @@ diff -Naur lablGL.ori/Makefile.config lablGL/Makefile.config
|
||||
+
|
||||
+# C Compiler options
|
||||
+#COPTS = -c -O
|
||||
diff -Naur lablGL.ori/META lablGL/META
|
||||
--- lablGL.ori/META 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ lablGL/META 2013-06-02 22:00:59.000000000 +0200
|
||||
@@ -0,0 +1,21 @@
|
||||
+description = "Bindings for OpenGL graphics engines"
|
||||
+version = "1.04-1"
|
||||
+archive(byte) = "lablgl.cma"
|
||||
+archive(native) = "lablgl.cmxa"
|
||||
+
|
||||
+#package "togl" (
|
||||
+# description = "OpenGL widget for labltk"
|
||||
+# version = "1.01"
|
||||
+# requires = "lablgl, labltk"
|
||||
+# archive(byte) = "togl.cma"
|
||||
+# archive(native) = "togl.cmxa"
|
||||
+#)
|
||||
+
|
||||
+package "glut" (
|
||||
+ description = "Platform-independent OpenGL window"
|
||||
+ version = "1.01"
|
||||
+ requires = "lablgl"
|
||||
+ archive(byte) = "lablglut.cma"
|
||||
+ archive(native) = "lablglut.cmxa"
|
||||
+)
|
||||
+
|
||||
diff -Naur lablGL.ori/META~ lablGL/META~
|
||||
--- lablGL.ori/META~ 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ lablGL/META~ 2013-06-02 21:59:17.000000000 +0200
|
||||
@@ -0,0 +1,21 @@
|
||||
+description = "Bindings for OpenGL graphics engines"
|
||||
+version = "1.04-1"
|
||||
+archive(byte) = "lablgl.cma"
|
||||
+archive(native) = "lablgl.cmxa"
|
||||
+
|
||||
+#package "togl" (
|
||||
+# description = "OpenGL widget for labltk"
|
||||
+# version = "1.01"
|
||||
+# requires = "lablGL, labltk"
|
||||
+# archive(byte) = "togl.cma"
|
||||
+# archive(native) = "togl.cmxa"
|
||||
+#)
|
||||
+
|
||||
+package "glut" (
|
||||
+ description = "Platform-independent OpenGL window"
|
||||
+ version = "1.01"
|
||||
+ requires = "lablGL"
|
||||
+ archive(byte) = "lablglut.cma"
|
||||
+ archive(native) = "lablglut.cmxa"
|
||||
+)
|
||||
+
|
||||
|
@ -3,15 +3,15 @@
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
pname = "lablgl";
|
||||
version = "1.04-1";
|
||||
version = "1.05";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-20120306.tar.gz";
|
||||
sha256 = "1w5di2n38h7fkrf668zphnramygwl7ybjhrmww3pi9jcf9apa09r";
|
||||
url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-${version}.tar.gz";
|
||||
sha256 = "0qabydd219i4ak7hxgc67496qnnscpnydya2m4ijn3cpbgih7zyq";
|
||||
};
|
||||
|
||||
buildInputs = [ocaml findlib lablgtk mesa freeglut ];
|
||||
@ -29,7 +29,6 @@ stdenv.mkDerivation {
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
#makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib";
|
||||
buildFlags = "lib libopt glut glutopt";
|
||||
|
||||
postInstall = ''
|
||||
@ -40,6 +39,6 @@ stdenv.mkDerivation {
|
||||
homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html;
|
||||
description = "OpenGL bindings for ocaml";
|
||||
license = "GnuGPLV2";
|
||||
# maintainers = [ stdenv.lib.maintainers.roconnor ];
|
||||
maintainers = [ stdenv.lib.maintainers.psub ];
|
||||
};
|
||||
}
|
||||
|
@ -8830,6 +8830,8 @@ let
|
||||
bison = bison2;
|
||||
};
|
||||
|
||||
llpp = callPackage ../applications/misc/llpp { inherit (ocamlPackages) lablgl; };
|
||||
|
||||
lmms = callPackage ../applications/audio/lmms { };
|
||||
|
||||
lxdvdrip = callPackage ../applications/video/lxdvdrip { };
|
||||
|
Loading…
Reference in New Issue
Block a user