[libdispatch-dev] Using darwinbuild to build libdispatch

William Siegrist wsiegrist at apple.com
Mon Jan 25 15:25:12 PST 2010


I have added a plist to the repo that can be fed to darwinbuild to help build (and create patches for) libdispatch. Darwinbuild will automatically fetch roots from Mac OS Forge to populate your build environment with headers and libraries. You can find information about darwinbuild, including installation instructions, at:

http://darwinbuild.macosforge.org/

Once darwinbuild is installed, do the following as root:

$ mkdir ~/libdispatch-darwinbuild && cd ~/libdispatch-darwinbuild
$ darwinbuild -init http://svn.macosforge.org/repository/libdispatch/trunk/libdispatch.plist
$ darwinbuild libdispatch

... That will build libdispatch (/trunk HEAD). You can modify the subversion working copy of the source at:

BuildRoot/SourceCache/libdispatch/libdispatch-1/

... and then rebuild it:

$ darwinbuild libdispatch

... and when you're done modifying it, you can generate a root to send to others:

$ /usr/local/share/darwinbuild/packageRoots 
$ ls Packages/
libdispatch.root.tar.gz

... or generate a patch:

$ svn diff BuildRoot/SourceCache/libdispatch/libdispatch-1/  > myfeature.patch

... or commit the changes from the working copy:

$ svn ci BuildRoot/SourceCache/libdispatch/libdispatch-1/ -m 'Done'


Darwinbuild stores the BuildRoot directory on a disk image, so if you reboot and find BuildRoot is a broken symlink, just invoke darwinbuild again and it will remount it.  Each run of darwinbuild should update the working copy so you will always be building HEAD.  You will need to watch for merge conflicts of course if you make changes to the working copy.  Darwinbuild will leave a symlink in your /Developer/Platforms directory. Currently, you have to manually remove that symlink if you destroy your BuildRoot.  If you have any trouble using darwinbuild for libdispatch, you can email this list, or for more general darwinbuild questions, email <darwinbuild-dev at lists.macosforge.org>. 

Thanks
-Bill





More information about the libdispatch-dev mailing list