# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=4 CMAKE_MIN_VERSION="2.6.4" inherit gnome2 cmake-utils DESCRIPTION="An Integrated LaTeX Environment for GNOME" HOMEPAGE="http://projects.gnome.org/latexila/" LICENSE="GPL-3" SLOT="0" KEYWORDS="~x86" IUSE="gnome +latexmk rubber" common_depend=" >=dev-libs/glib-2.28:2 >=x11-libs/gtk+-2.16:2 >=x11-libs/gtksourceview-2.10:2.0 dev-libs/libgee dev-libs/libunique:1 sys-devel/gettext gnome? ( gnome-base/gsettings-desktop-schemas ) " DEPEND=" ${common_depend} dev-util/itstool dev-util/pkgconfig " RDEPEND=" ${common_depend} x11-themes/hicolor-icon-theme virtual/latex-base latexmk? ( dev-tex/latexmk ) rubber? ( dev-tex/rubber ) " pkg_setup() { DOCS=( AUTHORS HACKING INSTALL NEWS README TODO ) } src_prepare() { # Simplify the LINGUAS variable local simple_linguas="" for lang in ${LINGUAS}; do # Keep only the first two letters: fr_BE@latin -> fr simple_linguas="$simple_linguas ${lang:0:2}" done # Remove useless *.po local po_files=$(find . -name '*.po') local po_file for po_file in ${po_files}; do local full_lang=$(basename ${po_file} .po) # Remove the suffix local lang=${full_lang:0:2} if ! has ${lang} ${simple_linguas}; then rm ${po_file} fi done } src_configure() { local mycmakeargs=" $(cmake-utils_use_with gnome GNOME) -DCOMPILE_SCHEMA=OFF " cmake-utils_src_configure }