Xpdf

From Genunix

xpdf - Viewer for Adobe PDF files

Contents

Rating

3 points (out of 4)

Rating scheme: 4 points means the source builds seamlessly on Solaris Express (OpenSolaris). Points are subtracted as follows:

  • Minus 1 if the source doesn't come with an automated way to localize the build (e.g. configure)
  • Minus 1 if the source won't compile with Sun's cc (this usually means the code is gcc-centric)
  • Minus 1 if a minor patch is required, or
  • Minus 2 if a major patch(es) is required

How to build xpdf-3.01 on Solaris Express

Build Environment (platform, compiler, tools, PATH, ld)

Configure and compile steps (on x86 hardware)

/usr/bin/gzip -dc xpdf-3.01.tar.gz | /usr/sfw/bin/gtar xf -

cd xpdf-3.01


export CFLAGS="-i -xO4 -xspace -xstrconst -xpentium -mr -I/usr/sfw/include/freetype2 -I/usr/sfw/include"
export CPPFLAGS="-I/usr/sfw/include -I/usr/sfw/include/freetype2"
export CXXFLAGS="-i -xO3 -xspace -pentium -mr -norunpath -I/usr/sfw/include/freetype2 -I/usr/sfw/include"
export LDFLAGS="-Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect -L/usr/sfw/lib -R/usr/sfw/lib"

# The source hard-codes (in GlobalParams.cc) a list of directories to
# scan for ghostscript fonts; unfortunately it still doesn't find them on
# OpenSolaris. The following on-the-fly patch fixes that. Alternatively
# one can specify font locations in $HOME/.xpdfrc. A template .xpdfrc is
# in doc/sample-xpdfrc (in the source distribution).

perl -i.orig -lpe 's/local/sfw/ if m|/usr/local/share/ghostscript/fonts|' xpdf/GlobalParams.cc

./configure --prefix=/usr  \
            --mandir=/usr/share/man \

make

Other configure options

output of ./configure --help

Directory paths that xpdf installs to

bin
share/man/man1
share/man/man5

Other 3rd party software xpdf requires

(none)