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. #################################### > # >