# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# Maintainer: Naveen M K <naveen521kk@gmail.com>
# Contributor: Saul Ibarra Corretge <saghul@gmail.com>
# Contributor: Frode Solheim <frode@fs-uae.net>

_primary_python="yes"
_pybasever=3.12
_realname=python

if [[ "${_primary_python}" == "yes" ]]; then
  pkgbase="mingw-w64-${_realname}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
  provides=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
  conflicts=("${MINGW_PACKAGE_PREFIX}-python3"
             "${MINGW_PACKAGE_PREFIX}-python${_pybasever}"
            "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7")
  replaces=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
else
  pkgbase="mingw-w64-${_realname}${_pybasever}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}")
fi
pkgver=${_pybasever}.8
pkgrel=2
pkgdesc="A high-level scripting language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
license=('spdx:PSF-2.0')
url="https://www.python.org/"
msys2_references=(
  "cpe: cpe:/a:python:python"
  "cpe: cpe:/a:python_software_foundation:python"
)
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
         "${MINGW_PACKAGE_PREFIX}-expat"
         "${MINGW_PACKAGE_PREFIX}-bzip2"
         "${MINGW_PACKAGE_PREFIX}-libffi"
         "${MINGW_PACKAGE_PREFIX}-mpdecimal"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-openssl"
         "${MINGW_PACKAGE_PREFIX}-sqlite3"
         "${MINGW_PACKAGE_PREFIX}-tcl"
         "${MINGW_PACKAGE_PREFIX}-tk"
         "${MINGW_PACKAGE_PREFIX}-zlib"
         "${MINGW_PACKAGE_PREFIX}-xz"
         "${MINGW_PACKAGE_PREFIX}-tzdata")
