import Fitz/MuPDF. incomplete copyright notices so PERMIT_* are

disabled for now. "i'm stunned by the quality and that it doesn't
choke on a recent document[0] where xpdf had issues with" simon@
(who also helped tracking down the key bindings, thanks!).


Fitz is a project to create a new and modern graphics library.
At the core of Fitz is the display tree: a scene graph of vector
graphics, images and text making up the contents of a page.

The standard components of Fitz are:

    * Base runtime (thin memory and error handling layer)
    * Streams and filters (standard postscript, pdf and tiff filters)
    * World model (display trees and resources)
    * Drawing (draw the tree to a bitmap raster) 

MuPDF is a PDF parser that reads PDF files and creates Fitz trees.

MuPDF also has an API to modify internal objects in the PDF files
and write PDF files. For instance, it is possible to use the MuPDF
library to encrypt existing PDF files, or to rearrange the pages.

pdftool is a commandline demo of this functionality; it is a portable
pdf swiss army knife for fixing broken pdf files, changing permissions,
merging and extracting pages, and examining the internal object
structure of a PDF file.

The mupdf binary (aka pdfview) is a bare bones PDF viewer.
This commit is contained in:
sthen 2009-06-02 22:15:08 +00:00
parent 1cc94583b6
commit 1123385d33
5 changed files with 184 additions and 0 deletions

69
textproc/mupdf/Makefile Normal file
View File

@ -0,0 +1,69 @@
# $OpenBSD: Makefile,v 1.1.1.1 2009/06/02 22:15:08 sthen Exp $
COMMENT = graphic library, pdf parser, viewer and utilities
DISTNAME = fitz-0.0.20090601
PKGNAME = mupdf-0.0.20090601
CATEGORIES = textproc x11
HOMEPAGE = http://ccxvii.net/fitz/
MAINTAINER = Stuart Henderson <sthen@openbsd.org>
# Code: GPLv2 but XXX missing copyright information and license headers
# Fonts: Adobe/Apache license
PERMIT_PACKAGE_CDROM = not yet
PERMIT_PACKAGE_FTP = not yet
PERMIT_DISTFILES_CDROM =not yet
PERMIT_DISTFILES_FTP = not yet
WANTLIB = X11 Xext c freetype m z
# from darcs checkout
MASTER_SITES = http://spacehopper.org/mirrors/
BUILD_DEPENDS = ::devel/jam
LIB_DEPENDS = jasper::graphics/jasper \
jpeg.>=62::graphics/jpeg
USE_X11 = Yes
NO_REGRESS = Yes
JAMDEBUG = -d x # display command-lines
JAMDEBUG += -q # die quickly on build failure
MAKE_ENV += CC=${CC} CXX=${CXX}
JAMFLAGS = \
-sALL_LOCATE_TARGET=${WRKBUILD} \
-sBUILD= \
-sHAVE_JASPER=yes \
-sOPTIM="${CFLAGS}" \
-sOS=LINUX \
-sTHIRDPARTYINC="`freetype-config --cflags` -I${LOCALBASE}/include" \
-sTHIRDPARTYLIB="`freetype-config --libs` -L${LOCALBASE}/lib"
# built-in CJK fonts and data files use way too much compiler
# memory, even with -O0.
.if (${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "sparc64" && \
${MACHINE_ARCH} != "amd64" && ${MACHINE_ARCH} != "hppa")
JAMFLAGS += -sDEFINES=NOCJK
.else
VMEM_WARNING = Yes
.endif
SEPARATE_BUILD = concurrent
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} jam ${JAMDEBUG} ${JAMFLAGS}
do-install:
${INSTALL_MAN} ${FILESDIR}/mupdf.1 ${PREFIX}/man/man1
${INSTALL_PROGRAM} ${WRKBUILD}/mupdf ${PREFIX}/bin
.for x in cmapdump fontdump pdfclean pdfdraw pdfextract pdfinfo pdfshow
${INSTALL_PROGRAM} ${WRKBUILD}/$x ${PREFIX}/bin/mu_$x
.endfor
.include <bsd.port.mk>

