Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 485604 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/eclass/texlive-module.eclass (-22 / +14 lines)
Lines 21-27 Link Here
21
# care of unpacking and relocating the files that need it.
21
# care of unpacking and relocating the files that need it.
22
#
22
#
23
# It inherits texlive-common and base for supporting patching via the PATCHES
23
# It inherits texlive-common and base for supporting patching via the PATCHES
24
# bash array with EAPI>=2.
24
# bash array.
25
25
26
# @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS
26
# @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS
27
# @DESCRIPTION:
27
# @DESCRIPTION:
Lines 63-68 Link Here
63
63
64
inherit texlive-common base
64
inherit texlive-common base
65
65
66
case "${EAPI:-0}" in
67
	0|1|2)
68
		die "EAPI='${EAPI}' is not supported anymore"
69
		;;
70
	*)
71
		;;
72
esac
73
66
HOMEPAGE="http://www.tug.org/texlive/"
74
HOMEPAGE="http://www.tug.org/texlive/"
67
75
68
COMMON_DEPEND=">=app-text/texlive-core-${TL_PV:-${PV}}"
76
COMMON_DEPEND=">=app-text/texlive-core-${TL_PV:-${PV}}"
Lines 103-130 Link Here
103
# @FUNCTION: texlive-module_src_unpack
111
# @FUNCTION: texlive-module_src_unpack
104
# @DESCRIPTION:
112
# @DESCRIPTION:
105
# Only for TeX Live 2009 and later.
113
# Only for TeX Live 2009 and later.
106
# Gives tar.xz unpack support until we can use an EAPI with that support.
107
# If EAPI supports tar.xz then it calls unpack instead of its own unpacker.
108
# After unpacking, the files that need to be relocated are moved accordingly.
114
# After unpacking, the files that need to be relocated are moved accordingly.
109
115
110
RELOC_TARGET=texmf-dist
116
RELOC_TARGET=texmf-dist
111
117
112
texlive-module_src_unpack() {
118
texlive-module_src_unpack() {
113
	if has "${EAPI:-0}" 0 1 2 ; then
119
	unpack ${A}
114
		local i s
115
		# Avoid installing world writable files
116
		# Bugs #309997, #310039, #338881
117
		umask 022
118
		for i in ${A}
119
		do
120
			s="${DISTDIR%/}/${i}"
121
			einfo "Unpacking ${s} to ${PWD}"
122
			test -s "${s}" || die "${s} does not exist"
123
			xz -dc -- "${s}" | tar xof - || die "Unpacking ${s} failed"
124
		done
125
	else
126
		unpack ${A}
127
	fi
128
120
129
	grep RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
121
	grep RELOC tlpkg/tlpobj/* | awk '{print $2}' | sed 's#^RELOC/##' > "${T}/reloclist"
130
	{ for i in $(<"${T}/reloclist"); do  dirname $i; done; } | uniq > "${T}/dirlist"
122
	{ for i in $(<"${T}/reloclist"); do  dirname $i; done; } | uniq > "${T}/dirlist"
Lines 312-326 Link Here
312
304
313
	dodir /usr/share
305
	dodir /usr/share
314
	if [ -z "${PN##*documentation*}" ] || use doc; then
306
	if [ -z "${PN##*documentation*}" ] || use doc; then
315
		[ -d texmf-doc ] && cp -pR texmf-doc "${D}/usr/share/"
307
		[ -d texmf-doc ] && cp -pR texmf-doc "${ED}/usr/share/"
316
	else
308
	else
317
		[ -d texmf/doc ] && rm -rf texmf/doc
309
		[ -d texmf/doc ] && rm -rf texmf/doc
318
		[ -d texmf-dist/doc ] && rm -rf texmf-dist/doc
310
		[ -d texmf-dist/doc ] && rm -rf texmf-dist/doc
319
	fi
311
	fi
320
312
321
	[ -d texmf ] && cp -pR texmf "${D}/usr/share/"
313
	[ -d texmf ] && cp -pR texmf "${ED}/usr/share/"
322
	[ -d texmf-dist ] && cp -pR texmf-dist "${D}/usr/share/"
314
	[ -d texmf-dist ] && cp -pR texmf-dist "${ED}/usr/share/"
323
	[ -d tlpkg ] && use source && cp -pR tlpkg "${D}/usr/share/"
315
	[ -d tlpkg ] && use source && cp -pR tlpkg "${ED}/usr/share/"
324
316
325
	insinto /var/lib/texmf
317
	insinto /var/lib/texmf
326
	[ -d texmf-var ] && doins -r texmf-var/*
318
	[ -d texmf-var ] && doins -r texmf-var/*

Return to bug 485604