57
edits
Changes
More page creation. Still incomplete, moduleset is wrong and patches half done. Hold on a bit.
Type
* jhbuild bootstrap
to install a bunch of stuff from the web. A lot of text should scroll by, finishing with *** Success ***. ====Write definitions of the new programs====jhbuild needs a definition of the moduleset, the set of modules to build to make a program. It knows about most things (it fetches the definitions from the web) but not about a new python and not about gramps. I don't know hwo to provide a file here in the wiki for easy downloading, so I've pasted the text in here. Copy the text from here and paste it into the new file ~/Source/jhbuild/modulesets/python-gramps.modules <?xml version="1.0" standalone="no"?> <!--*- mode: nxml -*--> <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> <moduleset> <tarball id="custompython" > <source href="http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tgz"/> </tarball> <metamodule id="meta-python-2.6.2"> <dependencies> <dep package="custompython" /> </dependencies> </metamodule> <tarball id="gramps" > <source href="http://downloads.sourceforge.net/gramps/gramps-3.1.2.tar.gz"/> <patches> <patch file="gramps-3.1.2.patch" strip="0" /> </patches> </tarball> <metamodule id="meta-gramps-3.1.2"> <dependencies> <dep package="gramps"/> </dependencies> </metamodule> </moduleset> This file is telling jhbuild what "metamodules" (bunches of modules) are going to be built, what source is needed for each build, what patches are needed on the sources to make them work, and how to build them. [Change this so the file just references modules, not metamodules. Simplify the naming.] ====Define the Patches Gramps needs for Mac====Gramps hasn't traditionally been developed for Mac, so some things don't quite work right out of the box. jhbuild can apply patches to code after it ahs been downloaded and before it has been built, which is very handy. It does this with the patch utility. jhbuild looks for the patch files, that drive the patching process, in the directory ~/Source/jhbuild/patches. Again, I should like to provide the file to download, but don't know how to do that, so paste this text into the file ~/Source/jhbuild/patches/gramps-3.1.2.patch. --- configure.orig 2009-06-20 20:17:18.000000000 +0100 +++ configure 2009-06-20 20:19:28.000000000 +0100 @@ -6514,7 +6514,8 @@ # Do not import gtk.glade, this can raise a RuntimeError if the # display cannot be opened. Just search it. import imp - imp.find_module('gtk/glade') + # imp.find_module('gtk/glade') # does not work on Mac + imp.find_module('glade',[imp.find_module('gtk')[1]]) # Does work on Mac and also on Linux out("gtk.glade") except ImportError: out("NO") This is fixing the problem that find_module() cannot handle "/" in a filename on Mac, for unknown reasons. ====Build the custom python====Type jhbuild -m python-gramps build custompythonand jhbuild should fetch the sources of python 2.6.2 from the web and build them into a new program, ~/gtk/inst/bin/python. It should finish with ***Success***. The -m python-gramps bit tells jhbuild to look in the file created in the previous step for the instructions. The source of jhbuild itself now lives in ~/Source/jhbuild. The sources downloaded by jhbuild to build new programs all live in ~/gtk. It's important that the system now uses this custom python, rather than any other, since there is a bug in the Apple python which stops the next step from working. To check that the right python is in use, type type pythonand the shell should say python is /Users/trial/gtk/inst/bin/pythonand should definitely not say python is /usr/bin/python====Build some more environment====Type jhbuild build meta-gtk-osx-bootstrap jhbuild build meta-gtk-osx-coreand a whole pile of text should scroll by ending in *** Success *** each time. Each step will take quite a while.====Build everything else====Type jhbuild build meta-gtk-osx-python jhbuild build shared-mime-info jhbuild build -m python-gramps gramps-3.1.2and that should build everything that gramps needs, then gramps itself.Type grampsand it should pop into life!