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

Collapse All | Expand All

(-)/usr/portage/eclass/texlive-common.eclass (-10 / +15 lines)
Lines 27-42 Link Here
27
# configuration
27
# configuration
28
28
29
texlive-common_handle_config_files() {
29
texlive-common_handle_config_files() {
30
	has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}" && EPREFIX=
30
	# Handle config files properly
31
	# Handle config files properly
31
	[ -d "${D}${TEXMF_PATH}" ] || return
32
	[ -d "${ED}${TEXMF_PATH}" ] || return
32
	cd "${D}${TEXMF_PATH}"
33
	cd "${ED}${TEXMF_PATH}"
33
	for f in $(find . -name '*.cnf' -type f -o -name '*.cfg' -type f | sed -e "s:\./::g") ; do
34
	for f in $(find . -name '*.cnf' -type f -o -name '*.cfg' -type f | sed -e "s:\./::g") ; do
34
		if [ "${f#*config}" != "${f}" -o "${f#doc}" != "${f}" ] ; then
35
		if [ "${f#*config}" != "${f}" -o "${f#doc}" != "${f}" ] ; then
35
			continue
36
			continue
36
		fi
37
		fi
37
		dodir /etc/texmf/$(dirname ${f}).d
38
		dodir /etc/texmf/$(dirname ${f}).d
38
		einfo "Moving (and symlinking) ${TEXMF_PATH}/${f} to /etc/texmf/$(dirname ${f}).d"
39
		einfo "Moving (and symlinking) ${EPREFIX}${TEXMF_PATH}/${f} to ${EPREFIX}/etc/texmf/$(dirname ${f}).d"
39
		mv "${D}/${TEXMF_PATH}/${f}" "${D}/etc/texmf/$(dirname ${f}).d" || die "mv ${f} failed."
40
		mv "${ED}/${TEXMF_PATH}/${f}" "${ED}/etc/texmf/$(dirname ${f}).d" || die "mv ${f} failed."
40
		dosym /etc/texmf/$(dirname ${f}).d/$(basename ${f}) ${TEXMF_PATH}/${f}
41
		dosym /etc/texmf/$(dirname ${f}).d/$(basename ${f}) ${TEXMF_PATH}/${f}
41
	done
42
	done
42
}
43
}
Lines 66-71 Link Here
66
# also do the fmtutil file parsing.
67
# also do the fmtutil file parsing.
67
68
68
texlive-common_do_symlinks() {
69
texlive-common_do_symlinks() {
70
	has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
69
	while [ $# != 0 ]; do
71
	while [ $# != 0 ]; do
70
		case $1 in
72
		case $1 in
71
			cont-??|metafun|mptopdf)
73
			cont-??|metafun|mptopdf)
Lines 78-84 Link Here
78
				if [ $1 = $2 ];
80
				if [ $1 = $2 ];
79
				then
81
				then
80
					einfo "Symlink $1 -> $2 skipped"
82
					einfo "Symlink $1 -> $2 skipped"
81
				elif [ -e "${D}/usr/bin/$1" ];
83
				elif [ -e "${ED}/usr/bin/$1" ];
82
				then
84
				then
83
					einfo "Symlink $1 skipped (file exists)"
85
					einfo "Symlink $1 skipped (file exists)"
84
				else
86
				else
Lines 116-125 Link Here
116
# correctly set for the file that it will point to.
118
# correctly set for the file that it will point to.
117
119
118
dobin_texmf_scripts() {
120
dobin_texmf_scripts() {
121
	has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
119
	while [ $# -gt 0 ] ; do
122
	while [ $# -gt 0 ] ; do
120
		local trg=$(basename ${1} | sed 's,\.[^/]*$,,' | tr '[:upper:]' '[:lower:]')
123
		local trg=$(basename ${1} | sed 's,\.[^/]*$,,' | tr '[:upper:]' '[:lower:]')
121
		einfo "Installing ${1} as ${trg} bin wrapper"
124
		einfo "Installing ${1} as ${trg} bin wrapper"
122
		[ -x "${D}/usr/share/${1}" ] || die "Trying to install a non existing or non executable symlink to /usr/bin: ${1}"
125
		[ -x "${ED}/usr/share/${1}" ] || die "Trying to install a non existing or non executable symlink to /usr/bin: ${1}"
123
		dosym ../share/${1} /usr/bin/${trg} || die "failed to install ${1} as $trg"
126
		dosym ../share/${1} /usr/bin/${trg} || die "failed to install ${1} as $trg"
124
		shift
127
		shift
125
	done
128
	done
Lines 132-140 Link Here
132
# function helps in factorizing some code.
135
# function helps in factorizing some code.
133
136
134
etexmf-update() {
137
etexmf-update() {
138
	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
135
	if has_version 'app-text/texlive-core' ; then
139
	if has_version 'app-text/texlive-core' ; then
136
		if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
140
		if [ "$ROOT" = "/" ] && [ -x "${EPREFIX}"/usr/sbin/texmf-update ] ; then
137
			/usr/sbin/texmf-update
141
			"${EPREFIX}"/usr/sbin/texmf-update
138
		else
142
		else
139
			ewarn "Cannot run texmf-update for some reason."
143
			ewarn "Cannot run texmf-update for some reason."
140
			ewarn "Your texmf tree might be inconsistent with your configuration"
144
			ewarn "Your texmf tree might be inconsistent with your configuration"
Lines 150-159 Link Here
150
# function helps in factorizing some code.
154
# function helps in factorizing some code.
151
155
152
efmtutil-sys() {
156
efmtutil-sys() {
157
	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
153
	if has_version 'app-text/texlive-core' ; then
158
	if has_version 'app-text/texlive-core' ; then
154
		if [ "$ROOT" = "/" ] && [ -x /usr/bin/fmtutil-sys ] ; then
159
		if [ "$ROOT" = "/" ] && [ -x "${EPREFIX}"/usr/bin/fmtutil-sys ] ; then
155
			einfo "Rebuilding formats"
160
			einfo "Rebuilding formats"
156
			/usr/bin/fmtutil-sys --all &> /dev/null
161
			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null
157
		else
162
		else
158
			ewarn "Cannot run fmtutil-sys for some reason."
163
			ewarn "Cannot run fmtutil-sys for some reason."
159
			ewarn "Your formats might be inconsistent with your installed ${PN} version"
164
			ewarn "Your formats might be inconsistent with your installed ${PN} version"

Return to bug 485608