ports/92656: [Maintainer] use OPTIONS knob with postgresql/ mysql dependency
Choe, Cheng-Dae
whitekid at gmail.com
Wed Feb 1 01:50:04 UTC 2006
>Number: 92656
>Category: ports
>Synopsis: [Maintainer] use OPTIONS knob with postgresql/ mysql dependency
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Feb 01 01:50:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: "Choe, Cheng-Dae"
>Release: FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD w.comdongin.com 6.0-STABLE FreeBSD 6.0-STABLE #1: Sat Jan 21 00:34:59 KST 2006 root at w.comdongin.com:/usr/obj/data/src/sys/CDI i386
>Description:
- use OPTIONS knob on database dependency selection
- bsd.python.mk has problem on OPTIONS knob. To resolve this problem modify %{OPTIONS_FILE} variable at port's Makefile (comes from www/py-django ports)
>How-To-Repeat:
N/A
>Fix:
diff -ruN py-sqlobject.orig/Makefile py-sqlobject/Makefile
--- py-sqlobject.orig/Makefile Fri Nov 18 02:48:26 2005
+++ py-sqlobject/Makefile Wed Feb 1 09:52:22 2006
@@ -7,7 +7,7 @@
PORTNAME= sqlobject
PORTVERSION= 0.7.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases python
MASTER_SITES= http://cheeseshop.python.org/packages/source/S/SQLObject/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -16,10 +16,7 @@
MAINTAINER= whitekid at gmail.com
COMMENT= A python object for manipulation with SQL table row
-# Someone will add SQLite, Firebird and DBMConnection support things.
-RUN_DEPENDS= ${PYTHON_SITELIBDIR}/formencode/__init__.py:${PORTSDIR}/www/py-formencode \
- ${PYTHON_SITELIBDIR}/MySQLdb/__init__.py:${PORTSDIR}/databases/py-MySQLdb \
- ${PYTHON_SITELIBDIR}/psycopgmodule.so:${PORTSDIR}/databases/py-psycopg
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/formencode/__init__.py:${PORTSDIR}/www/py-formencode
USE_PYTHON= yes
USE_PYDISTUTILS= yes
@@ -29,6 +26,22 @@
PORTDOCS= *
+OPTIONS= PGSQL "PostgreSQL support" off \
+ MYSQL "MySQL support" off
+
+# bypass infrastructure bug
+OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_PGSQL)
+RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psycopgmodule.so:${PORTSDIR}/databases/py-psycopg
+.endif
+
+.if defined(WITH_MYSQL)
+RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/MySQLdb/__init__.py:${PORTSDIR}/databases/py-MySQLdb
+.endif
+
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
@@ -36,4 +49,4 @@
${CP} -r ${WRKSRC}/docs/* ${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list