From owner-freebsd-ports@FreeBSD.ORG Thu Nov 6 06:19:28 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AC4A16A4CE for ; Thu, 6 Nov 2003 06:19:28 -0800 (PST) Received: from mail.dt.e-technik.uni-dortmund.de (mail.dt.e-technik.Uni-Dortmund.DE [129.217.163.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46AD743FBD for ; Thu, 6 Nov 2003 06:19:27 -0800 (PST) (envelope-from matthias.andree@gmx.de) Received: from m2a2.dyndns.org (krusty.dt.e-technik.uni-dortmund.de [129.217.163.1])66F6F183A for ; Thu, 6 Nov 2003 15:19:26 +0100 (CET) Received: by merlin.emma.line.org (Postfix, from userid 500) id 1D8749D1A6; Thu, 6 Nov 2003 15:19:25 +0100 (CET) Date: Thu, 6 Nov 2003 15:19:25 +0100 From: Matthias Andree To: freebsd-ports@freebsd.org Message-ID: <20031106141924.GA11241@merlin.emma.line.org> Mail-Followup-To: freebsd-ports@freebsd.org References: <3FAA3B77.7090002@fillmore-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FAA3B77.7090002@fillmore-labs.com> User-Agent: Mutt/1.5.4i Subject: Re: RFC: FreeBSD DB Port Reform X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2003 14:19:28 -0000 On Thu, 06 Nov 2003, Oliver Eikemeier wrote: > > 2. bsd.ports.mk should be extended to support WITH_BDB_VER, > > USE_BDB_VER or WANT_BDB_VER or something that presets a set of > > variables, for instance BDB_VERSION, BDB_INCLUDES, BDB_LIBNAME, > > BDB_LIBPATH and LIB_DEPENDS, to lift shared code out of the > > individual ports into bsd.ports.mk. > No WITH_* options in bsd.ports.mk, they are supposed to use as make > arguments > to communicate user => port. WITH_BDB_VER was removed from the draft. > > 3. for db3, db4 and db41, the following changes are made: > > 1. all programs move into $PREFIX/BerkeleyDB.N.M/bin/db_* > That violates hier(7). How about moving them to libexec? It's a bit difficult. We have three db_dump variants that all link against different libraries, but that have the same name. We could, alternatively, symlink those from $PREFIX/BerkeleyDB.N.M/bin/db_* to $PREFIX/bin/db_*-N.M > > 4. all libraries move into $PREFIX/BerkeleyDB.N.M/lib, because > > BerkeleyDB installs not only libdb-N.M* but also libdb-N* and > > libdb* (where * is .so.N, .so or .a), which cannot work in > > the same path. > Same as above. How about lib/db-N.M? Berkeley documentation recommends including db.h (so the port adds -I...) and linking with -ldb (so the port adds -L$PREFIX/BerkeleyDB.N.M/lib). My ultimate goal is to get rid of all FreeBSD-specific patches. If we don't have a libdb.so in a distinct directory, we'll again need to patch or ${REINPLACE_CMD} Makefiles, which this reform is trying to address. > > 6. documentation moves into $PREFIX/share/doc/BerkeleyDB.N.M and > > is symlinked from $PREFIX/BerkeleyDB.N.M/docs > The symlink should not be necessary. Documentation will remain in the default $PREFIX/share/doc/${PORTNAME} for compatibility. > Could you explain stupid people like me again what you gain by not simply > renaming the libraries to libdb-3.3, libdb-4.0 and libdb-4.1 and leaving > the other stuff as it is now? That is what we'll see in /usr/local/lib/: the SONAMEs. The documentation however suggests linking against libdb.so, by using -ldb. http://www.sleepycat.com/docs/ref/build_unix/shlib.html We'd need some mechanism to allow applications (remember, they are provided by third parties) continue to use -ldb, by just adding LDFLAGS=-L/usr/local/BerkeleyDB-N.M/lib. Using LIBS=-ldb-4.1 doesn't work universally. > IMHO ports that expect a BerkeleyDB.N.M directory under /usr/local violate > hier(7), and does this approach work with the ldconfig -r LIB_DEPENDS > checking > we have in bsd.port.mk? The /usr/local/BerkeleyDB.N.M/lib directory's use is relevant at build time. Of course, we can drop support for db2, db3, db4 instead and mark all ports that don't support db41 as broken. But that's even more intrusive than my suggestion. Thanks for your comments. A new 0.2 version of the document has been posted, the ports are unchanged from the first draft. -- Matthias Andree Encrypt your mail: my GnuPG key ID is 0x052E7D95