tce-load -i intltool automake libtool-dev gettext-dev

cd sgml-common-0.6.3

patch -Np1 -i ../sgml-common-0.6.3-manpage-1.patch

autoreconf -fi

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --localstatedir=/var

find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \;

make
sudo make install

sudo install-catalog --add /usr/local/etc/sgml/sgml-ent.cat /usr/local/share/sgml/sgml-iso-entities-8879.1986/catalog
sudo install-catalog --add /usr/local/etc/sgml/sgml-docbook.cat /usr/local/etc/sgml/sgml-ent.cat

Update Hint 

Remove the above catalog items prior to upgrading (as the root user) with:

sudo install-catalog --remove /usr/local/etc/sgml/sgml-ent.cat /usr/local/share/sgml/sgml-iso-entities-8879.1986/catalog
sudo install-catalog --remove /usr/local/etc/sgml/sgml-docbook.cat /usr/local/etc/sgml/sgml-ent.cat
