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
commitf2b8dc80290deb46dc2fd0b5d649cf77b31eee52 (patch)
tree4699d701486d5e21f1c046a38ceb8454be8c38b2 /eclass
parentStable for sparc, wrt bug #553130 (diff)
downloadhistorical-f2b8dc80290deb46dc2fd0b5d649cf77b31eee52.tar.gz
historical-f2b8dc80290deb46dc2fd0b5d649cf77b31eee52.tar.bz2
historical-f2b8dc80290deb46dc2fd0b5d649cf77b31eee52.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