diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-10-13 13:39:45 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-10-13 13:39:45 +0000 |
| commit | 487483482fe231eb3612ca41911326fb1c64cfb3 (patch) | |
| tree | a4aaa18ff3d0233fbe0d3c94093d93c3366e550a /zenoh-bridge-dds.spec | |
| parent | 844e3e95b2c97c86f412ad485f9623c1206f5242 (diff) | |
automatic import of ros-humble-zenoh-bridge-dds
Diffstat (limited to 'zenoh-bridge-dds.spec')
| -rw-r--r-- | zenoh-bridge-dds.spec | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/zenoh-bridge-dds.spec b/zenoh-bridge-dds.spec index 139e354..ebb453e 100644 --- a/zenoh-bridge-dds.spec +++ b/zenoh-bridge-dds.spec @@ -36,6 +36,24 @@ Bridge between ROS2/DDS and Eclipse zenoh (https://zenoh.io). It allows the inte %autosetup -n %{RosPkgName}-%{src_version} tar -xzf %{SOURCE1} +# Patch bindgen 0.58.1: sanitize_name only replaces space/colon/dot, not +# parentheses and slashes in unnamed enum type names from newer glibc headers +# (e.g. confname.h), causing proc-macro2 panic "is not a valid Ident". +python3 - <<'PYEOF' +import json, hashlib +p = 'vendor/bindgen/src/ir/ty.rs' +s = open(p).read() +old = "name.replace(|c| c == ' ' || c == ':' || c == '.', \"_\")" +new = "name.replace(|c| !(c.is_alphanumeric() || c == '_'), \"_\")" +assert old in s, "bindgen sanitize_name pattern not found" +s = s.replace(old, new) +open(p, 'w').write(s) +c = 'vendor/bindgen/.cargo-checksum.json' +d = json.load(open(c)) +d['files']['src/ir/ty.rs'] = hashlib.sha256(open(p, 'rb').read()).hexdigest() +json.dump(d, open(c, 'w'), separators=(',', ':')) +PYEOF + %build [ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages${PYTHONPATH:+:$PYTHONPATH} |
