1 # builds "hard" prerequisites and llpp
4 use_sumatrapdf_patched_mupdf
=false
11 openjpeg
=http
://openjpeg.googlecode.com
/svn
/trunk
/
12 jbig2dec
=git
://git.ghostscript.com
/jbig2dec.git
13 lablgl
=http
://wwwfun.kurims.kyoto-u.ac.jp
/soft
/lsl
/dist
/lablgl-1.04.
tar.gz
14 mupdf
=git
://git.ghostscript.com
/mupdf.git
15 sumatrapdf
=http
://sumatrapdf.googlecode.com
/svn
/trunk
17 test -d openjpeg || svn
-r r608 checkout
$openjpeg openjpeg
18 test -d jbig2dec || git clone
$jbig2dec jbig2dec
19 test -d lablGL-1.04 ||
(wget
$lablgl && tar -xzf lablgl-1.04.
tar.gz
)
21 if ! test -d mupdf
; then
22 if $use_sumatrapdf_patched_mupdf; then
23 svn checkout
$sumatrapdf/mupdf mupdf
31 mkdir
-p $root/include
33 make=$
(gmake
2>/dev
/null
&& echo gmake ||
echo make)
37 && cp dist
/*.h
$root/include
/ \
38 && cp dist
/*.a
$root/lib
/)
41 && $make -f Makefile.unix
install prefix
=$root && rm -f $root/lib
/*.so
*)
44 && cat Makefile.config.linux.mdk
> Makefile.config \
45 && $make glut glutopt \
48 LIBDIR
=$root/lib
/ocaml \
49 DLLDIR
=$root/lib
/ocaml
/stublibs \
50 INSTALLDIR
=$root/lib
/ocaml
/lablGL
)
52 export CPATH
=$root/include
:$root/mupdf
/pdf
:$root/mupdf
/fitz
:$CPATH:/usr
/local
/include
53 export LIBRARY_PATH
=$root/lib
:$root/mupdf
/build
/release
:$LIBRARY_PATH:/usr
/local
/lib
55 (cd mupdf
&& $make build
=release
)
61 sh mkhelp.sh
$srcpath/keystoml.ml
$srcpath/KEYS
> help.ml
63 ccopt
="$(freetype-config --cflags) -O -include ft2build.h -D_GNU_SOURCE"
64 if test "$1" = "opt"; then
65 cclib
="-lmupdf -lfitz -lz -ljpeg -lopenjpeg -ljbig2dec -lfreetype -lpthread"
66 ocamlopt
-c -o link.o
-ccopt "$ccopt" $srcpath/link.c
67 ocamlopt
-c -o help.cmx
help.ml
68 ocamlopt
-c -o parser.cmx
$srcpath/parser.ml
69 ocamlopt
-c -o main.cmx
-I $root/lib
/ocaml
/lablGL
$srcpath/main.ml
72 -I $root/lib
/ocaml
/lablGL \
73 str.cmxa unix.cmxa lablgl.cmxa lablglut.cmxa \
80 cclib
="-lmupdf -lfitz -lz -ljpeg -lopenjpeg -ljbig2dec -lfreetype"
81 ocamlc
-c -o link.o
-ccopt "$ccopt" $srcpath/link.c
82 ocamlc
-c -o help.cmo
help.ml
83 ocamlc
-c -o parser.cmo
$srcpath/parser.ml
84 ocamlc
-c -o main.cmo
-I $root/lib
/ocaml
/lablGL
$srcpath/main.ml
86 ocamlc
-custom -o llpp \
87 -I $root/lib
/ocaml
/lablGL \
88 str.cma unix.cma lablgl.cma lablglut.cma \