improve comments of texlive eclasses so that they're ready to get a man page, thanks...
authorAlexis Ballier <aballier@gentoo.org>
Thu, 14 Feb 2008 09:02:11 +0000 (09:02 +0000)
committerAlexis Ballier <aballier@gentoo.org>
Thu, 14 Feb 2008 09:02:11 +0000 (09:02 +0000)
eclass/texlive-common.eclass
eclass/texlive-module.eclass

index a4c24e8d4a0a68f2ed230cdca25dd0113855f494..8893a4f70ed119ae7e8dbd631752df41eff3e64c 100644 (file)
@@ -1,19 +1,26 @@
-# 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
@@ -32,7 +39,8 @@ texlive-common_handle_config_files() {
        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
 
@@ -43,7 +51,11 @@ texlive-common_is_file_present_in_texmf() {
        [ -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
@@ -74,7 +86,11 @@ texlive-common_do_symlinks() {
        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.
index 24145dde30a19d5f44bacdc6582e7420948986dc..e4d6ed99a6a317e817f988222ecfe810f9303bae 100644 (file)
@@ -1,18 +1,30 @@
-# 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
 
@@ -34,7 +46,9 @@ IUSE="doc"
 
 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
@@ -77,7 +91,9 @@ texlive-module_src_compile() {
        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() {
@@ -109,7 +125,9 @@ 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.
 
@@ -123,6 +141,12 @@ texlive-module_pkg_postinst() {
        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