From owner-freebsd-fortran@FreeBSD.ORG Sun Jan 25 20:56:26 2015 Return-Path: Delivered-To: fortran@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 802D7AF6; Sun, 25 Jan 2015 20:56:26 +0000 (UTC) Received: from ainaz.pair.com (ainaz.pair.com [209.68.2.66]) (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 5ED00839; Sun, 25 Jan 2015 20:56:25 +0000 (UTC) Received: from [192.168.0.132] (vie-91-186-145-239.dsl.sil.at [91.186.145.239]) by ainaz.pair.com (Postfix) with ESMTPSA id 6F2C73F41D; Sun, 25 Jan 2015 15:56:23 -0500 (EST) Date: Sun, 25 Jan 2015 21:56:21 +0100 (CET) From: Gerald Pfeifer To: fortran@FreeBSD.org, Antoine Brodin Subject: Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk (PING) Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 20:56:26 -0000 [ No answers from fortran@ for nine days. Antoine, perhaps something you can approve as portmgr@ ? ] This patch avoids hardcoding of the version of GCC in lang/gcc in Uses/fortran.mk. It does so by moving the variable LANG_GCC_IS from bsd.mk.gcc to bsd.default-versions.mk and using it both in bsd.mk.gcc and Uses/fortran.mk. Okay for me to commit? (I tested by tweaking LANG_GCC_IS and GCC_DEFAULT in various ways and inspecting the settings of variables in consequence.) Gerald @FreeBSD.org PS: Antoine, this should address your comment in PR/196712 in a different and permanent matter. :-) Index: Uses/fortran.mk =================================================================== --- Uses/fortran.mk (revision 377007) +++ Uses/fortran.mk (working copy) @@ -18,7 +18,7 @@ .if ${fortran_ARGS} == gcc .include "${PORTSDIR}/Mk/bsd.default-versions.mk" _GCC_VER= ${GCC_DEFAULT:S/.//} -.if ${_GCC_VER} == 48 +.if ${GCC_DEFAULT} == ${LANG_GCC_IS} BUILD_DEPENDS+= gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc RUN_DEPENDS+= gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc .else Index: bsd.default-versions.mk =================================================================== --- bsd.default-versions.mk (revision 377007) +++ bsd.default-versions.mk (working copy) @@ -34,3 +34,6 @@ FIREBIRD_DEFAULT?= 2.5 .endif + +# Version of lang/gcc. Do not override! +LANG_GCC_IS= 4.8 Index: bsd.gcc.mk =================================================================== --- bsd.gcc.mk (revision 377007) +++ bsd.gcc.mk (working copy) @@ -47,9 +47,6 @@ GCCVERSION_040900= 0 0 4.9 GCCVERSION_050000= 0 0 5 -# Version of lang/gcc -LANG_GCC_IS= 4.8 - # No configurable parts below this. #################################### # From owner-freebsd-fortran@FreeBSD.ORG Sun Jan 25 21:14:38 2015 Return-Path: Delivered-To: fortran@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 51397E02; Sun, 25 Jan 2015 21:14:38 +0000 (UTC) Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECD8B9CD; Sun, 25 Jan 2015 21:14:34 +0000 (UTC) Received: by mail-yk0-f173.google.com with SMTP id 142so2606663ykq.4; Sun, 25 Jan 2015 13:14:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3e5dLgDeE0zfzBDguyOdujq4agLo77mCKLAiKkagpVU=; b=Oclb8mOojrXMkq3/uSia+2lhKII6CuU0GtXNsV3XchtN+zzJn1kx/0skvoSF1pYOKe l2k/DUJ5Czf6RW1LuNgEgQY2Ot/rrxlCLAdJEprhjlJk2q1PmnCpms669FjE47a+9R1x lsbf+hn6pPsUsuGq4Y0o+Igvt15maBv36oMQLIPSR+25M/7ADJp40eEilpdVgfcuEXi+ CSrOHV4mjO+amDRiA2S+cK4stZTMv8HjFtowVK984H0HzhvuMxM+sFVtbUHOz1MxZb1C nbAbCjt9VYphuQVu4muF5JdmtzEFbV2DT4TYv28PTz4BrWuwtVZyRb1JM0GBylUwvkrn DsgA== MIME-Version: 1.0 X-Received: by 10.236.231.197 with SMTP id l65mr7885621yhq.33.1422220473949; Sun, 25 Jan 2015 13:14:33 -0800 (PST) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.170.142.198 with HTTP; Sun, 25 Jan 2015 13:14:33 -0800 (PST) In-Reply-To: References: Date: Sun, 25 Jan 2015 22:14:33 +0100 X-Google-Sender-Auth: LawgKn4Drct1SXEjLUJkMZPaqno Message-ID: Subject: Re: Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk (PING) From: Antoine Brodin To: Gerald Pfeifer Content-Type: text/plain; charset=UTF-8 Cc: Tijl Coosemans , fortran@freebsd.org X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 21:14:38 -0000 On Sun, Jan 25, 2015 at 9:56 PM, Gerald Pfeifer wrote: > [ No answers from fortran@ for nine days. Antoine, perhaps > something you can approve as portmgr@ ? ] Hi, I didn't test but this looks ok. I think the LANG_GCC_IS assignement can be moved before the .endif Cheers, Antoine > > This patch avoids hardcoding of the version of GCC in lang/gcc > in Uses/fortran.mk. > > It does so by moving the variable LANG_GCC_IS from bsd.mk.gcc > to bsd.default-versions.mk and using it both in bsd.mk.gcc and > Uses/fortran.mk. > > Okay for me to commit? > > (I tested by tweaking LANG_GCC_IS and GCC_DEFAULT in various ways > and inspecting the settings of variables in consequence.) > > Gerald @FreeBSD.org > > > PS: Antoine, this should address your comment in PR/196712 in a > different and permanent matter. :-) > > > Index: Uses/fortran.mk > =================================================================== > --- Uses/fortran.mk (revision 377007) > +++ Uses/fortran.mk (working copy) > @@ -18,7 +18,7 @@ > .if ${fortran_ARGS} == gcc > .include "${PORTSDIR}/Mk/bsd.default-versions.mk" > _GCC_VER= ${GCC_DEFAULT:S/.//} > -.if ${_GCC_VER} == 48 > +.if ${GCC_DEFAULT} == ${LANG_GCC_IS} > BUILD_DEPENDS+= gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc > RUN_DEPENDS+= gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc > .else > Index: bsd.default-versions.mk > =================================================================== > --- bsd.default-versions.mk (revision 377007) > +++ bsd.default-versions.mk (working copy) > @@ -34,3 +34,6 @@ > FIREBIRD_DEFAULT?= 2.5 > > .endif > + > +# Version of lang/gcc. Do not override! > +LANG_GCC_IS= 4.8 > Index: bsd.gcc.mk > =================================================================== > --- bsd.gcc.mk (revision 377007) > +++ bsd.gcc.mk (working copy) > @@ -47,9 +47,6 @@ > GCCVERSION_040900= 0 0 4.9 > GCCVERSION_050000= 0 0 5 > > -# Version of lang/gcc > -LANG_GCC_IS= 4.8 > - > # No configurable parts below this. #################################### > # > From owner-freebsd-fortran@FreeBSD.ORG Mon Jan 26 00:04:50 2015 Return-Path: Delivered-To: fortran@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 750AB887; Mon, 26 Jan 2015 00:04:50 +0000 (UTC) Received: from ainaz.pair.com (ainaz.pair.com [209.68.2.66]) (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 50AEAAD3; Mon, 26 Jan 2015 00:04:49 +0000 (UTC) Received: from [192.168.0.132] (vie-91-186-145-239.dsl.sil.at [91.186.145.239]) by ainaz.pair.com (Postfix) with ESMTPSA id 1D5743F459; Sun, 25 Jan 2015 19:04:41 -0500 (EST) Date: Mon, 26 Jan 2015 01:04:40 +0100 (CET) From: Gerald Pfeifer To: Antoine Brodin Subject: Re: Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk (PING) In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: Tijl Coosemans , fortran@freebsd.org X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 00:04:50 -0000 On Sunday 2015-01-25 22:14, Antoine Brodin wrote: > I didn't test but this looks ok. > I think the LANG_GCC_IS assignement can be moved before the .endif Yes, this is a good point! I made this change before committing the patch. Gerald From owner-freebsd-fortran@FreeBSD.ORG Mon Jan 26 08:34:26 2015 Return-Path: Delivered-To: fortran@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 18371C06 for ; Mon, 26 Jan 2015 08:34:26 +0000 (UTC) Received: from eu1sys200aog119.obsmtp.com (eu1sys200aog119.obsmtp.com [207.126.144.147]) (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 6AE7BE4F for ; Mon, 26 Jan 2015 08:34:25 +0000 (UTC) Received: from mail-wg0-f47.google.com ([74.125.82.47]) (using TLSv1) by eu1sys200aob119.postini.com ([207.126.147.11]) with SMTP ID DSNKVMX8CZNJ05py1webRdp0LvRFOhlM38h7@postini.com; Mon, 26 Jan 2015 08:34:25 UTC Received: by mail-wg0-f47.google.com with SMTP id n12so7629424wgh.6 for ; Mon, 26 Jan 2015 00:34:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:message-id:to:subject:reply-to :in-reply-to; bh=JBsgu8K9nr9WtZRK/EW7oJAim4iLvvYXseVOruxoRVg=; b=mFYmyTu8hbaKzFlk9/O6afwR+1KC4nC+lkwF7kk2pX2zlaSp8FMoOydYA854xczA7Q 8jWtN05zgvNPTNwkU1HxzWTQOiksk4JtEkRptxs35G5YfPD88I/fk4uGj2iCX5/PP2G4 uGUk5hVdDnH483RrU1Bn0m4PiUoQqNS3uW9O2jo5t/P3/EHdseB65X9cNn1tlbI8d/PU QkeLdvpdBSMHlHYembAxb1KgTNtsCFGnH4PZrRX+RvSHAAtKXbaiyzj8S5/Q2c3U7s0j nreYKqhka6oPDB/6DndPkG+Hkf0hvt4m9MwIIH5aPG9OyGAs6DCSWAAVoah/45Q+/m/N OfXA== X-Received: by 10.180.182.72 with SMTP id ec8mr30493291wic.53.1422260894761; Mon, 26 Jan 2015 00:28:14 -0800 (PST) X-Gm-Message-State: ALoCoQmfS+FpeRcgtzUIBSQMKuUB3xAmXNceVuMmwFFOERAypS+DVzm3tDYH1jk4ICXksitNcHyNDkOXFproNS55aOOKn+Bh3T4beszIGZrelOqh8SuDrL8sahCEpIHl6/YJypeeLU6lTiYgT+UOEYgA33zi8WqG7Q== X-Received: by 10.180.182.72 with SMTP id ec8mr30493282wic.53.1422260894650; Mon, 26 Jan 2015 00:28:14 -0800 (PST) Received: from mech-as221.men.bris.ac.uk (mech-as221.men.bris.ac.uk. [137.222.187.221]) by mx.google.com with ESMTPSA id d6sm12930523wic.1.2015.01.26.00.28.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 00:28:14 -0800 (PST) Date: Mon, 26 Jan 2015 00:28:14 -0800 (PST) X-Google-Original-Date: Mon, 26 Jan 2015 08:28:12 GMT Received: from mech-as221.men.bris.ac.uk (localhost [127.0.0.1]) by mech-as221.men.bris.ac.uk (8.14.9/8.14.9) with ESMTP id t0Q8SCFs036667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 26 Jan 2015 08:28:12 GMT (envelope-from mexas@mech-as221.men.bris.ac.uk) Received: (from mexas@localhost) by mech-as221.men.bris.ac.uk (8.14.9/8.14.9/Submit) id t0Q8SC7f036666; Mon, 26 Jan 2015 08:28:12 GMT (envelope-from mexas) From: Anton Shterenlikht Message-Id: <201501260828.t0Q8SC7f036666@mech-as221.men.bris.ac.uk> To: antoine@FreeBSD.org, fortran@FreeBSD.org, gerald@pfeifer.com Subject: Re: Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk (PING) Reply-To: mexas@bris.ac.uk In-Reply-To: X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 08:34:26 -0000 Sorry I haven't had any time to try the patch. Anton From owner-freebsd-fortran@FreeBSD.ORG Mon Jan 26 10:19:24 2015 Return-Path: Delivered-To: fortran@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 7F2D4DB2; Mon, 26 Jan 2015 10:19:24 +0000 (UTC) Received: from mailrelay113.isp.belgacom.be (mailrelay113.isp.belgacom.be [195.238.20.140]) by mx1.freebsd.org (Postfix) with ESMTP id E3BD0BD8; Mon, 26 Jan 2015 10:19:23 +0000 (UTC) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=r3/LV5qEOeRNqOlObU3fPeZ+G8vFrxRTI9UozocECbw= c=1 sm=2 a=kj9zAlcOel0A:10 a=KFzSvIWE-yI3Gy1VC7QA:9 a=CjuIK1q_8ugA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYGADwTxlRbsIcT/2dsb2JhbABagwZSWcY3hXkCgRJEAQEBAQF9hA0BBScTHCMQCxgJJQ8qHgaIQwHSVAEBAQEBBQEBAQEej3gHhCkBBJI5hVWBTJBxIoNvPTGCQgEBAQ Received: from 19.135-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.135.19]) by relay.skynet.be with ESMTP; 26 Jan 2015 11:18:12 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id t0QAIBaw001530; Mon, 26 Jan 2015 11:18:11 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Mon, 26 Jan 2015 11:18:10 +0100 From: Tijl Coosemans To: Gerald Pfeifer Subject: Re: Avoid hardcoding of the version in lang/gcc in Uses/fortran.mk (PING) Message-ID: <20150126111810.0b4befa8@kalimero.tijl.coosemans.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Antoine Brodin , fortran@freebsd.org X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 10:19:24 -0000 On Mon, 26 Jan 2015 01:04:40 +0100 (CET) Gerald Pfeifer wrote: > On Sunday 2015-01-25 22:14, Antoine Brodin wrote: >> I didn't test but this looks ok. >> I think the LANG_GCC_IS assignement can be moved before the .endif > > Yes, this is a good point! I made this change before committing > the patch. I'm not going to ask for this patch to be backed out, but I do want it to be noted (again) that I disagree with the way lang/gcc* is organised. The only reason for this change is because the gcc ports are fighting the default-versions mechanism instead of conforming to it and no good explanation has been given for why they should be allowed to do so. This patch is a hack. None of the other ports that use default-versions need it. In my opinion one of the lang/gccXY ports has to become the default instead of lang/gcc. That's how default-versions works. lang/gcc can stay as a meta-port with a RUN_DEPENDS on the default lang/gccXY, similar to lang/python. This way "pkg add gcc" still works. And just like lang/python, lang/gcc could install symlinks like gcc -> gccXY, g++ -> g++XY,... which would be really convenient now that /usr/bin/gcc is gone. This patch would not be necessary then because the .if in fortran.mk would disappear (what's currently in the .else branch would be all that's needed). A similar .if in bsd.gcc.mk would disappear as well, along with the LANG_GCC_IS variable.