ottxor      14/03/18 16:52:10

  Modified:             texlive-common.eclass ChangeLog
  Log:
  added prefix support (bug #485608)

Revision  Changes    Path
1.21                 eclass/texlive-common.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/texlive-common.eclass?rev=1.21&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/texlive-common.eclass?rev=1.21&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/texlive-common.eclass?r1=1.20&r2=1.21

Index: texlive-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- texlive-common.eclass       26 Jun 2013 15:54:48 -0000      1.20
+++ texlive-common.eclass       18 Mar 2014 16:52:10 -0000      1.21
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.20 
2013/06/26 15:54:48 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.21 
2014/03/18 16:52:10 ottxor Exp $
 
 # @ECLASS: texlive-common.eclass
 # @MAINTAINER:
@@ -14,6 +14,13 @@
 #
 # Note that this eclass *must* not assume the presence of any standard tex tool
 
+case "${EAPI:-0}" in
+       0|1|2)
+               die "EAPI='${EAPI}' is not supported anymore"
+               ;;
+       *)
+               ;;
+esac
 
 TEXMF_PATH=/usr/share/texmf
 TEXMF_DIST_PATH=/usr/share/texmf-dist
@@ -28,15 +35,15 @@
 
 texlive-common_handle_config_files() {
        # Handle config files properly
-       [ -d "${D}${TEXMF_PATH}" ] || return
-       cd "${D}${TEXMF_PATH}"
+       [ -d "${ED}${TEXMF_PATH}" ] || return
+       cd "${ED}${TEXMF_PATH}"
        for f in $(find . -name '*.cnf' -type f -o -name '*.cfg' -type f | sed 
-e "s:\./::g") ; do
                if [ "${f#*config}" != "${f}" -o "${f#doc}" != "${f}" ] ; then
                        continue
                fi
                dodir /etc/texmf/$(dirname ${f}).d
-               einfo "Moving (and symlinking) ${TEXMF_PATH}/${f} to 
/etc/texmf/$(dirname ${f}).d"
-               mv "${D}/${TEXMF_PATH}/${f}" "${D}/etc/texmf/$(dirname ${f}).d" 
|| die "mv ${f} failed."
+               einfo "Moving (and symlinking) ${EPREFIX}${TEXMF_PATH}/${f} to 
${EPREFIX}/etc/texmf/$(dirname ${f}).d"
+               mv "${ED}/${TEXMF_PATH}/${f}" "${ED}/etc/texmf/$(dirname 
${f}).d" || die "mv ${f} failed."
                dosym /etc/texmf/$(dirname ${f}).d/$(basename ${f}) 
${TEXMF_PATH}/${f}
        done
 }
@@ -78,7 +85,7 @@
                                if [ $1 = $2 ];
                                then
                                        einfo "Symlink $1 -> $2 skipped"
-                               elif [ -e "${D}/usr/bin/$1" ];
+                               elif [ -e "${ED}/usr/bin/$1" ];
                                then
                                        einfo "Symlink $1 skipped (file exists)"
                                else
@@ -119,7 +126,7 @@
        while [ $# -gt 0 ] ; do
                local trg=$(basename ${1} | sed 's,\.[^/]*$,,' | tr '[:upper:]' 
'[:lower:]')
                einfo "Installing ${1} as ${trg} bin wrapper"
-               [ -x "${D}/usr/share/${1}" ] || die "Trying to install a non 
existing or non executable symlink to /usr/bin: ${1}"
+               [ -x "${ED}/usr/share/${1}" ] || die "Trying to install a non 
existing or non executable symlink to /usr/bin: ${1}"
                dosym ../share/${1} /usr/bin/${trg} || die "failed to install 
${1} as $trg"
                shift
        done
@@ -133,8 +140,8 @@
 
 etexmf-update() {
        if has_version 'app-text/texlive-core' ; then
-               if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then
-                       /usr/sbin/texmf-update
+               if [ "$ROOT" = "/" ] && [ -x "${EPREFIX}"/usr/sbin/texmf-update 
] ; then
+                       "${EPREFIX}"/usr/sbin/texmf-update
                else
                        ewarn "Cannot run texmf-update for some reason."
                        ewarn "Your texmf tree might be inconsistent with your 
configuration"
@@ -151,9 +158,9 @@
 
 efmtutil-sys() {
        if has_version 'app-text/texlive-core' ; then
-               if [ "$ROOT" = "/" ] && [ -x /usr/bin/fmtutil-sys ] ; then
+               if [ "$ROOT" = "/" ] && [ -x "${EPREFIX}"/usr/bin/fmtutil-sys ] 
; then
                        einfo "Rebuilding formats"
-                       /usr/bin/fmtutil-sys --all &> /dev/null
+                       "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null
                else
                        ewarn "Cannot run fmtutil-sys for some reason."
                        ewarn "Your formats might be inconsistent with your 
installed ${PN} version"



1.1180               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1180&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1180&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1179&r2=1.1180

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1179
retrieving revision 1.1180
diff -u -r1.1179 -r1.1180
--- ChangeLog   18 Mar 2014 10:35:39 -0000      1.1179
+++ ChangeLog   18 Mar 2014 16:52:10 -0000      1.1180
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1179 2014/03/18 
10:35:39 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1180 2014/03/18 
16:52:10 ottxor Exp $
+
+  18 Mar 2014; Christoph Junghans <[email protected]> texlive-common.eclass:
+  added prefix support (bug #485608)
 
   18 Mar 2014; Michał Górny <[email protected]> boost-utils.eclass:
   Mark @DEAD.




Reply via email to