I was surprised it has not been committed already, it works great, and
may hopefully reduce the number of build failures on base-gcc archs in
the future.

OK cwen@


On Mon, 12 Aug 2019 11:13:35 -0400
Kurt Mosiejczuk wrote:

> On Mon, Aug 12, 2019 at 02:23:55PM +0100, Stuart Henderson wrote:
> > any comments? ok?
> 
> Looks like a good check to add. OK kmos
> 
> --Kurt
> 
> > Index: mk/bsd.port.mk
> > ===================================================================
> > RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
> > retrieving revision 1.1475
> > diff -u -p -r1.1475 bsd.port.mk
> > --- mk/bsd.port.mk  14 Jul 2019 11:32:05 -0000      1.1475
> > +++ mk/bsd.port.mk  12 Aug 2019 13:23:06 -0000
> > @@ -304,7 +304,7 @@ _MODULES_DONE =
> >  .endif
> 
> >  # this only happens if we exit modules without having ever gone
> > -# thru compiler.port.mk
> > +# thru compiler.port.mk - update portcheck if changing COMPILER
> > default COMPILER ?= base-clang base-gcc gcc3
> >  COMPILER_LANGS ?= c c++
> >  .if ${PROPERTIES:Mclang}
> > Index: bin/portcheck
> > ===================================================================
> > RCS file: /cvs/ports/infrastructure/bin/portcheck,v
> > retrieving revision 1.128
> > diff -u -p -r1.128 portcheck
> > --- bin/portcheck   23 Jun 2019 16:06:23 -0000      1.128
> > +++ bin/portcheck   12 Aug 2019 13:23:06 -0000
> > @@ -844,10 +844,12 @@ sub_checks() {
> >                     vars="$vars MODULES"
> >                     vars="$vars PKG_ARCH$subpkg $wantlib_var
> > WANTLIB-" vars="$vars PERMIT_PACKAGE${subpkg%-}"
> > +                   vars="$vars COMPILER"
> >                     make "${make_args[@]}" show="$vars" | {
> >                             local comment fullpkgname modules
> > pkg_arch local wantlib permit_package
> >                             local arch_independent=false
> > +                           local default_compiler=false
> >                             read -r comment
> >                             read -r fullpkgname
> >                             read -r modules
> > @@ -856,6 +858,7 @@ sub_checks() {
> >                             read -r wantlib
> >                             read -r wantlib_ss
> >                             read -r permit_package
> > +                           read -r compiler
> >  
> >                             if [[ $comment == @(a|an|the)"
> > "* ]]; then err "${portref}no leading articles in" \
> > @@ -869,7 +872,12 @@ sub_checks() {
> >                                     fi
> >                             fi
> >  
> > -                           check_wantlib "$portref"
> > "$modules" $wantlib
> > +                           [[ "$compiler" == "base-clang
> > base-gcc gcc3" ]] \
> > +                               && default_compiler=true
> > +
> > +                           check_wantlib "$portref"
> > "$modules" \
> > +                               "$default_compiler" $wantlib
> > +
> >                             check_permit_subpkg "$portref"
> > "$subpkg" \ "$permit_package"
> >  
> > @@ -1301,6 +1309,7 @@ check_plist() {
> >  check_wantlib() {
> >     local portref="$1"; shift
> >     local modules="$1"; shift
> > +   local default_compiler="$1"; shift
> >  
> >     local phonon_s_wantlib=false
> >  
> > @@ -1345,6 +1354,15 @@ check_wantlib() {
> >                                 "in MODULES (check other libs,
> > too!)" fi
> >                     ;;
> > +
> > +           @(c++|stdc++)?(?('>')=+([0-9])))
> > +                   if $default_compiler; then
> > +                           err "C++ libraries in WANTLIB with
> > default COMPILER" \
> > +                               "(most ports need
> > 'COMPILER=base-clang ports-gcc'" \
> > +                               "or 'COMPILER=base-clang
> > ports-gcc base-gcc')"
> > +                   fi
> > +                   ;;
> > +
> >             stdc++?(?('>')=+([0-9])))
> >                     if $gcc4_module; then
> >                             err "$portref$v in WANTLIB when
> > gcc4 is" \
> > 
> 

Reply via email to