Bug 1338655 - Don't try to build mp4parse bindings. r?froydnj
We use the cheddar crate to generate a C header file
for our mp4parse_capi wrapper crate. Currently we
do this at code check-in time via update-rust.sh.
Cargo 0.18 and later will try to execute a build.rs
file in the crate source tree regardless of whether
it's specified in Cargo.toml so patching out that
line just results in 'crate cheddar not found'.
This change restores the old behaviour by substituting
a 'build = false' line instead.
We do have syntex vendored, but we don't currently build
it by default, so I prefer this solution to just vendoring
cheddar and generating the header at build time. The syntex
crate is quite large and adds significantly to our compile
time.
MozReview-Commit-ID: InJRRODWAdP
--- a/media/libstagefright/binding/mp4parse-cargo.patch
+++ b/media/libstagefright/binding/mp4parse-cargo.patch
@@ -22,22 +22,23 @@ index ff9422c..814c4c6 100644
-
# Somewhat heavy-handed, but we want at least -Z force-overflow-checks=on.
[profile.release]
debug-assertions = true
diff --git a/media/libstagefright/binding/mp4parse_capi/Cargo.toml b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
index aeeebc65..5c0836a 100644
--- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
+++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
-@@ -18,18 +18,10 @@ exclude = [
+@@ -18,18 +18,12 @@ exclude = [
"*.mp4",
]
-build = "build.rs"
--
++build = false
+
[dependencies]
byteorder = "1.0.0"
"mp4parse" = {version = "0.6.0", path = "../mp4parse"}
-[build-dependencies]
-rusty-cheddar = "0.3.2"
-
-[features]
--- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
+++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
@@ -13,15 +13,17 @@ license = "MPL-2.0"
repository = "https://github.com/mozilla/mp4parse-rust"
# Avoid complaints about trying to package test files.
exclude = [
"*.mp4",
]
+build = false
+
[dependencies]
byteorder = "1.0.0"
"mp4parse" = {version = "0.6.0", path = "../mp4parse"}
# Somewhat heavy-handed, but we want at least -Z force-overflow-checks=on.
[profile.release]
debug-assertions = true