diff options
author | obache <obache@pkgsrc.org> | 2011-11-03 12:21:41 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-11-03 12:21:41 +0000 |
commit | 84956bc67105656bc6cc80a7e36f0f2800c3f0c7 (patch) | |
tree | d6f182795633d3acc0ad71048ab1b0a2d680aff4 /databases/py-gdbm | |
parent | b914b60c81cd7d44a27f54c19209f307cd17d3a6 (diff) | |
download | pkgsrc-84956bc67105656bc6cc80a7e36f0f2800c3f0c7.tar.gz |
Support Python3.
Diffstat (limited to 'databases/py-gdbm')
-rw-r--r-- | databases/py-gdbm/Makefile | 13 | ||||
-rw-r--r-- | databases/py-gdbm/PLIST | 4 | ||||
-rw-r--r-- | databases/py-gdbm/files/Setup.in | 4 | ||||
-rw-r--r-- | databases/py-gdbm/files/setup.py | 6 |
4 files changed, 18 insertions, 9 deletions
diff --git a/databases/py-gdbm/Makefile b/databases/py-gdbm/Makefile index 2eee1205c11..be0194cb56e 100644 --- a/databases/py-gdbm/Makefile +++ b/databases/py-gdbm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2011/08/23 13:06:48 obache Exp $ +# $NetBSD: Makefile,v 1.29 2011/11/03 12:21:41 obache Exp $ # PKGNAME= ${PYPKGPREFIX}-gdbm-0 @@ -15,11 +15,20 @@ EVAL_PREFIX+= GDBMDIR=gdbm USE_TOOLS+= patch -EXTRACT_ELEMENTS= ${PYSUBDIR}/Modules/gdbmmodule.c +.include "../../lang/python/pyversion.mk" +.if !empty(PYPKGPREFIX:Mpy3?) +GDBM_MODNAME= _gdbm +.else +GDBM_MODNAME= gdbm +.endif + +EXTRACT_ELEMENTS= ${PYSUBDIR}/Modules/${GDBM_MODNAME}module.c PYDISTUTILSPKG= yes PY_PATCHPLIST= yes PY_SETUP_SUBST+= GDBMPREFIX=${GDBMDIR} +PY_SETUP_SUBST+= GDBM_MODNAME=${GDBM_MODNAME} +PLIST_SUBST+= GDBM_MODNAME=${GDBM_MODNAME} PYSETUPINSTALLARGS+= --install-lib ${PREFIX}/${PYLIB}/lib-dynload # ignore errors due to missing files (EXTRACT_ELEMENTS!) diff --git a/databases/py-gdbm/PLIST b/databases/py-gdbm/PLIST index c17ee7395c4..f422215f378 100644 --- a/databases/py-gdbm/PLIST +++ b/databases/py-gdbm/PLIST @@ -1,2 +1,2 @@ -@comment $NetBSD: PLIST,v 1.3 2011/05/04 11:38:05 obache Exp $ -${PYLIB}/lib-dynload/gdbm.so +@comment $NetBSD: PLIST,v 1.4 2011/11/03 12:21:41 obache Exp $ +${PYLIB}/lib-dynload/${GDBM_MODNAME}.so diff --git a/databases/py-gdbm/files/Setup.in b/databases/py-gdbm/files/Setup.in index 73241d8d2bf..8e5649ddb6c 100644 --- a/databases/py-gdbm/files/Setup.in +++ b/databases/py-gdbm/files/Setup.in @@ -1,5 +1,5 @@ -# $NetBSD: Setup.in,v 1.3 2000/10/29 20:48:27 tsarna Exp $ +# $NetBSD: Setup.in,v 1.4 2011/11/03 12:21:41 obache Exp $ # *shared* -gdbm gdbmmodule.c -I@LOCALBASE@/include -L@LOCALBASE@/lib \ +@GDBM_MODNAME@ @GDBM_MODNAME@module.c -I@LOCALBASE@/include -L@LOCALBASE@/lib \ -R@LOCALBASE@/lib -lgdbm diff --git a/databases/py-gdbm/files/setup.py b/databases/py-gdbm/files/setup.py index 2fce8c62aa1..2e36d876ab2 100644 --- a/databases/py-gdbm/files/setup.py +++ b/databases/py-gdbm/files/setup.py @@ -1,4 +1,4 @@ -# $NetBSD: setup.py,v 1.1 2002/01/28 09:30:10 drochner Exp $ +# $NetBSD: setup.py,v 1.2 2011/11/03 12:21:41 obache Exp $ import distutils from distutils.core import setup, Extension @@ -10,8 +10,8 @@ gdbmlib = gdbmprefix + '/lib' setup( ext_modules = [ Extension( - 'gdbm', - ['Modules/gdbmmodule.c'], + '@GDBM_MODNAME@', + ['Modules/@GDBM_MODNAME@module.c'], include_dirs=[gdbmincl], library_dirs=[gdbmlib], runtime_library_dirs=[gdbmlib], |