Skip to content

Commit

Permalink
eclass/myspell-r2.eclass: add EAPI support
Browse files Browse the repository at this point in the history
As this eclass has no EAPI checks, so adding them.
Currently EAPI 5,6 and 7 will be supported, as all existing ebuilds are
currently in EAPI 5 and 6.

This eclass also adds app-arch/unzip to DEPEND.
In order to support EAPI=7, we need to add app-arch/unzip
to BDEPEND instead.

Signed-off-by: Conrad Kostecki <[email protected]>
  • Loading branch information
ConiKost committed Mar 13, 2021
1 parent 2e23b92 commit 4bd8382
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions eclass/myspell-r2.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
# [email protected]
# @AUTHOR:
# Tomáš Chvátal <[email protected]>
# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: An eclass to streamline the construction of ebuilds for new Myspell dictionaries.
# @DESCRIPTION:
# The myspell-r2 eclass is designed to streamline the construction of ebuilds for
# the new Myspell dictionaries which support hunspell.

EXPORT_FUNCTIONS src_unpack src_install

# @ECLASS-VARIABLE: MYSPELL_DICT
# @DEFAULT_UNSET
# @DESCRIPTION:
Expand All @@ -31,11 +30,28 @@ EXPORT_FUNCTIONS src_unpack src_install
# Array variable containing list of all thesarus files.
# MYSPELL_THES=( "file.dat" "dir/file2.idx" )

case ${EAPI:-0} in
[0-4])
die "${ECLASS} is banned in EAPI ${EAPI:-0}"
;;
[5-7])
;;
*)
die "Unknown EAPI ${EAPI:-0}"
;;
esac

EXPORT_FUNCTIONS src_unpack src_install

# Basically no extra deps needed.
# Unzip is required for .oxt libreoffice extensions
# which are just fancy zip files.
DEPEND="app-arch/unzip"
RDEPEND=""
if [[ ${EAPI:-0} == 7 ]]; then
BDEPEND="app-arch/unzip"
else
DEPEND="app-arch/unzip"
RDEPEND=""
fi

# by default this stuff does not have any folder in the pack
S="${WORKDIR}"
Expand Down

0 comments on commit 4bd8382

Please sign in to comment.