1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00
freebsd-ports/cad
Dimitry Andric 1b22fed46c cad/kicad-devel: fix build with libc++ 19
As noted in the libc++ 19 release notes [1], std::char_traits<> is now
only provided for char, char8_t, char16_t, char32_t and wchar_t, and any
instantiation for other types will fail.

This causes cad/kicad-devel to fail to compile with clang 19 and libc++
19, resulting in errors similar to:

  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/nanodbc/nanodbc/nanodbc.cpp:261:25: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
    261 |     auto const n = std::char_traits<NANODBC_SQLCHAR>::length(array);
        |                         ^
  /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is declared here
     45 | struct char_traits;
        |        ^
  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/nanodbc/nanodbc/nanodbc.cpp:3576:52: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
   3576 |             dsn.name = string(&name[0], &name[std::char_traits<NANODBC_SQLCHAR>::length(name)]);
        |                                                    ^
  /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is declared here
     45 | struct char_traits;
        |        ^
  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/nanodbc/nanodbc/nanodbc.cpp:3578:49: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
   3578 |                 string(&driver[0], &driver[std::char_traits<NANODBC_SQLCHAR>::length(driver)]);
        |                                                 ^
  /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is declared here
     45 | struct char_traits;
        |        ^
  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/nanodbc/nanodbc/nanodbc.cpp:3629:54: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
   3629 |             drv.name = string(&descr[0], &descr[std::char_traits<NANODBC_SQLCHAR>::length(descr)]);
        |                                                      ^
  /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is declared here
     45 | struct char_traits;
        |        ^

and:

  /usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
    820 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
        |                                          ^
  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/compoundfilereader/compoundfilereader.h:226:21: note: in instantiation of template class 'std::basic_string<unsigned short>' requested here
    226 |         utf16string dir;
        |                     ^
  /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here
     23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
        |                             ^

and:

  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/nlohmann_json/nlohmann/json.hpp:3604:22: error: implicit instantiation of undefined template 'std::char_traits<wxUniChar>'
   3604 | struct char_traits : std::char_traits<T>
        |                      ^
  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/nlohmann_json/nlohmann/json.hpp:6289:14: note: in instantiation of template class 'nlohmann::detail::char_traits<wxUniChar>' requested here
   6289 |     typename char_traits<char_type>::int_type get_character()
        |              ^
  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/nlohmann_json/nlohmann/json.hpp:6465:22: note: in instantiation of template class 'nlohmann::detail::iterator_input_adapter<wxString::const_iterator>' requested here
   6465 |     BaseInputAdapter base_adapter;
        |                      ^
  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/thirdparty/nlohmann_json/nlohmann/json.hpp:23323:16: note: in instantiation of template class 'nlohmann::detail::wide_string_input_adapter<nlohmann::detail::iterator_input_adapter<wxString::const_iterator>, wxUniChar>' requested here
   23323 |         parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result);
         |                ^
  /wrkdirs/usr/ports/cad/kicad-devel/work/kicad-6ebd8f46fe24533214b9ed43f1f7e5a4b80dcc71/eeschema/sch_io/easyedapro/sch_io_easyedapro.cpp:209:53: note: in instantiation of function template specialization 'nlohmann::basic_json<>::parse<wxString>' requested here
    209 |                 nlohmann::json js = nlohmann::json::parse( txt.ReadLine() );
        |                                                     ^
  /usr/include/c++/v1/__string/char_traits.h:45:8: note: template is declared here
     45 | struct char_traits;
        |        ^

The first batch of errors can be fixed by providing a simple `length()`
function for the `NANODBC_SQLCHAR const*` type. The second batch can be
fixed by using `std::basic_string<char16_t>` for `utf16string`, and
adjusting the call to `std::basic_string<char16_t>::append`. The third
batch can be fixed by adding a `char_traits` definition specifically for
the `wxUniChar` type.

