Skip to content
anhi edited this page Jul 14, 2015 · 4 revisions

How to contribute to BALL's contrib directory

This repository hosts a collection of cmake-scripts that can be used to download, build, and install required and recommended third-party packages for the Biochemical Algorithms Library (BALL).

Each contrib package is hosted in a git repository at

https://github.com/BALL-contrib

These repositories are forks of the upstream repositories, supplemented with patches where required. Generally, we keep our patched versions in a branch called 'ball-contrib'.

Packages

  • boost: a fork of https://github.com/boostorg/boost. The upstream boost repository contains a huge number of submodules (each boost lib is its own submodule, in fact, and there are further submodules for tools). This not only severely complicates maintenance for us, but also leads to clones being very slow. In our fork, we thus convert each sub_module_ to a sub_tree_ by running the following script in the boost repository:

       echo converting $name;
       url=$(git remote -v |head -1 |cut -f2 |cut -d\  -f1);
       cd $toplevel;
       git rm -r $path;
       git commit -m "BALL-Contrib: removed $name to convert to subtree";
       git remote remove $name;
       git remote add -f $name $url;
       git subtree add --prefix=$path/ $name $sha1 --squash
       '```
    
    

Updating our fork to new versions of boost can be done either by updating the main repository and then each of the subtrees using

git subtree pull --prefix libs/NAME_OF_LIB https://github.com/boostorg/NAME_OF_LIB.git HASH_OR_BRANCH --squash

where NAME_OF_LIB is the name of the library to update and HASH_OR_BRANCH is the git revision to update to (this can be taken from the state of the git submodule in the upstream repository). However, it is probably much simpler (in particular, if new libs are added to boost) to just run the script again on an updated copy of the upstream repository.

  • eigen3: a fork of https://bitbucket.org/eigen/eigen This one is straightforward. The only thing to keep in mind is that upstream is a mercurial repository. To update, make sure you have git-remote-hg installed (may be provided by your git installation), clone github.com/ball-contrib/eigen3, add upstream as remote and update our repository accordingly (git add remote upstream hg::https://bitbucket.org/eigen/eigen; git fetch upstream; git rebase upstream/master; git push)

  • tbb: a git repository for the sources of Intel's Thread Building Blocks (TBB) Unfortunately, there is no upstream repository for us to access. Thus, to update, grab a fresh tarball of the sources, unpack it over a clone of github.com/ball-contrib/tbb.git, commit everything, and push it.

  • openbabel: a fork of github.com/openbabel/openbabel Straightforward, but we need to patch it. We thus use a branch 'ball-contrib', which has to be rebased on the upstream master whenever we want to update.

Clone this wiki locally