* updated yet more dir-less .cache DEPs
[t2sde.git] / package / develop / dart / dart.conf
blob258c261bc65f67d03fd05622cf83bb918368c479
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/dart/dart.conf
3 # Copyright (C) 2024 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 makeopt=
13 makeinstopt=
15 var_insert GCC_WRAPPER_REMOVE " " "-s"
17 hook_add prepatch 4 "depot_tools_extract"
18 hook_add prepatch 5 "gn_gclient_sync"
19 hook_add inmake 5 "gn_build"
20 hook_add postmake 5 "gn_install"
22 depot_tools_extract() {
23         tar -C $builddir/ $taropt $(match_source_file -p depot)
26 gn_gclient_sync() {
27         git clone --recurse-submodules https://github.com/dart-lang/sdk $builddir/dart
29         cd $builddir/$pkg
31         cat >.gclient <<EOF
32 solutions = [
33   {
34     "name": "sdk",
35     "url": "https://dart.googlesource.com/sdk.git@${ver}",
36     "custom_deps": {},
37     "custom_vars": {},
38   },
40 EOF
42         python ${builddir}/depot_tools/gclient.py sync
45 gn_build() {
46         cd sdk
47         gn gen out/ --args='
48             target_cpu = "x64"
49             is_debug = false
50             is_release = true
51             is_clang = false
52             dart_platform_sdk = false
53             verify_sdk_hash = false
54             dart_lib_export_symbols = false'
55         ninja create_sdk -C out/
58 gn_install() {
59         for x in out/dart out/dart.sym out/dart-sdk/bin/snapshots/dartdev.dart.snapshot out/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot out/dart-sdk/dartdoc_options.yaml out/dart-sdk/version; do
60                 install $x $root$libdir
61         done
63         ln -svf $root$libdir/dart $root$bindir/dart
64         ln -svf $root$libdir/dart.sym $root$bindir/dart.sym