[1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals

PR:		282512
Approved by:	maintainer timeout (2 weeks)
MFH:		2024Q4
2024-11-17 19:45:21 +01:00
..
abc
admesh
adms
alliance cad/alliance: Fix build with GCC 14 2024-09-05 11:48:38 +02:00
antimony
apio cad/apio: update 0.8.4 → 0.9.5 2024-07-23 02:28:14 -07:00
appcsxcad
archimedes
astk-client
astk-serveur
atlc
brlcad all: drop support for expired FreeBSD 14.0 2024-10-01 20:56:20 +02:00
calculix cad/calculix: Update to 2.22 2024-10-22 20:40:25 +02:00
calculix-ccx cad/calculix-ccx: Update to 2.22 2024-10-21 07:06:25 +02:00
camotics
caneda cad/caneda: update 0.3.1 → 0.4.0 2024-09-30 23:03:18 -07:00
cascade
cascade-compiler
chipvault
Clipper2 */*: fix handling of # character in COMMENT 2024-10-31 20:44:13 +03:00
csxcad */*: bump consumers after devel/boost* update 2024-10-03 13:25:14 +03:00
cura cad/cura: upgrade to 5.7.0 2024-09-04 17:01:44 -04:00
cura-engine cad/cura-engine: Fixed on i386 2024-11-10 14:46:49 -05:00
cvc
digital
dinotrace
ecpprog
electric all: drop support for expired FreeBSD 14.0 2024-10-01 20:56:20 +02:00
electric-ng
fasm
fdm_materials cad/fdm_materials: upgrade to 5.7.0 2024-09-04 16:51:20 -04:00
feappv
fidocadj
freecad cad/freecad: update to 1.0rc4 2024-11-14 22:33:26 +01:00
freehdl
fritzing
gds3d
gdscpp
gdsreader
gdstk cad/{,py-}gdstk: update 0.9.56 → 0.9.57 2024-11-07 22:37:37 -08:00
gdt
geda
gerbv cad/gerbv: update 2.7.0 -> 2.10.0, new upstream, URL changed 2024-09-24 20:26:36 +02:00
ghdl
gmsh
gnucap
gplcver cad/gplcver: fix build on recent FreeBSD 2024-10-28 13:42:03 +01:00
graywolf cad/graywolf: Fix build with gcc14 2024-09-05 12:56:41 -07:00
gspiceui
gtkwave cad/gtkwave: Update to 3.3.121 2024-10-06 20:30:51 +01:00
horizon-eda cad/horizon-eda: Fix build on 15 2024-10-31 01:31:40 -07:00
hs-verismith cad/hs-verismith: update 1.0.0.2-39 → 1.0.0.2-40 2024-09-01 12:45:45 -07:00
ifcopenshell */*: bump consumers after devel/boost* update 2024-10-03 13:25:14 +03:00
impact
irsim
iverilog
k40-whisperer
kicad cad/kicad: fix build with libc++ 19 2024-10-07 22:50:06 +02:00
kicad-devel cad/kicad-devel: fix build with libc++ 19 2024-11-17 19:45:21 +01:00
kicad-doc
kicad-library-footprints
kicad-library-footprints-devel cad/kicad*-devel: Update 2024-10-11 17:50:56 +02:00
kicad-library-packages3d
kicad-library-packages3d-devel cad/kicad*-devel: Update 2024-10-11 17:50:56 +02:00
kicad-library-symbols
kicad-library-symbols-devel cad/kicad*-devel: Update 2024-10-11 17:50:56 +02:00
kicad-library-templates
kicad-library-templates-devel cad/kicad*-devel: Update 2024-10-11 17:50:56 +02:00
klayout
ktechlab
ldraw
ldview all: drop support for expired FreeBSD 14.0 2024-10-01 20:56:20 +02:00
leocad
lepton-eda cad/lepton-eda: Remove pcre(1) as listed dependency 2024-10-22 21:39:57 +02:00
libbgcode */*: bump consumers after devel/boost* update 2024-10-03 13:25:14 +03:00
libgdsii
libopencad
librecad
libredwg
librepcb cad/librepcb: Unbreak on 15 2024-10-31 12:35:18 -07:00
librnd
logisim
magic cad/magic: update 8.3.485 → 8.3.499 2024-11-10 19:54:23 -08:00
meshdev
meshlab
netgen
netgen-lvs cad/netgen-lvs: update 1.5.276 → 1.5.277 2024-08-19 12:11:33 -07:00
ngspice_rework
nvc cad/nvc: update 1.14.0 → 1.14.1 2024-10-27 13:46:45 -07:00
opencascade multimedia/libvpx: update 1.15.0 2024-11-02 02:01:11 +01:00
opencascade740 cad/opencascade740: Fix build with with freetype2 2.13.3 2024-09-24 21:04:41 +02:00
openctm
openfpgaloader
openroad devel/protobuf: Update to 28.3 2024-10-29 22:38:30 +08:00
openscad cad/openscad*: Remove dependency 2024-10-24 10:50:03 +02:00
openscad-devel cad/openscad*: Remove dependency 2024-10-24 10:50:03 +02:00
opentimer
openvsp cad/openvsp: update to 3.40.1 2024-07-27 11:44:06 +02:00
oregano all: drop support for expired FreeBSD 14.0 2024-10-01 20:56:20 +02:00
p5-GDS2
p5-Verilog-Perl
padring
pcb
pcb-rnd
pdnmesh
PrusaSlicer cad/PrusaSlicer: make build happy with clang 19+ 2024-11-03 22:46:36 +03:00
py-amaranth cad/py-amaranth: Fix build by expanding the range of dependency version 2024-10-04 20:09:29 -07:00
py-cocotb cad/py-cocotb: update 1.9.1 → 1.9.2 2024-10-27 13:46:44 -07:00
py-csxcad cad/py-csxcad: Correct COMMENT 2024-08-28 08:25:34 -07:00
py-edalize cad/py-edalize: update 0.5.4 → 0.6.0 2024-11-13 22:33:15 -08:00
py-ezdxf
py-gdspy
py-gdstk cad/{,py-}gdstk: update 0.9.56 → 0.9.57 2024-11-07 22:37:37 -08:00
py-gmsh
py-lcapy
py-phidl
py-pyfda
py-pygmsh
py-pymtl
py-pyvcd cad/py-pyvcd: update 0.4.0 → 0.4.1 2024-11-11 02:22:17 -08:00
py-vunit-hdl
python-gdsii devel/py-pyyaml: Move devel/py-yaml to devel/py-pyyaml 2024-07-07 16:05:33 +08:00
qcad cad/qcad: Update to 3.31.2.0 2024-11-02 17:26:07 +01:00
qcsxcad
qelectrotech
qflow cad/qflow: update 1.4.103 → 1.4.104 2024-11-10 15:53:12 -08:00
qmls
qrouter cad/qrouter: update 1.4.87 → 1.4.88 2024-10-03 02:17:08 -07:00
qspeakers
qucs-s
qucsator
repsnapper
rubygem-gdsii
scotch
silice
solvespace
sp2sp
spice all: drop support for expired FreeBSD 14.0 2024-10-01 20:56:20 +02:00
stepcode
stm32flash
sumo textproc/xerces-c3: Update to 3.3.0 2024-10-25 23:56:41 +08:00
surelog cad/surelog: update 1.83 → 1.84 2024-08-08 10:18:46 -07:00
svlint lang/rust: Bump revisions after 1.82.0 2024-11-08 09:24:20 +01:00
svls lang/rust: Bump revisions after 1.82.0 2024-11-08 09:24:20 +01:00
sweethome3d
symbiyosys cad/symbiyosys: update 0.46 → 0.47 2024-11-06 20:08:16 -08:00
tochnog all: drop support for expired FreeBSD 14.0 2024-10-01 20:56:20 +02:00
uhdm cad/uhdm: update 1.83 → 1.84 2024-08-08 10:18:45 -07:00
uranium cad/uranium: upgrade to 5.7.0 for cura 2024-09-04 16:46:18 -04:00
verilator cad/verilator: update 5.028 → 5.030 2024-10-28 12:06:21 -07:00
verilog-mode.el
veroroute
veryl lang/rust: Bump revisions after 1.82.0 2024-11-08 09:24:20 +01:00
xcircuit
xyce science/trilinos: update 15-1-1 → 16-0-0 2024-08-23 14:41:05 -07:00
yosys cad/yosys: update 0.46 → 0.47 2024-11-06 20:08:16 -08:00
yosys-ghdl-plugin
yosys-systemverilog
z88 all: drop support for expired FreeBSD 14.0 2024-10-01 20:56:20 +02:00
zcad */*: Bump PORTREVISION 2024-10-08 22:58:59 -07:00
Makefile cad/tkgate: Remove expired port 2024-10-31 22:52:39 +01:00