Date: Wed, 1 Jan 2020 18:55:32 +0000 (UTC) From: Adriaan de Groot <adridg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r521759 - head/databases/akonadi Message-ID: <202001011855.001ItWXm013289@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adridg Date: Wed Jan 1 18:55:32 2020 New Revision: 521759 URL: https://svnweb.freebsd.org/changeset/ports/521759 Log: Massage databases/akonadi OPTIONS - Tidy use of CMake helpers - Shuffle bits around some - Make the default backend match the selected / enabled backends. For users of the default configuration this doesn't matter (builds MySQL, defaults to MySQL) but SQLite users who switch off MySQL still got MySQL as the backend. PR: 239108 Reported by: Lapo Luchini Reviewed by: tcberner Modified: head/databases/akonadi/Makefile Modified: head/databases/akonadi/Makefile ============================================================================== --- head/databases/akonadi/Makefile Wed Jan 1 18:55:17 2020 (r521758) +++ head/databases/akonadi/Makefile Wed Jan 1 18:55:32 2020 (r521759) @@ -2,6 +2,7 @@ PORTNAME= akonadi DISTVERSION= ${KDE_APPLICATIONS_VERSION} +PORTREVISION= 1 CATEGORIES= databases kde kde-applications MAINTAINER= kde@FreeBSD.org @@ -28,13 +29,16 @@ CMAKE_ARGS+= -DCMAKE_REQUIRED_INCLUDES:STRING="${LOCAL USE_LDCONFIG= yes +OPTIONS_DEFINE= DOCS OPTIONS_MULTI= DB OPTIONS_MULTI_DB= MYSQL PGSQL SQLITE OPTIONS_SUB= yes +OPTIONS_DEFAULT= MYSQL MYSQL_DESC= Install MySQL Qt plugin and server MYSQL_USES= mysql:server qt:5 MYSQL_USE= QT=sql-mysql_run +MYSQL_CMAKE_BOOL= AKONADI_BUILD_MYSQL PGSQL_DESC= Install PostgreSQL Qt plugin # Do not add a dependency on PostgreSQL server as someone preferring @@ -43,16 +47,35 @@ PGSQL_DESC= Install PostgreSQL Qt plugin #PGSQL_USE= PGSQL=server PGSQL_USES= qt:5 PGSQL_USE= QT=sql-pgsql_run +PGSQL_CMAKE_BOOL= AKONADI_BUILD_PGSQL SQLITE_DESC= Enable SQLite backend SQLITE_USES= qt:5 sqlite:3 SQLITE_USE= QT=sql-sqlite3_run -SQLITE_CMAKE_ON= -DAKONADI_BUILD_QSQLITE:BOOL=ON -SQLITE_CMAKE_OFF= -DAKONADI_BUILD_QSQLITE:BOOL=OFF +SQLITE_CMAKE_BOOL= AKONADI_BUILD_QSQLITE -OPTIONS_DEFAULT= MYSQL +.include <bsd.port.options.mk> -OPTIONS_DEFINE= DOCS +# Multiple backends may be enabled, but there can be only +# one default. Set a default (the user can change it locally) +# based on the selected backends, preferring MySQL (if enabled). +# +# If you build this port with only a single backend selected, +# that one will be the default. This is useful for users of SQLite. +.if ${PORT_OPTIONS:MMYSQL} +CMAKE_ARGS+= -DDATABASE_BACKEND=MYSQL +.else +. if ${PORT_OPTIONS:MPGSQL} +CMAKE_ARGS+= -DDATABASE_BACKEND=POSTGRES +. else +. if ${PORT_OPTIONS:MSQLITE} +CMAKE_ARGS+= -DDATABASE_BACKEND=SQLITE +. else +# Nothing else selected, very odd +CMAKE_ARGS+= -DDATABASE_BACKEND=MYSQL +. endif +. endif +.endif post-patch: # To avoid overflow, MySQL settings need to be lower than
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001011855.001ItWXm013289>