Dummy command for interruption (of searches currently)
[llpp.git] / buildall.sh
bloba03aff757622583ac51e587c793348cbfac92965
1 # builds "hard" prerequisites and llpp
2 set -e
4 use_sumatrapdf_patched_mupdf=true
6 mkdir -p 3rdp
7 cd 3rdp
9 root=$(pwd)
11 openjpeg=http://openjpeg.googlecode.com/svn/trunk/
12 jbig2dec=git://git.ghostscript.com/jbig2dec.git
13 lablgl=:pserver:anoncvs@camlcvs.inria.fr:/caml
14 mupdf=http://mupdf.com/download/snapshots/mupdf-r1300.tar.gz
15 sumatrapdf=http://sumatrapdf.googlecode.com/svn/trunk
17 test -d openjpeg || svn checkout $openjpeg openjpeg
18 test -d jbig2dec || git clone $jbig2dec jbig2dec
19 test -d lablgl || cvs -d $lablgl co -d lablgl bazar-ocaml/lablGL
21 if ! test -d mupdf; then
22 if $use_sumatrapdf_patched_mupdf; then
23 svn checkout $sumatrapdf/mupdf mupdf && grep
24 case $(uname -m) in
25 ppc*|sparc*|arm*)
26 mv mupdf/Makerules aaa && grep -vi "x86" aaa > mupdf/Makerules
27 rm aaa
31 esac
32 else
33 wget $mupdf && tar xf $(basename $mupdf)
37 mkdir -p $root/bin
38 mkdir -p $root/lib
39 mkdir -p $root/include
41 (cd openjpeg \
42 && make dist \
43 && cp dist/*.h $root/include/ \
44 && cp dist/*.a $root/lib/)
46 (cd jbig2dec \
47 && (test -f Makefile || (test -f configure || sh autogen.sh --prefix=$root \
48 && ./configure --prefix=$root)) \
49 && make install && rm -f $root/lib/*.so*)
51 (cd lablgl \
52 && cat Makefile.config.linux.mdk > Makefile.config \
53 && make glut glutopt \
54 && make install \
55 BINDIR=$root/bin \
56 LIBDIR=$root/lib/ocaml \
57 DLLDIR=$root/lib/ocaml/stublibs \
58 INSTALLDIR=$root/lib/ocaml/lablGL)
60 export CPATH=$CPATH:$root/include:$root/mupdf/mupdf:$root/mupdf/fitz
61 export LIBRARY_PATH=$LIBRARY_PATH:$root/lib:$root/mupdf/build/release
63 (cd mupdf && make build=release)
65 cd ..
67 srcpath=$(dirname $0)
69 cclib="-lmupdf -lz -ljpeg -lopenjpeg -ljbig2dec -lfreetype"
70 ocamlc -c -o link.o -ccopt -O $srcpath/link.c
71 ocamlc -c -o main.cmo -I $root/lib/ocaml/lablGL $srcpath/main.ml
73 ocamlc -custom -o llpp \
74 -I $root/lib/ocaml/lablGL \
75 str.cma unix.cma lablgl.cma lablglut.cma \
76 link.o \
77 -cclib "$cclib" \
78 main.cmo