MariaDB Options for Port.

Janky Jay, III jankyj at unfs.us
Thu Mar 11 00:59:45 UTC 2021


Hello Everyone,

    I've been trying to add a MariaDB option to a port I maintain but
everything I have tried has failed. There's is obviously something I'm
not understanding about the available options so I'm hoping someone can
point me the right direction.

    The port currently has a MySQL option which works fine but I'd like
to add MariaDB in there as an alternative:

.if ${PORT_OPTIONS:MMYSQLSERVER}
USES+=      mysql:server
.endif

    Based on the information I found in the Porter's Handbook [1], it
appears there are options for MariaDB but they come from variants of
USES=mysql (such as "mysql:105m", for MariaDB.) However, setting this to
the version isn't working. Plus, I don't want to specify a required
version since there isn't one (I'd like users to be able to use whatever
version they prefer.) It also appears I cannot use multiple USES= lines
because aside from the version arg, it would just use those settings for
MySQL and ignore MariaDB like it's already doing.

    Below is the line I last tested without any luck. Again, I don't
want to specify a version, though. I'd like it do the same thing that
USES+=mysql does where it will install the default version if MariaDB
doesn't exist but if it does, it'll find the correct libs and move
forward with the dependency:

.if ${PORT_OPTIONS:MMARIADBSERVER}
USES+=      mysql:105m
.endif

    Can someone please point me to more informative documentation or
maybe even provide an example port that is already doing this? I've
searched the ports tree but failed to find anything helpful.

[1] - https://docs.freebsd.org/en/books/porters-handbook/#uses-mysql

Regards,
Janky Jay, III

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20210310/2b2a6608/attachment.sig>


More information about the freebsd-ports mailing list