summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
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