From owner-freebsd-ports@FreeBSD.ORG Thu Jun 21 05:14:13 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 57F841065672 for ; Thu, 21 Jun 2012 05:14:13 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1CE4F8FC0A for ; Thu, 21 Jun 2012 05:14:13 +0000 (UTC) Received: by obbun3 with SMTP id un3so502995obb.13 for ; Wed, 20 Jun 2012 22:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=YOCuMF83qfzv+zQmJ4AWhfzDHrdB2biowdWB97VM6LI=; b=kQvhXJ/17uVrCBXVWUheizq4qM/Z8s0fF/Tv/D3oeVBAaAJH4l7anSk+Qq3Ulmclnq smkcX1fUOGYjMn+1xqmLX8kNM8P48C39s8tFnNM4K3hR5Yp0fcwJPzvrhIA5YJzWMmiN BG2lfdjbcIlPDycjhX5etSpnBc2xlpWp8pCXwI3VgIh1D+iJg1j6wb3R2ehZaMXJ/R6Y 6stkC89OaCVVzgq4Ao219pNB6TDBzTppjmrwNzysb2LAaZpBpPoZzRwenk4Tfc/Iy0Ak W8rs1o45x1i13z9Fd4qKX71hrl1SVWLhR5nBfTdvHjsSRIPqnnqXPHSzrBOUO/Us5TOb OcBA== MIME-Version: 1.0 Received: by 10.60.19.67 with SMTP id c3mr26473993oee.2.1340255652679; Wed, 20 Jun 2012 22:14:12 -0700 (PDT) Received: by 10.60.116.38 with HTTP; Wed, 20 Jun 2012 22:14:12 -0700 (PDT) In-Reply-To: References: Date: Thu, 21 Jun 2012 00:14:12 -0500 Message-ID: From: Scot Hetzel To: "xenophon\\+freebsd" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: 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:14:13 -0000 On Wed, Jun 20, 2012 at 11:38 PM, xenophon\+freebsd wrote: > Hi all, > > I maintain the Django CMS port (www/py-django-cms). =A0I 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. =A0The Django port (www/py-django) doesn't > include database support by default. =A0If someone naively runs "cd > /usr/ports/www/py-django-cms; make install", Django CMS won't work > properly because of the missing database drivers. =A0The Django port does > have knobs for PostgreSQL, MySQL, and SQLite, but those knobs don't > affect what bits of Django get installed. =A0All the knobs do is add > databases/{py-psycopg2,py-MySQLdb,py-sqlite3} to the Django package's > RUN_DEPENDS. =A0As 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. =A0This 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=3D DATABASE OPTIONS_MULTI_DATABASE=3D MYSQL PGSQL SQLITE OPTIONS_DEFAULT=3D SQLITE .include .if ${PORT_OPTIONS:MMYSQL} RUN_DEPENDS+=3D ${PYTHON_PKGNAMEPREFIX}MySQLdb>=3D1.2.2:${PORTSDIR}/databas= es/py-MySQLdb .endif .if ${PORT_OPTIONS:MPGSQL} RUN_DEPENDS+=3D ${PYTHON_SITELIBDIR}/psycopg2/_psycopg.so:${PORTSDIR}/datab= ases/py-psycopg2 .endif .if ${PORT_OPTIONS:MSQLITE} RUN_DEPENDS+=3D ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-s= qlite3 .endif : : .include Scot