https://nvd.nist.gov/vuln/detail/CVE-2018-10289 http://git.ghostscript.com/?p=mupdf.git;h=2e43685dc8a8a886fc9df9b3663cf199404f7637 https://bugs.ghostscript.com/show_bug.cgi?id=699271
96 lines
2.8 KiB
Bash
96 lines
2.8 KiB
Bash
# Template file for 'mupdf'
|
|
pkgname=mupdf
|
|
version=1.13.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
|
|
MesaLib-devel libopenjpeg2-devel glu-devel libXi-devel"
|
|
makedepends="$hostmakedepends"
|
|
depends="desktop-file-utils"
|
|
short_desc="Lightweight PDF and XPS viewer"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
license="AGPL-3"
|
|
homepage="http://mupdf.com"
|
|
distfiles="http://mupdf.com/downloads/archive/${pkgname}-${version}-source.tar.gz"
|
|
checksum=071c6962cbee1136188da62136596a9d704b81e35fe617cd34874bbb0ae7ca09
|
|
export VOID_VERSION="${version}"
|
|
|
|
pre_configure() {
|
|
rm -rf thirdparty/{curl,freetype,harfbuzz,libjpeg,zlib,jbig2dec,openjpeg}
|
|
}
|
|
|
|
do_configure() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
export CFLAGS="-fPIC"
|
|
unset LDFLAGS
|
|
make CC=cc LD=ld AR=ar build=release generate
|
|
fi
|
|
}
|
|
|
|
do_build() {
|
|
CFLAGS+=" -fPIC"
|
|
CFLAGS+=" $(pkg-config --cflags libopenjp2)"
|
|
if [ "$CROSS_BUILD" ]; then
|
|
make CURL_LIBS='-lcurl -lpthread' build=release CROSSCOMPILE=yes all extra-apps
|
|
make CFLAGS="$CFLAGS" build=release -C thirdparty/mujs CROSSCOMPILE=yes
|
|
else
|
|
make CURL_LIBS='-lcurl -lpthread' build=release all extra-apps
|
|
make CFLAGS="$CFLAGS" build=release -C thirdparty/mujs
|
|
fi
|
|
}
|
|
|
|
do_install() {
|
|
make build=release prefix=${DESTDIR}/usr install
|
|
|
|
ln -s mupdf-x11-curl ${DESTDIR}/usr/bin/mupdf
|
|
|
|
vbin build/release/mupdf-x11-curl
|
|
vbin build/release/mujstest
|
|
vbin build/release/muraster
|
|
vinstall build/release/libmupdf.so.${version} 644 usr/lib
|
|
vinstall build/release/libmupdfthird.so.${version} 644 usr/lib
|
|
vinstall build/release/libmuthreads.so.${version} 644 usr/lib
|
|
vinstall build/release/libmupkcs7.so.${version} 644 usr/lib
|
|
vinstall thirdparty/mujs/build/release/libmujs.a 644 usr/lib
|
|
|
|
vinstall ${FILESDIR}/mupdf.xpm 644 usr/share/pixmaps
|
|
vinstall ${FILESDIR}/mupdf.desktop 644 usr/share/applications
|
|
}
|
|
|
|
post_install() {
|
|
vlicense COPYING LICENSE
|
|
}
|
|
|
|
libmupdf_package() {
|
|
short_desc+=" - shared libraries"
|
|
pkg_install() {
|
|
vmove usr/lib/libmupdf.so.${version}
|
|
vmove usr/lib/libmupdfthird.so.${version}
|
|
vmove usr/lib/libmuthreads.so.${version}
|
|
vmove usr/lib/libmupkcs7.so.${version}
|
|
}
|
|
}
|
|
|
|
mupdf-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="libmupdf libjpeg-turbo-devel jbig2dec-devel libopenjpeg2-devel"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/libmujs.a
|
|
ln -s libmupdf.so.${version} ${PKGDESTDIR}/usr/lib/libmupdf.so
|
|
ln -s libmupdfthird.so.${version} ${PKGDESTDIR}/usr/lib/libmupdfthird.so
|
|
ln -s libmuthreads.so.${version} ${PKGDESTDIR}/usr/lib/libmuthreads.so
|
|
}
|
|
}
|
|
|
|
mupdf-tools_package() {
|
|
short_desc+=" - tools"
|
|
pkg_install() {
|
|
vmove usr/bin/mujstest
|
|
vmove usr/bin/muraster
|
|
vmove usr/bin/mutool
|
|
vmove usr/share/man/man1/mutool.1
|
|
}
|
|
}
|