2020-01-01 19:41:12 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://mupdf.com/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Lightweight PDF and XPS viewer (library)"
|
|
|
|
TERMUX_PKG_LICENSE="AGPL-V3"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-01-22 09:13:38 +01:00
|
|
|
TERMUX_PKG_VERSION=1.19.0
|
2020-01-01 19:41:12 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://mupdf.com/downloads/archive/mupdf-${TERMUX_PKG_VERSION}-source.tar.xz
|
2022-01-22 09:13:38 +01:00
|
|
|
TERMUX_PKG_SHA256=38f39943e408d60a3e7d6c2fca0d705163540ca24d65682d4426dc6f1fee28c5
|
|
|
|
TERMUX_PKG_DEPENDS="freetype, gumbo-parser, harfbuzz, jbig2dec, libjpeg-turbo, openjpeg, tesseract, zlib"
|
|
|
|
TERMUX_PKG_EXTRA_MAKE_ARGS="prefix=$TERMUX_PREFIX build=release libs shared=yes tesseract=yes"
|
2020-01-01 19:41:12 +01:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
|
|
|
termux_step_pre_configure() {
|
2022-01-22 09:13:38 +01:00
|
|
|
if [ $TERMUX_ARCH = "i686" ]; then
|
|
|
|
TERMUX_PKG_EXTRA_MAKE_ARGS="${TERMUX_PKG_EXTRA_MAKE_ARGS/tesseract=yes/}"
|
|
|
|
fi
|
|
|
|
rm -rf thirdparty/{freeglut,freetype,harfbuzz,jbig2dec,leptonica,libjpeg,openjpeg,tesseract,zlib}
|
2020-01-01 19:41:12 +01:00
|
|
|
export USE_SYSTEM_LIBS=yes
|
|
|
|
LDFLAGS+=" -llog"
|
|
|
|
}
|
2022-01-18 08:51:22 +01:00
|
|
|
|
|
|
|
termux_step_post_make_install() {
|
|
|
|
TERMUX_PKG_EXTRA_MAKE_ARGS="${TERMUX_PKG_EXTRA_MAKE_ARGS/shared=yes/}"
|
|
|
|
termux_step_make
|
2022-01-22 09:13:38 +01:00
|
|
|
install -Dm600 -t $TERMUX_PREFIX/lib build/release*/libmupdf{-third,}.a
|
2022-01-18 08:51:22 +01:00
|
|
|
}
|