# Created by: Julien Laffaye # $FreeBSD$ PORTNAME= soci PORTVERSION= 3.1.0 CATEGORIES= databases MASTER_SITES= SF MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= jlaffaye@FreeBSD.org COMMENT= The C++ Database Access Library LICENSE= BSL LICENSE_FILE= ${WRKSRC}/LICENSE_1_0.txt USE_ZIP= yes USES= cmake CMAKE_ARGS+= -DWITH_ORACLE:BOOL=OFF MAKE_JOBS_SAFE= yes USE_LDCONFIG= yes SUB_FILES= pkg-message PKGMESSAGE= ${WRKDIR}/pkg-message OPTIONS_DEFINE= MYSQL PGSQL SQLITE ODBC BOOST BOOST_DESC= Enable support for additional types using Boost OPTIONS_SINGLE= ODBCDRV ODBCDRV_DESC= ODBC driver to use OPTIONS_SINGLE_ODBCDRV= IODBC UODBC IODBC_DESC= use iODBC driver UODBC_DESC= use unixODBC driver OPTIONS_DEFAULT=MYSQL PGSQL SQLITE ODBC IODBC BOOST .include .if ${PORT_OPTIONS:MMYSQL} USE_MYSQL= yes PLIST_SUB+= MYSQL="" CMAKE_ARGS+= -DWITH_MYSQL:BOOL=ON .else PLIST_SUB+= MYSQL="@comment " CMAKE_ARGS+= -DWITH_MYSQL:BOOL=OFF .endif .if ${PORT_OPTIONS:MPGSQL} USE_PGSQL= yes PLIST_SUB+= PGSQL="" CMAKE_ARGS+= -DWITH_POSTGRESQL:BOOL=ON .else PLIST_SUB+= PGSQL="@comment " CMAKE_ARGS+= -DWITH_POSTGRESQL:BOOL=OFF .endif .if ${PORT_OPTIONS:MSQLITE} USE_SQLITE= yes PLIST_SUB+= SQLITE="" CMAKE_ARGS+= -DWITH_SQLITE3:BOOL=ON .else PLIST_SUB+= SQLITE="@comment " CMAKE_ARGS+= -DWITH_SQLITE3:BOOL=OFF .endif .if ${PORT_OPTIONS:MODBC} PLIST_SUB+= ODBC="" CMAKE_ARGS+= -DWITH_ODBC:BOOL=ON .if ${PORT_OPTIONS:MUODBC} LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC CMAKE_ARGS+= -DODBC_LIBRARY:FILE_PATH=${LOCALBASE}/lib/libodbc.so .elif ${PORT_OPTIONS:MIODBC} LIB_DEPENDS+= iodbc:${PORTSDIR}/databases/libiodbc CMAKE_ARGS+= -DODBC_LIBRARY:FILE_PATH=${LOCALBASE}/lib/libiodbc.so .endif .else PLIST_SUB+= ODBC="@comment " CMAKE_ARGS+= -DWITH_ODBC:BOOL=OFF .endif . if ${PORT_OPTIONS:MBOOST} LIB_DEPENDS+= boost_date_time:${PORTSDIR}/devel/boost-libs PLIST_SUB+= BOOST="" CMAKE_ARGS+= -DWITH_BOOST:BOOL=ON .else PLIST_SUB+= BOOST="@comment " CMAKE_ARGS+= -DWITH_BOOST:BOOL=OFF .endif post-install: @${CAT} ${PKGMESSAGE} .include