summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2006-02-03 23:29:06 +0000
committerStefan Schweizer <genstef@gentoo.org>2006-02-03 23:29:06 +0000
commitbf1c52798d164537bb1e4d52dc2997ef7f64e235 (patch)
tree17f4f8cda42fa768c27a7c8582144f19d9ea6152 /app-text/poppler
parentFix digest with bad RMD160 from broken pycrypto on ia64 (diff)
downloadhistorical-bf1c52798d164537bb1e4d52dc2997ef7f64e235.tar.gz
historical-bf1c52798d164537bb1e4d52dc2997ef7f64e235.tar.bz2
historical-bf1c52798d164537bb1e4d52dc2997ef7f64e235.zip
Add pdftoppm to poppler
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'app-text/poppler')
-rw-r--r--app-text/poppler/ChangeLog8
-rw-r--r--app-text/poppler/Manifest15
-rw-r--r--app-text/poppler/files/digest-poppler-0.5.0-r43
-rw-r--r--app-text/poppler/files/poppler-0.5.0-pdftoppm.patch420
-rw-r--r--app-text/poppler/poppler-0.5.0-r4.ebuild61
5 files changed, 503 insertions, 4 deletions
diff --git a/app-text/poppler/ChangeLog b/app-text/poppler/ChangeLog
index 668e718bc4b5..90c97486976c 100644
--- a/app-text/poppler/ChangeLog
+++ b/app-text/poppler/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-text/poppler
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/ChangeLog,v 1.52 2006/02/03 18:58:27 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/ChangeLog,v 1.53 2006/02/03 23:29:06 genstef Exp $
+
+*poppler-0.5.0-r4 (03 Feb 2006)
+
+ 03 Feb 2006; Stefan Schweizer <genstef@gentoo.org>
+ +files/poppler-0.5.0-pdftoppm.patch, +poppler-0.5.0-r4.ebuild:
+ Add pdftoppm to poppler
*poppler-0.5.0-r3 (03 Feb 2006)
diff --git a/app-text/poppler/Manifest b/app-text/poppler/Manifest
index 2b18a03991f6..138f128fa3db 100644
--- a/app-text/poppler/Manifest
+++ b/app-text/poppler/Manifest
@@ -1,6 +1,6 @@
-MD5 c25a7c296b5f8bec3e0062d31620fc10 ChangeLog 7423
-RMD160 611bca658384241e8f4fe4d9d552f02fae9edec7 ChangeLog 7423
-SHA256 0afbc19aded1707992cab425852c20e464a47d08ea570887ddf19ba5035a25da ChangeLog 7423
+MD5 14385874e92057274e6819bed74286b3 ChangeLog 7601
+RMD160 501217a43455b3269b9c0b7dfb7bdbf18c7b3b20 ChangeLog 7601
+SHA256 08c7dcfd52242e6244984d565d0838d87aef35bd42a9f89b19c405f85d1ed15d ChangeLog 7601
MD5 9fcae20e4d0c670e6f53602e516991aa files/digest-poppler-0.3.0 65
RMD160 b2919594182fe8ee1b221c29f65eaf2664b79924 files/digest-poppler-0.3.0 65
SHA256 67b1dde2e66bd05a2e886755f4034b5d745566efa1e1798930490a33d6d6998f files/digest-poppler-0.3.0 65
@@ -25,6 +25,9 @@ SHA256 51bb8ae71c9ac143ae67a7cecb81aa02fdf8798baf3bc90ebb499692ba5d3ea7 files/di
MD5 e876193dfd11bf13602043abf0ecec21 files/digest-poppler-0.5.0-r3 241
RMD160 4ac5024c341597422cfd4e2a1625b6ff9f1b4e6f files/digest-poppler-0.5.0-r3 241
SHA256 51bb8ae71c9ac143ae67a7cecb81aa02fdf8798baf3bc90ebb499692ba5d3ea7 files/digest-poppler-0.5.0-r3 241
+MD5 e876193dfd11bf13602043abf0ecec21 files/digest-poppler-0.5.0-r4 241
+RMD160 4ac5024c341597422cfd4e2a1625b6ff9f1b4e6f files/digest-poppler-0.5.0-r4 241
+SHA256 51bb8ae71c9ac143ae67a7cecb81aa02fdf8798baf3bc90ebb499692ba5d3ea7 files/digest-poppler-0.5.0-r4 241
MD5 3342aad1175b4b522f84e453999fbb05 files/poppler-0.4.1-cairo-ft.patch 470
RMD160 f755975637edd27fa4d82c43d2789f489a45b8c8 files/poppler-0.4.1-cairo-ft.patch 470
SHA256 e9ca00d0a991674199e5214556567e5ad895295bd63d72ce24bf0a6c3b9abb4e files/poppler-0.4.1-cairo-ft.patch 470
@@ -52,6 +55,9 @@ SHA256 bcb87b10de3e045963ae792527331eec8e7b509babcc8edd34362bc0ca33f7c7 files/po
MD5 bab11de45dcec134e17267935dc0e484 files/poppler-0.5.0-fontimprove.patch 39288
RMD160 6c22b66df55c7f017a151bca76429e0aea099621 files/poppler-0.5.0-fontimprove.patch 39288
SHA256 bfe9ff2037e12b4e212888ffec68338b030e812d0c4436b5fbcec22c877667f0 files/poppler-0.5.0-fontimprove.patch 39288
+MD5 19ede1dde409a9d6df6f6c29a0383090 files/poppler-0.5.0-pdftoppm.patch 12753
+RMD160 fcfa6a02d79c838de72f98e1eb23d64f24fe7d49 files/poppler-0.5.0-pdftoppm.patch 12753
+SHA256 abe22e02f81b01daf32b56c636d5f9403117de0c14e81c5b62e6a5733da842d4 files/poppler-0.5.0-pdftoppm.patch 12753
MD5 c8444c59ca7271ab6a5fc67dc0dd539a files/poppler-0.5.0-splash-overflow.patch 1383
RMD160 9a203c0be60621d5f5a6e9d0df011e1646da14f5 files/poppler-0.5.0-splash-overflow.patch 1383
SHA256 69eec22b540bccfc988b26ad3bf7d29039ff04e2dbc19556281342438604f142 files/poppler-0.5.0-splash-overflow.patch 1383
@@ -88,6 +94,9 @@ SHA256 3fd32cbbe66dbbf40b0703414184ce5db700fbef66fae70daf3db70aec552e03 poppler-
MD5 f171d6dcea5aef21c24bd801e5155610 poppler-0.5.0-r3.ebuild 1691
RMD160 c7c69ff6158eb23283585723eb53e0be08c6e71f poppler-0.5.0-r3.ebuild 1691
SHA256 7f8fda4905219d37c1ad56cecab8c1b69a966e76a8c92f4af8d4582ba8dd042a poppler-0.5.0-r3.ebuild 1691
+MD5 1cd8a2c1fdc57aac275a409f3ca61b69 poppler-0.5.0-r4.ebuild 1731
+RMD160 7030e58e6673b387894b291e7801fcfdb2b2f3d6 poppler-0.5.0-r4.ebuild 1731
+SHA256 accd76806d8cb969e9637747dbda3e0afd539f590cf6863180e8f0ce5a3a8225 poppler-0.5.0-r4.ebuild 1731
MD5 43a6538f57eb03f10b4edb00b6baf1b5 poppler-0.5.0.ebuild 1480
RMD160 edd74afce12e055ba3bc42d9ea52390dc4c4f3e8 poppler-0.5.0.ebuild 1480
SHA256 10f88b3040818aecc270089751ec99ae41ab825d7a70a543644a56164bbefb31 poppler-0.5.0.ebuild 1480
diff --git a/app-text/poppler/files/digest-poppler-0.5.0-r4 b/app-text/poppler/files/digest-poppler-0.5.0-r4
new file mode 100644
index 000000000000..ce2558469e43
--- /dev/null
+++ b/app-text/poppler/files/digest-poppler-0.5.0-r4
@@ -0,0 +1,3 @@
+MD5 c84c1be19f43e4a84872ff08234c1960 poppler-0.5.0.tar.gz 935312
+RMD160 a5bad2dd16a7b99b931c15757ff33591f2c4307a poppler-0.5.0.tar.gz 935312
+SHA256 554fad3767c23c96ad886fe0220073133016d64f416273c26aea43ea80d4563b poppler-0.5.0.tar.gz 935312
diff --git a/app-text/poppler/files/poppler-0.5.0-pdftoppm.patch b/app-text/poppler/files/poppler-0.5.0-pdftoppm.patch
new file mode 100644
index 000000000000..2d423bf45b1a
--- /dev/null
+++ b/app-text/poppler/files/poppler-0.5.0-pdftoppm.patch
@@ -0,0 +1,420 @@
+diff -Naupr poppler-0.5.0/utils/Makefile.am poppler/utils/Makefile.am
+--- poppler-0.5.0/utils/Makefile.am 2006-01-03 15:55:44.000000000 +0100
++++ poppler/utils/Makefile.am 2006-02-03 23:42:51.000000000 +0100
+@@ -13,7 +13,8 @@ bin_PROGRAMS = \
+ pdfinfo \
+ pdftops \
+ pdftotext \
+- pdftohtml
++ pdftohtml \
++ pdftoppm
+
+ dist_man1_MANS = \
+ pdffonts.1 \
+@@ -21,7 +22,8 @@ dist_man1_MANS = \
+ pdfinfo.1 \
+ pdftops.1 \
+ pdftotext.1 \
+- pdftohtml.1
++ pdftohtml.1 \
++ pdftoppm.1
+
+ common = parseargs.c parseargs.h
+
+@@ -56,3 +58,7 @@ pdftohtml_SOURCES = \
+ HtmlOutputDev.cc \
+ HtmlOutputDev.h \
+ $(common)
++
++pdftoppm_SOURCES = \
++ pdftoppm.cc \
++ $(common)
+diff -Naupr poppler-0.5.0/utils/Makefile.in poppler/utils/Makefile.in
+--- poppler-0.5.0/utils/Makefile.in 2006-01-10 18:54:56.000000000 +0100
++++ poppler/utils/Makefile.in 2006-02-03 23:43:29.000000000 +0100
+@@ -37,7 +37,8 @@ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+ bin_PROGRAMS = pdffonts$(EXEEXT) pdfimages$(EXEEXT) pdfinfo$(EXEEXT) \
+- pdftops$(EXEEXT) pdftotext$(EXEEXT) pdftohtml$(EXEEXT)
++ pdftops$(EXEEXT) pdftotext$(EXEEXT) pdftohtml$(EXEEXT) \
++ pdftoppm$(EXEEXT)
+ subdir = utils
+ DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+@@ -73,6 +74,10 @@ am_pdftohtml_OBJECTS = pdftohtml.$(OBJEX
+ pdftohtml_OBJECTS = $(am_pdftohtml_OBJECTS)
+ pdftohtml_LDADD = $(LDADD)
+ pdftohtml_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la
++am_pdftoppm_OBJECTS = pdftoppm.$(OBJEXT) $(am__objects_1)
++pdftoppm_OBJECTS = $(am_pdftoppm_OBJECTS)
++pdftoppm_LDADD = $(LDADD)
++pdftoppm_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la
+ am_pdftops_OBJECTS = pdftops.$(OBJEXT) $(am__objects_1)
+ pdftops_OBJECTS = $(am_pdftops_OBJECTS)
+ pdftops_LDADD = $(LDADD)
+@@ -101,10 +106,11 @@ CXXLD = $(CXX)
+ CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) $(pdfinfo_SOURCES) \
+- $(pdftohtml_SOURCES) $(pdftops_SOURCES) $(pdftotext_SOURCES)
+-DIST_SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) \
+- $(pdfinfo_SOURCES) $(pdftohtml_SOURCES) $(pdftops_SOURCES) \
++ $(pdftohtml_SOURCES) $(pdftoppm_SOURCES) $(pdftops_SOURCES) \
+ $(pdftotext_SOURCES)
++DIST_SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) \
++ $(pdfinfo_SOURCES) $(pdftohtml_SOURCES) $(pdftoppm_SOURCES) \
++ $(pdftops_SOURCES) $(pdftotext_SOURCES)
+ man1dir = $(mandir)/man1
+ NROFF = nroff
+ MANS = $(dist_man1_MANS)
+@@ -278,7 +284,8 @@ dist_man1_MANS = \
+ pdfinfo.1 \
+ pdftops.1 \
+ pdftotext.1 \
+- pdftohtml.1
++ pdftohtml.1 \
++ pdftoppm.1
+
+ common = parseargs.c parseargs.h
+ pdffonts_SOURCES = \
+@@ -313,6 +320,10 @@ pdftohtml_SOURCES = \
+ HtmlOutputDev.h \
+ $(common)
+
++pdftoppm_SOURCES = \
++ pdftoppm.cc \
++ $(common)
++
+ all: all-am
+
+ .SUFFIXES:
+@@ -386,6 +397,9 @@ pdfinfo$(EXEEXT): $(pdfinfo_OBJECTS) $(p
+ pdftohtml$(EXEEXT): $(pdftohtml_OBJECTS) $(pdftohtml_DEPENDENCIES)
+ @rm -f pdftohtml$(EXEEXT)
+ $(CXXLINK) $(pdftohtml_LDFLAGS) $(pdftohtml_OBJECTS) $(pdftohtml_LDADD) $(LIBS)
++pdftoppm$(EXEEXT): $(pdftoppm_OBJECTS) $(pdftoppm_DEPENDENCIES)
++ @rm -f pdftoppm$(EXEEXT)
++ $(CXXLINK) $(pdftoppm_LDFLAGS) $(pdftoppm_OBJECTS) $(pdftoppm_LDADD) $(LIBS)
+ pdftops$(EXEEXT): $(pdftops_OBJECTS) $(pdftops_DEPENDENCIES)
+ @rm -f pdftops$(EXEEXT)
+ $(CXXLINK) $(pdftops_LDFLAGS) $(pdftops_OBJECTS) $(pdftops_LDADD) $(LIBS)
+@@ -408,6 +422,7 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfimages.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfinfo.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftoppm.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftops.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftotext.Po@am__quote@
+
+diff -Naupr poppler-0.5.0/utils/pdftoppm.1 poppler/utils/pdftoppm.1
+--- poppler-0.5.0/utils/pdftoppm.1 1970-01-01 01:00:00.000000000 +0100
++++ poppler/utils/pdftoppm.1 2005-12-12 21:15:11.000000000 +0100
+@@ -0,0 +1,113 @@
++.\" Copyright 2004 Glyph & Cog, LLC
++.TH pdftoppm 1 "22 January 2004"
++.SH NAME
++pdftoppm \- Portable Document Format (PDF) to Portable Pixmap (PPM)
++converter (version 3.00)
++.SH SYNOPSIS
++.B pdftoppm
++[options]
++.I PDF-file PPM-root
++.SH DESCRIPTION
++.B Pdftoppm
++converts Portable Document Format (PDF) files to color image files in
++Portable Pixmap (PPM) format, grayscale image files in Portable
++Graymap (PGM) format, or monochrome image files in Portable Bitmap
++(PBM) format.
++.PP
++Pdftoppm reads the PDF file,
++.IR PDF-file ,
++and writes one PPM file for each page,
++.IR PPM-root - nnnnnn .ppm,
++where
++.I nnnnnn
++is the page number.
++.SH CONFIGURATION FILE
++Pdftoppm reads a configuration file at startup. It first tries to
++find the user's private config file, ~/.xpdfrc. If that doesn't
++exist, it looks for a system-wide config file, /etc/xpdf/xpdfrc. See the
++.BR xpdfrc (5)
++man page for details.
++.SH OPTIONS
++Many of the following options can be set with configuration file
++commands. These are listed in square brackets with the description of
++the corresponding command line option.
++.TP
++.BI \-f " number"
++Specifies the first page to convert.
++.TP
++.BI \-l " number"
++Specifies the last page to convert.
++.TP
++.BI \-r " number"
++Specifies the resolution, in DPI. The default is 150 DPI.
++.TP
++.B \-mono
++Generate a monochrome PBM file (instead of a color PPM file).
++.TP
++.B \-gray
++Generate a grayscale PGM file (instead of a color PPM file).
++.TP
++.BI \-t1lib " yes | no"
++Enable or disable t1lib (a Type 1 font rasterizer). This defaults to
++"yes".
++.RB "[config file: " enableT1lib ]
++.TP
++.BI \-freetype " yes | no"
++Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
++This defaults to "yes".
++.RB "[config file: " enableFreeType ]
++.TP
++.BI \-aa " yes | no"
++Enable or disable font anti-aliasing. This defaults to "yes".
++.RB "[config file: " antialias ]
++.TP
++.BI \-opw " password"
++Specify the owner password for the PDF file. Providing this will
++bypass all security restrictions.
++.TP
++.BI \-upw " password"
++Specify the user password for the PDF file.
++.TP
++.B \-q
++Don't print any messages or errors.
++.RB "[config file: " errQuiet ]
++.TP
++.B \-v
++Print copyright and version information.
++.TP
++.B \-h
++Print usage information.
++.RB ( \-help
++and
++.B \-\-help
++are equivalent.)
++.SH EXIT CODES
++The Xpdf tools use the following exit codes:
++.TP
++0
++No error.
++.TP
++1
++Error opening a PDF file.
++.TP
++2
++Error opening an output file.
++.TP
++3
++Error related to PDF permissions.
++.TP
++99
++Other error.
++.SH AUTHOR
++The pdftoppm software and documentation are copyright 1996-2004 Glyph
++& Cog, LLC.
++.SH "SEE ALSO"
++.BR xpdf (1),
++.BR pdftops (1),
++.BR pdftotext (1),
++.BR pdfinfo (1),
++.BR pdffonts (1),
++.BR pdfimages (1),
++.BR xpdfrc (5)
++.br
++.B http://www.foolabs.com/xpdf/
+diff -Naupr poppler-0.5.0/utils/pdftoppm.cc poppler/utils/pdftoppm.cc
+--- poppler-0.5.0/utils/pdftoppm.cc 1970-01-01 01:00:00.000000000 +0100
++++ poppler/utils/pdftoppm.cc 2006-02-03 23:57:43.000000000 +0100
+@@ -0,0 +1,190 @@
++//========================================================================
++//
++// pdftoppm.cc
++//
++// Copyright 2003 Glyph & Cog, LLC
++//
++//========================================================================
++
++#include "config.h"
++#include <poppler-config.h>
++#include <stdio.h>
++#include "parseargs.h"
++#include "goo/gmem.h"
++#include "goo/GooString.h"
++#include "GlobalParams.h"
++#include "Object.h"
++#include "PDFDoc.h"
++#include "splash/SplashBitmap.h"
++#include "splash/Splash.h"
++#include "SplashOutputDev.h"
++
++static int firstPage = 1;
++static int lastPage = 0;
++static int resolution = 150;
++static GBool mono = gFalse;
++static GBool gray = gFalse;
++static char enableT1libStr[16] = "";
++static char enableFreeTypeStr[16] = "";
++static char antialiasStr[16] = "";
++static char ownerPassword[33] = "";
++static char userPassword[33] = "";
++static GBool quiet = gFalse;
++static char cfgFileName[256] = "";
++static GBool printVersion = gFalse;
++static GBool printHelp = gFalse;
++
++static ArgDesc argDesc[] = {
++ {"-f", argInt, &firstPage, 0,
++ "first page to print"},
++ {"-l", argInt, &lastPage, 0,
++ "last page to print"},
++ {"-r", argInt, &resolution, 0,
++ "resolution, in DPI (default is 150)"},
++ {"-mono", argFlag, &mono, 0,
++ "generate a monochrome PBM file"},
++ {"-gray", argFlag, &gray, 0,
++ "generate a grayscale PGM file"},
++#if HAVE_T1LIB_H
++ {"-t1lib", argString, enableT1libStr, sizeof(enableT1libStr),
++ "enable t1lib font rasterizer: yes, no"},
++#endif
++#if HAVE_FREETYPE_FREETYPE_H | HAVE_FREETYPE_H
++ {"-freetype", argString, enableFreeTypeStr, sizeof(enableFreeTypeStr),
++ "enable FreeType font rasterizer: yes, no"},
++#endif
++ {"-aa", argString, antialiasStr, sizeof(antialiasStr),
++ "enable font anti-aliasing: yes, no"},
++ {"-opw", argString, ownerPassword, sizeof(ownerPassword),
++ "owner password (for encrypted files)"},
++ {"-upw", argString, userPassword, sizeof(userPassword),
++ "user password (for encrypted files)"},
++ {"-q", argFlag, &quiet, 0,
++ "don't print any messages or errors"},
++ {"-cfg", argString, cfgFileName, sizeof(cfgFileName),
++ "configuration file to use in place of .xpdfrc"},
++ {"-v", argFlag, &printVersion, 0,
++ "print copyright and version info"},
++ {"-h", argFlag, &printHelp, 0,
++ "print usage information"},
++ {"-help", argFlag, &printHelp, 0,
++ "print usage information"},
++ {"--help", argFlag, &printHelp, 0,
++ "print usage information"},
++ {"-?", argFlag, &printHelp, 0,
++ "print usage information"},
++ {NULL}
++};
++
++int main(int argc, char *argv[]) {
++ PDFDoc *doc;
++ GooString *fileName;
++ char *ppmRoot;
++ char ppmFile[512];
++ GooString *ownerPW, *userPW;
++ SplashColor paperColor;
++ SplashOutputDev *splashOut;
++ GBool ok;
++ int exitCode;
++ int pg;
++
++ exitCode = 99;
++
++ // parse args
++ ok = parseArgs(argDesc, &argc, argv);
++ if (mono && gray) {
++ ok = gFalse;
++ }
++ if (!ok || argc != 3 || printVersion || printHelp) {
++ fprintf(stderr, "pdftoppm version %s\n", xpdfVersion);
++ fprintf(stderr, "%s\n", xpdfCopyright);
++ if (!printVersion) {
++ printUsage("pdftoppm", "<PDF-file> <PPM-root>", argDesc);
++ }
++ goto err0;
++ }
++ fileName = new GooString(argv[1]);
++ ppmRoot = argv[2];
++
++ // read config file
++ globalParams = new GlobalParams(cfgFileName);
++ if (enableT1libStr[0]) {
++ if (!globalParams->setEnableT1lib(enableT1libStr)) {
++ fprintf(stderr, "Bad '-t1lib' value on command line\n");
++ }
++ }
++ if (enableFreeTypeStr[0]) {
++ if (!globalParams->setEnableFreeType(enableFreeTypeStr)) {
++ fprintf(stderr, "Bad '-freetype' value on command line\n");
++ }
++ }
++ if (antialiasStr[0]) {
++ if (!globalParams->setAntialias(antialiasStr)) {
++ fprintf(stderr, "Bad '-aa' value on command line\n");
++ }
++ }
++ if (quiet) {
++ globalParams->setErrQuiet(quiet);
++ }
++
++ // open PDF file
++ if (ownerPassword[0]) {
++ ownerPW = new GooString(ownerPassword);
++ } else {
++ ownerPW = NULL;
++ }
++ if (userPassword[0]) {
++ userPW = new GooString(userPassword);
++ } else {
++ userPW = NULL;
++ }
++ doc = new PDFDoc(fileName, ownerPW, userPW);
++ if (userPW) {
++ delete userPW;
++ }
++ if (ownerPW) {
++ delete ownerPW;
++ }
++ if (!doc->isOk()) {
++ exitCode = 1;
++ goto err1;
++ }
++
++ // get page range
++ if (firstPage < 1)
++ firstPage = 1;
++ if (lastPage < 1 || lastPage > doc->getNumPages())
++ lastPage = doc->getNumPages();
++
++ // write PPM files
++ paperColor[0] = 255;
++ paperColor[1] = 255;
++ paperColor[2] = 255;
++ splashOut = new SplashOutputDev(mono ? splashModeMono1 :
++ gray ? splashModeMono8 :
++ splashModeRGB8, 4,
++ gFalse, paperColor);
++ splashOut->startDoc(doc->getXRef());
++ for (pg = firstPage; pg <= lastPage; ++pg) {
++ doc->displayPage(splashOut, pg, resolution, resolution, 0, gTrue, gFalse, gFalse);
++ sprintf(ppmFile, "%.*s-%06d.%s",
++ (int)sizeof(ppmFile) - 32, ppmRoot, pg,
++ mono ? "pbm" : gray ? "pgm" : "ppm");
++ splashOut->getBitmap()->writePNMFile(ppmFile);
++ }
++ delete splashOut;
++
++ exitCode = 0;
++
++ // clean up
++ err1:
++ delete doc;
++ delete globalParams;
++ err0:
++
++ // check for memory leaks
++ Object::memCheck(stderr);
++ gMemReport(stderr);
++
++ return exitCode;
++}
diff --git a/app-text/poppler/poppler-0.5.0-r4.ebuild b/app-text/poppler/poppler-0.5.0-r4.ebuild
new file mode 100644
index 000000000000..a3beaac906fb
--- /dev/null
+++ b/app-text/poppler/poppler-0.5.0-r4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/poppler/poppler-0.5.0-r4.ebuild,v 1.1 2006/02/03 23:29:06 genstef Exp $
+
+inherit autotools eutils
+
+DESCRIPTION="Poppler is a PDF rendering library based on the xpdf-3.0 code base."
+HOMEPAGE="http://poppler.freedesktop.org"
+SRC_URI="http://poppler.freedesktop.org/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="jpeg zlib cairo"
+
+RDEPEND=">=media-libs/freetype-2.1.8
+ media-libs/fontconfig
+ cairo? ( >=x11-libs/cairo-0.5 )
+ jpeg? ( >=media-libs/jpeg-6b )
+ zlib? ( sys-libs/zlib )
+ !app-text/pdftohtml
+ !<app-text/xpdf-3.01-r4
+ virtual/ghostscript"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ >=sys-devel/automake-1.9.6"
+
+src_unpack(){
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${P}-cairo-ft.patch
+ epatch ${FILESDIR}/${PN}-0.4.4-bug117481.patch
+ epatch ${FILESDIR}/${PN}-0.4.3-pdf2xml.patch
+ epatch ${FILESDIR}/${PN}-0.4.4-cairo-lines.patch
+ # bug #119898
+ epatch ${FILESDIR}/${P}-try-all-fonts.patch
+ epatch ${FILESDIR}/${P}-splash-overflow.patch
+ epatch ${FILESDIR}/${P}-fontimprove.patch
+ epatch ${FILESDIR}/${P}-pdftoppm.patch
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_compile() {
+ econf --disable-poppler-qt4 \
+ --disable-poppler-glib \
+ --disable-poppler-qt \
+ --disable-gtk-test \
+ --enable-opi \
+ --enable-xpdf-headers \
+ $(use_enable cairo cairo-output) \
+ $(use_enable jpeg libjpeg) \
+ $(use_enable zlib) \
+ || die "configuration failed"
+ emake || die "compilation failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+ dodoc README AUTHORS ChangeLog NEWS README-XPDF TODO pdf2xml.dtd
+}