pkgsrc/mail/akonadi/options.mk
jperkin 5393242c73 *: Move SUBST_STAGE from post-patch to pre-configure
Performing substitutions during post-patch breaks tools such as mkpatches,
making it very difficult to regenerate correct patches after making changes,
and often leading to substituted string replacements being committed.
2018-07-04 13:40:07 +00:00

53 lines
1.4 KiB
Makefile

# $NetBSD: options.mk,v 1.3 2018/07/04 13:40:22 jperkin Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.akonadi
PKG_OPTIONS_REQUIRED_GROUPS= db
PKG_OPTIONS_GROUP.db= mysql sqlite
PKG_SUGGESTED_OPTIONS= sqlite
.include "../../mk/bsd.options.mk"
###
### Use mysql backend
###
.if !empty(PKG_OPTIONS:Mmysql)
. include "../../mk/mysql.buildlink3.mk"
.include "../../mk/mysql.buildlink3.mk"
DEPENDS+= qt4-mysql-[0-9]*:../../x11/qt4-mysql
CMAKE_ARGS+= -DAKONADI_BUILD_QSQLITE=off
. if ${_MYSQL_VERSION} == "56"
. include "../../databases/mysql56-server/buildlink3.mk"
. elif ${_MYSQL_VERSION} == "55"
. include "../../databases/mysql55-server/buildlink3.mk"
. elif ${_MYSQL_VERSION} == "51"
. include "../../databases/mysql51-server/buildlink3.mk"
. else
PKG_FAIL_RESASON+= "Unknown MySQL version: ${_MYSQL_VERSION}"
. endif
SUBST_CLASSES+= mysql
SUBST_STAGE.mysql= pre-configure
SUBST_MESSAGE.mysql= Fix mysqld path.
SUBST_FILES.mysql= server/CMakeLists.txt
SUBST_SED.mysql= -e "s:MYSQLD_EXECUTABLE mysqld:MYSQLD_EXECUTABLE mysqld ${PREFIX}/libexec:"
.endif
###
### Use postgresql backend
###
.if !empty(PKG_OPTIONS:Mpgsql)
. include "../../mk/pgsql.buildlink3.mk"
# XXX Not yet tested in pkgsrc
.endif
###
### Use sqlite backend
###
PLIST_VARS+= sqlite
.if !empty(PKG_OPTIONS:Msqlite)
. include "../../databases/sqlite3/buildlink3.mk"
CMAKE_ARGS+= -DDATABASE_BACKEND=SQLITE
CMAKE_ARGS+= -DINSTALL_QSQLITE_IN_QT_PREFIX=true
PLIST.sqlite= yes
.endif