Ich fand es nicht ganz leicht, Pugs auf meinem PowerBook zum Laufen zu bringen. Daher habe ich hier mal eine Installationsanleitung aufgeschrieben. Wenigstens bei mir hat's so funktioniert. Diese Anleitung bezieht sich auf GHC 6.4.1, hs-plugins auf dem Stand vom 24.9.2005, parrot 0.2.3 und Pugs 6.2.9. Denke daran, die angegebenen Pfade falls nötig anzupassen. Der Rest der Anleitung ist auf Englisch.
Install parrot
This will enable parrot support in Pugs. Plus, who doesn't want a parrot?
- Download parrot
- Copy the parrot-0.2.3 directory to /usr/local (the built parrot will remember its path, so choose someplace where you can leave it, not a temporary location)
- perl Configure.pl
- make
- make test
Install DarwinPorts
DarwinPorts is needed to install GHC
- Download the binary installer for DarwinPorts (right now, version 1.0)
- Edit your ~/.profile, add the paths mentioned in the installation package. E.g.
# add the DarwinPorts path behind the standard path, so the # perl installed by DarwinPorts will not override your system perl :( export PATH=$PATH:/opt/local/bin export MANPATH=/opt/local/share/man:$MANPATH export INFOPATH=/opt/local/share/info:$INFOPATH
- sudo port -d selfupdate
Install GHC
The Glasgow Haskell Compiler is needed to compile Pugs
- sudo port install ghc. This will take quite a long while.
Install darcs
Darcs is a revision control system needed to retrieve hs-plugins
- sudo port install darcs
Install hs-plugins
This is a GHC plugin that is needed for Pugs' parrot support
- darcs get http://www.cse.unsw.edu.au/~dons/code/hs-plugins
- Change into hs-plugins directory and runhaskell Setup.hs configure
- runhaskell Setup.hs build
- runhaskell Setup.hs install
- I don't know why, but I had to do sudo ranlib /usr/local/lib/plugins-0.9.10/libHSplugins-0.9.10.a.
Install Pugs
- Download Pugs
- export PUGS_EMBED=perl5,parrot
- export PARROT_PATH=/usr/local/parrot-0.2.3
- Edit Makefile.PL: Remove the error message that GHC 6.4.0 won't work with GCC 4 (since we installed GHC 6.4.1)
- perl Makefile.PL
- make (again, this takes quite a while)
- make install
Et voilà!
$ pugs -e 'say "Hello, World!"' Hello, World!

Kommentar schreiben