Date: Thu, 19 Jun 2014 16:21:00 +0200 From: Marco Steinbach <coco@executive-computing.de> To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: freebsd-ports@freebsd.org Subject: Re: USE_MYSQL / USE_PGSQL buildtime dependency differences Message-ID: <53A2F1CC.8040705@executive-computing.de> In-Reply-To: <53A2E650.6040309@infracaninophile.co.uk> References: <53A2DFDD.3050307@executive-computing.de> <53A2E650.6040309@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A2F1CC.8040705>