summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin F. Quinn <kevquinn@gentoo.org>2006-06-15 11:25:18 +0000
committerKevin F. Quinn <kevquinn@gentoo.org>2006-06-15 11:25:18 +0000
commit63cec29d26a5c285064adc2c145ef6525c997ff9 (patch)
treea7a8fa74e4c0f293ab9c121aa7ca3da8855d4dcf /eclass/myspell.eclass
parentAdded text-markup as maintainer of latex-package.eclass, following email of j... (diff)
downloadhistorical-63cec29d26a5c285064adc2c145ef6525c997ff9.tar.gz
historical-63cec29d26a5c285064adc2c145ef6525c997ff9.tar.bz2
historical-63cec29d26a5c285064adc2c145ef6525c997ff9.zip
Remove dependency on hunspell, add use of eselect-oodict, add author info.
Diffstat (limited to 'eclass/myspell.eclass')
-rw-r--r--eclass/myspell.eclass25
1 files changed, 21 insertions, 4 deletions
diff --git a/eclass/myspell.eclass b/eclass/myspell.eclass
index b77cb6d8b029..470006a8921c 100644
--- a/eclass/myspell.eclass
+++ b/eclass/myspell.eclass
@@ -1,6 +1,10 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/myspell.eclass,v 1.3 2006/05/22 18:09:00 kevquinn Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/myspell.eclass,v 1.4 2006/06/15 11:25:18 kevquinn Exp $
+
+# Author: Kevin F. Quinn <kevquinn@gentoo.org>
+# Packages: app-dicts/myspell-*
+# Herd: app-dicts
EXPORT_FUNCTIONS src_install pkg_preinst pkg_postinst
@@ -11,9 +15,9 @@ SLOT="0"
# tar, gzip, bzip2 are included in the base profile, but not unzip
DEPEND="app-arch/unzip"
-# The console application for using myspell dictionaries is
-# hunspell (which is making myspell itself obsolete).
-RDEPEND="app-text/hunspell"
+# Dictionaries don't have any runtime dependencies
+# Myspell dictionaries can be used by hunspell, openoffice and others
+RDEPEND=""
# The destination directory for myspell dictionaries
MYSPELL_DICTBASE="/usr/share/myspell"
@@ -146,6 +150,12 @@ myspell_src_install() {
# Add entries in dictionary.lst.<lang> to OOo dictionary.lst
# and create softlinks indicated by dictionary.lst.<lang>
myspell_pkg_postinst() {
+ has_version eselect-oodict &&
+ eselect oodict set myspell-$(get_myspell_lang)
+
+ # Legacy code for dictionaries installed before eselect-oodict existed
+ # so has to remain for binpkg support. This code is unmaintained -
+ # if you have a problem with it, emerge eselect-oodict.
[[ -d ${MYSPELL_OOOBASE} ]] || return
# This stuff is here, not in src_install, as the softlinks are
# deliberately _not_ listed in the package database.
@@ -178,6 +188,13 @@ myspell_pkg_postinst() {
# Done in preinst (prerm happens after postinst, which overwrites
# the dictionary.<lang>.lst file)
myspell_pkg_preinst() {
+ if has_version app-admin/eselect-oodict; then
+ eselect oodict unset myspell-$(get_myspell_lang)
+ return
+ fi
+
+ # Legacy code for dictionaries installed before eselect-oodict existed
+ # Don't delete this; needed for uninstalls and binpkg support.
local filen dictlst entry fields removeentry suffix
dictlst="dictionary.lst.$(get_myspell_lang)"
[[ -d ${MYSPELL_OOOBASE} ]] || return