Showing posts with label fink. Show all posts
Showing posts with label fink. Show all posts

Fink on Intel Macs

Summary: It works for me!

The newsflash is discouraging:

A preliminary version of Fink for the Intel architecture is now ready. No binary packages are available, and things are still rough around the edges, but it should be usable if you are patient!

but gives the following instructions:

To install it, you need to install the XCode compiler and SDK packages (at minimum). Then you need to get the file fink-0.24.14.tar.gz from the Sourceforge file release page for Fink, expand the file, and run the command
./bootstrap.sh
At the end of the bootstrap process, run
fink selfupdate
and you'll get the currently available packages.

I tried it and it works! The Intel Mac is fast enough that installing everything from source doesn't take forever.

I then downloaded the 0.5.4 version of the Fink Commander binary from SourceForge - this works.

You can also download the source using CVS:

First login anonymously (this is a single instruction, and should be given on a single line, just copy the whole instruction, and paste into the terminal - when challenged for password, hit return):
cvs -d:pserver:anonymous@finkcommander.cvs.sourceforge.net:/cvsroot/finkcommander login
Then checkout the whole tree (another single instruction - this will create a directory namd FinkCommander):
cvs -z3 -d:pserver:anonymous@finkcommander.cvs.sourceforge.net:/cvsroot/finkcommander co -P .
open FinkCommander/FinkCommander.xcodeproj - this should launch XCode.

In the Project menu, Set Active Build Configuration to Deployment; in the Build menu select Build. Wait a short while and voila - your own universal 0.5.4 binary! Find FinkCommander.app and move it into your Applications folder. Make sure you tick use unstable packages under the Fink tab of FinkCommander preferences.

I use Fink primarily to install the latest emacs (emacs21) and LATEX (tetex), but also for other goodies such as unison (which now does doesn't yet build on Intel) and bibtex2html.

Starting over: MacPorts

As a long-term Fink user, I've found it hard to summon up the energy to move to Macports (previously known as Darwin Ports), until now. A dead disk provided the necessary impetus to overcome this energy barrier.

MacPorts—so I am told by friends I trust—is closer to the Mac zeitgeist, and has more packages available in fresher versions.

My first experience was not good. I tried the standard install from .dmg with two fresh, fully updated installs of Leopard + x11 + XCode Tools—one on my ageing MBP; one on a sparking new MacBook Air. Neither succeeded in creating the code>.profile that is supposed to adjust the PATH environment variable.

You should start with a standard install as it does almost everything—and may even do it all, for some it succeeds.

In the environment of a shell accessing packages installed by MacPorts, PATH should include /opt/local/bin:/opt/local/sbin and MANPATH should include /opt/local/share/man. The standard install is meant to create a .profile to achieve this. It didn't.

Googling macports leopard profile led to various suggestions (as usual, others have encountered this problem before me). One of these works—others don't.

Do not add the new paths to /etc/paths and /etc/manpaths.

Do not add new files named macports or MacPorts, containing the new paths, to /etc/paths.d/ and /etc/manpaths.d/.

Do create a file ~/.profile containing the following code:

 export PATH=/opt/local/bin:/opt/local/sbin:$PATH export MANPATH=/opt/local/share/man:$MANPATH 

Then you can type sudo port -d update in a fresh terminal window, to update your MacPorts installation, and sudo port install emacs-app, for example, to install a Cocoa version of emacs.

You'll find the Emacs installed as a regular application in /Applications/MacPorts/.

Note: If you already have a .bash_profile or .bash_login, you can and should append the commands above to that file, and optionally rename rename that file as .profile, instead of creating a new .profile.

Explanation: (for the full story try man bash)

When bash is invoked as an interactive login shell, or as a non-inter-active shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.

LATEX Equation Editor

La TeX Equation Editor
LaTeXit
In an earlier post I mentioned LATEXiT, by Pierre Chatelier. The LATEX Equation Editor is similar in function—and not entirely dissimilar in appearance.
I'm not sure yet which I prefer. Both are free—try both. If you already downloaded LATEXiT last year, make sure you try the latest version.
If you have a Fink tetex installation, you must set the preferences for LATEX Equation Editor to specify that LATEX is in /sw/bin/ and ghostscript in /sw/share.
LaTeX Equation Editor prefences See also mimetex and LATEX render.

texmf.local for Fink-installed latex

This note assumes you have a working Fink installation of tetex on your Mac.

To install the local latex classes, such as infletr, which produces letters on informatics letterheads (School, Institutes, Graduate School, ITO, etc.):

In a terminal window on your mac, do (don't type the % that is supposed to represent the shell prompt)
% cd /sw/etc/texmf.local/tex/
then the following
% sudo scp -r user@host.inf.ed.ac.uk:/usr/local/share/texmf/tex/latex .
Here user is your UUN, host is any dice machine you have access to. You will get asked for your mac password (for the sudo) and then, unless you have a valid Kerberos ticket, your dice password (for the scp access to your dice machine).
Then let the latex installation cache information about the classes you've installed.
% sudo texhash

Fink doesn't interfere with texmf.local, so you can use Fink to update your latex installation without destroying your copy of the informatics classes — but you should use rsync from time-to time to keep your copy up-to-date.

% sudo rsync -az --delete user@host.inf.ed.ac.uk:/usr/local/share/texmf/tex/latex /sw/etc/texmf.local/tex/latex % sudo texhash