pkgsrc/print/mupdf/Makefile
leot 0294092f83 mupdf: Update print/mupdf to 1.12.0
pkgsrc changes:
 - Add support for the `opengl' option via graphics/glut and remove the `glfw'
   option to follow upstream changes. Adjust options.mk and buildlink3.mk
   accordingly.
 - Add patches/patch-platform_gl_gl-app.h to not force freeglut GLUT
   implementation to every non-APPLE platforms (glut also works!) and adjust the
   glut.h include.
 - Add a commented out lcms2 bl3 inclusion entry, lcms2>=2.9 is needed (due
   "lcms2art.h" et al. inclusion, so disable it for now)
 - Explain the OPJ_STATIC comment in patches/patch-source_fitz_load-jpx.c
   a bit more in depth... ...this will hopefully save some time to
   debug opj_* undefined symbols when trying to link libmupdf and
   accidently omitting the patches/patch-source_fitz_load-jpx.c
   hunk (for extra debugging stories fun, if OPJ_STATIC is defined
   some opj_* symbols are defined while others are not defined,
   making the debugging of that problem more naughty!).
 - Inject HAVE_{CURL,GLUT} variables via MAKE_ENV in options.mk to avoid
   depending on www/curl and graphics/glut (yes, that's a bit kludgy
   but unfortunately mupdf doesn't have a configure and so there
   isn't a more sensible way to do it).  This is needed to avoid
   building mupdf-gl for native X.org where the glut.pc pkg-config
   file is available at build time.  Also adjust patches/patch-ab
   accordingly.
 - Remove patches/patch-CVE*, they are no longer needed (all applied in 1.12.0)
 - Bump BUILDLINK_API_DEPENDS.mupdf to 1.12.0 (there were several API changes
   from 1.11 to 1.12.0) and remove the now redundant and no longer needed
   BUILDLINK_ABI_DEPENDS.mupdf.

Changes:
List of changes in MuPDF 1.12.0

* Color management:
   * LCMS2 library for color management.
   * CMYK rendering with overprint simulation.
   * Spot color rendering.
   * Transparency rendering fixes.

* Structured text output improvements:
   * Reworked structured text API.
   * Faster text searching.
   * Highlight and copy text by selecting lines instead of by area.
   * New semantic XHTML output format.
   * New layout preserving HTML output format.

* Features and improvements:
   * Improved non-AA rendering with new scan converter.
   * Improved LARGEFILE support.
   * Improved TIFF support.
   * Improved documentation.
   * PCLm output.
   * PSD output.
   * New "mutool trace" tool.
   * New "mutool sign" tool (work in progress).
   * Text redaction (work in progress).

* Lots of bug fixes.
2017-12-18 15:06:33 +00:00

63 lines
2 KiB
Makefile

# $NetBSD: Makefile,v 1.55 2017/12/18 15:06:33 leot Exp $
DISTNAME= mupdf-1.12.0-source
PKGNAME= ${DISTNAME:S/-source//}
CATEGORIES= print
MASTER_SITES= https://mupdf.com/downloads/archive/
MAINTAINER= leot@NetBSD.org
HOMEPAGE= https://mupdf.com/
COMMENT= Lightweight PDF, XPS and E-book viewer and toolkit
LICENSE= gnu-agpl-v3
USE_LANGUAGES= c99
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config gmake
INSTALLATION_DIRS+= bin include lib/pkgconfig
INSTALL_MAKE_FLAGS+= prefix=${PREFIX}
INSTALL_MAKE_FLAGS+= mandir=${PREFIX}/${PKGMANDIR}
LDFLAGS+= ${COMPILER_RPATH_FLAG}${X11BASE}/lib
MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}
MAKE_FLAGS+= XCFLAGS=${CFLAGS:Q}
MAKE_FLAGS+= build=release
CFLAGS+= -DJBIG_NO_MEMENTO
CFLAGS.SunOS+= -D_XOPEN_SOURCE=600
.include "options.mk"
# Remove thirdparty directory in order to use the libraries provided by pkgsrc
# mujs directory is an exception and should not be removed (MuJS is the
# default Javascript interpreter for mupdf).
post-extract:
${RM} -fr \
${WRKSRC}/thirdparty/curl \
${WRKSRC}/thirdparty/freeglut \
${WRKSRC}/thirdparty/freetype \
${WRKSRC}/thirdparty/harfbuzz \
${WRKSRC}/thirdparty/jbig2dec \
${WRKSRC}/thirdparty/lcms2 \
${WRKSRC}/thirdparty/libjpeg \
${WRKSRC}/thirdparty/openjpeg \
${WRKSRC}/thirdparty/zlib
post-build:
sed -e "s,@PREFIX@,${PREFIX}," ${FILESDIR}/mupdf.pc > ${WRKSRC}/mupdf.pc
post-install:
${INSTALL_DATA} ${WRKSRC}/mupdf.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/harfbuzz/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/jbig2dec/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
# XXX: Needs lcms2-2.9 that ATM is not in pkgsrc.
#BUILDLINK_API_DEPENDS.lcms2+= lcms2>=2.9
#.include "../../graphics/lcms2/buildlink3.mk"
.include "../../graphics/openjpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"