5
textproc/mupdf/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (fitz-0.0.20090601.tar.gz) = CXFYKzEv5eNgmseMPlb1WA==
RMD160 (fitz-0.0.20090601.tar.gz) = w1xmUHWC7843locSCm6FSl/mMnU=
SHA1 (fitz-0.0.20090601.tar.gz) = iSnN++5ivzwzDB/fAKFUn0nkNQg=
SHA256 (fitz-0.0.20090601.tar.gz) = OsX+C+XtqdPNtdf57fE0EkC79HeID8lXs8tYRW7VZ5s=
SIZE (fitz-0.0.20090601.tar.gz) = 12191689

View File

@ -0,0 +1,77 @@
.\" $OpenBSD: mupdf.1,v 1.1.1.1 2009/06/02 22:15:08 sthen Exp $
.Dd $Mdocdate: June 2 2009 $
.Dt MUPDF 1
.Os
.Sh NAME
.Nm mupdf
.Nd "display PDF files"
.Sh SYNOPSIS
.Nm mupdf
.Bk -words
.Op Fl d Ar password
.Op Fl p Ar pagenumber
.Op Fl z Ar zoom
.Ar file.pdf
.Sh DESCRIPTION
.Nm
is a viewer for Portable Document Format (pdf) files.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl d Ar password
Use
.Ar password
as the password to open the document.
.It Fl p Ar pagenumber
Open the document at page
.Ar pagenumber .
.It Fl z Ar zoom
Open the document zoomed by
.Ar zoom
times.
The value is taken as a multiplier, not a percentage.
.El
.Sh KEY BINDINGS
The following key bindings are available.
.Pp
.Bl -tag -width xxxxxxxxxxxx -compact
.It l <
rotate left
.It r >
rotate right
.It u
scroll up
.\" .It up
.\" scroll up
.It d
scroll down
.\" .It down
.\" scroll down
.It + =
zoom in
.It -
zoom out
.It w
shrinkwrap
.It b backspace
previous page
.\" .It pgup left
.\" previous page
.It n space
next page
.\" .It pgdn right
.\" next page
.It N F
forward 10 pages
.It B
back 10 pages
.It m
mark page for snap back
.It t
pop back to last mark
.It 123g
move to page 123
.El
.Pp
.Sh SEE ALSO
.Xr xpdf 1

23
textproc/mupdf/pkg/DESCR Normal file
View File

@ -0,0 +1,23 @@
Fitz is a project to create a new and modern graphics library.
At the core of Fitz is the display tree: a scene graph of vector
graphics, images and text making up the contents of a page.
The standard components of Fitz are:
* Base runtime (thin memory and error handling layer)
* Streams and filters (standard postscript, pdf and tiff filters)
* World model (display trees and resources)
* Drawing (draw the tree to a bitmap raster)
MuPDF is a PDF parser that reads PDF files and creates Fitz trees.
MuPDF also has an API to modify internal objects in the PDF files
and write PDF files. For instance, it is possible to use the MuPDF
library to encrypt existing PDF files, or to rearrange the pages.
pdftool is a commandline demo of this functionality; it is a portable
pdf swiss army knife for fixing broken pdf files, changing permissions,
merging and extracting pages, and examining the internal object
structure of a PDF file.
The mupdf binary (aka pdfview) is a bare bones PDF viewer.

10
textproc/mupdf/pkg/PLIST Normal file
View File

@ -0,0 +1,10 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2009/06/02 22:15:08 sthen Exp $
@bin bin/mu_cmapdump
@bin bin/mu_fontdump
@bin bin/mu_pdfclean
@bin bin/mu_pdfdraw
@bin bin/mu_pdfextract
@bin bin/mu_pdfinfo
@bin bin/mu_pdfshow
@bin bin/mupdf
@man man/man1/mupdf.1