2018-12-10 17:52:58 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.83 2018/12/10 17:52:58 sthen Exp $
|
2009-06-02 22:15:08 +00:00
|
|
|
|
|
|
|
COMMENT = graphic library, pdf parser, viewer and utilities
|
|
|
|
|
2018-12-03 18:40:07 +00:00
|
|
|
V = 1.14.0
|
2018-12-10 17:52:58 +00:00
|
|
|
REVISION = 0
|
2011-03-22 23:40:46 +00:00
|
|
|
DISTNAME = mupdf-$V-source
|
2014-04-17 20:30:57 +00:00
|
|
|
PKGNAME = mupdf-$V
|
2009-06-02 22:15:08 +00:00
|
|
|
|
|
|
|
CATEGORIES = textproc x11
|
|
|
|
|
2018-12-03 18:40:07 +00:00
|
|
|
HOMEPAGE = https://mupdf.com/
|
2009-06-02 22:15:08 +00:00
|
|
|
|
|
|
|
MAINTAINER = Stuart Henderson <sthen@openbsd.org>
|
|
|
|
|
2013-04-07 11:35:16 +00:00
|
|
|
# code: Affero v3 (UGH!)
|
|
|
|
# font maps: Adobe (redist ok, see headers).
|
|
|
|
# droid font: Apache.
|
2009-06-22 11:56:15 +00:00
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
2009-06-02 22:15:08 +00:00
|
|
|
|
2016-01-19 05:20:51 +00:00
|
|
|
# uses pledge(2)
|
2018-12-03 18:40:07 +00:00
|
|
|
WANTLIB += X11 Xext c curl freetype harfbuzz jbig2dec jpeg m
|
|
|
|
WANTLIB += openjp2 pthread z
|
|
|
|
|
|
|
|
# XXX some crypto code (relating to pdf signatures) is disabled as it
|
|
|
|
# uses openssl 1.1.0 functions not supported by libressl yet
|
2016-11-04 11:35:18 +00:00
|
|
|
|
|
|
|
FLAVORS= js
|
|
|
|
FLAVOR?=
|
2016-10-16 09:16:52 +00:00
|
|
|
|
2011-07-13 21:48:48 +00:00
|
|
|
# http://git.ghostscript.com/?p=mupdf.git;a=summary
|
2018-12-03 18:40:07 +00:00
|
|
|
MASTER_SITES = https://mupdf.com/downloads/archive/
|
2009-06-02 22:15:08 +00:00
|
|
|
|
2013-12-31 16:58:44 +00:00
|
|
|
RUN_DEPENDS = devel/desktop-file-utils \
|
|
|
|
devel/xdg-utils
|
2016-10-16 09:16:52 +00:00
|
|
|
LIB_DEPENDS = devel/harfbuzz \
|
|
|
|
graphics/jbig2dec \
|
2011-03-25 21:13:16 +00:00
|
|
|
graphics/jpeg \
|
2014-06-12 14:07:19 +00:00
|
|
|
graphics/openjp2>=2.0.1 \
|
2013-10-29 22:08:59 +00:00
|
|
|
net/curl
|
2009-06-02 22:15:08 +00:00
|
|
|
|
2010-06-03 19:38:34 +00:00
|
|
|
USE_GMAKE = Yes
|
2013-03-11 11:35:43 +00:00
|
|
|
NO_TEST = Yes
|
2009-06-02 22:15:08 +00:00
|
|
|
|
2018-04-23 11:55:54 +00:00
|
|
|
ALL_TARGET = all extra
|
|
|
|
|
2014-04-17 20:30:57 +00:00
|
|
|
MAKE_FLAGS = CC="${CC}" CXX="${CXX}" \
|
2018-04-23 11:55:54 +00:00
|
|
|
XCFLAGS="${CFLAGS} -fPIC -I$(WRKSRC)/fitz -I$(WRKSRC)/pdf -I$(WRKSRC)/xps -I${X11BASE}/include" \
|
2018-12-10 17:52:58 +00:00
|
|
|
LDFLAGS="${LDFLAGS}" LLD_EMUL="${LLD_EMUL}" \
|
2018-12-03 18:40:07 +00:00
|
|
|
USE_SYSTEM_LIBS=yes \
|
2017-05-05 14:02:51 +00:00
|
|
|
build=release verbose=yes
|
2013-10-29 22:08:59 +00:00
|
|
|
|
2018-04-23 11:55:54 +00:00
|
|
|
FAKE_FLAGS = prefix=${PREFIX} mandir=${PREFIX}/man
|
2009-06-02 22:15:08 +00:00
|
|
|
|
2009-06-19 13:42:29 +00:00
|
|
|
pre-configure:
|
2016-10-18 09:24:20 +00:00
|
|
|
cd ${WRKSRC}; sed -i 's,/usr/X11R6/include,${X11BASE}/include,g' Makerules Makethird
|
2018-12-03 18:40:07 +00:00
|
|
|
# keeping internal copy of lcms2 which is a fork with API changes
|
|
|
|
# http://git.ghostscript.com/?p=thirdparty-lcms2.git;a=blob_plain;f=doc/WhyThisFork.txt;hb=lcms2mt
|
|
|
|
rm -rf ${WRKSRC}/thirdparty/{curl,freeglut,freetype,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib} # use from ports
|
2015-11-12 17:26:54 +00:00
|
|
|
.if !${FLAVOR:Mjs}
|
2018-12-03 18:40:07 +00:00
|
|
|
rm -r ${WRKSRC}/thirdparty/mujs # not building with javascript support
|
|
|
|
CFLAGS += -DFZ_ENABLE_JS=0
|
|
|
|
# disable mupdf-gl; it uses some parts of mujs internally so
|
|
|
|
# js support can't be knocked out completely
|
|
|
|
MAKE_FLAGS += HAVE_GLUT=No
|
2016-10-16 09:16:52 +00:00
|
|
|
.else
|
2018-12-03 18:40:07 +00:00
|
|
|
MAKE_FLAGS += ENABLE_MUJS=yes
|
|
|
|
WANTLIB += GL glut
|
|
|
|
LIB_DEPENDS += graphics/freeglut
|
2015-11-12 17:26:54 +00:00
|
|
|
.endif
|
2009-06-02 22:15:08 +00:00
|
|
|
|
2010-06-03 19:38:34 +00:00
|
|
|
post-install:
|
2014-06-12 14:07:19 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/{applications,pixmaps}
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/mupdf.xpm ${PREFIX}/share/pixmaps/
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/mupdf.desktop ${PREFIX}/share/applications/
|
2013-10-29 22:08:59 +00:00
|
|
|
cd ${PREFIX}/bin; ln -s mupdf-x11 mupdf
|
2018-04-23 11:55:54 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/build/release/mupdf-x11-curl ${PREFIX}/bin
|
2018-12-03 18:40:07 +00:00
|
|
|
mv ${PREFIX}/share/doc/mupdf/examples ${PREFIX}/share/examples/mupdf
|
2009-06-02 22:15:08 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|