diff --git a/tur-electron/electron-24/0001-electron-getversion-from-file.patch b/tur-electron/electron-24/0001-electron-getversion-from-file.patch new file mode 100644 index 0000000..40533b9 --- /dev/null +++ b/tur-electron/electron-24/0001-electron-getversion-from-file.patch @@ -0,0 +1,12 @@ +We pass `--no-history` to gclient, so there will be no version for electron. +--- a/electron/script/lib/get-version.js ++++ b/electron/script/lib/get-version.js +@@ -11,7 +11,7 @@ + // The only difference in the "git describe" technique is that technically a commit can "change" it's version + // number if a tag is created / removed retroactively. i.e. the first time a commit is pushed it will be 1.2.3 + // and after the tag is made rebuilding the same commit will result in it being 1.2.4 +- const output = spawnSync('git', ['describe', '--tags', '--abbrev=0'], { ++ const output = spawnSync('cat', ['ELECTRON_VERSION'], { + cwd: path.resolve(__dirname, '..', '..') + }); + if (output.status !== 0) { diff --git a/tur-electron/electron-24/0002-v8-fix-trap-handler.patch b/tur-electron/electron-24/0002-v8-fix-trap-handler.patch new file mode 100644 index 0000000..b3bab79 --- /dev/null +++ b/tur-electron/electron-24/0002-v8-fix-trap-handler.patch @@ -0,0 +1,11 @@ +--- a/third_party/electron_node/deps/v8/src/trap-handler/trap-handler.h ++++ b/third_party/electron_node/deps/v8/src/trap-handler/trap-handler.h +@@ -19,7 +19,7 @@ + + // X64 on Linux, Windows, MacOS, FreeBSD. + #if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \ +- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \ ++ (V8_OS_LINUX || V8_OS_WIN || V8_OS_DARWIN || \ + V8_OS_FREEBSD) + #define V8_TRAP_HANDLER_SUPPORTED true + // Arm64 (non-simulator) on Mac. diff --git a/tur-electron/electron-24/0003-cares-config.patch b/tur-electron/electron-24/0003-cares-config.patch new file mode 100644 index 0000000..1eaab11 --- /dev/null +++ b/tur-electron/electron-24/0003-cares-config.patch @@ -0,0 +1,24 @@ +--- a/third_party/electron_node/deps/cares/config/linux/ares_config.h ++++ b/third_party/electron_node/deps/cares/config/linux/ares_config.h +@@ -59,10 +59,10 @@ + #define HAVE_ARPA_INET_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_ARPA_NAMESER_COMPAT_H 1 ++// #define HAVE_ARPA_NAMESER_COMPAT_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_ARPA_NAMESER_H 1 ++// #define HAVE_ARPA_NAMESER_H 1 + + /* Define to 1 if you have the header file. */ + #define HAVE_ASSERT_H 1 +@@ -128,7 +128,7 @@ + #define HAVE_GETNAMEINFO 1 + + /* Define to 1 if you have the getservbyport_r function. */ +-#define HAVE_GETSERVBYPORT_R 1 ++// #define HAVE_GETSERVBYPORT_R 1 + + /* Define to 1 if you have the `gettimeofday' function. */ + #define HAVE_GETTIMEOFDAY 1 diff --git a/tur-electron/electron-24/0004-electron-disable-sandbox.patch b/tur-electron/electron-24/0004-electron-disable-sandbox.patch new file mode 100644 index 0000000..77e586e --- /dev/null +++ b/tur-electron/electron-24/0004-electron-disable-sandbox.patch @@ -0,0 +1,16 @@ +--- a/electron/shell/app/electron_main_delegate.cc ++++ b/electron/shell/app/electron_main_delegate.cc +@@ -256,8 +256,13 @@ + if (env->HasVar(kElectronEnableStackDumping)) + base::debug::EnableInProcessStackDumping(); + ++#ifndef __TERMUX__ + if (env->HasVar(kElectronDisableSandbox)) + command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox); ++#else ++ command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox); ++ command_line->AppendSwitch(sandbox::policy::switches::kDisableSeccompFilterSandbox); ++#endif + + tracing_sampler_profiler_ = + tracing::TracingSamplerProfiler::CreateOnMainThread(); diff --git a/tur-electron/electron-24/0005-node-as-posix.patch b/tur-electron/electron-24/0005-node-as-posix.patch new file mode 100644 index 0000000..7120590 --- /dev/null +++ b/tur-electron/electron-24/0005-node-as-posix.patch @@ -0,0 +1,14 @@ +--- a/third_party/electron_node/src/node_internals.h ++++ b/third_party/electron_node/src/node_internals.h +@@ -287,9 +287,9 @@ + + // Functions defined in node.cc that are exposed via the bootstrapper object + +-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__) ++#if defined(__POSIX__) && !defined(__CloudABI__) + #define NODE_IMPLEMENTS_POSIX_CREDENTIALS 1 +-#endif // defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__) ++#endif // defined(__POSIX__) && !defined(__CloudABI__) + + namespace credentials { + bool SafeGetenv(const char* key, diff --git a/tur-electron/electron-24/0006-gtk-fix-dynamic-loaded-libraries.patch b/tur-electron/electron-24/0006-gtk-fix-dynamic-loaded-libraries.patch new file mode 100644 index 0000000..8c4cd7e --- /dev/null +++ b/tur-electron/electron-24/0006-gtk-fix-dynamic-loaded-libraries.patch @@ -0,0 +1,53 @@ +--- a/ui/gtk/gtk_compat.cc ++++ b/ui/gtk/gtk_compat.cc +@@ -62,22 +62,38 @@ + } + + void* GetLibGio() { ++#ifdef __TERMUX__ ++ static void* libgio = DlOpen("libgio-2.0.so"); ++#else + static void* libgio = DlOpen("libgio-2.0.so.0"); ++#endif + return libgio; + } + + void* GetLibGdk3() { ++#ifdef __TERMUX__ ++ static void* libgdk3 = DlOpen("libgdk-3.so"); ++#else + static void* libgdk3 = DlOpen("libgdk-3.so.0"); ++#endif + return libgdk3; + } + + void* GetLibGtk3(bool check = true) { ++#ifdef __TERMUX__ ++ static void* libgtk3 = DlOpen("libgtk-3.so", check); ++#else + static void* libgtk3 = DlOpen("libgtk-3.so.0", check); ++#endif + return libgtk3; + } + + void* GetLibGtk4(bool check = true) { ++#ifdef __TERMUX__ ++ static void* libgtk4 = DlOpen("libgtk-4.so", check); ++#else + static void* libgtk4 = DlOpen("libgtk-4.so.1", check); ++#endif + return libgtk4; + } + +@@ -124,7 +140,11 @@ + } // namespace + + void* GetLibGdkPixbuf() { ++#ifdef __TERMUX__ ++ static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so"); ++#else + static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0"); ++#endif + return libgdk_pixbuf; + } + diff --git a/tur-electron/electron-24/0007-electron-include-variant.patch b/tur-electron/electron-24/0007-electron-include-variant.patch new file mode 100644 index 0000000..5f40854 --- /dev/null +++ b/tur-electron/electron-24/0007-electron-include-variant.patch @@ -0,0 +1,10 @@ +--- a/electron/shell/browser/electron_browser_context.h ++++ b/electron/shell/browser/electron_browser_context.h +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + + #include "base/memory/weak_ptr.h" diff --git a/tur-electron/electron-24/0008-remove-snapcraft.patch b/tur-electron/electron-24/0008-remove-snapcraft.patch new file mode 100644 index 0000000..83112aa --- /dev/null +++ b/tur-electron/electron-24/0008-remove-snapcraft.patch @@ -0,0 +1,20 @@ +--- a/build/install-build-deps.sh ++++ b/build/install-build-deps.sh +@@ -395,6 +395,7 @@ + msttcorefonts + python-dev + python-setuptools ++ snapcraft + ttf-dejavu-core + ttf-indic-fonts + ttf-kochi-gothic +@@ -580,9 +581,6 @@ + if package_exists libinput-dev; then + dev_list="${dev_list} libinput-dev" + fi +-if package_exists snapcraft; then +- dev_list="${dev_list} snapcraft" +-fi + + # Cross-toolchain strip is needed for building the sysroots. + if package_exists binutils-arm-linux-gnueabihf; then diff --git a/tur-electron/electron-24/build.sh b/tur-electron/electron-24/build.sh new file mode 100644 index 0000000..7a5b7ad --- /dev/null +++ b/tur-electron/electron-24/build.sh @@ -0,0 +1,328 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/electron/electron +TERMUX_PKG_DESCRIPTION="Build cross-platform desktop apps with JavaScript, HTML, and CSS" +TERMUX_PKG_LICENSE="MIT, BSD 3-Clause" +TERMUX_PKG_MAINTAINER="Chongyun Lee " +_CHROMIUM_VERSION=112.0.5615.49 +TERMUX_PKG_VERSION=24.0.0 +TERMUX_PKG_SRCURL=git+https://github.com/electron/electron +TERMUX_PKG_DEPENDS="electron-deps" +TERMUX_PKG_BUILD_DEPENDS="libnotify, libffi-static" +# Chromium doesn't support i686 on Linux. +TERMUX_PKG_BLACKLISTED_ARCHES="i686" + +__tur_setup_depot_tools() { + export DEPOT_TOOLS_UPDATE=0 + if [ ! -f "$TERMUX_PKG_CACHEDIR/.depot_tools-fetched" ];then + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $TERMUX_PKG_CACHEDIR/depot_tools + touch "$TERMUX_PKG_CACHEDIR/.depot_tools-fetched" + fi + export PATH="$TERMUX_PKG_CACHEDIR/depot_tools:$PATH" + export CHROMIUM_BUILDTOOLS_PATH="$TERMUX_PKG_SRCDIR/buildtools" +} + +termux_step_get_source() { + # Check whether we need to get source + if [ -f "$TERMUX_PKG_CACHEDIR/.electron-source-fetched" ]; then + local _fetched_source_version=$(cat $TERMUX_PKG_CACHEDIR/.electron-source-fetched) + if [ "$_fetched_source_version" = "$TERMUX_PKG_VERSION" ]; then + echo "[INFO]: Use pre-fetched source (version $_fetched_source_version)." + ln -sfr $TERMUX_PKG_CACHEDIR/tmp-checkout/src $TERMUX_PKG_SRCDIR + # Revert patches + shopt -s nullglob + local f + for f in $TERMUX_PKG_BUILDER_DIR/*.patch; do + echo "[INFO]: Reverting $(basename "$f")" + (sed "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" "$f" | patch -f --silent -R -p1 -d "$TERMUX_PKG_SRCDIR") || true + done + shopt -u nullglob + python $TERMUX_SCRIPTDIR/common-files/apply-chromium-patches.py --electron -C "$TERMUX_PKG_SRCDIR" -R -v $_CHROMIUM_VERSION + return + fi + fi + + # Fetch depot_tools + __tur_setup_depot_tools + + # Install nodejs + termux_setup_nodejs + + # Get source + rm -rf "$TERMUX_PKG_CACHEDIR/tmp-checkout" + mkdir -p "$TERMUX_PKG_CACHEDIR/tmp-checkout" + pushd "$TERMUX_PKG_CACHEDIR/tmp-checkout" + gclient config --name "src/electron" --unmanaged https://github.com/electron/electron + gclient sync --with_branch_heads --with_tags --no-history --revision v$TERMUX_PKG_VERSION + popd + + # Solve error like `.git/packed-refs is dirty` + cd "$TERMUX_PKG_CACHEDIR/tmp-checkout/src" + git pack-refs --all + cd electron + git pack-refs --all + + echo "$TERMUX_PKG_VERSION" > "$TERMUX_PKG_CACHEDIR/.electron-source-fetched" + ln -sfr $TERMUX_PKG_CACHEDIR/tmp-checkout/src $TERMUX_PKG_SRCDIR +} + +termux_step_post_get_source() { + echo "$TERMUX_PKG_VERSION" > $TERMUX_PKG_SRCDIR/electron/ELECTRON_VERSION + python $TERMUX_SCRIPTDIR/common-files/apply-chromium-patches.py --electron -v $_CHROMIUM_VERSION +} + +termux_step_configure() { + cd $TERMUX_PKG_SRCDIR + termux_setup_ninja + termux_setup_nodejs + __tur_setup_depot_tools + + # Remove termux's dummy pkg-config + local _target_pkg_config=$(command -v pkg-config) + local _host_pkg_config="$(cat $_target_pkg_config | grep exec | awk '{print $2}')" + rm -rf $TERMUX_PKG_TMPDIR/host-pkg-config-bin + mkdir -p $TERMUX_PKG_TMPDIR/host-pkg-config-bin + ln -s $_host_pkg_config $TERMUX_PKG_TMPDIR/host-pkg-config-bin/pkg-config + export PATH="$TERMUX_PKG_TMPDIR/host-pkg-config-bin:$PATH" + + env -i PATH="$PATH" sudo apt update + env -i PATH="$PATH" sudo apt install lsb-release -yq + env -i PATH="$PATH" sudo apt install libfontconfig1 libffi7 libfontconfig1:i386 libffi7:i386 -yq + env -i PATH="$PATH" sudo ./build/install-build-deps.sh --lib32 --no-syms --no-arm --no-chromeos-fonts --no-nacl --no-prompt --unsupported + + # Install amd64 rootfs if necessary, it should have been installed by source hooks. + build/linux/sysroot_scripts/install-sysroot.py --arch=amd64 + local _amd64_sysroot_path="$(pwd)/build/linux/$(ls build/linux | grep 'amd64-sysroot')" + + # Install i386 rootfs if necessary, it should have been installed by source hooks. + build/linux/sysroot_scripts/install-sysroot.py --arch=i386 + local _i386_sysroot_path="$(pwd)/build/linux/$(ls build/linux | grep 'i386-sysroot')" + + # Link to system tools required by the build + mkdir -p third_party/node/linux/node-linux-x64/bin + ln -sf $(command -v node) third_party/node/linux/node-linux-x64/bin/ + + # Dummy librt.so + # Why not dummy a librt.a? Some of the binaries reference symbols only exists in Android + # for some reason, such as the `chrome_crashpad_handler`, which needs to link with + # libprotobuf_lite.a, but it is hard to remove the usage of `android/log.h` in protobuf. + echo "INPUT(-llog -liconv -landroid-shmem)" > "$TERMUX_PREFIX/lib/librt.so" + + # Dummy libpthread.a and libresolv.a + echo '!' > "$TERMUX_PREFIX/lib/libpthread.a" + echo '!' > "$TERMUX_PREFIX/lib/libresolv.a" + + # Symlink libffi.a to libffi_pic.a + ln -sfr $TERMUX_PREFIX/lib/libffi.a $TERMUX_PREFIX/lib/libffi_pic.a + + # Merge sysroots + rm -rf $TERMUX_PKG_TMPDIR/sysroot + mkdir -p $TERMUX_PKG_TMPDIR/sysroot + pushd $TERMUX_PKG_TMPDIR/sysroot + mkdir -p usr/include usr/lib usr/bin + cp -R $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/include/* usr/include + cp -R $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/include/$TERMUX_HOST_PLATFORM/* usr/include + cp -R $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/$TERMUX_PKG_API_LEVEL/* usr/lib/ + cp "$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/libc++_shared.so" usr/lib/ + cp "$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/libc++_static.a" usr/lib/ + cp "$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/libc++abi.a" usr/lib/ + cp -Rf $TERMUX_PREFIX/include/* usr/include + cp -Rf $TERMUX_PREFIX/lib/* usr/lib + ln -sf /data ./data + # This is needed to build cups + cp -Rf $TERMUX_PREFIX/bin/cups-config usr/bin/ + chmod +x usr/bin/cups-config + popd + + # Construct args + local _clang_base_path="/usr/lib/llvm-16" + local _host_cc="$_clang_base_path/bin/clang" + local _host_cxx="$_clang_base_path/bin/clang++" + local _target_cpu _target_sysroot="$TERMUX_PKG_TMPDIR/sysroot" + local _v8_toolchain_name _v8_current_cpu _v8_sysroot_path + if [ "$TERMUX_ARCH" = "aarch64" ]; then + _target_cpu="arm64" + _v8_current_cpu="x64" + _v8_sysroot_path="$_amd64_sysroot_path" + _v8_toolchain_name="clang_x64_v8_arm64" + elif [ "$TERMUX_ARCH" = "arm" ]; then + _target_cpu="arm" + _v8_current_cpu="x86" + _v8_sysroot_path="$_i386_sysroot_path" + _v8_toolchain_name="clang_x86_v8_arm" + elif [ "$TERMUX_ARCH" = "x86_64" ]; then + _target_cpu="x64" + _v8_current_cpu="x64" + _v8_sysroot_path="$_amd64_sysroot_path" + _v8_toolchain_name="clang_x64" + fi + + local _common_args_file=$TERMUX_PKG_TMPDIR/common-args-file + rm -f $_common_args_file + touch $_common_args_file + + echo " +import(\"//electron/build/args/release.gn\") +# Do not build with symbols +symbol_level = 0 +# Use our custom toolchain +use_sysroot = false +target_cpu = \"$_target_cpu\" +target_rpath = \"$TERMUX_PREFIX/lib\" +target_sysroot = \"$_target_sysroot\" +clang_base_path = \"$TERMUX_STANDALONE_TOOLCHAIN\" +custom_toolchain = \"//build/toolchain/linux/unbundle:default\" +host_toolchain = \"$TERMUX_PKG_CACHEDIR/custom-toolchain:host\" +v8_snapshot_toolchain = \"$TERMUX_PKG_CACHEDIR/custom-toolchain:$_v8_toolchain_name\" +clang_use_chrome_plugins = false +dcheck_always_on = false +chrome_pgo_phase = 0 +treat_warnings_as_errors = false +# Use system libraries as little as possible +use_bundled_fontconfig = false +use_system_freetype = true +use_system_libdrm = true +use_custom_libcxx = false +use_allocator_shim = false +use_partition_alloc_as_malloc = false +enable_backup_ref_ptr_support = false +enable_mte_checked_ptr_support = false +use_nss_certs = true +use_udev = false +use_gnome_keyring = false +use_alsa = false +use_libpci = false +use_pulseaudio = true +use_ozone = true +ozone_auto_platforms = false +ozone_platform = \"x11\" +ozone_platform_x11 = true +ozone_platform_wayland = true +ozone_platform_headless = true +angle_enable_vulkan = true +angle_enable_swiftshader = true +rtc_use_pipewire = false +use_vaapi_x11 = false +# See comments on Chromium package +enable_nacl = false +use_thin_lto=false +" >> $_common_args_file + + if [ "$TERMUX_ARCH" = "arm" ]; then + echo "arm_arch = \"armv7-a\"" >> $_common_args_file + echo "arm_float_abi = \"softfp\"" >> $_common_args_file + fi + + # Use custom toolchain + mkdir -p $TERMUX_PKG_CACHEDIR/custom-toolchain + cp -f $TERMUX_PKG_BUILDER_DIR/toolchain.gn.in $TERMUX_PKG_CACHEDIR/custom-toolchain/BUILD.gn + sed -i "s|@HOST_CC@|$_host_cc|g + s|@HOST_CXX@|$_host_cxx|g + s|@HOST_LD@|$_host_cxx|g + s|@HOST_AR@|$(command -v llvm-ar)|g + s|@HOST_NM@|$(command -v llvm-nm)|g + s|@HOST_IS_CLANG@|true|g + s|@HOST_USE_GOLD@|false|g + s|@HOST_SYSROOT@|$_amd64_sysroot_path|g + " $TERMUX_PKG_CACHEDIR/custom-toolchain/BUILD.gn + sed -i "s|@V8_CC@|$_host_cc|g + s|@V8_CXX@|$_host_cxx|g + s|@V8_LD@|$_host_cxx|g + s|@V8_AR@|$(command -v llvm-ar)|g + s|@V8_NM@|$(command -v llvm-nm)|g + s|@V8_TOOLCHAIN_NAME@|$_v8_toolchain_name|g + s|@V8_CURRENT_CPU@|$_v8_current_cpu|g + s|@V8_V8_CURRENT_CPU@|$_target_cpu|g + s|@V8_IS_CLANG@|true|g + s|@V8_USE_GOLD@|false|g + s|@V8_SYSROOT@|$_v8_sysroot_path|g + " $TERMUX_PKG_CACHEDIR/custom-toolchain/BUILD.gn + + mkdir -p $TERMUX_PKG_BUILDDIR/out/Release + cat $_common_args_file > $TERMUX_PKG_BUILDDIR/out/Release/args.gn + gn gen $TERMUX_PKG_BUILDDIR/out/Release +} + +termux_step_make() { + cd $TERMUX_PKG_BUILDDIR + ninja -C $TERMUX_PKG_BUILDDIR/out/Release electron electron_license chromium_licenses +} + +termux_step_make_install() { + cd $TERMUX_PKG_BUILDDIR + local _install_prefix=$TERMUX_PREFIX/opt/electron-$TERMUX_PKG_VERSION + mkdir -p $_install_prefix + + echo "$TERMUX_PKG_VERSION" > $TERMUX_PKG_BUILDDIR/out/Release/version + + local normal_files=( + # Binary files + electron + chrome_sandbox + chrome_crashpad_handler + + # Resource files + chrome_100_percent.pak + chrome_200_percent.pak + resources.pak + + # V8 Snapshot data + snapshot_blob.bin + v8_context_snapshot.bin + + # ICU Data + icudtl.dat + + # Angle + libEGL.so + libGLESv2.so + + # Vulkan + libvulkan.so.1 + libvk_swiftshader.so + vk_swiftshader_icd.json + + # FFmpeg + libffmpeg.so + + # VERSION file + version + ) + + cp "${normal_files[@]/#/out/Release/}" "$_install_prefix/" + + cp -Rf out/Release/angledata $_install_prefix/ + cp -Rf out/Release/locales $_install_prefix/ + cp -Rf out/Release/resources $_install_prefix/ + + chmod +x $_install_prefix/electron + + # Install LICENSE file + cp out/Release/LICENSE{,S.chromium.html} $_install_prefix/ +} + +termux_step_install_license() { + mkdir -p $TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME + cp out/Release/LICENSE{,S.chromium.html} $TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME/ +} + +termux_step_post_make_install() { + # Remove the dummy files + rm $TERMUX_PREFIX/lib/lib{{pthread,resolv,ffi_pic}.a,rt.so} +} + +termux_step_post_massage() { + # Except the deb file, we also create a zip file like electron release + local _TARGET_CPU="$TERMUX_ARCH" + if [ "$TERMUX_ARCH" = "aarch64" ]; then + _TARGET_CPU="arm64" + elif [ "$TERMUX_ARCH" = "x86_64" ]; then + _TARGET_CPU="x64" + elif [ "$TERMUX_ARCH" = "arm" ]; then + _TARGET_CPU="armv7l" + fi + + mkdir -p $TERMUX_SCRIPTDIR/output-electron + + pushd $TERMUX_PREFIX/opt/electron-$TERMUX_PKG_VERSION + zip -r $TERMUX_SCRIPTDIR/output-electron/electron-v$TERMUX_PKG_VERSION-linux-$_TARGET_CPU.zip ./* + popd +} diff --git a/tur-electron/electron-24/toolchain.gn.in b/tur-electron/electron-24/toolchain.gn.in new file mode 100644 index 0000000..6c26578 --- /dev/null +++ b/tur-electron/electron-24/toolchain.gn.in @@ -0,0 +1,32 @@ +import("//build/config/sysroot.gni") +import("//build/toolchain/gcc_toolchain.gni") + +gcc_toolchain("host") { + cc = "@HOST_CC@" + cxx = "@HOST_CXX@" + ld = "@HOST_LD@" + ar = "@HOST_AR@" + nm = "@HOST_NM@" + toolchain_args = { + current_os = "linux" + current_cpu = "x64" + is_clang = @HOST_IS_CLANG@ + use_gold = @HOST_USE_GOLD@ + sysroot = "@HOST_SYSROOT@" + } +} +gcc_toolchain("@V8_TOOLCHAIN_NAME@") { + cc = "@V8_CC@" + cxx = "@V8_CXX@" + ld = "@V8_LD@" + ar = "@V8_AR@" + nm = "@V8_NM@" + toolchain_args = { + current_os = "linux" + current_cpu = "@V8_CURRENT_CPU@" + v8_current_cpu = "@V8_V8_CURRENT_CPU@" + is_clang = @V8_IS_CLANG@ + use_gold = @V8_USE_GOLD@ + sysroot = "@V8_SYSROOT@" + } +}