makedepends=(
  "${MINGW_PACKAGE_PREFIX}-cc"
  "${MINGW_PACKAGE_PREFIX}-autotools"
  "autoconf-archive"
)
#options=('debug' '!strip')
source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
        "EXTERNALLY-MANAGED"
        https://github.com/python/cpython/commit/29648980d440e70ade4e0975b8d6aa83214866ed.patch
        0001-sysconfig-make-_sysconfigdata.py-relocatable.patch
        0002-build-add-with-nt-threads-and-make-it-default-on-min.patch
        0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch
        0004-configure-add-MACHDEP-and-platform-on-MINGW.patch
        0005-Add-default-configuration-for-MINGW.patch
        0006-configure-enable-largefile-support-by-default-for-Mi.patch
        0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch
        0008-posixmodule.c-Define-necessary-headers-for-compiling.patch
        0009-Build-winreg-by-default-when-compiling-for-MINGW.patch
        0010-pyport.h-Add-support-for-MINGW.patch
        0011-configure-add-options-so-that-shared-build-is-possib.patch
        0012-Add-dynamic-loading-support-for-MINGW.patch
        0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch
        0014-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch
        0015-Enable-some-windows-specific-modules.patch
        0016-sysconfig-MINGW-build-extensions-with-GCC.patch
        0017-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch
        0018-Add-support-for-stdcall-without-underscore.patch
        0019-Customize-site-for-MINGW.patch
        0020-add-python-config-sh.patch
        0021-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch
        0022-msys-cygwin-semi-native-build-sysconfig.patch
        0023-sysconfig-mingw-sysconfig-like-posix.patch
        0024-mingw-use-backslashes-in-compileall-py.patch
        0025-mingw-pdcurses_ISPAD.patch
        0026-remove_path_max.default.patch
        0027-dont-link-with-gettext.patch
        0028-ctypes-python-dll.patch
        0029-gdbm-module-includes.patch
        0030-use-gnu_printf-in-format.patch
        0031-mingw-fix-ssl-dont-use-enum_certificates.patch
        0032-fix-using-dllhandle-and-winver-mingw.patch
        0033-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
        0034-MINGW-link-with-additional-library.patch
        0035-install-msilib.patch
        0036-fix-signal-module-build.patch
        0037-build-build-winconsoleio-and-_testconsole.patch
        0038-expose-sem_unlink.patch
        0039-Use-cygpty-while-using-isatty.patch
        0040-build-link-win-resource-files-and-build-pythonw.patch
        0041-fix-isselectable.patch
        0042-configure.ac-fix-inet_pton-check.patch
        0043-pass-gen-profile-ldflags.patch
        0044-pkg-config-windows-must-link-ext-with-python-lib.patch
        0045-importlib-bootstrap-path-sep.patch
        0046-warnings-fixes.patch
        0047-fix-build-testinternalcapi.patch
        0048-clang-arm64.patch
        0049-configure.ac-set-MINGW-stack-reserve.patch
        0050-Don-t-use-os.pathsep-to-find-EOF.patch
        0051-Fix-extension-suffix-for-c-extensions-on-mingw.patch
        0052-Change-the-get_platform-method-in-sysconfig.patch
        0053-build-Fix-ncursesw-include-lookup.patch
        0054-tests-fix-test_bytes.patch
        0055-time-fix-strftime-not-raising-for-invalid-year-value.patch
        0056-ctypes-find_library-c-should-return-None-with-ucrt.patch
        0057-build-Disable-checks-for-dlopen-dlfcn.patch
        0058-Fix-install-location-of-the-import-library.patch
        0059-build-Integrate-venvlauncher-build-installation-into.patch
        0060-configure.ac-set-_WIN32_WINNT-version.patch
        0061-configure.ac-don-t-check-for-clock_-functions.patch
        0062-expanduser-normpath-paths-coming-from-env-vars.patch
        0063-CI-test-the-build-and-add-some-mingw-specific-tests.patch
        0064-Define-PY3_DLLNAME-to-fix-build.patch
        0065-_testconsole.c-Fix-casing-path-sep.patch
        0066-Return-consistent-architecture-markers-for-python-on.patch
        0067-handle-ncursesw-pkg-config-when-cross-compiling.patch
        0068-mingw_smoketests-fix-_UCRT-condition.patch
        0069-Modify-sys.winver-to-match-upstream.patch
        0070-Change-user-site-packages-path-to-include-the-enviro.patch
        0071-configure-Include-a-header-in-the-check-for-_beginth.patch
        0072-configure.ac-Default-to-without-c-locale-coercion-on.patch
        0073-Fix-failing-tests.patch
        0074-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch
        0075-def-VPATH-when-compiling-Python-sysmodule.c.patch
        0076-Make-_Py_CheckPython3-extern.patch
        0077-link-with-bcrypt.patch
        0078-correctly-find-native-python.patch
        0079-Add-extra-flags-for-_bootstrap_python.patch
        0080-posixmodule-undefine-HAVE_OPENDIR.patch
        0081-getpath.py-add-support-for-mingw.patch
        0082-Don-t-build-_posixsubprocess-on-Windows.patch
        0083-_ssl-link-with-ws2_32.patch
        0084-Always-normalize-path-in-abspath.patch
        0085-Include-winsock.h-when-checking-for-netdb-function.patch
        0086-include-_multiprocessing-semaphore.c-on-win32.patch
        0087-configure-build-mmap-module-on-win32.patch
        0088-venv-creation-fixes.patch
        0089-move-the-shutdown-function-where-winsock.h-is-includ.patch
        0090-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch
        0091-configure.ac-fix-building-some-test-modules.patch
        0092-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch
        0093-Always-convert-to-before-passing-though-pathcch-func.patch
        0094-Build-venvlauncher.exe-from-PC-launcher.c.patch
        0095-getpath.py-fix-dirname.patch
        0096-getpath-use-normpath-on-all-generated-paths.patch
        0097-pathconfig-normpath-sys.path-0.patch
        0098-smoketests-add-some-tests-for-sys-site-paths.patch
        0099-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch
        0100-Build-and-install-libpython3.dll.patch
        0101-Port-GetPythonImport-to-mingw.patch
        0102-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch
        0103-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch
        0104-Add-missing-library-for-multiprocessing-module.patch
        0105-selectmodule-add-support-for-MINGW.patch
        0106-readline-disable-on-MINGW.patch
        0107-Add-libraries-to-fix-compile-of-ctypes-on-MINGW.patch
        0108-Add-lpython-version-while-linking-stdlib.patch
        0109-Enable-_uuid-on-MINGW.patch
        0110-Enable-curses-library-on-MINGW.patch
        0111-mingw_smoketests-disable-distutils-related-tests.patch
        0112-configure.ac-use-autoconf-2.69.patch
        0113-CI-clean-up-ignored-tests.patch
        0114-gcc-make-incompatible-pointer-types-as-warning.patch
        0115-test_makefile-normalize-path.patch
        0116-sysconfig.get_platform-use-consistent-naming.patch
        0117-Add-ucrt-to-version-string.patch
        0118-socketmodule-fix-captilization-of-headers.patch
        0119-mingw_smoketests-build-extension-in-a-venv.patch
        0120-venvlauncher-try-looking-for-the-versioned-.exe-firs.patch
        0121-fixup-CI-test-the-build-and-add-some-mingw-specific-.patch)

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
  for _patch in "$@"
  do
    msg2 "Applying ${_patch}"
    patch -Nbp1 -i "${srcdir}/${_patch}"
  done
}

