1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00
freebsd-ports/graphics/mupdf/Makefile
Fernando Apesteguía 23b2a98cc6 graphics/mupdf: Update to 1.17
Apply patch in graphics/zathura-pdf-mupdf to use transition functions to the new
API (int fz_page_number_from_location(ctx, doc, location))

ChangeLog: https://www.mupdf.com/docs/api/changes.html

PR:	246532
Submitted by:	salil.wadnerkar@gmail.com
Approved by:	uzsolt@uzsolt.hu (maintainer)
2020-05-19 07:25:54 +00:00

71 lines
1.9 KiB
Makefile

# Created by: Martin Dieringer <martin.dieringer@gmx.de>
# $FreeBSD$
PORTNAME= mupdf
DISTVERSION= 1.17.0
DISTVERSIONSUFFIX= -source
PORTEPOCH= 1
CATEGORIES= graphics
MASTER_SITES= http://www.mupdf.com/downloads/ \
http://www.mupdf.com/downloads/archive/
MAINTAINER= uzsolt@uzsolt.hu
COMMENT= Lightweight PDF viewer and toolkit
LICENSE= AGPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libcurl.so:ftp/curl \
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
libjbig2dec.so:graphics/jbig2dec \
libopenjp2.so:graphics/openjpeg
USES= cpe compiler:c++11-lang gl gmake jpeg pkgconfig xorg
USE_XORG= x11 xcursor xext xinerama xrandr
USE_GL= gl glut
USE_LDCONFIG= yes
CPE_VENDOR= artifex
# pkg-config to avoid the conflict with openjpeg15
CFLAGS+= `pkg-config --cflags libopenjp2`
LDFLAGS+= `pkg-config --libs libjpeg libopenjp2` -ljbig2dec
MAKE_ARGS= build=release prefix=${PREFIX} mandir=${PREFIX}/man verbose=yes \
XCFLAGS+="-I${WRKSRC}/include/mupdf -fPIC" \
XLIBS+="-L${LOCALBASE}/lib -L${WRKSRC}/build/release" \
SOVERSION=${DISTVERSION}
ALL_TARGET= all extra-libs
OPTIONS_DEFINE= DOCS JS SCROLL
OPTIONS_DEFAULT= SCROLL
JS_DESC= JavaScript support (V8 engine)
SCROLL_DESC= Build with scroll hacks
JS_LIB_DEPENDS= libv8.so:lang/v8
JS_MAKE_ARGS= V8_PRESENT=1 V8LIBS=-lv8
SCROLL_EXTRA_PATCHES= ${FILESDIR}/scroll_hack-platform__x11__pdfapp.c
PLIST_SUB= SOVERSION=${PORTVERSION}
post-patch:
@${REINPLACE_CMD} -e 's/-pipe -O2 //' \
${WRKSRC}/Makerules
@${REINPLACE_CMD} -e 's/-ldl //' ${WRKSRC}/Makerules \
${WRKSRC}/Makethird
post-install:
${MV} ${STAGEDIR}${PREFIX}/bin/mupdf-x11 \
${STAGEDIR}${PREFIX}/bin/mupdf
${INSTALL_PROGRAM} \
${WRKSRC}/build/release/muraster \
${STAGEDIR}${PREFIX}/bin
${LN} -s libmupdf.so.${PORTVERSION} \
${STAGEDIR}${PREFIX}/lib/libmupdf.so
${LN} -s libmupdf-third.so.${PORTVERSION} \
${STAGEDIR}${PREFIX}/lib/libmupdf-third.so
.include <bsd.port.mk>