Back in March, I posted instructions for installing Mathematica 6 on OpenBSD 4.5. http://marc.info/?l=openbsd-misc&m=123835793220311
Below are instructions for installing Mathematica 7 on OpenBSD 4.6. The biggest change is that Mathematica 7 no longer requires a custom-compiled OpenBSD kernel. This procedure assumes that you are running OpenBSD on the i386 architecture, and that you have a licensed copy of Mathematica 7 For Linux. I also assume that you have enabled compat_linux and have installed the fedora_base package, as described at http://www.openbsd.org/faq/faq9.html#Interact To install Mathematica, do the following: (1) Create the directory /tmp/mathematica and copy the Mathematica 7 For Linux installation files into that directory. (2) The MathInstaller file should now be located at /tmp/mathematica/Unix/Installer/MathInstaller Type the following command to edit that file ed -s /tmp/mathematica/Unix/Installer/MathInstaller << 'EOF' 1c #!/usr/local/emul/fedora/bin/sh . /DefaultManPageDir=/c DefaultManPageDir="/usr/local/man/man1" . g/`uname -s`/s/`uname -s`/Linux/ g/chgrp -fhR/s/chgrp -fhR/chgrp -fR/ g/chown -fhR/s/chown -fhR/chown -fR/ g/if \[\( "${InstallerType}" != "\)App" -o\1gridMath" \]; then/c\ if false; then\ . wq EOF (3) Make sure that you have superuser privileges, and run the installer by typing /tmp/mathematica/Unix/Installer/MathInstaller When you are prompted for Mathematica's installation directory, enter /usr/local/emul/fedora/usr/local/Wolfram/Mathematica/7.0 And when asked to create a new directory, type "y". Accept the default options at all subsequent prompts. (4) Again, make sure that you have superuser privileges, and edit the Mathematica executables by typing the following commands. cd /usr/local/emul/fedora/usr/local/Wolfram/Mathematica/7.0/Executables for i in math mathematica mcc Mathematica MathKernel ; do ed -s $i << 'EOF' 1c #!/usr/local/emul/fedora/bin/sh . g/`uname -s`/s/`uname -s`/Linux/ g/OMP_NUM_THREADS=`cat \/proc\/cpuinfo/c\ OMP_NUM_THREADS=`dmesg | grep '^cpu[0-9]* at ' | wc -l | tr -d ' '`\ . g/ORIG_FONTCONFIG_FILE=/s/fonts.conf/conf.avail\/51-local.conf/ wq EOF done (5) Mathematica's "JLink" requires Sun's Java binary, which does not function under Linux binary emulation on OpenBSD. See http://archives.neohapsis.com/archives/openbsd/2006-11/1099.html To disable JLink, make sure that you have superuser privileges then type chmod a-x /usr/local/emul/fedora/usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/JLink Note that various features of Mathematica, such as internet connectivity and the Mathematica Documentation Center depend on JLink. Fortunately, the Mathematica Documentation Center can also be accessed with a web browser at http://reference.wolfram.com You're done!