Ticket #51818: Portfile.2.diff
File Portfile.2.diff, 6.1 KB (added by brucemiller (bruce miller), 8 years ago) |
---|
-
(a) Portfile vs. (b) Portfile-0.8.1
a b 7 7 PortGroup texlive 1.0 8 8 9 9 name LaTeXML 10 version 0.8.2 10 version 0.8.1 11 revision 1 11 12 license public-domain 12 13 maintainers nist.gov:bruce.miller 13 14 description LaTeXML converts TeX to XML/HTML/MathML … … 16 17 17 18 # Written in Perl, but it is an application, not just modules 18 19 PortGroup perl5 1.0 19 perl5.branches 5.2 420 perl5.branches 5.22 20 21 perl5.setup ${name} ${version} 21 22 perl5.link_binaries_suffix 22 23 … … 27 28 supported_archs noarch 28 29 29 30 master_sites ${homepage}/releases/ 30 checksums rmd160 6dbf960277cdcf30605ce93335e3383673c1ff66\31 sha256 3d41a3012760d31d721b569d8c1b430cde1df2b68fcc3c66f41ec640965caabf31 checksums rmd160 312f0a3d74db75a9210220ab8ea4a1c3f95c6f71 \ 32 sha256 ea264e1c11210e219a46b7699a578d8632c7bbb6eaea5b06d2eb094122cbab2f 32 33 # Use: 33 # openssl rmd160 LaTeXML-0.8. 2.tar.gz34 # openssl sha256 LaTeXML-0.8. 2.tar.gz34 # openssl rmd160 LaTeXML-0.8.0.tar.gz 35 # openssl sha256 LaTeXML-0.8.0.tar.gz 35 36 36 37 #============================================================ 37 38 # Dependencies … … 44 45 port:p${perl5.major}-json-xs \ 45 46 port:p${perl5.major}-libwww-perl \ 46 47 port:p${perl5.major}-parse-recdescent \ 47 port:p${perl5.major}-text-unidecode \48 48 port:p${perl5.major}-time-hires \ 49 49 port:p${perl5.major}-uri \ 50 50 port:p${perl5.major}-xml-libxml \ … … 60 60 # - it can install its own style files for use within tex/latex 61 61 # We could simply depend on texlive, but some folks prefer MacTeX 62 62 # and object to 2nd multi-GB download! So we define variants. 63 options latexml.found_tex64 default latexml.found_tex no65 63 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} 64 notes "${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 69 variant 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} 90 74 } 91 if [file executable ${prefix}/bin/mktexlsr]{92 ${texlive.mktexlsr}75 post-activate { 76 texlive.mktexlsr 93 77 } 94 78 } 95 79 96 80 # 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 82 variant 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'] 127 90 } 128 91 } 92 notes "Using MacTeX for TeX: will install styles to MacTeX's texmf \ 93 (outside macport's common directory structure)" 129 94 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 138 96 } 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 142 98 # AND, since we're installing files outside macports' normal directories 143 99 destroot.violate_mtree yes 144 100 } 145 101 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 153 102 #============================================================