summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyan <cyjan@mrcyjanek.net>2026-03-09 18:05:16 +0100
committerGitHub <noreply@github.com>2026-03-09 18:05:16 +0100
commit2c11591e02b907e63d8fd4fcb0a6559625934a95 (patch)
treedab95d36703f314a8ee9d6277a160df16833c4e5
parent411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 (diff)
reproducibility (#177)
* reproducibility * wip: ci fixes, drop generate_translations_header.c * minor fixes * fix patch * fix: toolchain * bump hash * fix: minor build issue fixes * fix: x86_64-w64-mingw32 * wip * wip * all updated :o * fix: reduce git size * update checksum remove CI * chore, more optimal dockerfile * update monero to v0.18.4.6 * update checksum * update * minor patch update * fix: no command specified * fix: correct path * alpine * stupid. * AAWASTREYDRFUGTIHYJHGUTYFRDTFYVGUBHINJHGTYFRDSRTXDTCFHBJ
l---------.dockerignore1
-rw-r--r--.github/workflows/full_check.yaml615
-rw-r--r--.gitignore9
-rwxr-xr-xbuild_single.sh35
-rw-r--r--builder/Dockerfile122
-rwxr-xr-xbuilder/release.sh13
-rw-r--r--contrib/depends/.gitignore10
-rw-r--r--contrib/depends/Jenkinsfile265
-rw-r--r--contrib/depends/Makefile306
-rw-r--r--contrib/depends/README.md74
-rw-r--r--contrib/depends/builders/darwin.mk23
-rw-r--r--contrib/depends/builders/default.mk21
-rw-r--r--contrib/depends/builders/linux.mk2
-rwxr-xr-xcontrib/depends/config.guess1815
-rwxr-xr-xcontrib/depends/config.site.in66
-rwxr-xr-xcontrib/depends/config.sub2354
-rw-r--r--contrib/depends/description.md53
-rw-r--r--contrib/depends/funcs.mk422
-rwxr-xr-xcontrib/depends/gen_toolchain.cmake.sh464
-rw-r--r--contrib/depends/hosts/android.mk32
-rw-r--r--contrib/depends/hosts/darwin.mk23
-rw-r--r--contrib/depends/hosts/default.mk26
-rw-r--r--contrib/depends/hosts/freebsd.mk18
-rw-r--r--contrib/depends/hosts/ios.mk23
-rw-r--r--contrib/depends/hosts/iossimulator.mk26
-rw-r--r--contrib/depends/hosts/linux.mk32
-rw-r--r--contrib/depends/hosts/mingw32.mk11
-rw-r--r--contrib/depends/packages.md165
-rw-r--r--contrib/depends/packages/android_ndk.mk36
-rw-r--r--contrib/depends/packages/boost.mk61
-rw-r--r--contrib/depends/packages/darwin_sdk.mk15
-rw-r--r--contrib/depends/packages/eudev.mk30
-rw-r--r--contrib/depends/packages/expat.mk28
-rw-r--r--contrib/depends/packages/freebsd_base.mk23
-rw-r--r--contrib/depends/packages/graphviz.mk30
-rw-r--r--contrib/depends/packages/gtest.mk39
-rw-r--r--contrib/depends/packages/hidapi.mk38
-rw-r--r--contrib/depends/packages/icu4c.mk27
-rw-r--r--contrib/depends/packages/libICE.mk23
-rw-r--r--contrib/depends/packages/libSM.mk23
-rw-r--r--contrib/depends/packages/libiconv.mk35
-rw-r--r--contrib/depends/packages/libusb.mk39
-rw-r--r--contrib/depends/packages/native_biplist.mk20
-rw-r--r--contrib/depends/packages/native_ccache.mk25
-rw-r--r--contrib/depends/packages/native_cctools.mk28
-rw-r--r--contrib/depends/packages/native_cdrkit.mk26
-rw-r--r--contrib/depends/packages/native_clang.mk29
-rw-r--r--contrib/depends/packages/native_cmake-unused.mk23
-rw-r--r--contrib/depends/packages/native_ds_store.mk17
-rw-r--r--contrib/depends/packages/native_libdmg-hfsplus.mk22
-rw-r--r--contrib/depends/packages/native_libtapi.mk28
-rw-r--r--contrib/depends/packages/native_mac_alias.mk21
-rw-r--r--contrib/depends/packages/native_protobuf.mk36
-rw-r--r--contrib/depends/packages/ncurses.mk63
-rw-r--r--contrib/depends/packages/openssl.mk72
-rw-r--r--contrib/depends/packages/packages.mk40
-rw-r--r--contrib/depends/packages/polyseed.mk22
-rw-r--r--contrib/depends/packages/protobuf.mk43
-rw-r--r--contrib/depends/packages/readline.mk29
-rw-r--r--contrib/depends/packages/sodium.mk36
-rw-r--r--contrib/depends/packages/unbound.mk37
-rw-r--r--contrib/depends/packages/unwind.mk29
-rw-r--r--contrib/depends/packages/xproto.mk21
-rw-r--r--contrib/depends/packages/zeromq.mk41
-rw-r--r--contrib/depends/patches/boost/fix_arm_arch.patch11
-rw-r--r--contrib/depends/patches/boost/fix_aroptions.patch28
-rw-r--r--contrib/depends/patches/boost/fix_io_control_hpp.patch11
-rw-r--r--contrib/depends/patches/cmake/cmake-1-fixes.patch67
-rw-r--r--contrib/depends/patches/darwin_sdk/fix_missing_definitions.patch18
-rw-r--r--contrib/depends/patches/hidapi/missing_win_include.patch21
-rw-r--r--contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch37
-rw-r--r--contrib/depends/patches/libiconv/fix-whitespace.patch13
-rw-r--r--contrib/depends/patches/native_biplist/sorted_list.patch29
-rw-r--r--contrib/depends/patches/native_cdrkit/cdrkit-deterministic.patch86
-rw-r--r--contrib/depends/patches/native_mac_alias/python3.patch72
-rw-r--r--contrib/depends/patches/ncurses/fallback.c6621
-rw-r--r--contrib/depends/patches/protobuf/visibility.patch159
-rw-r--r--contrib/depends/patches/sodium/disable-glibc-getrandom-getentropy.patch25
-rw-r--r--contrib/depends/patches/sodium/fix-whitespace.patch13
-rw-r--r--contrib/depends/patches/unbound/disable-glibc-reallocarray.patch14
-rw-r--r--contrib/depends/patches/unwind/fix_obj_order.patch11
-rw-r--r--contrib/depends/patches/zeromq/fix_declaration.patch11
-rw-r--r--contrib/depends/toolchain.cmake.in208
-rw-r--r--example/cmake/.gitignore1
-rw-r--r--example/cmake/CMakeLists.txt64
-rw-r--r--impls/monero.dart/lib/src/checksum_monero.dart2
-rw-r--r--impls/monero.dart/lib/src/checksum_wownero.dart2
-rw-r--r--impls/monero.dart/lib/src/checksum_zano.dart2
-rw-r--r--impls/monero.ts/checksum_monero.ts2
-rw-r--r--impls/monero.ts/checksum_wownero.ts2
-rw-r--r--impls/monero.ts/checksum_zano.ts2
m---------monero0
-rw-r--r--monero_libwallet2_api_c/CMakeLists.txt40
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/monero_checksum.h2
-rw-r--r--patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch10
-rw-r--r--patches/monero/0002-store-crash-fix.patch174
-rw-r--r--patches/monero/0003-uint64_t-missing-definition-fix.patch8
-rw-r--r--patches/monero/0004-use-proper-error-handling-in-get_seed.patch14
-rw-r--r--patches/monero/0005-UR-functions.patch49
-rw-r--r--patches/monero/0006-add-dummy-device-for-ledger.patch29
-rw-r--r--patches/monero/0007-polyseed.patch46
-rw-r--r--patches/monero/0008-coin-control.patch54
-rw-r--r--patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch8
-rw-r--r--patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch10
-rw-r--r--patches/monero/0011-add-monero-submodule-support.patch59
-rw-r--r--patches/monero/0012-fix-iOS-depends-build.patch8
-rw-r--r--patches/monero/0013-include-locale-only-when-targeting-WIN32.patch12
-rw-r--r--patches/monero/0014-change-earliest-fork-height-message.patch10
-rw-r--r--patches/monero/0015-remove-trivially_copyable-assert.patch6
-rw-r--r--patches/monero/0016-pr-9880.patch25
-rw-r--r--patches/monero/0016-serialize-cache-to-JSON.patch (renamed from patches/monero/0018-serialize-cache-to-JSON.patch)30
-rw-r--r--patches/monero/0017-drop-generate_translations_header.c-requirement.patch123
-rw-r--r--patches/monero/0017-fix-unary_function-__unary_function.patch28
-rw-r--r--patches/monero/0018-depends-remove-icu4c-monero-project-monero-8880.patch39
-rw-r--r--patches/monero/0019-fix-mingw-build-issues.patch46
-rw-r--r--patches/monero/0020-fix-remove-flaky-test.patch27
-rw-r--r--patches/wownero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch (renamed from patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch)6
-rw-r--r--patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch4309
-rw-r--r--patches/wownero/0002-fix-is_trivially_copyable.patch (renamed from patches/wownero/0003-fix-is_trivially_copyable.patch)6
-rw-r--r--patches/wownero/0003-store-crash-fix.patch (renamed from patches/wownero/0004-store-crash-fix.patch)42
-rw-r--r--patches/wownero/0004-uint64_t-missing-definition-fix.patch (renamed from patches/wownero/0005-uint64_t-missing-definition-fix.patch)6
-rw-r--r--patches/wownero/0005-use-proper-error-handling-in-get_seed.patch (renamed from patches/wownero/0006-use-proper-error-handling-in-get_seed.patch)14
-rw-r--r--patches/wownero/0006-UR-functions.patch (renamed from patches/wownero/0007-UR-functions.patch)62
-rw-r--r--patches/wownero/0007-add-dummy-device-for-ledger.patch (renamed from patches/wownero/0008-add-dummy-device-for-ledger.patch)30
-rw-r--r--patches/wownero/0008-polyseed.patch (renamed from patches/wownero/0009-polyseed.patch)99
-rw-r--r--patches/wownero/0009-coin-control.patch (renamed from patches/wownero/0010-coin-control.patch)56
-rw-r--r--patches/wownero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch (renamed from patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch)6
-rw-r--r--patches/wownero/0011-Add-recoverDeterministicWalletFromSpendKey.patch (renamed from patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch)8
-rw-r--r--patches/wownero/0012-add-monero-submodule-support.patch (renamed from patches/wownero/0013-add-monero-submodule-support.patch)34
-rw-r--r--patches/wownero/0013-fix-iOS-depends-build.patch (renamed from patches/wownero/0014-fix-iOS-depends-build.patch)16
-rw-r--r--patches/wownero/0014-include-locale-only-when-targeting-WIN32.patch (renamed from patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch)12
-rw-r--r--patches/wownero/0015-change-earliest-fork-height-message.patch (renamed from patches/wownero/0016-change-earliest-fork-height-message.patch)10
-rw-r--r--patches/wownero/0016-drop-generate_translations_header.c-requirement.patch132
-rw-r--r--patches/wownero/0017-pr-9880.patch25
-rw-r--r--patches/wownero/0018-fix-unary_function-__unary_function.patch28
-rw-r--r--patches/wownero/0022-fix-remove-flaky-test.patch27
-rw-r--r--patches/wownero/0025-depends-remove-icu4c-monero-project-monero-8880.patch25
-rw-r--r--patches/zano/0001-fix-build-issues.patch4
-rw-r--r--patches/zano/0002-fix-mingw-build-issues.patch34
-rw-r--r--patches/zano/0003-fix-ios-builds.patch14
-rw-r--r--patches/zano/0004-use-boost-filesystem-instead-of-stdfs.patch28
-rw-r--r--patches/zano/0005-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch6
-rw-r--r--patches/zano/0006-increase-max-password.patch8
-rw-r--r--patches/zano/0007-relax-mutex-in-invoke-call.patch43
-rw-r--r--patches/zano/0008-fix-don-t-depend-on-locale-on-non-windows.patch39
-rw-r--r--patches/zano/0009-fix-threads-on-iOS.patch29
-rw-r--r--patches/zano/0010-workaround-no-op-MARK_AS_POD_C11.patch34
-rw-r--r--renovate.json6
m---------wownero0
-rw-r--r--wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h2
m---------zano0
-rw-r--r--zano_libwallet2_api_c/src/main/cpp/zano_checksum.h2
152 files changed, 1814 insertions, 19958 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 120000
index 0000000..3e4e48b
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+.gitignore \ No newline at end of file
diff --git a/.github/workflows/full_check.yaml b/.github/workflows/full_check.yaml
deleted file mode 100644
index 7a81837..0000000
--- a/.github/workflows/full_check.yaml
+++ /dev/null
@@ -1,615 +0,0 @@
-name: full compatibility check
-on: [push]
-permissions:
- issues: write
- pull-requests: write
-jobs:
- lib_mingw:
- strategy:
- fail-fast: false
- matrix:
- coin: [monero, wownero]
- target: [x86_64-w64-mingw32, i686-w64-mingw32]
- runs-on: ubuntu-latest
- container:
- image: ubuntu:24.04
- steps:
- - name: Install dependencies
- run: |
- apt update
- apt install -y pigz build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 gperf gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
- - name: Patch sources
- run: |
- git config --global --add safe.directory '*'
- git config --global user.email "ci@mrcyjanek.net"
- git config --global user.name "CI mrcyjanek.net"
- ./apply_patches.sh monero
- ./apply_patches.sh wownero
- ./apply_patches.sh zano
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.coin }}-${{ matrix.target }}
- - name: Build ${{ matrix.coin }} for ${{ matrix.target }}
- run: |
- env DEPENDS_UNTRUSTED_FAST_BUILDS=forced ./build_single.sh ${{ matrix.coin }} ${{ matrix.target }} -j$(nproc)
- - name: rename artifacts
- run: |
- mkdir -p release/gh/
- for i in release/${{ matrix.coin }}/*
- do
- cp "$i" "release/gh/${{ matrix.coin }}_$(basename $i)"
- done
- - name: Release
- uses: softprops/action-gh-release@v2
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: release/gh/*
- token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- - name: Upload lib
- uses: actions/upload-artifact@v4
- with:
- name: mingw-${{ matrix.coin }}-${{ matrix.target }}
- path: release/${{ matrix.coin }}
-
- lib_android:
- strategy:
- fail-fast: false
- matrix:
- coin: [monero, wownero, zano]
- target: [x86_64-linux-android, armv7a-linux-androideabi, aarch64-linux-android]
- runs-on: ubuntu-22.04
- steps:
- - name: Free Disk Space
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
- uses: jlumbroso/free-disk-space@main
- with:
- tool-cache: false
- android: true
- dotnet: true
- haskell: true
- large-packages: true
- docker-images: true
- swap-storage: true
- - name: Install dependencies
- run: |
- sudo apt update
- sudo apt install -y llvm pigz build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo6 gperf unzip python-is-python3
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
- - name: Patch sources
- run: |
- git config --global --add safe.directory '*'
- git config --global user.email "ci@mrcyjanek.net"
- git config --global user.name "CI mrcyjanek.net"
- ./apply_patches.sh monero
- ./apply_patches.sh wownero
- ./apply_patches.sh zano
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.coin }}-${{ matrix.target }}
- - name: Build ${{ matrix.coin }} for ${{ matrix.target }}
- run: |
- env DEPENDS_UNTRUSTED_FAST_BUILDS=forced ./build_single.sh ${{ matrix.coin }} ${{ matrix.target }} -j$(nproc)
- - name: rename artifacts
- run: |
- mkdir -p release/gh/
- for i in release/${{ matrix.coin }}/*
- do
- cp "$i" "release/gh/${{ matrix.coin }}_$(basename $i)"
- done
- - name: Release
- uses: softprops/action-gh-release@v2
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: release/gh/*
- token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- - name: Upload lib
- uses: actions/upload-artifact@v4
- with:
- name: android-${{ matrix.coin }}-${{ matrix.target }}
- path: release/${{ matrix.coin }}
- - name: remove android_ndk
- run: |
- rm -rf contrib/depends/built/*/android_ndk
- rm -rf contrib/depends/sources/android-ndk-r26d-linux.zip
-
- lib_linux:
- strategy:
- fail-fast: false
- matrix:
- coin: [monero, wownero, zano]
- target: [x86_64-linux-gnu, aarch64-linux-gnu, i686-linux-gnu]
- runs-on: ubuntu-latest
- container:
- image: debian:bookworm
- steps:
- - name: Install dependencies
- run: |
- apt update
- apt install -y pigz build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-i686-linux-gnu g++-i686-linux-gnu
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
- - name: Patch sources
- run: |
- git config --global --add safe.directory '*'
- git config --global user.email "ci@mrcyjanek.net"
- git config --global user.name "CI mrcyjanek.net"
- ./apply_patches.sh monero
- ./apply_patches.sh wownero
- ./apply_patches.sh zano
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.coin }}-${{ matrix.target }}
- - name: Build ${{ matrix.coin }} for ${{ matrix.target }}
- run: |
- env DEPENDS_UNTRUSTED_FAST_BUILDS=forced ./build_single.sh ${{ matrix.coin }} ${{ matrix.target }} -j$(nproc)
- - name: rename artifacts
- run: |
- mkdir -p release/gh/
- for i in release/${{ matrix.coin }}/*
- do
- cp "$i" "release/gh/${{ matrix.coin }}_$(basename $i)"
- done
- - name: Release
- uses: softprops/action-gh-release@v2
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: release/gh/*
- token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- - name: Upload lib
- uses: actions/upload-artifact@v4
- with:
- name: linux-${{ matrix.coin }}-${{ matrix.target }}
- path: release/${{ matrix.coin }}
-
- lib_macos:
- strategy:
- fail-fast: false
- matrix:
- coin: [monero, wownero, zano]
- target: [aarch64-apple-darwin, x86_64-apple-darwin]
- name: macos build
- runs-on: macos-15
- steps:
- - name: Checkout monero_c repo
- uses: actions/checkout@v4
- with:
- repository: MrCyjaneK/monero_c
- fetch-depth: 0
- submodules: recursive
- - uses: maxim-lobanov/setup-xcode@v1
- with:
- xcode-version: '16.4'
- - name: install dependencies
- run: |
- brew uninstall cmake
- brew install cmake ccache binutils pigz autoconf automake libtool pkg-config
- - name: Patch sources
- run: |
- git config --global --add safe.directory '*'
- git config --global user.email "ci@mrcyjanek.net"
- git config --global user.name "CI mrcyjanek.net"
- ./apply_patches.sh monero
- ./apply_patches.sh wownero
- ./apply_patches.sh zano
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.coin }}-${{ matrix.target }}
- - name: Build ${{ matrix.coin }} for ${{ matrix.target }}
- run: |
- env DEPENDS_UNTRUSTED_FAST_BUILDS=forced ./build_single.sh ${{ matrix.coin }} ${{ matrix.target }} -j$(sysctl -n hw.logicalcpu)
- - name: rename artifacts
- run: |
- mkdir -p release/gh/
- for i in release/${{ matrix.coin }}/*
- do
- cp "$i" "release/gh/${{ matrix.coin }}_$(basename $i)"
- done
- - name: Release
- uses: softprops/action-gh-release@v2
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: release/gh/*
- token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- - name: Upload lib
- uses: actions/upload-artifact@v4
- with:
- name: macos-${{ matrix.coin }}-${{ matrix.target }}
- path: release/${{ matrix.coin }}
-
- lib_ios:
- strategy:
- fail-fast: false
- matrix:
- coin: [monero, wownero, zano]
- target: [aarch64-apple-ios, aarch64-apple-iossimulator]
- name: ios build
- runs-on: macos-15
- steps:
- - name: Checkout monero_c repo
- uses: actions/checkout@v4
- with:
- repository: MrCyjaneK/monero_c
- fetch-depth: 0
- submodules: recursive
- - uses: maxim-lobanov/setup-xcode@v1
- with:
- xcode-version: '16.4'
- - name: install dependencies
- run: |
- brew uninstall cmake
- brew install cmake ccache autoconf automake libtool
- - name: Patch sources
- run: |
- git config --global --add safe.directory '*'
- git config --global user.email "ci@mrcyjanek.net"
- git config --global user.name "CI mrcyjanek.net"
- ./apply_patches.sh monero
- ./apply_patches.sh wownero
- ./apply_patches.sh zano
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.coin }}-${{ matrix.target }}
- - name: Build ${{ matrix.coin }} for ${{ matrix.target }}
- run: |
- env DEPENDS_UNTRUSTED_FAST_BUILDS=forced ./build_single.sh ${{ matrix.coin }} ${{ matrix.target }} -j$(sysctl -n hw.logicalcpu)
- - name: rename artifacts
- run: |
- mkdir -p release/gh/
- for i in release/${{ matrix.coin }}/*
- do
- cp "$i" "release/gh/${{ matrix.coin }}_$(basename $i)"
- done
- - name: Release
- uses: softprops/action-gh-release@v2
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: release/gh/*
- token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- - name: Upload lib
- uses: actions/upload-artifact@v4
- with:
- name: ios-${{ matrix.coin }}-${{ matrix.target }}
- path: release/${{ matrix.coin }}
-
- bulk_lib_release:
- name: create single release file
- runs-on: ubuntu-latest
- needs: [lib_mingw, lib_android, lib_linux, lib_macos, lib_ios]
- strategy:
- matrix:
- coin: [monero, wownero, zano]
- platform: [android, ios, linux, macos]
- include:
- - coin: monero
- platform: mingw
- - coin: wownero
- platform: mingw
- steps:
- - name: Create release directory
- run: mkdir -p release/${{ matrix.coin }}
-
- - name: Download Android artifacts
- if: matrix.platform == 'android'
- uses: actions/download-artifact@v4
- with:
- pattern: android-${{ matrix.coin }}-*
- path: temp-android
- merge-multiple: true
-
- - name: Download iOS artifacts
- if: matrix.platform == 'ios'
- uses: actions/download-artifact@v4
- with:
- pattern: ios-${{ matrix.coin }}-*
- path: temp-ios
- merge-multiple: true
-
- - name: Download Linux artifacts
- if: matrix.platform == 'linux'
- uses: actions/download-artifact@v4
- with:
- pattern: linux-${{ matrix.coin }}-*
- path: temp-linux
- merge-multiple: true
-
- - name: Download macOS artifacts
- if: matrix.platform == 'macos'
- uses: actions/download-artifact@v4
- with:
- pattern: macos-${{ matrix.coin }}-*
- path: temp-macos
- merge-multiple: true
-
- - name: Download MinGW artifacts
- if: matrix.platform == 'mingw' && (matrix.coin == 'monero' || matrix.coin == 'wownero')
- uses: actions/download-artifact@v4
- with:
- pattern: mingw-${{ matrix.coin }}-*
- path: temp-mingw
- merge-multiple: true
-
- - name: Copy artifacts to release directory
- run: |
- if [ -d "temp-${{ matrix.platform }}" ]; then
- cp -r temp-${{ matrix.platform }}/* release/${{ matrix.coin }}/
- fi
-
- - name: Upload consolidated artifacts
- uses: actions/upload-artifact@v4
- with:
- name: ${{ matrix.platform }}-${{ matrix.coin }}-all
- path: release/${{ matrix.coin }}
-
- final_bulk_release:
- name: create final release bundle
- runs-on: ubuntu-latest
- needs: [bulk_lib_release]
- steps:
- - name: Create release directory
- run: mkdir -p release/{monero,wownero,zano}
-
- - name: Download all consolidated artifacts
- uses: actions/download-artifact@v4
- with:
- pattern: "*-all"
- path: temp-all
-
- - name: Reorganize artifacts
- run: |
- # Move all artifacts to their respective coin directories
- for coin in monero wownero zano; do
- find temp-all -name "*-${coin}-all" -type d | while read dir; do
- if [ -d "$dir" ]; then
- cp -r "$dir"/* "release/${coin}/" 2>/dev/null || true
- fi
- done
- done
-
- - name: zip release dir
- run: zip -r release-bundle.zip release
-
- - name: Release
- uses: softprops/action-gh-release@v2
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: release-bundle.zip
- token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
-
- - name: Upload final bundle
- uses: actions/upload-artifact@v4
- with:
- name: release-bulk
- path: release
-
- deno_monerots_test_linux:
- name: test ts library
- runs-on: ubuntu-24.04
- needs: [lib_linux]
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
- - uses: actions/download-artifact@v4
- with:
- pattern: linux-monero-x86_64-linux-gnu
- path: temp-linux-monero
- merge-multiple: true
- - name: unpack and move monero_c
- run: |
- mkdir -p release/monero
- cp -r temp-linux-monero/* release/monero/
- unxz -f -k release/*/*.xz
- - uses: denoland/setup-deno@v1
- with:
- deno-version: vx.x.x
- - name: Create symlink
- run: |
- cd impls/monero.ts
- mkdir lib
- cd lib
- ln -s ../../../release/monero/x86_64-linux-gnu_libwallet2_api_c.so
- mv x86_64-linux-gnu_libwallet2_api_c.so monero_libwallet2_api_c.so
- cd ..
- - name: Run tests
- run: |
- cd impls/monero.ts
- deno run --unstable-ffi --allow-ffi checksum.ts
-
- regression_tests_linux:
- name: linux regression tests
- strategy:
- fail-fast: false
- matrix:
- coin: [monero, wownero]
- needs: [lib_linux]
- runs-on: ubuntu-24.04
- steps:
- - uses: denoland/setup-deno@v2
- with:
- deno-version: v2.x
-
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
-
- - uses: actions/download-artifact@v4
- with:
- pattern: linux-${{ matrix.coin }}-*
- path: temp-linux-${{ matrix.coin }}
- merge-multiple: true
-
- - name: Setup release directory
- run: |
- mkdir -p release/${{ matrix.coin }}
- cp -r temp-linux-${{ matrix.coin }}/* release/${{ matrix.coin }}/
-
- - name: Run regression tests
- run: COIN="${{ matrix.coin }}" deno test -A tests/regression.test.ts
-
- regression_tests_macos:
- name: macos regression tests
- strategy:
- matrix:
- coin: [monero, wownero]
- needs: [lib_macos]
- runs-on: macos-15
- steps:
- - uses: denoland/setup-deno@v2
- with:
- deno-version: canary
-
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
-
- - uses: actions/download-artifact@v4
- with:
- pattern: macos-${{ matrix.coin }}-*
- path: temp-macos-${{ matrix.coin }}
- merge-multiple: true
-
- - name: Setup release directory
- run: |
- mkdir -p release/${{ matrix.coin }}
- cp -r temp-macos-${{ matrix.coin }}/* release/${{ matrix.coin }}/
-
- - name: Run regression tests
- run: COIN="${{ matrix.coin }}" deno test -A tests/regression.test.ts
-
- integration_tests_linux:
- name: linux integration tests
- strategy:
- matrix:
- coin: [monero, wownero]
- needs: [lib_linux]
- runs-on: ubuntu-24.04
- steps:
- - uses: denoland/setup-deno@v2
- with:
- deno-version: v2.x
-
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
-
- - uses: actions/download-artifact@v4
- with:
- pattern: linux-${{ matrix.coin }}-*
- path: temp-linux-${{ matrix.coin }}
- merge-multiple: true
-
- - name: Setup release directory
- run: |
- mkdir -p release/${{ matrix.coin }}
- cp -r temp-linux-${{ matrix.coin }}/* release/${{ matrix.coin }}/
-
- - name: Run integration tests
- run: COIN="${{ matrix.coin }}" deno test -A tests/integration.test.ts
- env:
- SECRET_WALLET_PASSWORD: ${{ secrets.SECRET_WALLET_PASSWORD }}
- SECRET_WALLET_MNEMONIC: ${{ secrets.SECRET_WALLET_MNEMONIC }}
- SECRET_WALLET_RESTORE_HEIGHT: ${{ secrets.SECRET_WALLET_RESTORE_HEIGHT }}
-
- integration_tests_macos:
- name: macos integration tests
- strategy:
- matrix:
- coin: [monero, wownero]
- needs: [lib_macos]
- runs-on: macos-15
- steps:
- - uses: denoland/setup-deno@v2
- with:
- deno-version: v2.x
-
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
-
- - uses: actions/download-artifact@v4
- with:
- pattern: macos-${{ matrix.coin }}-*
- path: temp-macos-${{ matrix.coin }}
- merge-multiple: true
-
- - name: Setup release directory
- run: |
- mkdir -p release/${{ matrix.coin }}
- cp -r temp-macos-${{ matrix.coin }}/* release/${{ matrix.coin }}/
-
- - name: Run integration tests
- run: COIN="${{ matrix.coin }}" deno test -A tests/integration.test.ts
- env:
- SECRET_WALLET_PASSWORD: ${{ secrets.SECRET_WALLET_PASSWORD }}
- SECRET_WALLET_MNEMONIC: ${{ secrets.SECRET_WALLET_MNEMONIC }}
- SECRET_WALLET_RESTORE_HEIGHT: ${{ secrets.SECRET_WALLET_RESTORE_HEIGHT }}
-
- comment_pr:
- name: comment on pr
- runs-on: ubuntu-latest
- needs: [lib_mingw, lib_android, lib_linux, lib_macos, lib_ios]
- steps:
- - uses: actions/github-script@v7
- continue-on-error: true
- id: get_issue_number
- with:
- script: |
- if (context.issue.number) {
- // Return issue number if present
- return context.issue.number;
- } else {
- // Otherwise return issue number from commit
- return (
- await github.rest.repos.listPullRequestsAssociatedWithCommit({
- commit_sha: context.sha,
- owner: context.repo.owner,
- repo: context.repo.repo,
- })
- ).data[0].number;
- }
- result-encoding: string
- - name: Find Comment
- continue-on-error: true
- uses: peter-evans/find-comment@v3
- id: fc
- with:
- issue-number: ${{steps.get_issue_number.outputs.result}}
- comment-author: 'github-actions[bot]'
- body-includes: download artifacts
- - name: Update comment
- continue-on-error: true
- if: steps.fc.outcome == 'success'
- uses: peter-evans/create-or-update-comment@v4
- with:
- comment-id: ${{ steps.fc.outputs.comment-id }}
- issue-number: ${{steps.get_issue_number.outputs.result}}
- body: |
- [download artifacts #${{github.run_id}}](https://nightly.link/MrCyjaneK/monero_c/actions/runs/${{github.run_id}})
- edit-mode: replace
- - name: Create comment
- continue-on-error: true
- if: steps.fc.outcome == 'failure'
- uses: peter-evans/create-or-update-comment@v4
- with:
- issue-number: ${{steps.get_issue_number.outputs.result}}
- body: |
- [download artifacts #${{github.run_id}}](https://nightly.link/MrCyjaneK/monero_c/actions/runs/${{github.run_id}}) (this comment will update whenever you push)
diff --git a/.gitignore b/.gitignore
index 7dc5983..706bca7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,12 @@ release/
build/
tests/dependencies
tests/wallets
+.DS_Store
+contrib/depends/*-*-*
+contrib/depends/_
+contrib/depends/_native
+contrib/depends/simplybs
+*_libwallet2_api_c/build
+./monero
+./wownero
+./zano
diff --git a/build_single.sh b/build_single.sh
index 77d5a52..8be1e0b 100755
--- a/build_single.sh
+++ b/build_single.sh
@@ -34,7 +34,7 @@ fi
if [[ ! -d "$repo" ]]
then
echo "no '$repo' directory found. clone with --recursive or run:"
- echo "$ git submodule init && git submodule update --force";
+ echo '$ git submodule init && git submodule update --force';
exit 1
fi
@@ -55,25 +55,28 @@ fi
cd $(dirname $0)
WDIR=$PWD
pushd contrib/depends
- if [[ -d $HOST_ABI ]];
+ sbs_BOOST_VERSION=1_90_0
+ if [[ "x$repo" == "xzano" ]];
then
- echo "Not building depends, directory exists"
- else
- env -i PATH="$PATH" CC=gcc CXX=g++ make "$NPROC" HOST="$HOST_ABI" DEPENDS_UNTRUSTED_FAST_BUILDS=$DEPENDS_UNTRUSTED_FAST_BUILDS
+ sbs_BOOST_VERSION=1_83_0
fi
+ env PATH="$PATH" make "$NPROC" HOST="$HOST_ABI" BOOST_VERSION="${sbs_BOOST_VERSION}"
popd
+# source contrib/depends/_native/_source_me
+source contrib/depends/$HOST_ABI/_source_me
+export PATH="$(pwd)/contrib/depends/_native/bin/:$(pwd)/contrib/depends/$HOST_ABI/native/bin:$PATH"
-buildType=Debug
+buildType=Release
pushd ${repo}_libwallet2_api_c
rm -rf build/${HOST_ABI} || true
- mkdir -p build/${HOST_ABI} -p
+ mkdir -p build/${HOST_ABI}
if [[ "$repo" == "zano" ]];
then
EXTRA_CMAKE_FLAGS="-DCAKEWALLET=ON"
fi
pushd build/${HOST_ABI}
- cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/../../../contrib/depends/${HOST_ABI}/share/toolchain.cmake $EXTRA_CMAKE_FLAGS -DUSE_DEVICE_TREZOR=OFF -DMONERO_FLAVOR=$repo -DCMAKE_BUILD_TYPE=Debug -DHOST_ABI=${HOST_ABI} ../..
+ cmake --trace-expand -DCMAKE_TOOLCHAIN_FILE=$PWD/../../../contrib/depends/${HOST_ABI}/share/toolchain.cmake $EXTRA_CMAKE_FLAGS -DUSE_DEVICE_TREZOR=OFF -DMONERO_FLAVOR=$repo -DCMAKE_BUILD_TYPE=Debug -DHOST_ABI=${HOST_ABI} ../..
make $NPROC
popd
popd
@@ -88,23 +91,11 @@ pushd release/$repo
# cp ../../$repo/build/${HOST_ABI}/external/polyseed/libpolyseed.${APPENDIX} ${HOST_ABI}_libpolyseed.${APPENDIX}
# rm ${HOST_ABI}_libpolyseed.${APPENDIX}.xz || true
# xz -e ${HOST_ABI}_libpolyseed.${APPENDIX}
- elif [[ "${HOST_ABI}" == "x86_64-apple-darwin11" || "${HOST_ABI}" == "aarch64-apple-darwin11" || "${HOST_ABI}" == "host-apple-darwin" || "${HOST_ABI}" == "x86_64-host-apple-darwin" || "${HOST_ABI}" == "aarch64-apple-darwin" || "${HOST_ABI}" == "x86_64-apple-darwin" || "${HOST_ABI}" == "host-apple-ios" || "${HOST_ABI}" == "aarch64-apple-ios" || "${HOST_ABI}" == "aarch64-apple-iossimulator" ]];
+ elif [[ "${HOST_ABI}" == "x86_64-apple-darwin11" || "${HOST_ABI}" == "aarch64-apple-darwin11" || "${HOST_ABI}" == "host-apple-darwin" || "${HOST_ABI}" == "x86_64-host-apple-darwin" || "${HOST_ABI}" == "aarch64-apple-darwin" || "${HOST_ABI}" == "x86_64-apple-darwin" || "${HOST_ABI}" == "host-apple-ios" || "${HOST_ABI}" == "aarch64-apple-ios" || "${HOST_ABI}" == "aarch64-apple-ios-simulator" ]];
then
APPENDIX="${APPENDIX}dylib"
else
APPENDIX="${APPENDIX}so"
fi
- xz -ek ../../${repo}_libwallet2_api_c/build/${HOST_ABI}/libwallet2_api_c.${APPENDIX}
- mv ../../${repo}_libwallet2_api_c/build/${HOST_ABI}/libwallet2_api_c.${APPENDIX}.xz ${HOST_ABI}_libwallet2_api_c.${APPENDIX}.xz
- # Extra libraries
- if [[ "$HOST_ABI" == "x86_64-w64-mingw32" || "$HOST_ABI" == "i686-w64-mingw32" ]];
- then
- cp /usr/${HOST_ABI}/lib/libwinpthread-1.dll ${HOST_ABI}_libwinpthread-1.dll
- rm ${HOST_ABI}_libwinpthread-1.dll.xz || true
- xz -ek ${HOST_ABI}_libwinpthread-1.dll
- ####
- cp /usr/lib/gcc/${HOST_ABI}/*-posix/libssp-0.dll ${HOST_ABI}_libssp-0.dll
- rm ${HOST_ABI}_libssp-0.dll.xz || true
- xz -ek ${HOST_ABI}_libssp-0.dll
- fi
+ mv ../../${repo}_libwallet2_api_c/build/${HOST_ABI}/libwallet2_api_c.${APPENDIX} ${HOST_ABI}_libwallet2_api_c.${APPENDIX}
popd
diff --git a/builder/Dockerfile b/builder/Dockerfile
new file mode 100644
index 0000000..a0b954a
--- /dev/null
+++ b/builder/Dockerfile
@@ -0,0 +1,122 @@
+FROM --platform=linux/amd64 golang:1.26.0-bookworm AS builder_base
+
+WORKDIR /w
+RUN apt update \
+ && apt install -y git clang llvm gcc g++ sudo \
+ && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/* \
+ && useradd -ms /bin/bash user \
+ && adduser user sudo \
+ && chown user:user /w \
+ && chmod 775 /w
+
+USER user
+
+RUN git config --global user.email "monero_c@mrcyjanek.net" \
+ && git config --global user.name "MoneroC CI" \
+ && git config --global --add safe.directory '*'
+
+FROM builder_base AS contrib_simplybs
+COPY contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w \
+ && cd /w/contrib/depends \
+ && make simplybs
+WORKDIR /w/contrib/depends
+
+RUN make HOST=aarch64-linux-android && make HOST=aarch64-linux-android BOOST_VERSION=1_83_0 && make sbs-cleanup
+RUN make HOST=x86_64-linux-android && make HOST=x86_64-linux-android BOOST_VERSION=1_83_0 && make sbs-cleanup
+RUN make HOST=armv7a-linux-androideabi && make HOST=armv7a-linux-androideabi BOOST_VERSION=1_83_0 && make sbs-cleanup
+RUN make HOST=x86_64-w64-mingw32 && make sbs-cleanup
+RUN make HOST=aarch64-linux-gnu && make sbs-cleanup
+RUN make HOST=x86_64-linux-gnu && make sbs-cleanup
+RUN make HOST=x86_64-apple-darwin && make sbs-cleanup
+RUN make HOST=aarch64-apple-darwin && make sbs-cleanup
+RUN make HOST=aarch64-apple-ios && make HOST=aarch64-apple-ios BOOST_VERSION=1_83_0 && make sbs-cleanup
+RUN make HOST=aarch64-apple-ios-simulator && make HOST=aarch64-apple-ios-simulator BOOST_VERSION=1_83_0 && make sbs-cleanup
+
+FROM builder_base AS monero_c_base
+COPY . /w
+RUN sudo chown -R user:user /w
+RUN git submodule update --init --force --recursive \
+ && ./apply_patches.sh monero \
+ && ./apply_patches.sh wownero \
+ && ./apply_patches.sh zano
+
+FROM monero_c_base AS monero_c_aarch64_linux_android
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero aarch64-linux-android -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero aarch64-linux-android -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh zano aarch64-linux-android -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_x86_64_linux_android
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero x86_64-linux-android -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero x86_64-linux-android -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh zano x86_64-linux-android -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_armv7a_linux_androideabi
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero armv7a-linux-androideabi -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero armv7a-linux-androideabi -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh zano armv7a-linux-androideabi -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_aarch64_linux_gnu
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero aarch64-linux-gnu -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero aarch64-linux-gnu -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_x86_64_linux_gnu
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero x86_64-linux-gnu -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero x86_64-linux-gnu -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_x86_64_apple_darwin
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero x86_64-apple-darwin -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero x86_64-apple-darwin -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_aarch64_apple_darwin
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero aarch64-apple-darwin -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero aarch64-apple-darwin -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_aarch64_apple_ios
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero aarch64-apple-ios -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero aarch64-apple-ios -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh zano aarch64-apple-ios -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_aarch64_apple_ios-simulator
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero aarch64-apple-ios-simulator -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero aarch64-apple-ios-simulator -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh zano aarch64-apple-ios-simulator -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+FROM monero_c_base AS monero_c_x86_64-w64-mingw32
+COPY --from=contrib_simplybs /w/contrib/depends /w/contrib/depends
+RUN sudo chown -R user:user /w
+RUN ./build_single.sh monero x86_64-w64-mingw32 -j$(nproc) && cd contrib/depends && make sbs-cleanup
+RUN ./build_single.sh wownero x86_64-w64-mingw32 -j$(nproc) && cd contrib/depends && make sbs-cleanup
+
+
+FROM alpine AS final
+COPY --from=monero_c_aarch64_linux_android /w/release/ release/
+COPY --from=monero_c_x86_64_linux_android /w/release/ release/
+COPY --from=monero_c_armv7a_linux_androideabi /w/release/ release/
+COPY --from=monero_c_aarch64_linux_gnu /w/release/ release/
+COPY --from=monero_c_x86_64_linux_gnu /w/release/ release/
+COPY --from=monero_c_x86_64_apple_darwin /w/release/ release/
+COPY --from=monero_c_aarch64_apple_darwin /w/release/ release/
+COPY --from=monero_c_aarch64_apple_ios /w/release/ release/
+COPY --from=monero_c_aarch64_apple_ios-simulator /w/release/ release/
+COPY --from=monero_c_x86_64-w64-mingw32 /w/release/ release/
diff --git a/builder/release.sh b/builder/release.sh
new file mode 100755
index 0000000..1bf2ebe
--- /dev/null
+++ b/builder/release.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -xe
+
+cd $(dirname $0)
+cd ..
+img=localhost/monero_c:$(git describe --tags)
+
+docker build -t $img -f ./builder/Dockerfile .
+
+docker create --name temp_extract $img /bin/sh -c 'sleep 3000'
+
+docker cp temp_extract:/release ./release/$(git describe --tags)
+docker rm temp_extract || true
diff --git a/contrib/depends/.gitignore b/contrib/depends/.gitignore
deleted file mode 100644
index 3cb4b9a..0000000
--- a/contrib/depends/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-SDKs/
-work/
-built/
-sources/
-config.site
-x86_64*
-i686*
-mips*
-arm*
-aarch64*
diff --git a/contrib/depends/Jenkinsfile b/contrib/depends/Jenkinsfile
deleted file mode 100644
index 3bd5aac..0000000
--- a/contrib/depends/Jenkinsfile
+++ /dev/null
@@ -1,265 +0,0 @@
-pipeline {
- agent none
-
- parameters {
- string(
- name: 'LINUX_TARGETS',
- defaultValue: 'x86_64-linux-gnu,aarch64-linux-gnu,i686-linux-gnu',
- description: 'Comma-separated list of Linux targets to build'
- )
- string(
- name: 'ANDROID_TARGETS',
- defaultValue: 'x86_64-linux-android,armv7a-linux-androideabi,aarch64-linux-android',
- description: 'Comma-separated list of Android targets to build'
- )
- string(
- name: 'MINGW_TARGETS',
- defaultValue: 'x86_64-w64-mingw32,i686-w64-mingw32',
- description: 'Comma-separated list of MinGW targets to build'
- )
- string(
- name: 'DARWIN_TARGETS',
- defaultValue: 'aarch64-apple-darwin,x86_64-apple-darwin,aarch64-apple-ios,aarch64-apple-iossimulator',
- description: 'Comma-separated list of Darwin targets to build'
- )
- }
-
- stages {
- stage('Check Changes') {
- agent any
- steps {
- script {
- def changes = sh(
- script: "git diff --name-only HEAD~1 HEAD | grep '^contrib/depends' || echo 'NO_CHANGES'",
- returnStdout: true
- ).trim()
-
- if (changes == 'NO_CHANGES') {
- echo "No changes detected in contrib/depends directory. Skipping build."
- currentBuild.result = 'NOT_BUILT'
- return
- } else {
- echo "Changes detected in contrib/depends directory:"
- echo changes
- }
- }
- }
- }
-
- stage('Build Dependencies') {
- when {
- not {
- equals expected: 'NOT_BUILT', actual: currentBuild.result
- }
- }
- parallel {
- stage('Linux Builds') {
- agent {
- dockerfile {
- filename '.devcontainer/Dockerfile'
- args '-v /opt/builds:/opt/builds'
- label 'linux && amd64'
- }
- }
- steps {
- script {
- def targets = params.LINUX_TARGETS.split(',').collect { it.trim() }
-
- checkout scm
-
- for (target in targets) {
- echo "Building Linux dependencies for ${target}"
-
- dir('contrib/depends') {
- sh "rm -rf built/${target}/*"
- sh "make HOST=${target} DEPENDS_UNTRUSTED_FAST_BUILDS=yes"
- }
- }
- }
- }
- post {
- always {
- script {
- def targets = params.LINUX_TARGETS.split(',').collect { it.trim() }
- for (target in targets) {
- uploadIfChanged(target)
- }
- }
- }
- }
- }
-
- stage('Android Builds') {
- agent {
- dockerfile {
- filename '.devcontainer/Dockerfile'
- args '-v /opt/builds:/opt/builds'
- label 'linux && amd64'
- }
- }
- steps {
- script {
- def targets = params.ANDROID_TARGETS.split(',').collect { it.trim() }
-
- checkout scm
-
- for (target in targets) {
- echo "Building Android dependencies for ${target}"
-
- dir('contrib/depends') {
- sh "rm -rf built/${target}/*"
- sh "make HOST=${target} DEPENDS_UNTRUSTED_FAST_BUILDS=yes"
- }
- }
- }
- }
- post {
- always {
- script {
- def targets = params.ANDROID_TARGETS.split(',').collect { it.trim() }
- for (target in targets) {
- uploadIfChanged(target)
- }
- }
- }
- }
- }
-
- stage('MinGW Builds') {
- agent {
- dockerfile {
- filename '.devcontainer/Dockerfile'
- args '-v /opt/builds:/opt/builds'
- label 'linux && amd64'
- }
- }
- steps {
- script {
- def targets = params.MINGW_TARGETS.split(',').collect { it.trim() }
-
- checkout scm
-
- for (target in targets) {
- echo "Building MinGW dependencies for ${target}"
-
- dir('contrib/depends') {
- sh "rm -rf built/${target}/*"
- sh "make HOST=${target} DEPENDS_UNTRUSTED_FAST_BUILDS=yes"
- }
- }
- }
- }
- post {
- always {
- script {
- def targets = params.MINGW_TARGETS.split(',').collect { it.trim() }
- for (target in targets) {
- uploadIfChanged(target)
- }
- }
- }
- }
- }
-
- stage('Darwin Builds') {
- agent {
- label 'darwin && arm64'
- }
- steps {
- script {
- def targets = params.DARWIN_TARGETS.split(',').collect { it.trim() }
-
- checkout scm
-
- for (target in targets) {
- echo "Building dependencies for ${target}"
-
- dir('contrib/depends') {
- sh "rm -rf built/${target}/*"
- sh "make HOST=${target} DEPENDS_UNTRUSTED_FAST_BUILDS=yes"
- }
- }
- }
- }
- post {
- always {
- script {
- def targets = params.DARWIN_TARGETS.split(',').collect { it.trim() }
- for (target in targets) {
- uploadIfChanged(target)
- }
- }
- }
- }
- }
- }
- }
- }
-
- post {
- always {
- echo "Build completed."
- }
- }
-}
-
-def uploadIfChanged(target) {
- withCredentials([sshUserPrivateKey(credentialsId: 'static-mrcyjanek-net-ssh-key', keyFileVariable: 'SSH_KEY', usernameVariable: 'SSH_USER')]) {
- sh """
- set -e
- upload_with_checksum() {
- local file_path="\$1"
- local remote_path="\$2"
- local filename=\$(basename "\$file_path")
-
- if [ ! -f "\$file_path" ]; then
- echo "File \$file_path does not exist, skipping..."
- return 0
- fi
-
- local_checksum=\$(sha256sum "\$file_path" | cut -d' ' -f1)
- echo "Local checksum for \$filename: \$local_checksum"
-
- remote_checksum=\$(ssh -i "\$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "\$SSH_USER@static.mrcyjanek.net" "cd \$remote_path && sha256sum \$filename 2>/dev/null | cut -d' ' -f1 || echo 'FILE_NOT_FOUND'")
-
- echo "Remote checksum for \$filename: \$remote_checksum"
-
- if [ "\$local_checksum" != "\$remote_checksum" ]; then
- echo "Checksums differ, uploading \$filename..."
-
- ssh -i "\$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "\$SSH_USER@static.mrcyjanek.net" "mkdir -p \$remote_path"
-
- scp -i "\$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "\$file_path" "\$SSH_USER@static.mrcyjanek.net:\$remote_path/\$filename"
-
- uploaded_checksum=\$(ssh -i "\$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "\$SSH_USER@static.mrcyjanek.net" "cd \$remote_path && sha256sum \$filename | cut -d' ' -f1")
-
- if [ "\$local_checksum" = "\$uploaded_checksum" ]; then
- echo "Upload successful for \$filename"
- else
- echo "Upload verification failed for \$filename"
- exit 1
- fi
- else
- echo "Checksums match, skipping upload for \$filename"
- fi
- }
-
- echo "Processing target: ${target}"
-
- for package_dir in contrib/depends/built/${target}/*/; do
- if [ -d "\$package_dir" ]; then
- package=\$(basename "\$package_dir")
- echo "Processing package: \$package: \$(ls -la "\$package_dir")"
-
- for file in "\$package_dir"/*.tar.gz*; do
- remote_dir_base="/home/mrcyjanek/web/static.mrcyjanek.net/public_html/lfs/depends/contrib/depends/built/${target}/\$package"
- echo "Uploading \$file to \$remote_dir_base"
- upload_with_checksum "\$file" "\$remote_dir_base"
- done
- fi
- done
-
- echo "Finished processing ${target}"
- """
- }
-} \ No newline at end of file
diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile
index 7e9f0f4..9b26205 100644
--- a/contrib/depends/Makefile
+++ b/contrib/depends/Makefile
@@ -1,269 +1,37 @@
-.NOTPARALLEL :
-
-SOURCES_PATH ?= $(BASEDIR)/sources
-BASE_CACHE ?= $(BASEDIR)/built
-FALLBACK_DOWNLOAD_PATH ?= https://static.mrcyjanek.net/download_mirror/
-
-BUILD = $(shell ./config.guess)
-HOST ?= $(BUILD)
-PATCHES_PATH = $(BASEDIR)/patches
-BASEDIR = $(CURDIR)
-HASH_LENGTH:=11
-DOWNLOAD_CONNECT_TIMEOUT:=30
-DOWNLOAD_RETRIES:=5
-HOST_ID_SALT ?= salt
-BUILD_ID_SALT ?= salt
-
-DEPENDS_UNTRUSTED_FAST_BUILDS ?=
-PREBUILT_BASE_URL ?= https://static.mrcyjanek.net/lfs/depends/contrib/depends/built
-ifneq ($(DEPENDS_UNTRUSTED_FAST_BUILDS),)
-ifneq ($(DEPENDS_UNTRUSTED_FAST_BUILDS),yes)
-ifneq ($(DEPENDS_UNTRUSTED_FAST_BUILDS),forced)
-$(error DEPENDS_UNTRUSTED_FAST_BUILDS must be empty, "yes", or "forced", got "$(DEPENDS_UNTRUSTED_FAST_BUILDS)")
-endif
-endif
-endif
-
-# Detect the number of CPU cores
-ifeq ($(shell uname), Darwin)
- NUM_CORES := $(shell sysctl -n hw.ncpu)
-else ifeq ($(shell uname), Linux)
- NUM_CORES := $(shell nproc)
-else
- NUM_CORES := 1 # Default if the OS is not detected
-endif
-
-host:=$(BUILD)
-ifneq ($(HOST),)
-host:=$(HOST)
-host_toolchain:=$(HOST)-
-endif
-
-ifneq ($(DEBUG),)
-release_type=Debug
-else
-release_type=Release
-endif
-
-ifneq ($(TESTS),)
-build_tests=ON
-release_type=Debug
-else
-build_tests=OFF
-endif
-
-base_build_dir=$(BASEDIR)/work/build
-base_staging_dir=$(BASEDIR)/work/staging
-base_download_dir=$(BASEDIR)/work/download
-canonical_host:=$(shell ./config.sub $(HOST))
-build:=$(shell ./config.sub $(BUILD))
-
-build_arch =$(firstword $(subst -, ,$(build)))
-build_vendor=$(word 2,$(subst -, ,$(build)))
-full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build))
-build_os:=$(findstring linux,$(full_build_os))
-build_os+=$(findstring darwin,$(full_build_os))
-build_os:=$(strip $(build_os))
-ifeq ($(build_os),)
-build_os=$(full_build_os)
-endif
-
-host_arch=$(firstword $(subst -, ,$(canonical_host)))
-host_vendor=$(word 2,$(subst -, ,$(canonical_host)))
-full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host))
-host_os:=$(findstring android,$(full_host_os))
-ifeq ($(host_os),)
-host_os:=$(findstring linux,$(full_host_os))
-endif
-host_os+=$(findstring darwin,$(full_host_os))
-host_os+=$(findstring freebsd,$(full_host_os))
-host_os+=$(findstring mingw32,$(full_host_os))
-host_os:=$(strip $(host_os))
-ifeq ($(host_os),)
-host_os=$(full_host_os)
-endif
-
-$(host_arch)_$(host_os)_prefix=$(BASEDIR)/$(host)
-$(host_arch)_$(host_os)_host=$(host)
-host_prefix=$($(host_arch)_$(host_os)_prefix)
-build_prefix=$(host_prefix)/native
-ifeq ($(host_os),mingw32)
-host_cmake=Windows
-endif
-ifeq ($(host_os),linux)
-host_cmake=Linux
-endif
-ifeq ($(host_os),freebsd)
-host_cmake=FreeBSD
-endif
-ifeq ($(host_os),darwin)
-host_cmake=Darwin
-endif
-ifeq ($(host_os),ios)
-host_cmake=iOS
-endif
-ifeq ($(host_os),iossimulator)
-host_cmake=iOS
-endif
-ifeq ($(host_os),android)
-host_cmake=Android
-endif
-
-AT_$(V):=
-AT_:=@
-AT:=$(AT_$(V))
-
-all: install
-
-include hosts/$(host_os).mk
-include hosts/default.mk
-include builders/$(build_os).mk
-include builders/default.mk
-include packages/packages.mk
-
-# Legacy build ID strings (kept for debugging info)
-build_id_string_legacy:=$(BUILD_ID_SALT)
-build_id_string_legacy+=$(shell $(build_CC) --version 2>/dev/null)
-build_id_string_legacy+=$(shell $(build_AR) --version 2>/dev/null)
-build_id_string_legacy+=$(shell $(build_CXX) --version 2>/dev/null)
-build_id_string_legacy+=$(shell $(build_RANLIB) --version 2>/dev/null)
-build_id_string_legacy+=$(shell $(build_STRIP) --version 2>/dev/null)
-
-$(host_arch)_$(host_os)_id_string_legacy:=$(HOST_ID_SALT)
-$(host_arch)_$(host_os)_id_string_legacy+=$(shell $(host_CC) --version 2>/dev/null)
-$(host_arch)_$(host_os)_id_string_legacy+=$(shell $(host_AR) --version 2>/dev/null)
-$(host_arch)_$(host_os)_id_string_legacy+=$(shell $(host_CXX) --version 2>/dev/null)
-$(host_arch)_$(host_os)_id_string_legacy+=$(shell $(host_RANLIB) --version 2>/dev/null)
-$(host_arch)_$(host_os)_id_string_legacy+=$(shell $(host_STRIP) --version 2>/dev/null)
-
-build_id_string:=$(BUILD_ID_SALT)
-build_id_string+=$(shell basename $(build_CC) 2>/dev/null || echo "unknown")
-build_id_string+=$(shell basename $(build_AR) 2>/dev/null || echo "unknown")
-build_id_string+=$(shell basename $(build_CXX) 2>/dev/null || echo "unknown")
-build_id_string+=$(shell basename $(build_RANLIB) 2>/dev/null || echo "unknown")
-build_id_string+=$(shell basename $(build_STRIP) 2>/dev/null || echo "unknown")
-
-$(host_arch)_$(host_os)_id_string:=$(HOST_ID_SALT)
-$(host_arch)_$(host_os)_id_string+=$(shell basename $(host_CC) 2>/dev/null || echo "unknown")
-$(host_arch)_$(host_os)_id_string+=$(shell basename $(host_AR) 2>/dev/null || echo "unknown")
-$(host_arch)_$(host_os)_id_string+=$(shell basename $(host_CXX) 2>/dev/null || echo "unknown")
-$(host_arch)_$(host_os)_id_string+=$(shell basename $(host_RANLIB) 2>/dev/null || echo "unknown")
-$(host_arch)_$(host_os)_id_string+=$(shell basename $(host_STRIP) 2>/dev/null || echo "unknown")
-
-packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages)
-native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
-
-all_packages = $(packages) $(native_packages)
-
-meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
-
-$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
-
-include funcs.mk
-
-CONF_PKGS := cmake-conf mxe-conf
-
-build-only-$(1)_$(3): CMAKE_RUNRESULT_FILE = $(PREFIX)/share/cmake/modules/TryRunResults.cmake
-build-only-$(1)_$(3): CMAKE_TOOLCHAIN_FILE = $(PREFIX)/$(3)/share/cmake/mxe-conf.cmake
-build-only-$(1)_$(3): CMAKE_TOOLCHAIN_DIR = $(PREFIX)/$(3)/share/cmake/mxe-conf.d
-build-only-$(1)_$(3): CMAKE_STATIC_BOOL = $(if $(findstring shared,$(3)),OFF,ON)
-build-only-$(1)_$(3): CMAKE_SHARED_BOOL = $(if $(findstring shared,$(3)),ON,OFF)
-
-
-toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
-final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
-final_build_id_long+=$(shell $(build_SHA256SUM) toolchain.cmake.in)
-final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
-$(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
- $(AT)rm -rf $(@D)
- $(AT)mkdir -p $(@D)
- $(AT)echo copying packages: $^
- $(AT)echo to: $(@D)
- $(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); )
- $(AT)touch $@
-
-$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
- $(AT)@mkdir -p $(@D)
- $(AT)sed -e 's|@HOST@|$(host)|' \
- -e 's|@CC@|$(toolchain_path)$(host_CC)|' \
- -e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
- -e 's|@AR@|$(toolchain_path)$(host_AR)|' \
- -e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
- -e 's|@NM@|$(toolchain_path)$(host_NM)|' \
- -e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
- -e 's|@build_os@|$(build_os)|' \
- -e 's|@host_os@|$(host_os)|' \
- -e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
- -e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
- -e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
- -e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
- -e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
- -e 's|@debug@|$(DEBUG)|' \
- $< > $@
- $(AT)touch $@
-
-$(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id)
- $(AT)@mkdir -p $(@D)
- $(AT)sed -e 's|@HOST@|$(host)|' \
- -e 's|@CC@|$(toolchain_path)$(host_CC)|' \
- -e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
- -e 's|@AR@|$(toolchain_path)$(host_AR)|' \
- -e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
- -e 's|@NM@|$(toolchain_path)$(host_NM)|' \
- -e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
- -e 's|@build_os@|$(build_os)|' \
- -e 's|@host_os@|$(host_os)|' \
- -e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
- -e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
- -e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
- -e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
- -e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
- -e 's|@debug@|$(DEBUG)|' \
- -e 's|@release_type@|$(release_type)|' \
- -e 's|@build_tests@|$(build_tests)|' \
- -e 's|@depends@|$(host_cmake)|' \
- -e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
- -e 's|@arch@|$(host_arch)|'\
- $< > $@
- $(AT)touch $@
-
-define check_or_remove_cached
- mkdir -p $(BASE_CACHE)/$(host)/$(package) && cd $(BASE_CACHE)/$(host)/$(package); \
- $(build_SHA256SUM) -c $($(package)_cached_checksum) >/dev/null 2>/dev/null || \
- ( rm -f $($(package)_cached_checksum) $($(package)_cached_buildinfo); \
- if test -f "$($(package)_cached)"; then echo "Checksum mismatch for $(package). Forcing rebuild.."; rm -f $($(package)_cached_checksum) $($(package)_cached) $($(package)_cached_buildinfo); fi )
-endef
-
-define check_or_remove_sources
- mkdir -p $($(package)_source_dir); cd $($(package)_source_dir); \
- test -f $($(package)_fetched) && ( $(build_SHA256SUM) -c $($(package)_fetched) >/dev/null 2>/dev/null || \
- ( echo "Checksum missing or mismatched for $(package) source. Forcing re-download."; \
- rm -f $($(package)_all_sources) $($(1)_fetched))) || true
-endef
-
-check-packages:
- @$(foreach package,$(all_packages),$(call check_or_remove_cached,$(package));)
-check-sources:
- @$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));)
-
-$(host_prefix)/share/config.site: check-packages
-$(host_prefix)/share/toolchain.cmake: check-packages
-
-check-packages: check-sources
-
-install: $(host_prefix)/share/config.site check-packages
-install: $(host_prefix)/share/toolchain.cmake check-packages
-
-download-one: check-sources $(all_sources)
-
-download-osx:
- @$(MAKE) -s HOST=x86_64-apple-darwin11 download-one
-download-linux:
- @$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one
-download-win:
- @$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
-download: download-osx download-linux download-win
-
- $(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package))))
-
-.PHONY: install cached download-one download-osx download-linux download-win download check-packages check-sources
+.NOTPARALLEL:
+
+HOST ?=
+
+BOOST_VERSION ?= 1_90_0
+PACKAGES = native/cmake,native/python@3.14,native/git,native/_,native/make,native/cmake-toolchain,icu4c,boost@$(BOOST_VERSION),zeromq,unbound,sodium,openssl,libiconv,zlib
+SIMPLYBS_HASH = a37442738bc26fbe4e526f48694746b2efed2c2b
+
+all: simplybs $(if $(HOST),sbs-build-$(HOST),)
+ @if [ -z "$(HOST)" ]; then \
+ echo "ERROR: HOST is not set"; \
+ exit 1; \
+ fi
+
+.PHONY: simplybs sbs-build-% sbs-cleanup
+
+sbs-cleanup:
+ @rm -rf simplybs/_
+ @rm -rf simplybs/_native
+ @rm -rf _native
+ @rm -rf *-*-*
+ @rm -rf simplybs/.buildlib/*_*/work
+ @rm -rf simplybs/.buildlib/*_*/staging
+ @rm -rf simplybs/.buildlib/source
+
+simplybs:
+ git clone https://github.com/mrcyjanek/simplybs || true
+ cd simplybs && git fetch -a
+ cd simplybs && git checkout $(SIMPLYBS_HASH) --force
+ cd simplybs && git reset --hard
+
+sbs-build-%:
+ # cd simplybs && env SIMPLYBS_ENV_NATIVE_DIR=$(PWD)/_native SIMPLYBS_ENV_DIR=$(PWD)/$* go run . -cleanup
+ cd simplybs && env SIMPLYBS_NATIVE_ENV_DIR=$(PWD)/_native SIMPLYBS_ENV_DIR=$(PWD)/$* go run . -host $* -package $(PACKAGES) -build
+ cd simplybs && rm -rf $(PWD)/$*
+ cd simplybs && env SIMPLYBS_NATIVE_ENV_DIR=$(PWD)/_native SIMPLYBS_ENV_DIR=$(PWD)/$* go run . -host $* -package $(PACKAGES) -extract
+ env HOST=$* ./gen_toolchain.cmake.sh $*/share/toolchain.cmake
diff --git a/contrib/depends/README.md b/contrib/depends/README.md
deleted file mode 100644
index 1aa5b27..0000000
--- a/contrib/depends/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-### Usage
-
-To build dependencies for the current arch+OS:
-
-```bash
-make
-```
-
-To build for another arch/OS:
-
-```bash
-make HOST=host-platform-triplet
-```
-
-For example:
-
-```bash
-make HOST=x86_64-w64-mingw32 -j4
-```
-
-A toolchain will be generated that's suitable for plugging into Monero's
-cmake. In the above example, a dir named x86_64-w64-mingw32 will be
-created. To use it for Monero:
-
-```bash
-cmake -DCMAKE_TOOLCHAIN=`pwd`/contrib/depends/x86_64-w64-mingw32
-```
-
-Common `host-platform-triplets` for cross compilation are:
-
-- `i686-w64-mingw32` for Win32
-- `x86_64-w64-mingw32` for Win64
-- `x86_64-apple-darwin11` for MacOSX x86_64
-- `arm-linux-gnueabihf` for Linux ARM 32 bit
-- `aarch64-linux-gnu` for Linux ARM 64 bit
-- `riscv64-linux-gnu` for Linux RISCV 64 bit
-
-No other options are needed, the paths are automatically configured.
-
-Dependency Options:
-The following can be set when running make: make FOO=bar
-
-```
-SOURCES_PATH: downloaded sources will be placed here
-BASE_CACHE: built packages will be placed here
-FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
-DEBUG: disable some optimizations and enable more runtime checking
-HOST_ID_SALT: Optional salt to use when generating host package ids
-BUILD_ID_SALT: Optional salt to use when generating build package ids
-```
-
-Additional targets:
-
-```
-download: run 'make download' to fetch all sources without building them
-download-osx: run 'make download-osx' to fetch all sources needed for osx builds
-download-win: run 'make download-win' to fetch all sources needed for win builds
-download-linux: run 'make download-linux' to fetch all sources needed for linux builds
-```
-
-#Mingw builds
-
-Building for 32/64bit mingw requires switching alternatives to a posix mode
-
-```bash
-update-alternatives --set x86_64-w64-mingw32-g++ x86_64-w64-mingw32-g++-posix
-update-alternatives --set x86_64-w64-mingw32-gcc x86_64-w64-mingw32-gcc-posix
-```
-
-### Other documentation
-
-- [description.md](description.md): General description of the depends system
-- [packages.md](packages.md): Steps for adding packages
-
diff --git a/contrib/depends/builders/darwin.mk b/contrib/depends/builders/darwin.mk
deleted file mode 100644
index bbc0475..0000000
--- a/contrib/depends/builders/darwin.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-build_darwin_CC: = $(shell xcrun -f clang)
-build_darwin_CXX: = $(shell xcrun -f clang++)
-build_darwin_AR: = $(shell xcrun -f ar)
-build_darwin_RANLIB: = $(shell xcrun -f ranlib)
-build_darwin_STRIP: = $(shell xcrun -f strip)
-build_darwin_OTOOL: = $(shell xcrun -f otool)
-build_darwin_NM: = $(shell xcrun -f nm)
-build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
-build_darwin_SHA256SUM = shasum -a 256
-build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
-
-#darwin host on darwin builder. overrides darwin host preferences.
-
-darwin_CC=$(shell xcrun -f clang) -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(shell xcrun --sdk macosx --show-sdk-path) -I$(shell xcrun --sdk macosx --show-sdk-path)/usr/include -I$(host_prefix)/include
-darwin_CXX:=$(shell xcrun -f clang++) -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ --sysroot $(shell xcrun --sdk macosx --show-sdk-path) -I$(shell xcrun --sdk macosx --show-sdk-path)/usr/include -I$(host_prefix)/include
-darwin_AR:=$(shell xcrun -f ar)
-darwin_RANLIB:=$(shell xcrun -f ranlib)
-darwin_STRIP:=$(shell xcrun -f strip)
-darwin_LIBTOOL:=$(shell xcrun -f libtool)
-darwin_OTOOL:=$(shell xcrun -f otool)
-darwin_NM:=$(shell xcrun -f nm)
-darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
-darwin_native_toolchain=
diff --git a/contrib/depends/builders/default.mk b/contrib/depends/builders/default.mk
deleted file mode 100644
index 59a887f..0000000
--- a/contrib/depends/builders/default.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-default_build_CC = gcc
-default_build_CXX = g++
-default_build_AR = ar
-default_build_RANLIB = ranlib
-default_build_STRIP = strip
-default_build_NM = nm
-default_build_OTOOL = otool
-default_build_INSTALL_NAME_TOOL = install_name_tool
-
-
-define add_build_tool_func
-build_$(build_os)_$1 ?= $$(default_build_$1)
-build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)
-build_$1=$$(build_$(build_arch)_$(build_os)_$1)
-endef
-$(foreach var,CC CXX AR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var))))
-define add_build_flags_func
-build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1)
-build_$1=$$(build_$(build_arch)_$(build_os)_$1)
-endef
-$(foreach flags, CFLAGS CXXFLAGS ARFLAGS LDFLAGS, $(eval $(call add_build_flags_func,$(flags))))
diff --git a/contrib/depends/builders/linux.mk b/contrib/depends/builders/linux.mk
deleted file mode 100644
index b03f424..0000000
--- a/contrib/depends/builders/linux.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-build_linux_SHA256SUM = sha256sum
-build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
diff --git a/contrib/depends/config.guess b/contrib/depends/config.guess
deleted file mode 100755
index 48a6846..0000000
--- a/contrib/depends/config.guess
+++ /dev/null
@@ -1,1815 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright 1992-2024 Free Software Foundation, Inc.
-
-# shellcheck disable=SC2006,SC2268 # see below for rationale
-
-timestamp='2024-07-27'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <https://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
-#
-# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
-#
-# Please send patches to <config-patches@gnu.org>.
-
-
-# The "shellcheck disable" line above the timestamp inhibits complaints
-# about features and limitations of the classic Bourne shell that were
-# superseded or lifted in POSIX. However, this script identifies a wide
-# variety of pre-POSIX systems that do not have POSIX shells at all, and
-# even some reasonably current systems (Solaris 10 as case-in-point) still
-# have a pre-POSIX /bin/sh.
-
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system '$me' is run on.
-
-Options:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright 1992-2024 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try '$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-# Just in case it came from the environment.
-GUESS=
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
-# use 'HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-tmp=
-# shellcheck disable=SC2172
-trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
-
-set_cc_for_build() {
- # prevent multiple calls if $tmp is already set
- test "$tmp" && return 0
- : "${TMPDIR=/tmp}"
- # shellcheck disable=SC2039,SC3028
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
- dummy=$tmp/dummy
- case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
- ,,) echo "int x;" > "$dummy.c"
- for driver in cc gcc c17 c99 c89 ; do
- if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
- CC_FOR_BUILD=$driver
- break
- fi
- done
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
- esac
-}
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if test -f /.attbin/uname ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-case $UNAME_SYSTEM in
-Linux|GNU|GNU/*)
- LIBC=unknown
-
- set_cc_for_build
- cat <<-EOF > "$dummy.c"
- #if defined(__ANDROID__)
- LIBC=android
- #else
- #include <features.h>
- #if defined(__UCLIBC__)
- LIBC=uclibc
- #elif defined(__dietlibc__)
- LIBC=dietlibc
- #elif defined(__GLIBC__)
- LIBC=gnu
- #elif defined(__LLVM_LIBC__)
- LIBC=llvm
- #else
- #include <stdarg.h>
- /* First heuristic to detect musl libc. */
- #ifdef __DEFINED_va_list
- LIBC=musl
- #endif
- #endif
- #endif
- EOF
- cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
- eval "$cc_set_libc"
-
- # Second heuristic to detect musl libc.
- if [ "$LIBC" = unknown ] &&
- command -v ldd >/dev/null &&
- ldd --version 2>&1 | grep -q ^musl; then
- LIBC=musl
- fi
-
- # If the system lacks a compiler, then just pick glibc.
- # We could probably try harder.
- if [ "$LIBC" = unknown ]; then
- LIBC=gnu
- fi
- ;;
-esac
-
-# Note: order is significant - the case branches are not exclusive.
-
-case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
- /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
- echo unknown)`
- case $UNAME_MACHINE_ARCH in
- aarch64eb) machine=aarch64_be-unknown ;;
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- earmv*)
- arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine=${arch}${endian}-unknown
- ;;
- *) machine=$UNAME_MACHINE_ARCH-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently (or will in the future) and ABI.
- case $UNAME_MACHINE_ARCH in
- earm*)
- os=netbsdelf
- ;;
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # Determine ABI tags.
- case $UNAME_MACHINE_ARCH in
- earm*)
- expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case $UNAME_VERSION in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- GUESS=$machine-${os}${release}${abi-}
- ;;
- *:Bitrig:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
- ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
- ;;
- *:SecBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
- GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
- ;;
- *:LibertyBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
- GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
- ;;
- *:MidnightBSD:*:*)
- GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
- ;;
- *:ekkoBSD:*:*)
- GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
- ;;
- *:SolidBSD:*:*)
- GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
- ;;
- *:OS108:*:*)
- GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
- ;;
- macppc:MirBSD:*:*)
- GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
- ;;
- *:MirBSD:*:*)
- GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
- ;;
- *:Sortix:*:*)
- GUESS=$UNAME_MACHINE-unknown-sortix
- ;;
- *:Twizzler:*:*)
- GUESS=$UNAME_MACHINE-unknown-twizzler
- ;;
- *:Redox:*:*)
- GUESS=$UNAME_MACHINE-unknown-redox
- ;;
- mips:OSF1:*.*)
- GUESS=mips-dec-osf1
- ;;
- alpha:OSF1:*:*)
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- trap '' 0
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case $ALPHA_CPU_TYPE in
- "EV4 (21064)")
- UNAME_MACHINE=alpha ;;
- "EV4.5 (21064)")
- UNAME_MACHINE=alpha ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE=alpha ;;
- "EV5 (21164)")
- UNAME_MACHINE=alphaev5 ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE=alphaev56 ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE=alphapca56 ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE=alphapca57 ;;
- "EV6 (21264)")
- UNAME_MACHINE=alphaev6 ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE=alphaev67 ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE=alphaev68 ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE=alphaev68 ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE=alphaev68 ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE=alphaev69 ;;
- "EV7 (21364)")
- UNAME_MACHINE=alphaev7 ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE=alphaev79 ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
- GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
- ;;
- Amiga*:UNIX_System_V:4.0:*)
- GUESS=m68k-unknown-sysv4
- ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- GUESS=$UNAME_MACHINE-unknown-amigaos
- ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- GUESS=$UNAME_MACHINE-unknown-morphos
- ;;
- *:OS/390:*:*)
- GUESS=i370-ibm-openedition
- ;;
- *:z/VM:*:*)
- GUESS=s390-ibm-zvmoe
- ;;
- *:OS400:*:*)
- GUESS=powerpc-ibm-os400
- ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- GUESS=arm-acorn-riscix$UNAME_RELEASE
- ;;
- arm*:riscos:*:*|arm*:RISCOS:*:*)
- GUESS=arm-unknown-riscos
- ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- GUESS=hppa1.1-hitachi-hiuxmpp
- ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- case `(/bin/universe) 2>/dev/null` in
- att) GUESS=pyramid-pyramid-sysv3 ;;
- *) GUESS=pyramid-pyramid-bsd ;;
- esac
- ;;
- NILE*:*:*:dcosx)
- GUESS=pyramid-pyramid-svr4
- ;;
- DRS?6000:unix:4.0:6*)
- GUESS=sparc-icl-nx6
- ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) GUESS=sparc-icl-nx7 ;;
- esac
- ;;
- s390x:SunOS:*:*)
- SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
- GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
- ;;
- sun4H:SunOS:5.*:*)
- SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
- GUESS=sparc-hal-solaris2$SUN_REL
- ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
- GUESS=sparc-sun-solaris2$SUN_REL
- ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- GUESS=i386-pc-auroraux$UNAME_RELEASE
- ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- set_cc_for_build
- SUN_ARCH=i386
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if test "$CC_FOR_BUILD" != no_compiler_found; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH=x86_64
- fi
- fi
- SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
- GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
- ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
- GUESS=sparc-sun-solaris3$SUN_REL
- ;;
- sun4*:SunOS:*:*)
- case `/usr/bin/arch -k` in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like '4.1.3-JL'.
- SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
- GUESS=sparc-sun-sunos$SUN_REL
- ;;
- sun3*:SunOS:*:*)
- GUESS=m68k-sun-sunos$UNAME_RELEASE
- ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
- case `/bin/arch` in
- sun3)
- GUESS=m68k-sun-sunos$UNAME_RELEASE
- ;;
- sun4)
- GUESS=sparc-sun-sunos$UNAME_RELEASE
- ;;
- esac
- ;;
- aushp:SunOS:*:*)
- GUESS=sparc-auspex-sunos$UNAME_RELEASE
- ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- GUESS=m68k-atari-mint$UNAME_RELEASE
- ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- GUESS=m68k-atari-mint$UNAME_RELEASE
- ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- GUESS=m68k-atari-mint$UNAME_RELEASE
- ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- GUESS=m68k-milan-mint$UNAME_RELEASE
- ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- GUESS=m68k-hades-mint$UNAME_RELEASE
- ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- GUESS=m68k-unknown-mint$UNAME_RELEASE
- ;;
- m68k:machten:*:*)
- GUESS=m68k-apple-machten$UNAME_RELEASE
- ;;
- powerpc:machten:*:*)
- GUESS=powerpc-apple-machten$UNAME_RELEASE
- ;;
- RISC*:Mach:*:*)
- GUESS=mips-dec-mach_bsd4.3
- ;;
- RISC*:ULTRIX:*:*)
- GUESS=mips-dec-ultrix$UNAME_RELEASE
- ;;
- VAX*:ULTRIX*:*:*)
- GUESS=vax-dec-ultrix$UNAME_RELEASE
- ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- GUESS=clipper-intergraph-clix$UNAME_RELEASE
- ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- set_cc_for_build
- sed 's/^ //' << EOF > "$dummy.c"
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
- dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
- { echo "$SYSTEM_NAME"; exit; }
- GUESS=mips-mips-riscos$UNAME_RELEASE
- ;;
- Motorola:PowerMAX_OS:*:*)
- GUESS=powerpc-motorola-powermax
- ;;
- Motorola:*:4.3:PL8-*)
- GUESS=powerpc-harris-powermax
- ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- GUESS=powerpc-harris-powermax
- ;;
- Night_Hawk:Power_UNIX:*:*)
- GUESS=powerpc-harris-powerunix
- ;;
- m88k:CX/UX:7*:*)
- GUESS=m88k-harris-cxux7
- ;;
- m88k:*:4*:R4*)
- GUESS=m88k-motorola-sysv4
- ;;
- m88k:*:3*:R3*)
- GUESS=m88k-motorola-sysv3
- ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
- then
- if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
- test "$TARGET_BINARY_INTERFACE"x = x
- then
- GUESS=m88k-dg-dgux$UNAME_RELEASE
- else
- GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
- fi
- else
- GUESS=i586-dg-dgux$UNAME_RELEASE
- fi
- ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- GUESS=m88k-dolphin-sysv3
- ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- GUESS=m88k-motorola-sysv3
- ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- GUESS=m88k-tektronix-sysv3
- ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- GUESS=m68k-tektronix-bsd
- ;;
- *:IRIX*:*:*)
- IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
- GUESS=mips-sgi-irix$IRIX_REL
- ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- GUESS=i386-ibm-aix
- ;;
- ia64:AIX:*:*)
- if test -x /usr/bin/oslevel ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
- fi
- GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
- ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- set_cc_for_build
- sed 's/^ //' << EOF > "$dummy.c"
- #include <sys/systemcfg.h>
-
- int
- main ()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
- then
- GUESS=$SYSTEM_NAME
- else
- GUESS=rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- GUESS=rs6000-ibm-aix3.2.4
- else
- GUESS=rs6000-ibm-aix3.2
- fi
- ;;
- *:AIX:*:[4567])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if test -x /usr/bin/lslpp ; then
- IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
- awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
- else
- IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
- fi
- GUESS=$IBM_ARCH-ibm-aix$IBM_REV
- ;;
- *:AIX:*:*)
- GUESS=rs6000-ibm-aix
- ;;
- ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
- GUESS=romp-ibm-bsd4.4
- ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
- ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- GUESS=rs6000-bull-bosx
- ;;
- DPX/2?00:B.O.S.:*:*)
- GUESS=m68k-bull-sysv3
- ;;
- 9000/[34]??:4.3bsd:1.*:*)
- GUESS=m68k-hp-bsd
- ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- GUESS=m68k-hp-bsd4.4
- ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
- case $UNAME_MACHINE in
- 9000/31?) HP_ARCH=m68000 ;;
- 9000/[34]??) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if test -x /usr/bin/getconf; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case $sc_cpu_version in
- 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
- 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case $sc_kernel_bits in
- 32) HP_ARCH=hppa2.0n ;;
- 64) HP_ARCH=hppa2.0w ;;
- '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if test "$HP_ARCH" = ""; then
- set_cc_for_build
- sed 's/^ //' << EOF > "$dummy.c"
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int
- main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if test "$HP_ARCH" = hppa2.0w
- then
- set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH=hppa2.0w
- else
- HP_ARCH=hppa64
- fi
- fi
- GUESS=$HP_ARCH-hp-hpux$HPUX_REV
- ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
- GUESS=ia64-hp-hpux$HPUX_REV
- ;;
- 3050*:HI-UX:*:*)
- set_cc_for_build
- sed 's/^ //' << EOF > "$dummy.c"
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
- { echo "$SYSTEM_NAME"; exit; }
- GUESS=unknown-hitachi-hiuxwe2
- ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
- GUESS=hppa1.1-hp-bsd
- ;;
- 9000/8??:4.3bsd:*:*)
- GUESS=hppa1.0-hp-bsd
- ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- GUESS=hppa1.0-hp-mpeix
- ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
- GUESS=hppa1.1-hp-osf
- ;;
- hp8??:OSF1:*:*)
- GUESS=hppa1.0-hp-osf
- ;;
- i*86:OSF1:*:*)
- if test -x /usr/sbin/sysversion ; then
- GUESS=$UNAME_MACHINE-unknown-osf1mk
- else
- GUESS=$UNAME_MACHINE-unknown-osf1
- fi
- ;;
- parisc*:Lites*:*:*)
- GUESS=hppa1.1-hp-lites
- ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- GUESS=c1-convex-bsd
- ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- GUESS=c34-convex-bsd
- ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- GUESS=c38-convex-bsd
- ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- GUESS=c4-convex-bsd
- ;;
- CRAY*Y-MP:*:*:*)
- CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
- GUESS=ymp-cray-unicos$CRAY_REL
- ;;
- CRAY*[A-Z]90:*:*:*)
- echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
- GUESS=t90-cray-unicos$CRAY_REL
- ;;
- CRAY*T3E:*:*:*)
- CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
- GUESS=alphaev5-cray-unicosmk$CRAY_REL
- ;;
- CRAY*SV1:*:*:*)
- CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
- GUESS=sv1-cray-unicos$CRAY_REL
- ;;
- *:UNICOS/mp:*:*)
- CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
- GUESS=craynv-cray-unicosmp$CRAY_REL
- ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
- FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
- GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
- ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
- GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
- ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
- ;;
- sparc*:BSD/OS:*:*)
- GUESS=sparc-unknown-bsdi$UNAME_RELEASE
- ;;
- *:BSD/OS:*:*)
- GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
- ;;
- arm:FreeBSD:*:*)
- UNAME_PROCESSOR=`uname -p`
- set_cc_for_build
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
- GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
- else
- FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
- GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
- fi
- ;;
- *:FreeBSD:*:*)
- UNAME_PROCESSOR=`uname -p`
- case $UNAME_PROCESSOR in
- amd64)
- UNAME_PROCESSOR=x86_64 ;;
- i386)
- UNAME_PROCESSOR=i586 ;;
- esac
- FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
- GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
- ;;
- i*:CYGWIN*:*)
- GUESS=$UNAME_MACHINE-pc-cygwin
- ;;
- *:MINGW64*:*)
- GUESS=$UNAME_MACHINE-pc-mingw64
- ;;
- *:MINGW*:*)
- GUESS=$UNAME_MACHINE-pc-mingw32
- ;;
- *:MSYS*:*)
- GUESS=$UNAME_MACHINE-pc-msys
- ;;
- i*:PW*:*)
- GUESS=$UNAME_MACHINE-pc-pw32
- ;;
- *:SerenityOS:*:*)
- GUESS=$UNAME_MACHINE-pc-serenity
- ;;
- *:Interix*:*)
- case $UNAME_MACHINE in
- x86)
- GUESS=i586-pc-interix$UNAME_RELEASE
- ;;
- authenticamd | genuineintel | EM64T)
- GUESS=x86_64-unknown-interix$UNAME_RELEASE
- ;;
- IA64)
- GUESS=ia64-unknown-interix$UNAME_RELEASE
- ;;
- esac ;;
- i*:UWIN*:*)
- GUESS=$UNAME_MACHINE-pc-uwin
- ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- GUESS=x86_64-pc-cygwin
- ;;
- prep*:SunOS:5.*:*)
- SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
- GUESS=powerpcle-unknown-solaris2$SUN_REL
- ;;
- *:GNU:*:*)
- # the GNU system
- GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
- GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
- GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
- ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
- GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
- GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
- ;;
- x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
- GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
- ;;
- *:[Mm]anagarm:*:*)
- GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
- ;;
- *:Minix:*:*)
- GUESS=$UNAME_MACHINE-unknown-minix
- ;;
- aarch64:Linux:*:*)
- set_cc_for_build
- CPU=$UNAME_MACHINE
- LIBCABI=$LIBC
- if test "$CC_FOR_BUILD" != no_compiler_found; then
- ABI=64
- sed 's/^ //' << EOF > "$dummy.c"
- #ifdef __ARM_EABI__
- #ifdef __ARM_PCS_VFP
- ABI=eabihf
- #else
- ABI=eabi
- #endif
- #endif
-EOF
- cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
- eval "$cc_set_abi"
- case $ABI in
- eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
- esac
- fi
- GUESS=$CPU-unknown-linux-$LIBCABI
- ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- arm*:Linux:*:*)
- set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
- else
- GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
- fi
- fi
- ;;
- avr32*:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- cris:Linux:*:*)
- GUESS=$UNAME_MACHINE-axis-linux-$LIBC
- ;;
- crisv32:Linux:*:*)
- GUESS=$UNAME_MACHINE-axis-linux-$LIBC
- ;;
- e2k:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- frv:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- hexagon:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- i*86:Linux:*:*)
- GUESS=$UNAME_MACHINE-pc-linux-$LIBC
- ;;
- ia64:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- k1om:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- kvx:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- kvx:cos:*:*)
- GUESS=$UNAME_MACHINE-unknown-cos
- ;;
- kvx:mbr:*:*)
- GUESS=$UNAME_MACHINE-unknown-mbr
- ;;
- loongarch32:Linux:*:* | loongarch64:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- m32r*:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- m68*:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- set_cc_for_build
- IS_GLIBC=0
- test x"${LIBC}" = xgnu && IS_GLIBC=1
- sed 's/^ //' << EOF > "$dummy.c"
- #undef CPU
- #undef mips
- #undef mipsel
- #undef mips64
- #undef mips64el
- #if ${IS_GLIBC} && defined(_ABI64)
- LIBCABI=gnuabi64
- #else
- #if ${IS_GLIBC} && defined(_ABIN32)
- LIBCABI=gnuabin32
- #else
- LIBCABI=${LIBC}
- #endif
- #endif
-
- #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
- CPU=mipsisa64r6
- #else
- #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
- CPU=mipsisa32r6
- #else
- #if defined(__mips64)
- CPU=mips64
- #else
- CPU=mips
- #endif
- #endif
- #endif
-
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- MIPS_ENDIAN=el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- MIPS_ENDIAN=
- #else
- MIPS_ENDIAN=
- #endif
- #endif
-EOF
- cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
- eval "$cc_set_vars"
- test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
- ;;
- mips64el:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- openrisc*:Linux:*:*)
- GUESS=or1k-unknown-linux-$LIBC
- ;;
- or32:Linux:*:* | or1k*:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- padre:Linux:*:*)
- GUESS=sparc-unknown-linux-$LIBC
- ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- GUESS=hppa64-unknown-linux-$LIBC
- ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
- PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
- *) GUESS=hppa-unknown-linux-$LIBC ;;
- esac
- ;;
- ppc64:Linux:*:*)
- GUESS=powerpc64-unknown-linux-$LIBC
- ;;
- ppc:Linux:*:*)
- GUESS=powerpc-unknown-linux-$LIBC
- ;;
- ppc64le:Linux:*:*)
- GUESS=powerpc64le-unknown-linux-$LIBC
- ;;
- ppcle:Linux:*:*)
- GUESS=powerpcle-unknown-linux-$LIBC
- ;;
- riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
- ;;
- sh64*:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- sh*:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- tile*:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- vax:Linux:*:*)
- GUESS=$UNAME_MACHINE-dec-linux-$LIBC
- ;;
- x86_64:Linux:*:*)
- set_cc_for_build
- CPU=$UNAME_MACHINE
- LIBCABI=$LIBC
- if test "$CC_FOR_BUILD" != no_compiler_found; then
- ABI=64
- sed 's/^ //' << EOF > "$dummy.c"
- #ifdef __i386__
- ABI=x86
- #else
- #ifdef __ILP32__
- ABI=x32
- #endif
- #endif
-EOF
- cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
- eval "$cc_set_abi"
- case $ABI in
- x86) CPU=i686 ;;
- x32) LIBCABI=${LIBC}x32 ;;
- esac
- fi
- GUESS=$CPU-pc-linux-$LIBCABI
- ;;
- xtensa*:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- GUESS=i386-sequent-sysv4
- ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
- ;;
- i*86:OS/2:*:*)
- # If we were able to find 'uname', then EMX Unix compatibility
- # is probably installed.
- GUESS=$UNAME_MACHINE-pc-os2-emx
- ;;
- i*86:XTS-300:*:STOP)
- GUESS=$UNAME_MACHINE-unknown-stop
- ;;
- i*86:atheos:*:*)
- GUESS=$UNAME_MACHINE-unknown-atheos
- ;;
- i*86:syllable:*:*)
- GUESS=$UNAME_MACHINE-pc-syllable
- ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- GUESS=i386-unknown-lynxos$UNAME_RELEASE
- ;;
- i*86:*DOS:*:*)
- GUESS=$UNAME_MACHINE-pc-msdosdjgpp
- ;;
- i*86:*:4.*:*)
- UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
- else
- GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
- fi
- ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
- else
- GUESS=$UNAME_MACHINE-pc-sysv32
- fi
- ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configure will decide that
- # this is a cross-build.
- GUESS=i586-pc-msdosdjgpp
- ;;
- Intel:Mach:3*:*)
- GUESS=i386-pc-mach3
- ;;
- paragon:*:*:*)
- GUESS=i860-intel-osf1
- ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
- fi
- ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- GUESS=m68010-convergent-sysv
- ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- GUESS=m68k-convergent-sysv
- ;;
- M680?0:D-NIX:5.3:*)
- GUESS=m68k-diab-dnix
- ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- GUESS=m68k-unknown-lynxos$UNAME_RELEASE
- ;;
- mc68030:UNIX_System_V:4.*:*)
- GUESS=m68k-atari-sysv4
- ;;
- TSUNAMI:LynxOS:2.*:*)
- GUESS=sparc-unknown-lynxos$UNAME_RELEASE
- ;;
- rs6000:LynxOS:2.*:*)
- GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
- ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
- ;;
- SM[BE]S:UNIX_SV:*:*)
- GUESS=mips-dde-sysv$UNAME_RELEASE
- ;;
- RM*:ReliantUNIX-*:*:*)
- GUESS=mips-sni-sysv4
- ;;
- RM*:SINIX-*:*:*)
- GUESS=mips-sni-sysv4
- ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- GUESS=$UNAME_MACHINE-sni-sysv4
- else
- GUESS=ns32k-sni-sysv
- fi
- ;;
- PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- GUESS=i586-unisys-sysv4
- ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- GUESS=hppa1.1-stratus-sysv4
- ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- GUESS=i860-stratus-sysv4
- ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- GUESS=$UNAME_MACHINE-stratus-vos
- ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- GUESS=hppa1.1-stratus-vos
- ;;
- mc68*:A/UX:*:*)
- GUESS=m68k-apple-aux$UNAME_RELEASE
- ;;
- news*:NEWS-OS:6*:*)
- GUESS=mips-sony-newsos6
- ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if test -d /usr/nec; then
- GUESS=mips-nec-sysv$UNAME_RELEASE
- else
- GUESS=mips-unknown-sysv$UNAME_RELEASE
- fi
- ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- GUESS=powerpc-be-beos
- ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- GUESS=powerpc-apple-beos
- ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- GUESS=i586-pc-beos
- ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- GUESS=i586-pc-haiku
- ;;
- ppc:Haiku:*:*) # Haiku running on Apple PowerPC
- GUESS=powerpc-apple-haiku
- ;;
- *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
- GUESS=$UNAME_MACHINE-unknown-haiku
- ;;
- SX-4:SUPER-UX:*:*)
- GUESS=sx4-nec-superux$UNAME_RELEASE
- ;;
- SX-5:SUPER-UX:*:*)
- GUESS=sx5-nec-superux$UNAME_RELEASE
- ;;
- SX-6:SUPER-UX:*:*)
- GUESS=sx6-nec-superux$UNAME_RELEASE
- ;;
- SX-7:SUPER-UX:*:*)
- GUESS=sx7-nec-superux$UNAME_RELEASE
- ;;
- SX-8:SUPER-UX:*:*)
- GUESS=sx8-nec-superux$UNAME_RELEASE
- ;;
- SX-8R:SUPER-UX:*:*)
- GUESS=sx8r-nec-superux$UNAME_RELEASE
- ;;
- SX-ACE:SUPER-UX:*:*)
- GUESS=sxace-nec-superux$UNAME_RELEASE
- ;;
- Power*:Rhapsody:*:*)
- GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
- ;;
- *:Rhapsody:*:*)
- GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
- ;;
- arm64:Darwin:*:*)
- GUESS=aarch64-apple-darwin$UNAME_RELEASE
- ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p`
- case $UNAME_PROCESSOR in
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- if command -v xcode-select > /dev/null 2> /dev/null && \
- ! xcode-select --print-path > /dev/null 2> /dev/null ; then
- # Avoid executing cc if there is no toolchain installed as
- # cc will be a stub that puts up a graphical alert
- # prompting the user to install developer tools.
- CC_FOR_BUILD=no_compiler_found
- else
- set_cc_for_build
- fi
- if test "$CC_FOR_BUILD" != no_compiler_found; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
- fi
- # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
- if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_PPC >/dev/null
- then
- UNAME_PROCESSOR=powerpc
- fi
- elif test "$UNAME_PROCESSOR" = i386 ; then
- # uname -m returns i386 or x86_64
- UNAME_PROCESSOR=$UNAME_MACHINE
- fi
- GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
- ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = x86; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
- ;;
- *:QNX:*:4*)
- GUESS=i386-pc-qnx
- ;;
- NEO-*:NONSTOP_KERNEL:*:*)
- GUESS=neo-tandem-nsk$UNAME_RELEASE
- ;;
- NSE-*:NONSTOP_KERNEL:*:*)
- GUESS=nse-tandem-nsk$UNAME_RELEASE
- ;;
- NSR-*:NONSTOP_KERNEL:*:*)
- GUESS=nsr-tandem-nsk$UNAME_RELEASE
- ;;
- NSV-*:NONSTOP_KERNEL:*:*)
- GUESS=nsv-tandem-nsk$UNAME_RELEASE
- ;;
- NSX-*:NONSTOP_KERNEL:*:*)
- GUESS=nsx-tandem-nsk$UNAME_RELEASE
- ;;
- *:NonStop-UX:*:*)
- GUESS=mips-compaq-nonstopux
- ;;
- BS2000:POSIX*:*:*)
- GUESS=bs2000-siemens-sysv
- ;;
- DS/*:UNIX_System_V:*:*)
- GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
- ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "${cputype-}" = 386; then
- UNAME_MACHINE=i386
- elif test "x${cputype-}" != x; then
- UNAME_MACHINE=$cputype
- fi
- GUESS=$UNAME_MACHINE-unknown-plan9
- ;;
- *:TOPS-10:*:*)
- GUESS=pdp10-unknown-tops10
- ;;
- *:TENEX:*:*)
- GUESS=pdp10-unknown-tenex
- ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- GUESS=pdp10-dec-tops20
- ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- GUESS=pdp10-xkl-tops20
- ;;
- *:TOPS-20:*:*)
- GUESS=pdp10-unknown-tops20
- ;;
- *:ITS:*:*)
- GUESS=pdp10-unknown-its
- ;;
- SEI:*:*:SEIUX)
- GUESS=mips-sei-seiux$UNAME_RELEASE
- ;;
- *:DragonFly:*:*)
- DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
- GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
- ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case $UNAME_MACHINE in
- A*) GUESS=alpha-dec-vms ;;
- I*) GUESS=ia64-dec-vms ;;
- V*) GUESS=vax-dec-vms ;;
- esac ;;
- *:XENIX:*:SysV)
- GUESS=i386-pc-xenix
- ;;
- i*86:skyos:*:*)
- SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
- GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
- ;;
- i*86:rdos:*:*)
- GUESS=$UNAME_MACHINE-pc-rdos
- ;;
- i*86:Fiwix:*:*)
- GUESS=$UNAME_MACHINE-pc-fiwix
- ;;
- *:AROS:*:*)
- GUESS=$UNAME_MACHINE-unknown-aros
- ;;
- x86_64:VMkernel:*:*)
- GUESS=$UNAME_MACHINE-unknown-esx
- ;;
- amd64:Isilon\ OneFS:*:*)
- GUESS=x86_64-unknown-onefs
- ;;
- *:Unleashed:*:*)
- GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
- ;;
- *:Ironclad:*:*)
- GUESS=$UNAME_MACHINE-unknown-ironclad
- ;;
-esac
-
-# Do we have a guess based on uname results?
-if test "x$GUESS" != x; then
- echo "$GUESS"
- exit
-fi
-
-# No uname command or uname output not recognized.
-set_cc_for_build
-cat > "$dummy.c" <<EOF
-#ifdef _SEQUENT_
-#include <sys/types.h>
-#include <sys/utsname.h>
-#endif
-#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
-#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
-#include <signal.h>
-#if defined(_SIZE_T_) || defined(SIGLOST)
-#include <sys/utsname.h>
-#endif
-#endif
-#endif
-int
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-#endif
-
-#if defined (vax)
-#if !defined (ultrix)
-#include <sys/param.h>
-#if defined (BSD)
-#if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-#else
-#if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#else
- printf ("vax-dec-bsd\n"); exit (0);
-#endif
-#endif
-#else
- printf ("vax-dec-bsd\n"); exit (0);
-#endif
-#else
-#if defined(_SIZE_T_) || defined(SIGLOST)
- struct utsname un;
- uname (&un);
- printf ("vax-dec-ultrix%s\n", un.release); exit (0);
-#else
- printf ("vax-dec-ultrix\n"); exit (0);
-#endif
-#endif
-#endif
-#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
-#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
-#if defined(_SIZE_T_) || defined(SIGLOST)
- struct utsname *un;
- uname (&un);
- printf ("mips-dec-ultrix%s\n", un.release); exit (0);
-#else
- printf ("mips-dec-ultrix\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
-
-echo "$0: unable to guess system type" >&2
-
-case $UNAME_MACHINE:$UNAME_SYSTEM in
- mips:Linux | mips64:Linux)
- # If we got here on MIPS GNU/Linux, output extra information.
- cat >&2 <<EOF
-
-NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
-the system type. Please install a C compiler and try again.
-EOF
- ;;
-esac
-
-cat >&2 <<EOF
-
-This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite *all*
-copies of config.guess and config.sub with the latest versions from:
-
- https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
-and
- https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
-EOF
-
-our_year=`echo $timestamp | sed 's,-.*,,'`
-thisyear=`date +%Y`
-# shellcheck disable=SC2003
-script_age=`expr "$thisyear" - "$our_year"`
-if test "$script_age" -lt 3 ; then
- cat >&2 <<EOF
-
-If $0 has already been updated, send the following data and any
-information you think might be pertinent to config-patches@gnu.org to
-provide the necessary information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = "$UNAME_MACHINE"
-UNAME_RELEASE = "$UNAME_RELEASE"
-UNAME_SYSTEM = "$UNAME_SYSTEM"
-UNAME_VERSION = "$UNAME_VERSION"
-EOF
-fi
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/contrib/depends/config.site.in b/contrib/depends/config.site.in
deleted file mode 100755
index 11dab89..0000000
--- a/contrib/depends/config.site.in
+++ /dev/null
@@ -1,66 +0,0 @@
-depends_prefix="`dirname ${ac_site_file}`/.."
-
-cross_compiling=maybe
-host_alias=@HOST@
-ac_tool_prefix=${host_alias}-
-
-if test -z $with_boost; then
- with_boost=$depends_prefix
-fi
-
-if test x@host_os@ = xdarwin; then
- BREW=no
- PORT=no
-fi
-
-PATH=$depends_prefix/native/bin:$PATH
-PKG_CONFIG="`which pkg-config` --static"
-
-# These two need to remain exported because pkg-config does not see them
-# otherwise. That means they must be unexported at the end of configure.ac to
-# avoid ruining the cache. Sigh.
-export PKG_CONFIG_PATH=$depends_prefix/share/pkgconfig:$depends_prefix/lib/pkgconfig
-if test -z "@allow_host_packages@"; then
- export PKGCONFIG_LIBDIR=
-fi
-
-CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
-LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
-
-CC="@CC@"
-CXX="@CXX@"
-OBJC="${CC}"
-CCACHE=$depends_prefix/native/bin/ccache
-PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
-
-if test -n "@AR@"; then
- AR=@AR@
- ac_cv_path_ac_pt_AR=${AR}
-fi
-
-if test -n "@RANLIB@"; then
- RANLIB=@RANLIB@
- ac_cv_path_ac_pt_RANLIB=${RANLIB}
-fi
-
-if test -n "@NM@"; then
- NM=@NM@
- ac_cv_path_ac_pt_NM=${NM}
-fi
-
-if test -n "@debug@"; then
- enable_reduce_exports=no
-fi
-
-if test -n "@CFLAGS@"; then
- CFLAGS="@CFLAGS@ $CFLAGS"
-fi
-if test -n "@CXXFLAGS@"; then
- CXXFLAGS="@CXXFLAGS@ $CXXFLAGS"
-fi
-if test -n "@CPPFLAGS@"; then
- CPPFLAGS="@CPPFLAGS@ $CPPFLAGS"
-fi
-if test -n "@LDFLAGS@"; then
- LDFLAGS="@LDFLAGS@ $LDFLAGS"
-fi
diff --git a/contrib/depends/config.sub b/contrib/depends/config.sub
deleted file mode 100755
index 4aaae46..0000000
--- a/contrib/depends/config.sub
+++ /dev/null
@@ -1,2354 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright 1992-2024 Free Software Foundation, Inc.
-
-# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
-
-timestamp='2024-05-27'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <https://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-
-
-# Please send patches to <config-patches@gnu.org>.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-# The "shellcheck disable" line above the timestamp inhibits complaints
-# about features and limitations of the classic Bourne shell that were
-# superseded or lifted in POSIX. However, this script identifies a wide
-# variety of pre-POSIX systems that do not have POSIX shells at all, and
-# even some reasonably current systems (Solaris 10 as case-in-point) still
-# have a pre-POSIX /bin/sh.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
-
-Canonicalize a configuration name.
-
-Options:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright 1992-2024 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try '$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo "$1"
- exit ;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Split fields of configuration type
-saved_IFS=$IFS
-IFS="-" read field1 field2 field3 field4 <<EOF
-$1
-EOF
-IFS=$saved_IFS
-
-# Separate into logical components for further validation
-case $1 in
- *-*-*-*-*)
- echo "Invalid configuration '$1': more than four components" >&2
- exit 1
- ;;
- *-*-*-*)
- basic_machine=$field1-$field2
- basic_os=$field3-$field4
- ;;
- *-*-*)
- # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
- # parts
- maybe_os=$field2-$field3
- case $maybe_os in
- cloudabi*-eabi* \
- | kfreebsd*-gnu* \
- | knetbsd*-gnu* \
- | kopensolaris*-gnu* \
- | linux-* \
- | managarm-* \
- | netbsd*-eabi* \
- | netbsd*-gnu* \
- | nto-qnx* \
- | os2-emx* \
- | rtmk-nova* \
- | storm-chaos* \
- | uclinux-gnu* \
- | uclinux-uclibc* \
- | windows-* )
- basic_machine=$field1
- basic_os=$maybe_os
- ;;
- android-linux)
- basic_machine=$field1-unknown
- basic_os=linux-android
- ;;
- *)
- basic_machine=$field1-$field2
- basic_os=$field3
- ;;
- esac
- ;;
- *-*)
- case $field1-$field2 in
- # Shorthands that happen to contain a single dash
- convex-c[12] | convex-c3[248])
- basic_machine=$field2-convex
- basic_os=
- ;;
- decstation-3100)
- basic_machine=mips-dec
- basic_os=
- ;;
- *-*)
- # Second component is usually, but not always the OS
- case $field2 in
- # Do not treat sunos as a manufacturer
- sun*os*)
- basic_machine=$field1
- basic_os=$field2
- ;;
- # Manufacturers
- 3100* \
- | 32* \
- | 3300* \
- | 3600* \
- | 7300* \
- | acorn \
- | altos* \
- | apollo \
- | apple \
- | atari \
- | att* \
- | axis \
- | be \
- | bull \
- | cbm \
- | ccur \
- | cisco \
- | commodore \
- | convergent* \
- | convex* \
- | cray \
- | crds \
- | dec* \
- | delta* \
- | dg \
- | digital \
- | dolphin \
- | encore* \
- | gould \
- | harris \
- | highlevel \
- | hitachi* \
- | hp \
- | ibm* \
- | intergraph \
- | isi* \
- | knuth \
- | masscomp \
- | microblaze* \
- | mips* \
- | motorola* \
- | ncr* \
- | news \
- | next \
- | ns \
- | oki \
- | omron* \
- | pc533* \
- | rebel \
- | rom68k \
- | rombug \
- | semi \
- | sequent* \
- | siemens \
- | sgi* \
- | siemens \
- | sim \
- | sni \
- | sony* \
- | stratus \
- | sun \
- | sun[234]* \
- | tektronix \
- | tti* \
- | ultra \
- | unicom* \
- | wec \
- | winbond \
- | wrs)
- basic_machine=$field1-$field2
- basic_os=
- ;;
- zephyr*)
- basic_machine=$field1-unknown
- basic_os=$field2
- ;;
- *)
- basic_machine=$field1
- basic_os=$field2
- ;;
- esac
- ;;
- esac
- ;;
- *)
- # Convert single-component short-hands not valid as part of
- # multi-component configurations.
- case $field1 in
- 386bsd)
- basic_machine=i386-pc
- basic_os=bsd
- ;;
- a29khif)
- basic_machine=a29k-amd
- basic_os=udi
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- basic_os=scout
- ;;
- alliant)
- basic_machine=fx80-alliant
- basic_os=
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- basic_os=
- ;;
- am29k)
- basic_machine=a29k-none
- basic_os=bsd
- ;;
- amdahl)
- basic_machine=580-amdahl
- basic_os=sysv
- ;;
- amiga)
- basic_machine=m68k-unknown
- basic_os=
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- basic_os=amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- basic_os=sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- basic_os=sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- basic_os=bsd
- ;;
- aros)
- basic_machine=i386-pc
- basic_os=aros
- ;;
- aux)
- basic_machine=m68k-apple
- basic_os=aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- basic_os=dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- basic_os=linux
- ;;
- cegcc)
- basic_machine=arm-unknown
- basic_os=cegcc
- ;;
- cray)
- basic_machine=j90-cray
- basic_os=unicos
- ;;
- crds | unos)
- basic_machine=m68k-crds
- basic_os=
- ;;
- da30)
- basic_machine=m68k-da30
- basic_os=
- ;;
- decstation | pmax | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- basic_os=
- ;;
- delta88)
- basic_machine=m88k-motorola
- basic_os=sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- basic_os=dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- basic_os=msdosdjgpp
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- basic_os=ebmon
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- basic_os=ose
- ;;
- gmicro)
- basic_machine=tron-gmicro
- basic_os=sysv
- ;;
- go32)
- basic_machine=i386-pc
- basic_os=go32
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- basic_os=hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- basic_os=xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- basic_os=hms
- ;;
- harris)
- basic_machine=m88k-harris
- basic_os=sysv3
- ;;
- hp300 | hp300hpux)
- basic_machine=m68k-hp
- basic_os=hpux
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- basic_os=bsd
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- basic_os=osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- basic_os=proelf
- ;;
- i386mach)
- basic_machine=i386-mach
- basic_os=mach
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- basic_os=sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- basic_os=linux
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- basic_os=sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- basic_os=sysv
- ;;
- mingw64)
- basic_machine=x86_64-pc
- basic_os=mingw64
- ;;
- mingw32)
- basic_machine=i686-pc
- basic_os=mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- basic_os=mingw32ce
- ;;
- monitor)
- basic_machine=m68k-rom68k
- basic_os=coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- basic_os=morphos
- ;;
- moxiebox)
- basic_machine=moxie-unknown
- basic_os=moxiebox
- ;;
- msdos)
- basic_machine=i386-pc
- basic_os=msdos
- ;;
- msys)
- basic_machine=i686-pc
- basic_os=msys
- ;;
- mvs)
- basic_machine=i370-ibm
- basic_os=mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- basic_os=nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- basic_os=sysv4
- ;;
- netbsd386)
- basic_machine=i386-pc
- basic_os=netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- basic_os=linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- basic_os=newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- basic_os=newsos
- ;;
- necv70)
- basic_machine=v70-nec
- basic_os=sysv
- ;;
- nh3000)
- basic_machine=m68k-harris
- basic_os=cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- basic_os=cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- basic_os=nindy
- ;;
- mon960)
- basic_machine=i960-intel
- basic_os=mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- basic_os=nonstopux
- ;;
- os400)
- basic_machine=powerpc-ibm
- basic_os=os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- basic_os=ose
- ;;
- os68k)
- basic_machine=m68k-none
- basic_os=os68k
- ;;
- paragon)
- basic_machine=i860-intel
- basic_os=osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- basic_os=linux
- ;;
- psp)
- basic_machine=mipsallegrexel-sony
- basic_os=psp
- ;;
- pw32)
- basic_machine=i586-unknown
- basic_os=pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- basic_os=rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- basic_os=rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- basic_os=coff
- ;;
- sa29200)
- basic_machine=a29k-amd
- basic_os=udi
- ;;
- sei)
- basic_machine=mips-sei
- basic_os=seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- basic_os=
- ;;
- sps7)
- basic_machine=m68k-bull
- basic_os=sysv2
- ;;
- st2000)
- basic_machine=m68k-tandem
- basic_os=
- ;;
- stratus)
- basic_machine=i860-stratus
- basic_os=sysv4
- ;;
- sun2)
- basic_machine=m68000-sun
- basic_os=
- ;;
- sun2os3)
- basic_machine=m68000-sun
- basic_os=sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- basic_os=sunos4
- ;;
- sun3)
- basic_machine=m68k-sun
- basic_os=
- ;;
- sun3os3)
- basic_machine=m68k-sun
- basic_os=sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- basic_os=sunos4
- ;;
- sun4)
- basic_machine=sparc-sun
- basic_os=
- ;;
- sun4os3)
- basic_machine=sparc-sun
- basic_os=sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- basic_os=sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- basic_os=solaris2
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- basic_os=
- ;;
- sv1)
- basic_machine=sv1-cray
- basic_os=unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- basic_os=dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- basic_os=unicos
- ;;
- t90)
- basic_machine=t90-cray
- basic_os=unicos
- ;;
- toad1)
- basic_machine=pdp10-xkl
- basic_os=tops20
- ;;
- tpf)
- basic_machine=s390x-ibm
- basic_os=tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- basic_os=udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- basic_os=sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- basic_os=none
- ;;
- vaxv)
- basic_machine=vax-dec
- basic_os=sysv
- ;;
- vms)
- basic_machine=vax-dec
- basic_os=vms
- ;;
- vsta)
- basic_machine=i386-pc
- basic_os=vsta
- ;;
- vxworks960)
- basic_machine=i960-wrs
- basic_os=vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- basic_os=vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- basic_os=vxworks
- ;;
- xbox)
- basic_machine=i686-pc
- basic_os=mingw32
- ;;
- ymp)
- basic_machine=ymp-cray
- basic_os=unicos
- ;;
- *)
- basic_machine=$1
- basic_os=
- ;;
- esac
- ;;
-esac
-
-# Decode 1-component or ad-hoc basic machines
-case $basic_machine in
- # Here we handle the default manufacturer of certain CPU types. It is in
- # some cases the only manufacturer, in others, it is the most popular.
- w89k)
- cpu=hppa1.1
- vendor=winbond
- ;;
- op50n)
- cpu=hppa1.1
- vendor=oki
- ;;
- op60c)
- cpu=hppa1.1
- vendor=oki
- ;;
- ibm*)
- cpu=i370
- vendor=ibm
- ;;
- orion105)
- cpu=clipper
- vendor=highlevel
- ;;
- mac | mpw | mac-mpw)
- cpu=m68k
- vendor=apple
- ;;
- pmac | pmac-mpw)
- cpu=powerpc
- vendor=apple
- ;;
-
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- cpu=m68000
- vendor=att
- ;;
- 3b*)
- cpu=we32k
- vendor=att
- ;;
- bluegene*)
- cpu=powerpc
- vendor=ibm
- basic_os=cnk
- ;;
- decsystem10* | dec10*)
- cpu=pdp10
- vendor=dec
- basic_os=tops10
- ;;
- decsystem20* | dec20*)
- cpu=pdp10
- vendor=dec
- basic_os=tops20
- ;;
- delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300)
- cpu=m68k
- vendor=motorola
- ;;
- # This used to be dpx2*, but that gets the RS6000-based
- # DPX/20 and the x86-based DPX/2-100 wrong. See
- # https://oldskool.silicium.org/stations/bull_dpx20.htm
- # https://www.feb-patrimoine.com/english/bull_dpx2.htm
- # https://www.feb-patrimoine.com/english/unix_and_bull.htm
- dpx2 | dpx2[23]00 | dpx2[23]xx)
- cpu=m68k
- vendor=bull
- ;;
- dpx2100 | dpx21xx)
- cpu=i386
- vendor=bull
- ;;
- dpx20)
- cpu=rs6000
- vendor=bull
- ;;
- encore | umax | mmax)
- cpu=ns32k
- vendor=encore
- ;;
- elxsi)
- cpu=elxsi
- vendor=elxsi
- basic_os=${basic_os:-bsd}
- ;;
- fx2800)
- cpu=i860
- vendor=alliant
- ;;
- genix)
- cpu=ns32k
- vendor=ns
- ;;
- h3050r* | hiux*)
- cpu=hppa1.1
- vendor=hitachi
- basic_os=hiuxwe2
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- cpu=hppa1.0
- vendor=hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- cpu=m68000
- vendor=hp
- ;;
- hp9k3[2-9][0-9])
- cpu=m68k
- vendor=hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- cpu=hppa1.0
- vendor=hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- cpu=hppa1.1
- vendor=hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- cpu=hppa1.1
- vendor=hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- cpu=hppa1.1
- vendor=hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- cpu=hppa1.1
- vendor=hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- cpu=hppa1.0
- vendor=hp
- ;;
- i*86v32)
- cpu=`echo "$1" | sed -e 's/86.*/86/'`
- vendor=pc
- basic_os=sysv32
- ;;
- i*86v4*)
- cpu=`echo "$1" | sed -e 's/86.*/86/'`
- vendor=pc
- basic_os=sysv4
- ;;
- i*86v)
- cpu=`echo "$1" | sed -e 's/86.*/86/'`
- vendor=pc
- basic_os=sysv
- ;;
- i*86sol2)
- cpu=`echo "$1" | sed -e 's/86.*/86/'`
- vendor=pc
- basic_os=solaris2
- ;;
- j90 | j90-cray)
- cpu=j90
- vendor=cray
- basic_os=${basic_os:-unicos}
- ;;
- iris | iris4d)
- cpu=mips
- vendor=sgi
- case $basic_os in
- irix*)
- ;;
- *)
- basic_os=irix4
- ;;
- esac
- ;;
- miniframe)
- cpu=m68000
- vendor=convergent
- ;;
- *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
- cpu=m68k
- vendor=atari
- basic_os=mint
- ;;
- news-3600 | risc-news)
- cpu=mips
- vendor=sony
- basic_os=newsos
- ;;
- next | m*-next)
- cpu=m68k
- vendor=next
- ;;
- np1)
- cpu=np1
- vendor=gould
- ;;
- op50n-* | op60c-*)
- cpu=hppa1.1
- vendor=oki
- basic_os=proelf
- ;;
- pa-hitachi)
- cpu=hppa1.1
- vendor=hitachi
- basic_os=hiuxwe2
- ;;
- pbd)
- cpu=sparc
- vendor=tti
- ;;
- pbb)
- cpu=m68k
- vendor=tti
- ;;
- pc532)
- cpu=ns32k
- vendor=pc532
- ;;
- pn)
- cpu=pn
- vendor=gould
- ;;
- power)
- cpu=power
- vendor=ibm
- ;;
- ps2)
- cpu=i386
- vendor=ibm
- ;;
- rm[46]00)
- cpu=mips
- vendor=siemens
- ;;
- rtpc | rtpc-*)
- cpu=romp
- vendor=ibm
- ;;
- sde)
- cpu=mipsisa32
- vendor=sde
- basic_os=${basic_os:-elf}
- ;;
- simso-wrs)
- cpu=sparclite
- vendor=wrs
- basic_os=vxworks
- ;;
- tower | tower-32)
- cpu=m68k
- vendor=ncr
- ;;
- vpp*|vx|vx-*)
- cpu=f301
- vendor=fujitsu
- ;;
- w65)
- cpu=w65
- vendor=wdc
- ;;
- w89k-*)
- cpu=hppa1.1
- vendor=winbond
- basic_os=proelf
- ;;
- none)
- cpu=none
- vendor=none
- ;;
- leon|leon[3-9])
- cpu=sparc
- vendor=$basic_machine
- ;;
- leon-*|leon[3-9]-*)
- cpu=sparc
- vendor=`echo "$basic_machine" | sed 's/-.*//'`
- ;;
-
- *-*)
- saved_IFS=$IFS
- IFS="-" read cpu vendor <<EOF
-$basic_machine
-EOF
- IFS=$saved_IFS
- ;;
- # We use 'pc' rather than 'unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- cpu=$basic_machine
- vendor=pc
- ;;
- # These rules are duplicated from below for sake of the special case above;
- # i.e. things that normalized to x86 arches should also default to "pc"
- pc98)
- cpu=i386
- vendor=pc
- ;;
- x64 | amd64)
- cpu=x86_64
- vendor=pc
- ;;
- # Recognize the basic CPU types without company name.
- *)
- cpu=$basic_machine
- vendor=unknown
- ;;
-esac
-
-unset -v basic_machine
-
-# Decode basic machines in the full and proper CPU-Company form.
-case $cpu-$vendor in
- # Here we handle the default manufacturer of certain CPU types in canonical form.
- # It is in some cases the only manufacturer, in others, it is the most popular.
- c[12]-convex | c[12]-unknown | c3[248]-convex | c3[248]-unknown)
- vendor=convex
- basic_os=${basic_os:-bsd}
- ;;
- craynv-unknown)
- vendor=cray
- basic_os=${basic_os:-unicosmp}
- ;;
- c90-unknown | c90-cray)
- vendor=cray
- basic_os=${basic_os:-unicos}
- ;;
- fx80-unknown)
- vendor=alliant
- ;;
- romp-unknown)
- vendor=ibm
- ;;
- mmix-unknown)
- vendor=knuth
- ;;
- microblaze-unknown | microblazeel-unknown)
- vendor=xilinx
- ;;
- rs6000-unknown)
- vendor=ibm
- ;;
- vax-unknown)
- vendor=dec
- ;;
- pdp11-unknown)
- vendor=dec
- ;;
- we32k-unknown)
- vendor=att
- ;;
- cydra-unknown)
- vendor=cydrome
- ;;
- i370-ibm*)
- vendor=ibm
- ;;
- orion-unknown)
- vendor=highlevel
- ;;
- xps-unknown | xps100-unknown)
- cpu=xps100
- vendor=honeywell
- ;;
-
- # Here we normalize CPU types with a missing or matching vendor
- armh-unknown | armh-alt)
- cpu=armv7l
- vendor=alt
- basic_os=${basic_os:-linux-gnueabihf}
- ;;
-
- # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified
- m68k-isi)
- basic_os=${basic_os:-sysv}
- ;;
- m68k-sony)
- basic_os=${basic_os:-newsos}
- ;;
- m68k-tektronix)
- basic_os=${basic_os:-bsd}
- ;;
- m88k-harris)
- basic_os=${basic_os:-sysv3}
- ;;
- i386-bull | m68k-bull)
- basic_os=${basic_os:-sysv3}
- ;;
- rs6000-bull)
- basic_os=${basic_os:-bosx}
- ;;
- mips-sni)
- basic_os=${basic_os:-sysv4}
- ;;
-
- # Here we normalize CPU types irrespective of the vendor
- amd64-*)
- cpu=x86_64
- ;;
- blackfin-*)
- cpu=bfin
- basic_os=${basic_os:-linux}
- ;;
- c54x-*)
- cpu=tic54x
- ;;
- c55x-*)
- cpu=tic55x
- ;;
- c6x-*)
- cpu=tic6x
- ;;
- e500v[12]-*)
- cpu=powerpc
- basic_os=${basic_os}"spe"
- ;;
- mips3*-*)
- cpu=mips64
- ;;
- ms1-*)
- cpu=mt
- ;;
- m68knommu-*)
- cpu=m68k
- basic_os=${basic_os:-linux}
- ;;
- m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
- cpu=s12z
- ;;
- openrisc-*)
- cpu=or32
- ;;
- parisc-*)
- cpu=hppa
- basic_os=${basic_os:-linux}
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- cpu=i586
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
- cpu=i686
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- cpu=i686
- ;;
- pentium4-*)
- cpu=i786
- ;;
- ppc-* | ppcbe-*)
- cpu=powerpc
- ;;
- ppcle-* | powerpclittle-*)
- cpu=powerpcle
- ;;
- ppc64-*)
- cpu=powerpc64
- ;;
- ppc64le-* | powerpc64little-*)
- cpu=powerpc64le
- ;;
- sb1-*)
- cpu=mipsisa64sb1
- ;;
- sb1el-*)
- cpu=mipsisa64sb1el
- ;;
- sh5e[lb]-*)
- cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
- ;;
- spur-*)
- cpu=spur
- ;;
- strongarm-* | thumb-*)
- cpu=arm
- ;;
- tx39-*)
- cpu=mipstx39
- ;;
- tx39el-*)
- cpu=mipstx39el
- ;;
- xscale-* | xscalee[bl]-*)
- cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
- ;;
- arm64-* | aarch64le-*)
- cpu=aarch64
- ;;
-
- # Recognize the canonical CPU Types that limit and/or modify the
- # company names they are paired with.
- cr16-*)
- basic_os=${basic_os:-elf}
- ;;
- crisv32-* | etraxfs*-*)
- cpu=crisv32
- vendor=axis
- ;;
- cris-* | etrax*-*)
- cpu=cris
- vendor=axis
- ;;
- crx-*)
- basic_os=${basic_os:-elf}
- ;;
- neo-tandem)
- cpu=neo
- vendor=tandem
- ;;
- nse-tandem)
- cpu=nse
- vendor=tandem
- ;;
- nsr-tandem)
- cpu=nsr
- vendor=tandem
- ;;
- nsv-tandem)
- cpu=nsv
- vendor=tandem
- ;;
- nsx-tandem)
- cpu=nsx
- vendor=tandem
- ;;
- mipsallegrexel-sony)
- cpu=mipsallegrexel
- vendor=sony
- ;;
- tile*-*)
- basic_os=${basic_os:-linux-gnu}
- ;;
-
- *)
- # Recognize the canonical CPU types that are allowed with any
- # company name.
- case $cpu in
- 1750a \
- | 580 \
- | [cjt]90 \
- | a29k \
- | aarch64 \
- | aarch64_be \
- | aarch64c \
- | abacus \
- | alpha \
- | alpha64 \
- | alpha64ev56 \
- | alpha64ev6[78] \
- | alpha64ev[4-8] \
- | alpha64pca5[67] \
- | alphaev56 \
- | alphaev6[78] \
- | alphaev[4-8] \
- | alphapca5[67] \
- | am33_2.0 \
- | amdgcn \
- | arc \
- | arc32 \
- | arc64 \
- | arceb \
- | arm \
- | arm64e \
- | arm64ec \
- | arm[lb]e \
- | arme[lb] \
- | armv* \
- | asmjs \
- | avr \
- | avr32 \
- | ba \
- | be32 \
- | be64 \
- | bfin \
- | bpf \
- | bs2000 \
- | c30 \
- | c4x \
- | c8051 \
- | c[123]* \
- | clipper \
- | craynv \
- | csky \
- | cydra \
- | d10v \
- | d30v \
- | dlx \
- | dsp16xx \
- | e2k \
- | elxsi \
- | epiphany \
- | f30[01] \
- | f700 \
- | fido \
- | fr30 \
- | frv \
- | ft32 \
- | fx80 \
- | h8300 \
- | h8500 \
- | hexagon \
- | hppa \
- | hppa1.[01] \
- | hppa2.0 \
- | hppa2.0[nw] \
- | hppa64 \
- | i*86 \
- | i370 \
- | i860 \
- | i960 \
- | ia16 \
- | ia64 \
- | ip2k \
- | iq2000 \
- | javascript \
- | k1om \
- | kvx \
- | le32 \
- | le64 \
- | lm32 \
- | loongarch32 \
- | loongarch64 \
- | m32c \
- | m32r \
- | m32rle \
- | m5200 \
- | m68000 \
- | m680[012346]0 \
- | m6811 \
- | m6812 \
- | m68360 \
- | m683?2 \
- | m68hc11 \
- | m68hc12 \
- | m68hcs12x \
- | m68k \
- | m88110 \
- | m88k \
- | maxq \
- | mb \
- | mcore \
- | mep \
- | metag \
- | microblaze \
- | microblazeel \
- | mips* \
- | mmix \
- | mn10200 \
- | mn10300 \
- | moxie \
- | msp430 \
- | mt \
- | nanomips* \
- | nds32 \
- | nds32be \
- | nds32le \
- | nfp \
- | nios \
- | nios2 \
- | nios2eb \
- | nios2el \
- | none \
- | np1 \
- | ns16k \
- | ns32k \
- | nvptx \
- | open8 \
- | or1k* \
- | or32 \
- | orion \
- | pdp10 \
- | pdp11 \
- | picochip \
- | pj \
- | pjl \
- | pn \
- | power \
- | powerpc \
- | powerpc64 \
- | powerpc64le \
- | powerpcle \
- | powerpcspe \
- | pru \
- | pyramid \
- | riscv \
- | riscv32 \
- | riscv32be \
- | riscv64 \
- | riscv64be \
- | rl78 \
- | romp \
- | rs6000 \
- | rx \
- | s390 \
- | s390x \
- | score \
- | sh \
- | sh64 \
- | sh64le \
- | sh[12345][lb]e \
- | sh[1234] \
- | sh[1234]e[lb] \
- | sh[23]e \
- | sh[23]ele \
- | sh[24]a \
- | sh[24]ae[lb] \
- | sh[lb]e \
- | she[lb] \
- | shl \
- | sparc \
- | sparc64 \
- | sparc64b \
- | sparc64v \
- | sparc86x \
- | sparclet \
- | sparclite \
- | sparcv8 \
- | sparcv9 \
- | sparcv9b \
- | sparcv9v \
- | spu \
- | sv1 \
- | sx* \
- | tahoe \
- | thumbv7* \
- | tic30 \
- | tic4x \
- | tic54x \
- | tic55x \
- | tic6x \
- | tic80 \
- | tron \
- | ubicom32 \
- | v70 \
- | v810 \
- | v850 \
- | v850e \
- | v850e1 \
- | v850e2 \
- | v850e2v3 \
- | v850es \
- | vax \
- | vc4 \
- | visium \
- | w65 \
- | wasm32 \
- | wasm64 \
- | we32k \
- | x86 \
- | x86_64 \
- | xc16x \
- | xgate \
- | xps100 \
- | xstormy16 \
- | xtensa* \
- | ymp \
- | z80 \
- | z8k)
- ;;
-
- *)
- echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
- exit 1
- ;;
- esac
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $vendor in
- digital*)
- vendor=dec
- ;;
- commodore*)
- vendor=cbm
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if test x"$basic_os" != x
-then
-
-# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
-# set os.
-obj=
-case $basic_os in
- gnu/linux*)
- kernel=linux
- os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
- ;;
- os2-emx)
- kernel=os2
- os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
- ;;
- nto-qnx*)
- kernel=nto
- os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
- ;;
- *-*)
- saved_IFS=$IFS
- IFS="-" read kernel os <<EOF
-$basic_os
-EOF
- IFS=$saved_IFS
- ;;
- # Default OS when just kernel was specified
- nto*)
- kernel=nto
- os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
- ;;
- linux*)
- kernel=linux
- os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
- ;;
- managarm*)
- kernel=managarm
- os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
- ;;
- *)
- kernel=
- os=$basic_os
- ;;
-esac
-
-# Now, normalize the OS (knowing we just have one component, it's not a kernel,
-# etc.)
-case $os in
- # First match some system type aliases that might get confused
- # with valid system types.
- # solaris* is a basic system type, with this one exception.
- auroraux)
- os=auroraux
- ;;
- bluegene*)
- os=cnk
- ;;
- solaris1 | solaris1.*)
- os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
- ;;
- solaris)
- os=solaris2
- ;;
- unixware*)
- os=sysv4.2uw
- ;;
- # The marketing names for NeXT's operating systems were
- # NeXTSTEP, NeXTSTEP 2, OpenSTEP 3, OpenSTEP 4. 'openstep' is
- # mapped to 'openstep3', but 'openstep1' and 'openstep2' are
- # mapped to 'nextstep' and 'nextstep2', consistent with the
- # treatment of SunOS/Solaris.
- ns | ns1 | nextstep | nextstep1 | openstep1)
- os=nextstep
- ;;
- ns2 | nextstep2 | openstep2)
- os=nextstep2
- ;;
- ns3 | nextstep3 | openstep | openstep3)
- os=openstep3
- ;;
- ns4 | nextstep4 | openstep4)
- os=openstep4
- ;;
- # es1800 is here to avoid being matched by es* (a different OS)
- es1800*)
- os=ose
- ;;
- # Some version numbers need modification
- chorusos*)
- os=chorusos
- ;;
- isc)
- os=isc2.2
- ;;
- sco6)
- os=sco5v6
- ;;
- sco5)
- os=sco3.2v5
- ;;
- sco4)
- os=sco3.2v4
- ;;
- sco3.2.[4-9]*)
- os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
- ;;
- sco*v* | scout)
- # Don't match below
- ;;
- sco*)
- os=sco3.2v2
- ;;
- psos*)
- os=psos
- ;;
- qnx*)
- os=qnx
- ;;
- hiux*)
- os=hiuxwe2
- ;;
- lynx*178)
- os=lynxos178
- ;;
- lynx*5)
- os=lynxos5
- ;;
- lynxos*)
- # don't get caught up in next wildcard
- ;;
- lynx*)
- os=lynxos
- ;;
- mac[0-9]*)
- os=`echo "$os" | sed -e 's|mac|macos|'`
- ;;
- opened*)
- os=openedition
- ;;
- os400*)
- os=os400
- ;;
- sunos5*)
- os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
- ;;
- sunos6*)
- os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
- ;;
- wince*)
- os=wince
- ;;
- utek*)
- os=bsd
- vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'`
- ;;
- dynix*)
- os=bsd
- ;;
- acis*)
- os=aos
- ;;
- atheos*)
- os=atheos
- ;;
- syllable*)
- os=syllable
- ;;
- 386bsd)
- os=bsd
- ;;
- ctix*)
- os=sysv
- vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'`
- ;;
- uts*)
- os=sysv
- ;;
- nova*)
- kernel=rtmk
- os=nova
- ;;
- # Preserve the version number of sinix5.
- sinix5.*)
- os=`echo "$os" | sed -e 's|sinix|sysv|'`
- vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
- ;;
- sinix*)
- os=sysv4
- vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
- ;;
- tpf*)
- os=tpf
- ;;
- triton*)
- os=sysv3
- ;;
- oss*)
- os=sysv3
- ;;
- svr4*)
- os=sysv4
- ;;
- svr3)
- os=sysv3
- ;;
- sysvr4)
- os=sysv4
- ;;
- ose*)
- os=ose
- ;;
- *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
- os=mint
- ;;
- dicos*)
- os=dicos
- ;;
- pikeos*)
- # Until real need of OS specific support for
- # particular features comes up, bare metal
- # configurations are quite functional.
- case $cpu in
- arm*)
- os=eabi
- ;;
- *)
- os=
- obj=elf
- ;;
- esac
- ;;
- aout* | coff* | elf* | pe*)
- # These are machine code file formats, not OSes
- obj=$os
- os=
- ;;
- *)
- # No normalization, but not necessarily accepted, that comes below.
- ;;
-esac
-
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-kernel=
-obj=
-case $cpu-$vendor in
- score-*)
- os=
- obj=elf
- ;;
- spu-*)
- os=
- obj=elf
- ;;
- *-acorn)
- os=riscix1.2
- ;;
- arm*-rebel)
- kernel=linux
- os=gnu
- ;;
- arm*-semi)
- os=
- obj=aout
- ;;
- c4x-* | tic4x-*)
- os=
- obj=coff
- ;;
- c8051-*)
- os=
- obj=elf
- ;;
- clipper-intergraph)
- os=clix
- ;;
- hexagon-*)
- os=
- obj=elf
- ;;
- tic54x-*)
- os=
- obj=coff
- ;;
- tic55x-*)
- os=
- obj=coff
- ;;
- tic6x-*)
- os=
- obj=coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=tops20
- ;;
- pdp11-*)
- os=none
- ;;
- *-dec | vax-*)
- os=ultrix4.2
- ;;
- m68*-apollo)
- os=domain
- ;;
- i386-sun)
- os=sunos4.0.2
- ;;
- m68000-sun)
- os=sunos3
- ;;
- m68*-cisco)
- os=
- obj=aout
- ;;
- mep-*)
- os=
- obj=elf
- ;;
- # The -sgi and -siemens entries must be before the mips- entry
- # or we get the wrong os.
- *-sgi)
- os=irix
- ;;
- *-siemens)
- os=sysv4
- ;;
- mips*-cisco)
- os=
- obj=elf
- ;;
- mips*-*|nanomips*-*)
- os=
- obj=elf
- ;;
- or32-*)
- os=
- obj=coff
- ;;
- # This must be before the sparc-* entry or we get the wrong os.
- *-tti)
- os=sysv3
- ;;
- sparc-* | *-sun)
- os=sunos4.1.1
- ;;
- pru-*)
- os=
- obj=elf
- ;;
- *-be)
- os=beos
- ;;
- *-ibm)
- os=aix
- ;;
- *-knuth)
- os=mmixware
- ;;
- *-wec)
- os=proelf
- ;;
- *-winbond)
- os=proelf
- ;;
- *-oki)
- os=proelf
- ;;
- *-hp)
- os=hpux
- ;;
- *-hitachi)
- os=hiuxwe2
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=sysv
- ;;
- *-cbm)
- os=amigaos
- ;;
- *-dg)
- os=dgux
- ;;
- *-dolphin)
- os=sysv3
- ;;
- m68k-ccur)
- os=rtu
- ;;
- m88k-omron*)
- os=luna
- ;;
- *-next)
- os=nextstep
- ;;
- *-sequent)
- os=ptx
- ;;
- *-crds)
- os=unos
- ;;
- *-ns)
- os=genix
- ;;
- i370-*)
- os=mvs
- ;;
- *-gould)
- os=sysv
- ;;
- *-highlevel)
- os=bsd
- ;;
- *-encore)
- os=bsd
- ;;
- *-masscomp)
- os=rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=uxpv
- ;;
- *-rom68k)
- os=
- obj=coff
- ;;
- *-*bug)
- os=
- obj=coff
- ;;
- *-apple)
- os=macos
- ;;
- *-atari*)
- os=mint
- ;;
- *-wrs)
- os=vxworks
- ;;
- *)
- os=none
- ;;
-esac
-
-fi
-
-# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
-
-case $os in
- # Sometimes we do "kernel-libc", so those need to count as OSes.
- llvm* | musl* | newlib* | relibc* | uclibc*)
- ;;
- # Likewise for "kernel-abi"
- eabi* | gnueabi*)
- ;;
- # VxWorks passes extra cpu info in the 4th filed.
- simlinux | simwindows | spe)
- ;;
- # See `case $cpu-$os` validation below
- ghcjs)
- ;;
- # Now accept the basic system types.
- # Each alternative MUST end in a * to match a version number.
- abug \
- | aix* \
- | amdhsa* \
- | amigados* \
- | amigaos* \
- | android* \
- | aof* \
- | aos* \
- | aros* \
- | atheos* \
- | auroraux* \
- | aux* \
- | beos* \
- | bitrig* \
- | bme* \
- | bosx* \
- | bsd* \
- | cegcc* \
- | chorusos* \
- | chorusrdb* \
- | clix* \
- | cloudabi* \
- | cnk* \
- | conix* \
- | cos* \
- | cxux* \
- | cygwin* \
- | darwin* \
- | dgux* \
- | dicos* \
- | dnix* \
- | domain* \
- | dragonfly* \
- | drops* \
- | ebmon* \
- | ecoff* \
- | ekkobsd* \
- | emscripten* \
- | emx* \
- | es* \
- | fiwix* \
- | freebsd* \
- | fuchsia* \
- | genix* \
- | genode* \
- | glidix* \
- | gnu* \
- | go32* \
- | haiku* \
- | hcos* \
- | hiux* \
- | hms* \
- | hpux* \
- | ieee* \
- | interix* \
- | ios* \
- | iris* \
- | irix* \
- | ironclad* \
- | isc* \
- | its* \
- | l4re* \
- | libertybsd* \
- | lites* \
- | lnews* \
- | luna* \
- | lynxos* \
- | mach* \
- | macos* \
- | magic* \
- | mbr* \
- | midipix* \
- | midnightbsd* \
- | mingw32* \
- | mingw64* \
- | minix* \
- | mint* \
- | mirbsd* \
- | mks* \
- | mlibc* \
- | mmixware* \
- | mon960* \
- | morphos* \
- | moss* \
- | moxiebox* \
- | mpeix* \
- | mpw* \
- | msdos* \
- | msys* \
- | mvs* \
- | nacl* \
- | netbsd* \
- | netware* \
- | newsos* \
- | nextstep* \
- | nindy* \
- | nonstopux* \
- | nova* \
- | nsk* \
- | nucleus* \
- | nx6 \
- | nx7 \
- | oabi* \
- | ohos* \
- | onefs* \
- | openbsd* \
- | openedition* \
- | openstep* \
- | os108* \
- | os2* \
- | os400* \
- | os68k* \
- | os9* \
- | ose* \
- | osf* \
- | oskit* \
- | osx* \
- | palmos* \
- | phoenix* \
- | plan9* \
- | powermax* \
- | powerunix* \
- | proelf* \
- | psos* \
- | psp* \
- | ptx* \
- | pw32* \
- | qnx* \
- | rdos* \
- | redox* \
- | rhapsody* \
- | riscix* \
- | riscos* \
- | rtems* \
- | rtmk* \
- | rtu* \
- | scout* \
- | secbsd* \
- | sei* \
- | serenity* \
- | sim* \
- | skyos* \
- | solaris* \
- | solidbsd* \
- | sortix* \
- | storm-chaos* \
- | sunos \
- | sunos[34]* \
- | superux* \
- | syllable* \
- | sym* \
- | sysv* \
- | tenex* \
- | tirtos* \
- | toppers* \
- | tops10* \
- | tops20* \
- | tpf* \
- | tvos* \
- | twizzler* \
- | uclinux* \
- | udi* \
- | udk* \
- | ultrix* \
- | unicos* \
- | uniplus* \
- | unleashed* \
- | unos* \
- | uwin* \
- | uxpv* \
- | v88r* \
- |*vms* \
- | vos* \
- | vsta* \
- | vxsim* \
- | vxworks* \
- | wasi* \
- | watchos* \
- | wince* \
- | windiss* \
- | windows* \
- | winnt* \
- | xenix* \
- | xray* \
- | zephyr* \
- | zvmoe* )
- ;;
- # This one is extra strict with allowed versions
- sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- ;;
- # This refers to builds using the UEFI calling convention
- # (which depends on the architecture) and PE file format.
- # Note that this is both a different calling convention and
- # different file format than that of GNU-EFI
- # (x86_64-w64-mingw32).
- uefi)
- ;;
- none)
- ;;
- kernel* | msvc* )
- # Restricted further below
- ;;
- '')
- if test x"$obj" = x
- then
- echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
- fi
- ;;
- *)
- echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
- exit 1
- ;;
-esac
-
-case $obj in
- aout* | coff* | elf* | pe*)
- ;;
- '')
- # empty is fine
- ;;
- *)
- echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
- exit 1
- ;;
-esac
-
-# Here we handle the constraint that a (synthetic) cpu and os are
-# valid only in combination with each other and nowhere else.
-case $cpu-$os in
- # The "javascript-unknown-ghcjs" triple is used by GHC; we
- # accept it here in order to tolerate that, but reject any
- # variations.
- javascript-ghcjs)
- ;;
- javascript-* | *-ghcjs)
- echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
- exit 1
- ;;
-esac
-
-# As a final step for OS-related things, validate the OS-kernel combination
-# (given a valid OS), if there is a kernel.
-case $kernel-$os-$obj in
- linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
- | linux-mlibc*- | linux-musl*- | linux-newlib*- \
- | linux-relibc*- | linux-uclibc*- | linux-ohos*- )
- ;;
- uclinux-uclibc*- | uclinux-gnu*- )
- ;;
- managarm-mlibc*- | managarm-kernel*- )
- ;;
- windows*-msvc*-)
- ;;
- -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
- | -uclibc*- )
- # These are just libc implementations, not actual OSes, and thus
- # require a kernel.
- echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
- exit 1
- ;;
- -kernel*- )
- echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
- exit 1
- ;;
- *-kernel*- )
- echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
- exit 1
- ;;
- *-msvc*- )
- echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
- exit 1
- ;;
- kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-)
- ;;
- vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
- ;;
- nto-qnx*-)
- ;;
- os2-emx-)
- ;;
- rtmk-nova-)
- ;;
- *-eabi*- | *-gnueabi*-)
- ;;
- none--*)
- # None (no kernel, i.e. freestanding / bare metal),
- # can be paired with an machine code file format
- ;;
- -*-)
- # Blank kernel with real OS is always fine.
- ;;
- --*)
- # Blank kernel and OS with real machine code file format is always fine.
- ;;
- *-*-*)
- echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
- exit 1
- ;;
-esac
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-case $vendor in
- unknown)
- case $cpu-$os in
- *-riscix*)
- vendor=acorn
- ;;
- *-sunos* | *-solaris*)
- vendor=sun
- ;;
- *-cnk* | *-aix*)
- vendor=ibm
- ;;
- *-beos*)
- vendor=be
- ;;
- *-hpux*)
- vendor=hp
- ;;
- *-mpeix*)
- vendor=hp
- ;;
- *-hiux*)
- vendor=hitachi
- ;;
- *-unos*)
- vendor=crds
- ;;
- *-dgux*)
- vendor=dg
- ;;
- *-luna*)
- vendor=omron
- ;;
- *-genix*)
- vendor=ns
- ;;
- *-clix*)
- vendor=intergraph
- ;;
- *-mvs* | *-opened*)
- vendor=ibm
- ;;
- *-os400*)
- vendor=ibm
- ;;
- s390-* | s390x-*)
- vendor=ibm
- ;;
- *-ptx*)
- vendor=sequent
- ;;
- *-tpf*)
- vendor=ibm
- ;;
- *-vxsim* | *-vxworks* | *-windiss*)
- vendor=wrs
- ;;
- *-aux*)
- vendor=apple
- ;;
- *-hms*)
- vendor=hitachi
- ;;
- *-mpw* | *-macos*)
- vendor=apple
- ;;
- *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
- vendor=atari
- ;;
- *-vos*)
- vendor=stratus
- ;;
- esac
- ;;
-esac
-
-echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
-exit
-
-# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/contrib/depends/description.md b/contrib/depends/description.md
deleted file mode 100644
index 74f9ef3..0000000
--- a/contrib/depends/description.md
+++ /dev/null
@@ -1,53 +0,0 @@
-This is a system of building and caching dependencies necessary for building Bitcoin.
-There are several features that make it different from most similar systems:
-
-### It is designed to be builder and host agnostic
-
-In theory, binaries for any target OS/architecture can be created, from a
-builder running any OS/architecture. In practice, build-side tools must be
-specified when the defaults don't fit, and packages must be amended to work
-on new hosts. For now, a build architecture of x86_64 is assumed, either on
-Linux or OSX.
-
-### No reliance on timestamps
-
-File presence is used to determine what needs to be built. This makes the
-results distributable and easily digestable by automated builders.
-
-### Each build only has its specified dependencies available at build-time.
-
-For each build, the sysroot is wiped and the (recursive) dependencies are
-installed. This makes each build deterministic, since there will never be any
-unknown files available to cause side-effects.
-
-### Each package is cached and only rebuilt as needed.
-
-Before building, a unique build-id is generated for each package. This id
-consists of a hash of all files used to build the package (Makefiles, packages,
-etc), and as well as a hash of the same data for each recursive dependency. If
-any portion of a package's build recipe changes, it will be rebuilt as well as
-any other package that depends on it. If any of the main makefiles (Makefile,
-funcs.mk, etc) are changed, all packages will be rebuilt. After building, the
-results are cached into a tarball that can be re-used and distributed.
-
-### Package build results are (relatively) deterministic.
-
-Each package is configured and patched so that it will yield the same
-build-results with each consequent build, within a reasonable set of
-constraints. Some things like timestamp insertion are unavoidable, and are
-beyond the scope of this system. Additionally, the toolchain itself must be
-capable of deterministic results. When revisions are properly bumped, a cached
-build should represent an exact single payload.
-
-### Sources are fetched and verified automatically
-
-Each package must define its source location and checksum. The build will fail
-if the fetched source does not match. Sources may be pre-seeded and/or cached
-as desired.
-
-### Self-cleaning
-
-Build and staging dirs are wiped after use, and any previous version of a
-cached result is removed following a successful build. Automated builders
-should be able to build each revision and store the results with no further
-intervention.
diff --git a/contrib/depends/funcs.mk b/contrib/depends/funcs.mk
deleted file mode 100644
index 757c941..0000000
--- a/contrib/depends/funcs.mk
+++ /dev/null
@@ -1,422 +0,0 @@
-define int_vars
-#Set defaults for vars which may be overridden per-package
-$(1)_cc=$($($(1)_type)_CC)
-$(1)_cxx=$($($(1)_type)_CXX)
-$(1)_objc=$($($(1)_type)_OBJC)
-$(1)_objcxx=$($($(1)_type)_OBJCXX)
-$(1)_ar=$($($(1)_type)_AR)
-$(1)_ranlib=$($($(1)_type)_RANLIB)
-$(1)_libtool=$($($(1)_type)_LIBTOOL)
-$(1)_nm=$($($(1)_type)_NM)
-$(1)_cflags=$($($(1)_type)_CFLAGS) $($($(1)_type)_$(release_type)_CFLAGS)
-$(1)_cxxflags=$($($(1)_type)_CXXFLAGS) $($($(1)_type)_$(release_type)_CXXFLAGS)
-$(1)_arflags=$($($(1)_type)_ARFLAGS) $($($(1)_type)_$(release_type)_ARFLAGS)
-$(1)_ldflags=$($($(1)_type)_LDFLAGS) $($($(1)_type)_$(release_type)_LDFLAGS) -L$($($(1)_type)_prefix)/lib
-$(1)_cppflags=$($($(1)_type)_CPPFLAGS) $($($(1)_type)_$(release_type)_CPPFLAGS) -I$($($(1)_type)_prefix)/include
-$(1)_recipe_hash:=
-endef
-
-define int_get_all_dependencies
-$(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dependencies))))
-endef
-
-define fetch_file_inner
- ( mkdir -p $$($(1)_download_dir) && echo Fetching $(3) from $(2) && \
- $(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(2)/$(3)" && \
- echo "$(5) $$($(1)_download_dir)/$(4).temp" > $$($(1)_download_dir)/.$(4).hash && \
- $(build_SHA256SUM) -c $$($(1)_download_dir)/.$(4).hash && \
- mv $$($(1)_download_dir)/$(4).temp $$($(1)_source_dir)/$(4) && \
- rm -rf $$($(1)_download_dir) )
-endef
-
-define fetch_file
- ( test -f $$($(1)_source_dir)/$(4) || \
- ( $(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(4),$(4),$(5)) || \
- $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5))))
-endef
-
-define int_get_build_recipe_hash
-$(eval $(1)_all_file_checksums:=$(shell cd $(BASEDIR) && $(build_SHA256SUM) $(subst $(BASEDIR)/,,$(meta_depends)) packages/$(1).mk $(addprefix patches/$(1)/,$($(1)_patches)) 2>/dev/null | cut -d" " -f1))
-$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
-endef
-
-define int_get_build_id
-$(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
-$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
-$(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
-$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string))
-$(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
-$(eval $(1)_build_id_long_legacy:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string_legacy))
-$(eval $(1)_build_id_legacy:=$(shell echo -n "$($(1)_build_id_long_legacy)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
-final_build_id_long+=$($(package)_build_id_long)
-
-#compute package-specific paths
-$(1)_build_subdir?=.
-$(1)_download_file?=$($(1)_file_name)
-$(1)_source_dir:=$(SOURCES_PATH)
-$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name)
-$(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
-$(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix)
-$(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
-$(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version)
-$(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir)
-$(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash
-$(1)_cached_buildinfo:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.txt
-$(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id)
-$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/
-$(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
-$(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources)
-$(1)_prebuilt_url:=$(PREBUILT_BASE_URL)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
-$(1)_prebuilt_checksum_url:=$(PREBUILT_BASE_URL)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash
-$(1)_prebuilt_buildinfo_url:=$(PREBUILT_BASE_URL)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.txt
-
-#stamps
-$(1)_fetched=$(SOURCES_PATH)/download-stamps/.stamp_fetched-$(1)-$($(1)_file_name).hash
-$(1)_extracted=$$($(1)_extract_dir)/.stamp_extracted
-$(1)_preprocessed=$$($(1)_extract_dir)/.stamp_preprocessed
-$(1)_cleaned=$$($(1)_extract_dir)/.stamp_cleaned
-$(1)_built=$$($(1)_build_dir)/.stamp_built
-$(1)_configured=$$($(1)_build_dir)/.stamp_configured
-$(1)_staged=$$($(1)_staging_dir)/.stamp_staged
-$(1)_postprocessed=$$($(1)_staging_prefix_dir)/.stamp_postprocessed
-$(1)_prebuilt_downloaded:=$(BASE_CACHE)/$(host)/$(1)/.stamp_prebuilt_downloaded-$($(1)_build_id)
-$(1)_cached_or_prebuilt:=$(BASE_CACHE)/$(host)/$(1)/.stamp_cached_or_prebuilt-$($(1)_build_id)
-$(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
-
-
-#default commands
-$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash))
-$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --strip-components=1 -xf $$($(1)_source)
-$(1)_preprocess_cmds ?=
-$(1)_build_cmds ?=
-$(1)_config_cmds ?=
-$(1)_stage_cmds ?=
-$(1)_set_vars ?=
-
-
-all_sources+=$$($(1)_fetched)
-endef
-#$(foreach dep_target,$($(1)_all_dependencies),$(eval $(1)_dependency_targets=$($(dep_target)_cached)))
-
-
-define int_config_attach_build_config
-$(eval $(call $(1)_set_vars,$(1)))
-$(1)_cflags+=$($(1)_cflags_$(release_type))
-$(1)_cflags+=$($(1)_cflags_$(host_arch)) $($(1)_cflags_$(host_arch)_$(release_type))
-$(1)_cflags+=$($(1)_cflags_$(host_os)) $($(1)_cflags_$(host_os)_$(release_type))
-$(1)_cflags+=$($(1)_cflags_$(host_arch)_$(host_os)) $($(1)_cflags_$(host_arch)_$(host_os)_$(release_type))
-
-$(1)_cxxflags+=$($(1)_cxxflags_$(release_type))
-$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)) $($(1)_cxxflags_$(host_arch)_$(release_type))
-$(1)_cxxflags+=$($(1)_cxxflags_$(host_os)) $($(1)_cxxflags_$(host_os)_$(release_type))
-$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)_$(host_os)) $($(1)_cxxflags_$(host_arch)_$(host_os)_$(release_type))
-
-$(1)_arflags+=$($(1)_arflags_$(release_type))
-$(1)_arflags+=$($(1)_arflags_$(host_arch)) $($(1)_arflags_$(host_arch)_$(release_type))
-$(1)_arflags+=$($(1)_arflags_$(host_os)) $($(1)_arflags_$(host_os)_$(release_type))
-$(1)_arflags+=$($(1)_arflags_$(host_arch)_$(host_os)) $($(1)_arflags_$(host_arch)_$(host_os)_$(release_type))
-
-$(1)_cppflags+=$($(1)_cppflags_$(release_type))
-$(1)_cppflags+=$($(1)_cppflags_$(host_arch)) $($(1)_cppflags_$(host_arch)_$(release_type))
-$(1)_cppflags+=$($(1)_cppflags_$(host_os)) $($(1)_cppflags_$(host_os)_$(release_type))
-$(1)_cppflags+=$($(1)_cppflags_$(host_arch)_$(host_os)) $($(1)_cppflags_$(host_arch)_$(host_os)_$(release_type))
-
-$(1)_ldflags+=$($(1)_ldflags_$(release_type))
-$(1)_ldflags+=$($(1)_ldflags_$(host_arch)) $($(1)_ldflags_$(host_arch)_$(release_type))
-$(1)_ldflags+=$($(1)_ldflags_$(host_os)) $($(1)_ldflags_$(host_os)_$(release_type))
-$(1)_ldflags+=$($(1)_ldflags_$(host_arch)_$(host_os)) $($(1)_ldflags_$(host_arch)_$(host_os)_$(release_type))
-
-$(1)_build_opts+=$$($(1)_build_opts_$(release_type))
-$(1)_build_opts+=$$($(1)_build_opts_$(host_arch)) $$($(1)_build_opts_$(host_arch)_$(release_type))
-$(1)_build_opts+=$$($(1)_build_opts_$(host_os)) $$($(1)_build_opts_$(host_os)_$(release_type))
-$(1)_build_opts+=$$($(1)_build_opts_$(host_arch)_$(host_os)) $$($(1)_build_opts_$(host_arch)_$(host_os)_$(release_type))
-
-$(1)_config_opts+=$$($(1)_config_opts_$(release_type))
-$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)) $$($(1)_config_opts_$(host_arch)_$(release_type))
-$(1)_config_opts+=$$($(1)_config_opts_$(host_os)) $$($(1)_config_opts_$(host_os)_$(release_type))
-$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)_$(host_os)) $$($(1)_config_opts_$(host_arch)_$(host_os)_$(release_type))
-
-$(1)_config_env+=$$($(1)_config_env_$(release_type))
-$(1)_config_env+=$($(1)_config_env_$(host_arch)) $($(1)_config_env_$(host_arch)_$(release_type))
-$(1)_config_env+=$($(1)_config_env_$(host_os)) $($(1)_config_env_$(host_os)_$(release_type))
-$(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$(host_arch)_$(host_os)_$(release_type))
-
-$(1)_build_env+=$$($(1)_build_env_$(release_type))
-$(1)_build_env+=$($(1)_build_env_$(host_arch)) $($(1)_build_env_$(host_arch)_$(release_type))
-$(1)_build_env+=$($(1)_build_env_$(host_os)) $($(1)_build_env_$(host_os)_$(release_type))
-$(1)_build_env+=$($(1)_build_env_$(host_arch)_$(host_os)) $($(1)_build_env_$(host_arch)_$(host_os)_$(release_type))
-
-ifneq ($$($(1)_ar_$(host_arch)),)
-$(1)_ar=$$($(1)_ar_$(host_arch))
-endif
-ifneq ($$($(1)_ar_$(host_os)),)
-$(1)_ar=$$($(1)_ar_$(host_os))
-endif
-ifneq ($$($(1)_ar_$(host_arch)_$(host_os)),)
-$(1)_ar=$$($(1)_ar_$(host_arch)_$(host_os))
-endif
-
-$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
-$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
-$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
-$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
-$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
-$(1)_autoconf_args=--prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" AR="$$($(1)_ar)"
-$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" AR="$$($(1)_ar)"
-
-ifeq ($(filter $(1),libusb unbound),)
-$(1)_autoconf_args += --disable-dependency-tracking
-$(1)_autoconf += --disable-dependency-tracking
-endif
-ifneq ($($(1)_nm),)
-$(1)_autoconf_args += NM="$$($(1)_nm)"
-$(1)_autoconf += NM="$$($(1)_nm)"
-endif
-ifneq ($($(1)_ranlib),)
-$(1)_autoconf_args += RANLIB="$$($(1)_ranlib)"
-$(1)_autoconf += RANLIB="$$($(1)_ranlib)"
-endif
-ifneq ($($(1)_ar),)
-$(1)_autoconf_args += AR="$$($(1)_ar)"
-$(1)_autoconf += AR="$$($(1)_ar)"
-endif
-ifneq ($($(1)_arflags),)
-$(1)_autoconf_args += ARFLAGS="$$($(1)_arflags)"
-$(1)_autoconf += ARFLAGS="$$($(1)_arflags)"
-endif
-ifneq ($($(1)_cflags),)
-$(1)_autoconf_args += CFLAGS="$$($(1)_cflags)"
-$(1)_autoconf += CFLAGS="$$($(1)_cflags)"
-endif
-ifneq ($($(1)_cxxflags),)
-$(1)_autoconf_args += CXXFLAGS="$$($(1)_cxxflags)"
-$(1)_autoconf += CXXFLAGS="$$($(1)_cxxflags)"
-endif
-ifneq ($($(1)_cppflags),)
-$(1)_autoconf_args += CPPFLAGS="$$($(1)_cppflags)"
-$(1)_autoconf += CPPFLAGS="$$($(1)_cppflags)"
-endif
-ifneq ($($(1)_ldflags),)
-$(1)_autoconf_args += LDFLAGS="$$($(1)_ldflags)"
-$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
-endif
-endef
-
-COMPRESS_CMD := $(shell if command -v pigz >/dev/null 2>&1; then echo "pigz"; else echo "gzip"; fi)
-
-define int_add_cmds
-$($(1)_fetched):
- $(AT)echo "=== Fetching $(1) v$($(1)_version) ==="
- $(AT)echo " Source directory: $($(1)_source_dir)"
- $(AT)echo " Download file: $($(1)_download_file)"
- $(AT)mkdir -p $$(@D) $(SOURCES_PATH)
- $(AT)rm -f $$@
- $(AT)touch $$@
- $(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1))
- $(AT)cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);)
- $(AT)echo " Fetch completed: $$@"
- $(AT)touch $$@
-$($(1)_extracted): | $($(1)_fetched)
- $(AT)echo "=== Extracting $(1) v$($(1)_version) ==="
- $(AT)echo " Build ID: $($(1)_build_id)"
- $(AT)echo " Extract directory: $($(1)_extract_dir)"
- $(AT)mkdir -p $$(@D)
- $(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1))
- $(AT)echo " Extract completed: $$@"
- $(AT)touch $$@
-$($(1)_preprocessed): | $($(1)_dependencies) $($(1)_extracted)
- $(AT)echo "=== Preprocessing $(1) v$($(1)_version) ==="
- $(AT)echo " Dependencies: $($(1)_dependencies)"
- $(AT)echo " Patch directory: $($(1)_patch_dir)"
- $(AT)echo " Patches: $($(1)_patches)"
- $(AT)mkdir -p $$(@D) $($(1)_patch_dir)
- $(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
- $(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1))
- $(AT)echo " Preprocessing completed: $$@"
- $(AT)touch $$@
-$($(1)_configured): | $($(1)_preprocessed)
- $(AT)echo "=== Configuring $(1) v$($(1)_version) ==="
- $(AT)echo " Build directory: $($(1)_build_dir)"
- $(AT)echo " Host prefix: $(host_prefix)"
- $(AT)echo " All dependencies: $($(1)_all_dependencies)"
- $(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar xf $($(package)_cached); )
- $(AT)mkdir -p $$(@D)
- $(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1))
- $(AT)echo " Configuration completed: $$@"
- $(AT)touch $$@
-$($(1)_built): | $($(1)_configured)
- $(AT)echo "=== Building $(1) v$($(1)_version) ==="
- $(AT)echo " Build directory: $($(1)_build_dir)"
- $(AT)echo " Build environment: $($(1)_build_env)"
- $(AT)mkdir -p $$(@D)
- $(AT)+cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1))
- $(AT)echo " Build completed: $$@"
- $(AT)touch $$@
-$($(1)_staged): | $($(1)_built)
- $(AT)echo "=== Staging $(1) v$($(1)_version) ==="
- $(AT)echo " Staging directory: $($(1)_staging_dir)"
- $(AT)echo " Staging prefix: $($(1)_staging_prefix_dir)"
- $(AT)mkdir -p $($(1)_staging_dir)/$(host_prefix)
- $(AT)cd $($(1)_build_dir); $($(1)_stage_env) $(call $(1)_stage_cmds, $(1))
- $(AT)echo " Removing extract directory: $($(1)_extract_dir)"
- $(AT)rm -rf $($(1)_extract_dir)
- $(AT)echo " Staging completed: $$@"
- $(AT)touch $$@
-$($(1)_postprocessed): | $($(1)_staged)
- $(AT)echo "=== Postprocessing $(1) v$($(1)_version) ==="
- $(AT)echo " Postprocessing directory: $($(1)_staging_prefix_dir)"
- $(AT)cd $($(1)_staging_prefix_dir); $(call $(1)_postprocess_cmds)
- $(AT)echo " Postprocessing completed: $$@"
- $(AT)touch $$@
-$($(1)_prebuilt_downloaded): | $($(1)_dependencies)
- $(AT)echo "=== Attempting to download prebuilt $(1) v$($(1)_version) ==="
- $(AT)echo " Build ID: $($(1)_build_id)"
- $(AT)echo " Download URL: $($(1)_prebuilt_url)"
- $(AT)mkdir -p $$(@D)
- $(AT)mkdir -p $(dir $($(1)_cached))
- $(AT)( \
- echo " Downloading $(1) prebuilt files..." && \
- $(build_DOWNLOAD) "$($(1)_cached).tmp" "$($(1)_prebuilt_url)" && \
- $(build_DOWNLOAD) "$($(1)_cached_checksum).tmp" "$($(1)_prebuilt_checksum_url)" && \
- $(build_DOWNLOAD) "$($(1)_cached_buildinfo).tmp" "$($(1)_prebuilt_buildinfo_url)" && \
- echo " Verifying checksum..." && \
- cd $(dir $($(1)_cached)) && \
- sed 's/$(notdir $($(1)_cached))/$(notdir $($(1)_cached)).tmp/' "$($(1)_cached_checksum).tmp" > "$($(1)_cached_checksum).tmp.verify" && \
- $(build_SHA256SUM) -c "$($(1)_cached_checksum).tmp.verify" && \
- rm -f "$($(1)_cached_checksum).tmp.verify" && \
- echo " Moving files to final location..." && \
- mv "$($(1)_cached).tmp" "$($(1)_cached)" && \
- mv "$($(1)_cached_checksum).tmp" "$($(1)_cached_checksum)" && \
- mv "$($(1)_cached_buildinfo).tmp" "$($(1)_cached_buildinfo)" && \
- echo " Prebuilt download completed: $$@" && \
- touch $$@ \
- ) || ( \
- echo " Download failed for $(1)" && \
- rm -f "$($(1)_cached).tmp" "$($(1)_cached_checksum).tmp" "$($(1)_cached_buildinfo).tmp" && \
- if [ "$(DEPENDS_UNTRUSTED_FAST_BUILDS)" = "forced" ]; then \
- echo " Error: DEPENDS_UNTRUSTED_FAST_BUILDS=forced but prebuilt download failed" && \
- exit 1; \
- else \
- echo " Falling back to building from source..." && \
- exit 1; \
- fi \
- )
-$($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
- $(AT)echo "=== Caching $(1) v$($(1)_version) ==="
- $(AT)echo " Build ID: $($(1)_build_id)"
- $(AT)echo " Cache file: $$@"
- $(AT)echo " Compression: $(COMPRESS_CMD)"
- $(AT)cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | tar --no-recursion --use-compress-program='$(COMPRESS_CMD)' -cf $$($(1)_staging_dir)/$$(@F) -T -
- $(AT)mkdir -p $$(@D)
- $(AT)mv $$($(1)_staging_dir)/$$(@F) $$(@)
- $(AT)echo " Removing staging directory: $($(1)_staging_dir)"
- $(AT)rm -rf $($(1)_staging_dir)
- $(AT)echo " Caching completed: $$@"
-$($(1)_cached_checksum): $($(1)_cached)
- $(AT)echo "=== Generating checksum for $(1) v$($(1)_version) ==="
- $(AT)echo " Checksum file: $$@"
- $(AT)cd $$(@D); $(build_SHA256SUM) $$(<F) > $$(@)
- $(AT)echo " Checksum completed: $$@"
- $(AT)echo "=== Generating build info for $(1) v$($(1)_version) ==="
- $(AT)echo " Build info file: $$($(1)_cached_buildinfo)"
- $(AT)echo "# Build Info for $(1) v$($(1)_version)" > $$($(1)_cached_buildinfo)
- $(AT)echo "# Generated on: $$(shell date)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Package: $(1)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Version: $($(1)_version)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Host: $(host)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Release Type: $(release_type)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Build ID (current): $($(1)_build_id)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Build ID (legacy): $($(1)_build_id_legacy)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Build ID String (current): $($(1)_build_id_long)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Build ID String (legacy): $($(1)_build_id_long_legacy)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Dependencies: $($(1)_dependencies)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "All Dependencies: $($(1)_all_dependencies)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Recipe Hash: $($(1)_recipe_hash)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Recipe Files: $($(1)_all_file_checksums)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Toolchain (current): $($($(1)_type)_id_string)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Toolchain (legacy): $($($(1)_type)_id_string_legacy)" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Build Tools (current):" >> $$($(1)_cached_buildinfo)
- $(AT)echo " CC: $$(shell basename $($($(1)_type)_CC) 2>/dev/null || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo " CXX: $$(shell basename $($($(1)_type)_CXX) 2>/dev/null || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo " AR: $$(shell basename $($($(1)_type)_AR) 2>/dev/null || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo " RANLIB: $$(shell basename $($($(1)_type)_RANLIB) 2>/dev/null || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo " STRIP: $$(shell basename $($($(1)_type)_STRIP) 2>/dev/null || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Build Tools (legacy versions):" >> $$($(1)_cached_buildinfo)
- $(AT)echo " CC: $$(shell $($($(1)_type)_CC) --version 2>/dev/null | head -1 || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo " CXX: $$(shell $($($(1)_type)_CXX) --version 2>/dev/null | head -1 || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo " AR: $$(shell $($($(1)_type)_AR) --version 2>/dev/null | head -1 || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo " RANLIB: $$(shell $($($(1)_type)_RANLIB) --version 2>/dev/null | head -1 || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo " STRIP: $$(shell $($($(1)_type)_STRIP) --version 2>/dev/null | head -1 || echo "unknown")" >> $$($(1)_cached_buildinfo)
- $(AT)echo "" >> $$($(1)_cached_buildinfo)
- $(AT)echo "Salt Values:" >> $$($(1)_cached_buildinfo)
- $(AT)echo " BUILD_ID_SALT: $(BUILD_ID_SALT)" >> $$($(1)_cached_buildinfo)
- $(AT)echo " HOST_ID_SALT: $(HOST_ID_SALT)" >> $$($(1)_cached_buildinfo)
- $(AT)echo " Build info completed: $$($(1)_cached_buildinfo)"
-
-$($(1)_cached_or_prebuilt):
- $(AT)mkdir -p $$(@D)
- $(AT)if [ "$(DEPENDS_UNTRUSTED_FAST_BUILDS)" = "yes" ]; then \
- echo "=== Trying prebuilt download for $(1) v$($(1)_version) ===" && \
- ($(MAKE) -f $(BASEDIR)/Makefile $($(1)_prebuilt_downloaded) && touch $$@) || \
- (echo " Prebuilt download failed, falling back to building from source..." && \
- $(MAKE) -f $(BASEDIR)/Makefile $($(1)_cached_checksum) && touch $$@); \
- elif [ "$(DEPENDS_UNTRUSTED_FAST_BUILDS)" = "forced" ]; then \
- echo "=== Forced prebuilt download for $(1) v$($(1)_version) ===" && \
- $(MAKE) -f $(BASEDIR)/Makefile $($(1)_prebuilt_downloaded) && touch $$@; \
- else \
- echo "=== Building from source for $(1) v$($(1)_version) ===" && \
- $(MAKE) -f $(BASEDIR)/Makefile $($(1)_cached_checksum) && touch $$@; \
- fi
-
-.PHONY: $(1)
-$(1): | $($(1)_cached_or_prebuilt)
-.SECONDARY: $($(1)_cached) $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched) $($(1)_cached_buildinfo) $($(1)_prebuilt_downloaded) $($(1)_cached_or_prebuilt)
-
-endef
-
-stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum prebuilt_downloaded
-
-define ext_add_stages
-$(foreach stage,$(stages),
- $(1)_$(stage): $($(1)_$(stage))
- .PHONY: $(1)_$(stage))
-endef
-
-# These functions create the build targets for each package. They must be
-# broken down into small steps so that each part is done for all packages
-# before moving on to the next step. Otherwise, a package's info
-# (build-id for example) would only be available to another package if it
-# happened to be computed already.
-
-#set the type for host/build packages.
-$(foreach native_package,$(native_packages),$(eval $(native_package)_type=build))
-$(foreach package,$(packages),$(eval $(package)_type=$(host_arch)_$(host_os)))
-
-#set overridable defaults
-$(foreach package,$(all_packages),$(eval $(call int_vars,$(package))))
-
-#include package files
-$(foreach package,$(all_packages),$(eval include packages/$(package).mk))
-
-#compute a hash of all files that comprise this package's build recipe
-$(foreach package,$(all_packages),$(eval $(call int_get_build_recipe_hash,$(package))))
-
-#generate a unique id for this package, incorporating its dependencies as well
-$(foreach package,$(all_packages),$(eval $(call int_get_build_id,$(package))))
-
-#compute final vars after reading package vars
-$(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$(package))))
-
-#create build targets
-$(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package))))
-
-#special exception: if a toolchain package exists, all non-native packages depend on it
-$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) ))
diff --git a/contrib/depends/gen_toolchain.cmake.sh b/contrib/depends/gen_toolchain.cmake.sh
new file mode 100755
index 0000000..1a12df7
--- /dev/null
+++ b/contrib/depends/gen_toolchain.cmake.sh
@@ -0,0 +1,464 @@
+#!/bin/bash
+
+cd $(dirname $0);
+
+outfile="$1";
+
+function usage {
+ echo "Usage: HOST=$(gcc -dumpmachine) $0 outfile";
+}
+
+if [[ "x$outfile" == "x" ]];
+then
+ usage
+ echo "outfile not specified"
+ exit 1;
+fi
+
+if [[ "x$HOST" == "x" ]];
+then
+ usage
+ echo "HOST env missing"
+ exit 2
+fi
+
+outdir=$(dirname $outfile)
+if [[ ! -d "$outdir" ]];
+then
+ usage
+ echo "$outdir doesn't exist"
+ exit 3
+fi
+
+set -x
+source $HOST/_source_me
+
+sed -e "s|@HOST@|$TARGET|g" \
+ -e "s|@CC@|$CC|g" \
+ -e "s|@CXX@|$CXX|g" \
+ -e "s|@AR@|$AR|g" \
+ -e "s|@RANLIB@|$RANLIB|g" \
+ -e "s|@NM@|$NM|g" \
+ -e "s|@STRIP@|$STRIP|g" \
+ -e "s|@CFLAGS@|$CFLAGS|g" \
+ -e "s|@CXXFLAGS@|$CXXFLAGS|g" \
+ -e "s|@CPPFLAGS@|$CPPFLAGS|g" \
+ -e "s|@LDFLAGS@|$LDFLAGS|g" \
+ -e "s|@release_type@|Release|g" \
+ -e "s|@build_tests@|OFF|g" \
+ -e "s|@cmake_system_name@|$CMAKE_SYSTEM_NAME|g" \
+ -e "s|@prefix@|$PREFIX|g" \
+ -e "s|@nativeprefix@|$NATIVEPREFIX|g" \
+ -e "s|@arch@|$ARCH|g" > $outfile <<EOF
+cmake_minimum_required(VERSION 3.13) # Ensure CMake version supports CMP0077
+cmake_policy(SET CMP0077 NEW) # Ensure 'option' honors normal variables
+
+# Set the system name to one of Android, Darwin, iOS, FreeBSD, Linux, or Windows
+SET(CMAKE_SYSTEM_NAME @cmake_system_name@)
+SET(CMAKE_SYSTEM_PROCESSOR @arch@)
+SET(CMAKE_BUILD_TYPE @release_type@)
+SET(CMAKE_CXX_STANDARD 14)
+LIST(APPEND CMAKE_PROGRAM_PATH @nativeprefix@/bin)
+SET(MANUAL_SUBMODULES true)
+OPTION(STATIC "Link libraries statically" ON)
+OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF)
+OPTION(BUILD_TESTS "Build tests." OFF)
+
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+SET(STATIC ON)
+SET(UNBOUND_STATIC ON)
+SET(ARCH "default")
+
+SET(BUILD_TESTS @build_tests@)
+SET(TREZOR_DEBUG @build_tests@)
+
+# where is the target environment
+SET(CMAKE_FIND_ROOT_PATH @prefix@ /usr)
+
+SET(ENV{PKG_CONFIG_PATH} @prefix@/lib/pkgconfig)
+
+SET(Readline_ROOT_DIR @prefix@)
+SET(Readline_INCLUDE_DIR @prefix@/include)
+SET(Readline_LIBRARY @prefix@/lib/libreadline.a)
+SET(Terminfo_LIBRARY @prefix@/lib/libtinfo.a)
+
+SET(UNBOUND_INCLUDE_DIR @prefix@/include)
+SET(UNBOUND_LIBRARIES @prefix@/lib/libunbound.a)
+
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
+SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
+SET(LIBUNWIND_LIBRARIES @prefix@/lib/libunwind.a)
+SET(LIBUNWIND_LIBRARY_DIRS @prefix@/lib)
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+SET(LIBUSB-1.0_LIBRARY @prefix@/lib/libusb-1.0.a)
+SET(LIBUDEV_LIBRARY @prefix@/lib/libudev.a)
+
+SET(Protobuf_FOUND 1)
+SET(Protobuf_PROTOC_EXECUTABLE @nativeprefix@/bin/protoc CACHE FILEPATH "Path to the native protoc")
+SET(Protobuf_INCLUDE_DIR @prefix@/include CACHE PATH "Protobuf include dir")
+SET(Protobuf_INCLUDE_DIRS @prefix@/include CACHE PATH "Protobuf include dir")
+SET(Protobuf_LIBRARY @prefix@/lib/libprotobuf.a CACHE FILEPATH "Protobuf library")
+endif()
+
+endif()
+
+SET(ZMQ_INCLUDE_PATH @prefix@/include)
+SET(ZMQ_LIB @prefix@/lib/libzmq.a)
+
+SET(Boost_IGNORE_SYSTEM_PATH ON)
+SET(BOOST_ROOT @prefix@)
+SET(BOOST_INCLUDEDIR @prefix@/include)
+SET(BOOST_LIBRARYDIR @prefix@/lib)
+SET(Boost_IGNORE_SYSTEM_PATHS_DEFAULT OFF)
+SET(Boost_NO_SYSTEM_PATHS ON)
+SET(Boost_USE_STATIC_LIBS ON)
+SET(Boost_USE_STATIC_RUNTIME ON)
+
+SET(OPENSSL_ROOT_DIR @prefix@)
+SET(ARCHITECTURE @arch@)
+
+# for libraries and headers in the target directories
+set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
+set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
+set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
+
+add_definitions(-DHIDAPI_DUMMY=ON)
+set(HIDAPI_DUMMY ON)
+
+# specify the cross compiler to be used. Darwin uses clang provided by the SDK.
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ if(ARCHITECTURE STREQUAL "aarch64")
+ SET(CLANG_TARGET "arm64-apple-darwin11")
+ SET(CONF_TRIPLE "aarch64-apple-darwin11")
+ SET(BUILD_TAG "mac-armv8")
+ SET(CMAKE_OSX_ARCHITECTURES "arm64")
+ set(ARM ON)
+ set(ARM_ID "armv8-a")
+ else()
+ SET(CLANG_TARGET "x86_64-apple-darwin11")
+ SET(CONF_TRIPLE "x86_64-apple-darwin11")
+ SET(BUILD_TAG "mac-x64")
+ SET(CMAKE_OSX_ARCHITECTURES "x86_64")
+ endif()
+ SET(_CMAKE_TOOLCHAIN_PREFIX @nativeprefix@/bin/\${CONF_TRIPLE}-)
+ SET(CMAKE_C_COMPILER @CC@)
+ SET(CMAKE_C_COMPILER_TARGET \${CLANG_TARGET})
+ SET(CMAKE_C_FLAGS_INIT -B\${_CMAKE_TOOLCHAIN_PREFIX})
+ SET(CMAKE_CXX_COMPILER @CXX@)
+ SET(CMAKE_CXX_COMPILER_TARGET \${CLANG_TARGET})
+ SET(CMAKE_CXX_FLAGS_INIT -B\${_CMAKE_TOOLCHAIN_PREFIX})
+ SET(CMAKE_ASM_COMPILER_TARGET \${CLANG_TARGET})
+ SET(CMAKE_ASM-ATT_COMPILER_TARGET \${CLANG_TARGET})
+ SET(APPLE True)
+ SET(BUILD_64 ON)
+ SET(BREW OFF)
+ SET(PORT OFF)
+ SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
+ SET(CMAKE_CXX_STANDARD 14)
+ SET(LLVM_ENABLE_PIC OFF)
+ SET(LLVM_ENABLE_PIE OFF)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ add_definitions(-DUSE_DEVICE_TREZOR=OFF)
+ SET(ANDROID TRUE)
+ if(ARCHITECTURE STREQUAL "armv7a")
+ SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
+ SET(CMAKE_SYSTEM_PROCESSOR "armv7-a")
+ SET(CMAKE_ANDROID_ARM_MODE ON)
+ SET(CMAKE_C_COMPILER_TARGET armv7a-linux-androideabi21)
+ SET(CMAKE_CXX_COMPILER_TARGET armv7a-linux-androideabi21)
+ SET(_CMAKE_TOOLCHAIN_PREFIX armv7a-linux-androideabi21-)
+ elseif(ARCHITECTURE STREQUAL "aarch64")
+ SET(CMAKE_ANDROID_ARCH_ABI "arm64-v8a")
+ SET(CMAKE_SYSTEM_PROCESSOR "aarch64")
+ elseif(ARCHITECTURE STREQUAL "x86_64")
+ SET(MONERO_WALLET_CRYPTO_LIBRARY amd64-64-24k)
+ SET(CMAKE_ANDROID_ARCH_ABI x86_64)
+ SET(CMAKE_SYSTEM_PROCESSOR "x86_64")
+ else()
+ message(SEND_ERROR Unsupported android architecture)
+ endif()
+ # SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN @nativeprefix@)
+ SET(_ANDROID_STANDALONE_TOOLCHAIN_API 21)
+ SET(__ANDROID_API__ 21)
+ SET(CMAKE_SYSTEM_VERSION 1)
+ SET(CMAKE_C_COMPILER @CC@)
+ SET(CMAKE_CXX_COMPILER @CXX@)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ set(USE_DEVICE_TREZOR OFF)
+ add_definitions(-DUSE_DEVICE_LEDGER=ON)
+ SET(CMAKE_C_COMPILER @CC@)
+ SET(CMAKE_CXX_COMPILER @CXX@)
+else()
+ SET(CMAKE_C_COMPILER @CC@)
+ SET(CMAKE_CXX_COMPILER @CXX@)
+endif()
+
+if(ARCHITECTURE STREQUAL "arm")
+ set(ARCH "armv7-a")
+ set(ARM ON)
+ set(ARM_ID "armv7-a")
+ set(BUILD_64 OFF)
+ set(CMAKE_BUILD_TYPE release)
+ if(ANDROID)
+ set(BUILD_TAG "android-armv7")
+ else()
+ set(BUILD_TAG "linux-armv7")
+ endif()
+ set(ARM7)
+elseif(ARCHITECTURE STREQUAL "aarch64")
+ set(ARCH "armv8-a")
+ set(ARM ON)
+ set(ARM_ID "armv8-a")
+ if(ANDROID)
+ set(BUILD_TAG "android-armv8")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(BUILD_TAG "linux-armv8")
+ endif()
+ set(BUILD_64 ON)
+endif()
+
+if(ARCHITECTURE STREQUAL "riscv64")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(BUILD_TAG "linux-riscv64")
+ endif()
+ set(ARCH_ID "riscv64")
+ set(ARCH "rv64gc")
+endif()
+
+if(ARCHITECTURE STREQUAL "i686")
+ SET(ARCH_ID "i386")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(BUILD_TAG "linux-x86")
+ SET(LINUX_32 ON)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ set(BUILD_TAG "win-x32")
+ endif()
+endif()
+
+if(ARCHITECTURE STREQUAL "x86_64")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(BUILD_TAG "linux-x64")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ set(BUILD_TAG "freebsd-x64")
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ set(BUILD_TAG "win-x64")
+ endif()
+ SET(ARCH_ID "x86_64")
+endif()
+
+link_directories(@prefix@/lib)
+include_directories(@prefix@/include)
+if(EXISTS "@prefix@/include/c++/15.2.0")
+ include_directories("@prefix@/include/c++/15.2.0")
+endif()
+include_directories(@prefix@/include/wownero_seed)
+
+add_definitions(-DPOLYSEED_STATIC=ON)
+add_definitions(-DMOBILE_WALLET_BUILD)
+
+if (ANDROID OR IOS)
+ add_definitions(-DFORCE_USE_HEAP=1)
+endif()
+
+#Create a new global cmake flag that indicates building with depends
+set (DEPENDS true)
+
+# github.com/mrcyjanek/cmake-toolchain
+
+if(DEFINED ENV{HOST})
+ string(TOLOWER "$ENV{HOST}" _host)
+ message(STATUS "toolchain: HOST = ${_host}")
+
+ if(_host MATCHES "darwin")
+ set(CMAKE_SYSTEM_NAME Darwin)
+ if(_host MATCHES "aarch64")
+ set(CMAKE_SYSTEM_PROCESSOR arm64)
+ endif()
+ if(_host MATCHES "x86_64")
+ set(CMAKE_SYSTEM_PROCESSOR x86_64)
+ endif()
+
+ elseif(_host MATCHES "ios")
+ set(CMAKE_SYSTEM_NAME iOS)
+ if(_host MATCHES "aarch64")
+ set(CMAKE_SYSTEM_PROCESSOR arm64)
+ endif()
+ if(_host MATCHES "x86_64")
+ set(CMAKE_SYSTEM_PROCESSOR x86_64)
+ endif()
+ if(_host MATCHES "simulator")
+ set(_ios_simulator TRUE)
+ endif()
+
+ elseif(_host MATCHES "linux")
+ set(CMAKE_SYSTEM_NAME Linux)
+ if(_host MATCHES "aarch64")
+ set(CMAKE_SYSTEM_PROCESSOR aarch64)
+ endif()
+ if(_host MATCHES "armv7")
+ set(CMAKE_SYSTEM_PROCESSOR armv7)
+ endif()
+ if(_host MATCHES "x86_64")
+ set(CMAKE_SYSTEM_PROCESSOR x86_64)
+ endif()
+
+ elseif(_host MATCHES "android")
+ set(CMAKE_SYSTEM_NAME Android)
+
+ if(_host MATCHES "aarch64")
+ set(CMAKE_SYSTEM_PROCESSOR aarch64)
+ endif()
+ if(_host MATCHES "armv7")
+ set(CMAKE_SYSTEM_PROCESSOR armv7)
+ endif()
+ if(_host MATCHES "x86_64")
+ set(CMAKE_SYSTEM_PROCESSOR x86_64)
+ endif()
+
+ set(CMAKE_ANDROID_STL_TYPE c++_static)
+ set(BUILD_SHARED_LIBS OFF)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+
+ elseif(_host MATCHES "mingw" OR _host MATCHES "w64")
+ set(CMAKE_SYSTEM_NAME Windows)
+ if(_host MATCHES "x86_64")
+ set(CMAKE_SYSTEM_PROCESSOR x86_64)
+ endif()
+ if(_host MATCHES "i686")
+ set(CMAKE_SYSTEM_PROCESSOR i686)
+ endif()
+ endif()
+endif()
+
+function(_set_compiler_from_env LANG ENVNAME CMAKE_COMPILER_VAR CMAKE_FLAGS_VAR)
+ if(NOT DEFINED ENV{\${ENVNAME}})
+ return()
+ endif()
+
+ separate_arguments(_tokens UNIX_COMMAND "\$ENV{\${ENVNAME}}")
+ list(LENGTH _tokens _tlen)
+ if(_tlen EQUAL 0)
+ return()
+ endif()
+
+ list(GET _tokens 0 _exe)
+ list(REMOVE_AT _tokens 0) # remaining tokens are flags
+
+ if(NOT IS_ABSOLUTE "\${_exe}")
+ find_program(_found_exe "\${_exe}")
+ if(_found_exe)
+ set(_exe "\${_found_exe}")
+ endif()
+ endif()
+
+ set(\${CMAKE_COMPILER_VAR} "\${_exe}" CACHE PATH "" FORCE)
+
+ if(_tokens)
+ string(REPLACE ";" " " _token_flags "\${_tokens}")
+ else()
+ set(_token_flags "")
+ endif()
+
+ if("\${ENVNAME}" STREQUAL "CC")
+ set(_env_flags "\$ENV{CFLAGS}")
+ elseif("\${ENVNAME}" STREQUAL "CXX")
+ set(_env_flags "\$ENV{CXXFLAGS}")
+ else()
+ set(_env_flags "")
+ endif()
+
+ if(_token_flags AND _env_flags)
+ set(_final_flags "\${_token_flags} \${_env_flags}")
+ elseif(_token_flags)
+ set(_final_flags "\${_token_flags}")
+ elseif(_env_flags)
+ set(_final_flags "\${_env_flags}")
+ else()
+ set(_final_flags "")
+ endif()
+
+ if(_final_flags)
+ set(\${CMAKE_FLAGS_VAR} "\${_final_flags}" CACHE STRING "" FORCE)
+ endif()
+
+ message(STATUS "toolchain: \${CMAKE_COMPILER_VAR} = \${_exe}")
+ if(_final_flags)
+ message(STATUS "toolchain: \${CMAKE_FLAGS_VAR} = \${_final_flags}")
+ endif()
+endfunction()
+
+_set_compiler_from_env("C" "CC" "CMAKE_C_COMPILER" "CMAKE_C_FLAGS_INIT")
+_set_compiler_from_env("CXX" "CXX" "CMAKE_CXX_COMPILER" "CMAKE_CXX_FLAGS_INIT")
+
+if(NOT DEFINED CMAKE_C_FLAGS_INIT AND DEFINED ENV{CFLAGS})
+ set(CMAKE_C_FLAGS_INIT "\$ENV{CFLAGS}" CACHE STRING "" FORCE)
+ message(STATUS "toolchain: fallback CMAKE_C_FLAGS_INIT = \$ENV{CFLAGS}")
+endif()
+if(NOT DEFINED CMAKE_CXX_FLAGS_INIT AND DEFINED ENV{CXXFLAGS})
+ set(CMAKE_CXX_FLAGS_INIT "\$ENV{CXXFLAGS}" CACHE STRING "" FORCE)
+ message(STATUS "toolchain: fallback CMAKE_CXX_FLAGS_INIT = \$ENV{CXXFLAGS}")
+endif()
+
+if(DEFINED ENV{LDFLAGS})
+ set(CMAKE_EXE_LINKER_FLAGS_INIT "\$ENV{LDFLAGS}" CACHE STRING "" FORCE)
+ set(CMAKE_SHARED_LINKER_FLAGS_INIT "\$ENV{LDFLAGS}" CACHE STRING "" FORCE)
+ set(CMAKE_MODULE_LINKER_FLAGS_INIT "\$ENV{LDFLAGS}" CACHE STRING "" FORCE)
+ message(STATUS "toolchain: LDFLAGS = \$ENV{LDFLAGS}")
+endif()
+
+foreach(var AR RANLIB STRIP NM INSTALL_NAME_TOOL LIBTOOL OTOOL)
+ if(DEFINED ENV{\${var}})
+ # some CMake variables are named CMAKE_AR, CMAKE_RANLIB etc.
+ set(CMAKE_\${var} "\$ENV{\${var}}" CACHE PATH "" FORCE)
+ message(STATUS "toolchain: tool \${var} = \$ENV{\${var}}")
+ endif()
+endforeach()
+
+if(DEFINED ENV{SDK_PATH})
+ set(CMAKE_SYSROOT "\$ENV{SDK_PATH}" CACHE PATH "" FORCE)
+ # also set OSX-specific variable (useful for Apple targets)
+ set(CMAKE_OSX_SYSROOT "\$ENV{SDK_PATH}" CACHE PATH "" FORCE)
+ message(STATUS "toolchain: SDK_PATH -> CMAKE_SYSROOT = \$ENV{SDK_PATH}")
+elseif(DEFINED ENV{SYSROOT})
+ set(CMAKE_SYSROOT "\$ENV{SYSROOT}" CACHE PATH "" FORCE)
+ set(CMAKE_OSX_SYSROOT "\$ENV{SYSROOT}" CACHE PATH "" FORCE)
+ message(STATUS "toolchain: SYSROOT -> CMAKE_SYSROOT = \$ENV{SYSROOT}")
+else()
+ # if this is an iOS simulator/native iOS mapping and no SDK_PATH was set,
+ # set the logical name so CMake + Apple toolchain can pick it up if available
+ if(_ios_simulator)
+ set(CMAKE_OSX_SYSROOT iphonesimulator CACHE STRING "" FORCE)
+ elseif(DEFINED _ios_simulator AND NOT _ios_simulator)
+ set(CMAKE_OSX_SYSROOT iphoneos CACHE STRING "" FORCE)
+ endif()
+endif()
+
+if(DEFINED ENV{OSX_MIN_VERSION})
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "\$ENV{OSX_MIN_VERSION}" CACHE STRING "" FORCE)
+ message(STATUS "toolchain: CMAKE_OSX_DEPLOYMENT_TARGET = \$ENV{OSX_MIN_VERSION}")
+endif()
+
+if(DEFINED ENV{PREFIX})
+ set(CMAKE_FIND_ROOT_PATH "\$ENV{PREFIX}" CACHE PATH "" FORCE)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+ message(STATUS "toolchain: CMAKE_FIND_ROOT_PATH = \$ENV{PREFIX}")
+endif()
+
+if(DEFINED ENV{PKG_CONFIG_PATH})
+ set(ENV{PKG_CONFIG_PATH} "\$ENV{PKG_CONFIG_PATH}")
+ message(STATUS "toolchain: PKG_CONFIG_PATH = \$ENV{PKG_CONFIG_PATH}")
+endif()
+
+if(DEFINED CMAKE_C_COMPILER)
+else()
+ message(WARNING "toolchain: C compiler not set (ENV{CC} missing).")
+endif()
+
+if(DEFINED CMAKE_CXX_COMPILER)
+else()
+ message(WARNING "toolchain: C++ compiler not set (ENV{CXX} missing).")
+endif()
+EOF
diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk
deleted file mode 100644
index 827103c..0000000
--- a/contrib/depends/hosts/android.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-ANDROID_API=21
-host_toolchain=nonexistent
-ifeq ($(host_arch),armv7a)
-host_toolchain=armv7a-linux-androideabi${ANDROID_API}-
-endif
-ifeq ($(host_arch),x86_64)
-host_toolchain=x86_64-linux-android${ANDROID_API}-
-endif
-ifeq ($(host_arch),i686)
-host_toolchain=i686-linux-android${ANDROID_API}-
-endif
-ifeq ($(host_arch),aarch64)
-host_toolchain=aarch64-linux-android${ANDROID_API}-
-endif
-
-android_CC=$(host_toolchain)clang
-android_CXX=$(host_toolchain)clang++
-android_RANLIB=llvm-ranlib
-android_AR=llvm-ar
-
-android_CFLAGS=-pipe
-android_CXXFLAGS=$(android_CFLAGS)
-android_ARFLAGS=crsD
-
-android_release_CFLAGS=-O2
-android_release_CXXFLAGS=$(android_release_CFLAGS)
-
-android_debug_CFLAGS=-g -O0
-android_debug_CXXFLAGS=$(android_debug_CFLAGS)
-
-android_native_toolchain=android_ndk
-
diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
deleted file mode 100644
index aa5d8fc..0000000
--- a/contrib/depends/hosts/darwin.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-OSX_MIN_VERSION=10.14
-LD64_VERSION=609
-ifeq (aarch64, $(host_arch))
-CC_target=arm64-apple-$(host_os)
-else
-CC_target=$(host)
-endif
-darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
-darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
-
-darwin_RANLIB=$(host_prefix)/native/bin/$(host)-ranlib
-darwin_AR=$(host_prefix)/native/bin/$(host)-ar
-darwin_CFLAGS=-pipe
-darwin_CXXFLAGS=$(darwin_CFLAGS)
-darwin_ARFLAGS=cr
-
-darwin_release_CFLAGS=-O1
-darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
-
-darwin_debug_CFLAGS=-O1
-darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
-
-darwin_native_toolchain=native_cctools darwin_sdk
diff --git a/contrib/depends/hosts/default.mk b/contrib/depends/hosts/default.mk
deleted file mode 100644
index 2e7f9fa..0000000
--- a/contrib/depends/hosts/default.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-default_host_CC = $(host_toolchain)gcc
-default_host_CXX = $(host_toolchain)g++
-default_host_AR = $(host_toolchain)ar
-default_host_RANLIB = $(host_toolchain)ranlib
-default_host_STRIP = $(host_toolchain)strip
-default_host_LIBTOOL = $(host_toolchain)libtool
-default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool
-default_host_OTOOL = $(host_toolchain)otool
-default_host_NM = $(host_toolchain)nm
-
-define add_host_tool_func
-$(host_os)_$1?=$$(default_host_$1)
-$(host_arch)_$(host_os)_$1?=$$($(host_os)_$1)
-$(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1)
-host_$1=$$($(host_arch)_$(host_os)_$1)
-endef
-
-define add_host_flags_func
-$(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
-$(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1)
-host_$1 = $$($(host_arch)_$(host_os)_$1)
-host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
-endef
-
-$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool))))
-$(foreach flags,CFLAGS CXXFLAGS ARFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))
diff --git a/contrib/depends/hosts/freebsd.mk b/contrib/depends/hosts/freebsd.mk
deleted file mode 100644
index 2e3b593..0000000
--- a/contrib/depends/hosts/freebsd.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-freebsd_CC=clang-8
-freebsd_CXX=clang++-8
-freebsd_AR=ar
-freebsd_RANLIB=ranlib
-freebsd_NM=nm
-
-freebsd_CFLAGS=-pipe
-freebsd_CXXFLAGS=$(freebsd_CFLAGS)
-freebsd_ARFLAGS=cr
-
-freebsd_release_CFLAGS=-O2
-freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
-
-freebsd_debug_CFLAGS=-g -O0
-freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)
-
-freebsd_native_toolchain=freebsd_base
-
diff --git a/contrib/depends/hosts/ios.mk b/contrib/depends/hosts/ios.mk
deleted file mode 100644
index 097fd2d..0000000
--- a/contrib/depends/hosts/ios.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-IOS_MIN_VERSION=12.0
-IOS_SDK=$(shell xcrun --sdk iphoneos --show-sdk-path)
-
-ifeq (aarch64, $(host_arch))
-CC_target_ios=arm64-apple-ios
-else
-CC_target_ios=x86_64-apple-ios
-endif
-
-ios_CC=$(shell xcrun -f clang) -target $(CC_target_ios) -mios-version-min=$(IOS_MIN_VERSION) --sysroot $(IOS_SDK)
-ios_CXX=$(shell xcrun -f clang++) -target $(CC_target_ios) -mios-version-min=$(IOS_MIN_VERSION) --sysroot $(IOS_SDK) -stdlib=libc++ -std=c++14
-ios_AR:=$(shell xcrun -f ar)
-ios_RANLIB:=$(shell xcrun -f ranlib)
-ios_STRIP:=$(shell xcrun -f strip)
-ios_LIBTOOL:=$(shell xcrun -f libtool)
-ios_OTOOL:=$(shell xcrun -f otool)
-ios_NM:=$(shell xcrun -f nm)
-ios_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
-ios_native_toolchain=
-
-
-ios_CFLAGS=-pipe
-ios_CXXFLAGS=$(ios_CFLAGS) \ No newline at end of file
diff --git a/contrib/depends/hosts/iossimulator.mk b/contrib/depends/hosts/iossimulator.mk
deleted file mode 100644
index 60599db..0000000
--- a/contrib/depends/hosts/iossimulator.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-IOS_MIN_VERSION=12.0
-IOS_SDK=$(shell xcrun --sdk iphonesimulator --show-sdk-path)
-
-ifeq (aarch64, $(host_arch))
-CC_target_iossimulator=arm64-apple-ios-simulator
-iossimulator_host=arm64-apple-darwin
-aarch64_iossimulator_host=arm64-apple-darwin
-else
-CC_target_iossimulator=x86_64-apple-ios-simulator
-iossimulator_host=x86_64-apple-darwin
-x86_64_iossimulator_host=x86_64-apple-darwin
-endif
-iossimulator_CC=$(shell xcrun -f clang) -target $(CC_target_iossimulator) -mios-version-min=$(IOS_MIN_VERSION) --sysroot $(IOS_SDK)
-iossimulator_CXX=$(shell xcrun -f clang++) -target $(CC_target_iossimulator) -mios-version-min=$(IOS_MIN_VERSION) --sysroot $(IOS_SDK) -stdlib=libc++ -std=c++14
-iossimulator_AR:=$(shell xcrun -f ar)
-iossimulator_RANLIB:=$(shell xcrun -f ranlib)
-iossimulator_STRIP:=$(shell xcrun -f strip)
-iossimulator_LIBTOOL:=$(shell xcrun -f libtool)
-iossimulator_OTOOL:=$(shell xcrun -f otool)
-iossimulator_NM:=$(shell xcrun -f nm)
-iossimulator_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
-iossimulator_native_toolchain=
-
-
-iossimulator_CFLAGS=-pipe
-iossimulator_CXXFLAGS=$(iossimulator_CFLAGS) \ No newline at end of file
diff --git a/contrib/depends/hosts/linux.mk b/contrib/depends/hosts/linux.mk
deleted file mode 100644
index b79799f..0000000
--- a/contrib/depends/hosts/linux.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-linux_CFLAGS=-pipe
-linux_CXXFLAGS=$(linux_CFLAGS)
-linux_ARFLAGS=cr
-
-linux_release_CFLAGS=-O2
-linux_release_CXXFLAGS=$(linux_release_CFLAGS)
-
-linux_debug_CFLAGS=-O1
-linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
-
-linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
-
-ifeq (86,$(findstring 86,$(build_arch)))
-i686_linux_CC=i686-linux-gnu-gcc
-i686_linux_CXX=i686-linux-gnu-g++
-i686_linux_AR=ar
-i686_linux_RANLIB=ranlib
-i686_linux_NM=nm
-i686_linux_STRIP=strip
-
-x86_64_linux_CC=x86_64-linux-gnu-gcc
-x86_64_linux_CXX=x86_64-linux-gnu-g++
-x86_64_linux_AR=ar
-x86_64_linux_RANLIB=ranlib
-x86_64_linux_NM=nm
-x86_64_linux_STRIP=strip
-else
-i686_linux_CC=$(default_host_CC) -m32
-i686_linux_CXX=$(default_host_CXX) -m32
-x86_64_linux_CC=$(default_host_CC) -m64
-x86_64_linux_CXX=$(default_host_CXX) -m64
-endif
diff --git a/contrib/depends/hosts/mingw32.mk b/contrib/depends/hosts/mingw32.mk
deleted file mode 100644
index ccc4c50..0000000
--- a/contrib/depends/hosts/mingw32.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-mingw32_CFLAGS=-pipe
-mingw32_CXXFLAGS=$(mingw32_CFLAGS)
-mingw32_ARFLAGS=cr
-
-mingw32_release_CFLAGS=-O2
-mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
-
-mingw32_debug_CFLAGS=-O1
-mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
-
-mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
diff --git a/contrib/depends/packages.md b/contrib/depends/packages.md
deleted file mode 100644
index ae5b473..0000000
--- a/contrib/depends/packages.md
+++ /dev/null
@@ -1,165 +0,0 @@
-Each recipe consists of 3 main parts: defining identifiers, setting build
-variables, and defining build commands.
-
-The package "mylib" will be used here as an example
-
-General tips:
-- mylib_foo is written as $(package)_foo in order to make recipes more similar.
-
-## Identifiers
-Each package is required to define at least these variables:
-
-```
-$(package)_version:
-Version of the upstream library or program. If there is no version, a
-placeholder such as 1.0 can be used.
-
-$(package)_download_path:
-Location of the upstream source, without the file-name. Usually http or
-ftp.
-
-$(package)_file_name:
-The upstream source filename available at the download path.
-
-$(package)_sha256_hash:
-The sha256 hash of the upstream file
-```
-
-These variables are optional:
-
-```
-$(package)_build_subdir:
-cd to this dir before running configure/build/stage commands.
-
-$(package)_download_file:
-The file-name of the upstream source if it differs from how it should be
-stored locally. This can be used to avoid storing file-names with strange
-characters.
-
-$(package)_dependencies:
-Names of any other packages that this one depends on.
-
-$(package)_patches:
-Filenames of any patches needed to build the package
-
-$(package)_extra_sources:
-Any extra files that will be fetched via $(package)_fetch_cmds. These are
-specified so that they can be fetched and verified via 'make download'.
-```
-
-
-## Build Variables:
-After defining the main identifiers, build variables may be added or customized
-before running the build commands. They should be added to a function called
-$(package)_set_vars. For example:
-
-```
-define $(package)_set_vars
-...
-endef
-```
-
-Most variables can be prefixed with the host, architecture, or both, to make
-the modifications specific to that case. For example:
-
-```
-Universal: $(package)_cc=gcc
-Linux only: $(package)_linux_cc=gcc
-x86_64 only: $(package)_x86_64_cc = gcc
-x86_64 linux only: $(package)_x86_64_linux_cc = gcc
-```
-
-These variables may be set to override or append their default values.
-
-```
-$(package)_cc
-$(package)_cxx
-$(package)_objc
-$(package)_objcxx
-$(package)_ar
-$(package)_ranlib
-$(package)_libtool
-$(package)_nm
-$(package)_cflags
-$(package)_cxxflags
-$(package)_ldflags
-$(package)_cppflags
-$(package)_config_env
-$(package)_build_env
-$(package)_stage_env
-$(package)_build_opts
-$(package)_config_opts
-```
-
-The `*_env` variables are used to add environment variables to the respective
-commands.
-
-Many variables respect a debug/release suffix as well, in order to use them for
-only the appropriate build config. For example:
-
-```
-$(package)_cflags_release = -O3
-$(package)_cflags_i686_debug = -g
-$(package)_config_opts_release = --disable-debug
-```
-
-These will be used in addition to the options that do not specify
-debug/release. All builds are considered to be release unless DEBUG=1 is set by
-the user. Other variables may be defined as needed.
-
-## Build commands:
-
-For each build, a unique build dir and staging dir are created. For example,
-`work/build/mylib/1.0-1adac830f6e` and `work/staging/mylib/1.0-1adac830f6e`.
-
-The following build commands are available for each recipe:
-
-```
-$(package)_fetch_cmds:
-Runs from: build dir
-Fetch the source file. If undefined, it will be fetched and verified
-against its hash.
-
-$(package)_extract_cmds:
-Runs from: build dir
-Verify the source file against its hash and extract it. If undefined, the
-source is assumed to be a tarball.
-
-$(package)_preprocess_cmds:
-Runs from: build dir/$(package)_build_subdir
-Preprocess the source as necessary. If undefined, does nothing.
-
-$(package)_config_cmds:
-Runs from: build dir/$(package)_build_subdir
-Configure the source. If undefined, does nothing.
-
-$(package)_build_cmds:
-Runs from: build dir/$(package)_build_subdir
-Build the source. If undefined, does nothing.
-
-$(package)_stage_cmds:
-Runs from: build dir/$(package)_build_subdir
-Stage the build results. If undefined, does nothing.
-```
-
-The following variables are available for each recipe:
-
-```
-$(1)_staging_dir: package's destination sysroot path
-$(1)_staging_prefix_dir: prefix path inside of the package's staging dir
-$(1)_extract_dir: path to the package's extracted sources
-$(1)_build_dir: path where configure/build/stage commands will be run
-$(1)_patch_dir: path where the package's patches (if any) are found
-```
-
-Notes on build commands:
-
-For packages built with autotools, `$($(package)_autoconf)` can be used in the
-configure step to (usually) correctly configure automatically. Any
-`$($(package)_config_opts`) will be appended.
-
-Most autotools projects can be properly staged using:
-
-```bash
-$(MAKE) DESTDIR=$($(package)_staging_dir) install
-```
diff --git a/contrib/depends/packages/android_ndk.mk b/contrib/depends/packages/android_ndk.mk
deleted file mode 100644
index fa2a252..0000000
--- a/contrib/depends/packages/android_ndk.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-package=android_ndk
-$(package)_version=28c
-$(package)_download_path=https://dl.google.com/android/repository/
-$(package)_file_name=android-ndk-r$($(package)_version)-linux.zip
-$(package)_sha256_hash=dfb20d396df28ca02a8c708314b814a4d961dc9074f9a161932746f815aa552f
-
-$(package)_version_apiversion=21
-
-define $(package)_set_vars
-$(package)_config_opts_armv7a=--arch arm
-$(package)_config_opts_aarch64=--arch arm64
-$(package)_config_opts_x86_64=--arch x86_64
-$(package)_config_opts_i686=--arch x86
-endef
-
-define $(package)_extract_cmds
- echo $($(package)_sha256_hash) $($(1)_source_dir)/$($(package)_file_name) | sha256sum -c &&\
- echo "A" | unzip -q $($(1)_source_dir)/$($(package)_file_name)
-endef
-
-# arm-linux-androideabi-ar - openssl workaround
-
-define $(package)_stage_cmds
- mkdir -p $(build_prefix) &&\
- echo $(build_prefix)/toolchain && \
- android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api $($(package)_version_apiversion) \
- --install-dir $(build_prefix)/toolchain --stl=libc++ $($(package)_config_opts) &&\
- mv $(build_prefix)/toolchain $($(package)_staging_dir)/$(host_prefix)/native && \
- cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ar &&\
- cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ar &&\
- cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)$($(package)_version_apiversion)-ranlib &&\
- cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/arm-linux-androideabi-ranlib &&\
- cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ar $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ar &&\
- cp $($(package)_staging_dir)/$(host_prefix)/native/bin/llvm-ranlib $($(package)_staging_dir)/$(host_prefix)/native/bin/$(host)-ranlib
-endef
-
diff --git a/contrib/depends/packages/boost.mk b/contrib/depends/packages/boost.mk
deleted file mode 100644
index 0836409..0000000
--- a/contrib/depends/packages/boost.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-package=boost
-$(package)_version=1_85_0
-$(package)_download_path=https://downloads.sourceforge.net/project/boost/boost/1.85.0/
-$(package)_file_name=$(package)_$($(package)_version).tar.bz2
-$(package)_sha256_hash=7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617
-$(package)_dependencies=libiconv
-$(package)_patches=fix_io_control_hpp.patch
-$(package)_ios_COMPILER_VERSION=16
-
-define $(package)_set_vars
-$(package)_config_opts_release=variant=release
-$(package)_config_opts_debug=variant=debug --build-dir=stage/debug
-$(package)_config_opts=--layout=system --user-config=user-config.jam
-$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
-$(package)_config_opts_linux=threadapi=pthread runtime-link=static
-$(package)_config_opts_android=threadapi=pthread runtime-link=static target-os=android
-$(package)_config_opts_darwin=--toolset=darwin runtime-link=static
-$(package)_config_opts_ios=--toolset=darwin-$($(package)_ios_COMPILER_VERSION)~iphone runtime-link=static
-$(package)_config_opts_iossimulator=--toolset=darwin-$($(package)_ios_COMPILER_VERSION)~iphone runtime-link=static
-$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
-$(package)_config_opts_x86_64_mingw32=address-model=64
-$(package)_config_opts_i686_mingw32=address-model=32
-$(package)_config_opts_i686_linux=address-model=32 architecture=x86
-$(package)_toolset_$(host_os)=gcc
-$(package)_archiver_$(host_os)=$($(package)_ar)
-$(package)_archiver_darwin=$($(package)_libtool)
-$(package)_archiver_ios=$($(package)_libtool)
-$(package)_archiver_iossimulator=$($(package)_libtool)
-$(package)_toolset_darwin=darwin
-$(package)_toolset_ios=darwin
-$(package)_toolset_iossimulator=darwin
-$(package)_toolset_android=gcc
-$(package)_toolset_mingw32=gcc
-$(package)_toolset2_$(host_os)=
-$(package)_toolset2_ios=$($(package)_ios_COMPILER_VERSION)~iphone
-$(package)_toolset2_iossimulator=$($(package)_ios_COMPILER_VERSION)~iphone
-$(package)_config_libraries=system,filesystem,thread,timer,date_time,chrono,regex,serialization,atomic,program_options,locale,log
-$(package)_cxxflags_linux=-fPIC
-$(package)_cxxflags_freebsd=-fPIC
-$(package)_cxxflags_android=-fPIC
-$(package)_cxxflags_darwin=-fPIC -std=c++11
-$(package)_ldflags_darwin=-L$(host_prefix)/lib -L$(shell xcrun --sdk macosx --show-sdk-path)/usr/lib
-$(package)_ldflags_ios=-L$(host_prefix)/lib -L$(IOS_SDK)/usr/lib
-$(package)_ldflags_iossimulator=-L$(host_prefix)/lib -L$(IOS_SDK)/usr/lib
-endef
-
-define $(package)_preprocess_cmds
- echo "using $(boost_toolset_$(host_os)) : $(boost_toolset2_$(host_os)) : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$($(package)_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" <target-os>iphone : ;" > user-config.jam
-endef
-
-define $(package)_config_cmds
- ./bootstrap.sh --with-libraries=$(boost_config_libraries)
-endef
-
-define $(package)_build_cmds
- ./b2 -d2 -j$(NUM_CORES) --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) $($(package)_config_opts_release) stage
-endef
-
-define $(package)_stage_cmds
- ./b2 -d0 -j$(NUM_CORES) --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) $($(package)_config_opts_release) install
-endef
diff --git a/contrib/depends/packages/darwin_sdk.mk b/contrib/depends/packages/darwin_sdk.mk
deleted file mode 100644
index 6812179..0000000
--- a/contrib/depends/packages/darwin_sdk.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-package=darwin_sdk
-$(package)_version=11.1
-$(package)_download_path=https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/
-$(package)_file_name=MacOSX$($(package)_version).sdk.tar.xz
-$(package)_sha256_hash=68797baaacb52f56f713400de306a58a7ca00b05c3dc6d58f0a8283bcac721f8
-$(package)_patches=fix_missing_definitions.patch
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/fix_missing_definitions.patch
-endef
-
-define $(package)_stage_cmds
- mkdir -p $($(package)_staging_dir)/$(host_prefix)/native/SDK &&\
- mv * $($(package)_staging_dir)/$(host_prefix)/native/SDK
-endef
diff --git a/contrib/depends/packages/eudev.mk b/contrib/depends/packages/eudev.mk
deleted file mode 100644
index e0f8d00..0000000
--- a/contrib/depends/packages/eudev.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-package=eudev
-$(package)_version=v3.2.6
-$(package)_download_path=https://github.com/gentoo/eudev/archive/
-$(package)_download_file=$($(package)_version).tar.gz
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=a96ecb8637667897b8bd4dee4c22c7c5f08b327be45186e912ce6bc768385852
-
-define $(package)_set_vars
- $(package)_config_opts=--disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
-endef
-
-define $(package)_build_cmd
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_preprocess_cmds
- cd $($(package)_build_subdir); autoreconf -f -i
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/*.la
-endef
diff --git a/contrib/depends/packages/expat.mk b/contrib/depends/packages/expat.mk
deleted file mode 100644
index 73c2e24..0000000
--- a/contrib/depends/packages/expat.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-package=expat
-$(package)_version=2.6.0
-$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$($(package)_version))/
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=ff60e6a6b6ce570ae012dc7b73169c7fdf4b6bf08c12ed0ec6f55736b78d85ba
-
-define $(package)_set_vars
-$(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples
-$(package)_config_opts+=--enable-option-checking --without-xmlwf --with-pic
-$(package)_config_opts+=--prefix=$(host_prefix)
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm -rf share lib/cmake lib/*.la
-endef
-
diff --git a/contrib/depends/packages/freebsd_base.mk b/contrib/depends/packages/freebsd_base.mk
deleted file mode 100644
index ad9975f..0000000
--- a/contrib/depends/packages/freebsd_base.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-package=freebsd_base
-$(package)_version=11.3
-$(package)_download_path=https://download.freebsd.org/ftp/releases/amd64/$($(package)_version)-RELEASE/
-$(package)_download_file=base.txz
-$(package)_file_name=freebsd-base-$($(package)_version).txz
-$(package)_sha256_hash=4599023ac136325b86f2fddeec64c1624daa83657e40b00b2ef944c81463a4ff
-
-define $(package)_extract_cmds
- echo $($(package)_sha256_hash) $($(1)_source_dir)/$($(package)_file_name) | sha256sum -c &&\
- tar xf $($(1)_source_dir)/$($(package)_file_name) ./lib/ ./usr/lib/ ./usr/include/
-endef
-
-define $(package)_build_cmds
- mkdir bin &&\
- echo "#!/bin/sh\n\nexec /usr/bin/clang-8 -target x86_64-unknown-freebsd$($(package)_version) --sysroot=$(host_prefix)/native $$$$""@" > bin/clang-8 &&\
- echo "#!/bin/sh\n\nexec /usr/bin/clang++-8 -target x86_64-unknown-freebsd$($(package)_version) --sysroot=$(host_prefix)/native $$$$""@" > bin/clang++-8 &&\
- chmod 755 bin/*
-endef
-
-define $(package)_stage_cmds
- mkdir $($(package)_staging_dir)/$(host_prefix)/native &&\
- mv bin lib usr $($(package)_staging_dir)/$(host_prefix)/native
-endef
diff --git a/contrib/depends/packages/graphviz.mk b/contrib/depends/packages/graphviz.mk
deleted file mode 100644
index e9077b6..0000000
--- a/contrib/depends/packages/graphviz.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-package=graphviz
-$(package)_version=2.40.1
-$(package)_download_path=www.graphviz.org/pub/graphviz/stable/SOURCES/
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=ca5218fade0204d59947126c38439f432853543b0818d9d728c589dfe7f3a421
-
-define $(package)_preprocess_cmds
- ./autogen.sh
-endef
-
-define $(package)_set_vars
- $(package)_config_opts=--disable-shared --enable-multibye --without-purify --without-curses
- $(package)_config_opts_release=--disable-debug-mode
- $(package)_config_opts_linux=--with-pic
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
-endef
diff --git a/contrib/depends/packages/gtest.mk b/contrib/depends/packages/gtest.mk
deleted file mode 100644
index 1208d7c..0000000
--- a/contrib/depends/packages/gtest.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-package=gtest
-$(package)_version=1.8.1
-$(package)_download_path=https://github.com/google/googletest/archive/
-$(package)_download_file=release-$($(package)_version).tar.gz
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
-$(package)_cxxflags=-std=c++11
-$(package)_cxxflags_linux=-fPIC
-
-define $(package)_config_cmds
- cd googletest && \
- CC="$(host_prefix)/native/bin/$($(package)_cc)" \
- CXX="$(host_prefix)/native/bin/$($(package)_cxx)" \
- AR="$(host_prefix)/native/bin/$($(package)_ar)" \
- RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" \
- LIBTOOL="$(host_prefix)/native/bin/$($(package)_libtool)" \
- CXXFLAGS="$($(package)_cxxflags)" \
- CCFLAGS="$($(package)_ccflags)" \
- CPPFLAGS="$($(package)_cppflags)" \
- CFLAGS="$($(package)_cflags) $($(package)_cppflags)" \
- LDLAGS="$($(package)_ldflags)" \
- cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) \
- -DTOOLCHAIN_PREFIX=$(host_toolchain) \
- -DCMAKE_AR="$(host_prefix)/native/bin/$($(package)_ar)" \
- -DCMAKE_RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" \
- -DCMAKE_CXX_FLAGS_DEBUG=ON
-endef
-# -DCMAKE_TOOLCHAIN_FILE=$(HOST)/share/toolchain.cmake
-
-define $(package)_build_cmds
- cd googletest && CC="$(host_prefix)/native/bin/$($(package)_cc)" $(MAKE)
-endef
-
-define $(package)_stage_cmds
- mkdir $($(package)_staging_prefix_dir)/lib $($(package)_staging_prefix_dir)/include &&\
- cp googletest/libgtest.a $($(package)_staging_prefix_dir)/lib/ &&\
- cp googletest/libgtest_main.a $($(package)_staging_prefix_dir)/lib/ &&\
- cp -a googletest/include/* $($(package)_staging_prefix_dir)/include/
-endef
diff --git a/contrib/depends/packages/hidapi.mk b/contrib/depends/packages/hidapi.mk
deleted file mode 100644
index 2f04be1..0000000
--- a/contrib/depends/packages/hidapi.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-package=hidapi
-$(package)_version=0.13.1
-$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=476a2c9a4dc7d1fc97dd223b84338dbea3809a84caea2dcd887d9778725490e3
-$(package)_linux_dependencies=libusb eudev
-$(package)_patches=missing_win_include.patch
-
-define $(package)_set_vars
-$(package)_config_opts=--enable-static --disable-shared
-$(package)_config_opts+=--prefix=$(host_prefix)
-$(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev"
-$(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include
-$(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0"
-$(package)_config_opts_linux+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0
-$(package)_config_opts_linux+=--with-pic
-endef
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/missing_win_include.patch && ./bootstrap
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/*.la
-endef
-
diff --git a/contrib/depends/packages/icu4c.mk b/contrib/depends/packages/icu4c.mk
deleted file mode 100644
index 07307bf..0000000
--- a/contrib/depends/packages/icu4c.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-package=icu4c
-$(package)_version=55.2
-$(package)_download_path=https://github.com/unicode-org/icu/releases/download/release-55-2/
-$(package)_file_name=$(package)-55_2-src.tgz
-$(package)_sha256_hash=eda2aa9f9c787748a2e2d310590720ca8bcc6252adf6b4cfb03b65bef9d66759
-$(package)_patches=icu-001-dont-build-static-dynamic-twice.patch
-
-define $(package)_set_vars
- $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DU_COMBINED_IMPLEMENTATION -fPIC -DENABLE_STATIC=YES -DPGKDATA_MODE=static"
-endef
-
-define $(package)_config_cmds
- patch -p1 < $($(package)_patch_dir)/icu-001-dont-build-static-dynamic-twice.patch &&\
- mkdir builda &&\
- mkdir buildb &&\
- cd builda &&\
- sh ../source/runConfigureICU Linux &&\
- TARGET= make &&\
- cd ../buildb &&\
- sh ../source/runConfigureICU MinGW --enable-static=yes --disable-shared --disable-layout --disable-layoutex --disable-tests --disable-samples --prefix=$(host_prefix) --with-cross-build=`pwd`/../builda &&\
- TARGET= $(MAKE) -j$(NUM_CORES) $($(package)_build_opts)
-endef
-
-define $(package)_stage_cmds
- cd buildb &&\
- $(MAKE) -j$(NUM_CORES) $($(package)_build_opts) DESTDIR=$($(package)_staging_dir) install lib/*
-endef
diff --git a/contrib/depends/packages/libICE.mk b/contrib/depends/packages/libICE.mk
deleted file mode 100644
index 9c1a201..0000000
--- a/contrib/depends/packages/libICE.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-package=libICE
-$(package)_version=1.0.9
-$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202
-$(package)_dependencies=xtrans xproto
-
-define $(package)_set_vars
- $(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc
- $(package)_config_opts_linux=--with-pic
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/contrib/depends/packages/libSM.mk b/contrib/depends/packages/libSM.mk
deleted file mode 100644
index fc010ad..0000000
--- a/contrib/depends/packages/libSM.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-package=libSM
-$(package)_version=1.2.2
-$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
-$(package)_dependencies=xtrans xproto libICE
-
-define $(package)_set_vars
- $(package)_config_opts=--without-libuuid --without-xsltproc --disable-docs --disable-static
- $(package)_config_opts_linux=--with-pic
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/contrib/depends/packages/libiconv.mk b/contrib/depends/packages/libiconv.mk
deleted file mode 100644
index f521cc7..0000000
--- a/contrib/depends/packages/libiconv.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-package=libiconv
-$(package)_version=1.17
-$(package)_download_path=https://ftp.gnu.org/gnu/libiconv
-$(package)_file_name=libiconv-$($(package)_version).tar.gz
-$(package)_sha256_hash=8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313
-
-define $(package)_set_vars
- $(package)_config_opts=--disable-nls
- $(package)_config_opts=--enable-static
- $(package)_config_opts=--disable-shared
- $(package)_config_opts_linux=--with-pic
- $(package)_config_opts_freebsd=--with-pic
- $(package)_ar_ios=$($(package)_ar)
- $(package)_ar_iossimulator=$($(package)_ar)
-endef
-
-define $(package)_preprocess_cmds
- cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/*.la
-endef
diff --git a/contrib/depends/packages/libusb.mk b/contrib/depends/packages/libusb.mk
deleted file mode 100644
index f8ef7bc..0000000
--- a/contrib/depends/packages/libusb.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-package=libusb
-$(package)_version=1.0.26
-$(package)_download_path=https://github.com/libusb/libusb/releases/download/v$($(package)_version)
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
-
-define $(package)_preprocess_cmds
- autoreconf -i
-endef
-
-define $(package)_set_vars
- $(package)_config_opts=--disable-shared
- $(package)_config_opts_linux=--with-pic --disable-udev
- $(package)_config_opts_mingw32=--disable-udev
- $(package)_config_opts_darwin=--disable-udev
-endef
-
-ifneq ($(host_os),darwin)
- define $(package)_config_cmds
- cp -f $(BASEDIR)/config.guess config.guess &&\
- cp -f $(BASEDIR)/config.sub config.sub &&\
- $($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
- endef
-else
- define $(package)_config_cmds
- $($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
- endef
-endif
-
-define $(package)_build_cmd
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds cp -f lib/libusb-1.0.a lib/libusb.a
-endef
diff --git a/contrib/depends/packages/native_biplist.mk b/contrib/depends/packages/native_biplist.mk
deleted file mode 100644
index 3c6e890..0000000
--- a/contrib/depends/packages/native_biplist.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-package=native_biplist
-$(package)_version=0.9
-$(package)_download_path=https://pypi.python.org/packages/source/b/biplist
-$(package)_file_name=biplist-$($(package)_version).tar.gz
-$(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604
-$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
-$(package)_patches=sorted_list.patch
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/sorted_list.patch
-endef
-
-define $(package)_build_cmds
- python setup.py build
-endef
-
-define $(package)_stage_cmds
- mkdir -p $($(package)_install_libdir) && \
- python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
-endef
diff --git a/contrib/depends/packages/native_ccache.mk b/contrib/depends/packages/native_ccache.mk
deleted file mode 100644
index 1523660..0000000
--- a/contrib/depends/packages/native_ccache.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-package=native_ccache
-$(package)_version=4.10.2
-$(package)_download_path=https://samba.org/ftp/ccache
-$(package)_file_name=ccache-$($(package)_version).tar.gz
-$(package)_sha256_hash=108100960bb7e64573ea925af2ee7611701241abb36ce0aae3354528403a7d87
-
-define $(package)_set_vars
-$(package)_config_opts=-DCMAKE_INSTALL_PREFIX="$(host_prefix)/native" -DENABLE_TESTING=OFF
-endef
-
-define $(package)_config_cmds
- cmake -S . -B build $($(package)_config_opts)
-endef
-
-define $(package)_build_cmds
- cmake --build build --parallel
-endef
-
-define $(package)_stage_cmds
- cd build && $(MAKE) -j1 DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm -rf $($(package)_staging_dir)/lib $($(package)_staging_dir)/include
-endef
diff --git a/contrib/depends/packages/native_cctools.mk b/contrib/depends/packages/native_cctools.mk
deleted file mode 100644
index 82079a6..0000000
--- a/contrib/depends/packages/native_cctools.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-package=native_cctools
-$(package)_version=04663295d0425abfac90a42440a7ec02d7155fea
-$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
-$(package)_download_file=$($(package)_version).tar.gz
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=70a7189418c2086d20c299c5d59250cf5940782c778892ccc899c66516ed240e
-$(package)_build_subdir=cctools
-$(package)_dependencies=native_clang native_libtapi
-
-define $(package)_set_vars
-$(package)_config_opts=--target=$(host) --disable-lto-support --with-libtapi=$(host_prefix)
-$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
-$(package)_cc=$(host_prefix)/native/bin/clang
-$(package)_cxx=$(host_prefix)/native/bin/clang++
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install && \
- cp $($(package)_extract_dir)/cctools/misc/install_name_tool $($(package)_staging_prefix_dir)/bin/
-endef
diff --git a/contrib/depends/packages/native_cdrkit.mk b/contrib/depends/packages/native_cdrkit.mk
deleted file mode 100644
index ea1cc59..0000000
--- a/contrib/depends/packages/native_cdrkit.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-package=native_cdrkit
-$(package)_version=1.1.11
-$(package)_download_path=https://distro.ibiblio.org/fatdog/source/600/c
-$(package)_file_name=cdrkit-$($(package)_version).tar.bz2
-$(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564
-$(package)_patches=cdrkit-deterministic.patch
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch
-endef
-
-define $(package)_config_cmds
- cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) genisoimage
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) -C genisoimage install
-endef
-
-define $(package)_postprocess_cmds
- rm bin/isovfy bin/isoinfo bin/isodump bin/isodebug bin/devdump
-endef
diff --git a/contrib/depends/packages/native_clang.mk b/contrib/depends/packages/native_clang.mk
deleted file mode 100644
index 79523ae..0000000
--- a/contrib/depends/packages/native_clang.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-package=native_clang
-$(package)_version=9.0.0
-$(package)_download_path=https://releases.llvm.org/$($(package)_version)
-$(package)_download_file=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz
-$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz
-$(package)_sha256_hash=a23b082b30c128c9831dbdd96edad26b43f56624d0ad0ea9edec506f5385038d
-
-define $(package)_extract_cmds
- echo $($(package)_sha256_hash) $($(package)_source) | sha256sum -c &&\
- mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \
- tar --strip-components=1 -C toolchain -xf $($(package)_source) && \
- rm -f toolchain/lib/libc++abi.so* && \
- echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \
- echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \
- chmod +x toolchain/bin/$(host)-dsymutil
-endef
-
-define $(package)_stage_cmds
- cd $($(package)_extract_dir)/toolchain && \
- mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \
- mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \
- cp bin/clang $($(package)_staging_prefix_dir)/bin/ &&\
- cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\
- cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
- cp -rf lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/ && \
- cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
- if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \
- if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi
-endef
diff --git a/contrib/depends/packages/native_cmake-unused.mk b/contrib/depends/packages/native_cmake-unused.mk
deleted file mode 100644
index 2fb5874..0000000
--- a/contrib/depends/packages/native_cmake-unused.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-package=native_cmake
-$(package)_version=3.14.0
-$(package)_version_dot=v3.14
-$(package)_download_path=https://cmake.org/files/$($(package)_version_dot)/
-$(package)_file_name=cmake-$($(package)_version).tar.gz
-$(package)_sha256_hash=aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502
-
-define $(package)_set_vars
-$(package)_config_opts=
-endef
-
-define $(package)_config_cmds
- ./bootstrap &&\
- ./configure $($(package)_config_opts)
-endef
-
-define $(package)_build_cmd
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/contrib/depends/packages/native_ds_store.mk b/contrib/depends/packages/native_ds_store.mk
deleted file mode 100644
index f0c6176..0000000
--- a/contrib/depends/packages/native_ds_store.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-package=native_ds_store
-$(package)_version=1.1.0
-$(package)_download_path=https://github.com/al45tair/ds_store/archive/
-$(package)_download_file=v$($(package)_version).tar.gz
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=a9f4c0755c6be7224ff7029e188dd262e830bb81e801424841db9eb0780ec8ed
-$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
-$(package)_dependencies=native_biplist
-
-define $(package)_build_cmds
- python setup.py build
-endef
-
-define $(package)_stage_cmds
- mkdir -p $($(package)_install_libdir) && \
- python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
-endef
diff --git a/contrib/depends/packages/native_libdmg-hfsplus.mk b/contrib/depends/packages/native_libdmg-hfsplus.mk
deleted file mode 100644
index 839b065..0000000
--- a/contrib/depends/packages/native_libdmg-hfsplus.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-package=native_libdmg-hfsplus
-$(package)_version=0.1
-$(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive
-$(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz
-$(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3
-$(package)_build_subdir=build
-
-define $(package)_preprocess_cmds
- mkdir build
-endef
-
-define $(package)_config_cmds
- cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)/bin ..
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) -C dmg -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) -C dmg install
-endef
diff --git a/contrib/depends/packages/native_libtapi.mk b/contrib/depends/packages/native_libtapi.mk
deleted file mode 100644
index ba25ba2..0000000
--- a/contrib/depends/packages/native_libtapi.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-package=native_libtapi
-$(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026
-$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive
-$(package)_download_file=$($(package)_version).tar.gz
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61
-$(package)_build_subdir=build
-$(package)_dependencies=native_clang
-
-define $(package)_config_cmds
- echo -n $(build_prefix) > INSTALLPREFIX; \
- CC=$(host_prefix)/native/bin/clang CXX=$(host_prefix)/native/bin/clang++ \
- cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) \
- -DLLVM_INCLUDE_TESTS=OFF \
- -DCMAKE_BUILD_TYPE=RELEASE \
- -DTAPI_REPOSITORY_STRING="1100.0.11" \
- -DTAPI_FULL_VERSION="11.0.0" \
- -DCMAKE_CXX_FLAGS="-I $($(package)_extract_dir)/src/llvm/projects/clang/include -I $($(package)_build_dir)/projects/clang/include" \
- $($(package)_extract_dir)/src/llvm
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) clangBasic && $(MAKE) -j$(NUM_CORES) libtapi
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install-libtapi install-tapi-headers
-endef
diff --git a/contrib/depends/packages/native_mac_alias.mk b/contrib/depends/packages/native_mac_alias.mk
deleted file mode 100644
index 48bd90f..0000000
--- a/contrib/depends/packages/native_mac_alias.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-package=native_mac_alias
-$(package)_version=1.1.0
-$(package)_download_path=https://github.com/al45tair/mac_alias/archive/
-$(package)_download_file=v$($(package)_version).tar.gz
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=b10cb44ecb64fc25283fae7a9cf365d2829377d84e37b9c21100aca8757509be
-$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
-$(package)_patches=python3.patch
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/python3.patch
-endef
-
-define $(package)_build_cmds
- python setup.py build
-endef
-
-define $(package)_stage_cmds
- mkdir -p $($(package)_install_libdir) && \
- python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
-endef
diff --git a/contrib/depends/packages/native_protobuf.mk b/contrib/depends/packages/native_protobuf.mk
deleted file mode 100644
index 1973454..0000000
--- a/contrib/depends/packages/native_protobuf.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-package=protobuf3
-$(package)_version=3.6.1
-$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version)/
-$(package)_file_name=protobuf-cpp-$($(package)_version).tar.gz
-$(package)_sha256_hash=b3732e471a9bb7950f090fd0457ebd2536a9ba0891b7f3785919c654fe2a2529
-$(package)_cxxflags=-std=c++11
-
-define $(package)_set_vars
- $(package)_config_opts=--disable-shared --prefix=$(build_prefix)
- $(package)_config_opts_linux=--with-pic
-endef
-
-define $(package)_preprocess_cmds
- cp -f $(BASEDIR)/config.guess config.guess &&\
- cp -f $(BASEDIR)/config.sub config.sub &&\
- cp -f $(BASEDIR)/config.guess third_party/googletest/googletest/build-aux/config.guess &&\
- cp -f $(BASEDIR)/config.sub third_party/googletest/googletest/build-aux/config.sub &&\
- cp -f $(BASEDIR)/config.guess third_party/googletest/googlemock/build-aux/config.guess &&\
- cp -f $(BASEDIR)/config.sub third_party/googletest/googlemock/build-aux/config.sub
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) -C src
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) -C src install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/libprotoc.a || true
-endef
diff --git a/contrib/depends/packages/ncurses.mk b/contrib/depends/packages/ncurses.mk
deleted file mode 100644
index 770748b..0000000
--- a/contrib/depends/packages/ncurses.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-package=ncurses
-$(package)_version=6.5
-$(package)_download_path=https://ftp.gnu.org/gnu/ncurses
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6
-$(package)_patches=fallback.c
-
-define $(package)_set_vars
- $(package)_build_opts=CC="$($(package)_cc)"
- $(package)_config_env=cf_cv_ar_flags=""
- $(package)_config_opts=--prefix=$(host_prefix)
- $(package)_config_opts+=--disable-shared
- $(package)_config_opts+=--with-build-cc=gcc
- $(package)_config_opts+=--without-debug
- $(package)_config_opts+=--without-ada
- $(package)_config_opts+=--without-cxx-binding
- $(package)_config_opts+=--without-cxx
- $(package)_config_opts+=--without-ticlib
- $(package)_config_opts+=--without-tic
- $(package)_config_opts+=--without-progs
- $(package)_config_opts+=--without-tests
- $(package)_config_opts+=--without-tack
- $(package)_config_opts+=--without-manpages
- $(package)_config_opts+=--with-termlib
- $(package)_config_opts+=--disable-tic-depends
- $(package)_config_opts+=--disable-big-strings
- $(package)_config_opts+=--disable-ext-colors
- $(package)_config_opts+=--enable-pc-files
- $(package)_config_opts+=--host=$(HOST)
- $(pacakge)_config_opts+=--without-shared
- $(pacakge)_config_opts+=--without-pthread
- $(pacakge)_config_opts+=--disable-rpath
- $(pacakge)_config_opts+=--disable-colorfgbg
- $(pacakge)_config_opts+=--disable-ext-mouse
- $(pacakge)_config_opts+=--disable-symlinks
- $(pacakge)_config_opts+=--enable-warnings
- $(pacakge)_config_opts+=--enable-assertions
- $(package)_config_opts+=--with-default-terminfo-dir=/etc/_terminfo_
- $(package)_config_opts+=--with-terminfo-dirs=/etc/_terminfo_
- $(pacakge)_config_opts+=--enable-database
- $(pacakge)_config_opts+=--enable-sp-funcs
- $(pacakge)_config_opts+=--disable-term-driver
- $(pacakge)_config_opts+=--enable-interop
- $(pacakge)_config_opts+=--enable-widec
- $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
-endef
-
-define $(package)_preprocess_cmds
- cp $($(package)_patch_dir)/fallback.c ncurses
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) $($(package)_build_opts) V=1
-endef
-
-define $(package)_stage_cmds
- $(MAKE) install.libs DESTDIR=$($(package)_staging_dir)
-endef
-
diff --git a/contrib/depends/packages/openssl.mk b/contrib/depends/packages/openssl.mk
deleted file mode 100644
index d2f38a3..0000000
--- a/contrib/depends/packages/openssl.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-package=openssl
-$(package)_version=3.0.13
-$(package)_download_path=https://www.openssl.org/source
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313
-
-define $(package)_set_vars
-$(package)_config_env=AR="$($(package)_ar)" ARFLAGS=$($(package)_arflags) RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
-$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib
-$(package)_build_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native"
-$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl --libdir=$(host_prefix)/lib
-$(package)_config_opts+=no-capieng
-$(package)_config_opts+=no-dso
-$(package)_config_opts+=no-dtls1
-$(package)_config_opts+=no-ec_nistp_64_gcc_128
-$(package)_config_opts+=no-gost
-$(package)_config_opts+=no-md2
-$(package)_config_opts+=no-rc5
-$(package)_config_opts+=no-rdrand
-$(package)_config_opts+=no-rfc3779
-$(package)_config_opts+=no-sctp
-$(package)_config_opts+=no-shared
-$(package)_config_opts+=no-ssl-trace
-$(package)_config_opts+=no-ssl3
-$(package)_config_opts+=no-tests
-$(package)_config_opts+=no-unit-test
-$(package)_config_opts+=no-weak-ssl-ciphers
-$(package)_config_opts+=no-zlib
-$(package)_config_opts+=no-zlib-dynamic
-$(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags)
-$(package)_config_opts_linux=-fPIC -Wa,--noexecstack
-$(package)_config_opts_freebsd=-fPIC -Wa,--noexecstack
-$(package)_config_opts_x86_64_linux=linux-x86_64
-$(package)_config_opts_i686_linux=linux-generic32
-$(package)_config_opts_arm_linux=linux-generic32
-$(package)_config_opts_aarch64_linux=linux-generic64
-$(package)_config_opts_armv7a_android=--static android-arm
-$(package)_config_opts_aarch64_android=--static android-arm64
-$(package)_config_opts_aarch64_darwin=darwin64-arm64-cc
-$(package)_config_opts_aarch64_ios=darwin64-arm64-cc
-$(package)_config_opts_aarch64_iossimulator=darwin64-arm64-cc
-$(package)_config_opts_x86_64_ios=darwin64-x86_64-cc
-$(package)_config_opts_x86_64_iossimulator=darwin64-x86_64-cc
-$(package)_config_opts_riscv64_linux=linux-generic64
-$(package)_config_opts_mipsel_linux=linux-generic32
-$(package)_config_opts_mips_linux=linux-generic32
-$(package)_config_opts_powerpc_linux=linux-generic32
-$(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc
-$(package)_config_opts_x86_64_mingw32=mingw64
-$(package)_config_opts_i686_mingw32=mingw
-$(package)_config_opts_x86_64_freebsd=BSD-x86_64
-endef
-
-define $(package)_preprocess_cmds
- sed -i.old 's|crypto ssl apps util tools fuzz providers doc|crypto ssl util tools providers|' build.info
-endef
-
-define $(package)_config_cmds
- ./Configure $($(package)_config_opts)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) build_libs
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install_sw
-endef
-
-define $(package)_postprocess_cmds
- rm -rf share bin etc
-endef
diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk
deleted file mode 100644
index fdeb5f3..0000000
--- a/contrib/depends/packages/packages.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-packages:=boost openssl zeromq libiconv expat unbound polyseed
-
-# ccache is useless in gitian builds
-ifneq ($(GITIAN),1)
-native_packages := native_ccache
-endif
-
-hardware_packages := hidapi protobuf libusb
-hardware_native_packages := native_protobuf
-
-android_native_packages = android_ndk
-android_packages = ncurses readline sodium
-
-darwin_native_packages = $(hardware_native_packages)
-darwin_packages = ncurses readline sodium $(hardware_packages)
-ios_packages = sodium protobuf native_protobuf
-iossimulator_packages = sodium protobuf native_protobuf
-
-# not really native...
-freebsd_native_packages = freebsd_base
-freebsd_packages = ncurses readline sodium
-
-linux_packages = eudev ncurses readline sodium $(hardware_packages)
-linux_native_packages = $(hardware_native_packages)
-
-ifeq ($(build_tests),ON)
-packages += gtest
-endif
-
-ifneq ($(host_arch),riscv64)
-linux_packages += unwind
-endif
-
-mingw32_packages = icu4c sodium $(hardware_packages)
-mingw32_native_packages = $(hardware_native_packages)
-
-ifneq ($(build_os),darwin)
-darwin_native_packages += darwin_sdk native_clang native_cctools native_libtapi
-endif
-
diff --git a/contrib/depends/packages/polyseed.mk b/contrib/depends/packages/polyseed.mk
deleted file mode 100644
index 9818563..0000000
--- a/contrib/depends/packages/polyseed.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-package=polyseed
-$(package)_version=2.1.0-patch
-$(package)_download_path=https://github.com/MrCyjaneK/$(package)/archive/refs/tags/
-$(package)_download_file=v$($(package)_version).tar.gz
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=7f5c583a1f48ee6d63174dd1f1485d00b02d76d6df0181bc42c54558502c8443
-
-define $(package)_config_cmds
- CC="$($(package)_cc)" cmake -DCMAKE_INSTALL_PREFIX="$(host_prefix)" -DSTATIC=ON .
-endef
-
-define $(package)_set_vars
- $(package)_build_opts=CC="$($(package)_cc)"
-endef
-
-define $(package)_build_cmds
- CC="$($(package)_cc)" $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/contrib/depends/packages/protobuf.mk b/contrib/depends/packages/protobuf.mk
deleted file mode 100644
index 0d7d8cd..0000000
--- a/contrib/depends/packages/protobuf.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-package=protobuf
-$(package)_version=$(native_$(package)_version)
-$(package)_download_path=$(native_$(package)_download_path)
-$(package)_file_name=$(native_$(package)_file_name)
-$(package)_sha256_hash=$(native_$(package)_sha256_hash)
-$(package)_dependencies=native_$(package)
-$(package)_cxxflags=-std=c++11
-$(package)_patches=visibility.patch
-
-define $(package)_set_vars
- $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
- $(package)_config_opts_linux=--with-pic
- $(package)_ar=$($(package)_ar)
-endef
-
-define $(package)_preprocess_cmds
- patch -p0 < $($(package)_patch_dir)/visibility.patch && \
- cp -f $(BASEDIR)/config.guess config.guess &&\
- cp -f $(BASEDIR)/config.sub config.sub &&\
- cp -f $(BASEDIR)/config.guess third_party/googletest/googletest/build-aux/config.guess &&\
- cp -f $(BASEDIR)/config.sub third_party/googletest/googletest/build-aux/config.sub &&\
- cp -f $(BASEDIR)/config.guess third_party/googletest/googlemock/build-aux/config.guess &&\
- cp -f $(BASEDIR)/config.sub third_party/googletest/googlemock/build-aux/config.sub
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) -C src libprotobuf.la
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
-endef
-
-define $(package)_postprocess_cmds
- rm lib/libprotoc.a &&\
- rm lib/*.la
-endef
-
diff --git a/contrib/depends/packages/readline.mk b/contrib/depends/packages/readline.mk
deleted file mode 100644
index 4eb04f1..0000000
--- a/contrib/depends/packages/readline.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-package=readline
-$(package)_version=8.0
-$(package)_download_path=https://ftp.gnu.org/gnu/readline
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461
-$(package)_dependencies=ncurses
-
-define $(package)_set_vars
- $(package)_build_opts=CC="$($(package)_cc)"
- $(package)_config_opts+=--prefix=$(host_prefix)
- $(package)_config_opts+=--exec-prefix=$(host_prefix)
- $(package)_config_opts+=--host=$(HOST)
- $(package)_config_opts+=--disable-shared --with-curses
- $(package)_config_opts_release=--disable-debug-mode
- $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) $($(package)_build_opts)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) install DESTDIR=$($(package)_staging_dir) prefix=$(host_prefix) exec-prefix=$(host_prefix)
-endef
-
diff --git a/contrib/depends/packages/sodium.mk b/contrib/depends/packages/sodium.mk
deleted file mode 100644
index d308c68..0000000
--- a/contrib/depends/packages/sodium.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-package=sodium
-$(package)_version=1.0.18
-$(package)_download_path=https://download.libsodium.org/libsodium/releases/
-$(package)_file_name=libsodium-$($(package)_version).tar.gz
-$(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
-$(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
-
-define $(package)_set_vars
-$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="${PATH}:$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib
-$(package)_config_opts=--enable-static --disable-shared --with-pic
-$(package)_config_opts+=--prefix=$(host_prefix)
-endef
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\
- patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch &&\
- cp -f $(BASEDIR)/config.guess build-aux/config.guess &&\
- cp -f $(BASEDIR)/config.sub build-aux/config.sub
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j1 DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/*.la
-endef
-
diff --git a/contrib/depends/packages/unbound.mk b/contrib/depends/packages/unbound.mk
deleted file mode 100644
index 33b6c66..0000000
--- a/contrib/depends/packages/unbound.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-package=unbound
-$(package)_version=1.23.0
-$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=959bd5f3875316d7b3f67ee237a56de5565f5b35fc9b5fc3cea6cfe735a03bb8
-$(package)_dependencies=openssl expat
-$(package)_patches=disable-glibc-reallocarray.patch
-
-# ac_cv_type_pthread_spinlock_t -> disappeared in ndk r28
-define $(package)_set_vars
- $(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix)
- $(package)_config_opts+=--with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no
- $(package)_config_opts+=--without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only
- $(package)_config_opts_linux=--with-pic
- $(package)_config_opts_w64=--enable-static-exe --sysconfdir=/etc --prefix=$(host_prefix) --target=$(host_prefix)
- $(package)_config_opts_x86_64_darwin=ac_cv_func_SHA384_Init=yes
- $(package)_config_opts_android=ac_cv_type_pthread_spinlock_t=no
- $(package)_build_opts_mingw32=LDFLAGS="$($(package)_ldflags) -lpthread"
- $(package)_cflags_mingw32+="-D_WIN32_WINNT=0x600"
-endef
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/disable-glibc-reallocarray.patch &&\
- autoconf
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf) $($(package)_config_opts) ac_cv_func_getentropy=no
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) $($(package)_build_opts)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/contrib/depends/packages/unwind.mk b/contrib/depends/packages/unwind.mk
deleted file mode 100644
index d708a0a..0000000
--- a/contrib/depends/packages/unwind.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-package=unwind
-$(package)_version=1.5.0
-$(package)_download_path=https://download.savannah.nongnu.org/releases/libunwind
-$(package)_file_name=lib$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017
-$(package)_patches=fix_obj_order.patch
-
-define $(package)_preprocess_cmds
- patch -p0 < $($(package)_patch_dir)/fix_obj_order.patch &&\
- cp -f $(BASEDIR)/config.guess config/config.guess &&\
- cp -f $(BASEDIR)/config.sub config/config.sub
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf) --disable-shared --enable-static --disable-tests --disable-documentation AR_FLAGS=$($(package)_arflags)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm lib/*.la
-endef
-
diff --git a/contrib/depends/packages/xproto.mk b/contrib/depends/packages/xproto.mk
deleted file mode 100644
index 34acd4d..0000000
--- a/contrib/depends/packages/xproto.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-package=xproto
-$(package)_version=7.0.26
-$(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f
-
-define $(package)_set_vars
-$(package)_config_opts=--disable-shared
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/contrib/depends/packages/zeromq.mk b/contrib/depends/packages/zeromq.mk
deleted file mode 100644
index 0c47a6c..0000000
--- a/contrib/depends/packages/zeromq.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-package=zeromq
-$(package)_version=4.3.5
-$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
-$(package)_patches=fix_declaration.patch
-
-define $(package)_set_vars
- $(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
- $(package)_config_opts_linux=--with-pic
- $(package)_config_opts_freebsd=--with-pic
- $(package)_config_opts_ios=--host=$(host_arch)-apple-darwin
- $(package)_config_opts_iossimulator=--host=$(host_arch)-apple-darwin
- $(package)_cxxflags=-std=c++11
- $(package)_cxxflags_darwin=-std=c++11
- $(package)_cxxflags_ios=-std=c++11
-endef
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/fix_declaration.patch
-endef
-
-define $(package)_config_cmds
- $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
- $(MAKE) -j$(NUM_CORES) src/libzmq.la
-endef
-
-define $(package)_stage_cmds
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA VERBOSE=1 &&\
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES VERBOSE=1 &&\
- $(MAKE) -j$(NUM_CORES) DESTDIR=$($(package)_staging_dir) install-includeHEADERS VERBOSE=1
-endef
-
-define $(package)_postprocess_cmds
- rm -rf bin share &&\
- rm lib/*.la || true
-endef
-
diff --git a/contrib/depends/patches/boost/fix_arm_arch.patch b/contrib/depends/patches/boost/fix_arm_arch.patch
deleted file mode 100644
index 3cf6b6f..0000000
--- a/contrib/depends/patches/boost/fix_arm_arch.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- boost_1_64_0/tools/build/src/tools/darwin.jam.O 2017-04-17 03:22:26.000000000 +0100
-+++ boost_1_64_0/tools/build/src/tools/darwin.jam 2022-05-04 17:26:29.984464447 +0000
-@@ -505,7 +505,7 @@
- if $(instruction-set) {
- options = -arch$(_)$(instruction-set) ;
- } else {
-- options = -arch arm ;
-+# options = -arch arm ;
- }
- }
- }
diff --git a/contrib/depends/patches/boost/fix_aroptions.patch b/contrib/depends/patches/boost/fix_aroptions.patch
deleted file mode 100644
index 5b2ec10..0000000
--- a/contrib/depends/patches/boost/fix_aroptions.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- boost_1_64_0/tools/build/src/tools/gcc.jam.O 2017-04-17 03:22:26.000000000 +0100
-+++ boost_1_64_0/tools/build/src/tools/gcc.jam 2019-11-15 15:46:16.957937137 +0000
-@@ -243,6 +243,8 @@
- {
- ECHO notice: using gcc archiver :: $(condition) :: $(archiver[1]) ;
- }
-+ local arflags = [ feature.get-values <arflags> : $(options) ] ;
-+ toolset.flags gcc.archive .ARFLAGS $(condition) : $(arflags) ;
-
- # - Ranlib.
- local ranlib = [ common.get-invocation-command gcc
-@@ -970,6 +972,7 @@
- # logic in intel-linux, but that is hardly worth the trouble as on Linux, 'ar'
- # is always available.
- .AR = ar ;
-+.ARFLAGS = rc ;
- .RANLIB = ranlib ;
-
- toolset.flags gcc.archive AROPTIONS <archiveflags> ;
-@@ -1011,7 +1014,7 @@
- #
- actions piecemeal archive
- {
-- "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
-+ "$(.AR)" $(AROPTIONS) $(.ARFLAGS) "$(<)" "$(>)"
- "$(.RANLIB)" "$(<)"
- }
-
diff --git a/contrib/depends/patches/boost/fix_io_control_hpp.patch b/contrib/depends/patches/boost/fix_io_control_hpp.patch
deleted file mode 100644
index 4d022f2..0000000
--- a/contrib/depends/patches/boost/fix_io_control_hpp.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- boost_1_84_0/boost/asio/detail/io_control.hpp.O 2017-04-17 03:22:26.000000000 +0100
-+++ boost_1_84_0/boost/asio/detail/io_control.hpp 2019-11-15 15:46:16.957937137 +0000
-@@ -11,6 +11,9 @@
- # pragma once
- #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-+#ifdef APPLE
-+#include <netinet/in.h>
-+#endif
- #include <boost/asio/detail/config.hpp>
- #include <cstddef>
diff --git a/contrib/depends/patches/cmake/cmake-1-fixes.patch b/contrib/depends/patches/cmake/cmake-1-fixes.patch
deleted file mode 100644
index 062c067..0000000
--- a/contrib/depends/patches/cmake/cmake-1-fixes.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-This file is part of MXE. See LICENSE.md for licensing information.
-
-Contains ad hoc patches for cross building.
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Tony Theodore <tonyt@logyst.com>
-Date: Fri, 12 Aug 2016 02:01:20 +1000
-Subject: [PATCH 1/3] fix windres invocation options
-
-windres doesn't recognise various gcc flags like -mms-bitfields,
--fopenmp, -mthreads etc. (basically not `-D` or `-I`)
-
-diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake
-index 1111111..2222222 100644
---- a/Modules/Platform/Windows-windres.cmake
-+++ b/Modules/Platform/Windows-windres.cmake
-@@ -1 +1 @@
--set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>")
-+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <SOURCE> <OBJECT>")
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Tony Theodore <tonyt@logyst.com>
-Date: Tue, 25 Jul 2017 20:34:56 +1000
-Subject: [PATCH 2/3] add option to disable -isystem
-
-taken from (not accepted):
-https://gitlab.kitware.com/cmake/cmake/merge_requests/895
-
-see also:
-https://gitlab.kitware.com/cmake/cmake/issues/16291
-https://gitlab.kitware.com/cmake/cmake/issues/16919
-
-diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
-index 1111111..2222222 100644
---- a/Modules/Compiler/GNU.cmake
-+++ b/Modules/Compiler/GNU.cmake
-@@ -42,7 +42,7 @@ macro(__compiler_gnu lang)
- string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
- set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-- if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462
-+ if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4 AND (NOT MXE_DISABLE_INCLUDE_SYSTEM_FLAG)) # work around #4462
- set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
- endif()
- endmacro()
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Tony Theodore <tonyt@logyst.com>
-Date: Tue, 15 Aug 2017 15:25:06 +1000
-Subject: [PATCH 3/3] add CPACK_NSIS_EXECUTABLE variable
-
-
-diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
-index 1111111..2222222 100644
---- a/Source/CPack/cmCPackNSISGenerator.cxx
-+++ b/Source/CPack/cmCPackNSISGenerator.cxx
-@@ -384,7 +384,9 @@ int cmCPackNSISGenerator::InitializeInternal()
- }
- #endif
-
-- nsisPath = cmSystemTools::FindProgram("makensis", path, false);
-+ this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLE", "makensis");
-+ nsisPath = cmSystemTools::FindProgram(
-+ this->GetOption("CPACK_NSIS_EXECUTABLE"), path, false);
-
- if (nsisPath.empty()) {
- cmCPackLogger(
diff --git a/contrib/depends/patches/darwin_sdk/fix_missing_definitions.patch b/contrib/depends/patches/darwin_sdk/fix_missing_definitions.patch
deleted file mode 100644
index 6a346ca..0000000
--- a/contrib/depends/patches/darwin_sdk/fix_missing_definitions.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/usr/include/sys/ucred.h 2024-11-15 15:03:31.037756112 +0000
-+++ b/usr/include/sys/ucred.h 2024-11-15 15:03:35.337755945 +0000
-@@ -70,6 +70,15 @@
- #ifndef _SYS_UCRED_H_
- #define _SYS_UCRED_H_
-
-+#ifndef u_int
-+typedef unsigned int u_int;
-+#endif
-+#ifndef u_char
-+typedef unsigned char u_char;
-+#endif
-+#ifndef u_short
-+typedef unsigned short u_short;
-+#endif
- #include <sys/appleapiopts.h>
- #include <sys/cdefs.h>
- #include <sys/param.h> \ No newline at end of file
diff --git a/contrib/depends/patches/hidapi/missing_win_include.patch b/contrib/depends/patches/hidapi/missing_win_include.patch
deleted file mode 100644
index 5bbe82d..0000000
--- a/contrib/depends/patches/hidapi/missing_win_include.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From a77b066311da42ed7654e39c0356a3b951b2e296 Mon Sep 17 00:00:00 2001
-From: selsta <selsta@sent.at>
-Date: Wed, 10 Nov 2021 02:28:54 +0100
-Subject: [PATCH] windows: add missing include for mingw32
-
----
- windows/hid.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/windows/hid.c b/windows/hid.c
-index 24756a4..6d8394c 100644
---- a/windows/hid.c
-+++ b/windows/hid.c
-@@ -33,6 +33,7 @@ typedef LONG NTSTATUS;
- #endif
-
- #ifdef __MINGW32__
-+#include <devpropdef.h>
- #include <ntdef.h>
- #include <winbase.h>
- #endif
diff --git a/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch b/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch
deleted file mode 100644
index bbd4e99..0000000
--- a/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Don't build object files twice
-
-When passed --enable-static and --enable-shared, icu will generate
-both a shared and a static version of its libraries.
-
-However, in order to do so, it builds each and every object file
-twice: once with -fPIC (for the shared library), and once without
--fPIC (for the static library). While admittedly building -fPIC for a
-static library generates a slightly suboptimal code, this is what all
-the autotools-based project are doing. They build each object file
-once, and they use it for both the static and shared libraries.
-
-icu builds the object files for the shared library as .o files, and
-the object files for static library as .ao files. By simply changing
-the suffix of object files used for static libraries to ".o", we tell
-icu to use the ones built for the shared library (i.e, with -fPIC),
-and avoid the double build of icu.
-
-On a fast build server, this brings the target icu build from
-3m41.302s down to 1m43.926s (approximate numbers: some other builds
-are running on the system at the same time).
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/source/config/mh-linux
-===================================================================
---- a/source/config/mh-linux
-+++ b/source/config/mh-linux
-@@ -38,7 +38,7 @@
- ## Shared object suffix
- SO = so
- ## Non-shared intermediate object suffix
--STATIC_O = ao
-+STATIC_O = o
-
- ## Compilation rules
- %.$(STATIC_O): $(srcdir)/%.c
diff --git a/contrib/depends/patches/libiconv/fix-whitespace.patch b/contrib/depends/patches/libiconv/fix-whitespace.patch
deleted file mode 100644
index 531364b..0000000
--- a/contrib/depends/patches/libiconv/fix-whitespace.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/preload/configure b/preload/configure
-index aab5c77..e20b8f0 100755
---- a/preload/configure
-+++ b/preload/configure
-@@ -588,7 +588,7 @@ MAKEFLAGS=
- PACKAGE_NAME='libiconv'
- PACKAGE_TARNAME='libiconv'
- PACKAGE_VERSION='0'
--PACKAGE_STRING='libiconv 0'
-+PACKAGE_STRING='libiconv0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
-
diff --git a/contrib/depends/patches/native_biplist/sorted_list.patch b/contrib/depends/patches/native_biplist/sorted_list.patch
deleted file mode 100644
index 89abdb1..0000000
--- a/contrib/depends/patches/native_biplist/sorted_list.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/biplist/__init__.py 2014-10-26 19:03:11.000000000 +0000
-+++ b/biplist/__init__.py 2016-07-19 19:30:17.663521999 +0000
-@@ -541,7 +541,7 @@
- return HashableWrapper(n)
- elif isinstance(root, dict):
- n = {}
-- for key, value in iteritems(root):
-+ for key, value in sorted(iteritems(root)):
- n[self.wrapRoot(key)] = self.wrapRoot(value)
- return HashableWrapper(n)
- elif isinstance(root, list):
-@@ -616,7 +616,7 @@
- elif isinstance(obj, dict):
- size = proc_size(len(obj))
- self.incrementByteCount('dictBytes', incr=1+size)
-- for key, value in iteritems(obj):
-+ for key, value in sorted(iteritems(obj)):
- check_key(key)
- self.computeOffsets(key, asReference=True)
- self.computeOffsets(value, asReference=True)
-@@ -714,7 +714,7 @@
- keys = []
- values = []
- objectsToWrite = []
-- for key, value in iteritems(obj):
-+ for key, value in sorted(iteritems(obj)):
- keys.append(key)
- values.append(value)
- for key in keys:
diff --git a/contrib/depends/patches/native_cdrkit/cdrkit-deterministic.patch b/contrib/depends/patches/native_cdrkit/cdrkit-deterministic.patch
deleted file mode 100644
index 8ab0993..0000000
--- a/contrib/depends/patches/native_cdrkit/cdrkit-deterministic.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- cdrkit-1.1.11.old/genisoimage/tree.c 2008-10-21 19:57:47.000000000 -0400
-+++ cdrkit-1.1.11/genisoimage/tree.c 2013-12-06 00:23:18.489622668 -0500
-@@ -1139,8 +1139,9 @@
- scan_directory_tree(struct directory *this_dir, char *path,
- struct directory_entry *de)
- {
-- DIR *current_dir;
-+ int current_file;
- char whole_path[PATH_MAX];
-+ struct dirent **d_list;
- struct dirent *d_entry;
- struct directory *parent;
- int dflag;
-@@ -1164,7 +1165,8 @@
- this_dir->dir_flags |= DIR_WAS_SCANNED;
-
- errno = 0; /* Paranoia */
-- current_dir = opendir(path);
-+ //current_dir = opendir(path);
-+ current_file = scandir(path, &d_list, NULL, alphasort);
- d_entry = NULL;
-
- /*
-@@ -1173,12 +1175,12 @@
- */
- old_path = path;
-
-- if (current_dir) {
-+ if (current_file >= 0) {
- errno = 0;
-- d_entry = readdir(current_dir);
-+ d_entry = d_list[0];
- }
-
-- if (!current_dir || !d_entry) {
-+ if (current_file < 0 || !d_entry) {
- int ret = 1;
-
- #ifdef USE_LIBSCHILY
-@@ -1191,8 +1193,8 @@
- de->isorec.flags[0] &= ~ISO_DIRECTORY;
- ret = 0;
- }
-- if (current_dir)
-- closedir(current_dir);
-+ if(d_list)
-+ free(d_list);
- return (ret);
- }
- #ifdef ABORT_DEEP_ISO_ONLY
-@@ -1208,7 +1210,7 @@
- errmsgno(EX_BAD, "use Rock Ridge extensions via -R or -r,\n");
- errmsgno(EX_BAD, "or allow deep ISO9660 directory nesting via -D.\n");
- }
-- closedir(current_dir);
-+ free(d_list);
- return (1);
- }
- #endif
-@@ -1250,13 +1252,13 @@
- * The first time through, skip this, since we already asked
- * for the first entry when we opened the directory.
- */
-- if (dflag)
-- d_entry = readdir(current_dir);
-+ if (dflag && current_file >= 0)
-+ d_entry = d_list[current_file];
- dflag++;
-
-- if (!d_entry)
-+ if (current_file < 0)
- break;
--
-+ current_file--;
- /* OK, got a valid entry */
-
- /* If we do not want all files, then pitch the backups. */
-@@ -1348,7 +1350,7 @@
- insert_file_entry(this_dir, whole_path, d_entry->d_name);
- #endif /* APPLE_HYB */
- }
-- closedir(current_dir);
-+ free(d_list);
-
- #ifdef APPLE_HYB
- /*
diff --git a/contrib/depends/patches/native_mac_alias/python3.patch b/contrib/depends/patches/native_mac_alias/python3.patch
deleted file mode 100644
index 1a32340..0000000
--- a/contrib/depends/patches/native_mac_alias/python3.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff -dur a/mac_alias/alias.py b/mac_alias/alias.py
---- a/mac_alias/alias.py 2015-10-19 12:12:48.000000000 +0200
-+++ b/mac_alias/alias.py 2016-04-03 12:13:12.037159417 +0200
-@@ -243,10 +243,10 @@
- alias = Alias()
- alias.appinfo = appinfo
-
-- alias.volume = VolumeInfo (volname.replace('/',':'),
-+ alias.volume = VolumeInfo (volname.decode().replace('/',':'),
- voldate, fstype, disktype,
- volattrs, volfsid)
-- alias.target = TargetInfo (kind, filename.replace('/',':'),
-+ alias.target = TargetInfo (kind, filename.decode().replace('/',':'),
- folder_cnid, cnid,
- crdate, creator_code, type_code)
- alias.target.levels_from = levels_from
-@@ -261,9 +261,9 @@
- b.read(1)
-
- if tag == TAG_CARBON_FOLDER_NAME:
-- alias.target.folder_name = value.replace('/',':')
-+ alias.target.folder_name = value.decode().replace('/',':')
- elif tag == TAG_CNID_PATH:
-- alias.target.cnid_path = struct.unpack(b'>%uI' % (length // 4),
-+ alias.target.cnid_path = struct.unpack('>%uI' % (length // 4),
- value)
- elif tag == TAG_CARBON_PATH:
- alias.target.carbon_path = value
-@@ -298,9 +298,9 @@
- alias.target.creation_date \
- = mac_epoch + datetime.timedelta(seconds=seconds)
- elif tag == TAG_POSIX_PATH:
-- alias.target.posix_path = value
-+ alias.target.posix_path = value.decode()
- elif tag == TAG_POSIX_PATH_TO_MOUNTPOINT:
-- alias.volume.posix_path = value
-+ alias.volume.posix_path = value.decode()
- elif tag == TAG_RECURSIVE_ALIAS_OF_DISK_IMAGE:
- alias.volume.disk_image_alias = Alias.from_bytes(value)
- elif tag == TAG_USER_HOME_LENGTH_PREFIX:
-@@ -422,13 +422,13 @@
- # (so doing so is ridiculous, and nothing could rely on it).
- b.write(struct.pack(b'>h28pI2shI64pII4s4shhI2s10s',
- self.target.kind,
-- carbon_volname, voldate,
-+ carbon_volname, int(voldate),
- self.volume.fs_type,
- self.volume.disk_type,
- self.target.folder_cnid,
- carbon_filename,
- self.target.cnid,
-- crdate,
-+ int(crdate),
- self.target.creator_code,
- self.target.type_code,
- self.target.levels_from,
-@@ -449,12 +449,12 @@
-
- b.write(struct.pack(b'>hhQhhQ',
- TAG_HIGH_RES_VOLUME_CREATION_DATE,
-- 8, long(voldate * 65536),
-+ 8, int(voldate * 65536),
- TAG_HIGH_RES_CREATION_DATE,
-- 8, long(crdate * 65536)))
-+ 8, int(crdate * 65536)))
-
- if self.target.cnid_path:
-- cnid_path = struct.pack(b'>%uI' % len(self.target.cnid_path),
-+ cnid_path = struct.pack('>%uI' % len(self.target.cnid_path),
- *self.target.cnid_path)
- b.write(struct.pack(b'>hh', TAG_CNID_PATH,
- len(cnid_path)))
diff --git a/contrib/depends/patches/ncurses/fallback.c b/contrib/depends/patches/ncurses/fallback.c
deleted file mode 100644
index fab108c..0000000
--- a/contrib/depends/patches/ncurses/fallback.c
+++ /dev/null
@@ -1,6621 +0,0 @@
-/* This file was generated by tinfo/MKfallback.sh */
-
-/*
- * DO NOT EDIT THIS FILE BY HAND!
- */
-
-#include <curses.priv.h>
-
-#include <tic.h>
-
-/* fallback entries for: linux rxvt vt100 xterm xterm-256color screen screen.linux screen.rxvt screen.xterm-new screen.xterm-256color */
-/* linux */
-
-static char linux_alias_data[] = "linux|linux console";
-
-static char linux_s_bel [] = "\007";
-static char linux_s_cr [] = "\015";
-static char linux_s_csr [] = "\033[%i%p1%d;%p2%dr";
-static char linux_s_tbc [] = "\033[3g";
-static char linux_s_clear [] = "\033[H\033[J";
-static char linux_s_el [] = "\033[K";
-static char linux_s_ed [] = "\033[J";
-static char linux_s_hpa [] = "\033[%i%p1%dG";
-static char linux_s_cup [] = "\033[%i%p1%d;%p2%dH";
-static char linux_s_cud1 [] = "\012";
-static char linux_s_home [] = "\033[H";
-static char linux_s_civis [] = "\033[?25l\033[?1c";
-static char linux_s_cub1 [] = "\010";
-static char linux_s_cnorm [] = "\033[?25h\033[?0c";
-static char linux_s_cuf1 [] = "\033[C";
-static char linux_s_cuu1 [] = "\033[A";
-static char linux_s_cvvis [] = "\033[?25h\033[?8c";
-static char linux_s_dch1 [] = "\033[P";
-static char linux_s_dl1 [] = "\033[M";
-static char linux_s_smacs [] = "\016";
-static char linux_s_blink [] = "\033[5m";
-static char linux_s_bold [] = "\033[1m";
-static char linux_s_dim [] = "\033[2m";
-static char linux_s_smir [] = "\033[4h";
-static char linux_s_rev [] = "\033[7m";
-static char linux_s_smso [] = "\033[7m";
-static char linux_s_smul [] = "\033[4m";
-static char linux_s_ech [] = "\033[%p1%dX";
-static char linux_s_rmacs [] = "\017";
-static char linux_s_sgr0 [] = "\033[m\017";
-static char linux_s_rmir [] = "\033[4l";
-static char linux_s_rmso [] = "\033[27m";
-static char linux_s_rmul [] = "\033[24m";
-static char linux_s_flash [] = "\033[?5h$<200/>\033[?5l";
-static char linux_s_ich1 [] = "\033[@";
-static char linux_s_il1 [] = "\033[L";
-static char linux_s_kbs [] = "\177";
-static char linux_s_kdch1 [] = "\033[3~";
-static char linux_s_kcud1 [] = "\033[B";
-static char linux_s_kf1 [] = "\033[[A";
-static char linux_s_kf10 [] = "\033[21~";
-static char linux_s_kf2 [] = "\033[[B";
-static char linux_s_kf3 [] = "\033[[C";
-static char linux_s_kf4 [] = "\033[[D";
-static char linux_s_kf5 [] = "\033[[E";
-static char linux_s_kf6 [] = "\033[17~";
-static char linux_s_kf7 [] = "\033[18~";
-static char linux_s_kf8 [] = "\033[19~";
-static char linux_s_kf9 [] = "\033[20~";
-static char linux_s_khome [] = "\033[1~";
-static char linux_s_kich1 [] = "\033[2~";
-static char linux_s_kcub1 [] = "\033[D";
-static char linux_s_knp [] = "\033[6~";
-static char linux_s_kpp [] = "\033[5~";
-static char linux_s_kcuf1 [] = "\033[C";
-static char linux_s_kcuu1 [] = "\033[A";
-static char linux_s_nel [] = "\015\012";
-static char linux_s_dch [] = "\033[%p1%dP";
-static char linux_s_dl [] = "\033[%p1%dM";
-static char linux_s_cud [] = "\033[%p1%dB";
-static char linux_s_ich [] = "\033[%p1%d@";
-static char linux_s_il [] = "\033[%p1%dL";
-static char linux_s_cub [] = "\033[%p1%dD";
-static char linux_s_cuf [] = "\033[%p1%dC";
-static char linux_s_cuu [] = "\033[%p1%dA";
-static char linux_s_rs1 [] = "\033c\033]R";
-static char linux_s_rc [] = "\0338";
-static char linux_s_vpa [] = "\033[%i%p1%dd";
-static char linux_s_sc [] = "\0337";
-static char linux_s_ind [] = "\012";
-static char linux_s_ri [] = "\033M";
-static char linux_s_sgr [] = "\033[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;m%?%p9%t\016%e\017%;";
-static char linux_s_hts [] = "\033H";
-static char linux_s_ht [] = "\011";
-static char linux_s_kb2 [] = "\033[G";
-static char linux_s_acsc [] = "++,,--..00__``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}c~~";
-static char linux_s_kcbt [] = "\033[Z";
-static char linux_s_smam [] = "\033[?7h";
-static char linux_s_rmam [] = "\033[?7l";
-static char linux_s_enacs [] = "\033)0";
-static char linux_s_kend [] = "\033[4~";
-static char linux_s_kspd [] = "\032";
-static char linux_s_kf11 [] = "\033[23~";
-static char linux_s_kf12 [] = "\033[24~";
-static char linux_s_kf13 [] = "\033[25~";
-static char linux_s_kf14 [] = "\033[26~";
-static char linux_s_kf15 [] = "\033[28~";
-static char linux_s_kf16 [] = "\033[29~";
-static char linux_s_kf17 [] = "\033[31~";
-static char linux_s_kf18 [] = "\033[32~";
-static char linux_s_kf19 [] = "\033[33~";
-static char linux_s_kf20 [] = "\033[34~";
-static char linux_s_el1 [] = "\033[1K";
-static char linux_s_u6 [] = "\033[%i%d;%dR";
-static char linux_s_u7 [] = "\033[6n";
-static char linux_s_u8 [] = "\033[?6c";
-static char linux_s_u9 [] = "\033[c";
-static char linux_s_op [] = "\033[39;49m";
-static char linux_s_oc [] = "\033]R";
-static char linux_s_initc [] = "\033]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x";
-static char linux_s_kmous [] = "\033[M";
-static char linux_s_setaf [] = "\033[3%p1%dm";
-static char linux_s_setab [] = "\033[4%p1%dm";
-static char linux_s_smpch [] = "\033[11m";
-static char linux_s_rmpch [] = "\033[10m";
-
-static char linux_bool_data[] = {
- /* 0: bw */ FALSE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ TRUE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ FALSE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ TRUE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ FALSE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ FALSE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ TRUE,
- /* 28: bce */ TRUE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ FALSE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ FALSE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 linux_number_data[] = {
- /* 0: cols */ ABSENT_NUMERIC,
- /* 1: it */ 8,
- /* 2: lines */ ABSENT_NUMERIC,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 8,
- /* 14: pairs */ 64,
- /* 15: ncv */ 18,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * linux_string_data[] = {
- /* 0: cbt */ ABSENT_STRING,
- /* 1: bel */ linux_s_bel,
- /* 2: cr */ linux_s_cr,
- /* 3: csr */ linux_s_csr,
- /* 4: tbc */ linux_s_tbc,
- /* 5: clear */ linux_s_clear,
- /* 6: el */ linux_s_el,
- /* 7: ed */ linux_s_ed,
- /* 8: hpa */ linux_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ linux_s_cup,
- /* 11: cud1 */ linux_s_cud1,
- /* 12: home */ linux_s_home,
- /* 13: civis */ linux_s_civis,
- /* 14: cub1 */ linux_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ linux_s_cnorm,
- /* 17: cuf1 */ linux_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ linux_s_cuu1,
- /* 20: cvvis */ linux_s_cvvis,
- /* 21: dch1 */ linux_s_dch1,
- /* 22: dl1 */ linux_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ linux_s_smacs,
- /* 26: blink */ linux_s_blink,
- /* 27: bold */ linux_s_bold,
- /* 28: smcup */ ABSENT_STRING,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ linux_s_dim,
- /* 31: smir */ linux_s_smir,
- /* 32: invis */ ABSENT_STRING,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ linux_s_rev,
- /* 35: smso */ linux_s_smso,
- /* 36: smul */ linux_s_smul,
- /* 37: ech */ linux_s_ech,
- /* 38: rmacs */ linux_s_rmacs,
- /* 39: sgr0 */ linux_s_sgr0,
- /* 40: rmcup */ ABSENT_STRING,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ linux_s_rmir,
- /* 43: rmso */ linux_s_rmso,
- /* 44: rmul */ linux_s_rmul,
- /* 45: flash */ linux_s_flash,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ ABSENT_STRING,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ linux_s_ich1,
- /* 53: il1 */ linux_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ linux_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ linux_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ linux_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ ABSENT_STRING,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ ABSENT_STRING,
- /* 66: kf1 */ linux_s_kf1,
- /* 67: kf10 */ linux_s_kf10,
- /* 68: kf2 */ linux_s_kf2,
- /* 69: kf3 */ linux_s_kf3,
- /* 70: kf4 */ linux_s_kf4,
- /* 71: kf5 */ linux_s_kf5,
- /* 72: kf6 */ linux_s_kf6,
- /* 73: kf7 */ linux_s_kf7,
- /* 74: kf8 */ linux_s_kf8,
- /* 75: kf9 */ linux_s_kf9,
- /* 76: khome */ linux_s_khome,
- /* 77: kich1 */ linux_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ linux_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ linux_s_knp,
- /* 82: kpp */ linux_s_kpp,
- /* 83: kcuf1 */ linux_s_kcuf1,
- /* 84: kind */ ABSENT_STRING,
- /* 85: kri */ ABSENT_STRING,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ linux_s_kcuu1,
- /* 88: rmkx */ ABSENT_STRING,
- /* 89: smkx */ ABSENT_STRING,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ ABSENT_STRING,
- /* 102: smm */ ABSENT_STRING,
- /* 103: nel */ linux_s_nel,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ linux_s_dch,
- /* 106: dl */ linux_s_dl,
- /* 107: cud */ linux_s_cud,
- /* 108: ich */ linux_s_ich,
- /* 109: indn */ ABSENT_STRING,
- /* 110: il */ linux_s_il,
- /* 111: cub */ linux_s_cub,
- /* 112: cuf */ linux_s_cuf,
- /* 113: rin */ ABSENT_STRING,
- /* 114: cuu */ linux_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ ABSENT_STRING,
- /* 119: mc4 */ ABSENT_STRING,
- /* 120: mc5 */ ABSENT_STRING,
- /* 121: rep */ ABSENT_STRING,
- /* 122: rs1 */ linux_s_rs1,
- /* 123: rs2 */ ABSENT_STRING,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ linux_s_rc,
- /* 127: vpa */ linux_s_vpa,
- /* 128: sc */ linux_s_sc,
- /* 129: ind */ linux_s_ind,
- /* 130: ri */ linux_s_ri,
- /* 131: sgr */ linux_s_sgr,
- /* 132: hts */ linux_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ linux_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ ABSENT_STRING,
- /* 140: ka3 */ ABSENT_STRING,
- /* 141: kb2 */ linux_s_kb2,
- /* 142: kc1 */ ABSENT_STRING,
- /* 143: kc3 */ ABSENT_STRING,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ linux_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ linux_s_kcbt,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ linux_s_smam,
- /* 152: rmam */ linux_s_rmam,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ linux_s_enacs,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ linux_s_kend,
- /* 165: kent */ ABSENT_STRING,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ linux_s_kspd,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ ABSENT_STRING,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ ABSENT_STRING,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ ABSENT_STRING,
- /* 200: kIC */ ABSENT_STRING,
- /* 201: kLFT */ ABSENT_STRING,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ ABSENT_STRING,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ ABSENT_STRING,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ ABSENT_STRING,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ linux_s_kf11,
- /* 217: kf12 */ linux_s_kf12,
- /* 218: kf13 */ linux_s_kf13,
- /* 219: kf14 */ linux_s_kf14,
- /* 220: kf15 */ linux_s_kf15,
- /* 221: kf16 */ linux_s_kf16,
- /* 222: kf17 */ linux_s_kf17,
- /* 223: kf18 */ linux_s_kf18,
- /* 224: kf19 */ linux_s_kf19,
- /* 225: kf20 */ linux_s_kf20,
- /* 226: kf21 */ ABSENT_STRING,
- /* 227: kf22 */ ABSENT_STRING,
- /* 228: kf23 */ ABSENT_STRING,
- /* 229: kf24 */ ABSENT_STRING,
- /* 230: kf25 */ ABSENT_STRING,
- /* 231: kf26 */ ABSENT_STRING,
- /* 232: kf27 */ ABSENT_STRING,
- /* 233: kf28 */ ABSENT_STRING,
- /* 234: kf29 */ ABSENT_STRING,
- /* 235: kf30 */ ABSENT_STRING,
- /* 236: kf31 */ ABSENT_STRING,
- /* 237: kf32 */ ABSENT_STRING,
- /* 238: kf33 */ ABSENT_STRING,
- /* 239: kf34 */ ABSENT_STRING,
- /* 240: kf35 */ ABSENT_STRING,
- /* 241: kf36 */ ABSENT_STRING,
- /* 242: kf37 */ ABSENT_STRING,
- /* 243: kf38 */ ABSENT_STRING,
- /* 244: kf39 */ ABSENT_STRING,
- /* 245: kf40 */ ABSENT_STRING,
- /* 246: kf41 */ ABSENT_STRING,
- /* 247: kf42 */ ABSENT_STRING,
- /* 248: kf43 */ ABSENT_STRING,
- /* 249: kf44 */ ABSENT_STRING,
- /* 250: kf45 */ ABSENT_STRING,
- /* 251: kf46 */ ABSENT_STRING,
- /* 252: kf47 */ ABSENT_STRING,
- /* 253: kf48 */ ABSENT_STRING,
- /* 254: kf49 */ ABSENT_STRING,
- /* 255: kf50 */ ABSENT_STRING,
- /* 256: kf51 */ ABSENT_STRING,
- /* 257: kf52 */ ABSENT_STRING,
- /* 258: kf53 */ ABSENT_STRING,
- /* 259: kf54 */ ABSENT_STRING,
- /* 260: kf55 */ ABSENT_STRING,
- /* 261: kf56 */ ABSENT_STRING,
- /* 262: kf57 */ ABSENT_STRING,
- /* 263: kf58 */ ABSENT_STRING,
- /* 264: kf59 */ ABSENT_STRING,
- /* 265: kf60 */ ABSENT_STRING,
- /* 266: kf61 */ ABSENT_STRING,
- /* 267: kf62 */ ABSENT_STRING,
- /* 268: kf63 */ ABSENT_STRING,
- /* 269: el1 */ linux_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ linux_s_u6,
- /* 294: u7 */ linux_s_u7,
- /* 295: u8 */ linux_s_u8,
- /* 296: u9 */ linux_s_u9,
- /* 297: op */ linux_s_op,
- /* 298: oc */ linux_s_oc,
- /* 299: initc */ linux_s_initc,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ ABSENT_STRING,
- /* 303: setb */ ABSENT_STRING,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ ABSENT_STRING,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ ABSENT_STRING,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ linux_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ linux_s_setaf,
- /* 360: setab */ linux_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ linux_s_smpch,
- /* 380: rmpch */ linux_s_rmpch,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ ABSENT_STRING,
- /* 412: memu */ ABSENT_STRING,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* rxvt */
-
-static char rxvt_alias_data[] = "rxvt|rxvt terminal emulator (X Window System)";
-
-static char rxvt_s_bel [] = "\007";
-static char rxvt_s_cr [] = "\015";
-static char rxvt_s_csr [] = "\033[%i%p1%d;%p2%dr";
-static char rxvt_s_tbc [] = "\033[3g";
-static char rxvt_s_clear [] = "\033[H\033[2J";
-static char rxvt_s_el [] = "\033[K";
-static char rxvt_s_ed [] = "\033[J";
-static char rxvt_s_hpa [] = "\033[%i%p1%dG";
-static char rxvt_s_cup [] = "\033[%i%p1%d;%p2%dH";
-static char rxvt_s_cud1 [] = "\012";
-static char rxvt_s_home [] = "\033[H";
-static char rxvt_s_civis [] = "\033[?25l";
-static char rxvt_s_cub1 [] = "\010";
-static char rxvt_s_cnorm [] = "\033[?25h";
-static char rxvt_s_cuf1 [] = "\033[C";
-static char rxvt_s_cuu1 [] = "\033[A";
-static char rxvt_s_dl1 [] = "\033[M";
-static char rxvt_s_smacs [] = "\016";
-static char rxvt_s_blink [] = "\033[5m";
-static char rxvt_s_bold [] = "\033[1m";
-static char rxvt_s_smcup [] = "\0337\033[?47h";
-static char rxvt_s_smir [] = "\033[4h";
-static char rxvt_s_rev [] = "\033[7m";
-static char rxvt_s_smso [] = "\033[7m";
-static char rxvt_s_smul [] = "\033[4m";
-static char rxvt_s_rmacs [] = "\017";
-static char rxvt_s_sgr0 [] = "\033[m\017";
-static char rxvt_s_rmcup [] = "\033[2J\033[?47l\0338";
-static char rxvt_s_rmir [] = "\033[4l";
-static char rxvt_s_rmso [] = "\033[27m";
-static char rxvt_s_rmul [] = "\033[24m";
-static char rxvt_s_flash [] = "\033[?5h$<100/>\033[?5l";
-static char rxvt_s_is1 [] = "\033[?47l\033=\033[?1l";
-static char rxvt_s_is2 [] = "\033[r\033[m\033[2J\033[H\033[?7h\033[?1;3;4;6l\033[4l";
-static char rxvt_s_ich1 [] = "\033[@";
-static char rxvt_s_il1 [] = "\033[L";
-static char rxvt_s_kbs [] = "\010";
-static char rxvt_s_kdch1 [] = "\033[3~";
-static char rxvt_s_kcud1 [] = "\033[B";
-static char rxvt_s_kel [] = "\033[8^";
-static char rxvt_s_kf0 [] = "\033[21~";
-static char rxvt_s_kf1 [] = "\033[11~";
-static char rxvt_s_kf10 [] = "\033[21~";
-static char rxvt_s_kf2 [] = "\033[12~";
-static char rxvt_s_kf3 [] = "\033[13~";
-static char rxvt_s_kf4 [] = "\033[14~";
-static char rxvt_s_kf5 [] = "\033[15~";
-static char rxvt_s_kf6 [] = "\033[17~";
-static char rxvt_s_kf7 [] = "\033[18~";
-static char rxvt_s_kf8 [] = "\033[19~";
-static char rxvt_s_kf9 [] = "\033[20~";
-static char rxvt_s_khome [] = "\033[7~";
-static char rxvt_s_kich1 [] = "\033[2~";
-static char rxvt_s_kcub1 [] = "\033[D";
-static char rxvt_s_knp [] = "\033[6~";
-static char rxvt_s_kpp [] = "\033[5~";
-static char rxvt_s_kcuf1 [] = "\033[C";
-static char rxvt_s_kind [] = "\033[a";
-static char rxvt_s_kri [] = "\033[b";
-static char rxvt_s_kcuu1 [] = "\033[A";
-static char rxvt_s_rmkx [] = "\033>";
-static char rxvt_s_smkx [] = "\033=";
-static char rxvt_s_dl [] = "\033[%p1%dM";
-static char rxvt_s_cud [] = "\033[%p1%dB";
-static char rxvt_s_ich [] = "\033[%p1%d@";
-static char rxvt_s_il [] = "\033[%p1%dL";
-static char rxvt_s_cub [] = "\033[%p1%dD";
-static char rxvt_s_cuf [] = "\033[%p1%dC";
-static char rxvt_s_cuu [] = "\033[%p1%dA";
-static char rxvt_s_rs1 [] = "\033>\033[1;3;4;5;6l\033[?7h\033[m\033[r\033[2J\033[H";
-static char rxvt_s_rs2 [] = "\033[r\033[m\033[2J\033[H\033[?7h\033[?1;3;4;6l\033[4l\033>\033[?1000l\033[?25h";
-static char rxvt_s_rc [] = "\0338";
-static char rxvt_s_vpa [] = "\033[%i%p1%dd";
-static char rxvt_s_sc [] = "\0337";
-static char rxvt_s_ind [] = "\012";
-static char rxvt_s_ri [] = "\033M";
-static char rxvt_s_sgr [] = "\033[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;";
-static char rxvt_s_hts [] = "\033H";
-static char rxvt_s_ht [] = "\011";
-static char rxvt_s_ka1 [] = "\033Ow";
-static char rxvt_s_ka3 [] = "\033Oy";
-static char rxvt_s_kb2 [] = "\033Ou";
-static char rxvt_s_kc1 [] = "\033Oq";
-static char rxvt_s_kc3 [] = "\033Os";
-static char rxvt_s_acsc [] = "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char rxvt_s_kcbt [] = "\033[Z";
-static char rxvt_s_enacs [] = "\033(B\033)0";
-static char rxvt_s_kend [] = "\033[8~";
-static char rxvt_s_kent [] = "\033OM";
-static char rxvt_s_kfnd [] = "\033[1~";
-static char rxvt_s_kDC [] = "\033[3$";
-static char rxvt_s_kslt [] = "\033[4~";
-static char rxvt_s_kEND [] = "\033[8$";
-static char rxvt_s_kHOM [] = "\033[7$";
-static char rxvt_s_kIC [] = "\033[2$";
-static char rxvt_s_kLFT [] = "\033[d";
-static char rxvt_s_kNXT [] = "\033[6$";
-static char rxvt_s_kPRV [] = "\033[5$";
-static char rxvt_s_kRIT [] = "\033[c";
-static char rxvt_s_kf11 [] = "\033[23~";
-static char rxvt_s_kf12 [] = "\033[24~";
-static char rxvt_s_kf13 [] = "\033[25~";
-static char rxvt_s_kf14 [] = "\033[26~";
-static char rxvt_s_kf15 [] = "\033[28~";
-static char rxvt_s_kf16 [] = "\033[29~";
-static char rxvt_s_kf17 [] = "\033[31~";
-static char rxvt_s_kf18 [] = "\033[32~";
-static char rxvt_s_kf19 [] = "\033[33~";
-static char rxvt_s_kf20 [] = "\033[34~";
-static char rxvt_s_kf21 [] = "\033[23$";
-static char rxvt_s_kf22 [] = "\033[24$";
-static char rxvt_s_kf23 [] = "\033[11^";
-static char rxvt_s_kf24 [] = "\033[12^";
-static char rxvt_s_kf25 [] = "\033[13^";
-static char rxvt_s_kf26 [] = "\033[14^";
-static char rxvt_s_kf27 [] = "\033[15^";
-static char rxvt_s_kf28 [] = "\033[17^";
-static char rxvt_s_kf29 [] = "\033[18^";
-static char rxvt_s_kf30 [] = "\033[19^";
-static char rxvt_s_kf31 [] = "\033[20^";
-static char rxvt_s_kf32 [] = "\033[21^";
-static char rxvt_s_kf33 [] = "\033[23^";
-static char rxvt_s_kf34 [] = "\033[24^";
-static char rxvt_s_kf35 [] = "\033[25^";
-static char rxvt_s_kf36 [] = "\033[26^";
-static char rxvt_s_kf37 [] = "\033[28^";
-static char rxvt_s_kf38 [] = "\033[29^";
-static char rxvt_s_kf39 [] = "\033[31^";
-static char rxvt_s_kf40 [] = "\033[32^";
-static char rxvt_s_kf41 [] = "\033[33^";
-static char rxvt_s_kf42 [] = "\033[34^";
-static char rxvt_s_kf43 [] = "\033[23@";
-static char rxvt_s_kf44 [] = "\033[24@";
-static char rxvt_s_el1 [] = "\033[1K";
-static char rxvt_s_u6 [] = "\033[%i%d;%dR";
-static char rxvt_s_u7 [] = "\033[6n";
-static char rxvt_s_u8 [] = "\033[?1;2c";
-static char rxvt_s_u9 [] = "\033[c";
-static char rxvt_s_op [] = "\033[39;49m";
-static char rxvt_s_kmous [] = "\033[M";
-static char rxvt_s_setaf [] = "\033[3%p1%dm";
-static char rxvt_s_setab [] = "\033[4%p1%dm";
-static char rxvt_s_s0ds [] = "\033(B";
-static char rxvt_s_s1ds [] = "\033(0";
-
-static char rxvt_bool_data[] = {
- /* 0: bw */ FALSE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ TRUE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ FALSE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ TRUE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ FALSE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ FALSE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ FALSE,
- /* 28: bce */ TRUE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ FALSE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 rxvt_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 8,
- /* 14: pairs */ 64,
- /* 15: ncv */ CANCELLED_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * rxvt_string_data[] = {
- /* 0: cbt */ ABSENT_STRING,
- /* 1: bel */ rxvt_s_bel,
- /* 2: cr */ rxvt_s_cr,
- /* 3: csr */ rxvt_s_csr,
- /* 4: tbc */ rxvt_s_tbc,
- /* 5: clear */ rxvt_s_clear,
- /* 6: el */ rxvt_s_el,
- /* 7: ed */ rxvt_s_ed,
- /* 8: hpa */ rxvt_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ rxvt_s_cup,
- /* 11: cud1 */ rxvt_s_cud1,
- /* 12: home */ rxvt_s_home,
- /* 13: civis */ rxvt_s_civis,
- /* 14: cub1 */ rxvt_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ rxvt_s_cnorm,
- /* 17: cuf1 */ rxvt_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ rxvt_s_cuu1,
- /* 20: cvvis */ ABSENT_STRING,
- /* 21: dch1 */ ABSENT_STRING,
- /* 22: dl1 */ rxvt_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ rxvt_s_smacs,
- /* 26: blink */ rxvt_s_blink,
- /* 27: bold */ rxvt_s_bold,
- /* 28: smcup */ rxvt_s_smcup,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ ABSENT_STRING,
- /* 31: smir */ rxvt_s_smir,
- /* 32: invis */ ABSENT_STRING,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ rxvt_s_rev,
- /* 35: smso */ rxvt_s_smso,
- /* 36: smul */ rxvt_s_smul,
- /* 37: ech */ ABSENT_STRING,
- /* 38: rmacs */ rxvt_s_rmacs,
- /* 39: sgr0 */ rxvt_s_sgr0,
- /* 40: rmcup */ rxvt_s_rmcup,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ rxvt_s_rmir,
- /* 43: rmso */ rxvt_s_rmso,
- /* 44: rmul */ rxvt_s_rmul,
- /* 45: flash */ rxvt_s_flash,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ rxvt_s_is1,
- /* 49: is2 */ rxvt_s_is2,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ rxvt_s_ich1,
- /* 53: il1 */ rxvt_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ rxvt_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ rxvt_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ rxvt_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ rxvt_s_kel,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ rxvt_s_kf0,
- /* 66: kf1 */ rxvt_s_kf1,
- /* 67: kf10 */ rxvt_s_kf10,
- /* 68: kf2 */ rxvt_s_kf2,
- /* 69: kf3 */ rxvt_s_kf3,
- /* 70: kf4 */ rxvt_s_kf4,
- /* 71: kf5 */ rxvt_s_kf5,
- /* 72: kf6 */ rxvt_s_kf6,
- /* 73: kf7 */ rxvt_s_kf7,
- /* 74: kf8 */ rxvt_s_kf8,
- /* 75: kf9 */ rxvt_s_kf9,
- /* 76: khome */ rxvt_s_khome,
- /* 77: kich1 */ rxvt_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ rxvt_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ rxvt_s_knp,
- /* 82: kpp */ rxvt_s_kpp,
- /* 83: kcuf1 */ rxvt_s_kcuf1,
- /* 84: kind */ rxvt_s_kind,
- /* 85: kri */ rxvt_s_kri,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ rxvt_s_kcuu1,
- /* 88: rmkx */ rxvt_s_rmkx,
- /* 89: smkx */ rxvt_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ ABSENT_STRING,
- /* 102: smm */ ABSENT_STRING,
- /* 103: nel */ ABSENT_STRING,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ ABSENT_STRING,
- /* 106: dl */ rxvt_s_dl,
- /* 107: cud */ rxvt_s_cud,
- /* 108: ich */ rxvt_s_ich,
- /* 109: indn */ ABSENT_STRING,
- /* 110: il */ rxvt_s_il,
- /* 111: cub */ rxvt_s_cub,
- /* 112: cuf */ rxvt_s_cuf,
- /* 113: rin */ ABSENT_STRING,
- /* 114: cuu */ rxvt_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ ABSENT_STRING,
- /* 119: mc4 */ ABSENT_STRING,
- /* 120: mc5 */ ABSENT_STRING,
- /* 121: rep */ ABSENT_STRING,
- /* 122: rs1 */ rxvt_s_rs1,
- /* 123: rs2 */ rxvt_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ rxvt_s_rc,
- /* 127: vpa */ rxvt_s_vpa,
- /* 128: sc */ rxvt_s_sc,
- /* 129: ind */ rxvt_s_ind,
- /* 130: ri */ rxvt_s_ri,
- /* 131: sgr */ rxvt_s_sgr,
- /* 132: hts */ rxvt_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ rxvt_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ rxvt_s_ka1,
- /* 140: ka3 */ rxvt_s_ka3,
- /* 141: kb2 */ rxvt_s_kb2,
- /* 142: kc1 */ rxvt_s_kc1,
- /* 143: kc3 */ rxvt_s_kc3,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ rxvt_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ rxvt_s_kcbt,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ ABSENT_STRING,
- /* 152: rmam */ ABSENT_STRING,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ rxvt_s_enacs,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ rxvt_s_kend,
- /* 165: kent */ rxvt_s_kent,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ rxvt_s_kfnd,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ rxvt_s_kDC,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ rxvt_s_kslt,
- /* 194: kEND */ rxvt_s_kEND,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ rxvt_s_kHOM,
- /* 200: kIC */ rxvt_s_kIC,
- /* 201: kLFT */ rxvt_s_kLFT,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ rxvt_s_kNXT,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ rxvt_s_kPRV,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ rxvt_s_kRIT,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ rxvt_s_kf11,
- /* 217: kf12 */ rxvt_s_kf12,
- /* 218: kf13 */ rxvt_s_kf13,
- /* 219: kf14 */ rxvt_s_kf14,
- /* 220: kf15 */ rxvt_s_kf15,
- /* 221: kf16 */ rxvt_s_kf16,
- /* 222: kf17 */ rxvt_s_kf17,
- /* 223: kf18 */ rxvt_s_kf18,
- /* 224: kf19 */ rxvt_s_kf19,
- /* 225: kf20 */ rxvt_s_kf20,
- /* 226: kf21 */ rxvt_s_kf21,
- /* 227: kf22 */ rxvt_s_kf22,
- /* 228: kf23 */ rxvt_s_kf23,
- /* 229: kf24 */ rxvt_s_kf24,
- /* 230: kf25 */ rxvt_s_kf25,
- /* 231: kf26 */ rxvt_s_kf26,
- /* 232: kf27 */ rxvt_s_kf27,
- /* 233: kf28 */ rxvt_s_kf28,
- /* 234: kf29 */ rxvt_s_kf29,
- /* 235: kf30 */ rxvt_s_kf30,
- /* 236: kf31 */ rxvt_s_kf31,
- /* 237: kf32 */ rxvt_s_kf32,
- /* 238: kf33 */ rxvt_s_kf33,
- /* 239: kf34 */ rxvt_s_kf34,
- /* 240: kf35 */ rxvt_s_kf35,
- /* 241: kf36 */ rxvt_s_kf36,
- /* 242: kf37 */ rxvt_s_kf37,
- /* 243: kf38 */ rxvt_s_kf38,
- /* 244: kf39 */ rxvt_s_kf39,
- /* 245: kf40 */ rxvt_s_kf40,
- /* 246: kf41 */ rxvt_s_kf41,
- /* 247: kf42 */ rxvt_s_kf42,
- /* 248: kf43 */ rxvt_s_kf43,
- /* 249: kf44 */ rxvt_s_kf44,
- /* 250: kf45 */ ABSENT_STRING,
- /* 251: kf46 */ ABSENT_STRING,
- /* 252: kf47 */ ABSENT_STRING,
- /* 253: kf48 */ ABSENT_STRING,
- /* 254: kf49 */ ABSENT_STRING,
- /* 255: kf50 */ ABSENT_STRING,
- /* 256: kf51 */ ABSENT_STRING,
- /* 257: kf52 */ ABSENT_STRING,
- /* 258: kf53 */ ABSENT_STRING,
- /* 259: kf54 */ ABSENT_STRING,
- /* 260: kf55 */ ABSENT_STRING,
- /* 261: kf56 */ ABSENT_STRING,
- /* 262: kf57 */ ABSENT_STRING,
- /* 263: kf58 */ ABSENT_STRING,
- /* 264: kf59 */ ABSENT_STRING,
- /* 265: kf60 */ ABSENT_STRING,
- /* 266: kf61 */ ABSENT_STRING,
- /* 267: kf62 */ ABSENT_STRING,
- /* 268: kf63 */ ABSENT_STRING,
- /* 269: el1 */ rxvt_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ rxvt_s_u6,
- /* 294: u7 */ rxvt_s_u7,
- /* 295: u8 */ rxvt_s_u8,
- /* 296: u9 */ rxvt_s_u9,
- /* 297: op */ rxvt_s_op,
- /* 298: oc */ ABSENT_STRING,
- /* 299: initc */ ABSENT_STRING,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ ABSENT_STRING,
- /* 303: setb */ ABSENT_STRING,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ ABSENT_STRING,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ ABSENT_STRING,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ rxvt_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ rxvt_s_setaf,
- /* 360: setab */ rxvt_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ rxvt_s_s0ds,
- /* 365: s1ds */ rxvt_s_s1ds,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ ABSENT_STRING,
- /* 412: memu */ ABSENT_STRING,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* vt100 */
-
-static char vt100_alias_data[] = "vt100|vt100-am|dec vt100 (w/advanced video)";
-
-static char vt100_s_bel [] = "\007";
-static char vt100_s_cr [] = "\015";
-static char vt100_s_csr [] = "\033[%i%p1%d;%p2%dr";
-static char vt100_s_tbc [] = "\033[3g";
-static char vt100_s_clear [] = "\033[H\033[J$<50>";
-static char vt100_s_el [] = "\033[K$<3>";
-static char vt100_s_ed [] = "\033[J$<50>";
-static char vt100_s_cup [] = "\033[%i%p1%d;%p2%dH$<5>";
-static char vt100_s_cud1 [] = "\012";
-static char vt100_s_home [] = "\033[H";
-static char vt100_s_cub1 [] = "\010";
-static char vt100_s_cuf1 [] = "\033[C$<2>";
-static char vt100_s_cuu1 [] = "\033[A$<2>";
-static char vt100_s_smacs [] = "\016";
-static char vt100_s_blink [] = "\033[5m$<2>";
-static char vt100_s_bold [] = "\033[1m$<2>";
-static char vt100_s_rev [] = "\033[7m$<2>";
-static char vt100_s_smso [] = "\033[7m$<2>";
-static char vt100_s_smul [] = "\033[4m$<2>";
-static char vt100_s_rmacs [] = "\017";
-static char vt100_s_sgr0 [] = "\033[m\017$<2>";
-static char vt100_s_rmso [] = "\033[m$<2>";
-static char vt100_s_rmul [] = "\033[m$<2>";
-static char vt100_s_kbs [] = "\010";
-static char vt100_s_kcud1 [] = "\033OB";
-static char vt100_s_kf0 [] = "\033Oy";
-static char vt100_s_kf1 [] = "\033OP";
-static char vt100_s_kf10 [] = "\033Ox";
-static char vt100_s_kf2 [] = "\033OQ";
-static char vt100_s_kf3 [] = "\033OR";
-static char vt100_s_kf4 [] = "\033OS";
-static char vt100_s_kf5 [] = "\033Ot";
-static char vt100_s_kf6 [] = "\033Ou";
-static char vt100_s_kf7 [] = "\033Ov";
-static char vt100_s_kf8 [] = "\033Ol";
-static char vt100_s_kf9 [] = "\033Ow";
-static char vt100_s_kcub1 [] = "\033OD";
-static char vt100_s_kcuf1 [] = "\033OC";
-static char vt100_s_kcuu1 [] = "\033OA";
-static char vt100_s_rmkx [] = "\033[?1l\033>";
-static char vt100_s_smkx [] = "\033[?1h\033=";
-static char vt100_s_lf1 [] = "pf1";
-static char vt100_s_lf2 [] = "pf2";
-static char vt100_s_lf3 [] = "pf3";
-static char vt100_s_lf4 [] = "pf4";
-static char vt100_s_cud [] = "\033[%p1%dB";
-static char vt100_s_cub [] = "\033[%p1%dD";
-static char vt100_s_cuf [] = "\033[%p1%dC";
-static char vt100_s_cuu [] = "\033[%p1%dA";
-static char vt100_s_mc0 [] = "\033[0i";
-static char vt100_s_mc4 [] = "\033[4i";
-static char vt100_s_mc5 [] = "\033[5i";
-static char vt100_s_rs2 [] = "\033<\033>\033[?3;4;5l\033[?7;8h\033[r";
-static char vt100_s_rc [] = "\0338";
-static char vt100_s_sc [] = "\0337";
-static char vt100_s_ind [] = "\012";
-static char vt100_s_ri [] = "\033M$<5>";
-static char vt100_s_sgr [] = "\033[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<2>";
-static char vt100_s_hts [] = "\033H";
-static char vt100_s_ht [] = "\011";
-static char vt100_s_ka1 [] = "\033Oq";
-static char vt100_s_ka3 [] = "\033Os";
-static char vt100_s_kb2 [] = "\033Or";
-static char vt100_s_kc1 [] = "\033Op";
-static char vt100_s_kc3 [] = "\033On";
-static char vt100_s_acsc [] = "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char vt100_s_smam [] = "\033[?7h";
-static char vt100_s_rmam [] = "\033[?7l";
-static char vt100_s_enacs [] = "\033(B\033)0";
-static char vt100_s_kent [] = "\033OM";
-static char vt100_s_el1 [] = "\033[1K$<3>";
-
-static char vt100_bool_data[] = {
- /* 0: bw */ FALSE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ FALSE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ FALSE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ FALSE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ TRUE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ TRUE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ FALSE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ FALSE,
- /* 28: bce */ FALSE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ FALSE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 vt100_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ 3,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ ABSENT_NUMERIC,
- /* 14: pairs */ ABSENT_NUMERIC,
- /* 15: ncv */ ABSENT_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * vt100_string_data[] = {
- /* 0: cbt */ ABSENT_STRING,
- /* 1: bel */ vt100_s_bel,
- /* 2: cr */ vt100_s_cr,
- /* 3: csr */ vt100_s_csr,
- /* 4: tbc */ vt100_s_tbc,
- /* 5: clear */ vt100_s_clear,
- /* 6: el */ vt100_s_el,
- /* 7: ed */ vt100_s_ed,
- /* 8: hpa */ ABSENT_STRING,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ vt100_s_cup,
- /* 11: cud1 */ vt100_s_cud1,
- /* 12: home */ vt100_s_home,
- /* 13: civis */ ABSENT_STRING,
- /* 14: cub1 */ vt100_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ ABSENT_STRING,
- /* 17: cuf1 */ vt100_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ vt100_s_cuu1,
- /* 20: cvvis */ ABSENT_STRING,
- /* 21: dch1 */ ABSENT_STRING,
- /* 22: dl1 */ ABSENT_STRING,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ vt100_s_smacs,
- /* 26: blink */ vt100_s_blink,
- /* 27: bold */ vt100_s_bold,
- /* 28: smcup */ ABSENT_STRING,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ ABSENT_STRING,
- /* 31: smir */ ABSENT_STRING,
- /* 32: invis */ ABSENT_STRING,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ vt100_s_rev,
- /* 35: smso */ vt100_s_smso,
- /* 36: smul */ vt100_s_smul,
- /* 37: ech */ ABSENT_STRING,
- /* 38: rmacs */ vt100_s_rmacs,
- /* 39: sgr0 */ vt100_s_sgr0,
- /* 40: rmcup */ ABSENT_STRING,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ ABSENT_STRING,
- /* 43: rmso */ vt100_s_rmso,
- /* 44: rmul */ vt100_s_rmul,
- /* 45: flash */ ABSENT_STRING,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ ABSENT_STRING,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ ABSENT_STRING,
- /* 53: il1 */ ABSENT_STRING,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ vt100_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ ABSENT_STRING,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ vt100_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ ABSENT_STRING,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ vt100_s_kf0,
- /* 66: kf1 */ vt100_s_kf1,
- /* 67: kf10 */ vt100_s_kf10,
- /* 68: kf2 */ vt100_s_kf2,
- /* 69: kf3 */ vt100_s_kf3,
- /* 70: kf4 */ vt100_s_kf4,
- /* 71: kf5 */ vt100_s_kf5,
- /* 72: kf6 */ vt100_s_kf6,
- /* 73: kf7 */ vt100_s_kf7,
- /* 74: kf8 */ vt100_s_kf8,
- /* 75: kf9 */ vt100_s_kf9,
- /* 76: khome */ ABSENT_STRING,
- /* 77: kich1 */ ABSENT_STRING,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ vt100_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ ABSENT_STRING,
- /* 82: kpp */ ABSENT_STRING,
- /* 83: kcuf1 */ vt100_s_kcuf1,
- /* 84: kind */ ABSENT_STRING,
- /* 85: kri */ ABSENT_STRING,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ vt100_s_kcuu1,
- /* 88: rmkx */ vt100_s_rmkx,
- /* 89: smkx */ vt100_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ vt100_s_lf1,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ vt100_s_lf2,
- /* 94: lf3 */ vt100_s_lf3,
- /* 95: lf4 */ vt100_s_lf4,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ ABSENT_STRING,
- /* 102: smm */ ABSENT_STRING,
- /* 103: nel */ ABSENT_STRING,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ ABSENT_STRING,
- /* 106: dl */ ABSENT_STRING,
- /* 107: cud */ vt100_s_cud,
- /* 108: ich */ ABSENT_STRING,
- /* 109: indn */ ABSENT_STRING,
- /* 110: il */ ABSENT_STRING,
- /* 111: cub */ vt100_s_cub,
- /* 112: cuf */ vt100_s_cuf,
- /* 113: rin */ ABSENT_STRING,
- /* 114: cuu */ vt100_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ vt100_s_mc0,
- /* 119: mc4 */ vt100_s_mc4,
- /* 120: mc5 */ vt100_s_mc5,
- /* 121: rep */ ABSENT_STRING,
- /* 122: rs1 */ ABSENT_STRING,
- /* 123: rs2 */ vt100_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ vt100_s_rc,
- /* 127: vpa */ ABSENT_STRING,
- /* 128: sc */ vt100_s_sc,
- /* 129: ind */ vt100_s_ind,
- /* 130: ri */ vt100_s_ri,
- /* 131: sgr */ vt100_s_sgr,
- /* 132: hts */ vt100_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ vt100_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ vt100_s_ka1,
- /* 140: ka3 */ vt100_s_ka3,
- /* 141: kb2 */ vt100_s_kb2,
- /* 142: kc1 */ vt100_s_kc1,
- /* 143: kc3 */ vt100_s_kc3,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ vt100_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ ABSENT_STRING,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ vt100_s_smam,
- /* 152: rmam */ vt100_s_rmam,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ vt100_s_enacs,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ ABSENT_STRING,
- /* 165: kent */ vt100_s_kent,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ ABSENT_STRING,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ ABSENT_STRING,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ ABSENT_STRING,
- /* 200: kIC */ ABSENT_STRING,
- /* 201: kLFT */ ABSENT_STRING,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ ABSENT_STRING,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ ABSENT_STRING,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ ABSENT_STRING,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ ABSENT_STRING,
- /* 217: kf12 */ ABSENT_STRING,
- /* 218: kf13 */ ABSENT_STRING,
- /* 219: kf14 */ ABSENT_STRING,
- /* 220: kf15 */ ABSENT_STRING,
- /* 221: kf16 */ ABSENT_STRING,
- /* 222: kf17 */ ABSENT_STRING,
- /* 223: kf18 */ ABSENT_STRING,
- /* 224: kf19 */ ABSENT_STRING,
- /* 225: kf20 */ ABSENT_STRING,
- /* 226: kf21 */ ABSENT_STRING,
- /* 227: kf22 */ ABSENT_STRING,
- /* 228: kf23 */ ABSENT_STRING,
- /* 229: kf24 */ ABSENT_STRING,
- /* 230: kf25 */ ABSENT_STRING,
- /* 231: kf26 */ ABSENT_STRING,
- /* 232: kf27 */ ABSENT_STRING,
- /* 233: kf28 */ ABSENT_STRING,
- /* 234: kf29 */ ABSENT_STRING,
- /* 235: kf30 */ ABSENT_STRING,
- /* 236: kf31 */ ABSENT_STRING,
- /* 237: kf32 */ ABSENT_STRING,
- /* 238: kf33 */ ABSENT_STRING,
- /* 239: kf34 */ ABSENT_STRING,
- /* 240: kf35 */ ABSENT_STRING,
- /* 241: kf36 */ ABSENT_STRING,
- /* 242: kf37 */ ABSENT_STRING,
- /* 243: kf38 */ ABSENT_STRING,
- /* 244: kf39 */ ABSENT_STRING,
- /* 245: kf40 */ ABSENT_STRING,
- /* 246: kf41 */ ABSENT_STRING,
- /* 247: kf42 */ ABSENT_STRING,
- /* 248: kf43 */ ABSENT_STRING,
- /* 249: kf44 */ ABSENT_STRING,
- /* 250: kf45 */ ABSENT_STRING,
- /* 251: kf46 */ ABSENT_STRING,
- /* 252: kf47 */ ABSENT_STRING,
- /* 253: kf48 */ ABSENT_STRING,
- /* 254: kf49 */ ABSENT_STRING,
- /* 255: kf50 */ ABSENT_STRING,
- /* 256: kf51 */ ABSENT_STRING,
- /* 257: kf52 */ ABSENT_STRING,
- /* 258: kf53 */ ABSENT_STRING,
- /* 259: kf54 */ ABSENT_STRING,
- /* 260: kf55 */ ABSENT_STRING,
- /* 261: kf56 */ ABSENT_STRING,
- /* 262: kf57 */ ABSENT_STRING,
- /* 263: kf58 */ ABSENT_STRING,
- /* 264: kf59 */ ABSENT_STRING,
- /* 265: kf60 */ ABSENT_STRING,
- /* 266: kf61 */ ABSENT_STRING,
- /* 267: kf62 */ ABSENT_STRING,
- /* 268: kf63 */ ABSENT_STRING,
- /* 269: el1 */ vt100_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ ABSENT_STRING,
- /* 294: u7 */ ABSENT_STRING,
- /* 295: u8 */ ABSENT_STRING,
- /* 296: u9 */ ABSENT_STRING,
- /* 297: op */ ABSENT_STRING,
- /* 298: oc */ ABSENT_STRING,
- /* 299: initc */ ABSENT_STRING,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ ABSENT_STRING,
- /* 303: setb */ ABSENT_STRING,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ ABSENT_STRING,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ ABSENT_STRING,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ ABSENT_STRING,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ ABSENT_STRING,
- /* 360: setab */ ABSENT_STRING,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ ABSENT_STRING,
- /* 412: memu */ ABSENT_STRING,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* xterm */
-
-static char xterm_alias_data[] = "xterm|xterm terminal emulator (X Window System)";
-
-static char xterm_s_cbt [] = "\033[Z";
-static char xterm_s_bel [] = "\007";
-static char xterm_s_cr [] = "\015";
-static char xterm_s_csr [] = "\033[%i%p1%d;%p2%dr";
-static char xterm_s_tbc [] = "\033[3g";
-static char xterm_s_clear [] = "\033[H\033[2J";
-static char xterm_s_el [] = "\033[K";
-static char xterm_s_ed [] = "\033[J";
-static char xterm_s_hpa [] = "\033[%i%p1%dG";
-static char xterm_s_cup [] = "\033[%i%p1%d;%p2%dH";
-static char xterm_s_cud1 [] = "\012";
-static char xterm_s_home [] = "\033[H";
-static char xterm_s_civis [] = "\033[?25l";
-static char xterm_s_cub1 [] = "\010";
-static char xterm_s_cnorm [] = "\033[?12l\033[?25h";
-static char xterm_s_cuf1 [] = "\033[C";
-static char xterm_s_cuu1 [] = "\033[A";
-static char xterm_s_cvvis [] = "\033[?12;25h";
-static char xterm_s_dch1 [] = "\033[P";
-static char xterm_s_dl1 [] = "\033[M";
-static char xterm_s_smacs [] = "\033(0";
-static char xterm_s_blink [] = "\033[5m";
-static char xterm_s_bold [] = "\033[1m";
-static char xterm_s_smcup [] = "\033[?1049h\033[22;0;0t";
-static char xterm_s_dim [] = "\033[2m";
-static char xterm_s_smir [] = "\033[4h";
-static char xterm_s_invis [] = "\033[8m";
-static char xterm_s_rev [] = "\033[7m";
-static char xterm_s_smso [] = "\033[7m";
-static char xterm_s_smul [] = "\033[4m";
-static char xterm_s_ech [] = "\033[%p1%dX";
-static char xterm_s_rmacs [] = "\033(B";
-static char xterm_s_sgr0 [] = "\033(B\033[m";
-static char xterm_s_rmcup [] = "\033[?1049l\033[23;0;0t";
-static char xterm_s_rmir [] = "\033[4l";
-static char xterm_s_rmso [] = "\033[27m";
-static char xterm_s_rmul [] = "\033[24m";
-static char xterm_s_flash [] = "\033[?5h$<100/>\033[?5l";
-static char xterm_s_is2 [] = "\033[!p\033[?3;4l\033[4l\033>";
-static char xterm_s_il1 [] = "\033[L";
-static char xterm_s_kbs [] = "\010";
-static char xterm_s_kdch1 [] = "\033[3~";
-static char xterm_s_kcud1 [] = "\033OB";
-static char xterm_s_kf1 [] = "\033OP";
-static char xterm_s_kf10 [] = "\033[21~";
-static char xterm_s_kf2 [] = "\033OQ";
-static char xterm_s_kf3 [] = "\033OR";
-static char xterm_s_kf4 [] = "\033OS";
-static char xterm_s_kf5 [] = "\033[15~";
-static char xterm_s_kf6 [] = "\033[17~";
-static char xterm_s_kf7 [] = "\033[18~";
-static char xterm_s_kf8 [] = "\033[19~";
-static char xterm_s_kf9 [] = "\033[20~";
-static char xterm_s_khome [] = "\033OH";
-static char xterm_s_kich1 [] = "\033[2~";
-static char xterm_s_kcub1 [] = "\033OD";
-static char xterm_s_knp [] = "\033[6~";
-static char xterm_s_kpp [] = "\033[5~";
-static char xterm_s_kcuf1 [] = "\033OC";
-static char xterm_s_kind [] = "\033[1;2B";
-static char xterm_s_kri [] = "\033[1;2A";
-static char xterm_s_kcuu1 [] = "\033OA";
-static char xterm_s_rmkx [] = "\033[?1l\033>";
-static char xterm_s_smkx [] = "\033[?1h\033=";
-static char xterm_s_rmm [] = "\033[?1034l";
-static char xterm_s_smm [] = "\033[?1034h";
-static char xterm_s_dch [] = "\033[%p1%dP";
-static char xterm_s_dl [] = "\033[%p1%dM";
-static char xterm_s_cud [] = "\033[%p1%dB";
-static char xterm_s_ich [] = "\033[%p1%d@";
-static char xterm_s_indn [] = "\033[%p1%dS";
-static char xterm_s_il [] = "\033[%p1%dL";
-static char xterm_s_cub [] = "\033[%p1%dD";
-static char xterm_s_cuf [] = "\033[%p1%dC";
-static char xterm_s_rin [] = "\033[%p1%dT";
-static char xterm_s_cuu [] = "\033[%p1%dA";
-static char xterm_s_mc0 [] = "\033[i";
-static char xterm_s_mc4 [] = "\033[4i";
-static char xterm_s_mc5 [] = "\033[5i";
-static char xterm_s_rep [] = "%p1%c\033[%p2%{1}%-%db";
-static char xterm_s_rs1 [] = "\033c";
-static char xterm_s_rs2 [] = "\033[!p\033[?3;4l\033[4l\033>";
-static char xterm_s_rc [] = "\0338";
-static char xterm_s_vpa [] = "\033[%i%p1%dd";
-static char xterm_s_sc [] = "\0337";
-static char xterm_s_ind [] = "\012";
-static char xterm_s_ri [] = "\033M";
-static char xterm_s_sgr [] = "%?%p9%t\033(0%e\033(B%;\033[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m";
-static char xterm_s_hts [] = "\033H";
-static char xterm_s_ht [] = "\011";
-static char xterm_s_kb2 [] = "\033OE";
-static char xterm_s_acsc [] = "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char xterm_s_kcbt [] = "\033[Z";
-static char xterm_s_smam [] = "\033[?7h";
-static char xterm_s_rmam [] = "\033[?7l";
-static char xterm_s_kend [] = "\033OF";
-static char xterm_s_kent [] = "\033OM";
-static char xterm_s_kDC [] = "\033[3;2~";
-static char xterm_s_kEND [] = "\033[1;2F";
-static char xterm_s_kHOM [] = "\033[1;2H";
-static char xterm_s_kIC [] = "\033[2;2~";
-static char xterm_s_kLFT [] = "\033[1;2D";
-static char xterm_s_kNXT [] = "\033[6;2~";
-static char xterm_s_kPRV [] = "\033[5;2~";
-static char xterm_s_kRIT [] = "\033[1;2C";
-static char xterm_s_kf11 [] = "\033[23~";
-static char xterm_s_kf12 [] = "\033[24~";
-static char xterm_s_kf13 [] = "\033[1;2P";
-static char xterm_s_kf14 [] = "\033[1;2Q";
-static char xterm_s_kf15 [] = "\033[1;2R";
-static char xterm_s_kf16 [] = "\033[1;2S";
-static char xterm_s_kf17 [] = "\033[15;2~";
-static char xterm_s_kf18 [] = "\033[17;2~";
-static char xterm_s_kf19 [] = "\033[18;2~";
-static char xterm_s_kf20 [] = "\033[19;2~";
-static char xterm_s_kf21 [] = "\033[20;2~";
-static char xterm_s_kf22 [] = "\033[21;2~";
-static char xterm_s_kf23 [] = "\033[23;2~";
-static char xterm_s_kf24 [] = "\033[24;2~";
-static char xterm_s_kf25 [] = "\033[1;5P";
-static char xterm_s_kf26 [] = "\033[1;5Q";
-static char xterm_s_kf27 [] = "\033[1;5R";
-static char xterm_s_kf28 [] = "\033[1;5S";
-static char xterm_s_kf29 [] = "\033[15;5~";
-static char xterm_s_kf30 [] = "\033[17;5~";
-static char xterm_s_kf31 [] = "\033[18;5~";
-static char xterm_s_kf32 [] = "\033[19;5~";
-static char xterm_s_kf33 [] = "\033[20;5~";
-static char xterm_s_kf34 [] = "\033[21;5~";
-static char xterm_s_kf35 [] = "\033[23;5~";
-static char xterm_s_kf36 [] = "\033[24;5~";
-static char xterm_s_kf37 [] = "\033[1;6P";
-static char xterm_s_kf38 [] = "\033[1;6Q";
-static char xterm_s_kf39 [] = "\033[1;6R";
-static char xterm_s_kf40 [] = "\033[1;6S";
-static char xterm_s_kf41 [] = "\033[15;6~";
-static char xterm_s_kf42 [] = "\033[17;6~";
-static char xterm_s_kf43 [] = "\033[18;6~";
-static char xterm_s_kf44 [] = "\033[19;6~";
-static char xterm_s_kf45 [] = "\033[20;6~";
-static char xterm_s_kf46 [] = "\033[21;6~";
-static char xterm_s_kf47 [] = "\033[23;6~";
-static char xterm_s_kf48 [] = "\033[24;6~";
-static char xterm_s_kf49 [] = "\033[1;3P";
-static char xterm_s_kf50 [] = "\033[1;3Q";
-static char xterm_s_kf51 [] = "\033[1;3R";
-static char xterm_s_kf52 [] = "\033[1;3S";
-static char xterm_s_kf53 [] = "\033[15;3~";
-static char xterm_s_kf54 [] = "\033[17;3~";
-static char xterm_s_kf55 [] = "\033[18;3~";
-static char xterm_s_kf56 [] = "\033[19;3~";
-static char xterm_s_kf57 [] = "\033[20;3~";
-static char xterm_s_kf58 [] = "\033[21;3~";
-static char xterm_s_kf59 [] = "\033[23;3~";
-static char xterm_s_kf60 [] = "\033[24;3~";
-static char xterm_s_kf61 [] = "\033[1;4P";
-static char xterm_s_kf62 [] = "\033[1;4Q";
-static char xterm_s_kf63 [] = "\033[1;4R";
-static char xterm_s_el1 [] = "\033[1K";
-static char xterm_s_u6 [] = "\033[%i%d;%dR";
-static char xterm_s_u7 [] = "\033[6n";
-static char xterm_s_u8 [] = "\033[?%[;0123456789]c";
-static char xterm_s_u9 [] = "\033[c";
-static char xterm_s_op [] = "\033[39;49m";
-static char xterm_s_setf [] = "\033[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m";
-static char xterm_s_setb [] = "\033[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m";
-static char xterm_s_sitm [] = "\033[3m";
-static char xterm_s_ritm [] = "\033[23m";
-static char xterm_s_kmous [] = "\033[<";
-static char xterm_s_setaf [] = "\033[3%p1%dm";
-static char xterm_s_setab [] = "\033[4%p1%dm";
-static char xterm_s_meml [] = "\033l";
-static char xterm_s_memu [] = "\033m";
-
-static char xterm_bool_data[] = {
- /* 0: bw */ FALSE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ FALSE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ TRUE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ FALSE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ TRUE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ TRUE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ FALSE,
- /* 28: bce */ TRUE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ FALSE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 xterm_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 8,
- /* 14: pairs */ 64,
- /* 15: ncv */ ABSENT_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * xterm_string_data[] = {
- /* 0: cbt */ xterm_s_cbt,
- /* 1: bel */ xterm_s_bel,
- /* 2: cr */ xterm_s_cr,
- /* 3: csr */ xterm_s_csr,
- /* 4: tbc */ xterm_s_tbc,
- /* 5: clear */ xterm_s_clear,
- /* 6: el */ xterm_s_el,
- /* 7: ed */ xterm_s_ed,
- /* 8: hpa */ xterm_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ xterm_s_cup,
- /* 11: cud1 */ xterm_s_cud1,
- /* 12: home */ xterm_s_home,
- /* 13: civis */ xterm_s_civis,
- /* 14: cub1 */ xterm_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ xterm_s_cnorm,
- /* 17: cuf1 */ xterm_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ xterm_s_cuu1,
- /* 20: cvvis */ xterm_s_cvvis,
- /* 21: dch1 */ xterm_s_dch1,
- /* 22: dl1 */ xterm_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ xterm_s_smacs,
- /* 26: blink */ xterm_s_blink,
- /* 27: bold */ xterm_s_bold,
- /* 28: smcup */ xterm_s_smcup,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ xterm_s_dim,
- /* 31: smir */ xterm_s_smir,
- /* 32: invis */ xterm_s_invis,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ xterm_s_rev,
- /* 35: smso */ xterm_s_smso,
- /* 36: smul */ xterm_s_smul,
- /* 37: ech */ xterm_s_ech,
- /* 38: rmacs */ xterm_s_rmacs,
- /* 39: sgr0 */ xterm_s_sgr0,
- /* 40: rmcup */ xterm_s_rmcup,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ xterm_s_rmir,
- /* 43: rmso */ xterm_s_rmso,
- /* 44: rmul */ xterm_s_rmul,
- /* 45: flash */ xterm_s_flash,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ xterm_s_is2,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ ABSENT_STRING,
- /* 53: il1 */ xterm_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ xterm_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ xterm_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ xterm_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ ABSENT_STRING,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ ABSENT_STRING,
- /* 66: kf1 */ xterm_s_kf1,
- /* 67: kf10 */ xterm_s_kf10,
- /* 68: kf2 */ xterm_s_kf2,
- /* 69: kf3 */ xterm_s_kf3,
- /* 70: kf4 */ xterm_s_kf4,
- /* 71: kf5 */ xterm_s_kf5,
- /* 72: kf6 */ xterm_s_kf6,
- /* 73: kf7 */ xterm_s_kf7,
- /* 74: kf8 */ xterm_s_kf8,
- /* 75: kf9 */ xterm_s_kf9,
- /* 76: khome */ xterm_s_khome,
- /* 77: kich1 */ xterm_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ xterm_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ xterm_s_knp,
- /* 82: kpp */ xterm_s_kpp,
- /* 83: kcuf1 */ xterm_s_kcuf1,
- /* 84: kind */ xterm_s_kind,
- /* 85: kri */ xterm_s_kri,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ xterm_s_kcuu1,
- /* 88: rmkx */ xterm_s_rmkx,
- /* 89: smkx */ xterm_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ xterm_s_rmm,
- /* 102: smm */ xterm_s_smm,
- /* 103: nel */ ABSENT_STRING,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ xterm_s_dch,
- /* 106: dl */ xterm_s_dl,
- /* 107: cud */ xterm_s_cud,
- /* 108: ich */ xterm_s_ich,
- /* 109: indn */ xterm_s_indn,
- /* 110: il */ xterm_s_il,
- /* 111: cub */ xterm_s_cub,
- /* 112: cuf */ xterm_s_cuf,
- /* 113: rin */ xterm_s_rin,
- /* 114: cuu */ xterm_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ xterm_s_mc0,
- /* 119: mc4 */ xterm_s_mc4,
- /* 120: mc5 */ xterm_s_mc5,
- /* 121: rep */ xterm_s_rep,
- /* 122: rs1 */ xterm_s_rs1,
- /* 123: rs2 */ xterm_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ xterm_s_rc,
- /* 127: vpa */ xterm_s_vpa,
- /* 128: sc */ xterm_s_sc,
- /* 129: ind */ xterm_s_ind,
- /* 130: ri */ xterm_s_ri,
- /* 131: sgr */ xterm_s_sgr,
- /* 132: hts */ xterm_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ xterm_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ ABSENT_STRING,
- /* 140: ka3 */ ABSENT_STRING,
- /* 141: kb2 */ xterm_s_kb2,
- /* 142: kc1 */ ABSENT_STRING,
- /* 143: kc3 */ ABSENT_STRING,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ xterm_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ xterm_s_kcbt,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ xterm_s_smam,
- /* 152: rmam */ xterm_s_rmam,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ ABSENT_STRING,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ xterm_s_kend,
- /* 165: kent */ xterm_s_kent,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ xterm_s_kDC,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ xterm_s_kEND,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ xterm_s_kHOM,
- /* 200: kIC */ xterm_s_kIC,
- /* 201: kLFT */ xterm_s_kLFT,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ xterm_s_kNXT,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ xterm_s_kPRV,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ xterm_s_kRIT,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ xterm_s_kf11,
- /* 217: kf12 */ xterm_s_kf12,
- /* 218: kf13 */ xterm_s_kf13,
- /* 219: kf14 */ xterm_s_kf14,
- /* 220: kf15 */ xterm_s_kf15,
- /* 221: kf16 */ xterm_s_kf16,
- /* 222: kf17 */ xterm_s_kf17,
- /* 223: kf18 */ xterm_s_kf18,
- /* 224: kf19 */ xterm_s_kf19,
- /* 225: kf20 */ xterm_s_kf20,
- /* 226: kf21 */ xterm_s_kf21,
- /* 227: kf22 */ xterm_s_kf22,
- /* 228: kf23 */ xterm_s_kf23,
- /* 229: kf24 */ xterm_s_kf24,
- /* 230: kf25 */ xterm_s_kf25,
- /* 231: kf26 */ xterm_s_kf26,
- /* 232: kf27 */ xterm_s_kf27,
- /* 233: kf28 */ xterm_s_kf28,
- /* 234: kf29 */ xterm_s_kf29,
- /* 235: kf30 */ xterm_s_kf30,
- /* 236: kf31 */ xterm_s_kf31,
- /* 237: kf32 */ xterm_s_kf32,
- /* 238: kf33 */ xterm_s_kf33,
- /* 239: kf34 */ xterm_s_kf34,
- /* 240: kf35 */ xterm_s_kf35,
- /* 241: kf36 */ xterm_s_kf36,
- /* 242: kf37 */ xterm_s_kf37,
- /* 243: kf38 */ xterm_s_kf38,
- /* 244: kf39 */ xterm_s_kf39,
- /* 245: kf40 */ xterm_s_kf40,
- /* 246: kf41 */ xterm_s_kf41,
- /* 247: kf42 */ xterm_s_kf42,
- /* 248: kf43 */ xterm_s_kf43,
- /* 249: kf44 */ xterm_s_kf44,
- /* 250: kf45 */ xterm_s_kf45,
- /* 251: kf46 */ xterm_s_kf46,
- /* 252: kf47 */ xterm_s_kf47,
- /* 253: kf48 */ xterm_s_kf48,
- /* 254: kf49 */ xterm_s_kf49,
- /* 255: kf50 */ xterm_s_kf50,
- /* 256: kf51 */ xterm_s_kf51,
- /* 257: kf52 */ xterm_s_kf52,
- /* 258: kf53 */ xterm_s_kf53,
- /* 259: kf54 */ xterm_s_kf54,
- /* 260: kf55 */ xterm_s_kf55,
- /* 261: kf56 */ xterm_s_kf56,
- /* 262: kf57 */ xterm_s_kf57,
- /* 263: kf58 */ xterm_s_kf58,
- /* 264: kf59 */ xterm_s_kf59,
- /* 265: kf60 */ xterm_s_kf60,
- /* 266: kf61 */ xterm_s_kf61,
- /* 267: kf62 */ xterm_s_kf62,
- /* 268: kf63 */ xterm_s_kf63,
- /* 269: el1 */ xterm_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ xterm_s_u6,
- /* 294: u7 */ xterm_s_u7,
- /* 295: u8 */ xterm_s_u8,
- /* 296: u9 */ xterm_s_u9,
- /* 297: op */ xterm_s_op,
- /* 298: oc */ ABSENT_STRING,
- /* 299: initc */ ABSENT_STRING,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ xterm_s_setf,
- /* 303: setb */ xterm_s_setb,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ xterm_s_sitm,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ xterm_s_ritm,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ xterm_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ xterm_s_setaf,
- /* 360: setab */ xterm_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ xterm_s_meml,
- /* 412: memu */ xterm_s_memu,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* xterm-256color */
-
-static char xterm_256color_alias_data[] = "xterm-256color|xterm with 256 colors";
-
-static char xterm_256color_s_cbt[] = "\033[Z";
-static char xterm_256color_s_bel[] = "\007";
-static char xterm_256color_s_cr [] = "\015";
-static char xterm_256color_s_csr[] = "\033[%i%p1%d;%p2%dr";
-static char xterm_256color_s_tbc[] = "\033[3g";
-static char xterm_256color_s_clear[] = "\033[H\033[2J";
-static char xterm_256color_s_el [] = "\033[K";
-static char xterm_256color_s_ed [] = "\033[J";
-static char xterm_256color_s_hpa[] = "\033[%i%p1%dG";
-static char xterm_256color_s_cup[] = "\033[%i%p1%d;%p2%dH";
-static char xterm_256color_s_cud1[] = "\012";
-static char xterm_256color_s_home[] = "\033[H";
-static char xterm_256color_s_civis[] = "\033[?25l";
-static char xterm_256color_s_cub1[] = "\010";
-static char xterm_256color_s_cnorm[] = "\033[?12l\033[?25h";
-static char xterm_256color_s_cuf1[] = "\033[C";
-static char xterm_256color_s_cuu1[] = "\033[A";
-static char xterm_256color_s_cvvis[] = "\033[?12;25h";
-static char xterm_256color_s_dch1[] = "\033[P";
-static char xterm_256color_s_dl1[] = "\033[M";
-static char xterm_256color_s_smacs[] = "\033(0";
-static char xterm_256color_s_blink[] = "\033[5m";
-static char xterm_256color_s_bold[] = "\033[1m";
-static char xterm_256color_s_smcup[] = "\033[?1049h\033[22;0;0t";
-static char xterm_256color_s_dim[] = "\033[2m";
-static char xterm_256color_s_smir[] = "\033[4h";
-static char xterm_256color_s_invis[] = "\033[8m";
-static char xterm_256color_s_rev[] = "\033[7m";
-static char xterm_256color_s_smso[] = "\033[7m";
-static char xterm_256color_s_smul[] = "\033[4m";
-static char xterm_256color_s_ech[] = "\033[%p1%dX";
-static char xterm_256color_s_rmacs[] = "\033(B";
-static char xterm_256color_s_sgr0[] = "\033(B\033[m";
-static char xterm_256color_s_rmcup[] = "\033[?1049l\033[23;0;0t";
-static char xterm_256color_s_rmir[] = "\033[4l";
-static char xterm_256color_s_rmso[] = "\033[27m";
-static char xterm_256color_s_rmul[] = "\033[24m";
-static char xterm_256color_s_flash[] = "\033[?5h$<100/>\033[?5l";
-static char xterm_256color_s_is2[] = "\033[!p\033[?3;4l\033[4l\033>";
-static char xterm_256color_s_il1[] = "\033[L";
-static char xterm_256color_s_kbs[] = "\010";
-static char xterm_256color_s_kdch1[] = "\033[3~";
-static char xterm_256color_s_kcud1[] = "\033OB";
-static char xterm_256color_s_kf1[] = "\033OP";
-static char xterm_256color_s_kf10[] = "\033[21~";
-static char xterm_256color_s_kf2[] = "\033OQ";
-static char xterm_256color_s_kf3[] = "\033OR";
-static char xterm_256color_s_kf4[] = "\033OS";
-static char xterm_256color_s_kf5[] = "\033[15~";
-static char xterm_256color_s_kf6[] = "\033[17~";
-static char xterm_256color_s_kf7[] = "\033[18~";
-static char xterm_256color_s_kf8[] = "\033[19~";
-static char xterm_256color_s_kf9[] = "\033[20~";
-static char xterm_256color_s_khome[] = "\033OH";
-static char xterm_256color_s_kich1[] = "\033[2~";
-static char xterm_256color_s_kcub1[] = "\033OD";
-static char xterm_256color_s_knp[] = "\033[6~";
-static char xterm_256color_s_kpp[] = "\033[5~";
-static char xterm_256color_s_kcuf1[] = "\033OC";
-static char xterm_256color_s_kind[] = "\033[1;2B";
-static char xterm_256color_s_kri[] = "\033[1;2A";
-static char xterm_256color_s_kcuu1[] = "\033OA";
-static char xterm_256color_s_rmkx[] = "\033[?1l\033>";
-static char xterm_256color_s_smkx[] = "\033[?1h\033=";
-static char xterm_256color_s_rmm[] = "\033[?1034l";
-static char xterm_256color_s_smm[] = "\033[?1034h";
-static char xterm_256color_s_dch[] = "\033[%p1%dP";
-static char xterm_256color_s_dl [] = "\033[%p1%dM";
-static char xterm_256color_s_cud[] = "\033[%p1%dB";
-static char xterm_256color_s_ich[] = "\033[%p1%d@";
-static char xterm_256color_s_indn[] = "\033[%p1%dS";
-static char xterm_256color_s_il [] = "\033[%p1%dL";
-static char xterm_256color_s_cub[] = "\033[%p1%dD";
-static char xterm_256color_s_cuf[] = "\033[%p1%dC";
-static char xterm_256color_s_rin[] = "\033[%p1%dT";
-static char xterm_256color_s_cuu[] = "\033[%p1%dA";
-static char xterm_256color_s_mc0[] = "\033[i";
-static char xterm_256color_s_mc4[] = "\033[4i";
-static char xterm_256color_s_mc5[] = "\033[5i";
-static char xterm_256color_s_rep[] = "%p1%c\033[%p2%{1}%-%db";
-static char xterm_256color_s_rs1[] = "\033c\033]104\007";
-static char xterm_256color_s_rs2[] = "\033[!p\033[?3;4l\033[4l\033>";
-static char xterm_256color_s_rc [] = "\0338";
-static char xterm_256color_s_vpa[] = "\033[%i%p1%dd";
-static char xterm_256color_s_sc [] = "\0337";
-static char xterm_256color_s_ind[] = "\012";
-static char xterm_256color_s_ri [] = "\033M";
-static char xterm_256color_s_sgr[] = "%?%p9%t\033(0%e\033(B%;\033[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m";
-static char xterm_256color_s_hts[] = "\033H";
-static char xterm_256color_s_ht [] = "\011";
-static char xterm_256color_s_kb2[] = "\033OE";
-static char xterm_256color_s_acsc[] = "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char xterm_256color_s_kcbt[] = "\033[Z";
-static char xterm_256color_s_smam[] = "\033[?7h";
-static char xterm_256color_s_rmam[] = "\033[?7l";
-static char xterm_256color_s_kend[] = "\033OF";
-static char xterm_256color_s_kent[] = "\033OM";
-static char xterm_256color_s_kDC[] = "\033[3;2~";
-static char xterm_256color_s_kEND[] = "\033[1;2F";
-static char xterm_256color_s_kHOM[] = "\033[1;2H";
-static char xterm_256color_s_kIC[] = "\033[2;2~";
-static char xterm_256color_s_kLFT[] = "\033[1;2D";
-static char xterm_256color_s_kNXT[] = "\033[6;2~";
-static char xterm_256color_s_kPRV[] = "\033[5;2~";
-static char xterm_256color_s_kRIT[] = "\033[1;2C";
-static char xterm_256color_s_kf11[] = "\033[23~";
-static char xterm_256color_s_kf12[] = "\033[24~";
-static char xterm_256color_s_kf13[] = "\033[1;2P";
-static char xterm_256color_s_kf14[] = "\033[1;2Q";
-static char xterm_256color_s_kf15[] = "\033[1;2R";
-static char xterm_256color_s_kf16[] = "\033[1;2S";
-static char xterm_256color_s_kf17[] = "\033[15;2~";
-static char xterm_256color_s_kf18[] = "\033[17;2~";
-static char xterm_256color_s_kf19[] = "\033[18;2~";
-static char xterm_256color_s_kf20[] = "\033[19;2~";
-static char xterm_256color_s_kf21[] = "\033[20;2~";
-static char xterm_256color_s_kf22[] = "\033[21;2~";
-static char xterm_256color_s_kf23[] = "\033[23;2~";
-static char xterm_256color_s_kf24[] = "\033[24;2~";
-static char xterm_256color_s_kf25[] = "\033[1;5P";
-static char xterm_256color_s_kf26[] = "\033[1;5Q";
-static char xterm_256color_s_kf27[] = "\033[1;5R";
-static char xterm_256color_s_kf28[] = "\033[1;5S";
-static char xterm_256color_s_kf29[] = "\033[15;5~";
-static char xterm_256color_s_kf30[] = "\033[17;5~";
-static char xterm_256color_s_kf31[] = "\033[18;5~";
-static char xterm_256color_s_kf32[] = "\033[19;5~";
-static char xterm_256color_s_kf33[] = "\033[20;5~";
-static char xterm_256color_s_kf34[] = "\033[21;5~";
-static char xterm_256color_s_kf35[] = "\033[23;5~";
-static char xterm_256color_s_kf36[] = "\033[24;5~";
-static char xterm_256color_s_kf37[] = "\033[1;6P";
-static char xterm_256color_s_kf38[] = "\033[1;6Q";
-static char xterm_256color_s_kf39[] = "\033[1;6R";
-static char xterm_256color_s_kf40[] = "\033[1;6S";
-static char xterm_256color_s_kf41[] = "\033[15;6~";
-static char xterm_256color_s_kf42[] = "\033[17;6~";
-static char xterm_256color_s_kf43[] = "\033[18;6~";
-static char xterm_256color_s_kf44[] = "\033[19;6~";
-static char xterm_256color_s_kf45[] = "\033[20;6~";
-static char xterm_256color_s_kf46[] = "\033[21;6~";
-static char xterm_256color_s_kf47[] = "\033[23;6~";
-static char xterm_256color_s_kf48[] = "\033[24;6~";
-static char xterm_256color_s_kf49[] = "\033[1;3P";
-static char xterm_256color_s_kf50[] = "\033[1;3Q";
-static char xterm_256color_s_kf51[] = "\033[1;3R";
-static char xterm_256color_s_kf52[] = "\033[1;3S";
-static char xterm_256color_s_kf53[] = "\033[15;3~";
-static char xterm_256color_s_kf54[] = "\033[17;3~";
-static char xterm_256color_s_kf55[] = "\033[18;3~";
-static char xterm_256color_s_kf56[] = "\033[19;3~";
-static char xterm_256color_s_kf57[] = "\033[20;3~";
-static char xterm_256color_s_kf58[] = "\033[21;3~";
-static char xterm_256color_s_kf59[] = "\033[23;3~";
-static char xterm_256color_s_kf60[] = "\033[24;3~";
-static char xterm_256color_s_kf61[] = "\033[1;4P";
-static char xterm_256color_s_kf62[] = "\033[1;4Q";
-static char xterm_256color_s_kf63[] = "\033[1;4R";
-static char xterm_256color_s_el1[] = "\033[1K";
-static char xterm_256color_s_u6 [] = "\033[%i%d;%dR";
-static char xterm_256color_s_u7 [] = "\033[6n";
-static char xterm_256color_s_u8 [] = "\033[?%[;0123456789]c";
-static char xterm_256color_s_u9 [] = "\033[c";
-static char xterm_256color_s_op [] = "\033[39;49m";
-static char xterm_256color_s_oc [] = "\033]104\007";
-static char xterm_256color_s_initc[] = "\033]4;%p1%d;rgb:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\033\134";
-static char xterm_256color_s_sitm[] = "\033[3m";
-static char xterm_256color_s_ritm[] = "\033[23m";
-static char xterm_256color_s_kmous[] = "\033[<";
-static char xterm_256color_s_setaf[] = "\033[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m";
-static char xterm_256color_s_setab[] = "\033[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m";
-static char xterm_256color_s_meml[] = "\033l";
-static char xterm_256color_s_memu[] = "\033m";
-
-static char xterm_256color_bool_data[] = {
- /* 0: bw */ FALSE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ FALSE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ TRUE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ FALSE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ TRUE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ TRUE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ TRUE,
- /* 28: bce */ TRUE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ FALSE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 xterm_256color_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 256,
- /* 14: pairs */ 32767,
- /* 15: ncv */ ABSENT_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * xterm_256color_string_data[] = {
- /* 0: cbt */ xterm_256color_s_cbt,
- /* 1: bel */ xterm_256color_s_bel,
- /* 2: cr */ xterm_256color_s_cr,
- /* 3: csr */ xterm_256color_s_csr,
- /* 4: tbc */ xterm_256color_s_tbc,
- /* 5: clear */ xterm_256color_s_clear,
- /* 6: el */ xterm_256color_s_el,
- /* 7: ed */ xterm_256color_s_ed,
- /* 8: hpa */ xterm_256color_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ xterm_256color_s_cup,
- /* 11: cud1 */ xterm_256color_s_cud1,
- /* 12: home */ xterm_256color_s_home,
- /* 13: civis */ xterm_256color_s_civis,
- /* 14: cub1 */ xterm_256color_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ xterm_256color_s_cnorm,
- /* 17: cuf1 */ xterm_256color_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ xterm_256color_s_cuu1,
- /* 20: cvvis */ xterm_256color_s_cvvis,
- /* 21: dch1 */ xterm_256color_s_dch1,
- /* 22: dl1 */ xterm_256color_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ xterm_256color_s_smacs,
- /* 26: blink */ xterm_256color_s_blink,
- /* 27: bold */ xterm_256color_s_bold,
- /* 28: smcup */ xterm_256color_s_smcup,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ xterm_256color_s_dim,
- /* 31: smir */ xterm_256color_s_smir,
- /* 32: invis */ xterm_256color_s_invis,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ xterm_256color_s_rev,
- /* 35: smso */ xterm_256color_s_smso,
- /* 36: smul */ xterm_256color_s_smul,
- /* 37: ech */ xterm_256color_s_ech,
- /* 38: rmacs */ xterm_256color_s_rmacs,
- /* 39: sgr0 */ xterm_256color_s_sgr0,
- /* 40: rmcup */ xterm_256color_s_rmcup,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ xterm_256color_s_rmir,
- /* 43: rmso */ xterm_256color_s_rmso,
- /* 44: rmul */ xterm_256color_s_rmul,
- /* 45: flash */ xterm_256color_s_flash,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ xterm_256color_s_is2,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ ABSENT_STRING,
- /* 53: il1 */ xterm_256color_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ xterm_256color_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ xterm_256color_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ xterm_256color_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ ABSENT_STRING,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ ABSENT_STRING,
- /* 66: kf1 */ xterm_256color_s_kf1,
- /* 67: kf10 */ xterm_256color_s_kf10,
- /* 68: kf2 */ xterm_256color_s_kf2,
- /* 69: kf3 */ xterm_256color_s_kf3,
- /* 70: kf4 */ xterm_256color_s_kf4,
- /* 71: kf5 */ xterm_256color_s_kf5,
- /* 72: kf6 */ xterm_256color_s_kf6,
- /* 73: kf7 */ xterm_256color_s_kf7,
- /* 74: kf8 */ xterm_256color_s_kf8,
- /* 75: kf9 */ xterm_256color_s_kf9,
- /* 76: khome */ xterm_256color_s_khome,
- /* 77: kich1 */ xterm_256color_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ xterm_256color_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ xterm_256color_s_knp,
- /* 82: kpp */ xterm_256color_s_kpp,
- /* 83: kcuf1 */ xterm_256color_s_kcuf1,
- /* 84: kind */ xterm_256color_s_kind,
- /* 85: kri */ xterm_256color_s_kri,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ xterm_256color_s_kcuu1,
- /* 88: rmkx */ xterm_256color_s_rmkx,
- /* 89: smkx */ xterm_256color_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ xterm_256color_s_rmm,
- /* 102: smm */ xterm_256color_s_smm,
- /* 103: nel */ ABSENT_STRING,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ xterm_256color_s_dch,
- /* 106: dl */ xterm_256color_s_dl,
- /* 107: cud */ xterm_256color_s_cud,
- /* 108: ich */ xterm_256color_s_ich,
- /* 109: indn */ xterm_256color_s_indn,
- /* 110: il */ xterm_256color_s_il,
- /* 111: cub */ xterm_256color_s_cub,
- /* 112: cuf */ xterm_256color_s_cuf,
- /* 113: rin */ xterm_256color_s_rin,
- /* 114: cuu */ xterm_256color_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ xterm_256color_s_mc0,
- /* 119: mc4 */ xterm_256color_s_mc4,
- /* 120: mc5 */ xterm_256color_s_mc5,
- /* 121: rep */ xterm_256color_s_rep,
- /* 122: rs1 */ xterm_256color_s_rs1,
- /* 123: rs2 */ xterm_256color_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ xterm_256color_s_rc,
- /* 127: vpa */ xterm_256color_s_vpa,
- /* 128: sc */ xterm_256color_s_sc,
- /* 129: ind */ xterm_256color_s_ind,
- /* 130: ri */ xterm_256color_s_ri,
- /* 131: sgr */ xterm_256color_s_sgr,
- /* 132: hts */ xterm_256color_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ xterm_256color_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ ABSENT_STRING,
- /* 140: ka3 */ ABSENT_STRING,
- /* 141: kb2 */ xterm_256color_s_kb2,
- /* 142: kc1 */ ABSENT_STRING,
- /* 143: kc3 */ ABSENT_STRING,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ xterm_256color_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ xterm_256color_s_kcbt,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ xterm_256color_s_smam,
- /* 152: rmam */ xterm_256color_s_rmam,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ ABSENT_STRING,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ xterm_256color_s_kend,
- /* 165: kent */ xterm_256color_s_kent,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ xterm_256color_s_kDC,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ xterm_256color_s_kEND,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ xterm_256color_s_kHOM,
- /* 200: kIC */ xterm_256color_s_kIC,
- /* 201: kLFT */ xterm_256color_s_kLFT,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ xterm_256color_s_kNXT,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ xterm_256color_s_kPRV,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ xterm_256color_s_kRIT,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ xterm_256color_s_kf11,
- /* 217: kf12 */ xterm_256color_s_kf12,
- /* 218: kf13 */ xterm_256color_s_kf13,
- /* 219: kf14 */ xterm_256color_s_kf14,
- /* 220: kf15 */ xterm_256color_s_kf15,
- /* 221: kf16 */ xterm_256color_s_kf16,
- /* 222: kf17 */ xterm_256color_s_kf17,
- /* 223: kf18 */ xterm_256color_s_kf18,
- /* 224: kf19 */ xterm_256color_s_kf19,
- /* 225: kf20 */ xterm_256color_s_kf20,
- /* 226: kf21 */ xterm_256color_s_kf21,
- /* 227: kf22 */ xterm_256color_s_kf22,
- /* 228: kf23 */ xterm_256color_s_kf23,
- /* 229: kf24 */ xterm_256color_s_kf24,
- /* 230: kf25 */ xterm_256color_s_kf25,
- /* 231: kf26 */ xterm_256color_s_kf26,
- /* 232: kf27 */ xterm_256color_s_kf27,
- /* 233: kf28 */ xterm_256color_s_kf28,
- /* 234: kf29 */ xterm_256color_s_kf29,
- /* 235: kf30 */ xterm_256color_s_kf30,
- /* 236: kf31 */ xterm_256color_s_kf31,
- /* 237: kf32 */ xterm_256color_s_kf32,
- /* 238: kf33 */ xterm_256color_s_kf33,
- /* 239: kf34 */ xterm_256color_s_kf34,
- /* 240: kf35 */ xterm_256color_s_kf35,
- /* 241: kf36 */ xterm_256color_s_kf36,
- /* 242: kf37 */ xterm_256color_s_kf37,
- /* 243: kf38 */ xterm_256color_s_kf38,
- /* 244: kf39 */ xterm_256color_s_kf39,
- /* 245: kf40 */ xterm_256color_s_kf40,
- /* 246: kf41 */ xterm_256color_s_kf41,
- /* 247: kf42 */ xterm_256color_s_kf42,
- /* 248: kf43 */ xterm_256color_s_kf43,
- /* 249: kf44 */ xterm_256color_s_kf44,
- /* 250: kf45 */ xterm_256color_s_kf45,
- /* 251: kf46 */ xterm_256color_s_kf46,
- /* 252: kf47 */ xterm_256color_s_kf47,
- /* 253: kf48 */ xterm_256color_s_kf48,
- /* 254: kf49 */ xterm_256color_s_kf49,
- /* 255: kf50 */ xterm_256color_s_kf50,
- /* 256: kf51 */ xterm_256color_s_kf51,
- /* 257: kf52 */ xterm_256color_s_kf52,
- /* 258: kf53 */ xterm_256color_s_kf53,
- /* 259: kf54 */ xterm_256color_s_kf54,
- /* 260: kf55 */ xterm_256color_s_kf55,
- /* 261: kf56 */ xterm_256color_s_kf56,
- /* 262: kf57 */ xterm_256color_s_kf57,
- /* 263: kf58 */ xterm_256color_s_kf58,
- /* 264: kf59 */ xterm_256color_s_kf59,
- /* 265: kf60 */ xterm_256color_s_kf60,
- /* 266: kf61 */ xterm_256color_s_kf61,
- /* 267: kf62 */ xterm_256color_s_kf62,
- /* 268: kf63 */ xterm_256color_s_kf63,
- /* 269: el1 */ xterm_256color_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ xterm_256color_s_u6,
- /* 294: u7 */ xterm_256color_s_u7,
- /* 295: u8 */ xterm_256color_s_u8,
- /* 296: u9 */ xterm_256color_s_u9,
- /* 297: op */ xterm_256color_s_op,
- /* 298: oc */ xterm_256color_s_oc,
- /* 299: initc */ xterm_256color_s_initc,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ ABSENT_STRING,
- /* 303: setb */ ABSENT_STRING,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ xterm_256color_s_sitm,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ xterm_256color_s_ritm,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ xterm_256color_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ xterm_256color_s_setaf,
- /* 360: setab */ xterm_256color_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ xterm_256color_s_meml,
- /* 412: memu */ xterm_256color_s_memu,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* screen */
-
-static char screen_alias_data[] = "screen|VT 100/ANSI X3.64 virtual terminal";
-
-static char screen_s_cbt [] = "\033[Z";
-static char screen_s_bel [] = "\007";
-static char screen_s_cr [] = "\015";
-static char screen_s_csr [] = "\033[%i%p1%d;%p2%dr";
-static char screen_s_tbc [] = "\033[3g";
-static char screen_s_clear [] = "\033[H\033[J";
-static char screen_s_el [] = "\033[K";
-static char screen_s_ed [] = "\033[J";
-static char screen_s_hpa [] = "\033[%i%p1%dG";
-static char screen_s_cup [] = "\033[%i%p1%d;%p2%dH";
-static char screen_s_cud1 [] = "\012";
-static char screen_s_home [] = "\033[H";
-static char screen_s_civis [] = "\033[?25l";
-static char screen_s_cub1 [] = "\010";
-static char screen_s_cnorm [] = "\033[34h\033[?25h";
-static char screen_s_cuf1 [] = "\033[C";
-static char screen_s_cuu1 [] = "\033M";
-static char screen_s_cvvis [] = "\033[34l";
-static char screen_s_dch1 [] = "\033[P";
-static char screen_s_dl1 [] = "\033[M";
-static char screen_s_smacs [] = "\016";
-static char screen_s_blink [] = "\033[5m";
-static char screen_s_bold [] = "\033[1m";
-static char screen_s_smcup [] = "\033[?1049h";
-static char screen_s_dim [] = "\033[2m";
-static char screen_s_smir [] = "\033[4h";
-static char screen_s_rev [] = "\033[7m";
-static char screen_s_smso [] = "\033[3m";
-static char screen_s_smul [] = "\033[4m";
-static char screen_s_rmacs [] = "\017";
-static char screen_s_sgr0 [] = "\033[m\017";
-static char screen_s_rmcup [] = "\033[?1049l";
-static char screen_s_rmir [] = "\033[4l";
-static char screen_s_rmso [] = "\033[23m";
-static char screen_s_rmul [] = "\033[24m";
-static char screen_s_flash [] = "\033g";
-static char screen_s_is2 [] = "\033)0";
-static char screen_s_il1 [] = "\033[L";
-static char screen_s_kbs [] = "\010";
-static char screen_s_kdch1 [] = "\033[3~";
-static char screen_s_kcud1 [] = "\033OB";
-static char screen_s_kf1 [] = "\033OP";
-static char screen_s_kf10 [] = "\033[21~";
-static char screen_s_kf2 [] = "\033OQ";
-static char screen_s_kf3 [] = "\033OR";
-static char screen_s_kf4 [] = "\033OS";
-static char screen_s_kf5 [] = "\033[15~";
-static char screen_s_kf6 [] = "\033[17~";
-static char screen_s_kf7 [] = "\033[18~";
-static char screen_s_kf8 [] = "\033[19~";
-static char screen_s_kf9 [] = "\033[20~";
-static char screen_s_khome [] = "\033[1~";
-static char screen_s_kich1 [] = "\033[2~";
-static char screen_s_kcub1 [] = "\033OD";
-static char screen_s_knp [] = "\033[6~";
-static char screen_s_kpp [] = "\033[5~";
-static char screen_s_kcuf1 [] = "\033OC";
-static char screen_s_kcuu1 [] = "\033OA";
-static char screen_s_rmkx [] = "\033[?1l\033>";
-static char screen_s_smkx [] = "\033[?1h\033=";
-static char screen_s_nel [] = "\033E";
-static char screen_s_dch [] = "\033[%p1%dP";
-static char screen_s_dl [] = "\033[%p1%dM";
-static char screen_s_cud [] = "\033[%p1%dB";
-static char screen_s_ich [] = "\033[%p1%d@";
-static char screen_s_indn [] = "\033[%p1%dS";
-static char screen_s_il [] = "\033[%p1%dL";
-static char screen_s_cub [] = "\033[%p1%dD";
-static char screen_s_cuf [] = "\033[%p1%dC";
-static char screen_s_cuu [] = "\033[%p1%dA";
-static char screen_s_rs2 [] = "\033c\033[?1000l\033[?25h";
-static char screen_s_rc [] = "\0338";
-static char screen_s_vpa [] = "\033[%i%p1%dd";
-static char screen_s_sc [] = "\0337";
-static char screen_s_ind [] = "\012";
-static char screen_s_ri [] = "\033M";
-static char screen_s_sgr [] = "\033[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;m%?%p9%t\016%e\017%;";
-static char screen_s_hts [] = "\033H";
-static char screen_s_ht [] = "\011";
-static char screen_s_acsc [] = "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char screen_s_kcbt [] = "\033[Z";
-static char screen_s_enacs [] = "\033(B\033)0";
-static char screen_s_kend [] = "\033[4~";
-static char screen_s_kf11 [] = "\033[23~";
-static char screen_s_kf12 [] = "\033[24~";
-static char screen_s_el1 [] = "\033[1K";
-static char screen_s_op [] = "\033[39;49m";
-static char screen_s_kmous [] = "\033[M";
-static char screen_s_setaf [] = "\033[3%p1%dm";
-static char screen_s_setab [] = "\033[4%p1%dm";
-
-static char screen_bool_data[] = {
- /* 0: bw */ FALSE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ FALSE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ TRUE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ FALSE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ FALSE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ FALSE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ FALSE,
- /* 28: bce */ FALSE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ TRUE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 screen_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 8,
- /* 14: pairs */ 64,
- /* 15: ncv */ CANCELLED_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * screen_string_data[] = {
- /* 0: cbt */ screen_s_cbt,
- /* 1: bel */ screen_s_bel,
- /* 2: cr */ screen_s_cr,
- /* 3: csr */ screen_s_csr,
- /* 4: tbc */ screen_s_tbc,
- /* 5: clear */ screen_s_clear,
- /* 6: el */ screen_s_el,
- /* 7: ed */ screen_s_ed,
- /* 8: hpa */ screen_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ screen_s_cup,
- /* 11: cud1 */ screen_s_cud1,
- /* 12: home */ screen_s_home,
- /* 13: civis */ screen_s_civis,
- /* 14: cub1 */ screen_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ screen_s_cnorm,
- /* 17: cuf1 */ screen_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ screen_s_cuu1,
- /* 20: cvvis */ screen_s_cvvis,
- /* 21: dch1 */ screen_s_dch1,
- /* 22: dl1 */ screen_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ screen_s_smacs,
- /* 26: blink */ screen_s_blink,
- /* 27: bold */ screen_s_bold,
- /* 28: smcup */ screen_s_smcup,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ screen_s_dim,
- /* 31: smir */ screen_s_smir,
- /* 32: invis */ ABSENT_STRING,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ screen_s_rev,
- /* 35: smso */ screen_s_smso,
- /* 36: smul */ screen_s_smul,
- /* 37: ech */ ABSENT_STRING,
- /* 38: rmacs */ screen_s_rmacs,
- /* 39: sgr0 */ screen_s_sgr0,
- /* 40: rmcup */ screen_s_rmcup,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ screen_s_rmir,
- /* 43: rmso */ screen_s_rmso,
- /* 44: rmul */ screen_s_rmul,
- /* 45: flash */ screen_s_flash,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ screen_s_is2,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ ABSENT_STRING,
- /* 53: il1 */ screen_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ screen_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ screen_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ screen_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ ABSENT_STRING,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ ABSENT_STRING,
- /* 66: kf1 */ screen_s_kf1,
- /* 67: kf10 */ screen_s_kf10,
- /* 68: kf2 */ screen_s_kf2,
- /* 69: kf3 */ screen_s_kf3,
- /* 70: kf4 */ screen_s_kf4,
- /* 71: kf5 */ screen_s_kf5,
- /* 72: kf6 */ screen_s_kf6,
- /* 73: kf7 */ screen_s_kf7,
- /* 74: kf8 */ screen_s_kf8,
- /* 75: kf9 */ screen_s_kf9,
- /* 76: khome */ screen_s_khome,
- /* 77: kich1 */ screen_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ screen_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ screen_s_knp,
- /* 82: kpp */ screen_s_kpp,
- /* 83: kcuf1 */ screen_s_kcuf1,
- /* 84: kind */ ABSENT_STRING,
- /* 85: kri */ ABSENT_STRING,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ screen_s_kcuu1,
- /* 88: rmkx */ screen_s_rmkx,
- /* 89: smkx */ screen_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ ABSENT_STRING,
- /* 102: smm */ ABSENT_STRING,
- /* 103: nel */ screen_s_nel,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ screen_s_dch,
- /* 106: dl */ screen_s_dl,
- /* 107: cud */ screen_s_cud,
- /* 108: ich */ screen_s_ich,
- /* 109: indn */ screen_s_indn,
- /* 110: il */ screen_s_il,
- /* 111: cub */ screen_s_cub,
- /* 112: cuf */ screen_s_cuf,
- /* 113: rin */ ABSENT_STRING,
- /* 114: cuu */ screen_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ ABSENT_STRING,
- /* 119: mc4 */ ABSENT_STRING,
- /* 120: mc5 */ ABSENT_STRING,
- /* 121: rep */ ABSENT_STRING,
- /* 122: rs1 */ ABSENT_STRING,
- /* 123: rs2 */ screen_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ screen_s_rc,
- /* 127: vpa */ screen_s_vpa,
- /* 128: sc */ screen_s_sc,
- /* 129: ind */ screen_s_ind,
- /* 130: ri */ screen_s_ri,
- /* 131: sgr */ screen_s_sgr,
- /* 132: hts */ screen_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ screen_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ ABSENT_STRING,
- /* 140: ka3 */ ABSENT_STRING,
- /* 141: kb2 */ ABSENT_STRING,
- /* 142: kc1 */ ABSENT_STRING,
- /* 143: kc3 */ ABSENT_STRING,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ screen_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ screen_s_kcbt,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ ABSENT_STRING,
- /* 152: rmam */ ABSENT_STRING,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ screen_s_enacs,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ screen_s_kend,
- /* 165: kent */ ABSENT_STRING,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ ABSENT_STRING,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ ABSENT_STRING,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ ABSENT_STRING,
- /* 200: kIC */ ABSENT_STRING,
- /* 201: kLFT */ ABSENT_STRING,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ ABSENT_STRING,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ ABSENT_STRING,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ ABSENT_STRING,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ screen_s_kf11,
- /* 217: kf12 */ screen_s_kf12,
- /* 218: kf13 */ ABSENT_STRING,
- /* 219: kf14 */ ABSENT_STRING,
- /* 220: kf15 */ ABSENT_STRING,
- /* 221: kf16 */ ABSENT_STRING,
- /* 222: kf17 */ ABSENT_STRING,
- /* 223: kf18 */ ABSENT_STRING,
- /* 224: kf19 */ ABSENT_STRING,
- /* 225: kf20 */ ABSENT_STRING,
- /* 226: kf21 */ ABSENT_STRING,
- /* 227: kf22 */ ABSENT_STRING,
- /* 228: kf23 */ ABSENT_STRING,
- /* 229: kf24 */ ABSENT_STRING,
- /* 230: kf25 */ ABSENT_STRING,
- /* 231: kf26 */ ABSENT_STRING,
- /* 232: kf27 */ ABSENT_STRING,
- /* 233: kf28 */ ABSENT_STRING,
- /* 234: kf29 */ ABSENT_STRING,
- /* 235: kf30 */ ABSENT_STRING,
- /* 236: kf31 */ ABSENT_STRING,
- /* 237: kf32 */ ABSENT_STRING,
- /* 238: kf33 */ ABSENT_STRING,
- /* 239: kf34 */ ABSENT_STRING,
- /* 240: kf35 */ ABSENT_STRING,
- /* 241: kf36 */ ABSENT_STRING,
- /* 242: kf37 */ ABSENT_STRING,
- /* 243: kf38 */ ABSENT_STRING,
- /* 244: kf39 */ ABSENT_STRING,
- /* 245: kf40 */ ABSENT_STRING,
- /* 246: kf41 */ ABSENT_STRING,
- /* 247: kf42 */ ABSENT_STRING,
- /* 248: kf43 */ ABSENT_STRING,
- /* 249: kf44 */ ABSENT_STRING,
- /* 250: kf45 */ ABSENT_STRING,
- /* 251: kf46 */ ABSENT_STRING,
- /* 252: kf47 */ ABSENT_STRING,
- /* 253: kf48 */ ABSENT_STRING,
- /* 254: kf49 */ ABSENT_STRING,
- /* 255: kf50 */ ABSENT_STRING,
- /* 256: kf51 */ ABSENT_STRING,
- /* 257: kf52 */ ABSENT_STRING,
- /* 258: kf53 */ ABSENT_STRING,
- /* 259: kf54 */ ABSENT_STRING,
- /* 260: kf55 */ ABSENT_STRING,
- /* 261: kf56 */ ABSENT_STRING,
- /* 262: kf57 */ ABSENT_STRING,
- /* 263: kf58 */ ABSENT_STRING,
- /* 264: kf59 */ ABSENT_STRING,
- /* 265: kf60 */ ABSENT_STRING,
- /* 266: kf61 */ ABSENT_STRING,
- /* 267: kf62 */ ABSENT_STRING,
- /* 268: kf63 */ ABSENT_STRING,
- /* 269: el1 */ screen_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ ABSENT_STRING,
- /* 294: u7 */ ABSENT_STRING,
- /* 295: u8 */ ABSENT_STRING,
- /* 296: u9 */ ABSENT_STRING,
- /* 297: op */ screen_s_op,
- /* 298: oc */ ABSENT_STRING,
- /* 299: initc */ ABSENT_STRING,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ ABSENT_STRING,
- /* 303: setb */ ABSENT_STRING,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ ABSENT_STRING,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ ABSENT_STRING,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ screen_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ screen_s_setaf,
- /* 360: setab */ screen_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ ABSENT_STRING,
- /* 412: memu */ ABSENT_STRING,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* screen.linux */
-
-static char screen_linux_alias_data[] = "screen.linux|screen in linux console";
-
-static char screen_linux_s_cbt [] = "\033[Z";
-static char screen_linux_s_bel [] = "\007";
-static char screen_linux_s_cr [] = "\015";
-static char screen_linux_s_csr [] = "\033[%i%p1%d;%p2%dr";
-static char screen_linux_s_tbc [] = "\033[3g";
-static char screen_linux_s_clear[] = "\033[H\033[J";
-static char screen_linux_s_el [] = "\033[K";
-static char screen_linux_s_ed [] = "\033[J";
-static char screen_linux_s_hpa [] = "\033[%i%p1%dG";
-static char screen_linux_s_cup [] = "\033[%i%p1%d;%p2%dH";
-static char screen_linux_s_cud1 [] = "\012";
-static char screen_linux_s_home [] = "\033[H";
-static char screen_linux_s_civis[] = "\033[?25l";
-static char screen_linux_s_cub1 [] = "\010";
-static char screen_linux_s_cnorm[] = "\033[34h\033[?25h";
-static char screen_linux_s_cuf1 [] = "\033[C";
-static char screen_linux_s_cuu1 [] = "\033M";
-static char screen_linux_s_cvvis[] = "\033[34l";
-static char screen_linux_s_dch1 [] = "\033[P";
-static char screen_linux_s_dl1 [] = "\033[M";
-static char screen_linux_s_smacs[] = "\016";
-static char screen_linux_s_blink[] = "\033[5m";
-static char screen_linux_s_bold [] = "\033[1m";
-static char screen_linux_s_smcup[] = "\033[?1049h";
-static char screen_linux_s_dim [] = "\033[2m";
-static char screen_linux_s_smir [] = "\033[4h";
-static char screen_linux_s_rev [] = "\033[7m";
-static char screen_linux_s_smso [] = "\033[3m";
-static char screen_linux_s_smul [] = "\033[4m";
-static char screen_linux_s_rmacs[] = "\017";
-static char screen_linux_s_sgr0 [] = "\033[m\017";
-static char screen_linux_s_rmcup[] = "\033[?1049l";
-static char screen_linux_s_rmir [] = "\033[4l";
-static char screen_linux_s_rmso [] = "\033[23m";
-static char screen_linux_s_rmul [] = "\033[24m";
-static char screen_linux_s_flash[] = "\033g";
-static char screen_linux_s_is2 [] = "\033)0";
-static char screen_linux_s_il1 [] = "\033[L";
-static char screen_linux_s_kbs [] = "\177";
-static char screen_linux_s_kdch1[] = "\033[3~";
-static char screen_linux_s_kcud1[] = "\033OB";
-static char screen_linux_s_kf1 [] = "\033OP";
-static char screen_linux_s_kf10 [] = "\033[21~";
-static char screen_linux_s_kf2 [] = "\033OQ";
-static char screen_linux_s_kf3 [] = "\033OR";
-static char screen_linux_s_kf4 [] = "\033OS";
-static char screen_linux_s_kf5 [] = "\033[15~";
-static char screen_linux_s_kf6 [] = "\033[17~";
-static char screen_linux_s_kf7 [] = "\033[18~";
-static char screen_linux_s_kf8 [] = "\033[19~";
-static char screen_linux_s_kf9 [] = "\033[20~";
-static char screen_linux_s_khome[] = "\033[1~";
-static char screen_linux_s_kich1[] = "\033[2~";
-static char screen_linux_s_kcub1[] = "\033OD";
-static char screen_linux_s_knp [] = "\033[6~";
-static char screen_linux_s_kpp [] = "\033[5~";
-static char screen_linux_s_kcuf1[] = "\033OC";
-static char screen_linux_s_kcuu1[] = "\033OA";
-static char screen_linux_s_rmkx [] = "\033[?1l\033>";
-static char screen_linux_s_smkx [] = "\033[?1h\033=";
-static char screen_linux_s_nel [] = "\033E";
-static char screen_linux_s_dch [] = "\033[%p1%dP";
-static char screen_linux_s_dl [] = "\033[%p1%dM";
-static char screen_linux_s_cud [] = "\033[%p1%dB";
-static char screen_linux_s_ich [] = "\033[%p1%d@";
-static char screen_linux_s_indn [] = "\033[%p1%dS";
-static char screen_linux_s_il [] = "\033[%p1%dL";
-static char screen_linux_s_cub [] = "\033[%p1%dD";
-static char screen_linux_s_cuf [] = "\033[%p1%dC";
-static char screen_linux_s_cuu [] = "\033[%p1%dA";
-static char screen_linux_s_rs2 [] = "\033c\033[?1000l\033[?25h";
-static char screen_linux_s_rc [] = "\0338";
-static char screen_linux_s_vpa [] = "\033[%i%p1%dd";
-static char screen_linux_s_sc [] = "\0337";
-static char screen_linux_s_ind [] = "\012";
-static char screen_linux_s_ri [] = "\033M";
-static char screen_linux_s_sgr [] = "\033[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;m%?%p9%t\016%e\017%;";
-static char screen_linux_s_hts [] = "\033H";
-static char screen_linux_s_ht [] = "\011";
-static char screen_linux_s_acsc [] = "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char screen_linux_s_enacs[] = "\033(B\033)0";
-static char screen_linux_s_kend [] = "\033[4~";
-static char screen_linux_s_kf11 [] = "\033[23~";
-static char screen_linux_s_kf12 [] = "\033[24~";
-static char screen_linux_s_el1 [] = "\033[1K";
-static char screen_linux_s_op [] = "\033[39;49m";
-static char screen_linux_s_kmous[] = "\033[M";
-static char screen_linux_s_setaf[] = "\033[3%p1%dm";
-static char screen_linux_s_setab[] = "\033[4%p1%dm";
-
-static char screen_linux_bool_data[] = {
- /* 0: bw */ TRUE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ FALSE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ TRUE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ FALSE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ FALSE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ FALSE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ FALSE,
- /* 28: bce */ FALSE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ TRUE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 screen_linux_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 8,
- /* 14: pairs */ 64,
- /* 15: ncv */ ABSENT_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * screen_linux_string_data[] = {
- /* 0: cbt */ screen_linux_s_cbt,
- /* 1: bel */ screen_linux_s_bel,
- /* 2: cr */ screen_linux_s_cr,
- /* 3: csr */ screen_linux_s_csr,
- /* 4: tbc */ screen_linux_s_tbc,
- /* 5: clear */ screen_linux_s_clear,
- /* 6: el */ screen_linux_s_el,
- /* 7: ed */ screen_linux_s_ed,
- /* 8: hpa */ screen_linux_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ screen_linux_s_cup,
- /* 11: cud1 */ screen_linux_s_cud1,
- /* 12: home */ screen_linux_s_home,
- /* 13: civis */ screen_linux_s_civis,
- /* 14: cub1 */ screen_linux_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ screen_linux_s_cnorm,
- /* 17: cuf1 */ screen_linux_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ screen_linux_s_cuu1,
- /* 20: cvvis */ screen_linux_s_cvvis,
- /* 21: dch1 */ screen_linux_s_dch1,
- /* 22: dl1 */ screen_linux_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ screen_linux_s_smacs,
- /* 26: blink */ screen_linux_s_blink,
- /* 27: bold */ screen_linux_s_bold,
- /* 28: smcup */ screen_linux_s_smcup,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ screen_linux_s_dim,
- /* 31: smir */ screen_linux_s_smir,
- /* 32: invis */ ABSENT_STRING,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ screen_linux_s_rev,
- /* 35: smso */ screen_linux_s_smso,
- /* 36: smul */ screen_linux_s_smul,
- /* 37: ech */ ABSENT_STRING,
- /* 38: rmacs */ screen_linux_s_rmacs,
- /* 39: sgr0 */ screen_linux_s_sgr0,
- /* 40: rmcup */ screen_linux_s_rmcup,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ screen_linux_s_rmir,
- /* 43: rmso */ screen_linux_s_rmso,
- /* 44: rmul */ screen_linux_s_rmul,
- /* 45: flash */ screen_linux_s_flash,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ screen_linux_s_is2,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ ABSENT_STRING,
- /* 53: il1 */ screen_linux_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ screen_linux_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ screen_linux_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ screen_linux_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ ABSENT_STRING,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ ABSENT_STRING,
- /* 66: kf1 */ screen_linux_s_kf1,
- /* 67: kf10 */ screen_linux_s_kf10,
- /* 68: kf2 */ screen_linux_s_kf2,
- /* 69: kf3 */ screen_linux_s_kf3,
- /* 70: kf4 */ screen_linux_s_kf4,
- /* 71: kf5 */ screen_linux_s_kf5,
- /* 72: kf6 */ screen_linux_s_kf6,
- /* 73: kf7 */ screen_linux_s_kf7,
- /* 74: kf8 */ screen_linux_s_kf8,
- /* 75: kf9 */ screen_linux_s_kf9,
- /* 76: khome */ screen_linux_s_khome,
- /* 77: kich1 */ screen_linux_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ screen_linux_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ screen_linux_s_knp,
- /* 82: kpp */ screen_linux_s_kpp,
- /* 83: kcuf1 */ screen_linux_s_kcuf1,
- /* 84: kind */ ABSENT_STRING,
- /* 85: kri */ ABSENT_STRING,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ screen_linux_s_kcuu1,
- /* 88: rmkx */ screen_linux_s_rmkx,
- /* 89: smkx */ screen_linux_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ ABSENT_STRING,
- /* 102: smm */ ABSENT_STRING,
- /* 103: nel */ screen_linux_s_nel,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ screen_linux_s_dch,
- /* 106: dl */ screen_linux_s_dl,
- /* 107: cud */ screen_linux_s_cud,
- /* 108: ich */ screen_linux_s_ich,
- /* 109: indn */ screen_linux_s_indn,
- /* 110: il */ screen_linux_s_il,
- /* 111: cub */ screen_linux_s_cub,
- /* 112: cuf */ screen_linux_s_cuf,
- /* 113: rin */ ABSENT_STRING,
- /* 114: cuu */ screen_linux_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ ABSENT_STRING,
- /* 119: mc4 */ ABSENT_STRING,
- /* 120: mc5 */ ABSENT_STRING,
- /* 121: rep */ ABSENT_STRING,
- /* 122: rs1 */ ABSENT_STRING,
- /* 123: rs2 */ screen_linux_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ screen_linux_s_rc,
- /* 127: vpa */ screen_linux_s_vpa,
- /* 128: sc */ screen_linux_s_sc,
- /* 129: ind */ screen_linux_s_ind,
- /* 130: ri */ screen_linux_s_ri,
- /* 131: sgr */ screen_linux_s_sgr,
- /* 132: hts */ screen_linux_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ screen_linux_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ ABSENT_STRING,
- /* 140: ka3 */ ABSENT_STRING,
- /* 141: kb2 */ ABSENT_STRING,
- /* 142: kc1 */ ABSENT_STRING,
- /* 143: kc3 */ ABSENT_STRING,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ screen_linux_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ CANCELLED_STRING,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ ABSENT_STRING,
- /* 152: rmam */ ABSENT_STRING,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ screen_linux_s_enacs,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ screen_linux_s_kend,
- /* 165: kent */ ABSENT_STRING,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ ABSENT_STRING,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ ABSENT_STRING,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ ABSENT_STRING,
- /* 200: kIC */ ABSENT_STRING,
- /* 201: kLFT */ ABSENT_STRING,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ ABSENT_STRING,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ ABSENT_STRING,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ ABSENT_STRING,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ screen_linux_s_kf11,
- /* 217: kf12 */ screen_linux_s_kf12,
- /* 218: kf13 */ ABSENT_STRING,
- /* 219: kf14 */ ABSENT_STRING,
- /* 220: kf15 */ ABSENT_STRING,
- /* 221: kf16 */ ABSENT_STRING,
- /* 222: kf17 */ ABSENT_STRING,
- /* 223: kf18 */ ABSENT_STRING,
- /* 224: kf19 */ ABSENT_STRING,
- /* 225: kf20 */ ABSENT_STRING,
- /* 226: kf21 */ ABSENT_STRING,
- /* 227: kf22 */ ABSENT_STRING,
- /* 228: kf23 */ ABSENT_STRING,
- /* 229: kf24 */ ABSENT_STRING,
- /* 230: kf25 */ ABSENT_STRING,
- /* 231: kf26 */ ABSENT_STRING,
- /* 232: kf27 */ ABSENT_STRING,
- /* 233: kf28 */ ABSENT_STRING,
- /* 234: kf29 */ ABSENT_STRING,
- /* 235: kf30 */ ABSENT_STRING,
- /* 236: kf31 */ ABSENT_STRING,
- /* 237: kf32 */ ABSENT_STRING,
- /* 238: kf33 */ ABSENT_STRING,
- /* 239: kf34 */ ABSENT_STRING,
- /* 240: kf35 */ ABSENT_STRING,
- /* 241: kf36 */ ABSENT_STRING,
- /* 242: kf37 */ ABSENT_STRING,
- /* 243: kf38 */ ABSENT_STRING,
- /* 244: kf39 */ ABSENT_STRING,
- /* 245: kf40 */ ABSENT_STRING,
- /* 246: kf41 */ ABSENT_STRING,
- /* 247: kf42 */ ABSENT_STRING,
- /* 248: kf43 */ ABSENT_STRING,
- /* 249: kf44 */ ABSENT_STRING,
- /* 250: kf45 */ ABSENT_STRING,
- /* 251: kf46 */ ABSENT_STRING,
- /* 252: kf47 */ ABSENT_STRING,
- /* 253: kf48 */ ABSENT_STRING,
- /* 254: kf49 */ ABSENT_STRING,
- /* 255: kf50 */ ABSENT_STRING,
- /* 256: kf51 */ ABSENT_STRING,
- /* 257: kf52 */ ABSENT_STRING,
- /* 258: kf53 */ ABSENT_STRING,
- /* 259: kf54 */ ABSENT_STRING,
- /* 260: kf55 */ ABSENT_STRING,
- /* 261: kf56 */ ABSENT_STRING,
- /* 262: kf57 */ ABSENT_STRING,
- /* 263: kf58 */ ABSENT_STRING,
- /* 264: kf59 */ ABSENT_STRING,
- /* 265: kf60 */ ABSENT_STRING,
- /* 266: kf61 */ ABSENT_STRING,
- /* 267: kf62 */ ABSENT_STRING,
- /* 268: kf63 */ ABSENT_STRING,
- /* 269: el1 */ screen_linux_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ ABSENT_STRING,
- /* 294: u7 */ ABSENT_STRING,
- /* 295: u8 */ ABSENT_STRING,
- /* 296: u9 */ ABSENT_STRING,
- /* 297: op */ screen_linux_s_op,
- /* 298: oc */ ABSENT_STRING,
- /* 299: initc */ ABSENT_STRING,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ ABSENT_STRING,
- /* 303: setb */ ABSENT_STRING,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ ABSENT_STRING,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ ABSENT_STRING,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ screen_linux_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ screen_linux_s_setaf,
- /* 360: setab */ screen_linux_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ ABSENT_STRING,
- /* 412: memu */ ABSENT_STRING,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* screen.rxvt */
-
-static char screen_rxvt_alias_data[] = "screen.rxvt|screen in rxvt";
-
-static char screen_rxvt_s_cbt [] = "\033[Z";
-static char screen_rxvt_s_bel [] = "\007";
-static char screen_rxvt_s_cr [] = "\015";
-static char screen_rxvt_s_csr [] = "\033[%i%p1%d;%p2%dr";
-static char screen_rxvt_s_tbc [] = "\033[3g";
-static char screen_rxvt_s_clear [] = "\033[H\033[J";
-static char screen_rxvt_s_el [] = "\033[K";
-static char screen_rxvt_s_ed [] = "\033[J";
-static char screen_rxvt_s_hpa [] = "\033[%i%p1%dG";
-static char screen_rxvt_s_cup [] = "\033[%i%p1%d;%p2%dH";
-static char screen_rxvt_s_cud1 [] = "\012";
-static char screen_rxvt_s_home [] = "\033[H";
-static char screen_rxvt_s_civis [] = "\033[?25l";
-static char screen_rxvt_s_cub1 [] = "\010";
-static char screen_rxvt_s_cnorm [] = "\033[34h\033[?25h";
-static char screen_rxvt_s_cuf1 [] = "\033[C";
-static char screen_rxvt_s_cuu1 [] = "\033M";
-static char screen_rxvt_s_dch1 [] = "\033[P";
-static char screen_rxvt_s_dl1 [] = "\033[M";
-static char screen_rxvt_s_smacs [] = "\016";
-static char screen_rxvt_s_blink [] = "\033[5m";
-static char screen_rxvt_s_bold [] = "\033[1m";
-static char screen_rxvt_s_smcup [] = "\033[?1049h";
-static char screen_rxvt_s_dim [] = "\033[2m";
-static char screen_rxvt_s_smir [] = "\033[4h";
-static char screen_rxvt_s_rev [] = "\033[7m";
-static char screen_rxvt_s_smso [] = "\033[3m";
-static char screen_rxvt_s_smul [] = "\033[4m";
-static char screen_rxvt_s_rmacs [] = "\017";
-static char screen_rxvt_s_sgr0 [] = "\033[m\017";
-static char screen_rxvt_s_rmcup [] = "\033[?1049l";
-static char screen_rxvt_s_rmir [] = "\033[4l";
-static char screen_rxvt_s_rmso [] = "\033[23m";
-static char screen_rxvt_s_rmul [] = "\033[24m";
-static char screen_rxvt_s_is2 [] = "\033)0";
-static char screen_rxvt_s_il1 [] = "\033[L";
-static char screen_rxvt_s_kbs [] = "\010";
-static char screen_rxvt_s_kdch1 [] = "\033[3~";
-static char screen_rxvt_s_kcud1 [] = "\033OB";
-static char screen_rxvt_s_kel [] = "\033[8^";
-static char screen_rxvt_s_kf1 [] = "\033OP";
-static char screen_rxvt_s_kf10 [] = "\033[21~";
-static char screen_rxvt_s_kf2 [] = "\033OQ";
-static char screen_rxvt_s_kf3 [] = "\033OR";
-static char screen_rxvt_s_kf4 [] = "\033OS";
-static char screen_rxvt_s_kf5 [] = "\033[15~";
-static char screen_rxvt_s_kf6 [] = "\033[17~";
-static char screen_rxvt_s_kf7 [] = "\033[18~";
-static char screen_rxvt_s_kf8 [] = "\033[19~";
-static char screen_rxvt_s_kf9 [] = "\033[20~";
-static char screen_rxvt_s_khome [] = "\033[1~";
-static char screen_rxvt_s_kich1 [] = "\033[2~";
-static char screen_rxvt_s_kcub1 [] = "\033OD";
-static char screen_rxvt_s_knp [] = "\033[6~";
-static char screen_rxvt_s_kpp [] = "\033[5~";
-static char screen_rxvt_s_kcuf1 [] = "\033OC";
-static char screen_rxvt_s_kind [] = "\033[a";
-static char screen_rxvt_s_kri [] = "\033[b";
-static char screen_rxvt_s_kcuu1 [] = "\033OA";
-static char screen_rxvt_s_rmkx [] = "\033[?1l\033>";
-static char screen_rxvt_s_smkx [] = "\033[?1h\033=";
-static char screen_rxvt_s_nel [] = "\033E";
-static char screen_rxvt_s_dch [] = "\033[%p1%dP";
-static char screen_rxvt_s_dl [] = "\033[%p1%dM";
-static char screen_rxvt_s_cud [] = "\033[%p1%dB";
-static char screen_rxvt_s_ich [] = "\033[%p1%d@";
-static char screen_rxvt_s_indn [] = "\033[%p1%dS";
-static char screen_rxvt_s_il [] = "\033[%p1%dL";
-static char screen_rxvt_s_cub [] = "\033[%p1%dD";
-static char screen_rxvt_s_cuf [] = "\033[%p1%dC";
-static char screen_rxvt_s_cuu [] = "\033[%p1%dA";
-static char screen_rxvt_s_rs2 [] = "\033c\033[?1000l\033[?25h";
-static char screen_rxvt_s_rc [] = "\0338";
-static char screen_rxvt_s_vpa [] = "\033[%i%p1%dd";
-static char screen_rxvt_s_sc [] = "\0337";
-static char screen_rxvt_s_ind [] = "\012";
-static char screen_rxvt_s_ri [] = "\033M";
-static char screen_rxvt_s_sgr [] = "\033[0%?%p6%t;1%;%?%p1%t;3%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;m%?%p9%t\016%e\017%;";
-static char screen_rxvt_s_hts [] = "\033H";
-static char screen_rxvt_s_ht [] = "\011";
-static char screen_rxvt_s_ka1 [] = "\033Ow";
-static char screen_rxvt_s_ka3 [] = "\033Oy";
-static char screen_rxvt_s_kb2 [] = "\033Ou";
-static char screen_rxvt_s_kc1 [] = "\033Oq";
-static char screen_rxvt_s_kc3 [] = "\033Os";
-static char screen_rxvt_s_acsc [] = "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char screen_rxvt_s_kcbt [] = "\033[Z";
-static char screen_rxvt_s_enacs [] = "\033(B\033)0";
-static char screen_rxvt_s_kend [] = "\033[4~";
-static char screen_rxvt_s_kent [] = "\033OM";
-static char screen_rxvt_s_kDC [] = "\033[3$";
-static char screen_rxvt_s_kEND [] = "\033[8$";
-static char screen_rxvt_s_kHOM [] = "\033[7$";
-static char screen_rxvt_s_kIC [] = "\033[2$";
-static char screen_rxvt_s_kLFT [] = "\033[d";
-static char screen_rxvt_s_kNXT [] = "\033[6$";
-static char screen_rxvt_s_kPRV [] = "\033[5$";
-static char screen_rxvt_s_kRIT [] = "\033[c";
-static char screen_rxvt_s_kf11 [] = "\033[23~";
-static char screen_rxvt_s_kf12 [] = "\033[24~";
-static char screen_rxvt_s_kf13 [] = "\033[25~";
-static char screen_rxvt_s_kf14 [] = "\033[26~";
-static char screen_rxvt_s_kf15 [] = "\033[28~";
-static char screen_rxvt_s_kf16 [] = "\033[29~";
-static char screen_rxvt_s_kf17 [] = "\033[31~";
-static char screen_rxvt_s_kf18 [] = "\033[32~";
-static char screen_rxvt_s_kf19 [] = "\033[33~";
-static char screen_rxvt_s_kf20 [] = "\033[34~";
-static char screen_rxvt_s_kf21 [] = "\033[23$";
-static char screen_rxvt_s_kf22 [] = "\033[24$";
-static char screen_rxvt_s_kf23 [] = "\033[11^";
-static char screen_rxvt_s_kf24 [] = "\033[12^";
-static char screen_rxvt_s_kf25 [] = "\033[13^";
-static char screen_rxvt_s_kf26 [] = "\033[14^";
-static char screen_rxvt_s_kf27 [] = "\033[15^";
-static char screen_rxvt_s_kf28 [] = "\033[17^";
-static char screen_rxvt_s_kf29 [] = "\033[18^";
-static char screen_rxvt_s_kf30 [] = "\033[19^";
-static char screen_rxvt_s_kf31 [] = "\033[20^";
-static char screen_rxvt_s_kf32 [] = "\033[21^";
-static char screen_rxvt_s_kf33 [] = "\033[23^";
-static char screen_rxvt_s_kf34 [] = "\033[24^";
-static char screen_rxvt_s_kf35 [] = "\033[25^";
-static char screen_rxvt_s_kf36 [] = "\033[26^";
-static char screen_rxvt_s_kf37 [] = "\033[28^";
-static char screen_rxvt_s_kf38 [] = "\033[29^";
-static char screen_rxvt_s_kf39 [] = "\033[31^";
-static char screen_rxvt_s_kf40 [] = "\033[32^";
-static char screen_rxvt_s_kf41 [] = "\033[33^";
-static char screen_rxvt_s_kf42 [] = "\033[34^";
-static char screen_rxvt_s_kf43 [] = "\033[23@";
-static char screen_rxvt_s_kf44 [] = "\033[24@";
-static char screen_rxvt_s_el1 [] = "\033[1K";
-static char screen_rxvt_s_u6 [] = "\033[%i%d;%dR";
-static char screen_rxvt_s_u7 [] = "\033[6n";
-static char screen_rxvt_s_u8 [] = "\033[?1;2c";
-static char screen_rxvt_s_u9 [] = "\033[c";
-static char screen_rxvt_s_op [] = "\033[39;49m";
-static char screen_rxvt_s_kmous [] = "\033[M";
-static char screen_rxvt_s_setaf [] = "\033[3%p1%dm";
-static char screen_rxvt_s_setab [] = "\033[4%p1%dm";
-
-static char screen_rxvt_bool_data[] = {
- /* 0: bw */ TRUE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ FALSE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ TRUE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ FALSE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ FALSE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ FALSE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ FALSE,
- /* 28: bce */ FALSE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ TRUE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 screen_rxvt_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 8,
- /* 14: pairs */ 64,
- /* 15: ncv */ ABSENT_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * screen_rxvt_string_data[] = {
- /* 0: cbt */ screen_rxvt_s_cbt,
- /* 1: bel */ screen_rxvt_s_bel,
- /* 2: cr */ screen_rxvt_s_cr,
- /* 3: csr */ screen_rxvt_s_csr,
- /* 4: tbc */ screen_rxvt_s_tbc,
- /* 5: clear */ screen_rxvt_s_clear,
- /* 6: el */ screen_rxvt_s_el,
- /* 7: ed */ screen_rxvt_s_ed,
- /* 8: hpa */ screen_rxvt_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ screen_rxvt_s_cup,
- /* 11: cud1 */ screen_rxvt_s_cud1,
- /* 12: home */ screen_rxvt_s_home,
- /* 13: civis */ screen_rxvt_s_civis,
- /* 14: cub1 */ screen_rxvt_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ screen_rxvt_s_cnorm,
- /* 17: cuf1 */ screen_rxvt_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ screen_rxvt_s_cuu1,
- /* 20: cvvis */ CANCELLED_STRING,
- /* 21: dch1 */ screen_rxvt_s_dch1,
- /* 22: dl1 */ screen_rxvt_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ screen_rxvt_s_smacs,
- /* 26: blink */ screen_rxvt_s_blink,
- /* 27: bold */ screen_rxvt_s_bold,
- /* 28: smcup */ screen_rxvt_s_smcup,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ screen_rxvt_s_dim,
- /* 31: smir */ screen_rxvt_s_smir,
- /* 32: invis */ ABSENT_STRING,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ screen_rxvt_s_rev,
- /* 35: smso */ screen_rxvt_s_smso,
- /* 36: smul */ screen_rxvt_s_smul,
- /* 37: ech */ ABSENT_STRING,
- /* 38: rmacs */ screen_rxvt_s_rmacs,
- /* 39: sgr0 */ screen_rxvt_s_sgr0,
- /* 40: rmcup */ screen_rxvt_s_rmcup,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ screen_rxvt_s_rmir,
- /* 43: rmso */ screen_rxvt_s_rmso,
- /* 44: rmul */ screen_rxvt_s_rmul,
- /* 45: flash */ CANCELLED_STRING,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ screen_rxvt_s_is2,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ ABSENT_STRING,
- /* 53: il1 */ screen_rxvt_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ screen_rxvt_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ screen_rxvt_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ screen_rxvt_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ screen_rxvt_s_kel,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ ABSENT_STRING,
- /* 66: kf1 */ screen_rxvt_s_kf1,
- /* 67: kf10 */ screen_rxvt_s_kf10,
- /* 68: kf2 */ screen_rxvt_s_kf2,
- /* 69: kf3 */ screen_rxvt_s_kf3,
- /* 70: kf4 */ screen_rxvt_s_kf4,
- /* 71: kf5 */ screen_rxvt_s_kf5,
- /* 72: kf6 */ screen_rxvt_s_kf6,
- /* 73: kf7 */ screen_rxvt_s_kf7,
- /* 74: kf8 */ screen_rxvt_s_kf8,
- /* 75: kf9 */ screen_rxvt_s_kf9,
- /* 76: khome */ screen_rxvt_s_khome,
- /* 77: kich1 */ screen_rxvt_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ screen_rxvt_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ screen_rxvt_s_knp,
- /* 82: kpp */ screen_rxvt_s_kpp,
- /* 83: kcuf1 */ screen_rxvt_s_kcuf1,
- /* 84: kind */ screen_rxvt_s_kind,
- /* 85: kri */ screen_rxvt_s_kri,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ screen_rxvt_s_kcuu1,
- /* 88: rmkx */ screen_rxvt_s_rmkx,
- /* 89: smkx */ screen_rxvt_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ ABSENT_STRING,
- /* 102: smm */ ABSENT_STRING,
- /* 103: nel */ screen_rxvt_s_nel,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ screen_rxvt_s_dch,
- /* 106: dl */ screen_rxvt_s_dl,
- /* 107: cud */ screen_rxvt_s_cud,
- /* 108: ich */ screen_rxvt_s_ich,
- /* 109: indn */ screen_rxvt_s_indn,
- /* 110: il */ screen_rxvt_s_il,
- /* 111: cub */ screen_rxvt_s_cub,
- /* 112: cuf */ screen_rxvt_s_cuf,
- /* 113: rin */ ABSENT_STRING,
- /* 114: cuu */ screen_rxvt_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ ABSENT_STRING,
- /* 119: mc4 */ ABSENT_STRING,
- /* 120: mc5 */ ABSENT_STRING,
- /* 121: rep */ ABSENT_STRING,
- /* 122: rs1 */ ABSENT_STRING,
- /* 123: rs2 */ screen_rxvt_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ screen_rxvt_s_rc,
- /* 127: vpa */ screen_rxvt_s_vpa,
- /* 128: sc */ screen_rxvt_s_sc,
- /* 129: ind */ screen_rxvt_s_ind,
- /* 130: ri */ screen_rxvt_s_ri,
- /* 131: sgr */ screen_rxvt_s_sgr,
- /* 132: hts */ screen_rxvt_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ screen_rxvt_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ screen_rxvt_s_ka1,
- /* 140: ka3 */ screen_rxvt_s_ka3,
- /* 141: kb2 */ screen_rxvt_s_kb2,
- /* 142: kc1 */ screen_rxvt_s_kc1,
- /* 143: kc3 */ screen_rxvt_s_kc3,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ screen_rxvt_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ screen_rxvt_s_kcbt,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ ABSENT_STRING,
- /* 152: rmam */ ABSENT_STRING,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ screen_rxvt_s_enacs,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ screen_rxvt_s_kend,
- /* 165: kent */ screen_rxvt_s_kent,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ screen_rxvt_s_kDC,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ screen_rxvt_s_kEND,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ screen_rxvt_s_kHOM,
- /* 200: kIC */ screen_rxvt_s_kIC,
- /* 201: kLFT */ screen_rxvt_s_kLFT,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ screen_rxvt_s_kNXT,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ screen_rxvt_s_kPRV,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ screen_rxvt_s_kRIT,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ screen_rxvt_s_kf11,
- /* 217: kf12 */ screen_rxvt_s_kf12,
- /* 218: kf13 */ screen_rxvt_s_kf13,
- /* 219: kf14 */ screen_rxvt_s_kf14,
- /* 220: kf15 */ screen_rxvt_s_kf15,
- /* 221: kf16 */ screen_rxvt_s_kf16,
- /* 222: kf17 */ screen_rxvt_s_kf17,
- /* 223: kf18 */ screen_rxvt_s_kf18,
- /* 224: kf19 */ screen_rxvt_s_kf19,
- /* 225: kf20 */ screen_rxvt_s_kf20,
- /* 226: kf21 */ screen_rxvt_s_kf21,
- /* 227: kf22 */ screen_rxvt_s_kf22,
- /* 228: kf23 */ screen_rxvt_s_kf23,
- /* 229: kf24 */ screen_rxvt_s_kf24,
- /* 230: kf25 */ screen_rxvt_s_kf25,
- /* 231: kf26 */ screen_rxvt_s_kf26,
- /* 232: kf27 */ screen_rxvt_s_kf27,
- /* 233: kf28 */ screen_rxvt_s_kf28,
- /* 234: kf29 */ screen_rxvt_s_kf29,
- /* 235: kf30 */ screen_rxvt_s_kf30,
- /* 236: kf31 */ screen_rxvt_s_kf31,
- /* 237: kf32 */ screen_rxvt_s_kf32,
- /* 238: kf33 */ screen_rxvt_s_kf33,
- /* 239: kf34 */ screen_rxvt_s_kf34,
- /* 240: kf35 */ screen_rxvt_s_kf35,
- /* 241: kf36 */ screen_rxvt_s_kf36,
- /* 242: kf37 */ screen_rxvt_s_kf37,
- /* 243: kf38 */ screen_rxvt_s_kf38,
- /* 244: kf39 */ screen_rxvt_s_kf39,
- /* 245: kf40 */ screen_rxvt_s_kf40,
- /* 246: kf41 */ screen_rxvt_s_kf41,
- /* 247: kf42 */ screen_rxvt_s_kf42,
- /* 248: kf43 */ screen_rxvt_s_kf43,
- /* 249: kf44 */ screen_rxvt_s_kf44,
- /* 250: kf45 */ ABSENT_STRING,
- /* 251: kf46 */ ABSENT_STRING,
- /* 252: kf47 */ ABSENT_STRING,
- /* 253: kf48 */ ABSENT_STRING,
- /* 254: kf49 */ ABSENT_STRING,
- /* 255: kf50 */ ABSENT_STRING,
- /* 256: kf51 */ ABSENT_STRING,
- /* 257: kf52 */ ABSENT_STRING,
- /* 258: kf53 */ ABSENT_STRING,
- /* 259: kf54 */ ABSENT_STRING,
- /* 260: kf55 */ ABSENT_STRING,
- /* 261: kf56 */ ABSENT_STRING,
- /* 262: kf57 */ ABSENT_STRING,
- /* 263: kf58 */ ABSENT_STRING,
- /* 264: kf59 */ ABSENT_STRING,
- /* 265: kf60 */ ABSENT_STRING,
- /* 266: kf61 */ ABSENT_STRING,
- /* 267: kf62 */ ABSENT_STRING,
- /* 268: kf63 */ ABSENT_STRING,
- /* 269: el1 */ screen_rxvt_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ screen_rxvt_s_u6,
- /* 294: u7 */ screen_rxvt_s_u7,
- /* 295: u8 */ screen_rxvt_s_u8,
- /* 296: u9 */ screen_rxvt_s_u9,
- /* 297: op */ screen_rxvt_s_op,
- /* 298: oc */ ABSENT_STRING,
- /* 299: initc */ ABSENT_STRING,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ ABSENT_STRING,
- /* 303: setb */ ABSENT_STRING,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ ABSENT_STRING,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ ABSENT_STRING,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ screen_rxvt_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ screen_rxvt_s_setaf,
- /* 360: setab */ screen_rxvt_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ ABSENT_STRING,
- /* 412: memu */ ABSENT_STRING,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* screen.xterm-new */
-
-static char screen_xterm_xfree86_alias_data[] = "screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm";
-
-static char screen_xterm_xfree86_s_cbt[] = "\033[Z";
-static char screen_xterm_xfree86_s_bel[] = "\007";
-static char screen_xterm_xfree86_s_cr[] = "\015";
-static char screen_xterm_xfree86_s_csr[] = "\033[%i%p1%d;%p2%dr";
-static char screen_xterm_xfree86_s_tbc[] = "\033[3g";
-static char screen_xterm_xfree86_s_clear[] = "\033[H\033[2J";
-static char screen_xterm_xfree86_s_el[] = "\033[K";
-static char screen_xterm_xfree86_s_ed[] = "\033[J";
-static char screen_xterm_xfree86_s_hpa[] = "\033[%i%p1%dG";
-static char screen_xterm_xfree86_s_cup[] = "\033[%i%p1%d;%p2%dH";
-static char screen_xterm_xfree86_s_cud1[] = "\012";
-static char screen_xterm_xfree86_s_home[] = "\033[H";
-static char screen_xterm_xfree86_s_civis[] = "\033[?25l";
-static char screen_xterm_xfree86_s_cub1[] = "\010";
-static char screen_xterm_xfree86_s_cnorm[] = "\033[?12l\033[?25h";
-static char screen_xterm_xfree86_s_cuf1[] = "\033[C";
-static char screen_xterm_xfree86_s_cuu1[] = "\033[A";
-static char screen_xterm_xfree86_s_cvvis[] = "\033[?12;25h";
-static char screen_xterm_xfree86_s_dch1[] = "\033[P";
-static char screen_xterm_xfree86_s_dl1[] = "\033[M";
-static char screen_xterm_xfree86_s_smacs[] = "\033(0";
-static char screen_xterm_xfree86_s_blink[] = "\033[5m";
-static char screen_xterm_xfree86_s_bold[] = "\033[1m";
-static char screen_xterm_xfree86_s_smcup[] = "\033[?1049h\033[22;0;0t";
-static char screen_xterm_xfree86_s_dim[] = "\033[2m";
-static char screen_xterm_xfree86_s_smir[] = "\033[4h";
-static char screen_xterm_xfree86_s_rev[] = "\033[7m";
-static char screen_xterm_xfree86_s_smso[] = "\033[7m";
-static char screen_xterm_xfree86_s_smul[] = "\033[4m";
-static char screen_xterm_xfree86_s_ech[] = "\033[%p1%dX";
-static char screen_xterm_xfree86_s_rmacs[] = "\033(B";
-static char screen_xterm_xfree86_s_sgr0[] = "\033(B\033[m";
-static char screen_xterm_xfree86_s_rmcup[] = "\033[?1049l\033[23;0;0t";
-static char screen_xterm_xfree86_s_rmir[] = "\033[4l";
-static char screen_xterm_xfree86_s_rmso[] = "\033[27m";
-static char screen_xterm_xfree86_s_rmul[] = "\033[24m";
-static char screen_xterm_xfree86_s_flash[] = "\033[?5h$<100/>\033[?5l";
-static char screen_xterm_xfree86_s_is2[] = "\033[!p\033[?3;4l\033[4l\033>";
-static char screen_xterm_xfree86_s_il1[] = "\033[L";
-static char screen_xterm_xfree86_s_kbs[] = "\010";
-static char screen_xterm_xfree86_s_kdch1[] = "\033[3~";
-static char screen_xterm_xfree86_s_kcud1[] = "\033OB";
-static char screen_xterm_xfree86_s_kf1[] = "\033OP";
-static char screen_xterm_xfree86_s_kf10[] = "\033[21~";
-static char screen_xterm_xfree86_s_kf2[] = "\033OQ";
-static char screen_xterm_xfree86_s_kf3[] = "\033OR";
-static char screen_xterm_xfree86_s_kf4[] = "\033OS";
-static char screen_xterm_xfree86_s_kf5[] = "\033[15~";
-static char screen_xterm_xfree86_s_kf6[] = "\033[17~";
-static char screen_xterm_xfree86_s_kf7[] = "\033[18~";
-static char screen_xterm_xfree86_s_kf8[] = "\033[19~";
-static char screen_xterm_xfree86_s_kf9[] = "\033[20~";
-static char screen_xterm_xfree86_s_khome[] = "\033[1~";
-static char screen_xterm_xfree86_s_kich1[] = "\033[2~";
-static char screen_xterm_xfree86_s_kcub1[] = "\033OD";
-static char screen_xterm_xfree86_s_knp[] = "\033[6~";
-static char screen_xterm_xfree86_s_kpp[] = "\033[5~";
-static char screen_xterm_xfree86_s_kcuf1[] = "\033OC";
-static char screen_xterm_xfree86_s_kind[] = "\033[1;2B";
-static char screen_xterm_xfree86_s_kri[] = "\033[1;2A";
-static char screen_xterm_xfree86_s_kcuu1[] = "\033OA";
-static char screen_xterm_xfree86_s_rmkx[] = "\033[?1l\033>";
-static char screen_xterm_xfree86_s_smkx[] = "\033[?1h\033=";
-static char screen_xterm_xfree86_s_rmm[] = "\033[?1034l";
-static char screen_xterm_xfree86_s_smm[] = "\033[?1034h";
-static char screen_xterm_xfree86_s_dch[] = "\033[%p1%dP";
-static char screen_xterm_xfree86_s_dl[] = "\033[%p1%dM";
-static char screen_xterm_xfree86_s_cud[] = "\033[%p1%dB";
-static char screen_xterm_xfree86_s_ich[] = "\033[%p1%d@";
-static char screen_xterm_xfree86_s_indn[] = "\033[%p1%dS";
-static char screen_xterm_xfree86_s_il[] = "\033[%p1%dL";
-static char screen_xterm_xfree86_s_cub[] = "\033[%p1%dD";
-static char screen_xterm_xfree86_s_cuf[] = "\033[%p1%dC";
-static char screen_xterm_xfree86_s_rin[] = "\033[%p1%dT";
-static char screen_xterm_xfree86_s_cuu[] = "\033[%p1%dA";
-static char screen_xterm_xfree86_s_mc0[] = "\033[i";
-static char screen_xterm_xfree86_s_mc4[] = "\033[4i";
-static char screen_xterm_xfree86_s_mc5[] = "\033[5i";
-static char screen_xterm_xfree86_s_rs1[] = "\033c";
-static char screen_xterm_xfree86_s_rs2[] = "\033[!p\033[?3;4l\033[4l\033>";
-static char screen_xterm_xfree86_s_rc[] = "\0338";
-static char screen_xterm_xfree86_s_vpa[] = "\033[%i%p1%dd";
-static char screen_xterm_xfree86_s_sc[] = "\0337";
-static char screen_xterm_xfree86_s_ind[] = "\012";
-static char screen_xterm_xfree86_s_ri[] = "\033M";
-static char screen_xterm_xfree86_s_sgr[] = "%?%p9%t\033(0%e\033(B%;\033[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;m";
-static char screen_xterm_xfree86_s_hts[] = "\033H";
-static char screen_xterm_xfree86_s_ht[] = "\011";
-static char screen_xterm_xfree86_s_kb2[] = "\033OE";
-static char screen_xterm_xfree86_s_acsc[] = "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char screen_xterm_xfree86_s_kcbt[] = "\033[Z";
-static char screen_xterm_xfree86_s_smam[] = "\033[?7h";
-static char screen_xterm_xfree86_s_rmam[] = "\033[?7l";
-static char screen_xterm_xfree86_s_kend[] = "\033[4~";
-static char screen_xterm_xfree86_s_kent[] = "\033OM";
-static char screen_xterm_xfree86_s_kDC[] = "\033[3;2~";
-static char screen_xterm_xfree86_s_kEND[] = "\033[1;2F";
-static char screen_xterm_xfree86_s_kHOM[] = "\033[1;2H";
-static char screen_xterm_xfree86_s_kLFT[] = "\033[1;2D";
-static char screen_xterm_xfree86_s_kRIT[] = "\033[1;2C";
-static char screen_xterm_xfree86_s_kf11[] = "\033[23~";
-static char screen_xterm_xfree86_s_kf12[] = "\033[24~";
-static char screen_xterm_xfree86_s_kf13[] = "\033[1;2P";
-static char screen_xterm_xfree86_s_kf14[] = "\033[1;2Q";
-static char screen_xterm_xfree86_s_kf15[] = "\033[1;2R";
-static char screen_xterm_xfree86_s_kf16[] = "\033[1;2S";
-static char screen_xterm_xfree86_s_kf17[] = "\033[15;2~";
-static char screen_xterm_xfree86_s_kf18[] = "\033[17;2~";
-static char screen_xterm_xfree86_s_kf19[] = "\033[18;2~";
-static char screen_xterm_xfree86_s_kf20[] = "\033[19;2~";
-static char screen_xterm_xfree86_s_kf21[] = "\033[20;2~";
-static char screen_xterm_xfree86_s_kf22[] = "\033[21;2~";
-static char screen_xterm_xfree86_s_kf23[] = "\033[23;2~";
-static char screen_xterm_xfree86_s_kf24[] = "\033[24;2~";
-static char screen_xterm_xfree86_s_kf25[] = "\033[1;5P";
-static char screen_xterm_xfree86_s_kf26[] = "\033[1;5Q";
-static char screen_xterm_xfree86_s_kf27[] = "\033[1;5R";
-static char screen_xterm_xfree86_s_kf28[] = "\033[1;5S";
-static char screen_xterm_xfree86_s_kf29[] = "\033[15;5~";
-static char screen_xterm_xfree86_s_kf30[] = "\033[17;5~";
-static char screen_xterm_xfree86_s_kf31[] = "\033[18;5~";
-static char screen_xterm_xfree86_s_kf32[] = "\033[19;5~";
-static char screen_xterm_xfree86_s_kf33[] = "\033[20;5~";
-static char screen_xterm_xfree86_s_kf34[] = "\033[21;5~";
-static char screen_xterm_xfree86_s_kf35[] = "\033[23;5~";
-static char screen_xterm_xfree86_s_kf36[] = "\033[24;5~";
-static char screen_xterm_xfree86_s_kf37[] = "\033[1;6P";
-static char screen_xterm_xfree86_s_kf38[] = "\033[1;6Q";
-static char screen_xterm_xfree86_s_kf39[] = "\033[1;6R";
-static char screen_xterm_xfree86_s_kf40[] = "\033[1;6S";
-static char screen_xterm_xfree86_s_kf41[] = "\033[15;6~";
-static char screen_xterm_xfree86_s_kf42[] = "\033[17;6~";
-static char screen_xterm_xfree86_s_kf43[] = "\033[18;6~";
-static char screen_xterm_xfree86_s_kf44[] = "\033[19;6~";
-static char screen_xterm_xfree86_s_kf45[] = "\033[20;6~";
-static char screen_xterm_xfree86_s_kf46[] = "\033[21;6~";
-static char screen_xterm_xfree86_s_kf47[] = "\033[23;6~";
-static char screen_xterm_xfree86_s_kf48[] = "\033[24;6~";
-static char screen_xterm_xfree86_s_kf49[] = "\033[1;3P";
-static char screen_xterm_xfree86_s_kf50[] = "\033[1;3Q";
-static char screen_xterm_xfree86_s_kf51[] = "\033[1;3R";
-static char screen_xterm_xfree86_s_kf52[] = "\033[1;3S";
-static char screen_xterm_xfree86_s_kf53[] = "\033[15;3~";
-static char screen_xterm_xfree86_s_kf54[] = "\033[17;3~";
-static char screen_xterm_xfree86_s_kf55[] = "\033[18;3~";
-static char screen_xterm_xfree86_s_kf56[] = "\033[19;3~";
-static char screen_xterm_xfree86_s_kf57[] = "\033[20;3~";
-static char screen_xterm_xfree86_s_kf58[] = "\033[21;3~";
-static char screen_xterm_xfree86_s_kf59[] = "\033[23;3~";
-static char screen_xterm_xfree86_s_kf60[] = "\033[24;3~";
-static char screen_xterm_xfree86_s_kf61[] = "\033[1;4P";
-static char screen_xterm_xfree86_s_kf62[] = "\033[1;4Q";
-static char screen_xterm_xfree86_s_kf63[] = "\033[1;4R";
-static char screen_xterm_xfree86_s_el1[] = "\033[1K";
-static char screen_xterm_xfree86_s_u6[] = "\033[%i%d;%dR";
-static char screen_xterm_xfree86_s_u7[] = "\033[6n";
-static char screen_xterm_xfree86_s_u8[] = "\033[?%[;0123456789]c";
-static char screen_xterm_xfree86_s_u9[] = "\033[c";
-static char screen_xterm_xfree86_s_op[] = "\033[39;49m";
-static char screen_xterm_xfree86_s_setf[] = "\033[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m";
-static char screen_xterm_xfree86_s_setb[] = "\033[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m";
-static char screen_xterm_xfree86_s_kmous[] = "\033[M";
-static char screen_xterm_xfree86_s_setaf[] = "\033[3%p1%dm";
-static char screen_xterm_xfree86_s_setab[] = "\033[4%p1%dm";
-
-static char screen_xterm_xfree86_bool_data[] = {
- /* 0: bw */ TRUE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ FALSE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ TRUE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ FALSE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ TRUE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ TRUE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ FALSE,
- /* 28: bce */ FALSE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ FALSE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 screen_xterm_xfree86_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 8,
- /* 14: pairs */ 64,
- /* 15: ncv */ ABSENT_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * screen_xterm_xfree86_string_data[] = {
- /* 0: cbt */ screen_xterm_xfree86_s_cbt,
- /* 1: bel */ screen_xterm_xfree86_s_bel,
- /* 2: cr */ screen_xterm_xfree86_s_cr,
- /* 3: csr */ screen_xterm_xfree86_s_csr,
- /* 4: tbc */ screen_xterm_xfree86_s_tbc,
- /* 5: clear */ screen_xterm_xfree86_s_clear,
- /* 6: el */ screen_xterm_xfree86_s_el,
- /* 7: ed */ screen_xterm_xfree86_s_ed,
- /* 8: hpa */ screen_xterm_xfree86_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ screen_xterm_xfree86_s_cup,
- /* 11: cud1 */ screen_xterm_xfree86_s_cud1,
- /* 12: home */ screen_xterm_xfree86_s_home,
- /* 13: civis */ screen_xterm_xfree86_s_civis,
- /* 14: cub1 */ screen_xterm_xfree86_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ screen_xterm_xfree86_s_cnorm,
- /* 17: cuf1 */ screen_xterm_xfree86_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ screen_xterm_xfree86_s_cuu1,
- /* 20: cvvis */ screen_xterm_xfree86_s_cvvis,
- /* 21: dch1 */ screen_xterm_xfree86_s_dch1,
- /* 22: dl1 */ screen_xterm_xfree86_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ screen_xterm_xfree86_s_smacs,
- /* 26: blink */ screen_xterm_xfree86_s_blink,
- /* 27: bold */ screen_xterm_xfree86_s_bold,
- /* 28: smcup */ screen_xterm_xfree86_s_smcup,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ screen_xterm_xfree86_s_dim,
- /* 31: smir */ screen_xterm_xfree86_s_smir,
- /* 32: invis */ CANCELLED_STRING,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ screen_xterm_xfree86_s_rev,
- /* 35: smso */ screen_xterm_xfree86_s_smso,
- /* 36: smul */ screen_xterm_xfree86_s_smul,
- /* 37: ech */ screen_xterm_xfree86_s_ech,
- /* 38: rmacs */ screen_xterm_xfree86_s_rmacs,
- /* 39: sgr0 */ screen_xterm_xfree86_s_sgr0,
- /* 40: rmcup */ screen_xterm_xfree86_s_rmcup,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ screen_xterm_xfree86_s_rmir,
- /* 43: rmso */ screen_xterm_xfree86_s_rmso,
- /* 44: rmul */ screen_xterm_xfree86_s_rmul,
- /* 45: flash */ screen_xterm_xfree86_s_flash,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ screen_xterm_xfree86_s_is2,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ ABSENT_STRING,
- /* 53: il1 */ screen_xterm_xfree86_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ screen_xterm_xfree86_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ screen_xterm_xfree86_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ screen_xterm_xfree86_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ ABSENT_STRING,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ ABSENT_STRING,
- /* 66: kf1 */ screen_xterm_xfree86_s_kf1,
- /* 67: kf10 */ screen_xterm_xfree86_s_kf10,
- /* 68: kf2 */ screen_xterm_xfree86_s_kf2,
- /* 69: kf3 */ screen_xterm_xfree86_s_kf3,
- /* 70: kf4 */ screen_xterm_xfree86_s_kf4,
- /* 71: kf5 */ screen_xterm_xfree86_s_kf5,
- /* 72: kf6 */ screen_xterm_xfree86_s_kf6,
- /* 73: kf7 */ screen_xterm_xfree86_s_kf7,
- /* 74: kf8 */ screen_xterm_xfree86_s_kf8,
- /* 75: kf9 */ screen_xterm_xfree86_s_kf9,
- /* 76: khome */ screen_xterm_xfree86_s_khome,
- /* 77: kich1 */ screen_xterm_xfree86_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ screen_xterm_xfree86_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ screen_xterm_xfree86_s_knp,
- /* 82: kpp */ screen_xterm_xfree86_s_kpp,
- /* 83: kcuf1 */ screen_xterm_xfree86_s_kcuf1,
- /* 84: kind */ screen_xterm_xfree86_s_kind,
- /* 85: kri */ screen_xterm_xfree86_s_kri,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ screen_xterm_xfree86_s_kcuu1,
- /* 88: rmkx */ screen_xterm_xfree86_s_rmkx,
- /* 89: smkx */ screen_xterm_xfree86_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ screen_xterm_xfree86_s_rmm,
- /* 102: smm */ screen_xterm_xfree86_s_smm,
- /* 103: nel */ ABSENT_STRING,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ screen_xterm_xfree86_s_dch,
- /* 106: dl */ screen_xterm_xfree86_s_dl,
- /* 107: cud */ screen_xterm_xfree86_s_cud,
- /* 108: ich */ screen_xterm_xfree86_s_ich,
- /* 109: indn */ screen_xterm_xfree86_s_indn,
- /* 110: il */ screen_xterm_xfree86_s_il,
- /* 111: cub */ screen_xterm_xfree86_s_cub,
- /* 112: cuf */ screen_xterm_xfree86_s_cuf,
- /* 113: rin */ screen_xterm_xfree86_s_rin,
- /* 114: cuu */ screen_xterm_xfree86_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ screen_xterm_xfree86_s_mc0,
- /* 119: mc4 */ screen_xterm_xfree86_s_mc4,
- /* 120: mc5 */ screen_xterm_xfree86_s_mc5,
- /* 121: rep */ CANCELLED_STRING,
- /* 122: rs1 */ screen_xterm_xfree86_s_rs1,
- /* 123: rs2 */ screen_xterm_xfree86_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ screen_xterm_xfree86_s_rc,
- /* 127: vpa */ screen_xterm_xfree86_s_vpa,
- /* 128: sc */ screen_xterm_xfree86_s_sc,
- /* 129: ind */ screen_xterm_xfree86_s_ind,
- /* 130: ri */ screen_xterm_xfree86_s_ri,
- /* 131: sgr */ screen_xterm_xfree86_s_sgr,
- /* 132: hts */ screen_xterm_xfree86_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ screen_xterm_xfree86_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ ABSENT_STRING,
- /* 140: ka3 */ ABSENT_STRING,
- /* 141: kb2 */ screen_xterm_xfree86_s_kb2,
- /* 142: kc1 */ ABSENT_STRING,
- /* 143: kc3 */ ABSENT_STRING,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ screen_xterm_xfree86_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ screen_xterm_xfree86_s_kcbt,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ screen_xterm_xfree86_s_smam,
- /* 152: rmam */ screen_xterm_xfree86_s_rmam,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ ABSENT_STRING,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ screen_xterm_xfree86_s_kend,
- /* 165: kent */ screen_xterm_xfree86_s_kent,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ screen_xterm_xfree86_s_kDC,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ screen_xterm_xfree86_s_kEND,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ screen_xterm_xfree86_s_kHOM,
- /* 200: kIC */ CANCELLED_STRING,
- /* 201: kLFT */ screen_xterm_xfree86_s_kLFT,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ CANCELLED_STRING,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ CANCELLED_STRING,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ screen_xterm_xfree86_s_kRIT,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ screen_xterm_xfree86_s_kf11,
- /* 217: kf12 */ screen_xterm_xfree86_s_kf12,
- /* 218: kf13 */ screen_xterm_xfree86_s_kf13,
- /* 219: kf14 */ screen_xterm_xfree86_s_kf14,
- /* 220: kf15 */ screen_xterm_xfree86_s_kf15,
- /* 221: kf16 */ screen_xterm_xfree86_s_kf16,
- /* 222: kf17 */ screen_xterm_xfree86_s_kf17,
- /* 223: kf18 */ screen_xterm_xfree86_s_kf18,
- /* 224: kf19 */ screen_xterm_xfree86_s_kf19,
- /* 225: kf20 */ screen_xterm_xfree86_s_kf20,
- /* 226: kf21 */ screen_xterm_xfree86_s_kf21,
- /* 227: kf22 */ screen_xterm_xfree86_s_kf22,
- /* 228: kf23 */ screen_xterm_xfree86_s_kf23,
- /* 229: kf24 */ screen_xterm_xfree86_s_kf24,
- /* 230: kf25 */ screen_xterm_xfree86_s_kf25,
- /* 231: kf26 */ screen_xterm_xfree86_s_kf26,
- /* 232: kf27 */ screen_xterm_xfree86_s_kf27,
- /* 233: kf28 */ screen_xterm_xfree86_s_kf28,
- /* 234: kf29 */ screen_xterm_xfree86_s_kf29,
- /* 235: kf30 */ screen_xterm_xfree86_s_kf30,
- /* 236: kf31 */ screen_xterm_xfree86_s_kf31,
- /* 237: kf32 */ screen_xterm_xfree86_s_kf32,
- /* 238: kf33 */ screen_xterm_xfree86_s_kf33,
- /* 239: kf34 */ screen_xterm_xfree86_s_kf34,
- /* 240: kf35 */ screen_xterm_xfree86_s_kf35,
- /* 241: kf36 */ screen_xterm_xfree86_s_kf36,
- /* 242: kf37 */ screen_xterm_xfree86_s_kf37,
- /* 243: kf38 */ screen_xterm_xfree86_s_kf38,
- /* 244: kf39 */ screen_xterm_xfree86_s_kf39,
- /* 245: kf40 */ screen_xterm_xfree86_s_kf40,
- /* 246: kf41 */ screen_xterm_xfree86_s_kf41,
- /* 247: kf42 */ screen_xterm_xfree86_s_kf42,
- /* 248: kf43 */ screen_xterm_xfree86_s_kf43,
- /* 249: kf44 */ screen_xterm_xfree86_s_kf44,
- /* 250: kf45 */ screen_xterm_xfree86_s_kf45,
- /* 251: kf46 */ screen_xterm_xfree86_s_kf46,
- /* 252: kf47 */ screen_xterm_xfree86_s_kf47,
- /* 253: kf48 */ screen_xterm_xfree86_s_kf48,
- /* 254: kf49 */ screen_xterm_xfree86_s_kf49,
- /* 255: kf50 */ screen_xterm_xfree86_s_kf50,
- /* 256: kf51 */ screen_xterm_xfree86_s_kf51,
- /* 257: kf52 */ screen_xterm_xfree86_s_kf52,
- /* 258: kf53 */ screen_xterm_xfree86_s_kf53,
- /* 259: kf54 */ screen_xterm_xfree86_s_kf54,
- /* 260: kf55 */ screen_xterm_xfree86_s_kf55,
- /* 261: kf56 */ screen_xterm_xfree86_s_kf56,
- /* 262: kf57 */ screen_xterm_xfree86_s_kf57,
- /* 263: kf58 */ screen_xterm_xfree86_s_kf58,
- /* 264: kf59 */ screen_xterm_xfree86_s_kf59,
- /* 265: kf60 */ screen_xterm_xfree86_s_kf60,
- /* 266: kf61 */ screen_xterm_xfree86_s_kf61,
- /* 267: kf62 */ screen_xterm_xfree86_s_kf62,
- /* 268: kf63 */ screen_xterm_xfree86_s_kf63,
- /* 269: el1 */ screen_xterm_xfree86_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ screen_xterm_xfree86_s_u6,
- /* 294: u7 */ screen_xterm_xfree86_s_u7,
- /* 295: u8 */ screen_xterm_xfree86_s_u8,
- /* 296: u9 */ screen_xterm_xfree86_s_u9,
- /* 297: op */ screen_xterm_xfree86_s_op,
- /* 298: oc */ ABSENT_STRING,
- /* 299: initc */ ABSENT_STRING,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ screen_xterm_xfree86_s_setf,
- /* 303: setb */ screen_xterm_xfree86_s_setb,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ ABSENT_STRING,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ ABSENT_STRING,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ screen_xterm_xfree86_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ screen_xterm_xfree86_s_setaf,
- /* 360: setab */ screen_xterm_xfree86_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ CANCELLED_STRING,
- /* 412: memu */ CANCELLED_STRING,
- /* 413: box1 */ ABSENT_STRING,
-};
-/* screen.xterm-256color */
-
-static char screen_xterm_256color_alias_data[] = "screen.xterm-256color|GNU Screen with xterm using 256 colors";
-
-static char screen_xterm_256color_s_cbt[] = "\033[Z";
-static char screen_xterm_256color_s_bel[] = "\007";
-static char screen_xterm_256color_s_cr[] = "\015";
-static char screen_xterm_256color_s_csr[] = "\033[%i%p1%d;%p2%dr";
-static char screen_xterm_256color_s_tbc[] = "\033[3g";
-static char screen_xterm_256color_s_clear[] = "\033[H\033[2J";
-static char screen_xterm_256color_s_el[] = "\033[K";
-static char screen_xterm_256color_s_ed[] = "\033[J";
-static char screen_xterm_256color_s_hpa[] = "\033[%i%p1%dG";
-static char screen_xterm_256color_s_cup[] = "\033[%i%p1%d;%p2%dH";
-static char screen_xterm_256color_s_cud1[] = "\012";
-static char screen_xterm_256color_s_home[] = "\033[H";
-static char screen_xterm_256color_s_civis[] = "\033[?25l";
-static char screen_xterm_256color_s_cub1[] = "\010";
-static char screen_xterm_256color_s_cnorm[] = "\033[?12l\033[?25h";
-static char screen_xterm_256color_s_cuf1[] = "\033[C";
-static char screen_xterm_256color_s_cuu1[] = "\033[A";
-static char screen_xterm_256color_s_cvvis[] = "\033[?12;25h";
-static char screen_xterm_256color_s_dch1[] = "\033[P";
-static char screen_xterm_256color_s_dl1[] = "\033[M";
-static char screen_xterm_256color_s_smacs[] = "\033(0";
-static char screen_xterm_256color_s_blink[] = "\033[5m";
-static char screen_xterm_256color_s_bold[] = "\033[1m";
-static char screen_xterm_256color_s_smcup[] = "\033[?1049h\033[22;0;0t";
-static char screen_xterm_256color_s_dim[] = "\033[2m";
-static char screen_xterm_256color_s_smir[] = "\033[4h";
-static char screen_xterm_256color_s_rev[] = "\033[7m";
-static char screen_xterm_256color_s_smso[] = "\033[7m";
-static char screen_xterm_256color_s_smul[] = "\033[4m";
-static char screen_xterm_256color_s_ech[] = "\033[%p1%dX";
-static char screen_xterm_256color_s_rmacs[] = "\033(B";
-static char screen_xterm_256color_s_sgr0[] = "\033(B\033[m";
-static char screen_xterm_256color_s_rmcup[] = "\033[?1049l\033[23;0;0t";
-static char screen_xterm_256color_s_rmir[] = "\033[4l";
-static char screen_xterm_256color_s_rmso[] = "\033[27m";
-static char screen_xterm_256color_s_rmul[] = "\033[24m";
-static char screen_xterm_256color_s_flash[] = "\033[?5h$<100/>\033[?5l";
-static char screen_xterm_256color_s_is2[] = "\033[!p\033[?3;4l\033[4l\033>";
-static char screen_xterm_256color_s_il1[] = "\033[L";
-static char screen_xterm_256color_s_kbs[] = "\010";
-static char screen_xterm_256color_s_kdch1[] = "\033[3~";
-static char screen_xterm_256color_s_kcud1[] = "\033OB";
-static char screen_xterm_256color_s_kf1[] = "\033OP";
-static char screen_xterm_256color_s_kf10[] = "\033[21~";
-static char screen_xterm_256color_s_kf2[] = "\033OQ";
-static char screen_xterm_256color_s_kf3[] = "\033OR";
-static char screen_xterm_256color_s_kf4[] = "\033OS";
-static char screen_xterm_256color_s_kf5[] = "\033[15~";
-static char screen_xterm_256color_s_kf6[] = "\033[17~";
-static char screen_xterm_256color_s_kf7[] = "\033[18~";
-static char screen_xterm_256color_s_kf8[] = "\033[19~";
-static char screen_xterm_256color_s_kf9[] = "\033[20~";
-static char screen_xterm_256color_s_khome[] = "\033[1~";
-static char screen_xterm_256color_s_kich1[] = "\033[2~";
-static char screen_xterm_256color_s_kcub1[] = "\033OD";
-static char screen_xterm_256color_s_knp[] = "\033[6~";
-static char screen_xterm_256color_s_kpp[] = "\033[5~";
-static char screen_xterm_256color_s_kcuf1[] = "\033OC";
-static char screen_xterm_256color_s_kind[] = "\033[1;2B";
-static char screen_xterm_256color_s_kri[] = "\033[1;2A";
-static char screen_xterm_256color_s_kcuu1[] = "\033OA";
-static char screen_xterm_256color_s_rmkx[] = "\033[?1l\033>";
-static char screen_xterm_256color_s_smkx[] = "\033[?1h\033=";
-static char screen_xterm_256color_s_rmm[] = "\033[?1034l";
-static char screen_xterm_256color_s_smm[] = "\033[?1034h";
-static char screen_xterm_256color_s_dch[] = "\033[%p1%dP";
-static char screen_xterm_256color_s_dl[] = "\033[%p1%dM";
-static char screen_xterm_256color_s_cud[] = "\033[%p1%dB";
-static char screen_xterm_256color_s_ich[] = "\033[%p1%d@";
-static char screen_xterm_256color_s_indn[] = "\033[%p1%dS";
-static char screen_xterm_256color_s_il[] = "\033[%p1%dL";
-static char screen_xterm_256color_s_cub[] = "\033[%p1%dD";
-static char screen_xterm_256color_s_cuf[] = "\033[%p1%dC";
-static char screen_xterm_256color_s_rin[] = "\033[%p1%dT";
-static char screen_xterm_256color_s_cuu[] = "\033[%p1%dA";
-static char screen_xterm_256color_s_mc0[] = "\033[i";
-static char screen_xterm_256color_s_mc4[] = "\033[4i";
-static char screen_xterm_256color_s_mc5[] = "\033[5i";
-static char screen_xterm_256color_s_rs1[] = "\033c";
-static char screen_xterm_256color_s_rs2[] = "\033[!p\033[?3;4l\033[4l\033>";
-static char screen_xterm_256color_s_rc[] = "\0338";
-static char screen_xterm_256color_s_vpa[] = "\033[%i%p1%dd";
-static char screen_xterm_256color_s_sc[] = "\0337";
-static char screen_xterm_256color_s_ind[] = "\012";
-static char screen_xterm_256color_s_ri[] = "\033M";
-static char screen_xterm_256color_s_sgr[] = "%?%p9%t\033(0%e\033(B%;\033[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;m";
-static char screen_xterm_256color_s_hts[] = "\033H";
-static char screen_xterm_256color_s_ht[] = "\011";
-static char screen_xterm_256color_s_kb2[] = "\033OE";
-static char screen_xterm_256color_s_acsc[] = "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~";
-static char screen_xterm_256color_s_kcbt[] = "\033[Z";
-static char screen_xterm_256color_s_smam[] = "\033[?7h";
-static char screen_xterm_256color_s_rmam[] = "\033[?7l";
-static char screen_xterm_256color_s_kend[] = "\033[4~";
-static char screen_xterm_256color_s_kent[] = "\033OM";
-static char screen_xterm_256color_s_kDC[] = "\033[3;2~";
-static char screen_xterm_256color_s_kEND[] = "\033[1;2F";
-static char screen_xterm_256color_s_kHOM[] = "\033[1;2H";
-static char screen_xterm_256color_s_kLFT[] = "\033[1;2D";
-static char screen_xterm_256color_s_kRIT[] = "\033[1;2C";
-static char screen_xterm_256color_s_kf11[] = "\033[23~";
-static char screen_xterm_256color_s_kf12[] = "\033[24~";
-static char screen_xterm_256color_s_kf13[] = "\033[1;2P";
-static char screen_xterm_256color_s_kf14[] = "\033[1;2Q";
-static char screen_xterm_256color_s_kf15[] = "\033[1;2R";
-static char screen_xterm_256color_s_kf16[] = "\033[1;2S";
-static char screen_xterm_256color_s_kf17[] = "\033[15;2~";
-static char screen_xterm_256color_s_kf18[] = "\033[17;2~";
-static char screen_xterm_256color_s_kf19[] = "\033[18;2~";
-static char screen_xterm_256color_s_kf20[] = "\033[19;2~";
-static char screen_xterm_256color_s_kf21[] = "\033[20;2~";
-static char screen_xterm_256color_s_kf22[] = "\033[21;2~";
-static char screen_xterm_256color_s_kf23[] = "\033[23;2~";
-static char screen_xterm_256color_s_kf24[] = "\033[24;2~";
-static char screen_xterm_256color_s_kf25[] = "\033[1;5P";
-static char screen_xterm_256color_s_kf26[] = "\033[1;5Q";
-static char screen_xterm_256color_s_kf27[] = "\033[1;5R";
-static char screen_xterm_256color_s_kf28[] = "\033[1;5S";
-static char screen_xterm_256color_s_kf29[] = "\033[15;5~";
-static char screen_xterm_256color_s_kf30[] = "\033[17;5~";
-static char screen_xterm_256color_s_kf31[] = "\033[18;5~";
-static char screen_xterm_256color_s_kf32[] = "\033[19;5~";
-static char screen_xterm_256color_s_kf33[] = "\033[20;5~";
-static char screen_xterm_256color_s_kf34[] = "\033[21;5~";
-static char screen_xterm_256color_s_kf35[] = "\033[23;5~";
-static char screen_xterm_256color_s_kf36[] = "\033[24;5~";
-static char screen_xterm_256color_s_kf37[] = "\033[1;6P";
-static char screen_xterm_256color_s_kf38[] = "\033[1;6Q";
-static char screen_xterm_256color_s_kf39[] = "\033[1;6R";
-static char screen_xterm_256color_s_kf40[] = "\033[1;6S";
-static char screen_xterm_256color_s_kf41[] = "\033[15;6~";
-static char screen_xterm_256color_s_kf42[] = "\033[17;6~";
-static char screen_xterm_256color_s_kf43[] = "\033[18;6~";
-static char screen_xterm_256color_s_kf44[] = "\033[19;6~";
-static char screen_xterm_256color_s_kf45[] = "\033[20;6~";
-static char screen_xterm_256color_s_kf46[] = "\033[21;6~";
-static char screen_xterm_256color_s_kf47[] = "\033[23;6~";
-static char screen_xterm_256color_s_kf48[] = "\033[24;6~";
-static char screen_xterm_256color_s_kf49[] = "\033[1;3P";
-static char screen_xterm_256color_s_kf50[] = "\033[1;3Q";
-static char screen_xterm_256color_s_kf51[] = "\033[1;3R";
-static char screen_xterm_256color_s_kf52[] = "\033[1;3S";
-static char screen_xterm_256color_s_kf53[] = "\033[15;3~";
-static char screen_xterm_256color_s_kf54[] = "\033[17;3~";
-static char screen_xterm_256color_s_kf55[] = "\033[18;3~";
-static char screen_xterm_256color_s_kf56[] = "\033[19;3~";
-static char screen_xterm_256color_s_kf57[] = "\033[20;3~";
-static char screen_xterm_256color_s_kf58[] = "\033[21;3~";
-static char screen_xterm_256color_s_kf59[] = "\033[23;3~";
-static char screen_xterm_256color_s_kf60[] = "\033[24;3~";
-static char screen_xterm_256color_s_kf61[] = "\033[1;4P";
-static char screen_xterm_256color_s_kf62[] = "\033[1;4Q";
-static char screen_xterm_256color_s_kf63[] = "\033[1;4R";
-static char screen_xterm_256color_s_el1[] = "\033[1K";
-static char screen_xterm_256color_s_u6[] = "\033[%i%d;%dR";
-static char screen_xterm_256color_s_u7[] = "\033[6n";
-static char screen_xterm_256color_s_u8[] = "\033[?%[;0123456789]c";
-static char screen_xterm_256color_s_u9[] = "\033[c";
-static char screen_xterm_256color_s_op[] = "\033[39;49m";
-static char screen_xterm_256color_s_kmous[] = "\033[M";
-static char screen_xterm_256color_s_setaf[] = "\033[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m";
-static char screen_xterm_256color_s_setab[] = "\033[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m";
-
-static char screen_xterm_256color_bool_data[] = {
- /* 0: bw */ TRUE,
- /* 1: am */ TRUE,
- /* 2: xsb */ FALSE,
- /* 3: xhp */ FALSE,
- /* 4: xenl */ TRUE,
- /* 5: eo */ FALSE,
- /* 6: gn */ FALSE,
- /* 7: hc */ FALSE,
- /* 8: km */ TRUE,
- /* 9: hs */ FALSE,
- /* 10: in */ FALSE,
- /* 11: da */ FALSE,
- /* 12: db */ FALSE,
- /* 13: mir */ TRUE,
- /* 14: msgr */ TRUE,
- /* 15: os */ FALSE,
- /* 16: eslok */ FALSE,
- /* 17: xt */ FALSE,
- /* 18: hz */ FALSE,
- /* 19: ul */ FALSE,
- /* 20: xon */ FALSE,
- /* 21: nxon */ FALSE,
- /* 22: mc5i */ TRUE,
- /* 23: chts */ FALSE,
- /* 24: nrrmc */ FALSE,
- /* 25: npc */ TRUE,
- /* 26: ndscr */ FALSE,
- /* 27: ccc */ FALSE,
- /* 28: bce */ FALSE,
- /* 29: hls */ FALSE,
- /* 30: xhpa */ FALSE,
- /* 31: crxm */ FALSE,
- /* 32: daisy */ FALSE,
- /* 33: xvpa */ FALSE,
- /* 34: sam */ FALSE,
- /* 35: cpix */ FALSE,
- /* 36: lpix */ FALSE,
- /* 37: OTbs */ TRUE,
- /* 38: OTns */ FALSE,
- /* 39: OTnc */ FALSE,
- /* 40: OTMT */ FALSE,
- /* 41: OTNL */ FALSE,
- /* 42: OTpt */ FALSE,
- /* 43: OTxr */ FALSE,
-};
-static NCURSES_INT2 screen_xterm_256color_number_data[] = {
- /* 0: cols */ 80,
- /* 1: it */ 8,
- /* 2: lines */ 24,
- /* 3: lm */ ABSENT_NUMERIC,
- /* 4: xmc */ ABSENT_NUMERIC,
- /* 5: pb */ ABSENT_NUMERIC,
- /* 6: vt */ ABSENT_NUMERIC,
- /* 7: wsl */ ABSENT_NUMERIC,
- /* 8: nlab */ ABSENT_NUMERIC,
- /* 9: lh */ ABSENT_NUMERIC,
- /* 10: lw */ ABSENT_NUMERIC,
- /* 11: ma */ ABSENT_NUMERIC,
- /* 12: wnum */ ABSENT_NUMERIC,
- /* 13: colors */ 256,
- /* 14: pairs */ 32767,
- /* 15: ncv */ ABSENT_NUMERIC,
- /* 16: bufsz */ ABSENT_NUMERIC,
- /* 17: spinv */ ABSENT_NUMERIC,
- /* 18: spinh */ ABSENT_NUMERIC,
- /* 19: maddr */ ABSENT_NUMERIC,
- /* 20: mjump */ ABSENT_NUMERIC,
- /* 21: mcs */ ABSENT_NUMERIC,
- /* 22: mls */ ABSENT_NUMERIC,
- /* 23: npins */ ABSENT_NUMERIC,
- /* 24: orc */ ABSENT_NUMERIC,
- /* 25: orl */ ABSENT_NUMERIC,
- /* 26: orhi */ ABSENT_NUMERIC,
- /* 27: orvi */ ABSENT_NUMERIC,
- /* 28: cps */ ABSENT_NUMERIC,
- /* 29: widcs */ ABSENT_NUMERIC,
- /* 30: btns */ ABSENT_NUMERIC,
- /* 31: bitwin */ ABSENT_NUMERIC,
- /* 32: bitype */ ABSENT_NUMERIC,
- /* 33: OTug */ ABSENT_NUMERIC,
- /* 34: OTdC */ ABSENT_NUMERIC,
- /* 35: OTdN */ ABSENT_NUMERIC,
- /* 36: OTdB */ ABSENT_NUMERIC,
- /* 37: OTdT */ ABSENT_NUMERIC,
- /* 38: OTkn */ ABSENT_NUMERIC,
-};
-static char * screen_xterm_256color_string_data[] = {
- /* 0: cbt */ screen_xterm_256color_s_cbt,
- /* 1: bel */ screen_xterm_256color_s_bel,
- /* 2: cr */ screen_xterm_256color_s_cr,
- /* 3: csr */ screen_xterm_256color_s_csr,
- /* 4: tbc */ screen_xterm_256color_s_tbc,
- /* 5: clear */ screen_xterm_256color_s_clear,
- /* 6: el */ screen_xterm_256color_s_el,
- /* 7: ed */ screen_xterm_256color_s_ed,
- /* 8: hpa */ screen_xterm_256color_s_hpa,
- /* 9: cmdch */ ABSENT_STRING,
- /* 10: cup */ screen_xterm_256color_s_cup,
- /* 11: cud1 */ screen_xterm_256color_s_cud1,
- /* 12: home */ screen_xterm_256color_s_home,
- /* 13: civis */ screen_xterm_256color_s_civis,
- /* 14: cub1 */ screen_xterm_256color_s_cub1,
- /* 15: mrcup */ ABSENT_STRING,
- /* 16: cnorm */ screen_xterm_256color_s_cnorm,
- /* 17: cuf1 */ screen_xterm_256color_s_cuf1,
- /* 18: ll */ ABSENT_STRING,
- /* 19: cuu1 */ screen_xterm_256color_s_cuu1,
- /* 20: cvvis */ screen_xterm_256color_s_cvvis,
- /* 21: dch1 */ screen_xterm_256color_s_dch1,
- /* 22: dl1 */ screen_xterm_256color_s_dl1,
- /* 23: dsl */ ABSENT_STRING,
- /* 24: hd */ ABSENT_STRING,
- /* 25: smacs */ screen_xterm_256color_s_smacs,
- /* 26: blink */ screen_xterm_256color_s_blink,
- /* 27: bold */ screen_xterm_256color_s_bold,
- /* 28: smcup */ screen_xterm_256color_s_smcup,
- /* 29: smdc */ ABSENT_STRING,
- /* 30: dim */ screen_xterm_256color_s_dim,
- /* 31: smir */ screen_xterm_256color_s_smir,
- /* 32: invis */ ABSENT_STRING,
- /* 33: prot */ ABSENT_STRING,
- /* 34: rev */ screen_xterm_256color_s_rev,
- /* 35: smso */ screen_xterm_256color_s_smso,
- /* 36: smul */ screen_xterm_256color_s_smul,
- /* 37: ech */ screen_xterm_256color_s_ech,
- /* 38: rmacs */ screen_xterm_256color_s_rmacs,
- /* 39: sgr0 */ screen_xterm_256color_s_sgr0,
- /* 40: rmcup */ screen_xterm_256color_s_rmcup,
- /* 41: rmdc */ ABSENT_STRING,
- /* 42: rmir */ screen_xterm_256color_s_rmir,
- /* 43: rmso */ screen_xterm_256color_s_rmso,
- /* 44: rmul */ screen_xterm_256color_s_rmul,
- /* 45: flash */ screen_xterm_256color_s_flash,
- /* 46: ff */ ABSENT_STRING,
- /* 47: fsl */ ABSENT_STRING,
- /* 48: is1 */ ABSENT_STRING,
- /* 49: is2 */ screen_xterm_256color_s_is2,
- /* 50: is3 */ ABSENT_STRING,
- /* 51: if */ ABSENT_STRING,
- /* 52: ich1 */ ABSENT_STRING,
- /* 53: il1 */ screen_xterm_256color_s_il1,
- /* 54: ip */ ABSENT_STRING,
- /* 55: kbs */ screen_xterm_256color_s_kbs,
- /* 56: ktbc */ ABSENT_STRING,
- /* 57: kclr */ ABSENT_STRING,
- /* 58: kctab */ ABSENT_STRING,
- /* 59: kdch1 */ screen_xterm_256color_s_kdch1,
- /* 60: kdl1 */ ABSENT_STRING,
- /* 61: kcud1 */ screen_xterm_256color_s_kcud1,
- /* 62: krmir */ ABSENT_STRING,
- /* 63: kel */ ABSENT_STRING,
- /* 64: ked */ ABSENT_STRING,
- /* 65: kf0 */ ABSENT_STRING,
- /* 66: kf1 */ screen_xterm_256color_s_kf1,
- /* 67: kf10 */ screen_xterm_256color_s_kf10,
- /* 68: kf2 */ screen_xterm_256color_s_kf2,
- /* 69: kf3 */ screen_xterm_256color_s_kf3,
- /* 70: kf4 */ screen_xterm_256color_s_kf4,
- /* 71: kf5 */ screen_xterm_256color_s_kf5,
- /* 72: kf6 */ screen_xterm_256color_s_kf6,
- /* 73: kf7 */ screen_xterm_256color_s_kf7,
- /* 74: kf8 */ screen_xterm_256color_s_kf8,
- /* 75: kf9 */ screen_xterm_256color_s_kf9,
- /* 76: khome */ screen_xterm_256color_s_khome,
- /* 77: kich1 */ screen_xterm_256color_s_kich1,
- /* 78: kil1 */ ABSENT_STRING,
- /* 79: kcub1 */ screen_xterm_256color_s_kcub1,
- /* 80: kll */ ABSENT_STRING,
- /* 81: knp */ screen_xterm_256color_s_knp,
- /* 82: kpp */ screen_xterm_256color_s_kpp,
- /* 83: kcuf1 */ screen_xterm_256color_s_kcuf1,
- /* 84: kind */ screen_xterm_256color_s_kind,
- /* 85: kri */ screen_xterm_256color_s_kri,
- /* 86: khts */ ABSENT_STRING,
- /* 87: kcuu1 */ screen_xterm_256color_s_kcuu1,
- /* 88: rmkx */ screen_xterm_256color_s_rmkx,
- /* 89: smkx */ screen_xterm_256color_s_smkx,
- /* 90: lf0 */ ABSENT_STRING,
- /* 91: lf1 */ ABSENT_STRING,
- /* 92: lf10 */ ABSENT_STRING,
- /* 93: lf2 */ ABSENT_STRING,
- /* 94: lf3 */ ABSENT_STRING,
- /* 95: lf4 */ ABSENT_STRING,
- /* 96: lf5 */ ABSENT_STRING,
- /* 97: lf6 */ ABSENT_STRING,
- /* 98: lf7 */ ABSENT_STRING,
- /* 99: lf8 */ ABSENT_STRING,
- /* 100: lf9 */ ABSENT_STRING,
- /* 101: rmm */ screen_xterm_256color_s_rmm,
- /* 102: smm */ screen_xterm_256color_s_smm,
- /* 103: nel */ ABSENT_STRING,
- /* 104: pad */ ABSENT_STRING,
- /* 105: dch */ screen_xterm_256color_s_dch,
- /* 106: dl */ screen_xterm_256color_s_dl,
- /* 107: cud */ screen_xterm_256color_s_cud,
- /* 108: ich */ screen_xterm_256color_s_ich,
- /* 109: indn */ screen_xterm_256color_s_indn,
- /* 110: il */ screen_xterm_256color_s_il,
- /* 111: cub */ screen_xterm_256color_s_cub,
- /* 112: cuf */ screen_xterm_256color_s_cuf,
- /* 113: rin */ screen_xterm_256color_s_rin,
- /* 114: cuu */ screen_xterm_256color_s_cuu,
- /* 115: pfkey */ ABSENT_STRING,
- /* 116: pfloc */ ABSENT_STRING,
- /* 117: pfx */ ABSENT_STRING,
- /* 118: mc0 */ screen_xterm_256color_s_mc0,
- /* 119: mc4 */ screen_xterm_256color_s_mc4,
- /* 120: mc5 */ screen_xterm_256color_s_mc5,
- /* 121: rep */ ABSENT_STRING,
- /* 122: rs1 */ screen_xterm_256color_s_rs1,
- /* 123: rs2 */ screen_xterm_256color_s_rs2,
- /* 124: rs3 */ ABSENT_STRING,
- /* 125: rf */ ABSENT_STRING,
- /* 126: rc */ screen_xterm_256color_s_rc,
- /* 127: vpa */ screen_xterm_256color_s_vpa,
- /* 128: sc */ screen_xterm_256color_s_sc,
- /* 129: ind */ screen_xterm_256color_s_ind,
- /* 130: ri */ screen_xterm_256color_s_ri,
- /* 131: sgr */ screen_xterm_256color_s_sgr,
- /* 132: hts */ screen_xterm_256color_s_hts,
- /* 133: wind */ ABSENT_STRING,
- /* 134: ht */ screen_xterm_256color_s_ht,
- /* 135: tsl */ ABSENT_STRING,
- /* 136: uc */ ABSENT_STRING,
- /* 137: hu */ ABSENT_STRING,
- /* 138: iprog */ ABSENT_STRING,
- /* 139: ka1 */ ABSENT_STRING,
- /* 140: ka3 */ ABSENT_STRING,
- /* 141: kb2 */ screen_xterm_256color_s_kb2,
- /* 142: kc1 */ ABSENT_STRING,
- /* 143: kc3 */ ABSENT_STRING,
- /* 144: mc5p */ ABSENT_STRING,
- /* 145: rmp */ ABSENT_STRING,
- /* 146: acsc */ screen_xterm_256color_s_acsc,
- /* 147: pln */ ABSENT_STRING,
- /* 148: kcbt */ screen_xterm_256color_s_kcbt,
- /* 149: smxon */ ABSENT_STRING,
- /* 150: rmxon */ ABSENT_STRING,
- /* 151: smam */ screen_xterm_256color_s_smam,
- /* 152: rmam */ screen_xterm_256color_s_rmam,
- /* 153: xonc */ ABSENT_STRING,
- /* 154: xoffc */ ABSENT_STRING,
- /* 155: enacs */ ABSENT_STRING,
- /* 156: smln */ ABSENT_STRING,
- /* 157: rmln */ ABSENT_STRING,
- /* 158: kbeg */ ABSENT_STRING,
- /* 159: kcan */ ABSENT_STRING,
- /* 160: kclo */ ABSENT_STRING,
- /* 161: kcmd */ ABSENT_STRING,
- /* 162: kcpy */ ABSENT_STRING,
- /* 163: kcrt */ ABSENT_STRING,
- /* 164: kend */ screen_xterm_256color_s_kend,
- /* 165: kent */ screen_xterm_256color_s_kent,
- /* 166: kext */ ABSENT_STRING,
- /* 167: kfnd */ ABSENT_STRING,
- /* 168: khlp */ ABSENT_STRING,
- /* 169: kmrk */ ABSENT_STRING,
- /* 170: kmsg */ ABSENT_STRING,
- /* 171: kmov */ ABSENT_STRING,
- /* 172: knxt */ ABSENT_STRING,
- /* 173: kopn */ ABSENT_STRING,
- /* 174: kopt */ ABSENT_STRING,
- /* 175: kprv */ ABSENT_STRING,
- /* 176: kprt */ ABSENT_STRING,
- /* 177: krdo */ ABSENT_STRING,
- /* 178: kref */ ABSENT_STRING,
- /* 179: krfr */ ABSENT_STRING,
- /* 180: krpl */ ABSENT_STRING,
- /* 181: krst */ ABSENT_STRING,
- /* 182: kres */ ABSENT_STRING,
- /* 183: ksav */ ABSENT_STRING,
- /* 184: kspd */ ABSENT_STRING,
- /* 185: kund */ ABSENT_STRING,
- /* 186: kBEG */ ABSENT_STRING,
- /* 187: kCAN */ ABSENT_STRING,
- /* 188: kCMD */ ABSENT_STRING,
- /* 189: kCPY */ ABSENT_STRING,
- /* 190: kCRT */ ABSENT_STRING,
- /* 191: kDC */ screen_xterm_256color_s_kDC,
- /* 192: kDL */ ABSENT_STRING,
- /* 193: kslt */ ABSENT_STRING,
- /* 194: kEND */ screen_xterm_256color_s_kEND,
- /* 195: kEOL */ ABSENT_STRING,
- /* 196: kEXT */ ABSENT_STRING,
- /* 197: kFND */ ABSENT_STRING,
- /* 198: kHLP */ ABSENT_STRING,
- /* 199: kHOM */ screen_xterm_256color_s_kHOM,
- /* 200: kIC */ ABSENT_STRING,
- /* 201: kLFT */ screen_xterm_256color_s_kLFT,
- /* 202: kMSG */ ABSENT_STRING,
- /* 203: kMOV */ ABSENT_STRING,
- /* 204: kNXT */ ABSENT_STRING,
- /* 205: kOPT */ ABSENT_STRING,
- /* 206: kPRV */ ABSENT_STRING,
- /* 207: kPRT */ ABSENT_STRING,
- /* 208: kRDO */ ABSENT_STRING,
- /* 209: kRPL */ ABSENT_STRING,
- /* 210: kRIT */ screen_xterm_256color_s_kRIT,
- /* 211: kRES */ ABSENT_STRING,
- /* 212: kSAV */ ABSENT_STRING,
- /* 213: kSPD */ ABSENT_STRING,
- /* 214: kUND */ ABSENT_STRING,
- /* 215: rfi */ ABSENT_STRING,
- /* 216: kf11 */ screen_xterm_256color_s_kf11,
- /* 217: kf12 */ screen_xterm_256color_s_kf12,
- /* 218: kf13 */ screen_xterm_256color_s_kf13,
- /* 219: kf14 */ screen_xterm_256color_s_kf14,
- /* 220: kf15 */ screen_xterm_256color_s_kf15,
- /* 221: kf16 */ screen_xterm_256color_s_kf16,
- /* 222: kf17 */ screen_xterm_256color_s_kf17,
- /* 223: kf18 */ screen_xterm_256color_s_kf18,
- /* 224: kf19 */ screen_xterm_256color_s_kf19,
- /* 225: kf20 */ screen_xterm_256color_s_kf20,
- /* 226: kf21 */ screen_xterm_256color_s_kf21,
- /* 227: kf22 */ screen_xterm_256color_s_kf22,
- /* 228: kf23 */ screen_xterm_256color_s_kf23,
- /* 229: kf24 */ screen_xterm_256color_s_kf24,
- /* 230: kf25 */ screen_xterm_256color_s_kf25,
- /* 231: kf26 */ screen_xterm_256color_s_kf26,
- /* 232: kf27 */ screen_xterm_256color_s_kf27,
- /* 233: kf28 */ screen_xterm_256color_s_kf28,
- /* 234: kf29 */ screen_xterm_256color_s_kf29,
- /* 235: kf30 */ screen_xterm_256color_s_kf30,
- /* 236: kf31 */ screen_xterm_256color_s_kf31,
- /* 237: kf32 */ screen_xterm_256color_s_kf32,
- /* 238: kf33 */ screen_xterm_256color_s_kf33,
- /* 239: kf34 */ screen_xterm_256color_s_kf34,
- /* 240: kf35 */ screen_xterm_256color_s_kf35,
- /* 241: kf36 */ screen_xterm_256color_s_kf36,
- /* 242: kf37 */ screen_xterm_256color_s_kf37,
- /* 243: kf38 */ screen_xterm_256color_s_kf38,
- /* 244: kf39 */ screen_xterm_256color_s_kf39,
- /* 245: kf40 */ screen_xterm_256color_s_kf40,
- /* 246: kf41 */ screen_xterm_256color_s_kf41,
- /* 247: kf42 */ screen_xterm_256color_s_kf42,
- /* 248: kf43 */ screen_xterm_256color_s_kf43,
- /* 249: kf44 */ screen_xterm_256color_s_kf44,
- /* 250: kf45 */ screen_xterm_256color_s_kf45,
- /* 251: kf46 */ screen_xterm_256color_s_kf46,
- /* 252: kf47 */ screen_xterm_256color_s_kf47,
- /* 253: kf48 */ screen_xterm_256color_s_kf48,
- /* 254: kf49 */ screen_xterm_256color_s_kf49,
- /* 255: kf50 */ screen_xterm_256color_s_kf50,
- /* 256: kf51 */ screen_xterm_256color_s_kf51,
- /* 257: kf52 */ screen_xterm_256color_s_kf52,
- /* 258: kf53 */ screen_xterm_256color_s_kf53,
- /* 259: kf54 */ screen_xterm_256color_s_kf54,
- /* 260: kf55 */ screen_xterm_256color_s_kf55,
- /* 261: kf56 */ screen_xterm_256color_s_kf56,
- /* 262: kf57 */ screen_xterm_256color_s_kf57,
- /* 263: kf58 */ screen_xterm_256color_s_kf58,
- /* 264: kf59 */ screen_xterm_256color_s_kf59,
- /* 265: kf60 */ screen_xterm_256color_s_kf60,
- /* 266: kf61 */ screen_xterm_256color_s_kf61,
- /* 267: kf62 */ screen_xterm_256color_s_kf62,
- /* 268: kf63 */ screen_xterm_256color_s_kf63,
- /* 269: el1 */ screen_xterm_256color_s_el1,
- /* 270: mgc */ ABSENT_STRING,
- /* 271: smgl */ ABSENT_STRING,
- /* 272: smgr */ ABSENT_STRING,
- /* 273: fln */ ABSENT_STRING,
- /* 274: sclk */ ABSENT_STRING,
- /* 275: dclk */ ABSENT_STRING,
- /* 276: rmclk */ ABSENT_STRING,
- /* 277: cwin */ ABSENT_STRING,
- /* 278: wingo */ ABSENT_STRING,
- /* 279: hup */ ABSENT_STRING,
- /* 280: dial */ ABSENT_STRING,
- /* 281: qdial */ ABSENT_STRING,
- /* 282: tone */ ABSENT_STRING,
- /* 283: pulse */ ABSENT_STRING,
- /* 284: hook */ ABSENT_STRING,
- /* 285: pause */ ABSENT_STRING,
- /* 286: wait */ ABSENT_STRING,
- /* 287: u0 */ ABSENT_STRING,
- /* 288: u1 */ ABSENT_STRING,
- /* 289: u2 */ ABSENT_STRING,
- /* 290: u3 */ ABSENT_STRING,
- /* 291: u4 */ ABSENT_STRING,
- /* 292: u5 */ ABSENT_STRING,
- /* 293: u6 */ screen_xterm_256color_s_u6,
- /* 294: u7 */ screen_xterm_256color_s_u7,
- /* 295: u8 */ screen_xterm_256color_s_u8,
- /* 296: u9 */ screen_xterm_256color_s_u9,
- /* 297: op */ screen_xterm_256color_s_op,
- /* 298: oc */ ABSENT_STRING,
- /* 299: initc */ ABSENT_STRING,
- /* 300: initp */ ABSENT_STRING,
- /* 301: scp */ ABSENT_STRING,
- /* 302: setf */ ABSENT_STRING,
- /* 303: setb */ ABSENT_STRING,
- /* 304: cpi */ ABSENT_STRING,
- /* 305: lpi */ ABSENT_STRING,
- /* 306: chr */ ABSENT_STRING,
- /* 307: cvr */ ABSENT_STRING,
- /* 308: defc */ ABSENT_STRING,
- /* 309: swidm */ ABSENT_STRING,
- /* 310: sdrfq */ ABSENT_STRING,
- /* 311: sitm */ ABSENT_STRING,
- /* 312: slm */ ABSENT_STRING,
- /* 313: smicm */ ABSENT_STRING,
- /* 314: snlq */ ABSENT_STRING,
- /* 315: snrmq */ ABSENT_STRING,
- /* 316: sshm */ ABSENT_STRING,
- /* 317: ssubm */ ABSENT_STRING,
- /* 318: ssupm */ ABSENT_STRING,
- /* 319: sum */ ABSENT_STRING,
- /* 320: rwidm */ ABSENT_STRING,
- /* 321: ritm */ ABSENT_STRING,
- /* 322: rlm */ ABSENT_STRING,
- /* 323: rmicm */ ABSENT_STRING,
- /* 324: rshm */ ABSENT_STRING,
- /* 325: rsubm */ ABSENT_STRING,
- /* 326: rsupm */ ABSENT_STRING,
- /* 327: rum */ ABSENT_STRING,
- /* 328: mhpa */ ABSENT_STRING,
- /* 329: mcud1 */ ABSENT_STRING,
- /* 330: mcub1 */ ABSENT_STRING,
- /* 331: mcuf1 */ ABSENT_STRING,
- /* 332: mvpa */ ABSENT_STRING,
- /* 333: mcuu1 */ ABSENT_STRING,
- /* 334: porder */ ABSENT_STRING,
- /* 335: mcud */ ABSENT_STRING,
- /* 336: mcub */ ABSENT_STRING,
- /* 337: mcuf */ ABSENT_STRING,
- /* 338: mcuu */ ABSENT_STRING,
- /* 339: scs */ ABSENT_STRING,
- /* 340: smgb */ ABSENT_STRING,
- /* 341: smgbp */ ABSENT_STRING,
- /* 342: smglp */ ABSENT_STRING,
- /* 343: smgrp */ ABSENT_STRING,
- /* 344: smgt */ ABSENT_STRING,
- /* 345: smgtp */ ABSENT_STRING,
- /* 346: sbim */ ABSENT_STRING,
- /* 347: scsd */ ABSENT_STRING,
- /* 348: rbim */ ABSENT_STRING,
- /* 349: rcsd */ ABSENT_STRING,
- /* 350: subcs */ ABSENT_STRING,
- /* 351: supcs */ ABSENT_STRING,
- /* 352: docr */ ABSENT_STRING,
- /* 353: zerom */ ABSENT_STRING,
- /* 354: csnm */ ABSENT_STRING,
- /* 355: kmous */ screen_xterm_256color_s_kmous,
- /* 356: minfo */ ABSENT_STRING,
- /* 357: reqmp */ ABSENT_STRING,
- /* 358: getm */ ABSENT_STRING,
- /* 359: setaf */ screen_xterm_256color_s_setaf,
- /* 360: setab */ screen_xterm_256color_s_setab,
- /* 361: pfxl */ ABSENT_STRING,
- /* 362: devt */ ABSENT_STRING,
- /* 363: csin */ ABSENT_STRING,
- /* 364: s0ds */ ABSENT_STRING,
- /* 365: s1ds */ ABSENT_STRING,
- /* 366: s2ds */ ABSENT_STRING,
- /* 367: s3ds */ ABSENT_STRING,
- /* 368: smglr */ ABSENT_STRING,
- /* 369: smgtb */ ABSENT_STRING,
- /* 370: birep */ ABSENT_STRING,
- /* 371: binel */ ABSENT_STRING,
- /* 372: bicr */ ABSENT_STRING,
- /* 373: colornm */ ABSENT_STRING,
- /* 374: defbi */ ABSENT_STRING,
- /* 375: endbi */ ABSENT_STRING,
- /* 376: setcolor */ ABSENT_STRING,
- /* 377: slines */ ABSENT_STRING,
- /* 378: dispc */ ABSENT_STRING,
- /* 379: smpch */ ABSENT_STRING,
- /* 380: rmpch */ ABSENT_STRING,
- /* 381: smsc */ ABSENT_STRING,
- /* 382: rmsc */ ABSENT_STRING,
- /* 383: pctrm */ ABSENT_STRING,
- /* 384: scesc */ ABSENT_STRING,
- /* 385: scesa */ ABSENT_STRING,
- /* 386: ehhlm */ ABSENT_STRING,
- /* 387: elhlm */ ABSENT_STRING,
- /* 388: elohlm */ ABSENT_STRING,
- /* 389: erhlm */ ABSENT_STRING,
- /* 390: ethlm */ ABSENT_STRING,
- /* 391: evhlm */ ABSENT_STRING,
- /* 392: sgr1 */ ABSENT_STRING,
- /* 393: slength */ ABSENT_STRING,
- /* 394: OTi2 */ ABSENT_STRING,
- /* 395: OTrs */ ABSENT_STRING,
- /* 396: OTnl */ ABSENT_STRING,
- /* 397: OTbc */ ABSENT_STRING,
- /* 398: OTko */ ABSENT_STRING,
- /* 399: OTma */ ABSENT_STRING,
- /* 400: OTG2 */ ABSENT_STRING,
- /* 401: OTG3 */ ABSENT_STRING,
- /* 402: OTG1 */ ABSENT_STRING,
- /* 403: OTG4 */ ABSENT_STRING,
- /* 404: OTGR */ ABSENT_STRING,
- /* 405: OTGL */ ABSENT_STRING,
- /* 406: OTGU */ ABSENT_STRING,
- /* 407: OTGD */ ABSENT_STRING,
- /* 408: OTGH */ ABSENT_STRING,
- /* 409: OTGV */ ABSENT_STRING,
- /* 410: OTGC */ ABSENT_STRING,
- /* 411: meml */ ABSENT_STRING,
- /* 412: memu */ ABSENT_STRING,
- /* 413: box1 */ ABSENT_STRING,
-};
-static const TERMTYPE2 fallbacks[10] =
-{
- /* linux */
- {
- linux_alias_data,
- (char *)0, /* pointer to string table */
- linux_bool_data,
- linux_number_data,
- linux_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* rxvt */
- {
- rxvt_alias_data,
- (char *)0, /* pointer to string table */
- rxvt_bool_data,
- rxvt_number_data,
- rxvt_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* vt100 */
- {
- vt100_alias_data,
- (char *)0, /* pointer to string table */
- vt100_bool_data,
- vt100_number_data,
- vt100_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* xterm */
- {
- xterm_alias_data,
- (char *)0, /* pointer to string table */
- xterm_bool_data,
- xterm_number_data,
- xterm_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* xterm-256color */
- {
- xterm_256color_alias_data,
- (char *)0, /* pointer to string table */
- xterm_256color_bool_data,
- xterm_256color_number_data,
- xterm_256color_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* screen */
- {
- screen_alias_data,
- (char *)0, /* pointer to string table */
- screen_bool_data,
- screen_number_data,
- screen_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* screen.linux */
- {
- screen_linux_alias_data,
- (char *)0, /* pointer to string table */
- screen_linux_bool_data,
- screen_linux_number_data,
- screen_linux_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* screen.rxvt */
- {
- screen_rxvt_alias_data,
- (char *)0, /* pointer to string table */
- screen_rxvt_bool_data,
- screen_rxvt_number_data,
- screen_rxvt_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* screen.xterm-new */
- {
- screen_xterm_xfree86_alias_data,
- (char *)0, /* pointer to string table */
- screen_xterm_xfree86_bool_data,
- screen_xterm_xfree86_number_data,
- screen_xterm_xfree86_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-, /* screen.xterm-256color */
- {
- screen_xterm_256color_alias_data,
- (char *)0, /* pointer to string table */
- screen_xterm_256color_bool_data,
- screen_xterm_256color_number_data,
- screen_xterm_256color_string_data,
-#if NCURSES_XNAMES
- (char *)0, /* pointer to extended string table */
- (char **)0, /* ...corresponding names */
- 44, /* count total Booleans */
- 39, /* count total Numbers */
- 414, /* count total Strings */
- 0, /* count extensions to Booleans */
- 0, /* count extensions to Numbers */
- 0, /* count extensions to Strings */
-#endif /* NCURSES_XNAMES */
- }
-};
-
-NCURSES_EXPORT(const TERMTYPE2 *)
-_nc_fallback2 (const char *name GCC_UNUSED)
-{
- const TERMTYPE2 *tp;
-
- for (tp = fallbacks;
- tp < fallbacks + sizeof(fallbacks)/sizeof(TERMTYPE2);
- tp++) {
- if (_nc_name_match(tp->term_names, name, "|")) {
- return(tp);
- }
- }
- return((const TERMTYPE2 *)0);
-}
-
-#if NCURSES_EXT_NUMBERS
-#undef _nc_fallback
-
-/*
- * This entrypoint is used by tack.
- */
-NCURSES_EXPORT(const TERMTYPE *)
-_nc_fallback (const char *name)
-{
- const TERMTYPE2 *tp = _nc_fallback2(name);
- const TERMTYPE *result = 0;
- if (tp != 0) {
- static TERMTYPE temp;
- _nc_export_termtype2(&temp, tp);
- result = &temp;
- }
- return result;
-}
-#endif
diff --git a/contrib/depends/patches/protobuf/visibility.patch b/contrib/depends/patches/protobuf/visibility.patch
deleted file mode 100644
index e66d596..0000000
--- a/contrib/depends/patches/protobuf/visibility.patch
+++ /dev/null
@@ -1,159 +0,0 @@
---- src/google/protobuf/descriptor.cc.O 2018-07-30 22:16:10.000000000 +0000
-+++ src/google/protobuf/descriptor.cc 2022-05-06 13:38:14.827309092 +0000
-@@ -32,6 +32,9 @@
- // Based on original Protocol Buffers design by
- // Sanjay Ghemawat, Jeff Dean, and others.
-
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility push(hidden)
-+#endif
- #include <algorithm>
- #include <functional>
- #include <google/protobuf/stubs/hash.h>
-@@ -7274,3 +7277,6 @@
-
- } // namespace protobuf
- } // namespace google
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility pop
-+#endif
---- src/google/protobuf/extension_set.cc.O 2018-07-23 20:56:42.000000000 +0000
-+++ src/google/protobuf/extension_set.cc 2022-05-06 14:48:55.369877050 +0000
-@@ -32,6 +32,9 @@
- // Based on original Protocol Buffers design by
- // Sanjay Ghemawat, Jeff Dean, and others.
-
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility push(hidden)
-+#endif
- #include <google/protobuf/stubs/hash.h>
- #include <tuple>
- #include <utility>
-@@ -1914,3 +1917,6 @@
- } // namespace internal
- } // namespace protobuf
- } // namespace google
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility pop
-+#endif
---- src/google/protobuf/extension_set_heavy.cc.O 2018-07-30 22:16:10.000000000 +0000
-+++ src/google/protobuf/extension_set_heavy.cc 2022-05-06 14:14:27.847320946 +0000
-@@ -35,6 +35,10 @@
- // Contains methods defined in extension_set.h which cannot be part of the
- // lite library because they use descriptors or reflection.
-
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility push(hidden)
-+#endif
-+
- #include <google/protobuf/stubs/casts.h>
- #include <google/protobuf/descriptor.pb.h>
- #include <google/protobuf/io/coded_stream.h>
-@@ -814,3 +818,6 @@
- } // namespace internal
- } // namespace protobuf
- } // namespace google
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility pop
-+#endif
---- src/google/protobuf/generated_message_reflection.cc.O 2018-07-23 20:56:42.000000000 +0000
-+++ src/google/protobuf/generated_message_reflection.cc 2022-05-06 13:38:49.655540772 +0000
-@@ -32,6 +32,9 @@
- // Based on original Protocol Buffers design by
- // Sanjay Ghemawat, Jeff Dean, and others.
-
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility push(hidden)
-+#endif
- #include <algorithm>
- #include <set>
-
-@@ -2420,3 +2423,6 @@
- } // namespace internal
- } // namespace protobuf
- } // namespace google
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility pop
-+#endif
---- src/google/protobuf/map_field.cc.O 2018-07-23 20:56:42.000000000 +0000
-+++ src/google/protobuf/map_field.cc 2022-05-06 13:34:44.913905697 +0000
-@@ -28,6 +28,10 @@
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility push(hidden)
-+#endif
-+
- #include <google/protobuf/map_field.h>
- #include <google/protobuf/map_field_inl.h>
-
-@@ -462,3 +466,6 @@
- } // namespace internal
- } // namespace protobuf
- } // namespace google
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility pop
-+#endif
---- src/google/protobuf/text_format.cc.O 2018-07-30 22:16:11.000000000 +0000
-+++ src/google/protobuf/text_format.cc 2022-05-06 13:34:58.881999517 +0000
-@@ -32,6 +32,10 @@
- // Based on original Protocol Buffers design by
- // Sanjay Ghemawat, Jeff Dean, and others.
-
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility push(hidden)
-+#endif
-+
- #include <algorithm>
- #include <float.h>
- #include <math.h>
-@@ -2258,3 +2262,6 @@
-
- } // namespace protobuf
- } // namespace google
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility pop
-+#endif
---- src/google/protobuf/wire_format.cc.O 2018-07-23 20:56:42.000000000 +0000
-+++ src/google/protobuf/wire_format.cc 2022-05-06 13:06:23.294219228 +0000
-@@ -32,6 +32,10 @@
- // Based on original Protocol Buffers design by
- // Sanjay Ghemawat, Jeff Dean, and others.
-
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility push(hidden)
-+#endif
-+
- #include <stack>
- #include <string>
- #include <vector>
-@@ -1445,3 +1449,7 @@
- } // namespace internal
- } // namespace protobuf
- } // namespace google
-+
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility pop
-+#endif
---- src/google/protobuf/stubs/status.cc.O 2018-07-23 20:56:42.000000000 +0000
-+++ src/google/protobuf/stubs/status.cc 2022-05-06 15:18:53.393208814 +0000
-@@ -27,6 +27,11 @@
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility push(hidden)
-+#endif
-+
- #include <google/protobuf/stubs/status.h>
-
- #include <ostream>
-@@ -132,3 +137,6 @@
- } // namespace util
- } // namespace protobuf
- } // namespace google
-+#if defined(__APPLE__) && defined(__arm64__)
-+#pragma GCC visibility pop
-+#endif
diff --git a/contrib/depends/patches/sodium/disable-glibc-getrandom-getentropy.patch b/contrib/depends/patches/sodium/disable-glibc-getrandom-getentropy.patch
deleted file mode 100644
index 2f07c10..0000000
--- a/contrib/depends/patches/sodium/disable-glibc-getrandom-getentropy.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 9e2de27c..0fa85c2d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -807,6 +807,10 @@ AS_IF([test "x$EMSCRIPTEN" = "x"],[
- # include <sys/random.h>
- #endif
- ]], [[
-+#ifdef __linux__
-+# error getrandom() is currently disabled on Linux to support glibc < 2.25
-+#endif
-+
- unsigned char buf;
- (void) getrandom((void *) &buf, 1U, 0U);
- ]])],
-@@ -825,6 +829,9 @@ unsigned char buf;
- # include <sys/random.h>
- #endif
- ]], [[
-+#ifdef __linux__
-+# error getentropy() is currently disabled on Linux to support glibc < 2.25
-+#endif
- #ifdef __APPLE__
- # error getentropy() is currently disabled on Apple operating systems
- #endif
diff --git a/contrib/depends/patches/sodium/fix-whitespace.patch b/contrib/depends/patches/sodium/fix-whitespace.patch
deleted file mode 100644
index c3d3af0..0000000
--- a/contrib/depends/patches/sodium/fix-whitespace.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/configure b/configure
-index b29f769..ca008ae 100755
---- a/configure
-+++ b/configure
-@@ -591,7 +591,7 @@ MAKEFLAGS=
- PACKAGE_NAME='libsodium'
- PACKAGE_TARNAME='libsodium'
- PACKAGE_VERSION='1.0.18'
--PACKAGE_STRING='libsodium 1.0.18'
-+PACKAGE_STRING='libsodium'
- PACKAGE_BUGREPORT='https://github.com/jedisct1/libsodium/issues'
- PACKAGE_URL='https://github.com/jedisct1/libsodium'
-
diff --git a/contrib/depends/patches/unbound/disable-glibc-reallocarray.patch b/contrib/depends/patches/unbound/disable-glibc-reallocarray.patch
deleted file mode 100644
index d66a821..0000000
--- a/contrib/depends/patches/unbound/disable-glibc-reallocarray.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 5c7da197..e2b25288 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1702,6 +1702,9 @@ AC_LINK_IFELSE([AC_LANG_SOURCE(AC_INCLUDES_DEFAULT
- #ifndef _OPENBSD_SOURCE
- #define _OPENBSD_SOURCE 1
- #endif
-+#ifdef __linux__
-+# error reallocarray() is currently disabled on Linux to support glibc < 2.26
-+#endif
- #include <stdlib.h>
- int main(void) {
- void* p = reallocarray(NULL, 10, 100);
diff --git a/contrib/depends/patches/unwind/fix_obj_order.patch b/contrib/depends/patches/unwind/fix_obj_order.patch
deleted file mode 100644
index e764f0f..0000000
--- a/contrib/depends/patches/unwind/fix_obj_order.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- config/ltmain.sh.0 2020-11-10 17:25:26.000000000 +0100
-+++ config/ltmain.sh 2021-09-11 19:39:36.000000000 +0200
-@@ -10768,6 +10768,8 @@
- fi
- func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
- tool_oldlib=$func_to_tool_file_result
-+ oldobjs=`for obj in $oldobjs; do echo $obj; done | sort`
-+ oldobjs=" `echo $oldobjs`"
- eval cmds=\"$old_archive_cmds\"
-
- func_len " $cmds"
diff --git a/contrib/depends/patches/zeromq/fix_declaration.patch b/contrib/depends/patches/zeromq/fix_declaration.patch
deleted file mode 100644
index 23fa0a2..0000000
--- a/contrib/depends/patches/zeromq/fix_declaration.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/proxy.cpp 2024-11-19 19:46:31
-+++ b/src/proxy.cpp 2024-11-19 19:47:37
-@@ -499,7 +499,7 @@
- zmq_pollitem_t itemsout[] = {{frontend_, 0, ZMQ_POLLOUT, 0},
- {backend_, 0, ZMQ_POLLOUT, 0}};
-
-- stats_proxy stats = {0};
-+ stats_proxy stats = {{{0, 0}, {0, 0}}, {{0, 0}, {0, 0}}};
-
- // Proxy can be in these three states
- proxy_state_t state = active;
diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
deleted file mode 100644
index 30725f8..0000000
--- a/contrib/depends/toolchain.cmake.in
+++ /dev/null
@@ -1,208 +0,0 @@
-cmake_minimum_required(VERSION 3.13) # Ensure CMake version supports CMP0077
-cmake_policy(SET CMP0077 NEW) # Ensure 'option' honors normal variables
-
-# Set the system name to one of Android, Darwin, iOS, FreeBSD, Linux, or Windows
-SET(CMAKE_SYSTEM_NAME @depends@)
-SET(CMAKE_SYSTEM_PROCESSOR @arch@)
-SET(CMAKE_BUILD_TYPE @release_type@)
-
-OPTION(STATIC "Link libraries statically" ON)
-OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF)
-OPTION(BUILD_TESTS "Build tests." OFF)
-
-set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-
-SET(STATIC ON)
-SET(UNBOUND_STATIC ON)
-SET(ARCH "default")
-
-SET(BUILD_TESTS @build_tests@)
-SET(TREZOR_DEBUG @build_tests@)
-
-# where is the target environment
-SET(CMAKE_FIND_ROOT_PATH @prefix@ /usr)
-
-SET(ENV{PKG_CONFIG_PATH} @prefix@/lib/pkgconfig)
-
-SET(Readline_ROOT_DIR @prefix@)
-SET(Readline_INCLUDE_DIR @prefix@/include)
-SET(Readline_LIBRARY @prefix@/lib/libreadline.a)
-SET(Terminfo_LIBRARY @prefix@/lib/libtinfo.a)
-
-SET(UNBOUND_INCLUDE_DIR @prefix@/include)
-SET(UNBOUND_LIBRARIES @prefix@/lib/libunbound.a)
-
-if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
-SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
-SET(LIBUNWIND_LIBRARIES @prefix@/lib/libunwind.a)
-SET(LIBUNWIND_LIBRARY_DIRS @prefix@/lib)
-if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
-SET(LIBUSB-1.0_LIBRARY @prefix@/lib/libusb-1.0.a)
-SET(LIBUDEV_LIBRARY @prefix@/lib/libudev.a)
-
-SET(Protobuf_FOUND 1)
-SET(Protobuf_PROTOC_EXECUTABLE @prefix@/native/bin/protoc CACHE FILEPATH "Path to the native protoc")
-SET(Protobuf_INCLUDE_DIR @prefix@/include CACHE PATH "Protobuf include dir")
-SET(Protobuf_INCLUDE_DIRS @prefix@/include CACHE PATH "Protobuf include dir")
-SET(Protobuf_LIBRARY @prefix@/lib/libprotobuf.a CACHE FILEPATH "Protobuf library")
-endif()
-
-endif()
-
-SET(ZMQ_INCLUDE_PATH @prefix@/include)
-SET(ZMQ_LIB @prefix@/lib/libzmq.a)
-
-SET(Boost_IGNORE_SYSTEM_PATH ON)
-SET(BOOST_ROOT @prefix@)
-SET(BOOST_INCLUDEDIR @prefix@/include)
-SET(BOOST_LIBRARYDIR @prefix@/lib)
-SET(Boost_IGNORE_SYSTEM_PATHS_DEFAULT OFF)
-SET(Boost_NO_SYSTEM_PATHS ON)
-SET(Boost_USE_STATIC_LIBS ON)
-SET(Boost_USE_STATIC_RUNTIME ON)
-
-SET(OPENSSL_ROOT_DIR @prefix@)
-SET(ARCHITECTURE @arch@)
-
-# for libraries and headers in the target directories
-set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
-set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
-set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
-
-add_definitions(-DHIDAPI_DUMMY=ON)
-set(HIDAPI_DUMMY ON)
-
-# specify the cross compiler to be used. Darwin uses clang provided by the SDK.
-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- if(ARCHITECTURE STREQUAL "aarch64")
- SET(CLANG_TARGET "arm64-apple-darwin11")
- SET(CONF_TRIPLE "aarch64-apple-darwin11")
- SET(BUILD_TAG "mac-armv8")
- SET(CMAKE_OSX_ARCHITECTURES "arm64")
- set(ARM ON)
- set(ARM_ID "armv8-a")
- else()
- SET(CLANG_TARGET "x86_64-apple-darwin11")
- SET(CONF_TRIPLE "x86_64-apple-darwin11")
- SET(BUILD_TAG "mac-x64")
- SET(CMAKE_OSX_ARCHITECTURES "x86_64")
- endif()
- SET(_CMAKE_TOOLCHAIN_PREFIX @prefix@/native/bin/${CONF_TRIPLE}-)
- SET(CMAKE_C_COMPILER @CC@)
- SET(CMAKE_C_COMPILER_TARGET ${CLANG_TARGET})
- SET(CMAKE_C_FLAGS_INIT -B${_CMAKE_TOOLCHAIN_PREFIX})
- SET(CMAKE_CXX_COMPILER @CXX@)
- SET(CMAKE_CXX_COMPILER_TARGET ${CLANG_TARGET})
- SET(CMAKE_CXX_FLAGS_INIT -B${_CMAKE_TOOLCHAIN_PREFIX})
- SET(CMAKE_ASM_COMPILER_TARGET ${CLANG_TARGET})
- SET(CMAKE_ASM-ATT_COMPILER_TARGET ${CLANG_TARGET})
- SET(APPLE True)
- SET(BUILD_64 ON)
- SET(BREW OFF)
- SET(PORT OFF)
- SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
- SET(CMAKE_CXX_STANDARD 14)
- SET(LLVM_ENABLE_PIC OFF)
- SET(LLVM_ENABLE_PIE OFF)
-elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
- add_definitions(-DUSE_DEVICE_TREZOR=OFF)
- SET(ANDROID TRUE)
- if(ARCHITECTURE STREQUAL "armv7a")
- SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
- SET(CMAKE_SYSTEM_PROCESSOR "armv7-a")
- SET(CMAKE_ANDROID_ARM_MODE ON)
- SET(CMAKE_C_COMPILER_TARGET armv7a-linux-androideabi21)
- SET(CMAKE_CXX_COMPILER_TARGET armv7a-linux-androideabi21)
- SET(_CMAKE_TOOLCHAIN_PREFIX armv7a-linux-androideabi21-)
- elseif(ARCHITECTURE STREQUAL "aarch64")
- SET(CMAKE_ANDROID_ARCH_ABI "arm64-v8a")
- SET(CMAKE_SYSTEM_PROCESSOR "aarch64")
- elseif(ARCHITECTURE STREQUAL "x86_64")
- SET(MONERO_WALLET_CRYPTO_LIBRARY amd64-64-24k)
- SET(CMAKE_ANDROID_ARCH_ABI x86_64)
- SET(CMAKE_SYSTEM_PROCESSOR "x86_64")
- else()
- message(SEND_ERROR Unsupported android architecture)
- endif()
- # SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN @prefix@/native)
- SET(_ANDROID_STANDALONE_TOOLCHAIN_API 21)
- SET(__ANDROID_API__ 21)
- SET(CMAKE_SYSTEM_VERSION 1)
- SET(CMAKE_C_COMPILER @CC@)
- SET(CMAKE_CXX_COMPILER @CXX@)
-elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
- set(USE_DEVICE_TREZOR OFF)
- add_definitions(-DUSE_DEVICE_LEDGER=ON)
- SET(CMAKE_C_COMPILER @CC@)
- SET(CMAKE_CXX_COMPILER @CXX@)
-else()
- SET(CMAKE_C_COMPILER @CC@)
- SET(CMAKE_CXX_COMPILER @CXX@)
-endif()
-
-if(ARCHITECTURE STREQUAL "arm")
- set(ARCH "armv7-a")
- set(ARM ON)
- set(ARM_ID "armv7-a")
- set(BUILD_64 OFF)
- set(CMAKE_BUILD_TYPE release)
- if(ANDROID)
- set(BUILD_TAG "android-armv7")
- else()
- set(BUILD_TAG "linux-armv7")
- endif()
- set(ARM7)
-elseif(ARCHITECTURE STREQUAL "aarch64")
- set(ARCH "armv8-a")
- set(ARM ON)
- set(ARM_ID "armv8-a")
- if(ANDROID)
- set(BUILD_TAG "android-armv8")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- set(BUILD_TAG "linux-armv8")
- endif()
- set(BUILD_64 ON)
-endif()
-
-if(ARCHITECTURE STREQUAL "riscv64")
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- set(BUILD_TAG "linux-riscv64")
- endif()
- set(ARCH_ID "riscv64")
- set(ARCH "rv64gc")
-endif()
-
-if(ARCHITECTURE STREQUAL "i686")
- SET(ARCH_ID "i386")
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- set(BUILD_TAG "linux-x86")
- SET(LINUX_32 ON)
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- set(BUILD_TAG "win-x32")
- endif()
-endif()
-
-if(ARCHITECTURE STREQUAL "x86_64")
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- set(BUILD_TAG "linux-x64")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
- set(BUILD_TAG "freebsd-x64")
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- set(BUILD_TAG "win-x64")
- endif()
- SET(ARCH_ID "x86_64")
-endif()
-
-link_directories(@prefix@/lib)
-include_directories(@prefix@/include)
-include_directories(@prefix@/include/wownero_seed)
-
-add_definitions(-DPOLYSEED_STATIC=ON)
-add_definitions(-DMOBILE_WALLET_BUILD)
-
-if (ANDROID OR IOS)
- add_definitions(-DFORCE_USE_HEAP=1)
-endif()
-
-#Create a new global cmake flag that indicates building with depends
-set (DEPENDS true) \ No newline at end of file
diff --git a/example/cmake/.gitignore b/example/cmake/.gitignore
deleted file mode 100644
index 378eac2..0000000
--- a/example/cmake/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-build
diff --git a/example/cmake/CMakeLists.txt b/example/cmake/CMakeLists.txt
deleted file mode 100644
index bf5361c..0000000
--- a/example/cmake/CMakeLists.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-cmake_minimum_required(VERSION 3.1...3.29.2)
-
-include(CMakePrintHelpers)
-
-set(MONERO_C_COMMIT 36e61433c78750317ced29f0fc94ad22af16111d)
-set(MONERO_C_MIRROR https://git.mrcyjanek.net/mrcyjanek/monero_c)
-set(MONERO_C_WOWNERO OFF)
-set(MONERO_C_MONERO ON)
-
-
-cmake_print_variables(MONERO_C_COMMIT)
-cmake_print_variables(MONERO_C_MIRROR)
-cmake_print_variables(MONERO_C_MONERO)
-cmake_print_variables(MONERO_C_WOWNERO)
-
-project(
- monero_c
- VERSION 0.0.0)
-
-if(NOT EXISTS monero_c)
- execute_process(COMMAND git clone https://git.mrcyjanek.net/mrcyjanek/monero_c)
-endif()
-
-execute_process(WORKING_DIRECTORY monero_c COMMAND git checkout ${MONERO_C_COMMIT})
-execute_process(WORKING_DIRECTORY monero_c COMMAND git submodule update --recursive --force --init)
-
-execute_process(COMMAND rm monero_c/monero/.patch-applied)
-execute_process(COMMAND rm monero_c/wownero/.patch-applied)
-
-# apply patches
-
-if (MONERO_C_MONERO)
- execute_process(WORKING_DIRECTORY monero_c COMMAND ./apply_patches.sh monero)
-endif()
-
-if (MONERO_C_WOWNERO)
- execute_process(WORKING_DIRECTORY monero_c COMMAND ./apply_patches.sh wownero)
-endif()
-
-# actually.. build the software
-if (MONERO_C_MONERO)
- add_custom_command(
- COMMAND ./build_single.sh monero host-apple-darwin -j8
- OUTPUT monero_c/release/monero/host-apple-darwin_libwallet2_api_c.dylib.xz
- WORKING_DIRECTORY monero_c
- )
-
- add_custom_command(
- COMMAND unxz -f monero_c/release/monero/host-apple-darwin_libwallet2_api_c.dylib.xz
- OUTPUT monero_c/release/monero/host-apple-darwin_libwallet2_api_c.dylib
- DEPENDS monero_c/release/monero/host-apple-darwin_libwallet2_api_c.dylib.xz
- )
-
- add_custom_command(
- COMMAND mv monero_c/release/monero/host-apple-darwin_libwallet2_api_c.dylib monero_host-apple-darwin_libwallet2_api_c.dylib
- OUTPUT host-apple-darwin_monero_libwallet2_api_c.dylib
- DEPENDS monero_c/release/monero/host-apple-darwin_libwallet2_api_c.dylib
- )
-endif()
-
-add_custom_target(
- .host-apple-darwin_monero_libwallet2_api_c.dylib ALL
- DEPENDS host-apple-darwin_monero_libwallet2_api_c.dylib
-) \ No newline at end of file
diff --git a/impls/monero.dart/lib/src/checksum_monero.dart b/impls/monero.dart/lib/src/checksum_monero.dart
index d3ad5d4..27cbe36 100644
--- a/impls/monero.dart/lib/src/checksum_monero.dart
+++ b/impls/monero.dart/lib/src/checksum_monero.dart
@@ -1,4 +1,4 @@
// ignore_for_file: constant_identifier_names
const String wallet2_api_c_h_sha256 = "3515e4c9e537ca3efa664f0b364a3aeb106ff64337f542a262ce104c00b31235";
-const String wallet2_api_c_cpp_sha256 = "ca44a8d4a201ba6dc0a25c857e95d07bc8d514039b38cd5b3826100e8943cbcc-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe";
+const String wallet2_api_c_cpp_sha256 = "ca44a8d4a201ba6dc0a25c857e95d07bc8d514039b38cd5b3826100e8943cbcc-dbcc7d212c094bd1a45f7291dbb99a4b4627a96d";
const String wallet2_api_c_exp_sha256 = "0561e14606106e6b0ec49fb2aefe743ff500f7c3de07557f7041e06aef9509ce";
diff --git a/impls/monero.dart/lib/src/checksum_wownero.dart b/impls/monero.dart/lib/src/checksum_wownero.dart
index 258b2b8..a1d39ee 100644
--- a/impls/monero.dart/lib/src/checksum_wownero.dart
+++ b/impls/monero.dart/lib/src/checksum_wownero.dart
@@ -1,4 +1,4 @@
// ignore_for_file: constant_identifier_names
const String wallet2_api_c_h_sha256 = "f99009d1ca1d1c783cc9aa0fb63f680d48753b88124fb5de2079c57b7e34c827";
-const String wallet2_api_c_cpp_sha256 = "70b39a0bef660cb9ba0397117eb1590e18461ace89ab18141690658a2a537d5d-3e302be710f4e6b4f58642989c8e47711362fa56";
+const String wallet2_api_c_cpp_sha256 = "70b39a0bef660cb9ba0397117eb1590e18461ace89ab18141690658a2a537d5d-cfd2a696245be112a01936d1f2f41b6eb7558376";
const String wallet2_api_c_exp_sha256 = "5f53ea8bbe66a5e5aa6cbc4ca00695900e08589cfd32062e88965a24252d05ba";
diff --git a/impls/monero.dart/lib/src/checksum_zano.dart b/impls/monero.dart/lib/src/checksum_zano.dart
index cbb9b17..cff01f2 100644
--- a/impls/monero.dart/lib/src/checksum_zano.dart
+++ b/impls/monero.dart/lib/src/checksum_zano.dart
@@ -1,4 +1,4 @@
// ignore_for_file: constant_identifier_names
const String wallet2_api_c_h_sha256 = "8acaa95513b85a984c08e05cc3f2ac7530bb8f32946eeeb45357bd846aef33dd";
-const String wallet2_api_c_cpp_sha256 = "4efacd3812d53dd268b6869cc0a9560e7320574d96e09136cf067f796edfeba6-83eefd205e3df84da0bf095257459fe778330316";
+const String wallet2_api_c_cpp_sha256 = "4efacd3812d53dd268b6869cc0a9560e7320574d96e09136cf067f796edfeba6-b372a99c7ada82caac53b677d9aaa7c0902e3b0b";
const String wallet2_api_c_exp_sha256 = "66f3ff655bbfd11ad28c318ab707090b5a93276f436b06f7b1c0f329dba3c9c2";
diff --git a/impls/monero.ts/checksum_monero.ts b/impls/monero.ts/checksum_monero.ts
index f6aa74b..81eba33 100644
--- a/impls/monero.ts/checksum_monero.ts
+++ b/impls/monero.ts/checksum_monero.ts
@@ -1,5 +1,5 @@
export const moneroChecksum = {
wallet2_api_c_h_sha256: "3515e4c9e537ca3efa664f0b364a3aeb106ff64337f542a262ce104c00b31235",
- wallet2_api_c_cpp_sha256: "ca44a8d4a201ba6dc0a25c857e95d07bc8d514039b38cd5b3826100e8943cbcc-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe",
+ wallet2_api_c_cpp_sha256: "ca44a8d4a201ba6dc0a25c857e95d07bc8d514039b38cd5b3826100e8943cbcc-dbcc7d212c094bd1a45f7291dbb99a4b4627a96d",
wallet2_api_c_exp_sha256: "0561e14606106e6b0ec49fb2aefe743ff500f7c3de07557f7041e06aef9509ce",
}
diff --git a/impls/monero.ts/checksum_wownero.ts b/impls/monero.ts/checksum_wownero.ts
index a7dc752..c7b7e75 100644
--- a/impls/monero.ts/checksum_wownero.ts
+++ b/impls/monero.ts/checksum_wownero.ts
@@ -1,5 +1,5 @@
export const wowneroChecksum = {
wallet2_api_c_h_sha256: "f99009d1ca1d1c783cc9aa0fb63f680d48753b88124fb5de2079c57b7e34c827",
- wallet2_api_c_cpp_sha256: "70b39a0bef660cb9ba0397117eb1590e18461ace89ab18141690658a2a537d5d-3e302be710f4e6b4f58642989c8e47711362fa56",
+ wallet2_api_c_cpp_sha256: "70b39a0bef660cb9ba0397117eb1590e18461ace89ab18141690658a2a537d5d-cfd2a696245be112a01936d1f2f41b6eb7558376",
wallet2_api_c_exp_sha256: "5f53ea8bbe66a5e5aa6cbc4ca00695900e08589cfd32062e88965a24252d05ba",
}
diff --git a/impls/monero.ts/checksum_zano.ts b/impls/monero.ts/checksum_zano.ts
index 227a109..6080ed1 100644
--- a/impls/monero.ts/checksum_zano.ts
+++ b/impls/monero.ts/checksum_zano.ts
@@ -1,5 +1,5 @@
export const zanoChecksum = {
wallet2_api_c_h_sha256: "8acaa95513b85a984c08e05cc3f2ac7530bb8f32946eeeb45357bd846aef33dd",
- wallet2_api_c_cpp_sha256: "4efacd3812d53dd268b6869cc0a9560e7320574d96e09136cf067f796edfeba6-83eefd205e3df84da0bf095257459fe778330316",
+ wallet2_api_c_cpp_sha256: "4efacd3812d53dd268b6869cc0a9560e7320574d96e09136cf067f796edfeba6-b372a99c7ada82caac53b677d9aaa7c0902e3b0b",
wallet2_api_c_exp_sha256: "66f3ff655bbfd11ad28c318ab707090b5a93276f436b06f7b1c0f329dba3c9c2",
}
diff --git a/monero b/monero
-Subproject 0232839913b13cf0ab0bb7ad25fff0c05f37d2f
+Subproject dbcc7d212c094bd1a45f7291dbb99a4b4627a96
diff --git a/monero_libwallet2_api_c/CMakeLists.txt b/monero_libwallet2_api_c/CMakeLists.txt
index ed46aba..f11c2bc 100644
--- a/monero_libwallet2_api_c/CMakeLists.txt
+++ b/monero_libwallet2_api_c/CMakeLists.txt
@@ -24,13 +24,13 @@ elseif(${HOST_ABI} STREQUAL "i686-w64-mingw32")
elseif(${HOST_ABI} STREQUAL "host-apple-ios" OR
${HOST_ABI} STREQUAL "aarch64-apple-ios")
set(CMAKE_SYSTEM_NAME iOS)
-elseif(${HOST_ABI} STREQUAL "host-apple-darwin" OR
+elseif(${HOST_ABI} STREQUAL "host-apple-darwin" OR
${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR
${HOST_ABI} STREQUAL "aarch64-host-apple-darwin")
set(CMAKE_SYSTEM_NAME Darwin)
endif()
-if (${HOST_ABI} STREQUAL "host-apple-darwin" OR
+if (${HOST_ABI} STREQUAL "host-apple-darwin" OR
${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR
${HOST_ABI} STREQUAL "aarch64-host-apple-darwin")
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
@@ -82,7 +82,7 @@ elseif(${HOST_ABI} STREQUAL "host-apple-darwin" OR
${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR
${HOST_ABI} STREQUAL "aarch64-host-apple-darwin")
set(EXTRA_LIBS_APPLE "-framework IOKit" "-framework CoreFoundation" "-framework Cocoa" apple_nghttp2)
-elseif(${HOST_ABI} STREQUAL "host-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-ios" OR ${HOST_ABI} STREQUAL "arm64-apple-ios" OR ${HOST_ABI} STREQUAL "arm64-apple-iossimulator" OR ${HOST_ABI} STREQUAL "x86_64-apple-iossimulator")
+elseif(${HOST_ABI} STREQUAL "host-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-ios" OR ${HOST_ABI} STREQUAL "arm64-apple-ios" OR ${HOST_ABI} STREQUAL "arm64-apple-ios-simulator" OR ${HOST_ABI} STREQUAL "x86_64-apple-ios-simulator")
set(EXTRA_LIBS_APPLE "-framework IOKit" "-framework CoreFoundation" iconv )
endif()
@@ -92,7 +92,7 @@ endif()
if(${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" OR ${HOST_ABI} STREQUAL "host-apple-darwin" OR ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-ios" OR ${HOST_ABI} STREQUAL "arm64-apple-iossimulator" OR ${HOST_ABI} STREQUAL "x86_64-apple-iossimulator")
set_target_properties(wallet2_api_c PROPERTIES SUFFIX ".dylib")
-
+
set_target_properties(wallet2_api_c PROPERTIES NO_SONAME 1)
endif()
@@ -105,7 +105,7 @@ elseif(${MONERO_FLAVOR} STREQUAL "zano")
target_compile_definitions(wallet2_api_c PRIVATE FLAVOR_ZANO)
endif()
-if(NOT ${HOST_ABI} STREQUAL "x86_64-apple-darwin11" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "x86_64-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "host-apple-ios" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-ios" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-iossimulator" AND NOT ${HOST_ABI} STREQUAL "x86_64-apple-iossimulator")
+if(NOT ${HOST_ABI} STREQUAL "x86_64-apple-darwin11" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "x86_64-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "host-apple-ios" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-ios" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-ios-simulator" AND NOT ${HOST_ABI} STREQUAL "x86_64-apple-ios-simulator")
set_target_properties(wallet2_api_c PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL")
endif()
@@ -116,7 +116,7 @@ if (${MONERO_FLAVOR} STREQUAL "zano")
endif()
add_subdirectory("${CMAKE_SOURCE_DIR}/../${MONERO_FLAVOR}" ${CMAKE_BINARY_DIR}/${MONERO_FLAVOR}_build EXCLUDE_FROM_ALL)
-if(${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" OR ${HOST_ABI} STREQUAL "x86_64-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-darwin" OR ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-iossimulator" OR ${HOST_ABI} STREQUAL "x86_64-apple-iossimulator")
+if(${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" OR ${HOST_ABI} STREQUAL "x86_64-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-darwin" OR ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-iossimulator" OR ${HOST_ABI} STREQUAL "x86_64-apple-ios-simulator")
if (${MONERO_FLAVOR} STREQUAL "monero")
set(EXPORTED_SYMBOLS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/monero_libwallet2_api_c.exp)
elseif(${MONERO_FLAVOR} STREQUAL "wownero")
@@ -134,15 +134,21 @@ if (${MONERO_FLAVOR} STREQUAL "monero")
elseif(${MONERO_FLAVOR} STREQUAL "wownero")
set(WALLET_TARGETS wallet_api ${wallet_api_LIB_DEPENDS}) # wallet_api_LIB_DEPENDS
elseif(${MONERO_FLAVOR} STREQUAL "zano")
- find_package(Boost 1.71 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options)
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+
+ set(CMAKE_THREAD_LIBS_INIT "-lpthread")
+ set(CMAKE_HAVE_THREADS_LIBRARY 1)
+ set(CMAKE_USE_PTHREADS_INIT 1)
+ set(Threads_FOUND TRUE)
+ find_package(Boost 1.71 REQUIRED COMPONENTS filesystem thread timer date_time chrono regex serialization atomic program_options)
find_package(OpenSSL REQUIRED)
- set(WALLET_TARGETS
+ set(WALLET_TARGETS
wallet
general
tor-connect
crypto
currency_core
- common
+ common
zlibstatic
${Boost_LIBRARIES}
@@ -172,9 +178,25 @@ elseif(${HOST_ABI} MATCHES "-linux-")
target_link_options(wallet2_api_c PRIVATE "-Wl,-z,max-page-size=16384")
endif()
+if(${HOST_ABI} MATCHES "-apple-")
+ set(DUMMY_RT_SRC "${CMAKE_CURRENT_BINARY_DIR}/dummy_rt.c")
+ file(WRITE "${DUMMY_RT_SRC}" "/* I have no idea what is adding -lrt in the middle of nowhere. And frankly I don't care at this point */\n")
+
+ add_library(dummy_rt STATIC "${DUMMY_RT_SRC}")
+
+ target_sources(dummy_rt PRIVATE "${DUMMY_RT_SRC}")
+ target_compile_definitions(dummy_rt PRIVATE DUMMY_RT_SYMBOL)
+
+ set_target_properties(dummy_rt PROPERTIES
+ OUTPUT_NAME "rt"
+ ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ )
+endif()
+
target_link_libraries( wallet2_api_c
${WALLET_TARGETS}
${EXTRA_LIBS_WOWNEROSEED}
${EXTRA_LIBS_ANDROID}
+ ${EXTRA_LIBS_LINUX}
)
diff --git a/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h b/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h
index eba4251..55acabb 100644
--- a/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h
+++ b/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h
@@ -1,6 +1,6 @@
#ifndef MONEROC_CHECKSUMS
#define MONEROC_CHECKSUMS
const char * MONERO_wallet2_api_c_h_sha256 = "3515e4c9e537ca3efa664f0b364a3aeb106ff64337f542a262ce104c00b31235";
-const char * MONERO_wallet2_api_c_cpp_sha256 = "ca44a8d4a201ba6dc0a25c857e95d07bc8d514039b38cd5b3826100e8943cbcc-0232839913b13cf0ab0bb7ad25fff0c05f37d2fe";
+const char * MONERO_wallet2_api_c_cpp_sha256 = "ca44a8d4a201ba6dc0a25c857e95d07bc8d514039b38cd5b3826100e8943cbcc-dbcc7d212c094bd1a45f7291dbb99a4b4627a96d";
const char * MONERO_wallet2_api_c_exp_sha256 = "0561e14606106e6b0ec49fb2aefe743ff500f7c3de07557f7041e06aef9509ce";
#endif
diff --git a/patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch
index 4dc4e8f..888a502 100644
--- a/patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch
+++ b/patches/monero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch
@@ -1,7 +1,7 @@
-From 36259ba9f88bc135b243329400bec9290abb04c6 Mon Sep 17 00:00:00 2001
+From 41d9f755a1392dd116241acb32b887091669f090 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Tue, 2 Apr 2024 16:51:56 +0200
-Subject: [PATCH 01/17] fix missing ___clear_cache when targetting iOS
+Subject: [PATCH 01/20] fix missing ___clear_cache when targetting iOS
---
.gitmodules | 3 ++-
@@ -23,12 +23,12 @@ index 721cce3b4..ffb73fe9a 100644
path = external/supercop
url = https://github.com/monero-project/supercop
diff --git a/external/randomx b/external/randomx
-index 102f8acf9..ce72c9bb9 160000
+index 102f8acf9..5dfeeb30e 160000
--- a/external/randomx
+++ b/external/randomx
@@ -1 +1 @@
-Subproject commit 102f8acf90a7649ada410de5499a7ec62e49e1da
-+Subproject commit ce72c9bb9cb799e0d9171094b9abb009e04c5bfc
++Subproject commit 5dfeeb30ec3446ec9d348153767abc324436c56c
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0002-store-crash-fix.patch b/patches/monero/0002-store-crash-fix.patch
index a09dcf1..8ecd8b1 100644
--- a/patches/monero/0002-store-crash-fix.patch
+++ b/patches/monero/0002-store-crash-fix.patch
@@ -1,7 +1,7 @@
-From 459ac9f7a64cc527528a41dc45ed4cefe83091cb Mon Sep 17 00:00:00 2001
+From 94cf21261079d6d4ceb848be3863613e98c3bc89 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Sat, 11 May 2024 16:25:10 +0200
-Subject: [PATCH 02/17] store crash fix
+Subject: [PATCH 02/20] store crash fix
Monero wallet crashes (sometimes) when it is syncing,
while the proper solution (that can be seen in feather)
@@ -36,14 +36,15 @@ would just wait for it to finish before actually storing).
Also imo store() functin should store the wallet, no matter
the current state.
---
- src/wallet/api/wallet.cpp | 25 ++++++++++++-------------
+ external/randomx | 2 +-
+ src/wallet/api/wallet.cpp | 53 +++++++++++++++++++--------------------
src/wallet/api/wallet.h | 1 -
- src/wallet/wallet2.cpp | 11 ++++++++++-
+ src/wallet/wallet2.cpp | 11 +++++++-
src/wallet/wallet2.h | 3 +++
- 4 files changed, 25 insertions(+), 15 deletions(-)
+ 5 files changed, 40 insertions(+), 30 deletions(-)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 8fda0bab7..67b170e3d 100644
+index 165b21c9f..c2f4176e2 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -55,8 +55,8 @@ using namespace cryptonote;
@@ -57,6 +58,33 @@ index 8fda0bab7..67b170e3d 100644
m_wallet->stop(); \
m_refreshCV.notify_one(); \
boost::mutex::scoped_lock lock(m_refreshMutex); \
+@@ -178,7 +178,7 @@ struct Wallet2CallbackImpl : public tools::i_wallet2_callback
+ virtual void on_new_block(uint64_t height, const cryptonote::block& block)
+ {
+ // Don't flood the GUI with signals. On fast refresh - send signal every 1000th block
+- // get_refresh_from_block_height() returns the blockheight from when the wallet was
++ // get_refresh_from_block_height() returns the blockheight from when the wallet was
+ // created or the restore height specified when wallet was recovered
+ if(height >= m_wallet->m_wallet->get_refresh_from_block_height() || height % 1000 == 0) {
+ // LOG_PRINT_L3(__FUNCTION__ << ": new block. height: " << height);
+@@ -379,7 +379,7 @@ bool Wallet::keyValid(const std::string &secret_key_string, const std::string &a
+ error = tr("Failed to parse address");
+ return false;
+ }
+-
++
+ cryptonote::blobdata key_data;
+ if(!epee::string_tools::parse_hexstr_to_binbuff(secret_key_string, key_data) || key_data.size() != sizeof(crypto::secret_key))
+ {
+@@ -404,7 +404,7 @@ bool Wallet::keyValid(const std::string &secret_key_string, const std::string &a
+ error = tr("key does not match address");
+ return false;
+ }
+-
++
+ return true;
+ }
+
@@ -466,7 +466,7 @@ WalletImpl::WalletImpl(NetworkType nettype, uint64_t kdf_rounds)
m_wallet2Callback.reset(new Wallet2CallbackImpl(this));
m_wallet->callback(m_wallet2Callback.get());
@@ -66,6 +94,24 @@ index 8fda0bab7..67b170e3d 100644
m_addressBook.reset(new AddressBookImpl(this));
m_subaddress.reset(new SubaddressImpl(this));
m_subaddressAccount.reset(new SubaddressAccountImpl(this));
+@@ -487,7 +487,7 @@ WalletImpl::~WalletImpl()
+ m_wallet->callback(NULL);
+ // Pause refresh thread - prevents refresh from starting again
+ WalletImpl::pauseRefresh(); // Call the method directly (not polymorphically) to protect against UB in destructor.
+- // Close wallet - stores cache and stops ongoing refresh operation
++ // Close wallet - stores cache and stops ongoing refresh operation
+ close(false); // do not store wallet as part of the closing activities
+ // Stop refresh thread
+ stopRefresh();
+@@ -698,7 +698,7 @@ bool WalletImpl::recoverFromKeysWithPassword(const std::string &path,
+ setSeedLanguage(language);
+ LOG_PRINT_L1("Generated deterministic wallet from spend key with seed language: " + language);
+ }
+-
++
+ }
+ catch (const std::exception& e) {
+ setStatusError(string(tr("failed to generate new wallet: ")) + e.what());
@@ -962,6 +962,7 @@ void WalletImpl::stop()
bool WalletImpl::store(const std::string &path)
{
@@ -74,6 +120,76 @@ index 8fda0bab7..67b170e3d 100644
try {
if (path.empty()) {
m_wallet->store();
+@@ -1110,14 +1111,14 @@ uint64_t WalletImpl::daemonBlockChainTargetHeight() const
+ } else {
+ clearStatus();
+ }
+- // Target height can be 0 when daemon is synced. Use blockchain height instead.
++ // Target height can be 0 when daemon is synced. Use blockchain height instead.
+ if(result == 0)
+ result = daemonBlockChainHeight();
+ return result;
+ }
+
+ bool WalletImpl::daemonSynced() const
+-{
++{
+ if(connected() == Wallet::ConnectionStatus_Disconnected)
+ return false;
+ uint64_t blockChainHeight = daemonBlockChainHeight();
+@@ -1189,14 +1190,14 @@ UnsignedTransaction *WalletImpl::loadUnsignedTx(const std::string &unsigned_file
+
+ return transaction;
+ }
+-
++
+ // Check tx data and construct confirmation message
+ std::string extra_message;
+ if (!std::get<2>(transaction->m_unsigned_tx_set.transfers).empty())
+ extra_message = (boost::format("%u outputs to import. ") % (unsigned)std::get<2>(transaction->m_unsigned_tx_set.transfers).size()).str();
+ transaction->checkLoadedTx([&transaction](){return transaction->m_unsigned_tx_set.txes.size();}, [&transaction](size_t n)->const tools::wallet2::tx_construction_data&{return transaction->m_unsigned_tx_set.txes[n];}, extra_message);
+ setStatus(transaction->status(), transaction->errorString());
+-
++
+ return transaction;
+ }
+
+@@ -1211,7 +1212,7 @@ bool WalletImpl::submitTransaction(const string &fileName) {
+ setStatus(Status_Ok, tr("Failed to load transaction from file"));
+ return false;
+ }
+-
++
+ if(!transaction->commit()) {
+ setStatusError(transaction->m_errorString);
+ return false;
+@@ -1220,7 +1221,7 @@ bool WalletImpl::submitTransaction(const string &fileName) {
+ return true;
+ }
+
+-bool WalletImpl::exportKeyImages(const string &filename, bool all)
++bool WalletImpl::exportKeyImages(const string &filename, bool all)
+ {
+ if (m_wallet->watch_only())
+ {
+@@ -1229,7 +1230,7 @@ bool WalletImpl::exportKeyImages(const string &filename, bool all)
+ }
+ if (checkBackgroundSync("cannot export key images"))
+ return false;
+-
++
+ try
+ {
+ if (!m_wallet->export_key_images(filename, all))
+@@ -1664,7 +1665,7 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector<stri
+ clearStatus();
+ // Pause refresh thread while creating transaction
+ pauseRefresh();
+-
++
+ cryptonote::address_parse_info info;
+
+ uint32_t adjusted_priority = m_wallet->adjust_priority(static_cast<uint32_t>(priority));
@@ -2448,10 +2449,10 @@ void WalletImpl::refreshThreadFunc()
}
@@ -87,13 +203,7 @@ index 8fda0bab7..67b170e3d 100644
LOG_PRINT_L3(__FUNCTION__ << ": refreshing...");
doRefresh();
}
-@@ -2481,12 +2482,12 @@ void WalletImpl::doRefresh()
- }
- m_wallet->find_and_save_rings(false);
- } else {
-- LOG_PRINT_L3(__FUNCTION__ << ": skipping refresh - daemon is not synced");
-+ LOG_PRINT_L3(__FUNCTION__ << ": skipping refresh - daemon is not synced");
- }
+@@ -2485,7 +2486,7 @@ void WalletImpl::doRefresh()
} catch (const std::exception &e) {
setStatusError(e.what());
break;
@@ -102,7 +212,7 @@ index 8fda0bab7..67b170e3d 100644
if (m_wallet2Callback->getListener()) {
m_wallet2Callback->getListener()->refreshed();
-@@ -2496,9 +2497,9 @@ void WalletImpl::doRefresh()
+@@ -2495,9 +2496,9 @@ void WalletImpl::doRefresh()
void WalletImpl::startRefresh()
{
@@ -114,7 +224,7 @@ index 8fda0bab7..67b170e3d 100644
m_refreshCV.notify_one();
}
}
-@@ -2508,7 +2509,7 @@ void WalletImpl::startRefresh()
+@@ -2507,7 +2508,7 @@ void WalletImpl::startRefresh()
void WalletImpl::stopRefresh()
{
if (!m_refreshThreadDone) {
@@ -123,7 +233,7 @@ index 8fda0bab7..67b170e3d 100644
m_refreshThreadDone = true;
m_refreshCV.notify_one();
m_refreshThread.join();
-@@ -2519,9 +2520,7 @@ void WalletImpl::pauseRefresh()
+@@ -2518,9 +2519,7 @@ void WalletImpl::pauseRefresh()
{
LOG_PRINT_L2(__FUNCTION__ << ": refresh paused...");
// TODO synchronize access
@@ -134,6 +244,24 @@ index 8fda0bab7..67b170e3d 100644
}
+@@ -2530,7 +2529,7 @@ bool WalletImpl::isNewWallet() const
+ // it's the same case as if it created from scratch, i.e. we need "fast sync"
+ // with the daemon (pull hashes instead of pull blocks).
+ // If wallet cache is rebuilt, creation height stored in .keys is used.
+- // Watch only wallet is a copy of an existing wallet.
++ // Watch only wallet is a copy of an existing wallet.
+ return !(blockChainHeight() > 1 || m_recoveringFromSeed || m_recoveringFromDevice || m_rebuildWalletCache) && !watchOnly();
+ }
+
+@@ -2642,7 +2641,7 @@ void WalletImpl::hardForkInfo(uint8_t &version, uint64_t &earliest_height) const
+ m_wallet->get_hard_fork_info(version, earliest_height);
+ }
+
+-bool WalletImpl::useForkRules(uint8_t version, int64_t early_blocks) const
++bool WalletImpl::useForkRules(uint8_t version, int64_t early_blocks) const
+ {
+ return m_wallet->use_fork_rules(version,early_blocks);
+ }
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
index 1f199a72c..ac7ce2f6a 100644
--- a/src/wallet/api/wallet.h
@@ -147,10 +275,10 @@ index 1f199a72c..ac7ce2f6a 100644
std::atomic<int> m_refreshIntervalMillis;
std::atomic<bool> m_refreshShouldRescan;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index dfb8b23cb..c9c2dbc82 100644
+index af1f03d2c..af876c9f3 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -1192,6 +1192,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
+@@ -1195,6 +1195,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
m_upper_transaction_weight_limit(0),
m_run(true),
m_callback(0),
@@ -158,7 +286,7 @@ index dfb8b23cb..c9c2dbc82 100644
m_trusted_daemon(false),
m_nettype(nettype),
m_multisig_rounds_passed(0),
-@@ -1412,6 +1413,14 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u
+@@ -1415,6 +1416,14 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u
return ret;
}
//----------------------------------------------------------------------------------------------------
@@ -173,7 +301,7 @@ index dfb8b23cb..c9c2dbc82 100644
bool wallet2::set_proxy(const std::string &address)
{
return m_http_client->set_proxy(address);
-@@ -4107,7 +4116,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
+@@ -4178,7 +4187,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
// infer when we get an incoming output
bool first = true, last = false;
@@ -183,7 +311,7 @@ index dfb8b23cb..c9c2dbc82 100644
uint64_t next_blocks_start_height;
std::vector<cryptonote::block_complete_entry> next_blocks;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 2f4ad52f1..daad1e940 100644
+index a765dc475..92f735f96 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1078,6 +1078,8 @@ private:
@@ -195,7 +323,7 @@ index 2f4ad52f1..daad1e940 100644
void stop() { m_run.store(false, std::memory_order_relaxed); m_message_store.stop(); }
-@@ -1989,6 +1991,7 @@ private:
+@@ -1997,6 +1999,7 @@ private:
boost::recursive_mutex m_daemon_rpc_mutex;
@@ -204,5 +332,5 @@ index 2f4ad52f1..daad1e940 100644
i_wallet2_callback* m_callback;
hw::device::device_type m_key_device_type;
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0003-uint64_t-missing-definition-fix.patch b/patches/monero/0003-uint64_t-missing-definition-fix.patch
index 70ce8bf..87aef72 100644
--- a/patches/monero/0003-uint64_t-missing-definition-fix.patch
+++ b/patches/monero/0003-uint64_t-missing-definition-fix.patch
@@ -1,14 +1,14 @@
-From c51ee39835aaac64da39b1c10bc068182f6e28cb Mon Sep 17 00:00:00 2001
+From 3cdb4ef9bdf88936276b4c5286eb7f9d39f556d0 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 2 Sep 2024 16:40:31 +0200
-Subject: [PATCH 03/17] uint64_t missing definition fix
+Subject: [PATCH 03/20] uint64_t missing definition fix
---
contrib/epee/include/net/http_base.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/epee/include/net/http_base.h b/contrib/epee/include/net/http_base.h
-index 4af4da790..ae4c0d05e 100644
+index f32fdd9ae..a95a7d34f 100644
--- a/contrib/epee/include/net/http_base.h
+++ b/contrib/epee/include/net/http_base.h
@@ -28,7 +28,7 @@
@@ -21,5 +21,5 @@ index 4af4da790..ae4c0d05e 100644
#include <string>
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0004-use-proper-error-handling-in-get_seed.patch b/patches/monero/0004-use-proper-error-handling-in-get_seed.patch
index aa30e4f..154fa90 100644
--- a/patches/monero/0004-use-proper-error-handling-in-get_seed.patch
+++ b/patches/monero/0004-use-proper-error-handling-in-get_seed.patch
@@ -1,7 +1,7 @@
-From 0c1524dd9a4f6b4450b277623ffa620f69931102 Mon Sep 17 00:00:00 2001
+From 9174c5ab87a00d16e2930616686de5e57f3e7539 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 24 Jun 2024 10:49:12 +0200
-Subject: [PATCH 04/17] use proper error handling in get_seed
+Subject: [PATCH 04/20] use proper error handling in get_seed
---
src/wallet/api/wallet.cpp | 17 ++++++++++++-----
@@ -9,7 +9,7 @@ Subject: [PATCH 04/17] use proper error handling in get_seed
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 67b170e3d..89df5c517 100644
+index c2f4176e2..6301bd1ef 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -826,12 +826,19 @@ bool WalletImpl::close(bool store)
@@ -38,10 +38,10 @@ index 67b170e3d..89df5c517 100644
std::string WalletImpl::getSeedLanguage() const
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index c9c2dbc82..b827b826f 100644
+index af876c9f3..ac2a1fec3 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -1449,11 +1449,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
+@@ -1452,11 +1452,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
bool keys_deterministic = is_deterministic();
if (!keys_deterministic)
{
@@ -55,7 +55,7 @@ index c9c2dbc82..b827b826f 100644
std::cout << "seed_language not set" << std::endl;
return false;
}
-@@ -1463,8 +1465,9 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
+@@ -1466,8 +1468,9 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
key = cryptonote::encrypt_key(key, passphrase);
if (!crypto::ElectrumWords::bytes_to_words(key, electrum_words, seed_language))
{
@@ -67,5 +67,5 @@ index c9c2dbc82..b827b826f 100644
return true;
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0005-UR-functions.patch b/patches/monero/0005-UR-functions.patch
index 0ba79b7..116d050 100644
--- a/patches/monero/0005-UR-functions.patch
+++ b/patches/monero/0005-UR-functions.patch
@@ -1,7 +1,7 @@
-From 467ee9154b5c1b903559bf1dbe848cbabc62ba7d Mon Sep 17 00:00:00 2001
+From ccd02185be7d4a928776ff38111eb3ce9face61f Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 10:09:50 +0100
-Subject: [PATCH 05/17] UR functions
+Subject: [PATCH 05/20] UR functions
This commit adds UR functions for UR tasks,
I believe that the right place to get
@@ -29,12 +29,12 @@ Things broken in the commit
src/wallet/api/pending_transaction.h | 1 +
src/wallet/api/unsigned_transaction.cpp | 42 ++++
src/wallet/api/unsigned_transaction.h | 1 +
- src/wallet/api/wallet.cpp | 309 +++++++++++++++++++++++-
+ src/wallet/api/wallet.cpp | 307 ++++++++++++++++++++++++
src/wallet/api/wallet.h | 8 +
src/wallet/api/wallet2_api.h | 22 +-
src/wallet/wallet2.cpp | 141 +++++++----
src/wallet/wallet2.h | 3 +
- 15 files changed, 519 insertions(+), 57 deletions(-)
+ 15 files changed, 518 insertions(+), 56 deletions(-)
create mode 160000 external/bc-ur
diff --git a/.gitmodules b/.gitmodules
@@ -50,7 +50,7 @@ index ffb73fe9a..72af74d55 100644
+ url = https://github.com/MrCyjaneK/bc-ur
+ branch = misc
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index db69b1b04..c73b813d8 100644
+index 9b922046e..268339201 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,7 +96,8 @@ enable_language(C ASM)
@@ -89,7 +89,7 @@ index 000000000..d82e7c753
@@ -0,0 +1 @@
+Subproject commit d82e7c753e710b8000706dc3383b498438795208
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index 5d0afe1ee..bb5b6f497 100644
+index 6dde4a564..7e4be6347 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -313,12 +313,13 @@ namespace hw {
@@ -256,7 +256,7 @@ index 30065a7fa..a94b23f75 100644
uint64_t minMixinCount() const override;
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 89df5c517..3fcd6f332 100644
+index 6301bd1ef..d179e502b 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -47,6 +47,7 @@
@@ -354,15 +354,6 @@ index 89df5c517..3fcd6f332 100644
bool WalletImpl::submitTransaction(const string &fileName) {
clearStatus();
if (checkBackgroundSync("cannot submit tx"))
-@@ -1219,7 +1293,7 @@ bool WalletImpl::submitTransaction(const string &fileName) {
- setStatus(Status_Ok, tr("Failed to load transaction from file"));
- return false;
- }
--
-+
- if(!transaction->commit()) {
- setStatusError(transaction->m_errorString);
- return false;
@@ -1228,6 +1302,61 @@ bool WalletImpl::submitTransaction(const string &fileName) {
return true;
}
@@ -422,7 +413,7 @@ index 89df5c517..3fcd6f332 100644
+ return m_wallet->has_unknown_key_images();
+}
+
- bool WalletImpl::exportKeyImages(const string &filename, bool all)
+ bool WalletImpl::exportKeyImages(const string &filename, bool all)
{
if (m_wallet->watch_only())
@@ -1255,6 +1384,39 @@ bool WalletImpl::exportKeyImages(const string &filename, bool all)
@@ -754,10 +745,10 @@ index e349df176..764adbfbf 100644
/*!
* \brief scanTransactions - scan a list of transaction ids, this operation may reveal the txids to the remote node and affect your privacy
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index b827b826f..765cefb32 100644
+index ac2a1fec3..a8db99c3f 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -948,6 +948,16 @@ uint32_t get_subaddress_clamped_sum(uint32_t idx, uint32_t extra)
+@@ -953,6 +953,16 @@ uint32_t get_subaddress_clamped_sum(uint32_t idx, uint32_t extra)
return idx + extra;
}
@@ -774,7 +765,7 @@ index b827b826f..765cefb32 100644
static void setup_shim(hw::wallet_shim * shim, tools::wallet2 * wallet)
{
shim->get_tx_pub_key_from_received_outs = std::bind(&tools::wallet2::get_tx_pub_key_from_received_outs, wallet, std::placeholders::_1);
-@@ -6997,6 +7007,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
+@@ -7065,6 +7075,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
return amount;
}
//----------------------------------------------------------------------------------------------------
@@ -800,7 +791,7 @@ index b827b826f..765cefb32 100644
std::map<uint32_t, uint64_t> wallet2::balance_per_subaddress(uint32_t index_major, bool strict) const
{
std::map<uint32_t, uint64_t> amount_per_subaddr;
-@@ -7848,9 +7877,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
+@@ -7916,9 +7945,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
crypto::key_derivation derivation;
std::vector<crypto::key_derivation> additional_derivations;
@@ -811,7 +802,7 @@ index b827b826f..765cefb32 100644
std::vector<crypto::public_key> additional_tx_pub_keys;
for (const crypto::secret_key &skey: txs[n].additional_tx_keys)
{
-@@ -11246,7 +11273,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11261,7 +11288,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below fractional threshold " << print_money(fractional_threshold));
continue;
}
@@ -820,7 +811,7 @@ index b827b826f..765cefb32 100644
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
{
-@@ -11296,9 +11323,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11311,9 +11338,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
LOG_PRINT_L2("Starting with " << num_nondust_outputs << " non-dust outputs and " << num_dust_outputs << " dust outputs");
@@ -838,7 +829,7 @@ index b827b826f..765cefb32 100644
// if empty, put dummy entry so that the front can be referenced later in the loop
if (unused_dust_indices_per_subaddr.empty())
unused_dust_indices_per_subaddr.push_back({});
-@@ -13934,33 +13967,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle
+@@ -13949,33 +13982,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle
bool wallet2::export_key_images(const std::string &filename, bool all) const
{
@@ -902,7 +893,7 @@ index b827b826f..765cefb32 100644
//----------------------------------------------------------------------------------------------------
std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>> wallet2::export_key_images(bool all) const
{
-@@ -14015,53 +14055,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
+@@ -14030,53 +14070,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
return std::make_pair(offset, ski);
}
@@ -982,10 +973,10 @@ index b827b826f..765cefb32 100644
ski.push_back(std::make_pair(key_image, signature));
}
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index daad1e940..a752f15b9 100644
+index 92f735f96..18e60d89a 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
-@@ -1157,6 +1157,7 @@ private:
+@@ -1164,6 +1164,7 @@ private:
// locked & unlocked balance of given or current subaddress account
uint64_t balance(uint32_t subaddr_index_major, bool strict) const;
uint64_t unlocked_balance(uint32_t subaddr_index_major, bool strict, uint64_t *blocks_to_unlock = NULL, uint64_t *time_to_unlock = NULL);
@@ -993,7 +984,7 @@ index daad1e940..a752f15b9 100644
// locked & unlocked balance per subaddress of given or current subaddress account
std::map<uint32_t, uint64_t> balance_per_subaddress(uint32_t subaddr_index_major, bool strict) const;
std::map<uint32_t, std::pair<uint64_t, std::pair<uint64_t, uint64_t>>> unlocked_balance_per_subaddress(uint32_t subaddr_index_major, bool strict);
-@@ -1631,9 +1632,11 @@ private:
+@@ -1639,9 +1640,11 @@ private:
std::tuple<size_t, crypto::hash, std::vector<crypto::hash>> export_blockchain() const;
void import_blockchain(const std::tuple<size_t, crypto::hash, std::vector<crypto::hash>> &bc);
bool export_key_images(const std::string &filename, bool all = false) const;
@@ -1006,5 +997,5 @@ index daad1e940..a752f15b9 100644
bool import_key_images(signed_tx_set & signed_tx, size_t offset=0, bool only_selected_transfers=false);
crypto::public_key get_tx_pub_key_from_received_outs(const tools::wallet2::transfer_details &td) const;
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0006-add-dummy-device-for-ledger.patch b/patches/monero/0006-add-dummy-device-for-ledger.patch
index 30261a4..816ad5d 100644
--- a/patches/monero/0006-add-dummy-device-for-ledger.patch
+++ b/patches/monero/0006-add-dummy-device-for-ledger.patch
@@ -1,11 +1,10 @@
-From 11ddba5ab1470fb46a87ea9b702bf11f88763ecc Mon Sep 17 00:00:00 2001
+From eb9ffa912fb31dd2bddf96d7d55d5e5f9d8219b4 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 8 May 2025 13:14:23 +0200
-Subject: [PATCH 06/17] add dummy device for ledger
+Subject: [PATCH 06/20] add dummy device for ledger
---
- CMakeLists.txt | 6 +-
- external/randomx | 2 +-
+ CMakeLists.txt | 19 ++--
src/device/CMakeLists.txt | 6 +-
src/device/device.cpp | 10 +-
src/device/device.hpp | 12 +--
@@ -17,12 +16,12 @@ Subject: [PATCH 06/17] add dummy device for ledger
src/wallet/api/wallet.h | 14 +++
src/wallet/api/wallet2_api.h | 13 +++
src/wallet/api/wallet_manager.cpp | 12 ++-
- 13 files changed, 405 insertions(+), 26 deletions(-)
+ 12 files changed, 411 insertions(+), 31 deletions(-)
create mode 100644 src/device/device_io_dummy.cpp
create mode 100644 src/device/device_io_dummy.hpp
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c73b813d8..ce5ef4bab 100644
+index 268339201..eb0d12225 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -692,16 +692,21 @@ include_directories(${LMDB_INCLUDE})
@@ -147,7 +146,7 @@ index 392703a24..ffd419779 100644
diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp
new file mode 100644
-index 000000000..01e6fc7b7
+index 000000000..74742150d
--- /dev/null
+++ b/src/device/device_io_dummy.cpp
@@ -0,0 +1,161 @@
@@ -315,7 +314,7 @@ index 000000000..01e6fc7b7
\ No newline at end of file
diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp
new file mode 100644
-index 000000000..1128b9c1d
+index 000000000..87a5f109f
--- /dev/null
+++ b/src/device/device_io_dummy.hpp
@@ -0,0 +1,82 @@
@@ -402,7 +401,7 @@ index 000000000..1128b9c1d
+
+#endif // HAVE_HIDAPI
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index bb5b6f497..046201a1e 100644
+index 7e4be6347..ee330ba59 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -41,7 +41,7 @@ namespace hw {
@@ -423,7 +422,7 @@ index bb5b6f497..046201a1e 100644
this->mode = NONE;
this->has_view_key = false;
this->tx_in_progress = false;
-@@ -533,7 +533,9 @@ namespace hw {
+@@ -534,7 +534,9 @@ namespace hw {
bool device_ledger::connect(void) {
this->disconnect();
@@ -434,7 +433,7 @@ index bb5b6f497..046201a1e 100644
#ifdef DEBUG_HWDEVICE
cryptonote::account_public_address pubkey;
diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
-index 03058c4f1..39454ca6d 100644
+index 61ac6f9c8..44a1af6c8 100644
--- a/src/device/device_ledger.hpp
+++ b/src/device/device_ledger.hpp
@@ -35,6 +35,7 @@
@@ -467,7 +466,7 @@ index 03058c4f1..39454ca6d 100644
unsigned char buffer_send[BUFFER_SEND_SIZE];
unsigned int length_recv;
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 3fcd6f332..844a1c451 100644
+index d179e502b..fb71a0521 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -48,6 +48,9 @@
@@ -480,7 +479,7 @@ index 3fcd6f332..844a1c451 100644
using namespace std;
using namespace cryptonote;
-@@ -3178,4 +3181,101 @@ uint64_t WalletImpl::getBytesSent()
+@@ -3177,4 +3180,101 @@ uint64_t WalletImpl::getBytesSent()
return m_wallet->get_bytes_sent();
}
@@ -608,7 +607,7 @@ index edf8bb8ce..6bfb61cb8 100644
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 764adbfbf..a48a6be54 100644
+index 764adbfbf..f433b064f 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -1150,6 +1150,19 @@ struct Wallet
@@ -655,5 +654,5 @@ index e81b8f83a..277be6ac9 100644
std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path)
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0007-polyseed.patch b/patches/monero/0007-polyseed.patch
index e83678e..5caf7c2 100644
--- a/patches/monero/0007-polyseed.patch
+++ b/patches/monero/0007-polyseed.patch
@@ -1,7 +1,7 @@
-From 3c3d441cabcaae9eb5d3db2f5cd6c506feb97168 Mon Sep 17 00:00:00 2001
+From da0be39a81107060f032c8242c575f04ad61c59f Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 09:42:37 +0100
-Subject: [PATCH 07/17] polyseed
+Subject: [PATCH 07/20] polyseed
Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
---
@@ -56,7 +56,7 @@ index 72af74d55..b838e84e0 100644
path = external/supercop
url = https://github.com/monero-project/supercop
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5c0f31cb8..f0630ef9b 100644
+index eb0d12225..390339523 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -371,6 +371,8 @@ if(NOT MANUAL_SUBMODULES)
@@ -814,7 +814,7 @@ index 000000000..2c8c777a7
+#endif //POLYSEED_HPP
\ No newline at end of file
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 844a1c451..050212ff7 100644
+index fb71a0521..17a98c066 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -728,6 +728,28 @@ bool WalletImpl::recoverFromDevice(const std::string &path, const std::string &p
@@ -926,7 +926,7 @@ index 6bfb61cb8..e7873dd78 100644
void setSeedLanguage(const std::string &arg) override;
// void setListener(Listener *) {}
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index a48a6be54..8fa0bbd42 100644
+index f433b064f..80bfdacb2 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -709,6 +709,10 @@ struct Wallet
@@ -1010,7 +1010,7 @@ index a223e1df9..28fcd36c9 100644
bool walletExists(const std::string &path) override;
bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, bool no_spend_key, uint64_t kdf_rounds = 1) const override;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 765cefb32..806de969a 100644
+index a8db99c3f..972310343 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -92,6 +92,7 @@ using namespace epee;
@@ -1021,7 +1021,7 @@ index 765cefb32..806de969a 100644
extern "C"
{
-@@ -1278,7 +1279,8 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
+@@ -1281,7 +1282,8 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
m_enable_multisig(false),
m_pool_info_query_time(0),
m_has_ever_refreshed_from_node(false),
@@ -1031,7 +1031,7 @@ index 765cefb32..806de969a 100644
{
set_rpc_client_secret_key(rct::rct2sk(rct::skGen()));
}
-@@ -1483,6 +1485,20 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
+@@ -1486,6 +1488,20 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
return true;
}
//----------------------------------------------------------------------------------------------------
@@ -1052,7 +1052,7 @@ index 765cefb32..806de969a 100644
bool wallet2::get_multisig_seed(epee::wipeable_string& seed, const epee::wipeable_string &passphrase) const
{
bool ready;
-@@ -4800,6 +4816,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypt
+@@ -4877,6 +4893,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypt
value2.SetInt(m_enable_multisig ? 1 : 0);
json.AddMember("enable_multisig", value2, json.GetAllocator());
@@ -1062,7 +1062,7 @@ index 765cefb32..806de969a 100644
if (m_background_sync_type == BackgroundSyncCustomPassword && !background_keys_file && m_custom_background_key)
{
value.SetString(reinterpret_cast<const char*>(m_custom_background_key.get().data()), m_custom_background_key.get().size());
-@@ -5039,6 +5058,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5116,6 +5135,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
m_enable_multisig = false;
m_allow_mismatched_daemon_version = false;
m_custom_background_key = boost::none;
@@ -1070,7 +1070,7 @@ index 765cefb32..806de969a 100644
}
else if(json.IsObject())
{
-@@ -5279,6 +5299,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5356,6 +5376,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, background_sync_type, BackgroundSyncType, Int, false, BackgroundSyncOff);
m_background_sync_type = field_background_sync_type;
@@ -1080,7 +1080,7 @@ index 765cefb32..806de969a 100644
// Load encryption key used to encrypt background cache
crypto::chacha_key custom_background_key;
m_custom_background_key = boost::none;
-@@ -5598,6 +5621,48 @@ void wallet2::init_type(hw::device::device_type device_type)
+@@ -5675,6 +5698,48 @@ void wallet2::init_type(hw::device::device_type device_type)
m_key_device_type = device_type;
}
@@ -1129,7 +1129,7 @@ index 765cefb32..806de969a 100644
/*!
* \brief Generates a wallet or restores one. Assumes the multisig setup
* has already completed for the provided multisig info.
-@@ -5725,7 +5790,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5802,7 +5867,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
return retval;
}
@@ -1138,7 +1138,7 @@ index 765cefb32..806de969a 100644
{
// -1 month for fluctuations in block time and machine date/time setup.
// avg seconds per block
-@@ -5749,7 +5814,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5826,7 +5891,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
// the daemon is currently syncing.
// If we use the approximate height we subtract one month as
// a safety margin.
@@ -1147,7 +1147,7 @@ index 765cefb32..806de969a 100644
uint64_t target_height = get_daemon_blockchain_target_height(err);
if (err.empty()) {
if (target_height < height)
-@@ -13646,7 +13711,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
+@@ -13661,7 +13726,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
return target_height;
}
@@ -1156,7 +1156,7 @@ index 765cefb32..806de969a 100644
{
// time of v2 fork
const time_t fork_time = m_nettype == TESTNET ? 1448285909 : m_nettype == STAGENET ? 1520937818 : 1458748658;
-@@ -13655,7 +13720,7 @@ uint64_t wallet2::get_approximate_blockchain_height() const
+@@ -13670,7 +13735,7 @@ uint64_t wallet2::get_approximate_blockchain_height() const
// avg seconds per block
const int seconds_per_block = DIFFICULTY_TARGET_V2;
// Calculated blockchain height
@@ -1165,7 +1165,7 @@ index 765cefb32..806de969a 100644
// testnet and stagenet got some huge rollbacks, so the estimation is way off
static const uint64_t approximate_rolled_back_blocks = m_nettype == TESTNET ? 342100 : m_nettype == STAGENET ? 60000 : 30000;
if ((m_nettype == TESTNET || m_nettype == STAGENET) && approx_blockchain_height > approximate_rolled_back_blocks)
-@@ -15794,15 +15859,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin
+@@ -15796,15 +15861,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin
//----------------------------------------------------------------------------------------------------
uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, uint8_t day)
{
@@ -1181,7 +1181,7 @@ index 765cefb32..806de969a 100644
std::tm date = { 0, 0, 0, 0, 0, 0, 0, 0 };
date.tm_year = year - 1900;
date.tm_mon = month - 1;
-@@ -15811,7 +15867,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui
+@@ -15813,7 +15869,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui
{
throw std::runtime_error("month or day out of range");
}
@@ -1206,7 +1206,7 @@ index 765cefb32..806de969a 100644
uint64_t height_min = 0;
uint64_t height_max = get_daemon_blockchain_height(err) - 1;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index a752f15b9..a619bdd15 100644
+index 18e60d89a..419272a54 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -72,6 +72,7 @@
@@ -1254,7 +1254,7 @@ index a752f15b9..a619bdd15 100644
/*!
* \brief Checks if light wallet. A light wallet sends view key to a server where the blockchain is scanned.
*/
-@@ -1562,8 +1586,8 @@ private:
+@@ -1570,8 +1594,8 @@ private:
/*!
* \brief Calculates the approximate blockchain height from current date/time.
*/
@@ -1265,7 +1265,7 @@ index a752f15b9..a619bdd15 100644
std::vector<size_t> select_available_outputs_from_histogram(uint64_t count, bool atleast, bool unlocked, bool allow_rct);
std::vector<size_t> select_available_outputs(const std::function<bool(const transfer_details &td)> &f);
std::vector<size_t> select_available_unmixable_outputs();
-@@ -1657,6 +1681,7 @@ private:
+@@ -1665,6 +1689,7 @@ private:
bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error);
uint64_t get_blockchain_height_by_date(uint16_t year, uint8_t month, uint8_t day); // 1<=month<=12, 1<=day<=31
@@ -1273,7 +1273,7 @@ index a752f15b9..a619bdd15 100644
bool is_synced();
-@@ -2003,6 +2028,7 @@ private:
+@@ -2011,6 +2036,7 @@ private:
std::string seed_language; /*!< Language of the mnemonics (seed). */
bool is_old_file_format; /*!< Whether the wallet file is of an old file format */
bool m_watch_only; /*!< no spend key */
@@ -1282,5 +1282,5 @@ index a752f15b9..a619bdd15 100644
uint32_t m_multisig_threshold;
std::vector<crypto::public_key> m_multisig_signers;
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0008-coin-control.patch b/patches/monero/0008-coin-control.patch
index d0f2811..0ed4fb2 100644
--- a/patches/monero/0008-coin-control.patch
+++ b/patches/monero/0008-coin-control.patch
@@ -1,7 +1,7 @@
-From 722abaf1f84d8444d40e277f8b97e54250195856 Mon Sep 17 00:00:00 2001
+From 6811bdac7b98fd29c0566e758fc2d4353b9c3cec Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 11:07:57 +0100
-Subject: [PATCH 08/17] coin control
+Subject: [PATCH 08/20] coin control
---
src/simplewallet/simplewallet.cpp | 2 +-
@@ -22,10 +22,10 @@ Subject: [PATCH 08/17] coin control
create mode 100644 src/wallet/api/coins_info.h
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
-index 89691e9f7..b26817e52 100644
+index 39bf169f3..40e25e1d0 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
-@@ -6930,7 +6930,7 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool ca
+@@ -6917,7 +6917,7 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool ca
{
// figure out what tx will be necessary
auto ptx_vector = m_wallet->create_transactions_2(dsts, fake_outs_count, priority, extra,
@@ -504,7 +504,7 @@ index 000000000..c43e45abd
+
+#endif //FEATHER_COINS_INFO_H
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 050212ff7..b259528ef 100644
+index 17a98c066..1b86404be 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -35,6 +35,7 @@
@@ -813,7 +813,7 @@ index e7873dd78..bc782dd4a 100644
// multi-threaded refresh stuff
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 8fa0bbd42..7e67f02fd 100644
+index 80bfdacb2..97dd29bde 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -263,6 +263,51 @@ struct AddressBook
@@ -897,10 +897,10 @@ index 8fa0bbd42..7e67f02fd 100644
virtual SubaddressAccount * subaddressAccount() = 0;
virtual void setListener(WalletListener *) = 0;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 806de969a..8720e18b1 100644
+index 972310343..c50a840b6 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -2103,12 +2103,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const
+@@ -2136,12 +2136,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const
return false;
}
@@ -922,7 +922,7 @@ index 806de969a..8720e18b1 100644
void wallet2::thaw(const crypto::key_image &ki)
{
thaw(get_transfer_details(ki));
-@@ -2119,6 +2128,18 @@ bool wallet2::frozen(const crypto::key_image &ki) const
+@@ -2152,6 +2161,18 @@ bool wallet2::frozen(const crypto::key_image &ki) const
return frozen(get_transfer_details(ki));
}
//----------------------------------------------------------------------------------------------------
@@ -941,7 +941,7 @@ index 806de969a..8720e18b1 100644
size_t wallet2::get_transfer_details(const crypto::key_image &ki) const
{
for (size_t idx = 0; idx < m_transfers.size(); ++idx)
-@@ -2530,6 +2551,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
+@@ -2563,6 +2584,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
uint64_t amount = tx.vout[o].amount ? tx.vout[o].amount : tx_scan_info[o].amount;
if (!pool)
{
@@ -949,7 +949,7 @@ index 806de969a..8720e18b1 100644
m_transfers.push_back(transfer_details{});
transfer_details& td = m_transfers.back();
td.m_block_height = height;
-@@ -2633,6 +2655,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
+@@ -2666,6 +2688,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
uint64_t extra_amount = amount - burnt;
if (!pool)
{
@@ -957,7 +957,7 @@ index 806de969a..8720e18b1 100644
transfer_details &td = m_transfers[kit->second];
td.m_block_height = height;
td.m_internal_output_index = o;
-@@ -10511,7 +10534,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
+@@ -10526,7 +10549,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
LOG_PRINT_L2("transfer_selected_rct done");
}
@@ -966,7 +966,7 @@ index 806de969a..8720e18b1 100644
{
std::vector<size_t> picks;
float current_output_relatdness = 1.0f;
-@@ -10522,6 +10545,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10537,6 +10560,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -976,7 +976,7 @@ index 806de969a..8720e18b1 100644
if (!is_spent(td, false) && !td.m_frozen && td.is_rct() && td.amount() >= needed_money && is_transfer_unlocked(td) && td.m_subaddr_index.major == subaddr_account && subaddr_indices.count(td.m_subaddr_index.minor) == 1)
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
-@@ -10542,6 +10568,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10557,6 +10583,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -986,7 +986,7 @@ index 806de969a..8720e18b1 100644
if (!is_spent(td, false) && !td.m_frozen && !td.m_key_image_partial && td.is_rct() && is_transfer_unlocked(td) && td.m_subaddr_index.major == subaddr_account && subaddr_indices.count(td.m_subaddr_index.minor) == 1)
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
-@@ -10553,6 +10582,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10568,6 +10597,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t j = i + 1; j < m_transfers.size(); ++j)
{
const transfer_details& td2 = m_transfers[j];
@@ -996,7 +996,7 @@ index 806de969a..8720e18b1 100644
if (td2.amount() > m_ignore_outputs_above || td2.amount() < m_ignore_outputs_below)
{
MDEBUG("Ignoring output " << j << " of amount " << print_money(td2.amount()) << " which is outside prescribed range [" << print_money(m_ignore_outputs_below) << ", " << print_money(m_ignore_outputs_above) << "]");
-@@ -11125,7 +11157,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
+@@ -11140,7 +11172,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
// This system allows for sending (almost) the entire balance, since it does
// not generate spurious change in all txes, thus decreasing the instantaneous
// usable balance.
@@ -1005,7 +1005,7 @@ index 806de969a..8720e18b1 100644
{
//ensure device is let in NONE mode in any case
hw::device &hwdev = m_account.get_device();
-@@ -11333,6 +11365,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11348,6 +11380,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -1015,7 +1015,7 @@ index 806de969a..8720e18b1 100644
if (m_ignore_fractional_outputs && td.amount() < fractional_threshold)
{
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below fractional threshold " << print_money(fractional_threshold));
-@@ -11424,7 +11459,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11439,7 +11474,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
// will get us a known fee.
uint64_t estimated_fee = estimate_fee(use_per_byte_fee, use_rct, 2, fake_outs_count, 2, extra.size(), bulletproof, clsag, bulletproof_plus, use_view_tags, base_fee, fee_quantization_mask);
total_needed_money = needed_money + (subtract_fee_from_outputs.size() ? 0 : estimated_fee);
@@ -1024,7 +1024,7 @@ index 806de969a..8720e18b1 100644
if (!preferred_inputs.empty())
{
string s;
-@@ -11903,7 +11938,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
+@@ -11918,7 +11953,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
return true;
}
@@ -1033,7 +1033,7 @@ index 806de969a..8720e18b1 100644
{
std::vector<size_t> unused_transfers_indices;
std::vector<size_t> unused_dust_indices;
-@@ -11932,6 +11967,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below
+@@ -11947,6 +11982,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -1044,10 +1044,10 @@ index 806de969a..8720e18b1 100644
{
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below threshold " << print_money(fractional_threshold));
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index a619bdd15..4f324c238 100644
+index 419272a54..d07dc7e8b 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
-@@ -1216,8 +1216,8 @@ private:
+@@ -1223,8 +1223,8 @@ private:
bool parse_unsigned_tx_from_str(const std::string &unsigned_tx_st, unsigned_tx_set &exported_txs) const;
bool load_tx(const std::string &signed_filename, std::vector<tools::wallet2::pending_tx> &ptx, std::function<bool(const signed_tx_set&)> accept_func = NULL);
bool parse_tx_from_str(const std::string &signed_tx_st, std::vector<tools::wallet2::pending_tx> &ptx, std::function<bool(const signed_tx_set &)> accept_func);
@@ -1058,7 +1058,7 @@ index a619bdd15..4f324c238 100644
std::vector<wallet2::pending_tx> create_transactions_single(const crypto::key_image &ki, const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, const size_t fake_outs_count, uint32_t priority, const std::vector<uint8_t>& extra);
std::vector<wallet2::pending_tx> create_transactions_from(const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, std::vector<size_t> unused_transfers_indices, std::vector<size_t> unused_dust_indices, const size_t fake_outs_count, uint32_t priority, const std::vector<uint8_t>& extra);
bool sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, const std::vector<cryptonote::tx_destination_entry>& dsts, const unique_index_container& subtract_fee_from_outputs = {}) const;
-@@ -1569,6 +1569,7 @@ private:
+@@ -1576,6 +1576,7 @@ private:
uint64_t get_num_rct_outputs();
size_t get_num_transfer_details() const { return m_transfers.size(); }
const transfer_details &get_transfer_details(size_t idx) const;
@@ -1066,7 +1066,7 @@ index a619bdd15..4f324c238 100644
uint8_t get_current_hard_fork();
void get_hard_fork_info(uint8_t version, uint64_t &earliest_height);
-@@ -1800,7 +1801,9 @@ private:
+@@ -1808,7 +1809,9 @@ private:
void freeze(size_t idx);
void thaw(size_t idx);
bool frozen(size_t idx) const;
@@ -1076,7 +1076,7 @@ index a619bdd15..4f324c238 100644
void thaw(const crypto::key_image &ki);
bool frozen(const crypto::key_image &ki) const;
bool frozen(const transfer_details &td) const;
-@@ -1841,6 +1844,8 @@ private:
+@@ -1849,6 +1852,8 @@ private:
static std::string get_default_daemon_address() { CRITICAL_REGION_LOCAL(default_daemon_address_lock); return default_daemon_address; }
@@ -1085,7 +1085,7 @@ index a619bdd15..4f324c238 100644
private:
/*!
* \brief Stores wallet information to wallet file.
-@@ -1912,7 +1917,7 @@ private:
+@@ -1920,7 +1925,7 @@ private:
std::vector<uint64_t> get_unspent_amounts_vector(bool strict);
uint64_t get_dynamic_base_fee_estimate();
float get_output_relatedness(const transfer_details &td0, const transfer_details &td1) const;
@@ -1095,5 +1095,5 @@ index a619bdd15..4f324c238 100644
void set_unspent(size_t idx);
bool is_spent(const transfer_details &td, bool strict = true) const;
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch b/patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
index 9741055..df3b9ad 100644
--- a/patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
+++ b/patches/monero/0009-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
@@ -1,7 +1,7 @@
-From f386189cf3c5b433251b2cf493ba264a1a79fb7e Mon Sep 17 00:00:00 2001
+From 300a5110cccb1e3caf763b1f9bf5dc0ecc0973c8 Mon Sep 17 00:00:00 2001
From: M <m@cakewallet.com>
Date: Fri, 21 Apr 2023 15:43:47 -0400
-Subject: [PATCH 09/17] Add hex encoding and tx key getter for
+Subject: [PATCH 09/20] Add hex encoding and tx key getter for
PendingTransction in wallet api.
---
@@ -51,7 +51,7 @@ index 403bfe281..0cc6c58e9 100644
private:
friend class WalletImpl;
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 7e67f02fd..7f1462a44 100644
+index 97dd29bde..b5cccac40 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -127,6 +127,8 @@ struct PendingTransaction
@@ -64,5 +64,5 @@ index 7e67f02fd..7f1462a44 100644
/**
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch b/patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch
index 8d939f8..e8f7538 100644
--- a/patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch
+++ b/patches/monero/0010-Add-recoverDeterministicWalletFromSpendKey.patch
@@ -1,7 +1,7 @@
-From 55f5311122fb9d19e870fa4a330c59d76ca92aac Mon Sep 17 00:00:00 2001
+From 3e15968c13d2a7c0098d26e72168a5774d6cdd89 Mon Sep 17 00:00:00 2001
From: Konstantin Ullrich <konstantinullrich12@gmail.com>
Date: Wed, 11 Oct 2023 16:47:59 +0200
-Subject: [PATCH 10/17] Add recoverDeterministicWalletFromSpendKey
+Subject: [PATCH 10/20] Add recoverDeterministicWalletFromSpendKey
This function is used by Cake Wallet to enable polyseed (dart implementation)
support.
@@ -19,7 +19,7 @@ Co-authored-by: Godwin Asuquo <godilite@gmail.com>
5 files changed, 75 insertions(+)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index b259528ef..20ccbfb35 100644
+index 1b86404be..00918e357 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -824,6 +824,35 @@ bool WalletImpl::recover(const std::string &path, const std::string &password, c
@@ -74,7 +74,7 @@ index bc782dd4a..bfe81c590 100644
const std::string &password,
const std::string &device_name);
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 7f1462a44..27e8b1426 100644
+index b5cccac40..fcb8187d4 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -1324,6 +1324,25 @@ struct WalletManager
@@ -149,5 +149,5 @@ index 28fcd36c9..be3ff8184 100644
const std::string &password,
NetworkType nettype,
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0011-add-monero-submodule-support.patch b/patches/monero/0011-add-monero-submodule-support.patch
index 413aaba..fee1fba 100644
--- a/patches/monero/0011-add-monero-submodule-support.patch
+++ b/patches/monero/0011-add-monero-submodule-support.patch
@@ -1,20 +1,28 @@
-From ec93b6bf725eeff0999fdd9d603c4578cb19ae07 Mon Sep 17 00:00:00 2001
+From e06b0e86b6b6204bf20c0caadde64da1f0966da1 Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Thu, 7 Nov 2024 16:46:24 +0000
-Subject: [PATCH 11/17] add monero submodule support
+Subject: [PATCH 11/20] add monero submodule support
---
- CMakeLists.txt | 6 +++---
- cmake/CheckLinkerFlag.cmake | 2 +-
- src/wallet/wallet_rpc_server.cpp | 2 +-
- 3 files changed, 5 insertions(+), 5 deletions(-)
+ CMakeLists.txt | 12 ++++++------
+ src/wallet/wallet_rpc_server.cpp | 2 +-
+ 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index f0630ef9b..9406e57b4 100644
+index 390339523..d0af390d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
+@@ -75,7 +75,7 @@ if (${CMAKE_VERSION} VERSION_GREATER "3.0.0" AND CMAKE_MAKE_PROGRAM MATCHES "nin
+ set(CMAKE_JOB_POOL_LINK link_job_pool)
+ endif ()
+ endif ()
+-
++
+ option (USE_CLANG_TIDY_C "Lint the code with clang-tidy - variant C" OFF)
+ option (USE_CLANG_TIDY_CXX "Lint the code with clang-tidy - variant C++" OFF)
+ if (USE_CLANG_TIDY_C AND USE_CLANG_TIDY_CXX)
@@ -223,9 +223,9 @@ function(forbid_undefined_symbols)
- cmake_minimum_required(VERSION 3.1)
+ cmake_minimum_required(VERSION 3.5)
project(test)
option(EXPECT_SUCCESS "" ON)
-file(WRITE "${CMAKE_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }")
@@ -25,6 +33,15 @@ index f0630ef9b..9406e57b4 100644
endif()
add_library(l0 SHARED incorrect_source.cpp)
add_library(l1 MODULE incorrect_source.cpp)
+@@ -363,7 +363,7 @@ if(NOT MANUAL_SUBMODULES)
+ message(FATAL_ERROR "Submodule '${relative_path}' is not up-to-date. Please update all submodules with\ngit submodule update --init --force\nor run cmake with -DMANUAL_SUBMODULES=1\n")
+ endif()
+ endfunction ()
+-
++
+ message(STATUS "Checking submodules")
+ # check_submodule(external/bc-ur)
+ check_submodule(external/miniupnp)
@@ -390,7 +390,7 @@ else()
endif()
@@ -34,24 +51,20 @@ index f0630ef9b..9406e57b4 100644
if (NOT DEFINED ENV{DEVELOPER_LOCAL_TOOLS})
message(STATUS "Could not find DEVELOPER_LOCAL_TOOLS in env (not required)")
-diff --git a/cmake/CheckLinkerFlag.cmake b/cmake/CheckLinkerFlag.cmake
-index 7ecf5f610..89fb9d167 100644
---- a/cmake/CheckLinkerFlag.cmake
-+++ b/cmake/CheckLinkerFlag.cmake
-@@ -6,7 +6,7 @@ macro(CHECK_LINKER_FLAG flag VARIABLE)
- message(STATUS "Looking for ${flag} linker flag")
- endif()
+@@ -1003,7 +1003,7 @@ else()
-- set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
-+ set(_cle_source ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
-
- set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
- set(CMAKE_C_FLAGS "${flag}")
+ # random crash on startup when asan is on if pie is enabled
+ if(NOT SANITIZE AND ANDROID AND NOT BUILD_GUI_DEPS STREQUAL "ON" OR IOS)
+- #From Android 5: "only position independent executables (PIE) are supported"
++ #From Android 5: "only position independent executables (PIE) are supported"
+ message(STATUS "Enabling PIE executable")
+ set(PIC_FLAG "")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
-index 3188c88db..9fbdb3c05 100644
+index 0cf75a1c4..66def08ef 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
-@@ -1184,7 +1184,7 @@ namespace tools
+@@ -1261,7 +1261,7 @@ namespace tools
{
uint64_t mixin = m_wallet->adjust_mixin(req.ring_size ? req.ring_size - 1 : 0);
uint32_t priority = m_wallet->adjust_priority(req.priority);
@@ -61,5 +74,5 @@ index 3188c88db..9fbdb3c05 100644
if (ptx_vector.empty())
{
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0012-fix-iOS-depends-build.patch b/patches/monero/0012-fix-iOS-depends-build.patch
index 5d75424..2e4845e 100644
--- a/patches/monero/0012-fix-iOS-depends-build.patch
+++ b/patches/monero/0012-fix-iOS-depends-build.patch
@@ -1,7 +1,7 @@
-From 73d6ad9d513f776afb1c1f5f2d74e3b06fad7eeb Mon Sep 17 00:00:00 2001
+From 92ca945665cab44adace3331685ae4270a14c07e Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 21 Nov 2024 06:05:03 -0500
-Subject: [PATCH 12/17] fix iOS depends build
+Subject: [PATCH 12/20] fix iOS depends build
---
CMakeLists.txt | 4 ----
@@ -11,7 +11,7 @@ Subject: [PATCH 12/17] fix iOS depends build
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9406e57b4..1eac121db 100644
+index d0af390d0..b814c76b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,10 +39,6 @@ include(CheckLibraryExists)
@@ -100,5 +100,5 @@ index 71b8f78cc..0f53f024e 100644
#if TARGET_OS_MAC && (!defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
return boost::logic::tribool(IOPSGetTimeRemainingEstimate() != kIOPSTimeRemainingUnlimited);
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0013-include-locale-only-when-targeting-WIN32.patch b/patches/monero/0013-include-locale-only-when-targeting-WIN32.patch
index 453d651..56c8132 100644
--- a/patches/monero/0013-include-locale-only-when-targeting-WIN32.patch
+++ b/patches/monero/0013-include-locale-only-when-targeting-WIN32.patch
@@ -1,7 +1,7 @@
-From db52bcebe23b29b35ae538f01e72ed4f7f66f931 Mon Sep 17 00:00:00 2001
+From 60ef2d2a25b07aca8f25ef5016eb4b9b7c253a50 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 18 Nov 2024 10:57:37 -0500
-Subject: [PATCH 13/17] include locale only when targeting WIN32
+Subject: [PATCH 13/20] include locale only when targeting WIN32
---
CMakeLists.txt | 6 +++++-
@@ -9,10 +9,10 @@ Subject: [PATCH 13/17] include locale only when targeting WIN32
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1eac121db..5938be622 100644
+index b814c76b7..cef44dd1b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1089,7 +1089,11 @@ if(NOT Boost_FOUND)
+@@ -1090,7 +1090,11 @@ if(NOT Boost_FOUND)
elseif(Boost_FOUND)
message(STATUS "Found Boost Version: ${Boost_VERSION_STRING}")
@@ -26,7 +26,7 @@ index 1eac121db..5938be622 100644
# Boost System is header-only since 1.69
if (Boost_VERSION_STRING VERSION_LESS 1.69.0)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 20ccbfb35..c43803033 100644
+index 00918e357..107f516f3 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -46,7 +46,9 @@
@@ -40,5 +40,5 @@ index 20ccbfb35..c43803033 100644
#include "bc-ur/src/bc-ur.hpp"
#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0014-change-earliest-fork-height-message.patch b/patches/monero/0014-change-earliest-fork-height-message.patch
index c097694..3a4321b 100644
--- a/patches/monero/0014-change-earliest-fork-height-message.patch
+++ b/patches/monero/0014-change-earliest-fork-height-message.patch
@@ -1,17 +1,17 @@
-From be01eac2724d22cd7225bb17fba7a443efe8d8d6 Mon Sep 17 00:00:00 2001
+From 7c58eb392e94ff5b50bcb15b8d91038476743ba9 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 29 Jan 2025 16:13:28 +0100
-Subject: [PATCH 14/17] change earliest fork height message
+Subject: [PATCH 14/20] change earliest fork height message
---
src/wallet/wallet2.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 8720e18b1..69da11d9c 100644
+index c50a840b6..a7532d7ec 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -12365,7 +12365,7 @@ bool wallet2::use_fork_rules(uint8_t version, int64_t early_blocks)
+@@ -12380,7 +12380,7 @@ bool wallet2::use_fork_rules(uint8_t version, int64_t early_blocks)
boost::optional<std::string> result = m_node_rpc_proxy.get_height(height);
THROW_WALLET_EXCEPTION_IF(result, error::wallet_internal_error, "Failed to get height");
result = m_node_rpc_proxy.get_earliest_height(version, earliest_height);
@@ -21,5 +21,5 @@ index 8720e18b1..69da11d9c 100644
bool close_enough = (int64_t)height >= (int64_t)earliest_height - early_blocks && earliest_height != std::numeric_limits<uint64_t>::max(); // start using the rules that many blocks beforehand
if (close_enough)
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0015-remove-trivially_copyable-assert.patch b/patches/monero/0015-remove-trivially_copyable-assert.patch
index 4f22f32..8113bdd 100644
--- a/patches/monero/0015-remove-trivially_copyable-assert.patch
+++ b/patches/monero/0015-remove-trivially_copyable-assert.patch
@@ -1,7 +1,7 @@
-From b62446750e904978cd1a8f90d5f2d1437a3db5a9 Mon Sep 17 00:00:00 2001
+From dc67abfbc3dec2f4aa4c4157378509c9ee07cb0b Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 20 Feb 2025 08:36:28 +0100
-Subject: [PATCH 15/17] remove trivially_copyable assert
+Subject: [PATCH 15/20] remove trivially_copyable assert
---
contrib/epee/include/span.h | 1 -
@@ -20,5 +20,5 @@ index 01dc387d6..2ad733a2f 100644
return {reinterpret_cast<const std::uint8_t*>(std::addressof(src)), sizeof(T)};
}
--
-2.49.0
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0016-pr-9880.patch b/patches/monero/0016-pr-9880.patch
deleted file mode 100644
index 22d1825..0000000
--- a/patches/monero/0016-pr-9880.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From ab4e853571329b3ccb745c393220c047b03f2b2c Mon Sep 17 00:00:00 2001
-From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-Date: Tue, 1 Apr 2025 11:30:45 +0200
-Subject: [PATCH 16/17] pr-9880
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5938be622..1c4728578 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -216,7 +216,7 @@ function(forbid_undefined_symbols)
- file(MAKE_DIRECTORY "${TEST_PROJECT}")
- file(WRITE "${TEST_PROJECT}/CMakeLists.txt"
- [=[
--cmake_minimum_required(VERSION 3.1)
-+cmake_minimum_required(VERSION 3.5)
- project(test)
- option(EXPECT_SUCCESS "" ON)
- file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }")
---
-2.49.0
-
diff --git a/patches/monero/0018-serialize-cache-to-JSON.patch b/patches/monero/0016-serialize-cache-to-JSON.patch
index dbec2f2..38aaee4 100644
--- a/patches/monero/0018-serialize-cache-to-JSON.patch
+++ b/patches/monero/0016-serialize-cache-to-JSON.patch
@@ -1,7 +1,7 @@
-From 7c1d576901a56b7c315b2c54362f7985ff8df753 Mon Sep 17 00:00:00 2001
+From e6785290c24eb48d6b6aec8e1831b96f65cd3bfd Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Tue, 12 Aug 2025 07:09:14 -0400
-Subject: [PATCH] serialize cache to JSON
+Subject: [PATCH 16/20] serialize cache to JSON
---
src/wallet/CMakeLists.txt | 1 +
@@ -26,10 +26,10 @@ index b163212b7..196ad671f 100644
monero_find_all_headers(wallet_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 7d7d0f922..effb6e719 100644
+index 107f516f3..c24b4a97d 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
-@@ -3475,4 +3475,9 @@ void Wallet::setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command
+@@ -3474,4 +3474,9 @@ void Wallet::setLedgerCallback(void (*sendToLedgerDevice)(unsigned char *command
#endif
}
@@ -67,10 +67,10 @@ index fcb8187d4..3d11929f9 100644
/**
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 4f324c238..bc4abc672 100644
+index d07dc7e8b..37a2447d2 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
-@@ -1429,6 +1429,12 @@ private:
+@@ -1436,6 +1436,12 @@ private:
FIELD(m_background_sync_data)
END_SERIALIZE()
@@ -85,7 +85,7 @@ index 4f324c238..bc4abc672 100644
* \param file_path Wallet file path
diff --git a/src/wallet/wallet_cache_to_json.cpp b/src/wallet/wallet_cache_to_json.cpp
new file mode 100644
-index 000000000..64687a7a6
+index 000000000..4743852ca
--- /dev/null
+++ b/src/wallet/wallet_cache_to_json.cpp
@@ -0,0 +1,368 @@
@@ -123,14 +123,14 @@ index 000000000..64687a7a6
+ json.replace(pos, 3, ": null,");
+ pos += 7;
+ }
-+
++
+ // ": }" --> ": null}"
+ pos = 0;
+ while ((pos = json.find(": }", pos)) != std::string::npos) {
+ json.replace(pos, 3, ": null}");
+ pos += 7;
+ }
-+
++
+ // ": ]" --> ": null]"
+ pos = 0;
+ while ((pos = json.find(": ]", pos)) != std::string::npos) {
@@ -143,10 +143,10 @@ index 000000000..64687a7a6
+ while (pos < json.length()) {
+ size_t colon_pos = json.find(": ", pos);
+ if (colon_pos == std::string::npos) break;
-+
++
+ size_t value_start = colon_pos + 2;
+ if (value_start >= json.length()) break;
-+
++
+ if (std::isdigit(json[value_start])) {
+ size_t quote_pos = json.find('"', value_start);
+ if (quote_pos != std::string::npos && quote_pos < json.find_first_of(",}]", value_start)) {
@@ -158,10 +158,10 @@ index 000000000..64687a7a6
+ digits += json[digit_end];
+ digit_end++;
+ }
-+
++
+ if (digit_end == quote_pos && !digits.empty()) {
+ std::string hex_part = json.substr(quote_pos + 1, closing_quote - quote_pos - 1);
-+
++
+ std::string replacement = "\"" + digits + hex_part + "\"";
+ json.replace(value_start, closing_quote - value_start + 1, replacement);
+ pos = value_start + replacement.length();
@@ -170,7 +170,7 @@ index 000000000..64687a7a6
+ }
+ }
+ }
-+
++
+ pos = colon_pos + 1;
+ }
+}
@@ -459,5 +459,5 @@ index 000000000..64687a7a6
+} // namespace tools
\ No newline at end of file
--
-2.50.1
+2.50.1 (Apple Git-155)
diff --git a/patches/monero/0017-drop-generate_translations_header.c-requirement.patch b/patches/monero/0017-drop-generate_translations_header.c-requirement.patch
new file mode 100644
index 0000000..f6549dc
--- /dev/null
+++ b/patches/monero/0017-drop-generate_translations_header.c-requirement.patch
@@ -0,0 +1,123 @@
+From 6aa368c9613a1a7b7f2f1ce1f025962d40827c67 Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Fri, 20 Feb 2026 08:03:01 +0100
+Subject: [PATCH 17/20] drop generate_translations_header.c requirement
+
+---
+ CMakeLists.txt | 9 +----
+ translations/CMakeLists.txt | 79 +++++++++++++------------------------
+ 2 files changed, 30 insertions(+), 58 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cef44dd1b..ce5e1b557 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -666,16 +666,11 @@ endfunction ()
+ # Generate header for embedded translations
+ # Generate header for embedded translations, use target toolchain if depends, otherwise use the
+ # lrelease and lupdate binaries from the host
+-include(ExternalProject)
+-ExternalProject_Add(generate_translations_header
+- SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations"
+- BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
+- STAMP_DIR ${LRELEASE_PATH}
+- CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH}
+- INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "")
++add_subdirectory(translations)
+ include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
+ add_subdirectory(external)
+
++
+ # Final setup for libunbound
+ include_directories(${UNBOUND_INCLUDE_DIR})
+
+diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
+index 3b43360f8..d88a78ced 100644
+--- a/translations/CMakeLists.txt
++++ b/translations/CMakeLists.txt
+@@ -30,54 +30,31 @@ cmake_minimum_required(VERSION 3.5)
+
+ project(translations)
+
+-# when crosscompiling import the executable targets from a file
+-IF(CMAKE_CROSSCOMPILING)
+- message(WARNING "CrossCompiling")
+- SET(IMPORT_EXECUTABLES "${CMAKE_CURRENT_BINARY_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Point it to the export file from a native build")
+- INCLUDE(${IMPORT_EXECUTABLES})
+-ENDIF(CMAKE_CROSSCOMPILING)
+-
+-# only build the generator if not crosscompiling
+-IF(NOT CMAKE_CROSSCOMPILING)
+- add_executable(generate_translations_header generate_translations_header.c)
+-ENDIF(NOT CMAKE_CROSSCOMPILING)
+-
+-if(LRELEASE_PATH STREQUAL "")
+- find_program(LRELEASE lrelease)
+-else()
+- set(LRELEASE ${LRELEASE_PATH}/lrelease)
+-endif()
+-
+-if(LRELEASE STREQUAL "LRELEASE-NOTFOUND")
+- set(ts_files "")
+- message(WARNING "lrelease program not found, translation files not built")
+-else()
+- execute_process(COMMAND ${LRELEASE} -version
+- RESULT_VARIABLE lrelease_ret)
+- if(NOT lrelease_ret EQUAL "0")
+- set(ts_files "")
+- message(WARNING "lrelease program not working, translation files not built")
+- else()
+- file(GLOB ts_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.ts)
+- foreach(ts_file ${ts_files})
+- string(REPLACE ".ts" ".qm" qm_file "${ts_file}")
+- add_custom_command(TARGET generate_translations_header
+- PRE_BUILD
+- COMMAND ${LRELEASE} "${CMAKE_CURRENT_SOURCE_DIR}/${ts_file}" -qm "${qm_file}"
+- WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}")
+- endforeach()
+- endif()
+-endif()
+-
+-string(REPLACE ".ts" ".qm" qm_files "${ts_files}")
+-
+-add_custom_command(TARGET generate_translations_header
+- POST_BUILD
+- COMMAND $<TARGET_FILE:generate_translations_header> ${qm_files}
+- WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}"
+- COMMENT "Generating embedded translations header")
+-
+-# export the generator target to a file, so it can be imported (see above) by another build
+-IF(NOT CMAKE_CROSSCOMPILING)
+- EXPORT(TARGETS generate_translations_header FILE ${CMAKE_CURRENT_BINARY_DIR}/ImportExecutables.cmake )
+-ENDIF(NOT CMAKE_CROSSCOMPILING)
++add_custom_target(generate_translations_header)
++
++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/translation_files.h"
++"#ifndef TRANSLATION_FILES_H
++#define TRANSLATION_FILES_H
++
++#include <string>
++
++static const struct embedded_file {
++ const std::string *name;
++ const std::string *data;
++} embedded_files[] = {
++ {NULL, NULL}
++};
++
++static bool find_embedded_file(const std::string &name, std::string &data) {
++ const struct embedded_file *p;
++ for (p = embedded_files; p->name != NULL; p++) {
++ if (*p->name == name) {
++ data = *p->data;
++ return true;
++ }
++ }
++ return false;
++}
++
++#endif /* TRANSLATION_FILES_H */
++")
+--
+2.50.1 (Apple Git-155)
+
diff --git a/patches/monero/0017-fix-unary_function-__unary_function.patch b/patches/monero/0017-fix-unary_function-__unary_function.patch
deleted file mode 100644
index b964dbe..0000000
--- a/patches/monero/0017-fix-unary_function-__unary_function.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 32f2e6cc2e184bfdaa92a5d45a15983c896f6816 Mon Sep 17 00:00:00 2001
-From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-Date: Thu, 10 Apr 2025 13:28:05 +0200
-Subject: [PATCH 17/17] fix: unary_function -> __unary_function
-
----
- src/cryptonote_basic/cryptonote_basic_impl.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/cryptonote_basic/cryptonote_basic_impl.h b/src/cryptonote_basic/cryptonote_basic_impl.h
-index b423573c5..a9aef7a2a 100644
---- a/src/cryptonote_basic/cryptonote_basic_impl.h
-+++ b/src/cryptonote_basic/cryptonote_basic_impl.h
-@@ -40,7 +40,11 @@ namespace cryptonote {
- /* */
- /************************************************************************/
- template<class t_array>
-+#ifdef __APPLE__
-+ struct array_hasher: std::__unary_function<t_array&, std::size_t>
-+#else
- struct array_hasher: std::unary_function<t_array&, std::size_t>
-+#endif
- {
- std::size_t operator()(const t_array& val) const
- {
---
-2.49.0
-
diff --git a/patches/monero/0018-depends-remove-icu4c-monero-project-monero-8880.patch b/patches/monero/0018-depends-remove-icu4c-monero-project-monero-8880.patch
new file mode 100644
index 0000000..84b4b99
--- /dev/null
+++ b/patches/monero/0018-depends-remove-icu4c-monero-project-monero-8880.patch
@@ -0,0 +1,39 @@
+From 960a5efe59725eab4c03ce8025de8fc0fbffaacf Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Tue, 3 Mar 2026 13:55:59 +0100
+Subject: [PATCH 18/20] depends: remove icu4c monero-project/monero#8880
+
+---
+ CMakeLists.txt | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ce5e1b557..25e034301 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1117,20 +1117,15 @@ if(MINGW)
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
+ set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
+ if(DEPENDS)
+- set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv)
++ set(ICU_LIBRARIES iconv)
+ else()
+ # This is an extremely ugly hack to get around Boost not being built with static ICU.
+ # We reported the issue, we are waiting for upstream to fix this issue: https://github.com/boostorg/boost/issues/1079#issue-3384962885
+ # This hack links shared ICU libs to avoid linker errors we get in MSYS2 compilation (undefined symbols to ICU).
+ set(OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a")
+- find_library(ICUIO_LIBRARIES NAMES icuio REQUIRED)
+- find_library(ICUIN_LIBRARIES NAMES icuin REQUIRED)
+- find_library(ICUUC_LIBRARIES NAMES icuuc REQUIRED)
+- find_library(ICUDT_LIBRARIES NAMES icudt REQUIRED)
+- find_library(ICUTU_LIBRARIES NAMES icutu REQUIRED)
+ find_library(ICONV_LIBRARIES NAMES iconv REQUIRED)
+- set(ICU_LIBRARIES ${ICUIO_LIBRARIES} ${ICUIN_LIBRARIES} ${ICUUC_LIBRARIES} ${ICUDT_LIBRARIES} ${ICUTU_LIBRARIES} ${ICONV_LIBRARIES})
++ set(ICU_LIBRARIES ${ICUIO_LIBRARIES} ${ICONV_LIBRARIES})
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
+ endif()
+ elseif(APPLE OR OPENBSD OR ANDROID)
+--
+2.50.1 (Apple Git-155)
+
diff --git a/patches/monero/0019-fix-mingw-build-issues.patch b/patches/monero/0019-fix-mingw-build-issues.patch
new file mode 100644
index 0000000..a9e7b5c
--- /dev/null
+++ b/patches/monero/0019-fix-mingw-build-issues.patch
@@ -0,0 +1,46 @@
+From 2d4ed0b13eea96b25a574e8a87644df75c16ffb0 Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Wed, 4 Mar 2026 14:52:14 +0100
+Subject: [PATCH 19/20] fix: mingw build issues
+
+---
+ contrib/epee/include/serialization/keyvalue_serialization.h | 1 +
+ contrib/epee/src/abstract_http_client.cpp | 3 ++-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/epee/include/serialization/keyvalue_serialization.h b/contrib/epee/include/serialization/keyvalue_serialization.h
+index fbbddc7d2..5104f284d 100644
+--- a/contrib/epee/include/serialization/keyvalue_serialization.h
++++ b/contrib/epee/include/serialization/keyvalue_serialization.h
+@@ -26,6 +26,7 @@
+
+ #pragma once
+
++#include <cstdint>
+ #include <type_traits>
+ #include <boost/utility/value_init.hpp>
+ #include <boost/foreach.hpp>
+diff --git a/contrib/epee/src/abstract_http_client.cpp b/contrib/epee/src/abstract_http_client.cpp
+index ed4a193d9..2352c7d62 100644
+--- a/contrib/epee/src/abstract_http_client.cpp
++++ b/contrib/epee/src/abstract_http_client.cpp
+@@ -3,6 +3,7 @@
+ #include "net/http_base.h"
+ #include "net/net_parse_helpers.h"
+ #include "misc_log_ex.h"
++#include <cmath>
+
+ #undef MONERO_DEFAULT_LOG_CATEGORY
+ #define MONERO_DEFAULT_LOG_CATEGORY "net.http"
+@@ -39,7 +40,7 @@ namespace net_utils
+ while (num_char >= radix)
+ {
+ temp = num_char % radix;
+- num_char = (int)floor((float)num_char / (float)radix);
++ num_char = (int)std::floor((float)num_char / (float)radix);
+ csTmp = get_hex_vals()[temp];
+ }
+
+--
+2.50.1 (Apple Git-155)
+
diff --git a/patches/monero/0020-fix-remove-flaky-test.patch b/patches/monero/0020-fix-remove-flaky-test.patch
new file mode 100644
index 0000000..1075db5
--- /dev/null
+++ b/patches/monero/0020-fix-remove-flaky-test.patch
@@ -0,0 +1,27 @@
+From 81eb38a5add85266cc0d2aa39ecba9d62337f4b1 Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Thu, 5 Mar 2026 18:12:53 +0100
+Subject: [PATCH 20/20] fix: remove flaky test
+
+---
+ CMakeLists.txt | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 25e034301..19417f072 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -235,9 +235,7 @@ add_library(l3 OBJECT incorrect_source.cpp)
+ "-DCMAKE_MODULE_LINKER_FLAGS=${CMAKE_MODULE_LINKER_FLAGS}"
+ "-DEXPECT_SUCCESS=${EXPECT}"
+ )
+- if (NOT ${SUCCESS} STREQUAL ${EXPECT})
+- message(FATAL_ERROR "Undefined symbols test failure: expect(${EXPECT}), success(${SUCCESS})")
+- endif()
++
+ file(REMOVE_RECURSE "${TEST_PROJECT}")
+ endforeach()
+ endfunction()
+--
+2.50.1 (Apple Git-155)
+
diff --git a/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch b/patches/wownero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch
index ca9ccfd..6b5dbe0 100644
--- a/patches/wownero/0002-fix-missing-___clear_cache-when-targetting-iOS.patch
+++ b/patches/wownero/0001-fix-missing-___clear_cache-when-targetting-iOS.patch
@@ -1,7 +1,7 @@
-From 4828befb3843764eaaa5e5ea489cde6d101d71ce Mon Sep 17 00:00:00 2001
+From 8de3cd7566eb3a6f3dd88d1e4126d2b16cfdea14 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 23 Oct 2024 15:18:21 +0200
-Subject: [PATCH 02/15] fix missing ___clear_cache when targetting iOS
+Subject: [PATCH 01/16] fix missing ___clear_cache when targetting iOS
---
external/randomwow | 2 +-
@@ -15,5 +15,5 @@ index 27b099b6d..6f30d4b92 160000
-Subproject commit 27b099b6dd6fef6e17f58c6dfe00009e9c5df587
+Subproject commit 6f30d4b924fecb231e5b683915cc75d18b3b5866
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch b/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch
deleted file mode 100644
index e45deb1..0000000
--- a/patches/wownero/0001-wallet-background-sync-with-just-the-view-key.patch
+++ /dev/null
@@ -1,4309 +0,0 @@
-From 6ebd4546355d3d6ed82e3d30a45ecb06310b958e Mon Sep 17 00:00:00 2001
-From: j-berman <justinberman@protonmail.com>
-Date: Thu, 13 Oct 2022 18:33:33 -0700
-Subject: [PATCH 01/15] wallet: background sync with just the view key
-
-- When background syncing, the wallet wipes the spend key
-from memory and processes all new transactions. The wallet saves
-all receives, spends, and "plausible" spends of receives the
-wallet does not know key images for.
-- When background sync disabled, the wallet processes all
-background synced txs and then clears the background sync cache.
-- Adding "plausible" spends to the background sync cache ensures
-that the wallet does not need to query the daemon to see if any
-received outputs were spent while background sync was enabled.
-This would harm privacy especially for users of 3rd party daemons.
-- To enable the feature in the CLI wallet, the user can set
-background-sync to reuse-wallet-password or
-custom-background-password and the wallet automatically syncs in
-the background when the wallet locks, then processes all
-background synced txs when the wallet is unlocked.
-- The custom-background-password option enables the user to
-open a distinct background wallet that only has a view key saved
-and can be opened/closed/synced separately from the main wallet.
-When the main wallet opens, it processes the background wallet's
-cache.
-- To enable the feature in the RPC wallet, there is a new
-`/setup_background_sync` endpoint.
-- HW, multsig and view-only wallets cannot background sync.
----
- src/cryptonote_basic/account.cpp | 11 +
- src/cryptonote_basic/account.h | 1 +
- src/cryptonote_config.h | 2 +
- src/simplewallet/simplewallet.cpp | 204 +++-
- src/simplewallet/simplewallet.h | 1 +
- src/wallet/api/wallet.cpp | 213 +++-
- src/wallet/api/wallet.h | 12 +
- src/wallet/api/wallet2_api.h | 42 +
- src/wallet/wallet2.cpp | 1028 ++++++++++++++++--
- src/wallet/wallet2.h | 156 ++-
- src/wallet/wallet_errors.h | 39 +
- src/wallet/wallet_rpc_server.cpp | 162 +++
- src/wallet/wallet_rpc_server.h | 6 +
- src/wallet/wallet_rpc_server_commands_defs.h | 64 ++
- src/wallet/wallet_rpc_server_error_codes.h | 2 +
- tests/functional_tests/transfer.py | 400 ++++++-
- tests/functional_tests/util_resources.py | 25 +
- tests/functional_tests/wallet.py | 43 +-
- tests/unit_tests/wipeable_string.cpp | 12 +
- utils/python-rpc/framework/wallet.py | 42 +
- 20 files changed, 2336 insertions(+), 129 deletions(-)
-
-diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp
-index 2ac455fda..4e87d4477 100644
---- a/src/cryptonote_basic/account.cpp
-+++ b/src/cryptonote_basic/account.cpp
-@@ -152,6 +152,17 @@ DISABLE_VS_WARNINGS(4244 4345)
- m_keys.m_multisig_keys.clear();
- }
- //-----------------------------------------------------------------
-+ void account_base::set_spend_key(const crypto::secret_key& spend_secret_key)
-+ {
-+ // make sure derived spend public key matches saved public spend key
-+ crypto::public_key spend_public_key;
-+ crypto::secret_key_to_public_key(spend_secret_key, spend_public_key);
-+ CHECK_AND_ASSERT_THROW_MES(m_keys.m_account_address.m_spend_public_key == spend_public_key,
-+ "Unexpected derived public spend key");
-+
-+ m_keys.m_spend_secret_key = spend_secret_key;
-+ }
-+ //-----------------------------------------------------------------
- crypto::secret_key account_base::generate(const crypto::secret_key& recovery_key, bool recover, bool two_random)
- {
- crypto::secret_key first = generate_keys(m_keys.m_account_address.m_spend_public_key, m_keys.m_spend_secret_key, recovery_key, recover);
-diff --git a/src/cryptonote_basic/account.h b/src/cryptonote_basic/account.h
-index 2ee9545d4..93d1d28f0 100644
---- a/src/cryptonote_basic/account.h
-+++ b/src/cryptonote_basic/account.h
-@@ -95,6 +95,7 @@ namespace cryptonote
- bool store(const std::string& file_path);
-
- void forget_spend_key();
-+ void set_spend_key(const crypto::secret_key& spend_secret_key);
- const std::vector<crypto::secret_key> &get_multisig_keys() const { return m_keys.m_multisig_keys; }
-
- void encrypt_keys(const crypto::chacha_key &key) { m_keys.encrypt(key); }
-diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h
-index 8c0d3ce20..8b5091a46 100644
---- a/src/cryptonote_config.h
-+++ b/src/cryptonote_config.h
-@@ -253,6 +253,8 @@ namespace config
- const unsigned char HASH_KEY_ENCRYPTED_PAYMENT_ID = 0x8d;
- const unsigned char HASH_KEY_WALLET = 0x8c;
- const unsigned char HASH_KEY_WALLET_CACHE = 0x8d;
-+ const unsigned char HASH_KEY_BACKGROUND_CACHE = 0x8e;
-+ const unsigned char HASH_KEY_BACKGROUND_KEYS_FILE = 0x8f;
- const unsigned char HASH_KEY_RPC_PAYMENT_NONCE = 0x58;
- const unsigned char HASH_KEY_MEMORY = 'k';
- const unsigned char HASH_KEY_MULTISIG[] = {'M', 'u', 'l', 't' , 'i', 's', 'i', 'g', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
-index e0a08eec0..83b56c3f4 100644
---- a/src/simplewallet/simplewallet.cpp
-+++ b/src/simplewallet/simplewallet.cpp
-@@ -155,6 +155,17 @@ typedef cryptonote::simple_wallet sw;
- } \
- } while(0)
-
-+#define CHECK_IF_BACKGROUND_SYNCING(msg) \
-+ do \
-+ { \
-+ if (m_wallet->is_background_wallet() || m_wallet->is_background_syncing()) \
-+ { \
-+ std::string type = m_wallet->is_background_wallet() ? "background wallet" : "background syncing wallet"; \
-+ fail_msg_writer() << boost::format(tr("%s %s")) % type % msg; \
-+ return false; \
-+ } \
-+ } while (0)
-+
- static std::string get_human_readable_timespan(std::chrono::seconds seconds);
- static std::string get_human_readable_timespan(uint64_t seconds);
-
-@@ -325,7 +336,7 @@ namespace
- auto pwd_container = tools::password_container::prompt(verify, prompt);
- if (!pwd_container)
- {
-- tools::fail_msg_writer() << sw::tr("failed to read wallet password");
-+ tools::fail_msg_writer() << sw::tr("failed to read password");
- }
- return pwd_container;
- }
-@@ -335,6 +346,11 @@ namespace
- return password_prompter(verify ? sw::tr("Enter a new password for the wallet") : sw::tr("Wallet password"), verify);
- }
-
-+ boost::optional<tools::password_container> background_sync_cache_password_prompter(bool verify)
-+ {
-+ return password_prompter(verify ? sw::tr("Enter a custom password for the background sync cache") : sw::tr("Background sync cache password"), verify);
-+ }
-+
- inline std::string interpret_rpc_response(bool ok, const std::string& status)
- {
- std::string err;
-@@ -452,6 +468,41 @@ namespace
- return "invalid";
- }
-
-+ const struct
-+ {
-+ const char *name;
-+ tools::wallet2::BackgroundSyncType background_sync_type;
-+ } background_sync_type_names[] =
-+ {
-+ { "off", tools::wallet2::BackgroundSyncOff },
-+ { "reuse-wallet-password", tools::wallet2::BackgroundSyncReusePassword },
-+ { "custom-background-password", tools::wallet2::BackgroundSyncCustomPassword },
-+ };
-+
-+ bool parse_background_sync_type(const std::string &s, tools::wallet2::BackgroundSyncType &background_sync_type)
-+ {
-+ for (size_t n = 0; n < sizeof(background_sync_type_names) / sizeof(background_sync_type_names[0]); ++n)
-+ {
-+ if (s == background_sync_type_names[n].name)
-+ {
-+ background_sync_type = background_sync_type_names[n].background_sync_type;
-+ return true;
-+ }
-+ }
-+ fail_msg_writer() << cryptonote::simple_wallet::tr("failed to parse background sync type");
-+ return false;
-+ }
-+
-+ std::string get_background_sync_type_name(tools::wallet2::BackgroundSyncType type)
-+ {
-+ for (size_t n = 0; n < sizeof(background_sync_type_names) / sizeof(background_sync_type_names[0]); ++n)
-+ {
-+ if (type == background_sync_type_names[n].background_sync_type)
-+ return background_sync_type_names[n].name;
-+ }
-+ return "invalid";
-+ }
-+
- std::string get_version_string(uint32_t version)
- {
- return boost::lexical_cast<std::string>(version >> 16) + "." + boost::lexical_cast<std::string>(version & 0xffff);
-@@ -805,6 +856,7 @@ bool simple_wallet::spendkey(const std::vector<std::string> &args/* = std::vecto
- fail_msg_writer() << tr("wallet is watch-only and has no spend key");
- return true;
- }
-+ CHECK_IF_BACKGROUND_SYNCING("has no spend key");
- // don't log
- PAUSE_READLINE();
- if (m_wallet->key_on_device()) {
-@@ -836,6 +888,7 @@ bool simple_wallet::print_seed(bool encrypted)
- fail_msg_writer() << tr("wallet is watch-only and has no seed");
- return true;
- }
-+ CHECK_IF_BACKGROUND_SYNCING("has no seed");
-
- multisig = m_wallet->multisig(&ready);
- if (multisig)
-@@ -913,6 +966,7 @@ bool simple_wallet::seed_set_language(const std::vector<std::string> &args/* = s
- fail_msg_writer() << tr("wallet is watch-only and has no seed");
- return true;
- }
-+ CHECK_IF_BACKGROUND_SYNCING("has no seed");
-
- epee::wipeable_string password;
- {
-@@ -1059,6 +1113,7 @@ bool simple_wallet::prepare_multisig_main(const std::vector<std::string> &args,
- fail_msg_writer() << tr("wallet is watch-only and cannot be made multisig");
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING("cannot be made multisig");
-
- if(m_wallet->get_num_transfer_details())
- {
-@@ -2195,6 +2250,7 @@ bool simple_wallet::save_known_rings(const std::vector<std::string> &args)
-
- bool simple_wallet::freeze_thaw(const std::vector<std::string> &args, bool freeze)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot freeze/thaw");
- if (args.empty())
- {
- fail_msg_writer() << boost::format(tr("usage: %s <key_image>|<pubkey>")) % (freeze ? "freeze" : "thaw");
-@@ -2234,6 +2290,7 @@ bool simple_wallet::thaw(const std::vector<std::string> &args)
-
- bool simple_wallet::frozen(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot see frozen key images");
- if (args.empty())
- {
- size_t ntd = m_wallet->get_num_transfer_details();
-@@ -3005,6 +3062,57 @@ bool simple_wallet::set_track_uses(const std::vector<std::string> &args/* = std:
- return true;
- }
-
-+bool simple_wallet::setup_background_sync(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
-+{
-+ if (m_wallet->multisig())
-+ {
-+ fail_msg_writer() << tr("background sync not implemented for multisig wallet");
-+ return true;
-+ }
-+ if (m_wallet->watch_only())
-+ {
-+ fail_msg_writer() << tr("background sync not implemented for watch only wallet");
-+ return true;
-+ }
-+ if (m_wallet->key_on_device())
-+ {
-+ fail_msg_writer() << tr("command not supported by HW wallet");
-+ return true;
-+ }
-+
-+ tools::wallet2::BackgroundSyncType background_sync_type;
-+ if (!parse_background_sync_type(args[1], background_sync_type))
-+ {
-+ fail_msg_writer() << tr("invalid option");
-+ return true;
-+ }
-+
-+ const auto pwd_container = get_and_verify_password();
-+ if (!pwd_container)
-+ return true;
-+
-+ try
-+ {
-+ boost::optional<epee::wipeable_string> background_cache_password = boost::none;
-+ if (background_sync_type == tools::wallet2::BackgroundSyncCustomPassword)
-+ {
-+ const auto background_pwd_container = background_sync_cache_password_prompter(true);
-+ if (!background_pwd_container)
-+ return true;
-+ background_cache_password = background_pwd_container->password();
-+ }
-+
-+ LOCK_IDLE_SCOPE();
-+ m_wallet->setup_background_sync(background_sync_type, pwd_container->password(), background_cache_password);
-+ }
-+ catch (const std::exception &e)
-+ {
-+ fail_msg_writer() << tr("Error setting background sync type: ") << e.what();
-+ }
-+
-+ return true;
-+}
-+
- bool simple_wallet::set_show_wallet_name_when_locked(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
- {
- const auto pwd_container = get_and_verify_password();
-@@ -3237,6 +3345,7 @@ bool simple_wallet::apropos(const std::vector<std::string> &args)
-
- bool simple_wallet::scan_tx(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot scan tx");
- if (args.empty())
- {
- PRINT_USAGE(USAGE_SCAN_TX);
-@@ -3459,6 +3568,8 @@ simple_wallet::simple_wallet()
- " Ignore outputs of amount above this threshold when spending. Value 0 is translated to the maximum value (18 million) which disables this filter.\n "
- "ignore-outputs-below <amount>\n "
- " Ignore outputs of amount below this threshold when spending.\n "
-+ "background-sync <off|reuse-wallet-password|custom-background-password>\n "
-+ " Set this to enable scanning in the background with just the view key while the wallet is locked.\n "
- "track-uses <1|0>\n "
- " Whether to keep track of owned outputs uses.\n "
- "setup-background-mining <1|0>\n "
-@@ -3879,6 +3990,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
- success_msg_writer() << "ignore-outputs-above = " << cryptonote::print_money(m_wallet->ignore_outputs_above());
- success_msg_writer() << "ignore-outputs-below = " << cryptonote::print_money(m_wallet->ignore_outputs_below());
- success_msg_writer() << "track-uses = " << m_wallet->track_uses();
-+ success_msg_writer() << "background-sync = " << get_background_sync_type_name(m_wallet->background_sync_type());
- success_msg_writer() << "setup-background-mining = " << setup_background_mining_string;
- success_msg_writer() << "device-name = " << m_wallet->device_name();
- success_msg_writer() << "export-format = " << (m_wallet->export_format() == tools::wallet2::ExportFormat::Ascii ? "ascii" : "binary");
-@@ -3897,6 +4009,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
- }
- else
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot change wallet settings");
-
- #define CHECK_SIMPLE_VARIABLE(name, f, help) do \
- if (args[0] == name) { \
-@@ -3950,6 +4063,7 @@ bool simple_wallet::set_variable(const std::vector<std::string> &args)
- CHECK_SIMPLE_VARIABLE("ignore-outputs-above", set_ignore_outputs_above, tr("amount"));
- CHECK_SIMPLE_VARIABLE("ignore-outputs-below", set_ignore_outputs_below, tr("amount"));
- CHECK_SIMPLE_VARIABLE("track-uses", set_track_uses, tr("0 or 1"));
-+ CHECK_SIMPLE_VARIABLE("background-sync", setup_background_sync, tr("off (default); reuse-wallet-password (reuse the wallet password to encrypt the background cache); custom-background-password (use a custom background password to encrypt the background cache)"));
- CHECK_SIMPLE_VARIABLE("show-wallet-name-when-locked", set_show_wallet_name_when_locked, tr("1 or 0"));
- CHECK_SIMPLE_VARIABLE("inactivity-lock-timeout", set_inactivity_lock_timeout, tr("unsigned integer (seconds, 0 to disable)"));
- CHECK_SIMPLE_VARIABLE("setup-background-mining", set_setup_background_mining, tr("1/yes or 0/no"));
-@@ -4904,7 +5018,10 @@ std::string simple_wallet::get_mnemonic_language()
- //----------------------------------------------------------------------------------------------------
- boost::optional<tools::password_container> simple_wallet::get_and_verify_password() const
- {
-- auto pwd_container = default_password_prompter(m_wallet_file.empty());
-+ const bool verify = m_wallet_file.empty();
-+ auto pwd_container = (m_wallet->is_background_wallet() && m_wallet->background_sync_type() == tools::wallet2::BackgroundSyncCustomPassword)
-+ ? background_sync_cache_password_prompter(verify)
-+ : default_password_prompter(verify);
- if (!pwd_container)
- return boost::none;
-
-@@ -5208,6 +5325,8 @@ boost::optional<epee::wipeable_string> simple_wallet::open_wallet(const boost::p
- prefix = tr("Opened watch-only wallet");
- else if (m_wallet->multisig(&ready, &threshold, &total))
- prefix = (boost::format(tr("Opened %u/%u multisig wallet%s")) % threshold % total % (ready ? "" : " (not yet finalized)")).str();
-+ else if (m_wallet->is_background_wallet())
-+ prefix = tr("Opened background wallet");
- else
- prefix = tr("Opened wallet");
- message_writer(console_color_white, true) <<
-@@ -5415,6 +5534,10 @@ void simple_wallet::stop_background_mining()
- //----------------------------------------------------------------------------------------------------
- void simple_wallet::check_background_mining(const epee::wipeable_string &password)
- {
-+ // Background mining can be toggled from the main wallet
-+ if (m_wallet->is_background_wallet() || m_wallet->is_background_syncing())
-+ return;
-+
- tools::wallet2::BackgroundMiningSetupType setup = m_wallet->setup_background_mining();
- if (setup == tools::wallet2::BackgroundMiningNo)
- {
-@@ -6287,6 +6410,7 @@ bool simple_wallet::show_blockchain_height(const std::vector<std::string>& args)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::rescan_spent(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot rescan spent");
- if (!m_wallet->is_trusted_daemon())
- {
- fail_msg_writer() << tr("this command requires a trusted daemon. Enable with --trusted-daemon");
-@@ -6584,11 +6708,27 @@ void simple_wallet::check_for_inactivity_lock(bool user)
- " B B " << std::endl <<
- "" << std::endl;
- }
-+
-+ bool started_background_sync = false;
-+ if (!m_wallet->is_background_wallet() &&
-+ m_wallet->background_sync_type() != tools::wallet2::BackgroundSyncOff)
-+ {
-+ LOCK_IDLE_SCOPE();
-+ m_wallet->start_background_sync();
-+ started_background_sync = true;
-+ }
-+
- while (1)
- {
- const char *inactivity_msg = user ? "" : tr("Locked due to inactivity.");
-- tools::msg_writer() << inactivity_msg << (inactivity_msg[0] ? " " : "") << tr("The wallet password is required to unlock the console.");
-+ tools::msg_writer() << inactivity_msg << (inactivity_msg[0] ? " " : "") << (
-+ (m_wallet->is_background_wallet() && m_wallet->background_sync_type() == tools::wallet2::BackgroundSyncCustomPassword)
-+ ? tr("The background password is required to unlock the console.")
-+ : tr("The wallet password is required to unlock the console.")
-+ );
-
-+ if (m_wallet->is_background_syncing())
-+ tools::msg_writer() << tr("\nSyncing in the background while locked...") << std::endl;
- const bool show_wallet_name = m_wallet->show_wallet_name_when_locked();
- if (show_wallet_name)
- {
-@@ -6600,8 +6740,16 @@ void simple_wallet::check_for_inactivity_lock(bool user)
- }
- try
- {
-- if (get_and_verify_password())
-+ const auto pwd_container = get_and_verify_password();
-+ if (pwd_container)
-+ {
-+ if (started_background_sync)
-+ {
-+ LOCK_IDLE_SCOPE();
-+ m_wallet->stop_background_sync(pwd_container->password());
-+ }
- break;
-+ }
- }
- catch (...) { /* do nothing, just let the loop loop */ }
- }
-@@ -6628,6 +6776,7 @@ bool simple_wallet::on_command(bool (simple_wallet::*cmd)(const std::vector<std:
- bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool called_by_mms)
- {
- // "transfer [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] <address> <amount> [<payment_id>]"
-+ CHECK_IF_BACKGROUND_SYNCING("cannot transfer");
- if (!try_connect_to_daemon())
- return false;
-
-@@ -7056,6 +7205,7 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool ca
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::transfer(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot transfer");
- if (args_.size() < 1)
- {
- PRINT_USAGE(USAGE_TRANSFER);
-@@ -7068,6 +7218,7 @@ bool simple_wallet::transfer(const std::vector<std::string> &args_)
-
- bool simple_wallet::sweep_unmixable(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot sweep");
- if (!try_connect_to_daemon())
- return true;
-
-@@ -7175,6 +7326,7 @@ bool simple_wallet::sweep_unmixable(const std::vector<std::string> &args_)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::sweep_main(uint32_t account, uint64_t below, const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot sweep");
- auto print_usage = [this, account, below]()
- {
- if (below)
-@@ -7456,6 +7608,7 @@ bool simple_wallet::sweep_main(uint32_t account, uint64_t below, const std::vect
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::sweep_single(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot sweep");
- if (!try_connect_to_daemon())
- return true;
-
-@@ -7694,12 +7847,14 @@ bool simple_wallet::sweep_single(const std::vector<std::string> &args_)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::sweep_all(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot sweep");
- sweep_main(m_current_subaddress_account, 0, args_);
- return true;
- }
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::sweep_account(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot sweep");
- auto local_args = args_;
- if (local_args.empty())
- {
-@@ -7720,6 +7875,7 @@ bool simple_wallet::sweep_account(const std::vector<std::string> &args_)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::sweep_below(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot sweep");
- uint64_t below = 0;
- if (args_.size() < 1)
- {
-@@ -7738,6 +7894,7 @@ bool simple_wallet::sweep_below(const std::vector<std::string> &args_)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::donate(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot donate");
- std::vector<std::string> local_args = args_;
- if(local_args.empty() || local_args.size() > 5)
- {
-@@ -7799,6 +7956,7 @@ bool simple_wallet::donate(const std::vector<std::string> &args_)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::accept_loaded_tx(const std::function<size_t()> get_num_txes, const std::function<const tools::wallet2::tx_construction_data&(size_t)> &get_tx, const std::string &extra_message)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot load tx");
- // gather info to ask the user
- uint64_t amount = 0, amount_to_dests = 0, change = 0;
- size_t min_ring_size = ~0;
-@@ -7980,6 +8138,8 @@ bool simple_wallet::sign_transfer(const std::vector<std::string> &args_)
- return true;
- }
-
-+ CHECK_IF_BACKGROUND_SYNCING("cannot sign transfer");
-+
- bool export_raw = false;
- std::string unsigned_filename = "unsigned_wownero_tx";
- if (args_.size() > 2 || (args_.size() == 2 && args_[0] != "export_raw"))
-@@ -8086,6 +8246,8 @@ std::string get_tx_key_stream(crypto::secret_key tx_key, std::vector<crypto::sec
-
- bool simple_wallet::get_tx_key(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot get tx key");
-+
- std::vector<std::string> local_args = args_;
-
- if (m_wallet->key_on_device() && m_wallet->get_account().get_device().get_type() != hw::device::TREZOR)
-@@ -8126,6 +8288,8 @@ bool simple_wallet::get_tx_key(const std::vector<std::string> &args_)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::set_tx_key(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot set tx key");
-+
- std::vector<std::string> local_args = args_;
-
- if(local_args.size() != 2 && local_args.size() != 3) {
-@@ -8202,6 +8366,8 @@ bool simple_wallet::set_tx_key(const std::vector<std::string> &args_)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::get_tx_proof(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot get tx proof");
-+
- if (args.size() != 2 && args.size() != 3)
- {
- PRINT_USAGE(USAGE_GET_TX_PROOF);
-@@ -8408,6 +8574,7 @@ bool simple_wallet::check_tx_proof(const std::vector<std::string> &args)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::get_spend_proof(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot get spend proof");
- if (m_wallet->key_on_device())
- {
- fail_msg_writer() << tr("command not supported by HW wallet");
-@@ -8492,6 +8659,7 @@ bool simple_wallet::check_spend_proof(const std::vector<std::string> &args)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::get_reserve_proof(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot get reserve proof");
- if (m_wallet->key_on_device())
- {
- fail_msg_writer() << tr("command not supported by HW wallet");
-@@ -9192,6 +9360,8 @@ bool simple_wallet::unspent_outputs(const std::vector<std::string> &args_)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::rescan_blockchain(const std::vector<std::string> &args_)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot rescan");
-+
- uint64_t start_height = 0;
- ResetType reset_type = ResetSoft;
-
-@@ -9489,6 +9659,7 @@ bool simple_wallet::account(const std::vector<std::string> &args/* = std::vector
- if (command == "new")
- {
- // create a new account and switch to it
-+ CHECK_IF_BACKGROUND_SYNCING("cannot create new account");
- std::string label = boost::join(local_args, " ");
- if (label.empty())
- label = tr("(Untitled account)");
-@@ -9519,6 +9690,7 @@ bool simple_wallet::account(const std::vector<std::string> &args/* = std::vector
- else if (command == "label" && local_args.size() >= 1)
- {
- // set label of the specified account
-+ CHECK_IF_BACKGROUND_SYNCING("cannot modify account");
- uint32_t index_major;
- if (!epee::string_tools::get_xtype_from_string(index_major, local_args[0]))
- {
-@@ -9540,6 +9712,7 @@ bool simple_wallet::account(const std::vector<std::string> &args/* = std::vector
- }
- else if (command == "tag" && local_args.size() >= 2)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot modify account");
- const std::string tag = local_args[0];
- std::set<uint32_t> account_indices;
- for (size_t i = 1; i < local_args.size(); ++i)
-@@ -9564,6 +9737,7 @@ bool simple_wallet::account(const std::vector<std::string> &args/* = std::vector
- }
- else if (command == "untag" && local_args.size() >= 1)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot modify account");
- std::set<uint32_t> account_indices;
- for (size_t i = 0; i < local_args.size(); ++i)
- {
-@@ -9587,6 +9761,7 @@ bool simple_wallet::account(const std::vector<std::string> &args/* = std::vector
- }
- else if (command == "tag_description" && local_args.size() >= 1)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot modify account");
- const std::string tag = local_args[0];
- std::string description;
- if (local_args.size() > 1)
-@@ -9704,6 +9879,7 @@ bool simple_wallet::print_address(const std::vector<std::string> &args/* = std::
- }
- else if (local_args[0] == "new")
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot add address");
- local_args.erase(local_args.begin());
- std::string label;
- if (local_args.size() > 0)
-@@ -9716,6 +9892,7 @@ bool simple_wallet::print_address(const std::vector<std::string> &args/* = std::
- }
- else if (local_args[0] == "mnew")
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot add addresses");
- local_args.erase(local_args.begin());
- if (local_args.size() != 1)
- {
-@@ -9741,6 +9918,7 @@ bool simple_wallet::print_address(const std::vector<std::string> &args/* = std::
- }
- else if (local_args[0] == "one-off")
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot add address");
- local_args.erase(local_args.begin());
- std::string label;
- if (local_args.size() != 2)
-@@ -9759,6 +9937,7 @@ bool simple_wallet::print_address(const std::vector<std::string> &args/* = std::
- }
- else if (local_args.size() >= 2 && local_args[0] == "label")
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot modify address");
- if (!epee::string_tools::get_xtype_from_string(index, local_args[1]))
- {
- fail_msg_writer() << tr("failed to parse index: ") << local_args[1];
-@@ -9905,6 +10084,8 @@ bool simple_wallet::print_integrated_address(const std::vector<std::string> &arg
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::address_book(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot get address book");
-+
- if (args.size() == 0)
- {
- }
-@@ -9965,6 +10146,8 @@ bool simple_wallet::address_book(const std::vector<std::string> &args/* = std::v
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::set_tx_note(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot set tx note");
-+
- if (args.size() == 0)
- {
- PRINT_USAGE(USAGE_SET_TX_NOTE);
-@@ -9993,6 +10176,8 @@ bool simple_wallet::set_tx_note(const std::vector<std::string> &args)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::get_tx_note(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot get tx note");
-+
- if (args.size() != 1)
- {
- PRINT_USAGE(USAGE_GET_TX_NOTE);
-@@ -10018,6 +10203,8 @@ bool simple_wallet::get_tx_note(const std::vector<std::string> &args)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::set_description(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot set description");
-+
- // 0 arguments allowed, for setting the description to empty string
-
- std::string description = "";
-@@ -10034,6 +10221,8 @@ bool simple_wallet::set_description(const std::vector<std::string> &args)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::get_description(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot get description");
-+
- if (args.size() != 0)
- {
- PRINT_USAGE(USAGE_GET_DESCRIPTION);
-@@ -10092,6 +10281,8 @@ bool simple_wallet::wallet_info(const std::vector<std::string> &args)
- type = tr("Watch only");
- else if (m_wallet->multisig(&ready, &threshold, &total))
- type = (boost::format(tr("%u/%u multisig%s")) % threshold % total % (ready ? "" : " (not yet finalized)")).str();
-+ else if (m_wallet->is_background_wallet())
-+ type = tr("Background wallet");
- else
- type = tr("Normal");
- message_writer() << tr("Type: ") << type;
-@@ -10103,6 +10294,7 @@ bool simple_wallet::wallet_info(const std::vector<std::string> &args)
- //----------------------------------------------------------------------------------------------------
- bool simple_wallet::sign(const std::vector<std::string> &args)
- {
-+ CHECK_IF_BACKGROUND_SYNCING("cannot sign");
- if (m_wallet->key_on_device())
- {
- fail_msg_writer() << tr("command not supported by HW wallet");
-@@ -10210,6 +10402,7 @@ bool simple_wallet::export_key_images(const std::vector<std::string> &args_)
- fail_msg_writer() << tr("command not supported by HW wallet");
- return true;
- }
-+ CHECK_IF_BACKGROUND_SYNCING("cannot export key images");
- auto args = args_;
-
- if (m_wallet->watch_only())
-@@ -10263,6 +10456,7 @@ bool simple_wallet::import_key_images(const std::vector<std::string> &args)
- fail_msg_writer() << tr("command not supported by HW wallet");
- return true;
- }
-+ CHECK_IF_BACKGROUND_SYNCING("cannot import key images");
- if (!m_wallet->is_trusted_daemon())
- {
- fail_msg_writer() << tr("this command requires a trusted daemon. Enable with --trusted-daemon");
-@@ -10371,6 +10565,7 @@ bool simple_wallet::export_outputs(const std::vector<std::string> &args_)
- fail_msg_writer() << tr("command not supported by HW wallet");
- return true;
- }
-+ CHECK_IF_BACKGROUND_SYNCING("cannot export outputs");
- auto args = args_;
-
- bool all = false;
-@@ -10420,6 +10615,7 @@ bool simple_wallet::import_outputs(const std::vector<std::string> &args)
- fail_msg_writer() << tr("command not supported by HW wallet");
- return true;
- }
-+ CHECK_IF_BACKGROUND_SYNCING("cannot import outputs");
- if (args.size() != 1)
- {
- PRINT_USAGE(USAGE_IMPORT_OUTPUTS);
-diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h
-index d641dca1b..b98a40713 100644
---- a/src/simplewallet/simplewallet.h
-+++ b/src/simplewallet/simplewallet.h
-@@ -147,6 +147,7 @@ namespace cryptonote
- bool set_ignore_outputs_above(const std::vector<std::string> &args = std::vector<std::string>());
- bool set_ignore_outputs_below(const std::vector<std::string> &args = std::vector<std::string>());
- bool set_track_uses(const std::vector<std::string> &args = std::vector<std::string>());
-+ bool setup_background_sync(const std::vector<std::string> &args = std::vector<std::string>());
- bool set_show_wallet_name_when_locked(const std::vector<std::string> &args = std::vector<std::string>());
- bool set_inactivity_lock_timeout(const std::vector<std::string> &args = std::vector<std::string>());
- bool set_setup_background_mining(const std::vector<std::string> &args = std::vector<std::string>());
-diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index e81265ad3..e868fa039 100644
---- a/src/wallet/api/wallet.cpp
-+++ b/src/wallet/api/wallet.cpp
-@@ -54,6 +54,40 @@ using namespace cryptonote;
- #undef MONERO_DEFAULT_LOG_CATEGORY
- #define MONERO_DEFAULT_LOG_CATEGORY "WalletAPI"
-
-+#define LOCK_REFRESH() \
-+ bool refresh_enabled = m_refreshEnabled; \
-+ m_refreshEnabled = false; \
-+ m_wallet->stop(); \
-+ m_refreshCV.notify_one(); \
-+ boost::mutex::scoped_lock lock(m_refreshMutex); \
-+ boost::mutex::scoped_lock lock2(m_refreshMutex2); \
-+ epee::misc_utils::auto_scope_leave_caller scope_exit_handler = epee::misc_utils::create_scope_leave_handler([&](){ \
-+ /* m_refreshMutex's still locked here */ \
-+ if (refresh_enabled) \
-+ startRefresh(); \
-+ })
-+
-+#define PRE_VALIDATE_BACKGROUND_SYNC() \
-+ do \
-+ { \
-+ clearStatus(); \
-+ if (m_wallet->key_on_device()) \
-+ { \
-+ setStatusError(tr("HW wallet cannot use background sync")); \
-+ return false; \
-+ } \
-+ if (m_wallet->watch_only()) \
-+ { \
-+ setStatusError(tr("View only wallet cannot use background sync")); \
-+ return false; \
-+ } \
-+ if (m_wallet->multisig()) \
-+ { \
-+ setStatusError(tr("Multisig wallet cannot use background sync")); \
-+ return false; \
-+ } \
-+ } while (0)
-+
- namespace Monero {
-
- namespace {
-@@ -792,6 +826,8 @@ bool WalletImpl::close(bool store)
-
- std::string WalletImpl::seed(const std::string& seed_offset) const
- {
-+ if (checkBackgroundSync("cannot get seed"))
-+ return std::string();
- epee::wipeable_string seed;
- if (m_wallet)
- m_wallet->get_seed(seed, seed_offset);
-@@ -805,6 +841,8 @@ std::string WalletImpl::getSeedLanguage() const
-
- void WalletImpl::setSeedLanguage(const std::string &arg)
- {
-+ if (checkBackgroundSync("cannot set seed language"))
-+ return;
- m_wallet->set_seed_language(arg);
- }
-
-@@ -828,6 +866,8 @@ void WalletImpl::statusWithErrorString(int& status, std::string& errorString) co
-
- bool WalletImpl::setPassword(const std::string &password)
- {
-+ if (checkBackgroundSync("cannot change password"))
-+ return false;
- clearStatus();
- try {
- m_wallet->change_password(m_wallet->get_wallet_file(), m_password, password);
-@@ -988,6 +1028,8 @@ bool WalletImpl::lightWalletImportWalletRequest(std::string &payment_id, uint64_
-
- void WalletImpl::setRefreshFromBlockHeight(uint64_t refresh_from_block_height)
- {
-+ if (checkBackgroundSync("cannot change refresh height"))
-+ return;
- m_wallet->set_refresh_from_block_height(refresh_from_block_height);
- }
-
-@@ -1105,6 +1147,8 @@ void WalletImpl::refreshAsync()
-
- bool WalletImpl::rescanBlockchain()
- {
-+ if (checkBackgroundSync("cannot rescan blockchain"))
-+ return false;
- clearStatus();
- m_refreshShouldRescan = true;
- doRefresh();
-@@ -1113,6 +1157,8 @@ bool WalletImpl::rescanBlockchain()
-
- void WalletImpl::rescanBlockchainAsync()
- {
-+ if (checkBackgroundSync("cannot rescan blockchain"))
-+ return;
- m_refreshShouldRescan = true;
- refreshAsync();
- }
-@@ -1136,7 +1182,7 @@ int WalletImpl::autoRefreshInterval() const
- UnsignedTransaction *WalletImpl::loadUnsignedTx(const std::string &unsigned_filename) {
- clearStatus();
- UnsignedTransactionImpl * transaction = new UnsignedTransactionImpl(*this);
-- if (!m_wallet->load_unsigned_tx(unsigned_filename, transaction->m_unsigned_tx_set)){
-+ if (checkBackgroundSync("cannot load tx") || !m_wallet->load_unsigned_tx(unsigned_filename, transaction->m_unsigned_tx_set)){
- setStatusError(tr("Failed to load unsigned transactions"));
- transaction->m_status = UnsignedTransaction::Status::Status_Error;
- transaction->m_errorString = errorString();
-@@ -1156,6 +1202,8 @@ UnsignedTransaction *WalletImpl::loadUnsignedTx(const std::string &unsigned_file
-
- bool WalletImpl::submitTransaction(const string &fileName) {
- clearStatus();
-+ if (checkBackgroundSync("cannot submit tx"))
-+ return false;
- std::unique_ptr<PendingTransactionImpl> transaction(new PendingTransactionImpl(*this));
-
- bool r = m_wallet->load_tx(fileName, transaction->m_pending_tx);
-@@ -1179,6 +1227,8 @@ bool WalletImpl::exportKeyImages(const string &filename, bool all)
- setStatusError(tr("Wallet is view only"));
- return false;
- }
-+ if (checkBackgroundSync("cannot export key images"))
-+ return false;
-
- try
- {
-@@ -1199,6 +1249,8 @@ bool WalletImpl::exportKeyImages(const string &filename, bool all)
-
- bool WalletImpl::importKeyImages(const string &filename)
- {
-+ if (checkBackgroundSync("cannot import key images"))
-+ return false;
- if (!trustedDaemon()) {
- setStatusError(tr("Key images can only be imported with a trusted daemon"));
- return false;
-@@ -1222,6 +1274,8 @@ bool WalletImpl::importKeyImages(const string &filename)
-
- bool WalletImpl::exportOutputs(const string &filename, bool all)
- {
-+ if (checkBackgroundSync("cannot export outputs"))
-+ return false;
- if (m_wallet->key_on_device())
- {
- setStatusError(string(tr("Not supported on HW wallets.")) + filename);
-@@ -1252,6 +1306,8 @@ bool WalletImpl::exportOutputs(const string &filename, bool all)
-
- bool WalletImpl::importOutputs(const string &filename)
- {
-+ if (checkBackgroundSync("cannot import outputs"))
-+ return false;
- if (m_wallet->key_on_device())
- {
- setStatusError(string(tr("Not supported on HW wallets.")) + filename);
-@@ -1284,6 +1340,8 @@ bool WalletImpl::importOutputs(const string &filename)
-
- bool WalletImpl::scanTransactions(const std::vector<std::string> &txids)
- {
-+ if (checkBackgroundSync("cannot scan transactions"))
-+ return false;
- if (txids.empty())
- {
- setStatusError(string(tr("Failed to scan transactions: no transaction ids provided.")));
-@@ -1322,8 +1380,86 @@ bool WalletImpl::scanTransactions(const std::vector<std::string> &txids)
- return true;
- }
-
-+bool WalletImpl::setupBackgroundSync(const Wallet::BackgroundSyncType background_sync_type, const std::string &wallet_password, const optional<std::string> &background_cache_password)
-+{
-+ try
-+ {
-+ PRE_VALIDATE_BACKGROUND_SYNC();
-+
-+ tools::wallet2::BackgroundSyncType bgs_type;
-+ switch (background_sync_type)
-+ {
-+ case Wallet::BackgroundSync_Off: bgs_type = tools::wallet2::BackgroundSyncOff; break;
-+ case Wallet::BackgroundSync_ReusePassword: bgs_type = tools::wallet2::BackgroundSyncReusePassword; break;
-+ case Wallet::BackgroundSync_CustomPassword: bgs_type = tools::wallet2::BackgroundSyncCustomPassword; break;
-+ default: setStatusError(tr("Unknown background sync type")); return false;
-+ }
-+
-+ boost::optional<epee::wipeable_string> bgc_password = background_cache_password
-+ ? boost::optional<epee::wipeable_string>(*background_cache_password)
-+ : boost::none;
-+
-+ LOCK_REFRESH();
-+ m_wallet->setup_background_sync(bgs_type, wallet_password, bgc_password);
-+ }
-+ catch (const std::exception &e)
-+ {
-+ LOG_ERROR("Failed to setup background sync: " << e.what());
-+ setStatusError(string(tr("Failed to setup background sync: ")) + e.what());
-+ return false;
-+ }
-+ return true;
-+}
-+
-+Wallet::BackgroundSyncType WalletImpl::getBackgroundSyncType() const
-+{
-+ switch (m_wallet->background_sync_type())
-+ {
-+ case tools::wallet2::BackgroundSyncOff: return Wallet::BackgroundSync_Off;
-+ case tools::wallet2::BackgroundSyncReusePassword: return Wallet::BackgroundSync_ReusePassword;
-+ case tools::wallet2::BackgroundSyncCustomPassword: return Wallet::BackgroundSync_CustomPassword;
-+ default: setStatusError(tr("Unknown background sync type")); return Wallet::BackgroundSync_Off;
-+ }
-+}
-+
-+bool WalletImpl::startBackgroundSync()
-+{
-+ try
-+ {
-+ PRE_VALIDATE_BACKGROUND_SYNC();
-+ LOCK_REFRESH();
-+ m_wallet->start_background_sync();
-+ }
-+ catch (const std::exception &e)
-+ {
-+ LOG_ERROR("Failed to start background sync: " << e.what());
-+ setStatusError(string(tr("Failed to start background sync: ")) + e.what());
-+ return false;
-+ }
-+ return true;
-+}
-+
-+bool WalletImpl::stopBackgroundSync(const std::string &wallet_password)
-+{
-+ try
-+ {
-+ PRE_VALIDATE_BACKGROUND_SYNC();
-+ LOCK_REFRESH();
-+ m_wallet->stop_background_sync(epee::wipeable_string(wallet_password));
-+ }
-+ catch (const std::exception &e)
-+ {
-+ LOG_ERROR("Failed to stop background sync: " << e.what());
-+ setStatusError(string(tr("Failed to stop background sync: ")) + e.what());
-+ return false;
-+ }
-+ return true;
-+}
-+
- void WalletImpl::addSubaddressAccount(const std::string& label)
- {
-+ if (checkBackgroundSync("cannot add account"))
-+ return;
- m_wallet->add_subaddress_account(label);
- }
- size_t WalletImpl::numSubaddressAccounts() const
-@@ -1336,10 +1472,14 @@ size_t WalletImpl::numSubaddresses(uint32_t accountIndex) const
- }
- void WalletImpl::addSubaddress(uint32_t accountIndex, const std::string& label)
- {
-+ if (checkBackgroundSync("cannot add subbaddress"))
-+ return;
- m_wallet->add_subaddress(accountIndex, label);
- }
- std::string WalletImpl::getSubaddressLabel(uint32_t accountIndex, uint32_t addressIndex) const
- {
-+ if (checkBackgroundSync("cannot get subbaddress label"))
-+ return "";
- try
- {
- return m_wallet->get_subaddress_label({accountIndex, addressIndex});
-@@ -1353,6 +1493,8 @@ std::string WalletImpl::getSubaddressLabel(uint32_t accountIndex, uint32_t addre
- }
- void WalletImpl::setSubaddressLabel(uint32_t accountIndex, uint32_t addressIndex, const std::string &label)
- {
-+ if (checkBackgroundSync("cannot set subbaddress label"))
-+ return;
- try
- {
- return m_wallet->set_subaddress_label({accountIndex, addressIndex}, label);
-@@ -1366,12 +1508,16 @@ void WalletImpl::setSubaddressLabel(uint32_t accountIndex, uint32_t addressIndex
-
- MultisigState WalletImpl::multisig() const {
- MultisigState state;
-+ if (checkBackgroundSync("cannot use multisig"))
-+ return state;
- state.isMultisig = m_wallet->multisig(&state.isReady, &state.threshold, &state.total);
-
- return state;
- }
-
- string WalletImpl::getMultisigInfo() const {
-+ if (checkBackgroundSync("cannot use multisig"))
-+ return string();
- try {
- clearStatus();
- return m_wallet->get_multisig_first_kex_msg();
-@@ -1384,6 +1530,8 @@ string WalletImpl::getMultisigInfo() const {
- }
-
- string WalletImpl::makeMultisig(const vector<string>& info, const uint32_t threshold) {
-+ if (checkBackgroundSync("cannot make multisig"))
-+ return string();
- try {
- clearStatus();
-
-@@ -1524,6 +1672,9 @@ PendingTransaction *WalletImpl::createTransactionMultDest(const std::vector<stri
- PendingTransactionImpl * transaction = new PendingTransactionImpl(*this);
-
- do {
-+ if (checkBackgroundSync("cannot create transactions"))
-+ break;
-+
- std::vector<uint8_t> extra;
- std::string extra_nonce;
- vector<cryptonote::tx_destination_entry> dsts;
-@@ -1690,6 +1841,9 @@ PendingTransaction *WalletImpl::createSweepUnmixableTransaction()
- PendingTransactionImpl * transaction = new PendingTransactionImpl(*this);
-
- do {
-+ if (checkBackgroundSync("cannot sweep"))
-+ break;
-+
- try {
- transaction->m_pending_tx = m_wallet->create_unmixable_sweep_transactions();
- pendingTxPostProcess(transaction);
-@@ -1823,11 +1977,15 @@ uint32_t WalletImpl::defaultMixin() const
-
- void WalletImpl::setDefaultMixin(uint32_t arg)
- {
-+ if (checkBackgroundSync("cannot set default mixin"))
-+ return;
- m_wallet->default_mixin(arg);
- }
-
- bool WalletImpl::setCacheAttribute(const std::string &key, const std::string &val)
- {
-+ if (checkBackgroundSync("cannot set cache attribute"))
-+ return false;
- m_wallet->set_attribute(key, val);
- return true;
- }
-@@ -1841,6 +1999,8 @@ std::string WalletImpl::getCacheAttribute(const std::string &key) const
-
- bool WalletImpl::setUserNote(const std::string &txid, const std::string &note)
- {
-+ if (checkBackgroundSync("cannot set user note"))
-+ return false;
- cryptonote::blobdata txid_data;
- if(!epee::string_tools::parse_hexstr_to_binbuff(txid, txid_data) || txid_data.size() != sizeof(crypto::hash))
- return false;
-@@ -1852,6 +2012,8 @@ bool WalletImpl::setUserNote(const std::string &txid, const std::string &note)
-
- std::string WalletImpl::getUserNote(const std::string &txid) const
- {
-+ if (checkBackgroundSync("cannot get user note"))
-+ return "";
- cryptonote::blobdata txid_data;
- if(!epee::string_tools::parse_hexstr_to_binbuff(txid, txid_data) || txid_data.size() != sizeof(crypto::hash))
- return "";
-@@ -1862,6 +2024,9 @@ std::string WalletImpl::getUserNote(const std::string &txid) const
-
- std::string WalletImpl::getTxKey(const std::string &txid_str) const
- {
-+ if (checkBackgroundSync("cannot get tx key"))
-+ return "";
-+
- crypto::hash txid;
- if(!epee::string_tools::hex_to_pod(txid_str, txid))
- {
-@@ -1946,6 +2111,9 @@ bool WalletImpl::checkTxKey(const std::string &txid_str, std::string tx_key_str,
-
- std::string WalletImpl::getTxProof(const std::string &txid_str, const std::string &address_str, const std::string &message) const
- {
-+ if (checkBackgroundSync("cannot get tx proof"))
-+ return "";
-+
- crypto::hash txid;
- if (!epee::string_tools::hex_to_pod(txid_str, txid))
- {
-@@ -2002,6 +2170,9 @@ bool WalletImpl::checkTxProof(const std::string &txid_str, const std::string &ad
- }
-
- std::string WalletImpl::getSpendProof(const std::string &txid_str, const std::string &message) const {
-+ if (checkBackgroundSync("cannot get spend proof"))
-+ return "";
-+
- crypto::hash txid;
- if(!epee::string_tools::hex_to_pod(txid_str, txid))
- {
-@@ -2044,6 +2215,9 @@ bool WalletImpl::checkSpendProof(const std::string &txid_str, const std::string
- }
-
- std::string WalletImpl::getReserveProof(bool all, uint32_t account_index, uint64_t amount, const std::string &message) const {
-+ if (checkBackgroundSync("cannot get reserve proof"))
-+ return "";
-+
- try
- {
- clearStatus();
-@@ -2090,6 +2264,9 @@ bool WalletImpl::checkReserveProof(const std::string &address, const std::string
-
- std::string WalletImpl::signMessage(const std::string &message, const std::string &address)
- {
-+ if (checkBackgroundSync("cannot sign message"))
-+ return "";
-+
- if (address.empty()) {
- return m_wallet->sign(message, tools::wallet2::sign_with_spend_key);
- }
-@@ -2217,6 +2394,16 @@ bool WalletImpl::isDeterministic() const
- return m_wallet->is_deterministic();
- }
-
-+bool WalletImpl::isBackgroundSyncing() const
-+{
-+ return m_wallet->is_background_syncing();
-+}
-+
-+bool WalletImpl::isBackgroundWallet() const
-+{
-+ return m_wallet->is_background_wallet();
-+}
-+
- void WalletImpl::clearStatus() const
- {
- boost::lock_guard<boost::mutex> l(m_statusMutex);
-@@ -2285,9 +2472,7 @@ void WalletImpl::doRefresh()
- if(rescan)
- m_wallet->rescan_blockchain(false);
- m_wallet->refresh(trustedDaemon());
-- if (!m_synchronized) {
-- m_synchronized = true;
-- }
-+ m_synchronized = m_wallet->is_synced();
- // assuming if we have empty history, it wasn't initialized yet
- // for further history changes client need to update history in
- // "on_money_received" and "on_money_sent" callbacks
-@@ -2391,6 +2576,24 @@ bool WalletImpl::doInit(const string &daemon_address, const std::string &proxy_a
- return true;
- }
-
-+bool WalletImpl::checkBackgroundSync(const std::string &message) const
-+{
-+ clearStatus();
-+ if (m_wallet->is_background_wallet())
-+ {
-+ LOG_ERROR("Background wallets " + message);
-+ setStatusError(tr("Background wallets ") + message);
-+ return true;
-+ }
-+ if (m_wallet->is_background_syncing())
-+ {
-+ LOG_ERROR(message + " while background syncing");
-+ setStatusError(message + tr(" while background syncing. Stop background syncing first."));
-+ return true;
-+ }
-+ return false;
-+}
-+
- bool WalletImpl::parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error)
- {
- return m_wallet->parse_uri(uri, address, payment_id, amount, tx_description, recipient_name, unknown_parameters, error);
-@@ -2409,6 +2612,8 @@ std::string WalletImpl::getDefaultDataDir() const
- bool WalletImpl::rescanSpent()
- {
- clearStatus();
-+ if (checkBackgroundSync("cannot rescan spent"))
-+ return false;
- if (!trustedDaemon()) {
- setStatusError(tr("Rescan spent can only be used with a trusted daemon"));
- return false;
-diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
-index ec2d7e9b3..1f199a72c 100644
---- a/src/wallet/api/wallet.h
-+++ b/src/wallet/api/wallet.h
-@@ -171,6 +171,13 @@ public:
- bool importOutputs(const std::string &filename) override;
- bool scanTransactions(const std::vector<std::string> &txids) override;
-
-+ bool setupBackgroundSync(const BackgroundSyncType background_sync_type, const std::string &wallet_password, const optional<std::string> &background_cache_password = optional<std::string>()) override;
-+ BackgroundSyncType getBackgroundSyncType() const override;
-+ bool startBackgroundSync() override;
-+ bool stopBackgroundSync(const std::string &wallet_password) override;
-+ bool isBackgroundSyncing() const override;
-+ bool isBackgroundWallet() const override;
-+
- virtual void disposeTransaction(PendingTransaction * t) override;
- virtual uint64_t estimateTransactionFee(const std::vector<std::pair<std::string, uint64_t>> &destinations,
- PendingTransaction::Priority priority) const override;
-@@ -239,6 +246,7 @@ private:
- bool isNewWallet() const;
- void pendingTxPostProcess(PendingTransactionImpl * pending);
- bool doInit(const std::string &daemon_address, const std::string &proxy_address, uint64_t upper_transaction_size_limit = 0, bool ssl = false);
-+ bool checkBackgroundSync(const std::string &message) const;
-
- private:
- friend class PendingTransactionImpl;
-@@ -253,6 +261,10 @@ private:
- mutable boost::mutex m_statusMutex;
- mutable int m_status;
- mutable std::string m_errorString;
-+ // TODO: harden password handling in the wallet API, see relevant discussion
-+ // https://github.com/monero-project/monero-gui/issues/1537
-+ // https://github.com/feather-wallet/feather/issues/72#issuecomment-1405602142
-+ // https://github.com/monero-project/monero/pull/8619#issuecomment-1632951461
- std::string m_password;
- std::unique_ptr<TransactionHistoryImpl> m_history;
- std::unique_ptr<Wallet2CallbackImpl> m_wallet2Callback;
-diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
-index 71991df0d..e349df176 100644
---- a/src/wallet/api/wallet2_api.h
-+++ b/src/wallet/api/wallet2_api.h
-@@ -445,6 +445,12 @@ struct Wallet
- ConnectionStatus_WrongVersion
- };
-
-+ enum BackgroundSyncType {
-+ BackgroundSync_Off = 0,
-+ BackgroundSync_ReusePassword = 1,
-+ BackgroundSync_CustomPassword = 2
-+ };
-+
- virtual ~Wallet() = 0;
- virtual std::string seed(const std::string& seed_offset = "") const = 0;
- virtual std::string getSeedLanguage() const = 0;
-@@ -936,6 +942,42 @@ struct Wallet
- */
- virtual bool scanTransactions(const std::vector<std::string> &txids) = 0;
-
-+ /*!
-+ * \brief setupBackgroundSync - setup background sync mode with just a view key
-+ * \param background_sync_type - the mode the wallet background syncs in
-+ * \param wallet_password
-+ * \param background_cache_password - custom password to encrypt background cache, only needed for custom password background sync type
-+ * \return - true on success
-+ */
-+ virtual bool setupBackgroundSync(const BackgroundSyncType background_sync_type, const std::string &wallet_password, const optional<std::string> &background_cache_password) = 0;
-+
-+ /*!
-+ * \brief getBackgroundSyncType - get mode the wallet background syncs in
-+ * \return - the type, or off if type is unknown
-+ */
-+ virtual BackgroundSyncType getBackgroundSyncType() const = 0;
-+
-+ /**
-+ * @brief startBackgroundSync - sync the chain in the background with just view key
-+ */
-+ virtual bool startBackgroundSync() = 0;
-+
-+ /**
-+ * @brief stopBackgroundSync - bring back spend key and process background synced txs
-+ * \param wallet_password
-+ */
-+ virtual bool stopBackgroundSync(const std::string &wallet_password) = 0;
-+
-+ /**
-+ * @brief isBackgroundSyncing - returns true if the wallet is background syncing
-+ */
-+ virtual bool isBackgroundSyncing() const = 0;
-+
-+ /**
-+ * @brief isBackgroundWallet - returns true if the wallet is a background wallet
-+ */
-+ virtual bool isBackgroundWallet() const = 0;
-+
- virtual TransactionHistory * history() = 0;
- virtual AddressBook * addressBook() = 0;
- virtual Subaddress * subaddress() = 0;
-diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 478101af2..535005ab1 100644
---- a/src/wallet/wallet2.cpp
-+++ b/src/wallet/wallet2.cpp
-@@ -157,6 +157,8 @@ static const std::string MULTISIG_SIGNATURE_MAGIC = "SigMultisigPkV1";
-
- static const std::string ASCII_OUTPUT_MAGIC = "WowneroAsciiDataV1";
-
-+static const std::string BACKGROUND_WALLET_SUFFIX = ".background";
-+
- boost::mutex tools::wallet2::default_daemon_address_lock;
- std::string tools::wallet2::default_daemon_address = "";
-
-@@ -1009,14 +1011,14 @@ uint64_t num_priv_multisig_keys_post_setup(uint64_t threshold, uint64_t total)
- * @param keys_data_key the chacha key that encrypts wallet keys files
- * @return crypto::chacha_key the chacha key that encrypts the wallet cache files
- */
--crypto::chacha_key derive_cache_key(const crypto::chacha_key& keys_data_key)
-+crypto::chacha_key derive_cache_key(const crypto::chacha_key& keys_data_key, const unsigned char domain_separator)
- {
- static_assert(HASH_SIZE == sizeof(crypto::chacha_key), "Mismatched sizes of hash and chacha key");
-
- crypto::chacha_key cache_key;
- epee::mlocked<tools::scrubbed_arr<char, HASH_SIZE+1>> cache_key_data;
- memcpy(cache_key_data.data(), &keys_data_key, HASH_SIZE);
-- cache_key_data[HASH_SIZE] = config::HASH_KEY_WALLET_CACHE;
-+ cache_key_data[HASH_SIZE] = domain_separator;
- cn_fast_hash(cache_key_data.data(), HASH_SIZE+1, (crypto::hash&) cache_key);
-
- return cache_key;
-@@ -1104,7 +1106,7 @@ wallet_keys_unlocker::wallet_keys_unlocker(wallet2 &w, const boost::optional<too
- boost::lock_guard<boost::mutex> lock(lockers_lock);
- if (lockers++ > 0)
- locked = false;
-- if (!locked || w.is_unattended() || w.ask_password() != tools::wallet2::AskPasswordToDecrypt || w.watch_only())
-+ if (!locked || w.is_unattended() || w.ask_password() != tools::wallet2::AskPasswordToDecrypt || w.watch_only() || w.is_background_syncing())
- {
- locked = false;
- return;
-@@ -1221,6 +1223,11 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
- m_ignore_outputs_above(MONEY_SUPPLY),
- m_ignore_outputs_below(0),
- m_track_uses(false),
-+ m_is_background_wallet(false),
-+ m_background_sync_type(BackgroundSyncOff),
-+ m_background_syncing(false),
-+ m_processing_background_cache(false),
-+ m_custom_background_key(boost::none),
- m_show_wallet_name_when_locked(false),
- m_inactivity_lock_timeout(DEFAULT_INACTIVITY_LOCK_TIMEOUT),
- m_setup_background_mining(BackgroundMiningNo),
-@@ -1869,6 +1876,9 @@ bool has_nonrequested_tx_at_height_or_above_requested(uint64_t height, const std
- //----------------------------------------------------------------------------------------------------
- void wallet2::scan_tx(const std::unordered_set<crypto::hash> &txids)
- {
-+ THROW_WALLET_EXCEPTION_IF(m_background_syncing || m_is_background_wallet, error::wallet_internal_error,
-+ "cannot scan tx from background wallet");
-+
- // Get the transactions from daemon in batches sorted lowest height to highest
- tx_entry_data txs_to_scan = get_tx_entries(txids);
- if (txs_to_scan.tx_entries.empty())
-@@ -2178,11 +2188,11 @@ void wallet2::scan_output(const cryptonote::transaction &tx, bool miner_tx, cons
- THROW_WALLET_EXCEPTION_IF(i >= tx.vout.size(), error::wallet_internal_error, "Invalid vout index");
-
- // if keys are encrypted, ask for password
-- if (m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only && !m_multisig_rescan_k)
-+ if (m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only && !m_multisig_rescan_k && !m_background_syncing)
- {
- static critical_section password_lock;
- CRITICAL_REGION_LOCAL(password_lock);
-- if (!m_encrypt_keys_after_refresh)
-+ if (!m_encrypt_keys_after_refresh && !m_processing_background_cache)
- {
- boost::optional<epee::wipeable_string> pwd = m_callback->on_get_password(pool ? "output found in pool" : "output received");
- THROW_WALLET_EXCEPTION_IF(!pwd, error::password_needed, tr("Password is needed to compute key image for incoming wownero"));
-@@ -2194,7 +2204,7 @@ void wallet2::scan_output(const cryptonote::transaction &tx, bool miner_tx, cons
- crypto::public_key output_public_key;
- THROW_WALLET_EXCEPTION_IF(!get_output_public_key(tx.vout[i], output_public_key), error::wallet_internal_error, "Failed to get output public key");
-
-- if (m_multisig)
-+ if (m_multisig || m_background_syncing/*no spend key*/)
- {
- tx_scan_info.in_ephemeral.pub = output_public_key;
- tx_scan_info.in_ephemeral.sec = crypto::null_skey;
-@@ -2451,6 +2461,22 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
- THROW_WALLET_EXCEPTION_IF(tx.vout.size() != o_indices.size(), error::wallet_internal_error,
- "transactions outputs size=" + std::to_string(tx.vout.size()) +
- " not match with daemon response size=" + std::to_string(o_indices.size()));
-+
-+ // we're going to re-process this receive when background sync is disabled
-+ if (m_background_syncing && m_background_sync_data.txs.find(txid) == m_background_sync_data.txs.end())
-+ {
-+ size_t bgs_idx = m_background_sync_data.txs.size();
-+ background_synced_tx_t bgs_tx = {
-+ .index_in_background_sync_data = bgs_idx,
-+ .tx = tx,
-+ .output_indices = o_indices,
-+ .height = height,
-+ .block_timestamp = ts,
-+ .double_spend_seen = double_spend_seen
-+ };
-+ LOG_PRINT_L2("Adding received tx " << txid << " to background sync data (idx=" << bgs_idx << ")");
-+ m_background_sync_data.txs.insert({txid, std::move(bgs_tx)});
-+ }
- }
-
- for(size_t o: outs)
-@@ -2476,7 +2502,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
- td.m_tx = (const cryptonote::transaction_prefix&)tx;
- td.m_txid = txid;
- td.m_key_image = tx_scan_info[o].ki;
-- td.m_key_image_known = !m_watch_only && !m_multisig;
-+ td.m_key_image_known = !m_watch_only && !m_multisig && !m_background_syncing;
- if (!td.m_key_image_known)
- {
- // we might have cold signed, and have a mapping to key images
-@@ -2666,10 +2692,25 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
- set_spent(it->second, height);
- if (!ignore_callbacks && 0 != m_callback)
- m_callback->on_money_spent(height, txid, tx, amount, tx, td.m_subaddr_index);
-+
-+ if (m_background_syncing && m_background_sync_data.txs.find(txid) == m_background_sync_data.txs.end())
-+ {
-+ size_t bgs_idx = m_background_sync_data.txs.size();
-+ background_synced_tx_t bgs_tx = {
-+ .index_in_background_sync_data = bgs_idx,
-+ .tx = tx,
-+ .output_indices = o_indices,
-+ .height = height,
-+ .block_timestamp = ts,
-+ .double_spend_seen = double_spend_seen
-+ };
-+ LOG_PRINT_L2("Adding spent tx " << txid << " to background sync data (idx=" << bgs_idx << ")");
-+ m_background_sync_data.txs.insert({txid, std::move(bgs_tx)});
-+ }
- }
- }
-
-- if (!pool && m_track_uses)
-+ if (!pool && (m_track_uses || (m_background_syncing && it == m_key_images.end())))
- {
- PERF_TIMER(track_uses);
- const uint64_t amount = in_to_key.amount;
-@@ -2683,7 +2724,27 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
- {
- size_t idx = i->second;
- THROW_WALLET_EXCEPTION_IF(idx >= m_transfers.size(), error::wallet_internal_error, "Output tracker cache index out of range");
-- m_transfers[idx].m_uses.push_back(std::make_pair(height, txid));
-+
-+ if (m_track_uses)
-+ m_transfers[idx].m_uses.push_back(std::make_pair(height, txid));
-+
-+ // We'll re-process all txs which *might* be spends when we disable
-+ // background sync and retrieve the spend key. We don't know if an
-+ // output is a spend in this tx if we don't know its key image.
-+ if (m_background_syncing && !m_transfers[idx].m_key_image_known && m_background_sync_data.txs.find(txid) == m_background_sync_data.txs.end())
-+ {
-+ size_t bgs_idx = m_background_sync_data.txs.size();
-+ background_synced_tx_t bgs_tx = {
-+ .index_in_background_sync_data = bgs_idx,
-+ .tx = tx,
-+ .output_indices = o_indices,
-+ .height = height,
-+ .block_timestamp = ts,
-+ .double_spend_seen = double_spend_seen
-+ };
-+ LOG_PRINT_L2("Adding plausible spent tx " << txid << " to background sync data (idx=" << bgs_idx << ")");
-+ m_background_sync_data.txs.insert({txid, std::move(bgs_tx)});
-+ }
- }
- }
- }
-@@ -2693,7 +2754,24 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
- continue;
- for (uint64_t offset: offsets)
- if (offset == td.m_global_output_index)
-- td.m_uses.push_back(std::make_pair(height, txid));
-+ {
-+ if (m_track_uses)
-+ td.m_uses.push_back(std::make_pair(height, txid));
-+ if (m_background_syncing && !td.m_key_image_known && m_background_sync_data.txs.find(txid) == m_background_sync_data.txs.end())
-+ {
-+ size_t bgs_idx = m_background_sync_data.txs.size();
-+ background_synced_tx_t bgs_tx = {
-+ .index_in_background_sync_data = bgs_idx,
-+ .tx = tx,
-+ .output_indices = o_indices,
-+ .height = height,
-+ .block_timestamp = ts,
-+ .double_spend_seen = double_spend_seen
-+ };
-+ LOG_PRINT_L2("Adding plausible spent tx " << txid << " to background sync data (idx=" << bgs_idx << ")");
-+ m_background_sync_data.txs.insert({txid, std::move(bgs_tx)});
-+ }
-+ }
- }
- }
- }
-@@ -3066,8 +3144,8 @@ void wallet2::pull_blocks(bool first, bool try_incremental, uint64_t start_heigh
- req.start_height = start_height;
- req.no_miner_tx = m_refresh_type == RefreshNoCoinbase;
-
-- req.requested_info = first ? COMMAND_RPC_GET_BLOCKS_FAST::BLOCKS_AND_POOL : COMMAND_RPC_GET_BLOCKS_FAST::BLOCKS_ONLY;
-- if (try_incremental)
-+ req.requested_info = (first && !m_background_syncing) ? COMMAND_RPC_GET_BLOCKS_FAST::BLOCKS_AND_POOL : COMMAND_RPC_GET_BLOCKS_FAST::BLOCKS_ONLY;
-+ if (try_incremental && !m_background_syncing)
- req.pool_info_since = m_pool_info_query_time;
-
- {
-@@ -3094,7 +3172,7 @@ void wallet2::pull_blocks(bool first, bool try_incremental, uint64_t start_heigh
- << ", height " << blocks_start_height + blocks.size() << ", node height " << res.current_height
- << ", pool info " << static_cast<unsigned int>(res.pool_info_extent));
-
-- if (first)
-+ if (first && !m_background_syncing)
- {
- if (res.pool_info_extent != COMMAND_RPC_GET_BLOCKS_FAST::NONE)
- {
-@@ -3606,6 +3684,9 @@ void wallet2::process_unconfirmed_transfer(bool incremental, const crypto::hash
- // incremental update anymore, because with that we might miss some txs altogether.
- void wallet2::update_pool_state(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed, bool try_incremental)
- {
-+ process_txs.clear();
-+ if (m_background_syncing)
-+ return;
- bool updated = false;
- if (m_pool_info_query_time != 0 && try_incremental)
- {
-@@ -4177,6 +4258,8 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
- }
-
- m_first_refresh_done = true;
-+ if (m_background_syncing || m_is_background_wallet)
-+ m_background_sync_data.first_refresh_done = true;
-
- LOG_PRINT_L1("Refresh done, blocks received: " << blocks_fetched << ", balance (all accounts): " << print_money(balance_all(false)) << ", unlocked: " << print_money(unlocked_balance_all(false)));
- }
-@@ -4262,6 +4345,14 @@ wallet2::detached_blockchain_data wallet2::detach_blockchain(uint64_t height, st
- td.m_uses.pop_back();
- }
-
-+ for (auto it = m_background_sync_data.txs.begin(); it != m_background_sync_data.txs.end(); )
-+ {
-+ if(height <= it->second.height)
-+ it = m_background_sync_data.txs.erase(it);
-+ else
-+ ++it;
-+ }
-+
- if (output_tracker_cache)
- output_tracker_cache->clear();
-
-@@ -4336,8 +4427,12 @@ void wallet2::handle_reorg(uint64_t height, std::map<std::pair<uint64_t, uint64_
- // C
- THROW_WALLET_EXCEPTION_IF(height < m_blockchain.offset() && m_blockchain.size() > m_blockchain.offset(),
- error::wallet_internal_error, "Daemon claims reorg below last checkpoint");
-+
- detached_blockchain_data dbd = detach_blockchain(height, output_tracker_cache);
-
-+ if (m_background_syncing && height < m_background_sync_data.start_height)
-+ m_background_sync_data.start_height = height;
-+
- if (m_callback)
- m_callback->on_reorg(height, dbd.detached_blockchain.size(), dbd.detached_tx_hashes.size());
- }
-@@ -4347,6 +4442,7 @@ bool wallet2::deinit()
- if(m_is_initialized) {
- m_is_initialized = false;
- unlock_keys_file();
-+ unlock_background_keys_file();
- m_account.deinit();
- }
- return true;
-@@ -4373,6 +4469,7 @@ bool wallet2::clear()
- m_device_last_key_image_sync = 0;
- m_pool_info_query_time = 0;
- m_skip_to_height = 0;
-+ m_background_sync_data = background_sync_data_t{};
- return true;
- }
- //----------------------------------------------------------------------------------------------------
-@@ -4391,13 +4488,30 @@ void wallet2::clear_soft(bool keep_key_images)
- m_scanned_pool_txs[1].clear();
- m_pool_info_query_time = 0;
- m_skip_to_height = 0;
-+ m_background_sync_data = background_sync_data_t{};
-
- cryptonote::block b;
- generate_genesis(b);
- m_blockchain.push_back(get_block_hash(b));
- m_last_block_reward = cryptonote::get_outs_money_amount(b.miner_tx);
- }
--
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::clear_user_data()
-+{
-+ for (auto i = m_confirmed_txs.begin(); i != m_confirmed_txs.end(); ++i)
-+ i->second.m_dests.clear();
-+ for (auto i = m_unconfirmed_txs.begin(); i != m_unconfirmed_txs.end(); ++i)
-+ i->second.m_dests.clear();
-+ for (auto i = m_transfers.begin(); i != m_transfers.end(); ++i)
-+ i->m_frozen = false;
-+ m_tx_keys.clear();
-+ m_tx_notes.clear();
-+ m_address_book.clear();
-+ m_subaddress_labels.clear();
-+ m_attributes.clear();
-+ m_account_tags = std::pair<serializable_map<std::string, std::string>, std::vector<std::string>>();
-+}
-+//----------------------------------------------------------------------------------------------------
- /*!
- * \brief Stores wallet information to wallet file.
- * \param keys_file_name Name of wallet file
-@@ -4409,16 +4523,35 @@ bool wallet2::store_keys(const std::string& keys_file_name, const epee::wipeable
- {
- boost::optional<wallet2::keys_file_data> keys_file_data = get_keys_file_data(password, watch_only);
- CHECK_AND_ASSERT_MES(keys_file_data != boost::none, false, "failed to generate wallet keys data");
--
-+ return store_keys_file_data(keys_file_name, keys_file_data.get());
-+}
-+//----------------------------------------------------------------------------------------------------
-+bool wallet2::store_keys(const std::string& keys_file_name, const crypto::chacha_key& key, bool watch_only, bool background_keys_file)
-+{
-+ boost::optional<wallet2::keys_file_data> keys_file_data = get_keys_file_data(key, watch_only, background_keys_file);
-+ CHECK_AND_ASSERT_MES(keys_file_data != boost::none, false, "failed to generate wallet keys data");
-+ return store_keys_file_data(keys_file_name, keys_file_data.get(), background_keys_file);
-+}
-+//----------------------------------------------------------------------------------------------------
-+bool wallet2::store_keys_file_data(const std::string& keys_file_name, wallet2::keys_file_data &keys_file_data, bool background_keys_file)
-+{
- std::string tmp_file_name = keys_file_name + ".new";
- std::string buf;
-- bool r = ::serialization::dump_binary(keys_file_data.get(), buf);
-+ bool r = ::serialization::dump_binary(keys_file_data, buf);
- r = r && save_to_file(tmp_file_name, buf);
- CHECK_AND_ASSERT_MES(r, false, "failed to generate wallet keys file " << tmp_file_name);
-
-- unlock_keys_file();
-+ if (!background_keys_file)
-+ unlock_keys_file();
-+ else
-+ unlock_background_keys_file();
-+
- std::error_code e = tools::replace_file(tmp_file_name, keys_file_name);
-- lock_keys_file();
-+
-+ if (!background_keys_file)
-+ lock_keys_file();
-+ else
-+ lock_background_keys_file(keys_file_name);
-
- if (e) {
- boost::filesystem::remove(tmp_file_name);
-@@ -4430,26 +4563,27 @@ bool wallet2::store_keys(const std::string& keys_file_name, const epee::wipeable
- }
- //----------------------------------------------------------------------------------------------------
- boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const epee::wipeable_string& password, bool watch_only)
-+{
-+ crypto::chacha_key key;
-+ crypto::generate_chacha_key(password.data(), password.size(), key, m_kdf_rounds);
-+ verify_password_with_cached_key(key);
-+ return get_keys_file_data(key, watch_only);
-+}
-+//----------------------------------------------------------------------------------------------------
-+boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypto::chacha_key& key, bool watch_only, bool background_keys_file)
- {
- epee::byte_slice account_data;
- std::string multisig_signers;
- std::string multisig_derivations;
- cryptonote::account_base account = m_account;
-
-- crypto::chacha_key key;
-- crypto::generate_chacha_key(password.data(), password.size(), key, m_kdf_rounds);
--
-- // We use m_cache_key as a deterministic test to see if given key corresponds to original password
-- const crypto::chacha_key cache_key = derive_cache_key(key);
-- THROW_WALLET_EXCEPTION_IF(cache_key != m_cache_key, error::invalid_password);
--
- if (m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only)
- {
- account.encrypt_viewkey(key);
- account.decrypt_keys(key);
- }
-
-- if (watch_only)
-+ if (watch_only || background_keys_file)
- account.forget_spend_key();
-
- account.encrypt_keys(key);
-@@ -4584,6 +4718,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const epee:
- value2.SetInt(m_track_uses ? 1 : 0);
- json.AddMember("track_uses", value2, json.GetAllocator());
-
-+ value2.SetInt(m_background_sync_type);
-+ json.AddMember("background_sync_type", value2, json.GetAllocator());
-+
- value2.SetInt(m_show_wallet_name_when_locked ? 1 : 0);
- json.AddMember("show_wallet_name_when_locked", value2, json.GetAllocator());
-
-@@ -4641,6 +4778,12 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const epee:
- value2.SetInt(m_enable_multisig ? 1 : 0);
- json.AddMember("enable_multisig", value2, json.GetAllocator());
-
-+ if (m_background_sync_type == BackgroundSyncCustomPassword && !background_keys_file && m_custom_background_key)
-+ {
-+ value.SetString(reinterpret_cast<const char*>(m_custom_background_key.get().data()), m_custom_background_key.get().size());
-+ json.AddMember("custom_background_key", value, json.GetAllocator());
-+ }
-+
- // Serialize the JSON object
- rapidjson::StringBuffer buffer;
- rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
-@@ -4667,13 +4810,81 @@ void wallet2::setup_keys(const epee::wipeable_string &password)
- m_account.decrypt_viewkey(key);
- }
-
-- m_cache_key = derive_cache_key(key);
-+ m_cache_key = derive_cache_key(key, config::HASH_KEY_WALLET_CACHE);
-
- get_ringdb_key();
- }
- //----------------------------------------------------------------------------------------------------
-+void validate_background_cache_password_usage(const tools::wallet2::BackgroundSyncType background_sync_type, const boost::optional<epee::wipeable_string> &background_cache_password, const bool multisig, const bool watch_only, const bool key_on_device)
-+{
-+ THROW_WALLET_EXCEPTION_IF(multisig || watch_only || key_on_device, error::wallet_internal_error, multisig
-+ ? "Background sync not implemented for multisig wallets" : watch_only
-+ ? "Background sync not implemented for view only wallets"
-+ : "Background sync not implemented for HW wallets");
-+
-+ switch (background_sync_type)
-+ {
-+ case tools::wallet2::BackgroundSyncOff:
-+ {
-+ THROW_WALLET_EXCEPTION(error::wallet_internal_error, "background sync is not enabled");
-+ break;
-+ }
-+ case tools::wallet2::BackgroundSyncReusePassword:
-+ {
-+ THROW_WALLET_EXCEPTION_IF(background_cache_password, error::wallet_internal_error,
-+ "unexpected custom background cache password");
-+ break;
-+ }
-+ case tools::wallet2::BackgroundSyncCustomPassword:
-+ {
-+ THROW_WALLET_EXCEPTION_IF(!background_cache_password, error::wallet_internal_error,
-+ "expected custom background cache password");
-+ break;
-+ }
-+ default: THROW_WALLET_EXCEPTION(error::wallet_internal_error, "unknown background sync type");
-+ }
-+}
-+//----------------------------------------------------------------------------------------------------
-+void get_custom_background_key(const epee::wipeable_string &password, crypto::chacha_key &custom_background_key, const uint64_t kdf_rounds)
-+{
-+ crypto::chacha_key key;
-+ crypto::generate_chacha_key(password.data(), password.size(), key, kdf_rounds);
-+ custom_background_key = derive_cache_key(key, config::HASH_KEY_BACKGROUND_KEYS_FILE);
-+}
-+//----------------------------------------------------------------------------------------------------
-+const crypto::chacha_key wallet2::get_cache_key()
-+{
-+ if (m_background_sync_type == BackgroundSyncCustomPassword && m_background_syncing)
-+ {
-+ THROW_WALLET_EXCEPTION_IF(!m_custom_background_key, error::wallet_internal_error, "Custom background key not set");
-+ // Domain separate keys used to encrypt background keys file and cache
-+ return derive_cache_key(m_custom_background_key.get(), config::HASH_KEY_BACKGROUND_CACHE);
-+ }
-+ else
-+ {
-+ return m_cache_key;
-+ }
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::verify_password_with_cached_key(const epee::wipeable_string &password)
-+{
-+ crypto::chacha_key key;
-+ crypto::generate_chacha_key(password.data(), password.size(), key, m_kdf_rounds);
-+ verify_password_with_cached_key(key);
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::verify_password_with_cached_key(const crypto::chacha_key &key)
-+{
-+ // We use m_cache_key as a deterministic test to see if given key corresponds to original password
-+ const crypto::chacha_key cache_key = derive_cache_key(key, config::HASH_KEY_WALLET_CACHE);
-+ THROW_WALLET_EXCEPTION_IF(cache_key != m_cache_key, error::invalid_password);
-+}
-+//----------------------------------------------------------------------------------------------------
- void wallet2::change_password(const std::string &filename, const epee::wipeable_string &original_password, const epee::wipeable_string &new_password)
- {
-+ THROW_WALLET_EXCEPTION_IF(m_background_syncing || m_is_background_wallet, error::wallet_internal_error,
-+ "cannot change password from background wallet");
-+
- if (m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only)
- decrypt_keys(original_password);
- setup_keys(new_password);
-@@ -4732,8 +4943,24 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
- std::string account_data;
- account_data.resize(keys_file_data.account_data.size());
- crypto::chacha20(keys_file_data.account_data.data(), keys_file_data.account_data.size(), key, keys_file_data.iv, &account_data[0]);
-- if (json.Parse(account_data.c_str()).HasParseError() || !json.IsObject())
-+ const bool try_v0_format = json.Parse(account_data.c_str()).HasParseError() || !json.IsObject();
-+ if (try_v0_format)
- crypto::chacha8(keys_file_data.account_data.data(), keys_file_data.account_data.size(), key, keys_file_data.iv, &account_data[0]);
-+
-+ // Check if it's a background keys file if both of the above formats fail
-+ {
-+ m_is_background_wallet = false;
-+ m_background_syncing = false;
-+ cryptonote::account_base account_data_check;
-+ if (try_v0_format && !epee::serialization::load_t_from_binary(account_data_check, account_data))
-+ {
-+ get_custom_background_key(password, key, m_kdf_rounds);
-+ crypto::chacha20(keys_file_data.account_data.data(), keys_file_data.account_data.size(), key, keys_file_data.iv, &account_data[0]);
-+ m_is_background_wallet = !json.Parse(account_data.c_str()).HasParseError() && json.IsObject();
-+ m_background_syncing = m_is_background_wallet; // start a background wallet background syncing
-+ }
-+ }
-+
- // The contents should be JSON if the wallet follows the new format.
- if (json.Parse(account_data.c_str()).HasParseError())
- {
-@@ -4771,6 +4998,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
- m_ignore_outputs_above = MONEY_SUPPLY;
- m_ignore_outputs_below = 0;
- m_track_uses = false;
-+ m_background_sync_type = BackgroundSyncOff;
- m_show_wallet_name_when_locked = false;
- m_inactivity_lock_timeout = DEFAULT_INACTIVITY_LOCK_TIMEOUT;
- m_setup_background_mining = BackgroundMiningNo;
-@@ -4788,6 +5016,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
- m_credits_target = 0;
- m_enable_multisig = false;
- m_allow_mismatched_daemon_version = true;
-+ m_custom_background_key = boost::none;
- }
- else if(json.IsObject())
- {
-@@ -5024,6 +5253,39 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
- m_credits_target = field_credits_target;
- GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, enable_multisig, int, Int, false, false);
- m_enable_multisig = field_enable_multisig;
-+
-+ GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, background_sync_type, BackgroundSyncType, Int, false, BackgroundSyncOff);
-+ m_background_sync_type = field_background_sync_type;
-+
-+ // Load encryption key used to encrypt background cache
-+ crypto::chacha_key custom_background_key;
-+ m_custom_background_key = boost::none;
-+ if (m_background_sync_type == BackgroundSyncCustomPassword && !m_is_background_wallet)
-+ {
-+ if (!json.HasMember("custom_background_key"))
-+ {
-+ LOG_ERROR("Field custom_background_key not found in JSON");
-+ return false;
-+ }
-+ else if (!json["custom_background_key"].IsString())
-+ {
-+ LOG_ERROR("Field custom_background_key found in JSON, but not String");
-+ return false;
-+ }
-+ else if (json["custom_background_key"].GetStringLength() != sizeof(crypto::chacha_key))
-+ {
-+ LOG_ERROR("Field custom_background_key found in JSON, but not correct length");
-+ return false;
-+ }
-+ const char *field_custom_background_key = json["custom_background_key"].GetString();
-+ memcpy(custom_background_key.data(), field_custom_background_key, sizeof(crypto::chacha_key));
-+ m_custom_background_key = boost::optional<crypto::chacha_key>(custom_background_key);
-+ LOG_PRINT_L1("Loaded custom background key derived from custom password");
-+ }
-+ else if (json.HasMember("custom_background_key"))
-+ {
-+ LOG_ERROR("Unexpected field custom_background_key found in JSON");
-+ }
- }
- else
- {
-@@ -5087,12 +5349,17 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
- const cryptonote::account_keys& keys = m_account.get_keys();
- hw::device &hwdev = m_account.get_device();
- r = r && hwdev.verify_keys(keys.m_view_secret_key, keys.m_account_address.m_view_public_key);
-- if (!m_watch_only && !m_multisig && hwdev.device_protocol() != hw::device::PROTOCOL_COLD)
-+ if (!m_watch_only && !m_multisig && hwdev.device_protocol() != hw::device::PROTOCOL_COLD && !m_is_background_wallet)
- r = r && hwdev.verify_keys(keys.m_spend_secret_key, keys.m_account_address.m_spend_public_key);
- THROW_WALLET_EXCEPTION_IF(!r, error::wallet_files_doesnt_correspond, m_keys_file, m_wallet_file);
-
- if (r)
-- setup_keys(password);
-+ {
-+ if (!m_is_background_wallet)
-+ setup_keys(password);
-+ else
-+ m_custom_background_key = boost::optional<crypto::chacha_key>(key);
-+ }
-
- return true;
- }
-@@ -5107,11 +5374,12 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
- * can be used prior to rewriting wallet keys file, to ensure user has entered the correct password
- *
- */
--bool wallet2::verify_password(const epee::wipeable_string& password)
-+bool wallet2::verify_password(const epee::wipeable_string& password, crypto::secret_key &spend_key_out)
- {
- // this temporary unlocking is necessary for Windows (otherwise the file couldn't be loaded).
- unlock_keys_file();
-- bool r = verify_password(m_keys_file, password, m_account.get_device().device_protocol() == hw::device::PROTOCOL_COLD || m_watch_only || m_multisig, m_account.get_device(), m_kdf_rounds);
-+ const bool no_spend_key = m_account.get_device().device_protocol() == hw::device::PROTOCOL_COLD || m_watch_only || m_multisig || m_is_background_wallet;
-+ bool r = verify_password(m_keys_file, password, no_spend_key, m_account.get_device(), m_kdf_rounds, spend_key_out);
- lock_keys_file();
- return r;
- }
-@@ -5129,7 +5397,7 @@ bool wallet2::verify_password(const epee::wipeable_string& password)
- * can be used prior to rewriting wallet keys file, to ensure user has entered the correct password
- *
- */
--bool wallet2::verify_password(const std::string& keys_file_name, const epee::wipeable_string& password, bool no_spend_key, hw::device &hwdev, uint64_t kdf_rounds)
-+bool wallet2::verify_password(const std::string& keys_file_name, const epee::wipeable_string& password, bool no_spend_key, hw::device &hwdev, uint64_t kdf_rounds, crypto::secret_key &spend_key_out)
- {
- rapidjson::Document json;
- wallet2::keys_file_data keys_file_data;
-@@ -5146,9 +5414,22 @@ bool wallet2::verify_password(const std::string& keys_file_name, const epee::wip
- std::string account_data;
- account_data.resize(keys_file_data.account_data.size());
- crypto::chacha20(keys_file_data.account_data.data(), keys_file_data.account_data.size(), key, keys_file_data.iv, &account_data[0]);
-- if (json.Parse(account_data.c_str()).HasParseError() || !json.IsObject())
-+ const bool try_v0_format = json.Parse(account_data.c_str()).HasParseError() || !json.IsObject();
-+ if (try_v0_format)
- crypto::chacha8(keys_file_data.account_data.data(), keys_file_data.account_data.size(), key, keys_file_data.iv, &account_data[0]);
-
-+ // Check if it's a background keys file if both of the above formats fail
-+ {
-+ cryptonote::account_base account_data_check;
-+ if (try_v0_format && !epee::serialization::load_t_from_binary(account_data_check, account_data))
-+ {
-+ get_custom_background_key(password, key, kdf_rounds);
-+ crypto::chacha20(keys_file_data.account_data.data(), keys_file_data.account_data.size(), key, keys_file_data.iv, &account_data[0]);
-+ const bool is_background_wallet = json.Parse(account_data.c_str()).HasParseError() && json.IsObject();
-+ no_spend_key = no_spend_key || is_background_wallet;
-+ }
-+ }
-+
- // The contents should be JSON if the wallet follows the new format.
- if (json.Parse(account_data.c_str()).HasParseError())
- {
-@@ -5173,6 +5454,7 @@ bool wallet2::verify_password(const std::string& keys_file_name, const epee::wip
- r = r && hwdev.verify_keys(keys.m_view_secret_key, keys.m_account_address.m_view_public_key);
- if(!no_spend_key)
- r = r && hwdev.verify_keys(keys.m_spend_secret_key, keys.m_account_address.m_spend_public_key);
-+ spend_key_out = (!no_spend_key && r) ? keys.m_spend_secret_key : crypto::null_skey;
- return r;
- }
-
-@@ -5184,9 +5466,7 @@ void wallet2::encrypt_keys(const crypto::chacha_key &key)
-
- void wallet2::decrypt_keys(const crypto::chacha_key &key)
- {
-- // We use m_cache_key as a deterministic test to see if given key corresponds to original password
-- const crypto::chacha_key cache_key = derive_cache_key(key);
-- THROW_WALLET_EXCEPTION_IF(cache_key != m_cache_key, error::invalid_password);
-+ verify_password_with_cached_key(key);
-
- m_account.encrypt_viewkey(key);
- m_account.decrypt_keys(key);
-@@ -5862,11 +6142,30 @@ void wallet2::rewrite(const std::string& wallet_name, const epee::wipeable_strin
- {
- if (wallet_name.empty())
- return;
-+ THROW_WALLET_EXCEPTION_IF(m_background_syncing || m_is_background_wallet, error::wallet_internal_error,
-+ "cannot change wallet settings from background wallet");
- prepare_file_names(wallet_name);
- boost::system::error_code ignored_ec;
- THROW_WALLET_EXCEPTION_IF(!boost::filesystem::exists(m_keys_file, ignored_ec), error::file_not_found, m_keys_file);
- bool r = store_keys(m_keys_file, password, m_watch_only);
- THROW_WALLET_EXCEPTION_IF(!r, error::file_save_error, m_keys_file);
-+
-+ // Update the background keys file when we rewrite the main wallet keys file
-+ if (m_background_sync_type == BackgroundSyncCustomPassword && m_custom_background_key)
-+ {
-+ const std::string background_keys_filename = make_background_keys_file_name(wallet_name);
-+ if (!lock_background_keys_file(background_keys_filename))
-+ {
-+ LOG_ERROR("Background keys file " << background_keys_filename << " is opened by another wallet program and cannot be rewritten");
-+ return; // not fatal, background keys file will just have different wallet settings
-+ }
-+ store_background_keys(m_custom_background_key.get());
-+ store_background_cache(m_custom_background_key.get(), true/*do_reset_background_sync_data*/);
-+ }
-+ else if (m_background_sync_type == BackgroundSyncReusePassword)
-+ {
-+ reset_background_sync_data(m_background_sync_data);
-+ }
- }
- /*!
- * \brief Writes to a file named based on the normal wallet (doesn't generate key, assumes it's already there)
-@@ -5900,6 +6199,16 @@ bool wallet2::wallet_valid_path_format(const std::string& file_path)
- return !file_path.empty();
- }
- //----------------------------------------------------------------------------------------------------
-+std::string wallet2::make_background_wallet_file_name(const std::string &wallet_file)
-+{
-+ return wallet_file + BACKGROUND_WALLET_SUFFIX;
-+}
-+//----------------------------------------------------------------------------------------------------
-+std::string wallet2::make_background_keys_file_name(const std::string &wallet_file)
-+{
-+ return make_background_wallet_file_name(wallet_file) + ".keys";
-+}
-+//----------------------------------------------------------------------------------------------------
- bool wallet2::parse_long_payment_id(const std::string& payment_id_str, crypto::hash& payment_id)
- {
- cryptonote::blobdata payment_id_data;
-@@ -6135,10 +6444,81 @@ void wallet2::load(const std::string& wallet_, const epee::wipeable_string& pass
- THROW_WALLET_EXCEPTION_IF(true, error::file_read_error, "failed to load keys from buffer");
- }
-
-- wallet_keys_unlocker unlocker(*this, m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only, password);
-+ wallet_keys_unlocker unlocker(*this, m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only && !m_is_background_wallet, password);
-
- //keys loaded ok!
- //try to load wallet cache. but even if we failed, it is not big problem
-+ load_wallet_cache(use_fs, cache_buf);
-+
-+ if (!m_persistent_rpc_client_id)
-+ set_rpc_client_secret_key(rct::rct2sk(rct::skGen()));
-+
-+ // Wallets used to wipe, but not erase, old unused multisig key info, which lead to huge memory leaks.
-+ // Here we erase these multisig keys if they're zero'd out to free up space.
-+ for (auto &td : m_transfers)
-+ {
-+ auto mk_it = td.m_multisig_k.begin();
-+ while (mk_it != td.m_multisig_k.end())
-+ {
-+ if (*mk_it == rct::zero())
-+ mk_it = td.m_multisig_k.erase(mk_it);
-+ else
-+ ++mk_it;
-+ }
-+ }
-+
-+ cryptonote::block genesis;
-+ generate_genesis(genesis);
-+ crypto::hash genesis_hash = get_block_hash(genesis);
-+
-+ if (m_blockchain.empty())
-+ {
-+ m_blockchain.push_back(genesis_hash);
-+ m_last_block_reward = cryptonote::get_outs_money_amount(genesis.miner_tx);
-+ }
-+ else
-+ {
-+ check_genesis(genesis_hash);
-+ }
-+
-+ trim_hashchain();
-+
-+ if (get_num_subaddress_accounts() == 0)
-+ add_subaddress_account(tr("Primary account"));
-+
-+ try
-+ {
-+ find_and_save_rings(false);
-+ }
-+ catch (const std::exception &e)
-+ {
-+ MERROR("Failed to save rings, will try again next time");
-+ }
-+
-+ try
-+ {
-+ if (use_fs)
-+ m_message_store.read_from_file(get_multisig_wallet_state(), m_mms_file, m_load_deprecated_formats);
-+ }
-+ catch (const std::exception &e)
-+ {
-+ MERROR("Failed to initialize MMS, it will be unusable");
-+ }
-+
-+ try
-+ {
-+ if (use_fs)
-+ process_background_cache_on_open();
-+ }
-+ catch (const std::exception &e)
-+ {
-+ MERROR("Failed to process background cache on open: " << e.what());
-+ }
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::load_wallet_cache(const bool use_fs, const std::string& cache_buf)
-+{
-+ boost::system::error_code e;
- bool cache_missing = use_fs ? (!boost::filesystem::exists(m_wallet_file, e) || e) : cache_buf.empty();
- if (cache_missing)
- {
-@@ -6165,7 +6545,7 @@ void wallet2::load(const std::string& wallet_, const epee::wipeable_string& pass
- THROW_WALLET_EXCEPTION_IF(!r, error::wallet_internal_error, "internal error: failed to deserialize \"" + m_wallet_file + '\"');
- std::string cache_data;
- cache_data.resize(cache_file_data.cache_data.size());
-- crypto::chacha20(cache_file_data.cache_data.data(), cache_file_data.cache_data.size(), m_cache_key, cache_file_data.iv, &cache_data[0]);
-+ crypto::chacha20(cache_file_data.cache_data.data(), cache_file_data.cache_data.size(), get_cache_key(), cache_file_data.iv, &cache_data[0]);
-
- try {
- bool loaded = false;
-@@ -6255,60 +6635,76 @@ void wallet2::load(const std::string& wallet_, const epee::wipeable_string& pass
- m_account_public_address.m_view_public_key != m_account.get_keys().m_account_address.m_view_public_key,
- error::wallet_files_doesnt_correspond, m_keys_file, m_wallet_file);
- }
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::process_background_cache_on_open()
-+{
-+ if (m_wallet_file.empty())
-+ return;
-+ if (m_background_syncing || m_is_background_wallet)
-+ return;
-+ if (m_background_sync_type == BackgroundSyncOff)
-+ return;
-
-- if (!m_persistent_rpc_client_id)
-- set_rpc_client_secret_key(rct::rct2sk(rct::skGen()));
-+ if (m_background_sync_type == BackgroundSyncReusePassword)
-+ {
-+ const background_sync_data_t background_sync_data = m_background_sync_data;
-+ const hashchain blockchain = m_blockchain;
-+ process_background_cache(background_sync_data, blockchain, m_last_block_reward);
-
-- // Wallets used to wipe, but not erase, old unused multisig key info, which lead to huge memory leaks.
-- // Here we erase these multisig keys if they're zero'd out to free up space.
-- for (auto &td : m_transfers)
-+ // Reset the background cache after processing
-+ reset_background_sync_data(m_background_sync_data);
-+ }
-+ else if (m_background_sync_type == BackgroundSyncCustomPassword)
- {
-- auto mk_it = td.m_multisig_k.begin();
-- while (mk_it != td.m_multisig_k.end())
-+ // If the background wallet files don't exist, recreate them
-+ const std::string background_keys_file = make_background_keys_file_name(m_wallet_file);
-+ const std::string background_wallet_file = make_background_wallet_file_name(m_wallet_file);
-+ const bool background_keys_file_exists = boost::filesystem::exists(background_keys_file);
-+ const bool background_wallet_exists = boost::filesystem::exists(background_wallet_file);
-+
-+ THROW_WALLET_EXCEPTION_IF(!lock_background_keys_file(background_keys_file), error::background_wallet_already_open, background_wallet_file);
-+ THROW_WALLET_EXCEPTION_IF(!m_custom_background_key, error::wallet_internal_error, "Custom background key not set");
-+
-+ if (!background_keys_file_exists)
- {
-- if (*mk_it == rct::zero())
-- mk_it = td.m_multisig_k.erase(mk_it);
-- else
-- ++mk_it;
-+ MDEBUG("Background keys file not found, restoring");
-+ store_background_keys(m_custom_background_key.get());
- }
-- }
-
-- cryptonote::block genesis;
-- generate_genesis(genesis);
-- crypto::hash genesis_hash = get_block_hash(genesis);
-+ if (!background_wallet_exists)
-+ {
-+ MDEBUG("Background cache not found, restoring");
-+ store_background_cache(m_custom_background_key.get(), true/*do_reset_background_sync_data*/);
-+ return;
-+ }
-
-- if (m_blockchain.empty())
-- {
-- m_blockchain.push_back(genesis_hash);
-- m_last_block_reward = cryptonote::get_outs_money_amount(genesis.miner_tx);
-- }
-- else
-- {
-- check_genesis(genesis_hash);
-- }
-+ MDEBUG("Loading background cache");
-
-- trim_hashchain();
-+ // Set up a minimal background wallet2 instance
-+ std::unique_ptr<wallet2> background_w2(new wallet2(m_nettype));
-+ background_w2->m_is_background_wallet = true;
-+ background_w2->m_background_syncing = true;
-+ background_w2->m_background_sync_type = m_background_sync_type;
-+ background_w2->m_custom_background_key = m_custom_background_key;
-
-- if (get_num_subaddress_accounts() == 0)
-- add_subaddress_account(tr("Primary account"));
-+ cryptonote::account_base account = m_account;
-+ account.forget_spend_key();
-+ background_w2->m_account = account;
-
-- try
-- {
-- find_and_save_rings(false);
-- }
-- catch (const std::exception &e)
-- {
-- MERROR("Failed to save rings, will try again next time");
-- }
--
-- try
-- {
-- if (use_fs)
-- m_message_store.read_from_file(get_multisig_wallet_state(), m_mms_file, m_load_deprecated_formats);
-+ // Load background cache from file
-+ background_w2->clear();
-+ background_w2->prepare_file_names(background_wallet_file);
-+ background_w2->load_wallet_cache(true/*use_fs*/);
-+
-+ process_background_cache(background_w2->m_background_sync_data, background_w2->m_blockchain, background_w2->m_last_block_reward);
-+
-+ // Reset the background cache after processing
-+ store_background_cache(m_custom_background_key.get(), true/*do_reset_background_sync_data*/);
- }
-- catch (const std::exception &e)
-+ else
- {
-- MERROR("Failed to initialize MMS, it will be unusable");
-+ THROW_WALLET_EXCEPTION(error::wallet_internal_error, "unknown background sync type");
- }
- }
- //----------------------------------------------------------------------------------------------------
-@@ -6390,6 +6786,8 @@ void wallet2::store_to(const std::string &path, const epee::wipeable_string &pas
- same_file = canonical_old_path == canonical_new_path;
- }
-
-+ THROW_WALLET_EXCEPTION_IF(m_is_background_wallet && !same_file, error::wallet_internal_error,
-+ "Cannot save background wallet files to a different location");
-
- if (!same_file)
- {
-@@ -6406,6 +6804,21 @@ void wallet2::store_to(const std::string &path, const epee::wipeable_string &pas
- }
- }
- }
-+ else if (m_background_sync_type == BackgroundSyncCustomPassword && m_background_syncing && !m_is_background_wallet)
-+ {
-+ // We're background syncing, so store the wallet cache as a background cache
-+ // keeping the background sync data
-+ try
-+ {
-+ THROW_WALLET_EXCEPTION_IF(!m_custom_background_key, error::wallet_internal_error, "Custom background key not set");
-+ store_background_cache(m_custom_background_key.get(), false/*do_reset_background_sync_data*/);
-+ }
-+ catch (const std::exception &e)
-+ {
-+ MERROR("Failed to store background cache while background syncing: " << e.what());
-+ }
-+ return;
-+ }
-
- // get wallet cache data
- boost::optional<wallet2::cache_file_data> cache_file_data = get_cache_file_data();
-@@ -6499,6 +6912,22 @@ void wallet2::store_to(const std::string &path, const epee::wipeable_string &pas
- // store should only exist if the MMS is really active
- m_message_store.write_to_file(get_multisig_wallet_state(), m_mms_file);
- }
-+
-+ if (m_background_sync_type == BackgroundSyncCustomPassword && !m_background_syncing && !m_is_background_wallet)
-+ {
-+ // Update the background wallet cache when we store the main wallet cache
-+ // Note: if background syncing when this is called, it means the background
-+ // wallet is open and was already stored above
-+ try
-+ {
-+ THROW_WALLET_EXCEPTION_IF(!m_custom_background_key, error::wallet_internal_error, "Custom background key not set");
-+ store_background_cache(m_custom_background_key.get(), true/*do_reset_background_sync_data*/);
-+ }
-+ catch (const std::exception &e)
-+ {
-+ MERROR("Failed to update background cache: " << e.what());
-+ }
-+ }
- }
- //----------------------------------------------------------------------------------------------------
- boost::optional<wallet2::cache_file_data> wallet2::get_cache_file_data()
-@@ -6516,7 +6945,7 @@ boost::optional<wallet2::cache_file_data> wallet2::get_cache_file_data()
- std::string cipher;
- cipher.resize(cache_file_data.get().cache_data.size());
- cache_file_data.get().iv = crypto::rand<crypto::chacha_iv>();
-- crypto::chacha20(cache_file_data.get().cache_data.data(), cache_file_data.get().cache_data.size(), m_cache_key, cache_file_data.get().iv, &cipher[0]);
-+ crypto::chacha20(cache_file_data.get().cache_data.data(), cache_file_data.get().cache_data.size(), get_cache_key(), cache_file_data.get().iv, &cipher[0]);
- cache_file_data.get().cache_data = cipher;
- return cache_file_data;
- }
-@@ -8586,6 +9015,34 @@ bool wallet2::is_keys_file_locked() const
- return m_keys_file_locker->locked();
- }
-
-+bool wallet2::lock_background_keys_file(const std::string &background_keys_file)
-+{
-+ if (background_keys_file.empty() || !boost::filesystem::exists(background_keys_file))
-+ return true;
-+ if (m_background_keys_file_locker && m_background_keys_file_locker->locked())
-+ return true;
-+ m_background_keys_file_locker.reset(new tools::file_locker(background_keys_file));
-+ return m_background_keys_file_locker->locked();
-+}
-+
-+bool wallet2::unlock_background_keys_file()
-+{
-+ if (!m_background_keys_file_locker)
-+ {
-+ MDEBUG("background keys file locker is not set");
-+ return false;
-+ }
-+ m_background_keys_file_locker.reset();
-+ return true;
-+}
-+
-+bool wallet2::is_background_keys_file_locked() const
-+{
-+ if (!m_background_keys_file_locker)
-+ return false;
-+ return m_background_keys_file_locker->locked();
-+}
-+
- bool wallet2::tx_add_fake_output(std::vector<std::vector<tools::wallet2::get_outs_entry>> &outs, uint64_t global_index, const crypto::public_key& output_public_key, const rct::key& mask, uint64_t real_index, bool unlocked, std::unordered_set<crypto::public_key> &valid_public_keys_cache) const
- {
- if (!unlocked) // don't add locked outs
-@@ -13909,6 +14366,413 @@ bool wallet2::import_key_images(signed_tx_set & signed_tx, size_t offset, bool o
- return import_key_images(signed_tx.key_images, offset, only_selected_transfers ? boost::make_optional(selected_transfers) : boost::none);
- }
-
-+/*
-+ In background sync mode, we use just the view key when the wallet is scanning
-+ to identify all txs where:
-+
-+ 1. We received an output.
-+ 2. We spent an output.
-+ 3. We *may* have spent a received output but we didn't know for sure because
-+ the spend key was not loaded while background sync was enabled.
-+
-+ When the user is ready to use the spend key again, we call this function to
-+ process all those background synced transactions with the spend key loaded,
-+ so that we can properly generate key images for the transactions which we
-+ we were not able to do so for while background sync was enabled. This allows
-+ us to determine *all* receives and spends the user completed while the wallet
-+ had background sync enabled. Once this function completes, we can continue
-+ scanning from where the background sync left off.
-+
-+ Txs of type 3 (txs which we *may* have spent received output(s)) are txs where
-+ 1+ rings contain an output that the user received and the wallet does not know
-+ the associated key image for that output. We don't know if the user spent in
-+ this type of tx or not. This function will generate key images for all outputs
-+ we don't know key images for, and then check if those outputs were spent in
-+ the txs of type 3.
-+
-+ By storing this type of "plausible spend tx" when scanning in background sync
-+ mode, we avoid the need to query the daemon with key images when background
-+ sync mode is disabled to see if those key images were spent. This would
-+ reveal key images to 3rd party nodes for users who don't run their own.
-+ Although this is not a perfect solution to avoid revealing key images to a 3rd
-+ party node (since tx submission trivially reveals key images to a node), it's
-+ probably better than revealing *unused* key images to a 3rd party node, which
-+ would enable the 3rd party to deduce that a tx is spending an output at least
-+ X old when the key image is included in the chain.
-+*/
-+void wallet2::process_background_cache(const background_sync_data_t &background_sync_data, const hashchain &background_synced_chain, uint64_t last_block_reward)
-+{
-+ // We expect the spend key to be in a decrypted state while
-+ // m_processing_background_cache is true
-+ m_processing_background_cache = true;
-+ auto done_processing = epee::misc_utils::create_scope_leave_handler([&, this]() {
-+ m_processing_background_cache = false;
-+ });
-+
-+ if (m_background_syncing || m_multisig || m_watch_only || key_on_device())
-+ return;
-+
-+ if (!background_sync_data.first_refresh_done)
-+ {
-+ MDEBUG("Skipping processing background cache, background cache has not synced yet");
-+ return;
-+ }
-+
-+ // Skip processing if wallet cache is synced higher than background cache
-+ const uint64_t current_height = m_blockchain.size();
-+ const uint64_t background_height = background_synced_chain.size();
-+ MDEBUG("Background cache height " << background_height << " , wallet height " << current_height);
-+ if (current_height > background_height)
-+ {
-+ MWARNING("Skipping processing background cache, synced height is higher than background cache");
-+ return;
-+ }
-+
-+ if (m_refresh_from_block_height < background_sync_data.wallet_refresh_from_block_height ||
-+ m_subaddress_lookahead_major > background_sync_data.subaddress_lookahead_major ||
-+ m_subaddress_lookahead_minor > background_sync_data.subaddress_lookahead_minor ||
-+ m_refresh_type < background_sync_data.wallet_refresh_type)
-+ {
-+ MWARNING("Skipping processing background cache, background wallet sync settings did not match main wallet's");
-+ MDEBUG("Wallet settings: " <<
-+ ", m_refresh_from_block_height: " << m_refresh_from_block_height << " vs " << background_sync_data.wallet_refresh_from_block_height <<
-+ ", m_subaddress_lookahead_major: " << m_subaddress_lookahead_major << " vs " << background_sync_data.subaddress_lookahead_major <<
-+ ", m_subaddress_lookahead_minor: " << m_subaddress_lookahead_minor << " vs " << background_sync_data.subaddress_lookahead_minor <<
-+ ", m_refresh_type: " << m_refresh_type << " vs " << background_sync_data.wallet_refresh_type);
-+ return;
-+ }
-+
-+ // Sort background synced txs in the order they appeared in the cache so that
-+ // we process them in the order they appeared in the chain. Thus if tx2 spends
-+ // from tx1, we will know because tx1 is processed before tx2.
-+ std::vector<std::pair<crypto::hash, background_synced_tx_t>> sorted_bgs_cache(background_sync_data.txs.begin(), background_sync_data.txs.end());
-+ std::sort(sorted_bgs_cache.begin(), sorted_bgs_cache.end(),
-+ [](const std::pair<crypto::hash, background_synced_tx_t>& l, const std::pair<crypto::hash, background_synced_tx_t>& r)
-+ {
-+ uint64_t left_index = l.second.index_in_background_sync_data;
-+ uint64_t right_index = r.second.index_in_background_sync_data;
-+ THROW_WALLET_EXCEPTION_IF(
-+ (left_index < right_index && l.second.height > r.second.height) ||
-+ (left_index > right_index && l.second.height < r.second.height),
-+ error::wallet_internal_error, "Unexpected background sync data order");
-+ return left_index < right_index;
-+ });
-+
-+ // All txs in the background cache should have height >= sync start height,
-+ // but not fatal if not
-+ if (!sorted_bgs_cache.empty() && sorted_bgs_cache[0].second.height < background_sync_data.start_height)
-+ MWARNING("First tx in background cache has height (" << sorted_bgs_cache[0].second.height << ") lower than sync start height (" << background_sync_data.start_height << ")");
-+
-+ // We want to process all background synced txs in order to make sure
-+ // the wallet state updates correctly. First we remove all txs from the wallet
-+ // from before the background sync start height, then re-process them in
-+ // chronological order. The background cache should contain a superset of
-+ // *all* the wallet's txs from after the background sync start height.
-+ MDEBUG("Processing " << background_sync_data.txs.size() << " background synced txs starting from height " << background_sync_data.start_height);
-+ detached_blockchain_data dbd = detach_blockchain(background_sync_data.start_height);
-+
-+ for (const auto &bgs_tx : sorted_bgs_cache)
-+ {
-+ MDEBUG("Processing background synced tx " << bgs_tx.first);
-+
-+ process_new_transaction(bgs_tx.first, bgs_tx.second.tx, bgs_tx.second.output_indices, bgs_tx.second.height, 0, bgs_tx.second.block_timestamp,
-+ cryptonote::is_coinbase(bgs_tx.second.tx), false/*pool*/, bgs_tx.second.double_spend_seen, {}, {}, true/*ignore_callbacks*/);
-+
-+ // Re-set destination addresses if they were previously set
-+ if (m_confirmed_txs.find(bgs_tx.first) != m_confirmed_txs.end() &&
-+ dbd.detached_confirmed_txs_dests.find(bgs_tx.first) != dbd.detached_confirmed_txs_dests.end())
-+ {
-+ m_confirmed_txs[bgs_tx.first].m_dests = std::move(dbd.detached_confirmed_txs_dests[bgs_tx.first]);
-+ }
-+ }
-+
-+ m_blockchain = background_synced_chain;
-+ m_last_block_reward = last_block_reward;
-+
-+ MDEBUG("Finished processing background sync data");
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::reset_background_sync_data(background_sync_data_t &background_sync_data)
-+{
-+ background_sync_data.first_refresh_done = false;
-+ background_sync_data.start_height = get_blockchain_current_height();
-+ background_sync_data.txs.clear();
-+
-+ background_sync_data.wallet_refresh_from_block_height = m_refresh_from_block_height;
-+ background_sync_data.subaddress_lookahead_major = m_subaddress_lookahead_major;
-+ background_sync_data.subaddress_lookahead_minor = m_subaddress_lookahead_minor;
-+ background_sync_data.wallet_refresh_type = m_refresh_type;
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::store_background_cache(const crypto::chacha_key &custom_background_key, const bool do_reset_background_sync_data)
-+{
-+ MDEBUG("Storing background cache (do_reset_background_sync_data=" << do_reset_background_sync_data << ")");
-+
-+ THROW_WALLET_EXCEPTION_IF(m_background_sync_type != BackgroundSyncCustomPassword, error::wallet_internal_error,
-+ "Can only write a background cache when using a custom background password");
-+ THROW_WALLET_EXCEPTION_IF(m_wallet_file.empty(), error::wallet_internal_error,
-+ "No wallet file known, can't store background cache");
-+
-+ std::unique_ptr<wallet2> background_w2(new wallet2(m_nettype));
-+ background_w2->prepare_file_names(make_background_wallet_file_name(m_wallet_file));
-+
-+ // Make sure background wallet is opened by this wallet
-+ THROW_WALLET_EXCEPTION_IF(!lock_background_keys_file(background_w2->m_keys_file),
-+ error::background_wallet_already_open, background_w2->m_wallet_file);
-+
-+ // Load a background wallet2 instance using this wallet2 instance
-+ std::string this_wallet2;
-+ bool r = ::serialization::dump_binary(*this, this_wallet2);
-+ THROW_WALLET_EXCEPTION_IF(!r, error::wallet_internal_error, "Failed to serialize wallet cache");
-+
-+ background_w2->clear();
-+ r = ::serialization::parse_binary(this_wallet2, *background_w2);
-+ THROW_WALLET_EXCEPTION_IF(!r, error::wallet_internal_error, "Failed to deserialize wallet cache");
-+
-+ // Clear sensitive data from background cache not needed to sync
-+ background_w2->clear_user_data();
-+
-+ background_w2->m_is_background_wallet = true;
-+ if (do_reset_background_sync_data)
-+ reset_background_sync_data(background_w2->m_background_sync_data);
-+ else
-+ background_w2->m_background_sync_data = m_background_sync_data;
-+ background_w2->m_background_syncing = true;
-+
-+ background_w2->m_custom_background_key = boost::optional<crypto::chacha_key>(custom_background_key);
-+ background_w2->m_background_sync_type = m_background_sync_type;
-+ background_w2->store();
-+
-+ MDEBUG("Background cache stored (" << background_w2->m_transfers.size() << " transfers, " << background_w2->m_background_sync_data.txs.size() << " background synced txs)");
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::store_background_keys(const crypto::chacha_key &custom_background_key)
-+{
-+ MDEBUG("Storing background keys");
-+
-+ THROW_WALLET_EXCEPTION_IF(m_wallet_file.empty(), error::wallet_internal_error,
-+ "No wallet file known, can't store background keys");
-+
-+ const std::string background_keys_file = make_background_keys_file_name(m_wallet_file);
-+ bool r = store_keys(background_keys_file, custom_background_key, false/*watch_only*/, true/*background_keys_file*/);
-+ THROW_WALLET_EXCEPTION_IF(!r, error::file_save_error, background_keys_file);
-+ THROW_WALLET_EXCEPTION_IF(!is_background_keys_file_locked(), error::wallet_internal_error, background_keys_file + "\" should be locked");
-+
-+ // GUI uses the address file to differentiate non-mainnet wallets in the UI
-+ const std::string background_address_file = make_background_wallet_file_name(m_wallet_file) + ".address.txt";
-+ if (m_nettype != MAINNET && !boost::filesystem::exists(background_address_file))
-+ {
-+ r = save_to_file(background_address_file, m_account.get_public_address_str(m_nettype), true);
-+ if (!r) MERROR("String with address text not saved");
-+ }
-+
-+ MDEBUG("Background keys stored");
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::write_background_sync_wallet(const epee::wipeable_string &wallet_password, const epee::wipeable_string &background_cache_password)
-+{
-+ MDEBUG("Storing background sync wallet");
-+ THROW_WALLET_EXCEPTION_IF(m_background_sync_type != BackgroundSyncCustomPassword, error::wallet_internal_error,
-+ "Can only write a background sync wallet when using a custom background password");
-+ THROW_WALLET_EXCEPTION_IF(m_background_syncing || m_is_background_wallet, error::wallet_internal_error,
-+ "Can't write background sync wallet from an existing background cache");
-+ THROW_WALLET_EXCEPTION_IF(wallet_password == background_cache_password,
-+ error::background_custom_password_same_as_wallet_password);
-+
-+ // Set the background encryption key
-+ crypto::chacha_key custom_background_key;
-+ get_custom_background_key(background_cache_password, custom_background_key, m_kdf_rounds);
-+
-+ // Keep the background encryption key in memory so the main wallet can update
-+ // the background cache when it stores the main wallet cache
-+ m_custom_background_key = boost::optional<crypto::chacha_key>(custom_background_key);
-+
-+ if (m_wallet_file.empty() || m_keys_file.empty())
-+ return;
-+
-+ // Save background keys file, then background cache, then update main wallet settings
-+ store_background_keys(custom_background_key);
-+ store_background_cache(custom_background_key, true/*do_reset_background_sync_data*/);
-+ bool r = store_keys(m_keys_file, wallet_password, false/*watch_only*/);
-+ THROW_WALLET_EXCEPTION_IF(!r, error::file_save_error, m_keys_file);
-+
-+ MDEBUG("Background sync wallet saved successfully");
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::setup_background_sync(BackgroundSyncType background_sync_type, const epee::wipeable_string &wallet_password, const boost::optional<epee::wipeable_string> &background_cache_password)
-+{
-+ MDEBUG("Setting background sync to type " << background_sync_type);
-+ THROW_WALLET_EXCEPTION_IF(m_background_syncing || m_is_background_wallet, error::wallet_internal_error,
-+ "Can't set background sync type from an existing background cache");
-+ verify_password_with_cached_key(wallet_password);
-+
-+ if (background_sync_type != BackgroundSyncOff)
-+ validate_background_cache_password_usage(background_sync_type, background_cache_password, m_multisig, m_watch_only, key_on_device());
-+
-+ THROW_WALLET_EXCEPTION_IF(background_sync_type == BackgroundSyncCustomPassword && wallet_password == background_cache_password,
-+ error::background_custom_password_same_as_wallet_password);
-+
-+ if (m_background_sync_type == background_sync_type && background_sync_type != BackgroundSyncCustomPassword)
-+ return; // No need to make any changes
-+
-+ if (!m_wallet_file.empty())
-+ {
-+ // Delete existing background files if they already exist
-+ const std::string old_background_wallet_file = make_background_wallet_file_name(m_wallet_file);
-+ const std::string old_background_keys_file = make_background_keys_file_name(m_wallet_file);
-+ const std::string old_background_address_file = old_background_wallet_file + ".address.txt";
-+
-+ // Make sure no other program is using the background wallet
-+ THROW_WALLET_EXCEPTION_IF(!lock_background_keys_file(old_background_keys_file),
-+ error::background_wallet_already_open, old_background_wallet_file);
-+
-+ if (boost::filesystem::exists(old_background_wallet_file))
-+ if (!boost::filesystem::remove(old_background_wallet_file))
-+ LOG_ERROR("Error deleting background wallet file: " << old_background_wallet_file);
-+
-+ if (boost::filesystem::exists(old_background_keys_file))
-+ if (!boost::filesystem::remove(old_background_keys_file))
-+ LOG_ERROR("Error deleting background keys file: " << old_background_keys_file);
-+
-+ if (boost::filesystem::exists(old_background_address_file))
-+ if (!boost::filesystem::remove(old_background_address_file))
-+ LOG_ERROR("Error deleting background address file: " << old_background_address_file);
-+ }
-+
-+ m_background_sync_type = background_sync_type;
-+ m_custom_background_key = boost::none;
-+
-+ // Write the new files
-+ switch (background_sync_type)
-+ {
-+ case BackgroundSyncOff:
-+ case BackgroundSyncReusePassword: rewrite(m_wallet_file, wallet_password); break;
-+ case BackgroundSyncCustomPassword: write_background_sync_wallet(wallet_password, background_cache_password.get()); break;
-+ default: THROW_WALLET_EXCEPTION(error::wallet_internal_error, "unknown background sync type");
-+ }
-+
-+ MDEBUG("Done setting background sync type");
-+}
-+//----------------------------------------------------------------------------------------------------
-+/*
-+ When background syncing, the wallet scans using just the view key, without
-+ keeping the spend key in decrypted state. When a user returns to the wallet
-+ and decrypts the spend key, the wallet processes the background synced txs,
-+ then the wallet picks up scanning normally right where the background sync
-+ left off.
-+*/
-+void wallet2::start_background_sync()
-+{
-+ THROW_WALLET_EXCEPTION_IF(m_background_sync_type == BackgroundSyncOff, error::wallet_internal_error,
-+ "must setup background sync first before using background sync");
-+ THROW_WALLET_EXCEPTION_IF(m_is_background_wallet, error::wallet_internal_error,
-+ "Can't start background syncing from a background wallet (it is always background syncing)");
-+
-+ MDEBUG("Starting background sync");
-+
-+ if (m_background_syncing)
-+ {
-+ MDEBUG("Already background syncing");
-+ return;
-+ }
-+
-+ if (m_background_sync_type == BackgroundSyncCustomPassword && !m_wallet_file.empty())
-+ {
-+ // Save the current state of the wallet cache. Only necessary when using a
-+ // custom background password which uses distinct background wallet to sync.
-+ // When reusing wallet password to sync we reuse the main wallet cache.
-+ store();
-+
-+ // Wipe user data from the background wallet cache not needed to sync.
-+ // Only wipe user data from background cache if wallet cache is stored
-+ // on disk; otherwise we could lose the data.
-+ clear_user_data();
-+
-+ // Wipe m_cache_key since it can be used to decrypt main wallet cache
-+ m_cache_key.scrub();
-+ }
-+
-+ reset_background_sync_data(m_background_sync_data);
-+ m_background_syncing = true;
-+
-+ // Wipe the spend key from memory
-+ m_account.forget_spend_key();
-+
-+ MDEBUG("Background sync started at height " << m_background_sync_data.start_height);
-+}
-+//----------------------------------------------------------------------------------------------------
-+void wallet2::stop_background_sync(const epee::wipeable_string &wallet_password, const crypto::secret_key &spend_secret_key)
-+{
-+ MDEBUG("Stopping background sync");
-+
-+ // Verify provided password and spend secret key. If no spend secret key is
-+ // provided, recover it from the wallet keys file
-+ crypto::secret_key recovered_spend_key = crypto::null_skey;
-+ if (!m_wallet_file.empty())
-+ {
-+ THROW_WALLET_EXCEPTION_IF(!verify_password(wallet_password, recovered_spend_key), error::invalid_password);
-+ }
-+ else
-+ {
-+ verify_password_with_cached_key(wallet_password);
-+ }
-+
-+ if (spend_secret_key != crypto::null_skey)
-+ {
-+ THROW_WALLET_EXCEPTION_IF(!m_wallet_file.empty() && spend_secret_key != recovered_spend_key,
-+ error::invalid_spend_key);
-+ MDEBUG("Setting spend secret key with the provided key");
-+ recovered_spend_key = spend_secret_key;
-+ }
-+
-+ // Verify private spend key derives to wallet's public spend key
-+ const auto verify_spend_key = [this](crypto::secret_key &recovered_spend_key) -> bool
-+ {
-+ crypto::public_key spend_public_key;
-+ return recovered_spend_key != crypto::null_skey &&
-+ crypto::secret_key_to_public_key(recovered_spend_key, spend_public_key) &&
-+ m_account.get_keys().m_account_address.m_spend_public_key == spend_public_key;
-+ };
-+ THROW_WALLET_EXCEPTION_IF(!verify_spend_key(recovered_spend_key), error::invalid_spend_key);
-+
-+ THROW_WALLET_EXCEPTION_IF(m_background_sync_type == BackgroundSyncOff, error::wallet_internal_error,
-+ "must setup background sync first before using background sync");
-+ THROW_WALLET_EXCEPTION_IF(m_is_background_wallet, error::wallet_internal_error,
-+ "Can't stop background syncing from a background wallet");
-+
-+ if (!m_background_syncing)
-+ return;
-+
-+ // Copy background cache, we're about to overwrite it
-+ const background_sync_data_t background_sync_data = m_background_sync_data;
-+ const hashchain background_synced_chain = m_blockchain;
-+ const uint64_t last_block_reward = m_last_block_reward;
-+
-+ if (m_background_sync_type == BackgroundSyncCustomPassword && !m_wallet_file.empty())
-+ {
-+ // Reload the wallet from disk
-+ load(m_wallet_file, wallet_password);
-+ THROW_WALLET_EXCEPTION_IF(!verify_spend_key(recovered_spend_key), error::invalid_spend_key);
-+ }
-+ m_background_syncing = false;
-+
-+ // Set the plaintext spend key
-+ m_account.set_spend_key(recovered_spend_key);
-+
-+ // Encrypt the spend key when done if needed
-+ epee::misc_utils::auto_scope_leave_caller keys_reencryptor;
-+ if (m_ask_password == AskPasswordToDecrypt && !m_unattended && !m_watch_only)
-+ keys_reencryptor = epee::misc_utils::create_scope_leave_handler([&, this]{encrypt_keys(wallet_password);});
-+
-+ // Now we can use the decrypted spend key to process background cache
-+ process_background_cache(background_sync_data, background_synced_chain, last_block_reward);
-+
-+ // Reset the background cache after processing
-+ reset_background_sync_data(m_background_sync_data);
-+
-+ MDEBUG("Background sync stopped");
-+}
-+//----------------------------------------------------------------------------------------------------
- wallet2::payment_container wallet2::export_payments() const
- {
- payment_container payments;
-diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index b620ea265..632298726 100644
---- a/src/wallet/wallet2.h
-+++ b/src/wallet/wallet2.h
-@@ -256,6 +256,20 @@ private:
- BackgroundMiningNo = 2,
- };
-
-+ enum BackgroundSyncType {
-+ BackgroundSyncOff = 0,
-+ BackgroundSyncReusePassword = 1,
-+ BackgroundSyncCustomPassword = 2,
-+ };
-+
-+ static BackgroundSyncType background_sync_type_from_str(const std::string &background_sync_type_str)
-+ {
-+ if (background_sync_type_str == "off") return BackgroundSyncOff;
-+ if (background_sync_type_str == "reuse-wallet-password") return BackgroundSyncReusePassword;
-+ if (background_sync_type_str == "custom-background-password") return BackgroundSyncCustomPassword;
-+ throw std::logic_error("Unknown background sync type");
-+ };
-+
- enum ExportFormat {
- Binary = 0,
- Ascii,
-@@ -282,7 +296,12 @@ private:
- //! Just parses variables.
- static std::unique_ptr<wallet2> make_dummy(const boost::program_options::variables_map& vm, bool unattended, const std::function<boost::optional<password_container>(const char *, bool)> &password_prompter);
-
-- static bool verify_password(const std::string& keys_file_name, const epee::wipeable_string& password, bool no_spend_key, hw::device &hwdev, uint64_t kdf_rounds);
-+ static bool verify_password(const std::string& keys_file_name, const epee::wipeable_string& password, bool no_spend_key, hw::device &hwdev, uint64_t kdf_rounds)
-+ {
-+ crypto::secret_key spend_key = crypto::null_skey;
-+ return verify_password(keys_file_name, password, no_spend_key, hwdev, kdf_rounds, spend_key);
-+ };
-+ static bool verify_password(const std::string& keys_file_name, const epee::wipeable_string& password, bool no_spend_key, hw::device &hwdev, uint64_t kdf_rounds, crypto::secret_key &spend_key_out);
- static bool query_device(hw::device::device_type& device_type, const std::string& keys_file_name, const epee::wipeable_string& password, uint64_t kdf_rounds = 1);
-
- wallet2(cryptonote::network_type nettype = cryptonote::MAINNET, uint64_t kdf_rounds = 1, bool unattended = false, std::unique_ptr<epee::net_utils::http::http_client_factory> http_client_factory = std::unique_ptr<epee::net_utils::http::http_client_factory>(new net::http::client_factory()));
-@@ -792,6 +811,54 @@ private:
- END_SERIALIZE()
- };
-
-+ struct background_synced_tx_t
-+ {
-+ uint64_t index_in_background_sync_data;
-+ cryptonote::transaction tx;
-+ std::vector<uint64_t> output_indices;
-+ uint64_t height;
-+ uint64_t block_timestamp;
-+ bool double_spend_seen;
-+
-+ BEGIN_SERIALIZE_OBJECT()
-+ VERSION_FIELD(0)
-+ VARINT_FIELD(index_in_background_sync_data)
-+
-+ // prune tx; don't need to keep signature data
-+ if (!tx.serialize_base(ar))
-+ return false;
-+
-+ FIELD(output_indices)
-+ VARINT_FIELD(height)
-+ VARINT_FIELD(block_timestamp)
-+ FIELD(double_spend_seen)
-+ END_SERIALIZE()
-+ };
-+
-+ struct background_sync_data_t
-+ {
-+ bool first_refresh_done = false;
-+ uint64_t start_height = 0;
-+ serializable_unordered_map<crypto::hash, background_synced_tx_t> txs;
-+
-+ // Relevant wallet settings
-+ uint64_t wallet_refresh_from_block_height;
-+ size_t subaddress_lookahead_major;
-+ size_t subaddress_lookahead_minor;
-+ RefreshType wallet_refresh_type;
-+
-+ BEGIN_SERIALIZE_OBJECT()
-+ VERSION_FIELD(0)
-+ FIELD(first_refresh_done)
-+ FIELD(start_height)
-+ FIELD(txs)
-+ FIELD(wallet_refresh_from_block_height)
-+ VARINT_FIELD(subaddress_lookahead_major)
-+ VARINT_FIELD(subaddress_lookahead_minor)
-+ VARINT_FIELD(wallet_refresh_type)
-+ END_SERIALIZE()
-+ };
-+
- typedef std::tuple<uint64_t, crypto::public_key, rct::key> get_outs_entry;
-
- struct parsed_block
-@@ -980,7 +1047,8 @@ private:
- /*!
- * \brief verifies given password is correct for default wallet keys file
- */
-- bool verify_password(const epee::wipeable_string& password);
-+ bool verify_password(const epee::wipeable_string& password) {crypto::secret_key key = crypto::null_skey; return verify_password(password, key);};
-+ bool verify_password(const epee::wipeable_string& password, crypto::secret_key &spend_key_out);
- cryptonote::account_base& get_account(){return m_account;}
- const cryptonote::account_base& get_account()const{return m_account;}
-
-@@ -1076,6 +1144,7 @@ private:
- cryptonote::network_type nettype() const { return m_nettype; }
- bool watch_only() const { return m_watch_only; }
- bool multisig(bool *ready = NULL, uint32_t *threshold = NULL, uint32_t *total = NULL) const;
-+ bool is_background_wallet() const { return m_is_background_wallet; }
- bool has_multisig_partial_key_images() const;
- bool has_unknown_key_images() const;
- bool get_multisig_seed(epee::wipeable_string& seed, const epee::wipeable_string &passphrase = std::string()) const;
-@@ -1283,11 +1352,17 @@ private:
- return;
- }
- a & m_has_ever_refreshed_from_node;
-+ if(ver < 31)
-+ {
-+ m_background_sync_data = background_sync_data_t{};
-+ return;
-+ }
-+ a & m_background_sync_data;
- }
-
- BEGIN_SERIALIZE_OBJECT()
- MAGIC_FIELD("wownero wallet cache")
-- VERSION_FIELD(1)
-+ VERSION_FIELD(2)
- FIELD(m_blockchain)
- FIELD(m_transfers)
- FIELD(m_account_public_address)
-@@ -1319,6 +1394,12 @@ private:
- return true;
- }
- FIELD(m_has_ever_refreshed_from_node)
-+ if (version < 2)
-+ {
-+ m_background_sync_data = background_sync_data_t{};
-+ return true;
-+ }
-+ FIELD(m_background_sync_data)
- END_SERIALIZE()
-
- /*!
-@@ -1334,6 +1415,8 @@ private:
- * \return Whether path is valid format
- */
- static bool wallet_valid_path_format(const std::string& file_path);
-+ static std::string make_background_wallet_file_name(const std::string &wallet_file);
-+ static std::string make_background_keys_file_name(const std::string &wallet_file);
- static bool parse_long_payment_id(const std::string& payment_id_str, crypto::hash& payment_id);
- static bool parse_short_payment_id(const std::string& payment_id_str, crypto::hash8& payment_id);
- static bool parse_payment_id(const std::string& payment_id_str, crypto::hash& payment_id);
-@@ -1382,6 +1465,9 @@ private:
- void ignore_outputs_below(uint64_t value) { m_ignore_outputs_below = value; }
- bool track_uses() const { return m_track_uses; }
- void track_uses(bool value) { m_track_uses = value; }
-+ BackgroundSyncType background_sync_type() const { return m_background_sync_type; }
-+ void setup_background_sync(BackgroundSyncType background_sync_type, const epee::wipeable_string &wallet_password, const boost::optional<epee::wipeable_string> &background_cache_password);
-+ bool is_background_syncing() const { return m_background_syncing; }
- bool show_wallet_name_when_locked() const { return m_show_wallet_name_when_locked; }
- void show_wallet_name_when_locked(bool value) { m_show_wallet_name_when_locked = value; }
- BackgroundMiningSetupType setup_background_mining() const { return m_setup_background_mining; }
-@@ -1696,6 +1782,9 @@ private:
- uint64_t get_bytes_sent() const;
- uint64_t get_bytes_received() const;
-
-+ void start_background_sync();
-+ void stop_background_sync(const epee::wipeable_string &wallet_password, const crypto::secret_key &spend_secret_key = crypto::null_skey);
-+
- // MMS -------------------------------------------------------------------------------------------------
- mms::message_store& get_message_store() { return m_message_store; };
- const mms::message_store& get_message_store() const { return m_message_store; };
-@@ -1731,6 +1820,9 @@ private:
- * \return Whether it was successful.
- */
- bool store_keys(const std::string& keys_file_name, const epee::wipeable_string& password, bool watch_only = false);
-+ bool store_keys(const std::string& keys_file_name, const crypto::chacha_key& key, bool watch_only = false, bool background_keys_file = false);
-+ boost::optional<wallet2::keys_file_data> get_keys_file_data(const crypto::chacha_key& key, bool watch_only = false, bool background_keys_file = false);
-+ bool store_keys_file_data(const std::string& keys_file_name, wallet2::keys_file_data &keys_file_data, bool background_keys_file = false);
- /*!
- * \brief Load wallet keys information from wallet file.
- * \param keys_file_name Name of wallet file
-@@ -1744,6 +1836,7 @@ private:
- */
- bool load_keys_buf(const std::string& keys_buf, const epee::wipeable_string& password);
- bool load_keys_buf(const std::string& keys_buf, const epee::wipeable_string& password, boost::optional<crypto::chacha_key>& keys_to_encrypt);
-+ void load_wallet_cache(const bool use_fs, const std::string& cache_buf = "");
- void process_new_transaction(const crypto::hash &txid, const cryptonote::transaction& tx, const std::vector<uint64_t> &o_indices, uint64_t height, uint8_t block_version, uint64_t ts, bool miner_tx, bool pool, bool double_spend_seen, const tx_cache_data &tx_cache_data, std::map<std::pair<uint64_t, uint64_t>, size_t> *output_tracker_cache = NULL, bool ignore_callbacks = false);
- bool should_skip_block(const cryptonote::block &b, uint64_t height) const;
- void process_new_blockchain_entry(const cryptonote::block& b, const cryptonote::block_complete_entry& bche, const parsed_block &parsed_block, const crypto::hash& bl_id, uint64_t height, const std::vector<tx_cache_data> &tx_cache_data, size_t tx_cache_data_offset, std::map<std::pair<uint64_t, uint64_t>, size_t> *output_tracker_cache = NULL);
-@@ -1752,6 +1845,15 @@ private:
- void get_short_chain_history(std::list<crypto::hash>& ids, uint64_t granularity = 1) const;
- bool clear();
- void clear_soft(bool keep_key_images=false);
-+ /*
-+ * clear_user_data clears data created by the user, which is mostly data
-+ * that a view key cannot identify on chain. This function was initially
-+ * added to ensure that a "background" wallet (a wallet that syncs with just
-+ * a view key hot in memory) does not have any sensitive data loaded that it
-+ * does not need in order to sync. Future devs should take care to ensure
-+ * that this function deletes data that is not useful for background syncing
-+ */
-+ void clear_user_data();
- void pull_blocks(bool first, bool try_incremental, uint64_t start_height, uint64_t& blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices> &o_indices, uint64_t &current_height);
- void pull_hashes(uint64_t start_height, uint64_t& blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<crypto::hash> &hashes);
- void fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height, std::list<crypto::hash> &short_chain_history, bool force = false);
-@@ -1803,10 +1905,23 @@ private:
- bool get_ring(const crypto::chacha_key &key, const crypto::key_image &key_image, std::vector<uint64_t> &outs);
- crypto::chacha_key get_ringdb_key();
- void setup_keys(const epee::wipeable_string &password);
-+ const crypto::chacha_key get_cache_key();
-+ void verify_password_with_cached_key(const epee::wipeable_string &password);
-+ void verify_password_with_cached_key(const crypto::chacha_key &key);
- size_t get_transfer_details(const crypto::key_image &ki) const;
- tx_entry_data get_tx_entries(const std::unordered_set<crypto::hash> &txids);
- void sort_scan_tx_entries(std::vector<process_tx_entry_t> &unsorted_tx_entries);
- void process_scan_txs(const tx_entry_data &txs_to_scan, const tx_entry_data &txs_to_reprocess, const std::unordered_set<crypto::hash> &tx_hashes_to_reprocess, detached_blockchain_data &dbd);
-+ void write_background_sync_wallet(const epee::wipeable_string &wallet_password, const epee::wipeable_string &background_cache_password);
-+ void process_background_cache_on_open();
-+ void process_background_cache(const background_sync_data_t &background_sync_data, const hashchain &background_chain, uint64_t last_block_reward);
-+ void reset_background_sync_data(background_sync_data_t &background_sync_data);
-+ void store_background_cache(const crypto::chacha_key &custom_background_key, const bool do_reset_background_sync_data = true);
-+ void store_background_keys(const crypto::chacha_key &custom_background_key);
-+
-+ bool lock_background_keys_file(const std::string &background_keys_file);
-+ bool unlock_background_keys_file();
-+ bool is_background_keys_file_locked() const;
-
- void register_devices();
- hw::device& lookup_device(const std::string & device_descriptor);
-@@ -1922,6 +2037,8 @@ private:
- uint64_t m_ignore_outputs_above;
- uint64_t m_ignore_outputs_below;
- bool m_track_uses;
-+ bool m_is_background_wallet;
-+ BackgroundSyncType m_background_sync_type;
- bool m_show_wallet_name_when_locked;
- uint32_t m_inactivity_lock_timeout;
- BackgroundMiningSetupType m_setup_background_mining;
-@@ -1967,6 +2084,7 @@ private:
-
- uint64_t m_last_block_reward;
- std::unique_ptr<tools::file_locker> m_keys_file_locker;
-+ std::unique_ptr<tools::file_locker> m_background_keys_file_locker;
-
- mms::message_store m_message_store;
- bool m_original_keys_available;
-@@ -1974,6 +2092,7 @@ private:
- crypto::secret_key m_original_view_secret_key;
-
- crypto::chacha_key m_cache_key;
-+ boost::optional<crypto::chacha_key> m_custom_background_key = boost::none;
- std::shared_ptr<wallet_keys_unlocker> m_encrypt_keys_after_refresh;
-
- bool m_unattended;
-@@ -1989,9 +2108,13 @@ private:
-
- static boost::mutex default_daemon_address_lock;
- static std::string default_daemon_address;
-+
-+ bool m_background_syncing;
-+ bool m_processing_background_cache;
-+ background_sync_data_t m_background_sync_data;
- };
- }
--BOOST_CLASS_VERSION(tools::wallet2, 30)
-+BOOST_CLASS_VERSION(tools::wallet2, 31)
- BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 12)
- BOOST_CLASS_VERSION(tools::wallet2::multisig_info, 1)
- BOOST_CLASS_VERSION(tools::wallet2::multisig_info::LR, 0)
-@@ -2007,6 +2130,8 @@ BOOST_CLASS_VERSION(tools::wallet2::signed_tx_set, 1)
- BOOST_CLASS_VERSION(tools::wallet2::tx_construction_data, 4)
- BOOST_CLASS_VERSION(tools::wallet2::pending_tx, 3)
- BOOST_CLASS_VERSION(tools::wallet2::multisig_sig, 1)
-+BOOST_CLASS_VERSION(tools::wallet2::background_synced_tx_t, 0)
-+BOOST_CLASS_VERSION(tools::wallet2::background_sync_data_t, 0)
-
- namespace boost
- {
-@@ -2505,6 +2630,29 @@ namespace boost
- return;
- a & x.multisig_sigs;
- }
-+
-+ template <class Archive>
-+ inline void serialize(Archive& a, tools::wallet2::background_synced_tx_t &x, const boost::serialization::version_type ver)
-+ {
-+ a & x.index_in_background_sync_data;
-+ a & x.tx;
-+ a & x.output_indices;
-+ a & x.height;
-+ a & x.block_timestamp;
-+ a & x.double_spend_seen;
-+ }
-+
-+ template <class Archive>
-+ inline void serialize(Archive& a, tools::wallet2::background_sync_data_t &x, const boost::serialization::version_type ver)
-+ {
-+ a & x.first_refresh_done;
-+ a & x.start_height;
-+ a & x.txs.parent();
-+ a & x.wallet_refresh_from_block_height;
-+ a & x.subaddress_lookahead_major;
-+ a & x.subaddress_lookahead_minor;
-+ a & x.wallet_refresh_type;
-+ }
- }
- }
-
-diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h
-index c077313d4..c54cd3499 100644
---- a/src/wallet/wallet_errors.h
-+++ b/src/wallet/wallet_errors.h
-@@ -63,6 +63,7 @@ namespace tools
- // invalid_password
- // invalid_priority
- // invalid_multisig_seed
-+ // invalid_spend_key
- // refresh_error *
- // acc_outs_lookup_error
- // block_parse_error
-@@ -97,6 +98,9 @@ namespace tools
- // wallet_files_doesnt_correspond
- // scan_tx_error *
- // wont_reprocess_recent_txs_via_untrusted_daemon
-+ // background_sync_error *
-+ // background_wallet_already_open
-+ // background_custom_password_same_as_wallet_password
- //
- // * - class with protected ctor
-
-@@ -304,6 +308,16 @@ namespace tools
- std::string to_string() const { return wallet_logic_error::to_string(); }
- };
-
-+ struct invalid_spend_key : public wallet_logic_error
-+ {
-+ explicit invalid_spend_key(std::string&& loc)
-+ : wallet_logic_error(std::move(loc), "invalid spend key")
-+ {
-+ }
-+
-+ std::string to_string() const { return wallet_logic_error::to_string(); }
-+ };
-+
- //----------------------------------------------------------------------------------------------------
- struct invalid_pregenerated_random : public wallet_logic_error
- {
-@@ -947,6 +961,31 @@ namespace tools
- }
- };
- //----------------------------------------------------------------------------------------------------
-+ struct background_sync_error : public wallet_logic_error
-+ {
-+ protected:
-+ explicit background_sync_error(std::string&& loc, const std::string& message)
-+ : wallet_logic_error(std::move(loc), message)
-+ {
-+ }
-+ };
-+ //----------------------------------------------------------------------------------------------------
-+ struct background_wallet_already_open : public background_sync_error
-+ {
-+ explicit background_wallet_already_open(std::string&& loc, const std::string& background_wallet_file)
-+ : background_sync_error(std::move(loc), "background wallet " + background_wallet_file + " is already opened by another wallet program")
-+ {
-+ }
-+ };
-+ //----------------------------------------------------------------------------------------------------
-+ struct background_custom_password_same_as_wallet_password : public background_sync_error
-+ {
-+ explicit background_custom_password_same_as_wallet_password(std::string&& loc)
-+ : background_sync_error(std::move(loc), "custom background password must be different than wallet password")
-+ {
-+ }
-+ };
-+ //----------------------------------------------------------------------------------------------------
-
- #if !defined(_MSC_VER)
-
-diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
-index 1c7c45034..21e69ea0e 100644
---- a/src/wallet/wallet_rpc_server.cpp
-+++ b/src/wallet/wallet_rpc_server.cpp
-@@ -73,6 +73,54 @@ using namespace epee;
- } \
- } while(0)
-
-+#define CHECK_IF_BACKGROUND_SYNCING() \
-+ do \
-+ { \
-+ if (!m_wallet) { return not_open(er); } \
-+ if (m_wallet->is_background_wallet()) \
-+ { \
-+ er.code = WALLET_RPC_ERROR_CODE_IS_BACKGROUND_WALLET; \
-+ er.message = "This command is disabled for background wallets."; \
-+ return false; \
-+ } \
-+ if (m_wallet->is_background_syncing()) \
-+ { \
-+ er.code = WALLET_RPC_ERROR_CODE_IS_BACKGROUND_SYNCING; \
-+ er.message = "This command is disabled while background syncing. Stop background syncing to use this command."; \
-+ return false; \
-+ } \
-+ } while(0)
-+
-+#define PRE_VALIDATE_BACKGROUND_SYNC() \
-+ do \
-+ { \
-+ if (!m_wallet) { return not_open(er); } \
-+ if (m_restricted) \
-+ { \
-+ er.code = WALLET_RPC_ERROR_CODE_DENIED; \
-+ er.message = "Command unavailable in restricted mode."; \
-+ return false; \
-+ } \
-+ if (m_wallet->key_on_device()) \
-+ { \
-+ er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; \
-+ er.message = "Command not supported by HW wallet"; \
-+ return false; \
-+ } \
-+ if (m_wallet->multisig()) \
-+ { \
-+ er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; \
-+ er.message = "Multisig wallet cannot enable background sync"; \
-+ return false; \
-+ } \
-+ if (m_wallet->watch_only()) \
-+ { \
-+ er.code = WALLET_RPC_ERROR_CODE_WATCH_ONLY; \
-+ er.message = "Watch-only wallet cannot enable background sync"; \
-+ return false; \
-+ } \
-+ } while (0)
-+
- namespace
- {
- const command_line::arg_descriptor<std::string, true> arg_rpc_bind_port = {"rpc-bind-port", "Sets bind port for server"};
-@@ -291,6 +339,9 @@ namespace tools
- {
- if (!m_wallet)
- return;
-+ // Background mining can be toggled from the main wallet
-+ if (m_wallet->is_background_wallet() || m_wallet->is_background_syncing())
-+ return;
-
- tools::wallet2::BackgroundMiningSetupType setup = m_wallet->setup_background_mining();
- if (setup == tools::wallet2::BackgroundMiningNo)
-@@ -581,6 +632,7 @@ namespace tools
- bool wallet_rpc_server::on_create_address(const wallet_rpc::COMMAND_RPC_CREATE_ADDRESS::request& req, wallet_rpc::COMMAND_RPC_CREATE_ADDRESS::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- if (req.count < 1 || req.count > 64) {
-@@ -618,6 +670,7 @@ namespace tools
- bool wallet_rpc_server::on_label_address(const wallet_rpc::COMMAND_RPC_LABEL_ADDRESS::request& req, wallet_rpc::COMMAND_RPC_LABEL_ADDRESS::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- m_wallet->set_subaddress_label(req.index, req.label);
-@@ -680,6 +733,7 @@ namespace tools
- bool wallet_rpc_server::on_create_account(const wallet_rpc::COMMAND_RPC_CREATE_ACCOUNT::request& req, wallet_rpc::COMMAND_RPC_CREATE_ACCOUNT::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- m_wallet->add_subaddress_account(req.label);
-@@ -697,6 +751,7 @@ namespace tools
- bool wallet_rpc_server::on_label_account(const wallet_rpc::COMMAND_RPC_LABEL_ACCOUNT::request& req, wallet_rpc::COMMAND_RPC_LABEL_ACCOUNT::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- m_wallet->set_subaddress_label({req.account_index, 0}, req.label);
-@@ -712,6 +767,7 @@ namespace tools
- bool wallet_rpc_server::on_get_account_tags(const wallet_rpc::COMMAND_RPC_GET_ACCOUNT_TAGS::request& req, wallet_rpc::COMMAND_RPC_GET_ACCOUNT_TAGS::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- const std::pair<std::map<std::string, std::string>, std::vector<std::string>> account_tags = m_wallet->get_account_tags();
- for (const std::pair<const std::string, std::string>& p : account_tags.first)
- {
-@@ -731,6 +787,7 @@ namespace tools
- bool wallet_rpc_server::on_tag_accounts(const wallet_rpc::COMMAND_RPC_TAG_ACCOUNTS::request& req, wallet_rpc::COMMAND_RPC_TAG_ACCOUNTS::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- m_wallet->set_account_tag(req.accounts, req.tag);
-@@ -746,6 +803,7 @@ namespace tools
- bool wallet_rpc_server::on_untag_accounts(const wallet_rpc::COMMAND_RPC_UNTAG_ACCOUNTS::request& req, wallet_rpc::COMMAND_RPC_UNTAG_ACCOUNTS::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- m_wallet->set_account_tag(req.accounts, "");
-@@ -761,6 +819,7 @@ namespace tools
- bool wallet_rpc_server::on_set_account_tag_description(const wallet_rpc::COMMAND_RPC_SET_ACCOUNT_TAG_DESCRIPTION::request& req, wallet_rpc::COMMAND_RPC_SET_ACCOUNT_TAG_DESCRIPTION::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- m_wallet->set_account_tag_description(req.tag, req.description);
-@@ -791,6 +850,7 @@ namespace tools
- bool wallet_rpc_server::on_freeze(const wallet_rpc::COMMAND_RPC_FREEZE::request& req, wallet_rpc::COMMAND_RPC_FREEZE::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- if (req.key_image.empty())
-@@ -819,6 +879,7 @@ namespace tools
- bool wallet_rpc_server::on_thaw(const wallet_rpc::COMMAND_RPC_THAW::request& req, wallet_rpc::COMMAND_RPC_THAW::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- if (req.key_image.empty())
-@@ -847,6 +908,7 @@ namespace tools
- bool wallet_rpc_server::on_frozen(const wallet_rpc::COMMAND_RPC_FROZEN::request& req, wallet_rpc::COMMAND_RPC_FROZEN::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- if (req.key_image.empty())
-@@ -874,6 +936,8 @@ namespace tools
- //------------------------------------------------------------------------------------------------------------------------------
- bool wallet_rpc_server::validate_transfer(const std::list<wallet_rpc::transfer_destination>& destinations, const std::string& payment_id, std::vector<cryptonote::tx_destination_entry>& dsts, std::vector<uint8_t>& extra, bool at_least_one_destination, epee::json_rpc::error& er)
- {
-+ CHECK_IF_BACKGROUND_SYNCING();
-+
- crypto::hash8 integrated_payment_id = crypto::null_hash8;
- std::string extra_nonce;
- for (auto it = destinations.begin(); it != destinations.end(); it++)
-@@ -1203,6 +1267,7 @@ namespace tools
- }
-
- CHECK_MULTISIG_ENABLED();
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- cryptonote::blobdata blob;
- if (!epee::string_tools::parse_hexstr_to_binbuff(req.unsigned_txset, blob))
-@@ -1284,6 +1349,7 @@ namespace tools
- er.message = "command not supported by watch-only wallet";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
- if(req.unsigned_txset.empty() && req.multisig_txset.empty())
- {
- er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR;
-@@ -1553,6 +1619,7 @@ namespace tools
- }
-
- CHECK_MULTISIG_ENABLED();
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- try
- {
-@@ -2114,6 +2181,7 @@ namespace tools
- er.message = "The wallet is watch-only. Cannot retrieve seed.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
- if (!m_wallet->is_deterministic())
- {
- er.code = WALLET_RPC_ERROR_CODE_NON_DETERMINISTIC;
-@@ -2142,6 +2210,7 @@ namespace tools
- er.message = "The wallet is watch-only. Cannot retrieve spend key.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
- epee::wipeable_string key = epee::to_hex::wipeable_string(m_wallet->get_account().get_keys().m_spend_secret_key);
- res.key = std::string(key.data(), key.size());
- }
-@@ -2163,6 +2232,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- try
- {
-@@ -2176,6 +2246,79 @@ namespace tools
- return true;
- }
- //------------------------------------------------------------------------------------------------------------------------------
-+ bool wallet_rpc_server::on_setup_background_sync(const wallet_rpc::COMMAND_RPC_SETUP_BACKGROUND_SYNC::request& req, wallet_rpc::COMMAND_RPC_SETUP_BACKGROUND_SYNC::response& res, epee::json_rpc::error& er, const connection_context *ctx)
-+ {
-+ try
-+ {
-+ PRE_VALIDATE_BACKGROUND_SYNC();
-+ const tools::wallet2::BackgroundSyncType background_sync_type = tools::wallet2::background_sync_type_from_str(req.background_sync_type);
-+ boost::optional<epee::wipeable_string> background_cache_password = boost::none;
-+ if (background_sync_type == tools::wallet2::BackgroundSyncCustomPassword)
-+ background_cache_password = boost::optional<epee::wipeable_string>(req.background_cache_password);
-+ m_wallet->setup_background_sync(background_sync_type, req.wallet_password, background_cache_password);
-+ }
-+ catch (...)
-+ {
-+ handle_rpc_exception(std::current_exception(), er, WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR);
-+ return false;
-+ }
-+ return true;
-+ }
-+ //------------------------------------------------------------------------------------------------------------------------------
-+ bool wallet_rpc_server::on_start_background_sync(const wallet_rpc::COMMAND_RPC_START_BACKGROUND_SYNC::request& req, wallet_rpc::COMMAND_RPC_START_BACKGROUND_SYNC::response& res, epee::json_rpc::error& er, const connection_context *ctx)
-+ {
-+ try
-+ {
-+ PRE_VALIDATE_BACKGROUND_SYNC();
-+ m_wallet->start_background_sync();
-+ }
-+ catch (...)
-+ {
-+ handle_rpc_exception(std::current_exception(), er, WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR);
-+ return false;
-+ }
-+ return true;
-+ }
-+ //------------------------------------------------------------------------------------------------------------------------------
-+ bool wallet_rpc_server::on_stop_background_sync(const wallet_rpc::COMMAND_RPC_STOP_BACKGROUND_SYNC::request& req, wallet_rpc::COMMAND_RPC_STOP_BACKGROUND_SYNC::response& res, epee::json_rpc::error& er, const connection_context *ctx)
-+ {
-+ try
-+ {
-+ PRE_VALIDATE_BACKGROUND_SYNC();
-+ crypto::secret_key spend_secret_key = crypto::null_skey;
-+
-+ // Load the spend key from seed if seed is provided
-+ if (!req.seed.empty())
-+ {
-+ crypto::secret_key recovery_key;
-+ std::string language;
-+
-+ if (!crypto::ElectrumWords::words_to_bytes(req.seed, recovery_key, language))
-+ {
-+ er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR;
-+ er.message = "Electrum-style word list failed verification";
-+ return false;
-+ }
-+
-+ if (!req.seed_offset.empty())
-+ recovery_key = cryptonote::decrypt_key(recovery_key, req.seed_offset);
-+
-+ // generate spend key
-+ cryptonote::account_base account;
-+ account.generate(recovery_key, true, false);
-+ spend_secret_key = account.get_keys().m_spend_secret_key;
-+ }
-+
-+ m_wallet->stop_background_sync(req.wallet_password, spend_secret_key);
-+ }
-+ catch (...)
-+ {
-+ handle_rpc_exception(std::current_exception(), er, WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR);
-+ return false;
-+ }
-+ return true;
-+ }
-+ //------------------------------------------------------------------------------------------------------------------------------
- bool wallet_rpc_server::on_sign(const wallet_rpc::COMMAND_RPC_SIGN::request& req, wallet_rpc::COMMAND_RPC_SIGN::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-@@ -2185,6 +2328,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- tools::wallet2::message_signature_type_t signature_type = tools::wallet2::sign_with_spend_key;
- if (req.signature_type == "spend" || req.signature_type == "")
-@@ -2277,6 +2421,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- if (req.txids.size() != req.notes.size())
- {
-@@ -2349,6 +2494,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- m_wallet->set_attribute(req.key, req.value);
-
-@@ -2376,6 +2522,7 @@ namespace tools
- bool wallet_rpc_server::on_get_tx_key(const wallet_rpc::COMMAND_RPC_GET_TX_KEY::request& req, wallet_rpc::COMMAND_RPC_GET_TX_KEY::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- crypto::hash txid;
- if (!epee::string_tools::hex_to_pod(req.txid, txid))
-@@ -2467,6 +2614,7 @@ namespace tools
- bool wallet_rpc_server::on_get_tx_proof(const wallet_rpc::COMMAND_RPC_GET_TX_PROOF::request& req, wallet_rpc::COMMAND_RPC_GET_TX_PROOF::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- crypto::hash txid;
- if (!epee::string_tools::hex_to_pod(req.txid, txid))
-@@ -2583,6 +2731,7 @@ namespace tools
- bool wallet_rpc_server::on_get_reserve_proof(const wallet_rpc::COMMAND_RPC_GET_RESERVE_PROOF::request& req, wallet_rpc::COMMAND_RPC_GET_RESERVE_PROOF::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- boost::optional<std::pair<uint32_t, uint64_t>> account_minreserve;
- if (!req.all)
-@@ -2825,6 +2974,7 @@ namespace tools
- er.message = "command not supported by HW wallet";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- try
- {
-@@ -2854,6 +3004,7 @@ namespace tools
- er.message = "command not supported by HW wallet";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- cryptonote::blobdata blob;
- if (!epee::string_tools::parse_hexstr_to_binbuff(req.outputs_data_hex, blob))
-@@ -2879,6 +3030,7 @@ namespace tools
- bool wallet_rpc_server::on_export_key_images(const wallet_rpc::COMMAND_RPC_EXPORT_KEY_IMAGES::request& req, wallet_rpc::COMMAND_RPC_EXPORT_KEY_IMAGES::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>> ski = m_wallet->export_key_images(req.all);
-@@ -2915,6 +3067,7 @@ namespace tools
- er.message = "This command requires a trusted daemon.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- std::vector<std::pair<crypto::key_image, crypto::signature>> ski;
-@@ -2983,6 +3136,7 @@ namespace tools
- bool wallet_rpc_server::on_get_address_book(const wallet_rpc::COMMAND_RPC_GET_ADDRESS_BOOK_ENTRY::request& req, wallet_rpc::COMMAND_RPC_GET_ADDRESS_BOOK_ENTRY::response& res, epee::json_rpc::error& er, const connection_context *ctx)
- {
- if (!m_wallet) return not_open(er);
-+ CHECK_IF_BACKGROUND_SYNCING();
- const auto ab = m_wallet->get_address_book();
- if (req.entries.empty())
- {
-@@ -3028,6 +3182,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- cryptonote::address_parse_info info;
- er.message = "";
-@@ -3070,6 +3225,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- const auto ab = m_wallet->get_address_book();
- if (req.index >= ab.size())
-@@ -3132,6 +3288,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- const auto ab = m_wallet->get_address_book();
- if (req.index >= ab.size())
-@@ -3202,6 +3359,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- std::unordered_set<crypto::hash> txids;
- std::list<std::string>::const_iterator i = req.txids.begin();
-@@ -3241,6 +3399,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
- try
- {
- m_wallet->rescan_spent();
-@@ -3505,6 +3664,7 @@ namespace tools
- er.message = "Command unavailable in restricted mode.";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
- if (m_wallet->verify_password(req.old_password))
- {
- try
-@@ -4032,6 +4192,7 @@ namespace tools
- er.message = "wallet is watch-only and cannot be made multisig";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- res.multisig_info = m_wallet->get_multisig_first_kex_msg();
- return true;
-@@ -4059,6 +4220,7 @@ namespace tools
- er.message = "wallet is watch-only and cannot be made multisig";
- return false;
- }
-+ CHECK_IF_BACKGROUND_SYNCING();
-
- try
- {
-diff --git a/src/wallet/wallet_rpc_server.h b/src/wallet/wallet_rpc_server.h
-index 3308d1751..c2329aafe 100644
---- a/src/wallet/wallet_rpc_server.h
-+++ b/src/wallet/wallet_rpc_server.h
-@@ -160,6 +160,9 @@ namespace tools
- MAP_JON_RPC_WE("set_log_categories", on_set_log_categories, wallet_rpc::COMMAND_RPC_SET_LOG_CATEGORIES)
- MAP_JON_RPC_WE("estimate_tx_size_and_weight", on_estimate_tx_size_and_weight, wallet_rpc::COMMAND_RPC_ESTIMATE_TX_SIZE_AND_WEIGHT)
- MAP_JON_RPC_WE("get_version", on_get_version, wallet_rpc::COMMAND_RPC_GET_VERSION)
-+ MAP_JON_RPC_WE("setup_background_sync", on_setup_background_sync, wallet_rpc::COMMAND_RPC_SETUP_BACKGROUND_SYNC)
-+ MAP_JON_RPC_WE("start_background_sync", on_start_background_sync, wallet_rpc::COMMAND_RPC_START_BACKGROUND_SYNC)
-+ MAP_JON_RPC_WE("stop_background_sync", on_stop_background_sync, wallet_rpc::COMMAND_RPC_STOP_BACKGROUND_SYNC)
- END_JSON_RPC_MAP()
- END_URI_MAP2()
-
-@@ -251,6 +254,9 @@ namespace tools
- bool on_set_log_categories(const wallet_rpc::COMMAND_RPC_SET_LOG_CATEGORIES::request& req, wallet_rpc::COMMAND_RPC_SET_LOG_CATEGORIES::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
- bool on_estimate_tx_size_and_weight(const wallet_rpc::COMMAND_RPC_ESTIMATE_TX_SIZE_AND_WEIGHT::request& req, wallet_rpc::COMMAND_RPC_ESTIMATE_TX_SIZE_AND_WEIGHT::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
- bool on_get_version(const wallet_rpc::COMMAND_RPC_GET_VERSION::request& req, wallet_rpc::COMMAND_RPC_GET_VERSION::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
-+ bool on_setup_background_sync(const wallet_rpc::COMMAND_RPC_SETUP_BACKGROUND_SYNC::request& req, wallet_rpc::COMMAND_RPC_SETUP_BACKGROUND_SYNC::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
-+ bool on_start_background_sync(const wallet_rpc::COMMAND_RPC_START_BACKGROUND_SYNC::request& req, wallet_rpc::COMMAND_RPC_START_BACKGROUND_SYNC::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
-+ bool on_stop_background_sync(const wallet_rpc::COMMAND_RPC_STOP_BACKGROUND_SYNC::request& req, wallet_rpc::COMMAND_RPC_STOP_BACKGROUND_SYNC::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
-
- //json rpc v2
- bool on_query_key(const wallet_rpc::COMMAND_RPC_QUERY_KEY::request& req, wallet_rpc::COMMAND_RPC_QUERY_KEY::response& res, epee::json_rpc::error& er, const connection_context *ctx = NULL);
-diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
-index 2ce39f667..72a35eb73 100644
---- a/src/wallet/wallet_rpc_server_commands_defs.h
-+++ b/src/wallet/wallet_rpc_server_commands_defs.h
-@@ -2698,5 +2698,69 @@ namespace wallet_rpc
- typedef epee::misc_utils::struct_init<response_t> response;
- };
-
-+ struct COMMAND_RPC_SETUP_BACKGROUND_SYNC
-+ {
-+ struct request_t
-+ {
-+ std::string background_sync_type;
-+ std::string wallet_password;
-+ std::string background_cache_password;
-+
-+ BEGIN_KV_SERIALIZE_MAP()
-+ KV_SERIALIZE(background_sync_type)
-+ KV_SERIALIZE(wallet_password)
-+ KV_SERIALIZE_OPT(background_cache_password, (std::string)"")
-+ END_KV_SERIALIZE_MAP()
-+ };
-+ typedef epee::misc_utils::struct_init<request_t> request;
-+
-+ struct response_t
-+ {
-+ BEGIN_KV_SERIALIZE_MAP()
-+ END_KV_SERIALIZE_MAP()
-+ };
-+ typedef epee::misc_utils::struct_init<response_t> response;
-+ };
-+
-+ struct COMMAND_RPC_START_BACKGROUND_SYNC
-+ {
-+ struct request_t
-+ {
-+ BEGIN_KV_SERIALIZE_MAP()
-+ END_KV_SERIALIZE_MAP()
-+ };
-+ typedef epee::misc_utils::struct_init<request_t> request;
-+
-+ struct response_t
-+ {
-+ BEGIN_KV_SERIALIZE_MAP()
-+ END_KV_SERIALIZE_MAP()
-+ };
-+ typedef epee::misc_utils::struct_init<response_t> response;
-+ };
-+
-+ struct COMMAND_RPC_STOP_BACKGROUND_SYNC
-+ {
-+ struct request_t
-+ {
-+ std::string wallet_password;
-+ std::string seed;
-+ std::string seed_offset;
-+
-+ BEGIN_KV_SERIALIZE_MAP()
-+ KV_SERIALIZE(wallet_password)
-+ KV_SERIALIZE_OPT(seed, (std::string)"")
-+ KV_SERIALIZE_OPT(seed_offset, (std::string)"")
-+ END_KV_SERIALIZE_MAP()
-+ };
-+ typedef epee::misc_utils::struct_init<request_t> request;
-+
-+ struct response_t
-+ {
-+ BEGIN_KV_SERIALIZE_MAP()
-+ END_KV_SERIALIZE_MAP()
-+ };
-+ typedef epee::misc_utils::struct_init<response_t> response;
-+ };
- }
- }
-diff --git a/src/wallet/wallet_rpc_server_error_codes.h b/src/wallet/wallet_rpc_server_error_codes.h
-index 541d29f86..4756c191c 100644
---- a/src/wallet/wallet_rpc_server_error_codes.h
-+++ b/src/wallet/wallet_rpc_server_error_codes.h
-@@ -81,3 +81,5 @@
- #define WALLET_RPC_ERROR_CODE_DISABLED -48
- #define WALLET_RPC_ERROR_CODE_PROXY_ALREADY_DEFINED -49
- #define WALLET_RPC_ERROR_CODE_NONZERO_UNLOCK_TIME -50
-+#define WALLET_RPC_ERROR_CODE_IS_BACKGROUND_WALLET -51
-+#define WALLET_RPC_ERROR_CODE_IS_BACKGROUND_SYNCING -52
-diff --git a/tests/functional_tests/transfer.py b/tests/functional_tests/transfer.py
-index 4063911f4..60eb09a10 100755
---- a/tests/functional_tests/transfer.py
-+++ b/tests/functional_tests/transfer.py
-@@ -30,6 +30,7 @@
-
- from __future__ import print_function
- import json
-+import util_resources
- import pprint
- from deepdiff import DeepDiff
- pp = pprint.PrettyPrinter(indent=2)
-@@ -46,6 +47,17 @@ seeds = [
- 'dilute gutter certain antics pamphlet macro enjoy left slid guarded bogeys upload nineteen bomb jubilee enhanced irritate turnip eggs swung jukebox loudly reduce sedan slid',
- ]
-
-+def diff_transfers(actual_transfers, expected_transfers, ignore_order = True):
-+ # The payments containers aren't ordered; re-scanning can lead to diff orders
-+ diff = DeepDiff(actual_transfers, expected_transfers, ignore_order = ignore_order)
-+ if diff != {}:
-+ pp.pprint(diff)
-+ assert diff == {}
-+
-+def diff_incoming_transfers(actual_transfers, expected_transfers):
-+ # wallet2 m_transfers container is ordered and order should be the same across rescans
-+ diff_transfers(actual_transfers, expected_transfers, ignore_order = False)
-+
- class TransferTest():
- def run_test(self):
- self.reset()
-@@ -63,6 +75,8 @@ class TransferTest():
- self.check_is_key_image_spent()
- self.check_scan_tx()
- self.check_subtract_fee_from_outputs()
-+ self.check_background_sync()
-+ self.check_background_sync_reorg_recovery()
-
- def reset(self):
- print('Resetting blockchain')
-@@ -840,12 +854,6 @@ class TransferTest():
-
- print('Testing scan_tx')
-
-- def diff_transfers(actual_transfers, expected_transfers):
-- diff = DeepDiff(actual_transfers, expected_transfers)
-- if diff != {}:
-- pp.pprint(diff)
-- assert diff == {}
--
- # set up sender_wallet
- sender_wallet = self.wallet[0]
- try: sender_wallet.close_wallet()
-@@ -1127,5 +1135,385 @@ class TransferTest():
- except AssertionError:
- pass
-
-+ def check_background_sync(self):
-+ daemon = Daemon()
-+
-+ print('Testing background sync')
-+
-+ # Some helper functions
-+ def stop_with_wrong_inputs(wallet, wallet_password, seed = ''):
-+ invalid = False
-+ try: wallet.stop_background_sync(wallet_password = wallet_password, seed = seed)
-+ except: invalid = True
-+ assert invalid
-+
-+ def open_with_wrong_password(wallet, filename, password):
-+ invalid_password = False
-+ try: wallet.open_wallet(filename, password = password)
-+ except: invalid_password = True
-+ assert invalid_password
-+
-+ def restore_wallet(wallet, seed, filename = '', password = ''):
-+ wallet.close_wallet()
-+ if filename != '':
-+ util_resources.remove_wallet_files(filename)
-+ wallet.restore_deterministic_wallet(seed = seed, filename = filename, password = password)
-+ wallet.auto_refresh(enable = False)
-+ assert wallet.get_transfers() == {}
-+
-+ def assert_correct_transfers(wallet, expected_transfers, expected_inc_transfers, expected_balance):
-+ diff_transfers(wallet.get_transfers(), expected_transfers)
-+ diff_incoming_transfers(wallet.incoming_transfers(transfer_type = 'all'), expected_inc_transfers)
-+ assert wallet.get_balance().balance == expected_balance
-+
-+ # Set up sender_wallet. Prepare to sweep single output to receiver.
-+ # We're testing a sweep because it makes sure background sync can
-+ # properly pick up txs which do not have a change output back to sender.
-+ sender_wallet = self.wallet[0]
-+ try: sender_wallet.close_wallet()
-+ except: pass
-+ sender_wallet.restore_deterministic_wallet(seed = seeds[0])
-+ sender_wallet.auto_refresh(enable = False)
-+ sender_wallet.refresh()
-+ res = sender_wallet.incoming_transfers(transfer_type = 'available')
-+ unlocked = [x for x in res.transfers if x.unlocked and x.amount > 0]
-+ assert len(unlocked) > 0
-+ ki = unlocked[0].key_image
-+ amount = unlocked[0].amount
-+ spent_txid = unlocked[0].tx_hash
-+ sender_wallet.refresh()
-+ res = sender_wallet.get_transfers()
-+ out_len = 0 if 'out' not in res else len(res.out)
-+ sender_starting_balance = sender_wallet.get_balance().balance
-+
-+ # Background sync type options
-+ reuse_password = sender_wallet.background_sync_options.reuse_password
-+ custom_password = sender_wallet.background_sync_options.custom_password
-+
-+ # set up receiver_wallet
-+ receiver_wallet = self.wallet[1]
-+ try: receiver_wallet.close_wallet()
-+ except: pass
-+ receiver_wallet.restore_deterministic_wallet(seed = seeds[1])
-+ receiver_wallet.auto_refresh(enable = False)
-+ receiver_wallet.refresh()
-+ res = receiver_wallet.get_transfers()
-+ in_len = 0 if 'in' not in res else len(res['in'])
-+ receiver_starting_balance = receiver_wallet.get_balance().balance
-+
-+ # transfer from sender_wallet to receiver_wallet
-+ dst = '44Kbx4sJ7JDRDV5aAhLJzQCjDz2ViLRduE3ijDZu3osWKBjMGkV1XPk4pfDUMqt1Aiezvephdqm6YD19GKFD9ZcXVUTp6BW'
-+ res = sender_wallet.sweep_single(dst, key_image = ki)
-+ assert len(res.tx_hash) == 32*2
-+ txid = res.tx_hash
-+ assert res.fee > 0
-+ fee = res.fee
-+ assert res.amount == amount - fee
-+
-+ expected_sender_balance = sender_starting_balance - amount
-+ expected_receiver_balance = receiver_starting_balance + (amount - fee)
-+
-+ print('Checking background sync on outgoing wallet')
-+ sender_wallet.setup_background_sync(background_sync_type = reuse_password)
-+ sender_wallet.start_background_sync()
-+ # Mine block to an uninvolved wallet
-+ daemon.generateblocks('46r4nYSevkfBUMhuykdK3gQ98XDqDTYW1hNLaXNvjpsJaSbNtdXh1sKMsdVgqkaihChAzEy29zEDPMR3NHQvGoZCLGwTerK', 1)
-+ # sender should still be able to scan the transfer normally because we
-+ # spent an output that had a known key image
-+ sender_wallet.refresh()
-+ transfers = sender_wallet.get_transfers()
-+ assert 'pending' not in transfers or len(transfers.pending) == 0
-+ assert 'pool' not in transfers or len (transfers.pool) == 0
-+ assert len(transfers.out) == out_len + 1
-+ tx = [x for x in transfers.out if x.txid == txid]
-+ assert len(tx) == 1
-+ tx = tx[0]
-+ assert tx.amount == amount - fee
-+ assert tx.fee == fee
-+ assert len(tx.destinations) == 1
-+ assert tx.destinations[0].amount == amount - fee
-+ assert tx.destinations[0].address == dst
-+ incoming_transfers = sender_wallet.incoming_transfers(transfer_type = 'all')
-+ assert len([x for x in incoming_transfers.transfers if x.tx_hash == spent_txid and x.key_image == ki and x.spent]) == 1
-+ assert sender_wallet.get_balance().balance == expected_sender_balance
-+
-+ # Restore and check background syncing outgoing wallet
-+ restore_wallet(sender_wallet, seeds[0])
-+ sender_wallet.setup_background_sync(background_sync_type = reuse_password)
-+ sender_wallet.start_background_sync()
-+ sender_wallet.refresh()
-+ for i, out_tx in enumerate(transfers.out):
-+ if 'destinations' in out_tx:
-+ del transfers.out[i]['destinations'] # destinations are not expected after wallet restore
-+ # sender's balance should be higher because can't detect spends while
-+ # background sync enabled, only receives
-+ background_bal = sender_wallet.get_balance().balance
-+ assert background_bal > expected_sender_balance
-+ background_transfers = sender_wallet.get_transfers()
-+ assert 'out' not in background_transfers or len(background_transfers.out) == 0
-+ assert 'in' in background_transfers and len(background_transfers['in']) > 0
-+ background_incoming_transfers = sender_wallet.incoming_transfers(transfer_type = 'all')
-+ assert len(background_incoming_transfers) == len(incoming_transfers)
-+ assert len([x for x in background_incoming_transfers.transfers if x.spent or x.key_image != '']) == 0
-+ assert len([x for x in background_incoming_transfers.transfers if x.tx_hash == spent_txid]) == 1
-+
-+ # Try to stop background sync with the wrong seed
-+ stop_with_wrong_inputs(sender_wallet, wallet_password = '', seed = seeds[1])
-+
-+ # Stop background sync and check transfers update correctly
-+ sender_wallet.stop_background_sync(wallet_password = '', seed = seeds[0])
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+
-+ # Check stopping a wallet with wallet files saved to disk
-+ for background_sync_type in [reuse_password, custom_password]:
-+ restore_wallet(sender_wallet, seeds[0], 'test1', 'test_password')
-+ background_cache_password = None if background_sync_type == reuse_password else 'background_password'
-+ sender_wallet.setup_background_sync(background_sync_type = background_sync_type, wallet_password = 'test_password', background_cache_password = background_cache_password)
-+ sender_wallet.start_background_sync()
-+ sender_wallet.refresh()
-+ assert_correct_transfers(sender_wallet, background_transfers, background_incoming_transfers, background_bal)
-+ stop_with_wrong_inputs(sender_wallet, 'wrong_password')
-+ sender_wallet.stop_background_sync(wallet_password = 'test_password')
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+
-+ # Close wallet while background syncing, then reopen
-+ for background_sync_type in [reuse_password, custom_password]:
-+ restore_wallet(sender_wallet, seeds[0], 'test1', 'test_password')
-+ background_cache_password = None if background_sync_type == reuse_password else 'background_password'
-+ sender_wallet.setup_background_sync(background_sync_type = background_sync_type, wallet_password = 'test_password', background_cache_password = background_cache_password)
-+ sender_wallet.start_background_sync()
-+ sender_wallet.refresh()
-+ assert_correct_transfers(sender_wallet, background_transfers, background_incoming_transfers, background_bal)
-+ sender_wallet.close_wallet()
-+ open_with_wrong_password(sender_wallet, 'test1', 'wrong_password')
-+ sender_wallet.open_wallet('test1', password = 'test_password')
-+ # It should reopen with spend key loaded and correctly scan all transfers
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+
-+ # Close wallet while syncing normally, then reopen
-+ for background_sync_type in [reuse_password, custom_password]:
-+ restore_wallet(sender_wallet, seeds[0], 'test1', 'test_password')
-+ background_cache_password = None if background_sync_type == reuse_password else 'background_password'
-+ sender_wallet.setup_background_sync(background_sync_type = background_sync_type, wallet_password = 'test_password', background_cache_password = background_cache_password)
-+ sender_wallet.refresh()
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+ sender_wallet.close_wallet()
-+ open_with_wrong_password(sender_wallet, 'test1', 'wrong_password')
-+ sender_wallet.open_wallet('test1', password = 'test_password')
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+
-+ # Create background cache using custom password, then use it to sync, then reopen main wallet
-+ for background_cache_password in ['background_password', '']:
-+ restore_wallet(sender_wallet, seeds[0], 'test1', 'test_password')
-+ assert not util_resources.file_exists('test1.background')
-+ assert not util_resources.file_exists('test1.background.keys')
-+ sender_wallet.setup_background_sync(background_sync_type = custom_password, wallet_password = 'test_password', background_cache_password = background_cache_password)
-+ assert util_resources.file_exists('test1.background')
-+ assert util_resources.file_exists('test1.background.keys')
-+ sender_wallet.close_wallet()
-+ open_with_wrong_password(sender_wallet, 'test1.background', 'test_password')
-+ sender_wallet.open_wallet('test1.background', password = background_cache_password)
-+ sender_wallet.refresh()
-+ assert_correct_transfers(sender_wallet, background_transfers, background_incoming_transfers, background_bal)
-+ sender_wallet.close_wallet()
-+ sender_wallet.open_wallet('test1', password = 'test_password')
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+
-+ # Check that main wallet keeps background cache encrypted with custom password in sync
-+ restore_wallet(sender_wallet, seeds[0], 'test1', 'test_password')
-+ sender_wallet.setup_background_sync(background_sync_type = background_sync_type, wallet_password = 'test_password', background_cache_password = 'background_password')
-+ sender_wallet.refresh()
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+ sender_wallet.close_wallet()
-+ sender_wallet.open_wallet('test1.background', password = 'background_password')
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+
-+ # Try using wallet password as custom background password
-+ restore_wallet(sender_wallet, seeds[0], 'test1', 'test_password')
-+ assert not util_resources.file_exists('test1.background')
-+ assert not util_resources.file_exists('test1.background.keys')
-+ same_password = False
-+ try: sender_wallet.setup_background_sync(background_sync_type = custom_password, wallet_password = 'test_password', background_cache_password = 'test_password')
-+ except: same_password = True
-+ assert same_password
-+ assert not util_resources.file_exists('test1.background')
-+ assert not util_resources.file_exists('test1.background.keys')
-+
-+ # Turn off background sync
-+ for background_sync_type in [reuse_password, custom_password]:
-+ restore_wallet(sender_wallet, seeds[0], 'test1', 'test_password')
-+ background_cache_password = None if background_sync_type == reuse_password else 'background_password'
-+ sender_wallet.setup_background_sync(background_sync_type = background_sync_type, wallet_password = 'test_password', background_cache_password = background_cache_password)
-+ if background_sync_type == custom_password:
-+ assert util_resources.file_exists('test1.background')
-+ assert util_resources.file_exists('test1.background.keys')
-+ sender_wallet.close_wallet()
-+ assert util_resources.file_exists('test1.background')
-+ assert util_resources.file_exists('test1.background.keys')
-+ else:
-+ assert not util_resources.file_exists('test1.background')
-+ assert not util_resources.file_exists('test1.background.keys')
-+ sender_wallet.close_wallet()
-+ assert not util_resources.file_exists('test1.background')
-+ assert not util_resources.file_exists('test1.background.keys')
-+ sender_wallet.open_wallet('test1', password = 'test_password')
-+ sender_wallet.setup_background_sync(background_sync_type = sender_wallet.background_sync_options.off, wallet_password = 'test_password')
-+ assert not util_resources.file_exists('test1.background')
-+ assert not util_resources.file_exists('test1.background.keys')
-+ sender_wallet.close_wallet()
-+ assert not util_resources.file_exists('test1.background')
-+ assert not util_resources.file_exists('test1.background.keys')
-+ sender_wallet.open_wallet('test1', password = 'test_password')
-+
-+ # Sanity check against outgoing wallet restored at height 0
-+ sender_wallet.close_wallet()
-+ sender_wallet.restore_deterministic_wallet(seed = seeds[0], restore_height = 0)
-+ sender_wallet.refresh()
-+ assert_correct_transfers(sender_wallet, transfers, incoming_transfers, expected_sender_balance)
-+
-+ print('Checking background sync on incoming wallet')
-+ receiver_wallet.setup_background_sync(background_sync_type = reuse_password)
-+ receiver_wallet.start_background_sync()
-+ receiver_wallet.refresh()
-+ transfers = receiver_wallet.get_transfers()
-+ assert 'pending' not in transfers or len(transfers.pending) == 0
-+ assert 'pool' not in transfers or len (transfers.pool) == 0
-+ assert len(transfers['in']) == in_len + 1
-+ tx = [x for x in transfers['in'] if x.txid == txid]
-+ assert len(tx) == 1
-+ tx = tx[0]
-+ assert tx.amount == amount - fee
-+ assert tx.fee == fee
-+ incoming_transfers = receiver_wallet.incoming_transfers(transfer_type = 'all')
-+ assert len([x for x in incoming_transfers.transfers if x.tx_hash == txid and x.key_image == '' and not x.spent]) == 1
-+ assert receiver_wallet.get_balance().balance == expected_receiver_balance
-+
-+ # Restore and check background syncing incoming wallet
-+ restore_wallet(receiver_wallet, seeds[1])
-+ receiver_wallet.setup_background_sync(background_sync_type = reuse_password)
-+ receiver_wallet.start_background_sync()
-+ receiver_wallet.refresh()
-+ if 'out' in transfers:
-+ for i, out_tx in enumerate(transfers.out):
-+ if 'destinations' in out_tx:
-+ del transfers.out[i]['destinations'] # destinations are not expected after wallet restore
-+ background_bal = receiver_wallet.get_balance().balance
-+ assert background_bal >= expected_receiver_balance
-+ background_transfers = receiver_wallet.get_transfers()
-+ assert 'out' not in background_transfers or len(background_transfers.out) == 0
-+ assert 'in' in background_transfers and len(background_transfers['in']) > 0
-+ background_incoming_transfers = receiver_wallet.incoming_transfers(transfer_type = 'all')
-+ assert len(background_incoming_transfers) == len(incoming_transfers)
-+ assert len([x for x in background_incoming_transfers.transfers if x.spent or x.key_image != '']) == 0
-+ assert len([x for x in background_incoming_transfers.transfers if x.tx_hash == txid]) == 1
-+
-+ # Stop background sync and check transfers update correctly
-+ receiver_wallet.stop_background_sync(wallet_password = '', seed = seeds[1])
-+ diff_transfers(receiver_wallet.get_transfers(), transfers)
-+ incoming_transfers = receiver_wallet.incoming_transfers(transfer_type = 'all')
-+ assert len(background_incoming_transfers) == len(incoming_transfers)
-+ assert len([x for x in incoming_transfers.transfers if x.tx_hash == txid and x.key_image != '' and not x.spent]) == 1
-+ assert receiver_wallet.get_balance().balance == expected_receiver_balance
-+
-+ # Check a fresh incoming wallet with wallet files saved to disk and encrypted with password
-+ restore_wallet(receiver_wallet, seeds[1], 'test2', 'test_password')
-+ receiver_wallet.setup_background_sync(background_sync_type = reuse_password, wallet_password = 'test_password')
-+ receiver_wallet.start_background_sync()
-+ receiver_wallet.refresh()
-+ assert_correct_transfers(receiver_wallet, background_transfers, background_incoming_transfers, background_bal)
-+ stop_with_wrong_inputs(receiver_wallet, 'wrong_password')
-+ receiver_wallet.stop_background_sync(wallet_password = 'test_password')
-+ assert_correct_transfers(receiver_wallet, transfers, incoming_transfers, expected_receiver_balance)
-+
-+ # Close receiver's wallet while background sync is enabled then reopen
-+ restore_wallet(receiver_wallet, seeds[1], 'test2', 'test_password')
-+ receiver_wallet.setup_background_sync(background_sync_type = reuse_password, wallet_password = 'test_password')
-+ receiver_wallet.start_background_sync()
-+ receiver_wallet.refresh()
-+ diff_transfers(receiver_wallet.get_transfers(), background_transfers)
-+ diff_incoming_transfers(receiver_wallet.incoming_transfers(transfer_type = 'all'), background_incoming_transfers)
-+ assert receiver_wallet.get_balance().balance == background_bal
-+ receiver_wallet.close_wallet()
-+ receiver_wallet.open_wallet('test2', password = 'test_password')
-+ # It should reopen with spend key loaded and correctly scan all transfers
-+ assert_correct_transfers(receiver_wallet, transfers, incoming_transfers, expected_receiver_balance)
-+
-+ # Sanity check against incoming wallet restored at height 0
-+ receiver_wallet.close_wallet()
-+ receiver_wallet.restore_deterministic_wallet(seed = seeds[1], restore_height = 0)
-+ receiver_wallet.refresh()
-+ assert_correct_transfers(receiver_wallet, transfers, incoming_transfers, expected_receiver_balance)
-+
-+ # Clean up
-+ util_resources.remove_wallet_files('test1')
-+ util_resources.remove_wallet_files('test2')
-+ for i in range(2):
-+ self.wallet[i].close_wallet()
-+ self.wallet[i].restore_deterministic_wallet(seed = seeds[i])
-+
-+ def check_background_sync_reorg_recovery(self):
-+ daemon = Daemon()
-+
-+ print('Testing background sync reorg recovery')
-+
-+ # Disconnect daemon from peers
-+ daemon.out_peers(0)
-+
-+ # Background sync type options
-+ sender_wallet = self.wallet[0]
-+ reuse_password = sender_wallet.background_sync_options.reuse_password
-+ custom_password = sender_wallet.background_sync_options.custom_password
-+
-+ for background_sync_type in [reuse_password, custom_password]:
-+ # Set up wallet saved to disk
-+ sender_wallet.close_wallet()
-+ util_resources.remove_wallet_files('test1')
-+ sender_wallet.restore_deterministic_wallet(seed = seeds[0], filename = 'test1', password = '')
-+ sender_wallet.auto_refresh(enable = False)
-+ sender_wallet.refresh()
-+ sender_starting_balance = sender_wallet.get_balance().balance
-+
-+ # Send tx and mine a block
-+ amount = 1000000000000
-+ assert sender_starting_balance > amount
-+ dst = {'address': '44Kbx4sJ7JDRDV5aAhLJzQCjDz2ViLRduE3ijDZu3osWKBjMGkV1XPk4pfDUMqt1Aiezvephdqm6YD19GKFD9ZcXVUTp6BW', 'amount': amount}
-+ res = sender_wallet.transfer([dst])
-+ assert len(res.tx_hash) == 32*2
-+ txid = res.tx_hash
-+
-+ daemon.generateblocks('46r4nYSevkfBUMhuykdK3gQ98XDqDTYW1hNLaXNvjpsJaSbNtdXh1sKMsdVgqkaihChAzEy29zEDPMR3NHQvGoZCLGwTerK', 1)
-+
-+ # Make sure the wallet can see the tx
-+ sender_wallet.refresh()
-+ transfers = sender_wallet.get_transfers()
-+ assert 'pool' not in transfers or len (transfers.pool) == 0
-+ tx = [x for x in transfers.out if x.txid == txid]
-+ assert len(tx) == 1
-+ tx = tx[0]
-+ assert sender_wallet.get_balance().balance < (sender_starting_balance - amount)
-+
-+ # Pop the block while background syncing
-+ background_cache_password = None if background_sync_type == reuse_password else 'background_password'
-+ sender_wallet.setup_background_sync(background_sync_type = background_sync_type, wallet_password = '', background_cache_password = background_cache_password)
-+ sender_wallet.start_background_sync()
-+ daemon.pop_blocks(1)
-+ daemon.flush_txpool()
-+
-+ daemon.generateblocks('46r4nYSevkfBUMhuykdK3gQ98XDqDTYW1hNLaXNvjpsJaSbNtdXh1sKMsdVgqkaihChAzEy29zEDPMR3NHQvGoZCLGwTerK', 1)
-+
-+ # Make sure the wallet can no longer see the tx
-+ sender_wallet.refresh()
-+ sender_wallet.stop_background_sync(wallet_password = '', seed = seeds[0])
-+ transfers = sender_wallet.get_transfers()
-+ no_tx = [x for x in transfers.out if x.txid == txid]
-+ assert len(no_tx) == 0
-+ assert sender_wallet.get_balance().balance == sender_starting_balance
-+
-+ # Clean up
-+ daemon.out_peers(12)
-+ util_resources.remove_wallet_files('test1')
-+ self.wallet[0].close_wallet()
-+ self.wallet[0].restore_deterministic_wallet(seed = seeds[0])
-+
- if __name__ == '__main__':
- TransferTest().run_test()
-diff --git a/tests/functional_tests/util_resources.py b/tests/functional_tests/util_resources.py
-index e030312da..3ca6fdb86 100755
---- a/tests/functional_tests/util_resources.py
-+++ b/tests/functional_tests/util_resources.py
-@@ -37,6 +37,8 @@
- from __future__ import print_function
- import subprocess
- import psutil
-+import os
-+import errno
-
- def available_ram_gb():
- ram_bytes = psutil.virtual_memory().available
-@@ -51,3 +53,26 @@ def get_time_pi_seconds(cores, app_dir='.'):
- miliseconds = int(decoded)
-
- return miliseconds / 1000.0
-+
-+def remove_file(name):
-+ WALLET_DIRECTORY = os.environ['WALLET_DIRECTORY']
-+ assert WALLET_DIRECTORY != ''
-+ try:
-+ os.unlink(WALLET_DIRECTORY + '/' + name)
-+ except OSError as e:
-+ if e.errno != errno.ENOENT:
-+ raise
-+
-+def get_file_path(name):
-+ WALLET_DIRECTORY = os.environ['WALLET_DIRECTORY']
-+ assert WALLET_DIRECTORY != ''
-+ return WALLET_DIRECTORY + '/' + name
-+
-+def remove_wallet_files(name):
-+ for suffix in ['', '.keys', '.background', '.background.keys', '.address.txt']:
-+ remove_file(name + suffix)
-+
-+def file_exists(name):
-+ WALLET_DIRECTORY = os.environ['WALLET_DIRECTORY']
-+ assert WALLET_DIRECTORY != ''
-+ return os.path.isfile(WALLET_DIRECTORY + '/' + name)
-diff --git a/tests/functional_tests/wallet.py b/tests/functional_tests/wallet.py
-index 1ad05c98f..8182cecb2 100755
---- a/tests/functional_tests/wallet.py
-+++ b/tests/functional_tests/wallet.py
-@@ -34,8 +34,7 @@
-
- from __future__ import print_function
- import sys
--import os
--import errno
-+import util_resources
-
- from framework.wallet import Wallet
- from framework.daemon import Daemon
-@@ -54,24 +53,6 @@ class WalletTest():
- self.change_password()
- self.store()
-
-- def remove_file(self, name):
-- WALLET_DIRECTORY = os.environ['WALLET_DIRECTORY']
-- assert WALLET_DIRECTORY != ''
-- try:
-- os.unlink(WALLET_DIRECTORY + '/' + name)
-- except OSError as e:
-- if e.errno != errno.ENOENT:
-- raise
--
-- def remove_wallet_files(self, name):
-- for suffix in ['', '.keys']:
-- self.remove_file(name + suffix)
--
-- def file_exists(self, name):
-- WALLET_DIRECTORY = os.environ['WALLET_DIRECTORY']
-- assert WALLET_DIRECTORY != ''
-- return os.path.isfile(WALLET_DIRECTORY + '/' + name)
--
- def reset(self):
- print('Resetting blockchain')
- daemon = Daemon()
-@@ -333,7 +314,7 @@ class WalletTest():
- try: wallet.close_wallet()
- except: pass
-
-- self.remove_wallet_files('test1')
-+ util_resources.remove_wallet_files('test1')
-
- seed = 'velvet lymph giddy number token physics poetry unquoted nibs useful sabotage limits benches lifestyle eden nitrogen anvil fewest avoid batch vials washing fences goat unquoted'
- res = wallet.restore_deterministic_wallet(seed = seed, filename = 'test1')
-@@ -359,7 +340,7 @@ class WalletTest():
-
- wallet.close_wallet()
-
-- self.remove_wallet_files('test1')
-+ util_resources.remove_wallet_files('test1')
-
- def store(self):
- print('Testing store')
-@@ -369,22 +350,26 @@ class WalletTest():
- try: wallet.close_wallet()
- except: pass
-
-- self.remove_wallet_files('test1')
-+ util_resources.remove_wallet_files('test1')
-
- seed = 'velvet lymph giddy number token physics poetry unquoted nibs useful sabotage limits benches lifestyle eden nitrogen anvil fewest avoid batch vials washing fences goat unquoted'
- res = wallet.restore_deterministic_wallet(seed = seed, filename = 'test1')
- assert res.address == '42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm'
- assert res.seed == seed
-
-- self.remove_file('test1')
-- assert self.file_exists('test1.keys')
-- assert not self.file_exists('test1')
-+ util_resources.remove_file('test1')
-+ assert util_resources.file_exists('test1.keys')
-+ assert not util_resources.file_exists('test1')
- wallet.store()
-- assert self.file_exists('test1.keys')
-- assert self.file_exists('test1')
-+ assert util_resources.file_exists('test1.keys')
-+ assert util_resources.file_exists('test1')
-
- wallet.close_wallet()
-- self.remove_wallet_files('test1')
-+
-+ wallet.open_wallet(filename = 'test1', password = '')
-+ wallet.close_wallet()
-+
-+ util_resources.remove_wallet_files('test1')
-
-
- if __name__ == '__main__':
-diff --git a/tests/unit_tests/wipeable_string.cpp b/tests/unit_tests/wipeable_string.cpp
-index ef6964f9e..25121a02e 100644
---- a/tests/unit_tests/wipeable_string.cpp
-+++ b/tests/unit_tests/wipeable_string.cpp
-@@ -211,3 +211,15 @@ TEST(wipeable_string, to_hex)
- ASSERT_TRUE(epee::to_hex::wipeable_string(epee::span<const uint8_t>((const uint8_t*)"", 0)) == epee::wipeable_string(""));
- ASSERT_TRUE(epee::to_hex::wipeable_string(epee::span<const uint8_t>((const uint8_t*)"abc", 3)) == epee::wipeable_string("616263"));
- }
-+
-+TEST(wipeable_string, to_string)
-+{
-+ // Converting a wipeable_string to a string defeats the purpose of wipeable_string,
-+ // but nice to know this works
-+ std::string str;
-+ {
-+ epee::wipeable_string wipeable_str("foo");
-+ str = std::string(wipeable_str.data(), wipeable_str.size());
-+ }
-+ ASSERT_TRUE(str == std::string("foo"));
-+}
-diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
-index 1e10e1f86..bff33a561 100644
---- a/utils/python-rpc/framework/wallet.py
-+++ b/utils/python-rpc/framework/wallet.py
-@@ -1138,3 +1138,45 @@ class Wallet(object):
- 'id': '0'
- }
- return self.rpc.send_json_rpc_request(frozen)
-+
-+ class BackgroundSyncOptions(object):
-+ def __init__(self):
-+ self.off = 'off'
-+ self.reuse_password = 'reuse-wallet-password'
-+ self.custom_password = 'custom-background-password'
-+ background_sync_options = BackgroundSyncOptions()
-+
-+ def setup_background_sync(self, background_sync_type = background_sync_options.off, wallet_password = '', background_cache_password = ''):
-+ setup_background_sync = {
-+ 'method': 'setup_background_sync',
-+ 'jsonrpc': '2.0',
-+ 'params' : {
-+ 'background_sync_type': background_sync_type,
-+ 'wallet_password': wallet_password,
-+ 'background_cache_password': background_cache_password,
-+ },
-+ 'id': '0'
-+ }
-+ return self.rpc.send_json_rpc_request(setup_background_sync)
-+
-+ def start_background_sync(self):
-+ start_background_sync = {
-+ 'method': 'start_background_sync',
-+ 'jsonrpc': '2.0',
-+ 'params' : {},
-+ 'id': '0'
-+ }
-+ return self.rpc.send_json_rpc_request(start_background_sync)
-+
-+ def stop_background_sync(self, wallet_password = '', seed = '', seed_offset = ''):
-+ stop_background_sync = {
-+ 'method': 'stop_background_sync',
-+ 'jsonrpc': '2.0',
-+ 'params' : {
-+ 'wallet_password': wallet_password,
-+ 'seed': seed,
-+ 'seed_offset': seed_offset,
-+ },
-+ 'id': '0'
-+ }
-+ return self.rpc.send_json_rpc_request(stop_background_sync)
---
-2.48.0
-
diff --git a/patches/wownero/0003-fix-is_trivially_copyable.patch b/patches/wownero/0002-fix-is_trivially_copyable.patch
index 5b81f2d..e6da812 100644
--- a/patches/wownero/0003-fix-is_trivially_copyable.patch
+++ b/patches/wownero/0002-fix-is_trivially_copyable.patch
@@ -1,7 +1,7 @@
-From d4d406961073b5f9d3cc46a6cedaf73a378e1ea6 Mon Sep 17 00:00:00 2001
+From ab667a9b129984abbbc252963cf4f471c8fe29ba Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Tue, 22 Oct 2024 10:23:18 +0000
-Subject: [PATCH 03/15] fix is_trivially_copyable
+Subject: [PATCH 02/16] fix is_trivially_copyable
---
contrib/epee/include/span.h | 2 --
@@ -28,5 +28,5 @@ index 01dc387d6..5e3af4d11 100644
return {reinterpret_cast<const std::uint8_t*>(std::addressof(src)), sizeof(T)};
}
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0004-store-crash-fix.patch b/patches/wownero/0003-store-crash-fix.patch
index 52104dc..1bc6a4a 100644
--- a/patches/wownero/0004-store-crash-fix.patch
+++ b/patches/wownero/0003-store-crash-fix.patch
@@ -1,7 +1,7 @@
-From 799d1825696483da743ff2f92a773fcfbef08557 Mon Sep 17 00:00:00 2001
+From 45a4148e08f61fe6d85b7245e7ee445b8db97273 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Sat, 11 May 2024 16:25:10 +0200
-Subject: [PATCH 04/15] store crash fix
+Subject: [PATCH 03/16] store crash fix
Monero wallet crashes (sometimes) when it is syncing,
while the proper solution (that can be seen in feather)
@@ -36,14 +36,22 @@ would just wait for it to finish before actually storing).
Also imo store() functin should store the wallet, no matter
the current state.
---
- src/wallet/api/wallet.cpp | 25 ++++++++++++-------------
+ external/randomwow | 2 +-
+ src/wallet/api/wallet.cpp | 23 +++++++++++------------
src/wallet/api/wallet.h | 1 -
src/wallet/wallet2.cpp | 12 +++++++++++-
src/wallet/wallet2.h | 3 +++
- 4 files changed, 26 insertions(+), 15 deletions(-)
+ 5 files changed, 26 insertions(+), 15 deletions(-)
+diff --git a/external/randomwow b/external/randomwow
+index 6f30d4b92..27b099b6d 160000
+--- a/external/randomwow
++++ b/external/randomwow
+@@ -1 +1 @@
+-Subproject commit 6f30d4b924fecb231e5b683915cc75d18b3b5866
++Subproject commit cd137b1ea7bb9f0bcb5e77b39a5c1e08ca4b4fed
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index e868fa039..899ef044a 100644
+index af420569c..d53372fc9 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -55,8 +55,8 @@ using namespace cryptonote;
@@ -74,7 +82,7 @@ index e868fa039..899ef044a 100644
try {
if (path.empty()) {
m_wallet->store();
-@@ -2448,10 +2449,10 @@ void WalletImpl::refreshThreadFunc()
+@@ -2449,10 +2450,10 @@ void WalletImpl::refreshThreadFunc()
}
LOG_PRINT_L3(__FUNCTION__ << ": refresh lock acquired...");
@@ -87,13 +95,7 @@ index e868fa039..899ef044a 100644
LOG_PRINT_L3(__FUNCTION__ << ": refreshing...");
doRefresh();
}
-@@ -2481,12 +2482,12 @@ void WalletImpl::doRefresh()
- }
- m_wallet->find_and_save_rings(false);
- } else {
-- LOG_PRINT_L3(__FUNCTION__ << ": skipping refresh - daemon is not synced");
-+ LOG_PRINT_L3(__FUNCTION__ << ": skipping refresh - daemon is not synced");
- }
+@@ -2486,7 +2487,7 @@ void WalletImpl::doRefresh()
} catch (const std::exception &e) {
setStatusError(e.what());
break;
@@ -147,10 +149,10 @@ index 1f199a72c..ac7ce2f6a 100644
std::atomic<int> m_refreshIntervalMillis;
std::atomic<bool> m_refreshShouldRescan;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 535005ab1..4e66cdeae 100644
+index f111ad0d5..8d8ba33c5 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -1192,6 +1192,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
+@@ -1195,6 +1195,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
m_upper_transaction_weight_limit(0),
m_run(true),
m_callback(0),
@@ -158,7 +160,7 @@ index 535005ab1..4e66cdeae 100644
m_trusted_daemon(false),
m_nettype(nettype),
m_multisig_rounds_passed(0),
-@@ -1412,6 +1413,14 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u
+@@ -1415,6 +1416,14 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u
return ret;
}
//----------------------------------------------------------------------------------------------------
@@ -173,7 +175,7 @@ index 535005ab1..4e66cdeae 100644
bool wallet2::set_proxy(const std::string &address)
{
return m_http_client->set_proxy(address);
-@@ -4107,8 +4116,9 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
+@@ -4151,8 +4160,9 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
// infer when we get an incoming output
bool first = true, last = false;
@@ -185,7 +187,7 @@ index 535005ab1..4e66cdeae 100644
std::vector<cryptonote::block_complete_entry> next_blocks;
std::vector<parsed_block> next_parsed_blocks;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 632298726..022d0696f 100644
+index 8ffad5675..a1d939a5a 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -1078,6 +1078,8 @@ private:
@@ -197,7 +199,7 @@ index 632298726..022d0696f 100644
void stop() { m_run.store(false, std::memory_order_relaxed); m_message_store.stop(); }
-@@ -1989,6 +1991,7 @@ private:
+@@ -1996,6 +1998,7 @@ private:
boost::recursive_mutex m_daemon_rpc_mutex;
@@ -206,5 +208,5 @@ index 632298726..022d0696f 100644
i_wallet2_callback* m_callback;
hw::device::device_type m_key_device_type;
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0005-uint64_t-missing-definition-fix.patch b/patches/wownero/0004-uint64_t-missing-definition-fix.patch
index 5035df2..8bfa59a 100644
--- a/patches/wownero/0005-uint64_t-missing-definition-fix.patch
+++ b/patches/wownero/0004-uint64_t-missing-definition-fix.patch
@@ -1,7 +1,7 @@
-From 5a9148c10ea29a42d8aa08d69e2f4559c8611655 Mon Sep 17 00:00:00 2001
+From faa6501f23d74a59f345a8542fdbb65f27540e74 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 2 Sep 2024 16:40:31 +0200
-Subject: [PATCH 05/15] uint64_t missing definition fix
+Subject: [PATCH 04/16] uint64_t missing definition fix
---
contrib/epee/include/net/http_base.h | 2 +-
@@ -21,5 +21,5 @@ index 4af4da790..ae4c0d05e 100644
#include <string>
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0006-use-proper-error-handling-in-get_seed.patch b/patches/wownero/0005-use-proper-error-handling-in-get_seed.patch
index b9680fc..d581ebf 100644
--- a/patches/wownero/0006-use-proper-error-handling-in-get_seed.patch
+++ b/patches/wownero/0005-use-proper-error-handling-in-get_seed.patch
@@ -1,7 +1,7 @@
-From ee6aa49179833c930c1ec10ae2e877aeb87eb8c8 Mon Sep 17 00:00:00 2001
+From 04899e3877b7f801b21057f7e527b5fb846fb7bd Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 24 Jun 2024 10:49:12 +0200
-Subject: [PATCH 06/15] use proper error handling in get_seed
+Subject: [PATCH 05/16] use proper error handling in get_seed
---
src/wallet/api/wallet.cpp | 17 ++++++++++++-----
@@ -9,7 +9,7 @@ Subject: [PATCH 06/15] use proper error handling in get_seed
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 899ef044a..e16d8f83f 100644
+index d53372fc9..ec02a129d 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -826,12 +826,19 @@ bool WalletImpl::close(bool store)
@@ -38,10 +38,10 @@ index 899ef044a..e16d8f83f 100644
std::string WalletImpl::getSeedLanguage() const
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 4e66cdeae..48267d647 100644
+index 8d8ba33c5..856645b6b 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -1449,11 +1449,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
+@@ -1452,11 +1452,13 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
bool keys_deterministic = is_deterministic();
if (!keys_deterministic)
{
@@ -55,7 +55,7 @@ index 4e66cdeae..48267d647 100644
std::cout << "seed_language not set" << std::endl;
return false;
}
-@@ -1463,8 +1465,9 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
+@@ -1466,8 +1468,9 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
key = cryptonote::encrypt_key(key, passphrase);
if (!crypto::ElectrumWords::bytes_to_words(key, electrum_words, seed_language))
{
@@ -67,5 +67,5 @@ index 4e66cdeae..48267d647 100644
return true;
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0007-UR-functions.patch b/patches/wownero/0006-UR-functions.patch
index 0bdc695..b3cda8d 100644
--- a/patches/wownero/0007-UR-functions.patch
+++ b/patches/wownero/0006-UR-functions.patch
@@ -1,7 +1,7 @@
-From 031df7de0d75d93f78be732d5cac702b0ab193f0 Mon Sep 17 00:00:00 2001
+From 59084c084836343354f2e5b5dccafc26b5f7f02a Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 10:09:50 +0100
-Subject: [PATCH 07/15] UR functions
+Subject: [PATCH 06/16] UR functions
This commit adds UR functions for UR tasks,
I believe that the right place to get
@@ -24,7 +24,6 @@ Things broken in the commit
contrib/depends/hosts/darwin.mk | 2 +-
contrib/depends/toolchain.cmake.in | 2 +-
external/CMakeLists.txt | 1 +
- external/bc-ur | 1 +
src/device/device_ledger.cpp | 5 +-
src/wallet/CMakeLists.txt | 1 +
src/wallet/api/pending_transaction.cpp | 33 +++
@@ -36,14 +35,13 @@ Things broken in the commit
src/wallet/api/wallet2_api.h | 22 +-
src/wallet/wallet2.cpp | 141 +++++++----
src/wallet/wallet2.h | 3 +
- 17 files changed, 521 insertions(+), 60 deletions(-)
- create mode 160000 external/bc-ur
+ 16 files changed, 520 insertions(+), 60 deletions(-)
diff --git a/.gitmodules b/.gitmodules
-index 991071fbe..b24855d9b 100644
+index 98a0af1ab..c1c0d385d 100644
--- a/.gitmodules
+++ b/.gitmodules
-@@ -16,4 +16,7 @@
+@@ -15,4 +15,7 @@
path = external/randomwow
url = https://codeberg.org/wownero/RandomWOW
branch = 1.2.1-wow
@@ -53,7 +51,7 @@ index 991071fbe..b24855d9b 100644
+ url = https://github.com/MrCyjaneK/bc-ur
+ branch = misc
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b4b8c8089..88335ee9d 100644
+index c8edf7a45..c439e5300 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,7 +96,8 @@ enable_language(C ASM)
@@ -73,7 +71,7 @@ index b4b8c8089..88335ee9d 100644
+ #check_submodule(external/bc-ur)
check_submodule(external/miniupnp)
check_submodule(external/rapidjson)
- #check_submodule(external/trezor-common)
+ check_submodule(external/trezor-common)
diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
index 79d449054..83d83036b 100644
--- a/contrib/depends/hosts/darwin.mk
@@ -98,24 +96,17 @@ index f118c754e..f26655d68 100644
SET(LLVM_ENABLE_PIC OFF)
SET(LLVM_ENABLE_PIE OFF)
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index 29aed0cc6..dfdffe67c 100644
+index 649383aa2..d0b6d9b14 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
-@@ -69,4 +69,5 @@ endif()
+@@ -70,4 +70,5 @@ endif()
add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
+add_subdirectory(bc-ur)
add_subdirectory(randomwow EXCLUDE_FROM_ALL)
-diff --git a/external/bc-ur b/external/bc-ur
-new file mode 160000
-index 000000000..d82e7c753
---- /dev/null
-+++ b/external/bc-ur
-@@ -0,0 +1 @@
-+Subproject commit d82e7c753e710b8000706dc3383b498438795208
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index 9961d13e7..8403d76e8 100644
+index 56a3a45c4..e1bfa7041 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -313,12 +313,13 @@ namespace hw {
@@ -282,7 +273,7 @@ index 30065a7fa..a94b23f75 100644
uint64_t minMixinCount() const override;
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index e16d8f83f..ee000e7ab 100644
+index ec02a129d..e04205e48 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -47,6 +47,7 @@
@@ -780,10 +771,10 @@ index e349df176..764adbfbf 100644
/*!
* \brief scanTransactions - scan a list of transaction ids, this operation may reveal the txids to the remote node and affect your privacy
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index 48267d647..e14d4d2fc 100644
+index 856645b6b..d89595cf8 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -948,6 +948,16 @@ uint32_t get_subaddress_clamped_sum(uint32_t idx, uint32_t extra)
+@@ -953,6 +953,16 @@ uint32_t get_subaddress_clamped_sum(uint32_t idx, uint32_t extra)
return idx + extra;
}
@@ -800,7 +791,7 @@ index 48267d647..e14d4d2fc 100644
static void setup_shim(hw::wallet_shim * shim, tools::wallet2 * wallet)
{
shim->get_tx_pub_key_from_received_outs = std::bind(&tools::wallet2::get_tx_pub_key_from_received_outs, wallet, std::placeholders::_1);
-@@ -6998,6 +7008,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
+@@ -7039,6 +7049,25 @@ uint64_t wallet2::unlocked_balance(uint32_t index_major, bool strict, uint64_t *
return amount;
}
//----------------------------------------------------------------------------------------------------
@@ -826,7 +817,7 @@ index 48267d647..e14d4d2fc 100644
std::map<uint32_t, uint64_t> wallet2::balance_per_subaddress(uint32_t index_major, bool strict) const
{
std::map<uint32_t, uint64_t> amount_per_subaddr;
-@@ -7849,9 +7878,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
+@@ -7890,9 +7919,7 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector<wallet2::pendin
crypto::key_derivation derivation;
std::vector<crypto::key_derivation> additional_derivations;
@@ -837,7 +828,7 @@ index 48267d647..e14d4d2fc 100644
std::vector<crypto::public_key> additional_tx_pub_keys;
for (const crypto::secret_key &skey: txs[n].additional_tx_keys)
{
-@@ -11241,7 +11268,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11230,7 +11257,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below fractional threshold " << print_money(fractional_threshold));
continue;
}
@@ -846,7 +837,7 @@ index 48267d647..e14d4d2fc 100644
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
{
-@@ -11291,9 +11318,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11280,9 +11307,15 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
LOG_PRINT_L2("Starting with " << num_nondust_outputs << " non-dust outputs and " << num_dust_outputs << " dust outputs");
@@ -864,7 +855,7 @@ index 48267d647..e14d4d2fc 100644
// if empty, put dummy entry so that the front can be referenced later in the loop
if (unused_dust_indices_per_subaddr.empty())
unused_dust_indices_per_subaddr.push_back({});
-@@ -13920,33 +13953,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle
+@@ -13911,33 +13944,40 @@ crypto::public_key wallet2::get_tx_pub_key_from_received_outs(const tools::walle
bool wallet2::export_key_images(const std::string &filename, bool all) const
{
@@ -928,7 +919,7 @@ index 48267d647..e14d4d2fc 100644
//----------------------------------------------------------------------------------------------------
std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>> wallet2::export_key_images(bool all) const
{
-@@ -14001,53 +14041,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
+@@ -13992,53 +14032,60 @@ std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>
return std::make_pair(offset, ski);
}
@@ -1008,10 +999,10 @@ index 48267d647..e14d4d2fc 100644
ski.push_back(std::make_pair(key_image, signature));
}
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 022d0696f..746e2aeff 100644
+index a1d939a5a..e309cec5e 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
-@@ -1157,6 +1157,7 @@ private:
+@@ -1164,6 +1164,7 @@ private:
// locked & unlocked balance of given or current subaddress account
uint64_t balance(uint32_t subaddr_index_major, bool strict) const;
uint64_t unlocked_balance(uint32_t subaddr_index_major, bool strict, uint64_t *blocks_to_unlock = NULL, uint64_t *time_to_unlock = NULL);
@@ -1019,7 +1010,7 @@ index 022d0696f..746e2aeff 100644
// locked & unlocked balance per subaddress of given or current subaddress account
std::map<uint32_t, uint64_t> balance_per_subaddress(uint32_t subaddr_index_major, bool strict) const;
std::map<uint32_t, std::pair<uint64_t, std::pair<uint64_t, uint64_t>>> unlocked_balance_per_subaddress(uint32_t subaddr_index_major, bool strict);
-@@ -1631,9 +1632,11 @@ private:
+@@ -1638,9 +1639,11 @@ private:
std::tuple<size_t, crypto::hash, std::vector<crypto::hash>> export_blockchain() const;
void import_blockchain(const std::tuple<size_t, crypto::hash, std::vector<crypto::hash>> &bc);
bool export_key_images(const std::string &filename, bool all = false) const;
@@ -1031,6 +1022,13 @@ index 022d0696f..746e2aeff 100644
bool import_key_images(std::vector<crypto::key_image> key_images, size_t offset=0, boost::optional<std::unordered_set<size_t>> selected_transfers=boost::none);
bool import_key_images(signed_tx_set & signed_tx, size_t offset=0, bool only_selected_transfers=false);
crypto::public_key get_tx_pub_key_from_received_outs(const tools::wallet2::transfer_details &td) const;
+diff --git a/external/bc-ur b/external/bc-ur
+new file mode 160000
+index 000000000..d82e7c753
+--- /dev/null
++++ b/external/bc-ur
+@@ -0,0 +1 @@
++Subproject commit d82e7c753e710b8000706dc3383b498438795208
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0008-add-dummy-device-for-ledger.patch b/patches/wownero/0007-add-dummy-device-for-ledger.patch
index 47b0cc7..6f32873 100644
--- a/patches/wownero/0008-add-dummy-device-for-ledger.patch
+++ b/patches/wownero/0007-add-dummy-device-for-ledger.patch
@@ -1,10 +1,10 @@
-From 221fb7ed81aff1830b4bc2d7f9b73c94eb36924a Mon Sep 17 00:00:00 2001
+From be6bbe3958304e17566b2bc601255b0d6cec119f Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 26 Jun 2024 15:04:38 +0200
-Subject: [PATCH 08/15] add dummy device for ledger
+Subject: [PATCH 07/16] add dummy device for ledger
---
- CMakeLists.txt | 6 +-
+ CMakeLists.txt | 19 +++--
src/device/CMakeLists.txt | 6 +-
src/device/device.cpp | 10 ++-
src/device/device.hpp | 12 +--
@@ -16,15 +16,15 @@ Subject: [PATCH 08/15] add dummy device for ledger
src/wallet/api/wallet.h | 18 ++++
src/wallet/api/wallet2_api.h | 12 +++
src/wallet/api/wallet_manager.cpp | 12 ++-
- 12 files changed, 365 insertions(+), 25 deletions(-)
+ 12 files changed, 372 insertions(+), 31 deletions(-)
create mode 100644 src/device/device_io_dummy.cpp
create mode 100644 src/device/device_io_dummy.hpp
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c73b813d8..ce5ef4bab 100644
+index c439e5300..86af78f10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -692,16 +692,21 @@ include_directories(${LMDB_INCLUDE})
+@@ -693,16 +693,21 @@ include_directories(${LMDB_INCLUDE})
include_directories(${LIBUNWIND_INCLUDE})
link_directories(${LIBUNWIND_LIBRARY_DIRS})
@@ -84,7 +84,7 @@ index e4f1159b5..14d398f87 100644
${device_headers}
device_ledger.hpp
diff --git a/src/device/device.cpp b/src/device/device.cpp
-index e6cd358b6..777584c01 100644
+index e6cd358b6..dd0701e0c 100644
--- a/src/device/device.cpp
+++ b/src/device/device.cpp
@@ -29,7 +29,7 @@
@@ -146,10 +146,10 @@ index 392703a24..ffd419779 100644
diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp
new file mode 100644
-index 000000000..edb4beea3
+index 000000000..f91e10651
--- /dev/null
+++ b/src/device/device_io_dummy.cpp
-@@ -0,0 +1,133 @@
+@@ -0,0 +1,135 @@
+// Copyright (c) 2017-2022, The Monero Project
+//
+// All rights reserved.
@@ -192,6 +192,8 @@ index 000000000..edb4beea3
+
+#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+#include <boost/scope_exit.hpp>
++#include <boost/chrono.hpp>
++#include <boost/thread.hpp>
+#include "log.hpp"
+#include "device_io_dummy.hpp"
+#include "device_ledger.hpp"
@@ -250,13 +252,13 @@ index 000000000..edb4beea3
+ MDEBUG("exchange(): waitsForDeviceSend");
+ // NOTE: waitsForDeviceSend should be changed by external code
+ while (waitsForDeviceSend) {
-+ std::this_thread::sleep_for(std::chrono::microseconds(1000));
++ boost::this_thread::sleep_for(boost::chrono::milliseconds(1000));
+ MDEBUG("exchange(): waitsForDeviceSend (still)");
+ }
+
+ MDEBUG("exchange(): waitsForDeviceReceive");
+ while (waitsForDeviceReceive) {
-+ std::this_thread::sleep_for(std::chrono::microseconds(1000));
++ boost::this_thread::sleep_for(boost::chrono::milliseconds(1000));
+ MDEBUG("exchange(): waitsForDeviceReceive (still)");
+ }
+
@@ -365,7 +367,7 @@ index 000000000..a1733616d
+
+#endif // HAVE_HIDAPI
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
-index 8403d76e8..0587eb7d3 100644
+index e1bfa7041..0139f1577 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -41,7 +41,7 @@ namespace hw {
@@ -430,7 +432,7 @@ index 03058c4f1..39454ca6d 100644
unsigned char buffer_send[BUFFER_SEND_SIZE];
unsigned int length_recv;
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index ee000e7ab..556e2a8ce 100644
+index e04205e48..aec76ffc0 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -48,6 +48,9 @@
@@ -615,5 +617,5 @@ index e81b8f83a..277be6ac9 100644
std::vector<std::string> WalletManagerImpl::findWallets(const std::string &path)
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0009-polyseed.patch b/patches/wownero/0008-polyseed.patch
index 6f5d5d3..aeb17b1 100644
--- a/patches/wownero/0009-polyseed.patch
+++ b/patches/wownero/0008-polyseed.patch
@@ -1,7 +1,7 @@
-From d146c6c1e23e1bf3762449e72a3aab847b3c0412 Mon Sep 17 00:00:00 2001
+From 2aec74a418dda0560e51ef2bdbfbc87ea8765bf4 Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 09:42:37 +0100
-Subject: [PATCH 09/15] polyseed
+Subject: [PATCH 08/16] polyseed
Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
---
@@ -17,8 +17,6 @@ Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
contrib/epee/include/wipeable_string.h | 7 +
contrib/epee/src/wipeable_string.cpp | 10 +
external/CMakeLists.txt | 2 +
- external/polyseed | 1 +
- external/utf8proc | 1 +
src/CMakeLists.txt | 1 +
src/cryptonote_basic/CMakeLists.txt | 1 +
src/cryptonote_basic/account.cpp | 23 ++-
@@ -36,12 +34,10 @@ Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
src/wallet/api/wallet_manager.h | 10 +
src/wallet/wallet2.cpp | 99 ++++++++--
src/wallet/wallet2.h | 30 ++-
- 31 files changed, 912 insertions(+), 23 deletions(-)
+ 29 files changed, 910 insertions(+), 23 deletions(-)
create mode 100644 contrib/depends/packages/polyseed.mk
create mode 100644 contrib/depends/patches/polyseed/0001-disable-soname.patch
create mode 100644 contrib/depends/patches/polyseed/force-static-mingw.patch
- create mode 160000 external/polyseed
- create mode 160000 external/utf8proc
create mode 100644 src/polyseed/CMakeLists.txt
create mode 100644 src/polyseed/pbkdf2.c
create mode 100644 src/polyseed/pbkdf2.h
@@ -49,10 +45,10 @@ Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
create mode 100644 src/polyseed/polyseed.hpp
diff --git a/.gitmodules b/.gitmodules
-index b24855d9b..589676649 100644
+index c1c0d385d..9edead0ee 100644
--- a/.gitmodules
+++ b/.gitmodules
-@@ -20,3 +20,9 @@
+@@ -19,3 +19,9 @@
path = external/bc-ur
url = https://github.com/MrCyjaneK/bc-ur
branch = misc
@@ -64,11 +60,11 @@ index b24855d9b..589676649 100644
+ url = https://github.com/tevador/polyseed.git
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 86000f811..96056e324 100644
+index 86af78f10..0007b5ea9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -372,6 +372,8 @@ if(NOT MANUAL_SUBMODULES)
- #check_submodule(external/trezor-common)
+ check_submodule(external/trezor-common)
check_submodule(external/randomwow)
check_submodule(external/supercop)
+ check_submodule(external/polyseed)
@@ -307,32 +303,18 @@ index b016f2f48..f2f365b1b 100644
+
}
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index dfdffe67c..fa98f61b5 100644
+index d0b6d9b14..ad30abc1f 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
-@@ -70,4 +70,6 @@ add_subdirectory(db_drivers)
+@@ -71,4 +71,6 @@ add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
add_subdirectory(bc-ur)
+add_subdirectory(polyseed EXCLUDE_FROM_ALL)
+add_subdirectory(utf8proc EXCLUDE_FROM_ALL)
add_subdirectory(randomwow EXCLUDE_FROM_ALL)
-diff --git a/external/polyseed b/external/polyseed
-new file mode 160000
-index 000000000..bd79f5014
---- /dev/null
-+++ b/external/polyseed
-@@ -0,0 +1 @@
-+Subproject commit bd79f5014c331273357277ed8a3d756fb61b9fa1
-diff --git a/external/utf8proc b/external/utf8proc
-new file mode 160000
-index 000000000..3de4596fb
---- /dev/null
-+++ b/external/utf8proc
-@@ -0,0 +1 @@
-+Subproject commit 3de4596fbe28956855df2ecb3c11c0bbc3535838
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 9216bcaa5..c043ba150 100644
+index 3335d3c21..06b708cf0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -95,6 +95,7 @@ add_subdirectory(net)
@@ -447,10 +429,10 @@ index 93d1d28f0..1f76febce 100644
const account_keys& get_keys() const;
std::string get_public_address_str(network_type nettype) const;
diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h
-index 8b5091a46..d9151e8d2 100644
+index 42861a8ff..8973d9fb8 100644
--- a/src/cryptonote_config.h
+++ b/src/cryptonote_config.h
-@@ -219,6 +219,8 @@
+@@ -223,6 +223,8 @@
#define DNS_BLOCKLIST_LIFETIME (86400 * 8)
@@ -998,7 +980,7 @@ index 000000000..2c8c777a7
+#endif //POLYSEED_HPP
\ No newline at end of file
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 556e2a8ce..704e5e148 100644
+index aec76ffc0..f315b7ed6 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -728,6 +728,28 @@ bool WalletImpl::recoverFromDevice(const std::string &path, const std::string &p
@@ -1194,7 +1176,7 @@ index a223e1df9..28fcd36c9 100644
bool walletExists(const std::string &path) override;
bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, bool no_spend_key, uint64_t kdf_rounds = 1) const override;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index e14d4d2fc..fd4094360 100644
+index d89595cf8..849128ca5 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -92,6 +92,7 @@ using namespace epee;
@@ -1205,17 +1187,17 @@ index e14d4d2fc..fd4094360 100644
extern "C"
{
-@@ -1278,7 +1279,8 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
+@@ -1281,7 +1282,8 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std
m_enable_multisig(false),
m_pool_info_query_time(0),
m_has_ever_refreshed_from_node(false),
-- m_allow_mismatched_daemon_version(true)
-+ m_allow_mismatched_daemon_version(true),
+- m_allow_mismatched_daemon_version(false)
++ m_allow_mismatched_daemon_version(false),
+ m_polyseed(false)
{
set_rpc_client_secret_key(rct::rct2sk(rct::skGen()));
}
-@@ -1483,6 +1485,20 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
+@@ -1486,6 +1488,20 @@ bool wallet2::get_seed(epee::wipeable_string& electrum_words, const epee::wipeab
return true;
}
//----------------------------------------------------------------------------------------------------
@@ -1236,7 +1218,7 @@ index e14d4d2fc..fd4094360 100644
bool wallet2::get_multisig_seed(epee::wipeable_string& seed, const epee::wipeable_string &passphrase) const
{
bool ready;
-@@ -4801,6 +4817,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypt
+@@ -4851,6 +4867,9 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const crypt
value2.SetInt(m_enable_multisig ? 1 : 0);
json.AddMember("enable_multisig", value2, json.GetAllocator());
@@ -1246,15 +1228,15 @@ index e14d4d2fc..fd4094360 100644
if (m_background_sync_type == BackgroundSyncCustomPassword && !background_keys_file && m_custom_background_key)
{
value.SetString(reinterpret_cast<const char*>(m_custom_background_key.get().data()), m_custom_background_key.get().size());
-@@ -5040,6 +5059,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5090,6 +5109,7 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
m_enable_multisig = false;
- m_allow_mismatched_daemon_version = true;
+ m_allow_mismatched_daemon_version = false;
m_custom_background_key = boost::none;
+ m_polyseed = false;
}
else if(json.IsObject())
{
-@@ -5280,6 +5300,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
+@@ -5330,6 +5350,9 @@ bool wallet2::load_keys_buf(const std::string& keys_buf, const epee::wipeable_st
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, background_sync_type, BackgroundSyncType, Int, false, BackgroundSyncOff);
m_background_sync_type = field_background_sync_type;
@@ -1264,7 +1246,7 @@ index e14d4d2fc..fd4094360 100644
// Load encryption key used to encrypt background cache
crypto::chacha_key custom_background_key;
m_custom_background_key = boost::none;
-@@ -5599,6 +5622,48 @@ void wallet2::init_type(hw::device::device_type device_type)
+@@ -5649,6 +5672,48 @@ void wallet2::init_type(hw::device::device_type device_type)
m_key_device_type = device_type;
}
@@ -1313,7 +1295,7 @@ index e14d4d2fc..fd4094360 100644
/*!
* \brief Generates a wallet or restores one. Assumes the multisig setup
* has already completed for the provided multisig info.
-@@ -5726,7 +5791,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5776,7 +5841,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
return retval;
}
@@ -1322,7 +1304,7 @@ index e14d4d2fc..fd4094360 100644
{
// -1 month for fluctuations in block time and machine date/time setup.
// avg seconds per block
-@@ -5750,7 +5815,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
+@@ -5800,7 +5865,7 @@ crypto::secret_key wallet2::generate(const std::string& wallet_, const epee::wip
// the daemon is currently syncing.
// If we use the approximate height we subtract one month as
// a safety margin.
@@ -1331,7 +1313,7 @@ index e14d4d2fc..fd4094360 100644
uint64_t target_height = get_daemon_blockchain_target_height(err);
if (err.empty()) {
if (target_height < height)
-@@ -13643,9 +13708,10 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
+@@ -13634,9 +13699,10 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
return target_height;
}
@@ -1343,7 +1325,7 @@ index e14d4d2fc..fd4094360 100644
LOG_PRINT_L2("Calculated blockchain height: " << approx_blockchain_height);
return approx_blockchain_height;
}
-@@ -15780,15 +15846,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin
+@@ -15758,15 +15824,6 @@ bool wallet2::parse_uri(const std::string &uri, std::string &address, std::strin
//----------------------------------------------------------------------------------------------------
uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, uint8_t day)
{
@@ -1359,7 +1341,7 @@ index e14d4d2fc..fd4094360 100644
std::tm date = { 0, 0, 0, 0, 0, 0, 0, 0 };
date.tm_year = year - 1900;
date.tm_mon = month - 1;
-@@ -15797,7 +15854,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui
+@@ -15775,7 +15832,23 @@ uint64_t wallet2::get_blockchain_height_by_date(uint16_t year, uint8_t month, ui
{
throw std::runtime_error("month or day out of range");
}
@@ -1384,7 +1366,7 @@ index e14d4d2fc..fd4094360 100644
uint64_t height_min = 0;
uint64_t height_max = get_daemon_blockchain_height(err) - 1;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index 746e2aeff..c165acb9d 100644
+index e309cec5e..9c520fa99 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -72,6 +72,7 @@
@@ -1432,7 +1414,7 @@ index 746e2aeff..c165acb9d 100644
/*!
* \brief Checks if light wallet. A light wallet sends view key to a server where the blockchain is scanned.
*/
-@@ -1562,8 +1586,8 @@ private:
+@@ -1569,8 +1593,8 @@ private:
/*!
* \brief Calculates the approximate blockchain height from current date/time.
*/
@@ -1443,7 +1425,7 @@ index 746e2aeff..c165acb9d 100644
std::vector<size_t> select_available_outputs_from_histogram(uint64_t count, bool atleast, bool unlocked, bool allow_rct);
std::vector<size_t> select_available_outputs(const std::function<bool(const transfer_details &td)> &f);
std::vector<size_t> select_available_unmixable_outputs();
-@@ -1657,6 +1681,7 @@ private:
+@@ -1664,6 +1688,7 @@ private:
bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error);
uint64_t get_blockchain_height_by_date(uint16_t year, uint8_t month, uint8_t day); // 1<=month<=12, 1<=day<=31
@@ -1451,7 +1433,7 @@ index 746e2aeff..c165acb9d 100644
bool is_synced();
-@@ -2003,6 +2028,7 @@ private:
+@@ -2010,6 +2035,7 @@ private:
std::string seed_language; /*!< Language of the mnemonics (seed). */
bool is_old_file_format; /*!< Whether the wallet file is of an old file format */
bool m_watch_only; /*!< no spend key */
@@ -1459,6 +1441,21 @@ index 746e2aeff..c165acb9d 100644
bool m_multisig; /*!< if > 1 spend secret key will not match spend public key */
uint32_t m_multisig_threshold;
std::vector<crypto::public_key> m_multisig_signers;
+
+diff --git a/external/polyseed b/external/polyseed
+new file mode 160000
+index 000000000..bd79f5014
+--- /dev/null
++++ b/external/polyseed
+@@ -0,0 +1 @@
++Subproject commit bd79f5014c331273357277ed8a3d756fb61b9fa1
+diff --git a/external/utf8proc b/external/utf8proc
+new file mode 160000
+index 000000000..3de4596fb
+--- /dev/null
++++ b/external/utf8proc
+@@ -0,0 +1 @@
++Subproject commit 3de4596fbe28956855df2ecb3c11c0bbc3535838
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0010-coin-control.patch b/patches/wownero/0009-coin-control.patch
index 94f8485..d3dd5e0 100644
--- a/patches/wownero/0010-coin-control.patch
+++ b/patches/wownero/0009-coin-control.patch
@@ -1,7 +1,7 @@
-From edc33fa98da3bc9e8e746a59f5e62b9001afb230 Mon Sep 17 00:00:00 2001
+From 8b680843825e374cb21d2ea7895442d5436cd12d Mon Sep 17 00:00:00 2001
From: tobtoht <tob@featherwallet.org>
Date: Tue, 12 Mar 2024 11:07:57 +0100
-Subject: [PATCH 10/15] coin control
+Subject: [PATCH 09/16] coin control
---
src/simplewallet/simplewallet.cpp | 2 +-
@@ -22,10 +22,10 @@ Subject: [PATCH 10/15] coin control
create mode 100644 src/wallet/api/coins_info.h
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
-index 83b56c3f4..12c38b8e1 100644
+index 42e45054d..58f60783e 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
-@@ -6981,7 +6981,7 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool ca
+@@ -6971,7 +6971,7 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool ca
{
// figure out what tx will be necessary
auto ptx_vector = m_wallet->create_transactions_2(dsts, fake_outs_count, priority, extra,
@@ -504,7 +504,7 @@ index 000000000..c43e45abd
+
+#endif //FEATHER_COINS_INFO_H
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index 704e5e148..e69910e69 100644
+index f315b7ed6..7066fc3d8 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -35,6 +35,7 @@
@@ -627,7 +627,7 @@ index 704e5e148..e69910e69 100644
}
PendingTransaction *WalletImpl::createSweepUnmixableTransaction()
-@@ -2342,6 +2391,11 @@ AddressBook *WalletImpl::addressBook()
+@@ -2343,6 +2392,11 @@ AddressBook *WalletImpl::addressBook()
return m_addressBook.get();
}
@@ -777,10 +777,10 @@ index be1c3704e..013b5bcba 100644
virtual SubaddressAccount * subaddressAccount() = 0;
virtual void setListener(WalletListener *) = 0;
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index fd4094360..be3096675 100644
+index 849128ca5..f96de960a 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -2103,12 +2103,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const
+@@ -2136,12 +2136,21 @@ bool wallet2::frozen(const multisig_tx_set& txs) const
return false;
}
@@ -802,7 +802,7 @@ index fd4094360..be3096675 100644
void wallet2::thaw(const crypto::key_image &ki)
{
thaw(get_transfer_details(ki));
-@@ -2119,6 +2128,18 @@ bool wallet2::frozen(const crypto::key_image &ki) const
+@@ -2152,6 +2161,18 @@ bool wallet2::frozen(const crypto::key_image &ki) const
return frozen(get_transfer_details(ki));
}
//----------------------------------------------------------------------------------------------------
@@ -821,7 +821,7 @@ index fd4094360..be3096675 100644
size_t wallet2::get_transfer_details(const crypto::key_image &ki) const
{
for (size_t idx = 0; idx < m_transfers.size(); ++idx)
-@@ -2532,6 +2553,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
+@@ -2566,6 +2587,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
uint64_t amount = tx.vout[o].amount ? tx.vout[o].amount : tx_scan_info[o].amount;
if (!pool)
{
@@ -829,7 +829,7 @@ index fd4094360..be3096675 100644
m_transfers.push_back(transfer_details{});
transfer_details& td = m_transfers.back();
td.m_block_height = height;
-@@ -2635,6 +2657,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
+@@ -2669,6 +2691,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
uint64_t extra_amount = amount - burnt;
if (!pool)
{
@@ -837,7 +837,7 @@ index fd4094360..be3096675 100644
transfer_details &td = m_transfers[kit->second];
td.m_block_height = height;
td.m_internal_output_index = o;
-@@ -10506,7 +10529,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
+@@ -10494,7 +10517,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
LOG_PRINT_L2("transfer_selected_rct done");
}
@@ -846,7 +846,7 @@ index fd4094360..be3096675 100644
{
std::vector<size_t> picks;
float current_output_relatdness = 1.0f;
-@@ -10517,6 +10540,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10505,6 +10528,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -856,7 +856,7 @@ index fd4094360..be3096675 100644
if (!is_spent(td, false) && !td.m_frozen && td.is_rct() && td.amount() >= needed_money && is_transfer_unlocked(td) && td.m_subaddr_index.major == subaddr_account && subaddr_indices.count(td.m_subaddr_index.minor) == 1)
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
-@@ -10537,6 +10563,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10525,6 +10551,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -866,7 +866,7 @@ index fd4094360..be3096675 100644
if (!is_spent(td, false) && !td.m_frozen && !td.m_key_image_partial && td.is_rct() && is_transfer_unlocked(td) && td.m_subaddr_index.major == subaddr_account && subaddr_indices.count(td.m_subaddr_index.minor) == 1)
{
if (td.amount() > m_ignore_outputs_above || td.amount() < m_ignore_outputs_below)
-@@ -10548,6 +10577,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
+@@ -10536,6 +10565,9 @@ std::vector<size_t> wallet2::pick_preferred_rct_inputs(uint64_t needed_money, ui
for (size_t j = i + 1; j < m_transfers.size(); ++j)
{
const transfer_details& td2 = m_transfers[j];
@@ -876,7 +876,7 @@ index fd4094360..be3096675 100644
if (td2.amount() > m_ignore_outputs_above || td2.amount() < m_ignore_outputs_below)
{
MDEBUG("Ignoring output " << j << " of amount " << print_money(td2.amount()) << " which is outside prescribed range [" << print_money(m_ignore_outputs_below) << ", " << print_money(m_ignore_outputs_above) << "]");
-@@ -11120,7 +11152,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
+@@ -11108,7 +11140,7 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
// This system allows for sending (almost) the entire balance, since it does
// not generate spurious change in all txes, thus decreasing the instantaneous
// usable balance.
@@ -885,7 +885,7 @@ index fd4094360..be3096675 100644
{
//ensure device is let in NONE mode in any case
hw::device &hwdev = m_account.get_device();
-@@ -11328,6 +11360,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11317,6 +11349,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -895,16 +895,16 @@ index fd4094360..be3096675 100644
if (m_ignore_fractional_outputs && td.amount() < fractional_threshold)
{
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below fractional threshold " << print_money(fractional_threshold));
-@@ -11419,7 +11454,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
+@@ -11408,7 +11443,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
// will get us a known fee.
- uint64_t estimated_fee = estimate_fee(use_per_byte_fee, use_rct, 2, fake_outs_count, 2, extra.size(), bulletproof, clsag, bulletproof_plus, use_view_tags, base_fee, fee_quantization_mask);
+ uint64_t estimated_fee = estimate_fee(use_per_byte_fee, use_rct, 2, fake_outs_count, 2, extra.size(), bulletproof, clsag, bulletproof_plus, bulletproof_plus_full_commit, use_view_tags, base_fee, fee_quantization_mask);
total_needed_money = needed_money + (subtract_fee_from_outputs.size() ? 0 : estimated_fee);
- preferred_inputs = pick_preferred_rct_inputs(total_needed_money, subaddr_account, subaddr_indices);
+ preferred_inputs = pick_preferred_rct_inputs(total_needed_money, subaddr_account, subaddr_indices, preferred_input_list);
if (!preferred_inputs.empty())
{
string s;
-@@ -11898,7 +11933,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
+@@ -11887,7 +11922,7 @@ bool wallet2::sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, c
return true;
}
@@ -913,7 +913,7 @@ index fd4094360..be3096675 100644
{
std::vector<size_t> unused_transfers_indices;
std::vector<size_t> unused_dust_indices;
-@@ -11927,6 +11962,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below
+@@ -11917,6 +11952,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(uint64_t below
for (size_t i = 0; i < m_transfers.size(); ++i)
{
const transfer_details& td = m_transfers[i];
@@ -924,10 +924,10 @@ index fd4094360..be3096675 100644
{
MDEBUG("Ignoring output " << i << " of amount " << print_money(td.amount()) << " which is below threshold " << print_money(fractional_threshold));
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
-index c165acb9d..6b103d9c2 100644
+index 9c520fa99..66eea3ec9 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
-@@ -1216,8 +1216,8 @@ private:
+@@ -1223,8 +1223,8 @@ private:
bool parse_unsigned_tx_from_str(const std::string &unsigned_tx_st, unsigned_tx_set &exported_txs) const;
bool load_tx(const std::string &signed_filename, std::vector<tools::wallet2::pending_tx> &ptx, std::function<bool(const signed_tx_set&)> accept_func = NULL);
bool parse_tx_from_str(const std::string &signed_tx_st, std::vector<tools::wallet2::pending_tx> &ptx, std::function<bool(const signed_tx_set &)> accept_func);
@@ -938,7 +938,7 @@ index c165acb9d..6b103d9c2 100644
std::vector<wallet2::pending_tx> create_transactions_single(const crypto::key_image &ki, const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, const size_t fake_outs_count, uint32_t priority, const std::vector<uint8_t>& extra);
std::vector<wallet2::pending_tx> create_transactions_from(const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, std::vector<size_t> unused_transfers_indices, std::vector<size_t> unused_dust_indices, const size_t fake_outs_count, uint32_t priority, const std::vector<uint8_t>& extra);
bool sanity_check(const std::vector<wallet2::pending_tx> &ptx_vector, const std::vector<cryptonote::tx_destination_entry>& dsts, const unique_index_container& subtract_fee_from_outputs = {}) const;
-@@ -1569,6 +1569,7 @@ private:
+@@ -1576,6 +1576,7 @@ private:
uint64_t get_num_rct_outputs();
size_t get_num_transfer_details() const { return m_transfers.size(); }
const transfer_details &get_transfer_details(size_t idx) const;
@@ -946,7 +946,7 @@ index c165acb9d..6b103d9c2 100644
uint8_t get_current_hard_fork();
void get_hard_fork_info(uint8_t version, uint64_t &earliest_height);
-@@ -1800,7 +1801,9 @@ private:
+@@ -1807,7 +1808,9 @@ private:
void freeze(size_t idx);
void thaw(size_t idx);
bool frozen(size_t idx) const;
@@ -956,7 +956,7 @@ index c165acb9d..6b103d9c2 100644
void thaw(const crypto::key_image &ki);
bool frozen(const crypto::key_image &ki) const;
bool frozen(const transfer_details &td) const;
-@@ -1841,6 +1844,8 @@ private:
+@@ -1848,6 +1851,8 @@ private:
static std::string get_default_daemon_address() { CRITICAL_REGION_LOCAL(default_daemon_address_lock); return default_daemon_address; }
@@ -965,7 +965,7 @@ index c165acb9d..6b103d9c2 100644
private:
/*!
* \brief Stores wallet information to wallet file.
-@@ -1912,7 +1917,7 @@ private:
+@@ -1919,7 +1924,7 @@ private:
std::vector<uint64_t> get_unspent_amounts_vector(bool strict);
uint64_t get_dynamic_base_fee_estimate();
float get_output_relatedness(const transfer_details &td0, const transfer_details &td1) const;
@@ -975,5 +975,5 @@ index c165acb9d..6b103d9c2 100644
void set_unspent(size_t idx);
bool is_spent(const transfer_details &td, bool strict = true) const;
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch b/patches/wownero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
index de19446..62fc6ef 100644
--- a/patches/wownero/0011-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
+++ b/patches/wownero/0010-Add-hex-encoding-and-tx-key-getter-for-PendingTransc.patch
@@ -1,7 +1,7 @@
-From 96911b156ad9cfef2ebf2809a393492e87ab7607 Mon Sep 17 00:00:00 2001
+From 32d3c34073563f34ce90a8afdbe8e554e98d38bc Mon Sep 17 00:00:00 2001
From: M <m@cakewallet.com>
Date: Fri, 21 Apr 2023 15:43:47 -0400
-Subject: [PATCH 11/15] Add hex encoding and tx key getter for
+Subject: [PATCH 10/16] Add hex encoding and tx key getter for
PendingTransction in wallet api.
---
@@ -64,5 +64,5 @@ index 013b5bcba..f421fdc05 100644
/**
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch b/patches/wownero/0011-Add-recoverDeterministicWalletFromSpendKey.patch
index bbb5547..a6cf6f5 100644
--- a/patches/wownero/0012-Add-recoverDeterministicWalletFromSpendKey.patch
+++ b/patches/wownero/0011-Add-recoverDeterministicWalletFromSpendKey.patch
@@ -1,7 +1,7 @@
-From ad28016bf3cfd11242dc14472389f7a006c73dcf Mon Sep 17 00:00:00 2001
+From 9f1a4324d0346d3fc9baf055f0d86f796d1dcecd Mon Sep 17 00:00:00 2001
From: Konstantin Ullrich <konstantinullrich12@gmail.com>
Date: Wed, 11 Oct 2023 16:47:59 +0200
-Subject: [PATCH 12/15] Add recoverDeterministicWalletFromSpendKey
+Subject: [PATCH 11/16] Add recoverDeterministicWalletFromSpendKey
This function is used by Cake Wallet to enable polyseed (dart implementation)
support.
@@ -19,7 +19,7 @@ Co-authored-by: Godwin Asuquo <godilite@gmail.com>
5 files changed, 75 insertions(+)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index e69910e69..e650e6044 100644
+index 7066fc3d8..690fbdce1 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -824,6 +824,35 @@ bool WalletImpl::recover(const std::string &path, const std::string &password, c
@@ -149,5 +149,5 @@ index 28fcd36c9..be3ff8184 100644
const std::string &password,
NetworkType nettype,
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0013-add-monero-submodule-support.patch b/patches/wownero/0012-add-monero-submodule-support.patch
index 6b1e987..6380cd2 100644
--- a/patches/wownero/0013-add-monero-submodule-support.patch
+++ b/patches/wownero/0012-add-monero-submodule-support.patch
@@ -1,20 +1,21 @@
-From f8b3055a79c929dc167d20d4874ab20b0a51d49d Mon Sep 17 00:00:00 2001
+From 733d8fa11a455ff144d29a6a5fad384212d1931a Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Thu, 7 Nov 2024 16:46:24 +0000
-Subject: [PATCH 13/15] add monero submodule support
+Subject: [PATCH 12/16] add monero submodule support
---
CMakeLists.txt | 6 +++---
cmake/CheckLinkerFlag.cmake | 2 +-
+ cmake/FindCcache.cmake | 2 +-
src/wallet/wallet_rpc_server.cpp | 2 +-
- 3 files changed, 5 insertions(+), 5 deletions(-)
+ 4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 96056e324..1383e630a 100644
+index 0007b5ea9..caa1d5e33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,9 +223,9 @@ function(forbid_undefined_symbols)
- cmake_minimum_required(VERSION 3.1)
+ cmake_minimum_required(VERSION 3.5)
project(test)
option(EXPECT_SUCCESS "" ON)
-file(WRITE "${CMAKE_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }")
@@ -35,23 +36,36 @@ index 96056e324..1383e630a 100644
if (NOT DEFINED ENV{DEVELOPER_LOCAL_TOOLS})
message(STATUS "Could not find DEVELOPER_LOCAL_TOOLS in env (not required)")
diff --git a/cmake/CheckLinkerFlag.cmake b/cmake/CheckLinkerFlag.cmake
-index 7ecf5f610..89fb9d167 100644
+index 69eefe810..89fb9d167 100644
--- a/cmake/CheckLinkerFlag.cmake
+++ b/cmake/CheckLinkerFlag.cmake
@@ -6,7 +6,7 @@ macro(CHECK_LINKER_FLAG flag VARIABLE)
message(STATUS "Looking for ${flag} linker flag")
endif()
-- set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
+- set(_cle_source ${monero_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
+ set(_cle_source ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
set(CMAKE_C_FLAGS "${flag}")
+diff --git a/cmake/FindCcache.cmake b/cmake/FindCcache.cmake
+index d3f5f829b..68e4851cb 100644
+--- a/cmake/FindCcache.cmake
++++ b/cmake/FindCcache.cmake
+@@ -47,7 +47,7 @@ if (CCACHE_FOUND)
+ cmake_minimum_required(VERSION 3.5)
+ project(test)
+ option (CCACHE "")
+-file(WRITE "${CMAKE_SOURCE_DIR}/test.cpp" "int main() { return 0; }")
++file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/test.cpp" "int main() { return 0; }")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE}")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE}")
+ add_executable(main test.cpp)
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
-index 21e69ea0e..d9bc5dda3 100644
+index d4167e8cb..f7a07ca26 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
-@@ -1162,7 +1162,7 @@ namespace tools
+@@ -1261,7 +1261,7 @@ namespace tools
{
uint64_t mixin = m_wallet->adjust_mixin(req.ring_size ? req.ring_size - 1 : 0);
uint32_t priority = m_wallet->adjust_priority(req.priority);
@@ -61,5 +75,5 @@ index 21e69ea0e..d9bc5dda3 100644
if (ptx_vector.empty())
{
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0014-fix-iOS-depends-build.patch b/patches/wownero/0013-fix-iOS-depends-build.patch
index 5cb1c79..78464b7 100644
--- a/patches/wownero/0014-fix-iOS-depends-build.patch
+++ b/patches/wownero/0013-fix-iOS-depends-build.patch
@@ -1,7 +1,7 @@
-From a707d5fc2aa9d387857381e7ebc4a68c1d245a00 Mon Sep 17 00:00:00 2001
+From 23507763ad4a3b2461b97ef0a993d6a06158312d Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 21 Nov 2024 06:05:03 -0500
-Subject: [PATCH 14/15] fix iOS depends build
+Subject: [PATCH 13/16] fix iOS depends build
---
CMakeLists.txt | 4 ----
@@ -11,7 +11,7 @@ Subject: [PATCH 14/15] fix iOS depends build
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1383e630a..b8782570d 100644
+index caa1d5e33..59d598edb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,10 +39,6 @@ include(CheckLibraryExists)
@@ -60,7 +60,7 @@ index 414936a05..81c81767f 100644
find_library(IOKIT_LIBRARY IOKit)
mark_as_advanced(IOKIT_LIBRARY)
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp
-index 83bea8b5b..dfb4b5c5a 100644
+index 70e95d398..18563c3b3 100644
--- a/src/cryptonote_basic/miner.cpp
+++ b/src/cryptonote_basic/miner.cpp
@@ -45,7 +45,7 @@
@@ -72,7 +72,7 @@ index 83bea8b5b..dfb4b5c5a 100644
#include <sys/times.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/ps/IOPSKeys.h>
-@@ -971,7 +971,7 @@ namespace cryptonote
+@@ -973,7 +973,7 @@ namespace cryptonote
return true;
@@ -81,7 +81,7 @@ index 83bea8b5b..dfb4b5c5a 100644
mach_msg_type_number_t count;
kern_return_t status;
-@@ -1037,7 +1037,7 @@ namespace cryptonote
+@@ -1039,7 +1039,7 @@ namespace cryptonote
return true;
}
@@ -90,7 +90,7 @@ index 83bea8b5b..dfb4b5c5a 100644
struct tms tms;
if ( times(&tms) != (clock_t)-1 )
-@@ -1066,7 +1066,7 @@ namespace cryptonote
+@@ -1068,7 +1068,7 @@ namespace cryptonote
return boost::logic::tribool(power_status.ACLineStatus != 1);
}
@@ -100,5 +100,5 @@ index 83bea8b5b..dfb4b5c5a 100644
#if TARGET_OS_MAC && (!defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
return boost::logic::tribool(IOPSGetTimeRemainingEstimate() != kIOPSTimeRemainingUnlimited);
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch b/patches/wownero/0014-include-locale-only-when-targeting-WIN32.patch
index 27ec9bc..913ee93 100644
--- a/patches/wownero/0015-include-locale-only-when-targeting-WIN32.patch
+++ b/patches/wownero/0014-include-locale-only-when-targeting-WIN32.patch
@@ -1,7 +1,7 @@
-From eeb059ab8bff7e8614531565259ca66f6e6a8c7d Mon Sep 17 00:00:00 2001
+From 54c9d7a6a6feb0196e638511dabc50e119038ca7 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Mon, 18 Nov 2024 10:57:37 -0500
-Subject: [PATCH 15/15] include locale only when targeting WIN32
+Subject: [PATCH 14/16] include locale only when targeting WIN32
---
CMakeLists.txt | 5 ++++-
@@ -9,10 +9,10 @@ Subject: [PATCH 15/15] include locale only when targeting WIN32
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b8782570d..d1ed1de7b 100644
+index 59d598edb..a620e8a37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1090,7 +1090,10 @@ if(NOT Boost_FOUND)
+@@ -1091,7 +1091,10 @@ if(NOT Boost_FOUND)
elseif(Boost_FOUND)
message(STATUS "Found Boost Version: ${Boost_VERSION_STRING}")
@@ -25,7 +25,7 @@ index b8782570d..d1ed1de7b 100644
# Boost System is header-only since 1.69
if (Boost_VERSION_STRING VERSION_LESS 1.69.0)
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
-index e650e6044..6d7553a1d 100644
+index 690fbdce1..161bd33ef 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -46,7 +46,9 @@
@@ -39,5 +39,5 @@ index e650e6044..6d7553a1d 100644
#include "bc-ur/src/bc-ur.hpp"
#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
--
-2.48.0
+2.51.0
diff --git a/patches/wownero/0016-change-earliest-fork-height-message.patch b/patches/wownero/0015-change-earliest-fork-height-message.patch
index 0a0bd2c..a8daff4 100644
--- a/patches/wownero/0016-change-earliest-fork-height-message.patch
+++ b/patches/wownero/0015-change-earliest-fork-height-message.patch
@@ -1,17 +1,17 @@
-From d47284456194c6d99698b28908d753acf1a64010 Mon Sep 17 00:00:00 2001
+From 1d52a04342d63795de45958d41477047e15f0ac2 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 29 Jan 2025 16:13:28 +0100
-Subject: [PATCH] change earliest fork height message
+Subject: [PATCH 15/16] change earliest fork height message
---
src/wallet/wallet2.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
-index d060bf95b..9c1574c02 100644
+index f96de960a..888f862f7 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
-@@ -12354,7 +12354,7 @@ bool wallet2::use_fork_rules(uint8_t version, int64_t early_blocks)
+@@ -12351,7 +12351,7 @@ bool wallet2::use_fork_rules(uint8_t version, int64_t early_blocks)
boost::optional<std::string> result = m_node_rpc_proxy.get_height(height);
THROW_WALLET_EXCEPTION_IF(result, error::wallet_internal_error, "Failed to get height");
result = m_node_rpc_proxy.get_earliest_height(version, earliest_height);
@@ -21,5 +21,5 @@ index d060bf95b..9c1574c02 100644
bool close_enough = (int64_t)height >= (int64_t)earliest_height - early_blocks && earliest_height != std::numeric_limits<uint64_t>::max(); // start using the rules that many blocks beforehand
if (close_enough)
--
-2.48.1
+2.51.0
diff --git a/patches/wownero/0016-drop-generate_translations_header.c-requirement.patch b/patches/wownero/0016-drop-generate_translations_header.c-requirement.patch
new file mode 100644
index 0000000..5b14436
--- /dev/null
+++ b/patches/wownero/0016-drop-generate_translations_header.c-requirement.patch
@@ -0,0 +1,132 @@
+From f7ccb8ea7471edb2c5eed8d29b39f7112da7a450 Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Fri, 20 Feb 2026 08:03:01 +0100
+Subject: [PATCH 16/16] drop generate_translations_header.c requirement
+
+---
+ CMakeLists.txt | 11 ++----
+ translations/CMakeLists.txt | 79 +++++++++++++------------------------
+ 2 files changed, 31 insertions(+), 59 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a620e8a37..6343a3066 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -71,7 +71,7 @@ if (${CMAKE_VERSION} VERSION_GREATER "3.0.0" AND CMAKE_MAKE_PROGRAM MATCHES "nin
+ set(CMAKE_JOB_POOL_LINK link_job_pool)
+ endif ()
+ endif ()
+-
++
+ option (USE_CLANG_TIDY_C "Lint the code with clang-tidy - variant C" OFF)
+ option (USE_CLANG_TIDY_CXX "Lint the code with clang-tidy - variant C++" OFF)
+ if (USE_CLANG_TIDY_C AND USE_CLANG_TIDY_CXX)
+@@ -667,16 +667,11 @@ endfunction ()
+ # Generate header for embedded translations
+ # Generate header for embedded translations, use target toolchain if depends, otherwise use the
+ # lrelease and lupdate binaries from the host
+-include(ExternalProject)
+-ExternalProject_Add(generate_translations_header
+- SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations"
+- BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
+- STAMP_DIR ${LRELEASE_PATH}
+- CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH}
+- INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "")
++add_subdirectory(translations)
+ include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
+ add_subdirectory(external)
+
++
+ # Final setup for libunbound
+ include_directories(${UNBOUND_INCLUDE_DIR})
+
+diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
+index 3b43360f8..d88a78ced 100644
+--- a/translations/CMakeLists.txt
++++ b/translations/CMakeLists.txt
+@@ -30,54 +30,31 @@ cmake_minimum_required(VERSION 3.5)
+
+ project(translations)
+
+-# when crosscompiling import the executable targets from a file
+-IF(CMAKE_CROSSCOMPILING)
+- message(WARNING "CrossCompiling")
+- SET(IMPORT_EXECUTABLES "${CMAKE_CURRENT_BINARY_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Point it to the export file from a native build")
+- INCLUDE(${IMPORT_EXECUTABLES})
+-ENDIF(CMAKE_CROSSCOMPILING)
+-
+-# only build the generator if not crosscompiling
+-IF(NOT CMAKE_CROSSCOMPILING)
+- add_executable(generate_translations_header generate_translations_header.c)
+-ENDIF(NOT CMAKE_CROSSCOMPILING)
+-
+-if(LRELEASE_PATH STREQUAL "")
+- find_program(LRELEASE lrelease)
+-else()
+- set(LRELEASE ${LRELEASE_PATH}/lrelease)
+-endif()
+-
+-if(LRELEASE STREQUAL "LRELEASE-NOTFOUND")
+- set(ts_files "")
+- message(WARNING "lrelease program not found, translation files not built")
+-else()
+- execute_process(COMMAND ${LRELEASE} -version
+- RESULT_VARIABLE lrelease_ret)
+- if(NOT lrelease_ret EQUAL "0")
+- set(ts_files "")
+- message(WARNING "lrelease program not working, translation files not built")
+- else()
+- file(GLOB ts_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.ts)
+- foreach(ts_file ${ts_files})
+- string(REPLACE ".ts" ".qm" qm_file "${ts_file}")
+- add_custom_command(TARGET generate_translations_header
+- PRE_BUILD
+- COMMAND ${LRELEASE} "${CMAKE_CURRENT_SOURCE_DIR}/${ts_file}" -qm "${qm_file}"
+- WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}")
+- endforeach()
+- endif()
+-endif()
+-
+-string(REPLACE ".ts" ".qm" qm_files "${ts_files}")
+-
+-add_custom_command(TARGET generate_translations_header
+- POST_BUILD
+- COMMAND $<TARGET_FILE:generate_translations_header> ${qm_files}
+- WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}"
+- COMMENT "Generating embedded translations header")
+-
+-# export the generator target to a file, so it can be imported (see above) by another build
+-IF(NOT CMAKE_CROSSCOMPILING)
+- EXPORT(TARGETS generate_translations_header FILE ${CMAKE_CURRENT_BINARY_DIR}/ImportExecutables.cmake )
+-ENDIF(NOT CMAKE_CROSSCOMPILING)
++add_custom_target(generate_translations_header)
++
++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/translation_files.h"
++"#ifndef TRANSLATION_FILES_H
++#define TRANSLATION_FILES_H
++
++#include <string>
++
++static const struct embedded_file {
++ const std::string *name;
++ const std::string *data;
++} embedded_files[] = {
++ {NULL, NULL}
++};
++
++static bool find_embedded_file(const std::string &name, std::string &data) {
++ const struct embedded_file *p;
++ for (p = embedded_files; p->name != NULL; p++) {
++ if (*p->name == name) {
++ data = *p->data;
++ return true;
++ }
++ }
++ return false;
++}
++
++#endif /* TRANSLATION_FILES_H */
++")
+--
+2.51.0
+
diff --git a/patches/wownero/0017-pr-9880.patch b/patches/wownero/0017-pr-9880.patch
deleted file mode 100644
index dbf604f..0000000
--- a/patches/wownero/0017-pr-9880.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 31ef09596a9d8d547905577823ff52d33e10a3d2 Mon Sep 17 00:00:00 2001
-From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-Date: Tue, 1 Apr 2025 11:30:45 +0200
-Subject: [PATCH] pr-9880
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5938be6..1c47285 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -216,7 +216,7 @@ function(forbid_undefined_symbols)
- file(MAKE_DIRECTORY "${TEST_PROJECT}")
- file(WRITE "${TEST_PROJECT}/CMakeLists.txt"
- [=[
--cmake_minimum_required(VERSION 3.1)
-+cmake_minimum_required(VERSION 3.5)
- project(test)
- option(EXPECT_SUCCESS "" ON)
- file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }")
---
-2.49.0
-
diff --git a/patches/wownero/0018-fix-unary_function-__unary_function.patch b/patches/wownero/0018-fix-unary_function-__unary_function.patch
deleted file mode 100644
index 5fc385c..0000000
--- a/patches/wownero/0018-fix-unary_function-__unary_function.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e488eaa7397d388cee6e914e10d23790f005f6f7 Mon Sep 17 00:00:00 2001
-From: Czarek Nakamoto <cyjan@mrcyjanek.net>
-Date: Thu, 10 Apr 2025 13:28:06 +0200
-Subject: [PATCH] fix: unary_function -> __unary_function
-
----
- src/cryptonote_basic/cryptonote_basic_impl.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/cryptonote_basic/cryptonote_basic_impl.h b/src/cryptonote_basic/cryptonote_basic_impl.h
-index b423573..a9aef7a 100644
---- a/src/cryptonote_basic/cryptonote_basic_impl.h
-+++ b/src/cryptonote_basic/cryptonote_basic_impl.h
-@@ -40,7 +40,11 @@ namespace cryptonote {
- /* */
- /************************************************************************/
- template<class t_array>
-+#ifdef __APPLE__
-+ struct array_hasher: std::__unary_function<t_array&, std::size_t>
-+#else
- struct array_hasher: std::unary_function<t_array&, std::size_t>
-+#endif
- {
- std::size_t operator()(const t_array& val) const
- {
---
-2.49.0
-
diff --git a/patches/wownero/0022-fix-remove-flaky-test.patch b/patches/wownero/0022-fix-remove-flaky-test.patch
new file mode 100644
index 0000000..4c70ca3
--- /dev/null
+++ b/patches/wownero/0022-fix-remove-flaky-test.patch
@@ -0,0 +1,27 @@
+From 3855cc39761321650484f5fba70c48dd8eb18444 Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Thu, 5 Mar 2026 18:12:53 +0100
+Subject: [PATCH] fix: remove flaky test
+
+---
+ CMakeLists.txt | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2525cf8ba..42189c0fe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -235,9 +235,7 @@ add_library(l3 OBJECT incorrect_source.cpp)
+ "-DCMAKE_MODULE_LINKER_FLAGS=${CMAKE_MODULE_LINKER_FLAGS}"
+ "-DEXPECT_SUCCESS=${EXPECT}"
+ )
+- if (NOT ${SUCCESS} STREQUAL ${EXPECT})
+- message(FATAL_ERROR "Undefined symbols test failure: expect(${EXPECT}), success(${SUCCESS})")
+- endif()
++
+ file(REMOVE_RECURSE "${TEST_PROJECT}")
+ endforeach()
+ endfunction()
+--
+2.51.0
+
diff --git a/patches/wownero/0025-depends-remove-icu4c-monero-project-monero-8880.patch b/patches/wownero/0025-depends-remove-icu4c-monero-project-monero-8880.patch
new file mode 100644
index 0000000..aaf2e74
--- /dev/null
+++ b/patches/wownero/0025-depends-remove-icu4c-monero-project-monero-8880.patch
@@ -0,0 +1,25 @@
+From e437fea14ce67d7d0073ad484a66cfc92daa3eb5 Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Tue, 3 Mar 2026 13:55:59 +0100
+Subject: [PATCH] depends: remove icu4c monero-project/monero#8880
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a4c163503..b744261ea 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1115,7 +1115,7 @@ if(MINGW)
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
+ set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
+ if(DEPENDS)
+- set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv)
++ set(ICU_LIBRARIES iconv)
+ else()
+ # This is an extremely ugly hack to get around Boost not being built with static ICU.
+ # We reported the issue, we are waiting for upstream to fix this issue: https://github.com/boostorg/boost/issues/1079#issue-3384962885
+--
+2.51.0
+
diff --git a/patches/zano/0001-fix-build-issues.patch b/patches/zano/0001-fix-build-issues.patch
index 4ddcff0..e3ba0a0 100644
--- a/patches/zano/0001-fix-build-issues.patch
+++ b/patches/zano/0001-fix-build-issues.patch
@@ -1,4 +1,4 @@
-From 38da066606cb959497d9b8221bb29ee885bc7c31 Mon Sep 17 00:00:00 2001
+From c6204cc6d141172c099e3c01d99825f7f85a9fa8 Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Sat, 2 Nov 2024 20:50:26 +0000
Subject: [PATCH 1/7] fix build issues
@@ -35,5 +35,5 @@ index 5949e9f0..e7b677bd 100644
add_definitions(-DNDEBUG=1 -DMDBX_DEBUG=0 -DLIBMDBX_EXPORTS=1 -D_GNU_SOURCE=1)
--
-2.48.1
+2.51.0
diff --git a/patches/zano/0002-fix-mingw-build-issues.patch b/patches/zano/0002-fix-mingw-build-issues.patch
index cbaa537..b4d346f 100644
--- a/patches/zano/0002-fix-mingw-build-issues.patch
+++ b/patches/zano/0002-fix-mingw-build-issues.patch
@@ -1,37 +1,15 @@
-From 9e55bde82de70a12d68249233d2d571bf388a409 Mon Sep 17 00:00:00 2001
+From 4e9ac1ac20c243d8cdccc2a4941f16e09951454b Mon Sep 17 00:00:00 2001
From: cyan <cyjan@mrcyjanek.net>
Date: Sun, 3 Nov 2024 08:59:22 +0000
Subject: [PATCH 2/7] fix mingw build issues
---
- contrib/epee/include/misc_os_dependent.h | 4 ++--
- src/common/callstack_helper.cpp | 2 +-
- src/crypto/ecrypt-config.h | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
+ src/common/callstack_helper.cpp | 2 +-
+ src/crypto/ecrypt-config.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
-diff --git a/contrib/epee/include/misc_os_dependent.h b/contrib/epee/include/misc_os_dependent.h
-index c06e5d94..a2a979b9 100644
---- a/contrib/epee/include/misc_os_dependent.h
-+++ b/contrib/epee/include/misc_os_dependent.h
-@@ -110,14 +110,14 @@ namespace misc_utils
- }
-
-
--#if defined(__GNUC__) && !defined(__ANDROID__)
-+#if defined(__GNUC__) && !defined(__ANDROID__) && !defined(_WIN32)
- #include <execinfo.h>
- #include <boost/core/demangle.hpp>
- #endif
- inline std::string print_trace_default()
- {
- std::stringstream ss;
--#if defined(__GNUC__) && !defined(__ANDROID__)
-+#if defined(__GNUC__) && !defined(__ANDROID__) && !defined(_WIN32)
- ss << std::endl << "STACK" << std::endl;
- const size_t max_depth = 100;
- size_t stack_depth;
diff --git a/src/common/callstack_helper.cpp b/src/common/callstack_helper.cpp
-index b84fe5a8..c9eae839 100644
+index 939dc929..b6614949 100644
--- a/src/common/callstack_helper.cpp
+++ b/src/common/callstack_helper.cpp
@@ -9,7 +9,7 @@
@@ -57,5 +35,5 @@ index 9176de17..8b488135 100644
#define I64T __int64
#define U64C(v) (v##ui64)
--
-2.48.1
+2.51.0
diff --git a/patches/zano/0003-fix-ios-builds.patch b/patches/zano/0003-fix-ios-builds.patch
index c8f6bb6..3850d32 100644
--- a/patches/zano/0003-fix-ios-builds.patch
+++ b/patches/zano/0003-fix-ios-builds.patch
@@ -1,17 +1,17 @@
-From 2eccbb7b4dfef6aef3de75ed843353343b2cc0c8 Mon Sep 17 00:00:00 2001
+From df278aa4633d1e20d55a905c7ab58cf786304058 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Tue, 5 Nov 2024 16:52:23 +0100
Subject: [PATCH 3/7] fix ios builds
---
- CMakeLists.txt | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c480300f..7087d796 100644
+index 4aa125a5..aa2687fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -136,6 +136,8 @@ else()
+@@ -137,6 +137,8 @@ else()
set(ARCH default CACHE STRING "CPU to build for: -march value or default")
if("${ARCH}" STREQUAL "default")
set(ARCH_FLAG "")
@@ -20,7 +20,7 @@ index c480300f..7087d796 100644
else()
set(ARCH_FLAG "-march=${ARCH}")
endif()
-@@ -207,7 +209,7 @@ else()
+@@ -209,7 +211,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${RELEASE_FLAGS}")
if(STATIC)
if(APPLE)
@@ -30,5 +30,5 @@ index c480300f..7087d796 100644
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif()
--
-2.48.1
+2.51.0
diff --git a/patches/zano/0004-use-boost-filesystem-instead-of-stdfs.patch b/patches/zano/0004-use-boost-filesystem-instead-of-stdfs.patch
index 6852323..38862a2 100644
--- a/patches/zano/0004-use-boost-filesystem-instead-of-stdfs.patch
+++ b/patches/zano/0004-use-boost-filesystem-instead-of-stdfs.patch
@@ -1,18 +1,18 @@
-From 1ba500f05c1b534c9fbec8d1dc534546febb5b43 Mon Sep 17 00:00:00 2001
+From 5a5c7a4d565ed9679bf960a08e894fcaff9ce73b Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Wed, 4 Dec 2024 17:21:44 -0600
Subject: [PATCH 4/7] use boost::filesystem instead of stdfs
---
- CMakeLists.txt | 23 ++++-------------------
+ CMakeLists.txt | 19 ++-----------------
contrib/epee/include/file_io_utils.h | 6 +++---
- 2 files changed, 7 insertions(+), 22 deletions(-)
+ 2 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7087d796..6ded9711 100644
+index aa2687fd..7694b8eb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -232,24 +232,9 @@ if(STATIC)
+@@ -234,22 +234,7 @@ if(STATIC)
endif()
message("CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
@@ -34,21 +34,9 @@ index 7087d796..6ded9711 100644
-elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
+if(CMAKE_SYSTEM_NAME STREQUAL "Android")
if(CAKEWALLET)
-- find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale)
-+ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options)
+ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem locale thread timer date_time chrono regex serialization atomic program_options)
else()
- set(Boost_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}/${CMAKE_ANDROID_ARCH_ABI}/")
- set(Boost_LIBRARIES "${Boost_LIBRARY_DIRS}libboost_system.a;${Boost_LIBRARY_DIRS}libboost_filesystem.a;${Boost_LIBRARY_DIRS}libboost_thread.a;${Boost_LIBRARY_DIRS}libboost_timer.a;${Boost_LIBRARY_DIRS}libboost_date_time.a;${Boost_LIBRARY_DIRS}libboost_chrono.a;${Boost_LIBRARY_DIRS}libboost_regex.a;${Boost_LIBRARY_DIRS}libboost_serialization.a;${Boost_LIBRARY_DIRS}libboost_atomic.a;${Boost_LIBRARY_DIRS}libboost_program_options.a")
-@@ -257,7 +242,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC")
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC")
- elseif(APPLE)
-- find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale)
-+ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options)
- else()
- find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale log)
- endif()
-@@ -302,7 +287,7 @@ else()
+@@ -306,7 +291,7 @@ else()
find_package(Git QUIET)
if(Git_FOUND OR GIT_FOUND)
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
@@ -76,5 +64,5 @@ index bb21ae99..ced01092 100644
continue;
}
--
-2.48.1
+2.51.0
diff --git a/patches/zano/0005-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch b/patches/zano/0005-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch
index 0c5af27..4586a6f 100644
--- a/patches/zano/0005-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch
+++ b/patches/zano/0005-downgrade-cmake-version-so-LIB_DEPENDS-shows-up.patch
@@ -1,4 +1,4 @@
-From 00bfd0703db144cb51f667c183ff5d066dec2f9c Mon Sep 17 00:00:00 2001
+From 9979233174da7a64add9710adcf95ec7257a3feb Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 5 Dec 2024 09:36:34 -0600
Subject: [PATCH 5/7] downgrade cmake version so LIB_DEPENDS shows up
@@ -8,7 +8,7 @@ Subject: [PATCH 5/7] downgrade cmake version so LIB_DEPENDS shows up
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6ded9711..47d24a81 100644
+index 7694b8eb..793cc94c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
@@ -18,5 +18,5 @@ index 6ded9711..47d24a81 100644
PROJECT(Zano)
--
-2.48.1
+2.51.0
diff --git a/patches/zano/0006-increase-max-password.patch b/patches/zano/0006-increase-max-password.patch
index 83415b0..84cdcc0 100644
--- a/patches/zano/0006-increase-max-password.patch
+++ b/patches/zano/0006-increase-max-password.patch
@@ -1,4 +1,4 @@
-From cefa69627a46ec6fd54e3c44e82f1d777e3c98c0 Mon Sep 17 00:00:00 2001
+From e41a28439c60a2695b7ec0dc3f9aa811757defe6 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Thu, 12 Dec 2024 09:00:57 -0500
Subject: [PATCH 6/7] increase max password
@@ -8,10 +8,10 @@ Subject: [PATCH 6/7] increase max password
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp
-index 56316dd5..d92e5793 100644
+index 6c7d0a39..4fa2d00e 100644
--- a/src/currency_core/currency_format_utils.cpp
+++ b/src/currency_core/currency_format_utils.cpp
-@@ -3653,7 +3653,7 @@ namespace currency
+@@ -3675,7 +3675,7 @@ namespace currency
return true;
}
//------------------------------------------------------------------
@@ -21,5 +21,5 @@ index 56316dd5..d92e5793 100644
{
// OLD: static const std::string allowed_password_symbols = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!?@#$%^&*_+|{}[]()<>:;\"'-=\\/.,";
--
-2.48.1
+2.51.0
diff --git a/patches/zano/0007-relax-mutex-in-invoke-call.patch b/patches/zano/0007-relax-mutex-in-invoke-call.patch
index cb38d5f..e6ed17f 100644
--- a/patches/zano/0007-relax-mutex-in-invoke-call.patch
+++ b/patches/zano/0007-relax-mutex-in-invoke-call.patch
@@ -1,28 +1,25 @@
-From af034097788cb58518b794c1312f8a8df297dda7 Mon Sep 17 00:00:00 2001
+From c8be0ef787060efcba6067729ae08b422bdde235 Mon Sep 17 00:00:00 2001
From: Czarek Nakamoto <cyjan@mrcyjanek.net>
Date: Tue, 18 Feb 2025 14:27:36 +0100
Subject: [PATCH 7/7] relax mutex in invoke call
---
- src/common/error_codes.h | 1 +
+ src/gui/qt-daemon/layout | 2 +-
src/wallet/wallets_manager.cpp | 37 ++++++++++++++++++++++++++++++----
- 2 files changed, 34 insertions(+), 4 deletions(-)
+ 2 files changed, 34 insertions(+), 5 deletions(-)
-diff --git a/src/common/error_codes.h b/src/common/error_codes.h
-index 1e3dc2ef..4723afe4 100644
---- a/src/common/error_codes.h
-+++ b/src/common/error_codes.h
-@@ -45,3 +45,4 @@
- #define API_RETURN_CODE_HTLC_ORIGIN_HASH_MISSMATCHED "HTLC_ORIGIN_HASH_MISSMATCHED"
- #define API_RETURN_CODE_WRAP "WRAP"
- #define API_RETURN_CODE_MISSING_ZC_INPUTS "MISSING_ZC_INPUTS"
-+#define API_RETURN_CODE_BAD_JSON "BAD_JSON"
-\ No newline at end of file
+diff --git a/src/gui/qt-daemon/layout b/src/gui/qt-daemon/layout
+index 7f7128e8..8ec45f89 160000
+--- a/src/gui/qt-daemon/layout
++++ b/src/gui/qt-daemon/layout
+@@ -1 +1 @@
+-Subproject commit 7f7128e8c3d5c04d801a327a7228abcc9aba85cd
++Subproject commit 8ec45f89802358be95c7fbb0eec5abe4382bd28e
diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp
-index 5c8ef5c0..4b968a18 100644
+index 0152e3d4..490ae0e8 100644
--- a/src/wallet/wallets_manager.cpp
+++ b/src/wallet/wallets_manager.cpp
-@@ -1678,10 +1678,27 @@ std::string wallets_manager::get_wallet_status(uint64_t wallet_id)
+@@ -1698,10 +1698,27 @@ std::string wallets_manager::get_wallet_status(uint64_t wallet_id)
return epee::serialization::store_t_to_json(wsi);
}
@@ -50,7 +47,7 @@ index 5c8ef5c0..4b968a18 100644
CRITICAL_REGION_LOCAL1(wo.long_refresh_in_progress_lock);
if (wo.long_refresh_in_progress)
{
-@@ -1691,16 +1708,28 @@ std::string wallets_manager::invoke(uint64_t wallet_id, std::string params)
+@@ -1711,16 +1728,28 @@ std::string wallets_manager::invoke(uint64_t wallet_id, std::string params)
return epee::serialization::store_t_to_json(error_response);
}
@@ -82,7 +79,17 @@ index 5c8ef5c0..4b968a18 100644
+
return response_info.m_body;
}
-
+
+diff --git a/src/common/error_codes.h b/src/common/error_codes.h
+index b538fa87..7471b2d1 100644
+--- a/src/common/error_codes.h
++++ b/src/common/error_codes.h
+@@ -48,3 +48,4 @@
+ #define API_RETURN_CODE_MISSING_ZC_INPUTS "MISSING_ZC_INPUTS"
+ #define API_RETURN_CODE_ARG_OUT_OF_LIMITS "ARG_OUT_OF_LIMITS"
+ #define API_RETURN_CODE_TX_HAS_TOO_MANY_OUTPUTS "TX_HAS_TOO_MANY_OUTPUTS"
++#define API_RETURN_CODE_BAD_JSON "BAD_JSON"
+
--
-2.48.1
+2.51.0
diff --git a/patches/zano/0008-fix-don-t-depend-on-locale-on-non-windows.patch b/patches/zano/0008-fix-don-t-depend-on-locale-on-non-windows.patch
new file mode 100644
index 0000000..adc3734
--- /dev/null
+++ b/patches/zano/0008-fix-don-t-depend-on-locale-on-non-windows.patch
@@ -0,0 +1,39 @@
+From 5cbc5a0bd2e05bb5ef819a536fe49dc47383487b Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Fri, 6 Mar 2026 22:03:04 +0100
+Subject: [PATCH] fix: don't depend on locale on non-windows
+
+---
+ CMakeLists.txt | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 793cc94c..5186bc87 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -236,7 +236,7 @@ endif()
+ message("CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ if(CAKEWALLET)
+- find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem locale thread timer date_time chrono regex serialization atomic program_options)
++ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS filesystem thread timer date_time chrono regex serialization atomic program_options)
+ else()
+ set(Boost_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}/${CMAKE_ANDROID_ARCH_ABI}/")
+ set(Boost_LIBRARIES "${Boost_LIBRARY_DIRS}libboost_system.a;${Boost_LIBRARY_DIRS}libboost_filesystem.a;${Boost_LIBRARY_DIRS}libboost_thread.a;${Boost_LIBRARY_DIRS}libboost_timer.a;${Boost_LIBRARY_DIRS}libboost_date_time.a;${Boost_LIBRARY_DIRS}libboost_chrono.a;${Boost_LIBRARY_DIRS}libboost_regex.a;${Boost_LIBRARY_DIRS}libboost_serialization.a;${Boost_LIBRARY_DIRS}libboost_atomic.a;${Boost_LIBRARY_DIRS}libboost_program_options.a")
+@@ -244,9 +244,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC")
+ elseif(APPLE)
+- find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem locale thread timer date_time chrono regex serialization atomic program_options)
++ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS filesystem thread timer date_time chrono regex serialization atomic program_options)
++elseif(MINGW)
++ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS filesystem thread timer date_time chrono regex serialization atomic program_options log locale)
+ else()
+- find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS system filesystem locale thread timer date_time chrono regex serialization atomic program_options log)
++ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS filesystem thread timer date_time chrono regex serialization atomic program_options log)
+ endif()
+
+
+--
+2.51.0
+
diff --git a/patches/zano/0009-fix-threads-on-iOS.patch b/patches/zano/0009-fix-threads-on-iOS.patch
new file mode 100644
index 0000000..ed393aa
--- /dev/null
+++ b/patches/zano/0009-fix-threads-on-iOS.patch
@@ -0,0 +1,29 @@
+From 40280e2316d37cb19ec3e9dd6e3a466811dd75c9 Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Sat, 7 Mar 2026 00:06:53 +0100
+Subject: [PATCH] fix: threads on iOS
+
+---
+ CMakeLists.txt | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5186bc87..ad4815ea 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -244,6 +244,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC")
+ elseif(APPLE)
++ set(THREADS_PREFER_PTHREAD_FLAG ON)
++
++ set(CMAKE_THREAD_LIBS_INIT "-lpthread")
++ set(CMAKE_HAVE_THREADS_LIBRARY 1)
++ set(CMAKE_USE_PTHREADS_INIT 1)
++ set(Threads_FOUND TRUE)
+ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS filesystem thread timer date_time chrono regex serialization atomic program_options)
+ elseif(MINGW)
+ find_package(Boost ${ZANO_BOOST_MIN_VER} REQUIRED COMPONENTS filesystem thread timer date_time chrono regex serialization atomic program_options log locale)
+--
+2.51.0
+
diff --git a/patches/zano/0010-workaround-no-op-MARK_AS_POD_C11.patch b/patches/zano/0010-workaround-no-op-MARK_AS_POD_C11.patch
new file mode 100644
index 0000000..bc40f21
--- /dev/null
+++ b/patches/zano/0010-workaround-no-op-MARK_AS_POD_C11.patch
@@ -0,0 +1,34 @@
+From 4efc6b9bc08ee8b2d51524a54b957df88003136e Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Sat, 7 Mar 2026 00:20:47 +0100
+Subject: [PATCH] workaround: no-op MARK_AS_POD_C11
+
+---
+ contrib/epee/include/misc_language.h | 11 +----------
+ 1 file changed, 1 insertion(+), 10 deletions(-)
+
+diff --git a/contrib/epee/include/misc_language.h b/contrib/epee/include/misc_language.h
+index 04cb9750..7d512c3d 100644
+--- a/contrib/epee/include/misc_language.h
++++ b/contrib/epee/include/misc_language.h
+@@ -39,16 +39,7 @@
+ #include "auto_val_init.h"
+
+
+-#define MARK_AS_POD_C11(type) \
+-namespace std \
+-{ \
+- template<> \
+-struct is_pod< type > \
+- { \
+- static const bool value = true; \
+- }; \
+-}
+-
++#define MARK_AS_POD_C11(type)
+
+ namespace epee
+ {
+--
+2.51.0
+
diff --git a/renovate.json b/renovate.json
deleted file mode 100644
index a749506..0000000
--- a/renovate.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "git-submodules": {
- "enabled": true
- }
-}
diff --git a/wownero b/wownero
-Subproject 3e302be710f4e6b4f58642989c8e47711362fa5
+Subproject cfd2a696245be112a01936d1f2f41b6eb755837
diff --git a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h
index 99f45d7..59f205c 100644
--- a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h
+++ b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h
@@ -1,6 +1,6 @@
#ifndef MONEROC_CHECKSUMS
#define MONEROC_CHECKSUMS
const char * WOWNERO_wallet2_api_c_h_sha256 = "f99009d1ca1d1c783cc9aa0fb63f680d48753b88124fb5de2079c57b7e34c827";
-const char * WOWNERO_wallet2_api_c_cpp_sha256 = "70b39a0bef660cb9ba0397117eb1590e18461ace89ab18141690658a2a537d5d-3e302be710f4e6b4f58642989c8e47711362fa56";
+const char * WOWNERO_wallet2_api_c_cpp_sha256 = "70b39a0bef660cb9ba0397117eb1590e18461ace89ab18141690658a2a537d5d-cfd2a696245be112a01936d1f2f41b6eb7558376";
const char * WOWNERO_wallet2_api_c_exp_sha256 = "5f53ea8bbe66a5e5aa6cbc4ca00695900e08589cfd32062e88965a24252d05ba";
#endif
diff --git a/zano b/zano
-Subproject 83eefd205e3df84da0bf095257459fe77833031
+Subproject b372a99c7ada82caac53b677d9aaa7c0902e3b0
diff --git a/zano_libwallet2_api_c/src/main/cpp/zano_checksum.h b/zano_libwallet2_api_c/src/main/cpp/zano_checksum.h
index 9cca9ac..90e9f30 100644
--- a/zano_libwallet2_api_c/src/main/cpp/zano_checksum.h
+++ b/zano_libwallet2_api_c/src/main/cpp/zano_checksum.h
@@ -1,6 +1,6 @@
#ifndef MONEROC_CHECKSUMS
#define MONEROC_CHECKSUMS
const char * ZANO_wallet2_api_c_h_sha256 = "8acaa95513b85a984c08e05cc3f2ac7530bb8f32946eeeb45357bd846aef33dd";
-const char * ZANO_wallet2_api_c_cpp_sha256 = "4efacd3812d53dd268b6869cc0a9560e7320574d96e09136cf067f796edfeba6-83eefd205e3df84da0bf095257459fe778330316";
+const char * ZANO_wallet2_api_c_cpp_sha256 = "4efacd3812d53dd268b6869cc0a9560e7320574d96e09136cf067f796edfeba6-b372a99c7ada82caac53b677d9aaa7c0902e3b0b";
const char * ZANO_wallet2_api_c_exp_sha256 = "66f3ff655bbfd11ad28c318ab707090b5a93276f436b06f7b1c0f329dba3c9c2";
#endif