# Xpdf
# ====
# Prerequisites:
# XFree86 or X.org (only for for xpdf and pdftoppm)
# freetype
# libpaper (couldn't find any current info about this one)
# t1lib 5.1.0
# ===========
# Slackware 8.1, 9.0, 9.1, 10.0, and 10.1's 't1lib' packages include version
# 1.3.1, 10.2's includes 5.1.0
cd
test -f installed/t1lib-5.1.0.tar.gz && mv installed/t1lib-5.1.0.tar.gz .
test ! -f t1lib-5.1.0.tar.gz &&
wget ftp://ftp.foolabs.com/pub/xpdf/t1lib-5.1.0.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "t1lib-*" -exec rm -r {} \;
tar xzvf ~/t1lib-5.1.0.tar.gz
cd t1lib-5.1.0
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --enable-static=no
# Run 'make' if you have latex installed, 'make without_doc' if not
make without_doc
# Become root to install it
su
test -x /sbin/removepkg && /sbin/removepkg t1lib
make install
cp -a Fonts /usr/share/t1lib/
chown -R root:root /usr/share/t1lib
# Replace the sample configuration file with a real one
cat << EOF > /usr/share/t1lib/t1lib.config
This is the global configuration file for t1lib.
Note that it is not of any use if not setup by the system administrator.
For information on how to set up these things see the t1lib-manual.
# Xpdf 3.02
# =========
cd
test -f installed/xpdf-3.02.tar.gz && mv installed/xpdf-3.02.tar.gz .
test ! -f xpdf-3.02.tar.gz &&
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "xpdf-*" -exec rm -r {} \;
tar xzvf ~/xpdf-3.02.tar.gz
cd xpdf-3.02
test $UID = 0 && chown -R root:root .
./configure --with-freetype2-includes=/usr/include/freetype2
make
su -c "make install"
cd
mkdir -p -m 0700 installed
rm -f installed/xpdf-*.tar.*
mv xpdf-3.02.tar.gz installed/
# If you ever want to uninstall t1lib, this should do it:
cd
su
test -d src/t1lib-* && ( cd src/t1lib-* ; make uninstall )
( cd /usr/bin ; rm -f type1afm xglyph )
( cd /usr/include ; rm -f t1lib.h t1libx.h )
( cd /usr/lib ; rm -f libt1.* libt1x.* )
test -d /usr/share/t1lib && rm -r /usr/share/t1lib
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "t1lib-*" -exec rm -r {} \;
rm -f ~/installed/t1lib-*.tar.*
# If you ever want to uninstall xpdf, this should do it:
su
( cd /usr/local/bin ; rm -f pdffonts pdfimages pdfinfo pdftoppm pdftops \
pdftotext xpdf )
( cd /usr/local/man/man1 ; rm -f pdffonts.1 pdfimages.1 pdfinfo.1 \
pdftoppm.1 pdftops.1 pdftotext.1 xpdf.1 )
rm -f /usr/local/etc/xpdfrc /usr/local/man/man5/xpdfrc.5
exit
find ~/src -maxdepth 1 -type d -name "xpdf-*" -exec rm -r {} \;
rm -f ~/installed/xpdf-*.tar.*