commit:     6a5a8c4a2dff9bd3c0229db241147bc80f82c3da
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 12 22:00:55 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Fri Jan 12 23:22:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a5a8c4a

app-emacs/treemacs: bump PY compat; require Emacs with USE=svg

Closes: https://bugs.gentoo.org/908967
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 ...{treemacs-3.1.ebuild => treemacs-3.1-r1.ebuild} | 41 ++++++++++++++--------
 1 file changed, 26 insertions(+), 15 deletions(-)

diff --git a/app-emacs/treemacs/treemacs-3.1.ebuild 
b/app-emacs/treemacs/treemacs-3.1-r1.ebuild
similarity index 53%
rename from app-emacs/treemacs/treemacs-3.1.ebuild
rename to app-emacs/treemacs/treemacs-3.1-r1.ebuild
index 6d097c74f261..5f04a6ad831c 100644
--- a/app-emacs/treemacs/treemacs-3.1.ebuild
+++ b/app-emacs/treemacs/treemacs-3.1-r1.ebuild
@@ -1,24 +1,33 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
 NEED_EMACS=26.1
 DISTUTILS_USE_PEP517=no
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 
 inherit distutils-r1 elisp
 
 DESCRIPTION="Tree style project file explorer"
 HOMEPAGE="https://github.com/Alexander-Miller/treemacs/";
-SRC_URI="https://github.com/Alexander-Miller/${PN}/archive/${PV}.tar.gz
-       -> ${P}.tar.gz"
+
+if [[ "${PV}" == *9999* ]] ; then
+       inherit git-r3
+
+       EGIT_REPO_URI="https://github.com/Alexander-Miller/${PN}.git";
+else
+       SRC_URI="https://github.com/Alexander-Miller/${PN}/archive/${PV}.tar.gz
+               -> ${P}.tar.gz"
+
+       KEYWORDS="~amd64"
+fi
 
 LICENSE="GPL-3+"
-KEYWORDS="~amd64"
 SLOT="0"
 
 RDEPEND="
+       >=app-editors/emacs-${NEED_EMACS}[svg]
        app-emacs/ace-window
        app-emacs/cfrs
        app-emacs/dash
@@ -27,13 +36,15 @@ RDEPEND="
        app-emacs/pfuture
        app-emacs/s
 "
-BDEPEND="${RDEPEND}"
+BDEPEND="
+       ${RDEPEND}
+"
 
 BYTECOMPFLAGS="-L . -L src/elisp"
 PATCHES=(
-       "${FILESDIR}"/${PN}-2.9.5-tests.patch
-       "${FILESDIR}"/${PN}-async-scripts.patch
-       "${FILESDIR}"/${PN}-icons-icon-directory.patch
+       "${FILESDIR}/${PN}-2.9.5-tests.patch"
+       "${FILESDIR}/${PN}-async-scripts.patch"
+       "${FILESDIR}/${PN}-icons-icon-directory.patch"
 )
 
 DOCS=( Changelog.org Extensions.org README.org screenshots )
@@ -44,13 +55,13 @@ elisp-enable-tests buttercup test
 src_prepare() {
        distutils-r1_src_prepare
 
-       sed "s|@SITEETC@|${SITEETC}/${PN}|g"        \
-               -i src/elisp/${PN}-icons.el             \
-               -i src/elisp/${PN}-async.el || die
+       sed "s|@SITEETC@|${SITEETC}/${PN}|g"            \
+               -i "src/elisp/${PN}-icons.el"                   \
+               -i "src/elisp/${PN}-async.el" || die
 }
 
 python_compile() {
-       python_optimize "${S}"/src/scripts
+       python_optimize "${S}/src/scripts"
 }
 
 src_compile() {
@@ -60,10 +71,10 @@ src_compile() {
 }
 
 src_install() {
-       elisp-install ${PN} src/elisp/*.el{,c}
+       elisp-install "${PN}" src/elisp/*.el{,c}
        elisp-site-file-install "${FILESDIR}/${SITEFILE}"
 
-       insinto ${SITEETC}/${PN}
+       insinto "${SITEETC}/${PN}"
        doins -r icons
        doins -r src/scripts
 }

Reply via email to