tlbuild: Distro builds
5.3 Distro builds
=================
Although they use the same code base, building for the native TL
distribution as shipped by the TeX user groups is typically quite
different from a "distro" build needed by, e.g., a full GNU/Linux or BSD
operating system distribution.
The native TL distribution uses shared libraries only when absolutely
necessary ('libc', 'libm', X11 libraries, and 'libfontconfig'). In
contrast, a distro typically wants to use as many shared libraries as
possible from elsewhere on the system, including TeX-specific libraries
such as 'libkpathsea' (even though Kpathsea has never officially been
released as a shared library). In addition, the installation paths
will, in general, be completely different.
Here are the 'configure' options that distro builds are likely to
find most relevant:
'--disable-native-texlive-build'
This must be specified to avoid interference from the many tweaks
we do for the native TL build.
'--with-banner-add=/SOMEDISTRO'
This isn't technically required, but is strongly recommended, so
your build and your distro can be distinguished from others.
'--enable-shared'
Build shared versions of the TeX-specific libraries (uses
'libtool').
'--disable-static'
Do not build the static versions of the TeX-specific libraries.
'--with-system-LIB'
Look for and use a system version of the library LIB. 'configure
--help' will give you the list of possibilities.
'--with-LIB-includes=DIR'
'--with-LIB-libdir=DIR'
If needed, allows you to specify where the headers/code are for the
given library LIB.
'--prefix=/usr'
'--prefix=/opt/TeXLive'
Or whatever your convention is. The default is '/usr/local' and
you shouldn't install there for a distro.
'--libdir=\${exec_prefix}/lib64'
May be needed for 64-bit bi-architecture (GNU/Linux) systems.
You will need to take care of the support files mentioned above
(⇒Installing), and many other issues, such as font maps,
languages, and formats, independently of the build. Norbert Preining
has written a detailed article on adapting TL for distros:
<https://tug.org/TUGboat/tb34-3/tb108preining-distro.pdf>. (If the
article needs updating in the future, perhaps we will merge it into this
document.)