1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00
freebsd-ports/graphics/mupdf/Makefile
Niclas Zeising be6c15b5c6 Add USES=xorg USES=gl, ports categories g
Add USES=xorg and USES=gl to ports in categories starting with 'g'.
While here, try to sprinkle other USES (mostly gnome and sdl) as needed.
2019-11-05 22:16:14 +00:00

71 lines
1.9 KiB
Makefile

# Created by: Martin Dieringer <martin.dieringer@gmx.de>
# $FreeBSD$
PORTNAME= mupdf
DISTVERSION= 1.16.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>