Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2012 22:32:47 -0700
From:      Jason Helfman <jhelfman@e-e.com>
To:        Scot Hetzel <swhetzel@gmail.com>
Cc:        "xenophon\\+freebsd" <xenophon+freebsd@irtnog.org>, freebsd-ports@freebsd.org
Subject:   Re: Need advice on a problems with the Django CMS port
Message-ID:  <20120621053247.GA15051@dormouse.experts-exchange.com>
In-Reply-To: <CACdU%2Bf_fYzeC9m8HkZhgTaMyzbMGJFjdw-fncZuSviT1KmnMCw@mail.gmail.com>
References:  <BABF8C57A778F04791343E5601659908236C2F@cinip100ntsbs.irtnog.net> <CACdU%2Bf_fYzeC9m8HkZhgTaMyzbMGJFjdw-fncZuSviT1KmnMCw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
><xenophon+freebsd@irtnog.org> 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 <bsd.port.options.mk>
>
>.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 <bsd.port.mk>
>
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120621053247.GA15051>