eclass/latex-package.eclass: Use in_iuse and build doc conditionnally if doc useflag...
authorAlexis Ballier <aballier@gentoo.org>
Mon, 1 Feb 2016 08:24:41 +0000 (09:24 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 1 Feb 2016 08:25:57 +0000 (09:25 +0100)
eclass/latex-package.eclass

index 39211be6e181e6cb8bdd83713a8867c97e362dfe..1a092d3d7d373318a6bf4b13d5e1e9e3d3d714c6 100644 (file)
 # you must either grab each file individually, or find a place to mirror an
 # archive of them.  (iBiblio)
 #
-# It inherits base in EAPI 5 and earlier.
+# It inherits base and eutils in EAPI 5 and earlier.
 
 case ${EAPI:-0} in
-       0|1|2|3|4|5) inherit base ;;
+       0|1|2|3|4|5) inherit base eutils ;;
        6) ;;
        *) die "Unknown EAPI ${EAPI} for ${ECLASS}" ;;
 esac
@@ -124,11 +124,13 @@ latex-package_src_doinstall() {
                                done
                                ;;
                        "tex" | "dtx")
-                               for i in `find . -maxdepth 1 -type f -name "*.${1}"`
-                               do
-                                       einfo "Making documentation: $i"
-                                       texi2dvi -q -c --language=latex $i &> /dev/null || die
-                               done
+                               if ! in_iuse doc || use doc ; then
+                                       for i in `find . -maxdepth 1 -type f -name "*.${1}"`
+                                       do
+                                               einfo "Making documentation: $i"
+                                               texi2dvi -q -c --language=latex $i &> /dev/null || die
+                                       done
+                               fi
                                ;;
                        "tfm" | "vf" | "afm")
                                for i in `find . -maxdepth 1 -type f -name "*.${1}"`