From owner-freebsd-ports@freebsd.org Mon Jun 5 18:12:00 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8546FAFE6E8 for ; Mon, 5 Jun 2017 18:12:00 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from apnoea.adamw.org (apnoea.adamw.org [104.225.5.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "apnoea.adamw.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC3F364B9C; Mon, 5 Jun 2017 18:11:59 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by apnoea.adamw.org (OpenSMTPD) with ESMTPSA id e5e2d54a TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 5 Jun 2017 12:11:52 -0600 (MDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Pass options to dependency From: Adam Weinberger In-Reply-To: <59355862.6060007@grosbein.net> Date: Mon, 5 Jun 2017 12:11:51 -0600 Cc: Matthew Seaman , freebsd-ports@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8AA51B7E-F0BB-46D8-8C29-4E414425DDE6@adamw.org> References: <59352AB6.3040005@grosbein.net> <11954833-f1a3-f8d7-d482-7da1f5427b27@FreeBSD.org> <59355862.6060007@grosbein.net> To: Eugene Grosbein X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2017 18:12:00 -0000 > On 5 Jun, 2017, at 7:10, Eugene Grosbein wrote: >=20 > 05.06.2017 18:51, Matthew Seaman =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> On 05/06/2017 10:56, Eugene Grosbein wrote: >>> How can a port (its Makefile) pass a build option to BUILD_DEPENDS? >>> For example, devel/ragel has: >>>=20 >>> DOCS_USE=3D TEX=3Dlatex:build >>> DOCS_BUILD_DEPENDS=3D fig2dev:print/transfig >>>=20 >>> And "make -C /usr/ports/devel/ragel all-depends-list" shows HUGE >>> list of its dependencies completely unneded for a port that just >>> needs to use BUILD_DEPENDS=3Dragel:devel/ragel >>>=20 >>> The reason is that bsd.options.mk includes PORT_OPTIONS+=3D DOCS >>> unless user option NOPORTDOCS is set. >>>=20 >>> Is it possible to specify something like OPTIONS_EXCLUDE=3DDOCS >>> for BUILD_DEPENDS entity? >>>=20 >>=20 >> Generally what you would do is create a slave port of the dependency >> with the options settings you require. Doing this to turn off the = DOCS >> option would be unprecedented though. >>=20 >> I believe the consensus nowadays is that DOCS should control = installing >> documentation that takes little or no effort to generate. If you = need >> to install a huge dependency tree in order to generate documentation, >> then that should be controlled using a different option. Whether to >> have that option default to either ON or OFF is at the discretion of = the >> maintainer. >>=20 >> So my advice here is open a PR to get devel/ragel modified, and in = the >> mean time try and ignore all those unwanted dependencies while you = work >> on your own port. >=20 > It would be more useful to have general way to build a dependency > with needed set of options or at least introduce NODEPDOCS > similar to NOPORTDOCS, wouldn't it? Standard policy is that DOCS is always enabled by default, and if heavy = dependencies are required, they have a new option name. TEXDOCS, for = instance, for ragel's example. NODEPDOCS is a little too grey because the interpretation is arbitrary; = what about ports that need pandoc to produce manpages... we'd need a = NODEPMANPAGES variable, and a NODEPHELPFILESBUTNOTDOCS, NODEPEXAMPLES, = etc. # Adam --=20 Adam Weinberger adamw@adamw.org https://www.adamw.org