# If the web site link above ever stops working, try here:
# http://harfbuzz.org/
# Prerequisites:
# pkg-config >= 0.2.0
# GLib2 >= 2.10.0
# Cairo >= 1.8.0
# + pixman
# + EGL
# Chafa
# Fontconfig
# ICU (optional; Unicode library)
# FreeType
# Graphite2
# gtk-doc (included in Slackware's sgml-tools/linuxdoc-tools packages)
# If you see Uniscribe or DirectWrite anywhere, those are AFAIK Windows things
# If you see CoreText anywhere, that is AFAIK a macOS thing
# Get the tarball
cd
test -f installed/harfbuzz-8.2.1.tar.xz &&
mv -f installed/harfbuzz-8.2.1.tar.xz .
test ! -f ./harfbuzz-8.2.1.tar.xz &&
wget https://github.com/harfbuzz/harfbuzz/releases/download/8.2.1/\
harfbuzz-8.2.1.tar.xz
# Verify tarball w/ sha256sum:
# (this comes from mine, so only proves yours is the same as mine)
echo "0fec78f98c9c8faf228957a201c8846f809452c20f8445eb092a1ba6f22dbe\
a5 harfbuzz-8.2.1.tar.xz" | sha256sum -c
# Extract it
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "harfbuzz-*" -exec rm -r {} \;
tar xJvf ~/harfbuzz-8.2.1.tar.xz
cd harfbuzz-8.2.1
test $UID = 0 && chown -R root:root .
# Read ./README, ./BUILD.md, ./INSTALL (it's the stock one)
# If this is an upgrade, read ./NEWS and/or ./ChangeLog
# If you do not have graphite2 installed, leave that off
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --libdir=/usr/lib64 --with-graphite2
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --with-graphite2
# Build it
make
# Check the build
make check
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg harfbuzz
# 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 source for later
cd
mkdir -p -m 0700 installed
rm -f installed/harfbuzz-*.tar.*
mv harfbuzz-8.2.1.tar.xz installed/
# If you ever want to uninstall HarfBuzz, this should do it:
cd
su
test -d src/harfbuzz-* && ( cd src/harfbuzz-* ; make uninstall )
( cd /usr/bin
rm -f hb-ot-shape-closure hb-shape hb-subset )
test -d /usr/include/harfbuzz && rm -r /usr/include/harfbuzz
for libdir in /usr/lib /usr/lib64;
do
test -d $libdir &&
( cd $libdir
rm -f libharfbuzz.la libharfbuzz-icu.* libharfbuzz-subset.* )
test -d ${libdir}/cmake/harfbuzz && rm -f ${libdir}/cmake/harfbuzz
test -d ${libdir}/pkgconfig &&
( cd ${libdir}/pkgconfig
rm -f harfbuzz.pc harfbuzz-subset.pc harfbuzz-icu.pc )
done
test -d /usr/share/gtk-doc/html/harfbuzz &&
rm -r /usr/share/gtk-doc/html/harfbuzz
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "harfbuzz-*" -exec rm -r {} \;
rm -f ~/installed/harfbuzz-*.tar.*