<!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>[154083] trunk/dports/tex/LaTeXML/Portfile</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/154083">154083</a></dd>
<dt>Author</dt> <dd>mojca@macports.org</dd>
<dt>Date</dt> <dd>2016-10-19 19:23:50 -0700 (Wed, 19 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>LaTeXML: upgrade to 0.8.2 + various improvements
* upgrade to 0.8.2 (closes #51818)
* check for MacTeX binaries also in `/Library/TeX/texbin`
since `/usr/texbin` no longer exists on 10.11 and later,
more MacTeX-related logic implemented (closes #49507)
* texlive is no longer a build dependency, variant is gone,
style files are always installed to $prefix,
don't call mktexlsr during `make install` (closes #47972)
* switch to perl5.24 (#52081)</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportstexLaTeXMLPortfile">trunk/dports/tex/LaTeXML/Portfile</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportstexLaTeXMLPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/tex/LaTeXML/Portfile (154082 => 154083)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/tex/LaTeXML/Portfile 2016-10-20 02:15:40 UTC (rev 154082)
+++ trunk/dports/tex/LaTeXML/Portfile 2016-10-20 02:23:50 UTC (rev 154083)
</span><span class="lines">@@ -7,8 +7,7 @@
</span><span class="cx"> PortGroup texlive 1.0
</span><span class="cx">
</span><span class="cx"> name LaTeXML
</span><del>-version 0.8.1
-revision 1
</del><ins>+version 0.8.2
</ins><span class="cx"> license public-domain
</span><span class="cx"> maintainers nist.gov:bruce.miller
</span><span class="cx"> description LaTeXML converts TeX to XML/HTML/MathML
</span><span class="lines">@@ -17,7 +16,7 @@
</span><span class="cx">
</span><span class="cx"> # Written in Perl, but it is an application, not just modules
</span><span class="cx"> PortGroup perl5 1.0
</span><del>-perl5.branches 5.22
</del><ins>+perl5.branches 5.24
</ins><span class="cx"> perl5.setup ${name} ${version}
</span><span class="cx"> perl5.link_binaries_suffix
</span><span class="cx">
</span><span class="lines">@@ -28,11 +27,11 @@
</span><span class="cx"> supported_archs noarch
</span><span class="cx">
</span><span class="cx"> master_sites ${homepage}/releases/
</span><del>-checksums rmd160 312f0a3d74db75a9210220ab8ea4a1c3f95c6f71 \
- sha256 ea264e1c11210e219a46b7699a578d8632c7bbb6eaea5b06d2eb094122cbab2f
</del><ins>+checksums rmd160 6dbf960277cdcf30605ce93335e3383673c1ff66 \
+ sha256 3d41a3012760d31d721b569d8c1b430cde1df2b68fcc3c66f41ec640965caabf
</ins><span class="cx"> # Use:
</span><del>-# openssl rmd160 LaTeXML-0.8.0.tar.gz
-# openssl sha256 LaTeXML-0.8.0.tar.gz
</del><ins>+# openssl rmd160 LaTeXML-0.8.2.tar.gz
+# openssl sha256 LaTeXML-0.8.2.tar.gz
</ins><span class="cx">
</span><span class="cx"> #============================================================
</span><span class="cx"> # Dependencies
</span><span class="lines">@@ -45,6 +44,7 @@
</span><span class="cx"> port:p${perl5.major}-json-xs \
</span><span class="cx"> port:p${perl5.major}-libwww-perl \
</span><span class="cx"> port:p${perl5.major}-parse-recdescent \
</span><ins>+ port:p${perl5.major}-text-unidecode \
</ins><span class="cx"> port:p${perl5.major}-time-hires \
</span><span class="cx"> port:p${perl5.major}-uri \
</span><span class="cx"> port:p${perl5.major}-xml-libxml \
</span><span class="lines">@@ -60,43 +60,76 @@
</span><span class="cx"> # - it can install its own style files for use within tex/latex
</span><span class="cx"> # We could simply depend on texlive, but some folks prefer MacTeX
</span><span class="cx"> # and object to 2nd multi-GB download! So we define variants.
</span><ins>+set latexml.found_tex no
</ins><span class="cx">
</span><del>-notes "${name} works best with some version of TeX installed. \
- Please consider +texlive variant, or PRE-install MacTeX and use +mactex variant."
</del><ins>+# We don't want dependencies on texlive, but want to cooperate.
+# We'll install style files where texlive expects or will expect.
+configure.args-append TEXMF=${texlive_texmfdist}
</ins><span class="cx">
</span><del>-# The texlive variant depends on texlive
-# and install latexml's stylefiles to texlive's texmf
-variant texlive conflicts mactex description {Build with (macports) texlive support} {
- notes "Using texlive for TeX: will install styles to its texmf"
- depends_lib-append port:texlive
- pre-configure {
- configure.args-append TEXMF=${texlive_texmfports}
</del><ins>+# But the .packlist will need cleanup
+post-destroot {
+ fs-traverse file ${destroot}${prefix}/share {
+ if {[file isfile ${file}] && [file tail ${file}] eq ".packlist"} {
+ ui_info "Fixing paths in [string map "${destroot}${prefix}/ {}" ${file}]"
+ reinplace -n "s|${destroot}||p" ${file}
+ }
</ins><span class="cx"> }
</span><del>- post-activate {
- texlive.mktexlsr
</del><ins>+}
+
+# Note whether we've found a TeX
+post-activate {
+ if [file executable ${prefix}/bin/mktexlsr] {
+ set latexml.found_tex yes
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # The mactex variant expects MacTeX to be installed
</span><del>-# and installs latexml's stylefiles to MacTeX's texmf
-variant mactex conflicts texlive description {Build with MacTeX support} {
- # check if MacTeX actually seems to be there...
- pre-configure {
- if {![file executable /usr/texbin/kpsewhich]} {
- ui_error "I cannot find MacTeX's kpswhich in /usr/texbin; aborting installation"
- return -code error "MacTeX not installed"
- } else {
- configure.args-append TEXMF=[exec /usr/texbin/kpsewhich --expand-var='\$TEXMFLOCAL']
</del><ins>+# and installs latexml's stylefiles to MacTeX's texmf (local)
+set latexml.mactex_bin ""
+set latexml.mactex_texmf ""
+set latexml.mactex_candidates { \
+ "/Library/TeX/texbin" \
+ "/usr/texbin" \
+}
+variant mactex description {Build with MacTeX support} {
+ # First, check if MacTeX actually seems to be there...
+ foreach dir ${latexml.mactex_candidates} {
+ if [file executable "${dir}/kpsewhich"] {
+ set latexml.mactex_bin ${dir}
+ break
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- notes "Using MacTeX for TeX: will install styles to MacTeX's texmf \
- (outside macport's common directory structure)"
</del><ins>+ if { ${latexml.mactex_bin} != "" } {
+ set latexml.mactex_texmf \
+ [exec ${latexml.mactex_bin}/kpsewhich --expand-var='\$TEXMFLOCAL']
+ regsub -all {'} ${latexml.mactex_texmf} "" latexml.mactex_texmf
+ set latexml.found_tex yes
+ } else {
+ return -code error "Cannot find MacTeX installation; aborting"
+ }
+
+ post-destroot {
+ xinstall -d ${destroot}${latexml.mactex_texmf}/tex/latex/latexml
+ foreach sty [glob ${worksrcpath}/lib/LaTeXML/texmf/*.sty] {
+ xinstall -m 644 ${sty} ${destroot}${latexml.mactex_texmf}/tex/latex/latexml
+ }
+ }
</ins><span class="cx"> post-activate {
</span><del>- system /usr/texbin/mktexlsr
</del><ins>+ system "${latexml.mactex_bin}/mktexlsr"
</ins><span class="cx"> }
</span><del>-
</del><ins>+ post-deactivate {
+ system "${latexml.mactex_bin}/mktexlsr"
+ }
+ notes "Using MacTeX for TeX: will install styles to MacTeX's texmf-local
+ ${latexml.mactex_texmf} \
+ (which is outside macport's common directory structure)"
</ins><span class="cx"> # AND, since we're installing files outside macports' normal directories
</span><span class="cx"> destroot.violate_mtree yes
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+if {! ${latexml.found_tex}} {
+ notes "${name} works best with some version of TeX installed.
+ Please consider installing texlive, or PRE-install MacTeX and use the +mactex variant."
+}
+
</ins><span class="cx"> #============================================================
</span></span></pre>
</div>
</div>
</body>
</html>