USE_MYSQL / USE_PGSQL buildtime dependency differences

Marco Steinbach coco at executive-computing.de
Thu Jun 19 13:06:18 UTC 2014


Hi.

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'.

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 ?


Here's an example:

[Makefile ...]
PGSQL_USE=      pgsql=server
PGSQLC_USE=     pgsql=client
MYSQL_USE=      mysql=server
MYSQLC_USE=     mysql=client
[...]

With option MYSQL=On and MYSQLC=Off:

$ ( make showconfig && make build-depends-list ) | egrep -i 'mysql|postgres'
====> Depend on PostgreSQL: you can only select none or one of them
      PGSQL=on: PostgreSQL database support
      PGSQLC=off: PostgreSQL database support (client only)
====> Depend on MySQL: you can only select none or one of them
      MYSQL=on: MySQL database support
      MYSQLC=off: MySQL database support (client only)
/usr/ports/databases/postgresql92-client
/usr/ports/databases/postgresql92-server
$


As opposed to (note the changed MYSQLC / MYSQL options):

$ ( make showconfig && make build-depends-list ) | egrep -i 'mysql|postgres'
====> Depend on PostgreSQL: you can only select none or one of them
      PGSQL=on: PostgreSQL database support
      PGSQLC=off: PostgreSQL database support (client only)
====> Depend on MySQL: you can only select none or one of them
      MYSQL=off: MySQL database support
      MYSQLC=on: MySQL database support (client only)
/usr/ports/databases/mysql55-client
/usr/ports/databases/postgresql92-client
/usr/ports/databases/postgresql92-server
$

I've also tried renaming my MYSQL / PGSQL options to preclude possible 
collisions, but that didn't change behaviour.

I'm trying to create a port of Icinga2 
(https://www.icinga.org/icinga2/), FWIW.

MfG CoCo


More information about the freebsd-ports mailing list