Difference between revisions of "OpenBSD installation"

From Wiki
Jump to navigation Jump to search
Line 60: Line 60:
 
</code>
 
</code>
  
 
+
...
== Install a MetaPost update ==
 
 
 
The included MetaPost in teTeX is a bit outdated. If you want, you can
 
fetch and install the latest MetaPost from sarovar. The current release is 0.901.
 
Just download the source tarball from the [[http://sarovar.org/projects/metapost project page]]
 
 
 
From the directory where you downloaded the archive file, execute the following
 
series of commands:
 
<code>
 
  # tar xjf metapost-0.901.tar.bz2
 
  # cd metapost-0.901
 
  # ./Build
 
  # mkdir -p /usr/local/teTeX/share/texmf-local/metapost/base
 
  # cp texmf/metapost/base/* /usr/local/teTeX/share/texmf-local/metapost/base
 
  # cd build/texk/web2c
 
  # cp -f mpost dvitomp mpware/dmp mpware/mpto mpware/newer mpware/makempx \
 
    /usr/local/teTeX/bin/i686-pc-linux-gnu
 
  # cp -f mp.pool /usr/local/teTeX/share/texmf/web2c
 
  # texhash
 
  # fmtutil-sys --byfmt mpost
 
</code>
 
 
 
== Install a Latin Modern font update ==
 
 
 
The [[Latin Modern]] fonts are still in development, so teTeX has a hard time catching up. To get a stable system, you have to manually download the [[http://www.ctan.org/info?id=lm Latin Modern distribution]] from ctan and install the package according to the[[http://www.tex.ac.uk/cgi-bin/texfaq2html?label=uselmfonts instructions in the FAQ]].
 
 
 
The ConTeXt-specific support files are included in [[Cont-tmf.zip]], so it is just a matter of installing the actual font files.
 
 
 
== Install the latest ConTeXt ==
 
 
 
Fetch the current distro from Pragma ADE:
 
[[http://www.pragma-ade.com/context/current/cont-tmf.zip cont-tmf.zip]] [[http://mirror.contextgarden.net/context/current/cont-tmf.zip mirror1]]
 
[[http://context.aanhet.net/context/current/cont-tmf.zip mirror2]]
 
 
 
=== Fix texmf.cnf ===
 
Now first you have to fix texmf.cnf as supplied with teTeX:
 
<code>
 
  # vi /usr/local/teTeX/share/texmf/web2c/texmf.cnf
 
</code>
 
You have to add an engine path to the TEXFORMATS line, so that it reads:
 
<code>
 
  TEXFORMATS = .;$TEXMF/web2c/{$engine,}
 
</code>
 
While at it, you probably want to set
 
<code>
 
  shell_escape = t
 
</code>
 
if it isn't already.
 
 
 
=== Cleanup fmtutil ===
 
 
 
Optionally, you can remove ConTeXt support from teTeX's configuration,
 
because ConTeXt does not use fmtutil.
 
 
 
Using
 
<code>
 
  # fmtutil-sys --edit
 
</code>
 
you can comment out the lines for metafun,cont-en, and mptopdf
 
 
 
And you can use
 
<code>
 
  # cd /usr/local/teTeX/share/texmf-var/web2c && rm -f cont-en.* metafun.* mptopdf.*
 
</code>
 
to remove the old (fmtutil-generated) formats.
 
 
 
=== Install the zip archive ===
 
 
 
Now you have to execute the following series of commands (I assume you downloaded the archive file to /tmp. If you used another location, you have to change the unzip command):
 
<code>
 
  # cd /usr/local/teTeX/share/texmf-local/
 
  # unzip -o /tmp/cont-tmf.zip
 
  # texexec --make --all
 
</code>
 
 
 
In teTeX 3.0, formats will end up in a local directory only accessible to the user that generated them, so you have to copy the newly generated formats in the global location to make them useful for other people than 'root'.
 
 
 
The last lines of the <tt>texexec</tt>s output will look like this:
 
<code>
 
used engineformatpath : /root/.texmf-var/web2c/pdfetex/
 
 
 
            TeX binary : pdfetex
 
            format(s) : en nl metafun mptopdf
 
 
 
        total run time : 35 seconds
 
</code>
 
The top line indirectly tells you where the directories are where <tt>texexec</tt> has stored the local formats that need copying. With the output above, the final two commands to run are:
 
<code>
 
  # cp -a /root/.texmf-var/web2c/* /usr/local/teTeX/share/texmf-var/web2c
 
  # texhash
 
</code>
 
If the engineformatpath does not start with <tt>/root/.texmf-var/web2c/</tt>, you have to replace the first path with the right one. You do that by removing the <tt>pdfetex/</tt> suffix from the 'used engineformatpath'.
 
 
 
== Finished! ==
 
 
 
That should do it! End result is hopefully like this:
 
<code>
 
TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
 
 
 
              texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
 
              texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
 
                  tex : pdfeTeX, 3.141592-1.30.4-2.2 (Web2C 7.5.5)
 
              context : ver: 2005.11.30
 
              cont-en : ver: 2005.11.30  fmt: 2005.11.30  mes: english
 
</code>
 
 
 
please note, that after the successful installation of these updates,
 
the MD5 checksums obviously will not match the ones of the installed ones,
 
therefore except special cases when deleting/updating these packages.
 
  
 
[[Category:Installation]]
 
[[Category:Installation]]

Revision as of 22:34, 2 March 2006

this page contains instructions how to get the latest ConTeXt up and running on OpenBSD 3.8+

install gmake

$ sudo pkg_add gmake

install teTeX 3.0

$ sudo pkg_add teTex_base-3.0p3

this adds all the dependencies with newer pkg tools. if using older ones, add the other packages manually (teTeX_texmf, teTeX_base-fmt).

strictly speaking, one doesn't need X11 for using teTeX, in this case install the *-no_x11 packages.

update pdftex

get the latest version from from [sarovar].

$ tar xvzf pdftex-1.30.6.tgz
$ cd pdftex-1.30.6

apply the following diff (scratch the bashism and use gmake):

--- build.sh.orig       Mon Feb 27 21:45:29 2006
+++ build.sh    Mon Feb 27 23:32:31 2006
@@ -1,7 +1,7 @@
-#! /usr/bin/env bash
+#!/bin/sh
 # $Id$
 # builds new pdftex binaries
-MAKE=make
+MAKE=gmake
 STRIP=strip
 # this deletes all previous builds.
 # comment out the rm and mkdir if you want to keep them (and uncomment and

run the build:

$ sh ./build.sh

when finished, replace the binaries (pdftex is only a symlink to pdfetex):

$ sudo mv build/texk/web2c/pdfetex which pdfetex
$ sudo mv build/texk/web2c/pdfetex.pool kpsewhich pdfetex.pool
$ sudo mv build/texk/web2c/ttf2afm which ttf2afm
$ sudo fmtutil-sys --all

...