From owner-freebsd-ports@FreeBSD.ORG Fri Jan 30 14:33:03 2015 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3268FE67; Fri, 30 Jan 2015 14:33:03 +0000 (UTC) Received: from mail.server1.bsdforen.de (bsdforen.de [82.193.243.81]) by mx1.freebsd.org (Postfix) with ESMTP id E8BD2215; Fri, 30 Jan 2015 14:33:02 +0000 (UTC) Received: from AprilRyan.norad (iz-aix-213a.HS-Karlsruhe.DE [193.196.64.213]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.server1.bsdforen.de (Postfix) with ESMTPSA id BFA5C8611A; Fri, 30 Jan 2015 15:24:23 +0100 (CET) Message-ID: <54CB9416.5020802@bsdforen.de> Date: Fri, 30 Jan 2015 15:24:22 +0100 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Don Lewis , elizabeth@interlinked.me Subject: Re: testing the value of ${CXX} in ports Makefile References: <201501300628.t0U6Sf5B008970@gw.catspoiler.org> In-Reply-To: <201501300628.t0U6Sf5B008970@gw.catspoiler.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: ports@FreeBSD.org 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: Fri, 30 Jan 2015 14:33:03 -0000 On 30/01/2015 07:28, Don Lewis wrote: > On 29 Jan, Elizabeth Myers wrote: >> On 01/29/15 21:43, Don Lewis wrote: >>> I need to test the value of ${CXX} in the Makefile for a port and am >>> getting unexpected results. Here is a simplified version of the >>> Makefile: >>> >>> ... >>> USE_GCC= 4.9+ >>> >>> .include >>> >>> post-patch: >>> echo CXX=${CXX} >>> .if ${CXX} == g++49 >>> echo detected g++49 >>> .else >>> echo did not detect g++49 >>> .endif >>> >>> .include >>> >>> ... > >> Why do you need to detect it? Shouldn't USE_GCC ensure it's there? In >> any case, browsing through the ports tree, you could try .if >> !empty(CXX:M*g++49*) > > With USE_GCC=yes, CXX will currently get set to g++48, but at some point > the default version will get upgraded to 4.9. Unfortunately, that > breaks the port build unless I apply an extra patch to the source. I > could set USE_GCC=4.8, but once the default version of gcc gets updated, > anyone who uses the port will need both gcc 4.8 for this port and 4.9 > for the majority of parts that just use USE_GCC=yes to get the default. Just check against: ${GCC_DEFAULT:M4.9} -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?