Ticket #51818: Portfile.2.diff

File Portfile.2.diff, 6.1 KB (added by brucemiller (bruce miller), 8 years ago)

diff from commited version

  • (a) Portfile vs. (b) Portfile-0.8.1

    a b  
    77PortGroup           texlive 1.0
    88
    99name                LaTeXML
    10 version             0.8.2
     10version             0.8.1
     11revision            1
    1112license             public-domain
    1213maintainers         nist.gov:bruce.miller
    1314description         LaTeXML converts TeX to XML/HTML/MathML
     
    1617
    1718# Written in Perl, but it is an application, not just modules
    1819PortGroup           perl5 1.0
    19 perl5.branches      5.24
     20perl5.branches      5.22
    2021perl5.setup         ${name} ${version}
    2122perl5.link_binaries_suffix
    2223
     
    2728supported_archs     noarch
    2829
    2930master_sites        ${homepage}/releases/
    30 checksums           rmd160 6dbf960277cdcf30605ce93335e3383673c1ff66 \
    31                     sha256 3d41a3012760d31d721b569d8c1b430cde1df2b68fcc3c66f41ec640965caabf
     31checksums           rmd160 312f0a3d74db75a9210220ab8ea4a1c3f95c6f71 \
     32                    sha256 ea264e1c11210e219a46b7699a578d8632c7bbb6eaea5b06d2eb094122cbab2f
    3233# Use:
    33 # openssl rmd160 LaTeXML-0.8.2.tar.gz
    34 # openssl sha256 LaTeXML-0.8.2.tar.gz
     34# openssl rmd160 LaTeXML-0.8.0.tar.gz
     35# openssl sha256 LaTeXML-0.8.0.tar.gz
    3536
    3637#============================================================
    3738# Dependencies
     
    4445        port:p${perl5.major}-json-xs \
    4546        port:p${perl5.major}-libwww-perl \
    4647        port:p${perl5.major}-parse-recdescent \
    47         port:p${perl5.major}-text-unidecode \
    4848        port:p${perl5.major}-time-hires \
    4949        port:p${perl5.major}-uri \
    5050        port:p${perl5.major}-xml-libxml \
     
    6060# - it can install its own style files for use within tex/latex
    6161# We could simply depend on texlive, but some folks prefer MacTeX
    6262# and object to 2nd multi-GB download!  So we define variants.
    63 options latexml.found_tex
    64 default latexml.found_tex no
    6563
    66 # No texmf install via Makefile.
    67 pre-configure {
    68    configure.args-append   TEXMF=
    69   }
    70 # We don't want dependencies on texlive, but want to cooperate.
    71 # We'll install style files where texlive expects or will expect.
    72 post-destroot {
    73     xinstall -d ${texlive_texmfdist}/tex/latex/latexml
    74     foreach sty [glob ${worksrcpath}/lib/LaTeXML/texmf/*.sty] {
    75         file copy -force ${sty} ${texlive_texmfdist}/tex/latex/latexml/
    76     }
    77 }
    78 # invoke mktexlsr IFF texlive already installed;
    79 # otherwise texlive will do it if it's ever installed.
    80 post-activate {
    81     if [file executable ${prefix}/bin/mktexlsr] {
    82         latexml.found_tex yes
    83         ${texlive.mktexlsr}
    84     }
    85 }
    86 # Remove style files
    87 post-uninstall {
    88     foreach sty [glob -nocomplain ${texlive_texmfdist}/tex/latex/latexml/*.sty] {
    89         delete ${sty}
     64notes "${name} works best with some version of TeX installed. \
     65   Please consider +texlive variant, or PRE-install MacTeX and use +mactex variant."
     66
     67# The texlive variant depends on texlive
     68# and install latexml's stylefiles to texlive's texmf
     69variant texlive conflicts mactex description {Build with (macports) texlive support} {
     70    notes "Using texlive for TeX: will install styles to its texmf"
     71    depends_lib-append      port:texlive
     72    pre-configure {
     73        configure.args-append   TEXMF=${texlive_texmfports}
    9074    }
    91     if [file executable ${prefix}/bin/mktexlsr] {
    92         ${texlive.mktexlsr}
     75    post-activate {
     76        texlive.mktexlsr
    9377    }
    9478}
    9579
    9680# The mactex variant expects MacTeX to be installed
    97 # and installs latexml's stylefiles to MacTeX's texmf (local)
    98 options latexml.mactex_bin
    99 options latexml.mactex_texmf
    100 default latexml.mactex_bin ""
    101 default latexml.mactex_texmf ""
    102 set latexml.mactex_candidates { \
    103    "/Library/TeX/texbin" \
    104    "/usr/texbin" \
    105 }
    106 variant mactex description {Build with MacTeX support} {
    107     # First, check if MacTeX actually seems to be there...
    108     foreach dir ${latexml.mactex_candidates} {
    109         if [file executable "${dir}/kpsewhich"] {
    110             latexml.mactex_bin ${dir}
    111             break
    112         }
    113     }
    114     if { ${latexml.mactex_bin} != "" } {
    115         latexml.mactex_texmf \
    116             [exec ${latexml.mactex_bin}/kpsewhich --expand-var='\$TEXMFLOCAL']
    117         regsub -all {'} ${latexml.mactex_texmf} "" latexml.mactex_texmf
    118         latexml.found_tex yes
    119     } else {
    120         return -code error "Cannot find MacTeX installation; aborting"
    121     }
    122 
    123     post-destroot {
    124         xinstall -d ${latexml.mactex_texmf}/tex/latex/latexml
    125         foreach sty [glob ${worksrcpath}/lib/LaTeXML/texmf/*.sty] {
    126             file copy -force ${sty} ${latexml.mactex_texmf}/tex/latex/latexml/
     81# and installs latexml's stylefiles to MacTeX's texmf
     82variant mactex conflicts texlive description {Build with MacTeX support} {
     83    # check if MacTeX actually seems to be there...
     84    pre-configure {
     85        if {![file executable /usr/texbin/kpsewhich]} {
     86            ui_error "I cannot find MacTeX's kpswhich in /usr/texbin; aborting installation"
     87            return -code error "MacTeX not installed"
     88        } else {
     89            configure.args-append   TEXMF=[exec /usr/texbin/kpsewhich --expand-var='\$TEXMFLOCAL']
    12790        }
    12891    }
     92    notes "Using MacTeX for TeX: will install styles to MacTeX's texmf \
     93        (outside macport's common directory structure)"
    12994    post-activate {
    130         system "${latexml.mactex_bin}/mktexlsr"
    131     }
    132     # Remove style files
    133     post-uninstall {
    134         foreach sty [glob -nocomplain ${latexml.mactex_texmf}/tex/latex/latexml/*.sty] {
    135             delete ${sty}
    136         }
    137         system "${latexml.mactex_bin}/mktexlsr"
     95        system /usr/texbin/mktexlsr
    13896    }
    139     notes "Using MacTeX for TeX: will install styles to MacTeX's texmf-local \
    140         ${latexml.mactex_texmf} \
    141         (which is outside macport's common directory structure)"
     97
    14298    # AND, since we're installing files outside macports' normal directories
    14399    destroot.violate_mtree  yes
    144100}
    145101
    146 post-activate {
    147     if {! ${latexml.found_tex}} {
    148         ui_msg "${name} works best with some version of TeX installed. \
    149     Please consider installing texlive, or PRE-install MacTeX and use +mactex variant."
    150     }
    151 }
    152 
    153102#============================================================