diff --git a/README.md b/README.md index cd84212..90451da 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,7 @@ Warning: `leaf` won't deal with the dependence relation, and currently won't che - Use `ensurepip` in *Chapter 7.10. Python-3.13.2* - Use `SBINDIR=/usr/bin/` to install `iproute2`. `ip` command should be avaliable for non-root - We won't install TeX files in *Chapter 8.72. Texinfo-7.2*. We will install TexLive. + +## issues +- `lfs/vim-9.1.1166` has `Test_write_backup_symlink` failed, which can pass if `call assert_true(filereadable('./Xbackup/Xwbsfile.bak')) +` is commented. Seams like cannot create this backup file. diff --git a/lfs/vim-9.1.1166.PKGBUILD b/lfs/vim-9.1.1166.PKGBUILD new file mode 100644 index 0000000..a9f9af3 --- /dev/null +++ b/lfs/vim-9.1.1166.PKGBUILD @@ -0,0 +1,42 @@ +pkgname=vim +pkgver=9.1.1166 +_versiondir=91 +pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor' +home='https://www.vim.org' +arch=('x86_64') +license=('custom:vim') +sources=("${pkgname}-${pkgver}.tar.gz") +urls=("https://github.com/vim/vim/archive/v${pkgver}/${sources[0]}") +md5sums=("718d43ce957ab7c81071793de176c2eb") + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 + echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h +} + +src_build() { + ./configure --prefix=/usr \ + --disable-gui \ + --with-x=no \ + --with-compiledby='LFS' + make +} + +src_check() { + leaf_record_message "Tests require at least 24 lines with 80 characters." + chown -R leaf . + sed '/test_plugin_glvs/d' -i src/testdir/Make_all.mak + echo "Testing... May take a while..." + su leaf -c "TERM=xterm-256color LANG=en_US.UTF-8 make -j1 test" \ + &> vim-test.log +} + +src_install() { + make DESTDIR="${pkgdir}" install + ln -sv vim ${pkgdir}/usr/bin/vi + for L in ${pkgdir}/usr/share/man/{,*/}man1/vim.1; do + ln -sv vim.1 $(dirname $L)/vi.1 + done + install -d ${pkgdir}/usr/share/doc/ + ln -sv ../vim/vim${_versiondir}/doc ${pkgdir}/usr/share/doc/vim-${pkgver} +}