From 77bf20bf046ee037cdf7b341b7384d43b12fc70c Mon Sep 17 00:00:00 2001 From: Brett A C Sheffield Date: Fri, 20 Nov 2026 09:48:20 +0000 Subject: [PATCH] app-editors/vim-classic-core: add 8.3.1 Signed-off-by: Brett A C Sheffield Part-of: https://codeberg.org/gentoo/gentoo/pulls/2474 Signed-off-by: Sam James --- app-editors/vim-classic-core/Manifest | 2 + .../vim-classic-core-8.3.1.ebuild | 237 ++++++++++++++++++ 2 files changed, 239 insertions(+) create mode 100644 app-editors/vim-classic-core/vim-classic-core-8.3.1.ebuild diff --git a/app-editors/vim-classic-core/Manifest b/app-editors/vim-classic-core/Manifest index f97f1a171e537..68563e34958c8 100644 --- a/app-editors/vim-classic-core/Manifest +++ b/app-editors/vim-classic-core/Manifest @@ -1,2 +1,4 @@ DIST vim-classic-core-8.3.0.tar.gz 14767832 BLAKE2B 309305bf99997e4c8f6d309de118f78da9e88de2e2909d4216f8991526fc430f7b0eedf6f7d5d91fdeb3dfe80935b2196880ab9438a8b9496d675d37f9386b11 SHA512 83417abe7989728aa4ed9da26b2779578cbad676f501953eaf04d4b99ea5615e8cf1df129c18c3e745aba7ed065d37c59015bc6461a5e5d4a5ea8a9c0364d7ca DIST vim-classic-core-8.3.0.tar.gz.sig 119 BLAKE2B f54d8a514146cca189966ecedf707590a0f76ff7ef2cd2bb6729c70dd68bb3e4644cb53ca28a7b7efa237466755d23acb2011bcd088f9c9e24d77d782a4c3a2f SHA512 947285dd9359c7399c358176c327f45b43c2bc58a3bec7a1d2ec838a7d070551f4f510ce92523110b6c590ef3ff0115683ebe7144ef4b6b9bb6dde72d8e11084 +DIST vim-classic-core-8.3.1.tar.gz 15098834 BLAKE2B 8b38d35ede637214a5375a70293f1661af00b7b48158bb001830c6fe311dabca38bc76819347802b1ebf5895f249c68dbccf5afadce136e066ec042c21929286 SHA512 654937237fbaf67cba6449861784d53d41110251179806d6a3c216d72337f56e70249e723cd57f3f8151528ff6e7336ad0ed787940566309e8ff17088e9e9860 +DIST vim-classic-core-8.3.1.tar.gz.sig 147 BLAKE2B acf2f7d28471fea977bf1e269d12a57940726bcf7cbc31d5be7ddf98595fc304c83965da9e6082eb83666f3c4d42299b60a6806ed247d33ba4f88aea77798dea SHA512 41078f568f8da3bd09e94a48c151608f5572d4cdf6a2aeee45f9e062126c6679d945a9eae35efdb3977dbf6b2b34c48446862745a5610fab565223c5d4b39ebd diff --git a/app-editors/vim-classic-core/vim-classic-core-8.3.1.ebuild b/app-editors/vim-classic-core/vim-classic-core-8.3.1.ebuild new file mode 100644 index 0000000000000..ff11e99bd902e --- /dev/null +++ b/app-editors/vim-classic-core/vim-classic-core-8.3.1.ebuild @@ -0,0 +1,237 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim-classic and app-editors/gvim-classic + +VIM_VERSION="8.3" +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/ddevault.asc +inherit desktop flag-o-matic prefix toolchain-funcs verify-sig vim-doc xdg-utils + +MYWORKDIR="${WORKDIR}/vim-classic-v${PV}" +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://git.sr.ht/~sircmpwn/vim-classic" + EGIT_CHECKOUT_DIR="${MYWORKDIR}" +else + SRC_URI=" + https://git.sr.ht/~sircmpwn/vim-classic/archive/v${PV}.tar.gz -> ${P}.tar.gz + verify-sig? ( + https://git.sr.ht/~sircmpwn/vim-classic/refs/download/v${PV}/vim-classic-v${PV}.tar.gz.sig + -> ${P}.tar.gz.sig + ) + " + KEYWORDS="~amd64" + BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-ddevault-20250219 ) " +fi + +DESCRIPTION="vim-classic and gvim-classic shared files" +HOMEPAGE="https://vim-classic.org/" +S="${MYWORKDIR}" + +LICENSE="vim" +SLOT="0" +IUSE="nls acl minimal" + +RDEPEND=" + !app-editors/vim-core + dev-util/xxd + >=virtual/editor-0-r8 +" +# ncurses is only needed by ./configure, so no subslot operator required +DEPEND=">=sys-libs/ncurses-5.2-r2:0" +BDEPEND+="dev-build/autoconf" + +# unbundle xxd +PATCHES+=( "${FILESDIR}/vim-core-unbundle-xxd.patch" ) + +# platform-specific checks (bug #898406): +# - acl() -- Solaris +# - statacl() -- AIX +QA_CONFIG_IMPL_DECL_SKIP=( + 'acl' + 'statacl' +) + +pkg_setup() { + # people with broken alphabets run into trouble. bug #82186. + unset LANG LC_ALL + export LC_COLLATE="C" +} + +src_prepare() { + default + + # Fixup a script to use awk instead of nawk + sed -i \ + -e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ + "${S}"/runtime/tools/mve.awk || die "sed failed" + + # See bug #77841. We remove this file after the tarball extraction. + rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed" + + # Read vimrc and gvimrc from /etc/vim + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h || die + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h || die + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i 's/\> "$c" || die "echo failed" + done + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + # Fix bug #76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + # Fix bug #18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + + # Remove src/auto/configure file. + rm -v src/auto/configure || die "rm configure failed" + + # bug 908961 + if use elibc_musl ; then + sed -i -e '/ja.sjis/d' src/po/Make_all.mak || die + fi +} + +src_configure() { + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug 24447). The hvc + # things are for ppc64, see bug 86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + # Let Portage do the stripping. Some people like that. + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + local myconf=( + --with-modified-by=Gentoo-${PVR} + --enable-gui=no + --without-x + --disable-darwin + --disable-perlinterp + --disable-pythoninterp + --disable-rubyinterp + --disable-gpm + --disable-selinux + $(use_enable nls) + $(use_enable acl) + ) + + # Keep Gentoo Prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake -j1 -C src auto/osdef.h objects +} + +src_test() { :; } + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + dodir /usr/{bin,share/{man/man1,vim}} + emake -C src \ + installruntime \ + installmanlinks \ + installmacros \ + installtutor \ + installtutorbin \ + installtools \ + install-languages \ + DESTDIR="${D}" \ + BINDIR="${EPREFIX}"/usr/bin \ + MANDIR="${EPREFIX}"/usr/share/man \ + DATADIR="${EPREFIX}"/usr/share + + keepdir ${vimfiles}/keymap + + # default vimrc is installed by vim-core since it applies to + # both vim and gvim + insinto /etc/vim/ + newins "${FILESDIR}"/vimrc-r8 vimrc + eprefixify "${ED}"/etc/vim/vimrc + + if use minimal; then + # To save space, install only a subset of the files. + # Helps minimalize the livecd, bug 65144. + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die + rm -v "${ED}"/usr/bin/vimtutor || die + + for f in "${ED}${vimfiles}"/colors/*.vim; do + if [[ ${f} != */@(default).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + + for f in "${ED}${vimfiles}"/syntax/*.vim; do + if [[ ${f} != */@(conf|crontab|fstab|inittab|resolv|sshdconfig|syntax|nosyntax|synload).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + fi + + # install gvim icon since both vim/gvim desktop files reference it + doicon -s scalable "${FILESDIR}"/gvim.svg +} + +pkg_postinst() { + # update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +}