Installation of MuPDF
First, fix the Makefile to link properly with the shared library:
sed -i '/MU.*_EXE. :/{
s/\(.(MUPDF_LIB)\)\(.*\)$/\2 | \1/
N
s/$/ -lmupdf -L$(OUT)/
}' Makefile
Install MuPDF by running the following
commands:
cat > user.make << EOF &&
USE_SYSTEM_FREETYPE := yes
USE_SYSTEM_HARFBUZZ := yes
USE_SYSTEM_JBIG2DEC := no
USE_SYSTEM_JPEGXR := no # not used without HAVE_JPEGXR
USE_SYSTEM_LCMS2 := no # need lcms2-art fork
USE_SYSTEM_LIBJPEG := yes
USE_SYSTEM_MUJS := no # build needs source anyway
USE_SYSTEM_OPENJPEG := yes
USE_SYSTEM_ZLIB := yes
USE_SYSTEM_GLUT := no # need freeglut2-art fork
USE_SYSTEM_CURL := yes
USE_SYSTEM_GUMBO := no
EOF
export XCFLAGS=-fPIC &&
make build=release shared=yes &&
unset XCFLAGS
This package does not come with a test suite.
Now, as the root
user:
make prefix=/usr \
shared=yes \
docdir=/usr/share/doc/mupdf-1.21.1 \
install &&
chmod 755 /usr/lib/libmupdf.so &&
ln -sfv mupdf-x11 /usr/bin/mupdf