diff options
author | mva <mva@FreeBSD.org> | 2013-09-28 19:13:15 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2013-09-28 19:13:15 +0800 |
commit | 1ec7a061324e09f0cfa19d0733c74dbd80dc9996 (patch) | |
tree | 69a496f998353664c19d5adcc39836d8d3443ce5 /databases/py-forgetsql | |
parent | 1f8dd8ef54ff8fa32b7771423a3ad4fb46dfa55a (diff) | |
download | freebsd-ports-gnome-1ec7a061324e09f0cfa19d0733c74dbd80dc9996.tar.gz freebsd-ports-gnome-1ec7a061324e09f0cfa19d0733c74dbd80dc9996.tar.zst freebsd-ports-gnome-1ec7a061324e09f0cfa19d0733c74dbd80dc9996.zip |
- Convert to PYDISTUTILS_AUTOPLIST
- Enable stage support
- Limit to the supported python versions
- Change to new LIB_DEPENDS where necessary
- Switch to new OPTIONS framework where necessary
Diffstat (limited to 'databases/py-forgetsql')
-rw-r--r-- | databases/py-forgetsql/Makefile | 33 | ||||
-rw-r--r-- | databases/py-forgetsql/pkg-plist | 4 |
2 files changed, 17 insertions, 20 deletions
diff --git a/databases/py-forgetsql/Makefile b/databases/py-forgetsql/Makefile index c146f8fef875..9357f1245cc3 100644 --- a/databases/py-forgetsql/Makefile +++ b/databases/py-forgetsql/Makefile @@ -3,6 +3,7 @@ PORTNAME= forgetsql PORTVERSION= 0.5.1 +PORTREVISION= 1 CATEGORIES= databases python MASTER_SITES= SF PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,37 +12,37 @@ DISTNAME= forgetSQL-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Python module for object-oriented access to SQL databases -.if defined(WITH_POSTGRESQL) -RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/psycopgmodule.so:${PORTSDIR}/databases/py-psycopg -.endif -.if defined(WITH_MYSQL) -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:${PORTSDIR}/databases/py-MySQLdb -.endif - -USE_PYTHON= yes +USE_PYTHON= -2.7 USE_PYDISTUTILS= yes +PYDISTUTILS_AUTOPLIST= yes PYDISTUTILS_PKGNAME= forgetSQL DOCS= BUGS README TODO -NO_STAGE= yes +OPTIONS_DEFINE= DOCS MYSQL PGSQL + +MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:${PORTSDIR}/databases/py-MySQLdb +PGSQL_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/psycopgmodule.so:${PORTSDIR}/databases/py-psycopg + +.include <bsd.port.options.mk> + post-build: @cd ${WRKSRC}/lib && ${PYTHON_CMD} -c 'import forgetSQL' @cd ${WRKSRC}/lib && ${PYTHON_CMD} -O -c 'import forgetSQL' post-install: - ${INSTALL_DATA} ${WRKSRC}/lib/forgetSQL.pyc ${PYTHON_SITELIBDIR}/ - ${INSTALL_DATA} ${WRKSRC}/lib/forgetSQL.pyo ${PYTHON_SITELIBDIR}/ -.if !defined(WITH_POSTGRESQL) && !defined(WITH_MYSQL) + ${INSTALL_DATA} ${WRKSRC}/lib/forgetSQL.pyc ${STAGEDIR}${PYTHON_SITELIBDIR}/ + ${INSTALL_DATA} ${WRKSRC}/lib/forgetSQL.pyo ${STAGEDIR}${PYTHON_SITELIBDIR}/ +.if !${PORT_OPTIONS:MPGSQL} && !${PORT_OPTIONS:MMYSQL} @${ECHO} - @${ECHO_MSG} "===> You did not set WITH_MYSQL or WITH_POSTGRESQL. To make this port usable," + @${ECHO_MSG} "===> You did not set MYSQL or PGSQL. To make this port usable," @${ECHO_MSG} "===> you should install py-psycopg or py-MySQLdb from ports/databases." @${ECHO} .endif -.if !defined(NOPORTDOCS) - ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} + ${INSTALL} -d -o root -g wheel -m 0755 ${STAGEDIR}${DOCSDIR} .for f in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/ + ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/ .endfor .endif diff --git a/databases/py-forgetsql/pkg-plist b/databases/py-forgetsql/pkg-plist index 2d672fd9bcf2..35a0a75e7cc2 100644 --- a/databases/py-forgetsql/pkg-plist +++ b/databases/py-forgetsql/pkg-plist @@ -1,7 +1,3 @@ -bin/forgetsql-generate -%%PYTHON_SITELIBDIR%%/forgetSQL.py -%%PYTHON_SITELIBDIR%%/forgetSQL.pyc -%%PYTHON_SITELIBDIR%%/forgetSQL.pyo %%PORTDOCS%%%%DOCSDIR%%/BUGS %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/TODO |