Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: texlive-module.eclass
Date: Thu, 07 Jan 2010 19:13:06
Message-Id: E1NSxn3-00047X-Mz@stork.gentoo.org
1 aballier 10/01/07 19:13:01
2
3 Modified: texlive-module.eclass
4 Log:
5 relocate 'RELOC' files when unpacking
6
7 Revision Changes Path
8 1.29 eclass/texlive-module.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/texlive-module.eclass?rev=1.29&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/texlive-module.eclass?rev=1.29&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/texlive-module.eclass?r1=1.28&r2=1.29
13
14 Index: texlive-module.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v
17 retrieving revision 1.28
18 retrieving revision 1.29
19 diff -u -r1.28 -r1.29
20 --- texlive-module.eclass 7 Jan 2010 18:42:47 -0000 1.28
21 +++ texlive-module.eclass 7 Jan 2010 19:13:01 -0000 1.29
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2008 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.28 2010/01/07 18:42:47 aballier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-module.eclass,v 1.29 2010/01/07 19:13:01 aballier Exp $
27
28 # @ECLASS: texlive-module.eclass
29 # @MAINTAINER:
30 @@ -98,6 +98,8 @@
31 # Only for TeX Live 2009.
32 # Gives tar.xz unpack support until we can use an EAPI with that support.
33
34 +RELOC_TARGET=texmf-dist
35 +
36 texlive-module_src_unpack() {
37 local i s
38 for i in ${A}
39 @@ -107,6 +109,14 @@
40 test -s "${s}" || die "${s} does not exist"
41 xz -dc -- "${s}" | tar xof - || die "Unpacking ${s} failed"
42 done
43 + grep RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
44 + { for i in $(<"${T}/reloclist"); do dirname $i; done; } | uniq | sort -r > "${T}/dirlist"
45 + for i in $(<"${T}/dirlist"); do
46 + [ -d "${RELOC_TARGET}/${i}" ] || mkdir -p "${RELOC_TARGET}/${i}"
47 + done
48 + for i in $(<"${T}/reloclist"); do
49 + mv "${i}" "${RELOC_TARGET}"/$(dirname "${i}") || die "failed to relocate ${i} to ${RELOC_TARGET}/$(dirname ${i})"
50 + done
51 }
52
53 fi