blob: 8877b9a6186c146afa1eaa45c5964b736159dc96 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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"
|