|
|
|
|
[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
|
|
|
|
|
# Don’t require an exact version match. We would *like* the versions to stay
|
|
|
|
|
# aligned, but we don’t *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.
|
|
|
|
|
'''
|
|
|
|
|
]
|