-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.3 2007/11/06 23:34:43 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.4 2008/02/14 09:02:11 aballier Exp $
+# @ECLASS: texlive-common.eclass
+# @MAINTAINER:
+# tex@gentoo.org
#
# Original Author: Alexis Ballier <aballier@gentoo.org>
+# @BLURB: Provide various functions used by both texlive-core and texlive modules
+# @DESCRIPTION:
# Purpose: Provide various functions used by both texlive-core and texlive
# modules.
-# Note that this eclass *must* not assume the presence of any standard tex tool
#
+# Note that this eclass *must* not assume the presence of any standard tex tool
TEXMF_PATH=/usr/share/texmf
TEXMF_DIST_PATH=/usr/share/texmf-dist
TEXMF_VAR_PATH=/var/lib/texmf
+# @FUNCTION: texlive-common_handle_config_files
+# @DESCRIPTION:
# Has to be called in src_install after having installed the files in ${D}
# This function will move the relevant files to /etc/texmf and symling them
# from their original location. This is to allow easy update of texlive's
done
}
-
+# @FUNCTION: texlive-common_is_file_present_in_texmf
+# @DESCRIPTION:
# Return if a file is present in the texmf tree
# Call it from the directory containing texmf and texmf-dist
[ -f "${mark}" ]
}
+# @FUNCTION: texlive-common_do_symlinks
+# @USAGE: < src > < dest >
+# @DESCRIPTION:
# Mimic the install_link function of texlinks
+#
# Should have the same behavior as the one in /usr/bin/texlinks
# except that it is under the control of the package manager
# Note that $1 corresponds to $src and $2 to $dest in this function
done
}
+# @FUNCTION: etexlinks
+# @USAGE: < file >
+# @DESCRIPTION:
# Mimic texlinks on a fmtutil format file
+#
# $1 has to be a fmtutil format file like fmtutil.cnf
# etexlinks foo will install the symlinks that texlinks --cnffile foo would have
# created. We cannot use texlinks with portage as it is not DESTDIR aware.
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.7 2008/01/20 00:14:45 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.8 2008/02/14 09:02:11 aballier Exp $
+# @ECLASS: texlive-module.eclass
+# @MAINTAINER:
+# tex@gentoo.org
#
# Original Author: Alexis Ballier <aballier@gentoo.org>
+# @BLURB: Provide generic install functions so that modular texlive's texmf ebuild will only have to inherit this eclass
+# @DESCRIPTION:
# Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will
# only have to inherit this eclass.
# Ebuilds have to provide TEXLIVE_MODULE_CONTENTS variable that contains the list
-# of packages that it will install.
-# TEXLIVE_MODULE_CONTENTS will be expanded to SRC_URI :
-# foo -> texlive-module-foo-${PV}.zip
+# of packages that it will install. (See below)
+#
# What is assumed is that it unpacks texmf and texmf-dist directories to
# ${WORKDIR}.
#
+# It inherits texlive-common
+
+# @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS
+# @DESCRIPTION:
+# The list of packages that will be installed. This variable will be expanded to
+# SRC_URI:
+#
+# foo -> texlive-module-foo-${PV}.zip
inherit texlive-common
S="${WORKDIR}"
-# src_compile, exported function:
+# @FUNCTION: texlive-module_src_compile
+# @DESCRIPTION:
+# exported function:
# Will look for format.foo.cnf and build foo format files using fmtutil
# (provided by texlive-core). The compiled format files will be sent to
# texmf-var/web2c, like fmtutil defaults to but with some trick to stay in the
done
}
-# src_install, exported function:
+# @FUNCTION: texlive-module_src_install
+# @DESCRIPTION:
+# exported function:
# Install texmf and config files to the system
texlive-module_src_install() {
texlive-common_handle_config_files
}
-# pkg_postinst and pkg_postrm, exported functions:
+# @FUNCTION: texlive-module_pkg_postinst
+# @DESCRIPTION:
+# exported function:
# run texmf-update to ensure the tex installation is consistent with the
# installed texmf trees.
fi
}
+# @FUNCTION: texlive-module_pkg_postrm
+# @DESCRIPTION:
+# exported function:
+# run texmf-update to ensure the tex installation is consistent with the
+# installed texmf trees.
+
texlive-module_pkg_postrm() {
if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
/usr/sbin/texmf-update