# Prerequisites:
# CMake
# pkg-config
# Freetype >= 2.10
# fontconfig >= 2.13
# libjpeg
# zlib
# libpng
# libtiff >= 4.1
# NSS >= 3.68
# GPGME's libgpgmepp
# Qt 5.x or 6.x (optional)
# Glib >= 2.64 (optional)
# glibc's iconv or libiconv
# OpenJPEG
# XFree86 or X.org
# Cairo >= 1.16.0 (optional; you have to have Cairo or splash installed)
# boost >= 1.71.0
# gtk-doc (included in Slackware's sgml-tools/linuxdoc-tools packages; --enable-gtk-doc)
# GTK+ >= 2.14.0 (optional)
# lcms (optional)
# libxml2 (optional; for the AbiWord backend)
# libcurl >= 7.68 (optional; for --enable-libcurl)
# Poppler can use Cairo and Cairo can use Poppler, so you may want to
# build one, then the other, then the first one again.
# Previous updates to this HOWTO used the default installation prefix.
# Since then, where Slackware puts it (/usr).
# If you're replacing an older version installed from source, skip down
# to the bottom for removal notes.
# poppler-data 0.4.12
# ===================
# Get it
cd
test -f installed/poppler-data-0.4.12.tar.gz &&
mv installed/poppler-data-0.4.12.tar.gz .
test ! -f poppler-data-0.4.12.tar.gz &&
wget https://poppler.freedesktop.org/poppler-data-0.4.12.tar.gz
# Poppler 23.12.0
# ===============
# Get the source tarball
cd
test -f installed/poppler-23.12.0.tar.xz &&
mv installed/poppler-23.12.0.tar.xz .
test ! -f poppler-23.12.0.tar.xz &&
wget https://poppler.freedesktop.org/poppler-23.12.0.tar.xz
# Verify tarball w/ sha256sum:
# (this came from my gpg-verified tarball)
echo "beba398c9d37a9b6d02486496635e08f1df3d437cfe61dab2593f47c4d14cd\
bb poppler-23.12.0.tar.xz" | sha256sum -c
# Extract it
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -regex "^\.\/poppler-[0-9]+\.[0-9]+\.[0-9]+$" \
-exec rm -r {} \;
tar xJvf ~/poppler-23.12.0.tar.xz
cd poppler-23.12.0
test $UID = 0 && chown -R root:root .
# Create the build directory
mkdir build
cd build
# Get Poppler test data from Git (if you want to run 'make test')
# and add this below:
# -DTESTDATADIR=./test
git clone git://git.freedesktop.org/git/poppler/test
# If you don't have QT 5.x installed add -DENABLE_QT5=OFF
# If you don't have QT 6.x installed add -DENABLE_QT6=OFF
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
cmake -DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 \
-DCMAKE_INSTALL_MANDIR=/usr/local/man \
-DENABLE_QT5=OFF -DENABLE_QT6=OFF ..
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
cmake -DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_MANDIR=/usr/local/man \
-DENABLE_QT5=OFF -DENABLE_QT6=OFF ..
# If you don't have a /usr/share/man -> /usr/man symlink and really
# need to change it and CMAKE_INSTALL_MANDIR doesn't do anything:
test ! -f build/utils/cmake_install.cmake.orig &&
cp -a build/utils/cmake_install.cmake build/utils/cmake_install.cmake.orig
cat build/utils/cmake_install.cmake.orig | \
sed 's|/share/man|/man|g' > build/utils/cmake_install.cmake
# Build it
make
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg poppler
# Clean up old shared library files, if you are sure they are no longer in
# use
( cd /usr/lib
rm -f libpoppler.* libpoppler-cpp.* libpoppler-glib.* libpoppler-qt.* \
libpoppler-qt4.* libpoppler-qt5.* libpoppler-qt6.* )
test -d /usr/lib64 &&
( cd /usr/lib64
rm -f libpoppler.* libpoppler-cpp.* libpoppler-glib.* libpoppler-qt.* \
libpoppler-qt4.* libpoppler-qt5.* libpoppler-qt6.* )
# Install it
make install
ldconfig
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/poppler-0.*.tar.*
mv poppler-23.12.0.tar.xz installed/
# If you ever want to uninstall Poppler, this should do it:
cd
su
test -f ~/src/poppler-*/build/install_manifest.txt &&
cat ~/src/poppler-*/build/install_manifest.txt | xargs rm
for pfx in /usr /usr/local; do
( cd ${pfx}/bin
rm -f pdfdetach pdffonts pdfimages pdfinfo pdfseparate pdftoabw \
pdftocairo pdftohtml pdftoppm pdftops pdftotext pdfsig pdfunite )
test -d ${pfx}/include/poppler && rm -r ${pfx}/include/poppler
for libdir in ${pfx}/lib ${pfx}/lib64;
do
( cd $libdir
rm -f libpoppler.* libpoppler-cpp.* libpoppler-glib.* libpoppler-qt.* )
( cd ${libdir}/pkgconfig
rm -f poppler.pc poppler-cairo.pc poppler-cpp.pc \
poppler-data.pc poppler-glib.pc poppler-qt.pc poppler-splash.pc )
done
( cd ${pfx}/man/man1
rm -f pdfdetach.1 pdffonts.1 pdfimages.1 pdfinfo.1 pdfseparate.1 \
pdfsig.1 pdfsig.1 pdftocairo.1 pdftohtml.1 pdftoppm.1 pdftops.1 \
pdftotext.1 pdfunite.1 )
test -d ${pfx}/share/gtk-doc/html/poppler &&
rm -r ${pfx}/share/gtk-doc/html/poppler
test -d ${pfx}/share/poppler && rm -r ${pfx}/share/poppler
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "poppler-*" -exec rm -r {} \;
rm -f ~/installed/poppler-*.tar.*