net-mgmt/librenms: creating mariadb and mysql flavors
"Dan Langille" <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.ports |
|---|---|
| Message-ID | <[email protected]> |
re: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292266
I'm looking at adding mysql and mariadb flavors to net-mgmt/librenms
Getting @mysql working is fine:
+.if ${FLAVOR:U} == mysql
+USES+= mysql:client
+.endif
The problem seems to be specifying mariadb. I've been basing it on:
+.if ${FLAVOR:U} == mariadb
+USES+= mysql:client MYSQL_FLAVOUR= mariadb
+.endif
That's no good. That just gives: Unknown USES=MYSQL_FLAVOUR=mariadb
The USES docs[1] mentions "The m and p suffixes are for the MariaDB and
Percona variants of MySQL" - yet that requires me to know and select a version,
something I'd prefer to leave up to the ports tree / user. That's also what MySQL
does.
Reading Mk/Uses/mysql.mk[2], it sets `MYSQL_FLAVOUR= mariadb` only if that version
mentioned above is specified.
I've grep'd for examples, found none.
When I get to blocks like this, I figure I'm doing it wrong.
Am I?
1 - https://docs.freebsd.org/en/books/porters-handbook/uses/#uses-mysql mentions
2 - https://cgit.freebsd.org/ports/tree/Mk/Uses/mysql.mk#n108
--
Dan Langille
[email protected]