Difference between revisions of "OpenBSD installation"

From Wiki
Jump to navigation Jump to search
m ({{Installation navbox}})
 
(51 intermediate revisions by 4 users not shown)
Line 1: Line 1:
this page contains instructions how to get the latest ConTeXt up and running on OpenBSD 3.8+
+
== Introduction ==
  
== install gmake ==
+
The easiest way to install the latest ConTeXt on OpenBSD is using [[ConTeXt_Standalone|ConTeXt Standalone]]'s Linux version and use it with OpenBSD's Linux emulation layer. Alternative, native methods may be described on this page in the future. The full installation is ~210M (without the 3rd party modules ~185M).
  
<code>
+
== Using Linux Emulation ==
$ sudo pkg_add gmake
 
</code>
 
 
 
== install teTeX 3.0 ==
 
  
 
<code>
 
<code>
  $ sudo pkg_add teTex_base-3.0p3
+
  $ sudo pkg_add rsync fedora_base
 +
$ sudo sysctl kern.emul.linux=1
 +
$ mkdir $HOME/context
 +
$ cd $HOME/context
 +
$ ftp http://minimals.contextgarden.net/setup/first-setup.sh
 
</code>
 
</code>
  
this adds all the dependencies with newer pkg tools.  if using older ones,
+
Modify this script to override <tt>platform=linux</tt>.
add the other packages manually (<tt>teTeX_texmf, teTeX_base-fmt</tt>).
 
 
 
strictly speaking, one doesn't need X11 for using teTeX, in this case install
 
the <tt>*-no_x11</tt> packages.
 
 
 
== update pdftex ==
 
 
 
get the latest version from from [[http://sarovar.org/projects/pdftex sarovar]].  
 
  
 
<code>
 
<code>
  $ tar xvzf pdftex-1.30.6.tgz
+
  $ sh ./first-setup.sh --modules=all
  $ cd pdftex-1.30.6
+
$ export PATH="$PATH:$HOME/context/tex/texmf-linux/bin"
 +
$ context --make
 +
  $ context --version
 
</code>
 
</code>
  
apply the following diff (scratch the bashism and use <tt>gmake</tt>):
+
This setup will use mkiv (the luatex version) and does not need either pdftex, or ruby.
 
 
<code>
 
--- 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
 
</code>
 
 
 
run the build:
 
 
 
<code>
 
$ sh ./build.sh
 
</code>
 
 
 
when finished, replace the binaries (<tt>pdftex</tt> is only a symlink to <tt>pdfetex</tt>):
 
 
 
<code>
 
$ 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
 
</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,
+
{{Installation navbox}}
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]]

Latest revision as of 16:02, 20 November 2012

Introduction

The easiest way to install the latest ConTeXt on OpenBSD is using ConTeXt Standalone's Linux version and use it with OpenBSD's Linux emulation layer. Alternative, native methods may be described on this page in the future. The full installation is ~210M (without the 3rd party modules ~185M).

Using Linux Emulation

$ sudo pkg_add rsync fedora_base
$ sudo sysctl kern.emul.linux=1
$ mkdir $HOME/context
$ cd $HOME/context
$ ftp http://minimals.contextgarden.net/setup/first-setup.sh

Modify this script to override platform=linux.

$ sh ./first-setup.sh --modules=all
$ export PATH="$PATH:$HOME/context/tex/texmf-linux/bin"
$ context --make
$ context --version

This setup will use mkiv (the luatex version) and does not need either pdftex, or ruby.