mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
91 lines
2.1 KiB
Makefile
91 lines
2.1 KiB
Makefile
# Created by: Julien Laffaye <kimelto@gmail.com>
|
|
# $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
|
|
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
|
|
|
|
NO_STAGE= yes
|
|
.include <bsd.port.options.mk>
|
|
|
|
.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 <bsd.port.mk>
|