/[gentoo-x86]/eclass/texlive-common.eclass
Gentoo

Contents of /eclass/texlive-common.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun Oct 14 07:44:09 2007 UTC (6 years, 11 months ago) by aballier
Branch: MAIN
add texlive common eclass

1 aballier 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: $
4    
5     #
6     # Original Author: Alexis Ballier <aballier@gentoo.org>
7     # Purpose: Provide various functions used by both texlive-core and texlive
8     # modules.
9     # Note that this eclass *must* not assume the presence of any standard tex tool
10     #
11    
12    
13     TEXMF_PATH=/usr/share/texmf
14     TEXMF_DIST_PATH=/usr/share/texmf-dist
15     TEXMF_VAR_PATH=/usr/share/texmf-var
16    
17     # Has to be called in src_install after having installed the files in ${D}
18     # This function will move the relevant files to /etc/texmf and symling them
19     # from their original location. This is to allow easy update of texlive's
20     # configuration
21    
22     texlive-common_handle_config_files() {
23     # Handle config files properly
24     cd "${D}${TEXMF_PATH}"
25     for f in $(find . -name '*.cnf' -o -name '*.cfg' -type f | sed -e "s:\./::g") ; do
26     if [ "${f#*config}" != "${f}" ] ; then
27     continue
28     fi
29     dodir /etc/texmf/$(dirname ${f}).d
30     mv "${D}/${TEXMF_PATH}/${f}" "${D}/etc/texmf/$(dirname ${f}).d" || die "mv ${f} failed."
31     dosym /etc/texmf/$(dirname ${f}).d/$(basename ${f}) ${TEXMF_PATH}/${f}
32     done
33     }
34    
35    
36     # Return if a file is present in the texmf tree
37     # Call it from the directory containing texmf and texmf-dist
38    
39     texlive-common_is_file_present_in_texmf() {
40     local mark="${T}/$1.found"
41     find texmf -name $1 -exec touch "${mark}" \;
42     find texmf-dist -name $1 -exec touch "${mark}" \;
43     [ -f "${mark}" ]
44     }

  ViewVC Help
Powered by ViewVC 1.1.20