aboutsummaryrefslogtreecommitdiffstats
path: root/databases/dbconnect/Makefile
blob: 4aaaa85a4e82e56819b35f8d1c13b7e869d12d1a (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
# ex:ts=8
# New ports collection makefile for:    dbconnect
# Date created:         Jul 23, 2001
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   dbconnect
PORTVERSION=    0.2.4
CATEGORIES= databases
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Use C++ object API to allow applications to connect to databases

USE_REINPLACE=  yes
GNU_CONFIGURE=  yes

.if defined(WITH_MYSQL)
USE_MYSQL=      YES
CONFIGURE_ARGS+=    --with-mysql=yes \
            --with-mysqlinclude=${LOCALBASE}/include/mysql \
            --with-mysqllib=${LOCALBASE}/lib/mysql
PLIST_SUB+= MYSQL=""
.else
PLIST_SUB+= MYSQL="@comment "
.endif

.if defined(WITH_PGSQL)
LIB_DEPENDS+=   pq:${PORTSDIR}/databases/postgresql7
CONFIGURE_ARGS+=    --with-pgsql=yes \
            --with-pgsqlinclude=${LOCALBASE}/include \
            --with-pgsqllib=${LOCALBASE}/lib
PLIST_SUB+= PGSQL=""
.else
PLIST_SUB+= PGSQL="@comment "
.endif

.if defined(WITH_UNIXODBC)
LIB_DEPENDS+=   odbc:${PORTSDIR}/databases/unixODBC
CONFIGURE_ARGS+=    --with-unixodbc=yes \
            --with-unixodbcinclude=${LOCALBASE}/include \
            --with-unixodbclib=${LOCALBASE}/lib
PLIST_SUB+= UNIXODBC=""
.else
PLIST_SUB+= UNIXODBC="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|g++|${CXX}|g ; \
         s|@CFLAGS@|${CXXFLAGS} -fPIC|g ; \
         s|gcc|${CXX}|g ; \
         s|cp -f \.|${INSTALL_DATA} .|g' ${WRKSRC}/Makefile.in

.include <bsd.port.mk>