prepare() {
  cd "${srcdir}/Python-${pkgver}"

 apply_patch_with_msg 0001-sysconfig-make-_sysconfigdata.py-relocatable.patch \
  0002-build-add-with-nt-threads-and-make-it-default-on-min.patch \
  0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch \
  0004-configure-add-MACHDEP-and-platform-on-MINGW.patch \
  0005-Add-default-configuration-for-MINGW.patch \
  0006-configure-enable-largefile-support-by-default-for-Mi.patch \
  0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch \
  0008-posixmodule.c-Define-necessary-headers-for-compiling.patch \
  0009-Build-winreg-by-default-when-compiling-for-MINGW.patch \
  0010-pyport.h-Add-support-for-MINGW.patch \
  0011-configure-add-options-so-that-shared-build-is-possib.patch \
  0012-Add-dynamic-loading-support-for-MINGW.patch \
  0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch \
  0014-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch \
  0015-Enable-some-windows-specific-modules.patch \
  0016-sysconfig-MINGW-build-extensions-with-GCC.patch \
  0017-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch \
  0018-Add-support-for-stdcall-without-underscore.patch \
  0019-Customize-site-for-MINGW.patch \
  0020-add-python-config-sh.patch \
  0021-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch \
  0022-msys-cygwin-semi-native-build-sysconfig.patch \
  0023-sysconfig-mingw-sysconfig-like-posix.patch \
  0024-mingw-use-backslashes-in-compileall-py.patch \
  0025-mingw-pdcurses_ISPAD.patch \
  0026-remove_path_max.default.patch \
  0027-dont-link-with-gettext.patch \
  0028-ctypes-python-dll.patch \
  0029-gdbm-module-includes.patch \
  0030-use-gnu_printf-in-format.patch \
  0031-mingw-fix-ssl-dont-use-enum_certificates.patch \
  0032-fix-using-dllhandle-and-winver-mingw.patch \
  0033-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \
  0034-MINGW-link-with-additional-library.patch \
  0035-install-msilib.patch \
  0036-fix-signal-module-build.patch \
  0037-build-build-winconsoleio-and-_testconsole.patch \
  0038-expose-sem_unlink.patch \
  0039-Use-cygpty-while-using-isatty.patch \
  0040-build-link-win-resource-files-and-build-pythonw.patch \
  0041-fix-isselectable.patch \
  0042-configure.ac-fix-inet_pton-check.patch \
  0043-pass-gen-profile-ldflags.patch \
  0044-pkg-config-windows-must-link-ext-with-python-lib.patch \
  0045-importlib-bootstrap-path-sep.patch \
  0046-warnings-fixes.patch \
  0047-fix-build-testinternalcapi.patch \
  0048-clang-arm64.patch \
  0049-configure.ac-set-MINGW-stack-reserve.patch \
  0050-Don-t-use-os.pathsep-to-find-EOF.patch \
  0051-Fix-extension-suffix-for-c-extensions-on-mingw.patch \
  0052-Change-the-get_platform-method-in-sysconfig.patch \
  0053-build-Fix-ncursesw-include-lookup.patch \
  0054-tests-fix-test_bytes.patch \
  0055-time-fix-strftime-not-raising-for-invalid-year-value.patch \
  0056-ctypes-find_library-c-should-return-None-with-ucrt.patch \
  0057-build-Disable-checks-for-dlopen-dlfcn.patch \
  0058-Fix-install-location-of-the-import-library.patch \
  0059-build-Integrate-venvlauncher-build-installation-into.patch \
  0060-configure.ac-set-_WIN32_WINNT-version.patch \
  0061-configure.ac-don-t-check-for-clock_-functions.patch \
  0062-expanduser-normpath-paths-coming-from-env-vars.patch \
  0063-CI-test-the-build-and-add-some-mingw-specific-tests.patch \
  0064-Define-PY3_DLLNAME-to-fix-build.patch \
  0065-_testconsole.c-Fix-casing-path-sep.patch \
  0066-Return-consistent-architecture-markers-for-python-on.patch \
  0067-handle-ncursesw-pkg-config-when-cross-compiling.patch \
  0068-mingw_smoketests-fix-_UCRT-condition.patch \
  0069-Modify-sys.winver-to-match-upstream.patch \
  0070-Change-user-site-packages-path-to-include-the-enviro.patch \
  0071-configure-Include-a-header-in-the-check-for-_beginth.patch \
  0072-configure.ac-Default-to-without-c-locale-coercion-on.patch \
  0073-Fix-failing-tests.patch \
  0074-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch \
  0075-def-VPATH-when-compiling-Python-sysmodule.c.patch \
  0076-Make-_Py_CheckPython3-extern.patch \
  0077-link-with-bcrypt.patch \
  0078-correctly-find-native-python.patch \
  0079-Add-extra-flags-for-_bootstrap_python.patch \
  0080-posixmodule-undefine-HAVE_OPENDIR.patch \
  0081-getpath.py-add-support-for-mingw.patch \
  0082-Don-t-build-_posixsubprocess-on-Windows.patch \
  0083-_ssl-link-with-ws2_32.patch \
  0084-Always-normalize-path-in-abspath.patch \
  0085-Include-winsock.h-when-checking-for-netdb-function.patch \
  0086-include-_multiprocessing-semaphore.c-on-win32.patch \
  0087-configure-build-mmap-module-on-win32.patch \
  0088-venv-creation-fixes.patch \
  0089-move-the-shutdown-function-where-winsock.h-is-includ.patch \
  0090-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch \
  0091-configure.ac-fix-building-some-test-modules.patch \
  0092-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch \
  0093-Always-convert-to-before-passing-though-pathcch-func.patch \
  0094-Build-venvlauncher.exe-from-PC-launcher.c.patch \
  0095-getpath.py-fix-dirname.patch \
  0096-getpath-use-normpath-on-all-generated-paths.patch \
  0097-pathconfig-normpath-sys.path-0.patch \
  0098-smoketests-add-some-tests-for-sys-site-paths.patch \
  0099-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch \
  0100-Build-and-install-libpython3.dll.patch \
  0101-Port-GetPythonImport-to-mingw.patch \
  0102-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch \
  0103-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch \
  0104-Add-missing-library-for-multiprocessing-module.patch \
  0105-selectmodule-add-support-for-MINGW.patch \
  0106-readline-disable-on-MINGW.patch \
  0107-Add-libraries-to-fix-compile-of-ctypes-on-MINGW.patch \
  0108-Add-lpython-version-while-linking-stdlib.patch \
  0109-Enable-_uuid-on-MINGW.patch \
  0110-Enable-curses-library-on-MINGW.patch \
  0111-mingw_smoketests-disable-distutils-related-tests.patch \
  0112-configure.ac-use-autoconf-2.69.patch \
  0113-CI-clean-up-ignored-tests.patch \
  0114-gcc-make-incompatible-pointer-types-as-warning.patch \
  0115-test_makefile-normalize-path.patch \
  0116-sysconfig.get_platform-use-consistent-naming.patch \
  0117-Add-ucrt-to-version-string.patch \
  0118-socketmodule-fix-captilization-of-headers.patch \
  0119-mingw_smoketests-build-extension-in-a-venv.patch \
  0120-venvlauncher-try-looking-for-the-versioned-.exe-firs.patch \
  0121-fixup-CI-test-the-build-and-add-some-mingw-specific-.patch

  autoreconf -vfi
}

