Thursday, November 30, 2006

Meep for developers

If you want to modify the Meep source code, you will want to have a number of additional packages, most importantly:

  • The Darcs (http://www.darcs.net/) version-control system.

Once you have Darcs, you can grab the latest development version of Meep with:

darcs get http://ab-initio.mit.edu/~meep/meep 

This gives you a fresh, up-to-date Meep repository in a directory meep. See www.darcs.net for more information on using Darcs; perhaps the most useful command is darcs pull, which you can execute periodically to get any new updates to the development version.

Darcs will give you an absolutely minimal set of sources; to create a usable Meep directory, you should run:

sh autogen.sh
make

in the meep directory. (And subsequently, if you are editing the sources you should include --enable-maintainer-mode whenever you reconfigure.) To do this, however, you will need a number of additional packages beyond those listed above:

  • GNU autoconf (http://www.gnu.org/software/autoconf/), automake (http://sources.redhat.com/automake/), and libtool (http://www.gnu.org/software/libtool/libtool.html) — these are used to create the Makefiles and configure scripts, and to build shared libraries.
  • The Glasgow Haskell Compiler (http://www.haskell.org/ghc/) — some of Meep's C++ source code files are actually generated by programs (in the hsrc/ subdirectory) written in a programming language called Haskell.
  • SWIG (http://www.swig.org/) — the Scheme/libctl interface to Meep is largely generated by a program called SWIG (Simple Wrapper and Interface Generator). We currently require SWIG version 1.3.25 or later. Moreover, if you are using 1.3.27 or earlier, you must patch the file Source/Modules/guile.cxx with this bug fix (http://cvs.sourceforge.net/viewcvs.py/swig/SWIG/Source/Modules/guile.cxx?r1=1.33&r2=1.34).
要干这个了,可是一点都不懂