[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-build/master] Bug 30490: Add cbindgen project for building Firefox 68 ESR



commit a61d68dc37a39d0aca74b273ca2b444fe33a07dc
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date:   Wed Aug 7 19:45:53 2019 +0000

    Bug 30490: Add cbindgen project for building Firefox 68 ESR
---
 projects/cbindgen/build  | 32 ++++++++++++++++++++++++++++++++
 projects/cbindgen/config | 15 +++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/projects/cbindgen/build b/projects/cbindgen/build
new file mode 100644
index 0000000..429f567
--- /dev/null
+++ b/projects/cbindgen/build
@@ -0,0 +1,32 @@
+#!/bin/bash
+[% c("var/set_default_env") -%]
+distdir=/var/tmp/dist
+builddir=/var/tmp/build/[% project %]
+mkdir -p $distdir/[% project %]
+tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/rust') %]
+export PATH="/var/tmp/dist/rust/bin:$PATH"
+mkdir -p /var/tmp/build
+tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
+
+# Now prepare the offline build
+# Move the directory for hardcoding the path in .cargo/config
+mv /var/tmp/build/[% project %]-[% c('version') %] $builddir
+tar -C $builddir -xjf cbindgen-vendor.tar.bz2
+cd $builddir
+mkdir .cargo
+cat > .cargo/config << 'EOF'
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source.vendored-sources]
+directory = "/var/tmp/build/cbindgen/vendor"
+EOF
+
+cargo build --release --frozen --target x86_64-unknown-linux-gnu
+mv target/x86_64-unknown-linux-gnu/release/cbindgen $distdir/[% project %]
+
+cd $distdir
+[% c('tar', {
+        tar_src => [ project ],
+        tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
+    }) %]
diff --git a/projects/cbindgen/config b/projects/cbindgen/config
new file mode 100644
index 0000000..69014bf
--- /dev/null
+++ b/projects/cbindgen/config
@@ -0,0 +1,15 @@
+# vim: filetype=yaml sw=2
+version: '[% c("abbrev") %]'
+git_url: https://github.com/eqrion/cbindgen
+git_hash: 23a991a5b21e89aa1dcdc70f1371be20c93ece8e #v0.8.7
+filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
+
+var:
+  container:
+    use_container: 1
+input_files:
+  - project: container-image
+  - name: rust
+    project: rust
+  - URL: https://people.torproject.org/~boklm/mirrors/sources/cbindgen-vendor.tar.bz2
+    sha256sum: f4cde3d56df893b543b35b7e4a6e295a275dbb3cee8e8eae549efe679db50ab9

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits