diff options
author | rm <rm@FreeBSD.org> | 2012-10-03 14:02:24 +0800 |
---|---|---|
committer | rm <rm@FreeBSD.org> | 2012-10-03 14:02:24 +0800 |
commit | dc377da70509adb8fcce97661bf30c3c16114d45 (patch) | |
tree | ad803aac4ef52d03e322e991e3ed6c075fd64e9d /databases | |
parent | 5d6ff4750f2c56c3c2a02675e88ba861a058e94c (diff) | |
download | freebsd-ports-gnome-dc377da70509adb8fcce97661bf30c3c16114d45.tar.gz freebsd-ports-gnome-dc377da70509adb8fcce97661bf30c3c16114d45.tar.zst freebsd-ports-gnome-dc377da70509adb8fcce97661bf30c3c16114d45.zip |
- cleanup unsupported python versions
- trim Makefile header
Diffstat (limited to 'databases')
-rw-r--r-- | databases/py-bsddb/Makefile | 14 | ||||
-rw-r--r-- | databases/py-bsddb/files/extra-patch-py24-_bsddb.c | 167 | ||||
-rw-r--r-- | databases/py-bsddb/files/extra-patch-py25-_bsddb.c | 110 |
3 files changed, 2 insertions, 289 deletions
diff --git a/databases/py-bsddb/Makefile b/databases/py-bsddb/Makefile index 041c999ed1e9..e894b6ebc801 100644 --- a/databases/py-bsddb/Makefile +++ b/databases/py-bsddb/Makefile @@ -1,9 +1,5 @@ -# New ports collection makefile for: py-bsddb -# Date created: 31 July 2003 -# Whom: Hye-Shik Chang <perky@FreeBSD.org> -# +# Created by: Hye-Shik Chang <perky@FreeBSD.org> # $FreeBSD$ -# PORTNAME= bsddb PORTVERSION= ${PYTHON_PORTVERSION} @@ -39,15 +35,9 @@ IGNORE= bsddb package was removed from core standard library since 3.0, use data post-extract: @${CP} ${FILESDIR}/setup.py ${WRKSRC} -.if ${PYTHON_REL} < 260 -BSDDB_PATCH= _bsddb.c -.else -BSDDB_PATCH= bsddb.h -.endif - post-patch: ${REINPLACE_CMD} -e \ 's,^\(#include.*\)\(db\.h.*\)$$,\1${BDB_INCLUDE_DIR}/\2,' \ - ${WRKSRC}/${BSDDB_PATCH} + ${WRKSRC}/bsddb.h .include <bsd.port.post.mk> diff --git a/databases/py-bsddb/files/extra-patch-py24-_bsddb.c b/databases/py-bsddb/files/extra-patch-py24-_bsddb.c deleted file mode 100644 index 8d6c533a7508..000000000000 --- a/databases/py-bsddb/files/extra-patch-py24-_bsddb.c +++ /dev/null @@ -1,167 +0,0 @@ ---- _bsddb.c.orig 2006-10-06 02:49:36.000000000 +0800 -+++ _bsddb.c 2011-10-10 10:29:43.469871000 +0800 -@@ -162,8 +162,10 @@ - static PyObject* DBRunRecoveryError; /* DB_RUNRECOVERY */ - static PyObject* DBVerifyBadError; /* DB_VERIFY_BAD */ - static PyObject* DBNoServerError; /* DB_NOSERVER */ -+#if (DBVER < 50) - static PyObject* DBNoServerHomeError; /* DB_NOSERVER_HOME */ - static PyObject* DBNoServerIDError; /* DB_NOSERVER_ID */ -+#endif - #if (DBVER >= 33) - static PyObject* DBPageNotFoundError; /* DB_PAGE_NOTFOUND */ - static PyObject* DBSecondaryBadError; /* DB_SECONDARY_BAD */ -@@ -187,6 +189,9 @@ - #define DB_BUFFER_SMALL ENOMEM - #endif - -+#if (DBVER < 48) -+#define DB_GID_SIZE DB_XIDDATASIZE -+#endif - - /* --------------------------------------------------------------------- */ - /* Structure definitions */ -@@ -544,8 +549,10 @@ - case DB_RUNRECOVERY: errObj = DBRunRecoveryError; break; - case DB_VERIFY_BAD: errObj = DBVerifyBadError; break; - case DB_NOSERVER: errObj = DBNoServerError; break; -+#if (DBVER < 50) - case DB_NOSERVER_HOME: errObj = DBNoServerHomeError; break; - case DB_NOSERVER_ID: errObj = DBNoServerIDError; break; -+#endif - #if (DBVER >= 33) - case DB_PAGE_NOTFOUND: errObj = DBPageNotFoundError; break; - case DB_SECONDARY_BAD: errObj = DBSecondaryBadError; break; -@@ -3831,6 +3838,7 @@ - } - - -+#if (DBVER < 45) - static PyObject* - DBEnv_set_lk_max(DBEnvObject* self, PyObject* args) - { -@@ -3846,6 +3854,7 @@ - RETURN_IF_ERR(); - RETURN_NONE(); - } -+#endif - - - #if (DBVER >= 32) -@@ -4317,9 +4326,9 @@ - if (!PyArg_ParseTuple(args, "s#:prepare", &gid, &gid_size)) - return NULL; - -- if (gid_size != DB_XIDDATASIZE) { -+ if (gid_size != DB_GID_SIZE) { - PyErr_SetString(PyExc_TypeError, -- "gid must be DB_XIDDATASIZE bytes long"); -+ "gid must be DB_GID_SIZE bytes long"); - return NULL; - } - -@@ -4532,7 +4541,9 @@ - {"set_lg_dir", (PyCFunction)DBEnv_set_lg_dir, METH_VARARGS}, - {"set_lg_max", (PyCFunction)DBEnv_set_lg_max, METH_VARARGS}, - {"set_lk_detect", (PyCFunction)DBEnv_set_lk_detect, METH_VARARGS}, -+#if (DBVER < 45) - {"set_lk_max", (PyCFunction)DBEnv_set_lk_max, METH_VARARGS}, -+#endif - #if (DBVER >= 32) - {"set_lk_max_locks", (PyCFunction)DBEnv_set_lk_max_locks, METH_VARARGS}, - {"set_lk_max_lockers", (PyCFunction)DBEnv_set_lk_max_lockers, METH_VARARGS}, -@@ -4574,6 +4585,7 @@ - static PyObject* - DBEnv_getattr(DBEnvObject* self, char *name) - { -+#if (DBVER < 46) - if (!strcmp(name, "db_home")) { - CHECK_ENV_NOT_CLOSED(self); - if (self->db_env->db_home == NULL) { -@@ -4581,6 +4593,7 @@ - } - return PyString_FromString(self->db_env->db_home); - } -+#endif - - return Py_FindMethod(DBEnv_methods, (PyObject* )self, name); - } -@@ -4886,13 +4899,17 @@ - ADD_INT(d, DB_MAX_RECORDS); - - #if (DBVER >= 42) -+#if (DBVER < 50) - ADD_INT(d, DB_RPCCLIENT); -+#endif - #else - ADD_INT(d, DB_CLIENT); - /* allow apps to be written using DB_RPCCLIENT on older BerkeleyDB */ - _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT); - #endif -+#if (DBVER < 48 || DBVER > 51) - ADD_INT(d, DB_XA_CREATE); -+#endif - - ADD_INT(d, DB_CREATE); - ADD_INT(d, DB_NOMMAP); -@@ -5039,7 +5056,9 @@ - ADD_INT(d, DB_AFTER); - ADD_INT(d, DB_APPEND); - ADD_INT(d, DB_BEFORE); -+#if (DBVER < 45) - ADD_INT(d, DB_CACHED_COUNTS); -+#endif - #if (DBVER >= 41) - _addIntToDict(d, "DB_CHECKPOINT", 0); - #else -@@ -5074,7 +5093,9 @@ - ADD_INT(d, DB_POSITION); - ADD_INT(d, DB_PREV); - ADD_INT(d, DB_PREV_NODUP); -+#if (DBVER < 45) - ADD_INT(d, DB_RECORDCOUNT); -+#endif - ADD_INT(d, DB_SET); - ADD_INT(d, DB_SET_RANGE); - ADD_INT(d, DB_SET_RECNO); -@@ -5107,8 +5128,10 @@ - ADD_INT(d, DB_LOCK_DEADLOCK); - ADD_INT(d, DB_LOCK_NOTGRANTED); - ADD_INT(d, DB_NOSERVER); -+#if (DBVER < 52) - ADD_INT(d, DB_NOSERVER_HOME); - ADD_INT(d, DB_NOSERVER_ID); -+#endif - ADD_INT(d, DB_NOTFOUND); - ADD_INT(d, DB_OLD_VERSION); - ADD_INT(d, DB_RUNRECOVERY); -@@ -5130,15 +5153,17 @@ - ADD_INT(d, DB_TIME_NOTGRANTED); - ADD_INT(d, DB_TXN_NOT_DURABLE); - ADD_INT(d, DB_TXN_WRITE_NOSYNC); -+#if (DBVER < 47) - ADD_INT(d, DB_LOG_AUTOREMOVE); - ADD_INT(d, DB_DIRECT_LOG); -+#endif - ADD_INT(d, DB_DIRECT_DB); - ADD_INT(d, DB_INIT_REP); - ADD_INT(d, DB_ENCRYPT); - ADD_INT(d, DB_CHKSUM); - #endif - --#if (DBVER >= 43) -+#if (DBVER >= 43) && (DBVER < 47) - ADD_INT(d, DB_LOG_INMEMORY); - ADD_INT(d, DB_BUFFER_SMALL); - #endif -@@ -5203,8 +5228,10 @@ - MAKE_EX(DBRunRecoveryError); - MAKE_EX(DBVerifyBadError); - MAKE_EX(DBNoServerError); -+#if (DBVER < 50) - MAKE_EX(DBNoServerHomeError); - MAKE_EX(DBNoServerIDError); -+#endif - #if (DBVER >= 33) - MAKE_EX(DBPageNotFoundError); - MAKE_EX(DBSecondaryBadError); diff --git a/databases/py-bsddb/files/extra-patch-py25-_bsddb.c b/databases/py-bsddb/files/extra-patch-py25-_bsddb.c deleted file mode 100644 index 024e83c0dc90..000000000000 --- a/databases/py-bsddb/files/extra-patch-py25-_bsddb.c +++ /dev/null @@ -1,110 +0,0 @@ ---- _bsddb.c.orig 2008-05-17 14:46:39.000000000 +0800 -+++ _bsddb.c 2011-10-10 10:29:43.469871000 +0800 -@@ -167,8 +167,10 @@ - static PyObject* DBRunRecoveryError; /* DB_RUNRECOVERY */ - static PyObject* DBVerifyBadError; /* DB_VERIFY_BAD */ - static PyObject* DBNoServerError; /* DB_NOSERVER */ -+#if (DBVER < 52) - static PyObject* DBNoServerHomeError; /* DB_NOSERVER_HOME */ - static PyObject* DBNoServerIDError; /* DB_NOSERVER_ID */ -+#endif - #if (DBVER >= 33) - static PyObject* DBPageNotFoundError; /* DB_PAGE_NOTFOUND */ - static PyObject* DBSecondaryBadError; /* DB_SECONDARY_BAD */ -@@ -192,6 +194,9 @@ - #define DB_BUFFER_SMALL ENOMEM - #endif - -+#if (DBVER < 48) -+#define DB_GID_SIZE DB_XIDDATASIZE -+#endif - - /* --------------------------------------------------------------------- */ - /* Structure definitions */ -@@ -581,8 +586,10 @@ - case DB_RUNRECOVERY: errObj = DBRunRecoveryError; break; - case DB_VERIFY_BAD: errObj = DBVerifyBadError; break; - case DB_NOSERVER: errObj = DBNoServerError; break; -+#if (DBVER < 52) - case DB_NOSERVER_HOME: errObj = DBNoServerHomeError; break; - case DB_NOSERVER_ID: errObj = DBNoServerIDError; break; -+#endif - #if (DBVER >= 33) - case DB_PAGE_NOTFOUND: errObj = DBPageNotFoundError; break; - case DB_SECONDARY_BAD: errObj = DBSecondaryBadError; break; -@@ -4737,9 +4744,9 @@ - if (!PyArg_ParseTuple(args, "s#:prepare", &gid, &gid_size)) - return NULL; - -- if (gid_size != DB_XIDDATASIZE) { -+ if (gid_size != DB_GID_SIZE) { - PyErr_SetString(PyExc_TypeError, -- "gid must be DB_XIDDATASIZE bytes long"); -+ "gid must be DB_GID_SIZE bytes long"); - return NULL; - } - -@@ -5332,6 +5339,7 @@ - static PyObject* - DBEnv_getattr(DBEnvObject* self, char *name) - { -+#if (DBVER < 46) - if (!strcmp(name, "db_home")) { - CHECK_ENV_NOT_CLOSED(self); - if (self->db_env->db_home == NULL) { -@@ -5339,6 +5347,7 @@ - } - return PyString_FromString(self->db_env->db_home); - } -+#endif - - return Py_FindMethod(DBEnv_methods, (PyObject* )self, name); - } -@@ -5708,13 +5717,17 @@ - ADD_INT(d, DB_MAX_RECORDS); - - #if (DBVER >= 42) -+#if (DBVER < 50) - ADD_INT(d, DB_RPCCLIENT); -+#endif - #else - ADD_INT(d, DB_CLIENT); - /* allow apps to be written using DB_RPCCLIENT on older BerkeleyDB */ - _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT); - #endif -+#if (DBVER < 48 || DBVER > 51) - ADD_INT(d, DB_XA_CREATE); -+#endif - - ADD_INT(d, DB_CREATE); - ADD_INT(d, DB_NOMMAP); -@@ -5936,8 +5949,10 @@ - ADD_INT(d, DB_LOCK_DEADLOCK); - ADD_INT(d, DB_LOCK_NOTGRANTED); - ADD_INT(d, DB_NOSERVER); -+#if (DBVER < 52) - ADD_INT(d, DB_NOSERVER_HOME); - ADD_INT(d, DB_NOSERVER_ID); -+#endif - ADD_INT(d, DB_NOTFOUND); - ADD_INT(d, DB_OLD_VERSION); - ADD_INT(d, DB_RUNRECOVERY); -@@ -5959,15 +5974,17 @@ - ADD_INT(d, DB_TIME_NOTGRANTED); - ADD_INT(d, DB_TXN_NOT_DURABLE); - ADD_INT(d, DB_TXN_WRITE_NOSYNC); -+#if (DBVER < 47) - ADD_INT(d, DB_LOG_AUTOREMOVE); - ADD_INT(d, DB_DIRECT_LOG); -+#endif - ADD_INT(d, DB_DIRECT_DB); - ADD_INT(d, DB_INIT_REP); - ADD_INT(d, DB_ENCRYPT); - ADD_INT(d, DB_CHKSUM); - #endif - --#if (DBVER >= 43) -+#if (DBVER >= 43) && (DBVER < 47) - ADD_INT(d, DB_LOG_INMEMORY); - ADD_INT(d, DB_BUFFER_SMALL); - ADD_INT(d, DB_SEQ_DEC); |