Akonadi port seems to compile against MySQL (and using it as default backend) even if explicitly de-selected from the OPTIONS if it is found on the system: ┌──────────────────────────── akonadi-19.04.2_1 ───────────────────────────────┐ │ ┌──────────────────────────────────────────────────────────────────────────┐ │ │ │ [ ] DOCS Build and/or install documentation │ │ │ │──────────────────────────────────── DB ──────────────────────────────────│ │ │ │ [ ] MYSQL Install MySQL Qt plugin and server │ │ │ │ [ ] PGSQL Install PostgreSQL Qt plugin │ │ │ │ [x] SQLITE Enable SQLite backend │ │ │ └──────────────────────────────────────────────────────────────────────────┘ │ ├──────────────────────────────────────────────────────────────────────────────┤ │ < OK > <Cancel> │ └──────────────────────────────────────────────────────────────────────────────┘ -- MySQL Server found: /usr/local/libexec/mysqld -- PostgreSQL wasn't found. it is required to use the Postgres backend. -- Found PkgConfig: /usr/local/bin/pkg-config (found version "1.6.1") -- Checking for module 'sqlite3' -- Found sqlite3, version 3.28.0 [166/560] /usr/bin/c++ -DAKONADI_DATABASE_BACKEND=\"QMYSQL\"
If not found on the system, the output changes like this (it seems that it doesn't compile it… but still is the default backend): -- MySQL Server wasn't found. it is required to use the MySQL backend. -- PostgreSQL wasn't found. it is required to use the Postgres backend. -- Found PkgConfig: /usr/local/bin/pkg-config (found version "1.6.1") -- Checking for module 'sqlite3' -- Found sqlite3, version 3.28.0 -- Found Sqlite: /usr/local/include (Required is at least version "3.6.23") -- Looking for include file unistd.h -- Looking for include file unistd.h - found -- Using default db backend QMYSQL
The backend issue -- it does not match the available backends if MySQL isn't available -- should be reported upstream; basically in akonadi/CMakeLists.txt set(DATABASE_BACKEND "MYSQL" CACHE STRING "The default database backend to use for Akonadi. Can be either MYSQL, POSTGRES or SQLITE") that should account for the available backends (or, if you're changing the backends around, would could set DATABASE_BACKEND by hand). At the ports level, the DB is a multiple-selection item, so we can't really set DATABASE_BACKEND based on the selection there (it'd be simpler if there were a radio button).
A commit references this bug: Author: adridg Date: Wed Jan 1 18:55:32 UTC 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 Changes: head/databases/akonadi/Makefile