71 lines
2.1 KiB
Bash
71 lines
2.1 KiB
Bash
# Template file for 'mupdf'
|
|
pkgname=mupdf
|
|
version=1.15.0
|
|
revision=3
|
|
wrksrc="${pkgname}-${version}-source"
|
|
hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
|
|
libjpeg-turbo-devel jbig2dec-devel libXext-devel libXcursor-devel
|
|
libXrandr-devel libXinerama-devel harfbuzz-devel readline-devel
|
|
MesaLib-devel libopenjpeg2-devel glu-devel libXi-devel libfreeglut-devel"
|
|
makedepends="$hostmakedepends"
|
|
depends="desktop-file-utils"
|
|
short_desc="Lightweight PDF and XPS viewer"
|
|
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
|
|
license="AGPL-3.0-only"
|
|
homepage="https://mupdf.com"
|
|
distfiles="https://mupdf.com/downloads/archive/${pkgname}-${version}-source.tar.gz"
|
|
checksum=9fe6773ee0dc192d1878b7886b51150cbeb1a8ad81d3cd806d8e1ab343ffd471
|
|
patch_args="-Np1"
|
|
|
|
pre_build() {
|
|
# libmupdf-{threads,pkcs7}.a are required by fbpdf
|
|
sed 's/INSTALL_LIBS :=/& $(THREAD_LIB) $(PKCS7_LIB)/' -i Makefile
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
make CC=cc LD=ld AR=ar CFLAGS="-fPIC" LDFLAGS='' build=release generate
|
|
fi
|
|
}
|
|
|
|
do_build() {
|
|
CFLAGS+=" -fPIC"
|
|
CXXFLAGS+=" -fPIC"
|
|
if [ "$CROSS_BUILD" ]; then
|
|
make USE_SYSTEM_LIBS=yes CURL_LIBS='-lcurl -lpthread' build=release CROSSCOMPILE=yes all
|
|
make CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" build=release CROSSCOMPILE=yes -C thirdparty/mujs
|
|
else
|
|
make USE_SYSTEM_LIBS=yes CURL_LIBS='-lcurl -lpthread' build=release all
|
|
make V=1 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" build=release -C thirdparty/mujs
|
|
fi
|
|
}
|
|
|
|
do_install() {
|
|
make USE_SYSTEM_LIBS=yes build=release prefix=${DESTDIR}/usr install
|
|
|
|
ln -rs ${DESTDIR}/usr/bin/mupdf-x11 ${DESTDIR}/usr/bin/mupdf
|
|
|
|
vinstall ${FILESDIR}/mupdf.xpm 644 usr/share/pixmaps
|
|
vinstall ${FILESDIR}/mupdf.desktop 644 usr/share/applications
|
|
}
|
|
|
|
post_install() {
|
|
vlicense COPYING LICENSE
|
|
}
|
|
|
|
mupdf-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="libjpeg-turbo-devel jbig2dec-devel libopenjpeg2-devel"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
}
|
|
}
|
|
|
|
mupdf-tools_package() {
|
|
short_desc+=" - tools"
|
|
pkg_install() {
|
|
vmove usr/bin/muraster
|
|
vmove usr/bin/mutool
|
|
vmove usr/share/man/man1/mutool.1
|
|
}
|
|
}
|