1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

Add new port for py-bsddb,

a bsddb[34] binding bundled in python2.3 distribution.
This commit is contained in:
Hye-Shik Chang 2003-07-31 20:03:51 +00:00
parent 04b39f4e75
commit cb9cbfb122
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=86075
9 changed files with 163 additions and 0 deletions

View File

@ -155,6 +155,7 @@
SUBDIR += py-PyGreSQL
SUBDIR += py-PySQLite
SUBDIR += py-SQLDict
SUBDIR += py-bsddb
SUBDIR += py-bsddb3
SUBDIR += py-cdb
SUBDIR += py-gdbm

View File

@ -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>

View File

@ -0,0 +1,29 @@
#!/usr/bin/env python
# To use:
# python setup.py install
#
__version__ = "$FreeBSD: /tmp/pcvs/ports/databases/py-bsddb/files/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)]
)

View File

@ -0,0 +1 @@
Python bindings to the Berkeley DB library.

View File

@ -0,0 +1 @@
%%PYTHON_SITELIBDIR%%/_bsddb.so

View File

@ -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>

View File

@ -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)]
)

View File

@ -0,0 +1 @@
Python bindings to the Berkeley DB library.

View File

@ -0,0 +1 @@
%%PYTHON_SITELIBDIR%%/_bsddb.so