commit: 3f74493aca9fd1870aeaa03434f5f621451388a8 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> AuthorDate: Mon Jan 8 18:06:59 2024 +0000 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> CommitDate: Mon Jan 8 19:22:42 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f74493a
app-emacs/vterm: add live 9999 version Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org> app-emacs/vterm/vterm-9999.ebuild | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/app-emacs/vterm/vterm-9999.ebuild b/app-emacs/vterm/vterm-9999.ebuild new file mode 100644 index 000000000000..47fb04defbc9 --- /dev/null +++ b/app-emacs/vterm/vterm-9999.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN=emacs-libvterm +NEED_EMACS=26 + +inherit cmake elisp + +DESCRIPTION="Fully-featured terminal emulator based on libvterm" +HOMEPAGE="https://github.com/akermu/emacs-libvterm/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/akermu/${MY_PN}.git" +else + if [[ "${PV}" = *_p20240102 ]] ; then + COMMIT=c3a3a23a5eace137947524c93644204bf6b56cff + + SRC_URI="https://github.com/akermu/${MY_PN}/archive/${COMMIT}.tar.gz + -> ${P}.tar.gz" + S="${WORKDIR}/${MY_PN}-${COMMIT}" + else + SRC_URI="https://github.com/akermu/${MY_PN}/archive/${PV}.tar.gz + -> ${P}.tar.gz" + S="${WORKDIR}/${MY_PN}-${PV}" + fi + + KEYWORDS="~amd64 ~arm64 ~x86" +fi + +LICENSE="GPL-3+" +SLOT="0" + +DEPEND=" + >=dev-libs/libvterm-0.2:= +" +RDEPEND=" + ${DEPEND} + >=app-editors/emacs-26:*[dynamic-loading] +" + +PATCHES=( "${FILESDIR}/${PN}-0.0.1_pre20210618-dont-compile.patch" ) + +DOCS=( README.md ) +SITEFILE="50${PN}-gentoo.el" + +src_prepare() { + if [[ -e "${ESYSROOT}/usr/include/emacs-module.h" ]] ; then + # Use system header file instead of bundled one. + rm emacs-module.h || die + else + ewarn "${ESYSROOT}/usr/include/emacs-module.h does not exist" + ewarn "Falling back to bundled header file" + fi + + cmake_src_prepare +} + +src_configure() { + local -a mycmakeargs=( + -DUSE_SYSTEM_LIBVTERM=ON + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + elisp_src_compile +} + +src_install() { + elisp_src_install + elisp-modules-install "${PN}" vterm-module.so + + # Install shell-side vterm support scripts. + insinto "${SITEETC}/${PN}" + doins -r etc +}