From owner-freebsd-ports@FreeBSD.ORG Thu Jun 21 05:34:29 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D14C1065672 for ; Thu, 21 Jun 2012 05:34:29 +0000 (UTC) (envelope-from jhelfman@experts-exchange.com) Received: from mail.dw.redsrci.com (mail.pub.dw.redsrci.com [72.29.183.251]) by mx1.freebsd.org (Postfix) with ESMTP id 40F088FC17 for ; Thu, 21 Jun 2012 05:34:29 +0000 (UTC) Received: from mail.dw.redsrci.com (localhost [127.0.0.1]) by mail.dw.redsrci.com (Postfix) with ESMTP id 23AB3714D3B; Wed, 20 Jun 2012 22:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=e-e.com; h= user-agent:organization:in-reply-to:content-transfer-encoding :content-disposition:content-type:content-type:mime-version :references:message-id:subject:subject:from:from:date:date :received:received:received; s=ee; t=1340256863; x=1342071263; bh=R+QI/N8rF/llUctvsOqACnKJnkS12dLunrvnyx1UVts=; b=ghnuMsBa2vkd UXmCm/A23utJopnTRn9Cgv/8N/e+ta3V/xWVNHkt1gYNn1UXAZH8a+w8u8ma4Md2 CUid1A4OOWGvqE2SGqhUmiE74OiDY5ugCxsrUs4aEbewS47ccUM+oOPuNlfMJfDM uSprSJmKtJix5RfB91C4gcNZ8lYnzd4= X-Virus-Scanned: amavisd-new at experts-exchange.com Received: from mail.dw.redsrci.com ([127.0.0.1]) by mail.dw.redsrci.com (mail.dw.redsrci.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pvVx33q5Cu-n; Wed, 20 Jun 2012 22:34:23 -0700 (PDT) Received: from experts-exchange.com (unknown [192.168.103.120]) by mail.dw.redsrci.com (Postfix) with SMTP id F244F714D00; Wed, 20 Jun 2012 22:34:22 -0700 (PDT) Received: (nullmailer pid 15117 invoked by uid 1001); Thu, 21 Jun 2012 05:32:47 -0000 Date: Wed, 20 Jun 2012 22:32:47 -0700 From: Jason Helfman To: Scot Hetzel Message-ID: <20120621053247.GA15051@dormouse.experts-exchange.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 8.3-RELEASE amd64 Organization: Experts-Exchange, LLC. http://www.experts-exchange.com X-Living-The-Dream: I love the SLO Life! User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "xenophon\\+freebsd" , freebsd-ports@freebsd.org Subject: Re: Need advice on a problems with the Django CMS port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2012 05:34:29 -0000 On Thu, Jun 21, 2012 at 12:14:12AM -0500, Scot Hetzel thus spake: >On Wed, Jun 20, 2012 at 11:38 PM, xenophon\+freebsd > wrote: >> Hi all, >> >> I maintain the Django CMS port (www/py-django-cms).  I could use some >> advice on the following problem both from other maintainers and from >> other users of the ports tree: >> >> Django CMS requires a database backend, which it accesses through the >> Django web app framework.  The Django port (www/py-django) doesn't >> include database support by default.  If someone naively runs "cd >> /usr/ports/www/py-django-cms; make install", Django CMS won't work >> properly because of the missing database drivers.  The Django port does >> have knobs for PostgreSQL, MySQL, and SQLite, but those knobs don't >> affect what bits of Django get installed.  All the knobs do is add >> databases/{py-psycopg2,py-MySQLdb,py-sqlite3} to the Django package's >> RUN_DEPENDS.  As I see it, I have the following options: >> >: >> (c) I could add knobs to the Django CMS port similar to those found in >> the Django port (i.e., add to RUN_DEPENDS if knob is set) - >> functionally, it doesn't matter which port pulls in the required >> database drivers.  This is probably the most user friendly, in that a >> single run of "make install" will result in a working version of Django >> CMS. >> >> I think option (c) is the best, but I'd love to hear what the community >> thinks. >> >Option C would be the best, as the port depends on a database (MySQL, >PostgreSQL or SQLite). > >I believe the following would work with the new options framework: > >OPTIONS_MULTI= DATABASE >OPTIONS_MULTI_DATABASE= MYSQL PGSQL SQLITE > >OPTIONS_DEFAULT= SQLITE > >.include > >.if ${PORT_OPTIONS:MMYSQL} >RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:${PORTSDIR}/databases/py-MySQLdb >.endif > >.if ${PORT_OPTIONS:MPGSQL} >RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psycopg2/_psycopg.so:${PORTSDIR}/databases/py-psycopg2 >.endif >.if ${PORT_OPTIONS:MSQLITE} >RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 >.endif >: >: >.include > >Scot At a minimum, I would suggest to also include an applicable client in each case as well, that is, if they aren't included in the software or the dependency tree. -jgh -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html E4AD 7CF1 1396 27F6 79DD 4342 5E92 AD66 8C8C FBA5