aboutsummaryrefslogtreecommitdiffstats
path: root/databases/libzdb/Makefile
blob: 1e7c49f061fe5f494a86a0604147a72e31ac26be (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
# New ports collection makefile for:    libzdb
# Date created:             Nov 28 2005
# Whom:                 vanilla@
#
# $FreeBSD$
#

PORTNAME=   libzdb
PORTVERSION=    2.2.1
CATEGORIES= databases
MASTER_SITES=   http://www.tildeslash.com/libzdb/dist/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Thread-safe connection pool library

OPTIONS=    MYSQL "Add MySQL support" on \
        SQLITE " Add Sqlite support" on \
        PGSQL "Add PgSQL support" on

USE_GNOME=  gnometarget
USE_GMAKE=  yes
USE_AUTOTOOLS=  libtool:15
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib" \
        PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
        PTHREAD_LIBS="${PTHREAD_LIBS}"
USE_LDCONFIG=   yes

PLIST_SUB=  VERSION=${PORTVERSION}

.include <bsd.port.pre.mk>

.if defined(WITH_MYSQL)
USE_MYSQL=  yes
CONFIGURE_ARGS+=    --with-mysql=${PREFIX}
.else
CONFIGURE_ARGS+=    --without-mysql
.endif

.if defined(WITH_SQLITE)
USE_SQLITE= 3
CONFIGURE_ARGS+=    --with-sqlite=${PREFIX}
.else
CONFIGURE_ARGS+=    --without-sqlite
.endif

.if defined(WITH_PGSQL)
USE_PGSQL=  yes
CONFIGURE_ARGS+=    --with-pgsql=${PREFIX}
.else
CONFIGURE_ARGS+=    --without-pgsql
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-lpthread |${PTHREAD_LIBS} |g ; \
         s|_mysql/lib |_mysql/lib/mysql |g ; \
         s|_mysql/include |_mysql/include/mysql |g ; \
         s|_mysql/include"|_mysql/include/mysql"|g ; \
         s|_mysql/lib/l|_mysql/lib/mysql/l|g ; \
         s|_mysql/lib/ |_mysql/lib/mysql |g' ${WRKSRC}/configure

.include <bsd.port.post.mk>