Bug 239108 - databases/akonadi: Builds and links against database that are installed, even when disabled in OPTIONS
Summary: databases/akonadi: Builds and links against database that are installed, even...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: kde
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-07-10 09:52 UTC by Lapo Luchini
Modified: 2019-08-12 09:41 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lapo Luchini 2019-07-10 09:52:50 UTC
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\"
Comment 1 Lapo Luchini 2019-07-10 09:53:39 UTC
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
Comment 2 Adriaan de Groot freebsd_committer 2019-08-12 09:41:45 UTC
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).