*.user
*.stash
build/*
-build*/
+guix-*
CMakeCache.txt
CMakeFiles
cmake_install.cmake
+++ /dev/null
-# Building Feather
-
-Release binaries (except macOS) are built using Docker. If you are looking to build Feather without Docker,
-see [HACKING.MD](https://github.com/feather-wallet/feather/blob/master/HACKING.md).
-
-## Docker
-
-Builds with Docker are done in 3 steps:
-
-1. Cloning this repository (+submodules)
-2. Creating a base image containing the build environment
-3. Building Feather using the base image
-
-### Linux x86-64 (reproducible)
-
-The instructions in this section are for 64-bit AMD/Intel processors. For ARM64 platforms see the next section.
-
-Binaries produced in this section are reproducible and their digests should match those of release binaries.
-
-#### 1. Clone
-
-Replace `master` with the desired version tag (e.g. `1.0.1`) to build the release binary.
-
-```bash
-git clone https://github.com/feather-wallet/feather.git
-cd feather
-git checkout master
-git submodule update --init --recursive
-```
-
-#### 2. Base image
-
-```bash
-docker build -t feather:linux -f Dockerfile.linux --build-arg THREADS=8 .
-```
-
-Building the base image takes a while. You only need to build the base image once per release.
-
-#### 3. Build
-
-##### Standalone static binary
-
-If you're re-running a build make sure to `rm -rf build/` first.
-
-```bash
-docker run --rm -it -v $PWD:/feather -w /feather feather:linux sh -c 'WITH_SCANNER=Off make release-static -j8'
-```
-
-The resulting binary can be found in `./build/bin/`.
-
-##### AppImage
-
-```bash
-rm -rf build
-docker run --rm -it -v $PWD:/feather -w /feather feather:linux sh -c 'make release-static -j8'
-docker run --rm -it -v $PWD:/feather -w /feather/build feather:linux ../contrib/build-appimage.sh
-```
-
-The resulting AppImage will be located in `./build`.
-
-### Linux ARM64 (reproducible)
-
-This section describes how to build Feather for ARM64 based platforms (including Raspberry Pi 3 and later, running 64-bit Rasbian).
-
-Binaries produced in this section are not yet reproducible.
-
-#### 1. Clone
-
-Replace `master` with the desired version tag (e.g. `1.0.1`) to build the release binary.
-
-```bash
-git clone https://github.com/feather-wallet/feather.git
-cd feather
-git checkout master
-git submodule update --init --recursive
-```
-
-#### 2. Base image
-
-```bash
-docker build --tag feather:linux-arm64 --platform linux/arm64 -f Dockerfile.linux --build-arg THREADS=8 .
-```
-
-Building the base image takes a while (especially when emulated on x86-64). You only need to build the base image once per release.
-
-#### 3. Build
-
-##### Standalone static binary
-
-```bash
-docker run --platform linux/arm64/v8 --rm -it -v $PWD:/feather -w /feather feather:linux-arm64 sh -c 'WITH_SCANNER=Off make release-static-linux-arm64 -j8'
-```
-
-Note: If you intend to run Feather on a Raspberry Pi or any device without AES hardware acceleration, use the following command instead:
-
-```bash
-docker run --platform linux/arm64/v8 --rm -it -v $PWD:/feather -w /feather feather:linux-arm64 sh -c 'WITH_SCANNER=Off make release-static-linux-arm64-rpi -j8'
-```
-
-The resulting binary can be found in `./build/bin/`.
-
-##### AppImage
-
-##### ARMv8-a (with AES hardware acceleration)
-
-```bash
-rm -rf build
-docker run --rm -it -v $PWD:/feather --platform linux/arm64/v8 -w /feather feather:linux-arm64 sh -c 'make release-static-linux-arm64 -j8'
-docker run --rm -it -v $PWD:/feather --platform linux/arm64/v8 -w /feather/build feather:linux-arm64 ../contrib/build-appimage-arm64.sh
-```
-
-##### Raspberry Pi
-
-```bash
-rm -rf build
-docker run --rm -it -v $PWD:/feather --platform linux/arm64/v8 -w /feather feather:linux-arm64 sh -c 'make release-static-linux-arm64-rpi -j8'
-docker run --rm -it -v $PWD:/feather --platform linux/arm64/v8 -w /feather/build feather:linux-arm64 ../contrib/build-appimage-arm64.sh
-```
-
-The resulting AppImage will be located in `./build`.
-
-### Windows (reproducible)
-
-#### 1. Clone
-
-```bash
-git clone --branch master --recursive https://github.com/feather-wallet/feather.git
-cd feather
-```
-
-Replace `master` with the desired version tag (e.g. `1.0.1`) to build the release binary.
-
-#### 2. Base image
-
-
-```bash
-docker build -f Dockerfile.windows --tag feather:win --build-arg THREADS=4 .
-```
-
-Building the base image takes a while. You only need to build the base image once.
-
-#### 3. Build
-
-```bash
-docker run --rm -it -v $PWD:/feather -w /feather feather:win sh -c 'make release-static-windows root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j4'
-```
-
-If you're re-running a build make sure to `rm -rf build/` first.
-
-The resulting binary can be found in `./build/x86_64-w64-mingw32/release/bin/`.
-
-### macOS
-
-Docker builds for macOS are not currently supported. To build Feather on macOS follow the steps in [HACKING.md](HACKING.md).
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
-set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(VERSION_MAJOR "2")
set(VERSION_REVISION "2")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
+set ( CMAKE_CXX_FLAGS "-no-pie" )
+#target_compile_options(feather PRIVATE -no-pie)
+
option(STATIC "Link libraries statically, requires static Qt")
option(SELF_CONTAINED "Disable when building Feather for packages" OFF)
include(CheckCXXCompilerFlag)
include(CheckIncludeFile)
include(CheckSymbolExists)
+include(SelectLibraryConfigurations)
if(DEBUG)
set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
# libzip
-find_package(zlib CONFIG)
+set(ZLIB_USE_STATIC_LIBS "ON")
+find_package(ZLIB REQUIRED)
find_path(LIBZIP_INCLUDE_DIRS zip.h)
find_library(LIBZIP_LIBRARIES zip)
if(MINGW)
set(Boost_THREADAPI win32)
endif()
+
+set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.58 REQUIRED COMPONENTS
system
filesystem
regex
serialization
program_options
- locale)
+ locale
+ )
if(UNIX AND NOT APPLE)
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_SKIP_RPATH ON)
endif()
- find_package(X11 REQUIRED)
- message(STATUS "X11_FOUND = ${X11_FOUND}")
- message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
- message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}")
- include_directories(${X11_INCLUDE_DIR})
- link_directories(${X11_LIBRARIES})
+# find_package(X11 REQUIRED)
+# message(STATUS "X11_FOUND = ${X11_FOUND}")
+# message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
+# message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}")
+# include_directories(${X11_INCLUDE_DIR})
+# link_directories(${X11_LIBRARIES})
if(STATIC)
find_library(XCB_LIBRARY xcb)
message(STATUS "Found xcb library: ${XCB_LIBRARY}")
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 iconv)
- else()
- set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
- endif()
+# if(DEPENDS)
+# set(ICU_LIBRARIES iconv)
+# else()
+# set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
+# endif()
elseif(APPLE)
set(EXTRA_LIBRARIES "-framework AppKit")
elseif(OPENBSD)
add_cxx_flag_if_supported(-Wformat-security CXX_SECURITY_FLAGS)
# -fstack-protector
-if (NOT OPENBSD AND NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)))
+if (NOT OPENBSD)
add_c_flag_if_supported(-fstack-protector C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-fstack-protector CXX_SECURITY_FLAGS)
add_c_flag_if_supported(-fstack-protector-strong C_SECURITY_FLAGS)
add_linker_flag_if_supported(-Wl,-dead_strip LD_SECURITY_FLAGS)
add_linker_flag_if_supported(-Wl,-dead_strip_dylibs LD_SECURITY_FLAGS)
endif()
-if (NOT APPLE AND NOT (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "GNU"))
- # Windows binaries die on startup with PIE when compiled with GCC
- add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS)
-endif()
+#if (NOT APPLE AND NOT (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "GNU"))
+# # Windows binaries die on startup with PIE when compiled with GCC
+# add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS)
+#endif()
add_linker_flag_if_supported(-Wl,-z,relro LD_SECURITY_FLAGS)
add_linker_flag_if_supported(-Wl,-z,now LD_SECURITY_FLAGS)
add_linker_flag_if_supported(-Wl,-z,noexecstack noexecstack_SUPPORTED)
add_linker_flag_if_supported(-Wl,--high-entropy-va LD_SECURITY_FLAGS)
endif()
-if(STATIC)
- add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS)
- add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS)
- if(MINGW)
- add_linker_flag_if_supported(-static STATIC_FLAGS)
- endif()
-endif()
-
-# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
-# is fixed in the code (Issue #847), force compiler to be conservative.
-add_c_flag_if_supported(-fno-strict-aliasing C_SECURITY_FLAGS)
-add_cxx_flag_if_supported(-fno-strict-aliasing CXX_SECURITY_FLAGS)
-
add_c_flag_if_supported(-fPIC C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-fPIC CXX_SECURITY_FLAGS)
+++ /dev/null
-FROM ubuntu:bionic-20210723
-
-ARG THREADS=4
-
-ENV CFLAGS="-fPIC"
-ENV CPPFLAGS="-fPIC"
-ENV CXXFLAGS="-fPIC"
-ENV SOURCE_DATE_EPOCH=1397818193
-ENV DEBIAN_FRONTEND=noninteractive
-
-# Feather build flags
-ENV CHECK_UPDATES=ON
-ENV WITH_SCANNER=ON
-
-COPY --from=featherwallet/feather-deps:linux-1.0.0 /deps /deps
-COPY --from=featherwallet/feather-deps:linux-1.0.0 /var/cache/apt/archives /archives
-
-RUN apt-get update && \
- apt-get install -y gpg xz-utils ca-certificates wget && \
- rm -rf /var/lib/apt/lists/*
-
-COPY contrib/build-deps/verify-packages.sh .
-RUN bash verify-packages.sh && \
- cd /archives && \
- dpkg -i --force-depends *.deb && \
- rm -rf /deps /archives
-
-# OpenSSL: Required for CMake, Qt 5.15, libwallet, Tor
-ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
-RUN git clone -b OpenSSL_1_1_1p --depth 1 https://github.com/openssl/openssl.git && \
- cd openssl && \
- git reset --hard 8aaca20cf9996257d1ce2e6f4d3059b3698dde3d && \
- ./config no-shared no-dso --prefix=/usr/local/openssl && \
- make -j$THREADS && \
- make -j$THREADS install_sw && \
- rm -rf $(pwd)
-
-# CMake: Required to build libqrencode, monero-seed, libzip
-RUN git clone -b v3.22.2 --depth 1 https://github.com/Kitware/CMake && \
- cd CMake && \
- git reset --hard 8428e39ed9cddb3b7f1a6f7a58cb8617503183d2 && \
- ./bootstrap && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# freetype2: Required for Qt 5.15, fontconfig
-RUN git clone -b VER-2-10-2 --depth 1 https://git.savannah.gnu.org/git/freetype/freetype2.git && \
- cd freetype2 && \
- git reset --hard 132f19b779828b194b3fede187cee719785db4d8 && \
- ./autogen.sh && \
- ./configure --disable-shared --enable-static --with-zlib=no && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# expat: Required for fontconfig
-RUN git clone -b R_2_2_9 --depth 1 https://github.com/libexpat/libexpat && \
- cd libexpat/expat && \
- git reset --hard a7bc26b69768f7fb24f0c7976fae24b157b85b13 && \
- ./buildconf.sh && \
- ./configure --disable-shared --enable-static && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# fontconfig: Required for Qt 5.15
-RUN git clone -b 2.13.92 --depth 1 https://gitlab.freedesktop.org/fontconfig/fontconfig && \
- cd fontconfig && \
- git reset --hard b1df1101a643ae16cdfa1d83b939de2497b1bf27 && \
- ./autogen.sh --disable-shared --enable-static --sysconfdir=/etc --localstatedir=/var && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-COPY contrib/QTBUG-92199-fix.patch .
-
-ENV QT_VERSION=v5.15.5-lts-lgpl
-RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
- cd qt5 && \
- git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtimageformats.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtmultimedia.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtsvg.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qttools.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qttranslations.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtx11extras.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtwebsockets.git -b ${QT_VERSION} --depth 1 && \
- sed -ri s/\(Libs:.*\)/\\1\ -lexpat/ /usr/local/lib/pkgconfig/fontconfig.pc && \
- sed -ri s/\(Libs:.*\)/\\1\ -lz/ /usr/local/lib/pkgconfig/freetype2.pc && \
- sed -i s/\\/usr\\/X11R6\\/lib64/\\/usr\\/local\\/lib/ qtbase/mkspecs/linux-g++-64/qmake.conf && \
- cd qtbase && cat ../../QTBUG-92199-fix.patch && git apply ../../QTBUG-92199-fix.patch
-
-RUN cd qt5 && \
- if [ "$(uname -m)" = "aarch64" ]; then \
- export LIBDIR="/usr/lib/aarch64-linux-gnu"; \
- export QT_PLATFORM="linux-aarch64-gnu-g++"; \
- else \
- export LIBDIR="/usr/lib/x86_64-linux-gnu"; \
- export QT_PLATFORM="linux-g++-64"; \
- fi && \
- rm $LIBDIR/libX11.a && \
- rm $LIBDIR/libX11-xcb.a && \
- OPENSSL_LIBS="-lssl -lcrypto -lpthread -ldl" \
- ./configure --prefix=/usr -platform $QT_PLATFORM -opensource -confirm-license -release -static -no-avx \
- -no-opengl -qpa xcb --xcb -xcb-xlib -feature-xlib -openssl-linked -I /usr/local/openssl/include \
- -L /usr/local/openssl/lib -system-freetype -fontconfig -glib \
- -no-dbus -no-sql-sqlite -no-use-gold-linker -no-kms \
- -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
- -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
- -skip qtdoc -skip qtquickcontrols -skip qtquickcontrols2 -skip qtspeech -skip qtgamepad \
- -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -optimize-size \
- -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools \
- -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebview \
- -skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine \
- -skip qtdeclarative -gstreamer \
- -no-feature-cups -no-feature-ftp -no-feature-pdf -no-feature-animation \
- -nomake examples -nomake tests -nomake tools && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# boost: Required for libwallet
-RUN wget https://downloads.sourceforge.net/project/boost/boost/1.73.0/boost_1_73_0.tar.bz2 && \
- echo "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 boost_1_73_0.tar.bz2" | sha256sum -c && \
- tar -xvf boost_1_73_0.tar.bz2 && \
- rm boost_1_73_0.tar.bz2 && \
- cd boost_1_73_0 && \
- ./bootstrap.sh && \
- ./b2 --with-atomic --with-system --with-filesystem --with-thread --with-date_time --with-chrono --with-regex --with-serialization --with-program_options --with-locale variant=release link=static runtime-link=static cflags="${CFLAGS}" cxxflags="${CXXFLAGS}" install -a --prefix=/usr && \
- rm -rf $(pwd)
-
-# libusb: Required for libwallet
-RUN git clone -b v1.0.24 --depth 1 https://github.com/libusb/libusb && \
- cd libusb && \
- git reset --hard c6a35c56016ea2ab2f19115d2ea1e85e0edae155 && \
- ./autogen.sh --disable-shared --enable-static && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# hidapi: Required for libwallet
-RUN git clone -b hidapi-0.10.1 --depth 1 https://github.com/libusb/hidapi && \
- cd hidapi && \
- git reset --hard f6d0073fcddbdda24549199445e844971d3c9cef && \
- ./bootstrap && \
- ./configure --disable-shared --enable-static && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# libsodium: Required for libwallet
-RUN git clone -b 1.0.18-RELEASE --depth 1 https://github.com/jedisct1/libsodium.git && \
- cd libsodium && \
- git reset --hard 940ef42797baa0278df6b7fd9e67c7590f87744b && \
- ./autogen.sh && \
- ./configure --disable-shared --enable-static && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# protobuf: Required for libwallet
-RUN git clone -b v3.10.0 --depth 1 https://github.com/protocolbuffers/protobuf && \
- cd protobuf && \
- git reset --hard 6d4e7fd7966c989e38024a8ea693db83758944f1 && \
- ./autogen.sh && \
- ./configure --enable-static --disable-shared && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# unbound: Required for libwallet
-RUN git clone -b release-1.13.2 --depth 1 https://github.com/NLnetLabs/unbound.git && \
- cd unbound && \
- git reset --hard 8e538dcaa8df2d0fab8ff3dcf94ac1f972450b66 && \
- ./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=/usr/local/ --with-ssl=/usr/local/openssl --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --with-pic && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# squashfs-tools: Used to create Feather AppImage
-RUN git clone https://github.com/plougher/squashfs-tools.git && \
- cd squashfs-tools/squashfs-tools && \
- git reset --hard 38fa0720526222827da44b3b6c3f7eb63e8f5c2f && \
- make && \
- make install && \
- rm -rf $(pwd)
-
-# patchelf: Required by linuxdeployqt
-RUN git clone -b 0.12 --depth 1 https://github.com/NixOS/patchelf.git && \
- cd patchelf && \
- git reset --hard 8d3a16e97294e3c5521c61b4c8835499c9918264 && \
- ./bootstrap.sh && \
- ./configure && \
- make -j$THREADS && \
- make install && \
- rm -rf $(pwd)
-
-# linuxdeployqt: Used to create Feather AppImage
-# build from source because latest release does not allow glibc 2.27
-RUN git clone https://github.com/probonopd/linuxdeployqt.git && \
- cd linuxdeployqt && \
- git reset --hard b4697483c98120007019c3456914cfd1dba58384 && \
- qmake && \
- make -j$THREADS && \
- make install && \
- rm -rf $(pwd)
-
-# libevent: Required for Tor
-RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz && \
- echo "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb libevent-2.1.12-stable.tar.gz" | sha256sum -c && \
- tar -zxvf libevent-2.1.12-stable.tar.gz && \
- cd libevent-2.1.12-stable && \
- PKG_CONFIG_PATH=/usr/local/openssl/lib/pkgconfig/ \
- ./configure --prefix=/usr/local/libevent \
- --disable-shared \
- --enable-static \
- --with-pic && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# zlib: Required for Tor
-RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
- cd zlib && \
- git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
- ./configure --static --prefix=/usr/local/zlib && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# Tor: Optional for Feather (-DTOR_DIR)
-# Binary can be embedded in Feather
-# TOR_VERSION is used by CMAKE to determine embedded version
-ENV TOR_VERSION=0.4.7.8
-ENV TOR_DIR=/usr/local/tor/bin/
-RUN git clone -b tor-0.4.7.8 --depth 1 https://git.torproject.org/tor.git && \
- cd tor && \
- git reset --hard 7528524aee3ffe3c9b7c69fa18f659e1993f59a3 && \
- ./autogen.sh && \
- ./configure \
- --disable-asciidoc \
- --disable-manpage \
- --disable-html-manual \
- --disable-system-torrc \
- --disable-module-relay \
- --disable-lzma \
- --disable-zstd \
- --enable-static-tor \
- --with-libevent-dir=/usr/local/libevent \
- --with-openssl-dir=/usr/local/openssl \
- --with-zlib-dir=/usr/local/zlib \
- --disable-tool-name-check \
- --enable-fatal-warnings \
- --prefix=/usr/local/tor && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd) && \
- strip -s -D /usr/local/tor/bin/tor && \
- rm /usr/local/tor/bin/tor?*
-
-# libqrencode: Required for Feather
-# Used to display QR Codes
-RUN git clone -b v4.1.1 --depth 1 https://github.com/fukuchi/libqrencode.git && \
- cd libqrencode && \
- git reset --hard 715e29fd4cd71b6e452ae0f4e36d917b43122ce8 && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr . && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# libzip: Required for Feather
-# Used to unzip updates downloaded by the built-in updater
-RUN git clone -b v1.7.3 --depth 1 https://github.com/nih-at/libzip.git && \
- cd libzip && \
- git reset --hard 66e496489bdae81bfda8b0088172871d8fda0032 && \
- cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr . && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# libgpg-error: Required for libgcrypt
-RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git && \
- cd libgpg-error && \
- git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
- ./autogen.sh && \
- ./configure --disable-shared --enable-static --disable-doc --disable-tests && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# libgcrypt: Required for Feather
-# Used in src/openpgp to verify updates downloaded by the built-in updater
-RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git && \
- cd libgcrypt && \
- git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
- ./autogen.sh && \
- ./configure --disable-shared --enable-static --disable-doc && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# zbar: Optional for Feather (-DWITH_SCANNER)
-# Used to scan for QR Codes
-RUN git clone -b stable-0.21 --recursive https://github.com/mchehab/zbar.git && \
- cd zbar && \
- git reset --hard 505f1a87b32cb7bb0edbaf37e20ccdd46bbae2a3 && \
- autoreconf -vfi && \
- ./configure --enable-static --disable-shared --without-imagemagick --with-gtk=no --with-python=no --enable-doc=no && \
- make -j$THREADS && \
- make install && \
- rm -rf $(pwd)
-
-# polyseed: Required for Feather
-RUN git clone https://github.com/tevador/polyseed.git && \
- cd polyseed && \
- git reset --hard 4945d8239d6b26dc12723ca2aaa9f8110ceff5af && \
- mkdir build && \
- cd build && \
- cmake .. && \
- make && \
- make install && \
- rm /usr/local/lib/libpolyseed.so* && \
- rm -rf $(pwd)
\ No newline at end of file
+++ /dev/null
-FROM ubuntu:20.04
-
-ARG THREADS=1
-ARG QT_VERSION=v5.15.5-lts-lgpl
-ENV SOURCE_DATE_EPOCH=1397818193
-ENV DEBIAN_FRONTEND=noninteractive
-
-# Feather build flags
-ENV CHECK_UPDATES=ON
-ENV WITH_SCANNER=ON
-
-ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
-
-RUN apt update && \
- apt install -y \
- curl wget zip automake build-essential gcc-mingw-w64 g++-mingw-w64 gettext git libtool pkg-config \
- python \
-# zbar
- autopoint && \
- rm -rf /var/lib/apt/lists/*
-
-RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
- update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
-
-# The version from ubuntu repo is too old
-RUN git clone -b v3.22.2 --depth 1 https://github.com/Kitware/CMake && \
- cd CMake && \
- git reset --hard 8428e39ed9cddb3b7f1a6f7a58cb8617503183d2 && \
- ./bootstrap -- -DCMAKE_USE_OPENSSL=OFF && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-RUN git clone -b master https://github.com/monero-project/monero && \
- cd monero && \
- git reset --hard 9aab19f349433687c7aaf2c1cbc5751e5912c0aa && \
- cp -a contrib/depends / && \
- cd .. && \
- rm -rf monero
-
-RUN make -j$THREADS -C /depends HOST=x86_64-w64-mingw32 NO_QT=1
-
-COPY contrib/QTBUG-92199-fix.patch .
-RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
- cd qt5 && \
- git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtimageformats.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtmultimedia.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtsvg.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qttools.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qttranslations.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtxmlpatterns.git -b ${QT_VERSION} --depth 1 && \
- git clone git://code.qt.io/qt/qtwebsockets.git -b ${QT_VERSION} --depth 1 && \
- cd qtbase && cat ../../QTBUG-92199-fix.patch && git apply ../../QTBUG-92199-fix.patch && cd .. && \
- OPENSSL_LIBS="-lssl -lcrypto -lws2_32" \
- ./configure --prefix=/depends/x86_64-w64-mingw32 -xplatform win32-g++ \
- -device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \
- -I $(pwd)/qtbase/src/3rdparty/angle/include \
- -opensource -confirm-license -release -static -static-runtime -no-opengl \
- -no-avx -openssl-linked -I /depends/x86_64-w64-mingw32/include -L /depends/x86_64-w64-mingw32/lib \
- -qt-freetype -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
- -skip gamepad -skip location -skip qt3d -skip qtactiveqt -skip qtandroidextras \
- -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc \
- -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing \
- -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport \
- -skip qtspeech -skip qttools -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel \
- -skip qtwebengine -skip qtwebview -skip qtwinextras -skip qtx11extras \
- -skip qtdeclarative -skip qtquickcontrols -skip qtquickcontrols2 \
- -skip serialbus -skip webengine \
- -nomake examples -nomake tests -nomake tools && \
- make -j$THREADS && \
- make -j$THREADS install && \
- cd qttools/src/linguist/lrelease && \
- ../../../../qtbase/bin/qmake && \
- make -j$THREADS && \
- make -j$THREADS install && \
- cd ../../../.. && \
- rm -rf $(pwd)
-
-RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git && \
- cd libgpg-error && \
- git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
- ./autogen.sh && \
- ./configure --disable-shared --enable-static --disable-doc --disable-tests \
- --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
- make -j$THREADS && \
- make -j$THREADS install && \
- cd .. && \
- rm -rf libgpg-error
-
-RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git && \
- cd libgcrypt && \
- git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
- ./autogen.sh && \
- ./configure --disable-shared --enable-static --disable-doc \
- --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 \
- --with-gpg-error-prefix=/depends/x86_64-w64-mingw32 && \
- make -j$THREADS && \
- make -j$THREADS install && \
- cd .. && \
- rm -rf libgcrypt
-
-# zlib -> libpng
-RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
- cd zlib && \
- git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
- CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar ./configure --static --prefix=/usr/x86_64-w64-mingw32 && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# libpng -> libqrencode
-RUN git clone -b libpng16 --depth 1 https://github.com/glennrp/libpng.git && \
- cd libpng && \
- git reset --hard a37d4836519517bdce6cb9d956092321eca3e73b && \
- CPPFLAGS="-I/depends/x86_64-w64-mingw32/include" LDFLAGS="-L/depends/x86_64-w64-mingw32/lib" \
- ./configure --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-RUN git clone -b v4.0.2 --depth 1 https://github.com/fukuchi/libqrencode.git && \
- cd libqrencode && \
- git reset --hard 59ee597f913fcfda7a010a6e106fbee2595f68e4 && \
- ./autogen.sh && \
- CPPFLAGS="-I/depends/x86_64-w64-mingw32/include" LDFLAGS="-L/depends/x86_64-w64-mingw32/lib" \
- ./configure --disable-shared --enable-static --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-RUN wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz && \
- echo "e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 libiconv-1.16.tar.gz" | sha256sum -c && \
- tar -xzf libiconv-1.16.tar.gz && \
- rm libiconv-1.16.tar.gz && \
- cd libiconv-1.16 && \
- ./configure --enable-static --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-# TOR_VERSION is used by CMAKE to determine embedded version
-ENV TOR_VERSION=0.4.7.8
-ENV TOR_DIR=/tor/Tor/
-RUN wget https://dist.torproject.org/torbrowser/11.0.15/tor-win64-0.4.7.8.zip && \
- echo "14115567eb9674c79481509ac97d4a7b76c80a36966dd9864989a96670440757 tor-win64-0.4.7.8.zip" | sha256sum -c && \
- unzip tor-win64-0.4.7.8.zip -d tor && \
- rm tor-win64-0.4.7.8.zip
-
-RUN git clone https://github.com/nih-at/libzip.git && \
- cd libzip && \
- git reset --hard 66e496489bdae81bfda8b0088172871d8fda0032 && \
- cmake -DCMAKE_INSTALL_PREFIX=/depends/x86_64-w64-mingw32 \
- -DCMAKE_TOOLCHAIN_FILE=/depends/x86_64-w64-mingw32/share/toolchain.cmake \
- -DBUILD_SHARED_LIBS=OFF \
- -DCMAKE_PREFIX_PATH=/usr/x86_64-w64-mingw32 && \
- make -j$THREADS && \
- make -j$THREADS install && \
- rm -rf $(pwd)
-
-RUN git clone -b 0.23.92 --depth 1 --recursive https://github.com/mchehab/zbar.git && \
- cd zbar && \
- git reset --hard aac86d5f08d64ab4c3da78188eb622fa3cb07182 && \
- autoreconf -vfi && \
- ./configure --enable-static --disable-shared --without-imagemagick --disable-video --without-xv --with-gtk=no --with-python=no --enable-doc=no --host=x86_64-w64-mingw32 && \
- make -j$THREADS && \
- make install && \
- rm -rf $(pwd)
-
-COPY contrib/patches/polyseed/force-static-mingw.patch .
-COPY contrib/patches/polyseed/no_shared.patch .
-
-# polyseed: Required for Feather
-RUN git clone https://github.com/tevador/polyseed.git && \
- cd polyseed && \
- git reset --hard 4945d8239d6b26dc12723ca2aaa9f8110ceff5af && \
- git apply ../force-static-mingw.patch && \
- git apply ../no_shared.patch && \
- mkdir build && \
- cd build && \
- cmake -DCMAKE_INSTALL_PREFIX=/depends/x86_64-w64-mingw32 \
- -DCMAKE_TOOLCHAIN_FILE=/depends/x86_64-w64-mingw32/share/toolchain.cmake \
- -DBUILD_SHARED_LIBS=OFF \
- -DCMAKE_PREFIX_PATH=/usr/x86_64-w64-mingw32 .. && \
- make && \
- make install && \
- rm -rf $(pwd)
-
-RUN git config --global --add safe.directory /feather/monero
\ No newline at end of file
-DWITH_SCANNER=$(or ${WITH_SCANNER}, Off) \
-DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH}, Off)
+guix:
+ mkdir -p build/$(target)/release && \
+ cd build/$(target)/release && \
+ cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
+ -DCMAKE_PREFIX_PATH=/gnu/store \
+ -DCMAKE_PREFIX_PATH=$(CURDIR)/contrib/depends/$(target) \
+ -DCMAKE_PREFIX_PATH=$(CURDIR)/contrib/depends/$(target)/native/bin \
+ -DCMAKE_TOOLCHAIN_FILE=/feather/contrib/depends/$(target)/share/toolchain.cmake ../../.. \
+ $(CMAKEFLAGS) && \
+ $(MAKE)
+
release:
mkdir -p build/release && \
cd build/release && \
`47ntfT2Z5384zku39pTM6hGcnLnvpRYW2Azm87GiAAH2bcTidtq278TL6HmwyL8yjMeERqGEBs3cqC8vvHPJd1cWQrGC65f`
-## Building from source
+## Deterministic builds
-See [BUILDING.md](https://github.com/feather-wallet/feather/blob/master/BUILDING.md) for information on how to build from source.
+See [contrib/guix/README.md](https://github.com/feather-wallet/feather/blob/master/contrib/guix/README.md) for more information.
-## Developers
+## Development
If you are looking to set up a development environment for Feather, see [HACKING.md](https://github.com/feather-wallet/feather/blob/master/HACKING.md).
if(APPLE AND NOT IOS)
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
+ MESSAGE(INFO "MACDEPLOY ${MACDEPLOYQT_EXECUTABLE}")
add_custom_command(TARGET deploy
POST_BUILD
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE_DIR:feather>/../.." -always-overwrite
endif()
endif()
-if(NOT ZBAR_LIBRARIES AND ANDROID)
- find_library(ZBARJNI_LIBRARY NAMES zbarjni)
- find_library(ICONV_LIBRARY NAMES iconv)
- if(ZBARJNI_LIBRARY AND ICONV_LIBRARY)
- set(ZBAR_LIBRARIES ${ZBARJNI_LIBRARY} ${ICONV_LIBRARY})
- endif()
-endif()
-
if(NOT ZBAR_INCLUDE_DIR)
find_path(ZBAR_H_PATH zbar.h)
if(ZBAR_H_PATH)
find_library(ZLIB_LIBRARY_DEBUG NAMES ${ZLIB_NAMES_DEBUG} NAMES_PER_DIR ${${search}} PATH_SUFFIXES lib)
endforeach()
- include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ include(SelectLibraryConfigurations)
select_library_configurations(ZLIB)
endif()
set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
endif()
-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
VERSION_VAR ZLIB_VERSION_STRING)
IMPORTED_LOCATION "${ZLIB_LIBRARY}")
endif()
endif()
+
+ message(STATUS "Found zlib libraries ${ZLIB_LIBRARIES}")
endif()
\ No newline at end of file
--- /dev/null
+find_package(PkgConfig)
+
+if(PkgConfig_FOUND)
+ pkg_check_modules(PC_ZLIB QUIET ZLIB)
+ if(PC_ZLIB_FOUND)
+ set(ZLIB_DEFINITIONS ${PC_ZLIB_CFLAGS_OTHER})
+ find_library(ZLIB_LIBRARIES NAMES ZLIB HINTS ${PC_ZLIB_LIBDIR} ${PC_ZLIB_LIBRARY_DIRS})
+ find_path(ZLIB_INCLUDE_DIR Decoder.h HINTS ${PC_ZLIB_INCLUDEDIR} ${PC_ZLIB_INCLUDE_DIRS})
+ endif()
+endif()
+
+if(NOT ZLIB_INCLUDE_DIR)
+ find_path(ZLIB_H_PATH ZLIB.h)
+ if(ZLIB_H_PATH)
+ set(ZLIB_INCLUDE_DIR "${ZLIB_H_PATH}")
+ endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIR)
+message(STATUS "Found ZLIB libraries ${ZLIB_LIBRARIES}")
# Copyright (c) 2014-2019, The Monero Project
-#
+#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
--- /dev/null
+SDKs/
+work/
+built/
+sources/
+config.site
+x86_64*
+i686*
+mips*
+arm*
+aarch64*
+powerpc*
+riscv32*
+riscv64*
+s390x*
\ No newline at end of file
--- /dev/null
+.NOTPARALLEL :
+
+# Pattern rule to print variables, e.g. make print-top_srcdir
+print-%: FORCE
+ @echo '$*'='$($*)'
+
+# When invoking a sub-make, keep only the command line variable definitions
+# matching the pattern in the filter function.
+#
+# e.g. invoking:
+# $ make A=1 C=1 print-MAKEOVERRIDES print-MAKEFLAGS
+#
+# with the following in the Makefile:
+# MAKEOVERRIDES := $(filter A=% B=%,$(MAKEOVERRIDES))
+#
+# will print:
+# MAKEOVERRIDES = A=1
+# MAKEFLAGS = -- A=1
+#
+# this is because as the GNU make manual says:
+# The command line variable definitions really appear in the variable
+# MAKEOVERRIDES, and MAKEFLAGS contains a reference to this variable.
+#
+# and since the GNU make manual also says:
+# variables defined on the command line are passed to the sub-make through
+# MAKEFLAGS
+#
+# this means that sub-makes will be invoked as if:
+# $(MAKE) A=1 blah blah
+MAKEOVERRIDES := $(filter V=%,$(MAKEOVERRIDES))
+SOURCES_PATH ?= $(BASEDIR)/sources
+WORK_PATH = $(BASEDIR)/work
+BASE_CACHE ?= $(BASEDIR)/built
+SDK_PATH ?= $(BASEDIR)/SDKs
+FALLBACK_DOWNLOAD_PATH ?= https://downloads.getmonero.org/depends-sources
+
+BUILD = $(shell ./config.guess)
+HOST ?= $(BUILD)
+PATCHES_PATH = $(BASEDIR)/patches
+BASEDIR = $(CURDIR)
+HASH_LENGTH:=11
+DOWNLOAD_CONNECT_TIMEOUT:=30
+DOWNLOAD_RETRIES:=3
+HOST_ID_SALT ?= salt
+BUILD_ID_SALT ?= salt
+
+host:=$(BUILD)
+ifneq ($(HOST),)
+host:=$(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=$(WORK_PATH)/build
+base_staging_dir=$(WORK_PATH)/staging
+base_download_dir=$(WORK_PATH)/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),android)
+host_cmake=Android
+endif
+
+AT_$(V):=
+AT_:=@
+AT:=$(AT_$(V))
+build_host=$(build)
+
+all: install
+
+include hosts/$(host_os).mk
+include hosts/default.mk
+include builders/$(build_os).mk
+include builders/default.mk
+include packages/packages.mk
+
+# Previously, we directly invoked the well-known programs using $(shell ...)
+# to construct build_id_string. However, that was problematic because:
+#
+# 1. When invoking a shell, GNU Make special-cases exit code 127 (command not
+# found) by not capturing the output but instead passing it through. This is
+# not done for any other exit code.
+#
+# 2. Characters like '#' (from these programs' output) would end up in make
+# variables like build_id_string, which would be wrongly interpreted by make
+# when these variables were used.
+#
+# Therefore, we should avoid having arbitrary strings in make variables where
+# possible. The gen_id script used here hashes the output to construct a
+# "make-safe" id.
+#
+# Also note that these lines need to be:
+#
+# 1. After including {hosts,builders}/*.mk, since they rely on the tool
+# variables (e.g. build_CC, host_STRIP, etc.) to be set.
+#
+# 2. Before including packages/*.mk (excluding packages/packages.mk), since
+# they rely on the build_id variables
+#
+build_id:=$(shell env CC='$(build_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(build_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(build_AR)' RANLIB='$(build_RANLIB)' STRIP='$(build_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' ./gen_id '$(BUILD_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
+$(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD)' CXX='$(host_CXX)' CXX_STANDARD='$(CXX_STANDARD)' AR='$(host_AR)' RANLIB='$(host_RANLIB)' STRIP='$(host_STRIP)' SHA256SUM='$(build_SHA256SUM)' DEBUG='$(DEBUG)' ./gen_id '$(HOST_ID_SALT)' 'GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT))')
+
+
+qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_)
+tor_packages_$(NO_TOR) = $(tor_packages) $(tor_$(host_os)_packages)
+
+packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(tor_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_binutils?=$($(host_os)_native_binutils)
+$(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)
+ rm -rf $(@D)
+ mkdir -p $(@D)
+ echo copying packages: $^
+ echo to: $(@D)
+ cd $(@D); $(foreach package,$^, $(build_TAR) xf $($(package)_cached); )
+ touch $@
+
+# $PATH is not preserved between ./configure and make by convention. Its
+# modification and overriding at ./configure time is (as I understand it)
+# supposed to be captured by the AC_{PROG_{,OBJ}CXX,PATH_{PROG,TOOL}} macros,
+# which will expand the program names to their full absolute paths. The notable
+# exception is command line overriding: ./configure CC=clang, which skips the
+# program name expansion step, and works because the user implicitly indicates
+# with CC=clang that clang will be available in $PATH at all times, and is most
+# likely part of the user's system.
+#
+# Therefore, when we "seed the autoconf cache"/"override well-known program
+# vars" by setting AR=<blah> in our config.site, either one of two things needs
+# to be true for the build system to work correctly:
+#
+# 1. If we refer to the program by name (e.g. AR=riscv64-gnu-linux-ar), the
+# tool needs to be available in $PATH at all times.
+#
+# 2. If the tool is _**not**_ expected to be available in $PATH at all times
+# (such as is the case for our native_cctools binutils tools), it needs to
+# be referred to by its absolute path, such as would be output by the
+# AC_PATH_{PROG,TOOL} macros.
+#
+# Minor note: it is also okay to refer to tools by their absolute path even if
+# we expect them to be available in $PATH at all times, more specificity does
+# not hurt.
+$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
+ @mkdir -p $(@D)
+ 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)|' \
+ $< > $@
+ touch $@
+
+$(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id)
+ @mkdir -p $(@D)
+ sed -e 's|@HOST@|$(host)|' \
+ -e 's|@CC@|$(host_CC)|' \
+ -e 's|@CXX@|$(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)|'\
+ $< > $@
+ 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); \
+ if test -f "$($(package)_cached)"; then echo "Checksum mismatch for $(package). Forcing rebuild.."; rm -f $($(package)_cached_checksum) $($(package)_cached); 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
+
+clean-all: clean
+ @rm -rf $(SOURCES_PATH) x86_64* i686* mips* arm* aarch64*
+
+clean:
+ @rm -rf $(WORK_PATH) $(BASE_CACHE) $(BUILD) *.log
+
+install: check-packages $(host_prefix)/share/config.site
+install: check-packages $(host_prefix)/share/toolchain.cmake
+
+download-one: check-sources $(all_sources)
+
+download-osx:
+ @$(MAKE) -s HOST=x86_64-apple-darwin 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 clean clean-all download-one download-osx download-linux download-win download check-packages check-sources
+.PHONY: FORCE
+$(V).SILENT:
--- /dev/null
+build_darwin_CC:=$(shell xcrun -f clang) -isysroot$(shell xcrun --show-sdk-path)
+build_darwin_CXX:=$(shell xcrun -f clang++) -isysroot$(shell xcrun --show-sdk-path)
+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_DSYMUTIL:=$(shell xcrun -f dsymutil)
+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) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path)
+darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path)
+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_DSYMUTIL:=$(shell xcrun -f dsymutil)
+darwin_native_binutils=
+darwin_native_toolchain=
+
+x86_64_darwin_CFLAGS += -arch x86_64
+x86_64_darwin_CXXFLAGS += -arch x86_64
+aarch64_darwin_CFLAGS += -arch arm64
+aarch64_darwin_CXXFLAGS += -arch arm64
--- /dev/null
+default_build_CC = gcc
+default_build_CXX = g++
+default_build_AR = ar
+default_build_TAR = tar
+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 TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(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))))
--- /dev/null
+build_linux_SHA256SUM = sha256sum
+build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
--- /dev/null
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2021 Free Software Foundation, Inc.
+
+timestamp='2021-05-24'
+
+# 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>.
+
+
+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-2021 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
+
+# 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
+ { 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 c89 c99 ; 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"
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #elif defined(__GLIBC__)
+ LIBC=gnu
+ #else
+ #include <stdarg.h>
+ /* First heuristic to detect musl libc. */
+ #ifdef __DEFINED_va_list
+ LIBC=musl
+ #endif
+ #endif
+ EOF
+ eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')"
+
+ # 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.
+ echo "$machine-${os}${release}${abi-}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//')
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
+ exit ;;
+ *:SecBSD:*:*)
+ UNAME_MACHINE_ARCH=$(arch | sed 's/SecBSD.//')
+ echo "$UNAME_MACHINE_ARCH"-unknown-secbsd"$UNAME_RELEASE"
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
+ exit ;;
+ *:SolidBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
+ exit ;;
+ *:OS108:*:*)
+ echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:MirBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:Sortix:*:*)
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Twizzler:*:*)
+ echo "$UNAME_MACHINE"-unknown-twizzler
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
+ 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.
+ echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)"
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo "$UNAME_MACHINE"-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo "$UNAME_MACHINE"-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix"$UNAME_RELEASE"
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "$( (/bin/universe) 2>/dev/null)" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case $(/usr/bin/uname -p) in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux"$UNAME_RELEASE"
+ exit ;;
+ 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 -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
+ exit ;;
+ 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.
+ echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
+ exit ;;
+ 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'.
+ echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')"
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ exit ;;
+ 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)
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ ;;
+ sun4)
+ echo sparc-sun-sunos"$UNAME_RELEASE"
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
+ exit ;;
+ # 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:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint"$UNAME_RELEASE"
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint"$UNAME_RELEASE"
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint"$UNAME_RELEASE"
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten"$UNAME_RELEASE"
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten"$UNAME_RELEASE"
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
+ exit ;;
+ 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; }
+ echo mips-mips-riscos"$UNAME_RELEASE"
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ 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
+ echo m88k-dg-dgux"$UNAME_RELEASE"
+ else
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+ fi
+ else
+ echo i586-dg-dgux"$UNAME_RELEASE"
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')"
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if test -x /usr/bin/oslevel ; then
+ IBM_REV=$(/usr/bin/oslevel)
+ else
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ fi
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
+ exit ;;
+ *: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>
+
+ 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
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *: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
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 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
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
+ echo ia64-hp-hpux"$HPUX_REV"
+ exit ;;
+ 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; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if test -x /usr/sbin/sysversion ; then
+ echo "$UNAME_MACHINE"-unknown-osf1mk
+ else
+ echo "$UNAME_MACHINE"-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ 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*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ 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:*:*:*)
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ 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/ /_/')
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 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/ /_/')
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ *:BSD/OS:*:*)
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ 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
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi
+ else
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf
+ fi
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=$(/usr/bin/uname -p)
+ case $UNAME_PROCESSOR in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
+ exit ;;
+ i*:CYGWIN*:*)
+ echo "$UNAME_MACHINE"-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo "$UNAME_MACHINE"-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo "$UNAME_MACHINE"-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo "$UNAME_MACHINE"-pc-msys
+ exit ;;
+ i*:PW*:*)
+ echo "$UNAME_MACHINE"-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case $UNAME_MACHINE in
+ x86)
+ echo i586-pc-interix"$UNAME_RELEASE"
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ esac ;;
+ i*:UWIN*:*)
+ echo "$UNAME_MACHINE"-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-pc-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')"
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC"
+ exit ;;
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ 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
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:* | arc64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arm*:Linux:*:*)
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+ else
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ cris:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ crisv32:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ e2k:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ frv:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ hexagon:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ i*86:Linux:*:*)
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ exit ;;
+ ia64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ k1om:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ m32r*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ m68*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ 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
+ eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-"$LIBC"
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-"$LIBC"
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-"$LIBC"
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-"$LIBC"
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-"$LIBC"
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-"$LIBC"
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-"$LIBC"
+ exit ;;
+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
+ exit ;;
+ sh64*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ sh*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ tile*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ vax:Linux:*:*)
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
+ exit ;;
+ x86_64:Linux:*:*)
+ set_cc_for_build
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_X32 >/dev/null
+ then
+ LIBCABI="$LIBC"x32
+ fi
+ fi
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ 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.
+ echo i386-sequent-sysv4
+ exit ;;
+ 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.
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo "$UNAME_MACHINE"-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo "$UNAME_MACHINE"-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo "$UNAME_MACHINE"-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo "$UNAME_MACHINE"-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ i*86:*DOS:*:*)
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:*)
+ UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//')
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+ else
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+ fi
+ exit ;;
+ 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
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name)
+ echo "$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
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+ else
+ echo "$UNAME_MACHINE"-pc-sysv32
+ fi
+ exit ;;
+ 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.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ 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*:*)
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv"$UNAME_RELEASE"
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=$( (uname -p) 2>/dev/null)
+ echo "$UNAME_MACHINE"-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo "$UNAME_MACHINE"-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux"$UNAME_RELEASE"
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if test -d /usr/nec; then
+ echo mips-nec-sysv"$UNAME_RELEASE"
+ else
+ echo mips-unknown-sysv"$UNAME_RELEASE"
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
+ *:Rhapsody:*:*)
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
+ arm64:Darwin:*:*)
+ echo aarch64-apple-darwin"$UNAME_RELEASE"
+ exit ;;
+ *: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
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=$(uname -p)
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
+ exit ;;
+ *: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
+ echo "$UNAME_MACHINE"-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux"$UNAME_RELEASE"
+ exit ;;
+ *:DragonFly:*:*)
+ echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=$( (uname -p) 2>/dev/null)
+ case $UNAME_MACHINE in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')"
+ exit ;;
+ i*86:rdos:*:*)
+ echo "$UNAME_MACHINE"-pc-rdos
+ exit ;;
+ *:AROS:*:*)
+ echo "$UNAME_MACHINE"-unknown-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo "$UNAME_MACHINE"-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
+ *:Unleashed:*:*)
+ echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
+ exit ;;
+esac
+
+# 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
+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
+
+year=$(echo $timestamp | sed 's,-.*,,')
+# shellcheck disable=SC2003
+if test "$(expr "$(date +%Y)" - "$year")" -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:
--- /dev/null
+# shellcheck shell=sh disable=SC2034 # Many variables set will be used in
+ # ./configure but shellcheck doesn't know
+ # that, hence: disable=SC2034
+
+true # Dummy command because shellcheck treats all directives before first
+ # command as file-wide, and we only want to disable for one line.
+ #
+ # See: https://github.com/koalaman/shellcheck/wiki/Directive
+
+# shellcheck disable=SC2154
+depends_prefix="$(cd "$(dirname "$ac_site_file")/.." && pwd)"
+
+cross_compiling=maybe
+host_alias="@HOST@"
+ac_tool_prefix="${host_alias}-"
+
+if test -z "$with_boost"; then
+ with_boost="$depends_prefix"
+fi
+if test -z "$with_qt_plugindir"; then
+ with_qt_plugindir="${depends_prefix}/plugins"
+fi
+if test -z "$with_qt_translationdir"; then
+ with_qt_translationdir="${depends_prefix}/translations"
+fi
+if test -z "$with_qt_bindir" && test -z "@no_qt@"; then
+ with_qt_bindir="${depends_prefix}/native/bin"
+fi
+if test -z "$with_mpgen" && test -n "@multiprocess@"; then
+ with_mpgen="${depends_prefix}/native"
+fi
+
+if test -z "$with_qrencode" && test -n "@no_qr@"; then
+ with_qrencode=no
+fi
+
+if test -z "$enable_wallet" && test -n "@no_wallet@"; then
+ enable_wallet=no
+fi
+
+if test -z "$with_bdb" && test -n "@no_bdb@"; then
+ with_bdb=no
+fi
+
+if test -z "$with_sqlite" && test -n "@no_sqlite@"; then
+ with_sqlite=no
+fi
+
+if test -z "$enable_multiprocess" && test -n "@multiprocess@"; then
+ enable_multiprocess=yes
+fi
+
+if test -z "$with_miniupnpc" && test -n "@no_upnp@"; then
+ with_miniupnpc=no
+fi
+
+if test -z "$with_natpmp" && test -n "@no_natpmp@"; then
+ with_natpmp=no
+fi
+
+if test -z "$with_gui" && test -n "@no_qt@"; then
+ with_gui=no
+fi
+
+if test -n "@debug@" && test -z "@no_qt@" && test "$with_gui" != "no"; then
+ with_gui=qt5_debug
+fi
+
+if test -z "$enable_zmq" && test -n "@no_zmq@"; then
+ enable_zmq=no
+fi
+
+if test -z "$enable_usdt" && test -n "@no_usdt@"; then
+ enable_usdt=no
+fi
+
+if test "@host_os@" = darwin; then
+ BREW=no
+fi
+
+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 PKG_CONFIG_LIBDIR="${depends_prefix}/lib/pkgconfig"
+fi
+
+CPPFLAGS="-I${depends_prefix}/include/ ${CPPFLAGS}"
+LDFLAGS="-L${depends_prefix}/lib ${LDFLAGS}"
+
+if test -n "@CC@" -a -z "${CC}"; then
+ CC="@CC@"
+fi
+if test -n "@CXX@" -a -z "${CXX}"; then
+ CXX="@CXX@"
+fi
+PYTHONPATH="${depends_prefix}/native/lib/python3/dist-packages${PYTHONPATH:+${PATH_SEPARATOR}}${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 "@STRIP@"; then
+ STRIP="@STRIP@"
+ ac_cv_path_ac_pt_STRIP="${STRIP}"
+fi
+
+if test "@host_os@" = darwin; then
+ if test -n "@OTOOL@"; then
+ OTOOL="@OTOOL@"
+ ac_cv_path_ac_pt_OTOOL="${OTOOL}"
+ fi
+
+ if test -n "@INSTALL_NAME_TOOL@"; then
+ INSTALL_NAME_TOOL="@INSTALL_NAME_TOOL@"
+ ac_cv_path_ac_pt_INSTALL_NAME_TOOL="${INSTALL_NAME_TOOL}"
+ fi
+
+ if test -n "@DSYMUTIL@"; then
+ DSYMUTIL="@DSYMUTIL@"
+ ac_cv_path_ac_pt_DSYMUTIL="${DSYMUTIL}"
+ fi
+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
--- /dev/null
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2021 Free Software Foundation, Inc.
+
+timestamp='2021-04-30'
+
+# 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.
+
+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-2021 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
+# shellcheck disable=SC2162
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+
+# 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
+ nto-qnx* | linux-* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ 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
+ ;;
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ basic_os=
+ ;;
+ *)
+ 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
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ basic_os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ basic_os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ basic_os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ basic_os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ basic_os=bsd
+ ;;
+ 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 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ cpu=m68k
+ vendor=motorola
+ ;;
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ basic_os=sysv3
+ ;;
+ 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
+ case $basic_os in
+ openstep*)
+ ;;
+ nextstep*)
+ ;;
+ ns2*)
+ basic_os=nextstep2
+ ;;
+ *)
+ basic_os=nextstep3
+ ;;
+ esac
+ ;;
+ 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/-.*//')
+ ;;
+
+ *-*)
+ # shellcheck disable=SC2162
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+ ;;
+ # 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.
+ 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
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ basic_os=${basic_os:-bosx}
+ ;;
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
+ ;;
+ blackfin-*)
+ cpu=bfin
+ 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=linux
+ ;;
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
+ ;;
+ openrisc-*)
+ cpu=or32
+ ;;
+ parisc-*)
+ cpu=hppa
+ basic_os=linux
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
+ ;;
+ pentium4-*)
+ cpu=i786
+ ;;
+ pc98-*)
+ cpu=i386
+ ;;
+ 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
+ ;;
+ x64-*)
+ cpu=x86_64
+ ;;
+ xscale-* | xscalee[bl]-*)
+ cpu=$(echo "$cpu" | sed 's/^xscale/arm/')
+ ;;
+ arm64-*)
+ 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 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb | arc64 \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bpf | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | loongarch32 | loongarch64 | loongarchx32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r3 | mipsisa32r3el \
+ | mipsisa32r5 | mipsisa32r5el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r3 | mipsisa64r3el \
+ | mipsisa64r5 | mipsisa64r5el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+ | rl78 | romp | rs6000 | rx \
+ | s390 | s390x \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | thumbv7* \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 \
+ | wasm32 | wasm64 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ 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 caes, or perhaps split kernel-os, or else just
+# set os.
+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|')
+ ;;
+ *-*)
+ # shellcheck disable=SC2162
+ IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+ ;;
+ # 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|')
+ ;;
+ *)
+ 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
+ ;;
+ # 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
+ ;;
+ dynix*)
+ os=bsd
+ ;;
+ acis*)
+ os=aos
+ ;;
+ atheos*)
+ os=atheos
+ ;;
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
+ ;;
+ ctix* | uts*)
+ os=sysv
+ ;;
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=$(echo $os | sed -e 's|sinix|sysv|')
+ ;;
+ sinix*)
+ os=sysv4
+ ;;
+ 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=elf
+ ;;
+ esac
+ ;;
+ *)
+ # 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=
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
+ *-acorn)
+ os=riscix1.2
+ ;;
+ arm*-rebel)
+ kernel=linux
+ os=gnu
+ ;;
+ arm*-semi)
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=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=aout
+ ;;
+ mep-*)
+ os=elf
+ ;;
+ mips*-cisco)
+ os=elf
+ ;;
+ mips*-*)
+ os=elf
+ ;;
+ or32-*)
+ os=coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=sysv3
+ ;;
+ sparc-* | *-sun)
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
+ ;;
+ *-be)
+ os=beos
+ ;;
+ *-ibm)
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
+ ;;
+ *-wec)
+ os=proelf
+ ;;
+ *-winbond)
+ os=proelf
+ ;;
+ *-oki)
+ os=proelf
+ ;;
+ *-hp)
+ os=hpux
+ ;;
+ *-hitachi)
+ os=hiux
+ ;;
+ 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
+ ;;
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
+ ;;
+ *-masscomp)
+ os=rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=uxpv
+ ;;
+ *-rom68k)
+ os=coff
+ ;;
+ *-*bug)
+ os=coff
+ ;;
+ *-apple)
+ os=macos
+ ;;
+ *-atari*)
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
+ ;;
+ *)
+ os=none
+ ;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+ # Sometimes we do "kernel-libc", so those need to count as OSes.
+ musl* | newlib* | uclibc*)
+ ;;
+ # Likewise for "kernel-abi"
+ eabi* | gnueabi*)
+ ;;
+ # VxWorks passes extra cpu info in the 4th filed.
+ simlinux | simwindows | spe)
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
+ | hiux* | abug | nacl* | netware* | windows* \
+ | os9* | macos* | osx* | ios* \
+ | mpw* | magic* | mmixware* | mon960* | lnews* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* | serenity* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | mint* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
+ ;;
+ # 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.
+ ;;
+ none)
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 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 in
+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
+ ;;
+ uclinux-uclibc* )
+ ;;
+ -dietlibc* | -newlib* | -musl* | -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
+ ;;
+ kfreebsd*-gnu* | kopensolaris*-gnu*)
+ ;;
+ vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ ;;
+ nto-qnx*)
+ ;;
+ os2-emx)
+ ;;
+ *-eabi* | *-gnueabi*)
+ ;;
+ -*)
+ # Blank kernel with real OS 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*)
+ 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"
+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:
--- /dev/null
+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),$(2),$(3),$(4),$(5)) || \
+ $(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5))))
+endef
+
+define int_get_build_recipe_hash
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | 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)_type)_native_binutils) $($(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))
+$(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(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)_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)_build_log:=$(BASEDIR)/$(1)-$($(1)_version)-$($(1)_build_id).log
+$(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources)
+
+#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)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
+
+
+#default commands
+# The default behavior for tar will try to set ownership when running as uid 0 and may not succeed, --no-same-owner disables this behavior
+$(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 && $(build_TAR) --no-same-owner --strip-components=1 -xf $$($(1)_source)
+$(1)_preprocess_cmds ?= true
+$(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))
+
+$(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+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
+$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
+$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
+$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
+
+# Setting a --build type that differs from --host will explicitly enable
+# cross-compilation mode. Note that --build defaults to the output of
+# config.guess, which is what we set it too here. This also quells autoconf
+# warnings, "If you wanted to set the --build type, don't use --host.",
+# when using versions older than 2.70.
+$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
+ifneq ($($(1)_nm),)
+$(1)_autoconf += NM="$$($(1)_nm)"
+endif
+ifneq ($($(1)_ranlib),)
+$(1)_autoconf += RANLIB="$$($(1)_ranlib)"
+endif
+ifneq ($($(1)_ar),)
+$(1)_autoconf += AR="$$($(1)_ar)"
+endif
+ifneq ($($(1)_arflags),)
+$(1)_autoconf += ARFLAGS="$$($(1)_arflags)"
+endif
+ifneq ($($(1)_cflags),)
+$(1)_autoconf += CFLAGS="$$($(1)_cflags)"
+endif
+ifneq ($($(1)_cxxflags),)
+$(1)_autoconf += CXXFLAGS="$$($(1)_cxxflags)"
+endif
+ifneq ($($(1)_cppflags),)
+$(1)_autoconf += CPPFLAGS="$$($(1)_cppflags)"
+endif
+ifneq ($($(1)_ldflags),)
+$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
+endif
+
+$(1)_autoconff=./configure --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
+ifneq ($($(1)_nm),)
+$(1)_autoconff += NM="$$($(1)_nm)"
+endif
+ifneq ($($(1)_ranlib),)
+$(1)_autoconff += RANLIB="$$($(1)_ranlib)"
+endif
+ifneq ($($(1)_ar),)
+$(1)_autoconff += AR="$$($(1)_ar)"
+endif
+ifneq ($($(1)_arflags),)
+$(1)_autoconff += ARFLAGS="$$($(1)_arflags)"
+endif
+ifneq ($($(1)_cflags),)
+$(1)_autoconff += CFLAGS="$$($(1)_cflags)"
+endif
+ifneq ($($(1)_cxxflags),)
+$(1)_autoconff += CXXFLAGS="$$($(1)_cxxflags)"
+endif
+ifneq ($($(1)_cppflags),)
+$(1)_autoconff += CPPFLAGS="$$($(1)_cppflags)"
+endif
+ifneq ($($(1)_ldflags),)
+$(1)_autoconff += LDFLAGS="$$($(1)_ldflags)"
+endif
+
+$(1)_cmake=env CC="$$($(1)_cc)" \
+ CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \
+ CXX="$$($(1)_cxx)" \
+ CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
+ LDFLAGS="$$($(1)_ldflags)" \
+ cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_cmake_opts)
+ifeq ($($(1)_type),build)
+$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
+else
+ifneq ($(host),$(build))
+$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system)
+$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host)
+$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host)
+endif
+endif
+endef
+
+define int_add_cmds
+ifneq ($(LOG),)
+$(1)_logging = >>$$($(1)_build_log) 2>&1 || { if test -f $$($(1)_build_log); then cat $$($(1)_build_log); fi; exit 1; }
+endif
+
+$($(1)_fetched):
+ mkdir -p $$(@D) $(SOURCES_PATH)
+ rm -f $$@
+ touch $$@
+ cd $$(@D); $($(1)_fetch_cmds)
+ cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);)
+ touch $$@
+$($(1)_extracted): | $($(1)_fetched)
+ echo Extracting $(1)...
+ mkdir -p $$(@D)
+ cd $$(@D); $($(1)_extract_cmds)
+ touch $$@
+$($(1)_preprocessed): | $($(1)_extracted)
+ echo Preprocessing $(1)...
+ mkdir -p $$(@D) $($(1)_patch_dir)
+ $(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
+ cd $$(@D); $(call $(1)_preprocess_cmds, $(1))
+ touch $$@
+$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed)
+ echo Configuring $(1)...
+ rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), $(build_TAR) --no-same-owner -xf $($(package)_cached); )
+ mkdir -p $$(@D)
+ $(AT)+cd $$(@D); export $($(1)_config_env); $(call $(1)_config_cmds, $(1))
+ touch $$@
+$($(1)_built): | $($(1)_configured)
+ echo Building $(1)...
+ mkdir -p $$(@D)
+ $(AT)+cd $$(@D); export $($(1)_build_env); $(call $(1)_build_cmds, $(1))
+ touch $$@
+$($(1)_staged): | $($(1)_built)
+ echo Staging $(1)...
+ mkdir -p $($(1)_staging_dir)/$(host_prefix)
+ $(AT)cd $($(1)_build_dir); export $($(1)_stage_env); $(call $(1)_stage_cmds, $(1))
+ rm -rf $($(1)_extract_dir)
+ touch $$@
+$($(1)_postprocessed): | $($(1)_staged)
+ echo Postprocessing $(1)...
+ cd $($(1)_staging_prefix_dir); $($(1)_postprocess_cmds)
+ touch $$@
+$($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
+ echo Caching $(1)...
+ cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | $(build_TAR) --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
+ mkdir -p $$(@D)
+ rm -rf $$(@D) && mkdir -p $$(@D)
+ mv $$($(1)_staging_dir)/$$(@F) $$(@)
+ rm -rf $($(1)_staging_dir)
+ if test -f $($(1)_build_log); then mv $($(1)_build_log) $$(@D); fi
+$($(1)_cached_checksum): $($(1)_cached)
+ cd $$(@D); $(build_SHA256SUM) $$(<F) > $$(@)
+
+.PHONY: $(1)
+$(1): | $($(1)_cached_checksum)
+.SECONDARY: $($(1)_cached) $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched)
+
+endef
+
+stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum
+
+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 native_package,$(native_packages),$(eval include packages/$(native_package).mk))
+$(foreach package,$(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)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) ))
--- /dev/null
+#!/usr/bin/env bash
+
+# Usage: env [ CC=... ] [ C_STANDARD=...] [ CXX=... ] [CXX_STANDARD=...] \
+# [ AR=... ] [ RANLIB=... ] [ STRIP=... ] [ DEBUG=... ] \
+# [ LTO=... ] ./build-id [ID_SALT]...
+#
+# Prints to stdout a SHA256 hash representing the current toolset, used by
+# depends/Makefile as a build id for caching purposes (detecting when the
+# toolset has changed and the cache needs to be invalidated).
+#
+# If the DEBUG environment variable is non-empty and the system has `tee`
+# available in its $PATH, the pre-image to the SHA256 hash will be printed to
+# stderr. This is to help developers debug caching issues in depends.
+
+# This script explicitly does not `set -e` because id determination is mostly
+# opportunistic: it is fine that things fail, as long as they fail consistently.
+
+# Command variables (CC/CXX/AR) which can be blank are invoked with `bash -c`,
+# because the "command not found" error message printed by shells often include
+# the line number, like so:
+#
+# ./depends/gen_id: line 43: --version: command not found
+#
+# By invoking with `bash -c`, we ensure that the line number is always 1
+
+(
+ # Redirect stderr to stdout
+ exec 2>&1
+
+ echo "BEGIN ALL"
+
+ # Include any ID salts supplied via command line
+ echo "BEGIN ID SALT"
+ echo "$@"
+ echo "END ID SALT"
+
+ # GCC only prints COLLECT_LTO_WRAPPER when invoked with just "-v", but we want
+ # the information from "-v -E -" as well, so just include both.
+ echo "BEGIN CC"
+ bash -c "${CC} -v"
+ bash -c "${CC} -v -E -xc -o /dev/null - < /dev/null"
+ bash -c "${CC} -v -E -xobjective-c -o /dev/null - < /dev/null"
+ echo "C_STANDARD=${C_STANDARD}"
+ echo "END CC"
+
+ echo "BEGIN CXX"
+ bash -c "${CXX} -v"
+ bash -c "${CXX} -v -E -xc++ -o /dev/null - < /dev/null"
+ bash -c "${CXX} -v -E -xobjective-c++ -o /dev/null - < /dev/null"
+ echo "CXX_STANDARD=${CXX_STANDARD}"
+ echo "END CXX"
+
+ echo "BEGIN AR"
+ bash -c "${AR} --version"
+ env | grep '^AR_'
+ echo "ZERO_AR_DATE=${ZERO_AR_DATE}"
+ echo "END AR"
+
+ echo "BEGIN RANLIB"
+ bash -c "${RANLIB} --version"
+ env | grep '^RANLIB_'
+ echo "END RANLIB"
+
+ echo "BEGIN STRIP"
+ bash -c "${STRIP} --version"
+ env | grep '^STRIP_'
+ echo "END STRIP"
+
+ echo "END ALL"
+) | if [ -n "$DEBUG" ] && command -v tee > /dev/null 2>&1; then
+ # When debugging and `tee` is available, output the preimage to stderr
+ # in addition to passing through stdin to stdout
+ tee >(cat 1>&2)
+ else
+ # Otherwise, passthrough stdin to stdout
+ cat
+ fi | ${SHA256SUM} - | cut -d' ' -f1
--- /dev/null
+OSX_MIN_VERSION=10.15
+OSX_SDK_VERSION=11.0
+XCODE_VERSION=12.2
+XCODE_BUILD_ID=12B45b
+LD64_VERSION=609
+
+OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers
+
+darwin_native_binutils=native_cctools
+
+ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
+# FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned clang
+# from llvm.org
+
+# Clang is a dependency of native_cctools when FORCE_USE_SYSTEM_CLANG is empty
+darwin_native_toolchain=native_cctools
+
+clang_prog=$(build_prefix)/bin/clang
+clangxx_prog=$(clang_prog)++
+
+clang_resource_dir=$(build_prefix)/lib/clang/$(native_clang_version)
+else
+# FORCE_USE_SYSTEM_CLANG is non-empty, so we use the clang from the user's
+# system
+
+darwin_native_toolchain=
+
+# We can't just use $(shell command -v clang) because GNU Make handles builtins
+# in a special way and doesn't know that `command` is a POSIX-standard builtin
+# prior to 1af314465e5dfe3e8baa839a32a72e83c04f26ef, first released in v4.2.90.
+# At the time of writing, GNU Make v4.2.1 is still being used in supported
+# distro releases.
+#
+# Source: https://lists.gnu.org/archive/html/bug-make/2017-11/msg00017.html
+clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang")
+clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++")
+
+clang_resource_dir=$(shell clang -print-resource-dir)
+endif
+
+cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL
+
+# Make-only lowercase function
+lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
+
+# For well-known tools provided by cctools, make sure that their well-known
+# variable is set to the full path of the tool, just like how AC_PATH_{TOO,PROG}
+# would.
+$(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(host)-$(call lc,$(TOOL))))
+
+# Flag explanations:
+#
+# -mlinker-version
+#
+# Ensures that modern linker features are enabled. See here for more
+# details: https://github.com/bitcoin/bitcoin/pull/19407.
+#
+# -B$(build_prefix)/bin
+#
+# Explicitly point to our binaries (e.g. cctools) so that they are
+# ensured to be found and preferred over other possibilities.
+#
+# -stdlib=libc++ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1
+#
+# Forces clang to use the libc++ headers from our SDK and completely
+# forget about the libc++ headers from the standard directories
+#
+# -Xclang -*system<path_a> \
+# -Xclang -*system<path_b> \
+# -Xclang -*system<path_c> ...
+#
+# Adds path_a, path_b, and path_c to the bottom of clang's list of
+# include search paths. This is used to explicitly specify the list of
+# system include search paths and its ordering, rather than rely on
+# clang's autodetection routine. This routine has been shown to:
+# 1. Fail to pickup libc++ headers in $SYSROOT/usr/include/c++/v1
+# when clang was built manually (see: https://github.com/bitcoin/bitcoin/pull/17919#issuecomment-656785034)
+# 2. Fail to pickup C headers in $SYSROOT/usr/include when
+# C_INCLUDE_DIRS was specified at configure time (see: https://gist.github.com/dongcarl/5cdc6990b7599e8a5bf6d2a9c70e82f9)
+#
+# Talking directly to cc1 with -Xclang here grants us access to specify
+# more granular categories for these system include search paths, and we
+# can use the correct categories that these search paths would have been
+# placed in if the autodetection routine had worked correctly. (see:
+# https://gist.github.com/dongcarl/5cdc6990b7599e8a5bf6d2a9c70e82f9#the-treatment)
+#
+# Furthermore, it places these search paths after any "non-Xclang"
+# specified search paths. This prevents any additional clang options or
+# environment variables from coming after or in between these system
+# include search paths, as that would be wrong in general but would also
+# break #include_next's.
+#
+darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
+ -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
+ -u LIBRARY_PATH \
+ $(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
+ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
+ -isysroot$(OSX_SDK) \
+ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \
+ -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
+darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
+ -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
+ -u LIBRARY_PATH \
+ $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
+ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
+ -isysroot$(OSX_SDK) \
+ -stdlib=libc++ \
+ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \
+ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \
+ -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
+
+darwin_CFLAGS=-pipe
+darwin_CXXFLAGS=$(darwin_CFLAGS)
+
+darwin_release_CFLAGS=-O2
+darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
+
+darwin_debug_CFLAGS=-O1
+darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
+
+darwin_cmake_system=Darwin
--- /dev/null
+ifneq ($(host),$(build))
+host_toolchain:=$(host)-
+endif
+
+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
+ifneq ($(filter $(origin $1),undefined default),)
+# Do not consider the well-known var $1 if it is undefined or is taking a value
+# that is predefined by "make" (e.g. the make variable "CC" has a predefined
+# value of "cc")
+$(host_os)_$1?=$$(default_host_$1)
+$(host_arch)_$(host_os)_$1?=$$($(host_os)_$1)
+$(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1)
+else
+$(host_os)_$1=$(or $($1),$($(host_os)_$1),$(default_host_$1))
+$(host_arch)_$(host_os)_$1=$(or $($1),$($(host_arch)_$(host_os)_$1),$$($(host_os)_$1))
+$(host_arch)_$(host_os)_$(release_type)_$1=$(or $($1),$($(host_arch)_$(host_os)_$(release_type)_$1),$$($(host_os)_$1))
+endif
+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 DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
+$(foreach flags,CFLAGS CXXFLAGS ARFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))
--- /dev/null
+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 -D_LIBCPP_DEBUG=1
+
+ifeq (86,$(findstring 86,$(build_arch)))
+i686_linux_CC=gcc -m32
+i686_linux_CXX=g++ -m32
+i686_linux_AR=ar
+i686_linux_RANLIB=ranlib
+i686_linux_NM=nm
+i686_linux_STRIP=strip
+
+x86_64_linux_CC=gcc -m64
+x86_64_linux_CXX=g++ -m64
+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
+linux_cmake_system=Linux
--- /dev/null
+ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),)
+mingw32_CXX := $(host)-g++-posix
+endif
+
+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
+
+mingw32_cmake_system=Windows
\ No newline at end of file
--- /dev/null
+package=boost
+$(package)_version=1_64_0
+$(package)_download_path=https://downloads.sourceforge.net/project/boost/boost/1.64.0/
+$(package)_file_name=$(package)_$($(package)_version).tar.bz2
+$(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
+$(package)_dependencies=libiconv
+$(package)_patches=fix_aroptions.patch fix_arm_arch.patch fix_coalesce.patch
+
+define $(package)_set_vars
+$(package)_config_opts_release=variant=release
+$(package)_config_opts_debug=variant=debug
+$(package)_config_opts=--layout=tagged --build-type=complete --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=shared
+$(package)_config_opts_android=threadapi=pthread runtime-link=static target-os=android
+$(package)_config_opts_darwin=--toolset=darwin 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)_toolset_darwin=darwin
+$(package)_archiver_darwin=$($(package)_libtool)
+$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
+$(package)_cxxflags=-std=c++11
+$(package)_cxxflags_linux=-fPIC
+$(package)_cxxflags_freebsd=-fPIC
+endef
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/fix_aroptions.patch &&\
+ patch -p1 < $($(package)_patch_dir)/fix_arm_arch.patch &&\
+ patch -p1 < $($(package)_patch_dir)/fix_coalesce.patch &&\
+ echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
+endef
+
+define $(package)_config_cmds
+ ./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
+endef
+
+define $(package)_build_cmds
+ ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
+endef
+
+define $(package)_stage_cmds
+ ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
+endef
\ No newline at end of file
--- /dev/null
+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)
+endef
+
+define $(package)_build_cmd
+ $(MAKE)
+endef
+
+define $(package)_preprocess_cmds
+ cd $($(package)_build_subdir); autoreconf -f -i
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/*.la
+endef
--- /dev/null
+package=expat
+$(package)_version=2.4.8
+$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$($(package)_version))/
+$(package)_file_name=$(package)-$($(package)_version).tar.xz
+$(package)_sha256_hash=f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25
+
+# -D_DEFAULT_SOURCE defines __USE_MISC, which exposes additional
+# definitions in endian.h, which are required for a working
+# endianess check in configure when building with -flto.
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples
+ $(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+ $(package)_config_opts += --without-xmlwf
+ $(package)_config_opts_linux=--with-pic
+ $(package)_cppflags += -D_DEFAULT_SOURCE
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share lib/cmake lib/*.la
+endef
\ No newline at end of file
--- /dev/null
+package=fontconfig
+$(package)_version=2.12.6
+$(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
+$(package)_dependencies=freetype expat
+$(package)_patches=gperf_header_regen.patch
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-docs --disable-static --disable-libxml2 --disable-iconv
+ $(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/gperf_header_regen.patch
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf var lib/*.la
+endef
--- /dev/null
+package=freetype
+$(package)_version=2.11.0
+$(package)_download_path=https://download.savannah.gnu.org/releases/$(package)
+$(package)_file_name=$(package)-$($(package)_version).tar.xz
+$(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7
+
+define $(package)_set_vars
+ $(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static
+ $(package)_config_opts += --enable-option-checking --without-brotli
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man lib/*.la
+endef
--- /dev/null
+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)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+endef
--- /dev/null
+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
--- /dev/null
+package=hidapi
+$(package)_version=0.11.0
+$(package)_download_path=https://github.com/libusb/hidapi/archive
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=391d8e52f2d6a5cf76e2b0c079cfefe25497ba1d4659131297081fc0cd744632
+$(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_darwin+=RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
+$(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
+endef
+
+define $(package)_config_cmds
+ ./bootstrap &&\
+ $($(package)_autoconf) $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/*.la
+endef
+
--- /dev/null
+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 &&\
+ 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 &&\
+ $(MAKE) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ cd buildb &&\
+ $(MAKE) $($(package)_build_opts) DESTDIR=$($(package)_staging_dir) install lib/*
+endef
--- /dev/null
+package=ldns
+$(package)_version=1.7.1
+$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=8ac84c16bdca60e710eea75782356f3ac3b55680d40e1530d7cea474ac208229
+$(package)_dependencies=openssl
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --enable-static --with-drill
+ $(package)_config_opts+=--with-ssl=$(host_prefix)
+ $(package)_config_opts_release=--disable-debug-mode
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-h install-lib
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/*.la
+endef
+
--- /dev/null
+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)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
--- /dev/null
+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)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
--- /dev/null
+package=libXau
+$(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=ccf8cbf0dbf676faa2ea0a6d64bcc3b6746064722b606c8c52917ed00dcb73ec
+$(package)_dependencies=xproto
+
+# When updating this package, check the default value of
+# --disable-xthreads. It is currently enabled.
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --disable-lint-library --without-lint
+ $(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share lib/*.la
+endef
--- /dev/null
+package=libevent
+$(package)_version=2.1.12
+$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/
+$(package)_file_name=libevent-$($(package)_version)-stable.tar.gz
+$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
+$(package)_dependencies=openssl
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --enable-static --with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
--- /dev/null
+package=libgcrypt
+$(package)_version=1.8.9
+$(package)_download_path=https://www.gnupg.org/ftp/gcrypt/libgcrypt/
+$(package)_file_name=libgcrypt-$($(package)_version).tar.bz2
+$(package)_sha256_hash=2bda4790aa5f0895d3407cf7bf6bd7727fd992f25a45a63d92fef10767fa3769
+$(package)_dependencies=libgpg-error
+$(package)_patches=gost-sb.h no_gen_gost-sb.patch
+
+define $(package)_set_vars
+ $(package)_build_opts=CFLAGS="-fPIE"
+endef
+
+define $(package)_preprocess_cmds
+ mv $($(package)_patch_dir)/gost-sb.h cipher/gost-sb.h && \
+ patch -p1 < $($(package)_patch_dir)/no_gen_gost-sb.patch
+endef
+
+# building on linux with $($(package)_autoconf) fails for mysterious reasons
+ifeq ($(host_os),linux)
+define $(package)_config_cmds
+ CLAGS='-fPIE' CXXFLAGS='-fPIE' ./configure --disable-shared --enable-static --disable-doc --with-libgpg-error-prefix=$(host_prefix) --prefix=$(host_prefix)
+endef
+else
+define $(package)_config_cmds
+ $($(package)_autoconf) --disable-shared --enable-static --disable-doc --with-libgpg-error-prefix=$(host_prefix)
+endef
+endif
+
+define $(package)_build_cmds
+ $(MAKE) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
--- /dev/null
+package=libgpg-error
+$(package)_version=1.45
+$(package)_download_path=https://www.gnupg.org/ftp/gcrypt/libgpg-error/
+$(package)_file_name=libgpg-error-1.45.tar.bz2
+$(package)_sha256_hash=570f8ee4fb4bff7b7495cff920c275002aea2147e9a1d220c068213267f80a26
+
+define $(package)_set_vars
+ $(package)_build_opts=CFLAGS="-fPIE"
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf) --enable-static --disable-shared
+endef
+
+define $(package)_build_cmds
+ $(MAKE) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
--- /dev/null
+package=libiconv
+$(package)_version=1.15
+$(package)_download_path=https://ftp.gnu.org/gnu/libiconv
+$(package)_file_name=libiconv-$($(package)_version).tar.gz
+$(package)_sha256_hash=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
+$(package)_patches=fix-whitespace.patch
+
+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
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/ &&\
+ patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/*.la
+endef
--- /dev/null
+package=libusb
+$(package)_version=1.0.22
+$(package)_download_path=https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-$($(package)_version)/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
+
+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)
+ endef
+else
+ define $(package)_config_cmds
+ $($(package)_autoconf)
+ endef
+endif
+
+define $(package)_build_cmd
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds cp -f lib/libusb-1.0.a lib/libusb.a
+endef
--- /dev/null
+package=libxcb
+$(package)_version=1.14
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=$(package)-$($(package)_version).tar.xz
+$(package)_sha256_hash=a55ed6db98d43469801262d81dc2572ed124edc3db31059d4e9916eb9f844c34
+$(package)_dependencies=xcb_proto libXau
+$(package)_patches = remove_pthread_stubs.patch
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen --without-launchd
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+# Disable unneeded extensions.
+# More info is available from: https://doc.qt.io/qt-5.15/linux-requirements.html
+$(package)_config_opts += --disable-composite --disable-damage --disable-dpms
+$(package)_config_opts += --disable-dri2 --disable-dri3 --disable-glx
+$(package)_config_opts += --disable-present --disable-record --disable-resource
+$(package)_config_opts += --disable-screensaver --disable-xevie --disable-xfree86-dri
+$(package)_config_opts += --disable-xinput --disable-xprint --disable-selinux
+$(package)_config_opts += --disable-xtest --disable-xv --disable-xvmc
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux && \
+ patch -p1 -i $($(package)_patch_dir)/remove_pthread_stubs.patch
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share lib/*.la
+endef
\ No newline at end of file
--- /dev/null
+package=libxcb_util
+$(package)_version=0.4.0
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-$($(package)_version).tar.bz2
+$(package)_sha256_hash=46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9
+$(package)_dependencies=libxcb
+
+define $(package)_set_vars
+$(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+$(package)_config_opts += --with-pic
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxcb_util_image
+$(package)_version=0.4.0
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-image-$($(package)_version).tar.bz2
+$(package)_sha256_hash=2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc
+$(package)_dependencies=libxcb libxcb_util
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen
+$(package)_config_opts+= --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxcb_util_keysyms
+$(package)_version=0.4.0
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-keysyms-$($(package)_version).tar.bz2
+$(package)_sha256_hash=0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9
+$(package)_dependencies=libxcb xproto
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxcb_util_render
+$(package)_version=0.3.9
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-renderutil-$($(package)_version).tar.bz2
+$(package)_sha256_hash=c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b
+$(package)_dependencies=libxcb
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxcb_util_wm
+$(package)_version=0.4.1
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-wm-$($(package)_version).tar.bz2
+$(package)_sha256_hash=28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f
+$(package)_dependencies=libxcb
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxkbcommon
+$(package)_version=0.8.4
+$(package)_download_path=https://xkbcommon.org/download/
+$(package)_file_name=$(package)-$($(package)_version).tar.xz
+$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b
+$(package)_dependencies=libxcb
+
+# This package explicitly enables -Werror=array-bounds, which causes build failures
+# with GCC 12.1+. Work around that by turning errors back into warnings.
+# This workaround would be dropped if the package was updated, as that would require
+# a different build system (Meson)
+define $(package)_set_vars
+$(package)_config_opts = --enable-option-checking --disable-dependency-tracking
+$(package)_config_opts += --disable-static --disable-docs
+$(package)_cflags += -Wno-error=array-bounds
+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)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/*.la
+endef
--- /dev/null
+package=libzip
+$(package)_version=1.9.2
+$(package)_download_path=https://libzip.org/download/
+$(package)_file_name=libzip-1.9.2.tar.gz
+$(package)_sha256_hash=fd6a7f745de3d69cf5603edc9cb33d2890f0198e415255d0987a0cf10d824c6f
+$(package)_dependencies=zlib native_cmake
+$(package)_patches += no-clonefile.patch
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/no-clonefile.patch
+endef
+
+define $(package)_config_cmds
+ $($(package)_cmake) -DZLIB_ROOT=$(host_prefix) -DENABLE_BZIP2=Off -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=$(host_prefix) .
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
\ No newline at end of file
--- /dev/null
+package=native_ccache
+$(package)_version=3.3.4
+$(package)_download_path=https://samba.org/ftp/ccache
+$(package)_file_name=ccache-$($(package)_version).tar.bz2
+$(package)_sha256_hash=fa9d7f38367431bc86b19ad107d709ca7ecf1574fdacca01698bdf0a47cd8567
+
+define $(package)_set_vars
+$(package)_config_opts=
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf lib include
+endef
--- /dev/null
+package=native_cctools
+$(package)_version=2ef2e931cf641547eb8a68cfebde61003587c9fd
+$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
+$(package)_file_name=$($(package)_version).tar.gz
+$(package)_sha256_hash=6b73269efdf5c58a070e7357b66ee760501388549d6a12b423723f45888b074b
+$(package)_build_subdir=cctools
+$(package)_dependencies=native_libtapi
+
+define $(package)_set_vars
+ $(package)_config_opts=--target=$(host)
+ $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
+ ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
+ $(package)_config_opts+=--enable-lto-support --with-llvm-config=$(build_prefix)/bin/llvm-config
+ endif
+ $(package)_cc=$(clang_prog)
+ $(package)_cxx=$(clangxx_prog)
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub cctools
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share
+endef
\ No newline at end of file
--- /dev/null
+package=native_clang
+$(package)_version=10.0.1
+$(package)_download_path=https://github.com/llvm/llvm-project/releases/download/llvmorg-$($(package)_version)
+ifneq (,$(findstring aarch64,$(BUILD)))
+$(package)_file_name=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz
+$(package)_sha256_hash=90dc69a4758ca15cd0ffa45d07fbf5bf4309d47d2c7745a9f0735ecffde9c31f
+else
+$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz
+$(package)_sha256_hash=48b83ef827ac2c213d5b64f5ad7ed082c8bcb712b46644e0dc5045c6f462c231
+endif
+
+define $(package)_preprocess_cmds
+ rm -f $($(package)_extract_dir)/lib/libc++abi.so*
+endef
+
+define $(package)_stage_cmds
+ mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \
+ mkdir -p $($(package)_staging_prefix_dir)/bin && \
+ cp bin/clang $($(package)_staging_prefix_dir)/bin/ && \
+ cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ && \
+ cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
+ cp bin/llvm-config $($(package)_staging_prefix_dir)/bin/ && \
+ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
+ cp -r lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/
+endef
--- /dev/null
+package=native_cmake
+$(package)_version=3.23.2
+$(package)_version_dot=v3.23
+$(package)_download_path=https://cmake.org/files/$($(package)_version_dot)/
+$(package)_file_name=cmake-$($(package)_version).tar.gz
+$(package)_sha256_hash=f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa
+
+define $(package)_config_cmds
+ ./bootstrap --prefix=$(build_prefix) -- -DCMAKE_USE_OPENSSL=OFF
+endef
+
+define $(package)_build_cmd
+ +$(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
\ No newline at end of file
--- /dev/null
+package=native_ds_store
+$(package)_version=1.3.0
+$(package)_download_path=https://github.com/al45tair/ds_store/archive/
+$(package)_file_name=v$($(package)_version).tar.gz
+$(package)_sha256_hash=76b3280cd4e19e5179defa23fb594a9dd32643b0c80d774bd3108361d94fb46d
+$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
+
+define $(package)_build_cmds
+ python3 setup.py build
+endef
+
+define $(package)_stage_cmds
+ mkdir -p $($(package)_install_libdir) && \
+ python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
+endef
\ No newline at end of file
--- /dev/null
+package=native_libtapi
+$(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026
+$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive
+$(package)_file_name=$($(package)_version).tar.gz
+$(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61
+
+ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
+$(package)_dependencies=native_clang
+endif
+
+define $(package)_build_cmds
+ CC=$(clang_prog) CXX=$(clangxx_prog) INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh
+endef
+
+define $(package)_stage_cmds
+ ./install.sh && \
+ mkdir -p $($(package)_staging_prefix_dir)/include/llvm-c && \
+ cp src/llvm/include/llvm-c/lto.h $($(package)_staging_prefix_dir)/include/llvm-c
+endef
\ No newline at end of file
--- /dev/null
+package=native_linuxdeployqt
+$(package)_version=8
+$(package)_download_path=https://github.com/probonopd/linuxdeployqt/archive/refs/tags/
+$(package)_file_name=8.tar.gz
+$(package)_sha256_hash=5597279392431aef16997c4b6892b5aa044392f7e8869439ebea33945a8bdbad
+$(package)_dependencies=qt
+
+define $(package)_config_cmds
+ qmake
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) INSTALL_ROOT=$($(package)_staging_dir) install
+endef
\ No newline at end of file
--- /dev/null
+package=native_mac_alias
+$(package)_version=2.2.0
+$(package)_download_path=https://github.com/dmgbuild/mac_alias/archive/
+$(package)_file_name=v$($(package)_version).tar.gz
+$(package)_sha256_hash=421e6d7586d1f155c7db3e7da01ca0dacc9649a509a253ad7077b70174426499
+$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
+
+define $(package)_build_cmds
+ python3 setup.py build
+endef
+
+define $(package)_stage_cmds
+ mkdir -p $($(package)_install_libdir) && \
+ python3 setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
+endef
\ No newline at end of file
--- /dev/null
+package=native_patchelf
+$(package)_version=0.14.5
+$(package)_download_path=https://github.com/NixOS/patchelf/releases/download/$($(package)_version)/
+$(package)_file_name=patchelf-$($(package)_version).tar.gz
+$(package)_sha256_hash=113ada3f1ace08f0a7224aa8500f1fa6b08320d8f7df05ff58585286ec5faa6f
+
+define $(package)_config_cmds
+ ./configure --prefix=$(build_prefix)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
\ No newline at end of file
--- /dev/null
+package=native_protobuf
+$(package)_version=3.6.1
+$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/
+$(package)_file_name=protobuf-cpp-3.6.1.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)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) -C src
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/libprotoc.a
+endef
--- /dev/null
+package=native_qmake
+$(package)_version=5.15.3
+$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
+$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz
+$(package)_file_name=qtbase-$($(package)_suffix)
+$(package)_sha256_hash=26394ec9375d52c1592bd7b689b1619c6b8dbe9b6f91fdd5c355589787f3a0b6
+$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
+$(package)_patches += no-xlib.patch
+
+define $(package)_set_vars
+$(package)_config_opts_release = -release
+$(package)_config_opts += -bindir $(build_prefix)/bin
+$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -confirm-license
+$(package)_config_opts += -hostprefix $(build_prefix)
+$(package)_config_opts += -opensource
+$(package)_config_opts += -prefix $(host_prefix)
+$(package)_config_opts += -v
+$(package)_config_opts_linux = -xcb
+$(package)_config_opts_linux += -no-xcb-xlib
+$(package)_config_opts_linux += -no-feature-xlib
+$(package)_config_opts_linux += -no-opengl
+$(package)_config_opts_linux += -no-feature-vulkan
+$(package)_config_opts_linux += -dbus-runtime
+endef
+
+define $(package)_fetch_cmds
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash))
+endef
+
+define $(package)_extract_cmds
+ mkdir -p $($(package)_extract_dir) && \
+ echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ mkdir qtbase && \
+ $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase
+endef
+
+define $(package)_preprocess_cmds
+ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch
+endef
+
+define $(package)_config_cmds
+ cd qtbase && \
+ ./configure $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ cd qtbase && \
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ cd qtbase && \
+ $(MAKE) INSTALL_ROOT=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ echo -n "" > lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake
+endef
--- /dev/null
+package=native_squashfs-tools
+$(package)_version=4.5.1
+$(package)_download_path=https://github.com/plougher/squashfs-tools/archive/refs/tags
+$(package)_file_name=$($(package)_version).tar.gz
+$(package)_sha256_hash=277b6e7f75a4a57f72191295ae62766a10d627a4f5e5f19eadfbc861378deea7
+
+define $(package)_build_cmds
+ cd squashfs-tools && \
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ cd squashfs-tools && \
+ $(MAKE) INSTALL_DIR=$($(package)_staging_dir)$(build_prefix) INSTALL_MANPAGES_DIR="" install
+endef
\ No newline at end of file
--- /dev/null
+package=ncurses
+$(package)_version=6.1
+$(package)_download_path=https://ftp.gnu.org/gnu/ncurses
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17
+$(package)_patches=fallback.c
+
+define $(package)_set_vars
+ $(package)_build_opts=CC="$($(package)_cc)"
+ $(package)_config_env_mingw32=cf_cv_ar_flags=""
+ $(package)_config_env_linux=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=tinfo
+ $(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
+
--- /dev/null
+package=openssl
+$(package)_version=1.1.1l
+$(package)_download_path=https://www.openssl.org/source
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
+$(package)_patches=fix_darwin.patch
+
+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_HOME="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib
+$(package)_build_env_android=ANDROID_NDK_HOME="$(host_prefix)/native"
+$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl
+$(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-heartbeats
+$(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-ssl2
+$(package)_config_opts+=no-ssl3
+$(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_arm_android=--static android-arm
+$(package)_config_opts_aarch64_android=--static android-arm64
+$(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|"engines", "apps", "test", "util", "tools", "fuzz"|"engines", "tools"|' Configure && \
+ patch -p1 < $($(package)_patch_dir)/fix_darwin.patch
+endef
+
+define $(package)_config_cmds
+ ./Configure $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) build_libs
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install_sw
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share bin etc
+endef
--- /dev/null
+native_packages := native_cmake
+packages := boost openssl libiconv ldns unbound qrencode zbar sodium polyseed hidapi protobuf libusb zlib libgpg-error libgcrypt ncurses readline expat
+
+hardware_packages := hidapi protobuf libusb
+hardware_native_packages := native_protobuf
+
+linux_packages := eudev libzip
+linux_native_packages = $(hardware_native_packages) native_patchelf
+# native_linuxdeployqt native_squashfs-tools native_qmake
+
+qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
+qt_darwin_packages=qt
+qt_mingw32_packages=qt
+
+# apt install python3-setuptools
+darwin_packages := libzip
+darwin_native_packages = $(hardware_native_packages) native_ds_store native_mac_alias
+
+tor_linux_packages := libevent tor
+tor_darwin_packages := tor-macos
+
+mingw32_packages = icu4c sodium $(hardware_packages) tor-win libzip
+mingw32_native_packages = $(hardware_native_packages)
+
+ifneq ($(build_os),darwin)
+darwin_native_packages += native_cctools native_libtapi
+
+ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
+darwin_native_packages+= native_clang
+endif
+
+endif
--- /dev/null
+package=polyseed
+$(package)_version=1.0.0
+$(package)_download_path=https://github.com/tevador/polyseed/archive/refs/tags/
+$(package)_file_name=v$($(package)_version).tar.gz
+$(package)_sha256_hash=45f1e6c08575286581079e6e26d341a3a33abe1f1ee2d026bd098cf632ea2349
+$(package)_dependencies=native_cmake
+$(package)_patches=no_shared.patch force-static-mingw.patch
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/no_shared.patch && \
+ patch -p1 < $($(package)_patch_dir)/force-static-mingw.patch
+endef
+
+define $(package)_config_cmds
+ $($(package)_cmake) -DCMAKE_INSTALL_PREFIX=$(host_prefix) -DCMAKE_C_COMPILER= .
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
--- /dev/null
+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
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) -C src libprotobuf.la
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/libprotoc.a &&\
+ rm lib/*.la
+endef
+
--- /dev/null
+package=qrencode
+$(package)_version=3.4.4
+$(package)_download_path=https://fukuchi.org/works/qrencode/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-shared --without-tools --without-tests --disable-sdltest
+$(package)_config_opts += --disable-gprof --disable-gcov --disable-mudflap
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+$(package)_config_opts_linux=--with-pic
+$(package)_config_opts_android=--with-pic
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub use
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/*.la
+endef
--- /dev/null
+package=qt
+$(package)_version=5.15.5
+$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
+$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz
+$(package)_file_name=qtbase-$($(package)_suffix)
+$(package)_sha256_hash=0c42c799aa7c89e479a07c451bf5a301e291266ba789e81afc18f95049524edc
+$(package)_dependencies=openssl
+$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
+$(package)_qt_libs=corelib network widgets gui plugins testlib
+$(package)_linguist_tools = lrelease lupdate lconvert
+$(package)_patches = qt.pro
+$(package)_patches += qttools_src.pro
+$(package)_patches += mac-qmake.conf
+$(package)_patches += fix_qt_pkgconfig.patch
+$(package)_patches += no-xlib.patch
+$(package)_patches += dont_hardcode_x86_64.patch
+$(package)_patches += fix_montery_include.patch
+$(package)_patches += fix_android_jni_static.patch
+$(package)_patches += dont_hardcode_pwd.patch
+$(package)_patches += qtbase-moc-ignore-gcc-macro.patch
+$(package)_patches += use_android_ndk23.patch
+$(package)_patches += rcc_hardcode_timestamp.patch
+$(package)_patches += duplicate_lcqpafonts.patch
+$(package)_patches += fast_fixed_dtoa_no_optimize.patch
+$(package)_patches += guix_cross_lib_path.patch
+
+$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
+$(package)_qttranslations_sha256_hash=c92af4171397a0ed272330b4fa0669790fcac8d050b07c8b8cc565ebeba6735e
+
+$(package)_qttools_file_name=qttools-$($(package)_suffix)
+$(package)_qttools_sha256_hash=6d0778b71b2742cb527561791d1d3d255366163d54a10f78c683a398f09ffc6c
+
+$(package)_qtsvg_file_name=qtsvg-$($(package)_suffix)
+$(package)_qtsvg_sha256_hash=c4cf9e640ad43f157c6b14ee7624047f5945288991ad5de83c9eec673bacb031
+
+$(package)_qtwebsockets_file_name=qtwebsockets-$($(package)_suffix)
+$(package)_qtwebsockets_sha256_hash=66ab8b5bb2e64392fe43786ca1c2fd4be3306fbc4b969aa1748e568b5d062238
+
+
+$(package)_extra_sources = $($(package)_qttranslations_file_name)
+$(package)_extra_sources += $($(package)_qttools_file_name)
+$(package)_extra_sources += $($(package)_qtsvg_file_name)
+$(package)_extra_sources += $($(package)_qtwebsockets_file_name)
+
+define $(package)_set_vars
+$(package)_config_opts_release = -release
+$(package)_config_opts_release += -silent
+$(package)_config_opts_debug = -debug
+$(package)_config_opts_debug += -optimized-tools
+$(package)_config_opts += -bindir $(build_prefix)/bin
+$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -confirm-license
+$(package)_config_opts += -hostprefix $(build_prefix)
+$(package)_config_opts += -no-compile-examples
+$(package)_config_opts += -no-cups
+$(package)_config_opts += -no-egl
+$(package)_config_opts += -no-eglfs
+$(package)_config_opts += -no-evdev
+$(package)_config_opts += -no-gif
+$(package)_config_opts += -no-glib
+$(package)_config_opts += -no-icu
+$(package)_config_opts += -no-ico
+$(package)_config_opts += -no-iconv
+$(package)_config_opts += -no-kms
+$(package)_config_opts += -no-linuxfb
+$(package)_config_opts += -no-libjpeg
+#$(package)_config_opts += -no-libproxy # Needed
+$(package)_config_opts += -no-libudev
+$(package)_config_opts += -no-mtdev
+#$(package)_config_opts += -no-openssl # Needed
+$(package)_config_opts += -no-openvg
+$(package)_config_opts += -no-reduce-relocations
+$(package)_config_opts += -no-schannel
+$(package)_config_opts += -no-sctp
+$(package)_config_opts += -no-securetransport
+$(package)_config_opts += -no-sql-db2
+$(package)_config_opts += -no-sql-ibase
+$(package)_config_opts += -no-sql-oci
+$(package)_config_opts += -no-sql-tds
+$(package)_config_opts += -no-sql-mysql
+$(package)_config_opts += -no-sql-odbc
+$(package)_config_opts += -no-sql-psql
+$(package)_config_opts += -no-sql-sqlite
+$(package)_config_opts += -no-sql-sqlite2
+$(package)_config_opts += -no-system-proxies
+$(package)_config_opts += -no-use-gold-linker
+$(package)_config_opts += -no-zstd
+$(package)_config_opts += -nomake examples
+$(package)_config_opts += -nomake tests
+$(package)_config_opts += -nomake tools
+$(package)_config_opts += -opensource
+$(package)_config_opts += -openssl-linked
+$(package)_config_opts += -pkg-config
+$(package)_config_opts += -prefix $(host_prefix)
+$(package)_config_opts += -qt-libpng
+$(package)_config_opts += -qt-pcre
+$(package)_config_opts += -qt-harfbuzz
+$(package)_config_opts += -qt-zlib
+$(package)_config_opts += -static
+$(package)_config_opts += -v
+$(package)_config_opts += -no-feature-bearermanagement
+$(package)_config_opts += -no-feature-colordialog
+$(package)_config_opts += -no-feature-dial
+$(package)_config_opts += -no-feature-fontcombobox
+$(package)_config_opts += -no-feature-ftp
+$(package)_config_opts += -no-feature-http
+$(package)_config_opts += -no-feature-image_heuristic_mask
+$(package)_config_opts += -no-feature-keysequenceedit
+$(package)_config_opts += -no-feature-lcdnumber
+$(package)_config_opts += -no-feature-networkdiskcache
+$(package)_config_opts += -no-feature-pdf
+$(package)_config_opts += -no-feature-printdialog
+$(package)_config_opts += -no-feature-printer
+$(package)_config_opts += -no-feature-printpreviewdialog
+$(package)_config_opts += -no-feature-printpreviewwidget
+$(package)_config_opts += -no-feature-sessionmanager
+$(package)_config_opts += -no-feature-sql
+$(package)_config_opts += -no-feature-sqlmodel
+$(package)_config_opts += -no-feature-statemachine
+$(package)_config_opts += -no-feature-syntaxhighlighter
+$(package)_config_opts += -no-feature-textmarkdownwriter
+$(package)_config_opts += -no-feature-textodfwriter
+$(package)_config_opts += -no-feature-topleveldomain
+$(package)_config_opts += -no-feature-undocommand
+$(package)_config_opts += -no-feature-undogroup
+$(package)_config_opts += -no-feature-undostack
+$(package)_config_opts += -no-feature-undoview
+$(package)_config_opts += -no-feature-vnc
+$(package)_config_opts += -no-feature-xml
+
+$(package)_config_opts_darwin = -no-dbus
+$(package)_config_opts_darwin += -no-opengl
+$(package)_config_opts_darwin += -pch
+$(package)_config_opts_darwin += -no-feature-corewlan
+$(package)_config_opts_darwin += -no-freetype
+$(package)_config_opts_darwin += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION)
+
+ifneq ($(build_os),darwin)
+$(package)_config_opts_darwin += -xplatform macx-clang-linux
+$(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK)
+$(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION)
+$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-"
+$(package)_config_opts_darwin += -device-option MAC_TARGET=$(host)
+$(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION)
+endif
+
+ifneq ($(build_arch),$(host_arch))
+$(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64
+$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64
+endif
+
+$(package)_config_opts_linux = -xcb
+$(package)_config_opts_linux += -no-xcb-xlib
+$(package)_config_opts_linux += -no-feature-xlib
+$(package)_config_opts_linux += -system-freetype
+$(package)_config_opts_linux += -fontconfig
+$(package)_config_opts_linux += -no-opengl
+$(package)_config_opts_linux += -no-feature-vulkan
+$(package)_config_opts_linux += -dbus-runtime
+ifneq ($(LTO),)
+$(package)_config_opts_linux += -ltcg
+endif
+$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
+$(package)_config_opts_i686_linux = -xplatform linux-g++-32
+ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))
+$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++
+else
+$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
+endif
+$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
+$(package)_config_opts_powerpc64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
+$(package)_config_opts_powerpc64le_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
+$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
+$(package)_config_opts_s390x_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
+
+$(package)_config_opts_mingw32 = -no-opengl
+$(package)_config_opts_mingw32 += -no-dbus
+$(package)_config_opts_mingw32 += -no-freetype
+$(package)_config_opts_mingw32 += -xplatform win32-g++
+$(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'"
+$(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'"
+$(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cxxflags) $($(package)_cppflags)'"
+$(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'"
+$(package)_config_opts_mingw32 += "QMAKE_LIB = '$($(package)_ar) rc'"
+$(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-"
+$(package)_config_opts_mingw32 += -pch
+
+$(package)_config_opts_android = -xplatform android-clang
+$(package)_config_opts_android += -android-sdk $(ANDROID_SDK)
+$(package)_config_opts_android += -android-ndk $(ANDROID_NDK)
+$(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LEVEL)
+$(package)_config_opts_android += -egl
+$(package)_config_opts_android += -no-dbus
+$(package)_config_opts_android += -opengl es2
+$(package)_config_opts_android += -qt-freetype
+$(package)_config_opts_android += -no-fontconfig
+$(package)_config_opts_android += -L $(host_prefix)/lib
+$(package)_config_opts_android += -I $(host_prefix)/include
+$(package)_config_opts_android += -pch
+$(package)_config_opts_android += -no-feature-vulkan
+
+$(package)_config_opts_aarch64_android += -android-arch arm64-v8a
+$(package)_config_opts_armv7a_android += -android-arch armeabi-v7a
+$(package)_config_opts_x86_64_android += -android-arch x86_64
+
+$(package)_openssl_flags_$(host_os)="-lssl -lcrypto -lpthread -ldl"
+$(package)_openssl_flags_mingw32="-lssl -lcrypto -lws2_32"
+endef
+
+define $(package)_fetch_cmds
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtsvg_file_name),$($(package)_qtsvg_file_name),$($(package)_qtsvg_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtwebsockets_file_name),$($(package)_qtwebsockets_file_name),$($(package)_qtwebsockets_sha256_hash))
+endef
+
+define $(package)_extract_cmds
+ mkdir -p $($(package)_extract_dir) && \
+ echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ echo "$($(package)_qtsvg_sha256_hash) $($(package)_source_dir)/$($(package)_qtsvg_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ echo "$($(package)_qtwebsockets_sha256_hash) $($(package)_source_dir)/$($(package)_qtwebsockets_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
+ mkdir qtbase && \
+ $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source) -C qtbase && \
+ mkdir qttranslations && \
+ $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
+ mkdir qttools && \
+ $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools && \
+ mkdir qtsvg && \
+ $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtsvg_file_name) -C qtsvg && \
+ mkdir qtwebsockets && \
+ $(build_TAR) --no-same-owner --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qtwebsockets_file_name) -C qtwebsockets
+endef
+
+# Preprocessing steps work as follows:
+#
+# 1. Apply our patches to the extracted source. See each patch for more info.
+#
+# 2. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf.
+#
+# 3. After making a copy of the mkspec for the linux-arm-gnueabi host, named
+# bitcoin-linux-g++, replace instances of linux-arm-gnueabi with $(host). This
+# way we can generically support hosts like riscv64-linux-gnu, which Qt doesn't
+# ship a mkspec for. See it's usage in config_opts_* above.
+#
+# 4. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds.
+#
+# 5. Do similar for the win32-g++ mkspec.
+#
+# 6. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466.
+#
+# 7. Adjust a regex in toolchain.prf, to accommodate Guix's usage of
+# CROSS_LIBRARY_PATH. See #15277.
+define $(package)_preprocess_cmds
+ cp $($(package)_patch_dir)/qt.pro qt.pro && \
+ cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \
+ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \
+ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
+ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_x86_64.patch && \
+ patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_montery_include.patch && \
+ patch -p1 -i $($(package)_patch_dir)/use_android_ndk23.patch && \
+ patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
+ patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \
+ patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
+ mkdir -p qtbase/mkspecs/macx-clang-linux &&\
+ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
+ cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
+ cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
+ sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
+ echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+ echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+ echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+ sed -i.old "s|QMAKE_CC = \$$$$\$$$${CROSS_COMPILE}clang|QMAKE_CC = $($(package)_cc)|" qtbase/mkspecs/common/clang.conf && \
+ sed -i.old "s|QMAKE_CXX = \$$$$\$$$${CROSS_COMPILE}clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf
+endef
+
+define $(package)_config_cmds
+ export OPENSSL_LIBS=${$(package)_openssl_flags_$(host_os)} \
+ export PKG_CONFIG_SYSROOT_DIR=/ && \
+ export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
+ export QT_MAC_SDK_NO_VERSION_CHECK=1 && \
+ cd qtbase && \
+ ./configure -top-level $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) -C qtbase INSTALL_ROOT=$($(package)_staging_dir) install && \
+ $(MAKE) -C qttools/src/linguist INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_linguist_tools))) && \
+ $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets && \
+ $(MAKE) -C qtsvg/src INSTALL_ROOT=$($(package)_staging_dir) install && \
+ $(MAKE) -C qtwebsockets/src INSTALL_ROOT=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ echo -n "" > lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake
+endef
--- /dev/null
+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) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) install DESTDIR=$($(package)_staging_dir) prefix=$(host_prefix) exec-prefix=$(host_prefix)
+endef
+
--- /dev/null
+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_opts=--enable-static --disable-shared
+$(package)_config_opts+=--prefix=$(host_prefix)
+endef
+
+define $(package)_preprocess_cmds
+ patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\
+ autoconf &&\
+ patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/*.la
+endef
+
--- /dev/null
+package=tor-win
+$(package)_version=0.4.7.8
+$(package)_download_path=https://dist.torproject.org/torbrowser/11.5.1/
+$(package)_file_name=TorBrowser-11.5.1-osx64_en-US.dmg
+$(package)_sha256_hash=616d719572e4917d1264c622033afb1b4dd98e2553a0d09fd72470c99bad48e5
+$(package)_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 && \
+ 7z x $$($(1)_source)
+
+define $(package)_stage_cmds
+ mv Tor\ Browser.app/Contents/MacOS/Tor/tor.real Tor\ Browser.app/Contents/MacOS/Tor/tor && \
+ cp -a Tor\ Browser.app/Contents/MacOS/Tor $($(package)_staging_prefix_dir)/Tor/
+endef
\ No newline at end of file
--- /dev/null
+package=tor-win
+$(package)_version=0.4.7.8
+$(package)_download_path=https://dist.torproject.org/torbrowser/11.5.1/
+$(package)_file_name=tor-win64-$($(package)_version).zip
+$(package)_sha256_hash=6658aaf7d22052861631917590e248fdf8b3fe40a795d740811362b517113a47
+$(package)_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 && \
+ unzip $$($(1)_source)
+
+define $(package)_stage_cmds
+ cp -a Tor $($(package)_staging_prefix_dir)/Tor/
+endef
\ No newline at end of file
--- /dev/null
+package=tor
+$(package)_version=0.4.7.7
+$(package)_download_path=https://dist.torproject.org/
+$(package)_file_name=tor-$($(package)_version).tar.gz
+$(package)_sha256_hash=3e131158b52b9435d7e43d1c47ef288b96d005342cc44b8c950bb403851a5b44
+$(package)_dependencies=libevent openssl zlib
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-asciidoc --disable-manpage --disable-html-manual --disable-system-torrc
+ $(package)_config_opts+=--disable-module-relay --disable-lzma --disable-zstd --enable-static-tor
+ $(package)_config_opts+=--with-libevent-dir=$(host_prefix) --with-openssl-dir=$(host_prefix)
+ $(package)_config_opts+=--with-zlib-dir=$(host_prefix) --disable-tool-name-check --enable-fatal-warnings
+ $(package)_config_opts+=--prefix=$(host_prefix)
+endef
+
+define $(package)_config_cmds
+ ./configure $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ strip -s -D bin/tor && \
+ mkdir $($(package)_staging_prefix_dir)/Tor/ && \
+ cp bin/tor $($(package)_staging_prefix_dir)/Tor
+endef
\ No newline at end of file
--- /dev/null
+package=unbound
+$(package)_version=1.13.2
+$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=0a13b547f3b92a026b5ebd0423f54c991e5718037fd9f72445817f6a040e1a83
+$(package)_dependencies=openssl expat ldns
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix) --with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no --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)_build_opts_mingw32=LDFLAGS="$($(package)_ldflags) -lpthread"
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf) $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+endef
--- /dev/null
+package=xcb_proto
+$(package)_version=1.14.1
+$(package)_download_path=https://xorg.freedesktop.org/archive/individual/proto
+$(package)_file_name=xcb-proto-$($(package)_version).tar.xz
+$(package)_sha256_hash=f04add9a972ac334ea11d9d7eb4fc7f8883835da3e4859c9afa971efdf57fcc3
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf lib/python*/site-packages/xcbgen/__pycache__
+endef
--- /dev/null
+package=xproto
+$(package)_version=7.0.31
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747
+
+define $(package)_set_vars
+$(package)_config_opts=--without-fop --without-xmlto --without-xsltproc --disable-specs
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
--- /dev/null
+package=zbar
+$(package)_version=0.23.92
+$(package)_download_path=https://github.com/mchehab/zbar/archive/refs/tags/
+$(package)_file_name=$($(package)_version).tar.gz
+$(package)_sha256_hash=dffc16695cb6e42fa318a4946fd42866c0f5ab735f7eaf450b108d1c3a19b4ba
+$(package)_dependencies=libiconv
+
+define $(package)_set_vars
+ $(package)_build_opts=CFLAGS="-fPIE"
+ $(package)_build_opts+=CXXFLAGS="-fPIE"
+endef
+
+define $(package)_preprocess_cmds
+ autoreconf -vfi
+endef
+
+define $(package)_set_vars
+ $(package)_config_opts=--prefix=$(host_prefix) --disable-shared --without-imagemagick --disable-video --without-xv --with-gtk=no --with-python=no --enable-doc=no --host=$(host)
+endef
+
+define $(package)_config_cmds
+ CFLAGS="-fPIE" CXXFLAGS="-fPIE" $($(package)_autoconf) $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+ CFLAGS="-fPIE" CXXFLAGS="-fPIE" $(MAKE) $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
\ No newline at end of file
--- /dev/null
+package=zlib
+$(package)_version=1.2.11
+$(package)_download_path=https://github.com/madler/zlib/archive/refs/tags/
+$(package)_file_name=v1.2.11.tar.gz
+$(package)_sha256_hash=629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff
+
+define $(package)_config_cmds
+ CC="$($(package)_cc)" \
+ CXX="$($(package)_cxx)" \
+ AR="$($(package)_ar)" \
+ RANLIB="$($(package)_ranlib)" \
+ LIBTOOL="$($(package)_libtool)" \
+ LDLAGS="$($(package)_ldflags)" \
+ CFLAGS="-fPIE" \
+ CXXFLAGS="-fPIE" \
+ ./configure --static --prefix=$(host_prefix)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
\ No newline at end of file
--- /dev/null
+--- 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 ;
+ }
+ }
+ }
--- /dev/null
+--- 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)" "$(<)"
+ }
+
--- /dev/null
+--- boost_1_64_0/tools/build/src/tools/darwin.jam
++++ boost_1_64_0/tools/build/src/tools/darwin.jam
+@@ -138,10 +138,10 @@ rule init ( version ? : command * : options * : requirement * )
+ common.handle-options darwin : $(condition) : $(command) : $(options) ;
+
+ # - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
+- if $(real-version) < "4.0.0"
+- {
+- flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
+- }
++ #if $(real-version) < "4.0.0"
++ #{
++ # flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
++ #}
+ # - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
+ if $(real-version) < "4.2.0"
+ {
--- /dev/null
+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(
--- /dev/null
+commit 7b6eb33ecd88768b28c67ce5d2d68a7eed5936b6
+Author: fanquake <fanquake@gmail.com>
+Date: Tue Aug 25 14:34:53 2020 +0800
+
+ Remove rule that causes inadvertent header regeneration
+
+ Otherwise the makefile will needlessly attempt to re-generate the
+ headers with gperf. This can be dropped once the upstream build is fixed.
+
+ See #10851.
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index f4626ad..4ae1b00 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -912,7 +912,7 @@
+ ' - > $@.tmp && \
+ mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false )
+
+-fcobjshash.h: Makefile fcobjshash.gperf
++fcobjshash.h:
+ $(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > $@.tmp && \
+ mv -f $@.tmp $@ || ( $(RM) $@.tmp && false )
+
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+static const u32 sbox_test_3411[4*256] =
+ {
+ /* 0 */
+ 0x00072000, 0x00075000, 0x00074800, 0x00071000,
+ 0x00076800, 0x00074000, 0x00070000, 0x00077000,
+ 0x00073000, 0x00075800, 0x00070800, 0x00076000,
+ 0x00073800, 0x00077800, 0x00072800, 0x00071800,
+ 0x0005a000, 0x0005d000, 0x0005c800, 0x00059000,
+ 0x0005e800, 0x0005c000, 0x00058000, 0x0005f000,
+ 0x0005b000, 0x0005d800, 0x00058800, 0x0005e000,
+ 0x0005b800, 0x0005f800, 0x0005a800, 0x00059800,
+ 0x00022000, 0x00025000, 0x00024800, 0x00021000,
+ 0x00026800, 0x00024000, 0x00020000, 0x00027000,
+ 0x00023000, 0x00025800, 0x00020800, 0x00026000,
+ 0x00023800, 0x00027800, 0x00022800, 0x00021800,
+ 0x00062000, 0x00065000, 0x00064800, 0x00061000,
+ 0x00066800, 0x00064000, 0x00060000, 0x00067000,
+ 0x00063000, 0x00065800, 0x00060800, 0x00066000,
+ 0x00063800, 0x00067800, 0x00062800, 0x00061800,
+ 0x00032000, 0x00035000, 0x00034800, 0x00031000,
+ 0x00036800, 0x00034000, 0x00030000, 0x00037000,
+ 0x00033000, 0x00035800, 0x00030800, 0x00036000,
+ 0x00033800, 0x00037800, 0x00032800, 0x00031800,
+ 0x0006a000, 0x0006d000, 0x0006c800, 0x00069000,
+ 0x0006e800, 0x0006c000, 0x00068000, 0x0006f000,
+ 0x0006b000, 0x0006d800, 0x00068800, 0x0006e000,
+ 0x0006b800, 0x0006f800, 0x0006a800, 0x00069800,
+ 0x0007a000, 0x0007d000, 0x0007c800, 0x00079000,
+ 0x0007e800, 0x0007c000, 0x00078000, 0x0007f000,
+ 0x0007b000, 0x0007d800, 0x00078800, 0x0007e000,
+ 0x0007b800, 0x0007f800, 0x0007a800, 0x00079800,
+ 0x00052000, 0x00055000, 0x00054800, 0x00051000,
+ 0x00056800, 0x00054000, 0x00050000, 0x00057000,
+ 0x00053000, 0x00055800, 0x00050800, 0x00056000,
+ 0x00053800, 0x00057800, 0x00052800, 0x00051800,
+ 0x00012000, 0x00015000, 0x00014800, 0x00011000,
+ 0x00016800, 0x00014000, 0x00010000, 0x00017000,
+ 0x00013000, 0x00015800, 0x00010800, 0x00016000,
+ 0x00013800, 0x00017800, 0x00012800, 0x00011800,
+ 0x0001a000, 0x0001d000, 0x0001c800, 0x00019000,
+ 0x0001e800, 0x0001c000, 0x00018000, 0x0001f000,
+ 0x0001b000, 0x0001d800, 0x00018800, 0x0001e000,
+ 0x0001b800, 0x0001f800, 0x0001a800, 0x00019800,
+ 0x00042000, 0x00045000, 0x00044800, 0x00041000,
+ 0x00046800, 0x00044000, 0x00040000, 0x00047000,
+ 0x00043000, 0x00045800, 0x00040800, 0x00046000,
+ 0x00043800, 0x00047800, 0x00042800, 0x00041800,
+ 0x0000a000, 0x0000d000, 0x0000c800, 0x00009000,
+ 0x0000e800, 0x0000c000, 0x00008000, 0x0000f000,
+ 0x0000b000, 0x0000d800, 0x00008800, 0x0000e000,
+ 0x0000b800, 0x0000f800, 0x0000a800, 0x00009800,
+ 0x00002000, 0x00005000, 0x00004800, 0x00001000,
+ 0x00006800, 0x00004000, 0x00000000, 0x00007000,
+ 0x00003000, 0x00005800, 0x00000800, 0x00006000,
+ 0x00003800, 0x00007800, 0x00002800, 0x00001800,
+ 0x0003a000, 0x0003d000, 0x0003c800, 0x00039000,
+ 0x0003e800, 0x0003c000, 0x00038000, 0x0003f000,
+ 0x0003b000, 0x0003d800, 0x00038800, 0x0003e000,
+ 0x0003b800, 0x0003f800, 0x0003a800, 0x00039800,
+ 0x0002a000, 0x0002d000, 0x0002c800, 0x00029000,
+ 0x0002e800, 0x0002c000, 0x00028000, 0x0002f000,
+ 0x0002b000, 0x0002d800, 0x00028800, 0x0002e000,
+ 0x0002b800, 0x0002f800, 0x0002a800, 0x00029800,
+ 0x0004a000, 0x0004d000, 0x0004c800, 0x00049000,
+ 0x0004e800, 0x0004c000, 0x00048000, 0x0004f000,
+ 0x0004b000, 0x0004d800, 0x00048800, 0x0004e000,
+ 0x0004b800, 0x0004f800, 0x0004a800, 0x00049800,
+ /* 1 */
+ 0x03a80000, 0x03c00000, 0x03880000, 0x03e80000,
+ 0x03d00000, 0x03980000, 0x03a00000, 0x03900000,
+ 0x03f00000, 0x03f80000, 0x03e00000, 0x03b80000,
+ 0x03b00000, 0x03800000, 0x03c80000, 0x03d80000,
+ 0x06a80000, 0x06c00000, 0x06880000, 0x06e80000,
+ 0x06d00000, 0x06980000, 0x06a00000, 0x06900000,
+ 0x06f00000, 0x06f80000, 0x06e00000, 0x06b80000,
+ 0x06b00000, 0x06800000, 0x06c80000, 0x06d80000,
+ 0x05280000, 0x05400000, 0x05080000, 0x05680000,
+ 0x05500000, 0x05180000, 0x05200000, 0x05100000,
+ 0x05700000, 0x05780000, 0x05600000, 0x05380000,
+ 0x05300000, 0x05000000, 0x05480000, 0x05580000,
+ 0x00a80000, 0x00c00000, 0x00880000, 0x00e80000,
+ 0x00d00000, 0x00980000, 0x00a00000, 0x00900000,
+ 0x00f00000, 0x00f80000, 0x00e00000, 0x00b80000,
+ 0x00b00000, 0x00800000, 0x00c80000, 0x00d80000,
+ 0x00280000, 0x00400000, 0x00080000, 0x00680000,
+ 0x00500000, 0x00180000, 0x00200000, 0x00100000,
+ 0x00700000, 0x00780000, 0x00600000, 0x00380000,
+ 0x00300000, 0x00000000, 0x00480000, 0x00580000,
+ 0x04280000, 0x04400000, 0x04080000, 0x04680000,
+ 0x04500000, 0x04180000, 0x04200000, 0x04100000,
+ 0x04700000, 0x04780000, 0x04600000, 0x04380000,
+ 0x04300000, 0x04000000, 0x04480000, 0x04580000,
+ 0x04a80000, 0x04c00000, 0x04880000, 0x04e80000,
+ 0x04d00000, 0x04980000, 0x04a00000, 0x04900000,
+ 0x04f00000, 0x04f80000, 0x04e00000, 0x04b80000,
+ 0x04b00000, 0x04800000, 0x04c80000, 0x04d80000,
+ 0x07a80000, 0x07c00000, 0x07880000, 0x07e80000,
+ 0x07d00000, 0x07980000, 0x07a00000, 0x07900000,
+ 0x07f00000, 0x07f80000, 0x07e00000, 0x07b80000,
+ 0x07b00000, 0x07800000, 0x07c80000, 0x07d80000,
+ 0x07280000, 0x07400000, 0x07080000, 0x07680000,
+ 0x07500000, 0x07180000, 0x07200000, 0x07100000,
+ 0x07700000, 0x07780000, 0x07600000, 0x07380000,
+ 0x07300000, 0x07000000, 0x07480000, 0x07580000,
+ 0x02280000, 0x02400000, 0x02080000, 0x02680000,
+ 0x02500000, 0x02180000, 0x02200000, 0x02100000,
+ 0x02700000, 0x02780000, 0x02600000, 0x02380000,
+ 0x02300000, 0x02000000, 0x02480000, 0x02580000,
+ 0x03280000, 0x03400000, 0x03080000, 0x03680000,
+ 0x03500000, 0x03180000, 0x03200000, 0x03100000,
+ 0x03700000, 0x03780000, 0x03600000, 0x03380000,
+ 0x03300000, 0x03000000, 0x03480000, 0x03580000,
+ 0x06280000, 0x06400000, 0x06080000, 0x06680000,
+ 0x06500000, 0x06180000, 0x06200000, 0x06100000,
+ 0x06700000, 0x06780000, 0x06600000, 0x06380000,
+ 0x06300000, 0x06000000, 0x06480000, 0x06580000,
+ 0x05a80000, 0x05c00000, 0x05880000, 0x05e80000,
+ 0x05d00000, 0x05980000, 0x05a00000, 0x05900000,
+ 0x05f00000, 0x05f80000, 0x05e00000, 0x05b80000,
+ 0x05b00000, 0x05800000, 0x05c80000, 0x05d80000,
+ 0x01280000, 0x01400000, 0x01080000, 0x01680000,
+ 0x01500000, 0x01180000, 0x01200000, 0x01100000,
+ 0x01700000, 0x01780000, 0x01600000, 0x01380000,
+ 0x01300000, 0x01000000, 0x01480000, 0x01580000,
+ 0x02a80000, 0x02c00000, 0x02880000, 0x02e80000,
+ 0x02d00000, 0x02980000, 0x02a00000, 0x02900000,
+ 0x02f00000, 0x02f80000, 0x02e00000, 0x02b80000,
+ 0x02b00000, 0x02800000, 0x02c80000, 0x02d80000,
+ 0x01a80000, 0x01c00000, 0x01880000, 0x01e80000,
+ 0x01d00000, 0x01980000, 0x01a00000, 0x01900000,
+ 0x01f00000, 0x01f80000, 0x01e00000, 0x01b80000,
+ 0x01b00000, 0x01800000, 0x01c80000, 0x01d80000,
+ /* 2 */
+ 0x30000002, 0x60000002, 0x38000002, 0x08000002,
+ 0x28000002, 0x78000002, 0x68000002, 0x40000002,
+ 0x20000002, 0x50000002, 0x48000002, 0x70000002,
+ 0x00000002, 0x18000002, 0x58000002, 0x10000002,
+ 0xb0000005, 0xe0000005, 0xb8000005, 0x88000005,
+ 0xa8000005, 0xf8000005, 0xe8000005, 0xc0000005,
+ 0xa0000005, 0xd0000005, 0xc8000005, 0xf0000005,
+ 0x80000005, 0x98000005, 0xd8000005, 0x90000005,
+ 0x30000005, 0x60000005, 0x38000005, 0x08000005,
+ 0x28000005, 0x78000005, 0x68000005, 0x40000005,
+ 0x20000005, 0x50000005, 0x48000005, 0x70000005,
+ 0x00000005, 0x18000005, 0x58000005, 0x10000005,
+ 0x30000000, 0x60000000, 0x38000000, 0x08000000,
+ 0x28000000, 0x78000000, 0x68000000, 0x40000000,
+ 0x20000000, 0x50000000, 0x48000000, 0x70000000,
+ 0x00000000, 0x18000000, 0x58000000, 0x10000000,
+ 0xb0000003, 0xe0000003, 0xb8000003, 0x88000003,
+ 0xa8000003, 0xf8000003, 0xe8000003, 0xc0000003,
+ 0xa0000003, 0xd0000003, 0xc8000003, 0xf0000003,
+ 0x80000003, 0x98000003, 0xd8000003, 0x90000003,
+ 0x30000001, 0x60000001, 0x38000001, 0x08000001,
+ 0x28000001, 0x78000001, 0x68000001, 0x40000001,
+ 0x20000001, 0x50000001, 0x48000001, 0x70000001,
+ 0x00000001, 0x18000001, 0x58000001, 0x10000001,
+ 0xb0000000, 0xe0000000, 0xb8000000, 0x88000000,
+ 0xa8000000, 0xf8000000, 0xe8000000, 0xc0000000,
+ 0xa0000000, 0xd0000000, 0xc8000000, 0xf0000000,
+ 0x80000000, 0x98000000, 0xd8000000, 0x90000000,
+ 0xb0000006, 0xe0000006, 0xb8000006, 0x88000006,
+ 0xa8000006, 0xf8000006, 0xe8000006, 0xc0000006,
+ 0xa0000006, 0xd0000006, 0xc8000006, 0xf0000006,
+ 0x80000006, 0x98000006, 0xd8000006, 0x90000006,
+ 0xb0000001, 0xe0000001, 0xb8000001, 0x88000001,
+ 0xa8000001, 0xf8000001, 0xe8000001, 0xc0000001,
+ 0xa0000001, 0xd0000001, 0xc8000001, 0xf0000001,
+ 0x80000001, 0x98000001, 0xd8000001, 0x90000001,
+ 0x30000003, 0x60000003, 0x38000003, 0x08000003,
+ 0x28000003, 0x78000003, 0x68000003, 0x40000003,
+ 0x20000003, 0x50000003, 0x48000003, 0x70000003,
+ 0x00000003, 0x18000003, 0x58000003, 0x10000003,
+ 0x30000004, 0x60000004, 0x38000004, 0x08000004,
+ 0x28000004, 0x78000004, 0x68000004, 0x40000004,
+ 0x20000004, 0x50000004, 0x48000004, 0x70000004,
+ 0x00000004, 0x18000004, 0x58000004, 0x10000004,
+ 0xb0000002, 0xe0000002, 0xb8000002, 0x88000002,
+ 0xa8000002, 0xf8000002, 0xe8000002, 0xc0000002,
+ 0xa0000002, 0xd0000002, 0xc8000002, 0xf0000002,
+ 0x80000002, 0x98000002, 0xd8000002, 0x90000002,
+ 0xb0000004, 0xe0000004, 0xb8000004, 0x88000004,
+ 0xa8000004, 0xf8000004, 0xe8000004, 0xc0000004,
+ 0xa0000004, 0xd0000004, 0xc8000004, 0xf0000004,
+ 0x80000004, 0x98000004, 0xd8000004, 0x90000004,
+ 0x30000006, 0x60000006, 0x38000006, 0x08000006,
+ 0x28000006, 0x78000006, 0x68000006, 0x40000006,
+ 0x20000006, 0x50000006, 0x48000006, 0x70000006,
+ 0x00000006, 0x18000006, 0x58000006, 0x10000006,
+ 0xb0000007, 0xe0000007, 0xb8000007, 0x88000007,
+ 0xa8000007, 0xf8000007, 0xe8000007, 0xc0000007,
+ 0xa0000007, 0xd0000007, 0xc8000007, 0xf0000007,
+ 0x80000007, 0x98000007, 0xd8000007, 0x90000007,
+ 0x30000007, 0x60000007, 0x38000007, 0x08000007,
+ 0x28000007, 0x78000007, 0x68000007, 0x40000007,
+ 0x20000007, 0x50000007, 0x48000007, 0x70000007,
+ 0x00000007, 0x18000007, 0x58000007, 0x10000007,
+ /* 3 */
+ 0x000000e8, 0x000000d8, 0x000000a0, 0x00000088,
+ 0x00000098, 0x000000f8, 0x000000a8, 0x000000c8,
+ 0x00000080, 0x000000d0, 0x000000f0, 0x000000b8,
+ 0x000000b0, 0x000000c0, 0x00000090, 0x000000e0,
+ 0x000007e8, 0x000007d8, 0x000007a0, 0x00000788,
+ 0x00000798, 0x000007f8, 0x000007a8, 0x000007c8,
+ 0x00000780, 0x000007d0, 0x000007f0, 0x000007b8,
+ 0x000007b0, 0x000007c0, 0x00000790, 0x000007e0,
+ 0x000006e8, 0x000006d8, 0x000006a0, 0x00000688,
+ 0x00000698, 0x000006f8, 0x000006a8, 0x000006c8,
+ 0x00000680, 0x000006d0, 0x000006f0, 0x000006b8,
+ 0x000006b0, 0x000006c0, 0x00000690, 0x000006e0,
+ 0x00000068, 0x00000058, 0x00000020, 0x00000008,
+ 0x00000018, 0x00000078, 0x00000028, 0x00000048,
+ 0x00000000, 0x00000050, 0x00000070, 0x00000038,
+ 0x00000030, 0x00000040, 0x00000010, 0x00000060,
+ 0x000002e8, 0x000002d8, 0x000002a0, 0x00000288,
+ 0x00000298, 0x000002f8, 0x000002a8, 0x000002c8,
+ 0x00000280, 0x000002d0, 0x000002f0, 0x000002b8,
+ 0x000002b0, 0x000002c0, 0x00000290, 0x000002e0,
+ 0x000003e8, 0x000003d8, 0x000003a0, 0x00000388,
+ 0x00000398, 0x000003f8, 0x000003a8, 0x000003c8,
+ 0x00000380, 0x000003d0, 0x000003f0, 0x000003b8,
+ 0x000003b0, 0x000003c0, 0x00000390, 0x000003e0,
+ 0x00000568, 0x00000558, 0x00000520, 0x00000508,
+ 0x00000518, 0x00000578, 0x00000528, 0x00000548,
+ 0x00000500, 0x00000550, 0x00000570, 0x00000538,
+ 0x00000530, 0x00000540, 0x00000510, 0x00000560,
+ 0x00000268, 0x00000258, 0x00000220, 0x00000208,
+ 0x00000218, 0x00000278, 0x00000228, 0x00000248,
+ 0x00000200, 0x00000250, 0x00000270, 0x00000238,
+ 0x00000230, 0x00000240, 0x00000210, 0x00000260,
+ 0x000004e8, 0x000004d8, 0x000004a0, 0x00000488,
+ 0x00000498, 0x000004f8, 0x000004a8, 0x000004c8,
+ 0x00000480, 0x000004d0, 0x000004f0, 0x000004b8,
+ 0x000004b0, 0x000004c0, 0x00000490, 0x000004e0,
+ 0x00000168, 0x00000158, 0x00000120, 0x00000108,
+ 0x00000118, 0x00000178, 0x00000128, 0x00000148,
+ 0x00000100, 0x00000150, 0x00000170, 0x00000138,
+ 0x00000130, 0x00000140, 0x00000110, 0x00000160,
+ 0x000001e8, 0x000001d8, 0x000001a0, 0x00000188,
+ 0x00000198, 0x000001f8, 0x000001a8, 0x000001c8,
+ 0x00000180, 0x000001d0, 0x000001f0, 0x000001b8,
+ 0x000001b0, 0x000001c0, 0x00000190, 0x000001e0,
+ 0x00000768, 0x00000758, 0x00000720, 0x00000708,
+ 0x00000718, 0x00000778, 0x00000728, 0x00000748,
+ 0x00000700, 0x00000750, 0x00000770, 0x00000738,
+ 0x00000730, 0x00000740, 0x00000710, 0x00000760,
+ 0x00000368, 0x00000358, 0x00000320, 0x00000308,
+ 0x00000318, 0x00000378, 0x00000328, 0x00000348,
+ 0x00000300, 0x00000350, 0x00000370, 0x00000338,
+ 0x00000330, 0x00000340, 0x00000310, 0x00000360,
+ 0x000005e8, 0x000005d8, 0x000005a0, 0x00000588,
+ 0x00000598, 0x000005f8, 0x000005a8, 0x000005c8,
+ 0x00000580, 0x000005d0, 0x000005f0, 0x000005b8,
+ 0x000005b0, 0x000005c0, 0x00000590, 0x000005e0,
+ 0x00000468, 0x00000458, 0x00000420, 0x00000408,
+ 0x00000418, 0x00000478, 0x00000428, 0x00000448,
+ 0x00000400, 0x00000450, 0x00000470, 0x00000438,
+ 0x00000430, 0x00000440, 0x00000410, 0x00000460,
+ 0x00000668, 0x00000658, 0x00000620, 0x00000608,
+ 0x00000618, 0x00000678, 0x00000628, 0x00000648,
+ 0x00000600, 0x00000650, 0x00000670, 0x00000638,
+ 0x00000630, 0x00000640, 0x00000610, 0x00000660,
+ };
+
+static const u32 sbox_CryptoPro_3411[4*256] =
+ {
+ /* 0 */
+ 0x0002d000, 0x0002a000, 0x0002a800, 0x0002b000,
+ 0x0002c000, 0x00028800, 0x00029800, 0x0002b800,
+ 0x0002e800, 0x0002e000, 0x0002f000, 0x00028000,
+ 0x0002c800, 0x00029000, 0x0002d800, 0x0002f800,
+ 0x0007d000, 0x0007a000, 0x0007a800, 0x0007b000,
+ 0x0007c000, 0x00078800, 0x00079800, 0x0007b800,
+ 0x0007e800, 0x0007e000, 0x0007f000, 0x00078000,
+ 0x0007c800, 0x00079000, 0x0007d800, 0x0007f800,
+ 0x00025000, 0x00022000, 0x00022800, 0x00023000,
+ 0x00024000, 0x00020800, 0x00021800, 0x00023800,
+ 0x00026800, 0x00026000, 0x00027000, 0x00020000,
+ 0x00024800, 0x00021000, 0x00025800, 0x00027800,
+ 0x00005000, 0x00002000, 0x00002800, 0x00003000,
+ 0x00004000, 0x00000800, 0x00001800, 0x00003800,
+ 0x00006800, 0x00006000, 0x00007000, 0x00000000,
+ 0x00004800, 0x00001000, 0x00005800, 0x00007800,
+ 0x00015000, 0x00012000, 0x00012800, 0x00013000,
+ 0x00014000, 0x00010800, 0x00011800, 0x00013800,
+ 0x00016800, 0x00016000, 0x00017000, 0x00010000,
+ 0x00014800, 0x00011000, 0x00015800, 0x00017800,
+ 0x0006d000, 0x0006a000, 0x0006a800, 0x0006b000,
+ 0x0006c000, 0x00068800, 0x00069800, 0x0006b800,
+ 0x0006e800, 0x0006e000, 0x0006f000, 0x00068000,
+ 0x0006c800, 0x00069000, 0x0006d800, 0x0006f800,
+ 0x0005d000, 0x0005a000, 0x0005a800, 0x0005b000,
+ 0x0005c000, 0x00058800, 0x00059800, 0x0005b800,
+ 0x0005e800, 0x0005e000, 0x0005f000, 0x00058000,
+ 0x0005c800, 0x00059000, 0x0005d800, 0x0005f800,
+ 0x0004d000, 0x0004a000, 0x0004a800, 0x0004b000,
+ 0x0004c000, 0x00048800, 0x00049800, 0x0004b800,
+ 0x0004e800, 0x0004e000, 0x0004f000, 0x00048000,
+ 0x0004c800, 0x00049000, 0x0004d800, 0x0004f800,
+ 0x0000d000, 0x0000a000, 0x0000a800, 0x0000b000,
+ 0x0000c000, 0x00008800, 0x00009800, 0x0000b800,
+ 0x0000e800, 0x0000e000, 0x0000f000, 0x00008000,
+ 0x0000c800, 0x00009000, 0x0000d800, 0x0000f800,
+ 0x0003d000, 0x0003a000, 0x0003a800, 0x0003b000,
+ 0x0003c000, 0x00038800, 0x00039800, 0x0003b800,
+ 0x0003e800, 0x0003e000, 0x0003f000, 0x00038000,
+ 0x0003c800, 0x00039000, 0x0003d800, 0x0003f800,
+ 0x00035000, 0x00032000, 0x00032800, 0x00033000,
+ 0x00034000, 0x00030800, 0x00031800, 0x00033800,
+ 0x00036800, 0x00036000, 0x00037000, 0x00030000,
+ 0x00034800, 0x00031000, 0x00035800, 0x00037800,
+ 0x0001d000, 0x0001a000, 0x0001a800, 0x0001b000,
+ 0x0001c000, 0x00018800, 0x00019800, 0x0001b800,
+ 0x0001e800, 0x0001e000, 0x0001f000, 0x00018000,
+ 0x0001c800, 0x00019000, 0x0001d800, 0x0001f800,
+ 0x00065000, 0x00062000, 0x00062800, 0x00063000,
+ 0x00064000, 0x00060800, 0x00061800, 0x00063800,
+ 0x00066800, 0x00066000, 0x00067000, 0x00060000,
+ 0x00064800, 0x00061000, 0x00065800, 0x00067800,
+ 0x00075000, 0x00072000, 0x00072800, 0x00073000,
+ 0x00074000, 0x00070800, 0x00071800, 0x00073800,
+ 0x00076800, 0x00076000, 0x00077000, 0x00070000,
+ 0x00074800, 0x00071000, 0x00075800, 0x00077800,
+ 0x00055000, 0x00052000, 0x00052800, 0x00053000,
+ 0x00054000, 0x00050800, 0x00051800, 0x00053800,
+ 0x00056800, 0x00056000, 0x00057000, 0x00050000,
+ 0x00054800, 0x00051000, 0x00055800, 0x00057800,
+ 0x00045000, 0x00042000, 0x00042800, 0x00043000,
+ 0x00044000, 0x00040800, 0x00041800, 0x00043800,
+ 0x00046800, 0x00046000, 0x00047000, 0x00040000,
+ 0x00044800, 0x00041000, 0x00045800, 0x00047800,
+ /* 1 */
+ 0x02380000, 0x02780000, 0x02600000, 0x02700000,
+ 0x02480000, 0x02200000, 0x02080000, 0x02000000,
+ 0x02180000, 0x02580000, 0x02280000, 0x02100000,
+ 0x02300000, 0x02500000, 0x02400000, 0x02680000,
+ 0x05380000, 0x05780000, 0x05600000, 0x05700000,
+ 0x05480000, 0x05200000, 0x05080000, 0x05000000,
+ 0x05180000, 0x05580000, 0x05280000, 0x05100000,
+ 0x05300000, 0x05500000, 0x05400000, 0x05680000,
+ 0x03b80000, 0x03f80000, 0x03e00000, 0x03f00000,
+ 0x03c80000, 0x03a00000, 0x03880000, 0x03800000,
+ 0x03980000, 0x03d80000, 0x03a80000, 0x03900000,
+ 0x03b00000, 0x03d00000, 0x03c00000, 0x03e80000,
+ 0x06380000, 0x06780000, 0x06600000, 0x06700000,
+ 0x06480000, 0x06200000, 0x06080000, 0x06000000,
+ 0x06180000, 0x06580000, 0x06280000, 0x06100000,
+ 0x06300000, 0x06500000, 0x06400000, 0x06680000,
+ 0x00380000, 0x00780000, 0x00600000, 0x00700000,
+ 0x00480000, 0x00200000, 0x00080000, 0x00000000,
+ 0x00180000, 0x00580000, 0x00280000, 0x00100000,
+ 0x00300000, 0x00500000, 0x00400000, 0x00680000,
+ 0x07b80000, 0x07f80000, 0x07e00000, 0x07f00000,
+ 0x07c80000, 0x07a00000, 0x07880000, 0x07800000,
+ 0x07980000, 0x07d80000, 0x07a80000, 0x07900000,
+ 0x07b00000, 0x07d00000, 0x07c00000, 0x07e80000,
+ 0x01380000, 0x01780000, 0x01600000, 0x01700000,
+ 0x01480000, 0x01200000, 0x01080000, 0x01000000,
+ 0x01180000, 0x01580000, 0x01280000, 0x01100000,
+ 0x01300000, 0x01500000, 0x01400000, 0x01680000,
+ 0x04380000, 0x04780000, 0x04600000, 0x04700000,
+ 0x04480000, 0x04200000, 0x04080000, 0x04000000,
+ 0x04180000, 0x04580000, 0x04280000, 0x04100000,
+ 0x04300000, 0x04500000, 0x04400000, 0x04680000,
+ 0x07380000, 0x07780000, 0x07600000, 0x07700000,
+ 0x07480000, 0x07200000, 0x07080000, 0x07000000,
+ 0x07180000, 0x07580000, 0x07280000, 0x07100000,
+ 0x07300000, 0x07500000, 0x07400000, 0x07680000,
+ 0x00b80000, 0x00f80000, 0x00e00000, 0x00f00000,
+ 0x00c80000, 0x00a00000, 0x00880000, 0x00800000,
+ 0x00980000, 0x00d80000, 0x00a80000, 0x00900000,
+ 0x00b00000, 0x00d00000, 0x00c00000, 0x00e80000,
+ 0x03380000, 0x03780000, 0x03600000, 0x03700000,
+ 0x03480000, 0x03200000, 0x03080000, 0x03000000,
+ 0x03180000, 0x03580000, 0x03280000, 0x03100000,
+ 0x03300000, 0x03500000, 0x03400000, 0x03680000,
+ 0x02b80000, 0x02f80000, 0x02e00000, 0x02f00000,
+ 0x02c80000, 0x02a00000, 0x02880000, 0x02800000,
+ 0x02980000, 0x02d80000, 0x02a80000, 0x02900000,
+ 0x02b00000, 0x02d00000, 0x02c00000, 0x02e80000,
+ 0x06b80000, 0x06f80000, 0x06e00000, 0x06f00000,
+ 0x06c80000, 0x06a00000, 0x06880000, 0x06800000,
+ 0x06980000, 0x06d80000, 0x06a80000, 0x06900000,
+ 0x06b00000, 0x06d00000, 0x06c00000, 0x06e80000,
+ 0x05b80000, 0x05f80000, 0x05e00000, 0x05f00000,
+ 0x05c80000, 0x05a00000, 0x05880000, 0x05800000,
+ 0x05980000, 0x05d80000, 0x05a80000, 0x05900000,
+ 0x05b00000, 0x05d00000, 0x05c00000, 0x05e80000,
+ 0x04b80000, 0x04f80000, 0x04e00000, 0x04f00000,
+ 0x04c80000, 0x04a00000, 0x04880000, 0x04800000,
+ 0x04980000, 0x04d80000, 0x04a80000, 0x04900000,
+ 0x04b00000, 0x04d00000, 0x04c00000, 0x04e80000,
+ 0x01b80000, 0x01f80000, 0x01e00000, 0x01f00000,
+ 0x01c80000, 0x01a00000, 0x01880000, 0x01800000,
+ 0x01980000, 0x01d80000, 0x01a80000, 0x01900000,
+ 0x01b00000, 0x01d00000, 0x01c00000, 0x01e80000,
+ /* 2 */
+ 0xb8000003, 0xb0000003, 0xa0000003, 0xd8000003,
+ 0xc8000003, 0xe0000003, 0x90000003, 0xd0000003,
+ 0x88000003, 0xc0000003, 0x80000003, 0xf0000003,
+ 0xf8000003, 0xe8000003, 0x98000003, 0xa8000003,
+ 0x38000003, 0x30000003, 0x20000003, 0x58000003,
+ 0x48000003, 0x60000003, 0x10000003, 0x50000003,
+ 0x08000003, 0x40000003, 0x00000003, 0x70000003,
+ 0x78000003, 0x68000003, 0x18000003, 0x28000003,
+ 0x38000001, 0x30000001, 0x20000001, 0x58000001,
+ 0x48000001, 0x60000001, 0x10000001, 0x50000001,
+ 0x08000001, 0x40000001, 0x00000001, 0x70000001,
+ 0x78000001, 0x68000001, 0x18000001, 0x28000001,
+ 0x38000002, 0x30000002, 0x20000002, 0x58000002,
+ 0x48000002, 0x60000002, 0x10000002, 0x50000002,
+ 0x08000002, 0x40000002, 0x00000002, 0x70000002,
+ 0x78000002, 0x68000002, 0x18000002, 0x28000002,
+ 0xb8000006, 0xb0000006, 0xa0000006, 0xd8000006,
+ 0xc8000006, 0xe0000006, 0x90000006, 0xd0000006,
+ 0x88000006, 0xc0000006, 0x80000006, 0xf0000006,
+ 0xf8000006, 0xe8000006, 0x98000006, 0xa8000006,
+ 0xb8000004, 0xb0000004, 0xa0000004, 0xd8000004,
+ 0xc8000004, 0xe0000004, 0x90000004, 0xd0000004,
+ 0x88000004, 0xc0000004, 0x80000004, 0xf0000004,
+ 0xf8000004, 0xe8000004, 0x98000004, 0xa8000004,
+ 0xb8000007, 0xb0000007, 0xa0000007, 0xd8000007,
+ 0xc8000007, 0xe0000007, 0x90000007, 0xd0000007,
+ 0x88000007, 0xc0000007, 0x80000007, 0xf0000007,
+ 0xf8000007, 0xe8000007, 0x98000007, 0xa8000007,
+ 0x38000000, 0x30000000, 0x20000000, 0x58000000,
+ 0x48000000, 0x60000000, 0x10000000, 0x50000000,
+ 0x08000000, 0x40000000, 0x00000000, 0x70000000,
+ 0x78000000, 0x68000000, 0x18000000, 0x28000000,
+ 0x38000005, 0x30000005, 0x20000005, 0x58000005,
+ 0x48000005, 0x60000005, 0x10000005, 0x50000005,
+ 0x08000005, 0x40000005, 0x00000005, 0x70000005,
+ 0x78000005, 0x68000005, 0x18000005, 0x28000005,
+ 0xb8000000, 0xb0000000, 0xa0000000, 0xd8000000,
+ 0xc8000000, 0xe0000000, 0x90000000, 0xd0000000,
+ 0x88000000, 0xc0000000, 0x80000000, 0xf0000000,
+ 0xf8000000, 0xe8000000, 0x98000000, 0xa8000000,
+ 0xb8000002, 0xb0000002, 0xa0000002, 0xd8000002,
+ 0xc8000002, 0xe0000002, 0x90000002, 0xd0000002,
+ 0x88000002, 0xc0000002, 0x80000002, 0xf0000002,
+ 0xf8000002, 0xe8000002, 0x98000002, 0xa8000002,
+ 0xb8000005, 0xb0000005, 0xa0000005, 0xd8000005,
+ 0xc8000005, 0xe0000005, 0x90000005, 0xd0000005,
+ 0x88000005, 0xc0000005, 0x80000005, 0xf0000005,
+ 0xf8000005, 0xe8000005, 0x98000005, 0xa8000005,
+ 0x38000004, 0x30000004, 0x20000004, 0x58000004,
+ 0x48000004, 0x60000004, 0x10000004, 0x50000004,
+ 0x08000004, 0x40000004, 0x00000004, 0x70000004,
+ 0x78000004, 0x68000004, 0x18000004, 0x28000004,
+ 0x38000007, 0x30000007, 0x20000007, 0x58000007,
+ 0x48000007, 0x60000007, 0x10000007, 0x50000007,
+ 0x08000007, 0x40000007, 0x00000007, 0x70000007,
+ 0x78000007, 0x68000007, 0x18000007, 0x28000007,
+ 0x38000006, 0x30000006, 0x20000006, 0x58000006,
+ 0x48000006, 0x60000006, 0x10000006, 0x50000006,
+ 0x08000006, 0x40000006, 0x00000006, 0x70000006,
+ 0x78000006, 0x68000006, 0x18000006, 0x28000006,
+ 0xb8000001, 0xb0000001, 0xa0000001, 0xd8000001,
+ 0xc8000001, 0xe0000001, 0x90000001, 0xd0000001,
+ 0x88000001, 0xc0000001, 0x80000001, 0xf0000001,
+ 0xf8000001, 0xe8000001, 0x98000001, 0xa8000001,
+ /* 3 */
+ 0x000000e8, 0x000000f0, 0x000000a0, 0x00000088,
+ 0x000000b8, 0x00000080, 0x000000a8, 0x000000d0,
+ 0x00000098, 0x000000e0, 0x000000c0, 0x000000f8,
+ 0x000000b0, 0x00000090, 0x000000c8, 0x000000d8,
+ 0x000001e8, 0x000001f0, 0x000001a0, 0x00000188,
+ 0x000001b8, 0x00000180, 0x000001a8, 0x000001d0,
+ 0x00000198, 0x000001e0, 0x000001c0, 0x000001f8,
+ 0x000001b0, 0x00000190, 0x000001c8, 0x000001d8,
+ 0x00000568, 0x00000570, 0x00000520, 0x00000508,
+ 0x00000538, 0x00000500, 0x00000528, 0x00000550,
+ 0x00000518, 0x00000560, 0x00000540, 0x00000578,
+ 0x00000530, 0x00000510, 0x00000548, 0x00000558,
+ 0x000004e8, 0x000004f0, 0x000004a0, 0x00000488,
+ 0x000004b8, 0x00000480, 0x000004a8, 0x000004d0,
+ 0x00000498, 0x000004e0, 0x000004c0, 0x000004f8,
+ 0x000004b0, 0x00000490, 0x000004c8, 0x000004d8,
+ 0x000002e8, 0x000002f0, 0x000002a0, 0x00000288,
+ 0x000002b8, 0x00000280, 0x000002a8, 0x000002d0,
+ 0x00000298, 0x000002e0, 0x000002c0, 0x000002f8,
+ 0x000002b0, 0x00000290, 0x000002c8, 0x000002d8,
+ 0x000005e8, 0x000005f0, 0x000005a0, 0x00000588,
+ 0x000005b8, 0x00000580, 0x000005a8, 0x000005d0,
+ 0x00000598, 0x000005e0, 0x000005c0, 0x000005f8,
+ 0x000005b0, 0x00000590, 0x000005c8, 0x000005d8,
+ 0x00000268, 0x00000270, 0x00000220, 0x00000208,
+ 0x00000238, 0x00000200, 0x00000228, 0x00000250,
+ 0x00000218, 0x00000260, 0x00000240, 0x00000278,
+ 0x00000230, 0x00000210, 0x00000248, 0x00000258,
+ 0x000007e8, 0x000007f0, 0x000007a0, 0x00000788,
+ 0x000007b8, 0x00000780, 0x000007a8, 0x000007d0,
+ 0x00000798, 0x000007e0, 0x000007c0, 0x000007f8,
+ 0x000007b0, 0x00000790, 0x000007c8, 0x000007d8,
+ 0x00000468, 0x00000470, 0x00000420, 0x00000408,
+ 0x00000438, 0x00000400, 0x00000428, 0x00000450,
+ 0x00000418, 0x00000460, 0x00000440, 0x00000478,
+ 0x00000430, 0x00000410, 0x00000448, 0x00000458,
+ 0x00000368, 0x00000370, 0x00000320, 0x00000308,
+ 0x00000338, 0x00000300, 0x00000328, 0x00000350,
+ 0x00000318, 0x00000360, 0x00000340, 0x00000378,
+ 0x00000330, 0x00000310, 0x00000348, 0x00000358,
+ 0x000003e8, 0x000003f0, 0x000003a0, 0x00000388,
+ 0x000003b8, 0x00000380, 0x000003a8, 0x000003d0,
+ 0x00000398, 0x000003e0, 0x000003c0, 0x000003f8,
+ 0x000003b0, 0x00000390, 0x000003c8, 0x000003d8,
+ 0x00000768, 0x00000770, 0x00000720, 0x00000708,
+ 0x00000738, 0x00000700, 0x00000728, 0x00000750,
+ 0x00000718, 0x00000760, 0x00000740, 0x00000778,
+ 0x00000730, 0x00000710, 0x00000748, 0x00000758,
+ 0x000006e8, 0x000006f0, 0x000006a0, 0x00000688,
+ 0x000006b8, 0x00000680, 0x000006a8, 0x000006d0,
+ 0x00000698, 0x000006e0, 0x000006c0, 0x000006f8,
+ 0x000006b0, 0x00000690, 0x000006c8, 0x000006d8,
+ 0x00000068, 0x00000070, 0x00000020, 0x00000008,
+ 0x00000038, 0x00000000, 0x00000028, 0x00000050,
+ 0x00000018, 0x00000060, 0x00000040, 0x00000078,
+ 0x00000030, 0x00000010, 0x00000048, 0x00000058,
+ 0x00000168, 0x00000170, 0x00000120, 0x00000108,
+ 0x00000138, 0x00000100, 0x00000128, 0x00000150,
+ 0x00000118, 0x00000160, 0x00000140, 0x00000178,
+ 0x00000130, 0x00000110, 0x00000148, 0x00000158,
+ 0x00000668, 0x00000670, 0x00000620, 0x00000608,
+ 0x00000638, 0x00000600, 0x00000628, 0x00000650,
+ 0x00000618, 0x00000660, 0x00000640, 0x00000678,
+ 0x00000630, 0x00000610, 0x00000648, 0x00000658,
+ };
+
+static const u32 sbox_Test_89[4*256] =
+ {
+ /* 0 */
+ 0x00062000, 0x00061000, 0x00067800, 0x00062800,
+ 0x00064800, 0x00060800, 0x00060000, 0x00064000,
+ 0x00067000, 0x00061800, 0x00065800, 0x00066000,
+ 0x00066800, 0x00063800, 0x00065000, 0x00063000,
+ 0x0004a000, 0x00049000, 0x0004f800, 0x0004a800,
+ 0x0004c800, 0x00048800, 0x00048000, 0x0004c000,
+ 0x0004f000, 0x00049800, 0x0004d800, 0x0004e000,
+ 0x0004e800, 0x0004b800, 0x0004d000, 0x0004b000,
+ 0x0007a000, 0x00079000, 0x0007f800, 0x0007a800,
+ 0x0007c800, 0x00078800, 0x00078000, 0x0007c000,
+ 0x0007f000, 0x00079800, 0x0007d800, 0x0007e000,
+ 0x0007e800, 0x0007b800, 0x0007d000, 0x0007b000,
+ 0x00072000, 0x00071000, 0x00077800, 0x00072800,
+ 0x00074800, 0x00070800, 0x00070000, 0x00074000,
+ 0x00077000, 0x00071800, 0x00075800, 0x00076000,
+ 0x00076800, 0x00073800, 0x00075000, 0x00073000,
+ 0x00042000, 0x00041000, 0x00047800, 0x00042800,
+ 0x00044800, 0x00040800, 0x00040000, 0x00044000,
+ 0x00047000, 0x00041800, 0x00045800, 0x00046000,
+ 0x00046800, 0x00043800, 0x00045000, 0x00043000,
+ 0x0000a000, 0x00009000, 0x0000f800, 0x0000a800,
+ 0x0000c800, 0x00008800, 0x00008000, 0x0000c000,
+ 0x0000f000, 0x00009800, 0x0000d800, 0x0000e000,
+ 0x0000e800, 0x0000b800, 0x0000d000, 0x0000b000,
+ 0x0001a000, 0x00019000, 0x0001f800, 0x0001a800,
+ 0x0001c800, 0x00018800, 0x00018000, 0x0001c000,
+ 0x0001f000, 0x00019800, 0x0001d800, 0x0001e000,
+ 0x0001e800, 0x0001b800, 0x0001d000, 0x0001b000,
+ 0x00052000, 0x00051000, 0x00057800, 0x00052800,
+ 0x00054800, 0x00050800, 0x00050000, 0x00054000,
+ 0x00057000, 0x00051800, 0x00055800, 0x00056000,
+ 0x00056800, 0x00053800, 0x00055000, 0x00053000,
+ 0x00012000, 0x00011000, 0x00017800, 0x00012800,
+ 0x00014800, 0x00010800, 0x00010000, 0x00014000,
+ 0x00017000, 0x00011800, 0x00015800, 0x00016000,
+ 0x00016800, 0x00013800, 0x00015000, 0x00013000,
+ 0x0003a000, 0x00039000, 0x0003f800, 0x0003a800,
+ 0x0003c800, 0x00038800, 0x00038000, 0x0003c000,
+ 0x0003f000, 0x00039800, 0x0003d800, 0x0003e000,
+ 0x0003e800, 0x0003b800, 0x0003d000, 0x0003b000,
+ 0x00022000, 0x00021000, 0x00027800, 0x00022800,
+ 0x00024800, 0x00020800, 0x00020000, 0x00024000,
+ 0x00027000, 0x00021800, 0x00025800, 0x00026000,
+ 0x00026800, 0x00023800, 0x00025000, 0x00023000,
+ 0x0006a000, 0x00069000, 0x0006f800, 0x0006a800,
+ 0x0006c800, 0x00068800, 0x00068000, 0x0006c000,
+ 0x0006f000, 0x00069800, 0x0006d800, 0x0006e000,
+ 0x0006e800, 0x0006b800, 0x0006d000, 0x0006b000,
+ 0x00032000, 0x00031000, 0x00037800, 0x00032800,
+ 0x00034800, 0x00030800, 0x00030000, 0x00034000,
+ 0x00037000, 0x00031800, 0x00035800, 0x00036000,
+ 0x00036800, 0x00033800, 0x00035000, 0x00033000,
+ 0x00002000, 0x00001000, 0x00007800, 0x00002800,
+ 0x00004800, 0x00000800, 0x00000000, 0x00004000,
+ 0x00007000, 0x00001800, 0x00005800, 0x00006000,
+ 0x00006800, 0x00003800, 0x00005000, 0x00003000,
+ 0x0005a000, 0x00059000, 0x0005f800, 0x0005a800,
+ 0x0005c800, 0x00058800, 0x00058000, 0x0005c000,
+ 0x0005f000, 0x00059800, 0x0005d800, 0x0005e000,
+ 0x0005e800, 0x0005b800, 0x0005d000, 0x0005b000,
+ 0x0002a000, 0x00029000, 0x0002f800, 0x0002a800,
+ 0x0002c800, 0x00028800, 0x00028000, 0x0002c000,
+ 0x0002f000, 0x00029800, 0x0002d800, 0x0002e000,
+ 0x0002e800, 0x0002b800, 0x0002d000, 0x0002b000,
+ /* 1 */
+ 0x07680000, 0x07400000, 0x07700000, 0x07600000,
+ 0x07380000, 0x07180000, 0x07480000, 0x07500000,
+ 0x07080000, 0x07280000, 0x07100000, 0x07200000,
+ 0x07300000, 0x07780000, 0x07000000, 0x07580000,
+ 0x04e80000, 0x04c00000, 0x04f00000, 0x04e00000,
+ 0x04b80000, 0x04980000, 0x04c80000, 0x04d00000,
+ 0x04880000, 0x04a80000, 0x04900000, 0x04a00000,
+ 0x04b00000, 0x04f80000, 0x04800000, 0x04d80000,
+ 0x05e80000, 0x05c00000, 0x05f00000, 0x05e00000,
+ 0x05b80000, 0x05980000, 0x05c80000, 0x05d00000,
+ 0x05880000, 0x05a80000, 0x05900000, 0x05a00000,
+ 0x05b00000, 0x05f80000, 0x05800000, 0x05d80000,
+ 0x01680000, 0x01400000, 0x01700000, 0x01600000,
+ 0x01380000, 0x01180000, 0x01480000, 0x01500000,
+ 0x01080000, 0x01280000, 0x01100000, 0x01200000,
+ 0x01300000, 0x01780000, 0x01000000, 0x01580000,
+ 0x02e80000, 0x02c00000, 0x02f00000, 0x02e00000,
+ 0x02b80000, 0x02980000, 0x02c80000, 0x02d00000,
+ 0x02880000, 0x02a80000, 0x02900000, 0x02a00000,
+ 0x02b00000, 0x02f80000, 0x02800000, 0x02d80000,
+ 0x07e80000, 0x07c00000, 0x07f00000, 0x07e00000,
+ 0x07b80000, 0x07980000, 0x07c80000, 0x07d00000,
+ 0x07880000, 0x07a80000, 0x07900000, 0x07a00000,
+ 0x07b00000, 0x07f80000, 0x07800000, 0x07d80000,
+ 0x03e80000, 0x03c00000, 0x03f00000, 0x03e00000,
+ 0x03b80000, 0x03980000, 0x03c80000, 0x03d00000,
+ 0x03880000, 0x03a80000, 0x03900000, 0x03a00000,
+ 0x03b00000, 0x03f80000, 0x03800000, 0x03d80000,
+ 0x00e80000, 0x00c00000, 0x00f00000, 0x00e00000,
+ 0x00b80000, 0x00980000, 0x00c80000, 0x00d00000,
+ 0x00880000, 0x00a80000, 0x00900000, 0x00a00000,
+ 0x00b00000, 0x00f80000, 0x00800000, 0x00d80000,
+ 0x00680000, 0x00400000, 0x00700000, 0x00600000,
+ 0x00380000, 0x00180000, 0x00480000, 0x00500000,
+ 0x00080000, 0x00280000, 0x00100000, 0x00200000,
+ 0x00300000, 0x00780000, 0x00000000, 0x00580000,
+ 0x06e80000, 0x06c00000, 0x06f00000, 0x06e00000,
+ 0x06b80000, 0x06980000, 0x06c80000, 0x06d00000,
+ 0x06880000, 0x06a80000, 0x06900000, 0x06a00000,
+ 0x06b00000, 0x06f80000, 0x06800000, 0x06d80000,
+ 0x06680000, 0x06400000, 0x06700000, 0x06600000,
+ 0x06380000, 0x06180000, 0x06480000, 0x06500000,
+ 0x06080000, 0x06280000, 0x06100000, 0x06200000,
+ 0x06300000, 0x06780000, 0x06000000, 0x06580000,
+ 0x03680000, 0x03400000, 0x03700000, 0x03600000,
+ 0x03380000, 0x03180000, 0x03480000, 0x03500000,
+ 0x03080000, 0x03280000, 0x03100000, 0x03200000,
+ 0x03300000, 0x03780000, 0x03000000, 0x03580000,
+ 0x05680000, 0x05400000, 0x05700000, 0x05600000,
+ 0x05380000, 0x05180000, 0x05480000, 0x05500000,
+ 0x05080000, 0x05280000, 0x05100000, 0x05200000,
+ 0x05300000, 0x05780000, 0x05000000, 0x05580000,
+ 0x02680000, 0x02400000, 0x02700000, 0x02600000,
+ 0x02380000, 0x02180000, 0x02480000, 0x02500000,
+ 0x02080000, 0x02280000, 0x02100000, 0x02200000,
+ 0x02300000, 0x02780000, 0x02000000, 0x02580000,
+ 0x01e80000, 0x01c00000, 0x01f00000, 0x01e00000,
+ 0x01b80000, 0x01980000, 0x01c80000, 0x01d00000,
+ 0x01880000, 0x01a80000, 0x01900000, 0x01a00000,
+ 0x01b00000, 0x01f80000, 0x01800000, 0x01d80000,
+ 0x04680000, 0x04400000, 0x04700000, 0x04600000,
+ 0x04380000, 0x04180000, 0x04480000, 0x04500000,
+ 0x04080000, 0x04280000, 0x04100000, 0x04200000,
+ 0x04300000, 0x04780000, 0x04000000, 0x04580000,
+ /* 2 */
+ 0x18000004, 0x70000004, 0x28000004, 0x48000004,
+ 0x30000004, 0x40000004, 0x00000004, 0x68000004,
+ 0x50000004, 0x58000004, 0x38000004, 0x60000004,
+ 0x10000004, 0x08000004, 0x78000004, 0x20000004,
+ 0x98000007, 0xf0000007, 0xa8000007, 0xc8000007,
+ 0xb0000007, 0xc0000007, 0x80000007, 0xe8000007,
+ 0xd0000007, 0xd8000007, 0xb8000007, 0xe0000007,
+ 0x90000007, 0x88000007, 0xf8000007, 0xa0000007,
+ 0x18000003, 0x70000003, 0x28000003, 0x48000003,
+ 0x30000003, 0x40000003, 0x00000003, 0x68000003,
+ 0x50000003, 0x58000003, 0x38000003, 0x60000003,
+ 0x10000003, 0x08000003, 0x78000003, 0x20000003,
+ 0x98000005, 0xf0000005, 0xa8000005, 0xc8000005,
+ 0xb0000005, 0xc0000005, 0x80000005, 0xe8000005,
+ 0xd0000005, 0xd8000005, 0xb8000005, 0xe0000005,
+ 0x90000005, 0x88000005, 0xf8000005, 0xa0000005,
+ 0x98000000, 0xf0000000, 0xa8000000, 0xc8000000,
+ 0xb0000000, 0xc0000000, 0x80000000, 0xe8000000,
+ 0xd0000000, 0xd8000000, 0xb8000000, 0xe0000000,
+ 0x90000000, 0x88000000, 0xf8000000, 0xa0000000,
+ 0x98000004, 0xf0000004, 0xa8000004, 0xc8000004,
+ 0xb0000004, 0xc0000004, 0x80000004, 0xe8000004,
+ 0xd0000004, 0xd8000004, 0xb8000004, 0xe0000004,
+ 0x90000004, 0x88000004, 0xf8000004, 0xa0000004,
+ 0x18000006, 0x70000006, 0x28000006, 0x48000006,
+ 0x30000006, 0x40000006, 0x00000006, 0x68000006,
+ 0x50000006, 0x58000006, 0x38000006, 0x60000006,
+ 0x10000006, 0x08000006, 0x78000006, 0x20000006,
+ 0x98000002, 0xf0000002, 0xa8000002, 0xc8000002,
+ 0xb0000002, 0xc0000002, 0x80000002, 0xe8000002,
+ 0xd0000002, 0xd8000002, 0xb8000002, 0xe0000002,
+ 0x90000002, 0x88000002, 0xf8000002, 0xa0000002,
+ 0x98000006, 0xf0000006, 0xa8000006, 0xc8000006,
+ 0xb0000006, 0xc0000006, 0x80000006, 0xe8000006,
+ 0xd0000006, 0xd8000006, 0xb8000006, 0xe0000006,
+ 0x90000006, 0x88000006, 0xf8000006, 0xa0000006,
+ 0x98000001, 0xf0000001, 0xa8000001, 0xc8000001,
+ 0xb0000001, 0xc0000001, 0x80000001, 0xe8000001,
+ 0xd0000001, 0xd8000001, 0xb8000001, 0xe0000001,
+ 0x90000001, 0x88000001, 0xf8000001, 0xa0000001,
+ 0x98000003, 0xf0000003, 0xa8000003, 0xc8000003,
+ 0xb0000003, 0xc0000003, 0x80000003, 0xe8000003,
+ 0xd0000003, 0xd8000003, 0xb8000003, 0xe0000003,
+ 0x90000003, 0x88000003, 0xf8000003, 0xa0000003,
+ 0x18000005, 0x70000005, 0x28000005, 0x48000005,
+ 0x30000005, 0x40000005, 0x00000005, 0x68000005,
+ 0x50000005, 0x58000005, 0x38000005, 0x60000005,
+ 0x10000005, 0x08000005, 0x78000005, 0x20000005,
+ 0x18000000, 0x70000000, 0x28000000, 0x48000000,
+ 0x30000000, 0x40000000, 0x00000000, 0x68000000,
+ 0x50000000, 0x58000000, 0x38000000, 0x60000000,
+ 0x10000000, 0x08000000, 0x78000000, 0x20000000,
+ 0x18000007, 0x70000007, 0x28000007, 0x48000007,
+ 0x30000007, 0x40000007, 0x00000007, 0x68000007,
+ 0x50000007, 0x58000007, 0x38000007, 0x60000007,
+ 0x10000007, 0x08000007, 0x78000007, 0x20000007,
+ 0x18000001, 0x70000001, 0x28000001, 0x48000001,
+ 0x30000001, 0x40000001, 0x00000001, 0x68000001,
+ 0x50000001, 0x58000001, 0x38000001, 0x60000001,
+ 0x10000001, 0x08000001, 0x78000001, 0x20000001,
+ 0x18000002, 0x70000002, 0x28000002, 0x48000002,
+ 0x30000002, 0x40000002, 0x00000002, 0x68000002,
+ 0x50000002, 0x58000002, 0x38000002, 0x60000002,
+ 0x10000002, 0x08000002, 0x78000002, 0x20000002,
+ /* 3 */
+ 0x00000648, 0x00000658, 0x00000660, 0x00000600,
+ 0x00000618, 0x00000630, 0x00000638, 0x00000628,
+ 0x00000620, 0x00000640, 0x00000670, 0x00000678,
+ 0x00000608, 0x00000650, 0x00000610, 0x00000668,
+ 0x00000348, 0x00000358, 0x00000360, 0x00000300,
+ 0x00000318, 0x00000330, 0x00000338, 0x00000328,
+ 0x00000320, 0x00000340, 0x00000370, 0x00000378,
+ 0x00000308, 0x00000350, 0x00000310, 0x00000368,
+ 0x000002c8, 0x000002d8, 0x000002e0, 0x00000280,
+ 0x00000298, 0x000002b0, 0x000002b8, 0x000002a8,
+ 0x000002a0, 0x000002c0, 0x000002f0, 0x000002f8,
+ 0x00000288, 0x000002d0, 0x00000290, 0x000002e8,
+ 0x00000148, 0x00000158, 0x00000160, 0x00000100,
+ 0x00000118, 0x00000130, 0x00000138, 0x00000128,
+ 0x00000120, 0x00000140, 0x00000170, 0x00000178,
+ 0x00000108, 0x00000150, 0x00000110, 0x00000168,
+ 0x000005c8, 0x000005d8, 0x000005e0, 0x00000580,
+ 0x00000598, 0x000005b0, 0x000005b8, 0x000005a8,
+ 0x000005a0, 0x000005c0, 0x000005f0, 0x000005f8,
+ 0x00000588, 0x000005d0, 0x00000590, 0x000005e8,
+ 0x00000048, 0x00000058, 0x00000060, 0x00000000,
+ 0x00000018, 0x00000030, 0x00000038, 0x00000028,
+ 0x00000020, 0x00000040, 0x00000070, 0x00000078,
+ 0x00000008, 0x00000050, 0x00000010, 0x00000068,
+ 0x000004c8, 0x000004d8, 0x000004e0, 0x00000480,
+ 0x00000498, 0x000004b0, 0x000004b8, 0x000004a8,
+ 0x000004a0, 0x000004c0, 0x000004f0, 0x000004f8,
+ 0x00000488, 0x000004d0, 0x00000490, 0x000004e8,
+ 0x000006c8, 0x000006d8, 0x000006e0, 0x00000680,
+ 0x00000698, 0x000006b0, 0x000006b8, 0x000006a8,
+ 0x000006a0, 0x000006c0, 0x000006f0, 0x000006f8,
+ 0x00000688, 0x000006d0, 0x00000690, 0x000006e8,
+ 0x000001c8, 0x000001d8, 0x000001e0, 0x00000180,
+ 0x00000198, 0x000001b0, 0x000001b8, 0x000001a8,
+ 0x000001a0, 0x000001c0, 0x000001f0, 0x000001f8,
+ 0x00000188, 0x000001d0, 0x00000190, 0x000001e8,
+ 0x00000748, 0x00000758, 0x00000760, 0x00000700,
+ 0x00000718, 0x00000730, 0x00000738, 0x00000728,
+ 0x00000720, 0x00000740, 0x00000770, 0x00000778,
+ 0x00000708, 0x00000750, 0x00000710, 0x00000768,
+ 0x000003c8, 0x000003d8, 0x000003e0, 0x00000380,
+ 0x00000398, 0x000003b0, 0x000003b8, 0x000003a8,
+ 0x000003a0, 0x000003c0, 0x000003f0, 0x000003f8,
+ 0x00000388, 0x000003d0, 0x00000390, 0x000003e8,
+ 0x00000548, 0x00000558, 0x00000560, 0x00000500,
+ 0x00000518, 0x00000530, 0x00000538, 0x00000528,
+ 0x00000520, 0x00000540, 0x00000570, 0x00000578,
+ 0x00000508, 0x00000550, 0x00000510, 0x00000568,
+ 0x000007c8, 0x000007d8, 0x000007e0, 0x00000780,
+ 0x00000798, 0x000007b0, 0x000007b8, 0x000007a8,
+ 0x000007a0, 0x000007c0, 0x000007f0, 0x000007f8,
+ 0x00000788, 0x000007d0, 0x00000790, 0x000007e8,
+ 0x00000248, 0x00000258, 0x00000260, 0x00000200,
+ 0x00000218, 0x00000230, 0x00000238, 0x00000228,
+ 0x00000220, 0x00000240, 0x00000270, 0x00000278,
+ 0x00000208, 0x00000250, 0x00000210, 0x00000268,
+ 0x000000c8, 0x000000d8, 0x000000e0, 0x00000080,
+ 0x00000098, 0x000000b0, 0x000000b8, 0x000000a8,
+ 0x000000a0, 0x000000c0, 0x000000f0, 0x000000f8,
+ 0x00000088, 0x000000d0, 0x00000090, 0x000000e8,
+ 0x00000448, 0x00000458, 0x00000460, 0x00000400,
+ 0x00000418, 0x00000430, 0x00000438, 0x00000428,
+ 0x00000420, 0x00000440, 0x00000470, 0x00000478,
+ 0x00000408, 0x00000450, 0x00000410, 0x00000468,
+ };
+
+static const u32 sbox_CryptoPro_A[4*256] =
+ {
+ /* 0 */
+ 0x0001c800, 0x0001b000, 0x00019800, 0x00019000,
+ 0x0001c000, 0x0001d800, 0x00018800, 0x0001b800,
+ 0x0001d000, 0x0001a000, 0x0001f000, 0x0001f800,
+ 0x0001e000, 0x00018000, 0x0001e800, 0x0001a800,
+ 0x0003c800, 0x0003b000, 0x00039800, 0x00039000,
+ 0x0003c000, 0x0003d800, 0x00038800, 0x0003b800,
+ 0x0003d000, 0x0003a000, 0x0003f000, 0x0003f800,
+ 0x0003e000, 0x00038000, 0x0003e800, 0x0003a800,
+ 0x00074800, 0x00073000, 0x00071800, 0x00071000,
+ 0x00074000, 0x00075800, 0x00070800, 0x00073800,
+ 0x00075000, 0x00072000, 0x00077000, 0x00077800,
+ 0x00076000, 0x00070000, 0x00076800, 0x00072800,
+ 0x0004c800, 0x0004b000, 0x00049800, 0x00049000,
+ 0x0004c000, 0x0004d800, 0x00048800, 0x0004b800,
+ 0x0004d000, 0x0004a000, 0x0004f000, 0x0004f800,
+ 0x0004e000, 0x00048000, 0x0004e800, 0x0004a800,
+ 0x00044800, 0x00043000, 0x00041800, 0x00041000,
+ 0x00044000, 0x00045800, 0x00040800, 0x00043800,
+ 0x00045000, 0x00042000, 0x00047000, 0x00047800,
+ 0x00046000, 0x00040000, 0x00046800, 0x00042800,
+ 0x00054800, 0x00053000, 0x00051800, 0x00051000,
+ 0x00054000, 0x00055800, 0x00050800, 0x00053800,
+ 0x00055000, 0x00052000, 0x00057000, 0x00057800,
+ 0x00056000, 0x00050000, 0x00056800, 0x00052800,
+ 0x0007c800, 0x0007b000, 0x00079800, 0x00079000,
+ 0x0007c000, 0x0007d800, 0x00078800, 0x0007b800,
+ 0x0007d000, 0x0007a000, 0x0007f000, 0x0007f800,
+ 0x0007e000, 0x00078000, 0x0007e800, 0x0007a800,
+ 0x00004800, 0x00003000, 0x00001800, 0x00001000,
+ 0x00004000, 0x00005800, 0x00000800, 0x00003800,
+ 0x00005000, 0x00002000, 0x00007000, 0x00007800,
+ 0x00006000, 0x00000000, 0x00006800, 0x00002800,
+ 0x0002c800, 0x0002b000, 0x00029800, 0x00029000,
+ 0x0002c000, 0x0002d800, 0x00028800, 0x0002b800,
+ 0x0002d000, 0x0002a000, 0x0002f000, 0x0002f800,
+ 0x0002e000, 0x00028000, 0x0002e800, 0x0002a800,
+ 0x00014800, 0x00013000, 0x00011800, 0x00011000,
+ 0x00014000, 0x00015800, 0x00010800, 0x00013800,
+ 0x00015000, 0x00012000, 0x00017000, 0x00017800,
+ 0x00016000, 0x00010000, 0x00016800, 0x00012800,
+ 0x00034800, 0x00033000, 0x00031800, 0x00031000,
+ 0x00034000, 0x00035800, 0x00030800, 0x00033800,
+ 0x00035000, 0x00032000, 0x00037000, 0x00037800,
+ 0x00036000, 0x00030000, 0x00036800, 0x00032800,
+ 0x00064800, 0x00063000, 0x00061800, 0x00061000,
+ 0x00064000, 0x00065800, 0x00060800, 0x00063800,
+ 0x00065000, 0x00062000, 0x00067000, 0x00067800,
+ 0x00066000, 0x00060000, 0x00066800, 0x00062800,
+ 0x0005c800, 0x0005b000, 0x00059800, 0x00059000,
+ 0x0005c000, 0x0005d800, 0x00058800, 0x0005b800,
+ 0x0005d000, 0x0005a000, 0x0005f000, 0x0005f800,
+ 0x0005e000, 0x00058000, 0x0005e800, 0x0005a800,
+ 0x00024800, 0x00023000, 0x00021800, 0x00021000,
+ 0x00024000, 0x00025800, 0x00020800, 0x00023800,
+ 0x00025000, 0x00022000, 0x00027000, 0x00027800,
+ 0x00026000, 0x00020000, 0x00026800, 0x00022800,
+ 0x0006c800, 0x0006b000, 0x00069800, 0x00069000,
+ 0x0006c000, 0x0006d800, 0x00068800, 0x0006b800,
+ 0x0006d000, 0x0006a000, 0x0006f000, 0x0006f800,
+ 0x0006e000, 0x00068000, 0x0006e800, 0x0006a800,
+ 0x0000c800, 0x0000b000, 0x00009800, 0x00009000,
+ 0x0000c000, 0x0000d800, 0x00008800, 0x0000b800,
+ 0x0000d000, 0x0000a000, 0x0000f000, 0x0000f800,
+ 0x0000e000, 0x00008000, 0x0000e800, 0x0000a800,
+ /* 1 */
+ 0x07700000, 0x07200000, 0x07300000, 0x07100000,
+ 0x07580000, 0x07180000, 0x07680000, 0x07400000,
+ 0x07600000, 0x07780000, 0x07280000, 0x07500000,
+ 0x07000000, 0x07380000, 0x07080000, 0x07480000,
+ 0x03f00000, 0x03a00000, 0x03b00000, 0x03900000,
+ 0x03d80000, 0x03980000, 0x03e80000, 0x03c00000,
+ 0x03e00000, 0x03f80000, 0x03a80000, 0x03d00000,
+ 0x03800000, 0x03b80000, 0x03880000, 0x03c80000,
+ 0x05700000, 0x05200000, 0x05300000, 0x05100000,
+ 0x05580000, 0x05180000, 0x05680000, 0x05400000,
+ 0x05600000, 0x05780000, 0x05280000, 0x05500000,
+ 0x05000000, 0x05380000, 0x05080000, 0x05480000,
+ 0x06700000, 0x06200000, 0x06300000, 0x06100000,
+ 0x06580000, 0x06180000, 0x06680000, 0x06400000,
+ 0x06600000, 0x06780000, 0x06280000, 0x06500000,
+ 0x06000000, 0x06380000, 0x06080000, 0x06480000,
+ 0x06f00000, 0x06a00000, 0x06b00000, 0x06900000,
+ 0x06d80000, 0x06980000, 0x06e80000, 0x06c00000,
+ 0x06e00000, 0x06f80000, 0x06a80000, 0x06d00000,
+ 0x06800000, 0x06b80000, 0x06880000, 0x06c80000,
+ 0x00f00000, 0x00a00000, 0x00b00000, 0x00900000,
+ 0x00d80000, 0x00980000, 0x00e80000, 0x00c00000,
+ 0x00e00000, 0x00f80000, 0x00a80000, 0x00d00000,
+ 0x00800000, 0x00b80000, 0x00880000, 0x00c80000,
+ 0x01f00000, 0x01a00000, 0x01b00000, 0x01900000,
+ 0x01d80000, 0x01980000, 0x01e80000, 0x01c00000,
+ 0x01e00000, 0x01f80000, 0x01a80000, 0x01d00000,
+ 0x01800000, 0x01b80000, 0x01880000, 0x01c80000,
+ 0x04f00000, 0x04a00000, 0x04b00000, 0x04900000,
+ 0x04d80000, 0x04980000, 0x04e80000, 0x04c00000,
+ 0x04e00000, 0x04f80000, 0x04a80000, 0x04d00000,
+ 0x04800000, 0x04b80000, 0x04880000, 0x04c80000,
+ 0x00700000, 0x00200000, 0x00300000, 0x00100000,
+ 0x00580000, 0x00180000, 0x00680000, 0x00400000,
+ 0x00600000, 0x00780000, 0x00280000, 0x00500000,
+ 0x00000000, 0x00380000, 0x00080000, 0x00480000,
+ 0x01700000, 0x01200000, 0x01300000, 0x01100000,
+ 0x01580000, 0x01180000, 0x01680000, 0x01400000,
+ 0x01600000, 0x01780000, 0x01280000, 0x01500000,
+ 0x01000000, 0x01380000, 0x01080000, 0x01480000,
+ 0x05f00000, 0x05a00000, 0x05b00000, 0x05900000,
+ 0x05d80000, 0x05980000, 0x05e80000, 0x05c00000,
+ 0x05e00000, 0x05f80000, 0x05a80000, 0x05d00000,
+ 0x05800000, 0x05b80000, 0x05880000, 0x05c80000,
+ 0x02700000, 0x02200000, 0x02300000, 0x02100000,
+ 0x02580000, 0x02180000, 0x02680000, 0x02400000,
+ 0x02600000, 0x02780000, 0x02280000, 0x02500000,
+ 0x02000000, 0x02380000, 0x02080000, 0x02480000,
+ 0x07f00000, 0x07a00000, 0x07b00000, 0x07900000,
+ 0x07d80000, 0x07980000, 0x07e80000, 0x07c00000,
+ 0x07e00000, 0x07f80000, 0x07a80000, 0x07d00000,
+ 0x07800000, 0x07b80000, 0x07880000, 0x07c80000,
+ 0x04700000, 0x04200000, 0x04300000, 0x04100000,
+ 0x04580000, 0x04180000, 0x04680000, 0x04400000,
+ 0x04600000, 0x04780000, 0x04280000, 0x04500000,
+ 0x04000000, 0x04380000, 0x04080000, 0x04480000,
+ 0x02f00000, 0x02a00000, 0x02b00000, 0x02900000,
+ 0x02d80000, 0x02980000, 0x02e80000, 0x02c00000,
+ 0x02e00000, 0x02f80000, 0x02a80000, 0x02d00000,
+ 0x02800000, 0x02b80000, 0x02880000, 0x02c80000,
+ 0x03700000, 0x03200000, 0x03300000, 0x03100000,
+ 0x03580000, 0x03180000, 0x03680000, 0x03400000,
+ 0x03600000, 0x03780000, 0x03280000, 0x03500000,
+ 0x03000000, 0x03380000, 0x03080000, 0x03480000,
+ /* 2 */
+ 0xd8000001, 0xa8000001, 0x88000001, 0xc8000001,
+ 0xc0000001, 0xe8000001, 0xf8000001, 0x80000001,
+ 0xf0000001, 0xa0000001, 0x90000001, 0x98000001,
+ 0xe0000001, 0xb8000001, 0xd0000001, 0xb0000001,
+ 0x58000005, 0x28000005, 0x08000005, 0x48000005,
+ 0x40000005, 0x68000005, 0x78000005, 0x00000005,
+ 0x70000005, 0x20000005, 0x10000005, 0x18000005,
+ 0x60000005, 0x38000005, 0x50000005, 0x30000005,
+ 0xd8000006, 0xa8000006, 0x88000006, 0xc8000006,
+ 0xc0000006, 0xe8000006, 0xf8000006, 0x80000006,
+ 0xf0000006, 0xa0000006, 0x90000006, 0x98000006,
+ 0xe0000006, 0xb8000006, 0xd0000006, 0xb0000006,
+ 0x58000006, 0x28000006, 0x08000006, 0x48000006,
+ 0x40000006, 0x68000006, 0x78000006, 0x00000006,
+ 0x70000006, 0x20000006, 0x10000006, 0x18000006,
+ 0x60000006, 0x38000006, 0x50000006, 0x30000006,
+ 0xd8000000, 0xa8000000, 0x88000000, 0xc8000000,
+ 0xc0000000, 0xe8000000, 0xf8000000, 0x80000000,
+ 0xf0000000, 0xa0000000, 0x90000000, 0x98000000,
+ 0xe0000000, 0xb8000000, 0xd0000000, 0xb0000000,
+ 0x58000001, 0x28000001, 0x08000001, 0x48000001,
+ 0x40000001, 0x68000001, 0x78000001, 0x00000001,
+ 0x70000001, 0x20000001, 0x10000001, 0x18000001,
+ 0x60000001, 0x38000001, 0x50000001, 0x30000001,
+ 0x58000000, 0x28000000, 0x08000000, 0x48000000,
+ 0x40000000, 0x68000000, 0x78000000, 0x00000000,
+ 0x70000000, 0x20000000, 0x10000000, 0x18000000,
+ 0x60000000, 0x38000000, 0x50000000, 0x30000000,
+ 0xd8000005, 0xa8000005, 0x88000005, 0xc8000005,
+ 0xc0000005, 0xe8000005, 0xf8000005, 0x80000005,
+ 0xf0000005, 0xa0000005, 0x90000005, 0x98000005,
+ 0xe0000005, 0xb8000005, 0xd0000005, 0xb0000005,
+ 0xd8000003, 0xa8000003, 0x88000003, 0xc8000003,
+ 0xc0000003, 0xe8000003, 0xf8000003, 0x80000003,
+ 0xf0000003, 0xa0000003, 0x90000003, 0x98000003,
+ 0xe0000003, 0xb8000003, 0xd0000003, 0xb0000003,
+ 0xd8000002, 0xa8000002, 0x88000002, 0xc8000002,
+ 0xc0000002, 0xe8000002, 0xf8000002, 0x80000002,
+ 0xf0000002, 0xa0000002, 0x90000002, 0x98000002,
+ 0xe0000002, 0xb8000002, 0xd0000002, 0xb0000002,
+ 0xd8000004, 0xa8000004, 0x88000004, 0xc8000004,
+ 0xc0000004, 0xe8000004, 0xf8000004, 0x80000004,
+ 0xf0000004, 0xa0000004, 0x90000004, 0x98000004,
+ 0xe0000004, 0xb8000004, 0xd0000004, 0xb0000004,
+ 0x58000002, 0x28000002, 0x08000002, 0x48000002,
+ 0x40000002, 0x68000002, 0x78000002, 0x00000002,
+ 0x70000002, 0x20000002, 0x10000002, 0x18000002,
+ 0x60000002, 0x38000002, 0x50000002, 0x30000002,
+ 0x58000004, 0x28000004, 0x08000004, 0x48000004,
+ 0x40000004, 0x68000004, 0x78000004, 0x00000004,
+ 0x70000004, 0x20000004, 0x10000004, 0x18000004,
+ 0x60000004, 0x38000004, 0x50000004, 0x30000004,
+ 0xd8000007, 0xa8000007, 0x88000007, 0xc8000007,
+ 0xc0000007, 0xe8000007, 0xf8000007, 0x80000007,
+ 0xf0000007, 0xa0000007, 0x90000007, 0x98000007,
+ 0xe0000007, 0xb8000007, 0xd0000007, 0xb0000007,
+ 0x58000007, 0x28000007, 0x08000007, 0x48000007,
+ 0x40000007, 0x68000007, 0x78000007, 0x00000007,
+ 0x70000007, 0x20000007, 0x10000007, 0x18000007,
+ 0x60000007, 0x38000007, 0x50000007, 0x30000007,
+ 0x58000003, 0x28000003, 0x08000003, 0x48000003,
+ 0x40000003, 0x68000003, 0x78000003, 0x00000003,
+ 0x70000003, 0x20000003, 0x10000003, 0x18000003,
+ 0x60000003, 0x38000003, 0x50000003, 0x30000003,
+ /* 3 */
+ 0x00000588, 0x000005e8, 0x00000590, 0x000005c8,
+ 0x000005b8, 0x000005d0, 0x000005b0, 0x00000580,
+ 0x000005c0, 0x000005e0, 0x000005a0, 0x000005a8,
+ 0x000005f8, 0x00000598, 0x000005d8, 0x000005f0,
+ 0x00000508, 0x00000568, 0x00000510, 0x00000548,
+ 0x00000538, 0x00000550, 0x00000530, 0x00000500,
+ 0x00000540, 0x00000560, 0x00000520, 0x00000528,
+ 0x00000578, 0x00000518, 0x00000558, 0x00000570,
+ 0x00000788, 0x000007e8, 0x00000790, 0x000007c8,
+ 0x000007b8, 0x000007d0, 0x000007b0, 0x00000780,
+ 0x000007c0, 0x000007e0, 0x000007a0, 0x000007a8,
+ 0x000007f8, 0x00000798, 0x000007d8, 0x000007f0,
+ 0x00000288, 0x000002e8, 0x00000290, 0x000002c8,
+ 0x000002b8, 0x000002d0, 0x000002b0, 0x00000280,
+ 0x000002c0, 0x000002e0, 0x000002a0, 0x000002a8,
+ 0x000002f8, 0x00000298, 0x000002d8, 0x000002f0,
+ 0x00000008, 0x00000068, 0x00000010, 0x00000048,
+ 0x00000038, 0x00000050, 0x00000030, 0x00000000,
+ 0x00000040, 0x00000060, 0x00000020, 0x00000028,
+ 0x00000078, 0x00000018, 0x00000058, 0x00000070,
+ 0x00000608, 0x00000668, 0x00000610, 0x00000648,
+ 0x00000638, 0x00000650, 0x00000630, 0x00000600,
+ 0x00000640, 0x00000660, 0x00000620, 0x00000628,
+ 0x00000678, 0x00000618, 0x00000658, 0x00000670,
+ 0x00000708, 0x00000768, 0x00000710, 0x00000748,
+ 0x00000738, 0x00000750, 0x00000730, 0x00000700,
+ 0x00000740, 0x00000760, 0x00000720, 0x00000728,
+ 0x00000778, 0x00000718, 0x00000758, 0x00000770,
+ 0x00000408, 0x00000468, 0x00000410, 0x00000448,
+ 0x00000438, 0x00000450, 0x00000430, 0x00000400,
+ 0x00000440, 0x00000460, 0x00000420, 0x00000428,
+ 0x00000478, 0x00000418, 0x00000458, 0x00000470,
+ 0x00000308, 0x00000368, 0x00000310, 0x00000348,
+ 0x00000338, 0x00000350, 0x00000330, 0x00000300,
+ 0x00000340, 0x00000360, 0x00000320, 0x00000328,
+ 0x00000378, 0x00000318, 0x00000358, 0x00000370,
+ 0x00000108, 0x00000168, 0x00000110, 0x00000148,
+ 0x00000138, 0x00000150, 0x00000130, 0x00000100,
+ 0x00000140, 0x00000160, 0x00000120, 0x00000128,
+ 0x00000178, 0x00000118, 0x00000158, 0x00000170,
+ 0x00000188, 0x000001e8, 0x00000190, 0x000001c8,
+ 0x000001b8, 0x000001d0, 0x000001b0, 0x00000180,
+ 0x000001c0, 0x000001e0, 0x000001a0, 0x000001a8,
+ 0x000001f8, 0x00000198, 0x000001d8, 0x000001f0,
+ 0x00000488, 0x000004e8, 0x00000490, 0x000004c8,
+ 0x000004b8, 0x000004d0, 0x000004b0, 0x00000480,
+ 0x000004c0, 0x000004e0, 0x000004a0, 0x000004a8,
+ 0x000004f8, 0x00000498, 0x000004d8, 0x000004f0,
+ 0x00000088, 0x000000e8, 0x00000090, 0x000000c8,
+ 0x000000b8, 0x000000d0, 0x000000b0, 0x00000080,
+ 0x000000c0, 0x000000e0, 0x000000a0, 0x000000a8,
+ 0x000000f8, 0x00000098, 0x000000d8, 0x000000f0,
+ 0x00000388, 0x000003e8, 0x00000390, 0x000003c8,
+ 0x000003b8, 0x000003d0, 0x000003b0, 0x00000380,
+ 0x000003c0, 0x000003e0, 0x000003a0, 0x000003a8,
+ 0x000003f8, 0x00000398, 0x000003d8, 0x000003f0,
+ 0x00000688, 0x000006e8, 0x00000690, 0x000006c8,
+ 0x000006b8, 0x000006d0, 0x000006b0, 0x00000680,
+ 0x000006c0, 0x000006e0, 0x000006a0, 0x000006a8,
+ 0x000006f8, 0x00000698, 0x000006d8, 0x000006f0,
+ 0x00000208, 0x00000268, 0x00000210, 0x00000248,
+ 0x00000238, 0x00000250, 0x00000230, 0x00000200,
+ 0x00000240, 0x00000260, 0x00000220, 0x00000228,
+ 0x00000278, 0x00000218, 0x00000258, 0x00000270,
+ };
+
+static const u32 sbox_CryptoPro_B[4*256] =
+ {
+ /* 0 */
+ 0x00004000, 0x00002000, 0x00005800, 0x00000800,
+ 0x00001800, 0x00002800, 0x00000000, 0x00004800,
+ 0x00001000, 0x00007000, 0x00005000, 0x00006000,
+ 0x00006800, 0x00003000, 0x00003800, 0x00007800,
+ 0x0000c000, 0x0000a000, 0x0000d800, 0x00008800,
+ 0x00009800, 0x0000a800, 0x00008000, 0x0000c800,
+ 0x00009000, 0x0000f000, 0x0000d000, 0x0000e000,
+ 0x0000e800, 0x0000b000, 0x0000b800, 0x0000f800,
+ 0x00014000, 0x00012000, 0x00015800, 0x00010800,
+ 0x00011800, 0x00012800, 0x00010000, 0x00014800,
+ 0x00011000, 0x00017000, 0x00015000, 0x00016000,
+ 0x00016800, 0x00013000, 0x00013800, 0x00017800,
+ 0x00054000, 0x00052000, 0x00055800, 0x00050800,
+ 0x00051800, 0x00052800, 0x00050000, 0x00054800,
+ 0x00051000, 0x00057000, 0x00055000, 0x00056000,
+ 0x00056800, 0x00053000, 0x00053800, 0x00057800,
+ 0x00024000, 0x00022000, 0x00025800, 0x00020800,
+ 0x00021800, 0x00022800, 0x00020000, 0x00024800,
+ 0x00021000, 0x00027000, 0x00025000, 0x00026000,
+ 0x00026800, 0x00023000, 0x00023800, 0x00027800,
+ 0x0006c000, 0x0006a000, 0x0006d800, 0x00068800,
+ 0x00069800, 0x0006a800, 0x00068000, 0x0006c800,
+ 0x00069000, 0x0006f000, 0x0006d000, 0x0006e000,
+ 0x0006e800, 0x0006b000, 0x0006b800, 0x0006f800,
+ 0x0002c000, 0x0002a000, 0x0002d800, 0x00028800,
+ 0x00029800, 0x0002a800, 0x00028000, 0x0002c800,
+ 0x00029000, 0x0002f000, 0x0002d000, 0x0002e000,
+ 0x0002e800, 0x0002b000, 0x0002b800, 0x0002f800,
+ 0x00064000, 0x00062000, 0x00065800, 0x00060800,
+ 0x00061800, 0x00062800, 0x00060000, 0x00064800,
+ 0x00061000, 0x00067000, 0x00065000, 0x00066000,
+ 0x00066800, 0x00063000, 0x00063800, 0x00067800,
+ 0x0004c000, 0x0004a000, 0x0004d800, 0x00048800,
+ 0x00049800, 0x0004a800, 0x00048000, 0x0004c800,
+ 0x00049000, 0x0004f000, 0x0004d000, 0x0004e000,
+ 0x0004e800, 0x0004b000, 0x0004b800, 0x0004f800,
+ 0x0003c000, 0x0003a000, 0x0003d800, 0x00038800,
+ 0x00039800, 0x0003a800, 0x00038000, 0x0003c800,
+ 0x00039000, 0x0003f000, 0x0003d000, 0x0003e000,
+ 0x0003e800, 0x0003b000, 0x0003b800, 0x0003f800,
+ 0x0001c000, 0x0001a000, 0x0001d800, 0x00018800,
+ 0x00019800, 0x0001a800, 0x00018000, 0x0001c800,
+ 0x00019000, 0x0001f000, 0x0001d000, 0x0001e000,
+ 0x0001e800, 0x0001b000, 0x0001b800, 0x0001f800,
+ 0x0007c000, 0x0007a000, 0x0007d800, 0x00078800,
+ 0x00079800, 0x0007a800, 0x00078000, 0x0007c800,
+ 0x00079000, 0x0007f000, 0x0007d000, 0x0007e000,
+ 0x0007e800, 0x0007b000, 0x0007b800, 0x0007f800,
+ 0x0005c000, 0x0005a000, 0x0005d800, 0x00058800,
+ 0x00059800, 0x0005a800, 0x00058000, 0x0005c800,
+ 0x00059000, 0x0005f000, 0x0005d000, 0x0005e000,
+ 0x0005e800, 0x0005b000, 0x0005b800, 0x0005f800,
+ 0x00044000, 0x00042000, 0x00045800, 0x00040800,
+ 0x00041800, 0x00042800, 0x00040000, 0x00044800,
+ 0x00041000, 0x00047000, 0x00045000, 0x00046000,
+ 0x00046800, 0x00043000, 0x00043800, 0x00047800,
+ 0x00034000, 0x00032000, 0x00035800, 0x00030800,
+ 0x00031800, 0x00032800, 0x00030000, 0x00034800,
+ 0x00031000, 0x00037000, 0x00035000, 0x00036000,
+ 0x00036800, 0x00033000, 0x00033800, 0x00037800,
+ 0x00074000, 0x00072000, 0x00075800, 0x00070800,
+ 0x00071800, 0x00072800, 0x00070000, 0x00074800,
+ 0x00071000, 0x00077000, 0x00075000, 0x00076000,
+ 0x00076800, 0x00073000, 0x00073800, 0x00077800,
+ /* 1 */
+ 0x03f00000, 0x03e00000, 0x03800000, 0x03d00000,
+ 0x03c80000, 0x03900000, 0x03e80000, 0x03d80000,
+ 0x03b80000, 0x03a80000, 0x03c00000, 0x03f80000,
+ 0x03980000, 0x03b00000, 0x03880000, 0x03a00000,
+ 0x02f00000, 0x02e00000, 0x02800000, 0x02d00000,
+ 0x02c80000, 0x02900000, 0x02e80000, 0x02d80000,
+ 0x02b80000, 0x02a80000, 0x02c00000, 0x02f80000,
+ 0x02980000, 0x02b00000, 0x02880000, 0x02a00000,
+ 0x00700000, 0x00600000, 0x00000000, 0x00500000,
+ 0x00480000, 0x00100000, 0x00680000, 0x00580000,
+ 0x00380000, 0x00280000, 0x00400000, 0x00780000,
+ 0x00180000, 0x00300000, 0x00080000, 0x00200000,
+ 0x06f00000, 0x06e00000, 0x06800000, 0x06d00000,
+ 0x06c80000, 0x06900000, 0x06e80000, 0x06d80000,
+ 0x06b80000, 0x06a80000, 0x06c00000, 0x06f80000,
+ 0x06980000, 0x06b00000, 0x06880000, 0x06a00000,
+ 0x05f00000, 0x05e00000, 0x05800000, 0x05d00000,
+ 0x05c80000, 0x05900000, 0x05e80000, 0x05d80000,
+ 0x05b80000, 0x05a80000, 0x05c00000, 0x05f80000,
+ 0x05980000, 0x05b00000, 0x05880000, 0x05a00000,
+ 0x03700000, 0x03600000, 0x03000000, 0x03500000,
+ 0x03480000, 0x03100000, 0x03680000, 0x03580000,
+ 0x03380000, 0x03280000, 0x03400000, 0x03780000,
+ 0x03180000, 0x03300000, 0x03080000, 0x03200000,
+ 0x00f00000, 0x00e00000, 0x00800000, 0x00d00000,
+ 0x00c80000, 0x00900000, 0x00e80000, 0x00d80000,
+ 0x00b80000, 0x00a80000, 0x00c00000, 0x00f80000,
+ 0x00980000, 0x00b00000, 0x00880000, 0x00a00000,
+ 0x01700000, 0x01600000, 0x01000000, 0x01500000,
+ 0x01480000, 0x01100000, 0x01680000, 0x01580000,
+ 0x01380000, 0x01280000, 0x01400000, 0x01780000,
+ 0x01180000, 0x01300000, 0x01080000, 0x01200000,
+ 0x01f00000, 0x01e00000, 0x01800000, 0x01d00000,
+ 0x01c80000, 0x01900000, 0x01e80000, 0x01d80000,
+ 0x01b80000, 0x01a80000, 0x01c00000, 0x01f80000,
+ 0x01980000, 0x01b00000, 0x01880000, 0x01a00000,
+ 0x05700000, 0x05600000, 0x05000000, 0x05500000,
+ 0x05480000, 0x05100000, 0x05680000, 0x05580000,
+ 0x05380000, 0x05280000, 0x05400000, 0x05780000,
+ 0x05180000, 0x05300000, 0x05080000, 0x05200000,
+ 0x06700000, 0x06600000, 0x06000000, 0x06500000,
+ 0x06480000, 0x06100000, 0x06680000, 0x06580000,
+ 0x06380000, 0x06280000, 0x06400000, 0x06780000,
+ 0x06180000, 0x06300000, 0x06080000, 0x06200000,
+ 0x07f00000, 0x07e00000, 0x07800000, 0x07d00000,
+ 0x07c80000, 0x07900000, 0x07e80000, 0x07d80000,
+ 0x07b80000, 0x07a80000, 0x07c00000, 0x07f80000,
+ 0x07980000, 0x07b00000, 0x07880000, 0x07a00000,
+ 0x02700000, 0x02600000, 0x02000000, 0x02500000,
+ 0x02480000, 0x02100000, 0x02680000, 0x02580000,
+ 0x02380000, 0x02280000, 0x02400000, 0x02780000,
+ 0x02180000, 0x02300000, 0x02080000, 0x02200000,
+ 0x07700000, 0x07600000, 0x07000000, 0x07500000,
+ 0x07480000, 0x07100000, 0x07680000, 0x07580000,
+ 0x07380000, 0x07280000, 0x07400000, 0x07780000,
+ 0x07180000, 0x07300000, 0x07080000, 0x07200000,
+ 0x04f00000, 0x04e00000, 0x04800000, 0x04d00000,
+ 0x04c80000, 0x04900000, 0x04e80000, 0x04d80000,
+ 0x04b80000, 0x04a80000, 0x04c00000, 0x04f80000,
+ 0x04980000, 0x04b00000, 0x04880000, 0x04a00000,
+ 0x04700000, 0x04600000, 0x04000000, 0x04500000,
+ 0x04480000, 0x04100000, 0x04680000, 0x04580000,
+ 0x04380000, 0x04280000, 0x04400000, 0x04780000,
+ 0x04180000, 0x04300000, 0x04080000, 0x04200000,
+ /* 2 */
+ 0x10000004, 0x38000004, 0x60000004, 0x78000004,
+ 0x48000004, 0x28000004, 0x50000004, 0x58000004,
+ 0x08000004, 0x20000004, 0x00000004, 0x68000004,
+ 0x30000004, 0x40000004, 0x70000004, 0x18000004,
+ 0x90000001, 0xb8000001, 0xe0000001, 0xf8000001,
+ 0xc8000001, 0xa8000001, 0xd0000001, 0xd8000001,
+ 0x88000001, 0xa0000001, 0x80000001, 0xe8000001,
+ 0xb0000001, 0xc0000001, 0xf0000001, 0x98000001,
+ 0x10000001, 0x38000001, 0x60000001, 0x78000001,
+ 0x48000001, 0x28000001, 0x50000001, 0x58000001,
+ 0x08000001, 0x20000001, 0x00000001, 0x68000001,
+ 0x30000001, 0x40000001, 0x70000001, 0x18000001,
+ 0x10000003, 0x38000003, 0x60000003, 0x78000003,
+ 0x48000003, 0x28000003, 0x50000003, 0x58000003,
+ 0x08000003, 0x20000003, 0x00000003, 0x68000003,
+ 0x30000003, 0x40000003, 0x70000003, 0x18000003,
+ 0x10000002, 0x38000002, 0x60000002, 0x78000002,
+ 0x48000002, 0x28000002, 0x50000002, 0x58000002,
+ 0x08000002, 0x20000002, 0x00000002, 0x68000002,
+ 0x30000002, 0x40000002, 0x70000002, 0x18000002,
+ 0x90000006, 0xb8000006, 0xe0000006, 0xf8000006,
+ 0xc8000006, 0xa8000006, 0xd0000006, 0xd8000006,
+ 0x88000006, 0xa0000006, 0x80000006, 0xe8000006,
+ 0xb0000006, 0xc0000006, 0xf0000006, 0x98000006,
+ 0x10000007, 0x38000007, 0x60000007, 0x78000007,
+ 0x48000007, 0x28000007, 0x50000007, 0x58000007,
+ 0x08000007, 0x20000007, 0x00000007, 0x68000007,
+ 0x30000007, 0x40000007, 0x70000007, 0x18000007,
+ 0x90000005, 0xb8000005, 0xe0000005, 0xf8000005,
+ 0xc8000005, 0xa8000005, 0xd0000005, 0xd8000005,
+ 0x88000005, 0xa0000005, 0x80000005, 0xe8000005,
+ 0xb0000005, 0xc0000005, 0xf0000005, 0x98000005,
+ 0x10000006, 0x38000006, 0x60000006, 0x78000006,
+ 0x48000006, 0x28000006, 0x50000006, 0x58000006,
+ 0x08000006, 0x20000006, 0x00000006, 0x68000006,
+ 0x30000006, 0x40000006, 0x70000006, 0x18000006,
+ 0x90000000, 0xb8000000, 0xe0000000, 0xf8000000,
+ 0xc8000000, 0xa8000000, 0xd0000000, 0xd8000000,
+ 0x88000000, 0xa0000000, 0x80000000, 0xe8000000,
+ 0xb0000000, 0xc0000000, 0xf0000000, 0x98000000,
+ 0x90000003, 0xb8000003, 0xe0000003, 0xf8000003,
+ 0xc8000003, 0xa8000003, 0xd0000003, 0xd8000003,
+ 0x88000003, 0xa0000003, 0x80000003, 0xe8000003,
+ 0xb0000003, 0xc0000003, 0xf0000003, 0x98000003,
+ 0x90000007, 0xb8000007, 0xe0000007, 0xf8000007,
+ 0xc8000007, 0xa8000007, 0xd0000007, 0xd8000007,
+ 0x88000007, 0xa0000007, 0x80000007, 0xe8000007,
+ 0xb0000007, 0xc0000007, 0xf0000007, 0x98000007,
+ 0x10000005, 0x38000005, 0x60000005, 0x78000005,
+ 0x48000005, 0x28000005, 0x50000005, 0x58000005,
+ 0x08000005, 0x20000005, 0x00000005, 0x68000005,
+ 0x30000005, 0x40000005, 0x70000005, 0x18000005,
+ 0x10000000, 0x38000000, 0x60000000, 0x78000000,
+ 0x48000000, 0x28000000, 0x50000000, 0x58000000,
+ 0x08000000, 0x20000000, 0x00000000, 0x68000000,
+ 0x30000000, 0x40000000, 0x70000000, 0x18000000,
+ 0x90000004, 0xb8000004, 0xe0000004, 0xf8000004,
+ 0xc8000004, 0xa8000004, 0xd0000004, 0xd8000004,
+ 0x88000004, 0xa0000004, 0x80000004, 0xe8000004,
+ 0xb0000004, 0xc0000004, 0xf0000004, 0x98000004,
+ 0x90000002, 0xb8000002, 0xe0000002, 0xf8000002,
+ 0xc8000002, 0xa8000002, 0xd0000002, 0xd8000002,
+ 0x88000002, 0xa0000002, 0x80000002, 0xe8000002,
+ 0xb0000002, 0xc0000002, 0xf0000002, 0x98000002,
+ /* 3 */
+ 0x00000028, 0x00000010, 0x00000050, 0x00000058,
+ 0x00000048, 0x00000008, 0x00000060, 0x00000018,
+ 0x00000038, 0x00000020, 0x00000068, 0x00000000,
+ 0x00000030, 0x00000078, 0x00000040, 0x00000070,
+ 0x00000228, 0x00000210, 0x00000250, 0x00000258,
+ 0x00000248, 0x00000208, 0x00000260, 0x00000218,
+ 0x00000238, 0x00000220, 0x00000268, 0x00000200,
+ 0x00000230, 0x00000278, 0x00000240, 0x00000270,
+ 0x000005a8, 0x00000590, 0x000005d0, 0x000005d8,
+ 0x000005c8, 0x00000588, 0x000005e0, 0x00000598,
+ 0x000005b8, 0x000005a0, 0x000005e8, 0x00000580,
+ 0x000005b0, 0x000005f8, 0x000005c0, 0x000005f0,
+ 0x00000728, 0x00000710, 0x00000750, 0x00000758,
+ 0x00000748, 0x00000708, 0x00000760, 0x00000718,
+ 0x00000738, 0x00000720, 0x00000768, 0x00000700,
+ 0x00000730, 0x00000778, 0x00000740, 0x00000770,
+ 0x00000428, 0x00000410, 0x00000450, 0x00000458,
+ 0x00000448, 0x00000408, 0x00000460, 0x00000418,
+ 0x00000438, 0x00000420, 0x00000468, 0x00000400,
+ 0x00000430, 0x00000478, 0x00000440, 0x00000470,
+ 0x000001a8, 0x00000190, 0x000001d0, 0x000001d8,
+ 0x000001c8, 0x00000188, 0x000001e0, 0x00000198,
+ 0x000001b8, 0x000001a0, 0x000001e8, 0x00000180,
+ 0x000001b0, 0x000001f8, 0x000001c0, 0x000001f0,
+ 0x000003a8, 0x00000390, 0x000003d0, 0x000003d8,
+ 0x000003c8, 0x00000388, 0x000003e0, 0x00000398,
+ 0x000003b8, 0x000003a0, 0x000003e8, 0x00000380,
+ 0x000003b0, 0x000003f8, 0x000003c0, 0x000003f0,
+ 0x000000a8, 0x00000090, 0x000000d0, 0x000000d8,
+ 0x000000c8, 0x00000088, 0x000000e0, 0x00000098,
+ 0x000000b8, 0x000000a0, 0x000000e8, 0x00000080,
+ 0x000000b0, 0x000000f8, 0x000000c0, 0x000000f0,
+ 0x00000528, 0x00000510, 0x00000550, 0x00000558,
+ 0x00000548, 0x00000508, 0x00000560, 0x00000518,
+ 0x00000538, 0x00000520, 0x00000568, 0x00000500,
+ 0x00000530, 0x00000578, 0x00000540, 0x00000570,
+ 0x00000128, 0x00000110, 0x00000150, 0x00000158,
+ 0x00000148, 0x00000108, 0x00000160, 0x00000118,
+ 0x00000138, 0x00000120, 0x00000168, 0x00000100,
+ 0x00000130, 0x00000178, 0x00000140, 0x00000170,
+ 0x000004a8, 0x00000490, 0x000004d0, 0x000004d8,
+ 0x000004c8, 0x00000488, 0x000004e0, 0x00000498,
+ 0x000004b8, 0x000004a0, 0x000004e8, 0x00000480,
+ 0x000004b0, 0x000004f8, 0x000004c0, 0x000004f0,
+ 0x00000328, 0x00000310, 0x00000350, 0x00000358,
+ 0x00000348, 0x00000308, 0x00000360, 0x00000318,
+ 0x00000338, 0x00000320, 0x00000368, 0x00000300,
+ 0x00000330, 0x00000378, 0x00000340, 0x00000370,
+ 0x000007a8, 0x00000790, 0x000007d0, 0x000007d8,
+ 0x000007c8, 0x00000788, 0x000007e0, 0x00000798,
+ 0x000007b8, 0x000007a0, 0x000007e8, 0x00000780,
+ 0x000007b0, 0x000007f8, 0x000007c0, 0x000007f0,
+ 0x000006a8, 0x00000690, 0x000006d0, 0x000006d8,
+ 0x000006c8, 0x00000688, 0x000006e0, 0x00000698,
+ 0x000006b8, 0x000006a0, 0x000006e8, 0x00000680,
+ 0x000006b0, 0x000006f8, 0x000006c0, 0x000006f0,
+ 0x000002a8, 0x00000290, 0x000002d0, 0x000002d8,
+ 0x000002c8, 0x00000288, 0x000002e0, 0x00000298,
+ 0x000002b8, 0x000002a0, 0x000002e8, 0x00000280,
+ 0x000002b0, 0x000002f8, 0x000002c0, 0x000002f0,
+ 0x00000628, 0x00000610, 0x00000650, 0x00000658,
+ 0x00000648, 0x00000608, 0x00000660, 0x00000618,
+ 0x00000638, 0x00000620, 0x00000668, 0x00000600,
+ 0x00000630, 0x00000678, 0x00000640, 0x00000670,
+ };
+
+static const u32 sbox_CryptoPro_C[4*256] =
+ {
+ /* 0 */
+ 0x00000800, 0x00005800, 0x00006000, 0x00001000,
+ 0x00004800, 0x00006800, 0x00000000, 0x00007800,
+ 0x00002000, 0x00002800, 0x00004000, 0x00007000,
+ 0x00005000, 0x00003800, 0x00003000, 0x00001800,
+ 0x00008800, 0x0000d800, 0x0000e000, 0x00009000,
+ 0x0000c800, 0x0000e800, 0x00008000, 0x0000f800,
+ 0x0000a000, 0x0000a800, 0x0000c000, 0x0000f000,
+ 0x0000d000, 0x0000b800, 0x0000b000, 0x00009800,
+ 0x00038800, 0x0003d800, 0x0003e000, 0x00039000,
+ 0x0003c800, 0x0003e800, 0x00038000, 0x0003f800,
+ 0x0003a000, 0x0003a800, 0x0003c000, 0x0003f000,
+ 0x0003d000, 0x0003b800, 0x0003b000, 0x00039800,
+ 0x00068800, 0x0006d800, 0x0006e000, 0x00069000,
+ 0x0006c800, 0x0006e800, 0x00068000, 0x0006f800,
+ 0x0006a000, 0x0006a800, 0x0006c000, 0x0006f000,
+ 0x0006d000, 0x0006b800, 0x0006b000, 0x00069800,
+ 0x00058800, 0x0005d800, 0x0005e000, 0x00059000,
+ 0x0005c800, 0x0005e800, 0x00058000, 0x0005f800,
+ 0x0005a000, 0x0005a800, 0x0005c000, 0x0005f000,
+ 0x0005d000, 0x0005b800, 0x0005b000, 0x00059800,
+ 0x00020800, 0x00025800, 0x00026000, 0x00021000,
+ 0x00024800, 0x00026800, 0x00020000, 0x00027800,
+ 0x00022000, 0x00022800, 0x00024000, 0x00027000,
+ 0x00025000, 0x00023800, 0x00023000, 0x00021800,
+ 0x00028800, 0x0002d800, 0x0002e000, 0x00029000,
+ 0x0002c800, 0x0002e800, 0x00028000, 0x0002f800,
+ 0x0002a000, 0x0002a800, 0x0002c000, 0x0002f000,
+ 0x0002d000, 0x0002b800, 0x0002b000, 0x00029800,
+ 0x00010800, 0x00015800, 0x00016000, 0x00011000,
+ 0x00014800, 0x00016800, 0x00010000, 0x00017800,
+ 0x00012000, 0x00012800, 0x00014000, 0x00017000,
+ 0x00015000, 0x00013800, 0x00013000, 0x00011800,
+ 0x00040800, 0x00045800, 0x00046000, 0x00041000,
+ 0x00044800, 0x00046800, 0x00040000, 0x00047800,
+ 0x00042000, 0x00042800, 0x00044000, 0x00047000,
+ 0x00045000, 0x00043800, 0x00043000, 0x00041800,
+ 0x00070800, 0x00075800, 0x00076000, 0x00071000,
+ 0x00074800, 0x00076800, 0x00070000, 0x00077800,
+ 0x00072000, 0x00072800, 0x00074000, 0x00077000,
+ 0x00075000, 0x00073800, 0x00073000, 0x00071800,
+ 0x00078800, 0x0007d800, 0x0007e000, 0x00079000,
+ 0x0007c800, 0x0007e800, 0x00078000, 0x0007f800,
+ 0x0007a000, 0x0007a800, 0x0007c000, 0x0007f000,
+ 0x0007d000, 0x0007b800, 0x0007b000, 0x00079800,
+ 0x00060800, 0x00065800, 0x00066000, 0x00061000,
+ 0x00064800, 0x00066800, 0x00060000, 0x00067800,
+ 0x00062000, 0x00062800, 0x00064000, 0x00067000,
+ 0x00065000, 0x00063800, 0x00063000, 0x00061800,
+ 0x00048800, 0x0004d800, 0x0004e000, 0x00049000,
+ 0x0004c800, 0x0004e800, 0x00048000, 0x0004f800,
+ 0x0004a000, 0x0004a800, 0x0004c000, 0x0004f000,
+ 0x0004d000, 0x0004b800, 0x0004b000, 0x00049800,
+ 0x00050800, 0x00055800, 0x00056000, 0x00051000,
+ 0x00054800, 0x00056800, 0x00050000, 0x00057800,
+ 0x00052000, 0x00052800, 0x00054000, 0x00057000,
+ 0x00055000, 0x00053800, 0x00053000, 0x00051800,
+ 0x00030800, 0x00035800, 0x00036000, 0x00031000,
+ 0x00034800, 0x00036800, 0x00030000, 0x00037800,
+ 0x00032000, 0x00032800, 0x00034000, 0x00037000,
+ 0x00035000, 0x00033800, 0x00033000, 0x00031800,
+ 0x00018800, 0x0001d800, 0x0001e000, 0x00019000,
+ 0x0001c800, 0x0001e800, 0x00018000, 0x0001f800,
+ 0x0001a000, 0x0001a800, 0x0001c000, 0x0001f000,
+ 0x0001d000, 0x0001b800, 0x0001b000, 0x00019800,
+ /* 1 */
+ 0x01c00000, 0x01900000, 0x01a80000, 0x01800000,
+ 0x01a00000, 0x01c80000, 0x01f80000, 0x01d00000,
+ 0x01980000, 0x01b80000, 0x01e00000, 0x01e80000,
+ 0x01b00000, 0x01f00000, 0x01880000, 0x01d80000,
+ 0x03400000, 0x03100000, 0x03280000, 0x03000000,
+ 0x03200000, 0x03480000, 0x03780000, 0x03500000,
+ 0x03180000, 0x03380000, 0x03600000, 0x03680000,
+ 0x03300000, 0x03700000, 0x03080000, 0x03580000,
+ 0x00400000, 0x00100000, 0x00280000, 0x00000000,
+ 0x00200000, 0x00480000, 0x00780000, 0x00500000,
+ 0x00180000, 0x00380000, 0x00600000, 0x00680000,
+ 0x00300000, 0x00700000, 0x00080000, 0x00580000,
+ 0x00c00000, 0x00900000, 0x00a80000, 0x00800000,
+ 0x00a00000, 0x00c80000, 0x00f80000, 0x00d00000,
+ 0x00980000, 0x00b80000, 0x00e00000, 0x00e80000,
+ 0x00b00000, 0x00f00000, 0x00880000, 0x00d80000,
+ 0x02c00000, 0x02900000, 0x02a80000, 0x02800000,
+ 0x02a00000, 0x02c80000, 0x02f80000, 0x02d00000,
+ 0x02980000, 0x02b80000, 0x02e00000, 0x02e80000,
+ 0x02b00000, 0x02f00000, 0x02880000, 0x02d80000,
+ 0x06c00000, 0x06900000, 0x06a80000, 0x06800000,
+ 0x06a00000, 0x06c80000, 0x06f80000, 0x06d00000,
+ 0x06980000, 0x06b80000, 0x06e00000, 0x06e80000,
+ 0x06b00000, 0x06f00000, 0x06880000, 0x06d80000,
+ 0x05400000, 0x05100000, 0x05280000, 0x05000000,
+ 0x05200000, 0x05480000, 0x05780000, 0x05500000,
+ 0x05180000, 0x05380000, 0x05600000, 0x05680000,
+ 0x05300000, 0x05700000, 0x05080000, 0x05580000,
+ 0x04400000, 0x04100000, 0x04280000, 0x04000000,
+ 0x04200000, 0x04480000, 0x04780000, 0x04500000,
+ 0x04180000, 0x04380000, 0x04600000, 0x04680000,
+ 0x04300000, 0x04700000, 0x04080000, 0x04580000,
+ 0x05c00000, 0x05900000, 0x05a80000, 0x05800000,
+ 0x05a00000, 0x05c80000, 0x05f80000, 0x05d00000,
+ 0x05980000, 0x05b80000, 0x05e00000, 0x05e80000,
+ 0x05b00000, 0x05f00000, 0x05880000, 0x05d80000,
+ 0x01400000, 0x01100000, 0x01280000, 0x01000000,
+ 0x01200000, 0x01480000, 0x01780000, 0x01500000,
+ 0x01180000, 0x01380000, 0x01600000, 0x01680000,
+ 0x01300000, 0x01700000, 0x01080000, 0x01580000,
+ 0x04c00000, 0x04900000, 0x04a80000, 0x04800000,
+ 0x04a00000, 0x04c80000, 0x04f80000, 0x04d00000,
+ 0x04980000, 0x04b80000, 0x04e00000, 0x04e80000,
+ 0x04b00000, 0x04f00000, 0x04880000, 0x04d80000,
+ 0x03c00000, 0x03900000, 0x03a80000, 0x03800000,
+ 0x03a00000, 0x03c80000, 0x03f80000, 0x03d00000,
+ 0x03980000, 0x03b80000, 0x03e00000, 0x03e80000,
+ 0x03b00000, 0x03f00000, 0x03880000, 0x03d80000,
+ 0x07400000, 0x07100000, 0x07280000, 0x07000000,
+ 0x07200000, 0x07480000, 0x07780000, 0x07500000,
+ 0x07180000, 0x07380000, 0x07600000, 0x07680000,
+ 0x07300000, 0x07700000, 0x07080000, 0x07580000,
+ 0x07c00000, 0x07900000, 0x07a80000, 0x07800000,
+ 0x07a00000, 0x07c80000, 0x07f80000, 0x07d00000,
+ 0x07980000, 0x07b80000, 0x07e00000, 0x07e80000,
+ 0x07b00000, 0x07f00000, 0x07880000, 0x07d80000,
+ 0x06400000, 0x06100000, 0x06280000, 0x06000000,
+ 0x06200000, 0x06480000, 0x06780000, 0x06500000,
+ 0x06180000, 0x06380000, 0x06600000, 0x06680000,
+ 0x06300000, 0x06700000, 0x06080000, 0x06580000,
+ 0x02400000, 0x02100000, 0x02280000, 0x02000000,
+ 0x02200000, 0x02480000, 0x02780000, 0x02500000,
+ 0x02180000, 0x02380000, 0x02600000, 0x02680000,
+ 0x02300000, 0x02700000, 0x02080000, 0x02580000,
+ /* 2 */
+ 0x40000006, 0x68000006, 0x58000006, 0x00000006,
+ 0x20000006, 0x28000006, 0x08000006, 0x10000006,
+ 0x48000006, 0x18000006, 0x60000006, 0x70000006,
+ 0x30000006, 0x78000006, 0x50000006, 0x38000006,
+ 0xc0000004, 0xe8000004, 0xd8000004, 0x80000004,
+ 0xa0000004, 0xa8000004, 0x88000004, 0x90000004,
+ 0xc8000004, 0x98000004, 0xe0000004, 0xf0000004,
+ 0xb0000004, 0xf8000004, 0xd0000004, 0xb8000004,
+ 0xc0000005, 0xe8000005, 0xd8000005, 0x80000005,
+ 0xa0000005, 0xa8000005, 0x88000005, 0x90000005,
+ 0xc8000005, 0x98000005, 0xe0000005, 0xf0000005,
+ 0xb0000005, 0xf8000005, 0xd0000005, 0xb8000005,
+ 0xc0000000, 0xe8000000, 0xd8000000, 0x80000000,
+ 0xa0000000, 0xa8000000, 0x88000000, 0x90000000,
+ 0xc8000000, 0x98000000, 0xe0000000, 0xf0000000,
+ 0xb0000000, 0xf8000000, 0xd0000000, 0xb8000000,
+ 0x40000004, 0x68000004, 0x58000004, 0x00000004,
+ 0x20000004, 0x28000004, 0x08000004, 0x10000004,
+ 0x48000004, 0x18000004, 0x60000004, 0x70000004,
+ 0x30000004, 0x78000004, 0x50000004, 0x38000004,
+ 0x40000007, 0x68000007, 0x58000007, 0x00000007,
+ 0x20000007, 0x28000007, 0x08000007, 0x10000007,
+ 0x48000007, 0x18000007, 0x60000007, 0x70000007,
+ 0x30000007, 0x78000007, 0x50000007, 0x38000007,
+ 0x40000001, 0x68000001, 0x58000001, 0x00000001,
+ 0x20000001, 0x28000001, 0x08000001, 0x10000001,
+ 0x48000001, 0x18000001, 0x60000001, 0x70000001,
+ 0x30000001, 0x78000001, 0x50000001, 0x38000001,
+ 0x40000002, 0x68000002, 0x58000002, 0x00000002,
+ 0x20000002, 0x28000002, 0x08000002, 0x10000002,
+ 0x48000002, 0x18000002, 0x60000002, 0x70000002,
+ 0x30000002, 0x78000002, 0x50000002, 0x38000002,
+ 0xc0000003, 0xe8000003, 0xd8000003, 0x80000003,
+ 0xa0000003, 0xa8000003, 0x88000003, 0x90000003,
+ 0xc8000003, 0x98000003, 0xe0000003, 0xf0000003,
+ 0xb0000003, 0xf8000003, 0xd0000003, 0xb8000003,
+ 0xc0000001, 0xe8000001, 0xd8000001, 0x80000001,
+ 0xa0000001, 0xa8000001, 0x88000001, 0x90000001,
+ 0xc8000001, 0x98000001, 0xe0000001, 0xf0000001,
+ 0xb0000001, 0xf8000001, 0xd0000001, 0xb8000001,
+ 0x40000003, 0x68000003, 0x58000003, 0x00000003,
+ 0x20000003, 0x28000003, 0x08000003, 0x10000003,
+ 0x48000003, 0x18000003, 0x60000003, 0x70000003,
+ 0x30000003, 0x78000003, 0x50000003, 0x38000003,
+ 0xc0000002, 0xe8000002, 0xd8000002, 0x80000002,
+ 0xa0000002, 0xa8000002, 0x88000002, 0x90000002,
+ 0xc8000002, 0x98000002, 0xe0000002, 0xf0000002,
+ 0xb0000002, 0xf8000002, 0xd0000002, 0xb8000002,
+ 0x40000005, 0x68000005, 0x58000005, 0x00000005,
+ 0x20000005, 0x28000005, 0x08000005, 0x10000005,
+ 0x48000005, 0x18000005, 0x60000005, 0x70000005,
+ 0x30000005, 0x78000005, 0x50000005, 0x38000005,
+ 0x40000000, 0x68000000, 0x58000000, 0x00000000,
+ 0x20000000, 0x28000000, 0x08000000, 0x10000000,
+ 0x48000000, 0x18000000, 0x60000000, 0x70000000,
+ 0x30000000, 0x78000000, 0x50000000, 0x38000000,
+ 0xc0000007, 0xe8000007, 0xd8000007, 0x80000007,
+ 0xa0000007, 0xa8000007, 0x88000007, 0x90000007,
+ 0xc8000007, 0x98000007, 0xe0000007, 0xf0000007,
+ 0xb0000007, 0xf8000007, 0xd0000007, 0xb8000007,
+ 0xc0000006, 0xe8000006, 0xd8000006, 0x80000006,
+ 0xa0000006, 0xa8000006, 0x88000006, 0x90000006,
+ 0xc8000006, 0x98000006, 0xe0000006, 0xf0000006,
+ 0xb0000006, 0xf8000006, 0xd0000006, 0xb8000006,
+ /* 3 */
+ 0x000003d0, 0x000003c8, 0x000003b0, 0x000003c0,
+ 0x000003e8, 0x000003f0, 0x00000390, 0x00000380,
+ 0x000003f8, 0x00000398, 0x000003a8, 0x000003d8,
+ 0x000003a0, 0x00000388, 0x000003e0, 0x000003b8,
+ 0x00000250, 0x00000248, 0x00000230, 0x00000240,
+ 0x00000268, 0x00000270, 0x00000210, 0x00000200,
+ 0x00000278, 0x00000218, 0x00000228, 0x00000258,
+ 0x00000220, 0x00000208, 0x00000260, 0x00000238,
+ 0x00000050, 0x00000048, 0x00000030, 0x00000040,
+ 0x00000068, 0x00000070, 0x00000010, 0x00000000,
+ 0x00000078, 0x00000018, 0x00000028, 0x00000058,
+ 0x00000020, 0x00000008, 0x00000060, 0x00000038,
+ 0x000002d0, 0x000002c8, 0x000002b0, 0x000002c0,
+ 0x000002e8, 0x000002f0, 0x00000290, 0x00000280,
+ 0x000002f8, 0x00000298, 0x000002a8, 0x000002d8,
+ 0x000002a0, 0x00000288, 0x000002e0, 0x000002b8,
+ 0x00000550, 0x00000548, 0x00000530, 0x00000540,
+ 0x00000568, 0x00000570, 0x00000510, 0x00000500,
+ 0x00000578, 0x00000518, 0x00000528, 0x00000558,
+ 0x00000520, 0x00000508, 0x00000560, 0x00000538,
+ 0x00000150, 0x00000148, 0x00000130, 0x00000140,
+ 0x00000168, 0x00000170, 0x00000110, 0x00000100,
+ 0x00000178, 0x00000118, 0x00000128, 0x00000158,
+ 0x00000120, 0x00000108, 0x00000160, 0x00000138,
+ 0x000007d0, 0x000007c8, 0x000007b0, 0x000007c0,
+ 0x000007e8, 0x000007f0, 0x00000790, 0x00000780,
+ 0x000007f8, 0x00000798, 0x000007a8, 0x000007d8,
+ 0x000007a0, 0x00000788, 0x000007e0, 0x000007b8,
+ 0x00000750, 0x00000748, 0x00000730, 0x00000740,
+ 0x00000768, 0x00000770, 0x00000710, 0x00000700,
+ 0x00000778, 0x00000718, 0x00000728, 0x00000758,
+ 0x00000720, 0x00000708, 0x00000760, 0x00000738,
+ 0x00000650, 0x00000648, 0x00000630, 0x00000640,
+ 0x00000668, 0x00000670, 0x00000610, 0x00000600,
+ 0x00000678, 0x00000618, 0x00000628, 0x00000658,
+ 0x00000620, 0x00000608, 0x00000660, 0x00000638,
+ 0x00000350, 0x00000348, 0x00000330, 0x00000340,
+ 0x00000368, 0x00000370, 0x00000310, 0x00000300,
+ 0x00000378, 0x00000318, 0x00000328, 0x00000358,
+ 0x00000320, 0x00000308, 0x00000360, 0x00000338,
+ 0x000000d0, 0x000000c8, 0x000000b0, 0x000000c0,
+ 0x000000e8, 0x000000f0, 0x00000090, 0x00000080,
+ 0x000000f8, 0x00000098, 0x000000a8, 0x000000d8,
+ 0x000000a0, 0x00000088, 0x000000e0, 0x000000b8,
+ 0x000005d0, 0x000005c8, 0x000005b0, 0x000005c0,
+ 0x000005e8, 0x000005f0, 0x00000590, 0x00000580,
+ 0x000005f8, 0x00000598, 0x000005a8, 0x000005d8,
+ 0x000005a0, 0x00000588, 0x000005e0, 0x000005b8,
+ 0x000006d0, 0x000006c8, 0x000006b0, 0x000006c0,
+ 0x000006e8, 0x000006f0, 0x00000690, 0x00000680,
+ 0x000006f8, 0x00000698, 0x000006a8, 0x000006d8,
+ 0x000006a0, 0x00000688, 0x000006e0, 0x000006b8,
+ 0x000004d0, 0x000004c8, 0x000004b0, 0x000004c0,
+ 0x000004e8, 0x000004f0, 0x00000490, 0x00000480,
+ 0x000004f8, 0x00000498, 0x000004a8, 0x000004d8,
+ 0x000004a0, 0x00000488, 0x000004e0, 0x000004b8,
+ 0x000001d0, 0x000001c8, 0x000001b0, 0x000001c0,
+ 0x000001e8, 0x000001f0, 0x00000190, 0x00000180,
+ 0x000001f8, 0x00000198, 0x000001a8, 0x000001d8,
+ 0x000001a0, 0x00000188, 0x000001e0, 0x000001b8,
+ 0x00000450, 0x00000448, 0x00000430, 0x00000440,
+ 0x00000468, 0x00000470, 0x00000410, 0x00000400,
+ 0x00000478, 0x00000418, 0x00000428, 0x00000458,
+ 0x00000420, 0x00000408, 0x00000460, 0x00000438,
+ };
+
+static const u32 sbox_CryptoPro_D[4*256] =
+ {
+ /* 0 */
+ 0x0005f800, 0x0005e000, 0x00059000, 0x0005d000,
+ 0x0005b000, 0x0005a000, 0x0005a800, 0x00058000,
+ 0x0005b800, 0x0005c800, 0x0005f000, 0x0005e800,
+ 0x00058800, 0x0005d800, 0x0005c000, 0x00059800,
+ 0x00037800, 0x00036000, 0x00031000, 0x00035000,
+ 0x00033000, 0x00032000, 0x00032800, 0x00030000,
+ 0x00033800, 0x00034800, 0x00037000, 0x00036800,
+ 0x00030800, 0x00035800, 0x00034000, 0x00031800,
+ 0x0001f800, 0x0001e000, 0x00019000, 0x0001d000,
+ 0x0001b000, 0x0001a000, 0x0001a800, 0x00018000,
+ 0x0001b800, 0x0001c800, 0x0001f000, 0x0001e800,
+ 0x00018800, 0x0001d800, 0x0001c000, 0x00019800,
+ 0x00027800, 0x00026000, 0x00021000, 0x00025000,
+ 0x00023000, 0x00022000, 0x00022800, 0x00020000,
+ 0x00023800, 0x00024800, 0x00027000, 0x00026800,
+ 0x00020800, 0x00025800, 0x00024000, 0x00021800,
+ 0x00067800, 0x00066000, 0x00061000, 0x00065000,
+ 0x00063000, 0x00062000, 0x00062800, 0x00060000,
+ 0x00063800, 0x00064800, 0x00067000, 0x00066800,
+ 0x00060800, 0x00065800, 0x00064000, 0x00061800,
+ 0x0007f800, 0x0007e000, 0x00079000, 0x0007d000,
+ 0x0007b000, 0x0007a000, 0x0007a800, 0x00078000,
+ 0x0007b800, 0x0007c800, 0x0007f000, 0x0007e800,
+ 0x00078800, 0x0007d800, 0x0007c000, 0x00079800,
+ 0x00077800, 0x00076000, 0x00071000, 0x00075000,
+ 0x00073000, 0x00072000, 0x00072800, 0x00070000,
+ 0x00073800, 0x00074800, 0x00077000, 0x00076800,
+ 0x00070800, 0x00075800, 0x00074000, 0x00071800,
+ 0x00017800, 0x00016000, 0x00011000, 0x00015000,
+ 0x00013000, 0x00012000, 0x00012800, 0x00010000,
+ 0x00013800, 0x00014800, 0x00017000, 0x00016800,
+ 0x00010800, 0x00015800, 0x00014000, 0x00011800,
+ 0x0003f800, 0x0003e000, 0x00039000, 0x0003d000,
+ 0x0003b000, 0x0003a000, 0x0003a800, 0x00038000,
+ 0x0003b800, 0x0003c800, 0x0003f000, 0x0003e800,
+ 0x00038800, 0x0003d800, 0x0003c000, 0x00039800,
+ 0x0006f800, 0x0006e000, 0x00069000, 0x0006d000,
+ 0x0006b000, 0x0006a000, 0x0006a800, 0x00068000,
+ 0x0006b800, 0x0006c800, 0x0006f000, 0x0006e800,
+ 0x00068800, 0x0006d800, 0x0006c000, 0x00069800,
+ 0x00047800, 0x00046000, 0x00041000, 0x00045000,
+ 0x00043000, 0x00042000, 0x00042800, 0x00040000,
+ 0x00043800, 0x00044800, 0x00047000, 0x00046800,
+ 0x00040800, 0x00045800, 0x00044000, 0x00041800,
+ 0x00007800, 0x00006000, 0x00001000, 0x00005000,
+ 0x00003000, 0x00002000, 0x00002800, 0x00000000,
+ 0x00003800, 0x00004800, 0x00007000, 0x00006800,
+ 0x00000800, 0x00005800, 0x00004000, 0x00001800,
+ 0x0002f800, 0x0002e000, 0x00029000, 0x0002d000,
+ 0x0002b000, 0x0002a000, 0x0002a800, 0x00028000,
+ 0x0002b800, 0x0002c800, 0x0002f000, 0x0002e800,
+ 0x00028800, 0x0002d800, 0x0002c000, 0x00029800,
+ 0x00057800, 0x00056000, 0x00051000, 0x00055000,
+ 0x00053000, 0x00052000, 0x00052800, 0x00050000,
+ 0x00053800, 0x00054800, 0x00057000, 0x00056800,
+ 0x00050800, 0x00055800, 0x00054000, 0x00051800,
+ 0x0004f800, 0x0004e000, 0x00049000, 0x0004d000,
+ 0x0004b000, 0x0004a000, 0x0004a800, 0x00048000,
+ 0x0004b800, 0x0004c800, 0x0004f000, 0x0004e800,
+ 0x00048800, 0x0004d800, 0x0004c000, 0x00049800,
+ 0x0000f800, 0x0000e000, 0x00009000, 0x0000d000,
+ 0x0000b000, 0x0000a000, 0x0000a800, 0x00008000,
+ 0x0000b800, 0x0000c800, 0x0000f000, 0x0000e800,
+ 0x00008800, 0x0000d800, 0x0000c000, 0x00009800,
+ /* 1 */
+ 0x00880000, 0x00e00000, 0x00d80000, 0x00800000,
+ 0x00f80000, 0x00f00000, 0x00b00000, 0x00a80000,
+ 0x00d00000, 0x00e80000, 0x00a00000, 0x00c00000,
+ 0x00c80000, 0x00980000, 0x00b80000, 0x00900000,
+ 0x02880000, 0x02e00000, 0x02d80000, 0x02800000,
+ 0x02f80000, 0x02f00000, 0x02b00000, 0x02a80000,
+ 0x02d00000, 0x02e80000, 0x02a00000, 0x02c00000,
+ 0x02c80000, 0x02980000, 0x02b80000, 0x02900000,
+ 0x07080000, 0x07600000, 0x07580000, 0x07000000,
+ 0x07780000, 0x07700000, 0x07300000, 0x07280000,
+ 0x07500000, 0x07680000, 0x07200000, 0x07400000,
+ 0x07480000, 0x07180000, 0x07380000, 0x07100000,
+ 0x06080000, 0x06600000, 0x06580000, 0x06000000,
+ 0x06780000, 0x06700000, 0x06300000, 0x06280000,
+ 0x06500000, 0x06680000, 0x06200000, 0x06400000,
+ 0x06480000, 0x06180000, 0x06380000, 0x06100000,
+ 0x05080000, 0x05600000, 0x05580000, 0x05000000,
+ 0x05780000, 0x05700000, 0x05300000, 0x05280000,
+ 0x05500000, 0x05680000, 0x05200000, 0x05400000,
+ 0x05480000, 0x05180000, 0x05380000, 0x05100000,
+ 0x03880000, 0x03e00000, 0x03d80000, 0x03800000,
+ 0x03f80000, 0x03f00000, 0x03b00000, 0x03a80000,
+ 0x03d00000, 0x03e80000, 0x03a00000, 0x03c00000,
+ 0x03c80000, 0x03980000, 0x03b80000, 0x03900000,
+ 0x00080000, 0x00600000, 0x00580000, 0x00000000,
+ 0x00780000, 0x00700000, 0x00300000, 0x00280000,
+ 0x00500000, 0x00680000, 0x00200000, 0x00400000,
+ 0x00480000, 0x00180000, 0x00380000, 0x00100000,
+ 0x06880000, 0x06e00000, 0x06d80000, 0x06800000,
+ 0x06f80000, 0x06f00000, 0x06b00000, 0x06a80000,
+ 0x06d00000, 0x06e80000, 0x06a00000, 0x06c00000,
+ 0x06c80000, 0x06980000, 0x06b80000, 0x06900000,
+ 0x03080000, 0x03600000, 0x03580000, 0x03000000,
+ 0x03780000, 0x03700000, 0x03300000, 0x03280000,
+ 0x03500000, 0x03680000, 0x03200000, 0x03400000,
+ 0x03480000, 0x03180000, 0x03380000, 0x03100000,
+ 0x01080000, 0x01600000, 0x01580000, 0x01000000,
+ 0x01780000, 0x01700000, 0x01300000, 0x01280000,
+ 0x01500000, 0x01680000, 0x01200000, 0x01400000,
+ 0x01480000, 0x01180000, 0x01380000, 0x01100000,
+ 0x05880000, 0x05e00000, 0x05d80000, 0x05800000,
+ 0x05f80000, 0x05f00000, 0x05b00000, 0x05a80000,
+ 0x05d00000, 0x05e80000, 0x05a00000, 0x05c00000,
+ 0x05c80000, 0x05980000, 0x05b80000, 0x05900000,
+ 0x02080000, 0x02600000, 0x02580000, 0x02000000,
+ 0x02780000, 0x02700000, 0x02300000, 0x02280000,
+ 0x02500000, 0x02680000, 0x02200000, 0x02400000,
+ 0x02480000, 0x02180000, 0x02380000, 0x02100000,
+ 0x04880000, 0x04e00000, 0x04d80000, 0x04800000,
+ 0x04f80000, 0x04f00000, 0x04b00000, 0x04a80000,
+ 0x04d00000, 0x04e80000, 0x04a00000, 0x04c00000,
+ 0x04c80000, 0x04980000, 0x04b80000, 0x04900000,
+ 0x01880000, 0x01e00000, 0x01d80000, 0x01800000,
+ 0x01f80000, 0x01f00000, 0x01b00000, 0x01a80000,
+ 0x01d00000, 0x01e80000, 0x01a00000, 0x01c00000,
+ 0x01c80000, 0x01980000, 0x01b80000, 0x01900000,
+ 0x07880000, 0x07e00000, 0x07d80000, 0x07800000,
+ 0x07f80000, 0x07f00000, 0x07b00000, 0x07a80000,
+ 0x07d00000, 0x07e80000, 0x07a00000, 0x07c00000,
+ 0x07c80000, 0x07980000, 0x07b80000, 0x07900000,
+ 0x04080000, 0x04600000, 0x04580000, 0x04000000,
+ 0x04780000, 0x04700000, 0x04300000, 0x04280000,
+ 0x04500000, 0x04680000, 0x04200000, 0x04400000,
+ 0x04480000, 0x04180000, 0x04380000, 0x04100000,
+ /* 2 */
+ 0x00000004, 0x60000004, 0x40000004, 0x48000004,
+ 0x68000004, 0x10000004, 0x50000004, 0x58000004,
+ 0x38000004, 0x18000004, 0x30000004, 0x28000004,
+ 0x20000004, 0x70000004, 0x78000004, 0x08000004,
+ 0x00000000, 0x60000000, 0x40000000, 0x48000000,
+ 0x68000000, 0x10000000, 0x50000000, 0x58000000,
+ 0x38000000, 0x18000000, 0x30000000, 0x28000000,
+ 0x20000000, 0x70000000, 0x78000000, 0x08000000,
+ 0x80000007, 0xe0000007, 0xc0000007, 0xc8000007,
+ 0xe8000007, 0x90000007, 0xd0000007, 0xd8000007,
+ 0xb8000007, 0x98000007, 0xb0000007, 0xa8000007,
+ 0xa0000007, 0xf0000007, 0xf8000007, 0x88000007,
+ 0x80000001, 0xe0000001, 0xc0000001, 0xc8000001,
+ 0xe8000001, 0x90000001, 0xd0000001, 0xd8000001,
+ 0xb8000001, 0x98000001, 0xb0000001, 0xa8000001,
+ 0xa0000001, 0xf0000001, 0xf8000001, 0x88000001,
+ 0x00000001, 0x60000001, 0x40000001, 0x48000001,
+ 0x68000001, 0x10000001, 0x50000001, 0x58000001,
+ 0x38000001, 0x18000001, 0x30000001, 0x28000001,
+ 0x20000001, 0x70000001, 0x78000001, 0x08000001,
+ 0x80000002, 0xe0000002, 0xc0000002, 0xc8000002,
+ 0xe8000002, 0x90000002, 0xd0000002, 0xd8000002,
+ 0xb8000002, 0x98000002, 0xb0000002, 0xa8000002,
+ 0xa0000002, 0xf0000002, 0xf8000002, 0x88000002,
+ 0x00000007, 0x60000007, 0x40000007, 0x48000007,
+ 0x68000007, 0x10000007, 0x50000007, 0x58000007,
+ 0x38000007, 0x18000007, 0x30000007, 0x28000007,
+ 0x20000007, 0x70000007, 0x78000007, 0x08000007,
+ 0x80000005, 0xe0000005, 0xc0000005, 0xc8000005,
+ 0xe8000005, 0x90000005, 0xd0000005, 0xd8000005,
+ 0xb8000005, 0x98000005, 0xb0000005, 0xa8000005,
+ 0xa0000005, 0xf0000005, 0xf8000005, 0x88000005,
+ 0x80000000, 0xe0000000, 0xc0000000, 0xc8000000,
+ 0xe8000000, 0x90000000, 0xd0000000, 0xd8000000,
+ 0xb8000000, 0x98000000, 0xb0000000, 0xa8000000,
+ 0xa0000000, 0xf0000000, 0xf8000000, 0x88000000,
+ 0x00000005, 0x60000005, 0x40000005, 0x48000005,
+ 0x68000005, 0x10000005, 0x50000005, 0x58000005,
+ 0x38000005, 0x18000005, 0x30000005, 0x28000005,
+ 0x20000005, 0x70000005, 0x78000005, 0x08000005,
+ 0x00000002, 0x60000002, 0x40000002, 0x48000002,
+ 0x68000002, 0x10000002, 0x50000002, 0x58000002,
+ 0x38000002, 0x18000002, 0x30000002, 0x28000002,
+ 0x20000002, 0x70000002, 0x78000002, 0x08000002,
+ 0x80000003, 0xe0000003, 0xc0000003, 0xc8000003,
+ 0xe8000003, 0x90000003, 0xd0000003, 0xd8000003,
+ 0xb8000003, 0x98000003, 0xb0000003, 0xa8000003,
+ 0xa0000003, 0xf0000003, 0xf8000003, 0x88000003,
+ 0x00000006, 0x60000006, 0x40000006, 0x48000006,
+ 0x68000006, 0x10000006, 0x50000006, 0x58000006,
+ 0x38000006, 0x18000006, 0x30000006, 0x28000006,
+ 0x20000006, 0x70000006, 0x78000006, 0x08000006,
+ 0x80000004, 0xe0000004, 0xc0000004, 0xc8000004,
+ 0xe8000004, 0x90000004, 0xd0000004, 0xd8000004,
+ 0xb8000004, 0x98000004, 0xb0000004, 0xa8000004,
+ 0xa0000004, 0xf0000004, 0xf8000004, 0x88000004,
+ 0x80000006, 0xe0000006, 0xc0000006, 0xc8000006,
+ 0xe8000006, 0x90000006, 0xd0000006, 0xd8000006,
+ 0xb8000006, 0x98000006, 0xb0000006, 0xa8000006,
+ 0xa0000006, 0xf0000006, 0xf8000006, 0x88000006,
+ 0x00000003, 0x60000003, 0x40000003, 0x48000003,
+ 0x68000003, 0x10000003, 0x50000003, 0x58000003,
+ 0x38000003, 0x18000003, 0x30000003, 0x28000003,
+ 0x20000003, 0x70000003, 0x78000003, 0x08000003,
+ /* 3 */
+ 0x00000098, 0x00000080, 0x000000b0, 0x000000f8,
+ 0x00000088, 0x000000f0, 0x000000c8, 0x00000090,
+ 0x000000e8, 0x000000c0, 0x000000e0, 0x000000a0,
+ 0x000000d8, 0x000000d0, 0x000000a8, 0x000000b8,
+ 0x00000518, 0x00000500, 0x00000530, 0x00000578,
+ 0x00000508, 0x00000570, 0x00000548, 0x00000510,
+ 0x00000568, 0x00000540, 0x00000560, 0x00000520,
+ 0x00000558, 0x00000550, 0x00000528, 0x00000538,
+ 0x00000318, 0x00000300, 0x00000330, 0x00000378,
+ 0x00000308, 0x00000370, 0x00000348, 0x00000310,
+ 0x00000368, 0x00000340, 0x00000360, 0x00000320,
+ 0x00000358, 0x00000350, 0x00000328, 0x00000338,
+ 0x00000418, 0x00000400, 0x00000430, 0x00000478,
+ 0x00000408, 0x00000470, 0x00000448, 0x00000410,
+ 0x00000468, 0x00000440, 0x00000460, 0x00000420,
+ 0x00000458, 0x00000450, 0x00000428, 0x00000438,
+ 0x00000798, 0x00000780, 0x000007b0, 0x000007f8,
+ 0x00000788, 0x000007f0, 0x000007c8, 0x00000790,
+ 0x000007e8, 0x000007c0, 0x000007e0, 0x000007a0,
+ 0x000007d8, 0x000007d0, 0x000007a8, 0x000007b8,
+ 0x00000598, 0x00000580, 0x000005b0, 0x000005f8,
+ 0x00000588, 0x000005f0, 0x000005c8, 0x00000590,
+ 0x000005e8, 0x000005c0, 0x000005e0, 0x000005a0,
+ 0x000005d8, 0x000005d0, 0x000005a8, 0x000005b8,
+ 0x00000018, 0x00000000, 0x00000030, 0x00000078,
+ 0x00000008, 0x00000070, 0x00000048, 0x00000010,
+ 0x00000068, 0x00000040, 0x00000060, 0x00000020,
+ 0x00000058, 0x00000050, 0x00000028, 0x00000038,
+ 0x00000218, 0x00000200, 0x00000230, 0x00000278,
+ 0x00000208, 0x00000270, 0x00000248, 0x00000210,
+ 0x00000268, 0x00000240, 0x00000260, 0x00000220,
+ 0x00000258, 0x00000250, 0x00000228, 0x00000238,
+ 0x00000618, 0x00000600, 0x00000630, 0x00000678,
+ 0x00000608, 0x00000670, 0x00000648, 0x00000610,
+ 0x00000668, 0x00000640, 0x00000660, 0x00000620,
+ 0x00000658, 0x00000650, 0x00000628, 0x00000638,
+ 0x00000198, 0x00000180, 0x000001b0, 0x000001f8,
+ 0x00000188, 0x000001f0, 0x000001c8, 0x00000190,
+ 0x000001e8, 0x000001c0, 0x000001e0, 0x000001a0,
+ 0x000001d8, 0x000001d0, 0x000001a8, 0x000001b8,
+ 0x00000298, 0x00000280, 0x000002b0, 0x000002f8,
+ 0x00000288, 0x000002f0, 0x000002c8, 0x00000290,
+ 0x000002e8, 0x000002c0, 0x000002e0, 0x000002a0,
+ 0x000002d8, 0x000002d0, 0x000002a8, 0x000002b8,
+ 0x00000498, 0x00000480, 0x000004b0, 0x000004f8,
+ 0x00000488, 0x000004f0, 0x000004c8, 0x00000490,
+ 0x000004e8, 0x000004c0, 0x000004e0, 0x000004a0,
+ 0x000004d8, 0x000004d0, 0x000004a8, 0x000004b8,
+ 0x00000398, 0x00000380, 0x000003b0, 0x000003f8,
+ 0x00000388, 0x000003f0, 0x000003c8, 0x00000390,
+ 0x000003e8, 0x000003c0, 0x000003e0, 0x000003a0,
+ 0x000003d8, 0x000003d0, 0x000003a8, 0x000003b8,
+ 0x00000698, 0x00000680, 0x000006b0, 0x000006f8,
+ 0x00000688, 0x000006f0, 0x000006c8, 0x00000690,
+ 0x000006e8, 0x000006c0, 0x000006e0, 0x000006a0,
+ 0x000006d8, 0x000006d0, 0x000006a8, 0x000006b8,
+ 0x00000118, 0x00000100, 0x00000130, 0x00000178,
+ 0x00000108, 0x00000170, 0x00000148, 0x00000110,
+ 0x00000168, 0x00000140, 0x00000160, 0x00000120,
+ 0x00000158, 0x00000150, 0x00000128, 0x00000138,
+ 0x00000718, 0x00000700, 0x00000730, 0x00000778,
+ 0x00000708, 0x00000770, 0x00000748, 0x00000710,
+ 0x00000768, 0x00000740, 0x00000760, 0x00000720,
+ 0x00000758, 0x00000750, 0x00000728, 0x00000738,
+ };
+
+static const u32 sbox_TC26_Z[4*256] =
+ {
+ /* 0 */
+ 0x00036000, 0x00032000, 0x00033000, 0x00031000,
+ 0x00035000, 0x00032800, 0x00035800, 0x00034800,
+ 0x00037000, 0x00034000, 0x00036800, 0x00033800,
+ 0x00030000, 0x00031800, 0x00037800, 0x00030800,
+ 0x00046000, 0x00042000, 0x00043000, 0x00041000,
+ 0x00045000, 0x00042800, 0x00045800, 0x00044800,
+ 0x00047000, 0x00044000, 0x00046800, 0x00043800,
+ 0x00040000, 0x00041800, 0x00047800, 0x00040800,
+ 0x00016000, 0x00012000, 0x00013000, 0x00011000,
+ 0x00015000, 0x00012800, 0x00015800, 0x00014800,
+ 0x00017000, 0x00014000, 0x00016800, 0x00013800,
+ 0x00010000, 0x00011800, 0x00017800, 0x00010800,
+ 0x0001e000, 0x0001a000, 0x0001b000, 0x00019000,
+ 0x0001d000, 0x0001a800, 0x0001d800, 0x0001c800,
+ 0x0001f000, 0x0001c000, 0x0001e800, 0x0001b800,
+ 0x00018000, 0x00019800, 0x0001f800, 0x00018800,
+ 0x0004e000, 0x0004a000, 0x0004b000, 0x00049000,
+ 0x0004d000, 0x0004a800, 0x0004d800, 0x0004c800,
+ 0x0004f000, 0x0004c000, 0x0004e800, 0x0004b800,
+ 0x00048000, 0x00049800, 0x0004f800, 0x00048800,
+ 0x00056000, 0x00052000, 0x00053000, 0x00051000,
+ 0x00055000, 0x00052800, 0x00055800, 0x00054800,
+ 0x00057000, 0x00054000, 0x00056800, 0x00053800,
+ 0x00050000, 0x00051800, 0x00057800, 0x00050800,
+ 0x0002e000, 0x0002a000, 0x0002b000, 0x00029000,
+ 0x0002d000, 0x0002a800, 0x0002d800, 0x0002c800,
+ 0x0002f000, 0x0002c000, 0x0002e800, 0x0002b800,
+ 0x00028000, 0x00029800, 0x0002f800, 0x00028800,
+ 0x00066000, 0x00062000, 0x00063000, 0x00061000,
+ 0x00065000, 0x00062800, 0x00065800, 0x00064800,
+ 0x00067000, 0x00064000, 0x00066800, 0x00063800,
+ 0x00060000, 0x00061800, 0x00067800, 0x00060800,
+ 0x0000e000, 0x0000a000, 0x0000b000, 0x00009000,
+ 0x0000d000, 0x0000a800, 0x0000d800, 0x0000c800,
+ 0x0000f000, 0x0000c000, 0x0000e800, 0x0000b800,
+ 0x00008000, 0x00009800, 0x0000f800, 0x00008800,
+ 0x00076000, 0x00072000, 0x00073000, 0x00071000,
+ 0x00075000, 0x00072800, 0x00075800, 0x00074800,
+ 0x00077000, 0x00074000, 0x00076800, 0x00073800,
+ 0x00070000, 0x00071800, 0x00077800, 0x00070800,
+ 0x00026000, 0x00022000, 0x00023000, 0x00021000,
+ 0x00025000, 0x00022800, 0x00025800, 0x00024800,
+ 0x00027000, 0x00024000, 0x00026800, 0x00023800,
+ 0x00020000, 0x00021800, 0x00027800, 0x00020800,
+ 0x0003e000, 0x0003a000, 0x0003b000, 0x00039000,
+ 0x0003d000, 0x0003a800, 0x0003d800, 0x0003c800,
+ 0x0003f000, 0x0003c000, 0x0003e800, 0x0003b800,
+ 0x00038000, 0x00039800, 0x0003f800, 0x00038800,
+ 0x0005e000, 0x0005a000, 0x0005b000, 0x00059000,
+ 0x0005d000, 0x0005a800, 0x0005d800, 0x0005c800,
+ 0x0005f000, 0x0005c000, 0x0005e800, 0x0005b800,
+ 0x00058000, 0x00059800, 0x0005f800, 0x00058800,
+ 0x0006e000, 0x0006a000, 0x0006b000, 0x00069000,
+ 0x0006d000, 0x0006a800, 0x0006d800, 0x0006c800,
+ 0x0006f000, 0x0006c000, 0x0006e800, 0x0006b800,
+ 0x00068000, 0x00069800, 0x0006f800, 0x00068800,
+ 0x00006000, 0x00002000, 0x00003000, 0x00001000,
+ 0x00005000, 0x00002800, 0x00005800, 0x00004800,
+ 0x00007000, 0x00004000, 0x00006800, 0x00003800,
+ 0x00000000, 0x00001800, 0x00007800, 0x00000800,
+ 0x0007e000, 0x0007a000, 0x0007b000, 0x00079000,
+ 0x0007d000, 0x0007a800, 0x0007d800, 0x0007c800,
+ 0x0007f000, 0x0007c000, 0x0007e800, 0x0007b800,
+ 0x00078000, 0x00079800, 0x0007f800, 0x00078800,
+ /* 1 */
+ 0x06580000, 0x06180000, 0x06280000, 0x06400000,
+ 0x06100000, 0x06780000, 0x06500000, 0x06680000,
+ 0x06700000, 0x06080000, 0x06380000, 0x06200000,
+ 0x06600000, 0x06480000, 0x06300000, 0x06000000,
+ 0x04580000, 0x04180000, 0x04280000, 0x04400000,
+ 0x04100000, 0x04780000, 0x04500000, 0x04680000,
+ 0x04700000, 0x04080000, 0x04380000, 0x04200000,
+ 0x04600000, 0x04480000, 0x04300000, 0x04000000,
+ 0x01580000, 0x01180000, 0x01280000, 0x01400000,
+ 0x01100000, 0x01780000, 0x01500000, 0x01680000,
+ 0x01700000, 0x01080000, 0x01380000, 0x01200000,
+ 0x01600000, 0x01480000, 0x01300000, 0x01000000,
+ 0x00d80000, 0x00980000, 0x00a80000, 0x00c00000,
+ 0x00900000, 0x00f80000, 0x00d00000, 0x00e80000,
+ 0x00f00000, 0x00880000, 0x00b80000, 0x00a00000,
+ 0x00e00000, 0x00c80000, 0x00b00000, 0x00800000,
+ 0x06d80000, 0x06980000, 0x06a80000, 0x06c00000,
+ 0x06900000, 0x06f80000, 0x06d00000, 0x06e80000,
+ 0x06f00000, 0x06880000, 0x06b80000, 0x06a00000,
+ 0x06e00000, 0x06c80000, 0x06b00000, 0x06800000,
+ 0x02580000, 0x02180000, 0x02280000, 0x02400000,
+ 0x02100000, 0x02780000, 0x02500000, 0x02680000,
+ 0x02700000, 0x02080000, 0x02380000, 0x02200000,
+ 0x02600000, 0x02480000, 0x02300000, 0x02000000,
+ 0x07d80000, 0x07980000, 0x07a80000, 0x07c00000,
+ 0x07900000, 0x07f80000, 0x07d00000, 0x07e80000,
+ 0x07f00000, 0x07880000, 0x07b80000, 0x07a00000,
+ 0x07e00000, 0x07c80000, 0x07b00000, 0x07800000,
+ 0x03580000, 0x03180000, 0x03280000, 0x03400000,
+ 0x03100000, 0x03780000, 0x03500000, 0x03680000,
+ 0x03700000, 0x03080000, 0x03380000, 0x03200000,
+ 0x03600000, 0x03480000, 0x03300000, 0x03000000,
+ 0x03d80000, 0x03980000, 0x03a80000, 0x03c00000,
+ 0x03900000, 0x03f80000, 0x03d00000, 0x03e80000,
+ 0x03f00000, 0x03880000, 0x03b80000, 0x03a00000,
+ 0x03e00000, 0x03c80000, 0x03b00000, 0x03800000,
+ 0x00580000, 0x00180000, 0x00280000, 0x00400000,
+ 0x00100000, 0x00780000, 0x00500000, 0x00680000,
+ 0x00700000, 0x00080000, 0x00380000, 0x00200000,
+ 0x00600000, 0x00480000, 0x00300000, 0x00000000,
+ 0x05580000, 0x05180000, 0x05280000, 0x05400000,
+ 0x05100000, 0x05780000, 0x05500000, 0x05680000,
+ 0x05700000, 0x05080000, 0x05380000, 0x05200000,
+ 0x05600000, 0x05480000, 0x05300000, 0x05000000,
+ 0x02d80000, 0x02980000, 0x02a80000, 0x02c00000,
+ 0x02900000, 0x02f80000, 0x02d00000, 0x02e80000,
+ 0x02f00000, 0x02880000, 0x02b80000, 0x02a00000,
+ 0x02e00000, 0x02c80000, 0x02b00000, 0x02800000,
+ 0x01d80000, 0x01980000, 0x01a80000, 0x01c00000,
+ 0x01900000, 0x01f80000, 0x01d00000, 0x01e80000,
+ 0x01f00000, 0x01880000, 0x01b80000, 0x01a00000,
+ 0x01e00000, 0x01c80000, 0x01b00000, 0x01800000,
+ 0x07580000, 0x07180000, 0x07280000, 0x07400000,
+ 0x07100000, 0x07780000, 0x07500000, 0x07680000,
+ 0x07700000, 0x07080000, 0x07380000, 0x07200000,
+ 0x07600000, 0x07480000, 0x07300000, 0x07000000,
+ 0x04d80000, 0x04980000, 0x04a80000, 0x04c00000,
+ 0x04900000, 0x04f80000, 0x04d00000, 0x04e80000,
+ 0x04f00000, 0x04880000, 0x04b80000, 0x04a00000,
+ 0x04e00000, 0x04c80000, 0x04b00000, 0x04800000,
+ 0x05d80000, 0x05980000, 0x05a80000, 0x05c00000,
+ 0x05900000, 0x05f80000, 0x05d00000, 0x05e80000,
+ 0x05f00000, 0x05880000, 0x05b80000, 0x05a00000,
+ 0x05e00000, 0x05c80000, 0x05b00000, 0x05800000,
+ /* 2 */
+ 0xb8000002, 0xf8000002, 0xa8000002, 0xd0000002,
+ 0xc0000002, 0x88000002, 0xb0000002, 0xe8000002,
+ 0x80000002, 0xc8000002, 0x98000002, 0xf0000002,
+ 0xd8000002, 0xa0000002, 0x90000002, 0xe0000002,
+ 0xb8000006, 0xf8000006, 0xa8000006, 0xd0000006,
+ 0xc0000006, 0x88000006, 0xb0000006, 0xe8000006,
+ 0x80000006, 0xc8000006, 0x98000006, 0xf0000006,
+ 0xd8000006, 0xa0000006, 0x90000006, 0xe0000006,
+ 0xb8000007, 0xf8000007, 0xa8000007, 0xd0000007,
+ 0xc0000007, 0x88000007, 0xb0000007, 0xe8000007,
+ 0x80000007, 0xc8000007, 0x98000007, 0xf0000007,
+ 0xd8000007, 0xa0000007, 0x90000007, 0xe0000007,
+ 0x38000003, 0x78000003, 0x28000003, 0x50000003,
+ 0x40000003, 0x08000003, 0x30000003, 0x68000003,
+ 0x00000003, 0x48000003, 0x18000003, 0x70000003,
+ 0x58000003, 0x20000003, 0x10000003, 0x60000003,
+ 0xb8000004, 0xf8000004, 0xa8000004, 0xd0000004,
+ 0xc0000004, 0x88000004, 0xb0000004, 0xe8000004,
+ 0x80000004, 0xc8000004, 0x98000004, 0xf0000004,
+ 0xd8000004, 0xa0000004, 0x90000004, 0xe0000004,
+ 0x38000001, 0x78000001, 0x28000001, 0x50000001,
+ 0x40000001, 0x08000001, 0x30000001, 0x68000001,
+ 0x00000001, 0x48000001, 0x18000001, 0x70000001,
+ 0x58000001, 0x20000001, 0x10000001, 0x60000001,
+ 0x38000006, 0x78000006, 0x28000006, 0x50000006,
+ 0x40000006, 0x08000006, 0x30000006, 0x68000006,
+ 0x00000006, 0x48000006, 0x18000006, 0x70000006,
+ 0x58000006, 0x20000006, 0x10000006, 0x60000006,
+ 0x38000005, 0x78000005, 0x28000005, 0x50000005,
+ 0x40000005, 0x08000005, 0x30000005, 0x68000005,
+ 0x00000005, 0x48000005, 0x18000005, 0x70000005,
+ 0x58000005, 0x20000005, 0x10000005, 0x60000005,
+ 0xb8000005, 0xf8000005, 0xa8000005, 0xd0000005,
+ 0xc0000005, 0x88000005, 0xb0000005, 0xe8000005,
+ 0x80000005, 0xc8000005, 0x98000005, 0xf0000005,
+ 0xd8000005, 0xa0000005, 0x90000005, 0xe0000005,
+ 0xb8000003, 0xf8000003, 0xa8000003, 0xd0000003,
+ 0xc0000003, 0x88000003, 0xb0000003, 0xe8000003,
+ 0x80000003, 0xc8000003, 0x98000003, 0xf0000003,
+ 0xd8000003, 0xa0000003, 0x90000003, 0xe0000003,
+ 0x38000004, 0x78000004, 0x28000004, 0x50000004,
+ 0x40000004, 0x08000004, 0x30000004, 0x68000004,
+ 0x00000004, 0x48000004, 0x18000004, 0x70000004,
+ 0x58000004, 0x20000004, 0x10000004, 0x60000004,
+ 0xb8000000, 0xf8000000, 0xa8000000, 0xd0000000,
+ 0xc0000000, 0x88000000, 0xb0000000, 0xe8000000,
+ 0x80000000, 0xc8000000, 0x98000000, 0xf0000000,
+ 0xd8000000, 0xa0000000, 0x90000000, 0xe0000000,
+ 0x38000002, 0x78000002, 0x28000002, 0x50000002,
+ 0x40000002, 0x08000002, 0x30000002, 0x68000002,
+ 0x00000002, 0x48000002, 0x18000002, 0x70000002,
+ 0x58000002, 0x20000002, 0x10000002, 0x60000002,
+ 0xb8000001, 0xf8000001, 0xa8000001, 0xd0000001,
+ 0xc0000001, 0x88000001, 0xb0000001, 0xe8000001,
+ 0x80000001, 0xc8000001, 0x98000001, 0xf0000001,
+ 0xd8000001, 0xa0000001, 0x90000001, 0xe0000001,
+ 0x38000007, 0x78000007, 0x28000007, 0x50000007,
+ 0x40000007, 0x08000007, 0x30000007, 0x68000007,
+ 0x00000007, 0x48000007, 0x18000007, 0x70000007,
+ 0x58000007, 0x20000007, 0x10000007, 0x60000007,
+ 0x38000000, 0x78000000, 0x28000000, 0x50000000,
+ 0x40000000, 0x08000000, 0x30000000, 0x68000000,
+ 0x00000000, 0x48000000, 0x18000000, 0x70000000,
+ 0x58000000, 0x20000000, 0x10000000, 0x60000000,
+ /* 3 */
+ 0x000000c0, 0x000000f0, 0x00000090, 0x000000a8,
+ 0x000000b0, 0x000000c8, 0x00000088, 0x000000e0,
+ 0x000000f8, 0x000000a0, 0x000000d8, 0x00000080,
+ 0x000000e8, 0x000000d0, 0x00000098, 0x000000b8,
+ 0x000003c0, 0x000003f0, 0x00000390, 0x000003a8,
+ 0x000003b0, 0x000003c8, 0x00000388, 0x000003e0,
+ 0x000003f8, 0x000003a0, 0x000003d8, 0x00000380,
+ 0x000003e8, 0x000003d0, 0x00000398, 0x000003b8,
+ 0x00000740, 0x00000770, 0x00000710, 0x00000728,
+ 0x00000730, 0x00000748, 0x00000708, 0x00000760,
+ 0x00000778, 0x00000720, 0x00000758, 0x00000700,
+ 0x00000768, 0x00000750, 0x00000718, 0x00000738,
+ 0x000006c0, 0x000006f0, 0x00000690, 0x000006a8,
+ 0x000006b0, 0x000006c8, 0x00000688, 0x000006e0,
+ 0x000006f8, 0x000006a0, 0x000006d8, 0x00000680,
+ 0x000006e8, 0x000006d0, 0x00000698, 0x000006b8,
+ 0x00000040, 0x00000070, 0x00000010, 0x00000028,
+ 0x00000030, 0x00000048, 0x00000008, 0x00000060,
+ 0x00000078, 0x00000020, 0x00000058, 0x00000000,
+ 0x00000068, 0x00000050, 0x00000018, 0x00000038,
+ 0x000002c0, 0x000002f0, 0x00000290, 0x000002a8,
+ 0x000002b0, 0x000002c8, 0x00000288, 0x000002e0,
+ 0x000002f8, 0x000002a0, 0x000002d8, 0x00000280,
+ 0x000002e8, 0x000002d0, 0x00000298, 0x000002b8,
+ 0x00000440, 0x00000470, 0x00000410, 0x00000428,
+ 0x00000430, 0x00000448, 0x00000408, 0x00000460,
+ 0x00000478, 0x00000420, 0x00000458, 0x00000400,
+ 0x00000468, 0x00000450, 0x00000418, 0x00000438,
+ 0x000001c0, 0x000001f0, 0x00000190, 0x000001a8,
+ 0x000001b0, 0x000001c8, 0x00000188, 0x000001e0,
+ 0x000001f8, 0x000001a0, 0x000001d8, 0x00000180,
+ 0x000001e8, 0x000001d0, 0x00000198, 0x000001b8,
+ 0x00000240, 0x00000270, 0x00000210, 0x00000228,
+ 0x00000230, 0x00000248, 0x00000208, 0x00000260,
+ 0x00000278, 0x00000220, 0x00000258, 0x00000200,
+ 0x00000268, 0x00000250, 0x00000218, 0x00000238,
+ 0x000007c0, 0x000007f0, 0x00000790, 0x000007a8,
+ 0x000007b0, 0x000007c8, 0x00000788, 0x000007e0,
+ 0x000007f8, 0x000007a0, 0x000007d8, 0x00000780,
+ 0x000007e8, 0x000007d0, 0x00000798, 0x000007b8,
+ 0x00000540, 0x00000570, 0x00000510, 0x00000528,
+ 0x00000530, 0x00000548, 0x00000508, 0x00000560,
+ 0x00000578, 0x00000520, 0x00000558, 0x00000500,
+ 0x00000568, 0x00000550, 0x00000518, 0x00000538,
+ 0x00000340, 0x00000370, 0x00000310, 0x00000328,
+ 0x00000330, 0x00000348, 0x00000308, 0x00000360,
+ 0x00000378, 0x00000320, 0x00000358, 0x00000300,
+ 0x00000368, 0x00000350, 0x00000318, 0x00000338,
+ 0x000004c0, 0x000004f0, 0x00000490, 0x000004a8,
+ 0x000004b0, 0x000004c8, 0x00000488, 0x000004e0,
+ 0x000004f8, 0x000004a0, 0x000004d8, 0x00000480,
+ 0x000004e8, 0x000004d0, 0x00000498, 0x000004b8,
+ 0x00000640, 0x00000670, 0x00000610, 0x00000628,
+ 0x00000630, 0x00000648, 0x00000608, 0x00000660,
+ 0x00000678, 0x00000620, 0x00000658, 0x00000600,
+ 0x00000668, 0x00000650, 0x00000618, 0x00000638,
+ 0x000005c0, 0x000005f0, 0x00000590, 0x000005a8,
+ 0x000005b0, 0x000005c8, 0x00000588, 0x000005e0,
+ 0x000005f8, 0x000005a0, 0x000005d8, 0x00000580,
+ 0x000005e8, 0x000005d0, 0x00000598, 0x000005b8,
+ 0x00000140, 0x00000170, 0x00000110, 0x00000128,
+ 0x00000130, 0x00000148, 0x00000108, 0x00000160,
+ 0x00000178, 0x00000120, 0x00000158, 0x00000100,
+ 0x00000168, 0x00000150, 0x00000118, 0x00000138,
+ };
+
+static struct
+{
+ const char *oid;
+ const u32 *sbox;
+} gost_oid_map[] = {
+ { "1.2.643.2.2.30.0", sbox_test_3411 },
+ { "1.2.643.2.2.30.1", sbox_CryptoPro_3411 },
+ { "1.2.643.2.2.31.0", sbox_Test_89 },
+ { "1.2.643.2.2.31.1", sbox_CryptoPro_A },
+ { "1.2.643.2.2.31.2", sbox_CryptoPro_B },
+ { "1.2.643.2.2.31.3", sbox_CryptoPro_C },
+ { "1.2.643.2.2.31.4", sbox_CryptoPro_D },
+ { "1.2.643.7.1.2.5.1.1", sbox_TC26_Z },
+ { NULL, NULL }
+};
--- /dev/null
+--- a/cipher/Makefile.in
++++ b/cipher/Makefile.in
+@@ -1228,9 +1228,7 @@ uninstall-am:
+ .PRECIOUS: Makefile
+
+
+-gost28147.lo: gost-sb.h
+-gost-sb.h: gost-s-box
+- ./gost-s-box $@
++gost28147.lo:
+
+ gost-s-box: gost-s-box.c
+ $(CC_FOR_BUILD) -o $@ $(srcdir)/gost-s-box.c
--- /dev/null
+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=''
+
--- /dev/null
+Remove uneeded pthread-stubs dependency
+--- a/configure
++++ b/configure
+@@ -19695,7 +19695,7 @@ fi
+ NEEDED="xau >= 0.99.2"
+ case $host_os in
+ linux*) ;;
+- *) NEEDED="$NEEDED pthread-stubs" ;;
++ *) NEEDED="$NEEDED" ;;
+ esac
+
+ pkg_failed=no
\ No newline at end of file
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -99,7 +99,6 @@ check_function_exists(_strtoi64 HAVE__STRTOI64)
+ check_function_exists(_strtoui64 HAVE__STRTOUI64)
+ check_function_exists(_unlink HAVE__UNLINK)
+ check_function_exists(arc4random HAVE_ARC4RANDOM)
+-check_function_exists(clonefile HAVE_CLONEFILE)
+ check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO)
+ check_function_exists(explicit_memset HAVE_EXPLICIT_MEMSET)
+ check_function_exists(fchmod HAVE_FCHMOD)
--- /dev/null
+--- 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:
--- /dev/null
+--- cctools/Makefile.am.O 2016-06-09 15:06:16.000000000 +0100
++++ cctools/Makefile.am 2019-11-18 08:59:20.078663220 +0000
+@@ -1,7 +1,7 @@
+ if ISDARWIN
+-SUBDIRS=libstuff ar as misc otool ld64 $(LD_CLASSIC)
++SUBDIRS=libstuff ar as misc ld64 $(LD_CLASSIC)
+ else
+-SUBDIRS=libstuff ar as misc libobjc2 otool ld64 $(LD_CLASSIC)
++SUBDIRS=libstuff ar as misc ld64 $(LD_CLASSIC)
+ endif
+
+ ACLOCAL_AMFLAGS = -I m4
--- /dev/null
+--- 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
+ /*
--- /dev/null
+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)))
--- /dev/null
+From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001
+From: Carl Dong <contact@carldong.me>
+Date: Thu, 18 Jul 2019 17:22:05 -0400
+Subject: [PATCH] Wrap xlib related code blocks in #if's
+
+They are not necessary to compile QT.
+---
+ qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+index 7c62c2e2b3..c05c6c0a07 100644
+--- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
++++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+@@ -49,7 +49,9 @@
+ #include <QtGui/QWindow>
+ #include <QtGui/QBitmap>
+ #include <QtGui/private/qguiapplication_p.h>
++#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+ #include <X11/cursorfont.h>
++#endif
+ #include <xcb/xfixes.h>
+ #include <xcb/xcb_image.h>
+
+@@ -391,6 +391,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window)
+ xcb_flush(xcb_connection());
+ }
+
++#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+ static int cursorIdForShape(int cshape)
+ {
+ int cursorId = 0;
+@@ -444,6 +445,7 @@ static int cursorIdForShape(int cshape)
+ }
+ return cursorId;
+ }
++#endif
+
+ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
+ {
+@@ -556,7 +558,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
+ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
+ {
+ xcb_connection_t *conn = xcb_connection();
++#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+ int cursorId = cursorIdForShape(cshape);
++#endif
+ xcb_cursor_t cursor = XCB_NONE;
+
+ // Try Xcursor first
+@@ -586,6 +590,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
+ // Non-standard X11 cursors are created from bitmaps
+ cursor = createNonStandardCursor(cshape);
+
++#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+ // Create a glpyh cursor if everything else failed
+ if (!cursor && cursorId) {
+ cursor = xcb_generate_id(conn);
+@@ -593,6 +598,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
+ cursorId, cursorId + 1,
+ 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);
+ }
++#endif
+
+ if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
+ const char *name = cursorNames[cshape].front();
+--
+2.22.0
+
--- /dev/null
+# Create the super cache so modules will add themselves to it.
+cache(, super)
+
+!QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build))
+
+#prl = no_install_prl
+#CONFIG += $$prl
+cache(CONFIG, add stash, prl)
+
+TEMPLATE = subdirs
+SUBDIRS = qtbase
+#SUBDIRS = qtbase qttools qttranslations qtsvg qtwebsockets
+
+#qtwebsockets.depends = qtbase
+#qtsvg.depends = qtbase
+#qttools.depends = qtbase
+#qttranslations.depends = qttools
+
+load(qt_configure)
--- /dev/null
+/* 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
--- /dev/null
+From 96ac8f13f4d0ee96baf5724d9f96c44c34b8606c Mon Sep 17 00:00:00 2001
+From: David Carlier <devnexen@gmail.com>
+Date: Tue, 24 Aug 2021 22:40:14 +0100
+Subject: [PATCH] Darwin platform allows to build on releases before
+ Yosemite/ios 8.
+
+issue #16407 #16408
+
+Reviewed-by: Paul Dale <pauli@openssl.org>
+Reviewed-by: Tomas Mraz <tomas@openssl.org>
+(Merged from https://github.com/openssl/openssl/pull/16409)
+---
+ crypto/rand/rand_unix.c | 5 +----
+ include/crypto/rand.h | 10 ++++++++++
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
+index 43f1069d151d..0f4525106af7 100644
+--- a/crypto/rand/rand_unix.c
++++ b/crypto/rand/rand_unix.c
+@@ -34,9 +34,6 @@
+ #if defined(__OpenBSD__)
+ # include <sys/param.h>
+ #endif
+-#if defined(__APPLE__)
+-# include <CommonCrypto/CommonRandom.h>
+-#endif
+
+ #if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
+ # include <sys/types.h>
+@@ -381,7 +378,7 @@ static ssize_t syscall_random(void *buf, size_t buflen)
+ if (errno != ENOSYS)
+ return -1;
+ }
+-# elif defined(__APPLE__)
++# elif defined(OPENSSL_APPLE_CRYPTO_RANDOM)
+ if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
+ return (ssize_t)buflen;
+
+diff --git a/include/crypto/rand.h b/include/crypto/rand.h
+index 5350d3a93119..674f840fd13c 100644
+--- a/include/crypto/rand.h
++++ b/include/crypto/rand.h
+@@ -20,6 +20,16 @@
+
+ # include <openssl/rand.h>
+
++# if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM)
++# include <Availability.h>
++# if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || \
++ (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
++# define OPENSSL_APPLE_CRYPTO_RANDOM 1
++# include <CommonCrypto/CommonCryptoError.h>
++# include <CommonCrypto/CommonRandom.h>
++# endif
++# endif
++
+ /* forward declaration */
+ typedef struct rand_pool_st RAND_POOL;
+
--- /dev/null
+--- a/include/polyseed.h
++++ b/include/polyseed.h
+@@ -93,13 +93,13 @@ Shared/static library definitions
+ - define POLYSEED_STATIC when linking to the static library
+ */
+ #if defined(_WIN32) || defined(__CYGWIN__)
+- #ifdef POLYSEED_SHARED
+- #define POLYSEED_API __declspec(dllexport)
+- #elif !defined(POLYSEED_STATIC)
+- #define POLYSEED_API __declspec(dllimport)
+- #else
+- #define POLYSEED_API
+- #endif
++// #ifdef POLYSEED_SHARED
++// #define POLYSEED_API __declspec(dllexport)
++// #elif !defined(POLYSEED_STATIC)
++// #define POLYSEED_API __declspec(dllimport)
++// #else
++ #define POLYSEED_API
++// #endif
+ #define POLYSEED_PRIVATE
+ #else
+ #ifdef POLYSEED_SHARED
--- /dev/null
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,19 +28,20 @@ if(NOT CMAKE_BUILD_TYPE)
+ message(STATUS "Setting default build type: ${CMAKE_BUILD_TYPE}")
+ endif()
+
+-add_library(polyseed SHARED ${polyseed_sources})
+-set_property(TARGET polyseed PROPERTY POSITION_INDEPENDENT_CODE ON)
+-set_property(TARGET polyseed PROPERTY PUBLIC_HEADER include/polyseed.h)
+-include_directories(polyseed
+- include/)
+-target_compile_definitions(polyseed PRIVATE POLYSEED_SHARED)
+-set_target_properties(polyseed PROPERTIES VERSION 1.0.0
+- SOVERSION 1
+- C_STANDARD 11
+- C_STANDARD_REQUIRED ON)
++#add_library(polyseed SHARED ${polyseed_sources})
++#set_property(TARGET polyseed PROPERTY POSITION_INDEPENDENT_CODE ON)
++#set_property(TARGET polyseed PROPERTY PUBLIC_HEADER include/polyseed.h)
++#include_directories(polyseed
++# include/)
++#target_compile_definitions(polyseed PRIVATE POLYSEED_SHARED)
++#set_target_properties(polyseed PROPERTIES VERSION 1.0.0
++# SOVERSION 1
++# C_STANDARD 11
++# C_STANDARD_REQUIRED ON)
+
+ add_library(polyseed_static STATIC ${polyseed_sources})
+ set_property(TARGET polyseed_static PROPERTY POSITION_INDEPENDENT_CODE ON)
++set_property(TARGET polyseed_static PROPERTY PUBLIC_HEADER include/polyseed.h)
+ include_directories(polyseed_static
+ include/)
+ target_compile_definitions(polyseed_static PRIVATE POLYSEED_STATIC)
+@@ -57,7 +58,7 @@ target_link_libraries(polyseed-tests
+ PRIVATE polyseed_static)
+
+ include(GNUInstallDirs)
+-install(TARGETS polyseed polyseed_static
++install(TARGETS polyseed_static
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
--- /dev/null
+commit 0e953866fc4672486e29e1ba6d83b4207e7b2f0b
+Author: fanquake <fanquake@gmail.com>
+Date: Tue Aug 18 15:09:06 2020 +0800
+
+ Don't hardcode pwd path
+
+ Let a man use his builtins if he wants to! Also, removes the unnecessary
+ assumption that pwd lives under /bin/pwd.
+
+ See #15581.
+
+diff --git a/qtbase/configure b/qtbase/configure
+index 08b49a8d..faea5b55 100755
+--- a/qtbase/configure
++++ b/qtbase/configure
+@@ -36,9 +36,9 @@
+ relconf=`basename $0`
+ # the directory of this script is the "source tree"
+ relpath=`dirname $0`
+-relpath=`(cd "$relpath"; /bin/pwd)`
++relpath=`(cd "$relpath"; pwd)`
+ # the current directory is the "build tree" or "object tree"
+-outpath=`/bin/pwd`
++outpath=`pwd`
+
+ WHICH="which"
+
--- /dev/null
+macOS: Don't hard-code x86_64 as the architecture when using qmake
+
+Upstream commit:
+ - Qt 6.1: 9082cc8e8d5a6441dabe5e7a95bc0cd9085b95fe
+
+For other Qt branches see
+https://codereview.qt-project.org/q/I70db7e4c27f0d3da5d0af33cb491d72c312d3fa8
+
+
+--- old/qtbase/configure.json
++++ new/qtbase/configure.json
+@@ -244,11 +244,18 @@
+
+ "testTypeDependencies": {
+ "linkerSupportsFlag": [ "use_bfd_linker", "use_gold_linker", "use_lld_linker" ],
+- "verifySpec": [ "shared", "use_bfd_linker", "use_gold_linker", "use_lld_linker", "compiler-flags", "qmakeargs", "commit" ],
++ "verifySpec": [
++ "shared",
++ "use_bfd_linker", "use_gold_linker", "use_lld_linker",
++ "compiler-flags", "qmakeargs",
++ "simulator_and_device",
++ "thread",
++ "commit" ],
+ "compile": [ "verifyspec" ],
+ "detectPkgConfig": [ "cross_compile", "machineTuple" ],
+ "library": [ "pkg-config", "compiler-flags" ],
+- "getPkgConfigVariable": [ "pkg-config" ]
++ "getPkgConfigVariable": [ "pkg-config" ],
++ "architecture" : [ "verifyspec" ]
+ },
+
+ "testTypeAliases": {
+@@ -762,7 +769,7 @@
+ },
+ "architecture": {
+ "label": "Architecture",
+- "output": [ "architecture" ]
++ "output": [ "architecture", "commitConfig" ]
+ },
+ "pkg-config": {
+ "label": "Using pkg-config",
+diff --git a/configure.pri b/configure.pri
+index 49755f7abfd..8be9b10d7d4 100644
+--- old/qtbase/configure.pri
++++ new/qtbase/configure.pri
+@@ -662,6 +662,13 @@ defineTest(qtConfOutput_commitOptions) {
+ write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error()
+ }
+
++# Output is written after configuring each Qt module,
++# but some tests within a module might depend on the
++# configuration output of previous tests.
++defineTest(qtConfOutput_commitConfig) {
++ qtConfProcessOutput()
++}
++
+ # type (empty or 'host'), option name, default value
+ defineTest(processQtPath) {
+ out_var = config.rel_input.$${2}
+diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
+index d16b77acb8e..4ba0a8eaa36 100644
+--- old/qtbase/mkspecs/common/macx.conf
++++ new/qtbase/mkspecs/common/macx.conf
+@@ -6,7 +6,6 @@ QMAKE_PLATFORM += macos osx macx
+ QMAKE_MAC_SDK = macosx
+
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13
+-QMAKE_APPLE_DEVICE_ARCHS = x86_64
+
+ # Should be 10.15, but as long as the CI builds with
+ # older SDKs we have to keep this.
+diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
+index 92a9112bca6..d888731ec8d 100644
+--- old/qtbase/mkspecs/features/mac/default_post.prf
++++ new/qtbase/mkspecs/features/mac/default_post.prf
+@@ -95,6 +95,11 @@ app_extension_api_only {
+ QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+ }
+
++# Non-universal builds do not set QMAKE_APPLE_DEVICE_ARCHS,
++# so we pick it up from what the arch test resolved instead.
++isEmpty(QMAKE_APPLE_DEVICE_ARCHS): \
++ QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCH
++
+ macx-xcode {
+ qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO
+ !isEmpty(QMAKE_PKGINFO_TYPEINFO): \
+@@ -150,9 +155,6 @@ macx-xcode {
+ simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
+ VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS
+
+- isEmpty(VALID_ARCHS): \
+- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
+-
+ single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
+
+ ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
+diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
+index efbe7c1e55b..8add6dc8043 100644
+--- old/qtbase/mkspecs/features/toolchain.prf
++++ new/qtbase/mkspecs/features/toolchain.prf
+@@ -182,9 +182,14 @@ isEmpty($${target_prefix}.INCDIRS) {
+ # UIKit simulator platforms will see the device SDK's sysroot in
+ # QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass.
+ darwin {
+- # Clang doesn't pick up the architecture from the sysroot, and will
+- # default to the host architecture, so we need to manually set it.
+- cxx_flags += -arch $$QMAKE_APPLE_DEVICE_ARCHS
++ uikit {
++ # Clang doesn't automatically pick up the architecture, just because
++ # we're passing the iOS sysroot below, and we will end up building the
++ # test for the host architecture, resulting in linker errors when
++ # linking against the iOS libraries. We work around this by passing
++ # the architecture explicitly.
++ cxx_flags += -arch $$first(QMAKE_APPLE_DEVICE_ARCHS)
++ }
+
+ uikit:macx-xcode: \
+ cxx_flags += -isysroot $$sdk_path_device.value
--- /dev/null
+QtGui: Fix duplication of logging category lcQpaFonts
+
+Move it to qplatformfontdatabase.h.
+
+Upstream commit:
+ - Qt 6.0: ab01885e48873fb2ad71841a3f1627fe4d9cd835
+
+--- a/qtbase/src/gui/text/qplatformfontdatabase.cpp
++++ b/qtbase/src/gui/text/qplatformfontdatabase.cpp
+@@ -52,6 +52,8 @@
+
+ QT_BEGIN_NAMESPACE
+
++Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
++
+ void qt_registerFont(const QString &familyname, const QString &stylename,
+ const QString &foundryname, int weight,
+ QFont::Style style, int stretch, bool antialiased,
+
+--- a/qtbase/src/gui/text/qplatformfontdatabase.h
++++ b/qtbase/src/gui/text/qplatformfontdatabase.h
+@@ -50,6 +50,7 @@
+ //
+
+ #include <QtGui/qtguiglobal.h>
++#include <QtCore/qloggingcategory.h>
+ #include <QtCore/QString>
+ #include <QtCore/QStringList>
+ #include <QtCore/QList>
+@@ -62,6 +63,7 @@
+
+ QT_BEGIN_NAMESPACE
+
++Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts)
+
+ class QWritingSystemsPrivate;
+
+
+--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
++++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+@@ -86,8 +86,6 @@
+
+ QT_BEGIN_NAMESPACE
+
+-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
+-
+ static float SYNTHETIC_ITALIC_SKEW = std::tan(14.f * std::acos(0.f) / 90.f);
+
+ bool QCoreTextFontEngine::ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length)
+
+--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
++++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+@@ -64,8 +64,6 @@
+
+ QT_BEGIN_NAMESPACE
+
+-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts)
+-
+ class QCoreTextFontEngine : public QFontEngine
+ {
+ Q_GADGET
+
+--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
++++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
+@@ -68,8 +68,6 @@
+
+ QT_BEGIN_NAMESPACE
+
+-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
+-
+ #ifndef QT_NO_DIRECTWRITE
+ // ### fixme: Consider direct linking of dwrite.dll once Windows Vista pre SP2 is dropped (QTBUG-49711)
+
+
+--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h
++++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h
+@@ -63,8 +63,6 @@
+
+ QT_BEGIN_NAMESPACE
+
+-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts)
+-
+ class QWindowsFontEngineData
+ {
+ Q_DISABLE_COPY_MOVE(QWindowsFontEngineData)
+
+--- a/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
++++ b/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+@@ -40,6 +40,7 @@
+ #include "qgenericunixthemes_p.h"
+
+ #include "qpa/qplatformtheme_p.h"
++#include "qpa/qplatformfontdatabase.h"
+
+ #include <QtGui/QPalette>
+ #include <QtGui/QFont>
+@@ -76,7 +77,6 @@
+ QT_BEGIN_NAMESPACE
+
+ Q_DECLARE_LOGGING_CATEGORY(qLcTray)
+-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
+
+ ResourceHelper::ResourceHelper()
+ {
--- /dev/null
+Modify the optimisation flags for FastFixedDtoa.
+This fixes a non-determinism issue in the asm produced for
+this function when cross-compiling on x86_64 and aarch64 for
+the arm-linux-gnueabihf HOST.
+
+--- a/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h
++++ b/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h
+@@ -48,9 +48,12 @@ namespace double_conversion {
+ //
+ // This method only works for some parameters. If it can't handle the input it
+ // returns false. The output is null-terminated when the function succeeds.
++#pragma GCC push_options
++#pragma GCC optimize ("-O1")
+ bool FastFixedDtoa(double v, int fractional_count,
+ Vector<char> buffer, int* length, int* decimal_point);
+
++#pragma GCC pop_options
+ } // namespace double_conversion
+
+ #endif // DOUBLE_CONVERSION_FIXED_DTOA_H_
--- /dev/null
+--- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp
++++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp
+@@ -943,6 +943,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
+ __android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed");
+ return -1;
+ }
++
++ const jint ret = QT_PREPEND_NAMESPACE(QtAndroidPrivate::initJNI(vm, env));
++ if (ret != 0)
++ {
++ __android_log_print(ANDROID_LOG_FATAL, "Qt", "initJNI failed");
++ return ret;
++ }
++
+ QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false);
+
+ m_javaVM = vm;
+
--- /dev/null
+Fix compiling with GCC 11
+
+Upstream:
+ - bug report: https://bugreports.qt.io/browse/QTBUG-89977
+ - fix in Qt 6.1: 813a928c7c3cf98670b6043149880ed5c955efb9
+
+--- old/qtbase/src/corelib/text/qbytearraymatcher.h
++++ new/qtbase/src/corelib/text/qbytearraymatcher.h
+@@ -42,6 +42,8 @@
+
+ #include <QtCore/qbytearray.h>
+
++#include <limits>
++
+ QT_BEGIN_NAMESPACE
+
+
+
+Upstream fix and backports:
+ - Qt 6.1: 3eab20ad382569cb2c9e6ccec2322c3d08c0f716
+ - Qt 6.2: 380294a5971da85010a708dc23b0edec192cbf27
+ - Qt 6.3: 2b2b3155d9f6ba1e4f859741468fbc47db09292b
+
+--- old/qtbase/src/corelib/tools/qoffsetstringarray_p.h
++++ new/qtbase/src/corelib/tools/qoffsetstringarray_p.h
+@@ -55,6 +55,7 @@
+
+ #include <tuple>
+ #include <array>
++#include <limits>
+
+ QT_BEGIN_NAMESPACE
+
--- /dev/null
+From dece6f5840463ae2ddf927d65eb1b3680e34a547
+From: Øystein Heskestad <oystein.heskestad@qt.io>
+Date: Wed, 27 Oct 2021 13:07:46 +0200
+Subject: [PATCH] Add missing macOS header file that was indirectly included before
+
+See: https://bugreports.qt.io/browse/QTBUG-97855
+
+Upstream Commits:
+ - Qt 6.2: c884bf138a21dd7320e35cef34d24e22e74d7ce0
+
+diff --git a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
+index e070ba97..07c75b04 100644
+--- a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
++++ b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
+@@ -40,6 +40,7 @@
+ #ifndef QIOSURFACEGRAPHICSBUFFER_H
+ #define QIOSURFACEGRAPHICSBUFFER_H
+
++#include <CoreGraphics/CGColorSpace.h>
+ #include <qpa/qplatformgraphicsbuffer.h>
+ #include <private/qcore_mac_p.h>
--- /dev/null
+--- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
++++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
+@@ -52,6 +52,7 @@
+ //
+
+ #include <QtCore/qglobal.h>
++#include <qpa/qplatformprintdevice.h>
+
+ #ifndef QT_NO_PRINTER
+
+--- x/qtbase/src/plugins/plugins.pro
++++ y/qtbase/src/plugins/plugins.pro
+@@ -9,6 +9,3 @@ qtHaveModule(gui) {
+ !android:qtConfig(library): SUBDIRS *= generic
+ }
+ qtHaveModule(widgets): SUBDIRS += styles
+-
+-!winrt:qtHaveModule(printsupport): \
+- SUBDIRS += printsupport
--- /dev/null
+--- old/qtbase/mkspecs/features/qt_module.prf
++++ new/qtbase/mkspecs/features/qt_module.prf
+@@ -269,7 +269,7 @@ load(qt_installs)
+ load(qt_targets)
+
+ # this builds on top of qt_common
+-!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
++if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
+ CONFIG += create_pc
+ QMAKE_PKGCONFIG_DESTDIR = pkgconfig
+ host_build: \
--- /dev/null
+--- old/qtbase/src/tools/rcc/rcc.cpp
++++ new/qtbase/src/tools/rcc/rcc.cpp
+@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
+ if (lib.formatVersion() >= 2) {
+ // last modified time stamp
+ const QDateTime lastModified = m_fileInfo.lastModified();
+- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0));
++ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
++ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
++ if (sourceDate != 0)
++ lastmod = sourceDate;
++ lib.writeNumber8(lastmod);
+ if (text || pass1)
+ lib.writeChar('\n');
+ }
--- /dev/null
+Facilitate guix building with CROSS_LIBRARY_PATH
+
+See discussion in https://github.com/bitcoin/bitcoin/pull/15277.
+
+--- a/qtbase/mkspecs/features/toolchain.prf
++++ b/qtbase/mkspecs/features/toolchain.prf
+@@ -231,8 +231,8 @@ isEmpty($${target_prefix}.INCDIRS) {
+ add_libraries = false
+ for (line, output) {
+ line ~= s/^[ \\t]*// # remove leading spaces
+- contains(line, "LIBRARY_PATH=.*") {
+- line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH=
++ contains(line, "(CROSS_)?LIBRARY_PATH=.*") {
++ line ~= s/^(CROSS_)?LIBRARY_PATH=// # remove leading (CROSS_)?LIBRARY_PATH=
+ equals(QMAKE_HOST.os, Windows): \
+ paths = $$split(line, ;)
+ else: \
--- /dev/null
+MAKEFILE_GENERATOR = UNIX
+CONFIG += app_bundle incremental lib_version_first absolute_library_soname
+QMAKE_INCREMENTAL_STYLE = sublib
+include(../common/macx.conf)
+include(../common/gcc-base-mac.conf)
+include(../common/clang.conf)
+include(../common/clang-mac.conf)
+QMAKE_MAC_SDK_PATH=$${MAC_SDK_PATH}
+QMAKE_XCODE_VERSION = $${XCODE_VERSION}
+QMAKE_XCODE_DEVELOPER_PATH=/Developer
+QMAKE_MAC_SDK=macosx
+QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH}
+QMAKE_MAC_SDK.macosx.platform_name = macosx
+QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION}
+QMAKE_MAC_SDK.macosx.PlatformPath = /phony
+!host_build: QMAKE_CFLAGS += -target $${MAC_TARGET}
+!host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
+!host_build: QMAKE_CXXFLAGS += -target $${MAC_TARGET}
+!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET}
+QMAKE_AR = $${CROSS_COMPILE}ar cq
+QMAKE_RANLIB=$${CROSS_COMPILE}ranlib
+load(qt_config)
--- /dev/null
+From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001
+From: Carl Dong <contact@carldong.me>
+Date: Thu, 18 Jul 2019 17:22:05 -0400
+Subject: [PATCH] Wrap xlib related code blocks in #if's
+
+They are not necessary to compile QT.
+---
+ qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+index 7c62c2e2b3..c05c6c0a07 100644
+--- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
++++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+@@ -49,7 +49,9 @@
+ #include <QtGui/QWindow>
+ #include <QtGui/QBitmap>
+ #include <QtGui/private/qguiapplication_p.h>
++#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+ #include <X11/cursorfont.h>
++#endif
+ #include <xcb/xfixes.h>
+ #include <xcb/xcb_image.h>
+
+@@ -391,6 +391,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window)
+ xcb_flush(xcb_connection());
+ }
+
++#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+ static int cursorIdForShape(int cshape)
+ {
+ int cursorId = 0;
+@@ -444,6 +445,7 @@ static int cursorIdForShape(int cshape)
+ }
+ return cursorId;
+ }
++#endif
+
+ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
+ {
+@@ -556,7 +558,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
+ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
+ {
+ xcb_connection_t *conn = xcb_connection();
++#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+ int cursorId = cursorIdForShape(cshape);
++#endif
+ xcb_cursor_t cursor = XCB_NONE;
+
+ // Try Xcursor first
+@@ -586,6 +590,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
+ // Non-standard X11 cursors are created from bitmaps
+ cursor = createNonStandardCursor(cshape);
+
++#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+ // Create a glpyh cursor if everything else failed
+ if (!cursor && cursorId) {
+ cursor = xcb_generate_id(conn);
+@@ -593,6 +598,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
+ cursorId, cursorId + 1,
+ 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);
+ }
++#endif
+
+ if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
+ const char *name = cursorNames[cshape].front();
+--
+2.22.0
+
--- /dev/null
+# Create the super cache so modules will add themselves to it.
+cache(, super)
+
+!QTDIR_build: cache(CONFIG, add, $$list(QTDIR_build))
+
+#prl = no_install_prl
+#CONFIG += $$prl
+cache(CONFIG, add stash, prl)
+
+TEMPLATE = subdirs
+SUBDIRS = qtbase qttools qttranslations qtsvg qtwebsockets
+
+qtwebsockets.depends = qtbase
+qtsvg.depends = qtbase
+qttools.depends = qtbase
+qttranslations.depends = qttools
+
+load(qt_configure)
--- /dev/null
+The moc executable loops through headers on CPLUS_INCLUDE_PATH and stumbles
+on the GCC internal _GLIBCXX_VISIBILITY macro. Tell it to ignore it as it is
+not supposed to be looking there to begin with.
+
+Upstream report: https://bugreports.qt.io/browse/QTBUG-83160
+
+diff --git a/qtbase/src/tools/moc/main.cpp b/qtbase/src/tools/moc/main.cpp
+--- a/qtbase/src/tools/moc/main.cpp
++++ b/qtbase/src/tools/moc/main.cpp
+@@ -238,6 +238,7 @@ int runMoc(int argc, char **argv)
+ dummyVariadicFunctionMacro.arguments += Symbol(0, PP_IDENTIFIER, "__VA_ARGS__");
+ pp.macros["__attribute__"] = dummyVariadicFunctionMacro;
+ pp.macros["__declspec"] = dummyVariadicFunctionMacro;
++ pp.macros["_GLIBCXX_VISIBILITY"] = dummyVariadicFunctionMacro;
+
+ QString filename;
+ QString output;
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS = linguist
+
+fb = force_bootstrap
+CONFIG += $$fb
+cache(CONFIG, add, fb)
--- /dev/null
+Hardcode last modified timestamp in Qt RCC
+
+This change allows the already built qt package to be reused even with
+the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds.
+
+
+--- old/qtbase/src/tools/rcc/rcc.cpp
++++ new/qtbase/src/tools/rcc/rcc.cpp
+@@ -227,14 +227,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
+
+ if (lib.formatVersion() >= 2) {
+ // last modified time stamp
+- const QDateTime lastModified = m_fileInfo.lastModified();
+- quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
+- static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
+- if (sourceDate != 0)
+- lastmod = sourceDate;
+- static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong();
+- if (sourceDate2 != 0)
+- lastmod = sourceDate2;
++ quint64 lastmod = quint64(1);
+ lib.writeNumber8(lastmod);
+ if (text || pass1)
+ lib.writeChar('\n');
--- /dev/null
+Use Android NDK r23 LTS
+
+--- old/qtbase/mkspecs/features/android/default_pre.prf
++++ new/qtbase/mkspecs/features/android/default_pre.prf
+@@ -76,7 +76,7 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux-
+ else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android-
+ else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi-
+
+-QMAKE_RANLIB = $${CROSS_COMPILE}ranlib
++QMAKE_RANLIB = $$NDK_LLVM_PATH/bin/llvm-ranlib
+ QMAKE_LINK_SHLIB = $$QMAKE_LINK
+ QMAKE_LFLAGS =
+
--- /dev/null
+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
--- /dev/null
+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'
+
--- /dev/null
+--- 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"
--- /dev/null
+From 06aba27b04c5822cb88a69677382a0f053367143 Mon Sep 17 00:00:00 2001
+From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com>
+Date: Thu, 22 Jul 2021 21:53:19 -0700
+Subject: [PATCH] fix: building libzmq fails with error src/clock.cpp:131:16:
+ error: unused variable 'nsecs_per_usec'
+
+---
+ src/clock.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/clock.cpp b/src/clock.cpp
+index 93da90a8e..63c0100a5 100644
+--- a/src/clock.cpp
++++ b/src/clock.cpp
+@@ -195,6 +195,7 @@ uint64_t zmq::clock_t::now_us ()
+
+ #else
+
++ LIBZMQ_UNUSED (nsecs_per_usec);
+ // Use POSIX gettimeofday function to get precise time.
+ struct timeval tv;
+ int rc = gettimeofday (&tv, NULL);
--- /dev/null
+# Set the system name to one of Android, Darwin, 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(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 /gnu/store /feather/contrib/depends/SDKs/)
+
+SET(ENV{PKG_CONFIG_PATH} @prefix@/lib/pkgconfig)
+
+# TODO: This is hacky, find a way to obtain to obtain the version from the depends package
+SET(TOR_DIR @prefix@/Tor)
+SET(TOR_VERSION 0.4.7.7)
+
+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)
+
+SET(NATIVE_BIN_PATH @prefix@/native/bin CACHE FILEPATH "path to native binaries" FORCE)
+SET(LRELEASE_PATH @prefix@/native/bin CACHE FILEPATH "path to lrelease" FORCE)
+
+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
+
+# 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-darwin")
+ SET(CONF_TRIPLE "aarch64-apple-darwin")
+ 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-darwin")
+ SET(CONF_TRIPLE "x86_64-apple-darwin")
+ 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@ -stdlib=libc++ )
+ SET(CMAKE_CXX_COMPILER_TARGET ${CLANG_TARGET})
+ SET(CMAKE_CXX_FLAGS_INIT -B${_CMAKE_TOOLCHAIN_PREFIX})
+ SET(CMAKE_ASM_COMPILER /home/user/.guix-profile/bin/clang)
+ SET(CMAKE_ASM-ATT_COMPILER /home/user/.guix-profile/bin/as)
+ 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_SYSROOT "@prefix@/../SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/")
+ SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
+ SET(CMAKE_CXX_STANDARD 14)
+ SET(LLVM_ENABLE_PIC OFF)
+ SET(LLVM_ENABLE_PIE OFF)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ SET(ANDROID TRUE)
+ if(ARCHITECTURE STREQUAL "arm")
+ SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
+ SET(CMAKE_SYSTEM_PROCESSOR "armv7-a")
+ SET(CMAKE_ANDROID_ARM_MODE ON)
+ SET(CMAKE_C_COMPILER_TARGET arm-linux-androideabi)
+ SET(CMAKE_CXX_COMPILER_TARGET arm-linux-androideabi)
+ SET(_CMAKE_TOOLCHAIN_PREFIX arm-linux-androideabi-)
+ elseif(ARCHITECTURE STREQUAL "aarch64")
+ SET(CMAKE_ANDROID_ARCH_ABI "arm64-v8a")
+ SET(CMAKE_SYSTEM_PROCESSOR "aarch64")
+ endif()
+ SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN @prefix@/native)
+ SET(CMAKE_C_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang")
+ SET(CMAKE_CXX_COMPILER "${_CMAKE_TOOLCHAIN_PREFIX}clang++")
+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")
+ set(NO_AES ON)
+ set(ARCH "rv64imafdc")
+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()
+
+#Create a new global cmake flag that indicates building with depends
+set (DEPENDS true)
--- /dev/null
+# Guix Installation and Setup
+
+This only needs to be done once per machine. If you have already completed the
+installation and setup, please proceed to [perform a build](./README.md).
+
+Otherwise, you may choose from one of the following options to install Guix:
+
+1. Using the official **shell installer script** [⤓ skip to section][install-script]
+ - Maintained by Guix developers
+ - Easiest (automatically performs *most* setup)
+ - Works on nearly all Linux distributions
+ - Only installs latest release
+ - Binary installation only, requires high level of trust
+ - Note: The script needs to be run as root, so it should be inspected before it's run
+2. Using the official **binary tarball** [⤓ skip to section][install-bin-tarball]
+ - Maintained by Guix developers
+ - Normal difficulty (full manual setup required)
+ - Works on nearly all Linux distributions
+ - Installs any release
+ - Binary installation only, requires high level of trust
+3. Using a **distribution-maintained package** [⤓ skip to section][install-distro-pkg]
+ - Maintained by distribution's Guix package maintainer
+ - Normal difficulty (manual setup required)
+ - Works only on distributions with Guix packaged, see: https://repology.org/project/guix/versions
+ - Installs a release decided on by package maintainer
+ - Source or binary installation depending on the distribution
+4. Building **from source** [⤓ skip to section][install-source]
+ - Maintained by you
+ - Hard, but rewarding
+ - Can be made to work on most Linux distributions
+ - Installs any commit (more granular)
+ - Source installation, requires lower level of trust
+
+## Options 1 and 2: Using the official shell installer script or binary tarball
+
+The installation instructions for both the official shell installer script and
+the binary tarballs can be found in the GNU Guix Manual's [Binary Installation
+section](https://guix.gnu.org/manual/en/html_node/Binary-Installation.html).
+
+Note that running through the binary tarball installation steps is largely
+equivalent to manually performing what the shell installer script does.
+
+Note that at the time of writing (July 5th, 2021), the shell installer script
+automatically creates an `/etc/profile.d` entry which the binary tarball
+installation instructions do not ask you to create. However, you will likely
+need this entry for better desktop integration. Please see [this
+section](#add-an-etcprofiled-entry) for instructions on how to add a
+`/etc/profile.d/guix.sh` entry.
+
+Regardless of which installation option you chose, the changes to
+`/etc/profile.d` will not take effect until the next shell or desktop session,
+so you should log out and log back in.
+
+## Option 3: Using a distribution-maintained package
+
+Note that this section is based on the distro packaging situation at the time of
+writing (July 2021). Guix is expected to be more widely packaged over time. For
+an up-to-date view on Guix's package status/version across distros, please see:
+https://repology.org/project/guix/versions
+
+### Debian 11 (Bullseye)/Ubuntu 21.04 (Hirsute Hippo)
+
+Guix v1.2.0 is available as a distribution package starting in [Debian
+11](https://packages.debian.org/bullseye/guix) and [Ubuntu
+21.04](https://packages.ubuntu.com/hirsute/guix).
+
+Note that if you intend on using Guix without using any substitutes (more
+details [here][security-model]), v1.2.0 has a known problem when building GnuTLS
+from source. Solutions and workarounds are documented
+[here](#gnutls-test-suite-fail-status-request-revoked).
+
+
+To install:
+```sh
+sudo apt install guix
+```
+
+For up-to-date information on Debian and Ubuntu's release history:
+- [Debian release history](https://www.debian.org/releases/)
+- [Ubuntu release history](https://ubuntu.com/about/release-cycle)
+
+### Arch Linux
+
+Guix is available in the AUR as
+[`guix`](https://aur.archlinux.org/packages/guix/), please follow the
+installation instructions in the Arch Linux Wiki ([live
+link](https://wiki.archlinux.org/index.php/Guix#AUR_Package_Installation),
+[2021/03/30
+permalink](https://wiki.archlinux.org/index.php?title=Guix&oldid=637559#AUR_Package_Installation))
+to install Guix.
+
+At the time of writing (2021/03/30), the `check` phase will fail if the path to
+guix's build directory is longer than 36 characters due to an anachronistic
+character limit on the shebang line. Since the `check` phase happens after the
+`build` phase, which may take quite a long time, it is recommended that users
+either:
+
+1. Skip the `check` phase
+ - For `makepkg`: `makepkg --nocheck ...`
+ - For `yay`: `yay --mflags="--nocheck" ...`
+ - For `paru`: `paru --nocheck ...`
+2. Or, check their build directory's length beforehand
+ - For those building with `makepkg`: `pwd | wc -c`
+
+## Option 4: Building from source
+
+Building Guix from source is a rather involved process but a rewarding one for
+those looking to minimize trust and maximize customizability (e.g. building a
+particular commit of Guix). Previous experience with using autotools-style build
+systems to build packages from source will be helpful. *hic sunt dracones.*
+
+I strongly urge you to at least skim through the entire section once before you
+start issuing commands, as it will save you a lot of unnecessary pain and
+anguish.
+
+### Installing common build tools
+
+There are a few basic build tools that are required for most things we'll build,
+so let's install them now:
+
+Text transformation/i18n:
+- `autopoint` (sometimes packaged in `gettext`)
+- `help2man`
+- `po4a`
+- `texinfo`
+
+Build system tools:
+- `g++` w/ C++11 support
+- `libtool`
+- `autoconf`
+- `automake`
+- `pkg-config` (sometimes packaged as `pkgconf`)
+- `make`
+- `cmake`
+
+Miscellaneous:
+- `git`
+- `gnupg`
+- `python3`
+
+### Building and Installing Guix's dependencies
+
+In order to build Guix itself from source, we need to first make sure that the
+necessary dependencies are installed and discoverable. The most up-to-date list
+of Guix's dependencies is kept in the ["Requirements"
+section](https://guix.gnu.org/manual/en/html_node/Requirements.html) of the Guix
+Reference Manual.
+
+Depending on your distribution, most or all of these dependencies may already be
+packaged and installable without manually building and installing.
+
+For reference, the graphic below outlines Guix v1.3.0's dependency graph:
+
+
+
+#### Guile
+
+##### Choosing a Guile version and sticking to it
+
+One of the first things you need to decide is which Guile version you want to
+use: Guile v2.2 or Guile v3.0. Unlike the python2 to python3 transition, Guile
+v2.2 and Guile v3.0 are largely compatible, as evidenced by the fact that most
+Guile packages and even [Guix
+itself](https://guix.gnu.org/en/blog/2020/guile-3-and-guix/) support running on
+both.
+
+What is important here is that you **choose one**, and you **remain consistent**
+with your choice throughout **all Guile-related packages**, no matter if they
+are installed via the distribution's package manager or installed from source.
+This is because the files for Guile packages are installed to directories which
+are separated based on the Guile version.
+
+###### Example: Checking that Ubuntu's `guile-git` is compatible with your chosen Guile version
+
+On Ubuntu Focal:
+
+```sh
+$ apt show guile-git
+Package: guile-git
+...
+Depends: guile-2.2, guile-bytestructures, libgit2-dev
+...
+```
+
+As you can see, the package `guile-git` depends on `guile-2.2`, meaning that it
+was likely built for Guile v2.2. This means that if you decided to use Guile
+v3.0 on Ubuntu Focal, you would need to build guile-git from source instead of
+using the distribution package.
+
+On Ubuntu Hirsute:
+
+```sh
+$ apt show guile-git
+Package: guile-git
+...
+Depends: guile-3.0 | guile-2.2, guile-bytestructures (>= 1.0.7-3~), libgit2-dev (>= 1.0)
+...
+```
+
+In this case, `guile-git` depends on either `guile-3.0` or `guile-2.2`, meaning
+that it would work no matter what Guile version you decided to use.
+
+###### Corner case: Multiple versions of Guile on one system
+
+It is recommended to only install one version of Guile, so that build systems do
+not get confused about which Guile to use.
+
+However, if you insist on having both Guile v2.2 and Guile v3.0 installed on
+your system, then you need to **consistently** specify one of
+`GUILE_EFFECTIVE_VERSION=3.0` or `GUILE_EFFECTIVE_VERSION=2.2` to all
+`./configure` invocations for Guix and its dependencies.
+
+##### Installing Guile
+
+Guile is most likely already packaged for your distribution, so after you have
+[chosen a Guile version](#choosing-a-guile-version-and-sticking-to-it), install
+it via your distribution's package manager.
+
+If your distribution splits packages into `-dev`-suffixed and
+non-`-dev`-suffixed sub-packages (as is the case for Debian-derived
+distributions), please make sure to install both. For example, to install Guile
+v2.2 on Debian/Ubuntu:
+
+```sh
+apt install guile-2.2 guile-2.2-dev
+```
+
+#### Mixing distribution packages and source-built packages
+
+At the time of writing, most distributions have _some_ of Guix's dependencies
+packaged, but not all. This means that you may want to install the distribution
+package for some dependencies, and manually build-from-source for others.
+
+Distribution packages usually install to `/usr`, which is different from the
+default `./configure` prefix of source-built packages: `/usr/local`.
+
+This means that if you mix-and-match distribution packages and source-built
+packages and do not specify exactly `--prefix=/usr` to `./configure` for
+source-built packages, you will need to augment the `GUILE_LOAD_PATH` and
+`GUILE_LOAD_COMPILED_PATH` environment variables so that Guile will look
+under the right prefix and find your source-built packages.
+
+For example, if you are using Guile v2.2, and have Guile packages in the
+`/usr/local` prefix, either add the following lines to your `.profile` or
+`.bash_profile` so that the environment variable is properly set for all future
+shell logins, or paste the lines into a POSIX-style shell to temporarily modify
+the environment variables of your current shell session.
+
+```sh
+# Help Guile v2.2.x find packages in /usr/local
+export GUILE_LOAD_PATH="/usr/local/share/guile/site/2.2${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
+export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/2.2/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_COMPILED_LOAD_PATH"
+```
+
+Note that these environment variables are used to check for packages during
+`./configure`, so they should be set as soon as possible should you want to use
+a prefix other than `/usr`.
+
+#### Building and installing source-built packages
+
+***IMPORTANT**: A few dependencies have non-obvious quirks/errata which are
+documented in the sub-sections immediately below. Please read these sections
+before proceeding to build and install these packages.*
+
+Although you should always refer to the README or INSTALL files for the most
+accurate information, most of these dependencies use autoconf-style build
+systems (check if there's a `configure.ac` file), and will likely do the right
+thing with the following:
+
+Clone the repository and check out the latest release:
+```sh
+git clone <git-repo-of-dependency>/<dependency>.git
+cd <dependency>
+git tag -l # check for the latest release
+git checkout <latest-release>
+```
+
+For autoconf-based build systems (if `./autogen.sh` or `configure.ac` exists at
+the root of the repository):
+
+```sh
+./autogen.sh || autoreconf -vfi
+./configure --prefix=<prefix>
+make
+sudo make install
+```
+
+For CMake-based build systems (if `CMakeLists.txt` exists at the root of the
+repository):
+
+```sh
+mkdir build && cd build
+cmake .. -DCMAKE_INSTALL_PREFIX=<prefix>
+sudo cmake --build . --target install
+```
+
+If you choose not to specify exactly `--prefix=/usr` to `./configure`, please
+make sure you've carefully read the [previous section] on mixing distribution
+packages and source-built packages.
+
+##### Binding packages require `-dev`-suffixed packages
+
+Relevant for:
+- Everyone
+
+When building bindings, the `-dev`-suffixed version of the original package
+needs to be installed. For example, building `Guile-zlib` on Debian-derived
+distributions requires that `zlib1g-dev` is installed.
+
+When using bindings, the `-dev`-suffixed version of the original package still
+needs to be installed. This is particularly problematic when distribution
+packages are mispackaged like `guile-sqlite3` is in Ubuntu Focal such that
+installing `guile-sqlite3` does not automatically install `libsqlite3-dev` as a
+dependency.
+
+Below is a list of relevant Guile bindings and their corresponding `-dev`
+packages in Debian at the time of writing.
+
+| Guile binding package | -dev Debian package |
+|-----------------------|---------------------|
+| guile-gcrypt | libgcrypt-dev |
+| guile-git | libgit2-dev |
+| guile-lzlib | liblz-dev |
+| guile-ssh | libssh-dev |
+| guile-sqlite3 | libsqlite3-dev |
+| guile-zlib | zlib1g-dev |
+
+##### `guile-git` actually depends on `libgit2 >= 1.1`
+
+Relevant for:
+- Those building `guile-git` from source against `libgit2 < 1.1`
+- Those installing `guile-git` from their distribution where `guile-git` is
+ built against `libgit2 < 1.1`
+
+As of v0.4.0, `guile-git` claims to only require `libgit2 >= 0.28.0`, however,
+it actually requires `libgit2 >= 1.1`, otherwise, it will be confused by a
+reference of `origin/keyring`: instead of interpreting the reference as "the
+'keyring' branch of the 'origin' remote", the reference is interpreted as "the
+branch literally named 'origin/keyring'"
+
+This is especially notable because Ubuntu Focal packages `libgit2 v0.28.4`, and
+`guile-git` is built against it.
+
+Should you be in this situation, you need to build both `libgit2 v1.1.x` and
+`guile-git` from source.
+
+Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527
+
+##### `{scheme,guile}-bytestructures` v1.0.8 and v1.0.9 are broken for Guile v2.2
+
+Relevant for:
+- Those building `{scheme,guile}-bytestructures` from source against Guile v2.2
+
+Commit
+[707eea3](https://github.com/TaylanUB/scheme-bytestructures/commit/707eea3a85e1e375e86702229ebf73d496377669)
+introduced a regression for Guile v2.2 and was first included in v1.0.8, this
+was later corrected in commit
+[ec9a721](https://github.com/TaylanUB/scheme-bytestructures/commit/ec9a721957c17bcda13148f8faa5f06934431ff7)
+and included in v1.1.0.
+
+TL;DR If you decided to use Guile v2.2, do not use `{scheme,guile}-bytestructures` v1.0.8 or v1.0.9.
+
+### Building and Installing Guix itself
+
+Start by cloning Guix:
+
+```
+git clone https://git.savannah.gnu.org/git/guix.git
+cd guix
+```
+
+You will likely want to build the latest release, however, if the latest release
+when you're reading this is still 1.2.0 then you may want to use 95aca29 instead
+to avoid a problem in the GnuTLS test suite.
+
+```
+git branch -a -l 'origin/version-*' # check for the latest release
+git checkout <latest-release>
+```
+
+Bootstrap the build system:
+```
+./bootstrap
+```
+
+Configure with the recommended `--localstatedir` flag:
+```
+./configure --localstatedir=/var
+```
+
+Note: If you intend to hack on Guix in the future, you will need to supply the
+same `--localstatedir=` flag for all future Guix `./configure` invocations. See
+the last paragraph of this
+[section](https://guix.gnu.org/manual/en/html_node/Requirements.html) for more
+details.
+
+Build Guix (this will take a while):
+```
+make -j$(nproc)
+```
+
+Install Guix:
+
+```
+sudo make install
+```
+
+### Post-"build from source" Setup
+
+#### Creating and starting a `guix-daemon-original` service with a fixed `argv[0]`
+
+At this point, guix will be installed to `${bindir}`, which is likely
+`/usr/local/bin` if you did not override directory variables at
+`./configure`-time. More information on standard Automake directory variables
+can be found
+[here](https://www.gnu.org/software/automake/manual/html_node/Standard-Directory-Variables.html).
+
+However, the Guix init scripts and service configurations for Upstart, systemd,
+SysV, and OpenRC are installed (in `${libdir}`) to launch
+`${localstatedir}/guix/profiles/per-user/root/current-guix/bin/guix-daemon`,
+which does not yet exist, and will only exist after [`root` performs their first
+`guix pull`](#guix-pull-as-root).
+
+We need to create a `-original` version of these init scripts that's pointed to
+the binaries we just built and `make install`'ed in `${bindir}` (normally,
+`/usr/local/bin`).
+
+Example for `systemd`, run as `root`:
+
+```sh
+# Create guix-daemon-original.service by modifying guix-daemon.service
+libdir=# set according to your PREFIX (default is /usr/local/lib)
+bindir="$(dirname $(command -v guix-daemon))"
+sed -E -e "s|/\S*/guix/profiles/per-user/root/current-guix/bin/guix-daemon|${bindir}/guix-daemon|" "${libdir}"/systemd/system/guix-daemon.service > /etc/systemd/system/guix-daemon-original.service
+chmod 664 /etc/systemd/system/guix-daemon-original.service
+
+# Make systemd recognize the new service
+systemctl daemon-reload
+
+# Make sure that the non-working guix-daemon.service is stopped and disabled
+systemctl stop guix-daemon
+systemctl disable guix-daemon
+
+# Make sure that the working guix-daemon-original.service is started and enabled
+systemctl enable guix-daemon-original
+systemctl start guix-daemon-original
+```
+
+#### Creating `guix-daemon` users / groups
+
+Please see the [relevant
+section](https://guix.gnu.org/manual/en/html_node/Build-Environment-Setup.html)
+in the Guix Reference Manual for more details.
+
+## Optional setup
+
+At this point, you are set up to [use Guix to build Feather Wallet](./README.md#usage). However, if you want to polish your setup a bit and
+make it "what Guix intended", then read the next few subsections.
+
+### Add an `/etc/profile.d` entry
+
+This section definitely does not apply to you if you installed Guix using:
+1. The shell installer script
+2. fanquake's Docker image
+3. Debian's `guix` package
+
+#### Background
+
+Although Guix knows how to update itself and its packages, it does so in a
+non-invasive way (it does not modify `/usr/local/bin/guix`).
+
+Instead, it does the following:
+
+- After a `guix pull`, it updates
+ `/var/guix/profiles/per-user/$USER/current-guix`, and creates a symlink
+ targeting this directory at `$HOME/.config/guix/current`
+
+- After a `guix install`, it updates
+ `/var/guix/profiles/per-user/$USER/guix-profile`, and creates a symlink
+ targeting this directory at `$HOME/.guix-profile`
+
+Therefore, in order for these operations to affect your shell/desktop sessions
+(and for the principle of least astonishment to hold), their corresponding
+directories have to be added to well-known environment variables like `$PATH`,
+`$INFOPATH`, `$XDG_DATA_DIRS`, etc.
+
+In other words, if `$HOME/.config/guix/current/bin` does not exist in your
+`$PATH`, a `guix pull` will have no effect on what `guix` you are using. Same
+goes for `$HOME/.guix-profile/bin`, `guix install`, and installed packages.
+
+Helpfully, after a `guix pull` or `guix install`, a message will be printed like
+so:
+
+```
+hint: Consider setting the necessary environment variables by running:
+
+ GUIX_PROFILE="$HOME/.guix-profile"
+ . "$GUIX_PROFILE/etc/profile"
+
+Alternately, see `guix package --search-paths -p "$HOME/.guix-profile"'.
+```
+
+However, this is somewhat tedious to do for both `guix pull` and `guix install`
+for each user on the system that wants to properly use `guix`. I recommend that
+you instead add an entry to `/etc/profile.d` instead. This is done by default
+when installing the Debian package later than 1.2.0-4 and when using the shell
+script installer.
+
+#### Instructions
+
+Create `/etc/profile.d/guix.sh` with the following content:
+```sh
+# _GUIX_PROFILE: `guix pull` profile
+_GUIX_PROFILE="$HOME/.config/guix/current"
+if [ -L $_GUIX_PROFILE ]; then
+ export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
+ # Export INFOPATH so that the updated info pages can be found
+ # and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info
+ # When INFOPATH is unset, add a trailing colon so that Emacs
+ # searches 'Info-default-directory-list'.
+ export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
+fi
+
+# GUIX_PROFILE: User's default profile
+GUIX_PROFILE="$HOME/.guix-profile"
+[ -L $GUIX_PROFILE ] || return
+GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
+export GUIX_PROFILE GUIX_LOCPATH
+
+[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
+
+# set XDG_DATA_DIRS to include Guix installations
+export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
+```
+
+Please note that this will not take effect until the next shell or desktop
+session (log out and log back in).
+
+### `guix pull` as root
+
+Before you do this, you need to read the section on [choosing your security
+model][security-model] and adjust `guix` and `guix-daemon` flags according to
+your choice, as invoking `guix pull` may pull substitutes from substitute
+servers (which you may not want).
+
+As mentioned in a previous section, Guix expects
+`${localstatedir}/guix/profiles/per-user/root/current-guix` to be populated with
+`root`'s Guix profile, `guix pull`-ed and built by some former version of Guix.
+However, this is not the case when we build from source. Therefore, we need to
+perform a `guix pull` as `root`:
+
+```sh
+sudo --login guix pull --branch=version-<latest-release-version>
+# or
+sudo --login guix pull --commit=<particular-commit>
+```
+
+`guix pull` is quite a long process (especially if you're using
+`--no-substitute`). If you encounter build problems, please refer to the
+[troubleshooting section](#troubleshooting).
+
+Note that running a bare `guix pull` with no commit or branch specified will
+pull the latest commit on Guix's master branch, which is likely fine, but not
+recommended.
+
+If you installed Guix from source, you may get an error like the following:
+```sh
+error: while creating symlink '/root/.config/guix/current' No such file or directory
+```
+To resolve this, simply:
+```
+sudo mkdir -p /root/.config/guix
+```
+Then try the `guix pull` command again.
+
+After the `guix pull` finishes successfully,
+`${localstatedir}/guix/profiles/per-user/root/current-guix` should be populated.
+
+#### Using the newly-pulled `guix` by restarting the daemon
+
+Depending on how you installed Guix, you should now make sure that your init
+scripts and service configurations point to the newly-pulled `guix-daemon`.
+
+##### If you built Guix from source
+
+If you followed the instructions for [fixing argv\[0\]][fix-argv0], you can now
+do the following:
+
+```sh
+systemctl stop guix-daemon-original
+systemctl disable guix-daemon-original
+
+systemctl enable guix-daemon
+systemctl start guix-daemon
+```
+
+##### If you installed Guix via the Debian/Ubuntu distribution packages
+
+You will need to create a `guix-daemon-latest` service which points to the new
+`guix` rather than a pinned one.
+
+```sh
+# Create guix-daemon-latest.service by modifying guix-daemon.service
+sed -E -e "s|/usr/bin/guix-daemon|/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon|" /etc/systemd/system/guix-daemon.service > /lib/systemd/system/guix-daemon-latest.service
+chmod 664 /lib/systemd/system/guix-daemon-latest.service
+
+# Make systemd recognize the new service
+systemctl daemon-reload
+
+# Make sure that the old guix-daemon.service is stopped and disabled
+systemctl stop guix-daemon
+systemctl disable guix-daemon
+
+# Make sure that the new guix-daemon-latest.service is started and enabled
+systemctl enable guix-daemon-latest
+systemctl start guix-daemon-latest
+```
+
+##### If you installed Guix via lantw44's Arch Linux AUR package
+
+At the time of writing (July 5th, 2021) the systemd unit for "updated Guix" is
+`guix-daemon-latest.service`, therefore, you should do the following:
+
+```sh
+systemctl stop guix-daemon
+systemctl disable guix-daemon
+
+systemctl enable guix-daemon-latest
+systemctl start guix-daemon-latest
+```
+
+##### Otherwise...
+
+Simply do:
+
+```sh
+systemctl restart guix-daemon
+```
+
+### Checking everything
+
+If you followed all the steps above to make your Guix setup "prim and proper,"
+you can check that you did everything properly by running through this
+checklist.
+
+1. `/etc/profile.d/guix.sh` should exist and be sourced at each shell login
+
+2. `guix describe` should not print `guix describe: error: failed to determine
+ origin`, but rather something like:
+
+ ```
+ Generation 38 Feb 22 2021 16:39:31 (current)
+ guix f350df4
+ repository URL: https://git.savannah.gnu.org/git/guix.git
+ branch: version-1.2.0
+ commit: f350df405fbcd5b9e27e6b6aa500da7f101f41e7
+ ```
+
+3. `guix-daemon` should be running from `${localstatedir}/guix/profiles/per-user/root/current-guix`
+
+# Troubleshooting
+
+## Derivation failed to build
+
+When you see a build failure like below:
+
+```
+building /gnu/store/...-foo-3.6.12.drv...
+/ 'check' phasenote: keeping build directory `/tmp/guix-build-foo-3.6.12.drv-0'
+builder for `/gnu/store/...-foo-3.6.12.drv' failed with exit code 1
+build of /gnu/store/...-foo-3.6.12.drv failed
+View build log at '/var/log/guix/drvs/../...-foo-3.6.12.drv.bz2'.
+cannot build derivation `/gnu/store/...-qux-7.69.1.drv': 1 dependencies couldn't be built
+cannot build derivation `/gnu/store/...-bar-3.16.5.drv': 1 dependencies couldn't be built
+cannot build derivation `/gnu/store/...-baz-2.0.5.drv': 1 dependencies couldn't be built
+guix time-machine: error: build of `/gnu/store/...-baz-2.0.5.drv' failed
+```
+
+It means that `guix` failed to build a package named `foo`, which was a
+dependency of `qux`, `bar`, and `baz`. Importantly, note that the last "failed"
+line is not necessarily the root cause, the first "failed" line is.
+
+Most of the time, the build failure is due to a spurious test failure or the
+package's build system/test suite breaking when running multi-threaded. To
+rebuild _just_ this derivation in a single-threaded fashion (please don't forget
+to add other `guix` flags like `--no-substitutes` as appropriate):
+
+```sh
+$ guix build --cores=1 /gnu/store/...-foo-3.6.12.drv
+```
+
+If the single-threaded rebuild did not succeed, you may need to dig deeper.
+You may view `foo`'s build logs in `less` like so (please replace paths with the
+path you see in the build failure output):
+
+```sh
+$ bzcat /var/log/guix/drvs/../...-foo-3.6.12.drv.bz2 | less
+```
+
+`foo`'s build directory is also preserved and available at
+`/tmp/guix-build-foo-3.6.12.drv-0`. However, if you fail to build `foo` multiple
+times, it may be `/tmp/...drv-1` or `/tmp/...drv-2`. Always consult the build
+failure output for the most accurate, up-to-date information.
+
+### python(-minimal): [Errno 84] Invalid or incomplete multibyte or wide character
+
+This error occurs when your `$TMPDIR` (default: /tmp) exists on a filesystem
+which rejects characters not present in the UTF-8 character code set. An example
+is ZFS with the utf8only=on option set.
+
+More information: https://bugs.python.org/issue37584
+
+### GnuTLS: test-suite FAIL: status-request-revoked
+
+*The derivation is likely identified by: `/gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv`*
+
+This unfortunate error is most common for non-substitute builders who installed
+Guix v1.2.0. The problem stems from the fact that one of GnuTLS's tests uses a
+hardcoded certificate which expired on 2020-10-24.
+
+What's more unfortunate is that this GnuTLS derivation is somewhat special in
+Guix's dependency graph and is not affected by the package transformation flags
+like `--without-tests=`.
+
+The easiest solution for those encountering this problem is to install a newer
+version of Guix. However, there are ways to work around this issue:
+
+#### Workaround 1: Using substitutes for this single derivation
+
+If you've authorized the official Guix build farm's key (more info
+[here](./README.md#step-1-authorize-the-signing-keys)), then you can use
+substitutes just for this single derivation by invoking the following:
+
+```sh
+guix build --substitute-urls="https://ci.guix.gnu.org" /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv
+```
+
+See [this section](./README.md#removing-authorized-keys) for instructions on how
+to remove authorized keys if you don't want to keep the build farm's key
+authorized.
+
+#### Workaround 2: Temporarily setting the system clock back
+
+This workaround was described [here](https://issues.guix.gnu.org/44559#5).
+
+Basically:
+1. Turn off networking
+2. Turn off NTP
+3. Set system time to 2020-10-01
+4. guix build --no-substitutes /gnu/store/vhphki5sg9xkdhh2pbc8gi6vhpfzryf0-gnutls-3.6.12.drv
+5. Set system time back to accurate current time
+6. Turn NTP back on
+7. Turn networking back on
+
+### coreutils: FAIL: tests/tail-2/inotify-dir-recreate
+
+The inotify-dir-create test fails on "remote" filesystems such as overlayfs
+(Docker's default filesystem) due to the filesystem being mistakenly recognized
+as non-remote.
+
+A relatively easy workaround to this is to make sure that a somewhat traditional
+filesystem is mounted at `/tmp` (where `guix-daemon` performs its builds). For
+Docker users, this might mean [using a volume][docker/volumes], [binding
+mounting][docker/bind-mnt] from host, or (for those with enough RAM and swap)
+[mounting a tmpfs][docker/tmpfs] using the `--tmpfs` flag.
+
+Please see the following links for more details:
+
+- An upstream coreutils bug has been filed: [debbugs#47940](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47940)
+- A Guix bug detailing the underlying problem has been filed: [guix-issues#47935](https://issues.guix.gnu.org/47935)
+- A commit to skip this test in Guix has been merged into the core-updates branch:
+[savannah/guix@6ba1058](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6ba1058df0c4ce5611c2367531ae5c3cdc729ab4)
+
+
+[install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
+[install-bin-tarball]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
+[install-fanquake-docker]: #option-3-using-fanquakes-docker-image
+[install-distro-pkg]: #option-4-using-a-distribution-maintained-package
+[install-source]: #option-5-building-from-source
+
+[fix-argv0]: #creating-and-starting-a-guix-daemon-original-service-with-a-fixed-argv0
+[security-model]: ./README.md#choosing-your-security-model
+
+[docker/volumes]: https://docs.docker.com/storage/volumes/
+[docker/bind-mnt]: https://docs.docker.com/storage/bind-mounts/
+[docker/tmpfs]: https://docs.docker.com/storage/tmpfs/
--- /dev/null
+The MIT License (MIT)
+
+Copyright (c) 2009-2022 The Bitcoin Core developers
+Copyright (c) 2009-2022 Bitcoin Developers
+Copyright (c) 2022-2022 The Monero Project
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
--- /dev/null
+# Bootstrappable Feather Wallet Builds
+
+Significant portions of the code in this folder were copied from
+[Bitcoin Core](https://github.com/bitcoin/bitcoin/tree/master/contrib/guix).
+
+This directory contains the files necessary to perform bootstrappable Feather Wallet
+builds.
+
+[Bootstrappability][b17e] furthers our binary security guarantees by allowing us
+to _audit and reproduce_ our toolchain instead of blindly _trusting_ binary
+downloads.
+
+We achieve bootstrappability by using Guix as a functional package manager.
+
+# Requirements
+
+Conservatively, you will need an x86_64 machine with:
+
+- 16GB of free disk space on the partition that /gnu/store will reside in
+- 8GB of free disk space **per platform triple** you're planning on building
+ (see the `HOSTS` [environment variable description][env-vars-list])
+
+# Installation and Setup
+
+If you don't have Guix installed and set up, please follow the instructions in
+[INSTALL.md](./INSTALL.md)
+
+# Usage
+
+If you haven't considered your security model yet, please read [the relevant
+section](#choosing-your-security-model) before proceeding to perform a build.
+
+## Making the Xcode SDK available for macOS cross-compilation
+
+In order to perform a build for macOS (which is included in the default set of
+platform triples to build), you'll need to extract the macOS SDK tarball using
+tools found in the [`macdeploy` directory](../macdeploy/README.md).
+
+You can then either point to the SDK using the `SDK_PATH` environment variable:
+
+```sh
+# Extract the SDK tarball to /path/to/parent/dir/of/extracted/SDK/Xcode-<foo>-<bar>-extracted-SDK-with-libcxx-headers
+tar -C /path/to/parent/dir/of/extracted/SDK -xaf /path/to/Xcode-<foo>-<bar>-extracted-SDK-with-libcxx-headers.tar.gz
+
+# Indicate where to locate the SDK tarball
+export SDK_PATH=/path/to/parent/dir/of/extracted/SDK
+```
+
+or extract it into `depends/SDKs`:
+
+```sh
+mkdir -p depends/SDKs
+tar -C depends/SDKs -xaf /path/to/SDK/tarball
+```
+
+## Building
+
+*The author highly recommends at least reading over the [common usage patterns
+and examples](#common-guix-build-invocation-patterns-and-examples) section below
+before starting a build. For a full list of customization options, see the
+[recognized environment variables][env-vars-list] section.*
+
+To build Feather Wallet reproducibly with all default options, invoke the
+following from the top of a clean repository:
+
+```sh
+./contrib/guix/guix-build
+```
+
+## Cleaning intermediate work directories
+
+By default, `guix-build` leaves all intermediate files or "work directories"
+(e.g. `depends/work`, `guix-build-*/distsrc-*`) intact at the end of a build so
+that they are available to the user (to aid in debugging, etc.). However, these
+directories usually take up a large amount of disk space. Therefore, a
+`guix-clean` convenience script is provided which cleans the current `git`
+worktree to save disk space:
+
+```
+./contrib/guix/guix-clean
+```
+
+## Common `guix-build` invocation patterns and examples
+
+### Keeping caches and SDKs outside of the worktree
+
+If you perform a lot of builds and have a bunch of worktrees, you may find it
+more efficient to keep the depends tree's download cache, build cache, and SDKs
+outside of the worktrees to avoid duplicate downloads and unnecessary builds. To
+help with this situation, the `guix-build` script honours the `SOURCES_PATH`,
+`BASE_CACHE`, and `SDK_PATH` environment variables and will pass them on to the
+depends tree so that you can do something like:
+
+```sh
+env SOURCES_PATH="$HOME/depends-SOURCES_PATH" BASE_CACHE="$HOME/depends-BASE_CACHE" SDK_PATH="$HOME/macOS-SDKs" ./contrib/guix/guix-build
+```
+
+Note that the paths that these environment variables point to **must be
+directories**, and **NOT symlinks to directories**.
+
+See the [recognized environment variables][env-vars-list] section for more
+details.
+
+### Building a subset of platform triples
+
+Sometimes you only want to build a subset of the supported platform triples, in
+which case you can override the default list by setting the space-separated
+`HOSTS` environment variable:
+
+```sh
+env HOSTS='x86_64-w64-mingw32 x86_64-apple-darwin' ./contrib/guix/guix-build
+```
+
+See the [recognized environment variables][env-vars-list] section for more
+details.
+
+### Controlling the number of threads used by `guix` build commands
+
+Depending on your system's RAM capacity, you may want to decrease the number of
+threads used to decrease RAM usage or vice versa.
+
+By default, the scripts under `./contrib/guix` will invoke all `guix` build
+commands with `--cores="$JOBS"`. Note that `$JOBS` defaults to `$(nproc)` if not
+specified. However, astute manual readers will also notice that `guix` build
+commands also accept a `--max-jobs=` flag (which defaults to 1 if unspecified).
+
+Here is the difference between `--cores=` and `--max-jobs=`:
+
+> Note: When I say "derivation," think "package"
+
+`--cores=`
+
+ - controls the number of CPU cores to build each derivation. This is the value
+ passed to `make`'s `--jobs=` flag.
+
+`--max-jobs=`
+
+ - controls how many derivations can be built in parallel
+ - defaults to 1
+
+Therefore, the default is for `guix` build commands to build one derivation at a
+time, utilizing `$JOBS` threads.
+
+Specifying the `$JOBS` environment variable will only modify `--cores=`, but you
+can also modify the value for `--max-jobs=` by specifying
+`$ADDITIONAL_GUIX_COMMON_FLAGS`. For example, if you have a LOT of memory, you
+may want to set:
+
+```sh
+export ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=8'
+```
+
+Which allows for a maximum of 8 derivations to be built at the same time, each
+utilizing `$JOBS` threads.
+
+Or, if you'd like to avoid spurious build failures caused by issues with
+parallelism within a single package, but would still like to build multiple
+packages when the dependency graph allows for it, you may want to try:
+
+```sh
+export JOBS=1 ADDITIONAL_GUIX_COMMON_FLAGS='--max-jobs=8'
+```
+
+See the [recognized environment variables][env-vars-list] section for more
+details.
+
+## Recognized environment variables
+
+* _**HOSTS**_
+
+ Override the space-separated list of platform triples for which to perform a
+ bootstrappable build.
+
+ _(defaults to "x86\_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu
+ riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu
+ x86\_64-w64-mingw32 x86\_64-apple-darwin arm64-apple-darwin")_
+
+* _**SOURCES_PATH**_
+
+ Set the depends tree download cache for sources. This is passed through to the
+ depends tree. Setting this to the same directory across multiple builds of the
+ depends tree can eliminate unnecessary redownloading of package sources.
+
+ The path that this environment variable points to **must be a directory**, and
+ **NOT a symlink to a directory**.
+
+* _**BASE_CACHE**_
+
+ Set the depends tree cache for built packages. This is passed through to the
+ depends tree. Setting this to the same directory across multiple builds of the
+ depends tree can eliminate unnecessary building of packages.
+
+ The path that this environment variable points to **must be a directory**, and
+ **NOT a symlink to a directory**.
+
+* _**SDK_PATH**_
+
+ Set the path where _extracted_ SDKs can be found. This is passed through to
+ the depends tree. Note that this is should be set to the _parent_ directory of
+ the actual SDK (e.g. `SDK_PATH=$HOME/Downloads/macOS-SDKs` instead of
+ `$HOME/Downloads/macOS-SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers`).
+
+ The path that this environment variable points to **must be a directory**, and
+ **NOT a symlink to a directory**.
+
+* _**JOBS**_
+
+ Override the number of jobs to run simultaneously, you might want to do so on
+ a memory-limited machine. This may be passed to:
+
+ - `guix` build commands as in `guix environment --cores="$JOBS"`
+ - `make` as in `make --jobs="$JOBS"`
+ - `xargs` as in `xargs -P"$JOBS"`
+
+ See [here](#controlling-the-number-of-threads-used-by-guix-build-commands) for
+ more details.
+
+ _(defaults to the value of `nproc` outside the container)_
+
+* _**SOURCE_DATE_EPOCH**_
+
+ Override the reference UNIX timestamp used for bit-for-bit reproducibility,
+ the variable name conforms to [standard][r12e/source-date-epoch].
+
+ _(defaults to the output of `$(git log --format=%at -1)`)_
+
+* _**V**_
+
+ If non-empty, will pass `V=1` to all `make` invocations, making `make` output
+ verbose.
+
+ Note that any given value is ignored. The variable is only checked for
+ emptiness. More concretely, this means that `V=` (setting `V` to the empty
+ string) is interpreted the same way as not setting `V` at all, and that `V=0`
+ has the same effect as `V=1`.
+
+* _**SUBSTITUTE_URLS**_
+
+ A whitespace-delimited list of URLs from which to download pre-built packages.
+ A URL is only used if its signing key is authorized (refer to the [substitute
+ servers section](#option-1-building-with-substitutes) for more details).
+
+* _**ADDITIONAL_GUIX_COMMON_FLAGS**_
+
+ Additional flags to be passed to all `guix` commands.
+
+* _**ADDITIONAL_GUIX_TIMEMACHINE_FLAGS**_
+
+ Additional flags to be passed to `guix time-machine`.
+
+* _**ADDITIONAL_GUIX_ENVIRONMENT_FLAGS**_
+
+ Additional flags to be passed to the invocation of `guix environment` inside
+ `guix time-machine`.
+
+# Choosing your security model
+
+No matter how you installed Guix, you need to decide on your security model for
+building packages with Guix.
+
+Guix allows us to achieve better binary security by using our CPU time to build
+everything from scratch. However, it doesn't sacrifice user choice in pursuit of
+this: users can decide whether or not to use **substitutes** (pre-built
+packages).
+
+## Option 1: Building with substitutes
+
+### Step 1: Authorize the signing keys
+
+Depending on the installation procedure you followed, you may have already
+authorized the Guix build farm key. In particular, the official shell installer
+script asks you if you want the key installed, and the debian distribution
+package authorized the key during installation.
+
+You can check the current list of authorized keys at `/etc/guix/acl`.
+
+At the time of writing, a `/etc/guix/acl` with just the Guix build farm key
+authorized looks something like:
+
+```lisp
+(acl
+ (entry
+ (public-key
+ (ecc
+ (curve Ed25519)
+ (q #8D156F295D24B0D9A86FA5741A840FF2D24F60F7B6C4134814AD55625971B394#)
+ )
+ )
+ (tag
+ (guix import)
+ )
+ )
+ )
+```
+
+If you've determined that the official Guix build farm key hasn't been
+authorized, and you would like to authorize it, run the following as root:
+
+```
+guix archive --authorize < /var/guix/profiles/per-user/root/current-guix/share/guix/ci.guix.gnu.org.pub
+```
+
+If
+`/var/guix/profiles/per-user/root/current-guix/share/guix/ci.guix.gnu.org.pub`
+doesn't exist, try:
+
+```sh
+guix archive --authorize < <PREFIX>/share/guix/ci.guix.gnu.org.pub
+```
+
+Where `<PREFIX>` is likely:
+- `/usr` if you installed from a distribution package
+- `/usr/local` if you installed Guix from source and didn't supply any
+ prefix-modifying flags to Guix's `./configure`
+
+For dongcarl's substitute server at https://guix.carldong.io, run as root:
+
+```sh
+wget -qO- 'https://guix.carldong.io/signing-key.pub' | guix archive --authorize
+```
+
+#### Removing authorized keys
+
+To remove previously authorized keys, simply edit `/etc/guix/acl` and remove the
+`(entry (public-key ...))` entry.
+
+### Step 2: Specify the substitute servers
+
+Once its key is authorized, the official Guix build farm at
+https://ci.guix.gnu.org is automatically used unless the `--no-substitutes` flag
+is supplied. This default list of substitute servers is overridable both on a
+`guix-daemon` level and when you invoke `guix` commands. See examples below for
+the various ways of adding dongcarl's substitute server after having [authorized
+his signing key](#authorize-the-signing-keys).
+
+Change the **default list** of substitute servers by starting `guix-daemon` with
+the `--substitute-urls` option (you will likely need to edit your init script):
+
+```sh
+guix-daemon <cmd> --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org'
+```
+
+Override the default list of substitute servers by passing the
+`--substitute-urls` option for invocations of `guix` commands:
+
+```sh
+guix <cmd> --substitute-urls='https://guix.carldong.io https://ci.guix.gnu.org'
+```
+
+For scripts under `./contrib/guix`, set the `SUBSTITUTE_URLS` environment
+variable:
+
+```sh
+export SUBSTITUTE_URLS='https://guix.carldong.io https://ci.guix.gnu.org'
+```
+
+## Option 2: Disabling substitutes on an ad-hoc basis
+
+If you prefer not to use any substitutes, make sure to supply `--no-substitutes`
+like in the following snippet. The first build will take a while, but the
+resulting packages will be cached for future builds.
+
+For direct invocations of `guix`:
+```sh
+guix <cmd> --no-substitutes
+```
+
+For the scripts under `./contrib/guix/`:
+```sh
+export ADDITIONAL_GUIX_COMMON_FLAGS='--no-substitutes'
+```
+
+## Option 3: Disabling substitutes by default
+
+`guix-daemon` accepts a `--no-substitutes` flag, which will make sure that,
+unless otherwise overridden by a command line invocation, no substitutes will be
+used.
+
+If you start `guix-daemon` using an init script, you can edit said script to
+supply this flag.
+
+
+# Purging/Uninstalling Guix
+
+In the extraordinarily rare case where you messed up your Guix installation in
+an irreversible way, you may want to completely purge Guix from your system and
+start over.
+
+1. Uninstall Guix itself according to the way you installed it (e.g. `sudo apt
+ purge guix` for Ubuntu packaging, `sudo make uninstall` for a build from source).
+2. Remove all build users and groups
+
+ You may check for relevant users and groups using:
+
+ ```
+ getent passwd | grep guix
+ getent group | grep guix
+ ```
+
+ Then, you may remove users and groups using:
+
+ ```
+ sudo userdel <user>
+ sudo groupdel <group>
+ ```
+
+3. Remove all possible Guix-related directories
+ - `/var/guix/`
+ - `/var/log/guix/`
+ - `/gnu/`
+ - `/etc/guix/`
+ - `/home/*/.config/guix/`
+ - `/home/*/.cache/guix/`
+ - `/home/*/.guix-profile/`
+ - `/root/.config/guix/`
+ - `/root/.cache/guix/`
+ - `/root/.guix-profile/`
+
+[b17e]: https://bootstrappable.org/
+[r12e/source-date-epoch]: https://reproducible-builds.org/docs/source-date-epoch/
+
+[guix/install.sh]: https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
+[guix/bin-install]: https://www.gnu.org/software/guix/manual/en/html_node/Binary-Installation.html
+[guix/env-setup]: https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html
+[guix/substitutes]: https://www.gnu.org/software/guix/manual/en/html_node/Substitutes.html
+[guix/substitute-server-auth]: https://www.gnu.org/software/guix/manual/en/html_node/Substitute-Server-Authorization.html
+[guix/time-machine]: https://guix.gnu.org/manual/en/html_node/Invoking-guix-time_002dmachine.html
+
+[debian/guix-bullseye]: https://packages.debian.org/bullseye/guix
+[ubuntu/guix-hirsute]: https://packages.ubuntu.com/hirsute/guix
+[fanquake/guix-docker]: https://github.com/fanquake/core-review/tree/master/guix
+
+[env-vars-list]: #recognized-environment-variables
--- /dev/null
+#!/usr/bin/env bash
+export LC_ALL=C
+set -e -o pipefail
+
+# Source the common prelude, which:
+# 1. Checks if we're at the top directory of the Feather Wallet repository
+# 2. Defines a few common functions and variables
+#
+# shellcheck source=libexec/prelude.bash
+source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
+
+
+###################
+## SANITY CHECKS ##
+###################
+
+################
+# Required non-builtin commands should be invocable
+################
+
+check_tools cat mkdir make getent curl git guix
+
+################
+# GUIX_BUILD_OPTIONS should be empty
+################
+#
+# GUIX_BUILD_OPTIONS is an environment variable recognized by guix commands that
+# can perform builds. This seems like what we want instead of
+# ADDITIONAL_GUIX_COMMON_FLAGS, but the value of GUIX_BUILD_OPTIONS is actually
+# _appended_ to normal command-line options. Meaning that they will take
+# precedence over the command-specific ADDITIONAL_GUIX_<CMD>_FLAGS.
+#
+# This seems like a poor user experience. Thus we check for GUIX_BUILD_OPTIONS's
+# existence here and direct users of this script to use our (more flexible)
+# custom environment variables.
+if [ -n "$GUIX_BUILD_OPTIONS" ]; then
+cat << EOF
+Error: Environment variable GUIX_BUILD_OPTIONS is not empty:
+ '$GUIX_BUILD_OPTIONS'
+
+Unfortunately this script is incompatible with GUIX_BUILD_OPTIONS, please unset
+GUIX_BUILD_OPTIONS and use ADDITIONAL_GUIX_COMMON_FLAGS to set build options
+across guix commands or ADDITIONAL_GUIX_<CMD>_FLAGS to set build options for a
+specific guix command.
+
+See contrib/guix/README.md for more details.
+EOF
+exit 1
+fi
+
+################
+# The git worktree should not be dirty
+################
+
+if ! git diff-index --quiet HEAD -- && [ -z "$FORCE_DIRTY_WORKTREE" ]; then
+cat << EOF
+ERR: The current git worktree is dirty, which may lead to broken builds.
+
+ Aborting...
+
+Hint: To make your git worktree clean, You may want to:
+ 1. Commit your changes,
+ 2. Stash your changes, or
+ 3. Set the 'FORCE_DIRTY_WORKTREE' environment variable if you insist on
+ using a dirty worktree
+EOF
+exit 1
+fi
+
+mkdir -p "$VERSION_BASE"
+
+################
+# Build directories should not exist
+################
+
+# Default to building for all supported HOSTs (overridable by environment)
+export HOSTS="${HOSTS:-x86_64-linux-gnu x86_64-w64-mingw32 x86_64-apple-darwin}"
+
+# Usage: distsrc_for_host HOST
+#
+# HOST: The current platform triple we're building for
+#
+distsrc_for_host() {
+ echo "${DISTSRC_BASE}/distsrc-${VERSION}-${1}"
+}
+
+# Accumulate a list of build directories that already exist...
+hosts_distsrc_exists=""
+for host in $HOSTS; do
+ if [ -e "$(distsrc_for_host "$host")" ]; then
+ hosts_distsrc_exists+=" ${host}"
+ fi
+done
+
+if [ -n "$hosts_distsrc_exists" ]; then
+# ...so that we can print them out nicely in an error message
+cat << EOF
+ERR: Build directories for this commit already exist for the following platform
+ triples you're attempting to build, probably because of previous builds.
+ Please remove, or otherwise deal with them prior to starting another build.
+
+ Aborting...
+
+Hint: To blow everything away, you may want to use:
+
+ $ ./contrib/guix/guix-clean
+
+Specifically, this will remove all files without an entry in the index,
+excluding the SDK directory, the depends download cache, the depends built
+packages cache, the garbage collector roots for Guix environments, and the
+output directory.
+EOF
+for host in $hosts_distsrc_exists; do
+ echo " ${host} '$(distsrc_for_host "$host")'"
+done
+exit 1
+else
+ mkdir -p "$DISTSRC_BASE"
+fi
+
+################
+# When building for darwin, the macOS SDK should exist
+################
+
+for host in $HOSTS; do
+ case "$host" in
+ *darwin*)
+ OSX_SDK="$(make -C "${PWD}/contrib/depends" --no-print-directory HOST="$host" print-OSX_SDK | sed 's@^[^=]\+=@@g')"
+ if [ -e "$OSX_SDK" ]; then
+ echo "Found macOS SDK at '${OSX_SDK}', using..."
+ break
+ else
+ echo "macOS SDK does not exist at '${OSX_SDK}', please place the extracted, untarred SDK there to perform darwin builds, or define SDK_PATH environment variable. Exiting..."
+ exit 1
+ fi
+ ;;
+ esac
+done
+
+################
+# VERSION_BASE should have enough space
+################
+
+avail_KiB="$(df -Pk "$VERSION_BASE" | sed 1d | tr -s ' ' | cut -d' ' -f4)"
+total_required_KiB=0
+for host in $HOSTS; do
+ case "$host" in
+ *darwin*) required_KiB=440000 ;;
+ *mingw*) required_KiB=7600000 ;;
+ *) required_KiB=6400000 ;;
+ esac
+ total_required_KiB=$((total_required_KiB+required_KiB))
+done
+
+if (( total_required_KiB > avail_KiB )); then
+ total_required_GiB=$((total_required_KiB / 1048576))
+ avail_GiB=$((avail_KiB / 1048576))
+ echo "Performing a Feather Wallet Guix build for the selected HOSTS requires ${total_required_GiB} GiB, however, only ${avail_GiB} GiB is available. Please free up some disk space before performing the build."
+ exit 1
+fi
+
+################
+# Check that we can connect to the guix-daemon
+################
+
+cat << EOF
+Checking that we can connect to the guix-daemon...
+
+Hint: If this hangs, you may want to try turning your guix-daemon off and on
+ again.
+
+EOF
+if ! guix gc --list-failures > /dev/null; then
+cat << EOF
+
+ERR: Failed to connect to the guix-daemon, please ensure that one is running and
+ reachable.
+EOF
+exit 1
+fi
+
+# Developer note: we could use `guix repl` for this check and run:
+#
+# (import (guix store)) (close-connection (open-connection))
+#
+# However, the internal API is likely to change more than the CLI invocation
+
+################
+# Services database must have basic entries
+################
+
+if ! getent services http https ftp > /dev/null 2>&1; then
+cat << EOF
+ERR: Your system's C library cannot find service database entries for at least
+ one of the following services: http, https, ftp.
+
+Hint: Most likely, /etc/services does not exist yet (common for docker images
+ and minimal distros), or you don't have permissions to access it.
+
+ If /etc/services does not exist yet, you may want to install the
+ appropriate package for your distro which provides it.
+
+ On Debian/Ubuntu: netbase
+ On Arch Linux: iana-etc
+
+ For more information, see: getent(1), services(5)
+
+EOF
+
+fi
+
+#########
+# SETUP #
+#########
+
+# Determine the maximum number of jobs to run simultaneously (overridable by
+# environment)
+JOBS="${JOBS:-$(nproc)}"
+
+# Usage: host_to_commonname HOST
+#
+# HOST: The current platform triple we're building for
+#
+host_to_commonname() {
+ case "$1" in
+ *darwin*) echo osx ;;
+ *mingw*) echo win ;;
+ *linux*) echo linux ;;
+ *) exit 1 ;;
+ esac
+}
+
+# Determine the reference time used for determinism (overridable by environment)
+SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --format=%at -1)}"
+
+# Precious directories are those which should not be cleaned between successive
+# guix builds
+depends_precious_dir_names='SOURCES_PATH BASE_CACHE SDK_PATH'
+precious_dir_names="${depends_precious_dir_names} OUTDIR_BASE PROFILES_BASE"
+
+# Usage: contains IFS-SEPARATED-LIST ITEM
+contains() {
+ for i in ${1}; do
+ if [ "$i" = "${2}" ]; then
+ return 0 # Found!
+ fi
+ done
+ return 1
+}
+
+# If the user explicitly specified a precious directory, create it so we
+# can map it into the container
+for precious_dir_name in $precious_dir_names; do
+ precious_dir_path="${!precious_dir_name}"
+ if [ -n "$precious_dir_path" ]; then
+ if [ ! -e "$precious_dir_path" ]; then
+ mkdir -p "$precious_dir_path"
+ elif [ -L "$precious_dir_path" ]; then
+ echo "ERR: ${precious_dir_name} cannot be a symbolic link"
+ exit 1
+ elif [ ! -d "$precious_dir_path" ]; then
+ echo "ERR: ${precious_dir_name} must be a directory"
+ exit 1
+ fi
+ fi
+done
+
+mkdir -p "$VAR_BASE"
+
+# Record the _effective_ values of precious directories such that guix-clean can
+# avoid clobbering them if appropriate.
+#
+# shellcheck disable=SC2046,SC2086
+{
+ # Get depends precious dir definitions from depends
+ make -C "${PWD}/contrib/depends" \
+ --no-print-directory \
+ -- $(printf "print-%s\n" $depends_precious_dir_names)
+
+ # Get remaining precious dir definitions from the environment
+ for precious_dir_name in $precious_dir_names; do
+ precious_dir_path="${!precious_dir_name}"
+ if ! contains "$depends_precious_dir_names" "$precious_dir_name"; then
+ echo "${precious_dir_name}=${precious_dir_path}"
+ fi
+ done
+} > "${VAR_BASE}/precious_dirs"
+
+# Make sure an output directory exists for our builds
+OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
+mkdir -p "$OUTDIR_BASE"
+
+# Download the depends sources now as we won't have internet access in the build
+# container
+for host in $HOSTS; do
+ make -C "${PWD}/contrib/depends" -j"$JOBS" download-"$(host_to_commonname "$host")" ${V:+V=1} ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"}
+done
+
+# Usage: outdir_for_host HOST SUFFIX
+#
+# HOST: The current platform triple we're building for
+#
+outdir_for_host() {
+ echo "${OUTDIR_BASE}/${1}${2:+-${2}}"
+}
+
+# Usage: profiledir_for_host HOST SUFFIX
+#
+# HOST: The current platform triple we're building for
+#
+profiledir_for_host() {
+ echo "${PROFILES_BASE}/${1}${2:+-${2}}"
+}
+
+
+#########
+# BUILD #
+#########
+
+# Function to be called when building for host ${1} and the user interrupts the
+# build
+int_trap() {
+cat << EOF
+** INT received while building ${1}, you may want to clean up the relevant
+ work directories (e.g. distsrc-*) before rebuilding
+
+Hint: To blow everything away, you may want to use:
+
+ $ ./contrib/guix/guix-clean
+
+Specifically, this will remove all files without an entry in the index,
+excluding the SDK directory, the depends download cache, the depends built
+packages cache, the garbage collector roots for Guix environments, and the
+output directory.
+EOF
+}
+
+# Deterministically build Feather Wallet
+# shellcheck disable=SC2153
+for host in $HOSTS; do
+
+ # Display proper warning when the user interrupts the build
+ trap 'int_trap ${host}' INT
+
+ (
+ # Required for 'contrib/guix/manifest.scm' to output the right manifest
+ # for the particular $HOST we're building for
+ export HOST="$host"
+
+ # shellcheck disable=SC2030
+cat << EOF
+INFO: Building ${VERSION:?not set} for platform triple ${HOST:?not set}:
+ ...using reference timestamp: ${SOURCE_DATE_EPOCH:?not set}
+ ...running at most ${JOBS:?not set} jobs
+ ...from worktree directory: '${PWD}'
+ ...bind-mounted in container to: '/feather'
+ ...in build directory: '$(distsrc_for_host "$HOST")'
+ ...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")'
+ ...outputting in: '$(outdir_for_host "$HOST")'
+ ...bind-mounted in container to: '$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")'
+EOF
+
+ # Run the build script 'contrib/guix/libexec/build.sh' in the build
+ # container specified by 'contrib/guix/manifest.scm'.
+ #
+ # Explanation of `guix environment` flags:
+ #
+ # --container run command within an isolated container
+ #
+ # Running in an isolated container minimizes build-time differences
+ # between machines and improves reproducibility
+ #
+ # --pure unset existing environment variables
+ #
+ # Same rationale as --container
+ #
+ # --no-cwd do not share current working directory with an
+ # isolated container
+ #
+ # When --container is specified, the default behavior is to share
+ # the current working directory with the isolated container at the
+ # same exact path (e.g. mapping '/home/user/feather/' to
+ # '/home/user/feather/'). This means that the $PWD inside the
+ # container becomes a source of irreproducibility. --no-cwd disables
+ # this behaviour.
+ #
+ # --share=SPEC for containers, share writable host file system
+ # according to SPEC
+ #
+ # --share="$PWD"=/feather
+ #
+ # maps our current working directory to /feather
+ # inside the isolated container, which we later cd
+ # into.
+ #
+ # While we don't want to map our current working directory to the
+ # same exact path (as this introduces irreproducibility), we do want
+ # it to be at a _fixed_ path _somewhere_ inside the isolated
+ # container so that we have something to build. '/feather' was
+ # chosen arbitrarily.
+ #
+ # ${SOURCES_PATH:+--share="$SOURCES_PATH"}
+ #
+ # make the downloaded depends sources path available
+ # inside the isolated container
+ #
+ # The isolated container has no network access as it's in a
+ # different network namespace from the main machine, so we have to
+ # make the downloaded depends sources available to it. The sources
+ # should have been downloaded prior to this invocation.
+ #
+ # --keep-failed keep build tree of failed builds
+ #
+ # When builds of the Guix environment itself (not Feather Wallet)
+ # fail, it is useful for the build tree to be kept for debugging
+ # purposes.
+ #
+ # ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"}
+ #
+ # fetch substitute from SUBSTITUTE_URLS if they are
+ # authorized
+ #
+ # Depending on the user's security model, it may be desirable to use
+ # substitutes (pre-built packages) from servers that the user trusts.
+ # Please read the README.md in the same directory as this file for
+ # more information.
+ #
+ # shellcheck disable=SC2086,SC2031
+ time-machine environment --manifest="${PWD}/contrib/guix/manifest.scm" \
+ --container \
+ --pure \
+ --no-cwd \
+ --share="$PWD"=/feather \
+ --share="$DISTSRC_BASE"=/distsrc-base \
+ --share="$OUTDIR_BASE"=/outdir-base \
+ --expose="$(git rev-parse --git-common-dir)" \
+ ${SOURCES_PATH:+--share="$SOURCES_PATH"} \
+ ${BASE_CACHE:+--share="$BASE_CACHE"} \
+ ${SDK_PATH:+--share="$SDK_PATH"} \
+ --cores="$JOBS" \
+ --keep-failed \
+ --fallback \
+ --link-profile \
+ --root="$(profiledir_for_host "${HOST}")" \
+ ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
+ ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
+ -- env HOST="$host" \
+ DISTNAME="$DISTNAME" \
+ JOBS="$JOBS" \
+ SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:?unable to determine value}" \
+ ${V:+V=1} \
+ ${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \
+ ${BASE_CACHE:+BASE_CACHE="$BASE_CACHE"} \
+ ${SDK_PATH:+SDK_PATH="$SDK_PATH"} \
+ DISTSRC="$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")" \
+ OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")" \
+ DIST_ARCHIVE_BASE=/outdir-base/dist-archive \
+ bash -c "cd /feather && bash contrib/guix/libexec/build.sh"
+ )
+
+done
--- /dev/null
+#!/usr/bin/env bash
+export LC_ALL=C
+set -e -o pipefail
+
+# Source the common prelude, which:
+# 1. Checks if we're at the top directory of the Feather Wallet repository
+# 2. Defines a few common functions and variables
+#
+# shellcheck source=libexec/prelude.bash
+source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
+
+
+###################
+## Sanity Checks ##
+###################
+
+################
+# Required non-builtin commands should be invokable
+################
+
+check_tools cat mkdir make git guix
+
+
+#############
+## Clean ##
+#############
+
+# Usage: under_dir MAYBE_PARENT MAYBE_CHILD
+#
+# If MAYBE_CHILD is a subdirectory of MAYBE_PARENT, print the relative path
+# from MAYBE_PARENT to MAYBE_CHILD. Otherwise, return 1 as the error code.
+#
+# NOTE: This does not perform any symlink-resolving or path canonicalization.
+#
+under_dir() {
+ local path_residue
+ path_residue="${2##"${1}"}"
+ if [ -z "$path_residue" ] || [ "$path_residue" = "$2" ]; then
+ return 1
+ else
+ echo "$path_residue"
+ fi
+}
+
+# Usage: dir_under_git_root MAYBE_CHILD
+#
+# If MAYBE_CHILD is under the current git repository and exists, print the
+# relative path from the git repository's top-level directory to MAYBE_CHILD,
+# otherwise, exit with an error code.
+#
+dir_under_git_root() {
+ local rv
+ rv="$(under_dir "$(git_root)" "$1")"
+ [ -n "$rv" ] && echo "$rv"
+}
+
+shopt -s nullglob
+found_precious_dirs_files=( "${version_base_prefix}"*/"${var_base_basename}/precious_dirs" ) # This expands to an array of directories...
+shopt -u nullglob
+
+exclude_flags=()
+
+for precious_dirs_file in "${found_precious_dirs_files[@]}"; do
+ # Make sure the precious directories (e.g. SOURCES_PATH, BASE_CACHE, SDK_PATH)
+ # are excluded from git-clean
+ echo "Found precious_dirs file: '${precious_dirs_file}'"
+
+ # Exclude the precious_dirs file itself
+ if dirs_file_exclude_fragment=$(dir_under_git_root "$(dirname "$precious_dirs_file")"); then
+ exclude_flags+=( --exclude="${dirs_file_exclude_fragment}/precious_dirs" )
+ fi
+
+ # Read each 'name=dir' pair from the precious_dirs file
+ while IFS='=' read -r name dir; do
+ # Add an exclusion flag if the precious directory is under the git root.
+ if under=$(dir_under_git_root "$dir"); then
+ echo "Avoiding ${name}: ${under}"
+ exclude_flags+=( --exclude="$under" )
+ fi
+ done < "$precious_dirs_file"
+done
+
+git clean -xdff "${exclude_flags[@]}"
--- /dev/null
+#!/usr/bin/env bash
+# Copyright (c) 2019-2021 The Bitcoin Core developers
+# Copyright (c) 2022-2022 The Monero Project
+# Distributed under the MIT software license, see the accompanying
+# file ../LICENSE.txt or http://www.opensource.org/licenses/mit-license.php.
+export LC_ALL=C
+set -e -o pipefail
+export TZ=UTC
+
+# Although Guix _does_ set umask when building its own packages (in our case,
+# this is all packages in manifest.scm), it does not set it for `guix
+# environment`. It does make sense for at least `guix environment --container`
+# to set umask, so if that change gets merged upstream and we bump the
+# time-machine to a commit which includes the aforementioned change, we can
+# remove this line.
+#
+# This line should be placed before any commands which creates files.
+umask 0022
+
+if [ -n "$V" ]; then
+ # Print both unexpanded (-v) and expanded (-x) forms of commands as they are
+ # read from this file.
+ set -vx
+ # Set VERBOSE for CMake-based builds
+ export VERBOSE="$V"
+fi
+
+# Check that required environment variables are set
+cat << EOF
+Required environment variables as seen inside the container:
+ DIST_ARCHIVE_BASE: ${DIST_ARCHIVE_BASE:?not set}
+ DISTNAME: ${DISTNAME:?not set}
+ HOST: ${HOST:?not set}
+ SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH:?not set}
+ JOBS: ${JOBS:?not set}
+ DISTSRC: ${DISTSRC:?not set}
+ OUTDIR: ${OUTDIR:?not set}
+EOF
+
+ACTUAL_OUTDIR="${OUTDIR}"
+OUTDIR="${DISTSRC}/output"
+
+#####################
+# Environment Setup #
+#####################
+
+# The depends folder also serves as a base-prefix for depends packages for
+# $HOSTs after successfully building.
+BASEPREFIX="${PWD}/contrib/depends"
+
+# Given a package name and an output name, return the path of that output in our
+# current guix environment
+store_path() {
+ grep --extended-regexp "/[^-]{32}-${1}-[^-]+${2:+-${2}}" "${GUIX_ENVIRONMENT}/manifest" \
+ | head --lines=1 \
+ | sed --expression='s|^[[:space:]]*"||' \
+ --expression='s|"[[:space:]]*$||'
+}
+
+
+# Set environment variables to point the NATIVE toolchain to the right
+# includes/libs
+NATIVE_GCC="$(store_path gcc-toolchain)"
+NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
+
+unset LIBRARY_PATH
+unset CPATH
+unset C_INCLUDE_PATH
+unset CPLUS_INCLUDE_PATH
+unset OBJC_INCLUDE_PATH
+unset OBJCPLUS_INCLUDE_PATH
+
+export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64:${NATIVE_GCC_STATIC}/lib:${NATIVE_GCC_STATIC}/lib64"
+export C_INCLUDE_PATH="${NATIVE_GCC}/include"
+export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
+export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include"
+export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
+
+prepend_to_search_env_var() {
+ export "${1}=${2}${!1:+:}${!1}"
+}
+
+# Set environment variables to point the CROSS toolchain to the right
+# includes/libs for $HOST
+case "$HOST" in
+ *mingw*)
+ # Determine output paths to use in CROSS_* environment variables
+ CROSS_GLIBC="$(store_path "mingw-w64-x86_64-winpthreads")"
+ CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
+ CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)"
+ CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
+ CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
+
+ # The search path ordering is generally:
+ # 1. gcc-related search paths
+ # 2. libc-related search paths
+ # 2. kernel-header-related search paths (not applicable to mingw-w64 hosts)
+ export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include"
+ export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
+ export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
+ ;;
+ *darwin*)
+ # The CROSS toolchain for darwin uses the SDK and ignores environment variables.
+ # See depends/hosts/darwin.mk for more details.
+ ;;
+ *linux*)
+ CROSS_GLIBC="$(store_path "glibc-cross-${HOST}")"
+ CROSS_GLIBC_STATIC="$(store_path "glibc-cross-${HOST}" static)"
+ CROSS_KERNEL="$(store_path "linux-libre-headers-cross-${HOST}")"
+ CROSS_GCC="$(store_path "gcc-cross-${HOST}")"
+ CROSS_GCC_LIB_STORE="$(store_path "gcc-cross-${HOST}" lib)"
+ CROSS_GCC_LIBS=( "${CROSS_GCC_LIB_STORE}/lib/gcc/${HOST}"/* ) # This expands to an array of directories...
+ CROSS_GCC_LIB="${CROSS_GCC_LIBS[0]}" # ...we just want the first one (there should only be one)
+
+ export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include:${CROSS_KERNEL}/include"
+ export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
+ export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib:${CROSS_GLIBC_STATIC}/lib"
+ ;;
+ *)
+ exit 1 ;;
+esac
+
+# Sanity check CROSS_*_PATH directories
+IFS=':' read -ra PATHS <<< "${CROSS_C_INCLUDE_PATH}:${CROSS_CPLUS_INCLUDE_PATH}:${CROSS_LIBRARY_PATH}"
+for p in "${PATHS[@]}"; do
+ if [ -n "$p" ] && [ ! -d "$p" ]; then
+ echo "'$p' doesn't exist or isn't a directory... Aborting..."
+ exit 1
+ fi
+done
+
+# Disable Guix ld auto-rpath behavior
+case "$HOST" in
+ *darwin*)
+ # The auto-rpath behavior is necessary for darwin builds as some native
+ # tools built by depends refer to and depend on Guix-built native
+ # libraries
+ #
+ # After the native packages in depends are built, the ld wrapper should
+ # no longer affect our build, as clang would instead reach for
+ # x86_64-apple-darwin-ld from cctools
+ ;;
+ *) export GUIX_LD_WRAPPER_DISABLE_RPATH=yes ;;
+esac
+
+# Make /usr/bin if it doesn't exist
+[ -e /usr/bin ] || mkdir -p /usr/bin
+
+# Symlink file and env to a conventional path
+[ -e /usr/bin/file ] || ln -s --no-dereference "$(command -v file)" /usr/bin/file
+[ -e /usr/bin/env ] || ln -s --no-dereference "$(command -v env)" /usr/bin/env
+
+# Determine the correct value for -Wl,--dynamic-linker for the current $HOST
+case "$HOST" in
+ *linux*)
+ glibc_dynamic_linker=$(
+ case "$HOST" in
+ x86_64-linux-gnu) echo /lib64/ld-linux-x86-64.so.2 ;;
+ arm-linux-gnueabihf) echo /lib/ld-linux-armhf.so.3 ;;
+ aarch64-linux-gnu) echo /lib/ld-linux-aarch64.so.1 ;;
+ riscv64-linux-gnu) echo /lib/ld-linux-riscv64-lp64d.so.1 ;;
+ powerpc64-linux-gnu) echo /lib64/ld64.so.1;;
+ powerpc64le-linux-gnu) echo /lib64/ld64.so.2;;
+ *) exit 1 ;;
+ esac
+ )
+ ;;
+esac
+
+# Environment variables for determinism
+export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name"
+export TZ="UTC"
+case "$HOST" in
+ *darwin*)
+ # cctools AR, unlike GNU binutils AR, does not have a deterministic mode
+ # or a configure flag to enable determinism by default, it only
+ # understands if this env-var is set or not. See:
+ #
+ # https://github.com/tpoechtrager/cctools-port/blob/55562e4073dea0fbfd0b20e0bf69ffe6390c7f97/cctools/ar/archive.c#L334
+ export ZERO_AR_DATE=yes
+ ;;
+esac
+
+####################
+# Depends Building #
+####################
+
+# Build the depends tree, overriding variables that assume multilib gcc
+make -C contrib/depends --jobs="$JOBS" HOST="$HOST" \
+ ${V:+V=1} \
+ ${SOURCES_PATH+SOURCES_PATH="$SOURCES_PATH"} \
+ ${BASE_CACHE+BASE_CACHE="$BASE_CACHE"} \
+ ${SDK_PATH+SDK_PATH="$SDK_PATH"} \
+ x86_64_linux_CC=x86_64-linux-gnu-gcc \
+ x86_64_linux_CXX=x86_64-linux-gnu-g++ \
+ x86_64_linux_AR=x86_64-linux-gnu-ar \
+ x86_64_linux_RANLIB=x86_64-linux-gnu-ranlib \
+ x86_64_linux_NM=x86_64-linux-gnu-nm \
+ x86_64_linux_STRIP=x86_64-linux-gnu-strip \
+ qt_config_opts_x86_64_linux='-platform linux-g++ -xplatform bitcoin-linux-g++' \
+ FORCE_USE_SYSTEM_CLANG=1
+
+
+###########################
+# Source Tarball Building #
+###########################
+
+GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}.tar.gz"
+
+# Create the source tarball if not already there
+if [ ! -e "$GIT_ARCHIVE" ]; then
+ mkdir -p "$(dirname "$GIT_ARCHIVE")"
+ git-archive-all --include=monero/src/device_trezor/trezor/messages --prefix="${DISTNAME}/" "$GIT_ARCHIVE"
+fi
+
+mkdir -p "$OUTDIR"
+
+###########################
+# Binary Tarball Building #
+###########################
+
+# CONFIGFLAGS
+CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary"
+
+# CFLAGS
+HOST_CFLAGS="-O2 -g"
+case "$HOST" in
+ *linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;;
+ *mingw*) HOST_CFLAGS+=" -fno-ident" ;;
+ *darwin*) unset HOST_CFLAGS ;;
+esac
+
+# CXXFLAGS
+HOST_CXXFLAGS="$HOST_CFLAGS"
+
+case "$HOST" in
+ arm-linux-gnueabihf) HOST_CXXFLAGS="${HOST_CXXFLAGS} -Wno-psabi" ;;
+esac
+
+# LDFLAGS
+case "$HOST" in
+ *linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++ -Wl,-O2" ;;
+ *mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
+esac
+
+# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.18, by
+# avoiding a PowerPC64 optimisation available in glibc 2.22 and later.
+# https://sourceware.org/binutils/docs-2.35/ld/PowerPC64-ELF64.html
+case "$HOST" in
+ *powerpc64*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,--no-tls-get-addr-optimize" ;;
+esac
+
+case "$HOST" in
+ powerpc64-linux-*|riscv64-linux-*) HOST_LDFLAGS="${HOST_LDFLAGS} -Wl,-z,noexecstack" ;;
+esac
+
+# Make $HOST-specific native binaries from depends available in $PATH
+export PATH="${BASEPREFIX}/${HOST}/native/bin:/gnu/store:${PATH}"
+mkdir -p "$DISTSRC"
+(
+ cd "$DISTSRC"
+
+ # Extract the source tarball
+ tar --strip-components=1 -xf "${GIT_ARCHIVE}"
+
+ # Build Feather Wallet
+ make --jobs="$JOBS" guix target=$HOST
+
+ mkdir -p "$OUTDIR"
+
+ # Setup the directory where our Feather Wallet build for HOST will be
+ # installed. This directory will also later serve as the input for our
+ # binary tarballs.
+ INSTALLPATH="${PWD}/installed/${DISTNAME}"
+ mkdir -p "${INSTALLPATH}"
+ # Install built Feather Wallet to $INSTALLPATH
+
+
+ cp -a build/ "$ACTUAL_OUTDIR"
+) # $DISTSRC
+
+#rm -rf "$ACTUAL_OUTDIR"
+#mv --no-target-directory "$OUTDIR" "$ACTUAL_OUTDIR" \
+# || ( rm -rf "$ACTUAL_OUTDIR" && exit 1 )
+#
+#(
+# cd /outdir-base
+# {
+# echo "$GIT_ARCHIVE"
+# find "$ACTUAL_OUTDIR" -type f
+# } | xargs realpath --relative-base="$PWD" \
+# | xargs sha256sum \
+# | sort -k2 \
+# | sponge "$ACTUAL_OUTDIR"/SHA256SUMS.part
+#)
--- /dev/null
+#!/usr/bin/env bash
+export LC_ALL=C
+set -e -o pipefail
+
+# shellcheck source=contrib/shell/realpath.bash
+source contrib/shell/realpath.bash
+
+# shellcheck source=contrib/shell/git-utils.bash
+source contrib/shell/git-utils.bash
+
+################
+# Required non-builtin commands should be invocable
+################
+
+check_tools() {
+ for cmd in "$@"; do
+ if ! command -v "$cmd" > /dev/null 2>&1; then
+ echo "ERR: This script requires that '$cmd' is installed and available in your \$PATH"
+ exit 1
+ fi
+ done
+}
+
+check_tools cat env readlink dirname basename git
+
+################
+# We should be at the top directory of the repository
+################
+
+same_dir() {
+ local resolved1 resolved2
+ resolved1="$(bash_realpath "${1}")"
+ resolved2="$(bash_realpath "${2}")"
+ [ "$resolved1" = "$resolved2" ]
+}
+
+if ! same_dir "${PWD}" "$(git_root)"; then
+cat << EOF
+ERR: This script must be invoked from the top level of the git repository
+
+Hint: This may look something like:
+ env FOO=BAR ./contrib/guix/guix-<blah>
+
+EOF
+exit 1
+fi
+
+################
+# Execute "$@" in a pinned, possibly older version of Guix, for reproducibility
+# across time.
+time-machine() {
+ # shellcheck disable=SC2086
+ guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
+ --commit=998eda3067c7d21e0d9bb3310d2f5a14b8f1c681 \
+ --cores="$JOBS" \
+ --keep-failed \
+ --fallback \
+ ${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
+ ${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_TIMEMACHINE_FLAGS} \
+ -- "$@"
+}
+
+
+################
+# Set common variables
+################
+
+VERSION="${FORCE_VERSION:-$(git_head_version)}"
+DISTNAME="${DISTNAME:-feather-${VERSION}}"
+
+version_base_prefix="${PWD}/guix-build-"
+VERSION_BASE="${version_base_prefix}${VERSION}" # TOP
+
+DISTSRC_BASE="${DISTSRC_BASE:-${VERSION_BASE}}"
+
+OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
+
+var_base_basename="var"
+VAR_BASE="${VAR_BASE:-${VERSION_BASE}/${var_base_basename}}"
+
+profiles_base_basename="profiles"
+PROFILES_BASE="${PROFILES_BASE:-${VAR_BASE}/${profiles_base_basename}}"
--- /dev/null
+(use-modules (gnu)
+ (gnu packages)
+ (gnu packages autotools)
+ (gnu packages base)
+ (gnu packages bash)
+ (gnu packages bison)
+ (gnu packages certs)
+ (gnu packages cdrom)
+ (gnu packages check)
+ (gnu packages cmake)
+ (gnu packages commencement)
+ (gnu packages compression)
+ (gnu packages cross-base)
+ (gnu packages curl)
+ (gnu packages file)
+ (gnu packages gawk)
+ (gnu packages gcc)
+ (gnu packages gettext)
+ (gnu packages gnome)
+ (gnu packages gperf)
+ (gnu packages installers)
+ (gnu packages linux)
+ (gnu packages llvm)
+ (gnu packages mingw)
+ (gnu packages moreutils)
+ (gnu packages perl)
+ (gnu packages pkg-config)
+ (gnu packages python)
+ (gnu packages python-crypto)
+ (gnu packages python-web)
+ (gnu packages shells)
+ (gnu packages tls)
+ (gnu packages version-control)
+ (guix build-system gnu)
+ (guix build-system python)
+ (guix build-system trivial)
+ (guix download)
+ (guix gexp)
+ (guix git-download)
+ ((guix licenses) #:prefix license:)
+ (guix packages)
+ (guix profiles)
+ (guix utils))
+
+(define-syntax-rule (search-our-patches file-name ...)
+ "Return the list of absolute file names corresponding to each
+FILE-NAME found in ./patches relative to the current file."
+ (parameterize
+ ((%patch-path (list (string-append (dirname (current-filename)) "/patches"))))
+ (list (search-patch file-name) ...)))
+
+;(define (make-ssp-fixed-gcc xgcc)
+; "Given a XGCC package, return a modified package that uses the SSP function
+;from glibc instead of from libssp.so. Our `symbol-check' script will complain if
+;we link against libssp.so, and thus will ensure that this works properly.
+;
+;Taken from:
+;http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
+; (package
+; (inherit xgcc)
+; (arguments
+; (substitute-keyword-arguments (package-arguments xgcc)
+; ((#:make-flags flags)
+; `(cons "gcc_cv_libc_provides_ssp=yes" ,flags))))))
+
+(define (make-gcc-rpath-link xgcc)
+ "Given a XGCC package, return a modified package that replace each instance of
+-rpath in the default system spec that's inserted by Guix with -rpath-link"
+ (package
+ (inherit xgcc)
+ (arguments
+ (substitute-keyword-arguments (package-arguments xgcc)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'pre-configure 'replace-rpath-with-rpath-link
+ (lambda _
+ (substitute* (cons "gcc/config/rs6000/sysv4.h"
+ (find-files "gcc/config"
+ "^gnu-user.*\\.h$"))
+ (("-rpath=") "-rpath-link="))
+ #t))))))))
+
+(define (make-cross-toolchain target
+ base-gcc-for-libc
+ base-kernel-headers
+ base-libc
+ base-gcc)
+ "Create a cross-compilation toolchain package for TARGET"
+ (let* ((xbinutils (cross-binutils target))
+ ;; 1. Build a cross-compiling gcc without targeting any libc, derived
+ ;; from BASE-GCC-FOR-LIBC
+ (xgcc-sans-libc (cross-gcc target
+ #:xgcc base-gcc-for-libc
+ #:xbinutils xbinutils))
+ ;; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived
+ ;; from BASE-KERNEL-HEADERS
+ (xkernel (cross-kernel-headers target
+ base-kernel-headers
+ xgcc-sans-libc
+ xbinutils))
+ ;; 3. Build a cross-compiled libc with XGCC-SANS-LIBC and XKERNEL,
+ ;; derived from BASE-LIBC
+ (xlibc (cross-libc target
+ base-libc
+ xgcc-sans-libc
+ xbinutils
+ xkernel))
+ ;; 4. Build a cross-compiling gcc targeting XLIBC, derived from
+ ;; BASE-GCC
+ (xgcc (cross-gcc target
+ #:xgcc base-gcc
+ #:xbinutils xbinutils
+ #:libc xlibc)))
+ ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
+ ;; XGCC
+ (package
+ (name (string-append target "-toolchain"))
+ (version (package-version xgcc))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments '(#:builder (begin (mkdir %output) #t)))
+ (propagated-inputs
+ `(("binutils" ,xbinutils)
+ ("libc" ,xlibc)
+ ("libc:static" ,xlibc "static")
+ ("gcc" ,xgcc)
+ ("gcc-lib" ,xgcc "lib")))
+ (synopsis (string-append "Complete GCC tool chain for " target))
+ (description (string-append "This package provides a complete GCC tool
+chain for " target " development."))
+ (home-page (package-home-page xgcc))
+ (license (package-license xgcc)))))
+
+(define base-gcc gcc-10)
+(define base-linux-kernel-headers linux-libre-headers-5.15)
+
+;; https://gcc.gnu.org/install/configure.html
+(define (hardened-gcc gcc)
+ (package-with-extra-configure-variable (
+ package-with-extra-configure-variable gcc
+ "--enable-default-ssp" "yes")
+ "--enable-default-pie" "yes"))
+
+(define* (make-bitcoin-cross-toolchain target
+ #:key
+ (base-gcc-for-libc base-gcc)
+ (base-kernel-headers base-linux-kernel-headers)
+ (base-libc (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.24)))
+ (base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
+ "Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
+desirable for building Feather Wallet release binaries."
+ (make-cross-toolchain target
+ base-gcc-for-libc
+ base-kernel-headers
+ base-libc
+ base-gcc))
+
+(define (make-gcc-with-pthreads gcc)
+ (package-with-extra-configure-variable gcc "--enable-threads" "posix"))
+
+(define (make-mingw-w64-cross-gcc cross-gcc)
+ (package-with-extra-patches cross-gcc
+ (search-our-patches "vmov-alignment.patch"
+ "gcc-broken-longjmp.patch")))
+
+(define (make-mingw-pthreads-cross-toolchain target)
+ "Create a cross-compilation toolchain package for TARGET"
+ (let* ((xbinutils (cross-binutils target))
+ (pthreads-xlibc mingw-w64-x86_64-winpthreads)
+ (pthreads-xgcc (make-gcc-with-pthreads
+ (cross-gcc target
+ #:xgcc (make-mingw-w64-cross-gcc base-gcc)
+ #:xbinutils xbinutils
+ #:libc pthreads-xlibc))))
+ ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
+ ;; XGCC
+ (package
+ (name (string-append target "-posix-toolchain"))
+ (version (package-version pthreads-xgcc))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments '(#:builder (begin (mkdir %output) #t)))
+ (propagated-inputs
+ `(("binutils" ,xbinutils)
+ ("libc" ,pthreads-xlibc)
+ ("gcc" ,pthreads-xgcc)
+ ("gcc-lib" ,pthreads-xgcc "lib")))
+ (synopsis (string-append "Complete GCC tool chain for " target))
+ (description (string-append "This package provides a complete GCC tool
+chain for " target " development."))
+ (home-page (package-home-page pthreads-xgcc))
+ (license (package-license pthreads-xgcc)))))
+
+(define (make-nsis-for-gcc-10 base-nsis)
+ (package-with-extra-patches base-nsis
+ (search-our-patches "nsis-gcc-10-memmove.patch")))
+
+(define-public lief
+ (package
+ (name "python-lief")
+ (version "0.12.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lief-project/LIEF.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "026jchj56q25v6gc0754dj9cj5hz5zaza8ij93y5ga94w20kzm9q"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("cmake" ,cmake)))
+ (home-page "https://github.com/lief-project/LIEF")
+ (synopsis "Library to Instrument Executable Formats")
+ (description "Python library to to provide a cross platform library which can
+parse, modify and abstract ELF, PE and MachO formats.")
+ (license license:asl2.0)))
+
+(define osslsigncode
+ (package
+ (name "osslsigncode")
+ (version "2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/mtrojnar/"
+ name "/archive/" version ".tar.gz"))
+ (sha256
+ (base32
+ "0byri6xny770wwb2nciq44j5071122l14bvv65axdd70nfjf0q2s"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (inputs
+ `(("openssl" ,openssl)))
+ (arguments
+ `(#:configure-flags
+ `("--without-gsf"
+ "--without-curl"
+ "--disable-dependency-tracking")))
+ (home-page "https://github.com/mtrojnar/osslsigncode")
+ (synopsis "Authenticode signing and timestamping tool")
+ (description "osslsigncode is a small tool that implements part of the
+functionality of the Microsoft tool signtool.exe - more exactly the Authenticode
+signing and timestamping. But osslsigncode is based on OpenSSL and cURL, and
+thus should be able to compile on most platforms where these exist.")
+ (license license:gpl3+))) ; license is with openssl exception
+
+(define-public python-elfesteem
+ (let ((commit "87bbd79ab7e361004c98cc8601d4e5f029fd8bd5"))
+ (package
+ (name "python-elfesteem")
+ (version (git-version "0.1" "1" commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/LRGH/elfesteem")
+ (commit commit)))
+ (file-name (git-file-name name commit))
+ (sha256
+ (base32
+ "1nyvjisvyxyxnd0023xjf5846xd03lwawp5pfzr8vrky7wwm5maz"))
+ (patches (search-our-patches "elfsteem-value-error-python-39.patch"))))
+ (build-system python-build-system)
+ ;; There are no tests, but attempting to run python setup.py test leads to
+ ;; PYTHONPATH problems, just disable the test
+ (arguments '(#:tests? #f))
+ (home-page "https://github.com/LRGH/elfesteem")
+ (synopsis "ELF/PE/Mach-O parsing library")
+ (description "elfesteem parses ELF, PE and Mach-O files.")
+ (license license:lgpl2.1))))
+
+(define-public python-oscrypto
+ (package
+ (name "python-oscrypto")
+ (version "1.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wbond/oscrypto")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1d4d8s4z340qhvb3g5m5v3436y3a71yc26wk4749q64m09kxqc3l"))
+ (patches (search-our-patches "oscrypto-hard-code-openssl.patch"))))
+ (build-system python-build-system)
+ (native-search-paths
+ (list (search-path-specification
+ (variable "SSL_CERT_FILE")
+ (file-type 'regular)
+ (separator #f) ;single entry
+ (files '("etc/ssl/certs/ca-certificates.crt")))))
+
+ (propagated-inputs
+ `(("python-asn1crypto" ,python-asn1crypto)
+ ("openssl" ,openssl)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'hard-code-path-to-libscrypt
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((openssl (assoc-ref inputs "openssl")))
+ (substitute* "oscrypto/__init__.py"
+ (("@GUIX_OSCRYPTO_USE_OPENSSL@")
+ (string-append openssl "/lib/libcrypto.so" "," openssl "/lib/libssl.so")))
+ #t)))
+ (add-after 'unpack 'disable-broken-tests
+ (lambda _
+ ;; This test is broken as there is no keyboard interrupt.
+ (substitute* "tests/test_trust_list.py"
+ (("^(.*)class TrustListTests" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ (substitute* "tests/test_tls.py"
+ (("^(.*)class TLSTests" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "python" "run.py" "tests")
+ #t)))))
+ (home-page "https://github.com/wbond/oscrypto")
+ (synopsis "Compiler-free Python crypto library backed by the OS")
+ (description "oscrypto is a compilation-free, always up-to-date encryption library for Python.")
+ (license license:expat)))
+
+(define-public python-oscryptotests
+ (package (inherit python-oscrypto)
+ (name "python-oscryptotests")
+ (propagated-inputs
+ `(("python-oscrypto" ,python-oscrypto)))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'hard-code-path-to-libscrypt
+ (lambda* (#:key inputs #:allow-other-keys)
+ (chdir "tests")
+ #t)))))))
+
+(define-public python-certvalidator
+ (let ((commit "a145bf25eb75a9f014b3e7678826132efbba6213"))
+ (package
+ (name "python-certvalidator")
+ (version (git-version "0.1" "1" commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/achow101/certvalidator")
+ (commit commit)))
+ (file-name (git-file-name name commit))
+ (sha256
+ (base32
+ "1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-asn1crypto" ,python-asn1crypto)
+ ("python-oscrypto" ,python-oscrypto)
+ ("python-oscryptotests", python-oscryptotests))) ;; certvalidator tests import oscryptotests
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-broken-tests
+ (lambda _
+ (substitute* "tests/test_certificate_validator.py"
+ (("^(.*)class CertificateValidatorTests" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ (substitute* "tests/test_crl_client.py"
+ (("^(.*)def test_fetch_crl" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ (substitute* "tests/test_ocsp_client.py"
+ (("^(.*)def test_fetch_ocsp" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ (substitute* "tests/test_registry.py"
+ (("^(.*)def test_build_paths" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ (substitute* "tests/test_validate.py"
+ (("^(.*)def test_revocation_mode_hard" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ (substitute* "tests/test_validate.py"
+ (("^(.*)def test_revocation_mode_soft" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "python" "run.py" "tests")
+ #t)))))
+ (home-page "https://github.com/wbond/certvalidator")
+ (synopsis "Python library for validating X.509 certificates and paths")
+ (description "certvalidator is a Python library for validating X.509
+certificates or paths. Supports various options, including: validation at a
+specific moment in time, whitelisting and revocation checks.")
+ (license license:expat))))
+
+(define-public python-altgraph
+ (package
+ (name "python-altgraph")
+ (version "0.17")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ronaldoussoren/altgraph")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "09sm4srvvkw458pn48ga9q7ykr4xlz7q8gh1h9w7nxpf001qgpwb"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/ronaldoussoren/altgraph")
+ (synopsis "Python graph (network) package")
+ (description "altgraph is a fork of graphlib: a graph (network) package for
+constructing graphs, BFS and DFS traversals, topological sort, shortest paths,
+etc. with graphviz output.")
+ (license license:expat)))
+
+(define-public python-git-archive-all
+ (package
+ (name "python-git-archive-all")
+ (version "1.23.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Kentzo/git-archive-all")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1rj9v28gvcqzpbcnb0c9rbjaf7n0r26495dpjzkn58pmzrkmlp0v"))))
+ (build-system python-build-system)
+ (arguments `(#:tests? #f))
+ (home-page "https://github.com/Kentzo/git-archive-all")
+ (synopsis "Archive a repository with all its submodules.")
+ (description "git archive does not include submodules.")
+ (license license:expat)))
+
+(define-public python-macholib
+ (package
+ (name "python-macholib")
+ (version "1.14")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ronaldoussoren/macholib")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0aislnnfsza9wl4f0vp45ivzlc0pzhp9d4r08700slrypn5flg42"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-altgraph" ,python-altgraph)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-broken-tests
+ (lambda _
+ ;; This test is broken as there is no keyboard interrupt.
+ (substitute* "macholib_tests/test_command_line.py"
+ (("^(.*)class TestCmdLine" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line)))
+ (substitute* "macholib_tests/test_dyld.py"
+ (("^(.*)def test_\\S+_find" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line))
+ (("^(.*)def testBasic" line indent)
+ (string-append indent
+ "@unittest.skip(\"Disabled by Guix\")\n"
+ line))
+ )
+ #t)))))
+ (home-page "https://github.com/ronaldoussoren/macholib")
+ (synopsis "Python library for analyzing and editing Mach-O headers")
+ (description "macholib is a Macho-O header analyzer and editor. It's
+typically used as a dependency analysis tool, and also to rewrite dylib
+references in Mach-O headers to be @executable_path relative. Though this tool
+targets a platform specific file format, it is pure python code that is platform
+and endian independent.")
+ (license license:expat)))
+
+(define-public python-signapple
+ (let ((commit "8a945a2e7583be2665cf3a6a89d665b70ecd1ab6"))
+ (package
+ (name "python-signapple")
+ (version (git-version "0.1" "1" commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/achow101/signapple")
+ (commit commit)))
+ (file-name (git-file-name name commit))
+ (sha256
+ (base32
+ "0fr1hangvfyiwflca6jg5g8zvg3jc9qr7vd2c12ff89pznf38dlg"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-asn1crypto" ,python-asn1crypto)
+ ("python-oscrypto" ,python-oscrypto)
+ ("python-certvalidator" ,python-certvalidator)
+ ("python-elfesteem" ,python-elfesteem)
+ ("python-requests" ,python-requests)
+ ("python-macholib" ,python-macholib)))
+ ;; There are no tests, but attempting to run python setup.py test leads to
+ ;; problems, just disable the test
+ (arguments '(#:tests? #f))
+ (home-page "https://github.com/achow101/signapple")
+ (synopsis "Mach-O binary signature tool")
+ (description "signapple is a Python tool for creating, verifying, and
+inspecting signatures in Mach-O binaries.")
+ (license license:expat))))
+
+(define (make-glibc-without-werror glibc)
+ (package-with-extra-configure-variable glibc "enable_werror" "no"))
+
+(define (make-glibc-with-stack-protector glibc)
+ (package-with-extra-configure-variable glibc "--enable-stack-protector" "all"))
+
+(define (make-glibc-with-bind-now glibc)
+ (package-with-extra-configure-variable glibc "--enable-bind-now" "yes"))
+
+(define-public glibc-2.24
+ (package
+ (inherit glibc-2.31)
+ (version "2.24")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://sourceware.org/git/glibc.git")
+ (commit "0d7f1ed30969886c8dde62fbf7d2c79967d4bace")))
+ (file-name (git-file-name "glibc" "0d7f1ed30969886c8dde62fbf7d2c79967d4bace"))
+ (sha256
+ (base32
+ "0g5hryia5v1k0qx97qffgwzrz4lr4jw3s5kj04yllhswsxyjbic3"))
+ (patches (search-our-patches "glibc-ldd-x86_64.patch"
+ "glibc-versioned-locpath.patch"
+ "glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch"
+ "glibc-2.24-no-build-time-cxx-header-run.patch"
+ "glibc-2.24-fcommon.patch"))))))
+
+(define-public glibc-2.27/bitcoin-patched
+ (package
+ (inherit glibc-2.31)
+ (version "2.27")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://sourceware.org/git/glibc.git")
+ (commit "23158b08a0908f381459f273a984c6fd328363cb")))
+ (file-name (git-file-name "glibc" "23158b08a0908f381459f273a984c6fd328363cb"))
+ (sha256
+ (base32
+ "1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca"))
+ (patches (search-our-patches "glibc-ldd-x86_64.patch"
+ "glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch"
+ "glibc-2.27-dont-redefine-nss-database.patch"))))))
+
+(packages->manifest
+ (append
+ (list ;; The Basics
+ bash
+ which
+ coreutils
+ util-linux
+ ;; File(system) inspection
+ file
+ grep
+ diffutils
+ findutils
+ ;; File transformation
+ patch
+ gawk
+ sed
+ moreutils
+ ;; Compression and archiving
+ tar
+ bzip2
+ gzip
+ xz
+ p7zip
+ ;; Build tools
+ gnu-make
+ libtool
+ autoconf-2.71
+ automake
+ pkg-config
+ bison
+ gperf
+ gettext-minimal
+ ;; Native GCC 10 toolchain
+ gcc-toolchain-10
+ (list gcc-toolchain-10 "static")
+ ;; Scripting
+ perl
+ python-3
+ ;; Git
+ git
+ python-git-archive-all
+ ;; Tests
+ lief)
+ (let ((target (getenv "HOST")))
+ (cond ((string-suffix? "-mingw32" target)
+ ;; Windows
+ (list zip
+ unzip
+ (make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
+ (make-nsis-for-gcc-10 nsis-x86_64)
+ osslsigncode))
+ ((string-contains target "-linux-")
+ (list (cond ((string-contains target "riscv64-")
+ (make-bitcoin-cross-toolchain target
+ #:base-libc (make-glibc-with-stack-protector
+ (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.27/bitcoin-patched)))))
+ (else
+ (make-bitcoin-cross-toolchain target)))))
+ ((string-contains target "darwin")
+ (list clang-toolchain-10 binutils cmake xorriso python-signapple))
+ (else '())))))
--- /dev/null
+diff --git a/examples/otool.py b/examples/otool.py
+index 2b8efc0..d797b2e 100755
+--- a/examples/otool.py
++++ b/examples/otool.py
+@@ -342,7 +342,7 @@ if __name__ == '__main__':
+ try:
+ e = macho_init.MACHO(raw,
+ parseSymbols = False)
+- except ValueError, err:
++ except ValueError as err:
+ print("%s:" %file)
+ print(" %s" % err)
+ continue
--- /dev/null
+commit eb5698897c52702498938592d7f76e67d126451f
+Author: Eric Botcazou <ebotcazou@adacore.com>
+Date: Wed May 5 22:48:51 2021 +0200
+
+ Fix PR target/100402
+
+ This is a regression for 64-bit Windows present from mainline down to the 9
+ branch and introduced by the fix for PR target/99234. Again SEH, but with
+ a twist related to the way MinGW implements setjmp/longjmp, which turns out
+ to be piggybacked on SEH with recent versions of MinGW, i.e. the longjmp
+ performs a bona-fide unwinding of the stack, because it calls RtlUnwindEx
+ with the second argument initially passed to setjmp, which is the result of
+ __builtin_frame_address (0) in the MinGW header file:
+
+ define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))
+
+ This means that we directly expose the frame pointer to the SEH machinery
+ here (unlike with regular exception handling where we use an intermediate
+ CFA) and thus that we cannot do whatever we want with it. The old code
+ would leave it unaligned, i.e. not multiple of 16, whereas the new code
+ aligns it, but this breaks for some reason; at least it appears that a
+ .seh_setframe directive with 0 as second argument always works, so the
+ fix aligns it this way.
+
+ gcc/
+ PR target/100402
+ * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
+ always return the establisher frame for __builtin_frame_address (0).
+ gcc/testsuite/
+ * gcc.c-torture/execute/20210505-1.c: New test.
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 2f838840e96..06ad1b2274e 100644
+--- a/gcc/config/i386/i386.c
++++ b/gcc/config/i386/i386.c
+@@ -6356,12 +6356,29 @@ ix86_compute_frame_layout (void)
+ area, see the SEH code in config/i386/winnt.c for the rationale. */
+ frame->hard_frame_pointer_offset = frame->sse_reg_save_offset;
+
+- /* If we can leave the frame pointer where it is, do so. Also, return
++ /* If we can leave the frame pointer where it is, do so; however return
+ the establisher frame for __builtin_frame_address (0) or else if the
+- frame overflows the SEH maximum frame size. */
++ frame overflows the SEH maximum frame size.
++
++ Note that the value returned by __builtin_frame_address (0) is quite
++ constrained, because setjmp is piggybacked on the SEH machinery with
++ recent versions of MinGW:
++
++ # elif defined(__SEH__)
++ # if defined(__aarch64__) || defined(_ARM64_)
++ # define setjmp(BUF) _setjmp((BUF), __builtin_sponentry())
++ # elif (__MINGW_GCC_VERSION < 40702)
++ # define setjmp(BUF) _setjmp((BUF), mingw_getsp())
++ # else
++ # define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))
++ # endif
++
++ and the second argument passed to _setjmp, if not null, is forwarded
++ to the TargetFrame parameter of RtlUnwindEx by longjmp (after it has
++ built an ExceptionRecord on the fly describing the setjmp buffer). */
+ const HOST_WIDE_INT diff
+ = frame->stack_pointer_offset - frame->hard_frame_pointer_offset;
+- if (diff <= 255)
++ if (diff <= 255 && !crtl->accesses_prior_frames)
+ {
+ /* The resulting diff will be a multiple of 16 lower than 255,
+ i.e. at most 240 as required by the unwind data structure. */
--- /dev/null
+https://sourceware.org/git/?p=glibc.git;a=commit;h=a68ba2f3cd3cbe32c1f31e13c20ed13487727b32
+
+commit 6b02af31e9a721bb15a11380cd22d53b621711f8
+Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
+Date: Wed Oct 18 17:26:23 2017 +0100
+
+ [AARCH64] Rewrite elf_machine_load_address using _DYNAMIC symbol
+
+ This patch rewrites aarch64 elf_machine_load_address to use special _DYNAMIC
+ symbol instead of _dl_start.
+
+ The static address of _DYNAMIC symbol is stored in the first GOT entry.
+ Here is the change which makes this solution work (part of binutils 2.24):
+ https://sourceware.org/ml/binutils/2013-06/msg00248.html
+
+ i386, x86_64 targets use the same method to do this as well.
+
+ The original implementation relies on a trick that R_AARCH64_ABS32 relocation
+ being resolved at link time and the static address fits in the 32bits.
+ However, in LP64, normally, the address is defined to be 64 bit.
+
+ Here is the C version one which should be portable in all cases.
+
+ * sysdeps/aarch64/dl-machine.h (elf_machine_load_address): Use
+ _DYNAMIC symbol to calculate load address.
+
+diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
+index e86d8b5b63..5a5b8a5de5 100644
+--- a/sysdeps/aarch64/dl-machine.h
++++ b/sysdeps/aarch64/dl-machine.h
+@@ -49,26 +49,11 @@ elf_machine_load_address (void)
+ /* To figure out the load address we use the definition that for any symbol:
+ dynamic_addr(symbol) = static_addr(symbol) + load_addr
+
+- The choice of symbol is arbitrary. The static address we obtain
+- by constructing a non GOT reference to the symbol, the dynamic
+- address of the symbol we compute using adrp/add to compute the
+- symbol's address relative to the PC.
+- This depends on 32bit relocations being resolved at link time
+- and that the static address fits in the 32bits. */
+-
+- ElfW(Addr) static_addr;
+- ElfW(Addr) dynamic_addr;
+-
+- asm (" \n"
+-" adrp %1, _dl_start; \n"
+-" add %1, %1, #:lo12:_dl_start \n"
+-" ldr %w0, 1f \n"
+-" b 2f \n"
+-"1: \n"
+-" .word _dl_start \n"
+-"2: \n"
+- : "=r" (static_addr), "=r" (dynamic_addr));
+- return dynamic_addr - static_addr;
++ _DYNAMIC sysmbol is used here as its link-time address stored in
++ the special unrelocated first GOT entry. */
++
++ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden;
++ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic ();
+ }
+
+ /* Set up the loaded object described by L so its unrelocated PLT
--- /dev/null
+commit 264a4a0dbe1f4369db315080034b500bed66016c
+Author: fanquake <fanquake@gmail.com>
+Date: Fri May 6 11:03:04 2022 +0100
+
+ build: use -fcommon to retain legacy behaviour with GCC 10
+
+ GCC 10 started using -fno-common by default, which causes issues with
+ the powerpc builds using gibc 2.24. A patch was commited to glibc to fix
+ the issue, 18363b4f010da9ba459b13310b113ac0647c2fcc but is non-trvial
+ to backport, and was broken in at least one way, see the followup in
+ commit 7650321ce037302bfc2f026aa19e0213b8d02fe6.
+
+ For now, retain the legacy GCC behaviour by passing -fcommon when
+ building glibc.
+
+ https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html.
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=18363b4f010da9ba459b13310b113ac0647c2fcc
+ https://sourceware.org/git/?p=glibc.git;a=commit;h=7650321ce037302bfc2f026aa19e0213b8d02fe6
+
+diff --git a/Makeconfig b/Makeconfig
+index ee379f5852..63c4a2f234 100644
+--- a/Makeconfig
++++ b/Makeconfig
+@@ -824,7 +824,7 @@ ifeq "$(strip $(+cflags))" ""
+ +cflags := $(default_cflags)
+ endif # $(+cflags) == ""
+
+-+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags)
+++cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) -fcommon
+ +gcc-nowarn := -w
+
+ # Don't duplicate options if we inherited variables from the parent.
--- /dev/null
+https://sourceware.org/git/?p=glibc.git;a=commit;h=fc3e1337be1c6935ab58bd13520f97a535cf70cc
+
+commit dc23a45db566095e83ff0b7a57afc87fb5ca89a1
+Author: Florian Weimer <fweimer@redhat.com>
+Date: Wed Sep 21 10:45:32 2016 +0200
+
+ Avoid running $(CXX) during build to obtain header file paths
+
+ This reduces the build time somewhat and is particularly noticeable
+ during rebuilds with few code changes.
+
+diff --git a/Makerules b/Makerules
+index 7e4077ee50..c338850de5 100644
+--- a/Makerules
++++ b/Makerules
+@@ -121,14 +121,10 @@ ifneq (,$(CXX))
+ # will be used instead of /usr/include/stdlib.h and /usr/include/math.h.
+ before-compile := $(common-objpfx)cstdlib $(common-objpfx)cmath \
+ $(before-compile)
+-cstdlib=$(shell echo "\#include <cstdlib>" | $(CXX) -M -MP -x c++ - \
+- | sed -n "/cstdlib:/{s/:$$//;p}")
+-$(common-objpfx)cstdlib: $(cstdlib)
++$(common-objpfx)cstdlib: $(c++-cstdlib-header)
+ $(INSTALL_DATA) $< $@T
+ $(move-if-change) $@T $@
+-cmath=$(shell echo "\#include <cmath>" | $(CXX) -M -MP -x c++ - \
+- | sed -n "/cmath:/{s/:$$//;p}")
+-$(common-objpfx)cmath: $(cmath)
++$(common-objpfx)cmath: $(c++-cmath-header)
+ $(INSTALL_DATA) $< $@T
+ $(move-if-change) $@T $@
+ endif
+diff --git a/config.make.in b/config.make.in
+index 95c6f36876..04a8b3ed7f 100644
+--- a/config.make.in
++++ b/config.make.in
+@@ -45,6 +45,8 @@ defines = @DEFINES@
+ sysheaders = @sysheaders@
+ sysincludes = @SYSINCLUDES@
+ c++-sysincludes = @CXX_SYSINCLUDES@
++c++-cstdlib-header = @CXX_CSTDLIB_HEADER@
++c++-cmath-header = @CXX_CMATH_HEADER@
+ all-warnings = @all_warnings@
+ enable-werror = @enable_werror@
+
+diff --git a/configure b/configure
+index 17625e1041..6ff252744b 100755
+--- a/configure
++++ b/configure
+@@ -635,6 +635,8 @@ BISON
+ INSTALL_INFO
+ PERL
+ BASH_SHELL
++CXX_CMATH_HEADER
++CXX_CSTDLIB_HEADER
+ CXX_SYSINCLUDES
+ SYSINCLUDES
+ AUTOCONF
+@@ -5054,6 +5056,18 @@ fi
+
+
+
++# Obtain some C++ header file paths. This is used to make a local
++# copy of those headers in Makerules.
++if test -n "$CXX"; then
++ find_cxx_header () {
++ echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}"
++ }
++ CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
++ CXX_CMATH_HEADER="$(find_cxx_header cmath)"
++fi
++
++
++
+ # Test if LD_LIBRARY_PATH contains the notation for the current directory
+ # since this would lead to problems installing/building glibc.
+ # LD_LIBRARY_PATH contains the current directory if one of the following
+diff --git a/configure.ac b/configure.ac
+index 33bcd62180..9938ab0dc2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1039,6 +1039,18 @@ fi
+ AC_SUBST(SYSINCLUDES)
+ AC_SUBST(CXX_SYSINCLUDES)
+
++# Obtain some C++ header file paths. This is used to make a local
++# copy of those headers in Makerules.
++if test -n "$CXX"; then
++ find_cxx_header () {
++ echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}"
++ }
++ CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
++ CXX_CMATH_HEADER="$(find_cxx_header cmath)"
++fi
++AC_SUBST(CXX_CSTDLIB_HEADER)
++AC_SUBST(CXX_CMATH_HEADER)
++
+ # Test if LD_LIBRARY_PATH contains the notation for the current directory
+ # since this would lead to problems installing/building glibc.
+ # LD_LIBRARY_PATH contains the current directory if one of the following
--- /dev/null
+commit 78a90c2f74a2012dd3eff302189e47ff6779a757
+Author: Andreas Schwab <schwab@linux-m68k.org>
+Date: Fri Mar 2 23:07:14 2018 +0100
+
+ Fix multiple definitions of __nss_*_database (bug 22918)
+
+ (cherry picked from commit eaf6753f8aac33a36deb98c1031d1bad7b593d2d)
+
+diff --git a/nscd/gai.c b/nscd/gai.c
+index d081747797..576fd0045b 100644
+--- a/nscd/gai.c
++++ b/nscd/gai.c
+@@ -45,3 +45,6 @@
+ #ifdef HAVE_LIBIDN
+ # include <libidn/idn-stub.c>
+ #endif
++
++/* Some variables normally defined in libc. */
++service_user *__nss_hosts_database attribute_hidden;
+diff --git a/nss/nsswitch.c b/nss/nsswitch.c
+index d5e655974f..b0f0c11a3e 100644
+--- a/nss/nsswitch.c
++++ b/nss/nsswitch.c
+@@ -62,7 +62,7 @@ static service_library *nss_new_service (name_database *database,
+
+ /* Declare external database variables. */
+ #define DEFINE_DATABASE(name) \
+- extern service_user *__nss_##name##_database attribute_hidden; \
++ service_user *__nss_##name##_database attribute_hidden; \
+ weak_extern (__nss_##name##_database)
+ #include "databases.def"
+ #undef DEFINE_DATABASE
+diff --git a/nss/nsswitch.h b/nss/nsswitch.h
+index eccb535ef5..63573b9ebc 100644
+--- a/nss/nsswitch.h
++++ b/nss/nsswitch.h
+@@ -226,10 +226,10 @@ libc_hidden_proto (__nss_hostname_digits_dots)
+ #define MAX_NR_ADDRS 48
+
+ /* Prototypes for __nss_*_lookup2 functions. */
+-#define DEFINE_DATABASE(arg) \
+- service_user *__nss_##arg##_database attribute_hidden; \
+- int __nss_##arg##_lookup2 (service_user **, const char *, \
+- const char *, void **); \
++#define DEFINE_DATABASE(arg) \
++ extern service_user *__nss_##arg##_database attribute_hidden; \
++ int __nss_##arg##_lookup2 (service_user **, const char *, \
++ const char *, void **); \
+ libc_hidden_proto (__nss_##arg##_lookup2)
+ #include "databases.def"
+ #undef DEFINE_DATABASE
+diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
+index f509534ca9..8c64ac59ff 100644
+--- a/posix/tst-rfc3484-2.c
++++ b/posix/tst-rfc3484-2.c
+@@ -58,6 +58,7 @@ _res_hconf_init (void)
+ #undef USE_NSCD
+ #include "../sysdeps/posix/getaddrinfo.c"
+
++service_user *__nss_hosts_database attribute_hidden;
+
+ /* This is the beginning of the real test code. The above defines
+ (among other things) the function rfc3484_sort. */
+diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c
+index ae44087a10..1c61aaf844 100644
+--- a/posix/tst-rfc3484-3.c
++++ b/posix/tst-rfc3484-3.c
+@@ -58,6 +58,7 @@ _res_hconf_init (void)
+ #undef USE_NSCD
+ #include "../sysdeps/posix/getaddrinfo.c"
+
++service_user *__nss_hosts_database attribute_hidden;
+
+ /* This is the beginning of the real test code. The above defines
+ (among other things) the function rfc3484_sort. */
+diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
+index 7f191abbbc..8f45848e44 100644
+--- a/posix/tst-rfc3484.c
++++ b/posix/tst-rfc3484.c
+@@ -58,6 +58,7 @@ _res_hconf_init (void)
+ #undef USE_NSCD
+ #include "../sysdeps/posix/getaddrinfo.c"
+
++service_user *__nss_hosts_database attribute_hidden;
+
+ /* This is the beginning of the real test code. The above defines
+ (among other things) the function rfc3484_sort. */
--- /dev/null
+Note that this has been modified from the original commit, to use __has_include
+instead of __has_include__, as the later was causing build failures with GCC 10.
+See also: http://lists.busybox.net/pipermail/buildroot/2020-July/590376.html.
+
+https://sourceware.org/git/?p=glibc.git;a=commit;h=0b9c84906f653978fb8768c7ebd0ee14a47e662e
+
+From 562c52cc81a4e456a62e6455feb32732049e9070 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Mon, 31 Dec 2018 09:26:42 -0800
+Subject: [PATCH] riscv: Use __has_include__ to include <asm/syscalls.h> [BZ
+ #24022]
+
+<asm/syscalls.h> has been removed by
+
+commit 27f8899d6002e11a6e2d995e29b8deab5aa9cc25
+Author: David Abdurachmanov <david.abdurachmanov@gmail.com>
+Date: Thu Nov 8 20:02:39 2018 +0100
+
+ riscv: add asm/unistd.h UAPI header
+
+ Marcin Juszkiewicz reported issues while generating syscall table for riscv
+ using 4.20-rc1. The patch refactors our unistd.h files to match some other
+ architectures.
+
+ - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT only for 64-bit
+ - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h
+ - Adjust kernel asm/unistd.h
+
+ So now asm/unistd.h UAPI header should show all syscalls for riscv.
+
+<asm/syscalls.h> may be restored by
+
+Subject: [PATCH] riscv: restore asm/syscalls.h UAPI header
+Date: Tue, 11 Dec 2018 09:09:35 +0100
+
+UAPI header asm/syscalls.h was merged into UAPI asm/unistd.h header,
+which did resolve issue with missing syscalls macros resulting in
+glibc (2.28) build failure. It also broke glibc in a different way:
+asm/syscalls.h is being used by glibc. I noticed this while doing
+Fedora 30/Rawhide mass rebuild.
+
+The patch returns asm/syscalls.h header and incl. it into asm/unistd.h.
+I plan to send a patch to glibc to use asm/unistd.h instead of
+asm/syscalls.h
+
+In the meantime, we use __has_include__, which was added to GCC 5, to
+check if <asm/syscalls.h> exists before including it. Tested with
+build-many-glibcs.py for riscv against kernel 4.19.12 and 4.20-rc7.
+
+ [BZ #24022]
+ * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Check if
+ <asm/syscalls.h> exists with __has_include__ before including it.
+---
+ sysdeps/unix/sysv/linux/riscv/flush-icache.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c
+index d612ef4c6c..0b2042620b 100644
+--- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c
++++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c
+@@ -21,7 +21,11 @@
+ #include <stdlib.h>
+ #include <atomic.h>
+ #include <sys/cachectl.h>
+-#include <asm/syscalls.h>
++#if __has_include (<asm/syscalls.h>)
++# include <asm/syscalls.h>
++#else
++# include <asm/unistd.h>
++#endif
+
+ typedef int (*func_type) (void *, void *, unsigned long int);
+
+--
+2.31.1
+
--- /dev/null
+By default, 'RTDLLIST' in 'ldd' refers to 'lib64/ld-linux-x86-64.so', whereas
+it's in 'lib/' for us. This patch fixes that.
+
+--- glibc-2.17/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2012-12-25 04:02:13.000000000 +0100
++++ glibc-2.17/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed 2013-09-15 23:08:03.000000000 +0200
+@@ -1,3 +1,3 @@
+ /LD_TRACE_LOADED_OBJECTS=1/a\
+ add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
+-s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_
++s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4\6 \2\4-x86-64\6 \2x32\4-x32\6"_
--- /dev/null
+The format of locale data can be incompatible between libc versions, and
+loading incompatible data can lead to 'setlocale' returning EINVAL at best
+or triggering an assertion failure at worst. See
+https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00717.html
+for background information.
+
+To address that, this patch changes libc to honor a new 'GUIX_LOCPATH'
+variable, and to look for locale data in version-specific sub-directories of
+that variable. So, if GUIX_LOCPATH=/foo:/bar, locale data is searched for in
+/foo/X.Y and /bar/X.Y, where X.Y is the libc version number.
+
+That way, a single 'GUIX_LOCPATH' setting can work even if different libc
+versions coexist on the system.
+
+--- a/locale/newlocale.c
++++ b/locale/newlocale.c
+@@ -30,6 +30,7 @@
+ /* Lock for protecting global data. */
+ __libc_rwlock_define (extern , __libc_setlocale_lock attribute_hidden)
+
++extern error_t compute_locale_search_path (char **, size_t *);
+
+ /* Use this when we come along an error. */
+ #define ERROR_RETURN \
+@@ -48,7 +49,6 @@ __newlocale (int category_mask, const char *locale, __locale_t base)
+ __locale_t result_ptr;
+ char *locale_path;
+ size_t locale_path_len;
+- const char *locpath_var;
+ int cnt;
+ size_t names_len;
+
+@@ -102,17 +102,8 @@ __newlocale (int category_mask, const char *locale, __locale_t base)
+ locale_path = NULL;
+ locale_path_len = 0;
+
+- locpath_var = getenv ("LOCPATH");
+- if (locpath_var != NULL && locpath_var[0] != '\0')
+- {
+- if (__argz_create_sep (locpath_var, ':',
+- &locale_path, &locale_path_len) != 0)
+- return NULL;
+-
+- if (__argz_add_sep (&locale_path, &locale_path_len,
+- _nl_default_locale_path, ':') != 0)
+- return NULL;
+- }
++ if (compute_locale_search_path (&locale_path, &locale_path_len) != 0)
++ return NULL;
+
+ /* Get the names for the locales we are interested in. We either
+ allow a composite name or a single name. */
+diff --git a/locale/setlocale.c b/locale/setlocale.c
+index ead030d..0c0e314 100644
+--- a/locale/setlocale.c
++++ b/locale/setlocale.c
+@@ -215,12 +215,65 @@ setdata (int category, struct __locale_data *data)
+ }
+ }
+
++/* Return in *LOCALE_PATH and *LOCALE_PATH_LEN the locale data search path as
++ a colon-separated list. Return ENOMEN on error, zero otherwise. */
++error_t
++compute_locale_search_path (char **locale_path, size_t *locale_path_len)
++{
++ char* guix_locpath_var = getenv ("GUIX_LOCPATH");
++ char *locpath_var = getenv ("LOCPATH");
++
++ if (guix_locpath_var != NULL && guix_locpath_var[0] != '\0')
++ {
++ /* Entries in 'GUIX_LOCPATH' take precedence over 'LOCPATH'. These
++ entries are systematically prefixed with "/X.Y" where "X.Y" is the
++ libc version. */
++ if (__argz_create_sep (guix_locpath_var, ':',
++ locale_path, locale_path_len) != 0
++ || __argz_suffix_entries (locale_path, locale_path_len,
++ "/" VERSION) != 0)
++ goto bail_out;
++ }
++
++ if (locpath_var != NULL && locpath_var[0] != '\0')
++ {
++ char *reg_locale_path = NULL;
++ size_t reg_locale_path_len = 0;
++
++ if (__argz_create_sep (locpath_var, ':',
++ ®_locale_path, ®_locale_path_len) != 0)
++ goto bail_out;
++
++ if (__argz_append (locale_path, locale_path_len,
++ reg_locale_path, reg_locale_path_len) != 0)
++ goto bail_out;
++
++ free (reg_locale_path);
++ }
++
++ if (*locale_path != NULL)
++ {
++ /* Append the system default locale directory. */
++ if (__argz_add_sep (locale_path, locale_path_len,
++ _nl_default_locale_path, ':') != 0)
++ goto bail_out;
++ }
++
++ return 0;
++
++ bail_out:
++ free (*locale_path);
++ *locale_path = NULL;
++ *locale_path_len = 0;
++
++ return ENOMEM;
++}
++
+ char *
+ setlocale (int category, const char *locale)
+ {
+ char *locale_path;
+ size_t locale_path_len;
+- const char *locpath_var;
+ char *composite;
+
+ /* Sanity check for CATEGORY argument. */
+@@ -251,17 +304,10 @@ setlocale (int category, const char *locale)
+ locale_path = NULL;
+ locale_path_len = 0;
+
+- locpath_var = getenv ("LOCPATH");
+- if (locpath_var != NULL && locpath_var[0] != '\0')
++ if (compute_locale_search_path (&locale_path, &locale_path_len) != 0)
+ {
+- if (__argz_create_sep (locpath_var, ':',
+- &locale_path, &locale_path_len) != 0
+- || __argz_add_sep (&locale_path, &locale_path_len,
+- _nl_default_locale_path, ':') != 0)
+- {
+- __libc_rwlock_unlock (__libc_setlocale_lock);
+- return NULL;
+- }
++ __libc_rwlock_unlock (__libc_setlocale_lock);
++ return NULL;
+ }
+
+ if (category == LC_ALL)
+diff --git a/string/Makefile b/string/Makefile
+index 8424a61..f925503 100644
+--- a/string/Makefile
++++ b/string/Makefile
+@@ -38,7 +38,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \
+ swab strfry memfrob memmem rawmemchr strchrnul \
+ $(addprefix argz-,append count create ctsep next \
+ delete extract insert stringify \
+- addsep replace) \
++ addsep replace suffix) \
+ envz basename \
+ strcoll_l strxfrm_l string-inlines memrchr \
+ xpg-strerror strerror_l
+diff --git a/string/argz-suffix.c b/string/argz-suffix.c
+new file mode 100644
+index 0000000..505b0f2
+--- /dev/null
++++ b/string/argz-suffix.c
+@@ -0,0 +1,56 @@
++/* Copyright (C) 2015 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ludovic Courtès <ludo@gnu.org>.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <http://www.gnu.org/licenses/>. */
++
++#include <argz.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <string.h>
++
++
++error_t
++__argz_suffix_entries (char **argz, size_t *argz_len, const char *suffix)
++
++{
++ size_t suffix_len = strlen (suffix);
++ size_t count = __argz_count (*argz, *argz_len);
++ size_t new_argz_len = *argz_len + count * suffix_len;
++ char *new_argz = malloc (new_argz_len);
++
++ if (new_argz)
++ {
++ char *p = new_argz, *entry;
++
++ for (entry = *argz;
++ entry != NULL;
++ entry = argz_next (*argz, *argz_len, entry))
++ {
++ p = stpcpy (p, entry);
++ p = stpcpy (p, suffix);
++ p++;
++ }
++
++ free (*argz);
++ *argz = new_argz;
++ *argz_len = new_argz_len;
++
++ return 0;
++ }
++ else
++ return ENOMEM;
++}
++weak_alias (__argz_suffix_entries, argz_suffix_entries)
+diff --git a/string/argz.h b/string/argz.h
+index bb62a31..d276a35 100644
+--- a/string/argz.h
++++ b/string/argz.h
+@@ -134,6 +134,16 @@ extern error_t argz_replace (char **__restrict __argz,
+ const char *__restrict __str,
+ const char *__restrict __with,
+ unsigned int *__restrict __replace_count);
++
++/* Suffix each entry of ARGZ & ARGZ_LEN with SUFFIX. Return 0 on success,
++ and ENOMEN if memory cannot be allocated. */
++extern error_t __argz_suffix_entries (char **__restrict __argz,
++ size_t *__restrict __argz_len,
++ const char *__restrict __suffix);
++extern error_t argz_suffix_entries (char **__restrict __argz,
++ size_t *__restrict __argz_len,
++ const char *__restrict __suffix);
++
+ \f
+ /* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there
+ are no more. If entry is NULL, then the first entry is returned. This
--- /dev/null
+commit f6df41524e703dc471e283e566a48e05a735b7f2
+Author: Anders <anders_k@users.sourceforge.net>
+Date: Sat Jun 27 23:18:45 2020 +0000
+
+ Don't let GCC 10 generate memmove calls (bug #1248)
+
+ git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7189 212acab6-be3b-0410-9dea-997c60f758d6
+
+diff --git a/SCons/Config/gnu b/SCons/Config/gnu
+index bfcb362d..21fa446b 100644
+--- a/SCons/Config/gnu
++++ b/SCons/Config/gnu
+@@ -103,6 +103,10 @@ stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no standard libraries
+ stub_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
+ stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
+
++conf = FlagsConfigure(stub_env)
++conf.CheckCompileFlag('-fno-tree-loop-distribute-patterns') # GCC 10: Don't generate msvcrt!memmove calls (bug #1248)
++conf.Finish()
++
+ stub_uenv = stub_env.Clone()
+ stub_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE'])
+
--- /dev/null
+diff --git a/oscrypto/__init__.py b/oscrypto/__init__.py
+index eb27313..371ab24 100644
+--- a/oscrypto/__init__.py
++++ b/oscrypto/__init__.py
+@@ -302,3 +302,8 @@ def load_order():
+ 'oscrypto._win.tls',
+ 'oscrypto.tls',
+ ]
++
++
++paths = '@GUIX_OSCRYPTO_USE_OPENSSL@'.split(',')
++assert len(paths) == 2, 'Value for OSCRYPTO_USE_OPENSSL env var must be two paths separated by a comma'
++use_openssl(*paths)
--- /dev/null
+Description: Use unaligned VMOV instructions
+Author: Stephen Kitt <skitt@debian.org>
+Bug-Debian: https://bugs.debian.org/939559
+
+Based on a patch originally by Claude Heiland-Allen <claude@mathr.co.uk>
+
+--- a/gcc/config/i386/sse.md
++++ b/gcc/config/i386/sse.md
+@@ -1058,17 +1058,11 @@
+ {
+ if (FLOAT_MODE_P (GET_MODE_INNER (<MODE>mode)))
+ {
+- if (misaligned_operand (operands[1], <MODE>mode))
+- return "vmovu<ssemodesuffix>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
+- else
+- return "vmova<ssemodesuffix>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
++ return "vmovu<ssemodesuffix>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
+ }
+ else
+ {
+- if (misaligned_operand (operands[1], <MODE>mode))
+- return "vmovdqu<ssescalarsize>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
+- else
+- return "vmovdqa<ssescalarsize>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
++ return "vmovdqu<ssescalarsize>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
+ }
+ }
+ [(set_attr "type" "ssemov")
+@@ -1184,17 +1178,11 @@
+ {
+ if (FLOAT_MODE_P (GET_MODE_INNER (<MODE>mode)))
+ {
+- if (misaligned_operand (operands[0], <MODE>mode))
+- return "vmovu<ssemodesuffix>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
+- else
+- return "vmova<ssemodesuffix>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
++ return "vmovu<ssemodesuffix>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
+ }
+ else
+ {
+- if (misaligned_operand (operands[0], <MODE>mode))
+- return "vmovdqu<ssescalarsize>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
+- else
+- return "vmovdqa<ssescalarsize>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
++ return "vmovdqu<ssescalarsize>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
+ }
+ }
+ [(set_attr "type" "ssemov")
+@@ -7806,7 +7794,7 @@
+ "TARGET_SSE && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+ "@
+ %vmovlps\t{%1, %0|%q0, %1}
+- %vmovaps\t{%1, %0|%0, %1}
++ %vmovups\t{%1, %0|%0, %1}
+ %vmovlps\t{%1, %d0|%d0, %q1}"
+ [(set_attr "type" "ssemov")
+ (set_attr "prefix" "maybe_vex")
+@@ -13997,29 +13985,15 @@
+ switch (<MODE>mode)
+ {
+ case E_V8DFmode:
+- if (misaligned_operand (operands[2], <ssequartermode>mode))
+- return "vmovupd\t{%2, %x0|%x0, %2}";
+- else
+- return "vmovapd\t{%2, %x0|%x0, %2}";
++ return "vmovupd\t{%2, %x0|%x0, %2}";
+ case E_V16SFmode:
+- if (misaligned_operand (operands[2], <ssequartermode>mode))
+- return "vmovups\t{%2, %x0|%x0, %2}";
+- else
+- return "vmovaps\t{%2, %x0|%x0, %2}";
++ return "vmovups\t{%2, %x0|%x0, %2}";
+ case E_V8DImode:
+- if (misaligned_operand (operands[2], <ssequartermode>mode))
+- return which_alternative == 2 ? "vmovdqu64\t{%2, %x0|%x0, %2}"
++ return which_alternative == 2 ? "vmovdqu64\t{%2, %x0|%x0, %2}"
+ : "vmovdqu\t{%2, %x0|%x0, %2}";
+- else
+- return which_alternative == 2 ? "vmovdqa64\t{%2, %x0|%x0, %2}"
+- : "vmovdqa\t{%2, %x0|%x0, %2}";
+ case E_V16SImode:
+- if (misaligned_operand (operands[2], <ssequartermode>mode))
+- return which_alternative == 2 ? "vmovdqu32\t{%2, %x0|%x0, %2}"
++ return which_alternative == 2 ? "vmovdqu32\t{%2, %x0|%x0, %2}"
+ : "vmovdqu\t{%2, %x0|%x0, %2}";
+- else
+- return which_alternative == 2 ? "vmovdqa32\t{%2, %x0|%x0, %2}"
+- : "vmovdqa\t{%2, %x0|%x0, %2}";
+ default:
+ gcc_unreachable ();
+ }
+@@ -21225,63 +21199,27 @@
+ switch (get_attr_mode (insn))
+ {
+ case MODE_V16SF:
+- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
+- return "vmovups\t{%1, %t0|%t0, %1}";
+- else
+- return "vmovaps\t{%1, %t0|%t0, %1}";
++ return "vmovups\t{%1, %t0|%t0, %1}";
+ case MODE_V8DF:
+- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
+- return "vmovupd\t{%1, %t0|%t0, %1}";
+- else
+- return "vmovapd\t{%1, %t0|%t0, %1}";
++ return "vmovupd\t{%1, %t0|%t0, %1}";
+ case MODE_V8SF:
+- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
+- return "vmovups\t{%1, %x0|%x0, %1}";
+- else
+- return "vmovaps\t{%1, %x0|%x0, %1}";
++ return "vmovups\t{%1, %x0|%x0, %1}";
+ case MODE_V4DF:
+- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
+- return "vmovupd\t{%1, %x0|%x0, %1}";
+- else
+- return "vmovapd\t{%1, %x0|%x0, %1}";
++ return "vmovupd\t{%1, %x0|%x0, %1}";
+ case MODE_XI:
+- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
+- {
+- if (which_alternative == 2)
+- return "vmovdqu\t{%1, %t0|%t0, %1}";
+- else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
+- return "vmovdqu64\t{%1, %t0|%t0, %1}";
+- else
+- return "vmovdqu32\t{%1, %t0|%t0, %1}";
+- }
++ if (which_alternative == 2)
++ return "vmovdqu\t{%1, %t0|%t0, %1}";
++ else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
++ return "vmovdqu64\t{%1, %t0|%t0, %1}";
+ else
+- {
+- if (which_alternative == 2)
+- return "vmovdqa\t{%1, %t0|%t0, %1}";
+- else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
+- return "vmovdqa64\t{%1, %t0|%t0, %1}";
+- else
+- return "vmovdqa32\t{%1, %t0|%t0, %1}";
+- }
++ return "vmovdqu32\t{%1, %t0|%t0, %1}";
+ case MODE_OI:
+- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
+- {
+- if (which_alternative == 2)
+- return "vmovdqu\t{%1, %x0|%x0, %1}";
+- else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
+- return "vmovdqu64\t{%1, %x0|%x0, %1}";
+- else
+- return "vmovdqu32\t{%1, %x0|%x0, %1}";
+- }
++ if (which_alternative == 2)
++ return "vmovdqu\t{%1, %x0|%x0, %1}";
++ else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
++ return "vmovdqu64\t{%1, %x0|%x0, %1}";
+ else
+- {
+- if (which_alternative == 2)
+- return "vmovdqa\t{%1, %x0|%x0, %1}";
+- else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
+- return "vmovdqa64\t{%1, %x0|%x0, %1}";
+- else
+- return "vmovdqa32\t{%1, %x0|%x0, %1}";
+- }
++ return "vmovdqu32\t{%1, %x0|%x0, %1}";
+ default:
+ gcc_unreachable ();
+ }
+--- a/gcc/config/i386/i386.c
++++ b/gcc/config/i386/i386.c
+@@ -4981,13 +4981,13 @@
+ switch (type)
+ {
+ case opcode_int:
+- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
++ opcode = "vmovdqu32";
+ break;
+ case opcode_float:
+- opcode = misaligned_p ? "vmovups" : "vmovaps";
++ opcode = "vmovups";
+ break;
+ case opcode_double:
+- opcode = misaligned_p ? "vmovupd" : "vmovapd";
++ opcode = "vmovupd";
+ break;
+ }
+ }
+@@ -4996,16 +4996,16 @@
+ switch (scalar_mode)
+ {
+ case E_SFmode:
+- opcode = misaligned_p ? "%vmovups" : "%vmovaps";
++ opcode = "%vmovups";
+ break;
+ case E_DFmode:
+- opcode = misaligned_p ? "%vmovupd" : "%vmovapd";
++ opcode = "%vmovupd";
+ break;
+ case E_TFmode:
+ if (evex_reg_p)
+- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64";
++ opcode = "vmovdqu64";
+ else
+- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa";
++ opcode = "%vmovdqu";
+ break;
+ default:
+ gcc_unreachable ();
+@@ -5017,48 +5017,32 @@
+ {
+ case E_QImode:
+ if (evex_reg_p)
+- opcode = (misaligned_p
+- ? (TARGET_AVX512BW
+- ? "vmovdqu8"
+- : "vmovdqu64")
+- : "vmovdqa64");
++ opcode = TARGET_AVX512BW ? "vmovdqu8" : "vmovdqu64";
+ else
+- opcode = (misaligned_p
+- ? (TARGET_AVX512BW
+- ? "vmovdqu8"
+- : "%vmovdqu")
+- : "%vmovdqa");
++ opcode = TARGET_AVX512BW ? "vmovdqu8" : "%vmovdqu";
+ break;
+ case E_HImode:
+ if (evex_reg_p)
+- opcode = (misaligned_p
+- ? (TARGET_AVX512BW
+- ? "vmovdqu16"
+- : "vmovdqu64")
+- : "vmovdqa64");
++ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64";
+ else
+- opcode = (misaligned_p
+- ? (TARGET_AVX512BW
+- ? "vmovdqu16"
+- : "%vmovdqu")
+- : "%vmovdqa");
++ opcode = TARGET_AVX512BW ? "vmovdqu16" : "%vmovdqu";
+ break;
+ case E_SImode:
+ if (evex_reg_p)
+- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
++ opcode = "vmovdqu32";
+ else
+- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa";
++ opcode = "%vmovdqu";
+ break;
+ case E_DImode:
+ case E_TImode:
+ case E_OImode:
+ if (evex_reg_p)
+- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64";
++ opcode = "vmovdqu64";
+ else
+- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa";
++ opcode = "%vmovdqu";
+ break;
+ case E_XImode:
+- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64";
++ opcode = "vmovdqu64";
+ break;
+ default:
+ gcc_unreachable ();
--- /dev/null
+#!/usr/bin/env bash
+
+git_root() {
+ git rev-parse --show-toplevel 2> /dev/null
+}
+
+git_head_version() {
+ local recent_tag
+ if recent_tag="$(git describe --exact-match HEAD 2> /dev/null)"; then
+ echo "${recent_tag#v}"
+ else
+ git rev-parse --short=12 HEAD
+ fi
+}
--- /dev/null
+#!/usr/bin/env bash
+
+# Based on realpath.sh written by Michael Kropat
+# Found at: https://github.com/mkropat/sh-realpath/blob/65512368b8155b176b67122aa395ac580d9acc5b/realpath.sh
+
+bash_realpath() {
+ canonicalize_path "$(resolve_symlinks "$1")"
+}
+
+resolve_symlinks() {
+ _resolve_symlinks "$1"
+}
+
+_resolve_symlinks() {
+ _assert_no_path_cycles "$@" || return
+
+ local dir_context path
+ if path=$(readlink -- "$1"); then
+ dir_context=$(dirname -- "$1")
+ _resolve_symlinks "$(_prepend_dir_context_if_necessary "$dir_context" "$path")" "$@"
+ else
+ printf '%s\n' "$1"
+ fi
+}
+
+_prepend_dir_context_if_necessary() {
+ if [ "$1" = . ]; then
+ printf '%s\n' "$2"
+ else
+ _prepend_path_if_relative "$1" "$2"
+ fi
+}
+
+_prepend_path_if_relative() {
+ case "$2" in
+ /* ) printf '%s\n' "$2" ;;
+ * ) printf '%s\n' "$1/$2" ;;
+ esac
+}
+
+_assert_no_path_cycles() {
+ local target path
+
+ target=$1
+ shift
+
+ for path in "$@"; do
+ if [ "$path" = "$target" ]; then
+ return 1
+ fi
+ done
+}
+
+canonicalize_path() {
+ if [ -d "$1" ]; then
+ _canonicalize_dir_path "$1"
+ else
+ _canonicalize_file_path "$1"
+ fi
+}
+
+_canonicalize_dir_path() {
+ (cd "$1" 2>/dev/null && pwd -P)
+}
+
+_canonicalize_file_path() {
+ local dir file
+ dir=$(dirname -- "$1")
+ file=$(basename -- "$1")
+ (cd "$dir" 2>/dev/null && printf '%s/%s\n' "$(pwd -P)" "$file")
+}
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
+if(NOT DEPENDS)
+ set(CMAKE_AUTORCC ON)
+else()
+ add_executable(Qt5::moc IMPORTED)
+ set_target_properties(Qt5::moc PROPERTIES
+ IMPORTED_LOCATION "${NATIVE_BIN_PATH}/moc")
+
+ add_executable(Qt5::rcc IMPORTED)
+ set_target_properties(Qt5::rcc PROPERTIES
+ IMPORTED_LOCATION "${NATIVE_BIN_PATH}/rcc")
+
+ add_executable(Qt5::uic IMPORTED)
+ set_target_properties(Qt5::uic PROPERTIES
+ IMPORTED_LOCATION "${NATIVE_BIN_PATH}/uic")
+endif()
+
# pthread
find_package(Threads REQUIRED)
Gui
Network
Svg
- Xml
WebSockets
)
add_subdirectory(openpgp)
-qt_add_resources(RESOURCES assets.qrc assets_tor.qrc)
+IF(DEPENDS)
+ # AutoRCC is broken in depends builds.
+ # RCC path in Options is an apparent Qt bug. It appears to ignore IMPORTED_LOCATION set earlier.
+ qt_add_resources(RESOURCES
+ assets.qrc assets_tor.qrc ui/qdarkstyle/style.qrc ui/BreezeStyleSheets/breeze.qrc
+ OPTIONS "${NATIVE_BIN_PATH}/rcc")
+else()
+ qt_add_resources(RESOURCES assets.qrc assets_tor.qrc)
+endif()
+
+find_library(ICONV_LIBRARIES iconv)
# Compile source files (.h/.cpp)
file(GLOB SOURCE_FILES
target_include_directories(feather PUBLIC
${CMAKE_BINARY_DIR}/src/feather_autogen/include
+ ${ZLIB_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/monero/include
${CMAKE_SOURCE_DIR}/monero/src
${CMAKE_SOURCE_DIR}/monero/external/easylogging++
${CMAKE_CURRENT_SOURCE_DIR}/model
${CMAKE_CURRENT_SOURCE_DIR}/utils
${CMAKE_CURRENT_SOURCE_DIR}/qrcode
- ${X11_INCLUDE_DIR}
+# ${X11_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${QtCore_INCLUDE_DIRS}
${QtWidgets_INCLUDE_DIRS}
${QtSvgWidgets_INCLUDE_DIRS}
${QtXml_INCLUDE_DIRS}
${QtWebSockets_INCLUDE_DIRS}
- ${ZLIB_INCLUDE_DIRS}
${LIBZIP_INCLUDE_DIRS}
+ ${ZLIB_INCLUDE_DIRS}
${ZBAR_INCLUDE_DIR}
${POLYSEED_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIR}
)
if(WITH_SCANNER)
target_link_libraries(feather monero-seed)
endif()
+MESSAGE(INFO "ZLIBBB ${ZLIB_LIBRARIES}")
+
target_link_libraries(feather
wallet_merged
${LMDB_LIBRARY}
Qt::Gui
Qt::Network
Qt::Svg
- Qt::Xml
Qt::WebSockets
- ${ICU_LIBRARIES}
openpgp
Threads::Threads
${QRENCODE_LIBRARY}
${ZLIB_LIBRARIES}
- ${LIBZIP_LIBRARIES}
${ZBAR_LIBRARIES}
${POLYSEED_LIBRARY}
SingleApplication::SingleApplication
+ ${ICU_LIBRARIES}
+ ${ICONV_LIBRARIES}
+ ${ZLIB_LIBRARIES}
)
+if(APPLE)
+ target_link_libraries(feather ${ICONV_LIBRARIES})
+endif()
+
+target_link_libraries(feather ${LIBZIP_LIBRARIES} ${ZLIB_LIBRARIES})
+
if(Qt6_FOUND)
target_link_libraries(feather Qt::SvgWidgets)
endif()
endif()
endif()
-if(X11_FOUND)
- target_link_libraries(feather ${X11_LIBRARIES})
-endif()
+#if(X11_FOUND)
+# target_link_libraries(feather ${X11_LIBRARIES})
+#endif()
-if(APPLE)
- include(Deploy)
-endif()
+#if(APPLE)
+# include(Deploy)
+#endif()
+
+target_link_libraries(feather ${ZLIB_LIBRARIES})
install(TARGETS feather
DESTINATION ${CMAKE_INSTALL_PREFIX}