Bug 1284589 - Move mp4parse source to match upstream. r=kinetik

Make Cargo.toml, build.rs and standard cargo source package
layout available in-tree to facilitate testing cargo-driven
builds of rust code.

Update the moz.build script to build using plain rustc as
before, but referencing the new source location.

MozReview-Commit-ID: 11zuebic9tU

--HG--
extra : rebase_source : 1cb71896ae5dd33d1237ca04ec27da60b2256dad
This commit is contained in:
Ralph Giles 2016-07-05 11:08:37 -07:00
Родитель 3f3a56cd4c
Коммит df3f69672e
4 изменённых файлов: 18 добавлений и 16 удалений

Просмотреть файл

@ -1,7 +1,7 @@
diff --git a/media/libstagefright/binding/mp4parse/byteorder/mod.rs b/media/libstagefright/binding/mp4parse/byteorder/mod.rs
diff --git a/media/libstagefright/binding/mp4parse/src/byteorder/mod.rs b/media/libstagefright/binding/mp4parse/src/byteorder/mod.rs
index a25bab6..13db30a 100644
--- a/media/libstagefright/binding/mp4parse/byteorder/mod.rs
+++ b/media/libstagefright/binding/mp4parse/byteorder/mod.rs
--- a/media/libstagefright/binding/mp4parse/src/byteorder/mod.rs
+++ b/media/libstagefright/binding/mp4parse/src/byteorder/mod.rs
@@ -36,24 +36,17 @@ assert_eq!(wtr, vec![5, 2, 0, 3]);
```
*/
@ -41,10 +41,10 @@ index a25bab6..13db30a 100644
assert!($size <= $src.len());
let mut data: $ty = 0;
unsafe {
diff --git a/media/libstagefright/binding/mp4parse/byteorder/new.rs b/media/libstagefright/binding/mp4parse/byteorder/new.rs
diff --git a/media/libstagefright/binding/mp4parse/src/byteorder/new.rs b/media/libstagefright/binding/mp4parse/src/byteorder/new.rs
index b5f3770..b32f97b 100644
--- a/media/libstagefright/binding/mp4parse/byteorder/new.rs
+++ b/media/libstagefright/binding/mp4parse/byteorder/new.rs
--- a/media/libstagefright/binding/mp4parse/src/byteorder/new.rs
+++ b/media/libstagefright/binding/mp4parse/src/byteorder/new.rs
@@ -1,6 +1,6 @@
use std::io::{self, Result};

Просмотреть файл

@ -1,7 +1,7 @@
diff --git a/media/libstagefright/binding/mp4parse/lib.rs b/media/libstagefright/binding/mp4parse/lib.rs
diff --git a/media/libstagefright/binding/mp4parse/src/lib.rs b/media/libstagefright/binding/mp4parse/src/lib.rs
index af62402..7c8e382 100644
--- a/media/libstagefright/binding/mp4parse/lib.rs
+++ b/media/libstagefright/binding/mp4parse/lib.rs
--- a/media/libstagefright/binding/mp4parse/src/lib.rs
+++ b/media/libstagefright/binding/mp4parse/src/lib.rs
@@ -4,7 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

Просмотреть файл

@ -18,8 +18,10 @@ echo "Constructing C api header..."
cargo build
popd
rm -rf mp4parse
mkdir mp4parse
cp _upstream/mp4parse/src/*.rs mp4parse/
mkdir -p mp4parse/src
cp _upstream/mp4parse/Cargo.toml mp4parse/
cp _upstream/mp4parse/build.rs mp4parse/
cp _upstream/mp4parse/src/*.rs mp4parse/src/
cp _upstream/mp4parse/include/mp4parse.h include/
# TODO: download deps from crates.io.
@ -28,10 +30,10 @@ git clone https://github.com/BurntSushi/byteorder _upstream/byteorder
pushd _upstream/byteorder
git checkout 0.5.3
popd
rm -rf mp4parse/byteorder
mkdir mp4parse/byteorder
cp _upstream/byteorder/src/lib.rs mp4parse/byteorder/mod.rs
cp _upstream/byteorder/src/new.rs mp4parse/byteorder/new.rs
rm -rf mp4parse/src/byteorder
mkdir mp4parse/src/byteorder
cp _upstream/byteorder/src/lib.rs mp4parse/src/byteorder/mod.rs
cp _upstream/byteorder/src/new.rs mp4parse/src/byteorder/new.rs
echo "Applying patches..."
patch -p4 < byteorder-mod.patch

Просмотреть файл

@ -81,7 +81,7 @@ SOURCES += [
if CONFIG['MOZ_RUST']:
SOURCES += [
'binding/mp4parse/lib.rs',
'binding/mp4parse/src/lib.rs',
]
EXPORTS += [
'binding/include/mp4parse.h',