From owner-freebsd-ports@FreeBSD.ORG Tue Mar 10 23:30: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 A4C46C84 for ; Tue, 10 Mar 2015 23:30:43 +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 51603401 for ; Tue, 10 Mar 2015 23:30:43 +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 t2ANUZ5H086530 for ; Tue, 10 Mar 2015 15:30:39 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503102330.t2ANUZ5H086530@gw.catspoiler.org> Date: Tue, 10 Mar 2015 16:30:35 -0700 (PDT) From: Don Lewis Subject: possible to adjust OPTIONS_DEFAULT based on COMPILER_TYPE? To: ports@FreeBSD.org MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii 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: Tue, 10 Mar 2015 23:30:43 -0000 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.