From owner-freebsd-ports@FreeBSD.ORG Thu Jun 19 14:22:39 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55554CE1 for ; Thu, 19 Jun 2014 14:22:39 +0000 (UTC) Received: from mail.moehre.org (mail.moehre.org [195.96.35.7]) by mx1.freebsd.org (Postfix) with ESMTP id 15741262A for ; Thu, 19 Jun 2014 14:22:38 +0000 (UTC) Received: from mail.moehre.org (unknown [195.96.35.7]) by mail.moehre.org (Postfix) with ESMTP id 02BCF8B143C; Thu, 19 Jun 2014 16:22:38 +0200 (CEST) X-Spam-Flag: NO X-Spam-Score: -100.929 X-Spam-Level: X-Spam-Status: No, score=-100.929 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, AWL=-0.006, TW_PG=0.077, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mail.moehre.org ([195.96.35.7]) by mail.moehre.org (mail.moehre.org [195.96.35.7]) (amavisd-new, port 10024) with ESMTP id YlBUQBRqRwhq; Thu, 19 Jun 2014 16:22:36 +0200 (CEST) Received: from [192.168.100.30] (p54B0B2A7.dip0.t-ipconnect.de [84.176.178.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: coco@executive-computing.de) by mail.moehre.org (Postfix) with ESMTPSA id 723188B141C; Thu, 19 Jun 2014 16:22:36 +0200 (CEST) Message-ID: <53A2F1CC.8040705@executive-computing.de> Date: Thu, 19 Jun 2014 16:21:00 +0200 From: Marco Steinbach User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Matthew Seaman Subject: Re: USE_MYSQL / USE_PGSQL buildtime dependency differences References: <53A2DFDD.3050307@executive-computing.de> <53A2E650.6040309@infracaninophile.co.uk> In-Reply-To: <53A2E650.6040309@infracaninophile.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 14:22:39 -0000 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