build() {
  declare -a _extra_config
  if check_option "debug" "n"; then
    _extra_config+=("--enable-optimizations")
    # Upstream defaults to -O3, so we can do too
    CFLAGS+=" -O3"
    # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10
    if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
      _extra_config+=("--with-lto")
    fi
  else
    CFLAGS+=" -O0 -ggdb"
    CXXFLAGS+=" -O0 -ggdb"
    _extra_config+=("--with-pydebug")
  fi

  case "${CARCH}" in
    i686)
      LDFLAGS+=" -Wl,--large-address-aware"
    ;;
  esac

  mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"

  ../Python-${pkgver}/configure \
    --prefix=${MINGW_PREFIX} \
    --host=${MINGW_CHOST} \
    --build=${MINGW_CHOST} \
    --enable-shared \
    --with-system-expat \
    --with-system-ffi \
    --with-system-libmpdec \
    --without-ensurepip \
    --enable-loadable-sqlite-extensions \
    --with-tzpath=${MINGW_PREFIX}/share/zoneinfo \
    "${_extra_config[@]}"

  make
}

check() {
  cd "${srcdir}/build-${MSYSTEM}"

  # Some basic tests to ensure nothing major or MSYS2 specific features are broken
  ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
  MSYSTEM= ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
}

package() {
  cd "${srcdir}/build-${MSYSTEM}"

  make -j1 install DESTDIR="${pkgdir}"

  # gdb pretty printers for debugging Python itself; to use:
  # python
  # sys.path.append('C:/msys64/mingw64/share/gdb/python3')
  # import python_gdb
  # reload(python_gdb)
  # end
  if [[ "${_primary_python}" == "yes" ]]; then
    [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/
    cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py
  fi

  # some useful "stuff"
  install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts}
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/scripts/{README,*py} "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/scripts/

  # License
  install -Dm644 "${srcdir}/Python-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}${_pybasever}/LICENSE"

  # PEP668
  install -Dm644 "${srcdir}/EXTERNALLY-MANAGED" -t "${pkgdir}${MINGW_PREFIX}/lib/python${_pybasever}/"

  # fixup shebangs
  for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do
    sed -e '1 { s|^#!.*$|#!/usr/bin/env python'"${_pybasever}"'.exe| }' -i "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
  done

  # default aliases for all scripts/binaries
  if [[ "${_primary_python}" == "yes" ]]; then
    # Default names are aliases for Python now
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config
    cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
    cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc
  fi

  # delete anything that could conflict with the primary Python
  if [[ "${_primary_python}" != "yes" ]]; then
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config
    rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/libpython3.dll
    rm "${pkgdir}${MINGW_PREFIX}"/lib/libpython3.dll.a
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc
    rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1
  fi
}

