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

[tor-commits] [tor-messenger-build/master] Update build file for Instantbird (runc changes)



commit 802dd299259d7b3d5b18af7c57810e62ccc59b72
Author: Sukhbir Singh <sukhbir@xxxxxxxxxxxxxx>
Date:   Wed Jul 19 17:03:15 2017 -0400

    Update build file for Instantbird (runc changes)
---
 projects/instantbird/build | 84 ++++++++++++++++++++++++----------------------
 1 file changed, 43 insertions(+), 41 deletions(-)

diff --git a/projects/instantbird/build b/projects/instantbird/build
index 9318bd0..b64c8d7 100644
--- a/projects/instantbird/build
+++ b/projects/instantbird/build
@@ -1,32 +1,44 @@
-#!/bin/sh
-set -e
-rootdir=$(pwd)
-
-export SHELL=/bin/sh
-export HOME=$rootdir
-export MOZ_BUILD_DATE=$(date -d @[% c('timestamp') %] +%Y%m%d%H%M%S)
-export SOURCE_DATE_EPOCH=[% c('timestamp') %]
-
-[% IF c('var/osx') -%]
-[% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcchost') }) %]
-ln -s /var/tmp/dist/gcc/bin/gcc /var/tmp/dist/gcc/bin/cc
+#!/bin/bash
+[% c("var/setarch") -%]
+[% c("var/set_default_env") -%]
+
+[% IF c("var/windows") -%]
+  mkdir -p /var/tmp/dist
+  tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/gcc') %]
+  hgccdir=/var/tmp/dist/gcc
+  # We need a link to our GCC, otherwise the system cc gets used which points to
+  # /usr/bin/gcc.
+  ln -s gcc $hgccdir/bin/cc
+  # Make sure our GCC (as host compiler) get used. We do that before
+  # compiler setup so that mingw is first in the PATH.
+  export LD_LIBRARY_PATH=$hgccdir/lib64
+  export PATH=$hgccdir/bin:$PATH
+
+  # Firefox ESR52 needs Yasm >= 1.2.0 which Ubuntu Precise does not ship.
+  tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/yasm') %]
+  export PATH="/var/tmp/dist/yasm/bin:$PATH"
 [% END -%]
-
 [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
+distdir=/var/tmp/dist/[% project %]
+mkdir -p /var/tmp/build
 
-mkdir -p /var/tmp/dist
-cd /var/tmp/dist
-
-[% IF c("var/linux") -%]
-tar xf $rootdir/[% c('input_files_by_name/python') %]
-export PATH="/var/tmp/dist/python/bin:$PATH"
-tar xf $rootdir/[% c('input_files_by_name/binutils') %]
-export PATH="/var/tmp/dist/binutils/bin:$PATH"
+[% IF c("var/linux") %]
+  mkdir -p /var/tmp/dist
+  tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
+  export PATH="/var/tmp/dist/binutils/bin:$PATH"
 [% END -%]
 
-# LD_BIND_NOW needed to avoid this error:
-# undefined symbol: _ZNSt14error_categoryD2Ev
-export LD_BIND_NOW=1
+tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
+
+[% IF c("var/osx") %]
+  mkdir -p $distdir/TorBrowser.app/Contents/MacOS
+[% ELSE %]
+  mkdir -p $distdir/Browser
+[% END %]
+
+[% IF c("var/linux") %]
+  mkdir -p $distdir/Debug/Browser/
+[% END %]
 
 [% IF c("var/osname") == "linux-i686" -%]
 export LDFLAGS=-m32
@@ -34,16 +46,6 @@ export CFLAGS=-m32
 export CC='gcc -m32'
 [% END -%]
 
-[% IF c("var/linux") -%]
-mkdir -p /var/tmp/dist/yasm/bin
-ln -s /usr/bin/yasm-1 /var/tmp/dist/yasm/bin/yasm
-export PATH="/var/tmp/dist/yasm/bin:$PATH"
-[% END -%]
-
-cd $rootdir
-mkdir /var/tmp/build
-tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
-
 mkdir moz
 cd moz
 tar xf $rootdir/[% c('input_files_by_name/mozilla') %]
@@ -73,13 +75,13 @@ cp -p mozilla/tools/update-packaging/*.sh $MARTOOLS/
 cp -p obj-*/dist/host/bin/mar $MARTOOLS/
 cp -p obj-*/dist/host/bin/mbsdiff $MARTOOLS/
 [% IF c("var/linux") -%]
-cp -p obj-*/modules/libmar/tool/signmar $MARTOOLS/
-cp -p obj-*/security/nss/cmd/certutil/certutil $MARTOOLS/
-NSS_LIBS="libfreeblpriv3.so libmozsqlite3.so libnss3.so libnssdbm3.so libnssutil3.so libsmime3.so libsoftokn3.so libssl3.so"
-NSPR_LIBS="libnspr4.so libplc4.so libplds4.so"
-for LIB in $NSS_LIBS $NSPR_LIBS; do
-    cp -p obj-*/dist/bin/$LIB $MARTOOLS/
-done
+  cp -p obj-*/modules/libmar/tool/signmar $MARTOOLS/
+  cp -p obj-*/security/nss/cmd/certutil/certutil $MARTOOLS/
+  NSS_LIBS="libfreeblpriv3.so libmozsqlite3.so libnss3.so libnssdbm3.so libnssutil3.so libsmime3.so libsoftokn3.so libssl3.so"
+  NSPR_LIBS="libnspr4.so libplc4.so libplds4.so"
+  for LIB in $NSS_LIBS $NSPR_LIBS; do
+      cp -p obj-*/dist/bin/$LIB $MARTOOLS/
+  done
 [% END -%]
 
 cd /var/tmp/dist



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