diff options
author | Hye-Shik Chang <perky@FreeBSD.org> | 2003-07-31 20:03:51 +0000 |
---|---|---|
committer | Hye-Shik Chang <perky@FreeBSD.org> | 2003-07-31 20:03:51 +0000 |
commit | cb9cbfb1226d5667c3cec73f4245ba2c9e5d1553 (patch) | |
tree | f88b802cf98e4858a4fec29bf22a47130667110e /databases/py25-bsddb | |
parent | 04b39f4e75824467454cab8d10db950d582b3252 (diff) | |
download | ports-cb9cbfb1226d5667c3cec73f4245ba2c9e5d1553.tar.gz ports-cb9cbfb1226d5667c3cec73f4245ba2c9e5d1553.zip |
Notes
Diffstat (limited to 'databases/py25-bsddb')
-rw-r--r-- | databases/py25-bsddb/Makefile | 50 | ||||
-rw-r--r-- | databases/py25-bsddb/files/setup.py | 29 | ||||
-rw-r--r-- | databases/py25-bsddb/pkg-descr | 1 | ||||
-rw-r--r-- | databases/py25-bsddb/pkg-plist | 1 |
4 files changed, 81 insertions, 0 deletions
diff --git a/databases/py25-bsddb/Makefile b/databases/py25-bsddb/Makefile new file mode 100644 index 000000000000..0715eb7572ac --- /dev/null +++ b/databases/py25-bsddb/Makefile @@ -0,0 +1,50 @@ +# New ports collection makefile for: py-bsddb +# Date created: 31 July 2003 +# Whom: Hye-Shik Chang <perky@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= bsddb +PORTVERSION= ${PYTHON_PORTVERSION} +CATEGORIES= databases python +MASTER_SITES= ${MASTER_SITE_PYTHON} +MASTER_SITE_SUBDIR= ftp/python/${PORTVERSION} +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTFILES= ${PYTHON_DISTFILE} + +MAINTAINER= perky@FreeBSD.org +COMMENT= Python bindings to the Berkeley DB library + +.if defined(WITH_DB3) +LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3 +DBVERSION= db3 +PKGNAMESUFFIX= -db3 +.else +LIB_DEPENDS= db4.0:${PORTSDIR}/databases/db4 +DBVERSION= db4 +.endif + +DIST_SUBDIR= python +USE_PYTHON= yes +USE_PYDISTUTILS=yes +USE_REINPLACE= yes +WRKSRC= ${PYTHON_WRKSRC}/Modules +MD5_FILE= ${PORTSDIR}/lang/python/distinfo +MAKE_ENV= BSDDB_VERSION=${DBVERSION} + +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} < 230 +IGNORE= "is a port for python2.3 and later versions" +.endif + +post-extract: + @${CP} ${FILESDIR}/setup.py ${WRKSRC} + +post-patch: + ${REINPLACE_CMD} -e \ + 's,^\(#include.*\)\(db\.h.*\)$$,\1${DBVERSION}/\2,' \ + ${WRKSRC}/_bsddb.c + +.include <bsd.port.post.mk> diff --git a/databases/py25-bsddb/files/setup.py b/databases/py25-bsddb/files/setup.py new file mode 100644 index 000000000000..92416409922f --- /dev/null +++ b/databases/py25-bsddb/files/setup.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# To use: +# python setup.py install +# + +__version__ = "$FreeBSD: /tmp/pcvs/ports/databases/py25-bsddb/files/Attic/setup.py,v 1.1 2003-07-31 20:03:51 perky Exp $" + +import os +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 = [os.environ['BSDDB_VERSION']] + +setup(name = "_bsddb", + description = "BSDDB Extension to Python", + + ext_modules = [Extension('_bsddb', ['_bsddb.c'], + include_dirs = inc_dirs, + libraries = libs, + library_dirs = lib_dirs)] + ) diff --git a/databases/py25-bsddb/pkg-descr b/databases/py25-bsddb/pkg-descr new file mode 100644 index 000000000000..eca654c2b7ae --- /dev/null +++ b/databases/py25-bsddb/pkg-descr @@ -0,0 +1 @@ +Python bindings to the Berkeley DB library. diff --git a/databases/py25-bsddb/pkg-plist b/databases/py25-bsddb/pkg-plist new file mode 100644 index 000000000000..224d2d523e45 --- /dev/null +++ b/databases/py25-bsddb/pkg-plist @@ -0,0 +1 @@ +%%PYTHON_SITELIBDIR%%/_bsddb.so |