Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2014 18:43:47 +0200
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: ports-mgmt/portmaster and DEFAULT_VERSION=gcc=4.8: lang/gcc dependency added
Message-ID:  <20140805184347.54d87f4a@kalimero.tijl.coosemans.org>
In-Reply-To: <CAB88xy_eHeZZnMUorefxp5Er2XRQd04ZJ5K7USyv14x8GmhOug@mail.gmail.com>
References:  <CAB88xy_eHeZZnMUorefxp5Er2XRQd04ZJ5K7USyv14x8GmhOug@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/i_inEhh41rcPFZCu+anR+uK
Content-Type: multipart/mixed; boundary="MP_/rUGFSAo75QJAo0=cB10e14K"

--MP_/rUGFSAo75QJAo0=cB10e14K
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Tue, 5 Aug 2014 16:41:24 +0200 Luca Pizzamiglio wrote:
> Hi list,
> I found a small issue with ports-mgmt/portmaster and the variable
> DEFAULT_VERSION defined in /etc/make.conf
>=20
> I normally use clang, to build my ports, but I use the gcc48 port
> also. The actual lang/gcc is gcc 4.7.4, but I wouldn't another gcc
> installed :)
> In order to use lang/gcc48 instead of lang/gcc, I set
> DEFAULT_VERSION=3Dgcc=3D4.8 in /etc/make.conf
>=20
> Now, if you try to build with portmaster any port that requires gcc,
> the dependency lang/gcc is added (for instance, with astro/wcslib, but
> also www/firefox or mail/thunderbird)
>  # portmaster -D astro/wcslib
>=20
> =3D=3D=3D>>> Currently installed version: wcslib-4.23
> =3D=3D=3D>>> Port directory: /usr/ports/astro/wcslib
>=20
> =3D=3D=3D>>> Launching 'make checksum' for astro/wcslib in background
> =3D=3D=3D>>> Gathering dependency list for astro/wcslib from ports
> =3D=3D=3D>>> Launching child to install lang/gcc
>=20
> =3D=3D=3D>>> wcslib-4.23 >> lang/gcc (1/1)
>=20
> =3D=3D=3D>>> Port directory: /usr/ports/lang/gcc
>=20
> =3D=3D=3D>>> Launching 'make checksum' for lang/gcc in background
> =3D=3D=3D>>> Gathering dependency list for lang/gcc from ports
>=20
> If I run a simple "make" from the directory /usr/ports/astro/wcslib,
> no dependency is added and the right gcc is used.
>=20
> Am I the only one with this issue?

Can you try the attached patch?

--MP_/rUGFSAo75QJAo0=cB10e14K
Content-Type: text/x-patch
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=gcc.default.patch

Index: Mk/Uses/fortran.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Mk/Uses/fortran.mk	(revision 364087)
+++ Mk/Uses/fortran.mk	(working copy)
@@ -18,8 +18,13 @@ fortran_ARGS=3D	gcc
 .if ${fortran_ARGS} =3D=3D gcc
 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
 _GCC_VER=3D	${GCC_DEFAULT:S/.//}
+.if ${_GCC_VER} =3D=3D 47
 BUILD_DEPENDS+=3D	gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc
 RUN_DEPENDS+=3D	gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc
+.else
+BUILD_DEPENDS+=3D	gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc${_GCC_VER}
+RUN_DEPENDS+=3D	gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc${_GCC_VER}
+.endif
 USE_BINUTILS=3D	yes
 F77=3D		gfortran${_GCC_VER}
 FC=3D		gfortran${_GCC_VER}
Index: Mk/bsd.gcc.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Mk/bsd.gcc.mk	(revision 364087)
+++ Mk/bsd.gcc.mk	(working copy)
@@ -46,7 +46,8 @@ GCCVERSION_040700=3D	     0       0 4.7
 GCCVERSION_040800=3D	     0       0 4.8
 GCCVERSION_040900=3D	     0       0 4.9
=20
-GCC_DEFAULT_V=3D	${GCC_DEFAULT:S/.//}
+# Version of lang/gcc
+GCC_DEFAULT_V=3D	4.7
=20
 # No configurable parts below this. ####################################
 #
@@ -148,7 +149,7 @@ _USE_GCC:=3D	${GCC_DEFAULT}
 .  if ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION=
_${v}_R} || !exists(/usr/bin/gcc)
 V:=3D			${_GCCVERSION_${v}_V:S/.//}
 _GCC_PORT_DEPENDS:=3D	gcc${V}
-.   if ${_USE_GCC} =3D=3D ${GCC_DEFAULT}
+.   if ${_USE_GCC} =3D=3D ${GCC_DEFAULT_V}
 _GCC_PORT:=3D		gcc
 .   else
 _GCC_PORT:=3D		gcc${V}

--MP_/rUGFSAo75QJAo0=cB10e14K--

--Sig_/i_inEhh41rcPFZCu+anR+uK
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREKAAYFAlPhCcoACgkQfoCS2CCgtis9vgD+MbLuaJdABJ5uRSf84pV4bvn2
gdrGzaUpNUP4aSbTxtEA/3ChAyozXvyOoxA2i/FHi2ns+UE9PgD8/w05z378cum2
=JXgk
-----END PGP SIGNATURE-----

--Sig_/i_inEhh41rcPFZCu+anR+uK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140805184347.54d87f4a>