aboutsummaryrefslogtreecommitdiff
path: root/dns/bind97-sdb
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2011-09-09 20:55:32 +0000
committerDoug Barton <dougb@FreeBSD.org>2011-09-09 20:55:32 +0000
commitbf583d94c7bf95bc3bb27a9acdd2be27de132b01 (patch)
tree0358fc2281fe03f154f838889faa115dec86e7ed /dns/bind97-sdb
parent3b860689fff7f6871457bb0a6ddb279a648af810 (diff)
downloadports-bf583d94c7bf95bc3bb27a9acdd2be27de132b01.tar.gz
ports-bf583d94c7bf95bc3bb27a9acdd2be27de132b01.zip
BIND version 9.7 with support for sdb database drivers, including ldap and
postgresql. WWW: https://www.isc.org/software/bind/ PR: ports/157752 Submitted by: Josh Carroll <josh.carroll@gmail.com>
Notes
Notes: svn path=/head/; revision=281539
Diffstat (limited to 'dns/bind97-sdb')
-rw-r--r--dns/bind97-sdb/Makefile105
-rw-r--r--dns/bind97-sdb/files/patch-ldap-bin__named__Makefile.in17
-rw-r--r--dns/bind97-sdb/files/patch-ldap-bin__named__main.c26
-rw-r--r--dns/bind97-sdb/files/patch-pgsql-bin__named__Makefile.in17
-rw-r--r--dns/bind97-sdb/files/patch-pgsql-bin__named__main.c26
-rw-r--r--dns/bind97-sdb/files/patch-pgsql-bin__named__pgsqldb.c11
-rw-r--r--dns/bind97-sdb/pkg-descr6
7 files changed, 208 insertions, 0 deletions
diff --git a/dns/bind97-sdb/Makefile b/dns/bind97-sdb/Makefile
new file mode 100644
index 000000000000..8877b9a6186c
--- /dev/null
+++ b/dns/bind97-sdb/Makefile
@@ -0,0 +1,105 @@
+# New ports collection makefile for: bind97-sdb-postgresql
+# Date created: 2011-06-10
+# Whom: Josh Carroll <josh.carroll@gmail.com>
+#
+# $FreeBSD$
+
+PORTNAME= bind97-sdb
+
+MAINTAINER= josh.carroll@gmail.com
+
+MASTERDIR= ${.CURDIR}/../bind97
+
+CONFLICTS= bind9? host-*
+
+# the user may pick one and only one SDB driver. Depending on which
+# option the user picks, the appropriate patches will be applied
+# so bind is built with the proper driver
+OPTIONS= PGSQL "Build with PostgreSQL SDB support" on \
+ LDAP "Build with LDAP SDB support" off
+
+# Future use
+# DIRDB "Build with dirdb SDB support" off \
+# BDB "Build with bdb SDB support" off \
+# SQLITE "Build with sqlite SDB support" off \
+# TCL "Build with tcldb SDB support" off \
+# TIMEDB "Build with timedb SDB support" off
+
+.include <bsd.port.options.mk>
+
+OUR_PATCHDIR:=${.CURDIR}/files
+
+# check that one and ONLY one of the SDB options is set
+# the value of SDB_DRIVER should match the name of the
+# contrib/sdb dir
+num_sdb_types:=SDB
+.if defined(WITH_PGSQL)
+num_sdb_types+=1
+USE_PGSQL= yes
+EXTRA_PATCHES+= ${OUR_PATCHDIR}/patch-pgsql-bin__named__Makefile.in \
+ ${OUR_PATCHDIR}/patch-pgsql-bin__named__main.c \
+ ${OUR_PATCHDIR}/patch-pgsql-bin__named__pgsqldb.c
+SDB_DRIVER=pgsql
+SDB_DRIVER_FILES=pgsqldb.c pgsqldb.h
+.endif
+
+.if defined(WITH_LDAP)
+num_sdb_types+=1
+USE_OPENLDAP= yes
+EXTRA_PATCHES+= ${OUR_PATCHDIR}/patch-ldap-bin__named__Makefile.in \
+ ${OUR_PATCHDIR}/patch-ldap-bin__named__main.c
+SDB_DRIVER=ldap
+SDB_DRIVER_FILES=ldapdb.c
+.endif
+
+.if defined(WITH_DIRDB)
+num_sdb_types+=1
+SDB_DRIVER=dir
+SDB_DRIVER_FILES=
+IGNORE=This port does not yet support SDB DIRDB
+.endif
+
+.if defined(WITH_BDB)
+num_sdb_types+=1
+SDB_DRIVER=bdb
+SDB_DRIVER_FILES=
+IGNORE=This port does not yet support SDB BDB
+.endif
+
+.if defined(WITH_SQLITE)
+num_sdb_types+=1
+SDB_DRIVER=sqlite
+SDB_DRIVER_FILES=
+IGNORE=This port does not yet support SDB SQLITE
+.endif
+
+.if defined(WITH_TCL)
+num_sdb_types+=1
+SDB_DRIVER=tcldb
+SDB_DRIVER_FILES=
+IGNORE=This port does not yet support SDB TCLDB
+.endif
+
+.if defined(WITH_TIMEDB)
+num_sdb_types+=1
+SDB_DRIVER=timedb
+SDB_DRIVER_FILES=
+IGNORE=This port does not yet support SDB TIMEDB
+.endif
+
+# if one and only 1 of the SDB options is set
+# then the value of ${num_sdb_types} will be "SDB 1"
+.if ${num_sdb_types} == "SDB"
+IGNORE=You must select one SDB database type : DEBUG 1: ->${num_sdb_types}<-
+.else
+. if ${num_sdb_types} != "SDB 1"
+IGNORE=You have selected more than one SDB database type : DEBUG 2: ->${num_sdb_types}<-
+. endif
+.endif
+
+pre-patch:
+.for FILE in ${SDB_DRIVER_FILES}
+ @${CP} ${WRKSRC}/contrib/sdb/${SDB_DRIVER}/${FILE} ${WRKSRC}/bin/named
+.endfor
+
+.include "${MASTERDIR}/Makefile"
diff --git a/dns/bind97-sdb/files/patch-ldap-bin__named__Makefile.in b/dns/bind97-sdb/files/patch-ldap-bin__named__Makefile.in
new file mode 100644
index 000000000000..bc767e5c2cd9
--- /dev/null
+++ b/dns/bind97-sdb/files/patch-ldap-bin__named__Makefile.in
@@ -0,0 +1,17 @@
+--- bin/named/Makefile.in.orig 2011-06-10 18:17:33.000000000 -0700
++++ bin/named/Makefile.in 2011-06-10 18:19:54.000000000 -0700
+@@ -28,10 +28,10 @@
+ #
+ # Add database drivers here.
+ #
+-DBDRIVER_OBJS =
+-DBDRIVER_SRCS =
+-DBDRIVER_INCLUDES =
+-DBDRIVER_LIBS =
++DBDRIVER_OBJS = ldapdb.@O@
++DBDRIVER_SRCS = ldapdb.c
++DBDRIVER_INCLUDES = -I../../contrib/sdb/ldap -I${LOCALBASE}include
++DBDRIVER_LIBS = -L${LOCALBASE}/lib -lldap -llber
+
+ DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
+
diff --git a/dns/bind97-sdb/files/patch-ldap-bin__named__main.c b/dns/bind97-sdb/files/patch-ldap-bin__named__main.c
new file mode 100644
index 000000000000..4b0615ee8ec1
--- /dev/null
+++ b/dns/bind97-sdb/files/patch-ldap-bin__named__main.c
@@ -0,0 +1,26 @@
+--- bin/named/main.c.orig 2008-10-23 18:28:08.000000000 -0700
++++ bin/named/main.c 2011-06-10 16:47:50.000000000 -0700
+@@ -73,6 +73,7 @@
+ * Include header files for database drivers here.
+ */
+ /* #include "xxdb.h" */
++#include <ldapdb.h>
+
+ /*
+ * Include DLZ drivers if appropriate.
+@@ -716,6 +717,7 @@
+ * Add calls to register sdb drivers here.
+ */
+ /* xxdb_init(); */
++ ldapdb_init();
+
+ #ifdef DLZ
+ /*
+@@ -742,6 +744,7 @@
+ * Add calls to unregister sdb drivers here.
+ */
+ /* xxdb_clear(); */
++ ldapdb_clear();
+
+ #ifdef DLZ
+ /*
diff --git a/dns/bind97-sdb/files/patch-pgsql-bin__named__Makefile.in b/dns/bind97-sdb/files/patch-pgsql-bin__named__Makefile.in
new file mode 100644
index 000000000000..b6cfca62951a
--- /dev/null
+++ b/dns/bind97-sdb/files/patch-pgsql-bin__named__Makefile.in
@@ -0,0 +1,17 @@
+--- bin/named/Makefile.in.orig 2011-06-10 10:18:29.000000000 -0700
++++ bin/named/Makefile.in 2011-06-10 10:01:43.000000000 -0700
+@@ -28,10 +28,10 @@
+ #
+ # Add database drivers here.
+ #
+-DBDRIVER_OBJS =
+-DBDRIVER_SRCS =
+-DBDRIVER_INCLUDES =
+-DBDRIVER_LIBS =
++DBDRIVER_OBJS = pgsqldb.@O@
++DBDRIVER_SRCS = pgsqldb.c
++DBDRIVER_INCLUDES = -I../../contrib/sdb/pgsql -I${LOCALBASE}/include
++DBDRIVER_LIBS = -L${LOCALBASE}/lib -lpq
+
+ DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
+
diff --git a/dns/bind97-sdb/files/patch-pgsql-bin__named__main.c b/dns/bind97-sdb/files/patch-pgsql-bin__named__main.c
new file mode 100644
index 000000000000..0db381f44aa3
--- /dev/null
+++ b/dns/bind97-sdb/files/patch-pgsql-bin__named__main.c
@@ -0,0 +1,26 @@
+--- bin/named/main.c.orig 2011-06-10 10:18:35.000000000 -0700
++++ bin/named/main.c 2011-06-10 10:03:45.000000000 -0700
+@@ -74,6 +74,7 @@
+ * Include header files for database drivers here.
+ */
+ /* #include "xxdb.h" */
++#include <pgsqldb.h>
+
+ /*
+ * Include DLZ drivers if appropriate.
+@@ -841,6 +842,7 @@
+ * Add calls to register sdb drivers here.
+ */
+ /* xxdb_init(); */
++ pgsqldb_init();
+
+ #ifdef DLZ
+ /*
+@@ -867,6 +869,7 @@
+ * Add calls to unregister sdb drivers here.
+ */
+ /* xxdb_clear(); */
++ pgsqldb_clear();
+
+ #ifdef DLZ
+ /*
diff --git a/dns/bind97-sdb/files/patch-pgsql-bin__named__pgsqldb.c b/dns/bind97-sdb/files/patch-pgsql-bin__named__pgsqldb.c
new file mode 100644
index 000000000000..37345f4f4e2b
--- /dev/null
+++ b/dns/bind97-sdb/files/patch-pgsql-bin__named__pgsqldb.c
@@ -0,0 +1,11 @@
+--- bin/named/pgsqldb.c.orig 2011-06-10 12:54:44.000000000 -0700
++++ bin/named/pgsqldb.c 2011-06-10 12:56:42.000000000 -0700
+@@ -23,7 +23,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+
+-#include <pgsql/libpq-fe.h>
++#include <libpq-fe.h>
+
+ #include <isc/mem.h>
+ #include <isc/print.h>
diff --git a/dns/bind97-sdb/pkg-descr b/dns/bind97-sdb/pkg-descr
new file mode 100644
index 000000000000..b0f1898aed86
--- /dev/null
+++ b/dns/bind97-sdb/pkg-descr
@@ -0,0 +1,6 @@
+BIND version 9.7 with support for sdb database drivers, including ldap and
+postgresql.
+
+WWW: https://www.isc.org/software/bind/
+
+- Josh <josh.carroll@gmail.com>