MariaDB Options for Port.,MariaDB Options for Port.

Janky Jay, III jankyj at unfs.us
Thu Mar 11 14:39:09 UTC 2021


Hello Yasuhiro,

On 3/10/21 6:30 PM, Yasuhiro Kimura wrote:
> From: "Janky Jay, III" <jankyj at unfs.us>
> Subject: MariaDB Options for Port.,MariaDB Options for Port.
> Date: Wed, 10 Mar 2021 17:59:35 -0700
>
>>     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
>>
> Your port works fine with both MySQL and MariaDB. Right? If so you
> should add `USES=mysql` without version arguments in the Makefile of
> your port. Then user can specify which version of MySQL or MariaDB to
> be used. For example, if he wants to use MariaDB 10.5 then he should
> add following line in make.conf
>
> ----------------------------------------------------------------------
> DEFAULT_VERSIONS+=10.5m
> ----------------------------------------------------------------------
    This makes much more sense. Thank you!

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/20210311/bea54309/attachment.sig>


More information about the freebsd-ports mailing list