# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 # $Id$ #====================================================================== # Portfile for LaTeXML #====================================================================== PortSystem 1.0 name LaTeXML version 0.8.1 revision 1 categories tex maintainers nist.gov:bruce.miller description LaTeXML converts TeX to XML/HTML/MathML long_description \ LaTeXML converts TeX to XML, including HTML, XHTML, ePub with MathML. # Written in Perl, but it is an application, not just modules PortGroup perl5 1.0 perl5.branches 5.8 5.10 5.12 5.14 5.16 5.18 5.20 perl5.setup ${name} ${version} perl5.link_binaries_suffix homepage http://dlmf.nist.gov/LaTeXML/ platforms darwin master_sites ${homepage}/releases/ checksums rmd160 312f0a3d74db75a9210220ab8ea4a1c3f95c6f71 \ sha256 ea264e1c11210e219a46b7699a578d8632c7bbb6eaea5b06d2eb094122cbab2f # Use: # openssl rmd160 LaTeXML-0.8.0.tar.gz # openssl sha256 LaTeXML-0.8.0.tar.gz #============================================================ # Dependencies if {${perl5.major} ne ""} { depends_lib-append \ port:p${perl5.major}-archive-zip \ port:p${perl5.major}-file-which \ port:p${perl5.major}-getopt-long \ port:p${perl5.major}-image-size \ port:p${perl5.major}-io-string \ port:p${perl5.major}-json-xs \ port:p${perl5.major}-libwww-perl \ port:p${perl5.major}-parse-recdescent \ port:p${perl5.major}-time-hires \ port:p${perl5.major}-uri \ port:p${perl5.major}-xml-libxml \ port:p${perl5.major}-xml-libxslt \ port:p${perl5.major}-perlmagick } # Also requires: DB_File, Pod::Parser, Test::More & version # but those should be in any non-obsolete Perl's core modules. #============================================================ # LaTeXML works MUCH better if there is a TeX installed. # - it uses some latex style files from texlive within bindings # - it can install its own style files for use within tex/latex # We could simply depend on texlive, but some folks prefer MacTeX # and object to 2nd multi-GB download! So we define variants. notes "${name} works best with some version of TeX installed. \ Please consider +texlive variant, or PRE-install MacTeX and use +mactex variant." # The texlive variant depends on texlive # and install latexml's stylefiles to texlive's texmf variant texlive description {Build with (macports) texlive support} { notes "Using texlive for TeX: will install styles to its texmf" depends_lib-append port:texlive configure.args-append TEXMF=[exec kpsewhich --expand-var='\$TEXMFLOCAL'] post-activate { system "mktexlsr" } } # The mactex variant expects MacTeX to be installed # and installs latexml's stylefiles to MacTeX's texmf variant mactex 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 } } notes "Using MacTeX for TeX: will install styles to MacTeX's texmf \ (outside macport's common directory structure)" configure.args-append TEXMF=[exec /usr/texbin/kpsewhich --expand-var='\$TEXMFLOCAL'] post-activate { system /usr/texbin/mktexlsr } # AND, since we're installing files outside macports' normal directories destroot.violate_mtree yes } #============================================================