aboutsummaryrefslogtreecommitdiff
path: root/graphics/xpdf3
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2017-09-12 19:22:01 +0000
committerCy Schubert <cy@FreeBSD.org>2017-09-12 19:22:01 +0000
commited06a7905ef84206eb9fd6b7b7d4ea55625bff19 (patch)
tree1c89c204b48cf6a407a1883f628f24d520c5eab1 /graphics/xpdf3
parent110c7009fe1faf552e1fcaf231d9f5454303dfb9 (diff)
downloadports-ed06a7905ef84206eb9fd6b7b7d4ea55625bff19.tar.gz
ports-ed06a7905ef84206eb9fd6b7b7d4ea55625bff19.zip
This is the functional update of xpdf to xpdf 4.00.
graphics/xpdf is renamed (actually copied) to xpdf3. Those who want to continue to use xpdf with a Motif interface can either install xpdf3 or set XPDF_VERSION=3 in make.conf and continue to install graphics/xpdf. This works around any POLA issues people might have between the old and the new. PR: 222002
Notes
Notes: svn path=/head/; revision=449705
Diffstat (limited to 'graphics/xpdf3')
-rw-r--r--graphics/xpdf3/Makefile67
-rw-r--r--graphics/xpdf3/distinfo2
-rw-r--r--graphics/xpdf3/files/patch-Makefile.in32
-rw-r--r--graphics/xpdf3/files/patch-splash_Makefile.in11
-rw-r--r--graphics/xpdf3/files/patch-splash_SplashFTFont.cc11
-rw-r--r--graphics/xpdf3/files/patch-xfont11
-rw-r--r--graphics/xpdf3/files/patch-xpdf_GlobalParams.cc13
-rw-r--r--graphics/xpdf3/files/patch-xpdf_GlobalParams.h10
-rw-r--r--graphics/xpdf3/files/patch-xpdf_Stream.cc18
-rw-r--r--graphics/xpdf3/files/patch-xpdf_XPDFViewer.cc13
-rw-r--r--graphics/xpdf3/files/patch-xpdf__Makefile.in12
-rw-r--r--graphics/xpdf3/files/xpdf-man.conf.in1
-rw-r--r--graphics/xpdf3/pkg-descr8
-rw-r--r--graphics/xpdf3/pkg-message8
-rw-r--r--graphics/xpdf3/pkg-plist28
15 files changed, 245 insertions, 0 deletions
diff --git a/graphics/xpdf3/Makefile b/graphics/xpdf3/Makefile
new file mode 100644
index 000000000000..b319e43d141b
--- /dev/null
+++ b/graphics/xpdf3/Makefile
@@ -0,0 +1,67 @@
+# $FreeBSD$
+
+PORTNAME= xpdf
+PORTVERSION= 3.04
+PORTREVISION= 8
+CATEGORIES= graphics print
+MASTER_SITES= http://mirrors.rit.edu/zi/ \
+ ftp://ftp.foolabs.com/pub/xpdf/ \
+ TEX_CTAN/support/xpdf \
+ http://komquats.com/distfiles/
+
+MAINTAINER= cy@FreeBSD.org
+COMMENT= Display PDF files and convert them to other formats
+
+LICENSE= GPLv2
+
+LIB_DEPENDS= libfreetype.so:print/freetype2 \
+ libpng.so:graphics/png
+
+GNU_CONFIGURE= yes
+USES= gmake cpe localbase
+CPE_VENDOR= foolabs
+CONFIGURE_ARGS= --enable-opi \
+ --with-freetype2-library="${LOCALBASE}/lib" \
+ --with-freetype2-includes="${LOCALBASE}/include/freetype2" \
+ --bindir="${PREFIX}/libexec/xpdf" \
+ --mandir="${PREFIX}/share/xpdf/man"
+
+MANPREFIX= ${PREFIX}/share/xpdf
+
+OPTIONS_DEFINE= LIBPAPER TYPE1 X11 DOCS
+LIBPAPER_DESC= Enable libpaper
+TYPE1_DESC= Ghostscript type1 fonts
+OPTIONS_DEFAULT= TYPE1 X11
+OPTIONS_SUB= yes
+
+SUB_FILES= xpdf-man.conf
+
+TYPE1_RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/n021003l.pfb:print/gsfonts
+
+LIBPAPER_LIB_DEPENDS= libpaper.so:print/libpaper
+LIBPAPER_CONFIGURE_ON=--with-libpaper-library="${LOCALBASE}/lib" \
+ --with-libpaper-includes="${LOCALBASE}/include"
+LIBPAPER_CONFIGURE_OFF=--without-libpaper-library
+
+.if defined(A4)
+CONFIGURE_ARGS+= --enable-a4-paper
+.endif
+
+X11_CONFIGURE_WITH= x
+X11_USES= motif
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|undef USE_COMBO_BOX|define USE_COMBO_BOX 1|' \
+ ${WRKSRC}/xpdf/XPDFViewer.h
+
+post-install:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for file in ANNOUNCE CHANGES README misc/hello.pdf
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
+.endfor
+ @cd ${STAGEDIR}${PREFIX}; \
+ ${LN} -sf libexec/xpdf/xpdf bin/xpdf
+ ${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \
+ ${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf
+
+.include <bsd.port.mk>
diff --git a/graphics/xpdf3/distinfo b/graphics/xpdf3/distinfo
new file mode 100644
index 000000000000..8e5c949df70a
--- /dev/null
+++ b/graphics/xpdf3/distinfo
@@ -0,0 +1,2 @@
+SHA256 (xpdf-3.04.tar.gz) = 11390c74733abcb262aaca4db68710f13ffffd42bfe2a0861a5dfc912b2977e5
+SIZE (xpdf-3.04.tar.gz) = 825519
diff --git a/graphics/xpdf3/files/patch-Makefile.in b/graphics/xpdf3/files/patch-Makefile.in
new file mode 100644
index 000000000000..6df513c49f4d
--- /dev/null
+++ b/graphics/xpdf3/files/patch-Makefile.in
@@ -0,0 +1,32 @@
+--- Makefile.in.orig 2014-05-28 11:50:50.000000000 -0700
++++ Makefile.in 2015-09-17 22:04:25.442510655 -0700
+@@ -89,7 +89,9 @@
+ $(INSTALL_PROGRAM) xpdf/pdfinfo$(EXE) $(DESTDIR)@bindir@/pdfinfo$(EXE)
+ $(INSTALL_PROGRAM) xpdf/pdffonts$(EXE) $(DESTDIR)@bindir@/pdffonts$(EXE)
+ $(INSTALL_PROGRAM) xpdf/pdfdetach$(EXE) $(DESTDIR)@bindir@/pdfdetach$(EXE)
+-@X@ $(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE)
++ $(INSTALL_PROGRAM) xpdf/pdftohtml$(EXE) $(DESTDIR)@bindir@/pdftohtml$(EXE)
++ $(INSTALL_PROGRAM) xpdf/pdftopng$(EXE) $(DESTDIR)@bindir@/pdftopng$(EXE)
++ $(INSTALL_PROGRAM) xpdf/pdftoppm$(EXE) $(DESTDIR)@bindir@/pdftoppm$(EXE)
+ $(INSTALL_PROGRAM) xpdf/pdfimages$(EXE) $(DESTDIR)@bindir@/pdfimages$(EXE)
+ -mkdir -p $(DESTDIR)@mandir@/man1
+ @X@ $(INSTALL_DATA) $(srcdir)/doc/xpdf.1 $(DESTDIR)@mandir@/man1/xpdf.1
+@@ -98,14 +100,16 @@
+ $(INSTALL_DATA) $(srcdir)/doc/pdfinfo.1 $(DESTDIR)@mandir@/man1/pdfinfo.1
+ $(INSTALL_DATA) $(srcdir)/doc/pdffonts.1 $(DESTDIR)@mandir@/man1/pdffonts.1
+ $(INSTALL_DATA) $(srcdir)/doc/pdfdetach.1 $(DESTDIR)@mandir@/man1/pdfdetach.1
+-@X@ $(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1
++ $(INSTALL_DATA) $(srcdir)/doc/pdftohtml.1 $(DESTDIR)@mandir@/man1/pdftohtml.1
++ $(INSTALL_DATA) $(srcdir)/doc/pdftopng.1 $(DESTDIR)@mandir@/man1/pdftopng.1
++ $(INSTALL_DATA) $(srcdir)/doc/pdftoppm.1 $(DESTDIR)@mandir@/man1/pdftoppm.1
+ $(INSTALL_DATA) $(srcdir)/doc/pdfimages.1 $(DESTDIR)@mandir@/man1/pdfimages.1
+ -mkdir -p $(DESTDIR)@mandir@/man5
+ $(INSTALL_DATA) $(srcdir)/doc/xpdfrc.5 $(DESTDIR)@mandir@/man5/xpdfrc.5
+ -mkdir -p $(DESTDIR)@sysconfdir@
+ @if test ! -f $(DESTDIR)@sysconfdir@/xpdfrc; then \
+ echo "$(INSTALL_DATA) $(srcdir)/doc/sample-xpdfrc $(DESTDIR)@sysconfdir@/xpdfrc"; \
+- $(INSTALL_DATA) $(srcdir)/doc/sample-xpdfrc $(DESTDIR)@sysconfdir@/xpdfrc; \
++ $(INSTALL_DATA) $(srcdir)/doc/sample-xpdfrc $(DESTDIR)@sysconfdir@/xpdfrc.sample; \
+ else \
+ echo "# not overwriting the existing $(DESTDIR)@sysconfdir@/xpdfrc"; \
+ fi
diff --git a/graphics/xpdf3/files/patch-splash_Makefile.in b/graphics/xpdf3/files/patch-splash_Makefile.in
new file mode 100644
index 000000000000..280cadcca468
--- /dev/null
+++ b/graphics/xpdf3/files/patch-splash_Makefile.in
@@ -0,0 +1,11 @@
+--- splash/Makefile.in.orig 2014-05-28 11:50:50.000000000 -0700
++++ splash/Makefile.in 2014-12-20 18:20:37.776117864 -0800
+@@ -16,7 +16,7 @@
+ FOFISRCDIR = $(srcdir)/../fofi
+ FOFILIBDIR = ../fofi
+
+-CXXFLAGS = @CXXFLAGS@ @DEFS@ -I.. -I$(srcdir)/.. -I$(GOOSRCDIR) -I$(FOFISRCDIR) -I$(srcdir) @freetype2_CFLAGS@
++CXXFLAGS = @CXXFLAGS@ @DEFS@ -I.. -I$(srcdir)/.. -I$(GOOSRCDIR) -I$(FOFISRCDIR) -I$(srcdir) @freetype2_CFLAGS@ @X_CFLAGS@
+
+ CXX = @CXX@
+ AR = @AR@
diff --git a/graphics/xpdf3/files/patch-splash_SplashFTFont.cc b/graphics/xpdf3/files/patch-splash_SplashFTFont.cc
new file mode 100644
index 000000000000..48049df5edc6
--- /dev/null
+++ b/graphics/xpdf3/files/patch-splash_SplashFTFont.cc
@@ -0,0 +1,11 @@
+--- splash/SplashFTFont.cc.orig Tue Feb 27 14:05:52 2007
++++ splash/SplashFTFont.cc
+@@ -229,7 +229,7 @@
+ };
+
+ SplashPath *SplashFTFont::getGlyphPath(int c) {
+- static FT_Outline_Funcs outlineFuncs = {
++ static const FT_Outline_Funcs outlineFuncs = {
+ #if FREETYPE_MINOR <= 1
+ (int (*)(FT_Vector *, void *))&glyphPathMoveTo,
+ (int (*)(FT_Vector *, void *))&glyphPathLineTo,
diff --git a/graphics/xpdf3/files/patch-xfont b/graphics/xpdf3/files/patch-xfont
new file mode 100644
index 000000000000..57a127450f3a
--- /dev/null
+++ b/graphics/xpdf3/files/patch-xfont
@@ -0,0 +1,11 @@
+--- xpdf/XPDFViewer.cc.orig Tue Feb 27 14:05:52 2007
++++ xpdf/XPDFViewer.cc
+@@ -2791,7 +2791,7 @@
+ aboutBigFont =
+ createFontList("-*-times-bold-i-normal--20-*-*-*-*-*-iso8859-1");
+ aboutVersionFont =
+- createFontList("-*-times-medium-r-normal--16-*-*-*-*-*-iso8859-1");
++ createFontList("-*-times-medium-r-normal--14-*-*-*-*-*-iso8859-1");
+ aboutFixedFont =
+ createFontList("-*-courier-medium-r-normal--12-*-*-*-*-*-iso8859-1");
+
diff --git a/graphics/xpdf3/files/patch-xpdf_GlobalParams.cc b/graphics/xpdf3/files/patch-xpdf_GlobalParams.cc
new file mode 100644
index 000000000000..ceab23673ba1
--- /dev/null
+++ b/graphics/xpdf3/files/patch-xpdf_GlobalParams.cc
@@ -0,0 +1,13 @@
+--- xpdf/GlobalParams.cc.orig 2007-02-28 00:05:52.000000000 +0200
++++ xpdf/GlobalParams.cc 2008-04-04 15:44:24.000000000 +0300
+@@ -1566,6 +1566,10 @@
+ *code = xpdfKeyCodeUp;
+ } else if (!strcmp(p0, "down")) {
+ *code = xpdfKeyCodeDown;
++ } else if (!strcmp(p0, "numpad-plus")) {
++ *code = xpdfKeyPlus;
++ } else if (!strcmp(p0, "numpad-minus")) {
++ *code = xpdfKeyMinus;
+ } else if (p0[0] == 'f' && p0[1] >= '1' && p0[1] <= '9' && !p0[2]) {
+ *code = xpdfKeyCodeF1 + (p0[1] - '1');
+ } else if (p0[0] == 'f' &&
diff --git a/graphics/xpdf3/files/patch-xpdf_GlobalParams.h b/graphics/xpdf3/files/patch-xpdf_GlobalParams.h
new file mode 100644
index 000000000000..9d6349e4d487
--- /dev/null
+++ b/graphics/xpdf3/files/patch-xpdf_GlobalParams.h
@@ -0,0 +1,10 @@
+Index: xpdf/GlobalParams.h
+@@ -132,6 +132,8 @@
+ #define xpdfKeyCodeDown 0x100d
+ #define xpdfKeyCodeF1 0x1100
+ #define xpdfKeyCodeF35 0x1122
++#define xpdfKeyPlus 0x1200
++#define xpdfKeyMinus 0x1201
+ #define xpdfKeyCodeMousePress1 0x2001
+ #define xpdfKeyCodeMousePress2 0x2002
+ #define xpdfKeyCodeMousePress3 0x2003
diff --git a/graphics/xpdf3/files/patch-xpdf_Stream.cc b/graphics/xpdf3/files/patch-xpdf_Stream.cc
new file mode 100644
index 000000000000..0804c26b55bc
--- /dev/null
+++ b/graphics/xpdf3/files/patch-xpdf_Stream.cc
@@ -0,0 +1,18 @@
+--- xpdf/Stream.cc.orig 2007-09-03 00:17:03.000000000 +0900
++++ xpdf/Stream.cc 2007-09-03 00:17:45.000000000 +0900
+@@ -4479,6 +4479,7 @@
+ n = 3;
+ t = (c0 << 24) | (c1 << 16) | (c2 << 8);
+ }
++ t &= 0xffffffff;
+ for (i = 4; i >= 0; --i) {
+ buf1[i] = (char)(t % 85 + 0x21);
+ t /= 85;
+@@ -4496,6 +4497,7 @@
+ eof = gTrue;
+ } else {
+ t = (c0 << 24) | (c1 << 16) | (c2 << 8) | c3;
++ t &= 0xffffffff;
+ if (t == 0) {
+ *bufEnd++ = 'z';
+ if (++lineLen == 65) {
diff --git a/graphics/xpdf3/files/patch-xpdf_XPDFViewer.cc b/graphics/xpdf3/files/patch-xpdf_XPDFViewer.cc
new file mode 100644
index 000000000000..65c3faca7da6
--- /dev/null
+++ b/graphics/xpdf3/files/patch-xpdf_XPDFViewer.cc
@@ -0,0 +1,13 @@
+--- xpdf/XPDFViewer.cc.orig 2008-04-04 15:36:27.000000000 +0300
++++ xpdf/XPDFViewer.cc 2008-04-04 15:41:05.000000000 +0300
+@@ -569,6 +569,10 @@
+ keyCode = xpdfKeyCodeDown;
+ } else if (key >= XK_F1 && key <= XK_F35) {
+ keyCode = xpdfKeyCodeF1 + (key - XK_F1);
++ } else if (key == XK_KP_Add) {
++ keyCode = xpdfKeyPlus;
++ } else if (key == XK_KP_Subtract) {
++ keyCode = xpdfKeyMinus;
+ } else {
+ return;
+ }
diff --git a/graphics/xpdf3/files/patch-xpdf__Makefile.in b/graphics/xpdf3/files/patch-xpdf__Makefile.in
new file mode 100644
index 000000000000..756c8da6e991
--- /dev/null
+++ b/graphics/xpdf3/files/patch-xpdf__Makefile.in
@@ -0,0 +1,12 @@
+--- xpdf/Makefile.in.orig 2014-05-28 11:50:50.000000000 -0700
++++ xpdf/Makefile.in 2015-01-20 11:19:11.373669249 -0800
+@@ -122,7 +122,8 @@
+ pdftopng$(EXE) pdfimages$(EXE)
+
+ all-no-x: pdftops$(EXE) pdftotext$(EXE) pdftohtml$(EXE) pdfinfo$(EXE) \
+- pdffonts$(EXE) pdfdetach$(EXE) pdfimages$(EXE)
++ pdffonts$(EXE) pdfdetach$(EXE) pdftoppm$(EXE) pdftopng$(EXE) \
++ pdfimages$(EXE)
+
+ #------------------------------------------------------------------------
+
diff --git a/graphics/xpdf3/files/xpdf-man.conf.in b/graphics/xpdf3/files/xpdf-man.conf.in
new file mode 100644
index 000000000000..a7e2ad6b6dca
--- /dev/null
+++ b/graphics/xpdf3/files/xpdf-man.conf.in
@@ -0,0 +1 @@
+MANPATH %%PREFIX%%/share/xpdf/man
diff --git a/graphics/xpdf3/pkg-descr b/graphics/xpdf3/pkg-descr
new file mode 100644
index 000000000000..b6a0b3056a0b
--- /dev/null
+++ b/graphics/xpdf3/pkg-descr
@@ -0,0 +1,8 @@
+Xpdf is a viewer for Portable Document Format (PDF) files. These are
+also sometimes also called 'Acrobat' files, from the name of Adobe's
+PDF software.
+
+It can also convert PDF input to ps, text, and info formats; and
+split out fonts and images.
+
+WWW: http://www.foolabs.com/xpdf/
diff --git a/graphics/xpdf3/pkg-message b/graphics/xpdf3/pkg-message
new file mode 100644
index 000000000000..e8baf67674ee
--- /dev/null
+++ b/graphics/xpdf3/pkg-message
@@ -0,0 +1,8 @@
+Please note: The binaries in this package -- pdffonts, pdfimages, pdfinfo,
+pdfdetach, pdftohtml, pdftopng, pdftoppm, pdftops, pdftotext -- are
+installed in ${LOCALBASE}/libexec/xpdf. The reason for this is to not
+conflict with the poppler-utils package, which is a prerequisite of many
+other packages. If you need to use any of these utilites,
+
+a) create symlinks in ${LOCALBASE}/bin or some other directory in $PATH, or
+b) install graphics/poppler-utils.
diff --git a/graphics/xpdf3/pkg-plist b/graphics/xpdf3/pkg-plist
new file mode 100644
index 000000000000..724f3f9360bc
--- /dev/null
+++ b/graphics/xpdf3/pkg-plist
@@ -0,0 +1,28 @@
+libexec/xpdf/pdffonts
+libexec/xpdf/pdfimages
+libexec/xpdf/pdfinfo
+libexec/xpdf/pdfdetach
+libexec/xpdf/pdftohtml
+libexec/xpdf/pdftopng
+libexec/xpdf/pdftoppm
+libexec/xpdf/pdftops
+libexec/xpdf/pdftotext
+%%X11%%libexec/xpdf/xpdf
+%%X11%%bin/xpdf
+etc/man.d/xpdf.conf
+%%DATADIR%%/man/man1/pdfdetach.1.gz
+%%DATADIR%%/man/man1/pdffonts.1.gz
+%%DATADIR%%/man/man1/pdfimages.1.gz
+%%DATADIR%%/man/man1/pdfinfo.1.gz
+%%DATADIR%%/man/man1/pdftohtml.1.gz
+%%DATADIR%%/man/man1/pdftopng.1.gz
+%%DATADIR%%/man/man1/pdftoppm.1.gz
+%%DATADIR%%/man/man1/pdftops.1.gz
+%%DATADIR%%/man/man1/pdftotext.1.gz
+%%X11%%%%DATADIR%%/man/man1/xpdf.1.gz
+%%DATADIR%%/man/man5/xpdfrc.5.gz
+%%PORTDOCS%%%%DOCSDIR%%/ANNOUNCE
+%%PORTDOCS%%%%DOCSDIR%%/CHANGES
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/hello.pdf
+@sample etc/xpdfrc.sample