commit f9b9039a8b7f5ed8b1bd823f4f3a9f8fc6302287 Author: Nicolas Vigier boklm@torproject.org Date: Fri Apr 7 13:22:31 2017 +0200
Bug 18831: Use own Yasm for Firefox cross-compilation
Starting with Firefox ESR52 Yasm < 1.2.0 is not sufficient anymore to compile our browser part for Windows. Ubuntu Precise still ships with such a version, though. We compile our own version until we get off of Precise.
tor-browser-bundle.git commit: 910094fc33ae4e75e10fee754bec106e83e0eac5 --- projects/firefox/build | 4 ++++ projects/firefox/config | 3 +++ projects/yasm/build | 14 ++++++++++++++ projects/yasm/config | 10 ++++++++++ 4 files changed, 31 insertions(+)
diff --git a/projects/firefox/build b/projects/firefox/build index abd699b..1dce495 100644 --- a/projects/firefox/build +++ b/projects/firefox/build @@ -11,6 +11,10 @@ # 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 %] diff --git a/projects/firefox/config b/projects/firefox/config index f7e89e5..c71025d 100644 --- a/projects/firefox/config +++ b/projects/firefox/config @@ -92,3 +92,6 @@ input_files: - project: gcc name: gcc enable: '[% c("var/windows") %]' + - project: yasm + name: yasm + enable: '[% c("var/windows") %]' diff --git a/projects/yasm/build b/projects/yasm/build new file mode 100644 index 0000000..82d037a --- /dev/null +++ b/projects/yasm/build @@ -0,0 +1,14 @@ +#!/bin/bash +[% c("var/set_default_env") -%] +distdir=/var/tmp/dist/[% project %] +mkdir -p /var/tmp/build +tar -C /var/tmp/build -xf $rootdir/[% c('input_files_by_name/yasm') %] +cd /var/tmp/build/yasm-[% c("version") %] +./configure --prefix="$distdir" +make -j4 +make install +cd /var/tmp/dist +[% c('tar', { + tar_src => [ project ], + tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'), + }) %] diff --git a/projects/yasm/config b/projects/yasm/config new file mode 100644 index 0000000..3d8a28a --- /dev/null +++ b/projects/yasm/config @@ -0,0 +1,10 @@ +# vim: filetype=yaml sw=2 +version: 1.2.0 +filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz' +remote_docker: 1 + +input_files: + - project: docker-image + - URL: 'https://www.tortall.net/projects/yasm/releases/yasm-%5B% c("version") %].tar.gz' + name: yasm + sha256sum: 768ffab457b90a20a6d895c39749adb547c1b7cb5c108e84b151a838a23ccf31