[Bug 271051] devel/atf: fix build with clang 16

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 24 Apr 2023 20:19:37 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271051

            Bug ID: 271051
           Summary: devel/atf: fix build with clang 16
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: jmmv@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: jmmv@FreeBSD.org
             Flags: maintainer-feedback?(jmmv@FreeBSD.org)

Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because devel/atf's Makefile does not explicitly set its C++ standard,
this leads to several errors:

  In file included from atf-c++/check.cpp:26:
  ./atf-c++/check.hpp:74:17: error: no template named 'auto_ptr' in namespace
'std'
      friend std::auto_ptr< check_result > exec(const
atf::process::argv_array&);
             ~~~~~^
  ./atf-c++/check.hpp:123:6: error: no template named 'auto_ptr' in namespace
'std'
  std::auto_ptr< check_result > exec(const atf::process::argv_array&);
  ~~~~^
  In file included from atf-c++/tests.cpp:26:
  ./atf-c++/tests.hpp:76:10: error: no template named 'auto_ptr' in namespace
'std'
      std::auto_ptr< tc_impl > pimpl;
      ~~~~~^
  atf-c++/check.cpp:144:6: error: no template named 'auto_ptr' in namespace
'std'
  std::auto_ptr< impl::check_result >
  ~~~~^
  atf-c++/check.cpp:153:17: error: no member named 'auto_ptr' in namespace
'std'
      return std::auto_ptr< impl::check_result >(new
impl::check_result(&result));
             ~~~~~^
  atf-c++/check.cpp:153:46: error: expected '(' for function-style cast or type
construction
      return std::auto_ptr< impl::check_result >(new
impl::check_result(&result));
                            ~~~~~~~~~~~~~~~~~~ ^

Add USE_CXXSTD=gnu++98 to avoid these errors. While here, pet portlint.

-- 
You are receiving this mail because:
You are the assignee for the bug.