- use BSD_INSTALL_DATA for static lib to keep symbols while here: - convert Makefile header into two-line format - remove LICENSE_FILE, unneeded for GPLv3 - switch to USE_PKGCONFIG - remove quotes from option description - change bsd.port.[pre|post].mk with just bsd.port.mk - whitespace fixes in pkg-descr PR: 171795 Submitted by: Martin Dieringer <martin.dieringer at gmx dot de> Approved by: Zhihao Yuan <lichray at gmail dot com> (maintainer)
60 lines
1.5 KiB
Makefile
60 lines
1.5 KiB
Makefile
# Created by: Martin Dieringer <martin.dieringer@gmx.de>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= mupdf
|
|
PORTVERSION= 1.1
|
|
PORTEPOCH= 1
|
|
CATEGORIES= graphics
|
|
MASTER_SITES= GOOGLE_CODE \
|
|
http://www.mupdf.com/download/
|
|
EXTRACT_SUFX= -source.tar.gz
|
|
|
|
MAINTAINER= lichray@gmail.com
|
|
COMMENT= Lightweight PDF viewer and toolkit
|
|
|
|
LICENSE= GPLv3
|
|
|
|
LIB_DEPENDS= freetype:${PORTSDIR}/print/freetype2 \
|
|
jpeg:${PORTSDIR}/graphics/jpeg \
|
|
jbig2dec:${PORTSDIR}/graphics/jbig2dec \
|
|
openjpeg:${PORTSDIR}/graphics/openjpeg
|
|
|
|
USE_GMAKE= yes
|
|
MAKE_ARGS+= build=release prefix=${PREFIX} verbose=1 mandir=${PREFIX}/man
|
|
USE_XORG= x11 xext
|
|
USE_PKGCONFIG= build
|
|
MAN1= mupdf.1 mubusy.1 mudraw.1
|
|
|
|
MAKE_JOBS_SAFE= yes
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-source
|
|
|
|
OPTIONS_DEFINE= SCROLL
|
|
OPTIONS_DEFAULT=SCROLL
|
|
|
|
SCROLL_DESC= Build with scroll hacks
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${CC:T:Mclang} == "clang"
|
|
CFLAGS+= -no-integrated-as
|
|
.elif ${ARCH} == "amd64" || ${ARCH} == "i386"
|
|
CFLAGS+= -mfpmath=sse
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MSCROLL}
|
|
EXTRA_PATCHES+= ${FILESDIR}/scroll_hack-apps_pdfapp.c
|
|
.endif
|
|
|
|
post-patch: .SILENT
|
|
${REINPLACE_CMD} \
|
|
-e '/install:/,/^$$/ { /-d/d; }' \
|
|
-e '/install.*bindir)$$/s/install/$$(BSD_INSTALL_PROGRAM)/' \
|
|
-e '/install.*libdir)$$/s/install/$$(BSD_INSTALL_DATA)/' \
|
|
-e '/install.*incdir)$$/s/install/$$(BSD_INSTALL_DATA)/' \
|
|
-e '/install.*man1$$/s/install/$$(BSD_INSTALL_MAN)/' \
|
|
${WRKSRC}/Makefile
|
|
${REINPLACE_CMD} -e 's/-pipe -O2 //' \
|
|
-e 's|/usr/local|${LOCALBASE}|' \
|
|
${WRKSRC}/Makerules
|
|
|
|
.include <bsd.port.mk>
|