From owner-freebsd-ports@FreeBSD.ORG Mon Mar 23 18:03:49 2015 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F06FEC6D for ; Mon, 23 Mar 2015 18:03:49 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95FAF351 for ; Mon, 23 Mar 2015 18:03:49 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2NI3ceA029770; Mon, 23 Mar 2015 10:03:42 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503231803.t2NI3ceA029770@gw.catspoiler.org> Date: Mon, 23 Mar 2015 11:03:38 -0700 (PDT) From: Don Lewis Subject: Re: Adding options framework variables that depend on variables coming after bsd.port.pre.mk To: cyberbotx@cyberbotx.com In-Reply-To: <9623862267593285ee2fb436666eba27.squirrel@www.cyberbotx.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: freebsd-ports@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 18:03:50 -0000 On 23 Mar, Naram Qashat wrote: > I'm wanting to add an options framework LIB_DEPENDS that depends on > variables that normally come after bsd.port.pre.mk. > > In this case, I am trying to add a UTEMPTER_LIB_DEPENDS on > sysutils/libutempter, but I want to check OPSYS and OSVERSION beforehand, > since base FreeBSD 9.x contains utempter while any earlier FreeBSDs as > well as non-FreeBSD OSes don't contain it and need the port. > > I cannot place the UTEMPTER_LIB_DEPENDS line after bsd.port.pre.mk because > the options framework doesn't see it then, but I also cannot wrap it > around an if conditional using OPSYS and OSVERSION before bsd.port.pre.mk > because those variables aren't set yet. > > I've been told that there is a workaround, but I was not told what the > workaround was. Does anyone know how this can be acomplished? Maybe something like: UTEMPTER_LIB_DEPENDS=${FOO} .include .if ${OPSYS} ... && ${OSVERSION} ... FOO= what you want to add to LIB_DEPENDS .endif