2006-07-09 16:26:40 +02:00
|
|
|
# New ports collection makefile for: opendbx
|
|
|
|
# Date Created: 17 March 2006
|
|
|
|
# Whom: tremere@cainites.net
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= opendbx
|
2008-05-02 21:17:12 +02:00
|
|
|
PORTVERSION= 1.2.6
|
2008-06-06 16:17:21 +02:00
|
|
|
PORTREVISION= 1
|
2006-07-09 16:26:40 +02:00
|
|
|
CATEGORIES= databases
|
|
|
|
MASTER_SITES= http://www.linuxnetworks.de/opendbx/download/
|
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}
|
|
|
|
|
|
|
|
MAINTAINER= tremere@cainites.net
|
|
|
|
COMMENT= A C library for accessing databases with a single API
|
|
|
|
|
2008-05-02 21:17:12 +02:00
|
|
|
USE_GMAKE= YES
|
|
|
|
USE_AUTOTOOLS= libtool:15
|
2006-07-09 16:26:40 +02:00
|
|
|
|
2008-05-02 21:17:12 +02:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
|
|
|
|
LDFLAGS+= ${PTHREAD_LIBS} -L../lib -L${LOCALBASE}/lib
|
2007-02-20 05:01:26 +01:00
|
|
|
CONFIGURE_ARGS+= --with-backends="${CONFIGURE_MODULES}"
|
2006-07-09 16:26:40 +02:00
|
|
|
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
|
|
|
|
2008-05-02 21:17:12 +02:00
|
|
|
USE_LDCONFIG= ${PREFIX}/lib/opendbx
|
2006-07-09 16:26:40 +02:00
|
|
|
|
2007-01-12 11:02:18 +01:00
|
|
|
OPTIONS= MYSQL "Support for the MySQL database" on \
|
|
|
|
PGSQL "Support for the PostgreSQL database" off \
|
|
|
|
SQLITE "Support for the SQLite 2 database" off \
|
2007-02-20 05:01:26 +01:00
|
|
|
SQLITE3 "Support for the SQLite 3 database" off \
|
|
|
|
MSSQL "Support for the MSSQL database" off \
|
2008-05-02 21:17:12 +02:00
|
|
|
SYBASE "Support for the Sybase database" off
|
2006-07-09 16:26:40 +02:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2008-02-13 00:13:34 +01:00
|
|
|
.if !defined(WITH_MYSQL) && !defined(WITH_PGSQL) && !defined(WITH_SQLITE) && !defined(WITH_SQLITE3) && !defined(WITH_MSSQL) && !defined(WITH_SYBASE)
|
2007-02-20 05:01:26 +01:00
|
|
|
IGNORE= needs at least one database backend
|
2006-07-09 16:26:40 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_MYSQL)
|
|
|
|
USE_MYSQL?= YES
|
|
|
|
CONFIGURE_MODULES+= "mysql"
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include/mysql
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib/mysql
|
|
|
|
PLIST_SUB+= WITHMYSQL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITHMYSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_PGSQL)
|
|
|
|
USE_PGSQL?= YES
|
|
|
|
CONFIGURE_MODULES+= "pgsql"
|
|
|
|
PLIST_SUB+= WITHPGSQL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITHPGSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2007-01-12 11:02:18 +01:00
|
|
|
.if defined(WITH_SQLITE)
|
2007-02-20 05:01:26 +01:00
|
|
|
LIB_DEPENDS+= sqlite.2:${PORTSDIR}/databases/sqlite2
|
2006-07-09 16:26:40 +02:00
|
|
|
CONFIGURE_MODULES+= "sqlite"
|
|
|
|
PLIST_SUB+= WITHSQLITE=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITHSQLITE="@comment "
|
|
|
|
.endif
|
|
|
|
|
2007-01-12 11:02:18 +01:00
|
|
|
.if defined(WITH_SQLITE3)
|
2007-02-20 05:01:26 +01:00
|
|
|
LIB_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3
|
2006-07-09 16:26:40 +02:00
|
|
|
CONFIGURE_MODULES+= "sqlite3"
|
|
|
|
PLIST_SUB+= WITHSQLITE3=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITHSQLITE3="@comment "
|
|
|
|
.endif
|
|
|
|
|
2007-02-20 05:01:26 +01:00
|
|
|
.if defined(WITH_MSSQL)
|
|
|
|
LIB_DEPENDS+= sybdb.5:${PORTSDIR}/databases/freetds
|
|
|
|
CONFIGURE_MODULES+= "mssql"
|
|
|
|
PLIST_SUB+= WITHMSSQL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITHMSSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2007-03-05 13:17:15 +01:00
|
|
|
.if defined(WITH_SYBASE)
|
|
|
|
LIB_DEPENDS+= ct.4:${PORTSDIR}/databases/freetds
|
|
|
|
CONFIGURE_MODULES+= "sybase"
|
|
|
|
PLIST_SUB+= WITHSYBASE=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WITHSYBASE="@comment "
|
|
|
|
.endif
|
|
|
|
|
2008-05-02 21:17:12 +02:00
|
|
|
.if defined(WITHOUT_NLS)
|
2007-02-20 05:01:26 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-nls
|
2008-05-02 21:17:12 +02:00
|
|
|
PLIST_SUB+= NLS="@comment "
|
|
|
|
.else
|
|
|
|
USE_GETTEXT= yes
|
|
|
|
PLIST_SUB+= NLS=""
|
2007-02-20 05:01:26 +01:00
|
|
|
.endif
|
|
|
|
|
2006-07-09 16:26:40 +02:00
|
|
|
.include <bsd.port.post.mk>
|