Difference between revisions of "OpenBSD installation"

From Wiki
Jump to navigation Jump to search
m ({{Installation navbox}})
 
(28 intermediate revisions by 3 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 ==
# pkg_add gmake
 
</code>
 
 
 
== install teTeX 3.0 ==
 
 
 
<code>
 
# pkg_add teTex_base-3.0p3
 
</code>
 
 
 
this adds all the dependencies with newer pkg tools.  if using older ones,
 
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 [http://sarovar.org/projects/pdftex sarovar].
 
 
 
<code>
 
# tar xvzf pdftex-1.30.6.tgz
 
# cd pdftex-1.30.6
 
</code>
 
 
 
apply the following diff (scratch the bashism and use <tt>gmake</tt>):
 
 
 
<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.
 
</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>
 
# cp build/texk/web2c/pdfetex `which pdfetex`
 
# cp build/texk/web2c/pdfetex.pool `kpsewhich pdfetex.pool`
 
# cp build/texk/web2c/ttf2afm `which ttf2afm`
 
# fmtutil-sys --all
 
</code>
 
 
 
the last command will update all the formats except the ones which come with context.  please note that this will also break the md5 package checksums of the teTeX packages and will leave partial packages when they are being removed/upgraded.
 
 
 
== update mpost ==
 
 
 
this is optional.  fetch the source from [http://sarovar.org/projects/metapost here]
 
 
 
<code>
 
# bunzip2 metapost-0.901.tar.bz2
 
# tar xvf metapost-0.901.tar
 
# cd metapost-0.901
 
</code>
 
 
 
apply a very similar diff as with pdftex (scratch the bashism and use <tt>gmake</tt>):
 
 
 
<code>
 
--- Build.orig  Sat Mar  4 18:34:06 2006
 
+++ Build      Sat Mar  4 18:34:15 2006
 
@@ -1,7 +1,7 @@
 
-#!/usr/bin/env bash
 
+#!/bin/sh
 
  # $Id: Build,v 1.3 2005/05/08 15:55:26 taco Exp $
 
  # builds new pdftex binaries
 
-MAKE=make
 
+MAKE=gmake
 
  STRIP=strip
 
  # this deletes all previous builds.
 
</code>
 
 
 
run the build:
 
  
 
<code>
 
<code>
  # ./Build
+
  $ sudo pkg_add rsync fedora_base
  # mkdir -p /usr/local/share/texmf-local/metapost/base
+
$ sudo sysctl kern.emul.linux=1
  # cp -p texmf/metapost/base/* \
+
  $ mkdir $HOME/context
  /usr/local/share/texmf-local/metapost/base
+
  $ cd $HOME/context
# cd build/texk/web2c
+
  $ ftp http://minimals.contextgarden.net/setup/first-setup.sh
  # cp mpost dvitomp mpware/dmp mpware/mpto mpware/newer mpware/makempx \
 
  /usr/local/bin
 
# cp mp.pool /usr/local/share/texmf/web2c/mp.pool
 
# texhash
 
# fmtutil-sys --byfmt mpost
 
 
</code>
 
</code>
  
== modify texmf.cnf ==
+
Modify this script to override <tt>platform=linux</tt>.
 
 
apply the following diff to <tt>/usr/local/share/texmf/web2c/texmf.cnf</tt>
 
  
 
<code>
 
<code>
  --- texmf.cnf.orig      Tue Mar  7 00:01:07 2006
+
  $ sh ./first-setup.sh --modules=all
+++ texmf.cnf  Tue Mar  7 00:02:16 2006
+
  $ export PATH="$PATH:$HOME/context/tex/texmf-linux/bin"
@@ -246,7 +246,7 @@
+
  $ context --make
  % and string pools (.pool) for ini{tex,mf,mp}.  It is silly that we have six
+
  $ context --version
  % paths and directories here (they all resolve to a single place by default),
 
  % but historically ...
 
  -TEXFORMATS = .;$TEXMF/web2c
 
+TEXFORMATS = .;$TEXMF/web2c{$engine,}
 
  MFBASES = .;$TEXMF/web2c
 
  MPMEMS = .;$TEXMF/web2c
 
  TEXPOOL = .;$TEXMF/web2c
 
  @@ -409,7 +409,7 @@
 
  TEX_HUSH = none
 
 
 
  % Enable system commands via \write18{...}?
 
  -shell_escape = f
 
+shell_escape = t
 
 
 
  % Allow TeX \openin, \openout, or \input on filenames starting with `.'
 
  % (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)?
 
 
</code>
 
</code>
  
more about these changes [http://archive.contextgarden.net/message/20060306.215523.cd8d2bee.en.html here] and [http://archive.contextgarden.net/message/20060306.220403.24217b6e.en.html here].
+
This setup will use mkiv (the luatex version) and does not need either pdftex, or ruby.
  
'''warning:''' <tt>shell_escape = t</tt> is a security issue when you're on a system with
+
{{Installation navbox}}
many users; if you're running it on your own personal computer, it is safe to set this to true. (Thomas A. Schmitz)
 
 
 
== upgrade Latin Modern fonts ==
 
 
 
download and install the [http://www.ctan.org/tex-archive/fonts/lm/ lm] fonts. delete the old files preferably, many filenames were changed since the teTeX 3.0 times.  when finished run:
 
 
 
<code>
 
$ sudo texhash
 
</code>
 
 
 
== upgrade ConTeXt ==
 
 
 
get the latest package from [http://www.pragma-ade.com/context/current/cont-tmf.zip here].
 
 
 
<code>
 
# cd /usr/local/share/texmf-local/
 
# unzip -o $HOME/cont-tmf.zip
 
# texexec --make --all
 
</code>
 
 
 
the formats will end up in <tt>$HOME/.texmf-var/web2c/pdfetex/</tt> of the user doing the compilation, or in <tt>/usr/local/share/texmf-local/</tt> if compiling as <tt>root</tt>.  to make them globally accessible, one needs to copy them to the system-wide location:
 
 
 
<code>
 
# cd /usr/local/share/texmf-local/
 
# cp cont-en.* metafun.* mptopdf.* /var/texmf/web2c
 
# texhash
 
</code>
 
 
 
<code>
 
$ texexec --version
 
 
TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
 
 
              texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005
 
              texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006
 
                  tex : pdfeTeX, 3.141592-1.30.6-2.2 (Web2C 7.5.5)
 
              context : ver: 2006.05.14 23:57
 
              cont-en : ver: 2006.05.14 23:57  fmt: 2006.5.15  mes: english
 
 
        total run time : 3 seconds
 
 
              warning : use 'texmfstart texexec' instead
 
</code>
 
  
 
[[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.