cyrus-sasl: Fixed building with db version 5
This commit is contained in:
parent
4cb5d80c09
commit
a272a0bd7c
@ -1,2 +1,3 @@
|
||||
d86a5aa2e3b5b7c1bad6f8b548b7ea36 0027_db5_support.patch
|
||||
341cffe829a4d71f2a6503d669d5a946 cyrus-sasl-2.1.25.tar.gz
|
||||
ec81c1d452216c3da110d7b9a6f8fa8f saslauthd
|
||||
|
24
cyrus-sasl/0027_db5_support.patch
Normal file
24
cyrus-sasl/0027_db5_support.patch
Normal file
@ -0,0 +1,24 @@
|
||||
Author: Ondřej Surý <ondrej@debian.org>
|
||||
Description: Support newer Berkeley DB versions
|
||||
--- a/sasldb/db_berkeley.c
|
||||
+++ b/sasldb/db_berkeley.c
|
||||
@@ -101,7 +101,7 @@ static int berkeleydb_open(const sasl_ut
|
||||
ret = db_create(mbdb, NULL, 0);
|
||||
if (ret == 0 && *mbdb != NULL)
|
||||
{
|
||||
-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
|
||||
+#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1))
|
||||
ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660);
|
||||
#else
|
||||
ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660);
|
||||
--- a/utils/dbconverter-2.c
|
||||
+++ b/utils/dbconverter-2.c
|
||||
@@ -214,7 +214,7 @@ static int berkeleydb_open(const char *p
|
||||
ret = db_create(mbdb, NULL, 0);
|
||||
if (ret == 0 && *mbdb != NULL)
|
||||
{
|
||||
-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
|
||||
+#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1))
|
||||
ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664);
|
||||
#else
|
||||
ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664);
|
@ -2,15 +2,16 @@
|
||||
# URL: http://asg.web.cmu.edu/sasl/sasl-library.html
|
||||
# Maintainer: Thomas Penteker, tek at serverop dot de
|
||||
# Packager: Daniel Mueller, daniel at danm dot de
|
||||
# Depends on: db, openssl
|
||||
# Depends on: db openssl
|
||||
|
||||
name=cyrus-sasl
|
||||
version=2.1.25
|
||||
release=1
|
||||
source=(ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$name-$version.tar.gz saslauthd)
|
||||
source=(ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$name-$version.tar.gz saslauthd 0027_db5_support.patch)
|
||||
|
||||
build(){
|
||||
cd $name-$version
|
||||
patch -p1 -i $SRC/0027_db5_support.patch
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
@ -22,11 +23,11 @@ build(){
|
||||
--with-bdb-incdir=/usr/include \
|
||||
--with-bdb-libdir=/usr/lib \
|
||||
--with-openssl=/usr \
|
||||
--enable-login \
|
||||
--enable-cram \
|
||||
--enable-digest \
|
||||
--enable-login \
|
||||
--enable-cram \
|
||||
--enable-digest \
|
||||
--enable-shared \
|
||||
--mandir=/usr/man
|
||||
--mandir=/usr/man
|
||||
|
||||
make -j1
|
||||
make DESTDIR=$PKG install
|
||||
|
Loading…
Reference in New Issue
Block a user