From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IgyLd-0002dw-RS for garchives@archives.gentoo.org; Sun, 14 Oct 2007 07:57:18 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9E7lDEY027399; Sun, 14 Oct 2007 07:47:13 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l9E7lCTw027394 for ; Sun, 14 Oct 2007 07:47:12 GMT Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id D939D6532F for ; Sun, 14 Oct 2007 07:47:11 +0000 (UTC) Received: from aballier by stork.gentoo.org with local (Exim 4.60) (envelope-from ) id 1IgyBq-0004x6-Rb for gentoo-commits@lists.gentoo.org; Sun, 14 Oct 2007 07:47:10 +0000 From: "Alexis Ballier (aballier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, aballier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: texlive-module.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: texlive-module.eclass X-VCS-Directories: eclass X-VCS-Committer: aballier X-VCS-Committer-Name: Alexis Ballier Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: Sender: Alexis Ballier Date: Sun, 14 Oct 2007 07:47:10 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@gentoo.org X-Archives-Salt: 216bf1bf-eac2-4f7c-a102-6bd8a97cfc04 X-Archives-Hash: 0a6ca629418a089e7b678a98af160d0d aballier 07/10/14 07:47:10 Added: texlive-module.eclass Log: add texlive module eclass Revision Changes Path 1.1 eclass/texlive-module.eclass file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/texlive-module.eclass?rev=1.1&view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/texlive-module.eclass?rev=1.1&content-type=text/plain Index: texlive-module.eclass =================================================================== # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.1 2007/10/14 07:47:10 aballier Exp $ # # Original Author: Alexis Ballier # 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 # What is assumed is that it unpacks texmf and texmf-dist directories to # ${WORKDIR}. # inherit texlive-common HOMEPAGE="http://www.tug.org/texlive/" for i in ${TEXLIVE_MODULE_CONTENTS}; do SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.zip" done COMMON_DEPEND=">=app-text/texlive-core-${PV} ${TEXLIVE_MODULES_DEPS}" DEPEND="${COMMON_DEPEND} app-arch/unzip" RDEPEND="${COMMON_DEPEND}" IUSE="doc" S="${WORKDIR}" # src_compile, 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 # sandbox # The next step is to generate config files that are to be installed in # /etc/texmf; texmf-update script will take care of merging the different config # files for different packages in a single one used by the whole tex installation. texlive-module_src_compile() { # Build format files for i in texmf/fmtutil/format*.cnf; do if [ -f "${i}" ]; then einfo "Building format ${i}" TEXMFHOME="${S}/texmf:${S}/texmf-dist"\ fmtutil --cnffile "${i}" --fmtdir "${S}/texmf-var/web2c" --all\ || die "failed to build format ${i}" fi done # Generate config files for i in "${S}"/texmf/lists/*; do grep '^!' "${i}" | tr ' ' '=' |sort|uniq >> "${T}/jobs" done for j in $(<"${T}/jobs"); do command=$(echo ${j} | sed 's/.\(.*\)=.*/\1/') parameter=$(echo ${j} | sed 's/.*=\(.*\)/\1/') case "${command}" in addMap) echo "Map ${parameter}" >> "${S}/${PN}.cfg";; addMixedMap) echo "MixedMap ${parameter}" >> "${S}/${PN}.cfg";; addDvipsMap) echo "p +${parameter}" >> "${S}/${PN}-config.ps";; addDvipdfmMap) echo "f ${parameter}" >> "${S}/${PN}-config";; esac done } # src_install, exported function: # Install texmf and config files to the system texlive-module_src_install() { insinto /usr/share [ -d texmf ] && doins -r texmf [ -d texmf-dist ] && doins -r texmf-dist [ -d texmf-var ] && doins -r texmf-var use doc && [ -d texmf-doc ] && doins -r texmf-doc insinto /etc/texmf/updmap.d [ -f "${S}/${PN}.cfg" ] && doins "${S}/${PN}.cfg" insinto /etc/texmf/dvips/config [ -f "${S}/${PN}-config.ps" ] && doins "${S}/${PN}-config.ps" insinto /etc/texmf/dvipdfm/config [ -f "${S}/${PN}-config" ] && doins "${S}/${PN}-config" texlive-common_handle_config_files } # pkg_postinst and pkg_postrm, exported functions: # run texmf-update to ensure the tex installation is consistent with the # installed texmf trees. texlive-module_pkg_postinst() { if [ "$ROOT" = "/" ] ; then /usr/sbin/texmf-update fi } texlive-module_pkg_postrm() { if [ "$ROOT" = "/" ] ; then /usr/sbin/texmf-update fi } EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm -- gentoo-commits@gentoo.org mailing list