--- a/mail-client/alpine-2.25-r1.ebuild 2022-03-22 22:30:06.078468840 -0600 +++ b/mail-client/alpine-2.25-r1.ebuild 2022-05-13 11:18:34.397596789 -0500 @@ -3,7 +3,7 @@ EAPI=8 -inherit autotools toolchain-funcs +inherit autotools optfeature toolchain-funcs DESCRIPTION="An easy to use text-based based mail and news client" HOMEPAGE="http://alpine.x10host.com/alpine/ https://repo.or.cz/alpine.git/" @@ -15,7 +15,7 @@ LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~alpha amd64 ~ia64 ppc ~ppc64 ~sparc x86" -IUSE="+chappa ipv6 kerberos ldap nls onlyalpine passfile smime spell ssl threads" +IUSE="+chappa ipv6 kerberos ldap nls onlyalpine passfile smime ssl threads" # alpine-2.25-ssl.patch can only be applied when not using the chappa patches. REQUIRED_USE="chappa? ( ssl )" @@ -24,7 +24,6 @@ virtual/libcrypt:= kerberos? ( app-crypt/mit-krb5 ) ldap? ( net-nds/openldap:= ) - spell? ( app-text/aspell ) ssl? ( dev-libs/openssl:0= ) " RDEPEND="${DEPEND} @@ -52,12 +51,17 @@ $(use_with passfile passfile .pinepwd) $(use_with kerberos krb5) $(use_with threads pthread) - $(use_with spell interactive-spellcheck /usr/bin/aspell) $(use_enable nls) $(use_with ipv6) $(use_with smime) ) + if has_version "app-text/hunspell"; then + myconf+=( --with-interactive-spellcheck=/usr/bin/hunspell ) + elif has_version "app-text/aspell"; then + myconf+=( --with-interactive-spellcheck=/usr/bin/aspell ) + fi + if use ssl; then myconf+=( --with-ssl-include-dir="${EPREFIX}"/usr/include/openssl @@ -87,3 +91,7 @@ newdoc "${S}/doc/mime.types" mime.types.sample docompress -x /usr/share/doc/${PF}/mailcap.unx.sample /usr/share/doc/${PF}/mime.types.sample } + +pkg_postinst() { + optfeature "Spell checking" app-text/hunspell app-text/aspell +}