From owner-freebsd-ports@FreeBSD.ORG Wed Mar 11 11:13:43 2015 Return-Path: Delivered-To: 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 2DF4B25C; Wed, 11 Mar 2015 11:13:43 +0000 (UTC) Received: from prod2.absolight.net (mx3.absolight.net [IPv6:2a01:678:2:100::25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "plouf.absolight.net", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E1042A4D; Wed, 11 Mar 2015 11:13:42 +0000 (UTC) Received: from prod2.absolight.net (localhost [127.0.0.1]) by prod2.absolight.net (Postfix) with ESMTP id 65292BDC56; Wed, 11 Mar 2015 12:13:39 +0100 (CET) Received: from gw.in.absolight.net (gw-ecl.in.absolight.net [79.143.241.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gw.in.absolight.net", Issuer "CA Cert Signing Authority" (not verified)) by prod2.absolight.net (Postfix) with ESMTPSA id 3F4FEBDC1D; Wed, 11 Mar 2015 12:13:39 +0100 (CET) Received: from ogg.in.absolight.net (ogg.in.absolight.net [79.143.241.239]) by gw.in.absolight.net (Postfix) with ESMTP id EEBD9617C; Wed, 11 Mar 2015 12:13:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ogg.in.absolight.net (Postfix) with ESMTP id 4B1AA7EAB302; Wed, 11 Mar 2015 12:13:36 +0100 (CET) Date: Wed, 11 Mar 2015 12:13:35 +0100 From: Mathieu Arnold To: Don Lewis , ports@FreeBSD.org Subject: Re: possible to adjust OPTIONS_DEFAULT based on COMPILER_TYPE? Message-ID: In-Reply-To: <201503102330.t2ANUZ5H086530@gw.catspoiler.org> References: <201503102330.t2ANUZ5H086530@gw.catspoiler.org> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: Wed, 11 Mar 2015 11:13:43 -0000 +--On 10 mars 2015 16:30:35 -0700 Don Lewis wrote: | I've run into a situation where I'd like to change OPTIONS_DEFAULT based | on the value of the value of COMPILER_TYPE. I'm setting USE_GCC=yes. If | the base compiler is gcc, then I can enable a particular option to make | the port more featureful. If the base compiler is clang, then some of | the other ports the option depends on are C++ code that gets compiled | with clang and the port breaks because of the libstdc++ vs. libc++ | conflict. In that case, I'd like to disable the option to at least have | working binary packages available, even though they aren't as | featureful. | | This doesn't look possible, though. OPTIONS_DEFAULT needs to be set | before the .include , and COMPILER_TYPE isn't set | until after that, or possibly even after bsd.port.pre.mk. Mmmm, yes, you're kinda stuck, I've already had a look, and it's not possible to have options working including port.options and also be able to change stuff after it. Though, USE_GCC=yes will never use the old base gcc, but always lang/gcc (well, the one defined in bsd.default-versions, which if left alone is lang/gcc), USE_GCC=any will use gcc from base though, but I'm not sure you can have a good reason to use it. -- Mathieu Arnold