diff options
author | drochner <drochner@pkgsrc.org> | 2002-01-28 09:30:08 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2002-01-28 09:30:08 +0000 |
commit | 04a768f05aeca0d1bdaf37c57d96575c32a31652 (patch) | |
tree | fe5860441007f7a6027e99095bbd0f169dad1062 /databases | |
parent | 2111e94c45ef81ea7e3af1e57751321009055167 (diff) | |
download | pkgsrc-04a768f05aeca0d1bdaf37c57d96575c32a31652.tar.gz |
use distutils to build the extension module, to make it work with
newer Python versions too,
XXX we have to override the do-patch rule to avoid patch errors
(we use EXTRACT_ELEMENTS, so we don't generally have all the
original files)
Diffstat (limited to 'databases')
-rw-r--r-- | databases/py-gdbm/Makefile | 26 | ||||
-rw-r--r-- | databases/py-gdbm/PLIST | 4 | ||||
-rw-r--r-- | databases/py-gdbm/distinfo | 4 | ||||
-rw-r--r-- | databases/py-gdbm/files/setup.py | 21 |
4 files changed, 39 insertions, 16 deletions
diff --git a/databases/py-gdbm/Makefile b/databases/py-gdbm/Makefile index 49a5e4422e7..d566030fff4 100644 --- a/databases/py-gdbm/Makefile +++ b/databases/py-gdbm/Makefile @@ -1,24 +1,30 @@ -# $NetBSD: Makefile,v 1.14 2001/02/16 14:17:37 wiz Exp $ +# $NetBSD: Makefile,v 1.15 2002/01/28 09:30:08 drochner Exp $ # -DISTNAME= ${PY_DISTNAME} -PKGNAME= py-gdbm-${PY_VERSION} -WRKSRC= ${PY_WRKSRC} +PKGNAME= ${PYPKGPREFIX}-gdbm-0 CATEGORIES= databases -MASTER_SITES= ${PY_MASTER_SITES} MAINTAINER= dolecek@ics.muni.cz HOMEPAGE= http://www.python.org/doc/lib/module-gdbm.html COMMENT= Python interface to gdbm - GNU database manager DEPENDS+= gdbm>=1.7.3:../../databases/gdbm +EVAL_PREFIX+= GDBMDIR=gdbm -EXTRACT_ELEMENTS= ${PY_MODULES}/gdbmmodule.c +EXTRACT_ELEMENTS= ${PYSUBDIR}/Modules/gdbmmodule.c +PYDISTUTILSPKG= yes +PYBINMODULE= yes +PY_PATCHPLIST= yes -do-configure: python-std-do-configure +PY_SETUP_SUBST+= GDBMPREFIX=${GDBMDIR} -do-install: - ${INSTALL_DATA} ${WRKSRC}/gdbmmodule.so ${PY_LIBDIR}/lib-dynload +# ignore errors due to missing files (EXTRACT_ELEMENTS!) +do-patch: + (cd ${WRKSRC}; \ + for f in ${PATCHDIR}/patch-*;do \ + ${PATCH} --batch <$$f || true; \ + done) -.include "../../lang/python/Makefile.inc" +.include "../../lang/python/srcdist.mk" +.include "../../lang/python/extension.buildlink.mk" .include "../../mk/bsd.pkg.mk" diff --git a/databases/py-gdbm/PLIST b/databases/py-gdbm/PLIST index 8aa7af34100..baafbe91492 100644 --- a/databases/py-gdbm/PLIST +++ b/databases/py-gdbm/PLIST @@ -1,2 +1,2 @@ -@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:12:42 zuntum Exp $ -lib/python2.0/lib-dynload/gdbmmodule.so +@comment $NetBSD: PLIST,v 1.2 2002/01/28 09:30:09 drochner Exp $ +${PYSITELIB}/gdbm.so diff --git a/databases/py-gdbm/distinfo b/databases/py-gdbm/distinfo deleted file mode 100644 index fb51f27af84..00000000000 --- a/databases/py-gdbm/distinfo +++ /dev/null @@ -1,4 +0,0 @@ -$NetBSD: distinfo,v 1.2 2001/04/18 16:11:03 agc Exp $ - -SHA1 (python/BeOpen-Python-2.0.tar.gz) = 16ca42c5be1ddf5dc08d9b59b97f728f330e1fdc -Size (python/BeOpen-Python-2.0.tar.gz) = 4066781 bytes diff --git a/databases/py-gdbm/files/setup.py b/databases/py-gdbm/files/setup.py new file mode 100644 index 00000000000..2fce8c62aa1 --- /dev/null +++ b/databases/py-gdbm/files/setup.py @@ -0,0 +1,21 @@ +# $NetBSD: setup.py,v 1.1 2002/01/28 09:30:10 drochner Exp $ + +import distutils +from distutils.core import setup, Extension + +gdbmprefix = '@GDBMPREFIX@' +gdbmincl = gdbmprefix + '/include' +gdbmlib = gdbmprefix + '/lib' + +setup( + ext_modules = [ + Extension( + 'gdbm', + ['Modules/gdbmmodule.c'], + include_dirs=[gdbmincl], + library_dirs=[gdbmlib], + runtime_library_dirs=[gdbmlib], + libraries=['gdbm'] + ) + ] +) |