Date: Mon, 4 Aug 2003 23:11:28 +0200 From: Clement Laforet <sheepkiller@cultdeadsheep.org> To: Guy Middleton <guy-dated-1062621938.a8929e@obstruction.com> Cc: guy@obstruction.com Subject: Re: py-MySQLdb depends on mysql323-client Message-ID: <20030804231128.2eb3c9ae.sheepkiller@cultdeadsheep.org> In-Reply-To: <20030804204537.GA30771@chaos.obstruction.com> References: <20030804204537.GA30771@chaos.obstruction.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 Aug 2003 16:45:37 -0400 Guy Middleton <guy@obstruction.com> wrote: > py-MySQLdb depends on mysql323-client. > > This is inconvenient because I'm using mysql40. Could the py-MySQLdb package > be changed so that I can choose which version of MySQL to install? The > MySQLdb README file claims that it works with MySQL 4.0. can you try this patch ? diff -Nru py-MySQLdb.old/Makefile py-MySQLdb/Makefile --- py-MySQLdb.old/Makefile Mon Aug 4 22:54:44 2003 +++ py-MySQLdb/Makefile Mon Aug 4 23:06:36 2003 @@ -15,19 +15,36 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Access a MySQL database through Python -LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client +# MySQL deps hack +MYSQL323_LIBVER=10 +MYSQL40_LIBVER= 12 -USE_PYTHON= yes +USE_PYTHON= yes USE_PYDISTUTILS= yes DOCS= MANIFEST README doc/*.html +.include <bsd.port.pre.mk> + +.if defined(WITH_MYSQL_VER) +MYSQL_VER= ${WITH_MYSQL_VER} +.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL_323_LIBVER}) +MYSQL_VER= 323 +.elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.${MYSQL40_LIBVER}) +MYSQL_VER= 40 +.else +MYSQL_VER= 323 +.endif + +LIB_DEPENDS= mysqlclient.${MYSQL${MYSQL_VER}_LIBVER}:${PORTSDIR}/databases/mysql${MYSQL_VER}-client + .if !defined(NOPORTDOCS) post-install: @${MKDIR} ${DOCSDIR} -.for file in ${DOCS} - @${INSTALL_MAN} ${WRKSRC}/${file} ${DOCSDIR} +.for FILE in ${DOCS} + @${INSTALL_MAN} ${WRKSRC}/${FILE} ${DOCSDIR} .endfor .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> + diff -Nru py-MySQLdb.old/pkg-plist py-MySQLdb/pkg-plist --- py-MySQLdb.old/pkg-plist Mon Aug 4 22:54:44 2003 +++ py-MySQLdb/pkg-plist Mon Aug 4 23:05:45 2003 @@ -44,17 +44,17 @@ lib/%%PYTHON_VERSION%%/site-packages/_mysql_exceptions.py lib/%%PYTHON_VERSION%%/site-packages/_mysql_exceptions.pyc lib/%%PYTHON_VERSION%%/site-packages/_mysql_exceptions.pyo -%%PORTDOCS%%share/doc/py-MySQLdb/MANIFEST -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb-1.html -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb-2.html -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb-3.html -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb-4.html -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb-FAQ-1.html -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb-FAQ-2.html -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb-FAQ-3.html -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb-FAQ.html -%%PORTDOCS%%share/doc/py-MySQLdb/MySQLdb.html -%%PORTDOCS%%share/doc/py-MySQLdb/README -%%PORTDOCS%%@dirrm share/doc/py-MySQLdb +%%PORTDOCS%%%%DOCSDIR%%/MANIFEST +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb-1.html +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb-2.html +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb-3.html +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb-4.html +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb-FAQ-1.html +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb-FAQ-2.html +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb-FAQ-3.html +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb-FAQ.html +%%PORTDOCS%%%%DOCSDIR%%/MySQLdb.html +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm lib/%%PYTHON_VERSION%%/site-packages/MySQLdb/constants @dirrm lib/%%PYTHON_VERSION%%/site-packages/MySQLdb
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030804231128.2eb3c9ae.sheepkiller>