blob: 221347570f6fdc787f93e50ea4cb9b16f67e3582 (
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
|
# ports collection makefile for: perl interface to Berkeley DB v3
# Date created: 3 January 2001
# Whom: T. William Wells <bill@twwells.com>
#
# $FreeBSD$
#
PORTNAME= BerkeleyDB
PORTVERSION= 0.27
PORTREVISION= 2
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= BerkeleyDB
PKGNAMEPREFIX= p5-
MAINTAINER= clsung@FreeBSD.org
COMMENT= Perl5 interface to the Berkeley DB package revision 2, 3, 4 or 4.1
# Default to db3
WITH_BDB_VER?= 3
.if ${WITH_BDB_VER} == 2
LIB_DEPENDS= db2.0:${PORTSDIR}/databases/db2
BDB_LIB_VER= db2
.elif ${WITH_BDB_VER} == 3
LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3
BDB_LIB_VER= db3
.elif ${WITH_BDB_VER} == 4
LIB_DEPENDS= db4.0:${PORTSDIR}/databases/db4
BDB_LIB_VER= db4
.elif ${WITH_BDB_VER} == 41
LIB_DEPENDS= db41.1:${PORTSDIR}/databases/db41
BDB_LIB_VER= db41
.elif ${WITH_BDB_VER} == 42
LIB_DEPENDS= db-4.2.2:${PORTSDIR}/databases/db42
BDB_LIB_VER= db-4.2
.elif ${WITH_BDB_VER} == 43
LIB_DEPENDS= db-4.3.0:${PORTSDIR}/databases/db43
BDB_LIB_VER= db-4.3
.else
IGNORE= "WITH_BDB_VER must be one between 2, 3, 4, 41, 42 and 43"
.endif
PERL_CONFIGURE= yes
MAN3= BerkeleyDB.3
pre-everything::
@${ECHO} "This port defaults to use Berkeley DB 3, but you can change it"
@${ECHO} "by setting WITH_BDB_VER to either 2, 3, 4, 41, 42 or 43"
post-patch:
@${ECHO} "INCLUDE = ${LOCALBASE}/include/db${WITH_BDB_VER}" > ${WRKSRC}/config.in
@${ECHO} "LIB = ${LOCALBASE}/lib" >> ${WRKSRC}/config.in
@${ECHO} "DBNAME = -l${BDB_LIB_VER}" >> ${WRKSRC}/config.in
${PERL} -pi -e '$$_="" if /MAN3PODS/' ${WRKSRC}/Makefile.PL
.include <bsd.port.mk>
|