<pre style='margin:0'>
Mojca Miklavec (mojca) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ee089b6b190f8b241e052ee78c04612e3c820f8f">https://github.com/macports/macports-ports/commit/ee089b6b190f8b241e052ee78c04612e3c820f8f</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ee089b6 dblatex: Support external TeX distribution.
</span>ee089b6 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ee089b6b190f8b241e052ee78c04612e3c820f8f
</span>Author: Werner Lemberg <wl@gnu.org>
AuthorDate: Sun Sep 16 22:44:09 2018 +0200
<span style='display:block; white-space:pre;color:#404040;'> dblatex: Support external TeX distribution.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Support external TeX (Live) distribution in addition to MacTeX. This also
</span><span style='display:block; white-space:pre;color:#404040;'> fixes various buglets if `port <cmd> dblatex +mactex` is called and no
</span><span style='display:block; white-space:pre;color:#404040;'> external TeXLive is available.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Also remove a call to a ConTeXt-specific command `mtxrun`
</span><span style='display:block; white-space:pre;color:#404040;'> which makes no sense for dblatex.
</span>---
textproc/dblatex/Portfile | 72 +++++++++++++++++++++++++++++++----------------
1 file changed, 47 insertions(+), 25 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/textproc/dblatex/Portfile b/textproc/dblatex/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 550966d..d4bb453 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/textproc/dblatex/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/textproc/dblatex/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -56,27 +56,57 @@ destroot.destdir --root=${destroot} \
</span> # and installs dblatex's stylefiles to MacTeX's texmf (local)
set dblatex.texmflocal ""
set dblatex.mactex_bin ""
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-variant mactex description {Allow dblatex to use a MacTeX installation instead of Macports texlive tools.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-To install the mactex variant /Library/TeX/texbin must be added to binpath
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-in macports.conf} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # First, check if MacTeX actually seems to be thereā¦
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set dblatex.mactex_candidates { \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "/Library/TeX/texbin" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "/usr/texbin" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set dblatex.temp ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant mactex description {Allow dblatex to use MacTeX or another\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ external TeXLive installation instead of MacPorts TeXLive tools.\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ To install the 'mactex' variant the path to the TeX distribution's\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ binary directory (for example '/Library/TeX/texbin') must be added\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to 'binpath' in 'macports.conf' *before* installing this port.} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Find the binary directory of the external TeX distribution by
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # searching the kpsewhich program in the path. We assume that all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # other binaries of the distribution are in this directory, too.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[auto_execok kpsewhich] ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dblatex.temp {*}[auto_execok kpsewhich]
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach dir ${dblatex.mactex_candidates} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if [file executable "${dir}/kpsewhich"] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set dblatex.mactex_bin ${dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set dblatex.mactex_bin \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [file dirname [file normalize ${dblatex.temp}]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${dblatex.mactex_bin} eq "."} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "Cannot find MacTeX or external TeXLive\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ installation; aborting. Have you added the path to\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ your TeX distribution's binary directory to 'binpath'\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ in 'macports.conf'?"
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ${dblatex.mactex_bin} != "" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {${dblatex.mactex_bin} eq \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [file dirname [file normalize "${prefix}/bin/kpsewhich"]]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "Variant 'mactex' doesn't work with\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ installed MacPorts TeXLive packages. Either\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uninstall them or don't use the 'mactex' variant of\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dblatex."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span> set dblatex.texmflocal \
[exec ${dblatex.mactex_bin}/kpsewhich --expand-var='\$TEXMFLOCAL']
regsub -all {'} ${dblatex.texmflocal} "" dblatex.texmflocal
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Make 'port notes dblatex +mactex' work even if neither the package
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # nor an external TeXLive is installed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${dblatex.texmflocal} eq ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes "The 'mactex' variant will install styles into your\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TeXLive's texmf-local tree (which is outside MacPorts'\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ common directory structure)."
</span> } else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return -code error "Cannot find MacTeX installation; aborting"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notes "\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The 'mactex' variant will install styles into your TeXLive's texmf-local\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+tree at
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${dblatex.texmflocal}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+(which is outside MacPorts' common directory structure)."
</span> }
depends_lib-delete \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -84,13 +114,8 @@ in macports.conf} {
</span> port:texlive-latex-recommended \
port:texlive-math-science
<span style='display:block; white-space:pre;background:#ffe0e0;'>- notes "The mactex variant will install styles to MacTeX's texmf-local
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${dblatex.texmflocal}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (which is outside macport's common directory structure).
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- For the mactex variant to work,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${dblatex.mactex_bin} must also be added to binpath in macports.conf"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # AND, since we're installing files outside macports' normal directories
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # AND, since we're installing files outside MacPorts' normal
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # directories...
</span> destroot.violate_mtree yes
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -127,9 +152,6 @@ proc dblatex.mktexlsr {} {
</span> } else {
global dblatex.mactex_bin
system "${dblatex.mactex_bin}/mktexlsr"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if [file exists "${dblatex.mactex_bin}/mtxrun"] {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- system "${dblatex.mactex_bin}/mtxrun --generate"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> }
}
</pre><pre style='margin:0'>
</pre>