summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-07-30 12:59:09 +0000
committerAlexis Ballier <aballier@gentoo.org>2015-07-30 12:59:09 +0000
commit86ba1f0e2a1354a225a828f2b4f92c00b6430ac9 (patch)
treea5edc9339ed68e88bcea0ad11be85108f6c5454a /eclass
parentStable for sparc, wrt bug #553130 (diff)
downloadgentoo-2-86ba1f0e2a1354a225a828f2b4f92c00b6430ac9.tar.gz
gentoo-2-86ba1f0e2a1354a225a828f2b4f92c00b6430ac9.tar.bz2
gentoo-2-86ba1f0e2a1354a225a828f2b4f92c00b6430ac9.zip
Add support for TEXLIVE_MODULE_OPTIONAL_ENGINE eclass variable to allow disabling some tex engines from ebuilds. Part of bug #542620
Diffstat (limited to 'eclass')
-rw-r--r--eclass/texlive-module.eclass14
1 files changed, 13 insertions, 1 deletions
diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 0386cb69d959..c7da1890303d 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.70 2014/11/04 10:32:30 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.71 2015/07/30 12:59:09 aballier Exp $
# @ECLASS: texlive-module.eclass
# @MAINTAINER:
@@ -110,6 +110,17 @@ RDEPEND="${COMMON_DEPEND}"
[ -z "${PN##*documentation*}" ] || IUSE="${IUSE} doc"
+# @ECLASS-VARIABLE: TEXLIVE_MODULE_OPTIONAL_ENGINE
+# @DESCRIPTION:
+# A space separated list of Tex engines that can be made optional.
+# e.g. "luatex luajittex"
+
+if [ -n "${TEXLIVE_MODULE_OPTIONAL_ENGINE}" ] ; then
+ for engine in ${TEXLIVE_MODULE_OPTIONAL_ENGINE} ; do
+ IUSE="${IUSE} +${engine}"
+ done
+fi
+
S="${WORKDIR}"
# @FUNCTION: texlive-module_src_unpack
@@ -154,6 +165,7 @@ texlive-module_add_format() {
einfo "Appending to format.${PN}.cnf for $@"
[ -d texmf-dist/fmtutil ] || mkdir -p texmf-dist/fmtutil
[ -f texmf-dist/fmtutil/format.${PN}.cnf ] || { echo "# Generated for ${PN} by texlive-module.eclass" > texmf-dist/fmtutil/format.${PN}.cnf; }
+ [ -n "${TEXLIVE_MODULE_OPTIONAL_ENGINE}" ] && has ${engine} ${TEXLIVE_MODULE_OPTIONAL_ENGINE} && use !${engine} && mode="disabled"
if [ "${mode}" = "disabled" ]; then
printf "#! " >> texmf-dist/fmtutil/format.${PN}.cnf
fi