Skip to content

mok0/gpp4

Repository files navigation

Introduction
------------

This distribution is a special version of the CCP4 library, released
under the Lesser GNU Public License version 2.1.

The last version of the CCP4 library covered by a free license was
version 5.0.2. That version was patched by Ralf Grosse-Kunstleve to
address some of the more serious deficiencies of the older library.
It is the patched version of the CCP4 library that forms the basis for
this distribution, which includes a GNU autotools build environment
developed by Paul Emsley and Morten Kjeldgaard.

The reason for creating this public fork of the CCP4 libraries is that
several third party software distributions depend on the CCP4
libraries. However, you cannot create a derived work containing both
CCP4 6.* licensed code and GPL'd code, and distribute the resulting
software, since the GPL demands that the derived work be distributed
without additional restrictions and the CCP4 6.* license imposes
additional restrictions on redistribution - in particular (but not
limited to) an indemnity clause.

The goal of this project -- named gpp4 to distinguish it from CCP4 --
is to provide a drop-in replacement for the non-free CCP4 libraries,
that as carefully as possible will implement the current CCP4 library
interface.


Building gpp4
-------------

The distribution includes two libraries, libgpp4, which is the C
interface, and optionally libgpp4f, which is the fortran interface. To
compile the Fortran library, it is required that the MMDB library is
installed. This library can be fetched from the Launchpad project at
 
 <https://launchpad.net/mmdb>

either as a tar.gz archive or as a bazaar branch. To retrieve this,
issue this from a suitable directory:

 bzr branch lp:mmdb


Using the library
-----------------

The header files for gpp4 are by default installed in
$prefix/include/gpp4/ccp4/* which means that gpp4 should be a
transparent drop-in replacement for the CCP4 libraries, if your C
source files use includes of the form:

  #include <ccp4/cmaplib.h>

In this case, it is necessary to pass the flag -I/usr/include/gpp4 to
the compiler. Gpp4 supports the pkg-config interface, which means you
can compile your program something like this:

  gcc -o foo `pkgconfig gpp4 --cflags --libs` foo.c

In case your program uses the following include form (not recommended):

  #include "cmaplib.h"

you need to pass the complete include path to the compiler
(-I/usr/include/gpp4/ccp4) and you cannot make use of the pkg-config
interface.