diff options
author | lwhsu <lwhsu@FreeBSD.org> | 2009-07-08 17:12:46 +0800 |
---|---|---|
committer | lwhsu <lwhsu@FreeBSD.org> | 2009-07-08 17:12:46 +0800 |
commit | 9b40338aa4bdc4957218b811e5f368604ae6905a (patch) | |
tree | e588e0cd2bc7c0b937f77ab8e63d6a1235f8103d /databases | |
parent | e5635ff7fd8859d27ca6be6004f9e7a1ddfff2df (diff) | |
download | freebsd-ports-gnome-9b40338aa4bdc4957218b811e5f368604ae6905a.tar.gz freebsd-ports-gnome-9b40338aa4bdc4957218b811e5f368604ae6905a.tar.zst freebsd-ports-gnome-9b40338aa4bdc4957218b811e5f368604ae6905a.zip |
- Fix building with python3*
- Use checksum file under lang/python${PYTHON_SUFFIX}/,
for removal lang/python/distinfo
PR: ports/136199
Submitted by: lwhsu
Approved by: perky
Diffstat (limited to 'databases')
-rw-r--r-- | databases/py-gdbm/Makefile | 10 | ||||
-rw-r--r-- | databases/py-gdbm/files/setup3.py | 28 |
2 files changed, 36 insertions, 2 deletions
diff --git a/databases/py-gdbm/Makefile b/databases/py-gdbm/Makefile index 26272084da7e..29e1f42e6569 100644 --- a/databases/py-gdbm/Makefile +++ b/databases/py-gdbm/Makefile @@ -24,9 +24,15 @@ USE_PYTHON= yes USE_PYDISTUTILS=yes PYDISTUTILS_PKGVERSION= 0.0.0 WRKSRC= ${PYTHON_WRKSRC}/Modules -MD5_FILE= ${PORTSDIR}/lang/python/distinfo +MD5_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo + +.include <bsd.port.pre.mk> post-extract: +.if ${PYTHON_REL} < 300 @${CP} ${FILESDIR}/setup.py ${WRKSRC} +.else + @${CP} ${FILESDIR}/setup3.py ${WRKSRC}/setup.py +.endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/databases/py-gdbm/files/setup3.py b/databases/py-gdbm/files/setup3.py new file mode 100644 index 000000000000..382264277fc6 --- /dev/null +++ b/databases/py-gdbm/files/setup3.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +# To use: +# python setup.py install +# + +__version__ = "$FreeBSD$" + +try: + import distutils + from distutils import sysconfig + from distutils.command.install import install + from distutils.core import setup, Extension +except: + raise SystemExit("Distutils problem") + +prefix = sysconfig.PREFIX +inc_dirs = [prefix + "/include"] +lib_dirs = [prefix + "/lib"] +libs = ["gdbm"] + +setup(name = "gdbm", + description = "GDBM Extension to Python", + + ext_modules = [Extension('gdbm', ['_gdbmmodule.c'], + include_dirs = inc_dirs, + libraries = libs, + library_dirs = lib_dirs)] + ) |