From aed8ce9da277f5ecffe968b324f242c41c3b752a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 10:50:31 +0200 Subject: Adding upstream version 2:9.0.1378. Signed-off-by: Daniel Baumann --- ci/appveyor.bat | 114 ++++++++++++++++++++++++++++++++++++++++++++++ ci/build-snd-dummy.sh | 19 ++++++++ ci/config.mk.clang-12.sed | 3 ++ ci/config.mk.clang.sed | 2 + ci/config.mk.gcc.sed | 1 + ci/config.mk.sed | 3 ++ ci/if_ver-1.vim | 25 ++++++++++ ci/if_ver-2.vim | 8 ++++ ci/if_ver-cmd.vim | 12 +++++ ci/load-snd-dummy.sh | 8 ++++ ci/setup-xvfb.sh | 17 +++++++ 11 files changed, 212 insertions(+) create mode 100644 ci/appveyor.bat create mode 100644 ci/build-snd-dummy.sh create mode 100644 ci/config.mk.clang-12.sed create mode 100644 ci/config.mk.clang.sed create mode 100644 ci/config.mk.gcc.sed create mode 100644 ci/config.mk.sed create mode 100644 ci/if_ver-1.vim create mode 100644 ci/if_ver-2.vim create mode 100644 ci/if_ver-cmd.vim create mode 100644 ci/load-snd-dummy.sh create mode 100644 ci/setup-xvfb.sh (limited to 'ci') diff --git a/ci/appveyor.bat b/ci/appveyor.bat new file mode 100644 index 0000000..5498769 --- /dev/null +++ b/ci/appveyor.bat @@ -0,0 +1,114 @@ +@echo off +:: Batch file for building/testing Vim on AppVeyor +set target=%1 + +setlocal ENABLEDELAYEDEXPANSION +cd %APPVEYOR_BUILD_FOLDER% + +:: Python3 +set PYTHON3_VER=311 +set PYTHON3_RELEASE=3.11.1 +set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe +set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64 + +set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" + +if exist "%VSWHERE%" ( + for /f "usebackq delims=" %%i in ( + `"%VSWHERE%" -products * -latest -property installationPath` + ) do ( + set "VCVARSALL=%%i\VC\Auxiliary\Build\vcvarsall.bat" + ) +) + +if not exist "%VCVARSALL%" ( + set "VCVARSALL=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" +) +call "%VCVARSALL%" x64 + +goto %target% +echo Unknown build target. +exit 1 + +:: ---------------------------------------------------------------------------- +:install +@echo on +if not exist downloads mkdir downloads + +:: Python 3 +if not exist %PYTHON3_DIR% ( + call :downloadfile %PYTHON3_URL% downloads\python3.exe + cmd /c start /wait downloads\python3.exe /quiet TargetDir=%PYTHON3_DIR% ^ + Include_pip=0 Include_tcltk=0 Include_test=0 Include_tools=0 ^ + AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 ^ + InstallLauncherAllUsers=0 +) +@echo off +goto :eof + +:: ---------------------------------------------------------------------------- +:build + +cd src + +echo "Building MSVC 64bit console Version" +nmake -f Make_mvc.mak CPU=AMD64 ^ + OLE=no GUI=no IME=yes ICONV=yes DEBUG=no ^ + FEATURES=%FEATURE% +if not exist vim.exe ( + echo Build failure. + exit 1 +) + +:: build MSVC huge version with python and channel support +:: GUI needs to be last, so that testing works +echo "Building MSVC 64bit GUI Version" +if "%FEATURE%" == "HUGE" ( + nmake -f Make_mvc.mak CPU=AMD64 ^ + OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^ + PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^ + PYTHON3_VER=%PYTHON3_VER% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^ + FEATURES=%FEATURE% +) ELSE ( + nmake -f Make_mvc.mak CPU=AMD64 ^ + OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no ^ + FEATURES=%FEATURE% +) +if not exist gvim.exe ( + echo Build failure. + exit 1 +) +.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt || exit 1 + +echo "version output MSVC console" +.\vim --version || exit 1 +echo "version output MSVC GUI" +type ver_msvc.txt || exit 1 + +goto :eof + +:: ---------------------------------------------------------------------------- +:test +@echo on +cd src/testdir +:: Testing with MSVC gvim +path %PYTHON3_DIR%;%PATH% +nmake -f Make_mvc.mak VIMPROG=..\gvim +nmake -f Make_mvc.mak clean +:: Testing with MSVC console version +nmake -f Make_mvc.mak VIMPROG=..\vim + +@echo off +goto :eof + +:: ---------------------------------------------------------------------------- +:downloadfile +:: call :downloadfile +if not exist %2 ( + curl -f -L %1 -o %2 +) +if ERRORLEVEL 1 ( + rem Retry once. + curl -f -L %1 -o %2 || exit 1 +) +@goto :eof diff --git a/ci/build-snd-dummy.sh b/ci/build-snd-dummy.sh new file mode 100644 index 0000000..a2380b4 --- /dev/null +++ b/ci/build-snd-dummy.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -eu + +LINUX_VERSION=$(uname -r | cut -d. -f1-2) +LINUX_ARCHIVE_FILE=v${LINUX_VERSION}.tar.gz +LINUX_SOURCE_DIR=linux-${LINUX_VERSION} + +mkdir -p "${TMPDIR}" +cd "${TMPDIR}" + +wget -q "https://github.com/torvalds/linux/archive/${LINUX_ARCHIVE_FILE}" + +tar -xf "${LINUX_ARCHIVE_FILE}" "${LINUX_SOURCE_DIR}/sound" +cd "${LINUX_SOURCE_DIR}/sound" + +CC=gcc make -C "/lib/modules/$(uname -r)/build" M="${PWD}" CONFIG_SOUND=m CONFIG_SND=m CONFIG_SND_PCM=m CONFIG_SND_DUMMY=m modules + +mkdir -p "${SND_DUMMY_DIR}" +cp soundcore.ko core/snd.ko core/snd-pcm.ko drivers/snd-dummy.ko "${SND_DUMMY_DIR}" diff --git a/ci/config.mk.clang-12.sed b/ci/config.mk.clang-12.sed new file mode 100644 index 0000000..810b723 --- /dev/null +++ b/ci/config.mk.clang-12.sed @@ -0,0 +1,3 @@ +# Clang 12 (or Apple clang 13) and later makes a warning '-Wcompound-token-split-by-macro' enable by default. +/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro/ +/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro/ diff --git a/ci/config.mk.clang.sed b/ci/config.mk.clang.sed new file mode 100644 index 0000000..9dc271c --- /dev/null +++ b/ci/config.mk.clang.sed @@ -0,0 +1,2 @@ +/^CFLAGS[[:blank:]]*=/s/$/ -Wno-error=missing-field-initializers/ +/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unknown-attributes -Wno-error=ignored-attributes/ diff --git a/ci/config.mk.gcc.sed b/ci/config.mk.gcc.sed new file mode 100644 index 0000000..f46e488 --- /dev/null +++ b/ci/config.mk.gcc.sed @@ -0,0 +1 @@ +/^CFLAGS[[:blank:]]*=/s/$/ -Wno-error=maybe-uninitialized/ diff --git a/ci/config.mk.sed b/ci/config.mk.sed new file mode 100644 index 0000000..51e7ec9 --- /dev/null +++ b/ci/config.mk.sed @@ -0,0 +1,3 @@ +/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/ +/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function/ +/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/ diff --git a/ci/if_ver-1.vim b/ci/if_ver-1.vim new file mode 100644 index 0000000..adc40a7 --- /dev/null +++ b/ci/if_ver-1.vim @@ -0,0 +1,25 @@ +" Print all interface versions for Ubuntu. Part 1. + +if 1 + execute 'source' expand(':h') .. '/if_ver-cmd.vim' + + echo "*** Interface versions ***\n" + + echo 'Lua:' + PrintVer lua print(vim.lua_version, jit and "(LuaJIT)" or "") + + echo 'MzScheme:' + PrintVer mzscheme (display (version)) + + echo 'Perl:' + PrintVer perl print $^V + + echo 'Ruby:' + PrintVer ruby print RUBY_VERSION + + echo 'Tcl:' + PrintVer tcl puts [info patchlevel] + + echo 'Python 2:' + PrintVer python print sys.version +endif diff --git a/ci/if_ver-2.vim b/ci/if_ver-2.vim new file mode 100644 index 0000000..83e80e4 --- /dev/null +++ b/ci/if_ver-2.vim @@ -0,0 +1,8 @@ +" Print py3 interface versions for Ubuntu. Part 2. + +if 1 + execute 'source' expand(':h') .. '/if_ver-cmd.vim' + + echo 'Python 3:' + PrintVer python3 print(sys.version) +endif diff --git a/ci/if_ver-cmd.vim b/ci/if_ver-cmd.vim new file mode 100644 index 0000000..ac5d82a --- /dev/null +++ b/ci/if_ver-cmd.vim @@ -0,0 +1,12 @@ +" Provide 'PrintVer' command to print the interface versions. + +func s:print_ver(lang, ...) + if has(a:lang) + exec a:lang join(a:000) + else + echo 'N/A' + endif + echo '' +endfunc + +command -nargs=+ PrintVer call print_ver() diff --git a/ci/load-snd-dummy.sh b/ci/load-snd-dummy.sh new file mode 100644 index 0000000..b0101b0 --- /dev/null +++ b/ci/load-snd-dummy.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +if ! modprobe snd-dummy; then + # snd-dummy is contained in linux-modules-extra (if exists) + apt-get install -yq --no-install-suggests --no-install-recommends "linux-modules-extra-$(uname -r)" + modprobe snd-dummy +fi diff --git a/ci/setup-xvfb.sh b/ci/setup-xvfb.sh new file mode 100644 index 0000000..cfc0f97 --- /dev/null +++ b/ci/setup-xvfb.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e + +apt-get install -y xvfb + +cat </etc/systemd/system/xvfb.service +[Unit] +Description=X Virtual Frame Buffer Service +After=network.target +[Service] +ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24 +[Install] +WantedBy=multi-user.target +EOT + +systemctl enable xvfb.service +systemctl start xvfb.service -- cgit v1.2.3