aboutsummaryrefslogtreecommitdiffstats
path: root/databases/py-psycopg
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2014-07-04 05:48:44 +0800
committeradamw <adamw@FreeBSD.org>2014-07-04 05:48:44 +0800
commita4b79350eebbf824db93c259b72cb7883a1a395a (patch)
treea217c2f6b9317591e25a1528cad83dd0d6c1510b /databases/py-psycopg
parent627059e3b6fe0d48c50f2099e554ecb4ce115e78 (diff)
downloadfreebsd-ports-gnome-a4b79350eebbf824db93c259b72cb7883a1a395a.tar.gz
freebsd-ports-gnome-a4b79350eebbf824db93c259b72cb7883a1a395a.tar.zst
freebsd-ports-gnome-a4b79350eebbf824db93c259b72cb7883a1a395a.zip
Nuke NOPORTDOCS. While, here, correct a couple offenders who label examples
with PORTDOCS. And, fix a couple WITH_foo invocations.
Diffstat (limited to 'databases/py-psycopg')
-rw-r--r--databases/py-psycopg/Makefile26
1 files changed, 9 insertions, 17 deletions
diff --git a/databases/py-psycopg/Makefile b/databases/py-psycopg/Makefile
index 0a42ed7b4ea1..a5cfa92a9655 100644
--- a/databases/py-psycopg/Makefile
+++ b/databases/py-psycopg/Makefile
@@ -28,12 +28,10 @@ CONFIGURE_ARGS= --with-python=${PYTHON_CMD} \
--with-postgres-includes=${LOCALBASE}/include \
--with-mxdatetime-includes=${DATETIME_INC}
-.if defined(WITH_ZOPE)
-USES+= zope
-PLIST_SUB+= ZOPE=""
-.else
-PLIST_SUB+= ZOPE="@comment "
-.endif
+OPTIONS_DEFINE= ZOPE DOCS
+OPTIONS_SUB= yes
+
+ZOPE_USES= zope
DATETIME_DEP= ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py
DATETIME_INC= ${PYTHON_SITELIBDIR}/mx/DateTime/mxDateTime/
@@ -49,14 +47,10 @@ EXAMPLES= binary.py bool.py bounded.py commit.py copy_from.py \
DOCS= AUTHORS COPYING CREDITS ChangeLog FAQ INSTALL NEWS \
README RELEASE-1.0 SUCCESS TODO
-pre-everything::
-.if !defined(WITH_ZOPE)
- @${ECHO} ""
- @${ECHO} "* To build with Zope support please specify WITH_ZOPE=YES"
- @${ECHO} ""
-.endif
-.if defined(WITH_ZOPE)
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MZOPE}
post-build:
${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/ZPsycopgDA
.endif
@@ -65,13 +59,12 @@ do-install:
@${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
${INSTALL_PROGRAM} ${WRKSRC}/psycopgmodule.so \
${STAGEDIR}${PYTHON_SITELIBDIR}
-.if defined(WITH_ZOPE)
+.if ${PORT_OPTIONS:MZOPE}
${MKDIR} ${STAGEDIR}${ZOPEBASEDIR}/${ZOPEPRODUCTDIR}/ZPsycopgDA
${CP} -R ${WRKSRC}/ZPsycopgDA ${STAGEDIR}${ZOPEBASEDIR}/${ZOPEPRODUCTDIR}/
.endif
post-install:
-.if !defined(NOPORTDOCS)
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for f in ${EXAMPLES}
@${INSTALL_DATA} ${WRKSRC}/doc/examples/${f} ${STAGEDIR}${EXAMPLESDIR}
@@ -80,8 +73,7 @@ post-install:
.for f in ${DOCS}
@${INSTALL_MAN} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
-.endif
-.if !defined(BATCH) && defined(WITH_ZOPE)
+.if !defined(BATCH) && ${PORT_OPTIONS:MZOPE}
@${ECHO} ""
@${ECHO} "To complete the installation of ZPsycopgDA:"
@${ECHO} ""