aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-07-16 17:30:30 +0200
committerMichał Górny <mgorny@gentoo.org>2021-07-16 17:30:30 +0200
commitface8293c75d9c7b837e11f67f90d657b167efc4 (patch)
treee8b7868df804d50bc00731dd3c9e5aa76f9263d8
parentnewebuild: Default to EAPI 8 (diff)
downloadgentoo-syntax-face8293c75d9c7b837e11f67f90d657b167efc4.tar.gz
gentoo-syntax-face8293c75d9c7b837e11f67f90d657b167efc4.tar.bz2
gentoo-syntax-face8293c75d9c7b837e11f67f90d657b167efc4.zip
newebuild: Improve eclass boilerplategentoo-syntax-20210716
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--plugin/newebuild.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugin/newebuild.vim b/plugin/newebuild.vim
index 7c5f46a..756b7f9 100644
--- a/plugin/newebuild.vim
+++ b/plugin/newebuild.vim
@@ -44,9 +44,20 @@ fun! <SID>MakeNewEbuild()
put ='# ' . GentooGetUser()
put ='# @AUTHOR:'
put ='# ' . GentooGetUser()
+ put ='# @SUPPORTED_EAPIS: 8'
put ='# @BLURB: '
put ='# @DESCRIPTION:'
put =''
+ let l:eclass_ident = substitute(toupper(l:eclass), "[^A-Z0-9]", "_", "g")
+ put ='if [[ ! ${_' . l:eclass_ident . '} ]]; then'
+ put =''
+ put ='case ${EAPI} in'
+ put =' 8) ;;'
+ put =' *) die \"EAPI ${EAPI} unsupported.\"'
+ put ='esac'
+ put =''
+ put ='_' . l:eclass_ident . '=1'
+ put ='fi'
" }}}
" {{{ go to the first thing to edit