Re: cdb library redist

Jeff King <[email protected]> Tue, 8 Jun 2004 14:33:59 -0400 (EDT)
Newsgroups gmane.comp.djb.cdb
Message-ID <[email protected]>
On Tue, 8 Jun 2004, Luca Morettoni wrote:

> sure, but I plan to distribuite my application to the pubblic domain
> and I can't (and I don't want) to redist compiled version of cdb
> package. Now I think to put all cdb files in a subdir and my project
> get that files (*.a etc..) from it or I put the sources togeter with
> my...

In this case, yes, you should redistribute the source files. From
<URL:http://cr.yp.to/cdb.html>:
  Packages that need to read cdb files should incorporate the necessary
  portions of the cdb library rather than relying on an external cdb
  library.

You can manually copy the files from the cdb directory to your project;
you should need only a few of them. Here are the minimal files required
for cdb reading functionality:

byte.h cdb.h error.h seek.h uint32.h uint64.h
byte_copy.c byte_diff.c cdb.c cdb_hash.c error.c seek_set.c trycpp.c
tryerrno.c tryulong32.c uint32_unpack.c x86cpuid.c

You'll need to grab the rules from the cdb Makefile to build everything.
Alternatively, there are systems to help you 'borrow' files from other
packages into your own. For example:
  http://www.superscript.com/build/intro.html

I also have a different system I use personally, but I haven't released
it. :) Let me know if you're interested.

-Peff