summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /eclass/myspell-r2.eclass
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'eclass/myspell-r2.eclass')
-rw-r--r--eclass/myspell-r2.eclass118
1 files changed, 118 insertions, 0 deletions
diff --git a/eclass/myspell-r2.eclass b/eclass/myspell-r2.eclass
new file mode 100644
index 000000000000..ebca9c4028ec
--- /dev/null
+++ b/eclass/myspell-r2.eclass
@@ -0,0 +1,118 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: aspell-dict.eclass
+# @MAINTAINER:
+# maintainer-needed@gentoo.org
+# @AUTHOR:
+# Tomáš Chvátal <scarabeus@gentoo.org>
+# @BLURB: An eclass to ease the construction of ebuilds for myspell dicts
+# @DESCRIPTION:
+
+EXPORT_FUNCTIONS src_unpack src_install
+
+# @ECLASS-VARIABLE: MYSPELL_DICT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array variable containing list of all dictionary files.
+# MYSPELL_DICT=( "file.dic" "dir/file2.aff" )
+
+# @ECLASS-VARIABLE: MYSPELL_HYPH
+# @DESCRIPTION:
+# Array variable containing list of all hyphenation files.
+# MYSPELL_HYPH=( "file.dic" "dir/file2.dic" )
+
+# @ECLASS-VARIABLE: MYSPELL_THES
+# @DESCRIPTION:
+# Array variable containing list of all thesarus files.
+# MYSPELL_HYPH=( "file.dat" "dir/file2.idx" )
+
+# Basically no extra deps needed.
+# Unzip is required for .oxt libreoffice extensions
+# which are just fancy zip files.
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+# by default this stuff does not have any folder in the pack
+S="${WORKDIR}"
+
+# @FUNCTION: myspell-r2_src_unpack
+# @DESCRIPTION:
+# Unpack all variants of weird stuff.
+# In our case .oxt packs.
+myspell-r2_src_unpack() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ local f
+ for f in ${A}; do
+ case ${f} in
+ *.oxt)
+ echo ">>> Unpacking "${DISTDIR}/${f}" to ${PWD}"
+ unzip -qoj ${DISTDIR}/${f}
+ assert "failed unpacking ${DISTDIR}/${f}"
+ ;;
+ *) unpack ${f} ;;
+ esac
+ done
+}
+
+# @FUNCTION: myspell-r2_src_install
+# @DESCRIPTION:
+# Install the dictionaries to the right places.
+myspell-r2_src_install() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ local x target
+
+ # Following the debian directory layout here.
+ # DICT: /usr/share/hunspell
+ # THES: /usr/share/mythes
+ # HYPH: /usr/share/hyphen
+ # We just need to copy the required files to proper places.
+
+ # TODO: backcompat dosym remove when all dictionaries and libreoffice
+ # ebuilds in tree use only the new paths
+
+ # Very old installs have hunspell to be symlink to myspell.
+ # This results in fcked up install/symlink stuff.
+ if [[ -L "${EPREFIX}/usr/share/hunspell" ]] ; then
+ eerror "\"${EPREFIX}/usr/share/hunspell\" is a symlink."
+ eerror "Please remove it so it is created properly as folder"
+ die "\"${EPREFIX}/usr/share/hunspell\" is a symlink."
+ fi
+
+ insinto /usr/share/hunspell
+ for x in "${MYSPELL_DICT[@]}"; do
+ target="${x##*/}"
+ newins "${x}" "${target}" || die
+ dosym /usr/share/hunspell/"${target}" /usr/share/myspell/"${target}" || die
+ done
+
+ insinto /usr/share/mythes
+ for x in "${MYSPELL_THES[@]}"; do
+ target="${x##*/}"
+ newins "${x}" "${target}" || die
+ dosym /usr/share/mythes/"${target}" /usr/share/myspell/"${target}" || die
+ done
+
+ insinto /usr/share/hyphen
+ for x in "${MYSPELL_HYPH[@]}"; do
+ target="${x##*/}"
+ newins "${x}" "${target}" || die
+ dosym /usr/share/hyphen/"${target}" /usr/share/myspell/"${target}" || die
+ done
+
+ # Remove licenses as they suffix them with .txt too
+ rm -rf COPYING*
+ rm -rf LICENSE*
+ rm -rf LICENCE*
+ rm -rf license*
+ rm -rf licence*
+ # Readme and so on
+ for x in *.txt README*; do
+ if [[ -f ${x} ]]; then
+ dodoc ${x} || die
+ fi
+ done
+}