Commit 3832c277 authored by Tristan Cavelier's avatar Tristan Cavelier

xxx component/qt: add qt5-qmake

parent 7b12e2fd
......@@ -264,13 +264,94 @@
export PATH=`pwd`/depot_tools:"$PATH"
--- Common/3dParty/v8/fetch.sh.orig 2017-02-14 11:21:06.666854412 +0100
+++ Common/3dParty/v8/fetch.sh 2017-02-14 11:42:27.169782480 +0100
@@ -1,20 +1,17 @@
@@ -22,49 +24,43 @@
*) arch="_32" ;;
esac
-if [[ -d "$SCRIPTPATH/$platform$arch" ]]
-then
-echo
-else
-mkdir "$SCRIPTPATH/$platform$arch"
+if [ ! -d "$SCRIPTPATH/$platform$arch" ] ; then
+ mkdir "$SCRIPTPATH/$platform$arch"
fi
cd "$SCRIPTPATH/v8"
-if [[ "$platform" == *"linux"* ]]
-then
-CFLAGS="-fPIC" CXXFLAGS="-fPIC" make native GYPFLAGS=-Dclang=0
-
-cp "./out/native/obj.target/tools/gyp/libv8_base.a" "./../$platform$arch/"
-cp "./out/native/obj.target/tools/gyp/libv8_libbase.a" "./../$platform$arch/"
-cp "./out/native/obj.target/tools/gyp/libv8_libplatform.a" "./../$platform$arch/"
-cp "./out/native/obj.target/tools/gyp/libv8_nosnapshot.a" "./../$platform$arch/"
-cp "./out/native/obj.target/tools/gyp/libv8_external_snapshot.a" "./../$platform$arch/"
-
-cp "./out/native/obj.target/third_party/icu/libicui18n.a" "./../$platform$arch/"
-cp "./out/native/obj.target/third_party/icu/libicuuc.a" "./../$platform$arch/"
-cp "./out/native/obj.target/third_party/icu/libicudata.a" "./../$platform$arch/"
+if [[ "$platform" == *linux* ]] ; then
+ CFLAGS="-fPIC" CXXFLAGS="-fPIC" make native GYPFLAGS=-Dclang=0
-cp "./third_party/icu/linux/icudtl_dat.S" "./../$platform$arch/"
+ cp "./out/native/obj.target/tools/gyp/libv8_base.a" "./../$platform$arch/"
+ cp "./out/native/obj.target/tools/gyp/libv8_libbase.a" "./../$platform$arch/"
+ cp "./out/native/obj.target/tools/gyp/libv8_libplatform.a" "./../$platform$arch/"
+ cp "./out/native/obj.target/tools/gyp/libv8_nosnapshot.a" "./../$platform$arch/"
+ cp "./out/native/obj.target/tools/gyp/libv8_external_snapshot.a" "./../$platform$arch/"
-cp "./third_party/icu/source/data/in/icudtl.dat" "./../$platform$arch/"
-fi
+ cp "./out/native/obj.target/third_party/icu/libicui18n.a" "./../$platform$arch/"
+ cp "./out/native/obj.target/third_party/icu/libicuuc.a" "./../$platform$arch/"
+ cp "./out/native/obj.target/third_party/icu/libicudata.a" "./../$platform$arch/"
+
+ cp "./third_party/icu/linux/icudtl_dat.S" "./../$platform$arch/"
+
+ cp "./third_party/icu/source/data/in/icudtl.dat" "./../$platform$arch/"
+
+elif [[ "$platform" == *mac* ]] ; then
+ CFLAGS="-fPIC" CXXFLAGS="-fPIC -stdlib=libc++" LDFLAGS="-stdlib=libc++" make native
+
+ cp "./out/native/libv8_base.a" "./../$platform$arch/"
+ cp "./out/native/libv8_libbase.a" "./../$platform$arch/"
+ cp "./out/native/libv8_libplatform.a" "./../$platform$arch/"
+ cp "./out/native/libv8_nosnapshot.a" "./../$platform$arch/"
+ cp "./out/native/libv8_external_snapshot.a" "./../$platform$arch/"
-if [[ "$platform" == *"mac"* ]]
-then
-CFLAGS="-fPIC" CXXFLAGS="-fPIC -stdlib=libc++" LDFLAGS="-stdlib=libc++" make native
-
-cp "./out/native/libv8_base.a" "./../$platform$arch/"
-cp "./out/native/libv8_libbase.a" "./../$platform$arch/"
-cp "./out/native/libv8_libplatform.a" "./../$platform$arch/"
-cp "./out/native/libv8_nosnapshot.a" "./../$platform$arch/"
-cp "./out/native/libv8_external_snapshot.a" "./../$platform$arch/"
-
-cp "./out/native/libicui18n.a" "./../$platform$arch/"
-cp "./out/native/libicuuc.a" "./../$platform$arch/"
-cp "./out/native/icudtl.dat" "./../$platform$arch/"
+ cp "./out/native/libicui18n.a" "./../$platform$arch/"
+ cp "./out/native/libicuuc.a" "./../$platform$arch/"
+ cp "./out/native/icudtl.dat" "./../$platform$arch/"
-cp "./out/native/libv8_libsampler.a" "./../$platform$arch/"
+ cp "./out/native/libv8_libsampler.a" "./../$platform$arch/"
-cp "./third_party/icu/mac/icudtl_dat.S" "./../$platform$arch/"
+ cp "./third_party/icu/mac/icudtl_dat.S" "./../$platform$arch/"
fi
--- Common/3dParty/v8/fetch.sh.orig 2017-01-30 15:01:43.810152465 +0100
+++ Common/3dParty/v8/fetch.sh 2017-02-01 15:24:37.740189528 +0100
@@ -1,20 +1,24 @@
#!/bin/bash
+# XXX actualy, this file should be named fetch.bash
+set -e
+V8_ABSOLUTE_PATH=SED_IT
+# XXX move /usr/bin to last PATH place
+_tmp_PATH=$(echo "$PATH" | sed 's,\(^\|:\)/usr/bin\(:\|$\),\1\2,g') && export PATH="$(echo "$_tmp_PATH:/usr/bin" | sed 's,:\+,:,g')" || :
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
......@@ -280,19 +361,257 @@
-if [ ! -d "depot_tools" ]
-then
-git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
+if [ ! -d v8 ]; then
+ mkdir v8
+ ln -s "$V8_ABSOLUTE_PATH/out" v8/out
+ ln -s "$V8_ABSOLUTE_PATH/third_party" v8/third_party
+ ln -s "$V8_ABSOLUTE_PATH/include" v8/include
+ echo "native:" > v8/Makefile
+if [ ! -d depot_tools ] ; then
+ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
fi
-
-export PATH=`pwd`/depot_tools:"$PATH"
-
export PATH=`pwd`/depot_tools:"$PATH"
-if [ ! -d "./v8" ]
-then
-fetch v8
-fi
-
-gclient sync -r 4.10.253
+if [ ! -d v8 ] ; then
+ fetch v8
fi
gclient sync -r 4.10.253
+cd v8
+git apply ../slapos-v8.patch
--- /dev/null 2017-01-30 09:00:09.914078893 +0100
+++ Common/3dParty/v8/slapos-v8.patch 2017-02-01 16:39:12.093279611 +0100
@@ -0,0 +1,235 @@
+diff --git a/build/standalone.gypi b/build/standalone.gypi
+index f804715..48eea0f 100644
+--- a/build/standalone.gypi
++++ b/build/standalone.gypi
+@@ -132,7 +132,7 @@
+ # Do not use 32-bit gold on 32-bit hosts as it runs out address space
+ # for component=static_library builds.
+ ['(OS=="linux" or OS=="android") and (target_arch=="x64" or target_arch=="arm" or (target_arch=="ia32" and host_arch=="x64"))', {
+- 'linux_use_bundled_gold%': 1,
++ 'linux_use_bundled_gold%': 0,
+ }, {
+ 'linux_use_bundled_gold%': 0,
+ }],
+diff --git a/build/toolchain.gypi b/build/toolchain.gypi
+index c2974c5..a14a704 100644
+--- a/build/toolchain.gypi
++++ b/build/toolchain.gypi
+@@ -109,7 +109,7 @@
+ # Do not use 32-bit gold on 32-bit hosts as it runs out address space
+ # for component=static_library builds.
+ ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
+- 'linux_use_bundled_gold%': 1,
++ 'linux_use_bundled_gold%': 0,
+ }, {
+ 'linux_use_bundled_gold%': 0,
+ }],
+@@ -126,7 +126,7 @@
+ # linux_use_gold_flags: whether to use build flags that rely on gold.
+ # On by default for x64 Linux.
+ ['OS=="linux" and target_arch=="x64"', {
+- 'linux_use_gold_flags%': 1,
++ 'linux_use_gold_flags%': 0,
+ }, {
+ 'linux_use_gold_flags%': 0,
+ }],
+diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc
+index b3841d0..a351755 100644
+--- a/src/compiler/arm64/code-generator-arm64.cc
++++ b/src/compiler/arm64/code-generator-arm64.cc
+@@ -12,6 +12,17 @@
+ #include "src/compiler/node-matchers.h"
+ #include "src/compiler/osr.h"
+
++# ifndef __INT64_C
++# if __WORDSIZE == 64
++# define __INT64_C(c) c ## L
++# else
++# define __INT64_C(c) c ## LL
++# endif
++# endif
++# ifndef INT64_MIN
++# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
++# endif
++
+ namespace v8 {
+ namespace internal {
+ namespace compiler {
+diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
+index 053c646..94211ec 100644
+--- a/src/compiler/instruction-selector.cc
++++ b/src/compiler/instruction-selector.cc
+@@ -14,6 +14,12 @@
+ #include "src/compiler/state-values-utils.h"
+ #include "src/deoptimizer.h"
+
++# if __WORDSIZE == 64
++# define SIZE_MAX (18446744073709551615UL)
++# else
++# define SIZE_MAX (4294967295U)
++# endif
++
+ namespace v8 {
+ namespace internal {
+ namespace compiler {
+@@ -387,6 +393,7 @@ size_t AddOperandToStateValueDescriptor(StateValueDescriptor* descriptor,
+ return 1;
+ }
+ }
++ return 1;
+ }
+
+
+diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
+index 8a64744..86d3ba1 100644
+--- a/src/compiler/x64/code-generator-x64.cc
++++ b/src/compiler/x64/code-generator-x64.cc
+@@ -12,6 +12,17 @@
+ #include "src/x64/assembler-x64.h"
+ #include "src/x64/macro-assembler-x64.h"
+
++# ifndef __INT64_C
++# if __WORDSIZE == 64
++# define __INT64_C(c) c ## L
++# else
++# define __INT64_C(c) c ## LL
++# endif
++# endif
++# ifndef INT64_MIN
++# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
++# endif
++
+ namespace v8 {
+ namespace internal {
+ namespace compiler {
+diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
+index cea90a2..44d0a0f 100644
+--- a/test/cctest/compiler/test-run-machops.cc
++++ b/test/cctest/compiler/test-run-machops.cc
+@@ -14,6 +14,30 @@
+ #include "test/cctest/compiler/graph-builder-tester.h"
+ #include "test/cctest/compiler/value-helper.h"
+
++# ifndef __INT64_C
++# if __WORDSIZE == 64
++# define __INT64_C(c) c ## L
++# else
++# define __INT64_C(c) c ## LL
++# endif
++# endif
++# ifndef INT64_MIN
++# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
++# endif
++# ifndef INT64_MAX
++# define INT64_MAX (__INT64_C(9223372036854775807))
++# endif
++# ifndef __UINT64_C
++# if __WORDSIZE == 64
++# define __UINT64_C(c) c ## UL
++# else
++# define __UINT64_C(c) c ## ULL
++# endif
++# endif
++# ifndef UINT64_MAX
++# define UINT64_MAX (__UINT64_C(18446744073709551615))
++# endif
++
+ using namespace v8::base;
+
+ namespace v8 {
+diff --git a/test/cctest/test-macro-assembler-mips64.cc b/test/cctest/test-macro-assembler-mips64.cc
+index e74703b..4c91684 100644
+--- a/test/cctest/test-macro-assembler-mips64.cc
++++ b/test/cctest/test-macro-assembler-mips64.cc
+@@ -36,6 +36,17 @@
+ #include "src/mips64/macro-assembler-mips64.h"
+ #include "src/mips64/simulator-mips64.h"
+
++# ifndef __INT64_C
++# if __WORDSIZE == 64
++# define __INT64_C(c) c ## L
++# else
++# define __INT64_C(c) c ## LL
++# endif
++# endif
++# ifndef INT64_MAX
++# define INT64_MAX (__INT64_C(9223372036854775807))
++# endif
++
+
+ using namespace v8::internal;
+
+@@ -456,7 +467,7 @@ static uint64_t run_dlsa(uint64_t rt, uint64_t rs, int8_t sa) {
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+
+- ::F f = FUNCTION_CAST<::F>(code->entry());
++ ::F f = FUNCTION_CAST< ::F>(code->entry());
+
+ uint64_t res = reinterpret_cast<uint64_t>(
+ CALL_GENERATED_CODE(isolate, f, rt, rs, 0, 0, 0));
+diff --git a/test/cctest/test-unboxed-doubles.cc b/test/cctest/test-unboxed-doubles.cc
+index f195a31..45499ce 100644
+--- a/test/cctest/test-unboxed-doubles.cc
++++ b/test/cctest/test-unboxed-doubles.cc
+@@ -18,6 +18,12 @@
+ #include "test/cctest/cctest.h"
+ #include "test/cctest/heap/utils-inl.h"
+
++#if __WORDSIZE == 64
++# define UINT64_C(c) c ## UL
++#else
++# define UINT64_C(c) c ## ULL
++#endif
++
+ using namespace v8::base;
+ using namespace v8::internal;
+
+diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
+index a3730ca..7a7b21f 100644
+--- a/test/cctest/wasm/test-run-wasm.cc
++++ b/test/cctest/wasm/test-run-wasm.cc
+@@ -13,6 +13,30 @@
+ #include "test/cctest/wasm/test-signatures.h"
+ #include "test/cctest/wasm/wasm-run-utils.h"
+
++# ifndef __INT64_C
++# if __WORDSIZE == 64
++# define __INT64_C(c) c ## L
++# else
++# define __INT64_C(c) c ## LL
++# endif
++# endif
++# ifndef INT64_MIN
++# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
++# endif
++# ifndef INT64_MAX
++# define INT64_MAX (__INT64_C(9223372036854775807))
++# endif
++# ifndef __UINT64_C
++# if __WORDSIZE == 64
++# define __UINT64_C(c) c ## UL
++# else
++# define __UINT64_C(c) c ## ULL
++# endif
++# endif
++# ifndef UINT64_MAX
++# define UINT64_MAX (__UINT64_C(18446744073709551615))
++# endif
++
+ using namespace v8::base;
+ using namespace v8::internal;
+ using namespace v8::internal::compiler;
+diff --git a/test/unittests/compiler/register-allocator-unittest.cc b/test/unittests/compiler/register-allocator-unittest.cc
+index c5ff90f..decf1ff 100644
+--- a/test/unittests/compiler/register-allocator-unittest.cc
++++ b/test/unittests/compiler/register-allocator-unittest.cc
+@@ -722,7 +722,7 @@ class SlotConstraintTest : public RegisterAllocatorTest,
+ int variant() const { return ::testing::get<1>(B::GetParam()); }
+
+ private:
+- typedef ::testing::WithParamInterface<::testing::tuple<ParameterType, int>> B;
++ typedef ::testing::WithParamInterface< ::testing::tuple<ParameterType, int>> B;
+ };
+
+ } // namespace
[buildout]
extends =
../xorg/buildout.cfg
../mesa/buildout.cfg
parts =
qmake
......@@ -9,85 +10,61 @@ parts =
# building [qmake] will download the full qt source anyway ~200MB
# qmake binary can be reached directly from ${qt:location}/bin/qmake if [qt] is fully built
recipe = slapos.recipe.cmmi
url = http://download.qt-project.org/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
md5sum = d990ee66bf7ab0c785589776f35ba6ad
version = 5.8.0
url = http://download.qt.io/official_releases/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.tar.gz
md5sum = a9f2494f75f966e2f22358ec367d8f41
# see https://github.com/NixOS/nixpkgs/blob/3e387c3e005c87566b5403d24c86f71f4945a79b/pkgs/development/libraries/qt-4.x/4.8/default.nix#L101
environment =
CFLAGS=-I${mesa:location}/include
CPPFLAGS=-I${mesa:location}/include
CXXFLAGS=-I${mesa:location}/include
LD_LIBRARY_PATH=${mesa:location}/lib
configure-command =
sed 's,/usr/X11R6/lib64,${libX11:location}/lib64 ${xproto:location}/lib64 ${libXext:location}/lib64,g' -i mkspecs/*/*.conf
sed 's,/usr/X11R6/lib,${libX11:location}/lib ${xproto:location}/lib ${libXext:location}/lib,g' -i mkspecs/*/*.conf
sed 's,/usr/X11R6/include,${libX11:location}/include ${xproto:location}/include ${libXext:location}/include,g' -i mkspecs/*/*.conf
./configure -v -no-separate-debug-info -release -no-fast -confirm-license -opensource
# it helped me : http://stackoverflow.com/questions/24264940/compile-qt5-without-gui-support-on-linux-arm
./configure -v -no-separate-debug-info -release -confirm-license -opensource -no-opengl -nomake examples
make-targets =
qmake
prefix = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/qt${:version}-qmake
post-install =
cp -rt ${:prefix} *
# mkdir ${:prefix}/bin 2>/dev/null || :
# cp bin/qmake* -t ${:prefix}/bin
# mkdir ${:prefix}/mkspecs 2>/dev/null || :
# cp -r mkspecs/* -t ${:prefix}/mkspecs
#environments =
# INSTALL_ROOT=../../qmake
#qmake-binary-path = ${:location}/bin/qmake
cp -rt ${:location} *
#recipe = slapos.recipe.build
#slapos_promisee =
# file:plop
## Online installer
#x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_online_v1_1_3_en.run eae2e2a1396fec1369b66c71d7df6eab
#x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_online_v1_1_3_en.run a4d929bc4d6511290c07c3745477b77b
## Offline installer
##x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_offline_v1_1_3_en.run 106fdae4ec8947c491ab0a827a02da12
##x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_offline_v1_1_3_en.run 8c280beb11ee763840464572ed80e8b8
## Needs many dependencies.
#script =
# if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
# download_file = self.download(self.options['url'], self.options.get('md5sum'))
# extract_dir = tempfile.mkdtemp(self.name)
# os.chdir(extract_dir)
# (download_dir, filename) = os.path.split(download_file)
# auto_extract_bin = os.path.join(extract_dir, filename)
# shutil.move(download_file, auto_extract_bin)
# os.chmod(auto_extract_bin, 0755)
# subprocess.call([auto_extract_bin])
# #self.cleanup_list.append(extract_dir)
# self.cleanup_dir_list.append(extract_dir)
# workdir = guessworkdir(extract_dir)
# import pdb; pdb.set_trace()
# self.copyTree(os.path.join(workdir, "jre1.6.0_27"), "%(location)s")
[qt-qmake]
<= qmake
[qt5-qmake]
<= qt-qmake
[qt5.8-qmake]
<= qt5-qmake
[qt5.8.0-qmake]
<= qt5.8-qmake
[qt4-qmake]
# building [qmake] will download the full qt source anyway ~200MB
# qmake binary can be reached directly from ${qt:location}/bin/qmake if [qt] is fully built
recipe = slapos.recipe.cmmi
version = 4.8.7
url = http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
md5sum = d990ee66bf7ab0c785589776f35ba6ad
# see https://github.com/NixOS/nixpkgs/blob/3e387c3e005c87566b5403d24c86f71f4945a79b/pkgs/development/libraries/qt-4.x/4.8/default.nix#L101
configure-command =
sed 's,/usr/X11R6/lib64,${libX11:location}/lib64 ${xproto:location}/lib64 ${libXext:location}/lib64,g' -i mkspecs/*/*.conf
sed 's,/usr/X11R6/lib,${libX11:location}/lib ${xproto:location}/lib ${libXext:location}/lib,g' -i mkspecs/*/*.conf
sed 's,/usr/X11R6/include,${libX11:location}/include ${xproto:location}/include ${libXext:location}/include,g' -i mkspecs/*/*.conf
./configure -v -no-separate-debug-info -release -no-fast -confirm-license -opensource
make-targets =
qmake
prefix = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/qt${:version}-qmake
post-install =
cp -rt ${:location} *
#ldd qt.run
# linux-gate.so.1 => (0xb7827000)
# libutil.so.1 => /lib/i686/cmov/libutil.so.1 (0xb781c000)
# libgobject-2.0.so.0 => not found
# libSM.so.6 => not found
# libICE.so.6 => not found
# libXrender.so.1 => not found
# libfontconfig.so.1 => not found
# libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb77a4000)
# libz.so.1 => /usr/lib/libz.so.1 (0xb778f000)
# libXext.so.6 => /usr/lib/libXext.so.6 (0xb7780000)
# libX11.so.6 => /usr/lib/libX11.so.6 (0xb7663000)
# libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb765f000)
# libgthread-2.0.so.0 => not found
# librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7655000)
# libglib-2.0.so.0 => not found
# libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb763c000)
# libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb754d000)
# libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7527000)
# libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7508000)
# libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb73c2000)
# libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb73a9000)
# /lib/ld-linux.so.2 (0xb7828000)
# libXau.so.6 => /usr/lib/libXau.so.6 (0xb73a6000)
# libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb73a1000)
\ No newline at end of file
[qt4-qmake]
<= qt-qmake
[qt4.8-qmake]
<= qt4-qmake
[qt4.8.7-qmake]
<= qt4.8-qmake
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment