--- /usr/portage/eclass/myspell.eclass 2009-02-09 09:21:00.000000000 +0100 +++ /usr/local/portage/eclass/myspell.eclass 2011-05-16 10:44:38.151082651 +0200 @@ -8,7 +8,7 @@ inherit multilib -EXPORT_FUNCTIONS src_install pkg_preinst pkg_postinst +EXPORT_FUNCTIONS src_unpack src_install pkg_preinst pkg_postinst IUSE="" @@ -116,6 +116,33 @@ # This format is from the available.lst, hyphavail.lst and # thesavail.lst files on the openoffice.org repository. +#got inspiration from /usr/lib/portage/bin/ebuild.sh and /usr/portage/eclass/mozextension.eclass +myspell_src_unpack() { + local oxt oxtname srcdir + + [ -z "${A}" ] && die "Nothing passed to the 'unpack' command" + + srcdir="${DISTDIR}/" + + for oxt in ${A}; do + einfo "Unpacking ${oxt} to ${PWD}" + + [[ -s "${srcdir}${oxt}" ]] || die "${oxt} does not exist" + + case "${oxt##*.}" in + oxt) + unzip -qoj "${srcdir}${oxt}" || die "failed to unpack ${oxt}" + ;; + ZIP|zip) + unpack ${oxt} + ;; + *) + einfo "unpack ${oxt}: file format not recognized. Ignoring." + ;; + esac + done +} + myspell_src_install() { local filen fields entry dictlst cd "${WORKDIR}"