From owner-freebsd-ports@freebsd.org Sun Jun 9 05:00:21 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79E9215BD2EE for ; Sun, 9 Jun 2019 05:00:21 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B3B178884D for ; Sun, 9 Jun 2019 05:00:20 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: by mailman.ysv.freebsd.org (Postfix) id 676EE15BD2EC; Sun, 9 Jun 2019 05:00:20 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 551E615BD2EB for ; Sun, 9 Jun 2019 05:00:20 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from echo.brtsvcs.net (echo.brtsvcs.net [IPv6:2607:f740:c::4ae]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD3F88884C for ; Sun, 9 Jun 2019 05:00:19 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from chombo.houseloki.net (chombo [IPv6:2601:1c2:1402:1770:ae1f:6bff:fe6b:9e1c]) by echo.brtsvcs.net (Postfix) with ESMTPS id 17ED738D16; Sat, 8 Jun 2019 22:00:18 -0700 (PDT) Received: from [IPv6:2601:1c2:1402:1770:4ccd:e2dc:ca4e:21ef] (unknown [IPv6:2601:1c2:1402:1770:4ccd:e2dc:ca4e:21ef]) by chombo.houseloki.net (Postfix) with ESMTPSA id 2FA941CB7; Sat, 8 Jun 2019 22:00:17 -0700 (PDT) Subject: Re: How to best check a configuration of another port/package? To: Adam Weinberger , Gerald Pfeifer Cc: FreeBSD Ports References: From: Mel Pilgrim Message-ID: <736af897-818e-68cd-c354-f295d03fb176@bluerosetech.com> Date: Sat, 8 Jun 2019 22:00:11 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: DD3F88884C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.986,0] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 05:00:21 -0000 On 2019-06-08 9:57, Adam Weinberger wrote: > On Sat, Jun 8, 2019 at 10:02 AM Gerald Pfeifer wrote: >> >> In https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237688 we had >> a user report against lang/gcc* ports that could be traced back to >> a certain functionality (option) in another port (devel/binutils) >> missing. >> >> In pseudo-code this could be addressed as follows in lang/gcc* >> >> .if $(binutils built statically) >> IGNORE= GCC requires dynamically linked binutils >> .endif >> >> Now the question is: How to implement something like this practically? > > What you have there won't work, because `make index` won't work, plus > Makefiles shouldn't be doing external calls if they don't have to. > You'll also have a problem whereby LOCALBASE isn't defined yet, and I > don't believe that IGNORE after bsd.port.pre.mk will work (I could be > wrong about that). > > You have two options: > 1) Turn it into a pre-configure, which is slightly ugly for the > end-user but still gets the job done > pre-configure: > if some file in binutils is static; then echo "NOPE"; exit 1; fi > > 2) (The correct way to do it) Create a binutils-static slave port, > remove the static option from binutils proper, and depend specifically > on the non-static port. Why is a slave port the correct option here instead of flavouring binutils?