I haven't tested to make sure that this is actually a valid patch
against a fresh checkout of browser. I ended up changing quite a
few different makefiles and other scattered about the mozilla
tree. I think I got all of the changes I've made, but as I said,
it's untested at this point.

In any case I don't have CVS write access so I can't make patches
with new directories.

Files/directories in the mozilla directory here should be copied
to the topscrdir, and jp2.diff applied. jp2_allmakefiles.diff
will probably require manual conflict resolution, since it tries
to add jp2 along with jpeg as a default-built decoder, which
changes most of the lines in the file. But it's not necessary
so long as you're willing to manually copy makefiles to the
objdir after first building firefox and then calling make
yourself to first compile libjasper and then recompile imglib2
with jp2 support added.

Ugly, I know, but an extension won't have any of these issues.

-- Ben Karel

my trunk is from March 19 09:39:48 2007 if that helps...