sed "s/^\(Last amended on\).*$/\1 $(date)/" $0 >$0.$$ && mv -f $0.$$ $0; exit Last amended on Thu Oct 18 10:47:40 CEST 2007 Install TeX Live 2007 on NetBSD =============================== 1. Introduction --------------- From the project's [1]website: TeX Live is an easy way to get up and running with TeX. It provides a comprehensive TeX system with binaries for most flavors of Unix, including GNU/Linux, and also Windows. It includes all the major TeX-related programs, macro packages, and fonts that are free software, including support for many languages around the world. Tex Live (TL) 2007 doesn't ship with NetBSD binaries. This will probably change with the TL 2008 release, at least for i386. Until then, to install TL on a NetBSD system you'll have to build the binaries yourself. 2. Requirements --------------- You need to [2]obtain either the TL CD (aka `inst') or the TL DVD (aka `live'). If you're going to use the `inst' image you need to fetch the TL [3]sources separately; they are included only in the `live' image (source/source.tar.bz2). Hint: installing from the `inst' image seems to be much (about three times) faster than installing from `live'... You'll need GNU make, and probably X11 and fontconfig. Additionally, depending on how you want the binaries you're going to build to be linked, you may need some additional packages to be installed. But since TL ships with sources for various libraries and programs such as png, t1, zlib, gd, freetype{,2}, dialog, etc. this is not necessarily needed. You can either use them, in which case you won't have to modify the `Build' script much, or use the corresponding libraries from your system. See the `Build.nbsd' script referenced below and the various `--with-system-...' configure options on how to do this. And yes, you need some free disk space ;-) A full TL installation takes up a little more than 1 GB. 3. Installation --------------- I'll assume the `inst' or `live' image is mounted on /mnt/cdrom, and TL will be installed to its default location (/usr/local/texlive/2007). At first extract [5]this archive to a temporary location, e.g.: $ mkdir ~/TLtmp $ cd ~/TLtmp $ tar -xzf .../nbsd-tl.tgz Now extract the TL source archive, e.g.: $ cd /usr/local/src $ mkdir texlive_2007 $ cd texlive_2007 $ tar -xjf .../source.tar.bz2 We are only interested in the binaries to be built. Everything else is machine independent and we'll install it from the TL CD/DVD. The binaries we're going to build can either be statically linked with the libraries shipped with TL or dynamically with the system libraries (if these are available). I chose the latter approach and used fonts/fontconfig, misc/dialog, graphics/png, fonts/t1lib, graphics/gd and graphics/freetype2 from [4]pkgsrc and zlib from my (-current) base system; see the `Build.nbsd' script which is included in [5]nbsd-tl.tgz. $ cp ~/TLtmp/Build.nbsd . $ vi Build.nbsd [ ...change whatever needs to be changed... ] :wq If you have dialog installed and want to use it (for texconfig) you should now apply the texconfig patch (which is actually patch-a[cp] from pkgsrc/print/teTeX3-bin). Then start the build: $ patch -s -p0 <~/TLtmp/texconfig.patch $ sh Build.nbsd This will build and install the needed binaries to a subdirectory of inst/bin, e.g. to inst/bin/i386-unknown-netbsdelf4.99.20 or similar. While the binaries are being built we prepare the installation of the machine independent files from the TL CD/DVD. You need to slightly change the file `common.sh' on the CD/DVD for this NetBSD installation to succeed, otherwise some post-install routines won't be executed. That's why we copy the file to a temporary directory, modify it and union-mount that temporary directory over /mnt/cdrom: $ mkdir ~/TLtmp/patched $ cd ~/TLtmp/patched $ cp /mnt/cdrom/common.sh . $ patch -s -p0 <../common.sh.patch $ sed "s/^ pd=.*$/ pd=$(uname -m)-netbsd/" common.sh >common.sh.tmp $ mv -f common.sh.tmp common.sh $ chmod 755 common.sh $ sudo mount_union . /mnt/cdrom As soon as the previously started TL build has finnished we copy the resulting binaries to wherever TL should finally be installed: $ m=$(uname -m)-netbsd $ sudo mkdir -p /usr/local/texlive/2007/bin/$m $ cd /usr/local/src/texlive_2007/inst/bin/*/ $ sudo pax -rw . /usr/local/texlive/2007/bin/$m/ Now the TL installation from the CD/DVD can be started: $ cd /mnt/cdrom $ sudo sh install-tl.sh Change installation options, selecte a scheme or individual packages etc. as required, and start the installation (). After installation has (successfully...) completed follow the hints about setting PATH, MANPATH and INFOPATH, and run texconfig to finish the TL installation: $ sudo texconfig-sys init That's it, TeX Live should now be ready to use. Thanks a lot to several people on the tex-live mailing list for their hints! Jukka Salmi, 2007-06-20 [1] http://www.tug.org/texlive/ [2] http://www.tug.org/texlive/acquire.html [3] http://mirror.ctan.org/systems/texlive/Source/source.tar.bz2 [4] http://www.netbsd.org/docs/software/packages.html [5] http://salmi.ch/~jukka/nbsd/nbsd-tl.tgz