aboutsummaryrefslogtreecommitdiffstats
path: root/databases/ruby-bdb/Makefile
blob: 280de90ea94e2c5a7d03463501b489d882e6bd69 (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
# New ports collection makefile for:    Ruby-BDB
# Date created:     8 March 2001
# Whom:         Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#

PORTNAME=   bdb
PORTVERSION=    0.4.2
CATEGORIES= databases ruby
MASTER_SITES=   ftp://moulon.inra.fr/pub/ruby/
PKGNAMEPREFIX=  ${RUBY_PKGNAMEPREFIX}
.if defined(WITH_BDB4)
PKGNAMESUFFIX=  4
.endif
DIST_SUBDIR=    ruby

MAINTAINER= knu@FreeBSD.org
COMMENT=    Ruby interface to Sleepycat's Berkeley DB revision 2 or later

.if defined(WITH_BDB41)
LIB_DEPENDS=    db41.1:${PORTSDIR}/databases/db41
.elif defined(WITH_BDB4)
LIB_DEPENDS=    db4.0:${PORTSDIR}/databases/db4
.else
LIB_DEPENDS=    db3.3:${PORTSDIR}/databases/db3
.endif

USE_RUBY=   yes
USE_RUBY_EXTCONF=   yes
USE_RUBY_RDOC=      yes

.if defined(WITH_BDB4)
CONFIGURE_ARGS= --with-db-include-dir="${PREFIX}/include/db4" \
        --with-db-version=4
.else
CONFIGURE_ARGS= --with-db-include-dir="${PREFIX}/include/db3" \
        --with-db-version=3
.endif
INSTALL_TARGET= site-install

DOCS=       Changes \
        README.en \
        bdb.html \
        bdb.rd \
        docs/*.html \
        docs/*.rd \
        docs/doc

post-build:
.if !defined(NOPORTDOCS)
    cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc
.endif

post-install:
.if !defined(NOPORTDOCS)
    ${MKDIR} ${RUBY_MODEXAMPLESDIR}/
    ${CP} -R ${WRKSRC}/examples/* ${RUBY_MODEXAMPLESDIR}/
    ${MKDIR} ${RUBY_MODDOCDIR}
.for f in ${DOCS}
    ${CP} -R ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/
.endfor
.endif

.include <bsd.port.mk>