USE_MYSQL / USE_PGSQL buildtime dependency differences
Marco Steinbach
coco at executive-computing.de
Thu Jun 19 14:22:39 UTC 2014
Matthew Seaman wrote on 19.06.2014 15:32:
> On 06/19/14 14:04, Marco Steinbach wrote:
>> Mk/bsd.database.mk seems to handle dependencies resulting from the use
>> of USE_PGSQL and USE_MYSQL flags differently.
>>
>> USE_PGSQL pulls in PostgreSQL at buildtime, for both, the client and the
>> server component. USE_MYSQL seems to only pull anything in at
>> buildtime, if the flag is set to 'client'.
>>
>
> Lars may have beaten you to the draw as far as icinga2 goes, but for
> anyone else hitting this problem:
>
> There is the new:
>
> USES+= pgsql
> WANT_PGSQL= client
>
> form you can use nowadays. 'client' isn't mentioned in the comments at
> the top of /usr/ports/Mk/Uses/pgsql.mk, but it's clearly there in the
> code, and it seems to work.
>
Thanks for your suggestion.
I'll quote from my original post for clarification:
[begin quote]
Thus, with USE_MYSQL=server the build of my port breaks by not
installing anything at buildtime, neither the server nor (more
importantly) its client slaveport, while USE_MYSQL=client does not
install the server.
Can I have my cake and eat it by using the USE_MYSQL flags, or do I need
to revert to using explicit BUILD_DEPENDS / RUN_DEPENDS combinations to
get the MySQL client in at buildtime in any case ?
[end quote]
My question resulted from a problem with USE_MYSQL, not USE_PGSQL.
There is no documented WANT_PGSQL= flag (in Mk/bsd.database.mk at
least), since defining USE_PGSQL allways implies installing the client
in addition to whatever component is listed in the flag.
USE_PGSQL=server results in the client and the server being installed at
buildtime. USE_PGSQL=yaddayadda (I've actually just tried this to make
sure) gives you the client, only.
USE_MYSQL=yaddayadda installs the client at buildtime. USE_MYSQL=server
installs nothing at buildtime (and consequently my build breaks).
My current workaround for situations like these is to use something
along the lines of:
MYSQL_LIB_DEPENDS=
libmysqlclient.so:${PORTSDIR}/databases/mysql${MYSQL_VER}-client
But as said, I'd like to have my cake and eat it by using the USE_MYSQL
flag, since that fits nicely into a single option helper :)
MfG CoCo
More information about the freebsd-ports
mailing list