My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
BuildDepends  
Packages required to build pdf2djvu.
Featured, Phase-Deploy
Updated Jun 12, 2010 by jwilk@jwilk.net

DjVuLibre

DjVuLibre is an implementation of DjVu, including viewers, browser plugins, decoders, simple encoders, and utilities.

Compatibility

DjVuLibre 3.5.21 or newer is required. For Debian/Ubuntu, DjVuLibre 3.5.20-5 is sufficient.

poppler

Poppler is a PDF rendering library derived from xpdf.

Header files

You will need some *.h files which are not installed by default (make install) unless you use the --enable-xpdf-headers configure option. Alternatively, you may use the tools/install-poppler-h-files script to install them afterwards.

Note that some Linux distributions are already shipping those files.

Compatibility

Poppler 0.7.3 or newer is required.

Security warning

Every upstream poppler version prior to 0.10.6 is affected by at least one serious security bug. You have been warned.

PStreams (recommended)

PStreams allows you to run another program from your C++ application and to transfer data between the two programs, similar to shell pipelines.

GNOME XSLT library (recommended)

Libxslt is the XSLT C library developed for the GNOME project.

This library is required to correctly deal with XMP metadata.

GraphicsMagick (optional)

GraphicsMagick is a library to read, write, and manipulate images.

an OpenMP implementation (recommended)

http://openmp.org/ is API for multi-platform shared-memory parallel programming.

Comment by chriskar...@gmail.com, Jun 30, 2008

How to install PStreams

Get the .tar.gz file and extract it:

cd /usr/src 
tar -xzvf /path-to-pstreams-source/pstreams-0.5.2.tar.gz

It will create a directory pstreams-0.5.2. Change to that directory

cd pstreams-0.5.2

and type

make

If all goes well, you can test by typing

make test_pstreams 
./test_pstreams

You will see some output indicating the test and pass or failure.

Assuming this went well too, install by typing:

mkdir /usr/include/pstreams 
cp pstream.h /usr/include/pstreams/

You can copy the documentation to your doc directory as follows:

mkdir /usr/share/doc/pstreams 
cp -av doc/html /usr/share/doc/pstreams/ 
cp -av doc/latex /usr/share/doc/pstreams/ 
cp -av doc/man/man3/pstream.h.3 /usr/man/man3/ 
cp -av doc/man/man3/redi* /usr/man/man3/

Finally, call mandb to update your man pages (since you copied something to man3 above):

mandb

Get a cup of coffee...enjoy! :-)

Comment by chriskar...@gmail.com, Jun 30, 2008

A note on dependencies

pdf2djvu needs poppler and pstreams, so you have to install these two. poppler needs cairo and cairo needs poppler (no kidding!), so you will have to compile and install cairo, then poppler, then cairo again.

To compile and install cairo, I used:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make install

and to compile and install poppler:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-zlib --enable-cairo-output
make
make install

One of the two (I think cairo) complained that I did not have "ddjvuapi". This turned out to be the result of a missing ddjvuapi.pc in the pkgconfig directory. For this, I had to upgrade from djvulibre-3.5.16 to djvulibre-3.5.20, which creates an appropriate ddjvuapi.pc file.

So you will need the latest djvulibre too...

That's not enough: I had the configure script for poppler complaining that there was no "xrender" extension there. And why? Because, again, the fine .pc file was missing. Create one in, say, /usr/lib/pkgconfig (but take care that the directory is in the directory list contained in the PKG_CONFIG_PATH environment variable!) containing the following:

prefix=/usr/X11R6
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Xrender
Description: X Render Library
Version: 1.2
Cflags: -I${includedir} -I/usr/X11R6/include
Libs: -L${libdir} -lXrender  -L/usr/X11R6/lib -lX11

The above will be the file

/usr/lib/pkgconfig/xrender.pc

(Change the version number to the one in your X server, the xrender extension comes with the X server). See

http://www.linuxfromscratch.org/blfs/view/6.2.0/x/xfree86.html

What else can I say about all this mess that cost me a whole day?

Oh yes, while compiling pstreams, you may have to add

#include <stdint.h>

at the top of the include directives in compoppler.hh. Without this, I was getting errors like:

ISO C++ forbids declaration of ‘uint8_t’ with no type

And also, DON'T forget the advice given above regarding some missing .h files! That is, don't forget to use the

tools/install-poppler-h-files

script in order to get the missing header files in /usr/include/poppler!

Phew...I hope that's all. I hope this will suffice to navigate you around all the cliffs...

Chris Karakas http://www.karakas-online.de


Sign in to add a comment
Powered by Google Project Hosting