<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[120353] users/dports/ports</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/120353">120353</a></dd>
<dt>Author</dt> <dd>dports@macports.org</dd>
<dt>Date</dt> <dd>2014-05-23 20:10:29 -0700 (Fri, 23 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>copy tex ports to /users/dports</pre>

<h3>Added Paths</h3>
<ul>
<li><a href="#usersdportsports_resourcesport10grouptexlive10tcl">users/dports/ports/_resources/port1.0/group/texlive-1.0.tcl</a></li>
<li>users/dports/ports/tex/</li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="usersdportsports_resourcesport10grouptexlive10tclfromrev120352trunkdports_resourcesport10grouptexlive10tcl"></a>
<div class="copfile"><h4>Copied: users/dports/ports/_resources/port1.0/group/texlive-1.0.tcl (from rev 120352, trunk/dports/_resources/port1.0/group/texlive-1.0.tcl) (0 => 120353)</h4>
<pre class="diff"><span>
<span class="info">--- users/dports/ports/_resources/port1.0/group/texlive-1.0.tcl                                (rev 0)
+++ users/dports/ports/_resources/port1.0/group/texlive-1.0.tcl        2014-05-24 03:10:29 UTC (rev 120353)
</span><span class="lines">@@ -0,0 +1,517 @@
</span><ins>+# $Id$
+#
+# Copyright (c) 2010 Dan R. K. Ports &lt;dports@macports.org&gt;
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The MacPorts Project nor the names of its
+#    contributors may be used to endorse or promote products derived from
+#    this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# This portgroup contains common definitions for a MacPorts
+# installation of TeX Live. It can be used in one of two ways:
+#
+# 1. for installing &quot;texmf ports&quot;. These contain tex files and are
+#    installed from preprocessed distfiles made from TeXLive
+#    packages. These ports should invoke texlive.texmfport to set up
+#    the installation process.
+#
+# 2. other ports, like texlive-common or texlive-bin can include this
+#    portgroup (but not call texlive.texmfport) to get texlive path
+#    definitions and the like.
+
+#
+# texmf tree paths
+#
+
+# texmf files installed by texlive
+# TeXLive used to maintain a separation between files that were
+# nominally distribution-independent (&quot;texmf-dist&quot;) and those that
+# were tied to the binaries. This separation is now gone; everything
+# now goes into the texmfdist tree. $texlive_texmfmain points to the
+# same place for backwards-compatibility.
+set texlive_texmfdist &quot;${prefix}/share/texmf-texlive&quot;
+set texlive_texmfmain &quot;${texlive_texmfdist}&quot;
+
+# texmf files installed by ports other than texlive
+set texlive_texmfports &quot;${prefix}/share/texmf&quot;
+
+# optional tree for user-installed texmf files
+set texlive_texmflocal &quot;${prefix}/share/texmf-local&quot;
+
+# variable runtime data, e.g. formats
+set texlive_texmfsysvar &quot;${prefix}/var/db/texmf&quot;
+
+# configuration data from texconfig
+set texlive_texmfsysconfig &quot;${prefix}/etc/texmf&quot;
+
+# user's local texmf tree.
+# Note that this path is specified relative to the user's
+# home directory, i.e. it begins with an implicit ~/
+set texlive_texmfhome &quot;Library/texmf&quot;
+
+
+# location of binaries installed by texlive-bin
+#
+# All TeXLive binaries are built by texlive-bin, but most of them
+# aren't usable without the support files installed by other ports:
+# for example, xetex needs texlive-xetex, tex4ht needs
+# texlive-htmlxml, and just about everything needs texlive-basic.  We
+# don't want to install useless files into $prefix/bin, so instead
+# texlive-bin installs its binaries into this &quot;hidden&quot; directory, and
+# other ports &quot;activate&quot; them when they are ready to be used by creating
+# symlinks into $prefix/bin.
+set texlive_bindir &quot;${prefix}/libexec/texlive/binaries&quot;
+
+# another directory containing symlinks to activated texlive binaries
+#
+# This is provided to support MacTeX's TeX Distribution preference
+# pane: it can select the active TeX distribution by pointing the
+# /usr/texbin symlink here
+#
+# It also seems like the prefpane wants architecture-specific links,
+# and may want version-specific ones in the future, so create those in
+# ${texlive_mactex_texdistdir}.
+set texlive_mactex_texbindir &quot;${prefix}/libexec/texlive/texbin&quot;
+set texlive_mactex_texdistdir &quot;${prefix}/libexec/texlive/texdist&quot;
+
+# update texmf file path databases (ls-R)
+#
+# This should be run in the post-activate/deactivate hooks of any port
+# that installs texmf files. It updates the kpathsea database using
+# mktexlsr (formerly texhash), as well as ConTeXt's cache.
+proc texlive.mktexlsr {} {
+    global prefix
+
+    # Run mktexlsr. If that's not available, something's wrong.
+    system &quot;${prefix}/bin/mktexlsr&quot;
+
+    # If mtxrun is available (i.e. ConTeXt is installed), update its
+    # cache too. If it's not installed, that's OK.
+    if [file exists &quot;${prefix}/bin/mtxrun&quot;] {
+        system &quot;${prefix}/bin/mtxrun --generate&quot;
+    }
+}
+
+# Remove dependencies on any texlive-documentation-* ports, for use by
+# -doc variants
+proc texlive.removedocdepends {} {
+    global depends_lib
+    foreach dep $depends_lib {
+        if [regexp {^port:texlive-documentation-} $dep] {
+            depends_lib-delete $dep
+        }
+    }
+}
+
+#
+# For installing texmf ports
+#
+
+# Files to skip installation of, specified in terms of their path in
+# the texmf tree, e.g. texmf-dist/foo/bar/
+options texlive.exclude
+default texlive.exclude {}
+
+options texlive.binaries texlive.formats texlive.languages texlive.maps
+default texlive.binaries {}
+default texlive.formats {}
+default texlive.languages {}
+default texlive.maps {}
+
+# Whether to regenerate all config files, maps, and formats after
+# activation regardless of whether any new ones are installed.
+options texlive.forceupdatecnf
+default texlive.forceupdatecnf no
+
+# Whether to run mktexlsr after (de)activation. Usually required if
+# installing any texmf files.
+options texlive.use_mktexlsr
+default texlive.use_mktexlsr yes
+
+# Running mktexlsr after deactivation can be disabled separately. Note
+# that the value of this option is ignored if use_mktexlsr is disabled.
+options texlive.use_mktexlsr_on_deactivate
+default texlive.use_mktexlsr_on_deactivate yes
+
+proc texlive.texmfport {} {
+    homepage        http://www.tug.org/texlive/
+    platforms       darwin
+
+    supported_archs noarch
+    installs_libs   no
+
+    master_sites    http://giraffe.cs.washington.edu/texlive/
+    use_xz          yes
+
+    global name master_sites distname extract.suffix
+    livecheck.type  regex
+    livecheck.url   ${master_sites}
+    livecheck.regex ${name}-(\\d+)-run\\.tar
+
+    depends_lib-append port:texlive-common port:texlive-bin
+
+    # distfile is split into three parts, all of which extract into
+    # $worksrcdir
+    # - $distname-run contains the runtime files required to install the
+    #   package, as well as the &quot;tlpkginfo&quot; directory containing metadata
+    # - $distname-doc contains optional documentation files
+    # - $distname-src contains optional source code for installed files
+    # The latter two are only downloaded if the corresponding variant
+    # is enabled. Currently, each package must have all three distfiles
+    # even if some are empty.
+    distfiles       ${distname}-run${extract.suffix}
+
+    variant doc description &quot;Install documentation&quot; {
+        distfiles-append ${distname}-doc${extract.suffix}
+    }
+    variant src description &quot;Install TeX source&quot; {
+        distfiles-append ${distname}-src${extract.suffix}
+    }
+    default_variants +doc
+
+    if {![variant_isset &quot;doc&quot;]} {
+        # Skip any dependencies on texlive-documentation-* ports
+        texlive.removedocdepends
+    }
+
+    use_configure   no
+
+    build           { }
+
+    destroot {
+        xinstall -d ${destroot}${texlive_mactex_texbindir}
+
+        set indexlist {&quot;runfiles&quot;}
+        if {[variant_isset &quot;doc&quot;]} { lappend indexlist &quot;docfiles&quot; }
+        if {[variant_isset &quot;src&quot;]} { lappend indexlist &quot;srcfiles&quot; }
+
+        # copy files listed in tlpkginfo/$indexname into destroot
+        foreach indexname $indexlist {
+            set filelist [open ${worksrcpath}/tlpkginfo/${indexname}]
+            while {[gets $filelist line] &gt;= 0} {
+                # Check if file is excluded
+                set excluded false
+                foreach excludeline ${texlive.exclude} {
+                    if {[string equal -nocase $line $excludeline]} {
+                        # file is specifically excluded
+                        set excluded true
+                        break
+                    }
+                    if {[string equal -nocase -length [expr [string length $excludeline] + 1] $line &quot;$excludeline/&quot;]} {
+                        # this is a file in an excluded directory
+                        set excluded true
+                        break;
+                    }
+                }
+                if {$excluded} {
+                    continue
+                }
+
+                set srcfile ${worksrcpath}/${indexname}/$line
+
+                # check for manpages and treat specially
+                if [regexp {^texmf/doc/man/man(\d)/([^/]+)} $line -&gt; section filename] {
+                    if [string match &quot;*.$section&quot; $filename] {
+                        # actually a manpage; install it.  If
+                        # texlive-bin installed a manpage with the
+                        # same name, use it instead to make sure the
+                        # documentation matches the binary.
+                        if [file exists ${texlive_bindir}/man${section}/$filename.gz] {
+                            ln -s ${texlive_bindir}/man${section}/$filename.gz \
+                                ${destroot}${prefix}/share/man/man$section/
+                        } else {
+                            copy $srcfile ${destroot}${prefix}/share/man/man$section/
+                        }
+                    } else {
+                        # not actually a manpage; do nothing
+                        # (e.g. don't install PDF manpages)
+                    }
+                } else {
+                    # not a manpage; install into requested target dir
+                    # translate path in line to destination
+                    set splitline [split $line &quot;/&quot;]
+                    switch [lindex $splitline 0] {
+                        &quot;texmf&quot;      {lset splitline 0 ${texlive_texmfmain}}
+                        &quot;texmf-dist&quot; {lset splitline 0 ${texlive_texmfdist}}
+                        default { ui_msg &quot;warning: unknown file destination&quot; }
+                    }
+                    set dstfile [join $splitline &quot;/&quot;]
+
+                    # create directory if necessary, and install file
+                    xinstall -d ${destroot}[file dirname $dstfile]
+                    copy ${srcfile} ${destroot}${dstfile}
+                }
+            }
+        }
+
+        # install a documentation file containing the list of TeX
+        # packages installed. This also ensures that each port
+        # provides at least one file, even if there's nothing to
+        # install (e.g. documentation ports with -doc)
+        xinstall -d ${destroot}${prefix}/share/doc/texlive
+        set docfile [open ${destroot}${prefix}/share/doc/texlive/${name} &quot;w&quot;]
+        puts $docfile &quot;${name} version ${version} (MacPorts revision ${version}_${revision})&quot;
+        puts $docfile &quot;\nTeX Live packages contained in this port:&quot;
+        set pkgfile [open ${worksrcpath}/tlpkginfo/pkgs]
+        while {[gets $pkgfile line] &gt;= 0} {
+            set splitline [split $line]
+            set pkg [lindex $splitline 0]
+            set pkgdesc [join [lrange $splitline 1 end]]
+            puts $docfile &quot;    $pkg: $pkgdesc&quot;
+        }
+        close $pkgfile
+        close $docfile
+
+        # install fmtutil.cnf file
+        if {${texlive.formats} != &quot;&quot;} {
+            xinstall -d ${destroot}${texlive_texmfsysconfig}/fmtutil.d
+            set fmtfilename \
+                ${destroot}${texlive_texmfsysconfig}/fmtutil.d/10${name}.cnf
+            set fmtfile [open $fmtfilename &quot;w&quot;]
+            foreach x ${texlive.formats} {
+                set fmtenabled [lindex $x 0]
+                set fmtname [lindex $x 1]
+                set fmtengine [lindex $x 2]
+                set fmtpatterns [lindex $x 3]
+                set fmtoptions [lindex $x 4]
+                if {!$fmtenabled} {
+                    set fmtprefix &quot;#! &quot;
+                } else {
+                    set fmtprefix &quot;&quot;
+                }
+
+                puts $fmtfile \
+                    &quot;$fmtprefix$fmtname\t$fmtengine\t$fmtpatterns\t$fmtoptions&quot;
+
+                # Simulate texlinks
+                if {[lsearch -exact ${texlive.binaries} $fmtname] != -1} {
+                    # Decide what to link. Use the specified engine
+                    # unless a binary with the same name as the
+                    # format exists (this can happen for metafont;
+                    # see #28890)
+                    #
+                    # It's OK if the binary named $fmtname is a broken
+                    # symlink, since we might be installing whatever
+                    # it's pointing to, hence the use of 'file lstat'.
+                    if {![catch {file lstat ${texlive_bindir}/$fmtname ignore}]} {
+                        set linksource ${texlive_bindir}/$fmtname
+                    } else {
+                        set linksource ${prefix}/bin/$fmtengine
+                    }
+
+                    ln -s $linksource \
+                        ${destroot}${prefix}/bin/$fmtname
+                    ln -s $linksource \
+                        ${destroot}${texlive_mactex_texbindir}/$fmtname
+
+                    # We've created the symlink for $fmtname; remove
+                    # it from texlive.binaries so we don't try to do
+                    # so again later.
+                    texlive.binaries-delete $fmtname
+                }
+            }
+
+            close $fmtfile
+        }
+
+        # install updmap.cfg file
+        if {${texlive.maps} != &quot;&quot;} {
+            xinstall -d ${destroot}${texlive_texmfsysconfig}/updmap.d
+            set mapfilename \
+                ${destroot}${texlive_texmfsysconfig}/updmap.d/10${name}.cfg
+            set mapfile [open $mapfilename &quot;w&quot;]
+            foreach x ${texlive.maps} {
+                puts $mapfile $x
+            }
+            close $mapfile
+        }
+
+        # install languages.dat and languages.def files
+        if {${texlive.languages} != &quot;&quot;} {
+            xinstall -d ${destroot}${texlive_texmfsysconfig}/language.d
+            set langdatfilename \
+                ${destroot}${texlive_texmfsysconfig}/language.d/10${name}.dat
+            set langdeffilename \
+                ${destroot}${texlive_texmfsysconfig}/language.d/10${name}.def
+            set langluafilename \
+                ${destroot}${texlive_texmfsysconfig}/language.d/10${name}.dat.lua
+            set langdatfile [open $langdatfilename &quot;w&quot;]
+            set langdeffile [open $langdeffilename &quot;w&quot;]
+            set langluafile [open $langluafilename &quot;w&quot;]
+
+            foreach x ${texlive.languages} {
+                set langname [lindex $x 0]
+                set langfile [lindex $x 1]
+                set langlhmin [lindex $x 2]
+                set langrhmin [lindex $x 3]
+                set langsyns [lindex $x 4]
+                set langpatt [lindex $x 5]
+                set langhyph [lindex $x 6]
+                set langspecial [lindex $x 7]
+
+                puts $langdatfile &quot;$langname $langfile&quot;
+                foreach syn $langsyns {
+                    puts $langdatfile &quot;=$syn&quot;
+                }
+
+                foreach syn [concat $langname $langsyns] {
+                    puts $langdeffile &quot;\\addlanguage{$syn}{$langfile}{}{$langlhmin}{$langrhmin}&quot;
+                }
+
+                puts $langluafile &quot;\t\['$langname'\] = {&quot;
+                puts $langluafile &quot;\t\tloader = '$langfile',&quot;
+                puts $langluafile &quot;\t\tlefthyphenmin = $langlhmin,&quot;
+                puts $langluafile &quot;\t\trighthyphenmin = $langrhmin,&quot;
+                set qsyns {}
+                foreach syn $langsyns {
+                    lappend qsyns &quot;'$syn'&quot;
+                }
+                set qsynlist [join $qsyns &quot;, &quot;]
+                puts $langluafile &quot;\t\tsynonyms = { $qsynlist },&quot;
+                if {$langpatt != &quot;&quot;} {
+                    puts $langluafile &quot;\t\tpatterns = '$langpatt',&quot;
+                }
+                if {$langhyph != &quot;&quot;} {
+                    puts $langluafile &quot;\t\thyphenation = '$langhyph',&quot;
+                }
+                if {$langspecial != &quot;&quot;} {
+                    puts $langluafile &quot;\t\tpatterns = '$langspecial',&quot;
+                }
+                puts $langluafile &quot;\t},\n&quot;
+            }
+
+            close $langdatfile
+            close $langdeffile
+            close $langluafile
+        }
+
+        # create symlinks for any binaries activated by the port
+        foreach bin ${texlive.binaries} {
+            ln -s ${texlive_bindir}/$bin ${destroot}${prefix}/bin
+            ln -s ${texlive_bindir}/$bin ${destroot}${texlive_mactex_texbindir}
+        }
+    }
+
+    post-activate {
+        # Disable mktexlsr if it's not installed and this is a
+        # texlive-documentation-* port. It's possible (if unlikely) to
+        # install them without texlive-basic, so mktexlsr might not
+        # exist, but if it does we do want to run it.
+        if {[regexp {^texlive-documentation-} $name] &amp;&amp;
+            ![file exists ${prefix}/bin/mktexlsr]} {
+            texlive.use_mktexlsr no
+        }
+
+        if {${texlive.use_mktexlsr}} {
+            texlive.mktexlsr
+        }
+
+        if {${texlive.forceupdatecnf}} {
+            # If force was specified, update all the config files, and
+            # regenerate all maps and formats.
+            system &quot;${prefix}/libexec/texlive-update-cnf language.dat&quot;
+            system &quot;${prefix}/libexec/texlive-update-cnf language.def&quot;
+            system &quot;${prefix}/libexec/texlive-update-cnf language.dat.lua&quot;
+            system &quot;${prefix}/libexec/texlive-update-cnf updmap.cfg&quot;
+            system &quot;${prefix}/libexec/texlive-update-cnf fmtutil.cnf&quot;
+            # map/format generation might fail if we are in the middle of
+            # a major upgrade and have not yet updated all texlive ports.
+            # Catch the error to prevent the upgrade from failing.
+            catch {system &quot;${prefix}/bin/updmap-sys&quot;}
+            catch {system &quot;${prefix}/bin/fmtutil-sys --all&quot;}
+        } else {
+            # Otherwise, only update the config files that are
+            # actually affected, and only generate the needed
+            # formats.
+            if {${texlive.languages} != &quot;&quot;} {
+                system &quot;${prefix}/libexec/texlive-update-cnf language.dat&quot;
+                system &quot;${prefix}/libexec/texlive-update-cnf language.def&quot;
+                system &quot;${prefix}/libexec/texlive-update-cnf language.dat.lua&quot;
+            }
+            if {${texlive.maps} != &quot;&quot;} {
+                system &quot;${prefix}/libexec/texlive-update-cnf updmap.cfg&quot;
+                catch {system &quot;${prefix}/bin/updmap-sys&quot;}
+            }
+            if {${texlive.formats} != &quot;&quot;} {
+                system &quot;${prefix}/libexec/texlive-update-cnf fmtutil.cnf&quot;
+            }
+
+            # Regenerate formats. If we installed any hyphenation
+            # patterns, then we need to regenerate all
+            # formats. Otherwise, just generate the formats we just
+            # installed.
+            if {${texlive.languages} != &quot;&quot;} {
+                catch {system &quot;${prefix}/bin/fmtutil-sys --all&quot;}
+            } elseif {${texlive.formats} != &quot;&quot;} {
+                foreach x ${texlive.formats} {
+                    set fmtname [lindex $x 1]
+                    catch {system &quot;${prefix}/bin/fmtutil-sys --byfmt $fmtname&quot;}
+                }
+            }
+        }
+    }
+
+    post-deactivate {
+        # Disable mktexlsr if it's not installed and this is a
+        # texlive-documentation-* port. See post-activate for why.
+        if {[regexp {^texlive-documentation-} $name] &amp;&amp;
+            ![file exists ${prefix}/bin/mktexlsr]} {
+            texlive.use_mktexlsr no
+        }
+
+        # Update ls-R and any config files to reflect that the package
+        # is now gone
+        if {${texlive.use_mktexlsr} &amp;&amp; ${texlive.use_mktexlsr_on_deactivate}} {
+            texlive.mktexlsr
+        }
+        if {${texlive.forceupdatecnf} || ${texlive.languages} != &quot;&quot;} {
+            system &quot;${prefix}/libexec/texlive-update-cnf language.dat&quot;
+            system &quot;${prefix}/libexec/texlive-update-cnf language.def&quot;
+            system &quot;${prefix}/libexec/texlive-update-cnf language.dat.lua&quot;
+        }
+        if {${texlive.forceupdatecnf} || ${texlive.maps} != &quot;&quot;} {
+            system &quot;${prefix}/libexec/texlive-update-cnf updmap.cfg&quot;
+        }
+        if {${texlive.forceupdatecnf} || ${texlive.formats} != &quot;&quot;} {
+            system &quot;${prefix}/libexec/texlive-update-cnf fmtutil.cnf&quot;
+        }
+
+        # Remove any generated format files
+        foreach x ${texlive.formats} {
+            set fmtname [lindex $x 1]
+            set fmtengine [lindex $x 2]
+            switch $fmtengine {
+                &quot;mf&quot;       -
+                &quot;mf-nowin&quot; {set fmtengine &quot;metafont&quot;}
+                &quot;mpost&quot;    {set fmtengine &quot;metapost&quot;}
+            }
+
+            foreach filename [glob -nocomplain ${texlive_texmfsysvar}/web2c/$fmtengine/$fmtname.*] {
+                delete $filename
+            }
+        }
+    }
+}
</ins></span></pre>
</div>
</div>

</body>
</html>