From owner-freebsd-doc@FreeBSD.ORG Thu Apr 12 23:19:31 2012 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24E4106564A; Thu, 12 Apr 2012 23:19:31 +0000 (UTC) (envelope-from zxMbzY3e@nanoman.ca) Received: from mail.nanoman.ca (mail.nanoman.ca [76.10.173.222]) by mx1.freebsd.org (Postfix) with ESMTP id 6582C8FC08; Thu, 12 Apr 2012 23:19:31 +0000 (UTC) Received: from www.nanoman.ca (nanobox.nanoman.ca [127.0.0.1]) by mail.nanoman.ca (Postfix) with ESMTP id D0B981161A; Thu, 12 Apr 2012 19:19:24 -0400 (EDT) Received: from 192.168.1.9 (SquirrelMail authenticated user zxMbzY3e) by www.nanoman.ca with HTTP; Thu, 12 Apr 2012 19:19:24 -0400 (EDT) Message-ID: <11181.192.168.1.9.1334272764.squirrel@www.nanoman.ca> In-Reply-To: <201204122226.36290.makc@freebsd.org> References: <201204111833.q3BIXILU034322@red.freebsd.org> <201204122226.36290.makc@freebsd.org> Date: Thu, 12 Apr 2012 19:19:24 -0400 (EDT) From: "A.J. Kehoe IV (Nanoman)" To: "Max Brazhnikov" User-Agent: SquirrelMail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-doc@freebsd.org, freebsd-gnats-submit@freebsd.org Subject: Re: docs/166855: [patch] Automatic Detection of Dependencies Addendum for Porter's Handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: zxMbzY3e@nanoman.ca List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2012 23:19:31 -0000 > On Wed, 11 Apr 2012 18:33:18 GMT, A.J. Kehoe IV (Nanoman) wrote: >> + >> + Correct Declaration of an Optional Dependency >> + >> + OPTIONS= BAR "Enable bar >> support" on >> + >> +.include <bsd.port.pre.mk> >> + >> +.if defined(WITH_BAR) && !defined(WITHOUT_BAR) >> +LIB_DEPENDS= bar:${PORTSDIR}/foo/bar >> +.endif >> + > > It's not enough. You also need to add something like --disable-bar to > configure arguments and of course configure script should respect the > switch. This is needed only if it's required by the configure script. If support for a dependency doesn't need to be compiled in, then simply including it in the dependency list would suffice. My examples included only the elements that were needed to illustrate my point. Anyone wanting to use optional dependencies should read the "makefile-options" section that I linked to, along with any other sections that are relevant to their port.