aboutsummaryrefslogtreecommitdiff
path: root/databases/opendbx/Makefile
blob: 18aaecf774f2587fa5179c04f9ca1ecba27c8eb9 (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
# Created by: tremere@cainites.net
# $FreeBSD$

PORTNAME=	opendbx
PORTVERSION=	1.4.6
CATEGORIES=	databases
MASTER_SITES=	http://www.linuxnetworks.de/opendbx/download/

MAINTAINER=	tremere@cainites.net
COMMENT=	C library for accessing databases with a single API

LICENSE=	LGPL21

USES=		gmake
USE_AUTOTOOLS=	libtool

CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS+=	${PTHREAD_LIBS} -L${WRKSRC}/lib -L${LOCALBASE}/lib
CONFIGURE_ARGS+=	--with-backends="${CONFIGURE_MODULES}"

USE_LDCONFIG=	${PREFIX}/lib/opendbx

OPTIONS_DEFINE=	NLS
OPTIONS_MULTI=	DRIVER
OPTIONS_MULTI_DRIVER=	MYSQL PGSQL SQLITE SQLITE3 MSSQL SYBASE
OPTIONS_DEFAULT=	MYSQL
SQLITE_DESC=	SQLite 2 database support
SYBASE_DESC=	Sybase database support
DRIVER_DESC=	Database drivers

OPTIONS_SUB=	YES
MYSQL_USE=	MYSQL=YES
MYSQL_CPPFLAGS=	-I${LOCALBASE}/include/mysql
MYSQL_LDFLAGS=	-L${LOCALBASE}/lib/mysql

PGSQL_USE=	PGSQL=YES

SQLITE_LIB_DEPENDS=	libsqlite.so:${PORTSDIR}/databases/sqlite2

SQLITE3_USE=	SQLITE=3

MSSQL_LIB_DEPENDS=	sybdb:${PORTSDIR}/databases/freetds

SYBASE_LIB_DEPENDS=	ct:${PORTSDIR}/databases/freetds

NLS_USES=		gettext
NLS_CONFIGURE_DISABLE=	nls

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMYSQL}
CONFIGURE_MODULES+=	mysql
.endif

.if ${PORT_OPTIONS:MPGSQL}
CONFIGURE_MODULES+=	pgsql
.endif

.if ${PORT_OPTIONS:MSQLITE}
CONFIGURE_MODULES+=	sqlite
.endif

.if ${PORT_OPTIONS:MSQLITE3}
CONFIGURE_MODULES+=	sqlite3
.endif

.if ${PORT_OPTIONS:MMSSQL}
CONFIGURE_MODULES+=	mssql
.endif

.if ${PORT_OPTIONS:MSYBASE}
CONFIGURE_MODULES+=	sybase
.endif

.include <bsd.port.mk>