So you want to know how to compile MuPDF on CentOs, ScientificLinux or Redhat?
Let's jump in!
Setup
- log in as root or otherwise set the right permissions and use 'sudo' for make install
- run
yum install libtool
- run
mkdir mupdf ; cd mupdf
- run
wget http://mupdf.googlecode.com/files/mupdf-1.1-source.tar.gz
- run
wget http://mupdf.googlecode.com/files/mupdf-thirdparty-2012-08-14.zip
- run
unzip -a mupdf-thirdparty-2012-08-14.zip
use -a or you will have ^M issues
- run
tar -xvf mupdf-1.1-source.tar.gz
Compile Third party libs
# cd thirdparty/freetype-2.4.10
# chmod -R 775 *
# sh autogen.sh
# ./configure
# make; make install
# cd thirdparty/jbig2dec
# chmod -R 775 *
# sh autogen.sh
# ./configure
# make; make install
# cd thirdparty/jpeg-9
# chmod -R 775 *
# ./configure
# make; make install
# cd thirdparty/openjpeg-1.5.0-patched
# chmod -R 775 *
# ./configure
# make; make install
# cd thirdparty/zlib-1.2.7
# chmod -R 775 *
# ./configure
# make; make install
Patch and Compile main mupdf source
yum install fontconfig fontconfig-devel freetype freetype-devel
yum install libX11 libX11-devel libXext libXext-devel
cp /usr/local/lib/* /usr/lib/
- if something doesnt work try to yum install libtools-devel and run ldconfig
Notes
- If the directories are different (i.e. /usr/bin and not /usr/local/bin ) then ln -s mudraw, mupdf and mubusy to the correct dir and dont forget the man pages in /usr/local/share/man/man1
Updates
- [2015-10-09] MuPDF is up to version 1.7a and it may or may not need the third-party libs. Check out the download directory here.
Thank you a lot!
ReplyDelete