# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= mupdf VERSION= 1.27.0 KEYWORDS= graphics VARIANTS= std SDESC[std]= Lightweight PDF and XPS viewer HOMEPAGE= https://mupdf.com/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://mupdf.com/downloads/archive/ https://mupdf.com/downloads/ https://fossies.org/linux/misc/ DISTFILE[1]= mupdf-1.27.0-source.tar.gz:main DF_INDEX= 1 SPKGS[std]= set tools dev man docs examples OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= harfbuzz:dev:std gumbo:dev:std freeglut:dev:std openjpeg:dev:std jbig2dec:dev:std brotli:dev:std BUILDRUN_DEPENDS= harfbuzz:primary:std openjpeg:primary:std jbig2dec:primary:std freeglut:primary:std gumbo:primary:std brotli:primary:std USES= cpe gmake pkgconfig zlib:build curl freetype XORG_COMPONENTS= x11 xcursor xext xinerama xrandr DISTNAME= mupdf-1.27.0-source LICENSE= AGPLv3+:tools LICENSE_TERMS= tools:{{WRKDIR}}/TERMS LICENSE_FILE= AGPLv3+:{{WRKSRC}}/COPYING LICENSE_SCHEME= solo CPE_VENDOR= artifex FPC_EQUIVALENT= graphics/mupdf MAKE_ARGS= build=release prefix={{PREFIX}} mandir={{MANPREFIX}}/man verbose=yes SOVERSION=1.27.0 SOVERSION= 1.27.0 CFLAGS= `pkg-config --cflags libopenjp2` -I{{WRKSRC}}/include/mupdf -I{{LOCALBASE}}/include/freetype2 -I{{LOCALBASE}}/include/harfbuzz VAR_ARCH[x86_64]= CFLAGS=-fPIC post-install: ${MV} ${STAGEDIR}${PREFIX}/bin/mupdf-x11 ${STAGEDIR}${PREFIX}/bin/mupdf ${INSTALL_PROGRAM} ${WRKSRC}/build/release/muraster \ ${STAGEDIR}${PREFIX}/bin ${MKDIR} ${STAGEDIR}${PREFIX}/share/examples ${MV} ${STAGEDIR}${PREFIX}/share/doc/mupdf/examples \ ${STAGEDIR}${STD_EXAMPLESDIR} ${RM} ${STAGEDIR}${STD_DOCDIR}/COPYING pre-configure: ${REINPLACE_CMD} -e "s|%%OPSYS%%|${OPSYS}|; s/-pipe -O2 //" \ ${WRKSRC}/Makerules post-extract: ${RM} -r ${WRKSRC}/thirdparty/curl \ ${WRKSRC}/thirdparty/freetype \ ${WRKSRC}/thirdparty/freeglut \ ${WRKSRC}/thirdparty/harfbuzz \ ${WRKSRC}/thirdparty/jbig2dec \ ${WRKSRC}/thirdparty/openjpeg \ ${WRKSRC}/thirdparty/zlib ${AWK} '/^LICENSE/,/^REPORTING/' ${WRKSRC}/README > ${WRKDIR}/TERMS post-patch-sunos: ${REINPLACE_CMD} -e '/define _XOPEN_SOURCE/d' \ ${WRKSRC}/platform/x11/x11_image.c [FILE:35:descriptions/desc.tools] This package contains MuPDF tools. [FILE:105:distinfo] ae2442416de499182d37a526c6fa2bacc7a3bed5a888d113ca04844484dfe7c6 66955970 mupdf-1.27.0-source.tar.gz [FILE:40:manifests/plist.tools] bin/ mupdf mupdf-gl muraster mutool [FILE:938:manifests/plist.dev] include/mupdf/ fitz.h html.h memento.h pdf.h ucdn.h include/mupdf/fitz/ archive.h band-writer.h barcode.h bidi.h bitmap.h buffer.h color.h compress.h compressed-buffer.h config.h context.h crypt.h deskew.h device.h display-list.h document.h export.h filter.h font.h geometry.h getopt.h glyph-cache.h glyph.h hash.h heap-imp.h heap.h hyphen.h image.h json.h link.h log.h outline.h output-svg.h output.h path.h pixmap.h pool.h separation.h shade.h store.h story-writer.h story.h stream.h string-util.h structured-text.h system.h text.h track-usage.h transition.h tree.h types.h util.h version.h write-pixmap.h writer.h xml.h include/mupdf/pdf/ annot.h clean.h cmap.h crypt.h document.h event.h font.h form.h image-rewriter.h interpret.h javascript.h name-table.h object.h page.h parse.h recolor.h resource.h xref.h zugferd.h lib/ libmupdf-third.a libmupdf.a [FILE:35:manifests/plist.man] share/man/man1/ mupdf.1 mutool.1 [FILE:34:manifests/plist.docs] share/doc/mupdf/ CHANGES README [FILE:439:manifests/plist.examples] share/examples/mupdf/ SnarkFront.svg bbox-device.js copy-outline.js create-thumbnail.js draw-device.js draw-document.js example.c fix-s22pdf.js huntingofthesnark.png import-fdf.js jpx-to-pdf.js multi-threaded.c pdf-bake.js pdf-create-lowlevel.js pdf-create.js pdf-dejpx.js pdf-extract-rich-media.js pdf-merge.js pdf-portfolio.js pdf-trace.js reconvert-cmyk.js searchtest.c storytest.c storytest.js trace-device.js [FILE:489:patches/patch-Makerules] --- Makerules.orig 2025-12-12 00:00:07 UTC +++ Makerules @@ -236,7 +236,7 @@ ifeq ($(OS),Darwin) else - ifeq ($(OS),Linux) + ifeq ($(OS),%%OPSYS%%) HAVE_OBJCOPY := yes endif @@ -331,7 +331,7 @@ else endif ifeq ($(HAVE_LIBCRYPTO),) - HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes) + HAVE_LIBCRYPTO := no endif ifeq ($(HAVE_LIBCRYPTO),yes) LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO [FILE:546:patches/patch-Makethird] --- Makethird.orig 2025-12-12 00:00:07 UTC +++ Makethird @@ -1,5 +1,6 @@ # GNU Makefile for third party libraries used by MuPDF +USE_SYSTEM_LIBS := yes ifeq ($(USE_SYSTEM_LIBS),yes) USE_SYSTEM_FREETYPE ?= yes USE_SYSTEM_GUMBO ?= yes @@ -7,7 +8,6 @@ ifeq ($(USE_SYSTEM_LIBS),yes) USE_SYSTEM_JBIG2DEC ?= yes USE_SYSTEM_JPEGXR ?= no # not available USE_SYSTEM_LCMS2 ?= no # lcms2mt is strongly preferred - USE_SYSTEM_LIBJPEG ?= yes USE_SYSTEM_MUJS ?= no # not available USE_SYSTEM_OPENJPEG ?= yes USE_SYSTEM_ZLIB ?= yes [FILE:2566:patches/patch-source_fitz_crypt-sha2.c] $NetBSD: patch-ae,v 1.5 2016/02/04 11:50:24 leot Exp $ Avoid namespace conflicts with bswap(3). --- source/fitz/crypt-sha2.c.orig 2025-12-12 00:00:07 UTC +++ source/fitz/crypt-sha2.c @@ -19,7 +19,7 @@ static inline int isbigendian(void) return *(char*)&one == 0; } -static inline unsigned int bswap32(unsigned int num) +static inline unsigned int mup_bswap32(unsigned int num) { return ( (((num) << 24)) | (((num) << 8) & 0x00FF0000) @@ -27,7 +27,7 @@ static inline unsigned int bswap32(unsig | (((num) >> 24)) ); } -static inline uint64_t bswap64(uint64_t num) +static inline uint64_t mup_bswap64(uint64_t num) { return ( (((num) << 56)) | (((num) << 40) & 0x00FF000000000000ULL) @@ -101,7 +101,7 @@ transform256(unsigned int state[8], unsi /* ensure big-endian integers */ if (!isbigendian()) for (j = 0; j < 16; j++) - data[j] = bswap32(data[j]); + data[j] = mup_bswap32(data[j]); /* Copy state[] to working vars. */ memcpy(T, state, sizeof(T)); @@ -194,8 +194,8 @@ void fz_sha256_final(fz_sha256 *context, if (!isbigendian()) { - context->buffer.u32[14] = bswap32(context->count[1]); - context->buffer.u32[15] = bswap32(context->count[0]); + context->buffer.u32[14] = mup_bswap32(context->count[1]); + context->buffer.u32[15] = mup_bswap32(context->count[0]); } else { @@ -206,7 +206,7 @@ void fz_sha256_final(fz_sha256 *context, if (!isbigendian()) for (j = 0; j < 8; j++) - context->state[j] = bswap32(context->state[j]); + context->state[j] = mup_bswap32(context->state[j]); memcpy(digest, &context->state[0], 32); memset(context, 0, sizeof(fz_sha256)); @@ -273,7 +273,7 @@ transform512(uint64_t state[8], uint64_t /* ensure big-endian integers */ if (!isbigendian()) for (j = 0; j < 16; j++) - data[j] = bswap64(data[j]); + data[j] = mup_bswap64(data[j]); /* Copy state[] to working vars. */ memcpy(T, state, sizeof(T)); @@ -366,8 +366,8 @@ void fz_sha512_final(fz_sha512 *context, if (!isbigendian()) { - context->buffer.u64[14] = bswap64(context->count[1]); - context->buffer.u64[15] = bswap64(context->count[0]); + context->buffer.u64[14] = mup_bswap64(context->count[1]); + context->buffer.u64[15] = mup_bswap64(context->count[0]); } else { @@ -378,7 +378,7 @@ void fz_sha512_final(fz_sha512 *context, if (!isbigendian()) for (j = 0; j < 8; j++) - context->state[j] = bswap64(context->state[j]); + context->state[j] = mup_bswap64(context->state[j]); memcpy(digest, &context->state[0], 64); memset(context, 0, sizeof(fz_sha512));