sha256sums=('c909157bb25ec114e5869124cc2a9c4a4d4c1e957ca4ff553f1edc692101154e'
            '3981fed74ee7d43ad69bd67e634e03d7bf6890558a87062380112e195688728a'
            'b5c9ad802d6f3614aefbaec593c1c670dd1918b56e4ac9a682a6f23dfba579fa'
            '99a725197083b45976c8f83c0f83d5f886326eeb957ae7c62104bbd637dcb930'
            '8d7f584b0d8931cd036b1ffc6c4eab2a28318aa6f9371e20554d7ff9add63d36'
            '8890ce1c8cf29542b0cccb3e6dad76eacc29f865b327f0fa50208eaf5ac0188a'
            '551e4ca3abdcc4b76b4271dc5de3d5dad5b98e08b2a72a5f4328fbdc6207b908'
            'bc44cd5fe9bb0153f35b6cd25caf65f5824aa5afc10895a23053d59d8b0ed450'
            '8019abac214d5c00aedcb2c5b79ed0a1a86516bbc8ab02e4d07271c23aaebff5'
            'dd0c81dd7d8ed6dd571dd522fc3da4435adc818493c24422f2bd7e5d86622fcc'
            '3b35f07d86c4d31b949d79b5c5c48882600cc0079ac404522d40032828f70ffb'
            'cd89c16e56427f68fd612e23060690cb1de6e00d80f6542cde60a73f77495220'
            '73b3426bba4dd6abc804dc1c4ac8f0dd00eaf45e29ec381f774aea3153f6d354'
            '5122b343fe7f14ef616dc7fce942fdec531d712f5300331b8b5d59a1de717159'
            'b9d7209fde663e7ac54b18293eeed14926199566a6ed6b2dda6e14ba5d3dd214'
            '00c32f76381031142e99025a129351923ac640d72e9a45d9ac596bd320634396'
            '27830c4952b3dc5685f30faaee20a633c0813f305b6d3557050ffc2788c17e5d'
            'cb67a06828a52d9e29a366b1d961a6c333ebc5c02025a55cf807f0db7d639f23'
            '38a3ad51e0c11994738443f79868a8bef6c9f009511f48f182fd27fb4b307976'
            '0e3548a2c69feb08ab308bb2b2d770e3d5a2f3c6b15dd088f94afd6ed0794fd3'
            '02b3697300e55be578f15b9fa65eb9413994bc4d9141b47775434fa4fde694a1'
            'dda305e36ce64300995c3f21f34b2d94f7c52ddbad2ee4dbda8a3a400f95a8dd'
            'e0e45006ca5d8a3ba0a18143b93b652cf12025b7b1ba41f8c4937a50a9951a4c'
            '5b1664468ceaaf7fd36c3785c3aa2c1ac7ba41f3407a1824e5912c8dd8a39e88'
            '75f2cdbd18c815de3669a83be3021950b1926400f9664fccf4c5b6fd34887ebf'
            'ad2693a8413603776f055729a69e7f55816754275b5cfbac0c9b55819daa6537'
            'd5be902e4a362411c02cf5f13545c406fda915113df30751195b2ce63a759a24'
            'a482339131f9002caffee5dfbc83a623c15b7bcb6d635cf945e8f51437bc1602'
            'd022384e13b6ec26b79ead8e17954fd5b159604ccb023e26216909e9fd02805a'
            '4922884402d1c1f52f64db7fb03189c506f6059d70b94ce2fce46dbae8420328'
            '64a29d74a62a5b2ed7658957582aa662b0138278349e9b22388e6c52bae25127'
            'ed433c75ff5c307a5fd5009e5a68a884e7827bd76e23922b1a7ac9470931ba2b'
            'c86fcb519577bca3feff1f361b2544be4f2d1bc6e3df30a66b6ca6f2ed95c864'
            'c7828f298a982bd911cf3c09762fd1594610af7c5e2e2bb0e4531f47f831f294'
            'd1f5a707a2efb1893f5ec47bf9a81827e62af976014bb59f3356e93e29fc4ee8'
            'bcc13409cec02e00f64e9187c55ce454cd69d832e0784c8c3c6781bc3aa9811f'
            '645ce79e9800b0d0ea9b33641784daf5f07b2c26ebbb4e0cc148ca41bdbdba09'
            '1903432628974f7759e1f4655a2d676471d77eeb976eb83239f62751cdbef767'
            'a0c28f58b620409c998bb5b5b9447e20f987f0cf77eb861fae49f7c6ec61dff1'
            '0e018f00ec68c131f5fdd94066bb5c90c06b95dd2169567b68f447dfb0d1f26a'
            '01d411bd5c170204e40f487fbe5cc840bcd0e2bfa73911f86c9b01de2ed475e7'
            '02a1e3b24a5c6fa9fa44e5a49b31e4a9585b25a83bb8d4678d91792b2c8a4a95'
            '1c337d381ff6dbd931fa60ed9504a9b9b21d112fa715579a037f25ead656798f'
            'd7316d3b79c742ef6083a463159c752b3090e359cfa7b391db2836eceb5e0464'
            'a98314fca3497892e4e1c7ddeb456bfbefc7dc2f83b79d2d2521e3c01c68511f'
            'aea6fb92e03906eb81b7a92f28da8f8862385205075d12af77d5204e8a0a58fb'
            '2537858485d7f9bbbb63f20e5989f4e1137794c7ef784051bb0cb59f185e324d'
            'c1d7572e3dd76f636e752b23f8ef3813885937a4fdd68bbdd458d41423b6ced1'
            '575ccde95bc912caf381775ef59d531b61c2f3ab9345c4fb8dec4b1015a6e78a'
            '0682b761a143d79a258c2d4bbf39d6ec79e113b9f4aab18a4b2f51e2f13a763a'
            '38dc9cddff70211f05b2a6225d977e30f3555e6c2404a0ccca4d9fd747f556b2'
            '5d825c4693b96357660cc805a144de3efc5e6f96f7ea5d6b2c10cea312173b40'
            '1d348984c6f4c4caf3bcb67f4fc7eca197d540f8fbc1bf347b2f54485d5f36ef'
            '95b9d96a7d31a120bff0a8b635fde499e8d7230830e108fb23593a932fb22d5a'
            '17c890a07e67b5f316ebcd01beb82f3d9e1867daa4c60d869da903e5bf37538c'
            '88bcf772c5f062d77b7af546dd704f5692bc15803b428e96482d85b8ffb341f4'
            'bde7ea7f00fbc80e67c4131b41c88dd9f5812ea9d14f95ca828c6b09a785a970'
            '8ee234f814fb9ed59ddd2363fb4c62655475230c25a99deebcdee8a49569915e'
            'd9bebb48c538796626ed672763ace78d14d1cb7c6a8c1ec85ed14534b92a85c9'
            '35e639792148ad85a0fee7d02e7d3e4c45d0c50b6c3847b8928dc1194e39cfb3'
            '96fa708d8ee0a30b7f94c3565283688cf6509fe698ad681112c6db7a42b9c523'
            '44cb251d511b204a5a634bf84df36336362eb08b558d1a989cb3d12e2036f2e6'
            'b053a55849e1b3ff71885a68b97053ff02e21cda10295e53f451c5ec8d3226d6'
            'f63f6a27865e962c299b7211c569d92570c8912b98d5a956137aabe743077411'
            '7ee683cbe3411b39cbc3153d3f9ff08f8f5249c688f74d2cf30bc83acd5886e0'
            '665f91216c0b75f5013bfb1938e90abccb0b223353581ae1400b9f6673f58c79'
            '693663f05803fe51cd1bbb643e397f534f70da51740ab4fd020af13b1da113e3'
            'd2fd5a3ef1732946354a7f2fad5172b6dea81c3c8d1706602926b9c5fc532dbf'
            '7d59450d38d6727ea68362175d34418b8eeee434d6616acd13a1050c74d25355'
            '6e5bbaf46a5c4e5a202ee959f4d290df953a25b9895b5d90eb8f9065bbabc28f'
            '73d7ef2a25533c4b074f4b2d20a31ed3942bb6dbeb44ab5ffc7c5b91bd09fa93'
            '9254a06a8398ad6d9d617fc6085654cb7bf8ba4d572dadfec59b88629fe6aa5a'
            '84e2e29cfef3ef1959a320ce4a748cdfd6490998907a030374477891373127ef'
            'fb4ea4f0f97c6ae8d16c65d4ce343885951df26d02f7cefa9752801f01690bba'
            'ae3a87ad8372669c1e969e141da3a95affa1dbfd7d356c55230a30f272071249'
            '8a8e330e32c466025f6dd9945f594b2933ba7b826989b61dd04dcec6d9de83b1'
            'ad0a0800f3f107768b4007513037677e670e7a6edab2ad9c643bd4aa6bb31b57'
            'dc2fd17a88785dc06e09e9315d212428914d7b244ac0bb1e4a7dfa5bc3bdb1d4'
            'fa52f193e63fc7c4bcccea77e3885bf49b324e63cf211611bb8c556ee0ca14ec'
            '2ab371495ed8c0e638d536958b708f39e9c774f6ffd8915217e9a2c0dc09edda'
            'a1850da297dee4754b8b04d982fcd16d080459078ff60bdcf0f0dfb2d63034ec'
            '24cdf7a391bd817d6ec7cf84ebc94dba1256e57af252a2c4ad78b6578d96f66d'
            '55cf108b35dd88bbce8549ffcbdd53d3cbd05c893b6f4768ba684034fb4b059c'
            '9713ff1aed82127284fd32d507d38e8a1c2042e09b36fe5a87bf2ff372e574b1'
            'e2dd925f6c883a46d63cb17e3cf66aea60d5dcb52e790d50f8bdb76e8f90a6d8'
            '1ac0fbee00424b5ad38fa654938d30edda80a3cecb5ebb83050af5e753b7fa38'
            'b55e539696503249ac34947efba48132b8a2e11ba31ade0a5094db77f87f7620'
            '2866852b8cbfba91c2db1dc155b434ae18f268fafe5ccd871f78c4361d4cd8e7'
            '54b81c8a5a1f84d99a4fe7df6e1e426c4341612a258072b94c66608613fc7ffc'
            '8360046ff080c76d3ce3827ab0433e271e47469752ed3122156d052cb87e112d'
            '20cb6ec35f9f0ac6fc8e352c20306b5f782a6a9d9d73c630c1c21eda9622e84e'
            'c53961f34555594ddcdbae5d664850d2f601979a4da235ffff7894e91154f74b'
            'cf847ba27c776fee4396190f2feed79a8a5f1d82581225c9849857bb1a8502e7'
            '9a730b67142ff12e03ac4cda15bd939b0e429ec59c44de5a81b4c6ee79dddf40'
            '93ff6ad7056cf4708fbabfbe3a6f2be4048f7fa2346d0d97df785fa875a32c0d'
            '89c53853e78d1b85fd5f95a5587846041885ce5176a6109d6b8bf8ae480b2762'
            '26661ba6b81e891f34dbda331fa1d91e3614978024af5611854184e6f93cc9bc'
            '70b084706e30419e99eb598bc453a19ec880965ed1570469fbb135ccae5e078a'
            '0ed7bd0e5e98ce754187843ef769b96346830e910afaa4acf248a829fc41f61f'
            'a743de146d2fd0bb08449fb86064f7c774c96997d54a838ed83774397fe408c8'
            '09c08d9dbec931d6043442287bc2633043ae6150d0e3a34b56a953d678fe81bf'
            '5d5014afecdcce49dee7b298ccc7a533f8f8c92661eed5b8c47d785378205af1'
            'f07f0eb965874f747bf96153c739a944ae40b4ca44f28d21bee359c15a3c8eb1'
            'c15daf2ea197d7a6a04ea83ba5768fe058c2bddfa07bde6caf8054c3ba63f704'
            '36d4abf8e7825439da6b85e2ee9f599d27bf633cc1fed95be46fa3d51f8bb063'
            '20c50f9991b092ffb566078676c97499eae2c0dd8f17a8315f801ebf97f61b4a'
            'e836c4e768f24f81bbc818615ba0ef7240f60af33338b4a387d62448cab60fd0'
            '3b3e3fe8985f0b5657efe5fc5afdce9537a3d050748d2807864bf901951cb47d'
            'b7da56ba7973b731f6bf48881ea5b3309db15113b97b1b420f54072069d22f0b'
            '70e7aa4bf1a540dd1d7cc63f521fc60ad288b0d088f75b4a04b8688224dc1a06'
            'f97a28ad194e48ac3d3a13555577e06d9d5d2102f2024f72daddf3798a8cd7a4'
            '86339297774d3e8346647045dde2e08610d88ece6adf14c50e717b3c392c4c2a'
            'e111e082669e4eff517f21af6550578b91317165c8084b635cdf6d692d494112'
            '7f40a195937a26efa6802aa73e83a9679aee63238f6592b75bb1bfad9cbdc93d'
            '5461421f2204b1f67eb44dbf1e71b8d10861ac8569aab68793a414a947e7e447'
            '2a9b6fc4dc35f345810f02e1be91d7ead720b7f7e9b83000eedf2108c919f5d2'
            '444b2191a05773c35c426ceb223569dddbfb884809bc7faebb09a9767103676b'
            '472e69be37ff7329cdae038599577138a4c01e0b47ecd06ac1714754da4e4ffd'
            '0ed1acd16ab19ea3ccfe921c8cc34115e0d98ea6cd8d3963ad1b2a08981343d8'
            '68bdc9eb85d0eb4615e6700064f57362eba9b82d4bd203ba00d636a3f102a0f7'
            'c78fd3861bad821501f8b5cb4cd952d5e52525aedd971a452960e26a4ac65281'
            'bbdaef8d4beeb31e91d71cbaa47727d6645ff2fbf88d6a4dd0e4a9d71244c4ba'
            'a71928b504076bacef464afc80072aa27bd3d32575175c14e8362f75ebfeb847'
            '05432d09322e8b9077f301bdf6b99466a4514f7daaa84ed746e3635ba111f1d1')
