From owner-freebsd-ports@FreeBSD.ORG Sat Apr 16 23:17:26 2005 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 6DE8316A4D3 for ; Sat, 16 Apr 2005 23:17:26 +0000 (GMT) Received: from mail.black-hole.com (192-34.BHI.COM [216.185.192.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id E82BA43D1F for ; Sat, 16 Apr 2005 23:17:25 +0000 (GMT) (envelope-from hank@blackhole.com) Received: from blackhole.com (mail.black-hole.com [127.0.0.1]) by blackhole.com for ; Sat, 16 Apr 2005 18:15:40 -0500 Message-ID: <380-220054616231540281@blackhole.com> X-Priority: 3 From: "Henry Miller" To: freebsd-ports@freebsd.org Date: Sat, 16 Apr 2005 18:15:40 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: dependancys optional plugings 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: Sat, 16 Apr 2005 23:17:26 -0000 Greetings,=20 I'm working on a port for krecipes http://sourceforge=2Enet/projects/krecipes/ the first draft is already in ports/79038, but it isn't acceptable in the current format, because any/all of 3 databases could be chosen, while I only deal with one=2E Actually it might be acceptable, I think the objection stated does not apply=2E Anyway, I'm in the process of cleaning it up, and wondering how to deal with the options=2E I originally placed sqlite as the default database (probably the best), but MySQL or Postgresql could be used instead by installing databases/qt-mysql-plug-in or databases/qt-pgsql-plug-in (respectively)=2E No changes are required to the port=2E I can check for the WITH=5FMYSQL and WITH=5FPOSTGRESQL variables easily enough=2E Adding a WITHOUT=5FSQLITE variable is also easy=2E However I'm not sure what to do about all the special cases that come up by combining them=2E One user is limited to one database backend=2E You can import recipes from one database to the other if you want to switch, but there is no provision for using two backends at the same time=2E =20 The options as I seem them follows=2E Which is the preferred way of handling this=3F Easiest is to install all the backends all the time, but that is clearly wrong=2E It wastes disk space if nothing else, but it also installs clients, which might conflict with a different version the user has installed=2E Next easiest is to do what I did: make sqlite the database=2E Users who want MySQL or Postgresql just need to install the plug-in manually=2E I have verified that if the plug-in is installed after krecipes it is useable without any other effort=2E A trivial modification is to look for the WITH=5F variable and require the plugins=2E The only downside is a plug-in could be installed and used latter, and that would not be reflected in the dependency lists, meaning cutleaves or similar would suggest removing it even though it is a dependency=2E There are configure arguments to disable any database=2E If WITH=5FMYSQL is not specified I could disable looking for the MySQL plug-in=2E (same for postgresql) This solves the dependency issue, but at the cost of requiring a rebuild to add backends=2E=20 As a last question, is there any reason to make a different backend default=3F MySQL is perhaps the most stable as the others were added latter=2E Sqlite has no administration costs though=2E