|
BuildDepends
DjVuLibreDjVuLibre is an implementation of DjVu, including viewers, browser plugins, decoders, simple encoders, and utilities. CompatibilityDjVuLibre 3.5.21 or newer is required. For Debian/Ubuntu, DjVuLibre 3.5.20-5 is sufficient. popplerPoppler is a PDF rendering library derived from xpdf. Header filesYou 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. CompatibilityPoppler 0.7.3 or newer is required. Security warningEvery 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. |
How to install PStreams
Get the .tar.gz file and extract it:
It will create a directory pstreams-0.5.2. Change to that directory
and type
If all goes well, you can test by typing
You will see some output indicating the test and pass or failure.
Assuming this went well too, install by typing:
You can copy the documentation to your doc directory as follows:
Finally, call mandb to update your man pages (since you copied something to man3 above):
Get a cup of coffee...enjoy! :-)
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:
and to compile and install poppler:
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 -lX11The 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
at the top of the include directives in compoppler.hh. Without this, I was getting errors like:
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