You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-libdeflate-sys/rust2rpm.toml

36 lines
1.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

[requires]
build = [
"pkgconfig(libdeflate)"
]
lib = [
"pkgconfig(libdeflate)"
]
[package]
cargo-toml-patch-comments = [
"""\
Make the dependency on crate(pkg-config) non-optional instead of associating \
it with the “dynamic” feature, since we patch the crate to always link \
dynamically with the system libdeflate, regardless of the selected \
features.\
""",
]
[scripts.prep]
pre = [
'''
# Remove the bundled copy of libdeflate.
rm -rv libdeflate
# Make libdeflate detection with pkg-config unconditional.
sed -r -i 's@^([[:blank:]]*)(#\[cfg\(feature *= *"dynamic"\)\])@\1// \2@' build.rs
# Dont require an exact version match. We would *like* the versions to stay
# aligned, but we dont *need* to update libdeflate and
# rust-libdeflate-sys/rust-libdeflater concurrently.
sed -r -i 's@^([[:blank:]]*)(\.exactly_version\()@\1// \2@' build.rs
# The above two sed-patches effectively revert “Dynamic Linking Constraints”,
# https://github.com/adamkewley/libdeflater/pull/32. Using sed instead of a
# patch file keeps us from having to update the patch every time the version
# number changes.
'''
]